@keystrokehq/_2chat 0.1.0 → 0.1.2
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/dist/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/create-contact.cjs +8 -8
- package/dist/actions/create-contact.cjs.map +1 -1
- package/dist/actions/create-contact.d.cts +45 -3
- package/dist/actions/create-contact.d.cts.map +1 -1
- package/dist/actions/create-contact.d.mts +45 -3
- package/dist/actions/create-contact.d.mts.map +1 -1
- package/dist/actions/create-contact.mjs +8 -8
- package/dist/actions/create-contact.mjs.map +1 -1
- package/dist/actions/get-api-usage-info.cjs +12 -12
- package/dist/actions/get-api-usage-info.cjs.map +1 -1
- package/dist/actions/get-api-usage-info.d.cts +22 -3
- package/dist/actions/get-api-usage-info.d.cts.map +1 -1
- package/dist/actions/get-api-usage-info.d.mts +22 -3
- package/dist/actions/get-api-usage-info.d.mts.map +1 -1
- package/dist/actions/get-api-usage-info.mjs +12 -12
- package/dist/actions/get-api-usage-info.mjs.map +1 -1
- package/dist/actions/list-contacts.cjs +9 -9
- package/dist/actions/list-contacts.cjs.map +1 -1
- package/dist/actions/list-contacts.d.cts +30 -3
- package/dist/actions/list-contacts.d.cts.map +1 -1
- package/dist/actions/list-contacts.d.mts +30 -3
- package/dist/actions/list-contacts.d.mts.map +1 -1
- package/dist/actions/list-contacts.mjs +9 -9
- package/dist/actions/list-contacts.mjs.map +1 -1
- package/dist/actions/list-webhooks.cjs +7 -7
- package/dist/actions/list-webhooks.cjs.map +1 -1
- package/dist/actions/list-webhooks.d.cts +15 -3
- package/dist/actions/list-webhooks.d.cts.map +1 -1
- package/dist/actions/list-webhooks.d.mts +15 -3
- package/dist/actions/list-webhooks.d.mts.map +1 -1
- package/dist/actions/list-webhooks.mjs +7 -7
- package/dist/actions/list-webhooks.mjs.map +1 -1
- package/dist/actions/test-api-key.cjs +12 -12
- package/dist/actions/test-api-key.cjs.map +1 -1
- package/dist/actions/test-api-key.d.cts +22 -3
- package/dist/actions/test-api-key.d.cts.map +1 -1
- package/dist/actions/test-api-key.d.mts +22 -3
- package/dist/actions/test-api-key.d.mts.map +1 -1
- package/dist/actions/test-api-key.mjs +12 -12
- package/dist/actions/test-api-key.mjs.map +1 -1
- package/dist/catalog.cjs +7 -1
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +8 -0
- package/dist/catalog.d.mts +8 -0
- package/dist/catalog.mjs +7 -1
- package/dist/catalog.mjs.map +1 -1
- package/package.json +2 -2
package/dist/action.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.cjs","names":["_2chat","execute_2chatTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { _2chat } from \"./app\";\nimport { execute_2chatTool } 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:
|
|
1
|
+
{"version":3,"file":"action.cjs","names":["_2chat","execute_2chatTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { _2chat } from \"./app\";\nimport { execute_2chatTool } 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<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\n },\n) {\n return _2chat.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output as z.ZodTypeAny,\n async run(input) {\n return def.output.parse(await execute_2chatTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,OAAO,OAAO;EACnB,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,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
|
package/dist/action.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { _2chat } from \"./app\";\nimport { execute_2chatTool } 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:
|
|
1
|
+
{"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { _2chat } from \"./app\";\nimport { execute_2chatTool } 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<TInput extends z.ZodType>(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: TInput;\n output: z.ZodType;\n },\n) {\n return _2chat.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output as z.ZodTypeAny,\n async run(input) {\n return def.output.parse(await execute_2chatTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
|
|
@@ -17,25 +17,25 @@ const _2chatCreateContactInput = zod.z.object({
|
|
|
17
17
|
}).describe("Request schema for creating a new 2Chat contact.");
|
|
18
18
|
const _2chatCreateContactOutput = zod.z.object({
|
|
19
19
|
contact: zod.z.object({
|
|
20
|
-
uuid: zod.z.string().describe("Unique identifier of the contact"),
|
|
20
|
+
uuid: zod.z.string().describe("Unique identifier of the contact").nullable(),
|
|
21
21
|
details: zod.z.array(zod.z.object({
|
|
22
|
-
id: zod.z.number().int().describe("Unique ID of the detail entry"),
|
|
22
|
+
id: zod.z.number().int().describe("Unique ID of the detail entry").nullable(),
|
|
23
23
|
type: zod.z.enum([
|
|
24
24
|
"E",
|
|
25
25
|
"A",
|
|
26
26
|
"PH",
|
|
27
27
|
"WAPH"
|
|
28
|
-
]).describe("Type code of the detail entry"),
|
|
29
|
-
value: zod.z.string().describe("Value of the detail entry"),
|
|
30
|
-
created_at: zod.z.number().int().describe("Creation timestamp (epoch seconds)"),
|
|
31
|
-
updated_at: zod.z.number().int().describe("Last update timestamp (epoch seconds)")
|
|
28
|
+
]).describe("Type code of the detail entry").nullable(),
|
|
29
|
+
value: zod.z.string().describe("Value of the detail entry").nullable(),
|
|
30
|
+
created_at: zod.z.number().int().describe("Creation timestamp (epoch seconds)").nullable(),
|
|
31
|
+
updated_at: zod.z.number().int().describe("Last update timestamp (epoch seconds)").nullable()
|
|
32
32
|
})).describe("List of detail entries for the contact"),
|
|
33
33
|
last_name: zod.z.string().describe("Last name of the contact").nullable().optional(),
|
|
34
|
-
first_name: zod.z.string().describe("First name of the contact"),
|
|
34
|
+
first_name: zod.z.string().describe("First name of the contact").nullable(),
|
|
35
35
|
channel_uuid: zod.z.string().describe("Channel UUID, if assigned").nullable().optional(),
|
|
36
36
|
profile_pic_url: zod.z.string().describe("URL of the contact's profile picture").nullable().optional()
|
|
37
37
|
}).describe("The newly created contact object"),
|
|
38
|
-
success: zod.z.boolean().describe("Indicates if the request was successful")
|
|
38
|
+
success: zod.z.boolean().describe("Indicates if the request was successful").nullable()
|
|
39
39
|
}).describe("Data from the action execution");
|
|
40
40
|
const _2chatCreateContact = require_action.action("_2CHAT_CREATE_CONTACT", {
|
|
41
41
|
slug: "_2chat-create-contact",
|
|
@@ -1 +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 _2chatCreateContactInput
|
|
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 _2chatCreateContactInput = z.object({\n last_name: z.string().describe(\"Last name of the new contact\").optional(),\n first_name: z.string().describe(\"First name of the new contact\"),\n contact_detail: z.array(z.object({\n type: z.enum([\"E\", \"A\", \"PH\", \"WAPH\"]).describe(\"Type of contact detail: E=email, A=address, PH=phone, WAPH=WhatsApp phone\"),\n value: z.string().describe(\"Value of the contact detail. For phone numbers use international format; for email use a valid address\"),\n}).describe(\"A single contact detail entry, like an email or phone number.\")).describe(\"A list of contact detail entries; at least one entry is required\"),\n profile_pic_url: z.string().describe(\"Publicly accessible URL of the contact's profile picture\").optional(),\n}).describe(\"Request schema for creating a new 2Chat contact.\");\nexport const _2chatCreateContactOutput = z.object({\n contact: z.object({\n uuid: z.string().describe(\"Unique identifier of the contact\").nullable(),\n details: z.array(z.object({\n id: z.number().int().describe(\"Unique ID of the detail entry\").nullable(),\n type: z.enum([\"E\", \"A\", \"PH\", \"WAPH\"]).describe(\"Type code of the detail entry\").nullable(),\n value: z.string().describe(\"Value of the detail entry\").nullable(),\n created_at: z.number().int().describe(\"Creation timestamp (epoch seconds)\").nullable(),\n updated_at: z.number().int().describe(\"Last update timestamp (epoch seconds)\").nullable(),\n})).describe(\"List of detail entries for the contact\"),\n last_name: z.string().describe(\"Last name of the contact\").nullable().optional(),\n first_name: z.string().describe(\"First name of the contact\").nullable(),\n channel_uuid: z.string().describe(\"Channel UUID, if assigned\").nullable().optional(),\n profile_pic_url: z.string().describe(\"URL of the contact's profile picture\").nullable().optional(),\n}).describe(\"The newly created contact object\"),\n success: z.boolean().describe(\"Indicates if the request was successful\").nullable(),\n}).describe(\"Data from the action execution\");\n\nexport const _2chatCreateContact = action(\"_2CHAT_CREATE_CONTACT\", {\n slug: \"_2chat-create-contact\",\n name: \"Create Contact\",\n description: \"Tool to create a new contact in your 2Chat account. Use after gathering and verifying first name and at least one contact detail (email, phone, or address).\",\n input: _2chatCreateContactInput,\n output: _2chatCreateContactOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAA2BA,IAAAA,EAAE,OAAO;CAC/C,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;CACxE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;CAC/D,gBAAgBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EACjC,MAAMA,IAAAA,EAAE,KAAK;GAAC;GAAK;GAAK;GAAM;EAAM,CAAC,CAAC,CAAC,SAAS,2EAA2E;EAC3H,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wGAAwG;CACrI,CAAC,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,CAAC,SAAS,kEAAkE;CACvJ,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;AAC5G,CAAC,CAAC,CAAC,SAAS,kDAAkD;AAC9D,MAAa,4BAA4BA,IAAAA,EAAE,OAAO;CAChD,SAASA,IAAAA,EAAE,OAAO;EAClB,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;EACvE,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;GAC1B,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;GACxE,MAAMA,IAAAA,EAAE,KAAK;IAAC;IAAK;IAAK;IAAM;GAAM,CAAC,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;GAC1F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;GACjE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;GACrF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;EAC1F,CAAC,CAAC,CAAC,CAAC,SAAS,wCAAwC;EACnD,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/E,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;EACtE,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACnF,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnG,CAAC,CAAC,CAAC,SAAS,kCAAkC;CAC5C,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;AACpF,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,51 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/create-contact.d.ts
|
|
4
|
-
declare const _2chatCreateContactInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const _2chatCreateContactInput: z.ZodObject<{
|
|
5
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
first_name: z.ZodString;
|
|
7
|
+
contact_detail: z.ZodArray<z.ZodObject<{
|
|
8
|
+
type: z.ZodEnum<{
|
|
9
|
+
E: "E";
|
|
10
|
+
A: "A";
|
|
11
|
+
PH: "PH";
|
|
12
|
+
WAPH: "WAPH";
|
|
13
|
+
}>;
|
|
14
|
+
value: z.ZodString;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
profile_pic_url: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
declare const _2chatCreateContactOutput: z.ZodObject<{
|
|
19
|
+
contact: z.ZodObject<{
|
|
20
|
+
uuid: z.ZodNullable<z.ZodString>;
|
|
21
|
+
details: z.ZodArray<z.ZodObject<{
|
|
22
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
23
|
+
type: z.ZodNullable<z.ZodEnum<{
|
|
24
|
+
E: "E";
|
|
25
|
+
A: "A";
|
|
26
|
+
PH: "PH";
|
|
27
|
+
WAPH: "WAPH";
|
|
28
|
+
}>>;
|
|
29
|
+
value: z.ZodNullable<z.ZodString>;
|
|
30
|
+
created_at: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
updated_at: z.ZodNullable<z.ZodNumber>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
first_name: z.ZodNullable<z.ZodString>;
|
|
35
|
+
channel_uuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
profile_pic_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
success: z.ZodNullable<z.ZodBoolean>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
declare const _2chatCreateContact: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
41
|
+
first_name: string;
|
|
42
|
+
contact_detail: {
|
|
43
|
+
type: "E" | "A" | "PH" | "WAPH";
|
|
44
|
+
value: string;
|
|
45
|
+
}[];
|
|
46
|
+
last_name?: string | undefined;
|
|
47
|
+
profile_pic_url?: string | undefined;
|
|
48
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
49
|
//#endregion
|
|
8
50
|
export { _2chatCreateContact };
|
|
9
51
|
//# sourceMappingURL=create-contact.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-contact.d.cts","names":[],"sources":["../../src/actions/create-contact.ts"],"mappings":";;;cAIa,wBAAA,
|
|
1
|
+
{"version":3,"file":"create-contact.d.cts","names":[],"sources":["../../src/actions/create-contact.ts"],"mappings":";;;cAIa,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cASxB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;cAkBzB,mBAAA,gCAAmB,wBAAA"}
|
|
@@ -1,9 +1,51 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/create-contact.d.ts
|
|
4
|
-
declare const _2chatCreateContactInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const _2chatCreateContactInput: z.ZodObject<{
|
|
5
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
first_name: z.ZodString;
|
|
7
|
+
contact_detail: z.ZodArray<z.ZodObject<{
|
|
8
|
+
type: z.ZodEnum<{
|
|
9
|
+
E: "E";
|
|
10
|
+
A: "A";
|
|
11
|
+
PH: "PH";
|
|
12
|
+
WAPH: "WAPH";
|
|
13
|
+
}>;
|
|
14
|
+
value: z.ZodString;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
profile_pic_url: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
declare const _2chatCreateContactOutput: z.ZodObject<{
|
|
19
|
+
contact: z.ZodObject<{
|
|
20
|
+
uuid: z.ZodNullable<z.ZodString>;
|
|
21
|
+
details: z.ZodArray<z.ZodObject<{
|
|
22
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
23
|
+
type: z.ZodNullable<z.ZodEnum<{
|
|
24
|
+
E: "E";
|
|
25
|
+
A: "A";
|
|
26
|
+
PH: "PH";
|
|
27
|
+
WAPH: "WAPH";
|
|
28
|
+
}>>;
|
|
29
|
+
value: z.ZodNullable<z.ZodString>;
|
|
30
|
+
created_at: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
updated_at: z.ZodNullable<z.ZodNumber>;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
|
+
first_name: z.ZodNullable<z.ZodString>;
|
|
35
|
+
channel_uuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
profile_pic_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
success: z.ZodNullable<z.ZodBoolean>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
declare const _2chatCreateContact: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
41
|
+
first_name: string;
|
|
42
|
+
contact_detail: {
|
|
43
|
+
type: "E" | "A" | "PH" | "WAPH";
|
|
44
|
+
value: string;
|
|
45
|
+
}[];
|
|
46
|
+
last_name?: string | undefined;
|
|
47
|
+
profile_pic_url?: string | undefined;
|
|
48
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
49
|
//#endregion
|
|
8
50
|
export { _2chatCreateContact };
|
|
9
51
|
//# sourceMappingURL=create-contact.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-contact.d.mts","names":[],"sources":["../../src/actions/create-contact.ts"],"mappings":";;;cAIa,wBAAA,
|
|
1
|
+
{"version":3,"file":"create-contact.d.mts","names":[],"sources":["../../src/actions/create-contact.ts"],"mappings":";;;cAIa,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cASxB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;cAkBzB,mBAAA,gCAAmB,wBAAA"}
|
|
@@ -20,25 +20,25 @@ const _2chatCreateContact = action("_2CHAT_CREATE_CONTACT", {
|
|
|
20
20
|
}).describe("Request schema for creating a new 2Chat contact."),
|
|
21
21
|
output: z.object({
|
|
22
22
|
contact: z.object({
|
|
23
|
-
uuid: z.string().describe("Unique identifier of the contact"),
|
|
23
|
+
uuid: z.string().describe("Unique identifier of the contact").nullable(),
|
|
24
24
|
details: z.array(z.object({
|
|
25
|
-
id: z.number().int().describe("Unique ID of the detail entry"),
|
|
25
|
+
id: z.number().int().describe("Unique ID of the detail entry").nullable(),
|
|
26
26
|
type: z.enum([
|
|
27
27
|
"E",
|
|
28
28
|
"A",
|
|
29
29
|
"PH",
|
|
30
30
|
"WAPH"
|
|
31
|
-
]).describe("Type code of the detail entry"),
|
|
32
|
-
value: z.string().describe("Value of the detail entry"),
|
|
33
|
-
created_at: z.number().int().describe("Creation timestamp (epoch seconds)"),
|
|
34
|
-
updated_at: z.number().int().describe("Last update timestamp (epoch seconds)")
|
|
31
|
+
]).describe("Type code of the detail entry").nullable(),
|
|
32
|
+
value: z.string().describe("Value of the detail entry").nullable(),
|
|
33
|
+
created_at: z.number().int().describe("Creation timestamp (epoch seconds)").nullable(),
|
|
34
|
+
updated_at: z.number().int().describe("Last update timestamp (epoch seconds)").nullable()
|
|
35
35
|
})).describe("List of detail entries for the contact"),
|
|
36
36
|
last_name: z.string().describe("Last name of the contact").nullable().optional(),
|
|
37
|
-
first_name: z.string().describe("First name of the contact"),
|
|
37
|
+
first_name: z.string().describe("First name of the contact").nullable(),
|
|
38
38
|
channel_uuid: z.string().describe("Channel UUID, if assigned").nullable().optional(),
|
|
39
39
|
profile_pic_url: z.string().describe("URL of the contact's profile picture").nullable().optional()
|
|
40
40
|
}).describe("The newly created contact object"),
|
|
41
|
-
success: z.boolean().describe("Indicates if the request was successful")
|
|
41
|
+
success: z.boolean().describe("Indicates if the request was successful").nullable()
|
|
42
42
|
}).describe("Data from the action execution")
|
|
43
43
|
});
|
|
44
44
|
//#endregion
|
|
@@ -1 +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 _2chatCreateContactInput
|
|
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 _2chatCreateContactInput = z.object({\n last_name: z.string().describe(\"Last name of the new contact\").optional(),\n first_name: z.string().describe(\"First name of the new contact\"),\n contact_detail: z.array(z.object({\n type: z.enum([\"E\", \"A\", \"PH\", \"WAPH\"]).describe(\"Type of contact detail: E=email, A=address, PH=phone, WAPH=WhatsApp phone\"),\n value: z.string().describe(\"Value of the contact detail. For phone numbers use international format; for email use a valid address\"),\n}).describe(\"A single contact detail entry, like an email or phone number.\")).describe(\"A list of contact detail entries; at least one entry is required\"),\n profile_pic_url: z.string().describe(\"Publicly accessible URL of the contact's profile picture\").optional(),\n}).describe(\"Request schema for creating a new 2Chat contact.\");\nexport const _2chatCreateContactOutput = z.object({\n contact: z.object({\n uuid: z.string().describe(\"Unique identifier of the contact\").nullable(),\n details: z.array(z.object({\n id: z.number().int().describe(\"Unique ID of the detail entry\").nullable(),\n type: z.enum([\"E\", \"A\", \"PH\", \"WAPH\"]).describe(\"Type code of the detail entry\").nullable(),\n value: z.string().describe(\"Value of the detail entry\").nullable(),\n created_at: z.number().int().describe(\"Creation timestamp (epoch seconds)\").nullable(),\n updated_at: z.number().int().describe(\"Last update timestamp (epoch seconds)\").nullable(),\n})).describe(\"List of detail entries for the contact\"),\n last_name: z.string().describe(\"Last name of the contact\").nullable().optional(),\n first_name: z.string().describe(\"First name of the contact\").nullable(),\n channel_uuid: z.string().describe(\"Channel UUID, if assigned\").nullable().optional(),\n profile_pic_url: z.string().describe(\"URL of the contact's profile picture\").nullable().optional(),\n}).describe(\"The newly created contact object\"),\n success: z.boolean().describe(\"Indicates if the request was successful\").nullable(),\n}).describe(\"Data from the action execution\");\n\nexport const _2chatCreateContact = action(\"_2CHAT_CREATE_CONTACT\", {\n slug: \"_2chat-create-contact\",\n name: \"Create Contact\",\n description: \"Tool to create a new contact in your 2Chat account. Use after gathering and verifying first name and at least one contact detail (email, phone, or address).\",\n input: _2chatCreateContactInput,\n output: _2chatCreateContactOutput,\n});\n"],"mappings":";;AA+BA,MAAa,sBAAsB,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA/BsC,EAAE,OAAO;EAC/C,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B,CAAC,CAAC,SAAS;EACxE,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B;EAC/D,gBAAgB,EAAE,MAAM,EAAE,OAAO;GACjC,MAAM,EAAE,KAAK;IAAC;IAAK;IAAK;IAAM;GAAM,CAAC,CAAC,CAAC,SAAS,2EAA2E;GAC3H,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,wGAAwG;EACrI,CAAC,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,CAAC,SAAS,kEAAkE;EACvJ,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CAC5G,CAAC,CAAC,CAAC,SAAS,kDAuBH;CACP,QAvBuC,EAAE,OAAO;EAChD,SAAS,EAAE,OAAO;GAClB,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;GACvE,SAAS,EAAE,MAAM,EAAE,OAAO;IAC1B,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;IACxE,MAAM,EAAE,KAAK;KAAC;KAAK;KAAK;KAAM;IAAM,CAAC,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS;IAC1F,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;IACjE,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS;IACrF,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;GAC1F,CAAC,CAAC,CAAC,CAAC,SAAS,wCAAwC;GACnD,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;GAC/E,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS;GACtE,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;GACnF,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACnG,CAAC,CAAC,CAAC,SAAS,kCAAkC;EAC5C,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CACpF,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
|
|
@@ -4,21 +4,21 @@ let zod = require("zod");
|
|
|
4
4
|
const _2chatGetApiUsageInfoInput = zod.z.object({}).describe("Request model for retrieving current API usage and account information.");
|
|
5
5
|
const _2chatGetApiUsageInfoOutput = zod.z.object({
|
|
6
6
|
usage: zod.z.object({
|
|
7
|
-
api_requests_available: zod.z.number().int().describe("Number of API requests remaining in the current period"),
|
|
8
|
-
api_requests_plan_default: zod.z.number().int().describe("Total API requests allowed by the plan"),
|
|
9
|
-
number_check_requests_available: zod.z.number().int().describe("Number of phone number check requests remaining"),
|
|
10
|
-
number_check_requests_plan_default: zod.z.number().int().describe("Total phone number check requests allowed by the plan")
|
|
7
|
+
api_requests_available: zod.z.number().int().describe("Number of API requests remaining in the current period").nullable(),
|
|
8
|
+
api_requests_plan_default: zod.z.number().int().describe("Total API requests allowed by the plan").nullable(),
|
|
9
|
+
number_check_requests_available: zod.z.number().int().describe("Number of phone number check requests remaining").nullable(),
|
|
10
|
+
number_check_requests_plan_default: zod.z.number().int().describe("Total phone number check requests allowed by the plan").nullable()
|
|
11
11
|
}).describe("Current usage statistics for this account"),
|
|
12
|
-
limits: zod.z.object({ requests_per_minute: zod.z.number().int().describe("Maximum number of API requests allowed per minute") }).describe("Configured rate limits for this account"),
|
|
12
|
+
limits: zod.z.object({ requests_per_minute: zod.z.number().int().describe("Maximum number of API requests allowed per minute").nullable() }).describe("Configured rate limits for this account"),
|
|
13
13
|
account: zod.z.object({
|
|
14
|
-
name: zod.z.string().describe("Account name"),
|
|
15
|
-
uuid: zod.z.string().describe("Unique identifier for the account"),
|
|
16
|
-
blocked: zod.z.boolean().describe("Indicates if the account is blocked"),
|
|
17
|
-
on_trial: zod.z.boolean().describe("Indicates if the account is on a trial period"),
|
|
18
|
-
created_at: zod.z.string().describe("Account creation timestamp (ISO 8601 format)"),
|
|
19
|
-
expires_at: zod.z.string().describe("Account expiration timestamp (ISO 8601 format)")
|
|
14
|
+
name: zod.z.string().describe("Account name").nullable(),
|
|
15
|
+
uuid: zod.z.string().describe("Unique identifier for the account").nullable(),
|
|
16
|
+
blocked: zod.z.boolean().describe("Indicates if the account is blocked").nullable(),
|
|
17
|
+
on_trial: zod.z.boolean().describe("Indicates if the account is on a trial period").nullable(),
|
|
18
|
+
created_at: zod.z.string().describe("Account creation timestamp (ISO 8601 format)").nullable(),
|
|
19
|
+
expires_at: zod.z.string().describe("Account expiration timestamp (ISO 8601 format)").nullable()
|
|
20
20
|
}).describe("Account metadata and status"),
|
|
21
|
-
success: zod.z.boolean().describe("Indicates whether the request was successful")
|
|
21
|
+
success: zod.z.boolean().describe("Indicates whether the request was successful").nullable()
|
|
22
22
|
}).describe("Data from the action execution");
|
|
23
23
|
const _2chatGetApiUsageInfo = require_action.action("_2CHAT_GET_API_USAGE_INFO", {
|
|
24
24
|
slug: "_2chat-get-api-usage-info",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-api-usage-info.cjs","names":["z","action"],"sources":["../../src/actions/get-api-usage-info.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatGetApiUsageInfoInput
|
|
1
|
+
{"version":3,"file":"get-api-usage-info.cjs","names":["z","action"],"sources":["../../src/actions/get-api-usage-info.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatGetApiUsageInfoInput = z.object({}).describe(\"Request model for retrieving current API usage and account information.\");\nexport const _2chatGetApiUsageInfoOutput = z.object({\n usage: z.object({\n api_requests_available: z.number().int().describe(\"Number of API requests remaining in the current period\").nullable(),\n api_requests_plan_default: z.number().int().describe(\"Total API requests allowed by the plan\").nullable(),\n number_check_requests_available: z.number().int().describe(\"Number of phone number check requests remaining\").nullable(),\n number_check_requests_plan_default: z.number().int().describe(\"Total phone number check requests allowed by the plan\").nullable(),\n}).describe(\"Current usage statistics for this account\"),\n limits: z.object({\n requests_per_minute: z.number().int().describe(\"Maximum number of API requests allowed per minute\").nullable(),\n}).describe(\"Configured rate limits for this account\"),\n account: z.object({\n name: z.string().describe(\"Account name\").nullable(),\n uuid: z.string().describe(\"Unique identifier for the account\").nullable(),\n blocked: z.boolean().describe(\"Indicates if the account is blocked\").nullable(),\n on_trial: z.boolean().describe(\"Indicates if the account is on a trial period\").nullable(),\n created_at: z.string().describe(\"Account creation timestamp (ISO 8601 format)\").nullable(),\n expires_at: z.string().describe(\"Account expiration timestamp (ISO 8601 format)\").nullable(),\n}).describe(\"Account metadata and status\"),\n success: z.boolean().describe(\"Indicates whether the request was successful\").nullable(),\n}).describe(\"Data from the action execution\");\n\nexport const _2chatGetApiUsageInfo = action(\"_2CHAT_GET_API_USAGE_INFO\", {\n slug: \"_2chat-get-api-usage-info\",\n name: \"Get API Usage Info\",\n description: \"Tool to retrieve current API usage and account information. Use when you need to monitor your remaining quotas before sending more requests.\",\n input: _2chatGetApiUsageInfoInput,\n output: _2chatGetApiUsageInfoOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA6BA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,yEAAyE;AACzI,MAAa,8BAA8BA,IAAAA,EAAE,OAAO;CAClD,OAAOA,IAAAA,EAAE,OAAO;EAChB,wBAAwBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;EACrH,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;EACxG,iCAAiCA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;EACvH,oCAAoCA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CAClI,CAAC,CAAC,CAAC,SAAS,2CAA2C;CACrD,QAAQA,IAAAA,EAAE,OAAO,EACjB,qBAAqBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,EAC/G,CAAC,CAAC,CAAC,SAAS,yCAAyC;CACnD,SAASA,IAAAA,EAAE,OAAO;EAClB,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,cAAc,CAAC,CAAC,SAAS;EACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;EACxE,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;EAC9E,UAAUA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;EACzF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;EACzF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CAC7F,CAAC,CAAC,CAAC,SAAS,6BAA6B;CACvC,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;AACzF,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,wBAAwBC,eAAAA,OAAO,6BAA6B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/get-api-usage-info.d.ts
|
|
4
|
-
declare const _2chatGetApiUsageInfoInput: z.
|
|
5
|
-
declare const _2chatGetApiUsageInfoOutput: z.
|
|
6
|
-
|
|
4
|
+
declare const _2chatGetApiUsageInfoInput: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
declare const _2chatGetApiUsageInfoOutput: z.ZodObject<{
|
|
6
|
+
usage: z.ZodObject<{
|
|
7
|
+
api_requests_available: z.ZodNullable<z.ZodNumber>;
|
|
8
|
+
api_requests_plan_default: z.ZodNullable<z.ZodNumber>;
|
|
9
|
+
number_check_requests_available: z.ZodNullable<z.ZodNumber>;
|
|
10
|
+
number_check_requests_plan_default: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
limits: z.ZodObject<{
|
|
13
|
+
requests_per_minute: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
account: z.ZodObject<{
|
|
16
|
+
name: z.ZodNullable<z.ZodString>;
|
|
17
|
+
uuid: z.ZodNullable<z.ZodString>;
|
|
18
|
+
blocked: z.ZodNullable<z.ZodBoolean>;
|
|
19
|
+
on_trial: z.ZodNullable<z.ZodBoolean>;
|
|
20
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
21
|
+
expires_at: z.ZodNullable<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
success: z.ZodNullable<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
declare const _2chatGetApiUsageInfo: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
26
|
//#endregion
|
|
8
27
|
export { _2chatGetApiUsageInfo };
|
|
9
28
|
//# sourceMappingURL=get-api-usage-info.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-api-usage-info.d.cts","names":[],"sources":["../../src/actions/get-api-usage-info.ts"],"mappings":";;;cAIa,0BAAA,
|
|
1
|
+
{"version":3,"file":"get-api-usage-info.d.cts","names":[],"sources":["../../src/actions/get-api-usage-info.ts"],"mappings":";;;cAIa,0BAAA,EAA0B,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cAC1B,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAqB3B,qBAAA,gCAAqB,wBAAA,CAAA,MAAA,wDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/get-api-usage-info.d.ts
|
|
4
|
-
declare const _2chatGetApiUsageInfoInput: z.
|
|
5
|
-
declare const _2chatGetApiUsageInfoOutput: z.
|
|
6
|
-
|
|
4
|
+
declare const _2chatGetApiUsageInfoInput: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
declare const _2chatGetApiUsageInfoOutput: z.ZodObject<{
|
|
6
|
+
usage: z.ZodObject<{
|
|
7
|
+
api_requests_available: z.ZodNullable<z.ZodNumber>;
|
|
8
|
+
api_requests_plan_default: z.ZodNullable<z.ZodNumber>;
|
|
9
|
+
number_check_requests_available: z.ZodNullable<z.ZodNumber>;
|
|
10
|
+
number_check_requests_plan_default: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
limits: z.ZodObject<{
|
|
13
|
+
requests_per_minute: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
account: z.ZodObject<{
|
|
16
|
+
name: z.ZodNullable<z.ZodString>;
|
|
17
|
+
uuid: z.ZodNullable<z.ZodString>;
|
|
18
|
+
blocked: z.ZodNullable<z.ZodBoolean>;
|
|
19
|
+
on_trial: z.ZodNullable<z.ZodBoolean>;
|
|
20
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
21
|
+
expires_at: z.ZodNullable<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
success: z.ZodNullable<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
declare const _2chatGetApiUsageInfo: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
26
|
//#endregion
|
|
8
27
|
export { _2chatGetApiUsageInfo };
|
|
9
28
|
//# sourceMappingURL=get-api-usage-info.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-api-usage-info.d.mts","names":[],"sources":["../../src/actions/get-api-usage-info.ts"],"mappings":";;;cAIa,0BAAA,
|
|
1
|
+
{"version":3,"file":"get-api-usage-info.d.mts","names":[],"sources":["../../src/actions/get-api-usage-info.ts"],"mappings":";;;cAIa,0BAAA,EAA0B,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cAC1B,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAqB3B,qBAAA,gCAAqB,wBAAA,CAAA,MAAA,wDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -7,21 +7,21 @@ const _2chatGetApiUsageInfo = action("_2CHAT_GET_API_USAGE_INFO", {
|
|
|
7
7
|
input: z.object({}).describe("Request model for retrieving current API usage and account information."),
|
|
8
8
|
output: z.object({
|
|
9
9
|
usage: z.object({
|
|
10
|
-
api_requests_available: z.number().int().describe("Number of API requests remaining in the current period"),
|
|
11
|
-
api_requests_plan_default: z.number().int().describe("Total API requests allowed by the plan"),
|
|
12
|
-
number_check_requests_available: z.number().int().describe("Number of phone number check requests remaining"),
|
|
13
|
-
number_check_requests_plan_default: z.number().int().describe("Total phone number check requests allowed by the plan")
|
|
10
|
+
api_requests_available: z.number().int().describe("Number of API requests remaining in the current period").nullable(),
|
|
11
|
+
api_requests_plan_default: z.number().int().describe("Total API requests allowed by the plan").nullable(),
|
|
12
|
+
number_check_requests_available: z.number().int().describe("Number of phone number check requests remaining").nullable(),
|
|
13
|
+
number_check_requests_plan_default: z.number().int().describe("Total phone number check requests allowed by the plan").nullable()
|
|
14
14
|
}).describe("Current usage statistics for this account"),
|
|
15
|
-
limits: z.object({ requests_per_minute: z.number().int().describe("Maximum number of API requests allowed per minute") }).describe("Configured rate limits for this account"),
|
|
15
|
+
limits: z.object({ requests_per_minute: z.number().int().describe("Maximum number of API requests allowed per minute").nullable() }).describe("Configured rate limits for this account"),
|
|
16
16
|
account: z.object({
|
|
17
|
-
name: z.string().describe("Account name"),
|
|
18
|
-
uuid: z.string().describe("Unique identifier for the account"),
|
|
19
|
-
blocked: z.boolean().describe("Indicates if the account is blocked"),
|
|
20
|
-
on_trial: z.boolean().describe("Indicates if the account is on a trial period"),
|
|
21
|
-
created_at: z.string().describe("Account creation timestamp (ISO 8601 format)"),
|
|
22
|
-
expires_at: z.string().describe("Account expiration timestamp (ISO 8601 format)")
|
|
17
|
+
name: z.string().describe("Account name").nullable(),
|
|
18
|
+
uuid: z.string().describe("Unique identifier for the account").nullable(),
|
|
19
|
+
blocked: z.boolean().describe("Indicates if the account is blocked").nullable(),
|
|
20
|
+
on_trial: z.boolean().describe("Indicates if the account is on a trial period").nullable(),
|
|
21
|
+
created_at: z.string().describe("Account creation timestamp (ISO 8601 format)").nullable(),
|
|
22
|
+
expires_at: z.string().describe("Account expiration timestamp (ISO 8601 format)").nullable()
|
|
23
23
|
}).describe("Account metadata and status"),
|
|
24
|
-
success: z.boolean().describe("Indicates whether the request was successful")
|
|
24
|
+
success: z.boolean().describe("Indicates whether the request was successful").nullable()
|
|
25
25
|
}).describe("Data from the action execution")
|
|
26
26
|
});
|
|
27
27
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-api-usage-info.mjs","names":[],"sources":["../../src/actions/get-api-usage-info.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatGetApiUsageInfoInput
|
|
1
|
+
{"version":3,"file":"get-api-usage-info.mjs","names":[],"sources":["../../src/actions/get-api-usage-info.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatGetApiUsageInfoInput = z.object({}).describe(\"Request model for retrieving current API usage and account information.\");\nexport const _2chatGetApiUsageInfoOutput = z.object({\n usage: z.object({\n api_requests_available: z.number().int().describe(\"Number of API requests remaining in the current period\").nullable(),\n api_requests_plan_default: z.number().int().describe(\"Total API requests allowed by the plan\").nullable(),\n number_check_requests_available: z.number().int().describe(\"Number of phone number check requests remaining\").nullable(),\n number_check_requests_plan_default: z.number().int().describe(\"Total phone number check requests allowed by the plan\").nullable(),\n}).describe(\"Current usage statistics for this account\"),\n limits: z.object({\n requests_per_minute: z.number().int().describe(\"Maximum number of API requests allowed per minute\").nullable(),\n}).describe(\"Configured rate limits for this account\"),\n account: z.object({\n name: z.string().describe(\"Account name\").nullable(),\n uuid: z.string().describe(\"Unique identifier for the account\").nullable(),\n blocked: z.boolean().describe(\"Indicates if the account is blocked\").nullable(),\n on_trial: z.boolean().describe(\"Indicates if the account is on a trial period\").nullable(),\n created_at: z.string().describe(\"Account creation timestamp (ISO 8601 format)\").nullable(),\n expires_at: z.string().describe(\"Account expiration timestamp (ISO 8601 format)\").nullable(),\n}).describe(\"Account metadata and status\"),\n success: z.boolean().describe(\"Indicates whether the request was successful\").nullable(),\n}).describe(\"Data from the action execution\");\n\nexport const _2chatGetApiUsageInfo = action(\"_2CHAT_GET_API_USAGE_INFO\", {\n slug: \"_2chat-get-api-usage-info\",\n name: \"Get API Usage Info\",\n description: \"Tool to retrieve current API usage and account information. Use when you need to monitor your remaining quotas before sending more requests.\",\n input: _2chatGetApiUsageInfoInput,\n output: _2chatGetApiUsageInfoOutput,\n});\n"],"mappings":";;AA0BA,MAAa,wBAAwB,OAAO,6BAA6B;CACvE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA1BwC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,yEA0BvD;CACP,QA1ByC,EAAE,OAAO;EAClD,OAAO,EAAE,OAAO;GAChB,wBAAwB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wDAAwD,CAAC,CAAC,SAAS;GACrH,2BAA2B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;GACxG,iCAAiC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;GACvH,oCAAoC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;EAClI,CAAC,CAAC,CAAC,SAAS,2CAA2C;EACrD,QAAQ,EAAE,OAAO,EACjB,qBAAqB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,EAC/G,CAAC,CAAC,CAAC,SAAS,yCAAyC;EACnD,SAAS,EAAE,OAAO;GAClB,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,cAAc,CAAC,CAAC,SAAS;GACnD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;GACxE,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;GAC9E,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;GACzF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;GACzF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;EAC7F,CAAC,CAAC,CAAC,SAAS,6BAA6B;EACvC,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;CACzF,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
|
|
@@ -7,17 +7,17 @@ const _2chatListContactsInput = zod.z.object({
|
|
|
7
7
|
results_per_page: zod.z.number().int().describe("Number of results returned per page. Must be between 1 and 50.").optional()
|
|
8
8
|
}).describe("Request model for listing contacts in a 2Chat account.");
|
|
9
9
|
const _2chatListContactsOutput = zod.z.object({
|
|
10
|
-
page: zod.z.number().int().describe("Zero-indexed page number of the returned results."),
|
|
11
|
-
count: zod.z.number().int().describe("Total number of contacts available."),
|
|
12
|
-
success: zod.z.boolean().describe("Indicates whether the request was successful."),
|
|
10
|
+
page: zod.z.number().int().describe("Zero-indexed page number of the returned results.").nullable(),
|
|
11
|
+
count: zod.z.number().int().describe("Total number of contacts available.").nullable(),
|
|
12
|
+
success: zod.z.boolean().describe("Indicates whether the request was successful.").nullable(),
|
|
13
13
|
contacts: zod.z.array(zod.z.object({
|
|
14
|
-
id: zod.z.number().int().describe("Internal contact ID."),
|
|
15
|
-
uuid: zod.z.string().describe("Universal unique identifier for the contact."),
|
|
14
|
+
id: zod.z.number().int().describe("Internal contact ID.").nullable(),
|
|
15
|
+
uuid: zod.z.string().describe("Universal unique identifier for the contact.").nullable(),
|
|
16
16
|
details: zod.z.array(zod.z.object({
|
|
17
|
-
id: zod.z.number().int().describe("Unique detail ID."),
|
|
18
|
-
type: zod.z.string().describe("Detail type (e.g., 'WAPH' for WhatsApp phone, 'E' for email)."),
|
|
19
|
-
value: zod.z.string().describe("The contact detail value (e.g., phone number, email)."),
|
|
20
|
-
created_at: zod.z.string().describe("Timestamp when the detail was created."),
|
|
17
|
+
id: zod.z.number().int().describe("Unique detail ID.").nullable(),
|
|
18
|
+
type: zod.z.string().describe("Detail type (e.g., 'WAPH' for WhatsApp phone, 'E' for email).").nullable(),
|
|
19
|
+
value: zod.z.string().describe("The contact detail value (e.g., phone number, email).").nullable(),
|
|
20
|
+
created_at: zod.z.string().describe("Timestamp when the detail was created.").nullable(),
|
|
21
21
|
updated_at: zod.z.string().describe("Timestamp when the detail was last updated, if applicable.").nullable().optional()
|
|
22
22
|
}).describe("Detail information for a contact (e.g., phone or email).")).describe("List of contact details such as phone numbers and emails."),
|
|
23
23
|
last_name: zod.z.string().describe("Last name of the contact.").nullable().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-contacts.cjs","names":["z","action"],"sources":["../../src/actions/list-contacts.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatListContactsInput
|
|
1
|
+
{"version":3,"file":"list-contacts.cjs","names":["z","action"],"sources":["../../src/actions/list-contacts.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatListContactsInput = z.object({\n page_number: z.number().int().describe(\"Zero-indexed page number to retrieve.\").optional(),\n channel_uuid: z.string().describe(\"Optional. Used to filter contacts by connected number UUID.\").optional(),\n results_per_page: z.number().int().describe(\"Number of results returned per page. Must be between 1 and 50.\").optional(),\n}).describe(\"Request model for listing contacts in a 2Chat account.\");\nexport const _2chatListContactsOutput = z.object({\n page: z.number().int().describe(\"Zero-indexed page number of the returned results.\").nullable(),\n count: z.number().int().describe(\"Total number of contacts available.\").nullable(),\n success: z.boolean().describe(\"Indicates whether the request was successful.\").nullable(),\n contacts: z.array(z.object({\n id: z.number().int().describe(\"Internal contact ID.\").nullable(),\n uuid: z.string().describe(\"Universal unique identifier for the contact.\").nullable(),\n details: z.array(z.object({\n id: z.number().int().describe(\"Unique detail ID.\").nullable(),\n type: z.string().describe(\"Detail type (e.g., 'WAPH' for WhatsApp phone, 'E' for email).\").nullable(),\n value: z.string().describe(\"The contact detail value (e.g., phone number, email).\").nullable(),\n created_at: z.string().describe(\"Timestamp when the detail was created.\").nullable(),\n updated_at: z.string().describe(\"Timestamp when the detail was last updated, if applicable.\").nullable().optional(),\n}).describe(\"Detail information for a contact (e.g., phone or email).\")).describe(\"List of contact details such as phone numbers and emails.\"),\n last_name: z.string().describe(\"Last name of the contact.\").nullable().optional(),\n first_name: z.string().describe(\"First name of the contact.\").nullable().optional(),\n channel_uuid: z.string().describe(\"UUID of the channel (phone number) associated with this contact, if any.\").nullable().optional(),\n profile_pic_url: z.string().describe(\"URL to the contact's profile picture, if available.\").nullable().optional(),\n}).describe(\"Represents a contact in the 2Chat account.\")).describe(\"List of contacts on this page.\"),\n}).describe(\"Data from the action execution\");\n\nexport const _2chatListContacts = action(\"_2CHAT_LIST_CONTACTS\", {\n slug: \"_2chat-list-contacts\",\n name: \"List Contacts\",\n description: \"Tool to list all contacts in your 2Chat account. Use when you need to retrieve your contact list after confirming your account connection.\",\n input: _2chatListContactsInput,\n output: _2chatListContactsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;CACzF,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CAC1G,kBAAkBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;AACzH,CAAC,CAAC,CAAC,SAAS,wDAAwD;AACpE,MAAa,2BAA2BA,IAAAA,EAAE,OAAO;CAC/C,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CAC9F,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;CACjF,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;CACxF,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC3B,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS;EAC/D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;EACnF,SAASA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;GAC1B,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS;GAC5D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;GACpG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;GAC7F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;GACnF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpH,CAAC,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,CAAC,SAAS,2DAA2D;EAC3I,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAClF,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAClI,iBAAiBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClH,CAAC,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,CAAC,SAAS,gCAAgC;AACpG,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/list-contacts.d.ts
|
|
4
|
-
declare const _2chatListContactsInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const _2chatListContactsInput: z.ZodObject<{
|
|
5
|
+
page_number: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
channel_uuid: z.ZodOptional<z.ZodString>;
|
|
7
|
+
results_per_page: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
declare const _2chatListContactsOutput: z.ZodObject<{
|
|
10
|
+
page: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
count: z.ZodNullable<z.ZodNumber>;
|
|
12
|
+
success: z.ZodNullable<z.ZodBoolean>;
|
|
13
|
+
contacts: z.ZodArray<z.ZodObject<{
|
|
14
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
15
|
+
uuid: z.ZodNullable<z.ZodString>;
|
|
16
|
+
details: z.ZodArray<z.ZodObject<{
|
|
17
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
18
|
+
type: z.ZodNullable<z.ZodString>;
|
|
19
|
+
value: z.ZodNullable<z.ZodString>;
|
|
20
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
21
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
first_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
channel_uuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
profile_pic_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
declare const _2chatListContacts: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
30
|
+
page_number?: number | undefined;
|
|
31
|
+
channel_uuid?: string | undefined;
|
|
32
|
+
results_per_page?: number | undefined;
|
|
33
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
34
|
//#endregion
|
|
8
35
|
export { _2chatListContacts };
|
|
9
36
|
//# sourceMappingURL=list-contacts.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-contacts.d.cts","names":[],"sources":["../../src/actions/list-contacts.ts"],"mappings":";;;cAIa,uBAAA,
|
|
1
|
+
{"version":3,"file":"list-contacts.d.cts","names":[],"sources":["../../src/actions/list-contacts.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;cAKvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAqBxB,kBAAA,gCAAkB,wBAAA"}
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/list-contacts.d.ts
|
|
4
|
-
declare const _2chatListContactsInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const _2chatListContactsInput: z.ZodObject<{
|
|
5
|
+
page_number: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
channel_uuid: z.ZodOptional<z.ZodString>;
|
|
7
|
+
results_per_page: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
declare const _2chatListContactsOutput: z.ZodObject<{
|
|
10
|
+
page: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
count: z.ZodNullable<z.ZodNumber>;
|
|
12
|
+
success: z.ZodNullable<z.ZodBoolean>;
|
|
13
|
+
contacts: z.ZodArray<z.ZodObject<{
|
|
14
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
15
|
+
uuid: z.ZodNullable<z.ZodString>;
|
|
16
|
+
details: z.ZodArray<z.ZodObject<{
|
|
17
|
+
id: z.ZodNullable<z.ZodNumber>;
|
|
18
|
+
type: z.ZodNullable<z.ZodString>;
|
|
19
|
+
value: z.ZodNullable<z.ZodString>;
|
|
20
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
21
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
first_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
25
|
+
channel_uuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
profile_pic_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
declare const _2chatListContacts: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
30
|
+
page_number?: number | undefined;
|
|
31
|
+
channel_uuid?: string | undefined;
|
|
32
|
+
results_per_page?: number | undefined;
|
|
33
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
34
|
//#endregion
|
|
8
35
|
export { _2chatListContacts };
|
|
9
36
|
//# sourceMappingURL=list-contacts.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-contacts.d.mts","names":[],"sources":["../../src/actions/list-contacts.ts"],"mappings":";;;cAIa,uBAAA,
|
|
1
|
+
{"version":3,"file":"list-contacts.d.mts","names":[],"sources":["../../src/actions/list-contacts.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;cAKvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAqBxB,kBAAA,gCAAkB,wBAAA"}
|
|
@@ -10,17 +10,17 @@ const _2chatListContacts = action("_2CHAT_LIST_CONTACTS", {
|
|
|
10
10
|
results_per_page: z.number().int().describe("Number of results returned per page. Must be between 1 and 50.").optional()
|
|
11
11
|
}).describe("Request model for listing contacts in a 2Chat account."),
|
|
12
12
|
output: z.object({
|
|
13
|
-
page: z.number().int().describe("Zero-indexed page number of the returned results."),
|
|
14
|
-
count: z.number().int().describe("Total number of contacts available."),
|
|
15
|
-
success: z.boolean().describe("Indicates whether the request was successful."),
|
|
13
|
+
page: z.number().int().describe("Zero-indexed page number of the returned results.").nullable(),
|
|
14
|
+
count: z.number().int().describe("Total number of contacts available.").nullable(),
|
|
15
|
+
success: z.boolean().describe("Indicates whether the request was successful.").nullable(),
|
|
16
16
|
contacts: z.array(z.object({
|
|
17
|
-
id: z.number().int().describe("Internal contact ID."),
|
|
18
|
-
uuid: z.string().describe("Universal unique identifier for the contact."),
|
|
17
|
+
id: z.number().int().describe("Internal contact ID.").nullable(),
|
|
18
|
+
uuid: z.string().describe("Universal unique identifier for the contact.").nullable(),
|
|
19
19
|
details: z.array(z.object({
|
|
20
|
-
id: z.number().int().describe("Unique detail ID."),
|
|
21
|
-
type: z.string().describe("Detail type (e.g., 'WAPH' for WhatsApp phone, 'E' for email)."),
|
|
22
|
-
value: z.string().describe("The contact detail value (e.g., phone number, email)."),
|
|
23
|
-
created_at: z.string().describe("Timestamp when the detail was created."),
|
|
20
|
+
id: z.number().int().describe("Unique detail ID.").nullable(),
|
|
21
|
+
type: z.string().describe("Detail type (e.g., 'WAPH' for WhatsApp phone, 'E' for email).").nullable(),
|
|
22
|
+
value: z.string().describe("The contact detail value (e.g., phone number, email).").nullable(),
|
|
23
|
+
created_at: z.string().describe("Timestamp when the detail was created.").nullable(),
|
|
24
24
|
updated_at: z.string().describe("Timestamp when the detail was last updated, if applicable.").nullable().optional()
|
|
25
25
|
}).describe("Detail information for a contact (e.g., phone or email).")).describe("List of contact details such as phone numbers and emails."),
|
|
26
26
|
last_name: z.string().describe("Last name of the contact.").nullable().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-contacts.mjs","names":[],"sources":["../../src/actions/list-contacts.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatListContactsInput
|
|
1
|
+
{"version":3,"file":"list-contacts.mjs","names":[],"sources":["../../src/actions/list-contacts.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatListContactsInput = z.object({\n page_number: z.number().int().describe(\"Zero-indexed page number to retrieve.\").optional(),\n channel_uuid: z.string().describe(\"Optional. Used to filter contacts by connected number UUID.\").optional(),\n results_per_page: z.number().int().describe(\"Number of results returned per page. Must be between 1 and 50.\").optional(),\n}).describe(\"Request model for listing contacts in a 2Chat account.\");\nexport const _2chatListContactsOutput = z.object({\n page: z.number().int().describe(\"Zero-indexed page number of the returned results.\").nullable(),\n count: z.number().int().describe(\"Total number of contacts available.\").nullable(),\n success: z.boolean().describe(\"Indicates whether the request was successful.\").nullable(),\n contacts: z.array(z.object({\n id: z.number().int().describe(\"Internal contact ID.\").nullable(),\n uuid: z.string().describe(\"Universal unique identifier for the contact.\").nullable(),\n details: z.array(z.object({\n id: z.number().int().describe(\"Unique detail ID.\").nullable(),\n type: z.string().describe(\"Detail type (e.g., 'WAPH' for WhatsApp phone, 'E' for email).\").nullable(),\n value: z.string().describe(\"The contact detail value (e.g., phone number, email).\").nullable(),\n created_at: z.string().describe(\"Timestamp when the detail was created.\").nullable(),\n updated_at: z.string().describe(\"Timestamp when the detail was last updated, if applicable.\").nullable().optional(),\n}).describe(\"Detail information for a contact (e.g., phone or email).\")).describe(\"List of contact details such as phone numbers and emails.\"),\n last_name: z.string().describe(\"Last name of the contact.\").nullable().optional(),\n first_name: z.string().describe(\"First name of the contact.\").nullable().optional(),\n channel_uuid: z.string().describe(\"UUID of the channel (phone number) associated with this contact, if any.\").nullable().optional(),\n profile_pic_url: z.string().describe(\"URL to the contact's profile picture, if available.\").nullable().optional(),\n}).describe(\"Represents a contact in the 2Chat account.\")).describe(\"List of contacts on this page.\"),\n}).describe(\"Data from the action execution\");\n\nexport const _2chatListContacts = action(\"_2CHAT_LIST_CONTACTS\", {\n slug: \"_2chat-list-contacts\",\n name: \"List Contacts\",\n description: \"Tool to list all contacts in your 2Chat account. Use when you need to retrieve your contact list after confirming your account connection.\",\n input: _2chatListContactsInput,\n output: _2chatListContactsOutput,\n});\n"],"mappings":";;AA8BA,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA9BqC,EAAE,OAAO;EAC9C,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;EACzF,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;EAC1G,kBAAkB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CACzH,CAAC,CAAC,CAAC,SAAS,wDA0BH;CACP,QA1BsC,EAAE,OAAO;EAC/C,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;EAC9F,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS;EACjF,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;EACxF,UAAU,EAAE,MAAM,EAAE,OAAO;GAC3B,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,SAAS;GAC/D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;GACnF,SAAS,EAAE,MAAM,EAAE,OAAO;IAC1B,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mBAAmB,CAAC,CAAC,SAAS;IAC5D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;IACpG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;IAC7F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;IACnF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;GACpH,CAAC,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,CAAC,SAAS,2DAA2D;GAC3I,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,2BAA2B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;GAChF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,4BAA4B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;GAClF,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;GAClI,iBAAiB,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAClH,CAAC,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,CAAC,SAAS,gCAAgC;CACpG,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
|
|
@@ -3,14 +3,14 @@ let zod = require("zod");
|
|
|
3
3
|
//#region src/actions/list-webhooks.ts
|
|
4
4
|
const _2chatListWebhooksInput = zod.z.object({}).describe("Request model for listing all configured webhook subscriptions.");
|
|
5
5
|
const _2chatListWebhooksOutput = zod.z.object({
|
|
6
|
-
success: zod.z.boolean().describe("Whether the API request succeeded. True indicates successful retrieval."),
|
|
6
|
+
success: zod.z.boolean().describe("Whether the API request succeeded. True indicates successful retrieval.").nullable(),
|
|
7
7
|
webhooks: zod.z.array(zod.z.object({
|
|
8
|
-
uuid: zod.z.string().describe("Unique webhook subscription identifier. Required for deletion or management operations."),
|
|
9
|
-
hook_url: zod.z.string().describe("Callback URL where 2Chat sends event notifications via HTTP POST."),
|
|
10
|
-
created_at: zod.z.string().describe("Webhook creation timestamp in ISO 8601 format (UTC)."),
|
|
11
|
-
event_name: zod.z.string().describe("Event type this webhook listens to (e.g., 'whatsapp.message.received', 'whatsapp.call.received')."),
|
|
12
|
-
hook_params: zod.z.object({ waweb_uuid: zod.z.string().describe("Channel UUID used for webhook routing. This value is automatically included by 2Chat in webhook payloads.") }).describe("Additional parameters automatically included in webhook payloads by 2Chat."),
|
|
13
|
-
channel_uuid: zod.z.string().describe("WhatsApp channel/phone number UUID this webhook monitors.")
|
|
8
|
+
uuid: zod.z.string().describe("Unique webhook subscription identifier. Required for deletion or management operations.").nullable(),
|
|
9
|
+
hook_url: zod.z.string().describe("Callback URL where 2Chat sends event notifications via HTTP POST.").nullable(),
|
|
10
|
+
created_at: zod.z.string().describe("Webhook creation timestamp in ISO 8601 format (UTC).").nullable(),
|
|
11
|
+
event_name: zod.z.string().describe("Event type this webhook listens to (e.g., 'whatsapp.message.received', 'whatsapp.call.received').").nullable(),
|
|
12
|
+
hook_params: zod.z.object({ waweb_uuid: zod.z.string().describe("Channel UUID used for webhook routing. This value is automatically included by 2Chat in webhook payloads.").nullable() }).describe("Additional parameters automatically included in webhook payloads by 2Chat."),
|
|
13
|
+
channel_uuid: zod.z.string().describe("WhatsApp channel/phone number UUID this webhook monitors.").nullable()
|
|
14
14
|
})).describe("Array of active webhook subscriptions. Empty list if no webhooks are configured.")
|
|
15
15
|
}).describe("Data from the action execution");
|
|
16
16
|
const _2chatListWebhooks = require_action.action("_2CHAT_LIST_WEBHOOKS", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-webhooks.cjs","names":["z","action"],"sources":["../../src/actions/list-webhooks.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatListWebhooksInput
|
|
1
|
+
{"version":3,"file":"list-webhooks.cjs","names":["z","action"],"sources":["../../src/actions/list-webhooks.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatListWebhooksInput = z.object({}).describe(\"Request model for listing all configured webhook subscriptions.\");\nexport const _2chatListWebhooksOutput = z.object({\n success: z.boolean().describe(\"Whether the API request succeeded. True indicates successful retrieval.\").nullable(),\n webhooks: z.array(z.object({\n uuid: z.string().describe(\"Unique webhook subscription identifier. Required for deletion or management operations.\").nullable(),\n hook_url: z.string().describe(\"Callback URL where 2Chat sends event notifications via HTTP POST.\").nullable(),\n created_at: z.string().describe(\"Webhook creation timestamp in ISO 8601 format (UTC).\").nullable(),\n event_name: z.string().describe(\"Event type this webhook listens to (e.g., 'whatsapp.message.received', 'whatsapp.call.received').\").nullable(),\n hook_params: z.object({\n waweb_uuid: z.string().describe(\"Channel UUID used for webhook routing. This value is automatically included by 2Chat in webhook payloads.\").nullable(),\n}).describe(\"Additional parameters automatically included in webhook payloads by 2Chat.\"),\n channel_uuid: z.string().describe(\"WhatsApp channel/phone number UUID this webhook monitors.\").nullable(),\n})).describe(\"Array of active webhook subscriptions. Empty list if no webhooks are configured.\"),\n}).describe(\"Data from the action execution\");\n\nexport const _2chatListWebhooks = action(\"_2CHAT_LIST_WEBHOOKS\", {\n slug: \"_2chat-list-webhooks\",\n name: \"List Webhook Subscriptions\",\n description: \"List all configured webhook subscriptions for WhatsApp and phone call events. Use this when you need to audit, review, or retrieve UUIDs of your active webhook subscriptions. Returns details including webhook UUID, event type, channel UUID, callback URL, and creation timestamp.\",\n input: _2chatListWebhooksInput,\n output: _2chatListWebhooksOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAA0BA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,iEAAiE;AAC9H,MAAa,2BAA2BA,IAAAA,EAAE,OAAO;CAC/C,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,yEAAyE,CAAC,CAAC,SAAS;CAClH,UAAUA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAC3B,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF,CAAC,CAAC,SAAS;EAC9H,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;EAC5G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS;EACjG,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS;EAC9I,aAAaA,IAAAA,EAAE,OAAO,EACtB,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2GAA2G,CAAC,CAAC,SAAS,EACxJ,CAAC,CAAC,CAAC,SAAS,4EAA4E;EACtF,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS;CAC1G,CAAC,CAAC,CAAC,CAAC,SAAS,kFAAkF;AAC/F,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/list-webhooks.d.ts
|
|
4
|
-
declare const _2chatListWebhooksInput: z.
|
|
5
|
-
declare const _2chatListWebhooksOutput: z.
|
|
6
|
-
|
|
4
|
+
declare const _2chatListWebhooksInput: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
declare const _2chatListWebhooksOutput: z.ZodObject<{
|
|
6
|
+
success: z.ZodNullable<z.ZodBoolean>;
|
|
7
|
+
webhooks: z.ZodArray<z.ZodObject<{
|
|
8
|
+
uuid: z.ZodNullable<z.ZodString>;
|
|
9
|
+
hook_url: z.ZodNullable<z.ZodString>;
|
|
10
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
11
|
+
event_name: z.ZodNullable<z.ZodString>;
|
|
12
|
+
hook_params: z.ZodObject<{
|
|
13
|
+
waweb_uuid: z.ZodNullable<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
channel_uuid: z.ZodNullable<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
declare const _2chatListWebhooks: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
19
|
//#endregion
|
|
8
20
|
export { _2chatListWebhooks };
|
|
9
21
|
//# sourceMappingURL=list-webhooks.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-webhooks.d.cts","names":[],"sources":["../../src/actions/list-webhooks.ts"],"mappings":";;;cAIa,uBAAA,
|
|
1
|
+
{"version":3,"file":"list-webhooks.d.cts","names":[],"sources":["../../src/actions/list-webhooks.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cACvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAcxB,kBAAA,gCAAkB,wBAAA,CAAA,MAAA,wDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/list-webhooks.d.ts
|
|
4
|
-
declare const _2chatListWebhooksInput: z.
|
|
5
|
-
declare const _2chatListWebhooksOutput: z.
|
|
6
|
-
|
|
4
|
+
declare const _2chatListWebhooksInput: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
declare const _2chatListWebhooksOutput: z.ZodObject<{
|
|
6
|
+
success: z.ZodNullable<z.ZodBoolean>;
|
|
7
|
+
webhooks: z.ZodArray<z.ZodObject<{
|
|
8
|
+
uuid: z.ZodNullable<z.ZodString>;
|
|
9
|
+
hook_url: z.ZodNullable<z.ZodString>;
|
|
10
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
11
|
+
event_name: z.ZodNullable<z.ZodString>;
|
|
12
|
+
hook_params: z.ZodObject<{
|
|
13
|
+
waweb_uuid: z.ZodNullable<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
channel_uuid: z.ZodNullable<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
declare const _2chatListWebhooks: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
19
|
//#endregion
|
|
8
20
|
export { _2chatListWebhooks };
|
|
9
21
|
//# sourceMappingURL=list-webhooks.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-webhooks.d.mts","names":[],"sources":["../../src/actions/list-webhooks.ts"],"mappings":";;;cAIa,uBAAA,
|
|
1
|
+
{"version":3,"file":"list-webhooks.d.mts","names":[],"sources":["../../src/actions/list-webhooks.ts"],"mappings":";;;cAIa,uBAAA,EAAuB,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cACvB,wBAAA,EAAwB,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAcxB,kBAAA,gCAAkB,wBAAA,CAAA,MAAA,wDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -6,14 +6,14 @@ const _2chatListWebhooks = action("_2CHAT_LIST_WEBHOOKS", {
|
|
|
6
6
|
description: "List all configured webhook subscriptions for WhatsApp and phone call events. Use this when you need to audit, review, or retrieve UUIDs of your active webhook subscriptions. Returns details including webhook UUID, event type, channel UUID, callback URL, and creation timestamp.",
|
|
7
7
|
input: z.object({}).describe("Request model for listing all configured webhook subscriptions."),
|
|
8
8
|
output: z.object({
|
|
9
|
-
success: z.boolean().describe("Whether the API request succeeded. True indicates successful retrieval."),
|
|
9
|
+
success: z.boolean().describe("Whether the API request succeeded. True indicates successful retrieval.").nullable(),
|
|
10
10
|
webhooks: z.array(z.object({
|
|
11
|
-
uuid: z.string().describe("Unique webhook subscription identifier. Required for deletion or management operations."),
|
|
12
|
-
hook_url: z.string().describe("Callback URL where 2Chat sends event notifications via HTTP POST."),
|
|
13
|
-
created_at: z.string().describe("Webhook creation timestamp in ISO 8601 format (UTC)."),
|
|
14
|
-
event_name: z.string().describe("Event type this webhook listens to (e.g., 'whatsapp.message.received', 'whatsapp.call.received')."),
|
|
15
|
-
hook_params: z.object({ waweb_uuid: z.string().describe("Channel UUID used for webhook routing. This value is automatically included by 2Chat in webhook payloads.") }).describe("Additional parameters automatically included in webhook payloads by 2Chat."),
|
|
16
|
-
channel_uuid: z.string().describe("WhatsApp channel/phone number UUID this webhook monitors.")
|
|
11
|
+
uuid: z.string().describe("Unique webhook subscription identifier. Required for deletion or management operations.").nullable(),
|
|
12
|
+
hook_url: z.string().describe("Callback URL where 2Chat sends event notifications via HTTP POST.").nullable(),
|
|
13
|
+
created_at: z.string().describe("Webhook creation timestamp in ISO 8601 format (UTC).").nullable(),
|
|
14
|
+
event_name: z.string().describe("Event type this webhook listens to (e.g., 'whatsapp.message.received', 'whatsapp.call.received').").nullable(),
|
|
15
|
+
hook_params: z.object({ waweb_uuid: z.string().describe("Channel UUID used for webhook routing. This value is automatically included by 2Chat in webhook payloads.").nullable() }).describe("Additional parameters automatically included in webhook payloads by 2Chat."),
|
|
16
|
+
channel_uuid: z.string().describe("WhatsApp channel/phone number UUID this webhook monitors.").nullable()
|
|
17
17
|
})).describe("Array of active webhook subscriptions. Empty list if no webhooks are configured.")
|
|
18
18
|
}).describe("Data from the action execution")
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-webhooks.mjs","names":[],"sources":["../../src/actions/list-webhooks.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatListWebhooksInput
|
|
1
|
+
{"version":3,"file":"list-webhooks.mjs","names":[],"sources":["../../src/actions/list-webhooks.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatListWebhooksInput = z.object({}).describe(\"Request model for listing all configured webhook subscriptions.\");\nexport const _2chatListWebhooksOutput = z.object({\n success: z.boolean().describe(\"Whether the API request succeeded. True indicates successful retrieval.\").nullable(),\n webhooks: z.array(z.object({\n uuid: z.string().describe(\"Unique webhook subscription identifier. Required for deletion or management operations.\").nullable(),\n hook_url: z.string().describe(\"Callback URL where 2Chat sends event notifications via HTTP POST.\").nullable(),\n created_at: z.string().describe(\"Webhook creation timestamp in ISO 8601 format (UTC).\").nullable(),\n event_name: z.string().describe(\"Event type this webhook listens to (e.g., 'whatsapp.message.received', 'whatsapp.call.received').\").nullable(),\n hook_params: z.object({\n waweb_uuid: z.string().describe(\"Channel UUID used for webhook routing. This value is automatically included by 2Chat in webhook payloads.\").nullable(),\n}).describe(\"Additional parameters automatically included in webhook payloads by 2Chat.\"),\n channel_uuid: z.string().describe(\"WhatsApp channel/phone number UUID this webhook monitors.\").nullable(),\n})).describe(\"Array of active webhook subscriptions. Empty list if no webhooks are configured.\"),\n}).describe(\"Data from the action execution\");\n\nexport const _2chatListWebhooks = action(\"_2CHAT_LIST_WEBHOOKS\", {\n slug: \"_2chat-list-webhooks\",\n name: \"List Webhook Subscriptions\",\n description: \"List all configured webhook subscriptions for WhatsApp and phone call events. Use this when you need to audit, review, or retrieve UUIDs of your active webhook subscriptions. Returns details including webhook UUID, event type, channel UUID, callback URL, and creation timestamp.\",\n input: _2chatListWebhooksInput,\n output: _2chatListWebhooksOutput,\n});\n"],"mappings":";;AAmBA,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAnBqC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,iEAmBpD;CACP,QAnBsC,EAAE,OAAO;EAC/C,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,yEAAyE,CAAC,CAAC,SAAS;EAClH,UAAU,EAAE,MAAM,EAAE,OAAO;GAC3B,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,yFAAyF,CAAC,CAAC,SAAS;GAC9H,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;GAC5G,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS;GACjG,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,mGAAmG,CAAC,CAAC,SAAS;GAC9I,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,2GAA2G,CAAC,CAAC,SAAS,EACxJ,CAAC,CAAC,CAAC,SAAS,4EAA4E;GACtF,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS;EAC1G,CAAC,CAAC,CAAC,CAAC,SAAS,kFAAkF;CAC/F,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
|
|
@@ -4,21 +4,21 @@ let zod = require("zod");
|
|
|
4
4
|
const _2chatTestApiKeyInput = zod.z.object({}).describe("Request model for validating API key and retrieving account information. No parameters required.");
|
|
5
5
|
const _2chatTestApiKeyOutput = zod.z.object({
|
|
6
6
|
usage: zod.z.object({
|
|
7
|
-
api_requests_available: zod.z.number().int().describe("Number of API requests remaining in current period"),
|
|
8
|
-
api_requests_plan_default: zod.z.number().int().describe("Total number of API requests allocated in the plan"),
|
|
9
|
-
number_check_requests_available: zod.z.number().int().describe("Number of phone number check requests remaining"),
|
|
10
|
-
number_check_requests_plan_default: zod.z.number().int().describe("Total number of phone number check requests allocated in the plan")
|
|
7
|
+
api_requests_available: zod.z.number().int().describe("Number of API requests remaining in current period").nullable(),
|
|
8
|
+
api_requests_plan_default: zod.z.number().int().describe("Total number of API requests allocated in the plan").nullable(),
|
|
9
|
+
number_check_requests_available: zod.z.number().int().describe("Number of phone number check requests remaining").nullable(),
|
|
10
|
+
number_check_requests_plan_default: zod.z.number().int().describe("Total number of phone number check requests allocated in the plan").nullable()
|
|
11
11
|
}).describe("Current API usage statistics and remaining quotas"),
|
|
12
|
-
limits: zod.z.object({ requests_per_minute: zod.z.number().int().describe("Maximum number of API requests allowed per minute") }).describe("API rate limits (requests per minute)"),
|
|
12
|
+
limits: zod.z.object({ requests_per_minute: zod.z.number().int().describe("Maximum number of API requests allowed per minute").nullable() }).describe("API rate limits (requests per minute)"),
|
|
13
13
|
account: zod.z.object({
|
|
14
|
-
name: zod.z.string().describe("Account name"),
|
|
15
|
-
uuid: zod.z.string().describe("Unique account identifier (UUID format)"),
|
|
16
|
-
blocked: zod.z.boolean().describe("Whether the account is blocked"),
|
|
17
|
-
on_trial: zod.z.boolean().describe("Whether the account is currently on a trial period"),
|
|
18
|
-
created_at: zod.z.string().describe("Account creation timestamp in ISO 8601 format"),
|
|
19
|
-
expires_at: zod.z.string().describe("Account expiration timestamp in ISO 8601 format")
|
|
14
|
+
name: zod.z.string().describe("Account name").nullable(),
|
|
15
|
+
uuid: zod.z.string().describe("Unique account identifier (UUID format)").nullable(),
|
|
16
|
+
blocked: zod.z.boolean().describe("Whether the account is blocked").nullable(),
|
|
17
|
+
on_trial: zod.z.boolean().describe("Whether the account is currently on a trial period").nullable(),
|
|
18
|
+
created_at: zod.z.string().describe("Account creation timestamp in ISO 8601 format").nullable(),
|
|
19
|
+
expires_at: zod.z.string().describe("Account expiration timestamp in ISO 8601 format").nullable()
|
|
20
20
|
}).describe("Detailed account information including name, UUID, trial status, and timestamps"),
|
|
21
|
-
success: zod.z.boolean().describe("Indicates if the API key is valid")
|
|
21
|
+
success: zod.z.boolean().describe("Indicates if the API key is valid").nullable()
|
|
22
22
|
}).describe("Data from the action execution");
|
|
23
23
|
const _2chatTestApiKey = require_action.action("_2CHAT_TEST_API_KEY", {
|
|
24
24
|
slug: "_2chat-test-api-key",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-api-key.cjs","names":["z","action"],"sources":["../../src/actions/test-api-key.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatTestApiKeyInput
|
|
1
|
+
{"version":3,"file":"test-api-key.cjs","names":["z","action"],"sources":["../../src/actions/test-api-key.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatTestApiKeyInput = z.object({}).describe(\"Request model for validating API key and retrieving account information. No parameters required.\");\nexport const _2chatTestApiKeyOutput = z.object({\n usage: z.object({\n api_requests_available: z.number().int().describe(\"Number of API requests remaining in current period\").nullable(),\n api_requests_plan_default: z.number().int().describe(\"Total number of API requests allocated in the plan\").nullable(),\n number_check_requests_available: z.number().int().describe(\"Number of phone number check requests remaining\").nullable(),\n number_check_requests_plan_default: z.number().int().describe(\"Total number of phone number check requests allocated in the plan\").nullable(),\n}).describe(\"Current API usage statistics and remaining quotas\"),\n limits: z.object({\n requests_per_minute: z.number().int().describe(\"Maximum number of API requests allowed per minute\").nullable(),\n}).describe(\"API rate limits (requests per minute)\"),\n account: z.object({\n name: z.string().describe(\"Account name\").nullable(),\n uuid: z.string().describe(\"Unique account identifier (UUID format)\").nullable(),\n blocked: z.boolean().describe(\"Whether the account is blocked\").nullable(),\n on_trial: z.boolean().describe(\"Whether the account is currently on a trial period\").nullable(),\n created_at: z.string().describe(\"Account creation timestamp in ISO 8601 format\").nullable(),\n expires_at: z.string().describe(\"Account expiration timestamp in ISO 8601 format\").nullable(),\n}).describe(\"Detailed account information including name, UUID, trial status, and timestamps\"),\n success: z.boolean().describe(\"Indicates if the API key is valid\").nullable(),\n}).describe(\"Data from the action execution\");\n\nexport const _2chatTestApiKey = action(\"_2CHAT_TEST_API_KEY\", {\n slug: \"_2chat-test-api-key\",\n name: \"Test API Key\",\n description: \"Tool to validate your API key and retrieve account info. Use when confirming credentials before performing other operations.\",\n input: _2chatTestApiKeyInput,\n output: _2chatTestApiKeyOutput,\n});\n"],"mappings":";;;AAIA,MAAa,wBAAwBA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,kGAAkG;AAC7J,MAAa,yBAAyBA,IAAAA,EAAE,OAAO;CAC7C,OAAOA,IAAAA,EAAE,OAAO;EAChB,wBAAwBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;EACjH,2BAA2BA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;EACpH,iCAAiCA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;EACvH,oCAAoCA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;CAC9I,CAAC,CAAC,CAAC,SAAS,mDAAmD;CAC7D,QAAQA,IAAAA,EAAE,OAAO,EACjB,qBAAqBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,EAC/G,CAAC,CAAC,CAAC,SAAS,uCAAuC;CACjD,SAASA,IAAAA,EAAE,OAAO;EAClB,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,cAAc,CAAC,CAAC,SAAS;EACnD,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;EAC9E,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;EACzE,UAAUA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;EAC9F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;EAC1F,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;CAC9F,CAAC,CAAC,CAAC,SAAS,iFAAiF;CAC3F,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;AAC9E,CAAC,CAAC,CAAC,SAAS,gCAAgC;AAE5C,MAAa,mBAAmBC,eAAAA,OAAO,uBAAuB;CAC5D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/test-api-key.d.ts
|
|
4
|
-
declare const _2chatTestApiKeyInput: z.
|
|
5
|
-
declare const _2chatTestApiKeyOutput: z.
|
|
6
|
-
|
|
4
|
+
declare const _2chatTestApiKeyInput: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
declare const _2chatTestApiKeyOutput: z.ZodObject<{
|
|
6
|
+
usage: z.ZodObject<{
|
|
7
|
+
api_requests_available: z.ZodNullable<z.ZodNumber>;
|
|
8
|
+
api_requests_plan_default: z.ZodNullable<z.ZodNumber>;
|
|
9
|
+
number_check_requests_available: z.ZodNullable<z.ZodNumber>;
|
|
10
|
+
number_check_requests_plan_default: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
limits: z.ZodObject<{
|
|
13
|
+
requests_per_minute: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
account: z.ZodObject<{
|
|
16
|
+
name: z.ZodNullable<z.ZodString>;
|
|
17
|
+
uuid: z.ZodNullable<z.ZodString>;
|
|
18
|
+
blocked: z.ZodNullable<z.ZodBoolean>;
|
|
19
|
+
on_trial: z.ZodNullable<z.ZodBoolean>;
|
|
20
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
21
|
+
expires_at: z.ZodNullable<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
success: z.ZodNullable<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
declare const _2chatTestApiKey: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
26
|
//#endregion
|
|
8
27
|
export { _2chatTestApiKey };
|
|
9
28
|
//# sourceMappingURL=test-api-key.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-api-key.d.cts","names":[],"sources":["../../src/actions/test-api-key.ts"],"mappings":";;;cAIa,qBAAA,
|
|
1
|
+
{"version":3,"file":"test-api-key.d.cts","names":[],"sources":["../../src/actions/test-api-key.ts"],"mappings":";;;cAIa,qBAAA,EAAqB,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cACrB,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAqBtB,gBAAA,gCAAgB,wBAAA,CAAA,MAAA,wDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/test-api-key.d.ts
|
|
4
|
-
declare const _2chatTestApiKeyInput: z.
|
|
5
|
-
declare const _2chatTestApiKeyOutput: z.
|
|
6
|
-
|
|
4
|
+
declare const _2chatTestApiKeyInput: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
+
declare const _2chatTestApiKeyOutput: z.ZodObject<{
|
|
6
|
+
usage: z.ZodObject<{
|
|
7
|
+
api_requests_available: z.ZodNullable<z.ZodNumber>;
|
|
8
|
+
api_requests_plan_default: z.ZodNullable<z.ZodNumber>;
|
|
9
|
+
number_check_requests_available: z.ZodNullable<z.ZodNumber>;
|
|
10
|
+
number_check_requests_plan_default: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
limits: z.ZodObject<{
|
|
13
|
+
requests_per_minute: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
account: z.ZodObject<{
|
|
16
|
+
name: z.ZodNullable<z.ZodString>;
|
|
17
|
+
uuid: z.ZodNullable<z.ZodString>;
|
|
18
|
+
blocked: z.ZodNullable<z.ZodBoolean>;
|
|
19
|
+
on_trial: z.ZodNullable<z.ZodBoolean>;
|
|
20
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
21
|
+
expires_at: z.ZodNullable<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
success: z.ZodNullable<z.ZodBoolean>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
declare const _2chatTestApiKey: import("@keystrokehq/action").WorkflowActionDefinition<Record<string, never>, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
26
|
//#endregion
|
|
8
27
|
export { _2chatTestApiKey };
|
|
9
28
|
//# sourceMappingURL=test-api-key.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-api-key.d.mts","names":[],"sources":["../../src/actions/test-api-key.ts"],"mappings":";;;cAIa,qBAAA,
|
|
1
|
+
{"version":3,"file":"test-api-key.d.mts","names":[],"sources":["../../src/actions/test-api-key.ts"],"mappings":";;;cAIa,qBAAA,EAAqB,CAAA,CAAA,SAAA,KAAA,CAAA,CAAA,IAAA,CAAA,MAAA;AAAA,cACrB,sBAAA,EAAsB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;cAqBtB,gBAAA,gCAAgB,wBAAA,CAAA,MAAA,wDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -7,21 +7,21 @@ const _2chatTestApiKey = action("_2CHAT_TEST_API_KEY", {
|
|
|
7
7
|
input: z.object({}).describe("Request model for validating API key and retrieving account information. No parameters required."),
|
|
8
8
|
output: z.object({
|
|
9
9
|
usage: z.object({
|
|
10
|
-
api_requests_available: z.number().int().describe("Number of API requests remaining in current period"),
|
|
11
|
-
api_requests_plan_default: z.number().int().describe("Total number of API requests allocated in the plan"),
|
|
12
|
-
number_check_requests_available: z.number().int().describe("Number of phone number check requests remaining"),
|
|
13
|
-
number_check_requests_plan_default: z.number().int().describe("Total number of phone number check requests allocated in the plan")
|
|
10
|
+
api_requests_available: z.number().int().describe("Number of API requests remaining in current period").nullable(),
|
|
11
|
+
api_requests_plan_default: z.number().int().describe("Total number of API requests allocated in the plan").nullable(),
|
|
12
|
+
number_check_requests_available: z.number().int().describe("Number of phone number check requests remaining").nullable(),
|
|
13
|
+
number_check_requests_plan_default: z.number().int().describe("Total number of phone number check requests allocated in the plan").nullable()
|
|
14
14
|
}).describe("Current API usage statistics and remaining quotas"),
|
|
15
|
-
limits: z.object({ requests_per_minute: z.number().int().describe("Maximum number of API requests allowed per minute") }).describe("API rate limits (requests per minute)"),
|
|
15
|
+
limits: z.object({ requests_per_minute: z.number().int().describe("Maximum number of API requests allowed per minute").nullable() }).describe("API rate limits (requests per minute)"),
|
|
16
16
|
account: z.object({
|
|
17
|
-
name: z.string().describe("Account name"),
|
|
18
|
-
uuid: z.string().describe("Unique account identifier (UUID format)"),
|
|
19
|
-
blocked: z.boolean().describe("Whether the account is blocked"),
|
|
20
|
-
on_trial: z.boolean().describe("Whether the account is currently on a trial period"),
|
|
21
|
-
created_at: z.string().describe("Account creation timestamp in ISO 8601 format"),
|
|
22
|
-
expires_at: z.string().describe("Account expiration timestamp in ISO 8601 format")
|
|
17
|
+
name: z.string().describe("Account name").nullable(),
|
|
18
|
+
uuid: z.string().describe("Unique account identifier (UUID format)").nullable(),
|
|
19
|
+
blocked: z.boolean().describe("Whether the account is blocked").nullable(),
|
|
20
|
+
on_trial: z.boolean().describe("Whether the account is currently on a trial period").nullable(),
|
|
21
|
+
created_at: z.string().describe("Account creation timestamp in ISO 8601 format").nullable(),
|
|
22
|
+
expires_at: z.string().describe("Account expiration timestamp in ISO 8601 format").nullable()
|
|
23
23
|
}).describe("Detailed account information including name, UUID, trial status, and timestamps"),
|
|
24
|
-
success: z.boolean().describe("Indicates if the API key is valid")
|
|
24
|
+
success: z.boolean().describe("Indicates if the API key is valid").nullable()
|
|
25
25
|
}).describe("Data from the action execution")
|
|
26
26
|
});
|
|
27
27
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-api-key.mjs","names":[],"sources":["../../src/actions/test-api-key.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatTestApiKeyInput
|
|
1
|
+
{"version":3,"file":"test-api-key.mjs","names":[],"sources":["../../src/actions/test-api-key.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const _2chatTestApiKeyInput = z.object({}).describe(\"Request model for validating API key and retrieving account information. No parameters required.\");\nexport const _2chatTestApiKeyOutput = z.object({\n usage: z.object({\n api_requests_available: z.number().int().describe(\"Number of API requests remaining in current period\").nullable(),\n api_requests_plan_default: z.number().int().describe(\"Total number of API requests allocated in the plan\").nullable(),\n number_check_requests_available: z.number().int().describe(\"Number of phone number check requests remaining\").nullable(),\n number_check_requests_plan_default: z.number().int().describe(\"Total number of phone number check requests allocated in the plan\").nullable(),\n}).describe(\"Current API usage statistics and remaining quotas\"),\n limits: z.object({\n requests_per_minute: z.number().int().describe(\"Maximum number of API requests allowed per minute\").nullable(),\n}).describe(\"API rate limits (requests per minute)\"),\n account: z.object({\n name: z.string().describe(\"Account name\").nullable(),\n uuid: z.string().describe(\"Unique account identifier (UUID format)\").nullable(),\n blocked: z.boolean().describe(\"Whether the account is blocked\").nullable(),\n on_trial: z.boolean().describe(\"Whether the account is currently on a trial period\").nullable(),\n created_at: z.string().describe(\"Account creation timestamp in ISO 8601 format\").nullable(),\n expires_at: z.string().describe(\"Account expiration timestamp in ISO 8601 format\").nullable(),\n}).describe(\"Detailed account information including name, UUID, trial status, and timestamps\"),\n success: z.boolean().describe(\"Indicates if the API key is valid\").nullable(),\n}).describe(\"Data from the action execution\");\n\nexport const _2chatTestApiKey = action(\"_2CHAT_TEST_API_KEY\", {\n slug: \"_2chat-test-api-key\",\n name: \"Test API Key\",\n description: \"Tool to validate your API key and retrieve account info. Use when confirming credentials before performing other operations.\",\n input: _2chatTestApiKeyInput,\n output: _2chatTestApiKeyOutput,\n});\n"],"mappings":";;AA0BA,MAAa,mBAAmB,OAAO,uBAAuB;CAC5D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA1BmC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,kGA0BlD;CACP,QA1BoC,EAAE,OAAO;EAC7C,OAAO,EAAE,OAAO;GAChB,wBAAwB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;GACjH,2BAA2B,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;GACpH,iCAAiC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;GACvH,oCAAoC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;EAC9I,CAAC,CAAC,CAAC,SAAS,mDAAmD;EAC7D,QAAQ,EAAE,OAAO,EACjB,qBAAqB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS,EAC/G,CAAC,CAAC,CAAC,SAAS,uCAAuC;EACjD,SAAS,EAAE,OAAO;GAClB,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,cAAc,CAAC,CAAC,SAAS;GACnD,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;GAC9E,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;GACzE,UAAU,EAAE,QAAQ,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;GAC9F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,+CAA+C,CAAC,CAAC,SAAS;GAC1F,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;EAC9F,CAAC,CAAC,CAAC,SAAS,iFAAiF;EAC3F,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CAC9E,CAAC,CAAC,CAAC,SAAS,gCAOF;AACV,CAAC"}
|
package/dist/catalog.cjs
CHANGED
|
@@ -7,7 +7,13 @@ const _2chatCatalog = {
|
|
|
7
7
|
"category": "Communication",
|
|
8
8
|
"logo": "https://logos.composio.dev/api/_2chat",
|
|
9
9
|
"authKind": "keystroke",
|
|
10
|
-
"oauthScopes": []
|
|
10
|
+
"oauthScopes": [],
|
|
11
|
+
"credentialFields": { "api_key": {
|
|
12
|
+
"label": "2Chat API Key",
|
|
13
|
+
"secret": true,
|
|
14
|
+
"description": "Your 2Chat API Key"
|
|
15
|
+
} },
|
|
16
|
+
"credentialScheme": "API_KEY"
|
|
11
17
|
};
|
|
12
18
|
//#endregion
|
|
13
19
|
exports._2chatCatalog = _2chatCatalog;
|
package/dist/catalog.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.cjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const _2chatCatalog = {\n \"slug\": \"_2chat\",\n \"name\": \"2chat\",\n \"description\": \"2Chat provides a programmable API for integrating WhatsApp and other text channels, enabling developers to send and receive messages, manage groups, and automate workflows.\",\n \"category\": \"Communication\",\n \"logo\": \"https://logos.composio.dev/api/_2chat\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": []\n} as const;\n"],"mappings":";;AACA,MAAa,gBAAgB;CAC3B,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog.cjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const _2chatCatalog = {\n \"slug\": \"_2chat\",\n \"name\": \"2chat\",\n \"description\": \"2Chat provides a programmable API for integrating WhatsApp and other text channels, enabling developers to send and receive messages, manage groups, and automate workflows.\",\n \"category\": \"Communication\",\n \"logo\": \"https://logos.composio.dev/api/_2chat\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": [],\n \"credentialFields\": {\n \"api_key\": {\n \"label\": \"2Chat API Key\",\n \"secret\": true,\n \"description\": \"Your 2Chat API Key\"\n }\n },\n \"credentialScheme\": \"API_KEY\"\n} as const;\n"],"mappings":";;AACA,MAAa,gBAAgB;CAC3B,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;CAChB,oBAAoB,EAClB,WAAW;EACT,SAAS;EACT,UAAU;EACV,eAAe;CACjB,EACF;CACA,oBAAoB;AACtB"}
|
package/dist/catalog.d.cts
CHANGED
|
@@ -8,6 +8,14 @@ declare const _2chatCatalog: {
|
|
|
8
8
|
readonly logo: "https://logos.composio.dev/api/_2chat";
|
|
9
9
|
readonly authKind: "keystroke";
|
|
10
10
|
readonly oauthScopes: readonly [];
|
|
11
|
+
readonly credentialFields: {
|
|
12
|
+
readonly api_key: {
|
|
13
|
+
readonly label: "2Chat API Key";
|
|
14
|
+
readonly secret: true;
|
|
15
|
+
readonly description: "Your 2Chat API Key";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly credentialScheme: "API_KEY";
|
|
11
19
|
};
|
|
12
20
|
//#endregion
|
|
13
21
|
export { _2chatCatalog };
|
package/dist/catalog.d.mts
CHANGED
|
@@ -8,6 +8,14 @@ declare const _2chatCatalog: {
|
|
|
8
8
|
readonly logo: "https://logos.composio.dev/api/_2chat";
|
|
9
9
|
readonly authKind: "keystroke";
|
|
10
10
|
readonly oauthScopes: readonly [];
|
|
11
|
+
readonly credentialFields: {
|
|
12
|
+
readonly api_key: {
|
|
13
|
+
readonly label: "2Chat API Key";
|
|
14
|
+
readonly secret: true;
|
|
15
|
+
readonly description: "Your 2Chat API Key";
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly credentialScheme: "API_KEY";
|
|
11
19
|
};
|
|
12
20
|
//#endregion
|
|
13
21
|
export { _2chatCatalog };
|
package/dist/catalog.mjs
CHANGED
|
@@ -7,7 +7,13 @@ const _2chatCatalog = {
|
|
|
7
7
|
"category": "Communication",
|
|
8
8
|
"logo": "https://logos.composio.dev/api/_2chat",
|
|
9
9
|
"authKind": "keystroke",
|
|
10
|
-
"oauthScopes": []
|
|
10
|
+
"oauthScopes": [],
|
|
11
|
+
"credentialFields": { "api_key": {
|
|
12
|
+
"label": "2Chat API Key",
|
|
13
|
+
"secret": true,
|
|
14
|
+
"description": "Your 2Chat API Key"
|
|
15
|
+
} },
|
|
16
|
+
"credentialScheme": "API_KEY"
|
|
11
17
|
};
|
|
12
18
|
//#endregion
|
|
13
19
|
export { _2chatCatalog };
|
package/dist/catalog.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.mjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const _2chatCatalog = {\n \"slug\": \"_2chat\",\n \"name\": \"2chat\",\n \"description\": \"2Chat provides a programmable API for integrating WhatsApp and other text channels, enabling developers to send and receive messages, manage groups, and automate workflows.\",\n \"category\": \"Communication\",\n \"logo\": \"https://logos.composio.dev/api/_2chat\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": []\n} as const;\n"],"mappings":";;AACA,MAAa,gBAAgB;CAC3B,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog.mjs","names":[],"sources":["../src/catalog.ts"],"sourcesContent":["/** Generated — kept in sync with src/app.ts. */\nexport const _2chatCatalog = {\n \"slug\": \"_2chat\",\n \"name\": \"2chat\",\n \"description\": \"2Chat provides a programmable API for integrating WhatsApp and other text channels, enabling developers to send and receive messages, manage groups, and automate workflows.\",\n \"category\": \"Communication\",\n \"logo\": \"https://logos.composio.dev/api/_2chat\",\n \"authKind\": \"keystroke\",\n \"oauthScopes\": [],\n \"credentialFields\": {\n \"api_key\": {\n \"label\": \"2Chat API Key\",\n \"secret\": true,\n \"description\": \"Your 2Chat API Key\"\n }\n },\n \"credentialScheme\": \"API_KEY\"\n} as const;\n"],"mappings":";;AACA,MAAa,gBAAgB;CAC3B,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,YAAY;CACZ,QAAQ;CACR,YAAY;CACZ,eAAe,CAAC;CAChB,oBAAoB,EAClB,WAAW;EACT,SAAS;EACT,UAAU;EACV,eAAe;CACjB,EACF;CACA,oBAAoB;AACtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/_2chat",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@keystrokehq/keystroke": "
|
|
34
|
+
"@keystrokehq/keystroke": ">=0.1.4",
|
|
35
35
|
"zod": "^4.4.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|