@ganju/utils 0.0.18 → 0.0.20
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/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +7 -3
- package/dist/crypto.d.ts +2 -2
- package/dist/crypto.d.ts.map +1 -1
- package/dist/crypto.js +1 -0
- package/dist/dataApi.d.ts +4 -4
- package/dist/dataApi.js +4 -4
- package/dist/index.d.ts +83 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -0
- package/dist/schema.d.ts +51 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +62 -1
- package/dist/sdkConstants.d.ts +1 -0
- package/dist/sdkConstants.d.ts.map +1 -1
- package/dist/sdkConstants.js +2 -1
- package/dist/whatsappTemplates.d.ts +77 -0
- package/dist/whatsappTemplates.d.ts.map +1 -0
- package/dist/whatsappTemplates.js +402 -0
- package/package.json +1 -1
- package/src/constants.ts +11 -3
- package/src/crypto.ts +3 -2
- package/src/dataApi.ts +4 -4
- package/src/index.ts +63 -1
- package/src/schema.ts +81 -1
- package/src/sdkConstants.ts +1 -0
- package/src/whatsappTemplates.ts +465 -0
package/dist/constants.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ interface PlanLimits {
|
|
|
66
66
|
maxDataBytes: number | null;
|
|
67
67
|
maxDataTablesPerDatabase: number | null;
|
|
68
68
|
triggerRunHardCap: number | null;
|
|
69
|
+
dailyTriggerEmailCap: number | null;
|
|
69
70
|
}
|
|
70
71
|
export type { PlanLimits };
|
|
71
72
|
export declare const constants: {
|
|
@@ -657,6 +658,7 @@ export declare const constants: {
|
|
|
657
658
|
CUSTOM_CODE_BROKER_PATH_DATA: string;
|
|
658
659
|
CUSTOM_CODE_BROKER_PATH_CHANNELS_SEND: string;
|
|
659
660
|
CUSTOM_CODE_BROKER_PATH_CHANNELS_POST: string;
|
|
661
|
+
CUSTOM_CODE_BROKER_PATH_CHANNELS_TEMPLATES: string;
|
|
660
662
|
CUSTOM_CODE_OUTBOUND_PARAM_ARTIFACT_ID: "artifactId";
|
|
661
663
|
CUSTOM_CODE_OUTBOUND_PARAM_ALLOWED_HOSTS: "allowedHosts";
|
|
662
664
|
CUSTOM_CODE_PLATFORM_HOSTS: string[];
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAsKA,QAAA,MAAM,yBAAyB,EAAiB,UAAU,CAAC;AAC3D,QAAA,MAAM,+BAA+B,EAAuB,gBAAgB,CAAC;AAC7E,QAAA,MAAM,8BAA8B,EAAsB,eAAe,CAAC;AAC1E,QAAA,MAAM,wBAAwB,EAAgB,SAAS,CAAC;AAuCxD,QAAA,MAAM,sBAAsB,EAAiB,UAAU,CAAC;AACxD,QAAA,MAAM,4BAA4B,EAAuB,gBAAgB,CAAC;AAC1E,QAAA,MAAM,oBAAoB,EAAe,QAAQ,CAAC;AAClD,QAAA,MAAM,oBAAoB,EAAe,QAAQ,CAAC;AA+FlD,QAAA,MAAM,4BAA4B,EAAc,OAAO,CAAC;AACxD,QAAA,MAAM,6BAA6B,EAAe,QAAQ,CAAC;AA2V3D,QAAA,MAAM,sBAAsB,EAAkB,WAAW,CAAC;AAC1D,QAAA,MAAM,mBAAmB,EAAe,QAAQ,CAAC;AAGjD,QAAA,MAAM,mBAAmB,EAAe,QAAQ,CAAC;AAocjD,MAAM,MAAM,mBAAmB,GAC3B;IACE,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAyWwB,MAAM,GAAG,MAAM;cAAQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6nEnE,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -1938,7 +1938,8 @@ const PLAN_LIMITS = {
|
|
|
1938
1938
|
canUseData: false,
|
|
1939
1939
|
maxDataBytes: null,
|
|
1940
1940
|
maxDataTablesPerDatabase: null,
|
|
1941
|
-
triggerRunHardCap: 0
|
|
1941
|
+
triggerRunHardCap: 0,
|
|
1942
|
+
dailyTriggerEmailCap: 0
|
|
1942
1943
|
},
|
|
1943
1944
|
PRO: {
|
|
1944
1945
|
maxProjects: null,
|
|
@@ -1969,7 +1970,8 @@ const PLAN_LIMITS = {
|
|
|
1969
1970
|
canUseData: true,
|
|
1970
1971
|
maxDataBytes: DATA_MAX_DATABASE_BYTES,
|
|
1971
1972
|
maxDataTablesPerDatabase: DATA_MAX_TABLES_PER_DATABASE,
|
|
1972
|
-
triggerRunHardCap: DATA_TRIGGER_RUN_HARD_CAP
|
|
1973
|
+
triggerRunHardCap: DATA_TRIGGER_RUN_HARD_CAP,
|
|
1974
|
+
dailyTriggerEmailCap: 500
|
|
1973
1975
|
},
|
|
1974
1976
|
ENTERPRISE: {
|
|
1975
1977
|
maxProjects: null,
|
|
@@ -2000,7 +2002,8 @@ const PLAN_LIMITS = {
|
|
|
2000
2002
|
canUseData: true,
|
|
2001
2003
|
maxDataBytes: DATA_MAX_DATABASE_BYTES,
|
|
2002
2004
|
maxDataTablesPerDatabase: DATA_MAX_TABLES_PER_DATABASE,
|
|
2003
|
-
triggerRunHardCap: null
|
|
2005
|
+
triggerRunHardCap: null,
|
|
2006
|
+
dailyTriggerEmailCap: 5000
|
|
2004
2007
|
}
|
|
2005
2008
|
};
|
|
2006
2009
|
// Quota features — used as the `feature` discriminator on PlanLimitError so the
|
|
@@ -2719,6 +2722,7 @@ exports.constants = {
|
|
|
2719
2722
|
CUSTOM_CODE_BROKER_PATH_DATA: sdkConstants_1.CUSTOM_CODE_BROKER_PATH_DATA,
|
|
2720
2723
|
CUSTOM_CODE_BROKER_PATH_CHANNELS_SEND: sdkConstants_1.CUSTOM_CODE_BROKER_PATH_CHANNELS_SEND,
|
|
2721
2724
|
CUSTOM_CODE_BROKER_PATH_CHANNELS_POST: sdkConstants_1.CUSTOM_CODE_BROKER_PATH_CHANNELS_POST,
|
|
2725
|
+
CUSTOM_CODE_BROKER_PATH_CHANNELS_TEMPLATES: sdkConstants_1.CUSTOM_CODE_BROKER_PATH_CHANNELS_TEMPLATES,
|
|
2722
2726
|
CUSTOM_CODE_OUTBOUND_PARAM_ARTIFACT_ID,
|
|
2723
2727
|
CUSTOM_CODE_OUTBOUND_PARAM_ALLOWED_HOSTS,
|
|
2724
2728
|
CUSTOM_CODE_PLATFORM_HOSTS,
|
package/dist/crypto.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getCredentialEncryptionKey: (c:
|
|
1
|
+
import type { EnvSource } from './getEnv';
|
|
2
|
+
export declare const getCredentialEncryptionKey: (c: EnvSource) => string;
|
|
3
3
|
export declare const encryptString: (plaintext: string, rawKey: string) => string;
|
|
4
4
|
export declare const decryptString: (value: string, rawKey: string) => string;
|
|
5
5
|
export declare const sha256Hex: (input: string) => Promise<string>;
|
package/dist/crypto.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAS1C,eAAO,MAAM,0BAA0B,GAAI,GAAG,SAAS,WAMtD,CAAC;AAYF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,EAAE,QAAQ,MAAM,WAS9D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,QAAQ,MAAM,WAS1D,CAAC;AAEF,eAAO,MAAM,SAAS,GAAU,OAAO,MAAM,oBAW5C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAU,OAAO,MAAM,oBAalD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,KAAK,MAAM,EAAE,SAAS,MAAM,oBAmB/D,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,YAOnD,CAAC"}
|
package/dist/crypto.js
CHANGED
|
@@ -8,6 +8,7 @@ const PREFIX = 'enc:v1:';
|
|
|
8
8
|
const NONCE_BYTES = 24;
|
|
9
9
|
const KEY_BYTES = 32;
|
|
10
10
|
const KEY_ENV = 'CRYPTO_SECRET';
|
|
11
|
+
// A request's context, or anything with the worker's env (a cron, a queue).
|
|
11
12
|
const getCredentialEncryptionKey = (c) => {
|
|
12
13
|
const rawKey = (0, getEnv_1.getEnv)(c, KEY_ENV);
|
|
13
14
|
if (!rawKey) {
|
package/dist/dataApi.d.ts
CHANGED
|
@@ -476,7 +476,7 @@ export declare const DATA_API_ROUTES: {
|
|
|
476
476
|
readonly path: "/trigger";
|
|
477
477
|
readonly tag: "Triggers";
|
|
478
478
|
readonly summary: "Save a trigger";
|
|
479
|
-
readonly description: "Runs one action when rows of `table` are inserted, updated or deleted, and `when` holds: `{ \"status\": { \"changedTo\": \"READY\" } }` fires on the transition only; `changedFrom`, `changed: true` and `equals` test a column too, and `all` / `any` combine them. The action is one of `function` (a function of this project, given `{ event, table, row, previous, actor, eventId, triggerId }`), `webhook` (an https URL, sent a POST signed in `x-ganju-signature`), `chat` (`{ channelId, chatId, text }`), `email` (`{ to, subject, text }`) or `customer` (`{ text, template? }`, to the row's customer on a customer-scoped table). Texts take `{{field}}` from the row, inserted as plain text. Saving under an existing name replaces it, unless `replace` is false; with no `name`, it always creates a new trigger, named from the table, event and action and numbered past those taken. Left out, `enabled` keeps a saved trigger on or off as it was. A new webhook answers with its signing `secret`, shown this once. Delivery is at least once: every event carries an `eventId`.";
|
|
479
|
+
readonly description: "Runs one action when rows of `table` are inserted, updated or deleted, and `when` holds: `{ \"status\": { \"changedTo\": \"READY\" } }` fires on the transition only; `changedFrom`, `changed: true` and `equals` test a column too, and `all` / `any` combine them. The action is one of `function` (a function of this project, given `{ event, table, row, previous, actor, eventId, triggerId }`), `webhook` (an https URL, sent a POST signed in `x-ganju-signature`), `chat` (`{ channelId, chatId, text }`), `email` (`{ to, subject, text }`) or `customer` (`{ text, template? }`, to the row's customer on a customer-scoped table). Texts take `{{field}}` from the row, inserted as plain text. Saving under an existing name replaces it, unless `replace` is false; with no `name`, it always creates a new trigger, named from the table, event and action and numbered past those taken. Left out, `enabled` keeps a saved trigger on or off as it was. A new webhook answers with its signing `secret`, shown this once. An `email` goes to the organization's members; any other address is sent a link to confirm first, and those still waiting come back as `confirming`. Delivery is at least once: every event carries an `eventId`.";
|
|
480
480
|
readonly body: z.ZodObject<{
|
|
481
481
|
name: z.ZodOptional<z.ZodString>;
|
|
482
482
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -511,7 +511,7 @@ export declare const DATA_API_ROUTES: {
|
|
|
511
511
|
}, z.core.$strict>>;
|
|
512
512
|
}, z.core.$strict>>;
|
|
513
513
|
}, z.core.$strict>;
|
|
514
|
-
readonly returns: "{ trigger, secret? }";
|
|
514
|
+
readonly returns: "{ trigger, secret?, confirming? }";
|
|
515
515
|
readonly status: 201;
|
|
516
516
|
};
|
|
517
517
|
readonly updateTrigger: {
|
|
@@ -537,7 +537,7 @@ export declare const DATA_API_ROUTES: {
|
|
|
537
537
|
readonly path: "/trigger/deploy";
|
|
538
538
|
readonly tag: "Triggers";
|
|
539
539
|
readonly summary: "Deploy the triggers of ganju.json";
|
|
540
|
-
readonly description: "What `ganju deploy` sends: every trigger listed is saved as managed by the CLI, and the CLI's earlier ones not listed are deleted. Triggers made in the dashboard are left alone. All or nothing. New webhooks' secrets come back once, by name
|
|
540
|
+
readonly description: "What `ganju deploy` sends: every trigger listed is saved as managed by the CLI, and the CLI's earlier ones not listed are deleted. Triggers made in the dashboard are left alone. All or nothing. New webhooks' secrets come back once, by name, and email addresses still to confirm as `confirming`.";
|
|
541
541
|
readonly body: z.ZodObject<{
|
|
542
542
|
triggers: z.ZodArray<z.ZodObject<{
|
|
543
543
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -574,7 +574,7 @@ export declare const DATA_API_ROUTES: {
|
|
|
574
574
|
}, z.core.$strict>>;
|
|
575
575
|
}, z.core.$strict>>;
|
|
576
576
|
}, z.core.$strict>;
|
|
577
|
-
readonly returns: "{ triggers, removed, secrets }";
|
|
577
|
+
readonly returns: "{ triggers, removed, secrets, confirming? }";
|
|
578
578
|
};
|
|
579
579
|
readonly listTriggerRuns: {
|
|
580
580
|
readonly method: "get";
|
package/dist/dataApi.js
CHANGED
|
@@ -255,9 +255,9 @@ exports.DATA_API_ROUTES = {
|
|
|
255
255
|
path: '/trigger',
|
|
256
256
|
tag: 'Triggers',
|
|
257
257
|
summary: 'Save a trigger',
|
|
258
|
-
description: 'Runs one action when rows of `table` are inserted, updated or deleted, and `when` holds: `{ "status": { "changedTo": "READY" } }` fires on the transition only; `changedFrom`, `changed: true` and `equals` test a column too, and `all` / `any` combine them. The action is one of `function` (a function of this project, given `{ event, table, row, previous, actor, eventId, triggerId }`), `webhook` (an https URL, sent a POST signed in `x-ganju-signature`), `chat` (`{ channelId, chatId, text }`), `email` (`{ to, subject, text }`) or `customer` (`{ text, template? }`, to the row\'s customer on a customer-scoped table). Texts take `{{field}}` from the row, inserted as plain text. Saving under an existing name replaces it, unless `replace` is false; with no `name`, it always creates a new trigger, named from the table, event and action and numbered past those taken. Left out, `enabled` keeps a saved trigger on or off as it was. A new webhook answers with its signing `secret`, shown this once. Delivery is at least once: every event carries an `eventId`.',
|
|
258
|
+
description: 'Runs one action when rows of `table` are inserted, updated or deleted, and `when` holds: `{ "status": { "changedTo": "READY" } }` fires on the transition only; `changedFrom`, `changed: true` and `equals` test a column too, and `all` / `any` combine them. The action is one of `function` (a function of this project, given `{ event, table, row, previous, actor, eventId, triggerId }`), `webhook` (an https URL, sent a POST signed in `x-ganju-signature`), `chat` (`{ channelId, chatId, text }`), `email` (`{ to, subject, text }`) or `customer` (`{ text, template? }`, to the row\'s customer on a customer-scoped table). Texts take `{{field}}` from the row, inserted as plain text. Saving under an existing name replaces it, unless `replace` is false; with no `name`, it always creates a new trigger, named from the table, event and action and numbered past those taken. Left out, `enabled` keeps a saved trigger on or off as it was. A new webhook answers with its signing `secret`, shown this once. An `email` goes to the organization\'s members; any other address is sent a link to confirm first, and those still waiting come back as `confirming`. Delivery is at least once: every event carries an `eventId`.',
|
|
259
259
|
body: DATA_TRIGGER_INPUT,
|
|
260
|
-
returns: '{ trigger, secret? }',
|
|
260
|
+
returns: '{ trigger, secret?, confirming? }',
|
|
261
261
|
status: 201
|
|
262
262
|
},
|
|
263
263
|
updateTrigger: {
|
|
@@ -281,9 +281,9 @@ exports.DATA_API_ROUTES = {
|
|
|
281
281
|
path: '/trigger/deploy',
|
|
282
282
|
tag: 'Triggers',
|
|
283
283
|
summary: 'Deploy the triggers of ganju.json',
|
|
284
|
-
description: "What `ganju deploy` sends: every trigger listed is saved as managed by the CLI, and the CLI's earlier ones not listed are deleted. Triggers made in the dashboard are left alone. All or nothing. New webhooks' secrets come back once, by name
|
|
284
|
+
description: "What `ganju deploy` sends: every trigger listed is saved as managed by the CLI, and the CLI's earlier ones not listed are deleted. Triggers made in the dashboard are left alone. All or nothing. New webhooks' secrets come back once, by name, and email addresses still to confirm as `confirming`.",
|
|
285
285
|
body: DATA_TRIGGER_DEPLOY_BODY,
|
|
286
|
-
returns: '{ triggers, removed, secrets }'
|
|
286
|
+
returns: '{ triggers, removed, secrets, confirming? }'
|
|
287
287
|
},
|
|
288
288
|
listTriggerRuns: {
|
|
289
289
|
method: 'get',
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ import type { LintableTool, ToolLintFinding, ToolLintOptions, ToolLintRule } fro
|
|
|
35
35
|
import type { Source, ResourceUrlContext, SourceButton } from './sources';
|
|
36
36
|
import { OAuthReauthRequiredError, OAuthRefreshError } from './oauth';
|
|
37
37
|
import type { RefreshOAuthTokenInput, RefreshedOAuthToken } from './oauth';
|
|
38
|
+
import type { WhatsappTemplateCategory, WhatsappTemplateDraft, WhatsappTemplateContent, WhatsappTemplateIssue, WhatsappTemplateIssueCode } from './whatsappTemplates';
|
|
38
39
|
import { PlanLimitError } from './planLimitError';
|
|
39
40
|
import type { PlanLimitDetails } from './planLimitError';
|
|
40
41
|
import type { PlanLimits } from './constants';
|
|
@@ -1427,6 +1428,49 @@ export declare const utils: {
|
|
|
1427
1428
|
userId: import("zod").ZodUUID;
|
|
1428
1429
|
organizationId: import("zod").ZodUUID;
|
|
1429
1430
|
}, import("zod/v4/core").$strip>;
|
|
1431
|
+
CHANNEL_WHATSAPP_PARAMS: import("zod").ZodObject<{
|
|
1432
|
+
channelId: import("zod").ZodUUID;
|
|
1433
|
+
projectId: import("zod").ZodUUID;
|
|
1434
|
+
userId: import("zod").ZodUUID;
|
|
1435
|
+
organizationId: import("zod").ZodUUID;
|
|
1436
|
+
}, import("zod/v4/core").$strip>;
|
|
1437
|
+
CHANNEL_WHATSAPP_ACCOUNT: import("zod").ZodObject<{
|
|
1438
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1439
|
+
businessAccountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1440
|
+
}, import("zod/v4/core").$strict>;
|
|
1441
|
+
CHANNEL_WHATSAPP_TEMPLATE_CREATE: import("zod").ZodObject<{
|
|
1442
|
+
category: import("zod").ZodEnum<{
|
|
1443
|
+
UTILITY: "UTILITY";
|
|
1444
|
+
MARKETING: "MARKETING";
|
|
1445
|
+
}>;
|
|
1446
|
+
header: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1447
|
+
body: import("zod").ZodString;
|
|
1448
|
+
footer: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1449
|
+
buttons: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1450
|
+
examples: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1451
|
+
labels: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1452
|
+
name: import("zod").ZodString;
|
|
1453
|
+
language: import("zod").ZodString;
|
|
1454
|
+
}, import("zod/v4/core").$strict>;
|
|
1455
|
+
CHANNEL_WHATSAPP_TEMPLATE_CONTENT: import("zod").ZodObject<{
|
|
1456
|
+
category: import("zod").ZodEnum<{
|
|
1457
|
+
UTILITY: "UTILITY";
|
|
1458
|
+
MARKETING: "MARKETING";
|
|
1459
|
+
}>;
|
|
1460
|
+
header: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1461
|
+
body: import("zod").ZodString;
|
|
1462
|
+
footer: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
1463
|
+
buttons: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1464
|
+
examples: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1465
|
+
labels: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1466
|
+
}, import("zod/v4/core").$strict>;
|
|
1467
|
+
CHANNEL_WHATSAPP_TEMPLATE_PARAMS: import("zod").ZodObject<{
|
|
1468
|
+
channelId: import("zod").ZodUUID;
|
|
1469
|
+
projectId: import("zod").ZodUUID;
|
|
1470
|
+
userId: import("zod").ZodUUID;
|
|
1471
|
+
organizationId: import("zod").ZodUUID;
|
|
1472
|
+
templateId: import("zod").ZodUUID;
|
|
1473
|
+
}, import("zod/v4/core").$strip>;
|
|
1430
1474
|
ARTIFACT_UPDATE_RESOURCE_SHOW_SOURCE: import("zod").ZodObject<{
|
|
1431
1475
|
resourceId: import("zod").ZodUUID;
|
|
1432
1476
|
showSource: import("zod").ZodEnum<{
|
|
@@ -2011,6 +2055,7 @@ export declare const utils: {
|
|
|
2011
2055
|
}>>;
|
|
2012
2056
|
tables: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
2013
2057
|
}, import("zod/v4/core").$strict>>;
|
|
2058
|
+
channels: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2014
2059
|
}, import("zod/v4/core").$strip>;
|
|
2015
2060
|
TOOL_ANNOTATIONS: import("zod").ZodObject<{
|
|
2016
2061
|
readOnlyHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
@@ -2065,6 +2110,7 @@ export declare const utils: {
|
|
|
2065
2110
|
}>>;
|
|
2066
2111
|
tables: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
2067
2112
|
}, import("zod/v4/core").$strict>>;
|
|
2113
|
+
channels: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2068
2114
|
}, import("zod/v4/core").$strip>>;
|
|
2069
2115
|
}, import("zod/v4/core").$strip>;
|
|
2070
2116
|
ARTIFACT_CUSTOM_CODE_CREATE_VERSION: import("zod").ZodObject<{
|
|
@@ -2115,6 +2161,7 @@ export declare const utils: {
|
|
|
2115
2161
|
}>>;
|
|
2116
2162
|
tables: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
2117
2163
|
}, import("zod/v4/core").$strict>>;
|
|
2164
|
+
channels: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
2118
2165
|
}, import("zod/v4/core").$strip>>;
|
|
2119
2166
|
}, import("zod/v4/core").$strip>;
|
|
2120
2167
|
config: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
@@ -2260,6 +2307,9 @@ export declare const utils: {
|
|
|
2260
2307
|
chatId: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>;
|
|
2261
2308
|
text: import("zod").ZodString;
|
|
2262
2309
|
}, import("zod/v4/core").$strip>;
|
|
2310
|
+
CUSTOM_CODE_BROKER_CHANNELS_TEMPLATES: import("zod").ZodObject<{
|
|
2311
|
+
call: import("zod").ZodString;
|
|
2312
|
+
}, import("zod/v4/core").$strip>;
|
|
2263
2313
|
CUSTOM_CODE_BROKER_RESOURCE_SEARCH: import("zod").ZodObject<{
|
|
2264
2314
|
query: import("zod").ZodString;
|
|
2265
2315
|
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
@@ -2360,6 +2410,36 @@ export declare const utils: {
|
|
|
2360
2410
|
}, import("zod/v4/core").$strip>;
|
|
2361
2411
|
}, import("zod/v4/core").$strip>], "to">;
|
|
2362
2412
|
};
|
|
2413
|
+
WHATSAPP_TEMPLATE_CATEGORIES: readonly ["UTILITY", "MARKETING"];
|
|
2414
|
+
WHATSAPP_TEMPLATE_STATUS_APPROVED: string;
|
|
2415
|
+
WHATSAPP_TEMPLATE_STATUSES_WAITING: string[];
|
|
2416
|
+
WHATSAPP_TEMPLATE_STATUSES_STOPPED: string[];
|
|
2417
|
+
WHATSAPP_TEMPLATE_NAME_MAX: number;
|
|
2418
|
+
WHATSAPP_TEMPLATE_BODY_MAX: number;
|
|
2419
|
+
WHATSAPP_TEMPLATE_HEADER_MAX: number;
|
|
2420
|
+
WHATSAPP_TEMPLATE_FOOTER_MAX: number;
|
|
2421
|
+
WHATSAPP_TEMPLATE_BUTTON_MAX: number;
|
|
2422
|
+
WHATSAPP_TEMPLATE_BUTTONS_MAX: number;
|
|
2423
|
+
WHATSAPP_TEMPLATE_VARIABLES_MAX: number;
|
|
2424
|
+
WHATSAPP_TEMPLATE_LABEL_MAX: number;
|
|
2425
|
+
WHATSAPP_TEMPLATE_EXAMPLE_MAX: number;
|
|
2426
|
+
WHATSAPP_TEMPLATE_LANGUAGES: {
|
|
2427
|
+
code: string;
|
|
2428
|
+
name: string;
|
|
2429
|
+
}[];
|
|
2430
|
+
whatsappTemplateVariables: (text: string) => number[];
|
|
2431
|
+
whatsappTemplateVariableCount: (body: string) => number;
|
|
2432
|
+
checkWhatsappTemplate: (draft: WhatsappTemplateDraft) => WhatsappTemplateIssue[];
|
|
2433
|
+
whatsappTemplateIssueText: (issue: WhatsappTemplateIssue) => string;
|
|
2434
|
+
whatsappTemplateComponents: (draft: WhatsappTemplateDraft) => Record<string, unknown>[];
|
|
2435
|
+
whatsappTemplateContent: (components: unknown) => WhatsappTemplateContent;
|
|
2436
|
+
fillWhatsappTemplate: (body: string, values: string[]) => string;
|
|
2437
|
+
whatsappTemplateSendable: (components: unknown) => boolean;
|
|
2438
|
+
cleanWhatsappTemplateParam: (value: unknown) => string;
|
|
2439
|
+
whatsappSendError: (code: number | undefined, detail: string | undefined) => {
|
|
2440
|
+
text: string;
|
|
2441
|
+
retry: boolean;
|
|
2442
|
+
};
|
|
2363
2443
|
getEnv: (source: EnvSource, key: string) => string | undefined;
|
|
2364
2444
|
fetcher: (props: import("./fetcher").IFetcherProps) => Promise<any>;
|
|
2365
2445
|
constants: {
|
|
@@ -2951,6 +3031,7 @@ export declare const utils: {
|
|
|
2951
3031
|
CUSTOM_CODE_BROKER_PATH_DATA: string;
|
|
2952
3032
|
CUSTOM_CODE_BROKER_PATH_CHANNELS_SEND: string;
|
|
2953
3033
|
CUSTOM_CODE_BROKER_PATH_CHANNELS_POST: string;
|
|
3034
|
+
CUSTOM_CODE_BROKER_PATH_CHANNELS_TEMPLATES: string;
|
|
2954
3035
|
CUSTOM_CODE_OUTBOUND_PARAM_ARTIFACT_ID: "artifactId";
|
|
2955
3036
|
CUSTOM_CODE_OUTBOUND_PARAM_ALLOWED_HOSTS: "allowedHosts";
|
|
2956
3037
|
CUSTOM_CODE_PLATFORM_HOSTS: string[];
|
|
@@ -3055,7 +3136,7 @@ export declare const utils: {
|
|
|
3055
3136
|
isReservedToolName: (name: string) => boolean;
|
|
3056
3137
|
encryptString: (plaintext: string, rawKey: string) => string;
|
|
3057
3138
|
decryptString: (value: string, rawKey: string) => string;
|
|
3058
|
-
getCredentialEncryptionKey: (c:
|
|
3139
|
+
getCredentialEncryptionKey: (c: EnvSource) => string;
|
|
3059
3140
|
sha256Hex: (input: string) => Promise<string>;
|
|
3060
3141
|
sha256Base64Url: (input: string) => Promise<string>;
|
|
3061
3142
|
hmacSha256Hex: (key: string, message: string) => Promise<string>;
|
|
@@ -3841,5 +3922,5 @@ export declare const utils: {
|
|
|
3841
3922
|
PlanLimitError: typeof PlanLimitError;
|
|
3842
3923
|
isPlanLimitError: (error: unknown) => error is PlanLimitError;
|
|
3843
3924
|
};
|
|
3844
|
-
export type { ParticipantMemory, ParticipantMemoryUpdate, InstructionWarning, LabelledToolResult, MintedAccessToken, CustomCodeProject, ProjectPathIssue, CatalogGroup, CatalogTool, CatalogToolDescriptor, ToolAnnotations, PendingToolConfirmation, PendingToolConfirmations, ToolEffect, ToolApprovalStatus, ProxiedToolTrust, LintableTool, ToolLintFinding, ToolLintOptions, ToolLintRule, ToolGroupKey, ToolKey, CalendarConfigField, JsonSchema, SchemaViolation, MimeAttachment, MimeMessageInput, GmailOperation, GmailSendRequest, GmailSendResponse, OutlookOperation, OutlookSendRequest, OutlookSendResponse, SlackOperation, SlackSendRequest, SlackSendResponse, SlackSendRemoteResourceRequest, TelegramSendRequest, TelegramSendResponse, TelegramSendRemoteResourceRequest, DiscordSendRequest, DiscordSendResponse, DiscordSendRemoteResourceRequest, WhatsappSendRequest, WhatsappSendResponse, WhatsappSendRemoteResourceRequest, EnvSource, Separator, ChunkMetadata, PreparedChunk, ExtractedDocument, ExtractedDocumentMetadata, ExtractedDocumentSource, RateLimitRetryOptions, RerankAiBinding, QueueBatchLike, QueueFailureContext, QueueMessageLike, ProcessQueueBatchHandlers, ChannelNotifier, ToolStatusEvent, BufferedChannelMessage, BufferedChannelCommand, BufferedVoiceNote, ChannelBufferEnvelope, ChannelBufferFlush, Source, ResourceUrlContext, SourceButton, RefreshOAuthTokenInput, RefreshedOAuthToken, HttpEndpointToolConfig, McpProxyToolConfig, McpProxyDiscoveredTool, McpProxyDiscoveredResource, McpProxyDiscoveredPrompt, McpProxyDiscovery, CustomCodeToolConfig, CustomCodeToolManifest, CustomCodeManifest, CustomCodeSendFile, CustomCodeCreateResource, CustomCodeCallPayload, CustomCodeTokenPayload, ContainmentTokenPayload, OAuthProviderConfig, AttachmentResource, ResolvedAttachment, ResolveAttachmentResult, ExposableResource, SyncableResource, ResourceSyncProvider, PlanLimitDetails, PlanLimits };
|
|
3925
|
+
export type { ParticipantMemory, ParticipantMemoryUpdate, InstructionWarning, LabelledToolResult, MintedAccessToken, CustomCodeProject, ProjectPathIssue, CatalogGroup, CatalogTool, CatalogToolDescriptor, ToolAnnotations, PendingToolConfirmation, PendingToolConfirmations, ToolEffect, ToolApprovalStatus, ProxiedToolTrust, LintableTool, ToolLintFinding, ToolLintOptions, ToolLintRule, ToolGroupKey, ToolKey, CalendarConfigField, JsonSchema, SchemaViolation, MimeAttachment, MimeMessageInput, GmailOperation, GmailSendRequest, GmailSendResponse, OutlookOperation, OutlookSendRequest, OutlookSendResponse, SlackOperation, SlackSendRequest, SlackSendResponse, SlackSendRemoteResourceRequest, TelegramSendRequest, TelegramSendResponse, TelegramSendRemoteResourceRequest, DiscordSendRequest, DiscordSendResponse, DiscordSendRemoteResourceRequest, WhatsappSendRequest, WhatsappSendResponse, WhatsappSendRemoteResourceRequest, EnvSource, Separator, ChunkMetadata, PreparedChunk, ExtractedDocument, ExtractedDocumentMetadata, ExtractedDocumentSource, RateLimitRetryOptions, RerankAiBinding, QueueBatchLike, QueueFailureContext, QueueMessageLike, ProcessQueueBatchHandlers, ChannelNotifier, ToolStatusEvent, BufferedChannelMessage, BufferedChannelCommand, BufferedVoiceNote, ChannelBufferEnvelope, ChannelBufferFlush, Source, ResourceUrlContext, SourceButton, RefreshOAuthTokenInput, RefreshedOAuthToken, HttpEndpointToolConfig, McpProxyToolConfig, McpProxyDiscoveredTool, McpProxyDiscoveredResource, McpProxyDiscoveredPrompt, McpProxyDiscovery, CustomCodeToolConfig, CustomCodeToolManifest, CustomCodeManifest, CustomCodeSendFile, CustomCodeCreateResource, CustomCodeCallPayload, CustomCodeTokenPayload, ContainmentTokenPayload, OAuthProviderConfig, AttachmentResource, ResolvedAttachment, ResolveAttachmentResult, ExposableResource, SyncableResource, ResourceSyncProvider, PlanLimitDetails, PlanLimits, WhatsappTemplateCategory, WhatsappTemplateDraft, WhatsappTemplateContent, WhatsappTemplateIssue, WhatsappTemplateIssueCode };
|
|
3845
3926
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAyCvD,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,a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34 @@ const sources_1 = require("./sources");
|
|
|
59
59
|
const citations_1 = require("./citations");
|
|
60
60
|
const oauth_1 = require("./oauth");
|
|
61
61
|
const vendorTimeZone_1 = require("./vendorTimeZone");
|
|
62
|
+
const whatsappTemplates_1 = require("./whatsappTemplates");
|
|
62
63
|
const planLimitError_1 = require("./planLimitError");
|
|
63
64
|
exports.utils = {
|
|
64
65
|
Schema: schema_1.Schema,
|
|
66
|
+
WHATSAPP_TEMPLATE_CATEGORIES: whatsappTemplates_1.WHATSAPP_TEMPLATE_CATEGORIES,
|
|
67
|
+
WHATSAPP_TEMPLATE_STATUS_APPROVED: whatsappTemplates_1.WHATSAPP_TEMPLATE_STATUS_APPROVED,
|
|
68
|
+
WHATSAPP_TEMPLATE_STATUSES_WAITING: whatsappTemplates_1.WHATSAPP_TEMPLATE_STATUSES_WAITING,
|
|
69
|
+
WHATSAPP_TEMPLATE_STATUSES_STOPPED: whatsappTemplates_1.WHATSAPP_TEMPLATE_STATUSES_STOPPED,
|
|
70
|
+
WHATSAPP_TEMPLATE_NAME_MAX: whatsappTemplates_1.WHATSAPP_TEMPLATE_NAME_MAX,
|
|
71
|
+
WHATSAPP_TEMPLATE_BODY_MAX: whatsappTemplates_1.WHATSAPP_TEMPLATE_BODY_MAX,
|
|
72
|
+
WHATSAPP_TEMPLATE_HEADER_MAX: whatsappTemplates_1.WHATSAPP_TEMPLATE_HEADER_MAX,
|
|
73
|
+
WHATSAPP_TEMPLATE_FOOTER_MAX: whatsappTemplates_1.WHATSAPP_TEMPLATE_FOOTER_MAX,
|
|
74
|
+
WHATSAPP_TEMPLATE_BUTTON_MAX: whatsappTemplates_1.WHATSAPP_TEMPLATE_BUTTON_MAX,
|
|
75
|
+
WHATSAPP_TEMPLATE_BUTTONS_MAX: whatsappTemplates_1.WHATSAPP_TEMPLATE_BUTTONS_MAX,
|
|
76
|
+
WHATSAPP_TEMPLATE_VARIABLES_MAX: whatsappTemplates_1.WHATSAPP_TEMPLATE_VARIABLES_MAX,
|
|
77
|
+
WHATSAPP_TEMPLATE_LABEL_MAX: whatsappTemplates_1.WHATSAPP_TEMPLATE_LABEL_MAX,
|
|
78
|
+
WHATSAPP_TEMPLATE_EXAMPLE_MAX: whatsappTemplates_1.WHATSAPP_TEMPLATE_EXAMPLE_MAX,
|
|
79
|
+
WHATSAPP_TEMPLATE_LANGUAGES: whatsappTemplates_1.WHATSAPP_TEMPLATE_LANGUAGES,
|
|
80
|
+
whatsappTemplateVariables: whatsappTemplates_1.whatsappTemplateVariables,
|
|
81
|
+
whatsappTemplateVariableCount: whatsappTemplates_1.whatsappTemplateVariableCount,
|
|
82
|
+
checkWhatsappTemplate: whatsappTemplates_1.checkWhatsappTemplate,
|
|
83
|
+
whatsappTemplateIssueText: whatsappTemplates_1.whatsappTemplateIssueText,
|
|
84
|
+
whatsappTemplateComponents: whatsappTemplates_1.whatsappTemplateComponents,
|
|
85
|
+
whatsappTemplateContent: whatsappTemplates_1.whatsappTemplateContent,
|
|
86
|
+
fillWhatsappTemplate: whatsappTemplates_1.fillWhatsappTemplate,
|
|
87
|
+
whatsappTemplateSendable: whatsappTemplates_1.whatsappTemplateSendable,
|
|
88
|
+
cleanWhatsappTemplateParam: whatsappTemplates_1.cleanWhatsappTemplateParam,
|
|
89
|
+
whatsappSendError: whatsappTemplates_1.whatsappSendError,
|
|
65
90
|
getEnv: getEnv_1.getEnv,
|
|
66
91
|
fetcher: fetcher_1.fetcher,
|
|
67
92
|
constants: constants_1.constants,
|
package/dist/schema.d.ts
CHANGED
|
@@ -321,6 +321,7 @@ declare const CUSTOM_CODE_TOOL: z.ZodObject<{
|
|
|
321
321
|
}>>;
|
|
322
322
|
tables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
323
323
|
}, z.core.$strict>>;
|
|
324
|
+
channels: z.ZodOptional<z.ZodBoolean>;
|
|
324
325
|
}, z.core.$strip>;
|
|
325
326
|
declare const CUSTOM_CODE_MANIFEST: z.ZodObject<{
|
|
326
327
|
tools: z.ZodArray<z.ZodObject<{
|
|
@@ -369,6 +370,7 @@ declare const CUSTOM_CODE_MANIFEST: z.ZodObject<{
|
|
|
369
370
|
}>>;
|
|
370
371
|
tables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
371
372
|
}, z.core.$strict>>;
|
|
373
|
+
channels: z.ZodOptional<z.ZodBoolean>;
|
|
372
374
|
}, z.core.$strip>>;
|
|
373
375
|
}, z.core.$strip>;
|
|
374
376
|
declare const CUSTOM_CODE_BROKER_RESOURCE_CREATE: z.ZodObject<{
|
|
@@ -1847,6 +1849,49 @@ export declare const Schema: {
|
|
|
1847
1849
|
userId: z.ZodUUID;
|
|
1848
1850
|
organizationId: z.ZodUUID;
|
|
1849
1851
|
}, z.core.$strip>;
|
|
1852
|
+
CHANNEL_WHATSAPP_PARAMS: z.ZodObject<{
|
|
1853
|
+
channelId: z.ZodUUID;
|
|
1854
|
+
projectId: z.ZodUUID;
|
|
1855
|
+
userId: z.ZodUUID;
|
|
1856
|
+
organizationId: z.ZodUUID;
|
|
1857
|
+
}, z.core.$strip>;
|
|
1858
|
+
CHANNEL_WHATSAPP_ACCOUNT: z.ZodObject<{
|
|
1859
|
+
accessToken: z.ZodOptional<z.ZodString>;
|
|
1860
|
+
businessAccountId: z.ZodOptional<z.ZodString>;
|
|
1861
|
+
}, z.core.$strict>;
|
|
1862
|
+
CHANNEL_WHATSAPP_TEMPLATE_CREATE: z.ZodObject<{
|
|
1863
|
+
category: z.ZodEnum<{
|
|
1864
|
+
UTILITY: "UTILITY";
|
|
1865
|
+
MARKETING: "MARKETING";
|
|
1866
|
+
}>;
|
|
1867
|
+
header: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1868
|
+
body: z.ZodString;
|
|
1869
|
+
footer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1870
|
+
buttons: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1871
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1872
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1873
|
+
name: z.ZodString;
|
|
1874
|
+
language: z.ZodString;
|
|
1875
|
+
}, z.core.$strict>;
|
|
1876
|
+
CHANNEL_WHATSAPP_TEMPLATE_CONTENT: z.ZodObject<{
|
|
1877
|
+
category: z.ZodEnum<{
|
|
1878
|
+
UTILITY: "UTILITY";
|
|
1879
|
+
MARKETING: "MARKETING";
|
|
1880
|
+
}>;
|
|
1881
|
+
header: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1882
|
+
body: z.ZodString;
|
|
1883
|
+
footer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1884
|
+
buttons: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1885
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1886
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1887
|
+
}, z.core.$strict>;
|
|
1888
|
+
CHANNEL_WHATSAPP_TEMPLATE_PARAMS: z.ZodObject<{
|
|
1889
|
+
channelId: z.ZodUUID;
|
|
1890
|
+
projectId: z.ZodUUID;
|
|
1891
|
+
userId: z.ZodUUID;
|
|
1892
|
+
organizationId: z.ZodUUID;
|
|
1893
|
+
templateId: z.ZodUUID;
|
|
1894
|
+
}, z.core.$strip>;
|
|
1850
1895
|
ARTIFACT_UPDATE_RESOURCE_SHOW_SOURCE: z.ZodObject<{
|
|
1851
1896
|
resourceId: z.ZodUUID;
|
|
1852
1897
|
showSource: z.ZodEnum<{
|
|
@@ -2431,6 +2476,7 @@ export declare const Schema: {
|
|
|
2431
2476
|
}>>;
|
|
2432
2477
|
tables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2433
2478
|
}, z.core.$strict>>;
|
|
2479
|
+
channels: z.ZodOptional<z.ZodBoolean>;
|
|
2434
2480
|
}, z.core.$strip>;
|
|
2435
2481
|
TOOL_ANNOTATIONS: z.ZodObject<{
|
|
2436
2482
|
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2485,6 +2531,7 @@ export declare const Schema: {
|
|
|
2485
2531
|
}>>;
|
|
2486
2532
|
tables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2487
2533
|
}, z.core.$strict>>;
|
|
2534
|
+
channels: z.ZodOptional<z.ZodBoolean>;
|
|
2488
2535
|
}, z.core.$strip>>;
|
|
2489
2536
|
}, z.core.$strip>;
|
|
2490
2537
|
ARTIFACT_CUSTOM_CODE_CREATE_VERSION: z.ZodObject<{
|
|
@@ -2535,6 +2582,7 @@ export declare const Schema: {
|
|
|
2535
2582
|
}>>;
|
|
2536
2583
|
tables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2537
2584
|
}, z.core.$strict>>;
|
|
2585
|
+
channels: z.ZodOptional<z.ZodBoolean>;
|
|
2538
2586
|
}, z.core.$strip>>;
|
|
2539
2587
|
}, z.core.$strip>;
|
|
2540
2588
|
config: z.ZodOptional<z.ZodObject<{
|
|
@@ -2680,6 +2728,9 @@ export declare const Schema: {
|
|
|
2680
2728
|
chatId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
2681
2729
|
text: z.ZodString;
|
|
2682
2730
|
}, z.core.$strip>;
|
|
2731
|
+
CUSTOM_CODE_BROKER_CHANNELS_TEMPLATES: z.ZodObject<{
|
|
2732
|
+
call: z.ZodString;
|
|
2733
|
+
}, z.core.$strip>;
|
|
2683
2734
|
CUSTOM_CODE_BROKER_RESOURCE_SEARCH: z.ZodObject<{
|
|
2684
2735
|
query: z.ZodString;
|
|
2685
2736
|
limit: z.ZodDefault<z.ZodNumber>;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":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CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CAC1E;AAMD,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAChC,SAAS,CAAC,EAAE,0BAA0B,EAAE,CAAC;IACzC,OAAO,CAAC,EAAE,wBAAwB,EAAE,CAAC;CACtC"}
|
package/dist/schema.js
CHANGED
|
@@ -11,6 +11,7 @@ const slugifyTitle_1 = require("./slugifyTitle");
|
|
|
11
11
|
const toolConfirmation_1 = require("./toolConfirmation");
|
|
12
12
|
const channelCustomer_1 = require("./channelCustomer");
|
|
13
13
|
const dataTypes_1 = require("./dataTypes");
|
|
14
|
+
const whatsappTemplates_1 = require("./whatsappTemplates");
|
|
14
15
|
// A prompt title becomes a slash command; it must not collide with a command
|
|
15
16
|
// the channel runner handles itself (e.g. `/link`).
|
|
16
17
|
const PROMPT_TITLE = zod_1.z
|
|
@@ -1264,7 +1265,10 @@ const CUSTOM_CODE_TOOL = zod_1.z.object({
|
|
|
1264
1265
|
access: zod_1.z.enum(['read', 'write']).optional(),
|
|
1265
1266
|
tables: zod_1.z.array(zod_1.z.string().min(1).max(63)).max(50).optional()
|
|
1266
1267
|
})
|
|
1267
|
-
.optional()
|
|
1268
|
+
.optional(),
|
|
1269
|
+
// true: the function may message customers and chats through ctx.channels.
|
|
1270
|
+
// Left out, the broker refuses it.
|
|
1271
|
+
channels: zod_1.z.boolean().optional()
|
|
1268
1272
|
});
|
|
1269
1273
|
// The manifest a `ganju deploy` (or the dashboard) uploads alongside a bundle.
|
|
1270
1274
|
// Names must be unique within one script: apps/mcp registers them into a single
|
|
@@ -1507,6 +1511,11 @@ const CUSTOM_CODE_BROKER_CHANNELS_SEND = zod_1.z.object({
|
|
|
1507
1511
|
text: zod_1.z.string().min(1).max(4000).optional(),
|
|
1508
1512
|
template: DATA_TRIGGER_TEMPLATE.optional()
|
|
1509
1513
|
});
|
|
1514
|
+
// ctx.channels.templates: the approved WhatsApp templates of the project's
|
|
1515
|
+
// channels.
|
|
1516
|
+
const CUSTOM_CODE_BROKER_CHANNELS_TEMPLATES = zod_1.z.object({
|
|
1517
|
+
call: zod_1.z.string().min(1).max(4000)
|
|
1518
|
+
});
|
|
1510
1519
|
const CUSTOM_CODE_BROKER_CHANNELS_POST = zod_1.z.object({
|
|
1511
1520
|
call: zod_1.z.string().min(1).max(4000),
|
|
1512
1521
|
channelId: zod_1.z.string().min(1).max(100),
|
|
@@ -1730,6 +1739,52 @@ const CHANNEL_LIST_MESSAGES = zod_1.z.object({
|
|
|
1730
1739
|
userId: zod_1.z.uuid(),
|
|
1731
1740
|
organizationId: zod_1.z.uuid()
|
|
1732
1741
|
});
|
|
1742
|
+
const CHANNEL_WHATSAPP_PARAMS = zod_1.z.object({
|
|
1743
|
+
channelId: zod_1.z.uuid(),
|
|
1744
|
+
projectId: zod_1.z.uuid(),
|
|
1745
|
+
userId: zod_1.z.uuid(),
|
|
1746
|
+
organizationId: zod_1.z.uuid()
|
|
1747
|
+
});
|
|
1748
|
+
// A new access token, the business account's id, or both, for a WhatsApp
|
|
1749
|
+
// channel's message templates. The rest of its credentials stay as they are.
|
|
1750
|
+
const CHANNEL_WHATSAPP_ACCOUNT = zod_1.z
|
|
1751
|
+
.strictObject({
|
|
1752
|
+
accessToken: zod_1.z.string().trim().min(20).max(2000).optional(),
|
|
1753
|
+
businessAccountId: zod_1.z
|
|
1754
|
+
.string()
|
|
1755
|
+
.trim()
|
|
1756
|
+
.regex(/^\d{5,30}$/, 'The business account id is a number')
|
|
1757
|
+
.optional()
|
|
1758
|
+
})
|
|
1759
|
+
.refine(v => v.accessToken !== undefined || v.businessAccountId !== undefined, 'Give a new access token, the business account id, or both');
|
|
1760
|
+
// A WhatsApp message template as the dashboard writes it. Meta's own rules
|
|
1761
|
+
// are checked with checkWhatsappTemplate before it is sent for review.
|
|
1762
|
+
const CHANNEL_WHATSAPP_TEMPLATE_CONTENT = zod_1.z.strictObject({
|
|
1763
|
+
category: zod_1.z.enum(whatsappTemplates_1.WHATSAPP_TEMPLATE_CATEGORIES),
|
|
1764
|
+
header: zod_1.z.string().max(whatsappTemplates_1.WHATSAPP_TEMPLATE_HEADER_MAX).nullish(),
|
|
1765
|
+
body: zod_1.z.string().trim().min(1).max(whatsappTemplates_1.WHATSAPP_TEMPLATE_BODY_MAX),
|
|
1766
|
+
footer: zod_1.z.string().max(whatsappTemplates_1.WHATSAPP_TEMPLATE_FOOTER_MAX).nullish(),
|
|
1767
|
+
buttons: zod_1.z
|
|
1768
|
+
.array(zod_1.z.string().max(whatsappTemplates_1.WHATSAPP_TEMPLATE_BUTTON_MAX))
|
|
1769
|
+
.max(whatsappTemplates_1.WHATSAPP_TEMPLATE_BUTTONS_MAX)
|
|
1770
|
+
.optional(),
|
|
1771
|
+
// {{n}}'s example value and label are at n - 1.
|
|
1772
|
+
examples: zod_1.z
|
|
1773
|
+
.array(zod_1.z.string().max(whatsappTemplates_1.WHATSAPP_TEMPLATE_EXAMPLE_MAX))
|
|
1774
|
+
.max(whatsappTemplates_1.WHATSAPP_TEMPLATE_VARIABLES_MAX)
|
|
1775
|
+
.optional(),
|
|
1776
|
+
labels: zod_1.z
|
|
1777
|
+
.array(zod_1.z.string().max(whatsappTemplates_1.WHATSAPP_TEMPLATE_LABEL_MAX))
|
|
1778
|
+
.max(whatsappTemplates_1.WHATSAPP_TEMPLATE_VARIABLES_MAX)
|
|
1779
|
+
.optional()
|
|
1780
|
+
});
|
|
1781
|
+
const CHANNEL_WHATSAPP_TEMPLATE_CREATE = CHANNEL_WHATSAPP_TEMPLATE_CONTENT.extend({
|
|
1782
|
+
name: zod_1.z.string().trim().min(1).max(whatsappTemplates_1.WHATSAPP_TEMPLATE_NAME_MAX),
|
|
1783
|
+
language: zod_1.z.string().trim().min(2).max(10)
|
|
1784
|
+
});
|
|
1785
|
+
const CHANNEL_WHATSAPP_TEMPLATE_PARAMS = CHANNEL_WHATSAPP_PARAMS.extend({
|
|
1786
|
+
templateId: zod_1.z.uuid()
|
|
1787
|
+
});
|
|
1733
1788
|
const CHANNEL_CREATE_VIEW = CHANNEL_CREATE.omit({
|
|
1734
1789
|
projectId: true,
|
|
1735
1790
|
userId: true,
|
|
@@ -1887,6 +1942,11 @@ exports.Schema = {
|
|
|
1887
1942
|
CHANNEL_REMOVE,
|
|
1888
1943
|
CHANNEL_LIST_CONVERSATIONS,
|
|
1889
1944
|
CHANNEL_LIST_MESSAGES,
|
|
1945
|
+
CHANNEL_WHATSAPP_PARAMS,
|
|
1946
|
+
CHANNEL_WHATSAPP_ACCOUNT,
|
|
1947
|
+
CHANNEL_WHATSAPP_TEMPLATE_CREATE,
|
|
1948
|
+
CHANNEL_WHATSAPP_TEMPLATE_CONTENT,
|
|
1949
|
+
CHANNEL_WHATSAPP_TEMPLATE_PARAMS,
|
|
1890
1950
|
ARTIFACT_UPDATE_RESOURCE_SHOW_SOURCE,
|
|
1891
1951
|
ARTIFACT_UPDATE_RESOURCE_SYNC_INTERVAL,
|
|
1892
1952
|
ARTIFACT_SYNC_RESOURCE,
|
|
@@ -1917,6 +1977,7 @@ exports.Schema = {
|
|
|
1917
1977
|
CUSTOM_CODE_BROKER_DATA,
|
|
1918
1978
|
CUSTOM_CODE_BROKER_CHANNELS_SEND,
|
|
1919
1979
|
CUSTOM_CODE_BROKER_CHANNELS_POST,
|
|
1980
|
+
CUSTOM_CODE_BROKER_CHANNELS_TEMPLATES,
|
|
1920
1981
|
CUSTOM_CODE_BROKER_RESOURCE_SEARCH,
|
|
1921
1982
|
CUSTOM_CODE_BROKER_RESOURCE_READ,
|
|
1922
1983
|
CUSTOM_CODE_BROKER_RESOURCE_CREATE,
|
package/dist/sdkConstants.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare const CUSTOM_CODE_BROKER_PATH_SEND_FILE = "/send-file";
|
|
|
12
12
|
export declare const CUSTOM_CODE_BROKER_PATH_DATA = "/data";
|
|
13
13
|
export declare const CUSTOM_CODE_BROKER_PATH_CHANNELS_SEND = "/channels/send";
|
|
14
14
|
export declare const CUSTOM_CODE_BROKER_PATH_CHANNELS_POST = "/channels/post";
|
|
15
|
+
export declare const CUSTOM_CODE_BROKER_PATH_CHANNELS_TEMPLATES = "/channels/templates";
|
|
15
16
|
export declare const CUSTOM_CODE_BINDING_VERSION = "GANJU_SCRIPT_VERSION";
|
|
16
17
|
export declare const CUSTOM_CODE_HEALTH_TOOL = "__ganju_health";
|
|
17
18
|
export declare const CUSTOM_CODE_MAX_LOGS = 50;
|