From 3e8e8829f1a4da64d6d3fb8d6ba26cda8c1cee2d Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Thu, 1 Feb 2024 14:25:59 +0100 Subject: [PATCH] :green_heart: Move ky package to typebot.io/lib --- apps/builder/package.json | 3 +- apps/docs/openapi/builder.json | 488 --------------------------------- packages/lib/package.json | 3 +- pnpm-lock.yaml | 6 +- 4 files changed, 6 insertions(+), 494 deletions(-) diff --git a/apps/builder/package.json b/apps/builder/package.json index a6560f983c..f0c13e70a8 100644 --- a/apps/builder/package.json +++ b/apps/builder/package.json @@ -93,8 +93,7 @@ "tinycolor2": "1.6.0", "unsplash-js": "7.0.18", "use-debounce": "9.0.4", - "zustand": "4.5.0", - "ky": "1.1.3" + "zustand": "4.5.0" }, "devDependencies": { "@chakra-ui/styled-system": "2.9.1", diff --git a/apps/docs/openapi/builder.json b/apps/docs/openapi/builder.json index 6eb22f0c09..b3e82a1762 100644 --- a/apps/docs/openapi/builder.json +++ b/apps/docs/openapi/builder.json @@ -14062,494 +14062,6 @@ } } }, - "/v1/t/process": { - "post": { - "operationId": "processTelemetryEvent", - "description": "Only used for the cloud version of Typebot. It's the way it processes telemetry events and inject it to thrid-party services.", - "tags": [ - "Telemetry" - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "events": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "workspaceId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "Workspace created" - ] - }, - "data": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "plan": { - "type": "string", - "enum": [ - "FREE", - "STARTER", - "PRO", - "LIFETIME", - "OFFERED", - "CUSTOM", - "UNLIMITED" - ] - } - }, - "required": [ - "plan" - ] - } - }, - "required": [ - "userId", - "workspaceId", - "name", - "data" - ] - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "User created" - ] - }, - "data": { - "type": "object", - "properties": { - "email": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "required": [ - "email" - ] - } - }, - "required": [ - "userId", - "name", - "data" - ] - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "workspaceId": { - "type": "string" - }, - "typebotId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "Typebot created" - ] - }, - "data": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "template": { - "type": "string" - } - }, - "required": [ - "name" - ] - } - }, - "required": [ - "userId", - "workspaceId", - "typebotId", - "name", - "data" - ] - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "workspaceId": { - "type": "string" - }, - "typebotId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "Typebot published" - ] - }, - "data": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "isFirstPublish": { - "type": "boolean", - "enum": [ - true - ] - } - }, - "required": [ - "name" - ] - } - }, - "required": [ - "userId", - "workspaceId", - "typebotId", - "name", - "data" - ] - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "workspaceId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "Subscription updated" - ] - }, - "data": { - "type": "object", - "properties": { - "plan": { - "type": "string", - "enum": [ - "FREE", - "STARTER", - "PRO", - "LIFETIME", - "OFFERED", - "CUSTOM", - "UNLIMITED" - ] - } - }, - "required": [ - "plan" - ] - } - }, - "required": [ - "userId", - "workspaceId", - "name", - "data" - ] - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "workspaceId": { - "type": "string" - }, - "typebotId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "New results collected" - ] - }, - "data": { - "type": "object", - "properties": { - "total": { - "type": "number" - }, - "isFirstOfKind": { - "type": "boolean", - "enum": [ - true - ] - } - }, - "required": [ - "total" - ] - } - }, - "required": [ - "userId", - "workspaceId", - "typebotId", - "name", - "data" - ] - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "workspaceId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "Workspace limit reached" - ] - }, - "data": { - "type": "object", - "properties": { - "chatsLimit": { - "type": "number" - }, - "totalChatsUsed": { - "type": "number" - } - }, - "required": [ - "chatsLimit", - "totalChatsUsed" - ] - } - }, - "required": [ - "userId", - "workspaceId", - "name", - "data" - ] - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "workspaceId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "Workspace automatically quarantined" - ] - }, - "data": { - "type": "object", - "properties": { - "chatsLimit": { - "type": "number" - }, - "totalChatsUsed": { - "type": "number" - } - }, - "required": [ - "chatsLimit", - "totalChatsUsed" - ] - } - }, - "required": [ - "userId", - "workspaceId", - "name", - "data" - ] - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "workspaceId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "Subscription automatically updated" - ] - }, - "data": { - "type": "object", - "properties": { - "plan": { - "type": "string", - "enum": [ - "FREE", - "STARTER", - "PRO", - "LIFETIME", - "OFFERED", - "CUSTOM", - "UNLIMITED" - ] - } - }, - "required": [ - "plan" - ] - } - }, - "required": [ - "userId", - "workspaceId", - "name", - "data" - ] - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "workspaceId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "Workspace past due" - ] - } - }, - "required": [ - "userId", - "workspaceId", - "name" - ] - }, - { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "workspaceId": { - "type": "string" - }, - "name": { - "type": "string", - "enum": [ - "Workspace past due status removed" - ] - } - }, - "required": [ - "userId", - "workspaceId", - "name" - ] - } - ] - } - } - }, - "required": [ - "events" - ] - } - } - } - }, - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "enum": [ - "Events injected" - ] - } - }, - "required": [ - "message" - ] - } - } - } - }, - "400": { - "description": "Invalid input data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.BAD_REQUEST" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR" - } - } - } - } - } - } - }, "/v1/typebots/{typebotId}/whatsapp/start-preview": { "post": { "operationId": "whatsApp-startWhatsAppPreview", diff --git a/packages/lib/package.json b/packages/lib/package.json index 5ad6d5c4c5..c64455e92d 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -44,6 +44,7 @@ "remark-parse": "11.0.0", "stripe": "12.13.0", "unified": "11.0.4", - "zod": "3.22.4" + "zod": "3.22.4", + "ky": "1.1.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 17b11b21b6..d73b3c05f8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -197,9 +197,6 @@ importers: jsonwebtoken: specifier: 9.0.1 version: 9.0.1 - ky: - specifier: 1.1.3 - version: 1.1.3 libphonenumber-js: specifier: 1.10.37 version: 1.10.37 @@ -1439,6 +1436,9 @@ importers: got: specifier: 12.6.0 version: 12.6.0 + ky: + specifier: 1.1.3 + version: 1.1.3 minio: specifier: 7.1.3 version: 7.1.3