diff --git a/downloads/ jenna ai chat Chatflow.json b/downloads/ jenna ai chat Chatflow.json
deleted file mode 100644
index fc93edb..0000000
--- a/downloads/ jenna ai chat Chatflow.json
+++ /dev/null
@@ -1,514 +0,0 @@
-{
- "nodes": [
- {
- "id": "llmChain_0",
- "position": {
- "x": 829.035635359116,
- "y": 344.314364640884
- },
- "type": "customNode",
- "data": {
- "id": "llmChain_0",
- "label": "LLM Chain",
- "version": 3,
- "name": "llmChain",
- "type": "LLMChain",
- "baseClasses": [
- "LLMChain",
- "BaseChain",
- "Runnable"
- ],
- "category": "Chains",
- "description": "Chain to run queries against LLMs",
- "inputParams": [
- {
- "label": "Chain Name",
- "name": "chainName",
- "type": "string",
- "placeholder": "Name Your Chain",
- "optional": true,
- "id": "llmChain_0-input-chainName-string",
- "display": true
- }
- ],
- "inputAnchors": [
- {
- "label": "Language Model",
- "name": "model",
- "type": "BaseLanguageModel",
- "id": "llmChain_0-input-model-BaseLanguageModel",
- "display": true
- },
- {
- "label": "Prompt",
- "name": "prompt",
- "type": "BasePromptTemplate",
- "id": "llmChain_0-input-prompt-BasePromptTemplate",
- "display": true
- },
- {
- "label": "Output Parser",
- "name": "outputParser",
- "type": "BaseLLMOutputParser",
- "optional": true,
- "id": "llmChain_0-input-outputParser-BaseLLMOutputParser",
- "display": true
- },
- {
- "label": "Input Moderation",
- "description": "Detect text that could generate harmful output and prevent it from being sent to the language model",
- "name": "inputModeration",
- "type": "Moderation",
- "optional": true,
- "list": true,
- "id": "llmChain_0-input-inputModeration-Moderation",
- "display": true
- }
- ],
- "inputs": {
- "model": "{{chatOpenAI_0.data.instance}}",
- "prompt": "{{promptTemplate_0.data.instance}}",
- "outputParser": "",
- "inputModeration": "",
- "chainName": ""
- },
- "outputAnchors": [
- {
- "name": "output",
- "label": "Output",
- "type": "options",
- "description": "",
- "options": [
- {
- "id": "llmChain_0-output-llmChain-LLMChain|BaseChain|Runnable",
- "name": "llmChain",
- "label": "LLM Chain",
- "description": "",
- "type": "LLMChain | BaseChain | Runnable"
- },
- {
- "id": "llmChain_0-output-outputPrediction-string|json",
- "name": "outputPrediction",
- "label": "Output Prediction",
- "description": "",
- "type": "string | json"
- }
- ],
- "default": "llmChain"
- }
- ],
- "outputs": {
- "output": "llmChain"
- },
- "selected": false
- },
- "width": 300,
- "height": 514,
- "selected": false,
- "positionAbsolute": {
- "x": 829.035635359116,
- "y": 344.314364640884
- },
- "dragging": false
- },
- {
- "id": "chatOpenAI_0",
- "position": {
- "x": 357.9495996101249,
- "y": -208.05581727949718
- },
- "type": "customNode",
- "data": {
- "id": "chatOpenAI_0",
- "label": "ChatOpenAI",
- "version": 8.3,
- "name": "chatOpenAI",
- "type": "ChatOpenAI",
- "baseClasses": [
- "ChatOpenAI",
- "BaseChatOpenAI",
- "BaseChatModel",
- "BaseLanguageModel",
- "Runnable"
- ],
- "category": "Chat Models",
- "description": "Wrapper around OpenAI large language models that use the Chat endpoint",
- "inputParams": [
- {
- "label": "Connect Credential",
- "name": "credential",
- "type": "credential",
- "credentialNames": [
- "openAIApi"
- ],
- "id": "chatOpenAI_0-input-credential-credential",
- "display": true
- },
- {
- "label": "Model Name",
- "name": "modelName",
- "type": "asyncOptions",
- "loadMethod": "listModels",
- "default": "gpt-4o-mini",
- "id": "chatOpenAI_0-input-modelName-asyncOptions",
- "display": true
- },
- {
- "label": "Temperature",
- "name": "temperature",
- "type": "number",
- "step": 0.1,
- "default": 0.9,
- "optional": true,
- "id": "chatOpenAI_0-input-temperature-number",
- "display": true
- },
- {
- "label": "Streaming",
- "name": "streaming",
- "type": "boolean",
- "default": true,
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-streaming-boolean",
- "display": true
- },
- {
- "label": "Max Tokens",
- "name": "maxTokens",
- "type": "number",
- "step": 1,
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-maxTokens-number",
- "display": true
- },
- {
- "label": "Top Probability",
- "name": "topP",
- "type": "number",
- "step": 0.1,
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-topP-number",
- "display": true
- },
- {
- "label": "Frequency Penalty",
- "name": "frequencyPenalty",
- "type": "number",
- "step": 0.1,
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-frequencyPenalty-number",
- "display": true
- },
- {
- "label": "Presence Penalty",
- "name": "presencePenalty",
- "type": "number",
- "step": 0.1,
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-presencePenalty-number",
- "display": true
- },
- {
- "label": "Timeout",
- "name": "timeout",
- "type": "number",
- "step": 1,
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-timeout-number",
- "display": true
- },
- {
- "label": "Strict Tool Calling",
- "name": "strictToolCalling",
- "type": "boolean",
- "description": "Whether the model supports the `strict` argument when passing in tools. If not specified, the `strict` argument will not be passed to OpenAI.",
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-strictToolCalling-boolean",
- "display": true
- },
- {
- "label": "Stop Sequence",
- "name": "stopSequence",
- "type": "string",
- "rows": 4,
- "optional": true,
- "description": "List of stop words to use when generating. Use comma to separate multiple stop words.",
- "additionalParams": true,
- "id": "chatOpenAI_0-input-stopSequence-string",
- "display": true
- },
- {
- "label": "BasePath",
- "name": "basepath",
- "type": "string",
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-basepath-string",
- "display": true
- },
- {
- "label": "Proxy Url",
- "name": "proxyUrl",
- "type": "string",
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-proxyUrl-string",
- "display": true
- },
- {
- "label": "BaseOptions",
- "name": "baseOptions",
- "type": "json",
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-baseOptions-json",
- "display": true
- },
- {
- "label": "Allow Image Uploads",
- "name": "allowImageUploads",
- "type": "boolean",
- "description": "Allow image input. Refer to the docs for more details.",
- "default": false,
- "optional": true,
- "id": "chatOpenAI_0-input-allowImageUploads-boolean",
- "display": true
- },
- {
- "label": "Image Resolution",
- "description": "This parameter controls the resolution in which the model views the image.",
- "name": "imageResolution",
- "type": "options",
- "options": [
- {
- "label": "Low",
- "name": "low"
- },
- {
- "label": "High",
- "name": "high"
- },
- {
- "label": "Auto",
- "name": "auto"
- }
- ],
- "default": "low",
- "optional": false,
- "show": {
- "allowImageUploads": true
- },
- "id": "chatOpenAI_0-input-imageResolution-options",
- "display": false
- },
- {
- "label": "Reasoning",
- "description": "Whether the model supports reasoning. Only applicable for reasoning models.",
- "name": "reasoning",
- "type": "boolean",
- "default": false,
- "optional": true,
- "additionalParams": true,
- "id": "chatOpenAI_0-input-reasoning-boolean",
- "display": true
- },
- {
- "label": "Reasoning Effort",
- "description": "Constrains effort on reasoning for reasoning models",
- "name": "reasoningEffort",
- "type": "options",
- "options": [
- {
- "label": "Low",
- "name": "low"
- },
- {
- "label": "Medium",
- "name": "medium"
- },
- {
- "label": "High",
- "name": "high"
- }
- ],
- "additionalParams": true,
- "show": {
- "reasoning": true
- },
- "id": "chatOpenAI_0-input-reasoningEffort-options",
- "display": false
- },
- {
- "label": "Reasoning Summary",
- "description": "A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process",
- "name": "reasoningSummary",
- "type": "options",
- "options": [
- {
- "label": "Auto",
- "name": "auto"
- },
- {
- "label": "Concise",
- "name": "concise"
- },
- {
- "label": "Detailed",
- "name": "detailed"
- }
- ],
- "additionalParams": true,
- "show": {
- "reasoning": true
- },
- "id": "chatOpenAI_0-input-reasoningSummary-options",
- "display": false
- }
- ],
- "inputAnchors": [
- {
- "label": "Cache",
- "name": "cache",
- "type": "BaseCache",
- "optional": true,
- "id": "chatOpenAI_0-input-cache-BaseCache",
- "display": true
- }
- ],
- "inputs": {
- "cache": "",
- "modelName": "gpt-4o-mini",
- "temperature": 0.9,
- "streaming": true,
- "maxTokens": "",
- "topP": "",
- "frequencyPenalty": "",
- "presencePenalty": "",
- "timeout": "",
- "strictToolCalling": "",
- "stopSequence": "",
- "basepath": "",
- "proxyUrl": "",
- "baseOptions": "",
- "allowImageUploads": "",
- "imageResolution": "low",
- "reasoning": "",
- "reasoningEffort": "",
- "reasoningSummary": ""
- },
- "outputAnchors": [
- {
- "id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable",
- "name": "chatOpenAI",
- "label": "ChatOpenAI",
- "description": "Wrapper around OpenAI large language models that use the Chat endpoint",
- "type": "ChatOpenAI | BaseChatOpenAI | BaseChatModel | BaseLanguageModel | Runnable"
- }
- ],
- "outputs": {},
- "selected": false
- },
- "width": 300,
- "height": 676,
- "selected": false,
- "positionAbsolute": {
- "x": 357.9495996101249,
- "y": -208.05581727949718
- },
- "dragging": false
- },
- {
- "id": "promptTemplate_0",
- "position": {
- "x": 355.34464051183033,
- "y": 518.8403272698386
- },
- "type": "customNode",
- "data": {
- "id": "promptTemplate_0",
- "label": "Prompt Template",
- "version": 1,
- "name": "promptTemplate",
- "type": "PromptTemplate",
- "baseClasses": [
- "PromptTemplate",
- "BaseStringPromptTemplate",
- "BasePromptTemplate",
- "Runnable"
- ],
- "category": "Prompts",
- "description": "Schema to represent a basic prompt for an LLM",
- "inputParams": [
- {
- "label": "Template",
- "name": "template",
- "type": "string",
- "rows": 4,
- "placeholder": "What is a good name for a company that makes {product}?",
- "id": "promptTemplate_0-input-template-string",
- "display": true
- },
- {
- "label": "Format Prompt Values",
- "name": "promptValues",
- "type": "json",
- "optional": true,
- "acceptVariable": true,
- "list": true,
- "id": "promptTemplate_0-input-promptValues-json",
- "display": true
- }
- ],
- "inputAnchors": [],
- "inputs": {
- "template": "# 🤖 Persona AI: Sahabat Percakapan Mendalam\n\n## Karakter Utama\n- Ramah, hangat, dan selalu membuat orang merasa nyaman.\n- Penasaran secara alami, suka bertanya balik untuk menjaga percakapan tetap hidup.\n- Senang mengajak orang berbagi cerita, pengalaman, dan pemikiran mendalam.\n- Tidak terburu-buru; menghargai jeda, detail, dan refleksi dari lawan bicara.\n\n## Gaya Bicara\n- Menggunakan bahasa sehari-hari yang mudah dimengerti.\n- Memberi kesan manusiawi, penuh empati, tanpa terdengar kaku.\n- Kadang menyelipkan humor ringan atau pertanyaan reflektif.\n- Lebih suka bertanya *“Kenapa menurutmu begitu?”* daripada hanya memberi jawaban singkat.\n\n## Topik Favorit\n- Pemikiran mendalam tentang kehidupan, mimpi, dan tujuan.\n- Teknologi, ide-ide baru, dan bagaimana itu memengaruhi manusia.\n- Cerita sehari-hari, pengalaman pribadi, dan hal-hal sederhana yang punya makna.\n- Diskusi terbuka tentang apa pun yang membuat orang berpikir lebih jauh.\n\n## Pola Interaksi\n1. **Membuka dengan keakraban**: menyapa dengan hangat dan membuat suasana santai. \n2. **Menggali lebih jauh**: menanyakan pendapat, alasan, atau cerita di balik jawaban. \n3. **Membangun koneksi**: mengaitkan topik dengan hal yang lebih personal atau universal. \n4. **Memancing refleksi**: memberi pertanyaan lanjutan yang mengundang renungan atau cerita tambahan. \n\n## Contoh Gaya Percakapan\n- \"Itu menarik banget, bisa ceritain lebih detail kenapa menurutmu begitu?\" \n- \"Aku penasaran, kalau situasi itu terjadi padamu, apa yang akan kamu lakukan?\" \n- \"Wah, itu kedengarannya punya makna besar buatmu. Apa ada pengalaman tertentu yang bikin kamu berpikir begitu?\" \n- \"Hmm, aku jadi kepikiran... gimana kalau kita lihat dari sudut pandang yang berbeda?\" \n\n---\n✨ Persona ini ditujukan untuk membuat AI terasa **akrab, reflektif, dan bikin percakapan selalu hidup**, bukan sekadar menjawab.\n\n{text}\n",
- "promptValues": "{\"text\":\"{{question}}\"}"
- },
- "outputAnchors": [
- {
- "id": "promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate|Runnable",
- "name": "promptTemplate",
- "label": "PromptTemplate",
- "description": "Schema to represent a basic prompt for an LLM",
- "type": "PromptTemplate | BaseStringPromptTemplate | BasePromptTemplate | Runnable"
- }
- ],
- "outputs": {},
- "selected": false
- },
- "width": 300,
- "height": 519,
- "selected": false,
- "positionAbsolute": {
- "x": 355.34464051183033,
- "y": 518.8403272698386
- },
- "dragging": false
- }
- ],
- "edges": [
- {
- "source": "chatOpenAI_0",
- "sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable",
- "target": "llmChain_0",
- "targetHandle": "llmChain_0-input-model-BaseLanguageModel",
- "type": "buttonedge",
- "id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable-llmChain_0-llmChain_0-input-model-BaseLanguageModel"
- },
- {
- "source": "promptTemplate_0",
- "sourceHandle": "promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate|Runnable",
- "target": "llmChain_0",
- "targetHandle": "llmChain_0-input-prompt-BasePromptTemplate",
- "type": "buttonedge",
- "id": "promptTemplate_0-promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate|Runnable-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate"
- }
- ]
-}
\ No newline at end of file
diff --git a/downloads/13fc6a9d-b915-4693-9cf0-ffb51897b015.pdf b/downloads/13fc6a9d-b915-4693-9cf0-ffb51897b015.pdf
deleted file mode 100644
index 986ab78..0000000
Binary files a/downloads/13fc6a9d-b915-4693-9cf0-ffb51897b015.pdf and /dev/null differ
diff --git a/downloads/Apakah-Itu-Pendidikan.jpg b/downloads/Apakah-Itu-Pendidikan.jpg
deleted file mode 100644
index 4bfe549..0000000
Binary files a/downloads/Apakah-Itu-Pendidikan.jpg and /dev/null differ
diff --git a/downloads/Arief Nasuha Nasution.pdf b/downloads/Arief Nasuha Nasution.pdf
deleted file mode 100644
index db3d70f..0000000
Binary files a/downloads/Arief Nasuha Nasution.pdf and /dev/null differ
diff --git a/downloads/BalesOtomatis.id – Analisis Sistem Otomatisasi WhatsApp Marketing.pdf b/downloads/BalesOtomatis.id – Analisis Sistem Otomatisasi WhatsApp Marketing.pdf
deleted file mode 100644
index 2f8908a..0000000
Binary files a/downloads/BalesOtomatis.id – Analisis Sistem Otomatisasi WhatsApp Marketing.pdf and /dev/null differ
diff --git a/downloads/Desa Darmasaba-Akta Kelahiran.pdf b/downloads/Desa Darmasaba-Akta Kelahiran.pdf
deleted file mode 100644
index 01710d4..0000000
Binary files a/downloads/Desa Darmasaba-Akta Kelahiran.pdf and /dev/null differ
diff --git a/downloads/arif n nasution.pdf b/downloads/arif n nasution.pdf
deleted file mode 100644
index 96a5ea1..0000000
Binary files a/downloads/arif n nasution.pdf and /dev/null differ
diff --git a/downloads/billing-server-20-06-2024.pdf b/downloads/billing-server-20-06-2024.pdf
deleted file mode 100644
index 66cd6a6..0000000
Binary files a/downloads/billing-server-20-06-2024.pdf and /dev/null differ
diff --git a/downloads/buku-saku-lele-bioflok_revisi-_FINAL_compressed.pdf b/downloads/buku-saku-lele-bioflok_revisi-_FINAL_compressed.pdf
deleted file mode 100644
index 77d2724..0000000
Binary files a/downloads/buku-saku-lele-bioflok_revisi-_FINAL_compressed.pdf and /dev/null differ
diff --git a/downloads/darmasaba.txt b/downloads/darmasaba.txt
deleted file mode 100644
index f6c8593..0000000
--- a/downloads/darmasaba.txt
+++ /dev/null
@@ -1,3709 +0,0 @@
-```yaml
-openapi: 3.0.3
-info:
- title: Desa+ Mobile API
- description: API untuk aplikasi mobile Desa+ (berbasis kode client Axios).
- version: 1.0.0
- contact:
- name: API Support
- email: support@desa-plus.com
-
-servers:
- - url: https://staging-darmasaba.wibudev.com/api
- description: Production server
-
-components:
- securitySchemes:
- bearerAuth:
- type: http
- scheme: bearer
- bearerFormat: JWT
-
- schemas:
- # Common Schemas
- User:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- phone:
- type: string
- required:
- - id
-
- Error:
- type: object
- properties:
- message:
- type: string
- status:
- type: integer
-
- # Auth
- PhoneLoginBody:
- type: object
- properties:
- phone:
- type: string
- required:
- - phone
-
- OtpBody:
- type: object
- properties:
- phone:
- type: string
- otp:
- type: integer
- required:
- - phone
- - otp
-
- # Banner
- Banner:
- type: object
- properties:
- id:
- type: string
- title:
- type: string
- image:
- type: string
- user:
- type: string
- required:
- - id
-
- # Group
- Group:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- user:
- type: string
- isActive:
- type: boolean
- required:
- - id
- - name
-
- GroupCreateBody:
- type: object
- properties:
- user:
- type: string
- name:
- type: string
- required:
- - user
- - name
-
- # Position
- Position:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- idGroup:
- type: string
- user:
- type: string
- isActive:
- type: boolean
- required:
- - id
- - name
-
- PositionCreateBody:
- type: object
- properties:
- user:
- type: string
- name:
- type: string
- idGroup:
- type: string
- required:
- - user
- - name
- - idGroup
-
- # User Management
- UserCreateBody:
- type: object
- properties:
- name:
- type: string
- email:
- type: string
- photo:
- type: string
- required:
- - name
-
- # Discussion General
- DiscussionGeneral:
- type: object
- properties:
- id:
- type: string
- title:
- type: string
- desc:
- type: string
- user:
- type: string
- status:
- type: integer
- member:
- type: array
- items:
- $ref: '#/components/schemas/User'
- required:
- - id
- - title
-
- DiscussionGeneralCreateBody:
- type: object
- properties:
- idGroup:
- type: string
- title:
- type: string
- desc:
- type: string
- user:
- type: string
- member:
- type: array
- items:
- $ref: '#/components/schemas/User'
- required:
- - idGroup
- - title
- - desc
- - user
-
- DiscussionGeneralCommentBody:
- type: object
- properties:
- desc:
- type: string
- user:
- type: string
- required:
- - desc
- - user
-
- # Announcement
- Announcement:
- type: object
- properties:
- id:
- type: string
- title:
- type: string
- desc:
- type: string
- user:
- type: string
- groups:
- type: array
- items:
- type: string
- required:
- - id
- - title
-
- AnnouncementCreateBody:
- type: object
- properties:
- title:
- type: string
- desc:
- type: string
- user:
- type: string
- groups:
- type: array
- items:
- type: string
- required:
- - title
- - desc
- - user
- - groups
-
- # Project
- Project:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- user:
- type: string
- status:
- type: integer
- member:
- type: array
- items:
- $ref: '#/components/schemas/User'
- required:
- - id
- - name
-
- ProjectCreateBody:
- type: object
- properties:
- name:
- type: string
- description:
- type: string
- required:
- - name
-
- ProjectTaskCreateBody:
- type: object
- properties:
- name:
- type: string
- dateStart:
- type: string
- dateEnd:
- type: string
- user:
- type: string
- dataDetail:
- type: array
- items:
- type: object
- required:
- - name
- - dateStart
- - dateEnd
- - user
-
- ProjectUpdateStatusBody:
- type: object
- properties:
- user:
- type: string
- status:
- type: integer
- idProject:
- type: string
- required:
- - user
- - status
- - idProject
-
- # Division
- Division:
- type: object
- properties:
- id:
- type: string
- name:
- type: string
- desc:
- type: string
- user:
- type: string
- isActive:
- type: boolean
- member:
- type: array
- items:
- $ref: '#/components/schemas/User'
- required:
- - id
- - name
-
- DivisionCreateBody:
- type: object
- properties:
- data:
- type: object
- properties:
- idGroup:
- type: string
- name:
- type: string
- desc:
- type: string
- required:
- - idGroup
- - name
- - desc
- member:
- type: array
- items:
- $ref: '#/components/schemas/User'
- admin:
- type: array
- items:
- type: string
- user:
- type: string
- required:
- - data
- - member
- - admin
- - user
-
- DivisionMemberBody:
- type: object
- properties:
- user:
- type: string
- member:
- type: array
- items:
- $ref: '#/components/schemas/User'
- required:
- - user
- - member
-
- # Discussion
- Discussion:
- type: object
- properties:
- id:
- type: string
- desc:
- type: string
- user:
- type: string
- idDivision:
- type: string
- active:
- type: boolean
- status:
- type: integer
- required:
- - id
- - desc
-
- DiscussionCreateBody:
- type: object
- properties:
- user:
- type: string
- desc:
- type: string
- idDivision:
- type: string
- required:
- - user
- - desc
- - idDivision
-
- DiscussionCommentBody:
- type: object
- properties:
- user:
- type: string
- comment:
- type: string
- required:
- - user
- - comment
-
- DiscussionEditBody:
- type: object
- properties:
- user:
- type: string
- desc:
- type: string
- required:
- - user
- - desc
-
- # Calendar
- Calendar:
- type: object
- properties:
- id:
- type: string
- title:
- type: string
- desc:
- type: string
- timeStart:
- type: string
- timeEnd:
- type: string
- dateStart:
- type: string
- repeatEventTyper:
- type: string
- repeatValue:
- type: string
- linkMeet:
- type: string
- idDivision:
- type: string
- member:
- type: array
- items:
- $ref: '#/components/schemas/User'
- user:
- type: string
- required:
- - id
- - title
- - desc
- - timeStart
- - timeEnd
- - dateStart
- - idDivision
- - user
-
- CalendarCreateBody:
- type: object
- properties:
- idDivision:
- type: string
- title:
- type: string
- desc:
- type: string
- timeStart:
- type: string
- timeEnd:
- type: string
- dateStart:
- type: string
- repeatEventTyper:
- type: string
- repeatValue:
- type: string
- linkMeet:
- type: string
- member:
- type: array
- items:
- $ref: '#/components/schemas/User'
- user:
- type: string
- required:
- - idDivision
- - title
- - desc
- - timeStart
- - timeEnd
- - dateStart
- - user
-
- # Task
- Task:
- type: object
- properties:
- id:
- type: string
- title:
- type: string
- user:
- type: string
- status:
- type: integer
- idDivision:
- type: string
- required:
- - id
- - title
-
- TaskCreateBody:
- type: object
- properties:
- title:
- type: string
- description:
- type: string
- required:
- - title
-
- TaskTugasCreateBody:
- type: object
- properties:
- title:
- type: string
- dateStart:
- type: string
- dateEnd:
- type: string
- user:
- type: string
- idDivision:
- type: string
- dataDetail:
- type: array
- items:
- type: object
- required:
- - title
- - dateStart
- - dateEnd
- - user
- - idDivision
-
- TaskMemberBody:
- type: object
- properties:
- user:
- type: string
- member:
- type: array
- items:
- $ref: '#/components/schemas/User'
- idDivision:
- type: string
- required:
- - user
- - member
- - idDivision
-
- # Document
- DocumentMoveBody:
- type: object
- properties:
- path:
- type: string
- dataItem:
- type: array
- items:
- type: object
- user:
- type: string
- required:
- - path
- - dataItem
- - user
-
- DocumentCopyBody:
- type: object
- properties:
- path:
- type: string
- dataItem:
- type: array
- items:
- type: object
- user:
- type: string
- idDivision:
- type: string
- required:
- - path
- - dataItem
- - user
- - idDivision
-
- DocumentShareBody:
- type: object
- properties:
- dataDivision:
- type: array
- items:
- type: object
- dataItem:
- type: array
- items:
- type: object
- user:
- type: string
- required:
- - dataDivision
- - dataItem
- - user
-
- DocumentRenameBody:
- type: object
- properties:
- name:
- type: string
- user:
- type: string
- id:
- type: string
- path:
- type: string
- idDivision:
- type: string
- extension:
- type: string
- required:
- - name
- - user
- - id
- - path
- - idDivision
- - extension
-
- DocumentFolderCreateBody:
- type: object
- properties:
- name:
- type: string
- path:
- type: string
- idDivision:
- type: string
- user:
- type: string
- required:
- - name
- - path
- - idDivision
- - user
-
- DocumentDeleteBody:
- type: object
- properties:
- user:
- type: string
- data:
- type: array
- items:
- type: object
- required:
- - user
- - data
-
- # Notification
- NotificationReadBody:
- type: object
- properties:
- user:
- type: string
- id:
- type: string
- required:
- - user
- - id
-
- # Token
- TokenBody:
- type: object
- properties:
- user:
- type: string
- token:
- type: string
- required:
- - user
- - token
-
- # Generic Response
- ApiResponse:
- type: object
- properties:
- data:
- type: object
- success:
- type: boolean
- required:
- - data
-
-paths:
- # Auth
- /auth/login:
- post:
- tags:
- - Auth
- summary: Check phone for login
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PhoneLoginBody'
- responses:
- '200':
- description: Login data
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- default:
- description: Error
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Error'
-
- # Banner
- /mobile/banner:
- get:
- tags:
- - Banner
- summary: Get banners
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: List of banners
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Banner'
- post:
- tags:
- - Banner
- summary: Create banner
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- title:
- type: string
- image:
- type: string
- format: binary
- responses:
- '200':
- description: Created banner
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Banner'
-
- /mobile/banner/{id}:
- get:
- tags:
- - Banner
- summary: Get one banner
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: Banner details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Banner'
- put:
- tags:
- - Banner
- summary: Edit banner
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- title:
- type: string
- image:
- type: string
- format: binary
- responses:
- '200':
- description: Updated banner
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Banner'
- delete:
- tags:
- - Banner
- summary: Delete banner
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- required:
- - user
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- # Home Data
- /mobile/home:
- get:
- tags:
- - Home
- summary: Get home data by category
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- required: true
- schema:
- type: string
- enum: [kegiatan, division, progress, dokumen, event, discussion, header, check-late-project]
- responses:
- '200':
- description: Home data
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/home/search:
- get:
- tags:
- - Home
- summary: Search home
- parameters:
- - name: search
- in: query
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: Search results
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
-
- /mobile/home/notification:
- get:
- tags:
- - Notification
- summary: Get notifications
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: page
- in: query
- schema:
- type: integer
- responses:
- '200':
- description: List of notifications
- content:
- application/json:
- schema:
- type: array
- items:
- type: object
- put:
- tags:
- - Notification
- summary: Read one notification
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/NotificationReadBody'
- responses:
- '200':
- description: Updated notification
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- # Group
- /mobile/group:
- get:
- tags:
- - Group
- summary: Get groups
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: active
- in: query
- required: true
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: List of groups
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Group'
- post:
- tags:
- - Group
- summary: Create group
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GroupCreateBody'
- responses:
- '200':
- description: Created group
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Group'
-
- /mobile/group/{id}:
- put:
- tags:
- - Group
- summary: Edit group
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/GroupCreateBody'
- responses:
- '200':
- description: Updated group
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Group'
- delete:
- tags:
- - Group
- summary: Delete group
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- isActive:
- type: boolean
- required:
- - user
- - isActive
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/group/get-division:
- get:
- tags:
- - Group
- summary: Get division groups
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: Division groups
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Group'
-
- # Position
- /mobile/position:
- get:
- tags:
- - Position
- summary: Get positions
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: active
- in: query
- required: true
- schema:
- type: string
- - name: group
- in: query
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: List of positions
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Position'
- post:
- tags:
- - Position
- summary: Create position
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PositionCreateBody'
- responses:
- '200':
- description: Created position
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Position'
-
- /mobile/position/{id}:
- put:
- tags:
- - Position
- summary: Edit position
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/PositionCreateBody'
- responses:
- '200':
- description: Updated position
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Position'
- delete:
- tags:
- - Position
- summary: Delete position
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- isActive:
- type: boolean
- required:
- - user
- - isActive
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- # User
- /mobile/user:
- get:
- tags:
- - User
- summary: Get users
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: active
- in: query
- required: true
- schema:
- type: string
- - name: group
- in: query
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- - name: page
- in: query
- schema:
- type: integer
- responses:
- '200':
- description: List of users
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/User'
- post:
- tags:
- - User
- summary: Create user
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- $ref: '#/components/schemas/UserCreateBody'
- responses:
- '200':
- description: Created user
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/User'
-
- /mobile/user/{id}:
- get:
- tags:
- - User
- summary: Get profile
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- responses:
- '200':
- description: User profile
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/User'
- put:
- tags:
- - User
- summary: Edit user
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- name:
- type: string
- photo:
- type: string
- format: binary
- responses:
- '200':
- description: Updated user
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/User'
- delete:
- tags:
- - User
- summary: Delete user
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- isActive:
- type: boolean
- required:
- - user
- - isActive
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/user/profile:
- put:
- tags:
- - User
- summary: Edit profile
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- name:
- type: string
- photo:
- type: string
- format: binary
- responses:
- '200':
- description: Updated profile
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/User'
-
- # Discussion General
- /mobile/discussion-general:
- get:
- tags:
- - DiscussionGeneral
- summary: Get discussion general
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: active
- in: query
- required: true
- schema:
- type: string
- - name: group
- in: query
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- - name: page
- in: query
- schema:
- type: integer
- responses:
- '200':
- description: List of discussions
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/DiscussionGeneral'
- post:
- tags:
- - DiscussionGeneral
- summary: Create discussion general
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DiscussionGeneralCreateBody'
- responses:
- '200':
- description: Created discussion
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DiscussionGeneral'
-
- /mobile/discussion-general/{id}:
- get:
- tags:
- - DiscussionGeneral
- summary: Get one discussion general
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: Discussion details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DiscussionGeneral'
- post:
- tags:
- - DiscussionGeneral
- summary: Update status discussion general
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- status:
- type: integer
- user:
- type: string
- required:
- - status
- - user
- responses:
- '200':
- description: Updated status
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DiscussionGeneral'
- put:
- tags:
- - DiscussionGeneral
- summary: Edit discussion general
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- title:
- type: string
- desc:
- type: string
- required:
- - user
- - title
- - desc
- responses:
- '200':
- description: Updated discussion
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DiscussionGeneral'
- delete:
- tags:
- - DiscussionGeneral
- summary: Delete discussion general
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- active:
- type: boolean
- required:
- - user
- - active
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/discussion-general/{id}/comment:
- post:
- tags:
- - DiscussionGeneral
- summary: Send comment to discussion general
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DiscussionGeneralCommentBody'
- responses:
- '200':
- description: Comment added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/discussion-general/{id}/member:
- post:
- tags:
- - DiscussionGeneral
- summary: Add members to discussion general
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DivisionMemberBody'
- responses:
- '200':
- description: Members added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - DiscussionGeneral
- summary: Delete member from discussion general
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- idUser:
- type: string
- required:
- - user
- - idUser
- responses:
- '200':
- description: Member deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- # Announcement
- /mobile/announcement:
- get:
- tags:
- - Announcement
- summary: Get announcements
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- - name: page
- in: query
- schema:
- type: integer
- responses:
- '200':
- description: List of announcements
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Announcement'
- post:
- tags:
- - Announcement
- summary: Create announcement
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AnnouncementCreateBody'
- responses:
- '200':
- description: Created announcement
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Announcement'
-
- /mobile/announcement/{id}:
- get:
- tags:
- - Announcement
- summary: Get one announcement
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: Announcement details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Announcement'
- put:
- tags:
- - Announcement
- summary: Edit announcement
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/AnnouncementCreateBody'
- responses:
- '200':
- description: Updated announcement
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Announcement'
- delete:
- tags:
- - Announcement
- summary: Delete announcement
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- required:
- - user
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- # Project
- /mobile/project:
- get:
- tags:
- - Project
- summary: Get projects
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: status
- in: query
- required: true
- schema:
- type: string
- - name: group
- in: query
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- schema:
- type: string
- - name: page
- in: query
- schema:
- type: integer
- responses:
- '200':
- description: List of projects
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Project'
- post:
- tags:
- - Project
- summary: Create project
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- $ref: '#/components/schemas/ProjectCreateBody'
- responses:
- '200':
- description: Created project
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Project'
-
- /mobile/project/{id}:
- get:
- tags:
- - Project
- summary: Get one project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- required: true
- schema:
- type: string
- enum: [data, progress, task, file, member, link]
- responses:
- '200':
- description: Project details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Project'
- put:
- tags:
- - Project
- summary: Edit project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- name:
- type: string
- user:
- type: string
- required:
- - name
- - user
- responses:
- '200':
- description: Updated project
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Project'
- post:
- tags:
- - Project
- summary: Create project task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ProjectTaskCreateBody'
- responses:
- '200':
- description: Created task
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Project
- summary: Cancel project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- reason:
- type: string
- required:
- - user
- - reason
- responses:
- '200':
- description: Canceled
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/project/{id}/lainnya:
- put:
- tags:
- - Project
- summary: Report project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- report:
- type: string
- user:
- type: string
- required:
- - report
- - user
- responses:
- '200':
- description: Report added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Project
- summary: Delete project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- required:
- - user
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/project/detail/{id}:
- get:
- tags:
- - Project
- summary: Get project task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- schema:
- type: string
- responses:
- '200':
- description: Task details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- put:
- tags:
- - Project
- summary: Update status project task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ProjectUpdateStatusBody'
- responses:
- '200':
- description: Status updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- post:
- tags:
- - Project
- summary: Edit project task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ProjectTaskCreateBody'
- responses:
- '200':
- description: Task updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Project
- summary: Delete project task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- idProject:
- type: string
- required:
- - user
- - idProject
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/project/{id}/member:
- post:
- tags:
- - Project
- summary: Add members to project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DivisionMemberBody'
- responses:
- '200':
- description: Members added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Project
- summary: Delete member from project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- idUser:
- type: string
- required:
- - user
- - idUser
- responses:
- '200':
- description: Member deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/project/{id}/link:
- post:
- tags:
- - Project
- summary: Add link to project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- link:
- type: string
- required:
- - user
- - link
- responses:
- '200':
- description: Link added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Project
- summary: Delete link from project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- idLink:
- type: string
- user:
- type: string
- required:
- - idLink
- - user
- responses:
- '200':
- description: Link deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/project/file/{id}:
- post:
- tags:
- - Project
- summary: Add file to project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- file:
- type: string
- format: binary
- responses:
- '200':
- description: File added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- put:
- tags:
- - Project
- summary: Check/update file in project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- file:
- type: string
- format: binary
- responses:
- '200':
- description: File updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Project
- summary: Delete file from project
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- required:
- - user
- responses:
- '200':
- description: File deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- # Division
- /mobile/division:
- get:
- tags:
- - Division
- summary: Get divisions
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: active
- in: query
- schema:
- type: string
- - name: group
- in: query
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- schema:
- type: string
- - name: page
- in: query
- schema:
- type: integer
- responses:
- '200':
- description: List of divisions
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Division'
- post:
- tags:
- - Division
- summary: Create division
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DivisionCreateBody'
- responses:
- '200':
- description: Created division
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Division'
-
- /mobile/division/{id}:
- get:
- tags:
- - Division
- summary: Get one division detail
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: Division details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Division'
- put:
- tags:
- - Division
- summary: Edit division
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- name:
- type: string
- desc:
- type: string
- required:
- - user
- - name
- - desc
- responses:
- '200':
- description: Updated division
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Division'
-
- /mobile/division/{id}/detail:
- get:
- tags:
- - Division
- summary: Get division one feature
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- required: true
- schema:
- type: string
- enum: [jumlah, today-task, new-file, new-discussion, check-member, check-admin]
- responses:
- '200':
- description: Feature data
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- put:
- tags:
- - Division
- summary: Update status admin division
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- id:
- type: string
- isAdmin:
- type: boolean
- required:
- - user
- - id
- - isAdmin
- responses:
- '200':
- description: Status updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- post:
- tags:
- - Division
- summary: Add members to division
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DivisionMemberBody'
- responses:
- '200':
- description: Members added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Division
- summary: Delete member from division
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- id:
- type: string
- required:
- - user
- - id
- responses:
- '200':
- description: Member deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/division/{id}/status:
- post:
- tags:
- - Division
- summary: Update status division
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- isActive:
- type: boolean
- required:
- - user
- - isActive
- responses:
- '200':
- description: Status updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/division/{id}/member:
- get:
- tags:
- - Division
- summary: Get division members
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: List of members
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/User'
-
- /mobile/division/report:
- get:
- tags:
- - Division
- summary: Get division report
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- required: true
- schema:
- type: string
- enum: [table-progress, lainnya]
- - name: date
- in: query
- required: true
- schema:
- type: string
- - name: date-end
- in: query
- required: true
- schema:
- type: string
- - name: division
- in: query
- required: true
- schema:
- type: string
- - name: group
- in: query
- schema:
- type: string
- responses:
- '200':
- description: Report data
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/division/more:
- get:
- tags:
- - Division
- summary: Get list division by id division
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- - name: division
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: List of divisions
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Division'
-
- # Discussion
- /mobile/discussion:
- get:
- tags:
- - Discussion
- summary: Get discussions
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: active
- in: query
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- - name: division
- in: query
- required: true
- schema:
- type: string
- - name: page
- in: query
- schema:
- type: integer
- responses:
- '200':
- description: List of discussions
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Discussion'
- post:
- tags:
- - Discussion
- summary: Create discussion
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DiscussionCreateBody'
- responses:
- '200':
- description: Created discussion
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Discussion'
-
- /mobile/discussion/{id}:
- get:
- tags:
- - Discussion
- summary: Get one discussion
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- required: true
- schema:
- type: string
- enum: [data, comment]
- responses:
- '200':
- description: Discussion details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Discussion'
- post:
- tags:
- - Discussion
- summary: Edit discussion
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DiscussionEditBody'
- responses:
- '200':
- description: Updated discussion
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Discussion'
- put:
- tags:
- - Discussion
- summary: Archive discussion
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- active:
- type: boolean
- required:
- - user
- - active
- responses:
- '200':
- description: Archived
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Discussion
- summary: Open/close discussion
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- status:
- type: integer
- required:
- - user
- - status
- responses:
- '200':
- description: Status updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/discussion/{id}/comment:
- post:
- tags:
- - Discussion
- summary: Send comment to discussion
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DiscussionCommentBody'
- responses:
- '200':
- description: Comment added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- # Calendar
- /mobile/calendar:
- get:
- tags:
- - Calendar
- summary: Get calendar by date and division
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: date
- in: query
- required: true
- schema:
- type: string
- - name: division
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: Calendar events
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Calendar'
- post:
- tags:
- - Calendar
- summary: Create calendar event
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CalendarCreateBody'
- responses:
- '200':
- description: Created event
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Calendar'
-
- /mobile/calendar/indicator:
- get:
- tags:
- - Calendar
- summary: Get calendar indicator
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: date
- in: query
- required: true
- schema:
- type: string
- - name: division
- in: query
- required: true
- schema:
- type: string
- responses:
- '200':
- description: Indicators
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/calendar/{id}:
- get:
- tags:
- - Calendar
- summary: Get one calendar event
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- required: true
- schema:
- type: string
- enum: [data, member]
- responses:
- '200':
- description: Event details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Calendar'
- put:
- tags:
- - Calendar
- summary: Update calendar event
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- title:
- type: string
- desc:
- type: string
- timeStart:
- type: string
- timeEnd:
- type: string
- dateStart:
- type: string
- repeatEventTyper:
- type: string
- repeatValue:
- type: number
- linkMeet:
- type: string
- user:
- type: string
- required:
- - title
- - desc
- - timeStart
- - timeEnd
- - dateStart
- - repeatEventTyper
- - repeatValue
- - linkMeet
- - user
- responses:
- '200':
- description: Updated event
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Calendar'
- delete:
- tags:
- - Calendar
- summary: Delete calendar event
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- required:
- - user
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/calendar/{id}/member:
- post:
- tags:
- - Calendar
- summary: Add members to calendar
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DivisionMemberBody'
- responses:
- '200':
- description: Members added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Calendar
- summary: Delete member from calendar
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- idUser:
- type: string
- required:
- - user
- - idUser
- responses:
- '200':
- description: Member deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/calendar/history:
- get:
- tags:
- - Calendar
- summary: Get calendar history
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- - name: division
- in: query
- required: true
- schema:
- type: string
- - name: page
- in: query
- schema:
- type: integer
- responses:
- '200':
- description: History
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Calendar'
-
- # Task
- /mobile/task:
- get:
- tags:
- - Task
- summary: Get tasks
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: status
- in: query
- required: true
- schema:
- type: string
- - name: division
- in: query
- required: true
- schema:
- type: string
- - name: search
- in: query
- required: true
- schema:
- type: string
- - name: page
- in: query
- schema:
- type: integer
- responses:
- '200':
- description: List of tasks
- content:
- application/json:
- schema:
- type: array
- items:
- $ref: '#/components/schemas/Task'
- post:
- tags:
- - Task
- summary: Create task
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- $ref: '#/components/schemas/TaskCreateBody'
- responses:
- '200':
- description: Created task
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Task'
-
- /mobile/task/{id}:
- get:
- tags:
- - Task
- summary: Get one task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- required: true
- schema:
- type: string
- enum: [data, progress, task, file, member, link]
- responses:
- '200':
- description: Task details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Task'
- put:
- tags:
- - Task
- summary: Edit task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- title:
- type: string
- user:
- type: string
- required:
- - title
- - user
- responses:
- '200':
- description: Updated task
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/Task'
- post:
- tags:
- - Task
- summary: Create task tugas
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaskTugasCreateBody'
- responses:
- '200':
- description: Created tugas
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Task
- summary: Cancel task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- reason:
- type: string
- required:
- - user
- - reason
- responses:
- '200':
- description: Canceled
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/task/{id}/lainnya:
- put:
- tags:
- - Task
- summary: Report task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- report:
- type: string
- user:
- type: string
- required:
- - report
- - user
- responses:
- '200':
- description: Report added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Task
- summary: Delete task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- required:
- - user
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/task/detail/{id}:
- get:
- tags:
- - Task
- summary: Get task tugas
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: cat
- in: query
- schema:
- type: string
- responses:
- '200':
- description: Tugas details
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- put:
- tags:
- - Task
- summary: Update status task division
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ProjectUpdateStatusBody'
- responses:
- '200':
- description: Status updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- post:
- tags:
- - Task
- summary: Edit task tugas
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaskTugasCreateBody'
- responses:
- '200':
- description: Tugas updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Task
- summary: Delete task tugas
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- idProject:
- type: string
- required:
- - user
- - idProject
- responses:
- '200':
- description: Deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/task/{id}/member:
- post:
- tags:
- - Task
- summary: Add members to task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/TaskMemberBody'
- responses:
- '200':
- description: Members added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Task
- summary: Delete member from task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- idUser:
- type: string
- required:
- - user
- - idUser
- responses:
- '200':
- description: Member deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/task/{id}/link:
- post:
- tags:
- - Task
- summary: Add link to task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- link:
- type: string
- idDivision:
- type: string
- required:
- - user
- - link
- - idDivision
- responses:
- '200':
- description: Link added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Task
- summary: Delete link from task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- idLink:
- type: string
- required:
- - user
- - idLink
- responses:
- '200':
- description: Link deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- /mobile/task/file/{id}:
- post:
- tags:
- - Task
- summary: Add file to task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- file:
- type: string
- format: binary
- responses:
- '200':
- description: File added
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- put:
- tags:
- - Task
- summary: Check/update file in task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- file:
- type: string
- format: binary
- responses:
- '200':
- description: File updated
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- delete:
- tags:
- - Task
- summary: Delete file from task
- parameters:
- - name: id
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- user:
- type: string
- required:
- - user
- responses:
- '200':
- description: File deleted
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
-
- # Document
- /mobile/document:
- get:
- tags:
- - Document
- summary: Get documents
- parameters:
- - name: user
- in: query
- required: true
- schema:
- type: string
- - name: path
- in: query
- required: true
- schema:
- type: string
- - name: division
- in: query
- required:
\ No newline at end of file
diff --git a/generated/prisma/edge.js b/generated/prisma/edge.js
index bbd3140..ed936f2 100644
--- a/generated/prisma/edge.js
+++ b/generated/prisma/edge.js
@@ -129,11 +129,23 @@ exports.Prisma.WebHookScalarFieldEnum = {
updatedAt: 'updatedAt'
};
+exports.Prisma.WaHookScalarFieldEnum = {
+ id: 'id',
+ data: 'data',
+ createdAt: 'createdAt',
+ updatedAt: 'updatedAt'
+};
+
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
+exports.Prisma.NullableJsonNullValueInput = {
+ DbNull: Prisma.DbNull,
+ JsonNull: Prisma.JsonNull
+};
+
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
@@ -144,11 +156,18 @@ exports.Prisma.NullsOrder = {
last: 'last'
};
+exports.Prisma.JsonNullValueFilter = {
+ DbNull: Prisma.DbNull,
+ JsonNull: Prisma.JsonNull,
+ AnyNull: Prisma.AnyNull
+};
+
exports.Prisma.ModelName = {
User: 'User',
ApiKey: 'ApiKey',
- WebHook: 'WebHook'
+ WebHook: 'WebHook',
+ WaHook: 'WaHook'
};
/**
* Create the Client
@@ -197,13 +216,13 @@ const config = {
}
}
},
- "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String? @unique\n password String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n ApiKey ApiKey[]\n}\n\nmodel ApiKey {\n id String @id @default(cuid())\n User User? @relation(fields: [userId], references: [id])\n userId String\n name String\n key String @unique @db.Text\n description String?\n expiredAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel WebHook {\n id String @id @default(cuid())\n name String?\n description String?\n url String\n payload String? @default(\"{}\")\n method String @default(\"POST\")\n headers String? @default(\"{}\")\n apiToken String?\n retries Int? @default(3)\n enabled Boolean @default(true)\n replay Boolean @default(false)\n replayKey String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n",
- "inlineSchemaHash": "b1c74fdf8c8c71cfbe0b140d02ba653d858d37e6ff4828268dfac154524e957b",
+ "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String? @unique\n password String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n ApiKey ApiKey[]\n}\n\nmodel ApiKey {\n id String @id @default(cuid())\n User User? @relation(fields: [userId], references: [id])\n userId String\n name String\n key String @unique @db.Text\n description String?\n expiredAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel WebHook {\n id String @id @default(cuid())\n name String?\n description String?\n url String\n payload String? @default(\"{}\")\n method String @default(\"POST\")\n headers String? @default(\"{}\")\n apiToken String?\n retries Int? @default(3)\n enabled Boolean @default(true)\n replay Boolean @default(false)\n replayKey String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel WaHook {\n id String @id @default(cuid())\n data Json? @db.Json\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n",
+ "inlineSchemaHash": "f672201c199f0f043f3266324775af184d82ebd00379f5c23166510b25c889d0",
"copyEngine": true
}
config.dirname = '/'
-config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"ApiKey\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ApiKey\",\"nativeType\":null,\"relationName\":\"ApiKeyToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ApiKey\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"User\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ApiKeyToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"Text\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiredAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"WebHook\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"payload\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"{}\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"method\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"POST\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headers\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"{}\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"apiToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"retries\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"enabled\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replay\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replayKey\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
+config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"ApiKey\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ApiKey\",\"nativeType\":null,\"relationName\":\"ApiKeyToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ApiKey\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"User\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ApiKeyToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"Text\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiredAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"WebHook\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"payload\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"{}\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"method\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"POST\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headers\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"{}\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"apiToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"retries\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"enabled\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replay\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replayKey\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"WaHook\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":[\"Json\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
config.engineWasm = undefined
config.compilerWasm = undefined
diff --git a/generated/prisma/index-browser.js b/generated/prisma/index-browser.js
index 3c129fc..16e208b 100644
--- a/generated/prisma/index-browser.js
+++ b/generated/prisma/index-browser.js
@@ -157,11 +157,23 @@ exports.Prisma.WebHookScalarFieldEnum = {
updatedAt: 'updatedAt'
};
+exports.Prisma.WaHookScalarFieldEnum = {
+ id: 'id',
+ data: 'data',
+ createdAt: 'createdAt',
+ updatedAt: 'updatedAt'
+};
+
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
+exports.Prisma.NullableJsonNullValueInput = {
+ DbNull: Prisma.DbNull,
+ JsonNull: Prisma.JsonNull
+};
+
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
@@ -172,11 +184,18 @@ exports.Prisma.NullsOrder = {
last: 'last'
};
+exports.Prisma.JsonNullValueFilter = {
+ DbNull: Prisma.DbNull,
+ JsonNull: Prisma.JsonNull,
+ AnyNull: Prisma.AnyNull
+};
+
exports.Prisma.ModelName = {
User: 'User',
ApiKey: 'ApiKey',
- WebHook: 'WebHook'
+ WebHook: 'WebHook',
+ WaHook: 'WaHook'
};
/**
diff --git a/generated/prisma/index.d.ts b/generated/prisma/index.d.ts
index 44ef247..d1682dd 100644
--- a/generated/prisma/index.d.ts
+++ b/generated/prisma/index.d.ts
@@ -28,6 +28,11 @@ export type ApiKey = $Result.DefaultSelection
*
*/
export type WebHook = $Result.DefaultSelection
+/**
+ * Model WaHook
+ *
+ */
+export type WaHook = $Result.DefaultSelection
/**
* ## Prisma Client ʲˢ
@@ -176,6 +181,16 @@ export class PrismaClient<
* ```
*/
get webHook(): Prisma.WebHookDelegate;
+
+ /**
+ * `prisma.waHook`: Exposes CRUD operations for the **WaHook** model.
+ * Example usage:
+ * ```ts
+ * // Fetch zero or more WaHooks
+ * const waHooks = await prisma.waHook.findMany()
+ * ```
+ */
+ get waHook(): Prisma.WaHookDelegate;
}
export namespace Prisma {
@@ -618,7 +633,8 @@ export namespace Prisma {
export const ModelName: {
User: 'User',
ApiKey: 'ApiKey',
- WebHook: 'WebHook'
+ WebHook: 'WebHook',
+ WaHook: 'WaHook'
};
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
@@ -637,7 +653,7 @@ export namespace Prisma {
omit: GlobalOmitOptions
}
meta: {
- modelProps: "user" | "apiKey" | "webHook"
+ modelProps: "user" | "apiKey" | "webHook" | "waHook"
txIsolationLevel: Prisma.TransactionIsolationLevel
}
model: {
@@ -863,6 +879,80 @@ export namespace Prisma {
}
}
}
+ WaHook: {
+ payload: Prisma.$WaHookPayload
+ fields: Prisma.WaHookFieldRefs
+ operations: {
+ findUnique: {
+ args: Prisma.WaHookFindUniqueArgs
+ result: $Utils.PayloadToResult | null
+ }
+ findUniqueOrThrow: {
+ args: Prisma.WaHookFindUniqueOrThrowArgs
+ result: $Utils.PayloadToResult
+ }
+ findFirst: {
+ args: Prisma.WaHookFindFirstArgs
+ result: $Utils.PayloadToResult | null
+ }
+ findFirstOrThrow: {
+ args: Prisma.WaHookFindFirstOrThrowArgs
+ result: $Utils.PayloadToResult
+ }
+ findMany: {
+ args: Prisma.WaHookFindManyArgs
+ result: $Utils.PayloadToResult[]
+ }
+ create: {
+ args: Prisma.WaHookCreateArgs
+ result: $Utils.PayloadToResult
+ }
+ createMany: {
+ args: Prisma.WaHookCreateManyArgs
+ result: BatchPayload
+ }
+ createManyAndReturn: {
+ args: Prisma.WaHookCreateManyAndReturnArgs
+ result: $Utils.PayloadToResult[]
+ }
+ delete: {
+ args: Prisma.WaHookDeleteArgs
+ result: $Utils.PayloadToResult
+ }
+ update: {
+ args: Prisma.WaHookUpdateArgs
+ result: $Utils.PayloadToResult
+ }
+ deleteMany: {
+ args: Prisma.WaHookDeleteManyArgs
+ result: BatchPayload
+ }
+ updateMany: {
+ args: Prisma.WaHookUpdateManyArgs
+ result: BatchPayload
+ }
+ updateManyAndReturn: {
+ args: Prisma.WaHookUpdateManyAndReturnArgs
+ result: $Utils.PayloadToResult[]
+ }
+ upsert: {
+ args: Prisma.WaHookUpsertArgs
+ result: $Utils.PayloadToResult
+ }
+ aggregate: {
+ args: Prisma.WaHookAggregateArgs
+ result: $Utils.Optional
+ }
+ groupBy: {
+ args: Prisma.WaHookGroupByArgs
+ result: $Utils.Optional[]
+ }
+ count: {
+ args: Prisma.WaHookCountArgs
+ result: $Utils.Optional | number
+ }
+ }
+ }
}
} & {
other: {
@@ -962,6 +1052,7 @@ export namespace Prisma {
user?: UserOmit
apiKey?: ApiKeyOmit
webHook?: WebHookOmit
+ waHook?: WaHookOmit
}
/* Types for Logging */
@@ -4417,6 +4508,984 @@ export namespace Prisma {
}
+ /**
+ * Model WaHook
+ */
+
+ export type AggregateWaHook = {
+ _count: WaHookCountAggregateOutputType | null
+ _min: WaHookMinAggregateOutputType | null
+ _max: WaHookMaxAggregateOutputType | null
+ }
+
+ export type WaHookMinAggregateOutputType = {
+ id: string | null
+ createdAt: Date | null
+ updatedAt: Date | null
+ }
+
+ export type WaHookMaxAggregateOutputType = {
+ id: string | null
+ createdAt: Date | null
+ updatedAt: Date | null
+ }
+
+ export type WaHookCountAggregateOutputType = {
+ id: number
+ data: number
+ createdAt: number
+ updatedAt: number
+ _all: number
+ }
+
+
+ export type WaHookMinAggregateInputType = {
+ id?: true
+ createdAt?: true
+ updatedAt?: true
+ }
+
+ export type WaHookMaxAggregateInputType = {
+ id?: true
+ createdAt?: true
+ updatedAt?: true
+ }
+
+ export type WaHookCountAggregateInputType = {
+ id?: true
+ data?: true
+ createdAt?: true
+ updatedAt?: true
+ _all?: true
+ }
+
+ export type WaHookAggregateArgs = {
+ /**
+ * Filter which WaHook to aggregate.
+ */
+ where?: WaHookWhereInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
+ *
+ * Determine the order of WaHooks to fetch.
+ */
+ orderBy?: WaHookOrderByWithRelationInput | WaHookOrderByWithRelationInput[]
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
+ *
+ * Sets the start position
+ */
+ cursor?: WaHookWhereUniqueInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Take `±n` WaHooks from the position of the cursor.
+ */
+ take?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Skip the first `n` WaHooks.
+ */
+ skip?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
+ *
+ * Count returned WaHooks
+ **/
+ _count?: true | WaHookCountAggregateInputType
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
+ *
+ * Select which fields to find the minimum value
+ **/
+ _min?: WaHookMinAggregateInputType
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
+ *
+ * Select which fields to find the maximum value
+ **/
+ _max?: WaHookMaxAggregateInputType
+ }
+
+ export type GetWaHookAggregateType = {
+ [P in keyof T & keyof AggregateWaHook]: P extends '_count' | 'count'
+ ? T[P] extends true
+ ? number
+ : GetScalarType
+ : GetScalarType
+ }
+
+
+
+
+ export type WaHookGroupByArgs = {
+ where?: WaHookWhereInput
+ orderBy?: WaHookOrderByWithAggregationInput | WaHookOrderByWithAggregationInput[]
+ by: WaHookScalarFieldEnum[] | WaHookScalarFieldEnum
+ having?: WaHookScalarWhereWithAggregatesInput
+ take?: number
+ skip?: number
+ _count?: WaHookCountAggregateInputType | true
+ _min?: WaHookMinAggregateInputType
+ _max?: WaHookMaxAggregateInputType
+ }
+
+ export type WaHookGroupByOutputType = {
+ id: string
+ data: JsonValue | null
+ createdAt: Date
+ updatedAt: Date
+ _count: WaHookCountAggregateOutputType | null
+ _min: WaHookMinAggregateOutputType | null
+ _max: WaHookMaxAggregateOutputType | null
+ }
+
+ type GetWaHookGroupByPayload = Prisma.PrismaPromise<
+ Array<
+ PickEnumerable &
+ {
+ [P in ((keyof T) & (keyof WaHookGroupByOutputType))]: P extends '_count'
+ ? T[P] extends boolean
+ ? number
+ : GetScalarType
+ : GetScalarType
+ }
+ >
+ >
+
+
+ export type WaHookSelect = $Extensions.GetSelect<{
+ id?: boolean
+ data?: boolean
+ createdAt?: boolean
+ updatedAt?: boolean
+ }, ExtArgs["result"]["waHook"]>
+
+ export type WaHookSelectCreateManyAndReturn = $Extensions.GetSelect<{
+ id?: boolean
+ data?: boolean
+ createdAt?: boolean
+ updatedAt?: boolean
+ }, ExtArgs["result"]["waHook"]>
+
+ export type WaHookSelectUpdateManyAndReturn = $Extensions.GetSelect<{
+ id?: boolean
+ data?: boolean
+ createdAt?: boolean
+ updatedAt?: boolean
+ }, ExtArgs["result"]["waHook"]>
+
+ export type WaHookSelectScalar = {
+ id?: boolean
+ data?: boolean
+ createdAt?: boolean
+ updatedAt?: boolean
+ }
+
+ export type WaHookOmit = $Extensions.GetOmit<"id" | "data" | "createdAt" | "updatedAt", ExtArgs["result"]["waHook"]>
+
+ export type $WaHookPayload = {
+ name: "WaHook"
+ objects: {}
+ scalars: $Extensions.GetPayloadResult<{
+ id: string
+ data: Prisma.JsonValue | null
+ createdAt: Date
+ updatedAt: Date
+ }, ExtArgs["result"]["waHook"]>
+ composites: {}
+ }
+
+ type WaHookGetPayload = $Result.GetResult
+
+ type WaHookCountArgs =
+ Omit & {
+ select?: WaHookCountAggregateInputType | true
+ }
+
+ export interface WaHookDelegate {
+ [K: symbol]: { types: Prisma.TypeMap['model']['WaHook'], meta: { name: 'WaHook' } }
+ /**
+ * Find zero or one WaHook that matches the filter.
+ * @param {WaHookFindUniqueArgs} args - Arguments to find a WaHook
+ * @example
+ * // Get one WaHook
+ * const waHook = await prisma.waHook.findUnique({
+ * where: {
+ * // ... provide filter here
+ * }
+ * })
+ */
+ findUnique(args: SelectSubset>): Prisma__WaHookClient<$Result.GetResult, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Find one WaHook that matches the filter or throw an error with `error.code='P2025'`
+ * if no matches were found.
+ * @param {WaHookFindUniqueOrThrowArgs} args - Arguments to find a WaHook
+ * @example
+ * // Get one WaHook
+ * const waHook = await prisma.waHook.findUniqueOrThrow({
+ * where: {
+ * // ... provide filter here
+ * }
+ * })
+ */
+ findUniqueOrThrow(args: SelectSubset>): Prisma__WaHookClient<$Result.GetResult, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Find the first WaHook that matches the filter.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {WaHookFindFirstArgs} args - Arguments to find a WaHook
+ * @example
+ * // Get one WaHook
+ * const waHook = await prisma.waHook.findFirst({
+ * where: {
+ * // ... provide filter here
+ * }
+ * })
+ */
+ findFirst(args?: SelectSubset>): Prisma__WaHookClient<$Result.GetResult, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Find the first WaHook that matches the filter or
+ * throw `PrismaKnownClientError` with `P2025` code if no matches were found.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {WaHookFindFirstOrThrowArgs} args - Arguments to find a WaHook
+ * @example
+ * // Get one WaHook
+ * const waHook = await prisma.waHook.findFirstOrThrow({
+ * where: {
+ * // ... provide filter here
+ * }
+ * })
+ */
+ findFirstOrThrow(args?: SelectSubset>): Prisma__WaHookClient<$Result.GetResult, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Find zero or more WaHooks that matches the filter.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {WaHookFindManyArgs} args - Arguments to filter and select certain fields only.
+ * @example
+ * // Get all WaHooks
+ * const waHooks = await prisma.waHook.findMany()
+ *
+ * // Get first 10 WaHooks
+ * const waHooks = await prisma.waHook.findMany({ take: 10 })
+ *
+ * // Only select the `id`
+ * const waHookWithIdOnly = await prisma.waHook.findMany({ select: { id: true } })
+ *
+ */
+ findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany", GlobalOmitOptions>>
+
+ /**
+ * Create a WaHook.
+ * @param {WaHookCreateArgs} args - Arguments to create a WaHook.
+ * @example
+ * // Create one WaHook
+ * const WaHook = await prisma.waHook.create({
+ * data: {
+ * // ... data to create a WaHook
+ * }
+ * })
+ *
+ */
+ create(args: SelectSubset>): Prisma__WaHookClient<$Result.GetResult, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Create many WaHooks.
+ * @param {WaHookCreateManyArgs} args - Arguments to create many WaHooks.
+ * @example
+ * // Create many WaHooks
+ * const waHook = await prisma.waHook.createMany({
+ * data: [
+ * // ... provide data here
+ * ]
+ * })
+ *
+ */
+ createMany(args?: SelectSubset>): Prisma.PrismaPromise
+
+ /**
+ * Create many WaHooks and returns the data saved in the database.
+ * @param {WaHookCreateManyAndReturnArgs} args - Arguments to create many WaHooks.
+ * @example
+ * // Create many WaHooks
+ * const waHook = await prisma.waHook.createManyAndReturn({
+ * data: [
+ * // ... provide data here
+ * ]
+ * })
+ *
+ * // Create many WaHooks and only return the `id`
+ * const waHookWithIdOnly = await prisma.waHook.createManyAndReturn({
+ * select: { id: true },
+ * data: [
+ * // ... provide data here
+ * ]
+ * })
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ *
+ */
+ createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn", GlobalOmitOptions>>
+
+ /**
+ * Delete a WaHook.
+ * @param {WaHookDeleteArgs} args - Arguments to delete one WaHook.
+ * @example
+ * // Delete one WaHook
+ * const WaHook = await prisma.waHook.delete({
+ * where: {
+ * // ... filter to delete one WaHook
+ * }
+ * })
+ *
+ */
+ delete(args: SelectSubset>): Prisma__WaHookClient<$Result.GetResult, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Update one WaHook.
+ * @param {WaHookUpdateArgs} args - Arguments to update one WaHook.
+ * @example
+ * // Update one WaHook
+ * const waHook = await prisma.waHook.update({
+ * where: {
+ * // ... provide filter here
+ * },
+ * data: {
+ * // ... provide data here
+ * }
+ * })
+ *
+ */
+ update(args: SelectSubset>): Prisma__WaHookClient<$Result.GetResult, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+ /**
+ * Delete zero or more WaHooks.
+ * @param {WaHookDeleteManyArgs} args - Arguments to filter WaHooks to delete.
+ * @example
+ * // Delete a few WaHooks
+ * const { count } = await prisma.waHook.deleteMany({
+ * where: {
+ * // ... provide filter here
+ * }
+ * })
+ *
+ */
+ deleteMany(args?: SelectSubset>): Prisma.PrismaPromise
+
+ /**
+ * Update zero or more WaHooks.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {WaHookUpdateManyArgs} args - Arguments to update one or more rows.
+ * @example
+ * // Update many WaHooks
+ * const waHook = await prisma.waHook.updateMany({
+ * where: {
+ * // ... provide filter here
+ * },
+ * data: {
+ * // ... provide data here
+ * }
+ * })
+ *
+ */
+ updateMany(args: SelectSubset>): Prisma.PrismaPromise
+
+ /**
+ * Update zero or more WaHooks and returns the data updated in the database.
+ * @param {WaHookUpdateManyAndReturnArgs} args - Arguments to update many WaHooks.
+ * @example
+ * // Update many WaHooks
+ * const waHook = await prisma.waHook.updateManyAndReturn({
+ * where: {
+ * // ... provide filter here
+ * },
+ * data: [
+ * // ... provide data here
+ * ]
+ * })
+ *
+ * // Update zero or more WaHooks and only return the `id`
+ * const waHookWithIdOnly = await prisma.waHook.updateManyAndReturn({
+ * select: { id: true },
+ * where: {
+ * // ... provide filter here
+ * },
+ * data: [
+ * // ... provide data here
+ * ]
+ * })
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ *
+ */
+ updateManyAndReturn(args: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "updateManyAndReturn", GlobalOmitOptions>>
+
+ /**
+ * Create or update one WaHook.
+ * @param {WaHookUpsertArgs} args - Arguments to update or create a WaHook.
+ * @example
+ * // Update or create a WaHook
+ * const waHook = await prisma.waHook.upsert({
+ * create: {
+ * // ... data to create a WaHook
+ * },
+ * update: {
+ * // ... in case it already exists, update
+ * },
+ * where: {
+ * // ... the filter for the WaHook we want to update
+ * }
+ * })
+ */
+ upsert(args: SelectSubset>): Prisma__WaHookClient<$Result.GetResult, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
+
+
+ /**
+ * Count the number of WaHooks.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {WaHookCountArgs} args - Arguments to filter WaHooks to count.
+ * @example
+ * // Count the number of WaHooks
+ * const count = await prisma.waHook.count({
+ * where: {
+ * // ... the filter for the WaHooks we want to count
+ * }
+ * })
+ **/
+ count(
+ args?: Subset,
+ ): Prisma.PrismaPromise<
+ T extends $Utils.Record<'select', any>
+ ? T['select'] extends true
+ ? number
+ : GetScalarType
+ : number
+ >
+
+ /**
+ * Allows you to perform aggregations operations on a WaHook.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {WaHookAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
+ * @example
+ * // Ordered by age ascending
+ * // Where email contains prisma.io
+ * // Limited to the 10 users
+ * const aggregations = await prisma.user.aggregate({
+ * _avg: {
+ * age: true,
+ * },
+ * where: {
+ * email: {
+ * contains: "prisma.io",
+ * },
+ * },
+ * orderBy: {
+ * age: "asc",
+ * },
+ * take: 10,
+ * })
+ **/
+ aggregate(args: Subset): Prisma.PrismaPromise>
+
+ /**
+ * Group by WaHook.
+ * Note, that providing `undefined` is treated as the value not being there.
+ * Read more here: https://pris.ly/d/null-undefined
+ * @param {WaHookGroupByArgs} args - Group by arguments.
+ * @example
+ * // Group by city, order by createdAt, get count
+ * const result = await prisma.user.groupBy({
+ * by: ['city', 'createdAt'],
+ * orderBy: {
+ * createdAt: true
+ * },
+ * _count: {
+ * _all: true
+ * },
+ * })
+ *
+ **/
+ groupBy<
+ T extends WaHookGroupByArgs,
+ HasSelectOrTake extends Or<
+ Extends<'skip', Keys>,
+ Extends<'take', Keys>
+ >,
+ OrderByArg extends True extends HasSelectOrTake
+ ? { orderBy: WaHookGroupByArgs['orderBy'] }
+ : { orderBy?: WaHookGroupByArgs['orderBy'] },
+ OrderFields extends ExcludeUnderscoreKeys>>,
+ ByFields extends MaybeTupleToUnion,
+ ByValid extends Has,
+ HavingFields extends GetHavingFields,
+ HavingValid extends Has,
+ ByEmpty extends T['by'] extends never[] ? True : False,
+ InputErrors extends ByEmpty extends True
+ ? `Error: "by" must not be empty.`
+ : HavingValid extends False
+ ? {
+ [P in HavingFields]: P extends ByFields
+ ? never
+ : P extends string
+ ? `Error: Field "${P}" used in "having" needs to be provided in "by".`
+ : [
+ Error,
+ 'Field ',
+ P,
+ ` in "having" needs to be provided in "by"`,
+ ]
+ }[HavingFields]
+ : 'take' extends Keys
+ ? 'orderBy' extends Keys
+ ? ByValid extends True
+ ? {}
+ : {
+ [P in OrderFields]: P extends ByFields
+ ? never
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
+ }[OrderFields]
+ : 'Error: If you provide "take", you also need to provide "orderBy"'
+ : 'skip' extends Keys
+ ? 'orderBy' extends Keys
+ ? ByValid extends True
+ ? {}
+ : {
+ [P in OrderFields]: P extends ByFields
+ ? never
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
+ }[OrderFields]
+ : 'Error: If you provide "skip", you also need to provide "orderBy"'
+ : ByValid extends True
+ ? {}
+ : {
+ [P in OrderFields]: P extends ByFields
+ ? never
+ : `Error: Field "${P}" in "orderBy" needs to be provided in "by"`
+ }[OrderFields]
+ >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetWaHookGroupByPayload : Prisma.PrismaPromise
+ /**
+ * Fields of the WaHook model
+ */
+ readonly fields: WaHookFieldRefs;
+ }
+
+ /**
+ * The delegate class that acts as a "Promise-like" for WaHook.
+ * Why is this prefixed with `Prisma__`?
+ * Because we want to prevent naming conflicts as mentioned in
+ * https://github.com/prisma/prisma-client-js/issues/707
+ */
+ export interface Prisma__WaHookClient extends Prisma.PrismaPromise {
+ readonly [Symbol.toStringTag]: "PrismaPromise"
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise
+ /**
+ * Attaches a callback for only the rejection of the Promise.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of the callback.
+ */
+ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise
+ /**
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
+ * resolved value cannot be modified from the callback.
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
+ * @returns A Promise for the completion of the callback.
+ */
+ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise
+ }
+
+
+
+
+ /**
+ * Fields of the WaHook model
+ */
+ interface WaHookFieldRefs {
+ readonly id: FieldRef<"WaHook", 'String'>
+ readonly data: FieldRef<"WaHook", 'Json'>
+ readonly createdAt: FieldRef<"WaHook", 'DateTime'>
+ readonly updatedAt: FieldRef<"WaHook", 'DateTime'>
+ }
+
+
+ // Custom InputTypes
+ /**
+ * WaHook findUnique
+ */
+ export type WaHookFindUniqueArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelect | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * Filter, which WaHook to fetch.
+ */
+ where: WaHookWhereUniqueInput
+ }
+
+ /**
+ * WaHook findUniqueOrThrow
+ */
+ export type WaHookFindUniqueOrThrowArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelect | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * Filter, which WaHook to fetch.
+ */
+ where: WaHookWhereUniqueInput
+ }
+
+ /**
+ * WaHook findFirst
+ */
+ export type WaHookFindFirstArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelect | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * Filter, which WaHook to fetch.
+ */
+ where?: WaHookWhereInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
+ *
+ * Determine the order of WaHooks to fetch.
+ */
+ orderBy?: WaHookOrderByWithRelationInput | WaHookOrderByWithRelationInput[]
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
+ *
+ * Sets the position for searching for WaHooks.
+ */
+ cursor?: WaHookWhereUniqueInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Take `±n` WaHooks from the position of the cursor.
+ */
+ take?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Skip the first `n` WaHooks.
+ */
+ skip?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
+ *
+ * Filter by unique combinations of WaHooks.
+ */
+ distinct?: WaHookScalarFieldEnum | WaHookScalarFieldEnum[]
+ }
+
+ /**
+ * WaHook findFirstOrThrow
+ */
+ export type WaHookFindFirstOrThrowArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelect | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * Filter, which WaHook to fetch.
+ */
+ where?: WaHookWhereInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
+ *
+ * Determine the order of WaHooks to fetch.
+ */
+ orderBy?: WaHookOrderByWithRelationInput | WaHookOrderByWithRelationInput[]
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
+ *
+ * Sets the position for searching for WaHooks.
+ */
+ cursor?: WaHookWhereUniqueInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Take `±n` WaHooks from the position of the cursor.
+ */
+ take?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Skip the first `n` WaHooks.
+ */
+ skip?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
+ *
+ * Filter by unique combinations of WaHooks.
+ */
+ distinct?: WaHookScalarFieldEnum | WaHookScalarFieldEnum[]
+ }
+
+ /**
+ * WaHook findMany
+ */
+ export type WaHookFindManyArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelect | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * Filter, which WaHooks to fetch.
+ */
+ where?: WaHookWhereInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
+ *
+ * Determine the order of WaHooks to fetch.
+ */
+ orderBy?: WaHookOrderByWithRelationInput | WaHookOrderByWithRelationInput[]
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs}
+ *
+ * Sets the position for listing WaHooks.
+ */
+ cursor?: WaHookWhereUniqueInput
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Take `±n` WaHooks from the position of the cursor.
+ */
+ take?: number
+ /**
+ * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
+ *
+ * Skip the first `n` WaHooks.
+ */
+ skip?: number
+ distinct?: WaHookScalarFieldEnum | WaHookScalarFieldEnum[]
+ }
+
+ /**
+ * WaHook create
+ */
+ export type WaHookCreateArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelect | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * The data needed to create a WaHook.
+ */
+ data: XOR
+ }
+
+ /**
+ * WaHook createMany
+ */
+ export type WaHookCreateManyArgs = {
+ /**
+ * The data used to create many WaHooks.
+ */
+ data: WaHookCreateManyInput | WaHookCreateManyInput[]
+ skipDuplicates?: boolean
+ }
+
+ /**
+ * WaHook createManyAndReturn
+ */
+ export type WaHookCreateManyAndReturnArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelectCreateManyAndReturn | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * The data used to create many WaHooks.
+ */
+ data: WaHookCreateManyInput | WaHookCreateManyInput[]
+ skipDuplicates?: boolean
+ }
+
+ /**
+ * WaHook update
+ */
+ export type WaHookUpdateArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelect | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * The data needed to update a WaHook.
+ */
+ data: XOR
+ /**
+ * Choose, which WaHook to update.
+ */
+ where: WaHookWhereUniqueInput
+ }
+
+ /**
+ * WaHook updateMany
+ */
+ export type WaHookUpdateManyArgs = {
+ /**
+ * The data used to update WaHooks.
+ */
+ data: XOR
+ /**
+ * Filter which WaHooks to update
+ */
+ where?: WaHookWhereInput
+ /**
+ * Limit how many WaHooks to update.
+ */
+ limit?: number
+ }
+
+ /**
+ * WaHook updateManyAndReturn
+ */
+ export type WaHookUpdateManyAndReturnArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelectUpdateManyAndReturn | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * The data used to update WaHooks.
+ */
+ data: XOR
+ /**
+ * Filter which WaHooks to update
+ */
+ where?: WaHookWhereInput
+ /**
+ * Limit how many WaHooks to update.
+ */
+ limit?: number
+ }
+
+ /**
+ * WaHook upsert
+ */
+ export type WaHookUpsertArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelect | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * The filter to search for the WaHook to update in case it exists.
+ */
+ where: WaHookWhereUniqueInput
+ /**
+ * In case the WaHook found by the `where` argument doesn't exist, create a new WaHook with this data.
+ */
+ create: XOR
+ /**
+ * In case the WaHook was found with the provided `where` argument, update it with this data.
+ */
+ update: XOR
+ }
+
+ /**
+ * WaHook delete
+ */
+ export type WaHookDeleteArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelect | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ /**
+ * Filter which WaHook to delete.
+ */
+ where: WaHookWhereUniqueInput
+ }
+
+ /**
+ * WaHook deleteMany
+ */
+ export type WaHookDeleteManyArgs = {
+ /**
+ * Filter which WaHooks to delete
+ */
+ where?: WaHookWhereInput
+ /**
+ * Limit how many WaHooks to delete.
+ */
+ limit?: number
+ }
+
+ /**
+ * WaHook without action
+ */
+ export type WaHookDefaultArgs = {
+ /**
+ * Select specific fields to fetch from the WaHook
+ */
+ select?: WaHookSelect | null
+ /**
+ * Omit specific fields from the WaHook
+ */
+ omit?: WaHookOmit | null
+ }
+
+
/**
* Enums
*/
@@ -4477,6 +5546,16 @@ export namespace Prisma {
export type WebHookScalarFieldEnum = (typeof WebHookScalarFieldEnum)[keyof typeof WebHookScalarFieldEnum]
+ export const WaHookScalarFieldEnum: {
+ id: 'id',
+ data: 'data',
+ createdAt: 'createdAt',
+ updatedAt: 'updatedAt'
+ };
+
+ export type WaHookScalarFieldEnum = (typeof WaHookScalarFieldEnum)[keyof typeof WaHookScalarFieldEnum]
+
+
export const SortOrder: {
asc: 'asc',
desc: 'desc'
@@ -4485,6 +5564,14 @@ export namespace Prisma {
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
+ export const NullableJsonNullValueInput: {
+ DbNull: typeof DbNull,
+ JsonNull: typeof JsonNull
+ };
+
+ export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
+
+
export const QueryMode: {
default: 'default',
insensitive: 'insensitive'
@@ -4501,6 +5588,15 @@ export namespace Prisma {
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
+ export const JsonNullValueFilter: {
+ DbNull: typeof DbNull,
+ JsonNull: typeof JsonNull,
+ AnyNull: typeof AnyNull
+ };
+
+ export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]
+
+
/**
* Field references
*/
@@ -4555,6 +5651,20 @@ export namespace Prisma {
+ /**
+ * Reference to a field of type 'Json'
+ */
+ export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'>
+
+
+
+ /**
+ * Reference to a field of type 'QueryMode'
+ */
+ export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'>
+
+
+
/**
* Reference to a field of type 'Float'
*/
@@ -4801,6 +5911,53 @@ export namespace Prisma {
updatedAt?: DateTimeWithAggregatesFilter<"WebHook"> | Date | string
}
+ export type WaHookWhereInput = {
+ AND?: WaHookWhereInput | WaHookWhereInput[]
+ OR?: WaHookWhereInput[]
+ NOT?: WaHookWhereInput | WaHookWhereInput[]
+ id?: StringFilter<"WaHook"> | string
+ data?: JsonNullableFilter<"WaHook">
+ createdAt?: DateTimeFilter<"WaHook"> | Date | string
+ updatedAt?: DateTimeFilter<"WaHook"> | Date | string
+ }
+
+ export type WaHookOrderByWithRelationInput = {
+ id?: SortOrder
+ data?: SortOrderInput | SortOrder
+ createdAt?: SortOrder
+ updatedAt?: SortOrder
+ }
+
+ export type WaHookWhereUniqueInput = Prisma.AtLeast<{
+ id?: string
+ AND?: WaHookWhereInput | WaHookWhereInput[]
+ OR?: WaHookWhereInput[]
+ NOT?: WaHookWhereInput | WaHookWhereInput[]
+ data?: JsonNullableFilter<"WaHook">
+ createdAt?: DateTimeFilter<"WaHook"> | Date | string
+ updatedAt?: DateTimeFilter<"WaHook"> | Date | string
+ }, "id">
+
+ export type WaHookOrderByWithAggregationInput = {
+ id?: SortOrder
+ data?: SortOrderInput | SortOrder
+ createdAt?: SortOrder
+ updatedAt?: SortOrder
+ _count?: WaHookCountOrderByAggregateInput
+ _max?: WaHookMaxOrderByAggregateInput
+ _min?: WaHookMinOrderByAggregateInput
+ }
+
+ export type WaHookScalarWhereWithAggregatesInput = {
+ AND?: WaHookScalarWhereWithAggregatesInput | WaHookScalarWhereWithAggregatesInput[]
+ OR?: WaHookScalarWhereWithAggregatesInput[]
+ NOT?: WaHookScalarWhereWithAggregatesInput | WaHookScalarWhereWithAggregatesInput[]
+ id?: StringWithAggregatesFilter<"WaHook"> | string
+ data?: JsonNullableWithAggregatesFilter<"WaHook">
+ createdAt?: DateTimeWithAggregatesFilter<"WaHook"> | Date | string
+ updatedAt?: DateTimeWithAggregatesFilter<"WaHook"> | Date | string
+ }
+
export type UserCreateInput = {
id?: string
name?: string | null
@@ -5063,6 +6220,55 @@ export namespace Prisma {
updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
}
+ export type WaHookCreateInput = {
+ id?: string
+ data?: NullableJsonNullValueInput | InputJsonValue
+ createdAt?: Date | string
+ updatedAt?: Date | string
+ }
+
+ export type WaHookUncheckedCreateInput = {
+ id?: string
+ data?: NullableJsonNullValueInput | InputJsonValue
+ createdAt?: Date | string
+ updatedAt?: Date | string
+ }
+
+ export type WaHookUpdateInput = {
+ id?: StringFieldUpdateOperationsInput | string
+ data?: NullableJsonNullValueInput | InputJsonValue
+ createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
+ updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
+ }
+
+ export type WaHookUncheckedUpdateInput = {
+ id?: StringFieldUpdateOperationsInput | string
+ data?: NullableJsonNullValueInput | InputJsonValue
+ createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
+ updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
+ }
+
+ export type WaHookCreateManyInput = {
+ id?: string
+ data?: NullableJsonNullValueInput | InputJsonValue
+ createdAt?: Date | string
+ updatedAt?: Date | string
+ }
+
+ export type WaHookUpdateManyMutationInput = {
+ id?: StringFieldUpdateOperationsInput | string
+ data?: NullableJsonNullValueInput | InputJsonValue
+ createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
+ updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
+ }
+
+ export type WaHookUncheckedUpdateManyInput = {
+ id?: StringFieldUpdateOperationsInput | string
+ data?: NullableJsonNullValueInput | InputJsonValue
+ createdAt?: DateTimeFieldUpdateOperationsInput | Date | string
+ updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string
+ }
+
export type StringFilter<$PrismaModel = never> = {
equals?: string | StringFieldRefInput<$PrismaModel>
in?: string[] | ListStringFieldRefInput<$PrismaModel>
@@ -5357,6 +6563,74 @@ export namespace Prisma {
_min?: NestedBoolFilter<$PrismaModel>
_max?: NestedBoolFilter<$PrismaModel>
}
+ export type JsonNullableFilter<$PrismaModel = never> =
+ | PatchUndefined<
+ Either>, Exclude>, 'path'>>,
+ Required>
+ >
+ | OptionalFlat>, 'path'>>
+
+ export type JsonNullableFilterBase<$PrismaModel = never> = {
+ equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
+ path?: string[]
+ mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
+ string_contains?: string | StringFieldRefInput<$PrismaModel>
+ string_starts_with?: string | StringFieldRefInput<$PrismaModel>
+ string_ends_with?: string | StringFieldRefInput<$PrismaModel>
+ array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
+ array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
+ array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
+ lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
+ }
+
+ export type WaHookCountOrderByAggregateInput = {
+ id?: SortOrder
+ data?: SortOrder
+ createdAt?: SortOrder
+ updatedAt?: SortOrder
+ }
+
+ export type WaHookMaxOrderByAggregateInput = {
+ id?: SortOrder
+ createdAt?: SortOrder
+ updatedAt?: SortOrder
+ }
+
+ export type WaHookMinOrderByAggregateInput = {
+ id?: SortOrder
+ createdAt?: SortOrder
+ updatedAt?: SortOrder
+ }
+ export type JsonNullableWithAggregatesFilter<$PrismaModel = never> =
+ | PatchUndefined<
+ Either>, Exclude>, 'path'>>,
+ Required>
+ >
+ | OptionalFlat>, 'path'>>
+
+ export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = {
+ equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
+ path?: string[]
+ mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
+ string_contains?: string | StringFieldRefInput<$PrismaModel>
+ string_starts_with?: string | StringFieldRefInput<$PrismaModel>
+ string_ends_with?: string | StringFieldRefInput<$PrismaModel>
+ array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
+ array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
+ array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
+ lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
+ _count?: NestedIntNullableFilter<$PrismaModel>
+ _min?: NestedJsonNullableFilter<$PrismaModel>
+ _max?: NestedJsonNullableFilter<$PrismaModel>
+ }
export type ApiKeyCreateNestedManyWithoutUserInput = {
create?: XOR | ApiKeyCreateWithoutUserInput[] | ApiKeyUncheckedCreateWithoutUserInput[]
@@ -5617,6 +6891,29 @@ export namespace Prisma {
_min?: NestedBoolFilter<$PrismaModel>
_max?: NestedBoolFilter<$PrismaModel>
}
+ export type NestedJsonNullableFilter<$PrismaModel = never> =
+ | PatchUndefined<
+ Either>, Exclude>, 'path'>>,
+ Required>
+ >
+ | OptionalFlat>, 'path'>>
+
+ export type NestedJsonNullableFilterBase<$PrismaModel = never> = {
+ equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
+ path?: string[]
+ mode?: QueryMode | EnumQueryModeFieldRefInput<$PrismaModel>
+ string_contains?: string | StringFieldRefInput<$PrismaModel>
+ string_starts_with?: string | StringFieldRefInput<$PrismaModel>
+ string_ends_with?: string | StringFieldRefInput<$PrismaModel>
+ array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
+ array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
+ array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null
+ lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel>
+ not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter
+ }
export type ApiKeyCreateWithoutUserInput = {
id?: string
diff --git a/generated/prisma/index.js b/generated/prisma/index.js
index 41745fd..16019ba 100644
--- a/generated/prisma/index.js
+++ b/generated/prisma/index.js
@@ -130,11 +130,23 @@ exports.Prisma.WebHookScalarFieldEnum = {
updatedAt: 'updatedAt'
};
+exports.Prisma.WaHookScalarFieldEnum = {
+ id: 'id',
+ data: 'data',
+ createdAt: 'createdAt',
+ updatedAt: 'updatedAt'
+};
+
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
+exports.Prisma.NullableJsonNullValueInput = {
+ DbNull: Prisma.DbNull,
+ JsonNull: Prisma.JsonNull
+};
+
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
@@ -145,11 +157,18 @@ exports.Prisma.NullsOrder = {
last: 'last'
};
+exports.Prisma.JsonNullValueFilter = {
+ DbNull: Prisma.DbNull,
+ JsonNull: Prisma.JsonNull,
+ AnyNull: Prisma.AnyNull
+};
+
exports.Prisma.ModelName = {
User: 'User',
ApiKey: 'ApiKey',
- WebHook: 'WebHook'
+ WebHook: 'WebHook',
+ WaHook: 'WaHook'
};
/**
* Create the Client
@@ -198,8 +217,8 @@ const config = {
}
}
},
- "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String? @unique\n password String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n ApiKey ApiKey[]\n}\n\nmodel ApiKey {\n id String @id @default(cuid())\n User User? @relation(fields: [userId], references: [id])\n userId String\n name String\n key String @unique @db.Text\n description String?\n expiredAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel WebHook {\n id String @id @default(cuid())\n name String?\n description String?\n url String\n payload String? @default(\"{}\")\n method String @default(\"POST\")\n headers String? @default(\"{}\")\n apiToken String?\n retries Int? @default(3)\n enabled Boolean @default(true)\n replay Boolean @default(false)\n replayKey String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n",
- "inlineSchemaHash": "b1c74fdf8c8c71cfbe0b140d02ba653d858d37e6ff4828268dfac154524e957b",
+ "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String? @unique\n password String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n ApiKey ApiKey[]\n}\n\nmodel ApiKey {\n id String @id @default(cuid())\n User User? @relation(fields: [userId], references: [id])\n userId String\n name String\n key String @unique @db.Text\n description String?\n expiredAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel WebHook {\n id String @id @default(cuid())\n name String?\n description String?\n url String\n payload String? @default(\"{}\")\n method String @default(\"POST\")\n headers String? @default(\"{}\")\n apiToken String?\n retries Int? @default(3)\n enabled Boolean @default(true)\n replay Boolean @default(false)\n replayKey String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel WaHook {\n id String @id @default(cuid())\n data Json? @db.Json\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n",
+ "inlineSchemaHash": "f672201c199f0f043f3266324775af184d82ebd00379f5c23166510b25c889d0",
"copyEngine": true
}
@@ -220,7 +239,7 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) {
config.isBundled = true
}
-config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"ApiKey\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ApiKey\",\"nativeType\":null,\"relationName\":\"ApiKeyToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ApiKey\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"User\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ApiKeyToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"Text\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiredAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"WebHook\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"payload\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"{}\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"method\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"POST\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headers\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"{}\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"apiToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"retries\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"enabled\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replay\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replayKey\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
+config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"ApiKey\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ApiKey\",\"nativeType\":null,\"relationName\":\"ApiKeyToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ApiKey\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"User\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"nativeType\":null,\"relationName\":\"ApiKeyToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":[\"Text\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiredAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"WebHook\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"payload\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"{}\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"method\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"POST\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"headers\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":\"{}\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"apiToken\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"retries\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"nativeType\":null,\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"enabled\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replay\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"nativeType\":null,\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replayKey\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"WaHook\":{\"dbName\":null,\"schema\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"nativeType\":null,\"default\":{\"name\":\"cuid\",\"args\":[1]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"nativeType\":[\"Json\",[]],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"nativeType\":null,\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"nativeType\":null,\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
config.engineWasm = undefined
config.compilerWasm = undefined
diff --git a/generated/prisma/package.json b/generated/prisma/package.json
index 7ac0618..82fa135 100644
--- a/generated/prisma/package.json
+++ b/generated/prisma/package.json
@@ -1,5 +1,5 @@
{
- "name": "prisma-client-2e3b759cf6e55c6417c5fd25161bbd379e191c301fa0ac5f45716fca6873db7a",
+ "name": "prisma-client-b7159a5a3af13766d165b3bf5d09869b273a4102920455b6b9bd965ee512be7e",
"main": "index.js",
"types": "index.d.ts",
"browser": "default.js",
diff --git a/generated/prisma/schema.prisma b/generated/prisma/schema.prisma
index 9311760..07cef3a 100644
--- a/generated/prisma/schema.prisma
+++ b/generated/prisma/schema.prisma
@@ -46,3 +46,10 @@ model WebHook {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
+
+model WaHook {
+ id String @id @default(cuid())
+ data Json? @db.Json
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+}
diff --git a/generated/prisma/wasm.js b/generated/prisma/wasm.js
index b0a9e26..36fcf74 100644
--- a/generated/prisma/wasm.js
+++ b/generated/prisma/wasm.js
@@ -129,11 +129,23 @@ exports.Prisma.WebHookScalarFieldEnum = {
updatedAt: 'updatedAt'
};
+exports.Prisma.WaHookScalarFieldEnum = {
+ id: 'id',
+ data: 'data',
+ createdAt: 'createdAt',
+ updatedAt: 'updatedAt'
+};
+
exports.Prisma.SortOrder = {
asc: 'asc',
desc: 'desc'
};
+exports.Prisma.NullableJsonNullValueInput = {
+ DbNull: Prisma.DbNull,
+ JsonNull: Prisma.JsonNull
+};
+
exports.Prisma.QueryMode = {
default: 'default',
insensitive: 'insensitive'
@@ -144,11 +156,18 @@ exports.Prisma.NullsOrder = {
last: 'last'
};
+exports.Prisma.JsonNullValueFilter = {
+ DbNull: Prisma.DbNull,
+ JsonNull: Prisma.JsonNull,
+ AnyNull: Prisma.AnyNull
+};
+
exports.Prisma.ModelName = {
User: 'User',
ApiKey: 'ApiKey',
- WebHook: 'WebHook'
+ WebHook: 'WebHook',
+ WaHook: 'WaHook'
};
/**
* Create the Client
@@ -197,13 +216,13 @@ const config = {
}
}
},
- "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String? @unique\n password String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n ApiKey ApiKey[]\n}\n\nmodel ApiKey {\n id String @id @default(cuid())\n User User? @relation(fields: [userId], references: [id])\n userId String\n name String\n key String @unique @db.Text\n description String?\n expiredAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel WebHook {\n id String @id @default(cuid())\n name String?\n description String?\n url String\n payload String? @default(\"{}\")\n method String @default(\"POST\")\n headers String? @default(\"{}\")\n apiToken String?\n retries Int? @default(3)\n enabled Boolean @default(true)\n replay Boolean @default(false)\n replayKey String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n",
- "inlineSchemaHash": "b1c74fdf8c8c71cfbe0b140d02ba653d858d37e6ff4828268dfac154524e957b",
+ "inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"../generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel User {\n id String @id @default(cuid())\n name String?\n email String? @unique\n password String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n ApiKey ApiKey[]\n}\n\nmodel ApiKey {\n id String @id @default(cuid())\n User User? @relation(fields: [userId], references: [id])\n userId String\n name String\n key String @unique @db.Text\n description String?\n expiredAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel WebHook {\n id String @id @default(cuid())\n name String?\n description String?\n url String\n payload String? @default(\"{}\")\n method String @default(\"POST\")\n headers String? @default(\"{}\")\n apiToken String?\n retries Int? @default(3)\n enabled Boolean @default(true)\n replay Boolean @default(false)\n replayKey String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel WaHook {\n id String @id @default(cuid())\n data Json? @db.Json\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n",
+ "inlineSchemaHash": "f672201c199f0f043f3266324775af184d82ebd00379f5c23166510b25c889d0",
"copyEngine": true
}
config.dirname = '/'
-config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"ApiKey\",\"kind\":\"object\",\"type\":\"ApiKey\",\"relationName\":\"ApiKeyToUser\"}],\"dbName\":null},\"ApiKey\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"User\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"ApiKeyToUser\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expiredAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"WebHook\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"payload\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"method\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"headers\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"apiToken\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"retries\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"enabled\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"replay\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"replayKey\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
+config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"ApiKey\",\"kind\":\"object\",\"type\":\"ApiKey\",\"relationName\":\"ApiKeyToUser\"}],\"dbName\":null},\"ApiKey\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"User\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"ApiKeyToUser\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"expiredAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"WebHook\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"url\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"payload\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"method\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"headers\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"apiToken\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"retries\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"enabled\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"replay\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"replayKey\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null},\"WaHook\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"data\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}")
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
config.engineWasm = {
getRuntime: async () => require('./query_engine_bg.js'),
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index 9311760..1de3c6e 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -46,3 +46,10 @@ model WebHook {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
+
+model WaHook {
+ id String @id @default(cuid())
+ data Json? @db.Json
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+}
diff --git a/src/server/routes/wa_hook_route.ts b/src/server/routes/wa_hook_route.ts
index fbdf43b..a9ac0a2 100644
--- a/src/server/routes/wa_hook_route.ts
+++ b/src/server/routes/wa_hook_route.ts
@@ -1,14 +1,12 @@
import Elysia, { t } from "elysia";
import { prisma } from "../lib/prisma";
-const VERIFY_TOKEN = "token_yang_kamu_set_di_dashboard";
-
const WaHookRoute = new Elysia({
prefix: "/wa-hook",
tags: ["WhatsApp Hook"],
})
// ✅ Handle verifikasi Webhook (GET)
- .get("/hook", async(ctx) => {
+ .get("/hook", async (ctx) => {
const { query, set } = ctx;
const mode = query["hub.mode"];
const challenge = query["hub.challenge"];
@@ -50,6 +48,12 @@ const WaHookRoute = new Elysia({
.post("/hook", async ({ body }) => {
console.log("Incoming WhatsApp Webhook:", body);
+ await prisma.waHook.create({
+ data: {
+ data: body,
+ },
+ });
+
return {
success: true,
message: "WhatsApp Hook received"
@@ -60,6 +64,17 @@ const WaHookRoute = new Elysia({
summary: "Receive WhatsApp Messages",
description: "Menerima pesan dari WhatsApp Webhook"
}
+ })
+ .get("/list-wahook", async () => {
+ const list = await prisma.waHook.findMany();
+ return {
+ list,
+ };
+ }, {
+ detail: {
+ summary: "List WhatsApp Hook",
+ description: "List semua WhatsApp Hook",
+ }
});
export default WaHookRoute;