@keystrokehq/superchat 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/README.md +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/create-contact.cjs +55 -0
- package/dist/actions/create-contact.cjs.map +1 -0
- package/dist/actions/create-contact.d.cts +9 -0
- package/dist/actions/create-contact.d.cts.map +1 -0
- package/dist/actions/create-contact.d.mts +9 -0
- package/dist/actions/create-contact.d.mts.map +1 -0
- package/dist/actions/create-contact.mjs +54 -0
- package/dist/actions/create-contact.mjs.map +1 -0
- package/dist/actions/create-template-folder.cjs +20 -0
- package/dist/actions/create-template-folder.cjs.map +1 -0
- package/dist/actions/create-template-folder.d.cts +9 -0
- package/dist/actions/create-template-folder.d.cts.map +1 -0
- package/dist/actions/create-template-folder.d.mts +9 -0
- package/dist/actions/create-template-folder.d.mts.map +1 -0
- package/dist/actions/create-template-folder.mjs +17 -0
- package/dist/actions/create-template-folder.mjs.map +1 -0
- package/dist/actions/delete-webhook.cjs +16 -0
- package/dist/actions/delete-webhook.cjs.map +1 -0
- package/dist/actions/delete-webhook.d.cts +9 -0
- package/dist/actions/delete-webhook.d.cts.map +1 -0
- package/dist/actions/delete-webhook.d.mts +9 -0
- package/dist/actions/delete-webhook.d.mts.map +1 -0
- package/dist/actions/delete-webhook.mjs +13 -0
- package/dist/actions/delete-webhook.mjs.map +1 -0
- package/dist/actions/get-contact.cjs +39 -0
- package/dist/actions/get-contact.cjs.map +1 -0
- package/dist/actions/get-contact.d.cts +9 -0
- package/dist/actions/get-contact.d.cts.map +1 -0
- package/dist/actions/get-contact.d.mts +9 -0
- package/dist/actions/get-contact.d.mts.map +1 -0
- package/dist/actions/get-contact.mjs +38 -0
- package/dist/actions/get-contact.mjs.map +1 -0
- package/dist/actions/get-file.cjs +26 -0
- package/dist/actions/get-file.cjs.map +1 -0
- package/dist/actions/get-file.d.cts +9 -0
- package/dist/actions/get-file.d.cts.map +1 -0
- package/dist/actions/get-file.d.mts +9 -0
- package/dist/actions/get-file.d.mts.map +1 -0
- package/dist/actions/get-file.mjs +25 -0
- package/dist/actions/get-file.mjs.map +1 -0
- package/dist/actions/get-user.cjs +25 -0
- package/dist/actions/get-user.cjs.map +1 -0
- package/dist/actions/get-user.d.cts +9 -0
- package/dist/actions/get-user.d.cts.map +1 -0
- package/dist/actions/get-user.d.mts +9 -0
- package/dist/actions/get-user.d.mts.map +1 -0
- package/dist/actions/get-user.mjs +22 -0
- package/dist/actions/get-user.mjs.map +1 -0
- package/dist/actions/index.cjs +35 -0
- package/dist/actions/index.d.cts +18 -0
- package/dist/actions/index.d.mts +18 -0
- package/dist/actions/index.mjs +18 -0
- package/dist/actions/list-channels.cjs +37 -0
- package/dist/actions/list-channels.cjs.map +1 -0
- package/dist/actions/list-channels.d.cts +9 -0
- package/dist/actions/list-channels.d.cts.map +1 -0
- package/dist/actions/list-channels.d.mts +9 -0
- package/dist/actions/list-channels.d.mts.map +1 -0
- package/dist/actions/list-channels.mjs +36 -0
- package/dist/actions/list-channels.mjs.map +1 -0
- package/dist/actions/list-contacts.cjs +63 -0
- package/dist/actions/list-contacts.cjs.map +1 -0
- package/dist/actions/list-contacts.d.cts +9 -0
- package/dist/actions/list-contacts.d.cts.map +1 -0
- package/dist/actions/list-contacts.d.mts +9 -0
- package/dist/actions/list-contacts.d.mts.map +1 -0
- package/dist/actions/list-contacts.mjs +62 -0
- package/dist/actions/list-contacts.mjs.map +1 -0
- package/dist/actions/list-conversations.cjs +70 -0
- package/dist/actions/list-conversations.cjs.map +1 -0
- package/dist/actions/list-conversations.d.cts +9 -0
- package/dist/actions/list-conversations.d.cts.map +1 -0
- package/dist/actions/list-conversations.d.mts +9 -0
- package/dist/actions/list-conversations.d.mts.map +1 -0
- package/dist/actions/list-conversations.mjs +69 -0
- package/dist/actions/list-conversations.mjs.map +1 -0
- package/dist/actions/list-custom-attributes.cjs +37 -0
- package/dist/actions/list-custom-attributes.cjs.map +1 -0
- package/dist/actions/list-custom-attributes.d.cts +9 -0
- package/dist/actions/list-custom-attributes.d.cts.map +1 -0
- package/dist/actions/list-custom-attributes.d.mts +9 -0
- package/dist/actions/list-custom-attributes.d.mts.map +1 -0
- package/dist/actions/list-custom-attributes.mjs +36 -0
- package/dist/actions/list-custom-attributes.mjs.map +1 -0
- package/dist/actions/list-inboxes.cjs +41 -0
- package/dist/actions/list-inboxes.cjs.map +1 -0
- package/dist/actions/list-inboxes.d.cts +9 -0
- package/dist/actions/list-inboxes.d.cts.map +1 -0
- package/dist/actions/list-inboxes.d.mts +9 -0
- package/dist/actions/list-inboxes.d.mts.map +1 -0
- package/dist/actions/list-inboxes.mjs +40 -0
- package/dist/actions/list-inboxes.mjs.map +1 -0
- package/dist/actions/list-labels.cjs +37 -0
- package/dist/actions/list-labels.cjs.map +1 -0
- package/dist/actions/list-labels.d.cts +9 -0
- package/dist/actions/list-labels.d.cts.map +1 -0
- package/dist/actions/list-labels.d.mts +9 -0
- package/dist/actions/list-labels.d.mts.map +1 -0
- package/dist/actions/list-labels.mjs +36 -0
- package/dist/actions/list-labels.mjs.map +1 -0
- package/dist/actions/list-templates.cjs +38 -0
- package/dist/actions/list-templates.cjs.map +1 -0
- package/dist/actions/list-templates.d.cts +9 -0
- package/dist/actions/list-templates.d.cts.map +1 -0
- package/dist/actions/list-templates.d.mts +9 -0
- package/dist/actions/list-templates.d.mts.map +1 -0
- package/dist/actions/list-templates.mjs +37 -0
- package/dist/actions/list-templates.mjs.map +1 -0
- package/dist/actions/list-users.cjs +40 -0
- package/dist/actions/list-users.cjs.map +1 -0
- package/dist/actions/list-users.d.cts +9 -0
- package/dist/actions/list-users.d.cts.map +1 -0
- package/dist/actions/list-users.d.mts +9 -0
- package/dist/actions/list-users.d.mts.map +1 -0
- package/dist/actions/list-users.mjs +39 -0
- package/dist/actions/list-users.mjs.map +1 -0
- package/dist/actions/list-webhooks.cjs +47 -0
- package/dist/actions/list-webhooks.cjs.map +1 -0
- package/dist/actions/list-webhooks.d.cts +9 -0
- package/dist/actions/list-webhooks.d.cts.map +1 -0
- package/dist/actions/list-webhooks.d.mts +9 -0
- package/dist/actions/list-webhooks.d.mts.map +1 -0
- package/dist/actions/list-webhooks.mjs +46 -0
- package/dist/actions/list-webhooks.mjs.map +1 -0
- package/dist/actions/update-contact.cjs +68 -0
- package/dist/actions/update-contact.cjs.map +1 -0
- package/dist/actions/update-contact.d.cts +9 -0
- package/dist/actions/update-contact.d.cts.map +1 -0
- package/dist/actions/update-contact.d.mts +9 -0
- package/dist/actions/update-contact.d.mts.map +1 -0
- package/dist/actions/update-contact.mjs +67 -0
- package/dist/actions/update-contact.mjs.map +1 -0
- package/dist/actions/update-webhook.cjs +27 -0
- package/dist/actions/update-webhook.cjs.map +1 -0
- package/dist/actions/update-webhook.d.cts +9 -0
- package/dist/actions/update-webhook.d.cts.map +1 -0
- package/dist/actions/update-webhook.d.mts +9 -0
- package/dist/actions/update-webhook.d.mts.map +1 -0
- package/dist/actions/update-webhook.mjs +24 -0
- package/dist/actions/update-webhook.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +40 -0
- package/dist/index.d.cts +20 -0
- package/dist/index.d.mts +20 -0
- package/dist/index.mjs +21 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @keystrokehq/superchat
|
|
2
|
+
|
|
3
|
+
Keystroke-managed integration.
|
|
4
|
+
|
|
5
|
+
**App:** `superchat`
|
|
6
|
+
**Version:** `20260615_00`
|
|
7
|
+
**Actions:** 17
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { defineAgent } from "@keystrokehq/keystroke/agent";
|
|
11
|
+
import { superchatCreateContact } from "@keystrokehq/superchat/actions";
|
|
12
|
+
|
|
13
|
+
export default defineAgent({
|
|
14
|
+
key: "superchat-agent",
|
|
15
|
+
tools: [superchatCreateContact],
|
|
16
|
+
});
|
|
17
|
+
```
|
package/dist/action.cjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_app = require("./app.cjs");
|
|
2
|
+
const require_execute = require("./execute.cjs");
|
|
3
|
+
require("zod");
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return require_app.superchat.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await require_execute.executeSuperchatTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.action = action;
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["superchat","executeSuperchatTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { superchat } from \"./app\";\nimport { executeSuperchatTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return superchat.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeSuperchatTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,UAAU,OAAO;EACtB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,qBAAqB,MAAM,KAAgC,CAAC;EAC5F;CACF,CAAC;AACH"}
|
package/dist/action.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { superchat } from "./app.mjs";
|
|
2
|
+
import { executeSuperchatTool } from "./execute.mjs";
|
|
3
|
+
import "zod";
|
|
4
|
+
//#region src/action.ts
|
|
5
|
+
/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
|
|
6
|
+
function action(tool, def) {
|
|
7
|
+
return superchat.action({
|
|
8
|
+
slug: def.slug,
|
|
9
|
+
name: def.name,
|
|
10
|
+
description: def.description,
|
|
11
|
+
input: def.input,
|
|
12
|
+
output: def.output,
|
|
13
|
+
async run(input) {
|
|
14
|
+
return def.output.parse(await executeSuperchatTool(tool, input));
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { action };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=action.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { superchat } from \"./app\";\nimport { executeSuperchatTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return superchat.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeSuperchatTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,UAAU,OAAO;EACtB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,qBAAqB,MAAM,KAAgC,CAAC;EAC5F;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-contact.ts
|
|
4
|
+
const SuperchatCreateContactInput = zod.z.object({
|
|
5
|
+
gender: zod.z.enum([
|
|
6
|
+
"female",
|
|
7
|
+
"male",
|
|
8
|
+
"diverse"
|
|
9
|
+
]).describe("Gender of the contact.").optional(),
|
|
10
|
+
handles: zod.z.array(zod.z.object({
|
|
11
|
+
type: zod.z.enum(["phone", "mail"]).describe("Contact handle type. API users can only set 'phone' or 'mail'. Use 'phone' for phone numbers (E.164 format recommended, e.g., '+14155552671') or 'mail' for email addresses."),
|
|
12
|
+
value: zod.z.string().describe("The identifier for this handle: a phone number (E.164 format recommended, e.g., '+14155552671') or email address.")
|
|
13
|
+
}).describe("A single contact handle such as phone or email.\nNote: API users can only create 'phone' or 'mail' handles. Other types (instagram, telegram, etc.)\nare system-assigned by the respective platform.")).describe("List of one or more contact handles (phone or email). At least one handle is required. Example: [{\"type\": \"phone\", \"value\": \"+14155552671\"}] or [{\"type\": \"mail\", \"value\": \"user@example.com\"}]."),
|
|
14
|
+
last_name: zod.z.string().describe("Last name of the contact.").optional(),
|
|
15
|
+
first_name: zod.z.string().describe("First name of the contact.").optional(),
|
|
16
|
+
custom_attributes: zod.z.array(zod.z.object({
|
|
17
|
+
field: zod.z.string().describe("Custom attribute field name (must be predefined in Superchat settings), e.g., 'birthday'."),
|
|
18
|
+
value: zod.z.string().describe("Custom attribute value as string.")
|
|
19
|
+
}).describe("Custom attribute as field/value pair.\nNOTE: Custom attribute fields must be predefined in your Superchat account settings before use.\nUsing undefined custom attribute fields will result in a 400 error.")).describe("Optional list of custom attributes. NOTE: Custom attribute fields must be predefined in your Superchat account settings before they can be used via the API. Using undefined fields will result in a 400 error.").optional()
|
|
20
|
+
}).describe("Request model for creating a new contact.");
|
|
21
|
+
const SuperchatCreateContact_ContactHandleResponseSchema = zod.z.object({
|
|
22
|
+
id: zod.z.string().describe("Unique identifier of the contact handle."),
|
|
23
|
+
type: zod.z.string().describe("Contact handle type (e.g., 'phone', 'mail', 'instagram', 'telegram', 'google_business_messaging', 'facebook_messenger')."),
|
|
24
|
+
value: zod.z.string().describe("Contact handle value (phone number, email, or platform-specific identifier).")
|
|
25
|
+
}).describe("Contact handle returned in responses. Includes both user-created handles (phone, mail)\nand platform-assigned handles (instagram, telegram, etc.).");
|
|
26
|
+
const SuperchatCreateContact_CustomAttributeResponseSchema = zod.z.object({
|
|
27
|
+
field: zod.z.string().describe("Custom attribute field name."),
|
|
28
|
+
value: zod.z.string().describe("Custom attribute value.")
|
|
29
|
+
}).describe("Custom attribute returned in responses.");
|
|
30
|
+
const SuperchatCreateContactOutput = zod.z.object({
|
|
31
|
+
id: zod.z.string().describe("Unique identifier of the contact, always starts with 'co_'."),
|
|
32
|
+
url: zod.z.string().describe("Resource URL of the contact."),
|
|
33
|
+
gender: zod.z.enum([
|
|
34
|
+
"female",
|
|
35
|
+
"male",
|
|
36
|
+
"diverse"
|
|
37
|
+
]).describe("Gender of the contact.").nullable().optional(),
|
|
38
|
+
handles: zod.z.array(SuperchatCreateContact_ContactHandleResponseSchema).describe("List of contact handles associated with this contact."),
|
|
39
|
+
last_name: zod.z.string().describe("Last name of the contact.").nullable().optional(),
|
|
40
|
+
created_at: zod.z.string().describe("UTC datetime when the contact was created."),
|
|
41
|
+
first_name: zod.z.string().describe("First name of the contact.").nullable().optional(),
|
|
42
|
+
updated_at: zod.z.string().describe("UTC datetime when the contact was last updated."),
|
|
43
|
+
custom_attributes: zod.z.array(SuperchatCreateContact_CustomAttributeResponseSchema).describe("Custom attributes of this contact.").nullable().optional()
|
|
44
|
+
}).describe("Response model for newly created contact.");
|
|
45
|
+
const superchatCreateContact = require_action.action("SUPERCHAT_CREATE_CONTACT", {
|
|
46
|
+
slug: "superchat-create-contact",
|
|
47
|
+
name: "Create Contact",
|
|
48
|
+
description: "Create a new contact in Superchat with phone or email handles. Use this tool to register contact details before sending messages. You must provide at least one handle (phone or email). Optional fields include first name, last name, gender, and custom attributes (if predefined in your account settings).",
|
|
49
|
+
input: SuperchatCreateContactInput,
|
|
50
|
+
output: SuperchatCreateContactOutput
|
|
51
|
+
});
|
|
52
|
+
//#endregion
|
|
53
|
+
exports.superchatCreateContact = superchatCreateContact;
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=create-contact.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-contact.cjs","names":["z","action"],"sources":["../../src/actions/create-contact.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SuperchatCreateContactInput: z.ZodTypeAny = z.object({\n gender: z.enum([\"female\", \"male\", \"diverse\"]).describe(\"Gender of the contact.\").optional(),\n handles: z.array(z.object({\n type: z.enum([\"phone\", \"mail\"]).describe(\"Contact handle type. API users can only set 'phone' or 'mail'. Use 'phone' for phone numbers (E.164 format recommended, e.g., '+14155552671') or 'mail' for email addresses.\"),\n value: z.string().describe(\"The identifier for this handle: a phone number (E.164 format recommended, e.g., '+14155552671') or email address.\"),\n}).describe(\"A single contact handle such as phone or email.\\nNote: API users can only create 'phone' or 'mail' handles. Other types (instagram, telegram, etc.)\\nare system-assigned by the respective platform.\")).describe(\"List of one or more contact handles (phone or email). At least one handle is required. Example: [{\\\"type\\\": \\\"phone\\\", \\\"value\\\": \\\"+14155552671\\\"}] or [{\\\"type\\\": \\\"mail\\\", \\\"value\\\": \\\"user@example.com\\\"}].\"),\n last_name: z.string().describe(\"Last name of the contact.\").optional(),\n first_name: z.string().describe(\"First name of the contact.\").optional(),\n custom_attributes: z.array(z.object({\n field: z.string().describe(\"Custom attribute field name (must be predefined in Superchat settings), e.g., 'birthday'.\"),\n value: z.string().describe(\"Custom attribute value as string.\"),\n}).describe(\"Custom attribute as field/value pair.\\nNOTE: Custom attribute fields must be predefined in your Superchat account settings before use.\\nUsing undefined custom attribute fields will result in a 400 error.\")).describe(\"Optional list of custom attributes. NOTE: Custom attribute fields must be predefined in your Superchat account settings before they can be used via the API. Using undefined fields will result in a 400 error.\").optional(),\n}).describe(\"Request model for creating a new contact.\");\nconst SuperchatCreateContact_ContactHandleResponseSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the contact handle.\"),\n type: z.string().describe(\"Contact handle type (e.g., 'phone', 'mail', 'instagram', 'telegram', 'google_business_messaging', 'facebook_messenger').\"),\n value: z.string().describe(\"Contact handle value (phone number, email, or platform-specific identifier).\"),\n}).describe(\"Contact handle returned in responses. Includes both user-created handles (phone, mail)\\nand platform-assigned handles (instagram, telegram, etc.).\");\nconst SuperchatCreateContact_CustomAttributeResponseSchema: z.ZodTypeAny = z.object({\n field: z.string().describe(\"Custom attribute field name.\"),\n value: z.string().describe(\"Custom attribute value.\"),\n}).describe(\"Custom attribute returned in responses.\");\nexport const SuperchatCreateContactOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the contact, always starts with 'co_'.\"),\n url: z.string().describe(\"Resource URL of the contact.\"),\n gender: z.enum([\"female\", \"male\", \"diverse\"]).describe(\"Gender of the contact.\").nullable().optional(),\n handles: z.array(SuperchatCreateContact_ContactHandleResponseSchema).describe(\"List of contact handles associated with this contact.\"),\n last_name: z.string().describe(\"Last name of the contact.\").nullable().optional(),\n created_at: z.string().describe(\"UTC datetime when the contact was created.\"),\n first_name: z.string().describe(\"First name of the contact.\").nullable().optional(),\n updated_at: z.string().describe(\"UTC datetime when the contact was last updated.\"),\n custom_attributes: z.array(SuperchatCreateContact_CustomAttributeResponseSchema).describe(\"Custom attributes of this contact.\").nullable().optional(),\n}).describe(\"Response model for newly created contact.\");\n\nexport const superchatCreateContact = action(\"SUPERCHAT_CREATE_CONTACT\", {\n slug: \"superchat-create-contact\",\n name: \"Create Contact\",\n description: \"Create a new contact in Superchat with phone or email handles. Use this tool to register contact details before sending messages. You must provide at least one handle (phone or email). Optional fields include first name, last name, gender, and custom attributes (if predefined in your account settings).\",\n input: SuperchatCreateContactInput,\n output: SuperchatCreateContactOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4CA,IAAAA,EAAE,OAAO;CAChE,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAQ;CAAS,CAAC,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;CAC1F,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC1B,MAAMA,IAAAA,EAAE,KAAK,CAAC,SAAS,MAAM,CAAC,CAAC,CAAC,SAAS,8KAA8K;EACvN,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mHAAmH;CAChJ,CAAC,CAAC,CAAC,SAAS,sMAAsM,CAAC,CAAC,CAAC,SAAS,kNAAkN;CAC9a,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CACrE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;CACvE,mBAAmBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACpC,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2FAA2F;EACtH,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;CAChE,CAAC,CAAC,CAAC,SAAS,6MAA6M,CAAC,CAAC,CAAC,SAAS,iNAAiN,CAAC,CAAC,SAAS;AACjc,CAAC,CAAC,CAAC,SAAS,2CAA2C;AACvD,MAAM,qDAAmEA,IAAAA,EAAE,OAAO;CAChF,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0HAA0H;CACpJ,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E;AAC3G,CAAC,CAAC,CAAC,SAAS,oJAAoJ;AAChK,MAAM,uDAAqEA,IAAAA,EAAE,OAAO;CAClF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CACzD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;AACtD,CAAC,CAAC,CAAC,SAAS,yCAAyC;AACrD,MAAa,+BAA6CA,IAAAA,EAAE,OAAO;CACjE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D;CACrF,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CACvD,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAQ;CAAS,CAAC,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrG,SAASA,IAAAA,EAAE,MAAM,kDAAkD,CAAC,CAAC,SAAS,uDAAuD;CACrI,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;CAC5E,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;CACjF,mBAAmBA,IAAAA,EAAE,MAAM,oDAAoD,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACtJ,CAAC,CAAC,CAAC,SAAS,2CAA2C;AAEvD,MAAa,yBAAyBC,eAAAA,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-contact.d.ts
|
|
4
|
+
declare const SuperchatCreateContactInput: z.ZodTypeAny;
|
|
5
|
+
declare const SuperchatCreateContactOutput: z.ZodTypeAny;
|
|
6
|
+
declare const superchatCreateContact: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { superchatCreateContact };
|
|
9
|
+
//# sourceMappingURL=create-contact.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-contact.d.cts","names":[],"sources":["../../src/actions/create-contact.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAYY;AAAA,cAU3C,4BAAA,EAA8B,CAAA,CAAE,UAUW;AAAA,cAE3C,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-contact.d.ts
|
|
4
|
+
declare const SuperchatCreateContactInput: z.ZodTypeAny;
|
|
5
|
+
declare const SuperchatCreateContactOutput: z.ZodTypeAny;
|
|
6
|
+
declare const superchatCreateContact: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { superchatCreateContact };
|
|
9
|
+
//# sourceMappingURL=create-contact.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-contact.d.mts","names":[],"sources":["../../src/actions/create-contact.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAYY;AAAA,cAU3C,4BAAA,EAA8B,CAAA,CAAE,UAUW;AAAA,cAE3C,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/create-contact.ts
|
|
4
|
+
const SuperchatCreateContactInput = z.object({
|
|
5
|
+
gender: z.enum([
|
|
6
|
+
"female",
|
|
7
|
+
"male",
|
|
8
|
+
"diverse"
|
|
9
|
+
]).describe("Gender of the contact.").optional(),
|
|
10
|
+
handles: z.array(z.object({
|
|
11
|
+
type: z.enum(["phone", "mail"]).describe("Contact handle type. API users can only set 'phone' or 'mail'. Use 'phone' for phone numbers (E.164 format recommended, e.g., '+14155552671') or 'mail' for email addresses."),
|
|
12
|
+
value: z.string().describe("The identifier for this handle: a phone number (E.164 format recommended, e.g., '+14155552671') or email address.")
|
|
13
|
+
}).describe("A single contact handle such as phone or email.\nNote: API users can only create 'phone' or 'mail' handles. Other types (instagram, telegram, etc.)\nare system-assigned by the respective platform.")).describe("List of one or more contact handles (phone or email). At least one handle is required. Example: [{\"type\": \"phone\", \"value\": \"+14155552671\"}] or [{\"type\": \"mail\", \"value\": \"user@example.com\"}]."),
|
|
14
|
+
last_name: z.string().describe("Last name of the contact.").optional(),
|
|
15
|
+
first_name: z.string().describe("First name of the contact.").optional(),
|
|
16
|
+
custom_attributes: z.array(z.object({
|
|
17
|
+
field: z.string().describe("Custom attribute field name (must be predefined in Superchat settings), e.g., 'birthday'."),
|
|
18
|
+
value: z.string().describe("Custom attribute value as string.")
|
|
19
|
+
}).describe("Custom attribute as field/value pair.\nNOTE: Custom attribute fields must be predefined in your Superchat account settings before use.\nUsing undefined custom attribute fields will result in a 400 error.")).describe("Optional list of custom attributes. NOTE: Custom attribute fields must be predefined in your Superchat account settings before they can be used via the API. Using undefined fields will result in a 400 error.").optional()
|
|
20
|
+
}).describe("Request model for creating a new contact.");
|
|
21
|
+
const SuperchatCreateContact_ContactHandleResponseSchema = z.object({
|
|
22
|
+
id: z.string().describe("Unique identifier of the contact handle."),
|
|
23
|
+
type: z.string().describe("Contact handle type (e.g., 'phone', 'mail', 'instagram', 'telegram', 'google_business_messaging', 'facebook_messenger')."),
|
|
24
|
+
value: z.string().describe("Contact handle value (phone number, email, or platform-specific identifier).")
|
|
25
|
+
}).describe("Contact handle returned in responses. Includes both user-created handles (phone, mail)\nand platform-assigned handles (instagram, telegram, etc.).");
|
|
26
|
+
const SuperchatCreateContact_CustomAttributeResponseSchema = z.object({
|
|
27
|
+
field: z.string().describe("Custom attribute field name."),
|
|
28
|
+
value: z.string().describe("Custom attribute value.")
|
|
29
|
+
}).describe("Custom attribute returned in responses.");
|
|
30
|
+
const superchatCreateContact = action("SUPERCHAT_CREATE_CONTACT", {
|
|
31
|
+
slug: "superchat-create-contact",
|
|
32
|
+
name: "Create Contact",
|
|
33
|
+
description: "Create a new contact in Superchat with phone or email handles. Use this tool to register contact details before sending messages. You must provide at least one handle (phone or email). Optional fields include first name, last name, gender, and custom attributes (if predefined in your account settings).",
|
|
34
|
+
input: SuperchatCreateContactInput,
|
|
35
|
+
output: z.object({
|
|
36
|
+
id: z.string().describe("Unique identifier of the contact, always starts with 'co_'."),
|
|
37
|
+
url: z.string().describe("Resource URL of the contact."),
|
|
38
|
+
gender: z.enum([
|
|
39
|
+
"female",
|
|
40
|
+
"male",
|
|
41
|
+
"diverse"
|
|
42
|
+
]).describe("Gender of the contact.").nullable().optional(),
|
|
43
|
+
handles: z.array(SuperchatCreateContact_ContactHandleResponseSchema).describe("List of contact handles associated with this contact."),
|
|
44
|
+
last_name: z.string().describe("Last name of the contact.").nullable().optional(),
|
|
45
|
+
created_at: z.string().describe("UTC datetime when the contact was created."),
|
|
46
|
+
first_name: z.string().describe("First name of the contact.").nullable().optional(),
|
|
47
|
+
updated_at: z.string().describe("UTC datetime when the contact was last updated."),
|
|
48
|
+
custom_attributes: z.array(SuperchatCreateContact_CustomAttributeResponseSchema).describe("Custom attributes of this contact.").nullable().optional()
|
|
49
|
+
}).describe("Response model for newly created contact.")
|
|
50
|
+
});
|
|
51
|
+
//#endregion
|
|
52
|
+
export { superchatCreateContact };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=create-contact.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-contact.mjs","names":[],"sources":["../../src/actions/create-contact.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SuperchatCreateContactInput: z.ZodTypeAny = z.object({\n gender: z.enum([\"female\", \"male\", \"diverse\"]).describe(\"Gender of the contact.\").optional(),\n handles: z.array(z.object({\n type: z.enum([\"phone\", \"mail\"]).describe(\"Contact handle type. API users can only set 'phone' or 'mail'. Use 'phone' for phone numbers (E.164 format recommended, e.g., '+14155552671') or 'mail' for email addresses.\"),\n value: z.string().describe(\"The identifier for this handle: a phone number (E.164 format recommended, e.g., '+14155552671') or email address.\"),\n}).describe(\"A single contact handle such as phone or email.\\nNote: API users can only create 'phone' or 'mail' handles. Other types (instagram, telegram, etc.)\\nare system-assigned by the respective platform.\")).describe(\"List of one or more contact handles (phone or email). At least one handle is required. Example: [{\\\"type\\\": \\\"phone\\\", \\\"value\\\": \\\"+14155552671\\\"}] or [{\\\"type\\\": \\\"mail\\\", \\\"value\\\": \\\"user@example.com\\\"}].\"),\n last_name: z.string().describe(\"Last name of the contact.\").optional(),\n first_name: z.string().describe(\"First name of the contact.\").optional(),\n custom_attributes: z.array(z.object({\n field: z.string().describe(\"Custom attribute field name (must be predefined in Superchat settings), e.g., 'birthday'.\"),\n value: z.string().describe(\"Custom attribute value as string.\"),\n}).describe(\"Custom attribute as field/value pair.\\nNOTE: Custom attribute fields must be predefined in your Superchat account settings before use.\\nUsing undefined custom attribute fields will result in a 400 error.\")).describe(\"Optional list of custom attributes. NOTE: Custom attribute fields must be predefined in your Superchat account settings before they can be used via the API. Using undefined fields will result in a 400 error.\").optional(),\n}).describe(\"Request model for creating a new contact.\");\nconst SuperchatCreateContact_ContactHandleResponseSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the contact handle.\"),\n type: z.string().describe(\"Contact handle type (e.g., 'phone', 'mail', 'instagram', 'telegram', 'google_business_messaging', 'facebook_messenger').\"),\n value: z.string().describe(\"Contact handle value (phone number, email, or platform-specific identifier).\"),\n}).describe(\"Contact handle returned in responses. Includes both user-created handles (phone, mail)\\nand platform-assigned handles (instagram, telegram, etc.).\");\nconst SuperchatCreateContact_CustomAttributeResponseSchema: z.ZodTypeAny = z.object({\n field: z.string().describe(\"Custom attribute field name.\"),\n value: z.string().describe(\"Custom attribute value.\"),\n}).describe(\"Custom attribute returned in responses.\");\nexport const SuperchatCreateContactOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the contact, always starts with 'co_'.\"),\n url: z.string().describe(\"Resource URL of the contact.\"),\n gender: z.enum([\"female\", \"male\", \"diverse\"]).describe(\"Gender of the contact.\").nullable().optional(),\n handles: z.array(SuperchatCreateContact_ContactHandleResponseSchema).describe(\"List of contact handles associated with this contact.\"),\n last_name: z.string().describe(\"Last name of the contact.\").nullable().optional(),\n created_at: z.string().describe(\"UTC datetime when the contact was created.\"),\n first_name: z.string().describe(\"First name of the contact.\").nullable().optional(),\n updated_at: z.string().describe(\"UTC datetime when the contact was last updated.\"),\n custom_attributes: z.array(SuperchatCreateContact_CustomAttributeResponseSchema).describe(\"Custom attributes of this contact.\").nullable().optional(),\n}).describe(\"Response model for newly created contact.\");\n\nexport const superchatCreateContact = action(\"SUPERCHAT_CREATE_CONTACT\", {\n slug: \"superchat-create-contact\",\n name: \"Create Contact\",\n description: \"Create a new contact in Superchat with phone or email handles. Use this tool to register contact details before sending messages. You must provide at least one handle (phone or email). Optional fields include first name, last name, gender, and custom attributes (if predefined in your account settings).\",\n input: SuperchatCreateContactInput,\n output: SuperchatCreateContactOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4C,EAAE,OAAO;CAChE,QAAQ,EAAE,KAAK;EAAC;EAAU;EAAQ;CAAS,CAAC,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;CAC1F,SAAS,EAAE,MAAM,EAAE,OAAO;EAC1B,MAAM,EAAE,KAAK,CAAC,SAAS,MAAM,CAAC,CAAC,CAAC,SAAS,8KAA8K;EACvN,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mHAAmH;CAChJ,CAAC,CAAC,CAAC,SAAS,sMAAsM,CAAC,CAAC,CAAC,SAAS,kNAAkN;CAC9a,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;CACrE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS;CACvE,mBAAmB,EAAE,MAAM,EAAE,OAAO;EACpC,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,2FAA2F;EACtH,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC;CAChE,CAAC,CAAC,CAAC,SAAS,6MAA6M,CAAC,CAAC,CAAC,SAAS,iNAAiN,CAAC,CAAC,SAAS;AACjc,CAAC,CAAC,CAAC,SAAS,2CAA2C;AACvD,MAAM,qDAAmE,EAAE,OAAO;CAChF,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,0HAA0H;CACpJ,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E;AAC3G,CAAC,CAAC,CAAC,SAAS,oJAAoJ;AAChK,MAAM,uDAAqE,EAAE,OAAO;CAClF,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CACzD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;AACtD,CAAC,CAAC,CAAC,SAAS,yCAAyC;AAarD,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAjBwD,EAAE,OAAO;EACjE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D;EACrF,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;EACvD,QAAQ,EAAE,KAAK;GAAC;GAAU;GAAQ;EAAS,CAAC,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACrG,SAAS,EAAE,MAAM,kDAAkD,CAAC,CAAC,SAAS,uDAAuD;EACrI,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;EAC5E,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAClF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;EACjF,mBAAmB,EAAE,MAAM,oDAAoD,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtJ,CAAC,CAAC,CAAC,SAAS,2CAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/create-template-folder.ts
|
|
4
|
+
const SuperchatCreateTemplateFolderInput = zod.z.object({ name: zod.z.string().describe("Name of the new template folder. Must be unique within the workspace.") }).describe("Request model for creating a new template folder in SuperChat.");
|
|
5
|
+
const SuperchatCreateTemplateFolderOutput = zod.z.object({
|
|
6
|
+
id: zod.z.string().describe("Unique identifier of the created template folder."),
|
|
7
|
+
name: zod.z.string().describe("Name of the created template folder."),
|
|
8
|
+
parent_id: zod.z.string().describe("ID of the parent folder if this is a nested folder, null for top-level folders.").nullable().optional()
|
|
9
|
+
}).passthrough().describe("Response model for the newly created template folder in SuperChat.");
|
|
10
|
+
const superchatCreateTemplateFolder = require_action.action("SUPERCHAT_CREATE_TEMPLATE_FOLDER", {
|
|
11
|
+
slug: "superchat-create-template-folder",
|
|
12
|
+
name: "Create Template Folder",
|
|
13
|
+
description: "Create a new template folder in SuperChat for organizing message templates. Template folders help organize WhatsApp and other messaging templates into logical groups (e.g., Marketing, Sales, Customer Support). Use this action before creating templates when you want to keep them organized.",
|
|
14
|
+
input: SuperchatCreateTemplateFolderInput,
|
|
15
|
+
output: SuperchatCreateTemplateFolderOutput
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.superchatCreateTemplateFolder = superchatCreateTemplateFolder;
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=create-template-folder.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-template-folder.cjs","names":["z","action"],"sources":["../../src/actions/create-template-folder.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SuperchatCreateTemplateFolderInput: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Name of the new template folder. Must be unique within the workspace.\"),\n}).describe(\"Request model for creating a new template folder in SuperChat.\");\nexport const SuperchatCreateTemplateFolderOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the created template folder.\"),\n name: z.string().describe(\"Name of the created template folder.\"),\n parent_id: z.string().describe(\"ID of the parent folder if this is a nested folder, null for top-level folders.\").nullable().optional(),\n}).passthrough().describe(\"Response model for the newly created template folder in SuperChat.\");\n\nexport const superchatCreateTemplateFolder = action(\"SUPERCHAT_CREATE_TEMPLATE_FOLDER\", {\n slug: \"superchat-create-template-folder\",\n name: \"Create Template Folder\",\n description: \"Create a new template folder in SuperChat for organizing message templates. Template folders help organize WhatsApp and other messaging templates into logical groups (e.g., Marketing, Sales, Customer Support). Use this action before creating templates when you want to keep them organized.\",\n input: SuperchatCreateTemplateFolderInput,\n output: SuperchatCreateTemplateFolderOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmDA,IAAAA,EAAE,OAAO,EACvE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,EACnG,CAAC,CAAC,CAAC,SAAS,gEAAgE;AAC5E,MAAa,sCAAoDA,IAAAA,EAAE,OAAO;CACxE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD;CAC3E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CAChE,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACxI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oEAAoE;AAE9F,MAAa,gCAAgCC,eAAAA,OAAO,oCAAoC;CACtF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-template-folder.d.ts
|
|
4
|
+
declare const SuperchatCreateTemplateFolderInput: z.ZodTypeAny;
|
|
5
|
+
declare const SuperchatCreateTemplateFolderOutput: z.ZodTypeAny;
|
|
6
|
+
declare const superchatCreateTemplateFolder: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { superchatCreateTemplateFolder };
|
|
9
|
+
//# sourceMappingURL=create-template-folder.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-template-folder.d.cts","names":[],"sources":["../../src/actions/create-template-folder.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAE0B;AAAA,cAChE,mCAAA,EAAqC,CAAA,CAAE,UAI2C;AAAA,cAElF,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/create-template-folder.d.ts
|
|
4
|
+
declare const SuperchatCreateTemplateFolderInput: z.ZodTypeAny;
|
|
5
|
+
declare const SuperchatCreateTemplateFolderOutput: z.ZodTypeAny;
|
|
6
|
+
declare const superchatCreateTemplateFolder: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { superchatCreateTemplateFolder };
|
|
9
|
+
//# sourceMappingURL=create-template-folder.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-template-folder.d.mts","names":[],"sources":["../../src/actions/create-template-folder.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAE0B;AAAA,cAChE,mCAAA,EAAqC,CAAA,CAAE,UAI2C;AAAA,cAElF,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const superchatCreateTemplateFolder = action("SUPERCHAT_CREATE_TEMPLATE_FOLDER", {
|
|
4
|
+
slug: "superchat-create-template-folder",
|
|
5
|
+
name: "Create Template Folder",
|
|
6
|
+
description: "Create a new template folder in SuperChat for organizing message templates. Template folders help organize WhatsApp and other messaging templates into logical groups (e.g., Marketing, Sales, Customer Support). Use this action before creating templates when you want to keep them organized.",
|
|
7
|
+
input: z.object({ name: z.string().describe("Name of the new template folder. Must be unique within the workspace.") }).describe("Request model for creating a new template folder in SuperChat."),
|
|
8
|
+
output: z.object({
|
|
9
|
+
id: z.string().describe("Unique identifier of the created template folder."),
|
|
10
|
+
name: z.string().describe("Name of the created template folder."),
|
|
11
|
+
parent_id: z.string().describe("ID of the parent folder if this is a nested folder, null for top-level folders.").nullable().optional()
|
|
12
|
+
}).passthrough().describe("Response model for the newly created template folder in SuperChat.")
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { superchatCreateTemplateFolder };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=create-template-folder.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-template-folder.mjs","names":[],"sources":["../../src/actions/create-template-folder.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SuperchatCreateTemplateFolderInput: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Name of the new template folder. Must be unique within the workspace.\"),\n}).describe(\"Request model for creating a new template folder in SuperChat.\");\nexport const SuperchatCreateTemplateFolderOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the created template folder.\"),\n name: z.string().describe(\"Name of the created template folder.\"),\n parent_id: z.string().describe(\"ID of the parent folder if this is a nested folder, null for top-level folders.\").nullable().optional(),\n}).passthrough().describe(\"Response model for the newly created template folder in SuperChat.\");\n\nexport const superchatCreateTemplateFolder = action(\"SUPERCHAT_CREATE_TEMPLATE_FOLDER\", {\n slug: \"superchat-create-template-folder\",\n name: \"Create Template Folder\",\n description: \"Create a new template folder in SuperChat for organizing message templates. Template folders help organize WhatsApp and other messaging templates into logical groups (e.g., Marketing, Sales, Customer Support). Use this action before creating templates when you want to keep them organized.\",\n input: SuperchatCreateTemplateFolderInput,\n output: SuperchatCreateTemplateFolderOutput,\n});\n"],"mappings":";;AAaA,MAAa,gCAAgC,OAAO,oCAAoC;CACtF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAb8D,EAAE,OAAO,EACvE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uEAAuE,EACnG,CAAC,CAAC,CAAC,SAAS,gEAWH;CACP,QAX+D,EAAE,OAAO;EACxE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD;EAC3E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;EAChE,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,oEAOhB;AACV,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/delete-webhook.ts
|
|
4
|
+
const SuperchatDeleteWebhookInput = zod.z.object({ webhook_id: zod.z.string().describe("Unique identifier of the webhook to delete, prefixed with 'wh_'. Use SUPERCHAT_LIST_WEBHOOKS to retrieve available webhook IDs.") }).describe("Request model for deleting a specific webhook by its ID.");
|
|
5
|
+
const SuperchatDeleteWebhookOutput = zod.z.object({ id: zod.z.string().describe("The unique identifier of the deleted webhook, prefixed with 'wh_'.") }).describe("Response returned when a webhook is successfully deleted, containing the ID of the deleted webhook.");
|
|
6
|
+
const superchatDeleteWebhook = require_action.action("SUPERCHAT_DELETE_WEBHOOK", {
|
|
7
|
+
slug: "superchat-delete-webhook",
|
|
8
|
+
name: "Delete Webhook",
|
|
9
|
+
description: "Tool to delete a specific webhook by its ID. Use when you need to remove an obsolete or unwanted webhook subscription. First use SUPERCHAT_LIST_WEBHOOKS to retrieve the webhook ID, then use this action to delete it. Example: Delete webhook wh_UPYSN0Etofjl7lhhQ9yhL.",
|
|
10
|
+
input: SuperchatDeleteWebhookInput,
|
|
11
|
+
output: SuperchatDeleteWebhookOutput
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.superchatDeleteWebhook = superchatDeleteWebhook;
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=delete-webhook.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-webhook.cjs","names":["z","action"],"sources":["../../src/actions/delete-webhook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SuperchatDeleteWebhookInput: z.ZodTypeAny = z.object({\n webhook_id: z.string().describe(\"Unique identifier of the webhook to delete, prefixed with 'wh_'. Use SUPERCHAT_LIST_WEBHOOKS to retrieve available webhook IDs.\"),\n}).describe(\"Request model for deleting a specific webhook by its ID.\");\nexport const SuperchatDeleteWebhookOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier of the deleted webhook, prefixed with 'wh_'.\"),\n}).describe(\"Response returned when a webhook is successfully deleted, containing the ID of the deleted webhook.\");\n\nexport const superchatDeleteWebhook = action(\"SUPERCHAT_DELETE_WEBHOOK\", {\n slug: \"superchat-delete-webhook\",\n name: \"Delete Webhook\",\n description: \"Tool to delete a specific webhook by its ID. Use when you need to remove an obsolete or unwanted webhook subscription. First use SUPERCHAT_LIST_WEBHOOKS to retrieve the webhook ID, then use this action to delete it. Example: Delete webhook wh_UPYSN0Etofjl7lhhQ9yhL.\",\n input: SuperchatDeleteWebhookInput,\n output: SuperchatDeleteWebhookOutput,\n});\n"],"mappings":";;;AAIA,MAAa,8BAA4CA,IAAAA,EAAE,OAAO,EAChE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iIAAiI,EACnK,CAAC,CAAC,CAAC,SAAS,0DAA0D;AACtE,MAAa,+BAA6CA,IAAAA,EAAE,OAAO,EACjE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,EAC9F,CAAC,CAAC,CAAC,SAAS,qGAAqG;AAEjH,MAAa,yBAAyBC,eAAAA,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/delete-webhook.d.ts
|
|
4
|
+
declare const SuperchatDeleteWebhookInput: z.ZodTypeAny;
|
|
5
|
+
declare const SuperchatDeleteWebhookOutput: z.ZodTypeAny;
|
|
6
|
+
declare const superchatDeleteWebhook: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { superchatDeleteWebhook };
|
|
9
|
+
//# sourceMappingURL=delete-webhook.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-webhook.d.cts","names":[],"sources":["../../src/actions/delete-webhook.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAE2B;AAAA,cAC1D,4BAAA,EAA8B,CAAA,CAAE,UAEqE;AAAA,cAErG,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/delete-webhook.d.ts
|
|
4
|
+
declare const SuperchatDeleteWebhookInput: z.ZodTypeAny;
|
|
5
|
+
declare const SuperchatDeleteWebhookOutput: z.ZodTypeAny;
|
|
6
|
+
declare const superchatDeleteWebhook: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { superchatDeleteWebhook };
|
|
9
|
+
//# sourceMappingURL=delete-webhook.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-webhook.d.mts","names":[],"sources":["../../src/actions/delete-webhook.ts"],"mappings":";;;cAIa,2BAAA,EAA6B,CAAA,CAAE,UAE2B;AAAA,cAC1D,4BAAA,EAA8B,CAAA,CAAE,UAEqE;AAAA,cAErG,sBAAA,gCAAsB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const superchatDeleteWebhook = action("SUPERCHAT_DELETE_WEBHOOK", {
|
|
4
|
+
slug: "superchat-delete-webhook",
|
|
5
|
+
name: "Delete Webhook",
|
|
6
|
+
description: "Tool to delete a specific webhook by its ID. Use when you need to remove an obsolete or unwanted webhook subscription. First use SUPERCHAT_LIST_WEBHOOKS to retrieve the webhook ID, then use this action to delete it. Example: Delete webhook wh_UPYSN0Etofjl7lhhQ9yhL.",
|
|
7
|
+
input: z.object({ webhook_id: z.string().describe("Unique identifier of the webhook to delete, prefixed with 'wh_'. Use SUPERCHAT_LIST_WEBHOOKS to retrieve available webhook IDs.") }).describe("Request model for deleting a specific webhook by its ID."),
|
|
8
|
+
output: z.object({ id: z.string().describe("The unique identifier of the deleted webhook, prefixed with 'wh_'.") }).describe("Response returned when a webhook is successfully deleted, containing the ID of the deleted webhook.")
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { superchatDeleteWebhook };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=delete-webhook.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-webhook.mjs","names":[],"sources":["../../src/actions/delete-webhook.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SuperchatDeleteWebhookInput: z.ZodTypeAny = z.object({\n webhook_id: z.string().describe(\"Unique identifier of the webhook to delete, prefixed with 'wh_'. Use SUPERCHAT_LIST_WEBHOOKS to retrieve available webhook IDs.\"),\n}).describe(\"Request model for deleting a specific webhook by its ID.\");\nexport const SuperchatDeleteWebhookOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"The unique identifier of the deleted webhook, prefixed with 'wh_'.\"),\n}).describe(\"Response returned when a webhook is successfully deleted, containing the ID of the deleted webhook.\");\n\nexport const superchatDeleteWebhook = action(\"SUPERCHAT_DELETE_WEBHOOK\", {\n slug: \"superchat-delete-webhook\",\n name: \"Delete Webhook\",\n description: \"Tool to delete a specific webhook by its ID. Use when you need to remove an obsolete or unwanted webhook subscription. First use SUPERCHAT_LIST_WEBHOOKS to retrieve the webhook ID, then use this action to delete it. Example: Delete webhook wh_UPYSN0Etofjl7lhhQ9yhL.\",\n input: SuperchatDeleteWebhookInput,\n output: SuperchatDeleteWebhookOutput,\n});\n"],"mappings":";;AAWA,MAAa,yBAAyB,OAAO,4BAA4B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAXuD,EAAE,OAAO,EAChE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,iIAAiI,EACnK,CAAC,CAAC,CAAC,SAAS,0DASH;CACP,QATwD,EAAE,OAAO,EACjE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,EAC9F,CAAC,CAAC,CAAC,SAAS,qGAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/get-contact.ts
|
|
4
|
+
const SuperchatGetContactInput = zod.z.object({ contact_id: zod.z.string().describe("The unique identifier of the contact. Superchat contact IDs always start with 'ct_' (e.g., 'ct_T0WuvJS5pcg6TsTM1f03S'). You can obtain this ID from the List Contacts or Create Contact actions.") }).describe("Request model for GetContact action.");
|
|
5
|
+
const SuperchatGetContact_ContactHandleResponseSchema = zod.z.object({
|
|
6
|
+
id: zod.z.string().describe("Unique identifier of the contact handle."),
|
|
7
|
+
type: zod.z.string().describe("Contact handle type (e.g., 'phone', 'mail', 'instagram', 'telegram', 'google_business_messaging', 'facebook_messenger')."),
|
|
8
|
+
value: zod.z.string().describe("Contact handle value (phone number, email, or platform-specific identifier).")
|
|
9
|
+
}).describe("Contact handle returned in responses. Includes both user-created handles (phone, mail)\nand platform-assigned handles (instagram, telegram, etc.).");
|
|
10
|
+
const SuperchatGetContact_CustomAttributeResponseSchema = zod.z.object({
|
|
11
|
+
field: zod.z.string().describe("Custom attribute field name."),
|
|
12
|
+
value: zod.z.string().describe("Custom attribute value.")
|
|
13
|
+
}).describe("Custom attribute returned in responses.");
|
|
14
|
+
const SuperchatGetContactOutput = zod.z.object({
|
|
15
|
+
id: zod.z.string().describe("Unique identifier of the contact, always starts with 'co_'."),
|
|
16
|
+
url: zod.z.string().describe("Resource URL of the contact."),
|
|
17
|
+
gender: zod.z.enum([
|
|
18
|
+
"female",
|
|
19
|
+
"male",
|
|
20
|
+
"diverse"
|
|
21
|
+
]).describe("Gender of the contact.").nullable().optional(),
|
|
22
|
+
handles: zod.z.array(SuperchatGetContact_ContactHandleResponseSchema).describe("List of contact handles associated with this contact."),
|
|
23
|
+
last_name: zod.z.string().describe("Last name of the contact.").nullable().optional(),
|
|
24
|
+
created_at: zod.z.string().describe("UTC datetime when the contact was created."),
|
|
25
|
+
first_name: zod.z.string().describe("First name of the contact.").nullable().optional(),
|
|
26
|
+
updated_at: zod.z.string().describe("UTC datetime when the contact was last updated."),
|
|
27
|
+
custom_attributes: zod.z.array(SuperchatGetContact_CustomAttributeResponseSchema).describe("Custom attributes of this contact.").nullable().optional()
|
|
28
|
+
}).describe("Response model for newly created contact.");
|
|
29
|
+
const superchatGetContact = require_action.action("SUPERCHAT_GET_CONTACT", {
|
|
30
|
+
slug: "superchat-get-contact",
|
|
31
|
+
name: "Get Contact",
|
|
32
|
+
description: "Retrieve a specific contact's details by ID. Returns the contact's name, handles (phone, email, social), custom attributes, and timestamps. Use this to look up contact information before sending messages or updating contact details. Example: \"Get contact details for co_abc123\" or \"Fetch info for contact co_xyz789\".",
|
|
33
|
+
input: SuperchatGetContactInput,
|
|
34
|
+
output: SuperchatGetContactOutput
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
exports.superchatGetContact = superchatGetContact;
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=get-contact.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-contact.cjs","names":["z","action"],"sources":["../../src/actions/get-contact.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SuperchatGetContactInput: z.ZodTypeAny = z.object({\n contact_id: z.string().describe(\"The unique identifier of the contact. Superchat contact IDs always start with 'ct_' (e.g., 'ct_T0WuvJS5pcg6TsTM1f03S'). You can obtain this ID from the List Contacts or Create Contact actions.\"),\n}).describe(\"Request model for GetContact action.\");\nconst SuperchatGetContact_ContactHandleResponseSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the contact handle.\"),\n type: z.string().describe(\"Contact handle type (e.g., 'phone', 'mail', 'instagram', 'telegram', 'google_business_messaging', 'facebook_messenger').\"),\n value: z.string().describe(\"Contact handle value (phone number, email, or platform-specific identifier).\"),\n}).describe(\"Contact handle returned in responses. Includes both user-created handles (phone, mail)\\nand platform-assigned handles (instagram, telegram, etc.).\");\nconst SuperchatGetContact_CustomAttributeResponseSchema: z.ZodTypeAny = z.object({\n field: z.string().describe(\"Custom attribute field name.\"),\n value: z.string().describe(\"Custom attribute value.\"),\n}).describe(\"Custom attribute returned in responses.\");\nexport const SuperchatGetContactOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the contact, always starts with 'co_'.\"),\n url: z.string().describe(\"Resource URL of the contact.\"),\n gender: z.enum([\"female\", \"male\", \"diverse\"]).describe(\"Gender of the contact.\").nullable().optional(),\n handles: z.array(SuperchatGetContact_ContactHandleResponseSchema).describe(\"List of contact handles associated with this contact.\"),\n last_name: z.string().describe(\"Last name of the contact.\").nullable().optional(),\n created_at: z.string().describe(\"UTC datetime when the contact was created.\"),\n first_name: z.string().describe(\"First name of the contact.\").nullable().optional(),\n updated_at: z.string().describe(\"UTC datetime when the contact was last updated.\"),\n custom_attributes: z.array(SuperchatGetContact_CustomAttributeResponseSchema).describe(\"Custom attributes of this contact.\").nullable().optional(),\n}).describe(\"Response model for newly created contact.\");\n\nexport const superchatGetContact = action(\"SUPERCHAT_GET_CONTACT\", {\n slug: \"superchat-get-contact\",\n name: \"Get Contact\",\n description: \"Retrieve a specific contact's details by ID. Returns the contact's name, handles (phone, email, social), custom attributes, and timestamps. Use this to look up contact information before sending messages or updating contact details. Example: \\\"Get contact details for co_abc123\\\" or \\\"Fetch info for contact co_xyz789\\\".\",\n input: SuperchatGetContactInput,\n output: SuperchatGetContactOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyCA,IAAAA,EAAE,OAAO,EAC7D,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kMAAkM,EACpO,CAAC,CAAC,CAAC,SAAS,sCAAsC;AAClD,MAAM,kDAAgEA,IAAAA,EAAE,OAAO;CAC7E,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0HAA0H;CACpJ,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E;AAC3G,CAAC,CAAC,CAAC,SAAS,oJAAoJ;AAChK,MAAM,oDAAkEA,IAAAA,EAAE,OAAO;CAC/E,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CACzD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;AACtD,CAAC,CAAC,CAAC,SAAS,yCAAyC;AACrD,MAAa,4BAA0CA,IAAAA,EAAE,OAAO;CAC9D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D;CACrF,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CACvD,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAU;EAAQ;CAAS,CAAC,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrG,SAASA,IAAAA,EAAE,MAAM,+CAA+C,CAAC,CAAC,SAAS,uDAAuD;CAClI,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;CAC5E,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;CACjF,mBAAmBA,IAAAA,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACnJ,CAAC,CAAC,CAAC,SAAS,2CAA2C;AAEvD,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/get-contact.d.ts
|
|
4
|
+
declare const SuperchatGetContactInput: z.ZodTypeAny;
|
|
5
|
+
declare const SuperchatGetContactOutput: z.ZodTypeAny;
|
|
6
|
+
declare const superchatGetContact: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { superchatGetContact };
|
|
9
|
+
//# sourceMappingURL=get-contact.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-contact.d.cts","names":[],"sources":["../../src/actions/get-contact.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAEU;AAAA,cAUtC,yBAAA,EAA2B,CAAA,CAAE,UAUc;AAAA,cAE3C,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/get-contact.d.ts
|
|
4
|
+
declare const SuperchatGetContactInput: z.ZodTypeAny;
|
|
5
|
+
declare const SuperchatGetContactOutput: z.ZodTypeAny;
|
|
6
|
+
declare const superchatGetContact: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { superchatGetContact };
|
|
9
|
+
//# sourceMappingURL=get-contact.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-contact.d.mts","names":[],"sources":["../../src/actions/get-contact.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAEU;AAAA,cAUtC,yBAAA,EAA2B,CAAA,CAAE,UAUc;AAAA,cAE3C,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/get-contact.ts
|
|
4
|
+
const SuperchatGetContactInput = z.object({ contact_id: z.string().describe("The unique identifier of the contact. Superchat contact IDs always start with 'ct_' (e.g., 'ct_T0WuvJS5pcg6TsTM1f03S'). You can obtain this ID from the List Contacts or Create Contact actions.") }).describe("Request model for GetContact action.");
|
|
5
|
+
const SuperchatGetContact_ContactHandleResponseSchema = z.object({
|
|
6
|
+
id: z.string().describe("Unique identifier of the contact handle."),
|
|
7
|
+
type: z.string().describe("Contact handle type (e.g., 'phone', 'mail', 'instagram', 'telegram', 'google_business_messaging', 'facebook_messenger')."),
|
|
8
|
+
value: z.string().describe("Contact handle value (phone number, email, or platform-specific identifier).")
|
|
9
|
+
}).describe("Contact handle returned in responses. Includes both user-created handles (phone, mail)\nand platform-assigned handles (instagram, telegram, etc.).");
|
|
10
|
+
const SuperchatGetContact_CustomAttributeResponseSchema = z.object({
|
|
11
|
+
field: z.string().describe("Custom attribute field name."),
|
|
12
|
+
value: z.string().describe("Custom attribute value.")
|
|
13
|
+
}).describe("Custom attribute returned in responses.");
|
|
14
|
+
const superchatGetContact = action("SUPERCHAT_GET_CONTACT", {
|
|
15
|
+
slug: "superchat-get-contact",
|
|
16
|
+
name: "Get Contact",
|
|
17
|
+
description: "Retrieve a specific contact's details by ID. Returns the contact's name, handles (phone, email, social), custom attributes, and timestamps. Use this to look up contact information before sending messages or updating contact details. Example: \"Get contact details for co_abc123\" or \"Fetch info for contact co_xyz789\".",
|
|
18
|
+
input: SuperchatGetContactInput,
|
|
19
|
+
output: z.object({
|
|
20
|
+
id: z.string().describe("Unique identifier of the contact, always starts with 'co_'."),
|
|
21
|
+
url: z.string().describe("Resource URL of the contact."),
|
|
22
|
+
gender: z.enum([
|
|
23
|
+
"female",
|
|
24
|
+
"male",
|
|
25
|
+
"diverse"
|
|
26
|
+
]).describe("Gender of the contact.").nullable().optional(),
|
|
27
|
+
handles: z.array(SuperchatGetContact_ContactHandleResponseSchema).describe("List of contact handles associated with this contact."),
|
|
28
|
+
last_name: z.string().describe("Last name of the contact.").nullable().optional(),
|
|
29
|
+
created_at: z.string().describe("UTC datetime when the contact was created."),
|
|
30
|
+
first_name: z.string().describe("First name of the contact.").nullable().optional(),
|
|
31
|
+
updated_at: z.string().describe("UTC datetime when the contact was last updated."),
|
|
32
|
+
custom_attributes: z.array(SuperchatGetContact_CustomAttributeResponseSchema).describe("Custom attributes of this contact.").nullable().optional()
|
|
33
|
+
}).describe("Response model for newly created contact.")
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { superchatGetContact };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=get-contact.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-contact.mjs","names":[],"sources":["../../src/actions/get-contact.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SuperchatGetContactInput: z.ZodTypeAny = z.object({\n contact_id: z.string().describe(\"The unique identifier of the contact. Superchat contact IDs always start with 'ct_' (e.g., 'ct_T0WuvJS5pcg6TsTM1f03S'). You can obtain this ID from the List Contacts or Create Contact actions.\"),\n}).describe(\"Request model for GetContact action.\");\nconst SuperchatGetContact_ContactHandleResponseSchema: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the contact handle.\"),\n type: z.string().describe(\"Contact handle type (e.g., 'phone', 'mail', 'instagram', 'telegram', 'google_business_messaging', 'facebook_messenger').\"),\n value: z.string().describe(\"Contact handle value (phone number, email, or platform-specific identifier).\"),\n}).describe(\"Contact handle returned in responses. Includes both user-created handles (phone, mail)\\nand platform-assigned handles (instagram, telegram, etc.).\");\nconst SuperchatGetContact_CustomAttributeResponseSchema: z.ZodTypeAny = z.object({\n field: z.string().describe(\"Custom attribute field name.\"),\n value: z.string().describe(\"Custom attribute value.\"),\n}).describe(\"Custom attribute returned in responses.\");\nexport const SuperchatGetContactOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the contact, always starts with 'co_'.\"),\n url: z.string().describe(\"Resource URL of the contact.\"),\n gender: z.enum([\"female\", \"male\", \"diverse\"]).describe(\"Gender of the contact.\").nullable().optional(),\n handles: z.array(SuperchatGetContact_ContactHandleResponseSchema).describe(\"List of contact handles associated with this contact.\"),\n last_name: z.string().describe(\"Last name of the contact.\").nullable().optional(),\n created_at: z.string().describe(\"UTC datetime when the contact was created.\"),\n first_name: z.string().describe(\"First name of the contact.\").nullable().optional(),\n updated_at: z.string().describe(\"UTC datetime when the contact was last updated.\"),\n custom_attributes: z.array(SuperchatGetContact_CustomAttributeResponseSchema).describe(\"Custom attributes of this contact.\").nullable().optional(),\n}).describe(\"Response model for newly created contact.\");\n\nexport const superchatGetContact = action(\"SUPERCHAT_GET_CONTACT\", {\n slug: \"superchat-get-contact\",\n name: \"Get Contact\",\n description: \"Retrieve a specific contact's details by ID. Returns the contact's name, handles (phone, email, social), custom attributes, and timestamps. Use this to look up contact information before sending messages or updating contact details. Example: \\\"Get contact details for co_abc123\\\" or \\\"Fetch info for contact co_xyz789\\\".\",\n input: SuperchatGetContactInput,\n output: SuperchatGetContactOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyC,EAAE,OAAO,EAC7D,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,kMAAkM,EACpO,CAAC,CAAC,CAAC,SAAS,sCAAsC;AAClD,MAAM,kDAAgE,EAAE,OAAO;CAC7E,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,0HAA0H;CACpJ,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E;AAC3G,CAAC,CAAC,CAAC,SAAS,oJAAoJ;AAChK,MAAM,oDAAkE,EAAE,OAAO;CAC/E,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;CACzD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yBAAyB;AACtD,CAAC,CAAC,CAAC,SAAS,yCAAyC;AAarD,MAAa,sBAAsB,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAjBqD,EAAE,OAAO;EAC9D,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D;EACrF,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;EACvD,QAAQ,EAAE,KAAK;GAAC;GAAU;GAAQ;EAAS,CAAC,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACrG,SAAS,EAAE,MAAM,+CAA+C,CAAC,CAAC,SAAS,uDAAuD;EAClI,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C;EAC5E,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAClF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD;EACjF,mBAAmB,EAAE,MAAM,iDAAiD,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnJ,CAAC,CAAC,CAAC,SAAS,2CAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/get-file.ts
|
|
4
|
+
const SuperchatGetFileInput = zod.z.object({ file_id: zod.z.string().describe("The unique identifier of the file to retrieve (e.g., 'fi_abc123').") }).describe("Request model for GetFile action.");
|
|
5
|
+
const SuperchatGetFile_FileLinkSchema = zod.z.object({
|
|
6
|
+
url: zod.z.string().describe("Temporary download URL for the file."),
|
|
7
|
+
valid_until: zod.z.string().describe("ISO 8601 timestamp until which the download link is valid.")
|
|
8
|
+
}).describe("Download link information for the file.");
|
|
9
|
+
const SuperchatGetFileOutput = zod.z.object({
|
|
10
|
+
id: zod.z.string().describe("Unique identifier of the file (prefixed with 'fi_')."),
|
|
11
|
+
url: zod.z.string().describe("API resource URL path for the file."),
|
|
12
|
+
link: SuperchatGetFile_FileLinkSchema.nullable(),
|
|
13
|
+
name: zod.z.string().describe("Original filename of the uploaded file."),
|
|
14
|
+
mime_type: zod.z.string().describe("MIME type of the file (e.g., 'text/plain', 'application/pdf', 'image/png').")
|
|
15
|
+
}).describe("Response model for GetFile action containing file metadata.");
|
|
16
|
+
const superchatGetFile = require_action.action("SUPERCHAT_GET_FILE", {
|
|
17
|
+
slug: "superchat-get-file",
|
|
18
|
+
name: "Get File",
|
|
19
|
+
description: "Retrieve metadata for a specific file by its ID. Returns file details including the file name, MIME type, API resource URL, and a temporary download link with expiration. Use this to get information about uploaded files before downloading or processing them.",
|
|
20
|
+
input: SuperchatGetFileInput,
|
|
21
|
+
output: SuperchatGetFileOutput
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.superchatGetFile = superchatGetFile;
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=get-file.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-file.cjs","names":["z","action"],"sources":["../../src/actions/get-file.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const SuperchatGetFileInput: z.ZodTypeAny = z.object({\n file_id: z.string().describe(\"The unique identifier of the file to retrieve (e.g., 'fi_abc123').\"),\n}).describe(\"Request model for GetFile action.\");\nconst SuperchatGetFile_FileLinkSchema: z.ZodTypeAny = z.object({\n url: z.string().describe(\"Temporary download URL for the file.\"),\n valid_until: z.string().describe(\"ISO 8601 timestamp until which the download link is valid.\"),\n}).describe(\"Download link information for the file.\");\nexport const SuperchatGetFileOutput: z.ZodTypeAny = z.object({\n id: z.string().describe(\"Unique identifier of the file (prefixed with 'fi_').\"),\n url: z.string().describe(\"API resource URL path for the file.\"),\n link: SuperchatGetFile_FileLinkSchema.nullable(),\n name: z.string().describe(\"Original filename of the uploaded file.\"),\n mime_type: z.string().describe(\"MIME type of the file (e.g., 'text/plain', 'application/pdf', 'image/png').\"),\n}).describe(\"Response model for GetFile action containing file metadata.\");\n\nexport const superchatGetFile = action(\"SUPERCHAT_GET_FILE\", {\n slug: \"superchat-get-file\",\n name: \"Get File\",\n description: \"Retrieve metadata for a specific file by its ID. Returns file details including the file name, MIME type, API resource URL, and a temporary download link with expiration. Use this to get information about uploaded files before downloading or processing them.\",\n input: SuperchatGetFileInput,\n output: SuperchatGetFileOutput,\n});\n"],"mappings":";;;AAIA,MAAa,wBAAsCA,IAAAA,EAAE,OAAO,EAC1D,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,EACnG,CAAC,CAAC,CAAC,SAAS,mCAAmC;AAC/C,MAAM,kCAAgDA,IAAAA,EAAE,OAAO;CAC7D,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CAC/D,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D;AAC/F,CAAC,CAAC,CAAC,SAAS,yCAAyC;AACrD,MAAa,yBAAuCA,IAAAA,EAAE,OAAO;CAC3D,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD;CAC9E,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC;CAC9D,MAAM,gCAAgC,SAAS;CAC/C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACnE,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6EAA6E;AAC9G,CAAC,CAAC,CAAC,SAAS,6DAA6D;AAEzE,MAAa,mBAAmBC,eAAAA,OAAO,sBAAsB;CAC3D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/get-file.d.ts
|
|
4
|
+
declare const SuperchatGetFileInput: z.ZodTypeAny;
|
|
5
|
+
declare const SuperchatGetFileOutput: z.ZodTypeAny;
|
|
6
|
+
declare const superchatGetFile: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { superchatGetFile };
|
|
9
|
+
//# sourceMappingURL=get-file.d.cts.map
|