samva 0.52.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/sdk.gen.d.ts +15 -8
- package/dist/client/sdk.gen.js +35 -28
- package/dist/client/types.gen.d.ts +92 -15
- package/dist/effect/events.d.ts +16 -0
- package/dist/effect/generated/events.d.ts +48 -0
- package/dist/effect/generated/events.js +1 -1
- package/dist/effect/generated/journeys.d.ts +1047 -49
- package/dist/effect/generated/journeys.js +10 -4
- package/dist/effect/generated/logs.d.ts +12 -0
- package/dist/effect/generated/mailboxes.d.ts +8 -0
- package/dist/effect/generated/mailboxes.js +2 -1
- package/dist/effect/generated/messages.d.ts +10 -0
- package/dist/effect/generated/scheduled-messages.d.ts +36 -0
- package/dist/effect/generated/shared.d.ts +398 -15
- package/dist/effect/generated/shared.js +51 -13
- package/dist/effect/generated/whats-app-flows.d.ts +23 -5
- package/dist/effect/generated/whats-app-flows.js +9 -7
- package/dist/effect/journeys.d.ts +66 -0
- package/dist/effect/mailboxes.d.ts +2 -0
- package/dist/effect/scheduled-messages.d.ts +66 -0
- package/dist/effect/whatsapp-flows.d.ts +30 -0
- package/dist/package.js +1 -1
- package/dist/promises/types.gen.d.ts +1 -1
- package/package.json +2 -2
package/dist/client/sdk.gen.d.ts
CHANGED
|
@@ -1628,7 +1628,7 @@ export declare class Events {
|
|
|
1628
1628
|
/**
|
|
1629
1629
|
* Record a contact event
|
|
1630
1630
|
*
|
|
1631
|
-
* Records a custom contact event. Identify the contact by exactly one ID, external ID, or
|
|
1631
|
+
* Records a custom contact event. Identify the contact by exactly one ID, external ID, email, or E.164 phone number. An unmatched external ID, email, or phone number creates a contact; an unknown contact ID returns 404. An idempotency key replays the original event in the credential’s scope. Event names use letters, digits, underscores, hyphens, and dots, up to 255 characters; contact. and samva. prefixes are reserved. Properties allow at most 50 keys and 32 KiB of UTF-8 JSON. Events are retained for 90 days.
|
|
1632
1632
|
*/
|
|
1633
1633
|
static create<ThrowOnError extends boolean = false>(parameters: {
|
|
1634
1634
|
contact: ContactEventReference;
|
|
@@ -1667,9 +1667,10 @@ export declare class Journeys {
|
|
|
1667
1667
|
/**
|
|
1668
1668
|
* List journeys
|
|
1669
1669
|
*
|
|
1670
|
-
* Returns the
|
|
1670
|
+
* Returns the journeys the caller can access, newest first. Filter by namespaceId or status. Pass nextCursor back as cursor for the next page.
|
|
1671
1671
|
*/
|
|
1672
1672
|
static list<ThrowOnError extends boolean = false>(parameters?: {
|
|
1673
|
+
namespaceId?: NamespaceId | undefined;
|
|
1673
1674
|
status?: JourneyStatus | undefined;
|
|
1674
1675
|
limit?: number | null | undefined;
|
|
1675
1676
|
cursor?: string | undefined;
|
|
@@ -1677,10 +1678,11 @@ export declare class Journeys {
|
|
|
1677
1678
|
/**
|
|
1678
1679
|
* Create a journey
|
|
1679
1680
|
*
|
|
1680
|
-
* Creates a draft journey from a definition: a trigger, a root node, and a graph of at most 200 nodes that is acyclic and fully reachable.
|
|
1681
|
+
* Creates a draft journey from a definition: a trigger, a root node, and a graph of at most 200 nodes that is acyclic and fully reachable. A namespace key creates in its own namespace. An organization key can pass namespaceId to place the journey in a namespace. The journey can use resources available in its scope. Requires a plan that includes journeys.
|
|
1681
1682
|
*/
|
|
1682
1683
|
static create<ThrowOnError extends boolean = false>(parameters: {
|
|
1683
1684
|
name: JourneyName;
|
|
1685
|
+
namespaceId?: NamespaceId | undefined;
|
|
1684
1686
|
definition: JourneyDefinitionWritable;
|
|
1685
1687
|
}, options?: Options<never, ThrowOnError>): RequestResult<JourneysCreateResponses, JourneysCreateErrors, ThrowOnError>;
|
|
1686
1688
|
/**
|
|
@@ -4878,18 +4880,19 @@ export declare class WhatsappFlows {
|
|
|
4878
4880
|
/**
|
|
4879
4881
|
* List flows
|
|
4880
4882
|
*
|
|
4881
|
-
* Returns the
|
|
4883
|
+
* Returns flows visible to the caller, newest first, each with its current version.
|
|
4882
4884
|
*/
|
|
4883
4885
|
static list<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<WhatsappFlowsListResponses, WhatsappFlowsListErrors, ThrowOnError>;
|
|
4884
4886
|
/**
|
|
4885
4887
|
* Create a flow
|
|
4886
4888
|
*
|
|
4887
|
-
* Creates a WhatsApp flow whose versions read `flows/<handle>.json` in the template project. The handle is unique in
|
|
4889
|
+
* Creates a WhatsApp flow whose versions read `flows/<handle>.json` in the template project. The handle is unique in its namespace or at organization level; the categories are Meta's and go with every version to Meta.
|
|
4888
4890
|
*/
|
|
4889
4891
|
static create<ThrowOnError extends boolean = false>(parameters: {
|
|
4890
4892
|
projectId: TemplateProjectId;
|
|
4891
4893
|
handle: string;
|
|
4892
4894
|
categories: Array<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
|
|
4895
|
+
submissionHandler?: "agent" | "app" | undefined;
|
|
4893
4896
|
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappFlowsCreateResponses, WhatsappFlowsCreateErrors, ThrowOnError>;
|
|
4894
4897
|
/**
|
|
4895
4898
|
* Get a flow
|
|
@@ -4910,12 +4913,16 @@ export declare class WhatsappFlows {
|
|
|
4910
4913
|
/**
|
|
4911
4914
|
* Record a flow version
|
|
4912
4915
|
*
|
|
4913
|
-
*
|
|
4916
|
+
* Supply Flow JSON to commit the flow's file and record its version, or name a commit and workspace revision to record a file already on the project's default branch. The same content returns the version that already recorded it.
|
|
4914
4917
|
*/
|
|
4915
4918
|
static recordVersion<ThrowOnError extends boolean = false>(parameters: {
|
|
4916
4919
|
id: WhatsAppFlowId;
|
|
4917
|
-
|
|
4918
|
-
|
|
4920
|
+
body: {
|
|
4921
|
+
commitSha: string;
|
|
4922
|
+
expectedWorkspaceRevision: string;
|
|
4923
|
+
} | {
|
|
4924
|
+
flowJson: JsonObjectWritable;
|
|
4925
|
+
};
|
|
4919
4926
|
}, options?: Options<never, ThrowOnError>): RequestResult<WhatsappFlowsRecordVersionResponses, WhatsappFlowsRecordVersionErrors, ThrowOnError>;
|
|
4920
4927
|
/**
|
|
4921
4928
|
* List a flow's registrations
|
package/dist/client/sdk.gen.js
CHANGED
|
@@ -5114,7 +5114,7 @@ var Events = class {
|
|
|
5114
5114
|
/**
|
|
5115
5115
|
* Record a contact event
|
|
5116
5116
|
*
|
|
5117
|
-
* Records a custom contact event. Identify the contact by exactly one ID, external ID, or
|
|
5117
|
+
* Records a custom contact event. Identify the contact by exactly one ID, external ID, email, or E.164 phone number. An unmatched external ID, email, or phone number creates a contact; an unknown contact ID returns 404. An idempotency key replays the original event in the credential’s scope. Event names use letters, digits, underscores, hyphens, and dots, up to 255 characters; contact. and samva. prefixes are reserved. Properties allow at most 50 keys and 32 KiB of UTF-8 JSON. Events are retained for 90 days.
|
|
5118
5118
|
*/
|
|
5119
5119
|
static create(parameters, options) {
|
|
5120
5120
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -5221,10 +5221,14 @@ var Journeys = class {
|
|
|
5221
5221
|
/**
|
|
5222
5222
|
* List journeys
|
|
5223
5223
|
*
|
|
5224
|
-
* Returns the
|
|
5224
|
+
* Returns the journeys the caller can access, newest first. Filter by namespaceId or status. Pass nextCursor back as cursor for the next page.
|
|
5225
5225
|
*/
|
|
5226
5226
|
static list(parameters, options) {
|
|
5227
5227
|
const params = buildClientParams([parameters], [{ args: [
|
|
5228
|
+
{
|
|
5229
|
+
in: "query",
|
|
5230
|
+
key: "namespaceId"
|
|
5231
|
+
},
|
|
5228
5232
|
{
|
|
5229
5233
|
in: "query",
|
|
5230
5234
|
key: "status"
|
|
@@ -5256,16 +5260,23 @@ var Journeys = class {
|
|
|
5256
5260
|
/**
|
|
5257
5261
|
* Create a journey
|
|
5258
5262
|
*
|
|
5259
|
-
* Creates a draft journey from a definition: a trigger, a root node, and a graph of at most 200 nodes that is acyclic and fully reachable.
|
|
5263
|
+
* Creates a draft journey from a definition: a trigger, a root node, and a graph of at most 200 nodes that is acyclic and fully reachable. A namespace key creates in its own namespace. An organization key can pass namespaceId to place the journey in a namespace. The journey can use resources available in its scope. Requires a plan that includes journeys.
|
|
5260
5264
|
*/
|
|
5261
5265
|
static create(parameters, options) {
|
|
5262
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5266
|
+
const params = buildClientParams([parameters], [{ args: [
|
|
5267
|
+
{
|
|
5268
|
+
in: "body",
|
|
5269
|
+
key: "name"
|
|
5270
|
+
},
|
|
5271
|
+
{
|
|
5272
|
+
in: "body",
|
|
5273
|
+
key: "namespaceId"
|
|
5274
|
+
},
|
|
5275
|
+
{
|
|
5276
|
+
in: "body",
|
|
5277
|
+
key: "definition"
|
|
5278
|
+
}
|
|
5279
|
+
] }]);
|
|
5269
5280
|
return requestWithPolicy(options?.client ?? client, "journeysCreate", options, (headers, signal) => (options?.client ?? client).post({
|
|
5270
5281
|
security: [{
|
|
5271
5282
|
name: "x-api-key",
|
|
@@ -15426,7 +15437,7 @@ var WhatsappFlows = class {
|
|
|
15426
15437
|
/**
|
|
15427
15438
|
* List flows
|
|
15428
15439
|
*
|
|
15429
|
-
* Returns the
|
|
15440
|
+
* Returns flows visible to the caller, newest first, each with its current version.
|
|
15430
15441
|
*/
|
|
15431
15442
|
static list(options) {
|
|
15432
15443
|
return requestWithPolicy(options?.client ?? client, "whatsappFlowsList", options, (headers, signal) => (options?.client ?? client).get({
|
|
@@ -15443,7 +15454,7 @@ var WhatsappFlows = class {
|
|
|
15443
15454
|
/**
|
|
15444
15455
|
* Create a flow
|
|
15445
15456
|
*
|
|
15446
|
-
* Creates a WhatsApp flow whose versions read `flows/<handle>.json` in the template project. The handle is unique in
|
|
15457
|
+
* Creates a WhatsApp flow whose versions read `flows/<handle>.json` in the template project. The handle is unique in its namespace or at organization level; the categories are Meta's and go with every version to Meta.
|
|
15447
15458
|
*/
|
|
15448
15459
|
static create(parameters, options) {
|
|
15449
15460
|
const params = buildClientParams([parameters], [{ args: [
|
|
@@ -15458,6 +15469,10 @@ var WhatsappFlows = class {
|
|
|
15458
15469
|
{
|
|
15459
15470
|
in: "body",
|
|
15460
15471
|
key: "categories"
|
|
15472
|
+
},
|
|
15473
|
+
{
|
|
15474
|
+
in: "body",
|
|
15475
|
+
key: "submissionHandler"
|
|
15461
15476
|
}
|
|
15462
15477
|
] }]);
|
|
15463
15478
|
return requestWithPolicy(options?.client ?? client, "whatsappFlowsCreate", options, (headers, signal) => (options?.client ?? client).post({
|
|
@@ -15530,23 +15545,16 @@ var WhatsappFlows = class {
|
|
|
15530
15545
|
/**
|
|
15531
15546
|
* Record a flow version
|
|
15532
15547
|
*
|
|
15533
|
-
*
|
|
15548
|
+
* Supply Flow JSON to commit the flow's file and record its version, or name a commit and workspace revision to record a file already on the project's default branch. The same content returns the version that already recorded it.
|
|
15534
15549
|
*/
|
|
15535
15550
|
static recordVersion(parameters, options) {
|
|
15536
|
-
const params = buildClientParams([parameters], [{ args: [
|
|
15537
|
-
|
|
15538
|
-
|
|
15539
|
-
|
|
15540
|
-
|
|
15541
|
-
|
|
15542
|
-
|
|
15543
|
-
key: "commitSha"
|
|
15544
|
-
},
|
|
15545
|
-
{
|
|
15546
|
-
in: "body",
|
|
15547
|
-
key: "expectedWorkspaceRevision"
|
|
15548
|
-
}
|
|
15549
|
-
] }]);
|
|
15551
|
+
const params = buildClientParams([parameters], [{ args: [{
|
|
15552
|
+
in: "path",
|
|
15553
|
+
key: "id"
|
|
15554
|
+
}, {
|
|
15555
|
+
key: "body",
|
|
15556
|
+
map: "body"
|
|
15557
|
+
}] }]);
|
|
15550
15558
|
return requestWithPolicy(options?.client ?? client, "whatsappFlowsRecordVersion", options, (headers, signal) => (options?.client ?? client).post({
|
|
15551
15559
|
security: [{
|
|
15552
15560
|
name: "x-api-key",
|
|
@@ -15555,7 +15563,6 @@ var WhatsappFlows = class {
|
|
|
15555
15563
|
url: "/v1/whatsapp/flows/{id}/versions",
|
|
15556
15564
|
...options,
|
|
15557
15565
|
...params,
|
|
15558
|
-
body: params.body ?? {},
|
|
15559
15566
|
headers: {
|
|
15560
15567
|
"Content-Type": "application/json",
|
|
15561
15568
|
...headers,
|
|
@@ -267,6 +267,14 @@ export type WhatsAppFlowVersion = {
|
|
|
267
267
|
export type RecordWhatsAppFlowVersionPayload = {
|
|
268
268
|
commitSha: string;
|
|
269
269
|
expectedWorkspaceRevision: string;
|
|
270
|
+
} | {
|
|
271
|
+
flowJson: JsonObject;
|
|
272
|
+
};
|
|
273
|
+
export type JsonObject = {
|
|
274
|
+
[key: string]: JsonValue;
|
|
275
|
+
};
|
|
276
|
+
export type JsonObjectWritable = {
|
|
277
|
+
[key: string]: JsonValueWritable | undefined;
|
|
270
278
|
};
|
|
271
279
|
export type WhatsAppFlow = {
|
|
272
280
|
id: WhatsAppFlowId;
|
|
@@ -274,6 +282,7 @@ export type WhatsAppFlow = {
|
|
|
274
282
|
handle: string;
|
|
275
283
|
path: string;
|
|
276
284
|
categories: Array<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
|
|
285
|
+
submissionHandler?: "agent" | "app" | undefined;
|
|
277
286
|
endpoint: WhatsAppFlowEndpoint | null;
|
|
278
287
|
currentVersion: WhatsAppFlowVersion | null;
|
|
279
288
|
createdAt: string;
|
|
@@ -291,6 +300,7 @@ export type CreateWhatsAppFlowPayload = {
|
|
|
291
300
|
projectId: TemplateProjectId;
|
|
292
301
|
handle: string;
|
|
293
302
|
categories: Array<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
|
|
303
|
+
submissionHandler?: "agent" | "app" | undefined;
|
|
294
304
|
};
|
|
295
305
|
export type MessageDeliveryId = string;
|
|
296
306
|
export type MoneyAmount = {
|
|
@@ -744,12 +754,6 @@ export type MailboxChatTemplate = {
|
|
|
744
754
|
templateChannelVariantId: TemplateChannelVariantId;
|
|
745
755
|
templateData: JsonObject | null;
|
|
746
756
|
};
|
|
747
|
-
export type JsonObject = {
|
|
748
|
-
[key: string]: JsonValue;
|
|
749
|
-
};
|
|
750
|
-
export type JsonObjectWritable = {
|
|
751
|
-
[key: string]: JsonValueWritable | undefined;
|
|
752
|
-
};
|
|
753
757
|
export type MailboxSmsEndpointBinding = {
|
|
754
758
|
channel: "sms";
|
|
755
759
|
phoneNumberId: SmsPhoneNumberId;
|
|
@@ -1084,6 +1088,7 @@ export type MailboxChatMessage = {
|
|
|
1084
1088
|
template: MailboxChatMessageTemplate | null;
|
|
1085
1089
|
summary: string | null;
|
|
1086
1090
|
contextMessageId: MessageId | null;
|
|
1091
|
+
flowSubmissionHandledBy?: "app" | undefined;
|
|
1087
1092
|
};
|
|
1088
1093
|
export type MailboxChatMessageTemplate = {
|
|
1089
1094
|
name: string;
|
|
@@ -3649,6 +3654,7 @@ export type RunAgentTestPayload = {
|
|
|
3649
3654
|
};
|
|
3650
3655
|
export type JourneyRunDetail = {
|
|
3651
3656
|
id: JourneyRunId;
|
|
3657
|
+
namespaceId?: NamespaceId | null | undefined;
|
|
3652
3658
|
journeyId: JourneyId;
|
|
3653
3659
|
version: number;
|
|
3654
3660
|
contactId: ContactId;
|
|
@@ -3689,6 +3695,7 @@ export type JourneyRunPage = {
|
|
|
3689
3695
|
};
|
|
3690
3696
|
export type JourneyRun = {
|
|
3691
3697
|
id: JourneyRunId;
|
|
3698
|
+
namespaceId?: NamespaceId | null | undefined;
|
|
3692
3699
|
journeyId: JourneyId;
|
|
3693
3700
|
version: number;
|
|
3694
3701
|
contactId: ContactId;
|
|
@@ -3736,6 +3743,9 @@ export type JourneyDefinition = {
|
|
|
3736
3743
|
enrollment?: {
|
|
3737
3744
|
type: "shopify_order";
|
|
3738
3745
|
shop: ShopifyShop;
|
|
3746
|
+
} | {
|
|
3747
|
+
type: "event_property";
|
|
3748
|
+
property: string;
|
|
3739
3749
|
} | undefined;
|
|
3740
3750
|
};
|
|
3741
3751
|
export type JourneyDefinitionWritable = {
|
|
@@ -3749,6 +3759,9 @@ export type JourneyDefinitionWritable = {
|
|
|
3749
3759
|
enrollment?: {
|
|
3750
3760
|
type: "shopify_order";
|
|
3751
3761
|
shop: ShopifyShop;
|
|
3762
|
+
} | {
|
|
3763
|
+
type: "event_property";
|
|
3764
|
+
property: string;
|
|
3752
3765
|
} | undefined;
|
|
3753
3766
|
};
|
|
3754
3767
|
export type ShopifyShop = string;
|
|
@@ -3782,9 +3795,15 @@ export type JourneyNextEdge = {
|
|
|
3782
3795
|
};
|
|
3783
3796
|
export type JourneyWebhookConfig = {
|
|
3784
3797
|
data?: JsonObject | undefined;
|
|
3798
|
+
eventBindings?: {
|
|
3799
|
+
[key: string]: string;
|
|
3800
|
+
} | undefined;
|
|
3785
3801
|
};
|
|
3786
3802
|
export type JourneyWebhookConfigWritable = {
|
|
3787
3803
|
data?: JsonObjectWritable | undefined;
|
|
3804
|
+
eventBindings?: {
|
|
3805
|
+
[key: string]: string | undefined;
|
|
3806
|
+
} | undefined;
|
|
3788
3807
|
};
|
|
3789
3808
|
export type JourneyUpdateTagsNode = {
|
|
3790
3809
|
type: "update_tags";
|
|
@@ -3808,15 +3827,10 @@ export type JourneyCondition = {
|
|
|
3808
3827
|
match: "all" | "any";
|
|
3809
3828
|
predicates: [JourneyPredicate, ...Array<JourneyPredicate>];
|
|
3810
3829
|
};
|
|
3811
|
-
export type JourneyPredicate = JourneyTagPredicate | JourneyPropertyPredicate | JourneyCustomFieldPredicate | JourneyEventPredicate;
|
|
3812
|
-
export type
|
|
3813
|
-
type: "
|
|
3814
|
-
|
|
3815
|
-
occurred: boolean;
|
|
3816
|
-
};
|
|
3817
|
-
export type JourneyCustomFieldPredicate = {
|
|
3818
|
-
type: "custom_field";
|
|
3819
|
-
key: string;
|
|
3830
|
+
export type JourneyPredicate = JourneyTagPredicate | JourneyPropertyPredicate | JourneyCustomFieldPredicate | JourneyEventPredicate | JourneyEntryEventPropertyPredicate;
|
|
3831
|
+
export type JourneyEntryEventPropertyPredicate = {
|
|
3832
|
+
type: "entry_event_property";
|
|
3833
|
+
property: string;
|
|
3820
3834
|
comparison: JourneyComparison;
|
|
3821
3835
|
};
|
|
3822
3836
|
export type JourneyComparison = JourneyEqualityComparison | JourneyNumericComparison | JourneyStringComparison | JourneyPresenceComparison;
|
|
@@ -3835,6 +3849,16 @@ export type JourneyEqualityComparison = {
|
|
|
3835
3849
|
operator: "eq" | "neq";
|
|
3836
3850
|
value: string | number | boolean | null;
|
|
3837
3851
|
};
|
|
3852
|
+
export type JourneyEventPredicate = {
|
|
3853
|
+
type: "event";
|
|
3854
|
+
eventName: JourneyEventName;
|
|
3855
|
+
occurred: boolean;
|
|
3856
|
+
};
|
|
3857
|
+
export type JourneyCustomFieldPredicate = {
|
|
3858
|
+
type: "custom_field";
|
|
3859
|
+
key: string;
|
|
3860
|
+
comparison: JourneyComparison;
|
|
3861
|
+
};
|
|
3838
3862
|
export type JourneyPropertyPredicate = {
|
|
3839
3863
|
type: "property";
|
|
3840
3864
|
field: JourneyContactProperty;
|
|
@@ -3857,6 +3881,10 @@ export type JourneyWaitEventEdge = {
|
|
|
3857
3881
|
};
|
|
3858
3882
|
export type JourneyWaitForEventConfig = {
|
|
3859
3883
|
eventName: JourneyEventName;
|
|
3884
|
+
correlation?: {
|
|
3885
|
+
eventProperty: string;
|
|
3886
|
+
entryProperty: string;
|
|
3887
|
+
} | undefined;
|
|
3860
3888
|
timeoutSeconds: number;
|
|
3861
3889
|
};
|
|
3862
3890
|
export type JourneyWaitNode = {
|
|
@@ -3889,6 +3917,10 @@ export type JourneySendWhatsAppConfig = {
|
|
|
3889
3917
|
eventBindings?: {
|
|
3890
3918
|
[key: string]: string;
|
|
3891
3919
|
} | undefined;
|
|
3920
|
+
/**
|
|
3921
|
+
* Entry-event property path to the JSON object that initializes a navigate Flow button.
|
|
3922
|
+
*/
|
|
3923
|
+
flowActionDataBinding?: string | undefined;
|
|
3892
3924
|
};
|
|
3893
3925
|
export type JourneySendWhatsAppConfigWritable = {
|
|
3894
3926
|
template: TemplateId | string;
|
|
@@ -3902,6 +3934,10 @@ export type JourneySendWhatsAppConfigWritable = {
|
|
|
3902
3934
|
eventBindings?: {
|
|
3903
3935
|
[key: string]: string | undefined;
|
|
3904
3936
|
} | undefined;
|
|
3937
|
+
/**
|
|
3938
|
+
* Entry-event property path to the JSON object that initializes a navigate Flow button.
|
|
3939
|
+
*/
|
|
3940
|
+
flowActionDataBinding?: string | undefined;
|
|
3905
3941
|
};
|
|
3906
3942
|
export type WhatsAppTemplateDispatchData = {
|
|
3907
3943
|
[key: string]: JsonValue;
|
|
@@ -3924,12 +3960,18 @@ export type JourneySendEmailConfig = {
|
|
|
3924
3960
|
publicationId?: TemplatePublicationId | undefined;
|
|
3925
3961
|
senderId?: EmailSenderId | undefined;
|
|
3926
3962
|
templateData?: JsonObject | undefined;
|
|
3963
|
+
eventBindings?: {
|
|
3964
|
+
[key: string]: string;
|
|
3965
|
+
} | undefined;
|
|
3927
3966
|
};
|
|
3928
3967
|
export type JourneySendEmailConfigWritable = {
|
|
3929
3968
|
template: TemplateId | string;
|
|
3930
3969
|
publicationId?: TemplatePublicationId | undefined;
|
|
3931
3970
|
senderId?: EmailSenderId | undefined;
|
|
3932
3971
|
templateData?: JsonObjectWritable | undefined;
|
|
3972
|
+
eventBindings?: {
|
|
3973
|
+
[key: string]: string | undefined;
|
|
3974
|
+
} | undefined;
|
|
3933
3975
|
};
|
|
3934
3976
|
export type JourneyTrigger = JourneyCustomEventTrigger | JourneyContactCreatedTrigger | JourneyTagAddedTrigger | JourneyGroupJoinedTrigger;
|
|
3935
3977
|
export type JourneyGroupJoinedTrigger = {
|
|
@@ -3949,6 +3991,7 @@ export type JourneyCustomEventTrigger = {
|
|
|
3949
3991
|
};
|
|
3950
3992
|
export type Journey = {
|
|
3951
3993
|
id: JourneyId;
|
|
3994
|
+
namespaceId?: NamespaceId | null | undefined;
|
|
3952
3995
|
name: string;
|
|
3953
3996
|
status: JourneyStatus;
|
|
3954
3997
|
revision: string;
|
|
@@ -3975,6 +4018,7 @@ export type UpdateJourneyPayload = {
|
|
|
3975
4018
|
export type JourneyName = string;
|
|
3976
4019
|
export type CreateJourneyPayload = {
|
|
3977
4020
|
name: JourneyName;
|
|
4021
|
+
namespaceId?: NamespaceId | undefined;
|
|
3978
4022
|
definition: JourneyDefinition;
|
|
3979
4023
|
};
|
|
3980
4024
|
export type JourneyPage = {
|
|
@@ -3983,6 +4027,7 @@ export type JourneyPage = {
|
|
|
3983
4027
|
};
|
|
3984
4028
|
export type JourneyListItem = {
|
|
3985
4029
|
id: JourneyId;
|
|
4030
|
+
namespaceId?: NamespaceId | null | undefined;
|
|
3986
4031
|
name: string;
|
|
3987
4032
|
status: JourneyStatus;
|
|
3988
4033
|
publishedVersion: number | null;
|
|
@@ -4027,14 +4072,22 @@ export type ContactEventReference = {
|
|
|
4027
4072
|
id: ContactId;
|
|
4028
4073
|
externalId?: never | undefined;
|
|
4029
4074
|
email?: never | undefined;
|
|
4075
|
+
phone?: never | undefined;
|
|
4030
4076
|
} | {
|
|
4031
4077
|
externalId: string;
|
|
4032
4078
|
id?: never | undefined;
|
|
4033
4079
|
email?: never | undefined;
|
|
4080
|
+
phone?: never | undefined;
|
|
4034
4081
|
} | {
|
|
4035
4082
|
email: string;
|
|
4036
4083
|
id?: never | undefined;
|
|
4037
4084
|
externalId?: never | undefined;
|
|
4085
|
+
phone?: never | undefined;
|
|
4086
|
+
} | {
|
|
4087
|
+
phone: string;
|
|
4088
|
+
id?: never | undefined;
|
|
4089
|
+
externalId?: never | undefined;
|
|
4090
|
+
email?: never | undefined;
|
|
4038
4091
|
};
|
|
4039
4092
|
export type ContactGroupMembershipPage = {
|
|
4040
4093
|
items: Array<{
|
|
@@ -5553,11 +5606,25 @@ export type WhatsAppTemplateSlugContent = {
|
|
|
5553
5606
|
templateSlug: string;
|
|
5554
5607
|
templateData?: WhatsAppTemplateData | undefined;
|
|
5555
5608
|
flowToken?: string | undefined;
|
|
5609
|
+
flowActionData?: JsonObject1 | undefined;
|
|
5556
5610
|
};
|
|
5557
5611
|
export type WhatsAppTemplateSlugContentWritable = {
|
|
5558
5612
|
templateSlug: string;
|
|
5559
5613
|
templateData?: WhatsAppTemplateDataWritable | undefined;
|
|
5560
5614
|
flowToken?: string | undefined;
|
|
5615
|
+
flowActionData?: JsonObject1Writable | undefined;
|
|
5616
|
+
};
|
|
5617
|
+
/**
|
|
5618
|
+
* Initial screen data for a navigate Flow button.
|
|
5619
|
+
*/
|
|
5620
|
+
export type JsonObject1 = {
|
|
5621
|
+
[key: string]: JsonValue;
|
|
5622
|
+
};
|
|
5623
|
+
/**
|
|
5624
|
+
* Initial screen data for a navigate Flow button.
|
|
5625
|
+
*/
|
|
5626
|
+
export type JsonObject1Writable = {
|
|
5627
|
+
[key: string]: JsonValueWritable | undefined;
|
|
5561
5628
|
};
|
|
5562
5629
|
export type WhatsAppTemplateData = {
|
|
5563
5630
|
[key: string]: JsonValue;
|
|
@@ -5569,11 +5636,13 @@ export type WhatsAppTemplateIdContent = {
|
|
|
5569
5636
|
templateId: TemplateId;
|
|
5570
5637
|
templateData?: WhatsAppTemplateData | undefined;
|
|
5571
5638
|
flowToken?: string | undefined;
|
|
5639
|
+
flowActionData?: JsonObject1 | undefined;
|
|
5572
5640
|
};
|
|
5573
5641
|
export type WhatsAppTemplateIdContentWritable = {
|
|
5574
5642
|
templateId: TemplateId;
|
|
5575
5643
|
templateData?: WhatsAppTemplateDataWritable | undefined;
|
|
5576
5644
|
flowToken?: string | undefined;
|
|
5645
|
+
flowActionData?: JsonObject1Writable | undefined;
|
|
5577
5646
|
};
|
|
5578
5647
|
export type WhatsAppTextContent = {
|
|
5579
5648
|
text: string;
|
|
@@ -5905,6 +5974,7 @@ export type WhatsAppStructuredContent = {
|
|
|
5905
5974
|
};
|
|
5906
5975
|
};
|
|
5907
5976
|
export type WhatsAppMessageContent = {
|
|
5977
|
+
appHandlesFlowSubmission?: true | undefined;
|
|
5908
5978
|
text?: string | null | undefined;
|
|
5909
5979
|
template?: {
|
|
5910
5980
|
name: string;
|
|
@@ -5937,6 +6007,7 @@ export type WhatsAppMessageContent = {
|
|
|
5937
6007
|
coupon_code?: string | null | undefined;
|
|
5938
6008
|
action?: {
|
|
5939
6009
|
flow_token: string;
|
|
6010
|
+
flow_action_data?: JsonObject | undefined;
|
|
5940
6011
|
} | null | undefined;
|
|
5941
6012
|
}>;
|
|
5942
6013
|
}>;
|
|
@@ -5956,6 +6027,7 @@ export type WhatsAppMessageReference = {
|
|
|
5956
6027
|
};
|
|
5957
6028
|
export type WhatsAppReceivedFlowResponse = {
|
|
5958
6029
|
flowToken: string | null;
|
|
6030
|
+
submissionHandler?: "app" | undefined;
|
|
5959
6031
|
response: {
|
|
5960
6032
|
[key: string]: JsonValue;
|
|
5961
6033
|
};
|
|
@@ -14431,6 +14503,7 @@ export type JourneysListData = {
|
|
|
14431
14503
|
body?: never;
|
|
14432
14504
|
path?: never;
|
|
14433
14505
|
query?: {
|
|
14506
|
+
namespaceId?: NamespaceId | undefined;
|
|
14434
14507
|
status?: JourneyStatus | undefined;
|
|
14435
14508
|
limit?: number | null | undefined;
|
|
14436
14509
|
cursor?: string | undefined;
|
|
@@ -14474,6 +14547,7 @@ export type JourneysListResponse = JourneysListResponses[keyof JourneysListRespo
|
|
|
14474
14547
|
export type JourneysCreateData = {
|
|
14475
14548
|
body: {
|
|
14476
14549
|
name: JourneyName;
|
|
14550
|
+
namespaceId?: NamespaceId | undefined;
|
|
14477
14551
|
definition: JourneyDefinitionWritable;
|
|
14478
14552
|
};
|
|
14479
14553
|
path?: never;
|
|
@@ -32577,6 +32651,7 @@ export type WhatsappFlowsCreateData = {
|
|
|
32577
32651
|
projectId: TemplateProjectId;
|
|
32578
32652
|
handle: string;
|
|
32579
32653
|
categories: Array<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
|
|
32654
|
+
submissionHandler?: "agent" | "app" | undefined;
|
|
32580
32655
|
};
|
|
32581
32656
|
path?: never;
|
|
32582
32657
|
query?: never;
|
|
@@ -32720,6 +32795,8 @@ export type WhatsappFlowsRecordVersionData = {
|
|
|
32720
32795
|
body: {
|
|
32721
32796
|
commitSha: string;
|
|
32722
32797
|
expectedWorkspaceRevision: string;
|
|
32798
|
+
} | {
|
|
32799
|
+
flowJson: JsonObjectWritable;
|
|
32723
32800
|
};
|
|
32724
32801
|
path: {
|
|
32725
32802
|
id: WhatsAppFlowId;
|
package/dist/effect/events.d.ts
CHANGED
|
@@ -4,14 +4,22 @@ export declare const create: (input: {
|
|
|
4
4
|
readonly id: string;
|
|
5
5
|
readonly externalId?: undefined;
|
|
6
6
|
readonly email?: undefined;
|
|
7
|
+
readonly phone?: undefined;
|
|
7
8
|
} | {
|
|
8
9
|
readonly externalId: string;
|
|
9
10
|
readonly id?: undefined;
|
|
10
11
|
readonly email?: undefined;
|
|
12
|
+
readonly phone?: undefined;
|
|
11
13
|
} | {
|
|
12
14
|
readonly email: string;
|
|
13
15
|
readonly id?: undefined;
|
|
14
16
|
readonly externalId?: undefined;
|
|
17
|
+
readonly phone?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
readonly phone: string;
|
|
20
|
+
readonly id?: undefined;
|
|
21
|
+
readonly externalId?: undefined;
|
|
22
|
+
readonly email?: undefined;
|
|
15
23
|
};
|
|
16
24
|
readonly name: string;
|
|
17
25
|
readonly properties?: {
|
|
@@ -49,14 +57,22 @@ export declare const batch: (input: {
|
|
|
49
57
|
readonly id: string;
|
|
50
58
|
readonly externalId?: undefined;
|
|
51
59
|
readonly email?: undefined;
|
|
60
|
+
readonly phone?: undefined;
|
|
52
61
|
} | {
|
|
53
62
|
readonly externalId: string;
|
|
54
63
|
readonly id?: undefined;
|
|
55
64
|
readonly email?: undefined;
|
|
65
|
+
readonly phone?: undefined;
|
|
56
66
|
} | {
|
|
57
67
|
readonly email: string;
|
|
58
68
|
readonly id?: undefined;
|
|
59
69
|
readonly externalId?: undefined;
|
|
70
|
+
readonly phone?: undefined;
|
|
71
|
+
} | {
|
|
72
|
+
readonly phone: string;
|
|
73
|
+
readonly id?: undefined;
|
|
74
|
+
readonly externalId?: undefined;
|
|
75
|
+
readonly email?: undefined;
|
|
60
76
|
};
|
|
61
77
|
readonly name: string;
|
|
62
78
|
readonly properties?: {
|