@activepieces/piece-chatsistant 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,23 +1,24 @@
1
1
  {
2
2
  "name": "@activepieces/piece-chatsistant",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
7
7
  "dependencies": {
8
8
  "@sinclair/typebox": "0.34.11",
9
- "axios": "1.8.3",
9
+ "axios": "1.13.1",
10
10
  "axios-retry": "4.4.1",
11
11
  "deepmerge-ts": "7.1.0",
12
+ "form-data": "4.0.4",
12
13
  "mime-types": "2.1.35",
13
14
  "nanoid": "3.3.8",
14
15
  "semver": "7.6.0",
15
16
  "socket.io-client": "4.8.1",
16
17
  "tslib": "^2.3.0",
17
- "zod": "3.25.76",
18
- "@activepieces/pieces-common": "0.8.1",
19
- "@activepieces/pieces-framework": "0.20.2",
20
- "@activepieces/shared": "0.25.2"
18
+ "zod": "4.1.13",
19
+ "@activepieces/pieces-common": "0.11.0",
20
+ "@activepieces/pieces-framework": "0.23.0",
21
+ "@activepieces/shared": "0.30.4"
21
22
  },
22
23
  "resolutions": {
23
24
  "rollup": "npm:@rollup/wasm-node"
@@ -0,0 +1,32 @@
1
+ {
2
+ "\nTo get your API Key:\n\n1. Go to [Chatsistant platform](https://app.chatsistant.com/)\n2. Sign up or log in to your account\n3. Click on the \"Account\" menu in the navigation bar\n4. Navigate to the \"API Keys\" section\n5. Click \"Generate new key\"\n6. Enter a description for your key and click \"Generate\"\n7. Copy and save your API key securely\n": "\nTo get your API Key:\n\n1. Go to [Chatsistant platform](https://app.chatsistant.com/)\n2. Sign up or log in to your account\n3. Click on the \"Account\" menu in the navigation bar\n4. Navigate to the \"API Keys\" section\n5. Click \"Generate new key\"\n6. Enter a description for your key and click \"Generate\"\n7. Copy and save your API key securely\n",
3
+ "Send Message": "Send Message",
4
+ "Custom API Call": "Custom API Call",
5
+ "Send a message to a chatbot session": "Send a message to a chatbot session",
6
+ "Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
7
+ "Chatbot UUID": "Chatbot UUID",
8
+ "Message": "Message",
9
+ "Session UUID": "Session UUID",
10
+ "Method": "Method",
11
+ "Headers": "Headers",
12
+ "Query Parameters": "Query Parameters",
13
+ "Body": "Body",
14
+ "Response is Binary ?": "Response is Binary ?",
15
+ "No Error on Failure": "No Error on Failure",
16
+ "Timeout (in seconds)": "Timeout (in seconds)",
17
+ "The UUID of the chatbot to send the message to": "The UUID of the chatbot to send the message to",
18
+ "The message to send to the chatbot": "The message to send to the chatbot",
19
+ "The UUID of the session to send the message to": "The UUID of the session to send the message to",
20
+ "Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
21
+ "Enable for files like PDFs, images, etc..": "Enable for files like PDFs, images, etc..",
22
+ "GET": "GET",
23
+ "POST": "POST",
24
+ "PATCH": "PATCH",
25
+ "PUT": "PUT",
26
+ "DELETE": "DELETE",
27
+ "HEAD": "HEAD",
28
+ "form submission": "form submission",
29
+ "Triggered when a form is submitted": "Triggered when a form is submitted",
30
+ "Markdown": "Markdown",
31
+ "## Chatsistant Webhook Setup\n To use this trigger, you need to manually set up a webhook in your Chatsistant account:\n\n 1. Login to your Chatsistant account.\n 2. Navigate to **Customizations** tab on the left navigation menu.\n 3. Scroll down to **Webhook** and click to expand it.\n 4. Select the **Form Submission** event and specify the following URL:\n ```text\n {{webhookUrl}}\n ```\n 5. Click Save to register the": "## Chatsistant Webhook Setup\n To use this trigger, you need to manually set up a webhook in your Chatsistant account:\n\n 1. Login to your Chatsistant account.\n 2. Navigate to **Customizations** tab on the left navigation menu.\n 3. Scroll down to **Webhook** and click to expand it.\n 4. Select the **Form Submission** event and specify the following URL:\n ```text\n {{webhookUrl}}\n ```\n 5. Click Save to register the webhook.\n "
32
+ }
@@ -32,15 +32,15 @@ exports.sendMessage = (0, pieces_framework_1.createAction)({
32
32
  return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
33
33
  const { chatbot_uuid, session_uuid, query } = propsValue;
34
34
  if (!session_uuid) {
35
- const response = yield (0, client_1.makeRequest)(auth, pieces_common_1.HttpMethod.POST, `/chatbot/${chatbot_uuid}/session/create`, {});
35
+ const response = yield (0, client_1.makeRequest)(auth.secret_text, pieces_common_1.HttpMethod.POST, `/chatbot/${chatbot_uuid}/session/create`, {});
36
36
  const session_id = response.uuid;
37
- const messageResponse = yield (0, client_1.makeRequest)(auth, pieces_common_1.HttpMethod.POST, `/session/${session_id}/message/stream`, {
37
+ const messageResponse = yield (0, client_1.makeRequest)(auth.secret_text, pieces_common_1.HttpMethod.POST, `/session/${session_id}/message/stream`, {
38
38
  query,
39
39
  });
40
40
  return messageResponse;
41
41
  }
42
42
  else {
43
- const response = yield (0, client_1.makeRequest)(auth, pieces_common_1.HttpMethod.POST, `/session/${session_uuid}/message/stream`, {
43
+ const response = yield (0, client_1.makeRequest)(auth.secret_text, pieces_common_1.HttpMethod.POST, `/session/${session_uuid}/message/stream`, {
44
44
  query,
45
45
  });
46
46
  return response;
@@ -1 +1 @@
1
- {"version":3,"file":"send-message.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/chatsistant/src/lib/actions/send-message.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,yCAAiD;AACjD,6CAA+C;AAElC,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,qCAAqC;IAClD,KAAK,EAAE;QACL,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACvB,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC;YAEzD,IAAI,CAAC,YAAY,EAAE,CAAC;gBAClB,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,IAAI,EACJ,0BAAU,CAAC,IAAI,EACf,YAAY,YAAY,iBAAiB,EACzC,EAAE,CACH,CAAC;gBACF,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC;gBACjC,MAAM,eAAe,GAAG,MAAM,IAAA,oBAAW,EACvC,IAAI,EACJ,0BAAU,CAAC,IAAI,EACf,YAAY,UAAU,iBAAiB,EACvC;oBACE,KAAK;iBACN,CACF,CAAC;gBACF,OAAO,eAAe,CAAC;YACzB,CAAC;iBAAM,CAAC;gBACN,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,IAAI,EACJ,0BAAU,CAAC,IAAI,EACf,YAAY,YAAY,iBAAiB,EACzC;oBACE,KAAK;iBACN,CACF,CAAC;gBAEF,OAAO,QAAQ,CAAC;YAClB,CAAC;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"send-message.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/chatsistant/src/lib/actions/send-message.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,yCAAiD;AACjD,6CAA+C;AAElC,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,sBAAe;IACrB,IAAI,EAAE,aAAa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