samva 0.47.0 → 0.48.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/agent/index.d.ts +1 -0
- package/dist/agent/index.js +2 -1
- package/dist/agent/runtime.js +26 -5
- package/dist/agent/types.d.ts +27 -0
- package/dist/client/sdk.gen.d.ts +10 -5
- package/dist/client/sdk.gen.js +33 -12
- package/dist/client/types.gen.d.ts +73 -12
- package/dist/effect/api-keys.d.ts +2 -0
- package/dist/effect/generated/api-keys.d.ts +15 -0
- package/dist/effect/generated/api-keys.js +2 -0
- package/dist/effect/generated/journeys.d.ts +96 -96
- package/dist/effect/generated/shared.d.ts +52 -38
- package/dist/effect/generated/shared.js +6 -5
- package/dist/effect/generated/template-registrations.d.ts +19 -1
- package/dist/effect/generated/template-registrations.js +7 -2
- package/dist/effect/generated/templates.d.ts +76 -11
- package/dist/effect/generated/templates.js +25 -12
- package/dist/effect/templates.d.ts +9 -0
- package/dist/package.js +1 -1
- package/dist/promises/types.gen.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1200,9 +1200,11 @@ export declare const SetWhatsAppFlowEndpointPayload: Schema.Struct<{
|
|
|
1200
1200
|
}>;
|
|
1201
1201
|
export type SuggestTemplateStartersPayload = {
|
|
1202
1202
|
readonly brief: string;
|
|
1203
|
+
readonly channel?: "email" | "whatsapp" | null;
|
|
1203
1204
|
};
|
|
1204
1205
|
export declare const SuggestTemplateStartersPayload: Schema.Struct<{
|
|
1205
1206
|
readonly brief: Schema.String;
|
|
1207
|
+
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"email">, Schema.Literal<"whatsapp">]>, Schema.Null]>>;
|
|
1206
1208
|
}>;
|
|
1207
1209
|
export type TemplateFamilyName = {
|
|
1208
1210
|
readonly name: string;
|
|
@@ -1464,18 +1466,12 @@ export type MergeContactPayload = {
|
|
|
1464
1466
|
export declare const MergeContactPayload: Schema.Struct<{
|
|
1465
1467
|
readonly from: Schema.brand<Schema.String, "ContactId">;
|
|
1466
1468
|
}>;
|
|
1467
|
-
export type
|
|
1468
|
-
readonly
|
|
1469
|
-
readonly name?: string | null;
|
|
1470
|
-
readonly galleryTemplateId?: string | null;
|
|
1471
|
-
readonly useBrand?: boolean | null;
|
|
1469
|
+
export type CreateTemplateFamilyPayload = {
|
|
1470
|
+
readonly name: string;
|
|
1472
1471
|
readonly namespaceId?: NamespaceId | null;
|
|
1473
1472
|
};
|
|
1474
|
-
export declare const
|
|
1475
|
-
readonly
|
|
1476
|
-
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1477
|
-
readonly galleryTemplateId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1478
|
-
readonly useBrand: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
1473
|
+
export declare const CreateTemplateFamilyPayload: Schema.Struct<{
|
|
1474
|
+
readonly name: Schema.String;
|
|
1479
1475
|
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
1480
1476
|
}>;
|
|
1481
1477
|
export type CreateTemplateFromWebsitePayload = {
|
|
@@ -1605,6 +1601,24 @@ export declare const ReplyMailboxChatPayload: Schema.Struct<{
|
|
|
1605
1601
|
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
1606
1602
|
readonly templateData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
1607
1603
|
}>;
|
|
1604
|
+
export type CreateTemplateFromBriefPayload = {
|
|
1605
|
+
readonly brief: string;
|
|
1606
|
+
readonly channel?: "email" | "whatsapp" | null;
|
|
1607
|
+
readonly name?: string | null;
|
|
1608
|
+
readonly galleryTemplateId?: string | null;
|
|
1609
|
+
readonly useBrand?: boolean | null;
|
|
1610
|
+
readonly namespaceId?: NamespaceId | null;
|
|
1611
|
+
readonly variantOf?: TemplateId | null;
|
|
1612
|
+
};
|
|
1613
|
+
export declare const CreateTemplateFromBriefPayload: Schema.Struct<{
|
|
1614
|
+
readonly brief: Schema.String;
|
|
1615
|
+
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"email">, Schema.Literal<"whatsapp">]>, Schema.Null]>>;
|
|
1616
|
+
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1617
|
+
readonly galleryTemplateId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1618
|
+
readonly useBrand: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
1619
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
1620
|
+
readonly variantOf: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
1621
|
+
}>;
|
|
1608
1622
|
export type UpdateAgentPayload = {
|
|
1609
1623
|
readonly name?: AgentName | null;
|
|
1610
1624
|
readonly monthlySpendCapDollars?: MonthlySpendCapDollars | null;
|
|
@@ -2067,8 +2081,8 @@ export declare const JourneyCustomEventTrigger: Schema.Struct<{
|
|
|
2067
2081
|
readonly type: Schema.Literal<"event">;
|
|
2068
2082
|
readonly eventName: Schema.String;
|
|
2069
2083
|
}>;
|
|
2070
|
-
export type JourneyEventName = JourneyCustomEventName | "contact.created" | "contact.tag_added" | "contact.joined_group";
|
|
2071
|
-
export declare const JourneyEventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
2084
|
+
export type JourneyEventName = JourneyCustomEventName | "contact.created" | "contact.tag_added" | "contact.joined_group" | "contact.connection_completed";
|
|
2085
|
+
export declare const JourneyEventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
2072
2086
|
export type JourneyNextEdge = {
|
|
2073
2087
|
readonly nodeId: JourneyNodeId;
|
|
2074
2088
|
};
|
|
@@ -3091,7 +3105,7 @@ export type JourneyWaitForEventConfig = {
|
|
|
3091
3105
|
readonly timeoutSeconds: number;
|
|
3092
3106
|
};
|
|
3093
3107
|
export declare const JourneyWaitForEventConfig: Schema.Struct<{
|
|
3094
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
3108
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
3095
3109
|
readonly timeoutSeconds: Schema.Finite;
|
|
3096
3110
|
}>;
|
|
3097
3111
|
export type JourneyEventPredicate = {
|
|
@@ -3101,14 +3115,14 @@ export type JourneyEventPredicate = {
|
|
|
3101
3115
|
};
|
|
3102
3116
|
export declare const JourneyEventPredicate: Schema.Struct<{
|
|
3103
3117
|
readonly type: Schema.Literal<"event">;
|
|
3104
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
3118
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
3105
3119
|
readonly occurred: Schema.Boolean;
|
|
3106
3120
|
}>;
|
|
3107
3121
|
export type JourneyGoal = {
|
|
3108
3122
|
readonly eventName: JourneyEventName;
|
|
3109
3123
|
};
|
|
3110
3124
|
export declare const JourneyGoal: Schema.Struct<{
|
|
3111
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
3125
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
3112
3126
|
}>;
|
|
3113
3127
|
export type JourneySendEmailNode = {
|
|
3114
3128
|
readonly type: "send_email";
|
|
@@ -3874,7 +3888,7 @@ export type JourneyWaitForEventNode = {
|
|
|
3874
3888
|
export declare const JourneyWaitForEventNode: Schema.Struct<{
|
|
3875
3889
|
readonly type: Schema.Literal<"wait_for_event">;
|
|
3876
3890
|
readonly config: Schema.Struct<{
|
|
3877
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
3891
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
3878
3892
|
readonly timeoutSeconds: Schema.Finite;
|
|
3879
3893
|
}>;
|
|
3880
3894
|
readonly next: Schema.Tuple<readonly [Schema.Struct<{
|
|
@@ -3922,7 +3936,7 @@ export declare const JourneyPredicate: Schema.Union<readonly [Schema.Struct<{
|
|
|
3922
3936
|
}>]>;
|
|
3923
3937
|
}>, Schema.Struct<{
|
|
3924
3938
|
readonly type: Schema.Literal<"event">;
|
|
3925
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
3939
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
3926
3940
|
readonly occurred: Schema.Boolean;
|
|
3927
3941
|
}>]>;
|
|
3928
3942
|
declare const MailboxSendRefusedError_base: Schema.Class<MailboxSendRefusedError, Schema.Struct<{
|
|
@@ -4574,7 +4588,7 @@ export declare const JourneyCondition: Schema.Struct<{
|
|
|
4574
4588
|
}>]>;
|
|
4575
4589
|
}>, Schema.Struct<{
|
|
4576
4590
|
readonly type: Schema.Literal<"event">;
|
|
4577
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
4591
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
4578
4592
|
readonly occurred: Schema.Boolean;
|
|
4579
4593
|
}>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
|
|
4580
4594
|
readonly type: Schema.Literal<"tag">;
|
|
@@ -4612,7 +4626,7 @@ export declare const JourneyCondition: Schema.Struct<{
|
|
|
4612
4626
|
}>]>;
|
|
4613
4627
|
}>, Schema.Struct<{
|
|
4614
4628
|
readonly type: Schema.Literal<"event">;
|
|
4615
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
4629
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
4616
4630
|
readonly occurred: Schema.Boolean;
|
|
4617
4631
|
}>]>]>;
|
|
4618
4632
|
}>;
|
|
@@ -5036,7 +5050,7 @@ export declare const JourneyBranchEdge: Schema.Struct<{
|
|
|
5036
5050
|
}>]>;
|
|
5037
5051
|
}>, Schema.Struct<{
|
|
5038
5052
|
readonly type: Schema.Literal<"event">;
|
|
5039
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
5053
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
5040
5054
|
readonly occurred: Schema.Boolean;
|
|
5041
5055
|
}>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
|
|
5042
5056
|
readonly type: Schema.Literal<"tag">;
|
|
@@ -5074,7 +5088,7 @@ export declare const JourneyBranchEdge: Schema.Struct<{
|
|
|
5074
5088
|
}>]>;
|
|
5075
5089
|
}>, Schema.Struct<{
|
|
5076
5090
|
readonly type: Schema.Literal<"event">;
|
|
5077
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
5091
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
5078
5092
|
readonly occurred: Schema.Boolean;
|
|
5079
5093
|
}>]>]>;
|
|
5080
5094
|
}>>;
|
|
@@ -5687,7 +5701,7 @@ export declare const JourneyBranchNode: Schema.Struct<{
|
|
|
5687
5701
|
}>]>;
|
|
5688
5702
|
}>, Schema.Struct<{
|
|
5689
5703
|
readonly type: Schema.Literal<"event">;
|
|
5690
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
5704
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
5691
5705
|
readonly occurred: Schema.Boolean;
|
|
5692
5706
|
}>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
|
|
5693
5707
|
readonly type: Schema.Literal<"tag">;
|
|
@@ -5725,7 +5739,7 @@ export declare const JourneyBranchNode: Schema.Struct<{
|
|
|
5725
5739
|
}>]>;
|
|
5726
5740
|
}>, Schema.Struct<{
|
|
5727
5741
|
readonly type: Schema.Literal<"event">;
|
|
5728
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
5742
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
5729
5743
|
readonly occurred: Schema.Boolean;
|
|
5730
5744
|
}>]>]>;
|
|
5731
5745
|
}>>;
|
|
@@ -6075,7 +6089,7 @@ export declare const JourneyNode: Schema.Union<readonly [Schema.Struct<{
|
|
|
6075
6089
|
}>, Schema.Struct<{
|
|
6076
6090
|
readonly type: Schema.Literal<"wait_for_event">;
|
|
6077
6091
|
readonly config: Schema.Struct<{
|
|
6078
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
6092
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
6079
6093
|
readonly timeoutSeconds: Schema.Finite;
|
|
6080
6094
|
}>;
|
|
6081
6095
|
readonly next: Schema.Tuple<readonly [Schema.Struct<{
|
|
@@ -6128,7 +6142,7 @@ export declare const JourneyNode: Schema.Union<readonly [Schema.Struct<{
|
|
|
6128
6142
|
}>]>;
|
|
6129
6143
|
}>, Schema.Struct<{
|
|
6130
6144
|
readonly type: Schema.Literal<"event">;
|
|
6131
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
6145
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
6132
6146
|
readonly occurred: Schema.Boolean;
|
|
6133
6147
|
}>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
|
|
6134
6148
|
readonly type: Schema.Literal<"tag">;
|
|
@@ -6166,7 +6180,7 @@ export declare const JourneyNode: Schema.Union<readonly [Schema.Struct<{
|
|
|
6166
6180
|
}>]>;
|
|
6167
6181
|
}>, Schema.Struct<{
|
|
6168
6182
|
readonly type: Schema.Literal<"event">;
|
|
6169
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
6183
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
6170
6184
|
readonly occurred: Schema.Boolean;
|
|
6171
6185
|
}>]>]>;
|
|
6172
6186
|
}>>;
|
|
@@ -6478,7 +6492,7 @@ export declare const JourneyDefinition: Schema.Struct<{
|
|
|
6478
6492
|
}>, Schema.Struct<{
|
|
6479
6493
|
readonly type: Schema.Literal<"wait_for_event">;
|
|
6480
6494
|
readonly config: Schema.Struct<{
|
|
6481
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
6495
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
6482
6496
|
readonly timeoutSeconds: Schema.Finite;
|
|
6483
6497
|
}>;
|
|
6484
6498
|
readonly next: Schema.Tuple<readonly [Schema.Struct<{
|
|
@@ -6531,7 +6545,7 @@ export declare const JourneyDefinition: Schema.Struct<{
|
|
|
6531
6545
|
}>]>;
|
|
6532
6546
|
}>, Schema.Struct<{
|
|
6533
6547
|
readonly type: Schema.Literal<"event">;
|
|
6534
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
6548
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
6535
6549
|
readonly occurred: Schema.Boolean;
|
|
6536
6550
|
}>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
|
|
6537
6551
|
readonly type: Schema.Literal<"tag">;
|
|
@@ -6569,7 +6583,7 @@ export declare const JourneyDefinition: Schema.Struct<{
|
|
|
6569
6583
|
}>]>;
|
|
6570
6584
|
}>, Schema.Struct<{
|
|
6571
6585
|
readonly type: Schema.Literal<"event">;
|
|
6572
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
6586
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
6573
6587
|
readonly occurred: Schema.Boolean;
|
|
6574
6588
|
}>]>]>;
|
|
6575
6589
|
}>>;
|
|
@@ -6597,7 +6611,7 @@ export declare const JourneyDefinition: Schema.Struct<{
|
|
|
6597
6611
|
readonly next: Schema.Tuple<readonly []>;
|
|
6598
6612
|
}>]>>;
|
|
6599
6613
|
readonly goal: Schema.optionalKey<Schema.Struct<{
|
|
6600
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
6614
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
6601
6615
|
}>>;
|
|
6602
6616
|
readonly reentry: Schema.optionalKey<Schema.Boolean>;
|
|
6603
6617
|
readonly enrollment: Schema.optionalKey<Schema.Struct<{
|
|
@@ -6953,7 +6967,7 @@ export declare const CreateJourneyPayload: Schema.Struct<{
|
|
|
6953
6967
|
}>, Schema.Struct<{
|
|
6954
6968
|
readonly type: Schema.Literal<"wait_for_event">;
|
|
6955
6969
|
readonly config: Schema.Struct<{
|
|
6956
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
6970
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
6957
6971
|
readonly timeoutSeconds: Schema.Finite;
|
|
6958
6972
|
}>;
|
|
6959
6973
|
readonly next: Schema.Tuple<readonly [Schema.Struct<{
|
|
@@ -7006,7 +7020,7 @@ export declare const CreateJourneyPayload: Schema.Struct<{
|
|
|
7006
7020
|
}>]>;
|
|
7007
7021
|
}>, Schema.Struct<{
|
|
7008
7022
|
readonly type: Schema.Literal<"event">;
|
|
7009
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
7023
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
7010
7024
|
readonly occurred: Schema.Boolean;
|
|
7011
7025
|
}>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
|
|
7012
7026
|
readonly type: Schema.Literal<"tag">;
|
|
@@ -7044,7 +7058,7 @@ export declare const CreateJourneyPayload: Schema.Struct<{
|
|
|
7044
7058
|
}>]>;
|
|
7045
7059
|
}>, Schema.Struct<{
|
|
7046
7060
|
readonly type: Schema.Literal<"event">;
|
|
7047
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
7061
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
7048
7062
|
readonly occurred: Schema.Boolean;
|
|
7049
7063
|
}>]>]>;
|
|
7050
7064
|
}>>;
|
|
@@ -7072,7 +7086,7 @@ export declare const CreateJourneyPayload: Schema.Struct<{
|
|
|
7072
7086
|
readonly next: Schema.Tuple<readonly []>;
|
|
7073
7087
|
}>]>>;
|
|
7074
7088
|
readonly goal: Schema.optionalKey<Schema.Struct<{
|
|
7075
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
7089
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
7076
7090
|
}>>;
|
|
7077
7091
|
readonly reentry: Schema.optionalKey<Schema.Boolean>;
|
|
7078
7092
|
readonly enrollment: Schema.optionalKey<Schema.Struct<{
|
|
@@ -7143,7 +7157,7 @@ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
|
|
|
7143
7157
|
}>, Schema.Struct<{
|
|
7144
7158
|
readonly type: Schema.Literal<"wait_for_event">;
|
|
7145
7159
|
readonly config: Schema.Struct<{
|
|
7146
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
7160
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
7147
7161
|
readonly timeoutSeconds: Schema.Finite;
|
|
7148
7162
|
}>;
|
|
7149
7163
|
readonly next: Schema.Tuple<readonly [Schema.Struct<{
|
|
@@ -7196,7 +7210,7 @@ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
|
|
|
7196
7210
|
}>]>;
|
|
7197
7211
|
}>, Schema.Struct<{
|
|
7198
7212
|
readonly type: Schema.Literal<"event">;
|
|
7199
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
7213
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
7200
7214
|
readonly occurred: Schema.Boolean;
|
|
7201
7215
|
}>]>]>, readonly [Schema.Union<readonly [Schema.Struct<{
|
|
7202
7216
|
readonly type: Schema.Literal<"tag">;
|
|
@@ -7234,7 +7248,7 @@ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
|
|
|
7234
7248
|
}>]>;
|
|
7235
7249
|
}>, Schema.Struct<{
|
|
7236
7250
|
readonly type: Schema.Literal<"event">;
|
|
7237
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
7251
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
7238
7252
|
readonly occurred: Schema.Boolean;
|
|
7239
7253
|
}>]>]>;
|
|
7240
7254
|
}>>;
|
|
@@ -7262,7 +7276,7 @@ export declare const ReplaceJourneyDraftPayload: Schema.Struct<{
|
|
|
7262
7276
|
readonly next: Schema.Tuple<readonly []>;
|
|
7263
7277
|
}>]>>;
|
|
7264
7278
|
readonly goal: Schema.optionalKey<Schema.Struct<{
|
|
7265
|
-
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">]>]>;
|
|
7279
|
+
readonly eventName: Schema.Union<readonly [Schema.String, Schema.Union<readonly [Schema.Literal<"contact.created">, Schema.Literal<"contact.tag_added">, Schema.Literal<"contact.joined_group">, Schema.Literal<"contact.connection_completed">]>]>;
|
|
7266
7280
|
}>>;
|
|
7267
7281
|
readonly reentry: Schema.optionalKey<Schema.Boolean>;
|
|
7268
7282
|
readonly enrollment: Schema.optionalKey<Schema.Struct<{
|
|
@@ -36,8 +36,8 @@ var ResourceNotFoundError = class extends Schema.TaggedError()("ResourceNotFound
|
|
|
36
36
|
id: Schema.String,
|
|
37
37
|
message: Schema.String
|
|
38
38
|
})) {};
|
|
39
|
-
const IntegrationReturnTo = /* @__PURE__ */ (() => Schema.String.annotate({ description: "A dashboard path starting with a single slash, such as /dashboard/acme/agents." }).check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\/(
|
|
40
|
-
expected: "a string matching the RegExp ^\\/(
|
|
39
|
+
const IntegrationReturnTo = /* @__PURE__ */ (() => Schema.String.annotate({ description: "A dashboard path starting with a single slash, such as /dashboard/acme/agents." }).check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\/(?:[\\x21-\\x2e\\x30-\\x5b\\x5d-\\x7e][\\x21-\\x7e]*)?$", "u")).annotate({
|
|
40
|
+
expected: "a string matching the RegExp ^\\/(?:[\\x21-\\x2e\\x30-\\x5b\\x5d-\\x7e][\\x21-\\x7e]*)?$",
|
|
41
41
|
identifier: "IntegrationReturnTo"
|
|
42
42
|
})).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })))();
|
|
43
43
|
const OrganizationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
@@ -505,8 +505,8 @@ const JourneyUpdateTagsConfig = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
505
505
|
add: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))),
|
|
506
506
|
remove: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })))
|
|
507
507
|
}).annotate({ identifier: "JourneyUpdateTagsConfig" }))();
|
|
508
|
-
const ShopifyShop = /* @__PURE__ */ (() => Schema.String.check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9][a-z0-9-]*\\.myshopify\\.com$
|
|
509
|
-
expected: "a string matching the RegExp ^[a-z0-9][a-z0-9-]*\\.myshopify\\.com$
|
|
508
|
+
const ShopifyShop = /* @__PURE__ */ (() => Schema.String.check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9][a-z0-9-]*\\.myshopify\\.com$", "u")).annotate({
|
|
509
|
+
expected: "a string matching the RegExp ^[a-z0-9][a-z0-9-]*\\.myshopify\\.com$",
|
|
510
510
|
identifier: "ShopifyShop"
|
|
511
511
|
})).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })))();
|
|
512
512
|
const MailboxChannel = /* @__PURE__ */ (() => Schema.Union([
|
|
@@ -1259,7 +1259,8 @@ const JourneyCustomEventTrigger = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1259
1259
|
const JourneyEventName = /* @__PURE__ */ (() => Schema.Union([JourneyCustomEventName, Schema.Union([
|
|
1260
1260
|
Schema.Literal("contact.created"),
|
|
1261
1261
|
Schema.Literal("contact.tag_added"),
|
|
1262
|
-
Schema.Literal("contact.joined_group")
|
|
1262
|
+
Schema.Literal("contact.joined_group"),
|
|
1263
|
+
Schema.Literal("contact.connection_completed")
|
|
1263
1264
|
])]).annotate({ identifier: "JourneyEventName" }))();
|
|
1264
1265
|
const JourneyNextEdge = /* @__PURE__ */ (() => Schema.Struct({ nodeId: JourneyNodeId }).annotate({ identifier: "JourneyNextEdge" }))();
|
|
1265
1266
|
const JourneyWaitEventEdge = /* @__PURE__ */ (() => Schema.Struct({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
|
-
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, TemplateId, TemplatePublicationId, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
3
|
+
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, TemplateChannelVariantId, TemplateId, TemplatePublicationId, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
4
4
|
export type WhatsAppRegistrationTarget = {
|
|
5
5
|
readonly provider: "whatsapp";
|
|
6
6
|
readonly wabaId: string;
|
|
@@ -32,10 +32,12 @@ export type TemplateRegistration = {
|
|
|
32
32
|
readonly id: TemplateRegistrationId;
|
|
33
33
|
readonly templateId: TemplateId;
|
|
34
34
|
readonly publicationId: TemplatePublicationId;
|
|
35
|
+
readonly templateChannelVariantId: TemplateChannelVariantId;
|
|
35
36
|
readonly target: TemplateRegistrationTarget;
|
|
36
37
|
readonly name: string;
|
|
37
38
|
readonly language: string;
|
|
38
39
|
readonly status: "draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled";
|
|
40
|
+
readonly pendingTemplateChannelVariantId: TemplateChannelVariantId | null;
|
|
39
41
|
readonly category: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional";
|
|
40
42
|
readonly providerCategory: "marketing" | "utility" | "authentication" | "transactional" | "service_implicit" | "service_explicit" | "promotional" | null;
|
|
41
43
|
readonly providerTemplateId: string | null;
|
|
@@ -49,6 +51,7 @@ export declare const TemplateRegistration: Schema.Struct<{
|
|
|
49
51
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
50
52
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
51
53
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
54
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
52
55
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
53
56
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
54
57
|
readonly wabaId: Schema.String;
|
|
@@ -60,6 +63,7 @@ export declare const TemplateRegistration: Schema.Struct<{
|
|
|
60
63
|
readonly name: Schema.String;
|
|
61
64
|
readonly language: Schema.String;
|
|
62
65
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
66
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
63
67
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
64
68
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
65
69
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -77,6 +81,7 @@ export declare const TemplateRegistrationList: Schema.Struct<{
|
|
|
77
81
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
78
82
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
79
83
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
84
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
80
85
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
81
86
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
82
87
|
readonly wabaId: Schema.String;
|
|
@@ -88,6 +93,7 @@ export declare const TemplateRegistrationList: Schema.Struct<{
|
|
|
88
93
|
readonly name: Schema.String;
|
|
89
94
|
readonly language: Schema.String;
|
|
90
95
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
96
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
91
97
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
92
98
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
93
99
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -110,6 +116,7 @@ export declare const TemplateRegistrationsList200: Schema.Struct<{
|
|
|
110
116
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
111
117
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
112
118
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
119
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
113
120
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
114
121
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
115
122
|
readonly wabaId: Schema.String;
|
|
@@ -121,6 +128,7 @@ export declare const TemplateRegistrationsList200: Schema.Struct<{
|
|
|
121
128
|
readonly name: Schema.String;
|
|
122
129
|
readonly language: Schema.String;
|
|
123
130
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
131
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
124
132
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
125
133
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
126
134
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -164,6 +172,7 @@ export declare const TemplateRegistrationsSubmit201: Schema.Struct<{
|
|
|
164
172
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
165
173
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
166
174
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
175
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
167
176
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
168
177
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
169
178
|
readonly wabaId: Schema.String;
|
|
@@ -175,6 +184,7 @@ export declare const TemplateRegistrationsSubmit201: Schema.Struct<{
|
|
|
175
184
|
readonly name: Schema.String;
|
|
176
185
|
readonly language: Schema.String;
|
|
177
186
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
187
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
178
188
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
179
189
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
180
190
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -215,6 +225,7 @@ export declare const TemplateRegistrationsGet200: Schema.Struct<{
|
|
|
215
225
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
216
226
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
217
227
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
228
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
218
229
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
219
230
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
220
231
|
readonly wabaId: Schema.String;
|
|
@@ -226,6 +237,7 @@ export declare const TemplateRegistrationsGet200: Schema.Struct<{
|
|
|
226
237
|
readonly name: Schema.String;
|
|
227
238
|
readonly language: Schema.String;
|
|
228
239
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
240
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
229
241
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
230
242
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
231
243
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -256,6 +268,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
256
268
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
257
269
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
258
270
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
271
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
259
272
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
260
273
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
261
274
|
readonly wabaId: Schema.String;
|
|
@@ -267,6 +280,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
267
280
|
readonly name: Schema.String;
|
|
268
281
|
readonly language: Schema.String;
|
|
269
282
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
283
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
270
284
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
271
285
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
272
286
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -370,6 +384,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
370
384
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
371
385
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
372
386
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
387
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
373
388
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
374
389
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
375
390
|
readonly wabaId: Schema.String;
|
|
@@ -381,6 +396,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
381
396
|
readonly name: Schema.String;
|
|
382
397
|
readonly language: Schema.String;
|
|
383
398
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
399
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
384
400
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
385
401
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
386
402
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -487,6 +503,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
487
503
|
readonly id: Schema.brand<Schema.String, "TemplateRegistrationId">;
|
|
488
504
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
489
505
|
readonly publicationId: Schema.brand<Schema.String, "TemplatePublicationId">;
|
|
506
|
+
readonly templateChannelVariantId: Schema.brand<Schema.String, "TemplateChannelVariantId">;
|
|
490
507
|
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
491
508
|
readonly provider: Schema.Literal<"whatsapp">;
|
|
492
509
|
readonly wabaId: Schema.String;
|
|
@@ -498,6 +515,7 @@ declare const TemplateRegistrationsGroup_base: HttpApiGroup.HttpApiGroup<"Templa
|
|
|
498
515
|
readonly name: Schema.String;
|
|
499
516
|
readonly language: Schema.String;
|
|
500
517
|
readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"submitted">, Schema.Literal<"approved">, Schema.Literal<"rejected">, Schema.Literal<"paused">, Schema.Literal<"disabled">]>;
|
|
518
|
+
readonly pendingTemplateChannelVariantId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateChannelVariantId">, Schema.Null]>;
|
|
501
519
|
readonly category: Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>;
|
|
502
520
|
readonly providerCategory: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"transactional">, Schema.Literal<"service_implicit">, Schema.Literal<"service_explicit">, Schema.Literal<"promotional">]>, Schema.Null]>;
|
|
503
521
|
readonly providerTemplateId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, TemplateId, TemplatePublicationId, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
1
|
+
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, TemplateChannelVariantId, TemplateId, TemplatePublicationId, TemplateRegistrationId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
// src/effect/generated/template-registrations.ts
|
|
@@ -16,6 +16,7 @@ const TemplateRegistration = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
16
16
|
id: TemplateRegistrationId,
|
|
17
17
|
templateId: TemplateId,
|
|
18
18
|
publicationId: TemplatePublicationId,
|
|
19
|
+
templateChannelVariantId: TemplateChannelVariantId,
|
|
19
20
|
target: TemplateRegistrationTarget,
|
|
20
21
|
name: Schema.String,
|
|
21
22
|
language: Schema.String,
|
|
@@ -27,6 +28,7 @@ const TemplateRegistration = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
27
28
|
Schema.Literal("paused"),
|
|
28
29
|
Schema.Literal("disabled")
|
|
29
30
|
]),
|
|
31
|
+
pendingTemplateChannelVariantId: Schema.Union([TemplateChannelVariantId, Schema.Null]).annotate({ description: "Content a submission sent to the provider whose outcome is not yet recorded, because its request failed or is still in flight; the provider may already hold it. While it is set nothing sends from this registration, even when `status` is `approved`. Submitting again settles it." }),
|
|
30
32
|
category: Schema.Union([
|
|
31
33
|
Schema.Literal("marketing"),
|
|
32
34
|
Schema.Literal("utility"),
|
|
@@ -51,7 +53,10 @@ const TemplateRegistration = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
51
53
|
statusChangedAt: Schema.String,
|
|
52
54
|
createdAt: Schema.String,
|
|
53
55
|
updatedAt: Schema.String
|
|
54
|
-
}).annotate({
|
|
56
|
+
}).annotate({
|
|
57
|
+
description: "`templateChannelVariantId` identifies the exact content last submitted. A journey step or scheduled send pins it with `id` in `pinnedRegistration` and sends only while this registration holds that content approved.",
|
|
58
|
+
identifier: "TemplateRegistration"
|
|
59
|
+
}))();
|
|
55
60
|
const TemplateRegistrationList = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.Array(TemplateRegistration) }).annotate({ identifier: "TemplateRegistrationList" }))();
|
|
56
61
|
const TemplateRegistrationsListPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: TemplateId }))();
|
|
57
62
|
const TemplateRegistrationsList200 = TemplateRegistrationList;
|