samva 0.52.0 → 0.54.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.
Files changed (43) hide show
  1. package/dist/client/sdk.gen.d.ts +55 -18
  2. package/dist/client/sdk.gen.js +165 -45
  3. package/dist/client/types.gen.d.ts +313 -21
  4. package/dist/effect/brands.d.ts +8 -1
  5. package/dist/effect/descriptors/brands.d.ts +4 -4
  6. package/dist/effect/descriptors/brands.js +4 -4
  7. package/dist/effect/descriptors/email.d.ts +21 -1
  8. package/dist/effect/descriptors/email.js +21 -1
  9. package/dist/effect/email.d.ts +12 -0
  10. package/dist/effect/email.js +5 -1
  11. package/dist/effect/events.d.ts +16 -0
  12. package/dist/effect/generated/api-keys.js +2 -2
  13. package/dist/effect/generated/brands.d.ts +78 -8
  14. package/dist/effect/generated/brands.js +21 -12
  15. package/dist/effect/generated/email.d.ts +473 -2
  16. package/dist/effect/generated/email.js +106 -7
  17. package/dist/effect/generated/events.d.ts +48 -0
  18. package/dist/effect/generated/events.js +1 -1
  19. package/dist/effect/generated/journeys.d.ts +1173 -55
  20. package/dist/effect/generated/journeys.js +10 -4
  21. package/dist/effect/generated/logs.d.ts +12 -0
  22. package/dist/effect/generated/mailboxes.d.ts +8 -0
  23. package/dist/effect/generated/mailboxes.js +2 -1
  24. package/dist/effect/generated/messages.d.ts +16 -0
  25. package/dist/effect/generated/messages.js +7 -1
  26. package/dist/effect/generated/scheduled-messages.d.ts +36 -0
  27. package/dist/effect/generated/shared.d.ts +438 -15
  28. package/dist/effect/generated/shared.js +59 -13
  29. package/dist/effect/generated/templates.d.ts +34 -1
  30. package/dist/effect/generated/templates.js +18 -3
  31. package/dist/effect/generated/whats-app-flows.d.ts +23 -5
  32. package/dist/effect/generated/whats-app-flows.js +9 -7
  33. package/dist/effect/generated-metadata.d.ts +12 -0
  34. package/dist/effect/generated-metadata.js +2 -0
  35. package/dist/effect/journeys.d.ts +76 -0
  36. package/dist/effect/mailboxes.d.ts +2 -0
  37. package/dist/effect/scheduled-messages.d.ts +66 -0
  38. package/dist/effect/templates.d.ts +1 -0
  39. package/dist/effect/whatsapp-flows.d.ts +30 -0
  40. package/dist/package.js +1 -1
  41. package/dist/promises/types.gen.d.ts +1 -1
  42. package/dist/service-map.d.ts +15 -5
  43. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
- import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId, __SamvaRuntimeSensitiveString } from "./shared.js";
4
+ import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId, __SamvaRuntimeSensitiveString } from "./shared.js";
5
5
  export type WhatsAppFlowEndpoint = {
6
6
  readonly url: string;
7
7
  readonly updatedAt: string;
@@ -134,6 +134,7 @@ export type WhatsAppFlow = {
134
134
  readonly handle: string;
135
135
  readonly path: string;
136
136
  readonly categories: ReadonlyArray<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
137
+ readonly submissionHandler?: "agent" | "app";
137
138
  readonly endpoint: WhatsAppFlowEndpoint | null;
138
139
  readonly currentVersion: WhatsAppFlowVersion | null;
139
140
  readonly createdAt: string;
@@ -145,6 +146,7 @@ export declare const WhatsAppFlow: Schema.Struct<{
145
146
  readonly handle: Schema.String;
146
147
  readonly path: Schema.String;
147
148
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
149
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
148
150
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
149
151
  readonly url: Schema.String;
150
152
  readonly updatedAt: Schema.String;
@@ -222,6 +224,7 @@ export declare const WhatsAppFlowList: Schema.Struct<{
222
224
  readonly handle: Schema.String;
223
225
  readonly path: Schema.String;
224
226
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
227
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
225
228
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
226
229
  readonly url: Schema.String;
227
230
  readonly updatedAt: Schema.String;
@@ -249,6 +252,7 @@ export declare const WhatsappFlowsList200: Schema.Struct<{
249
252
  readonly handle: Schema.String;
250
253
  readonly path: Schema.String;
251
254
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
255
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
252
256
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
253
257
  readonly url: Schema.String;
254
258
  readonly updatedAt: Schema.String;
@@ -284,11 +288,13 @@ export type WhatsappFlowsCreateRequestJson = {
284
288
  readonly projectId: TemplateProjectId;
285
289
  readonly handle: string;
286
290
  readonly categories: ReadonlyArray<"SIGN_UP" | "SIGN_IN" | "APPOINTMENT_BOOKING" | "LEAD_GENERATION" | "CONTACT_US" | "CUSTOMER_SUPPORT" | "SURVEY" | "OTHER">;
291
+ readonly submissionHandler?: "agent" | "app";
287
292
  };
288
293
  export declare const WhatsappFlowsCreateRequestJson: Schema.Struct<{
289
294
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
290
295
  readonly handle: Schema.String;
291
296
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
297
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
292
298
  }>;
293
299
  export type WhatsappFlowsCreate201 = WhatsAppFlow;
294
300
  export declare const WhatsappFlowsCreate201: Schema.Struct<{
@@ -297,6 +303,7 @@ export declare const WhatsappFlowsCreate201: Schema.Struct<{
297
303
  readonly handle: Schema.String;
298
304
  readonly path: Schema.String;
299
305
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
306
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
300
307
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
301
308
  readonly url: Schema.String;
302
309
  readonly updatedAt: Schema.String;
@@ -344,6 +351,7 @@ export declare const WhatsappFlowsGet200: Schema.Struct<{
344
351
  readonly handle: Schema.String;
345
352
  readonly path: Schema.String;
346
353
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
354
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
347
355
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
348
356
  readonly url: Schema.String;
349
357
  readonly updatedAt: Schema.String;
@@ -587,11 +595,15 @@ export declare const WhatsappFlowsRecordVersionPathParams: Schema.Struct<{
587
595
  export type WhatsappFlowsRecordVersionRequestJson = {
588
596
  readonly commitSha: string;
589
597
  readonly expectedWorkspaceRevision: string;
598
+ } | {
599
+ readonly flowJson: JsonObject;
590
600
  };
591
- export declare const WhatsappFlowsRecordVersionRequestJson: Schema.Struct<{
601
+ export declare const WhatsappFlowsRecordVersionRequestJson: Schema.Union<readonly [Schema.Struct<{
592
602
  readonly commitSha: Schema.String;
593
603
  readonly expectedWorkspaceRevision: Schema.String;
594
- }>;
604
+ }>, Schema.Struct<{
605
+ readonly flowJson: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>;
606
+ }>]>;
595
607
  export type WhatsappFlowsRecordVersion201 = WhatsAppFlowVersion;
596
608
  export declare const WhatsappFlowsRecordVersion201: Schema.Struct<{
597
609
  readonly id: Schema.brand<Schema.String, "WhatsAppFlowVersionId">;
@@ -655,12 +667,14 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
655
667
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
656
668
  readonly handle: Schema.String;
657
669
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
670
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
658
671
  }>>, never, Schema.toCodecJson<Schema.Struct<{
659
672
  readonly id: Schema.brand<Schema.String, "WhatsAppFlowId">;
660
673
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
661
674
  readonly handle: Schema.String;
662
675
  readonly path: Schema.String;
663
676
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
677
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
664
678
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
665
679
  readonly url: Schema.String;
666
680
  readonly updatedAt: Schema.String;
@@ -806,6 +820,7 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
806
820
  readonly handle: Schema.String;
807
821
  readonly path: Schema.String;
808
822
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
823
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
809
824
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
810
825
  readonly url: Schema.String;
811
826
  readonly updatedAt: Schema.String;
@@ -930,6 +945,7 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
930
945
  readonly handle: Schema.String;
931
946
  readonly path: Schema.String;
932
947
  readonly categories: Schema.$Array<Schema.Union<readonly [Schema.Literal<"SIGN_UP">, Schema.Literal<"SIGN_IN">, Schema.Literal<"APPOINTMENT_BOOKING">, Schema.Literal<"LEAD_GENERATION">, Schema.Literal<"CONTACT_US">, Schema.Literal<"CUSTOMER_SUPPORT">, Schema.Literal<"SURVEY">, Schema.Literal<"OTHER">]>>;
948
+ readonly submissionHandler: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"agent">, Schema.Literal<"app">]>>;
933
949
  readonly endpoint: Schema.Union<readonly [Schema.Struct<{
934
950
  readonly url: Schema.String;
935
951
  readonly updatedAt: Schema.String;
@@ -1275,10 +1291,12 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
1275
1291
  readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
1276
1292
  }>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappFlowsRecordVersion", "POST", "/v1/whatsapp/flows/:id/versions", Schema.toCodecStringTree<Schema.Struct<{
1277
1293
  readonly id: Schema.brand<Schema.String, "WhatsAppFlowId">;
1278
- }>>, never, Schema.toCodecJson<Schema.Struct<{
1294
+ }>>, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
1279
1295
  readonly commitSha: Schema.String;
1280
1296
  readonly expectedWorkspaceRevision: Schema.String;
1281
- }>>, never, Schema.toCodecJson<Schema.Struct<{
1297
+ }>, Schema.Struct<{
1298
+ readonly flowJson: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>;
1299
+ }>]>>, never, Schema.toCodecJson<Schema.Struct<{
1282
1300
  readonly id: Schema.brand<Schema.String, "WhatsAppFlowVersionId">;
1283
1301
  readonly flowId: Schema.brand<Schema.String, "WhatsAppFlowId">;
1284
1302
  readonly number: Schema.Finite;
@@ -1,5 +1,5 @@
1
1
  import { SensitiveString } from "../runtime.js";
2
- import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId } from "./shared.js";
2
+ import { ApiKeySecurityMiddleware, ConflictError, CredentialsError, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MalformedRequestError, ResourceNotFoundError, ServiceUnavailableError, TemplateProjectId, UnauthorizedError, ValidationError, WhatsAppBusinessAccountId, WhatsAppChannelError, WhatsAppFlowId, WhatsAppFlowVersionId } from "./shared.js";
3
3
  import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
4
4
  import * as Schema from "effect/Schema";
5
5
  // src/effect/generated/whats-app-flows.ts
@@ -84,6 +84,7 @@ const WhatsAppFlow = /* @__PURE__ */ (() => Schema.Struct({
84
84
  Schema.Literal("SURVEY"),
85
85
  Schema.Literal("OTHER")
86
86
  ])),
87
+ submissionHandler: Schema.optionalKey(Schema.Union([Schema.Literal("agent"), Schema.Literal("app")])),
87
88
  endpoint: Schema.Union([WhatsAppFlowEndpoint, Schema.Null]),
88
89
  currentVersion: Schema.Union([WhatsAppFlowVersion, Schema.Null]),
89
90
  createdAt: Schema.String,
@@ -111,7 +112,8 @@ const WhatsappFlowsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
111
112
  Schema.Literal("CUSTOMER_SUPPORT"),
112
113
  Schema.Literal("SURVEY"),
113
114
  Schema.Literal("OTHER")
114
- ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
115
+ ])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
116
+ submissionHandler: Schema.optionalKey(Schema.Union([Schema.Literal("agent"), Schema.Literal("app")]))
115
117
  }))();
116
118
  const WhatsappFlowsCreate201 = WhatsAppFlow;
117
119
  const WhatsappFlowsCreate400 = MalformedRequestError;
@@ -181,10 +183,10 @@ const WhatsappFlowsListVersions422 = ValidationError;
181
183
  const WhatsappFlowsListVersions500 = InternalError;
182
184
  const WhatsappFlowsListVersions504 = GatewayTimeoutError;
183
185
  const WhatsappFlowsRecordVersionPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: WhatsAppFlowId }))();
184
- const WhatsappFlowsRecordVersionRequestJson = /* @__PURE__ */ (() => Schema.Struct({
186
+ const WhatsappFlowsRecordVersionRequestJson = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
185
187
  commitSha: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" })),
186
188
  expectedWorkspaceRevision: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
187
- }))();
189
+ }), Schema.Struct({ flowJson: JsonObject })]))();
188
190
  const WhatsappFlowsRecordVersion201 = WhatsAppFlowVersion;
189
191
  const WhatsappFlowsRecordVersion400 = MalformedRequestError;
190
192
  const WhatsappFlowsRecordVersion401 = UnauthorizedError;
@@ -215,7 +217,7 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
215
217
  WhatsappFlowsList500,
216
218
  WhatsappFlowsList504.pipe(HttpApiSchema.status(504))
217
219
  ]
218
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.list").annotate(OpenApi.Summary, "List flows").annotate(OpenApi.Description, "Returns the organization's flows, newest first, each with its current version."), HttpApiEndpoint.post("whatsappFlowsCreate", "/v1/whatsapp/flows", {
220
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.list").annotate(OpenApi.Summary, "List flows").annotate(OpenApi.Description, "Returns flows visible to the caller, newest first, each with its current version."), HttpApiEndpoint.post("whatsappFlowsCreate", "/v1/whatsapp/flows", {
219
221
  payload: WhatsappFlowsCreateRequestJson,
220
222
  success: WhatsappFlowsCreate201.pipe(HttpApiSchema.status(201)),
221
223
  error: [
@@ -228,7 +230,7 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
228
230
  WhatsappFlowsCreate500,
229
231
  WhatsappFlowsCreate504.pipe(HttpApiSchema.status(504))
230
232
  ]
231
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.create").annotate(OpenApi.Summary, "Create a flow").annotate(OpenApi.Description, "Creates a WhatsApp flow whose versions read `flows/<handle>.json` in the template project. The handle is unique in the organization; the categories are Meta's and go with every version to Meta."), HttpApiEndpoint.get("whatsappFlowsGet", "/v1/whatsapp/flows/:id", {
233
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.create").annotate(OpenApi.Summary, "Create a flow").annotate(OpenApi.Description, "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."), HttpApiEndpoint.get("whatsappFlowsGet", "/v1/whatsapp/flows/:id", {
232
234
  params: WhatsappFlowsGetPathParams,
233
235
  success: WhatsappFlowsGet200,
234
236
  error: [
@@ -319,7 +321,7 @@ var WhatsAppFlowsGroup = class extends HttpApiGroup.make("WhatsApp flows").add(H
319
321
  WhatsappFlowsRecordVersion503.pipe(HttpApiSchema.status(503)),
320
322
  WhatsappFlowsRecordVersion504.pipe(HttpApiSchema.status(504))
321
323
  ]
322
- }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.recordVersion").annotate(OpenApi.Summary, "Record a flow version").annotate(OpenApi.Description, "Reads the flow's file at a commit on the project's default branch, checks it is Flow JSON Samva sends, and records it as the flow's current version. The same content returns the version that already recorded it."), HttpApiEndpoint.post("whatsappFlowsRotateEncryptionKey", "/v1/whatsapp/flows/encryption-key/rotate", {
324
+ }).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whatsappFlows.recordVersion").annotate(OpenApi.Summary, "Record a flow version").annotate(OpenApi.Description, "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."), HttpApiEndpoint.post("whatsappFlowsRotateEncryptionKey", "/v1/whatsapp/flows/encryption-key/rotate", {
323
325
  payload: WhatsappFlowsRotateEncryptionKeyRequestJson,
324
326
  success: WhatsappFlowsRotateEncryptionKey200,
325
327
  error: [
@@ -1008,6 +1008,12 @@ export declare const SamvaOperations: {
1008
1008
  readonly idempotent: false;
1009
1009
  readonly paginated: false;
1010
1010
  };
1011
+ readonly emailGetDeliverabilityInsights: {
1012
+ readonly group: "Email";
1013
+ readonly method: "GET";
1014
+ readonly idempotent: false;
1015
+ readonly paginated: false;
1016
+ };
1011
1017
  readonly emailDisableCatchAll: {
1012
1018
  readonly group: "Email";
1013
1019
  readonly method: "POST";
@@ -1188,6 +1194,12 @@ export declare const SamvaOperations: {
1188
1194
  readonly idempotent: false;
1189
1195
  readonly paginated: false;
1190
1196
  };
1197
+ readonly emailUpdateSender: {
1198
+ readonly group: "Email";
1199
+ readonly method: "PATCH";
1200
+ readonly idempotent: false;
1201
+ readonly paginated: false;
1202
+ };
1191
1203
  readonly emailSetDefaultSender: {
1192
1204
  readonly group: "Email";
1193
1205
  readonly method: "POST";
@@ -1283,6 +1283,7 @@ const SamvaOperations = {
1283
1283
  emailCompleteCustomTrackingDomainConnect: operationMetadata51,
1284
1284
  emailRecheckCustomTracking: operationMetadata51,
1285
1285
  emailSetDefaultDomain: operationMetadata51,
1286
+ emailGetDeliverabilityInsights: operationMetadata54,
1286
1287
  emailDisableCatchAll: operationMetadata51,
1287
1288
  emailGetDomainConnect: operationMetadata54,
1288
1289
  emailBuildDomainConnectApplyUrl: operationMetadata51,
@@ -1313,6 +1314,7 @@ const SamvaOperations = {
1313
1314
  emailAddSender: operationMetadata55,
1314
1315
  emailGetSender: operationMetadata54,
1315
1316
  emailRemoveSender: operationMetadata52,
1317
+ emailUpdateSender: operationMetadata53,
1316
1318
  emailSetDefaultSender: operationMetadata51,
1317
1319
  emailCheckSenderVerification: operationMetadata54,
1318
1320
  emailGetStats: operationMetadata54,
@@ -1,15 +1,18 @@
1
1
  export declare const list: ((input?: {
2
+ readonly namespaceId?: string | undefined;
2
3
  readonly status?: "active" | "archived" | "draft" | "paused" | undefined;
3
4
  readonly limit?: number | null | undefined;
4
5
  readonly cursor?: string | undefined;
5
6
  } | undefined, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysList">) & {
6
7
  readonly pages: (input?: {
8
+ readonly namespaceId?: string | undefined;
7
9
  readonly status?: "active" | "archived" | "draft" | "paused" | undefined;
8
10
  readonly limit?: number | null | undefined;
9
11
  readonly cursor?: string | undefined;
10
12
  } | undefined) => import("effect/Stream").Stream<{
11
13
  readonly items: readonly {
12
14
  readonly id: string & import("effect/Brand").Brand<"JourneyId">;
15
+ readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
13
16
  readonly name: string;
14
17
  readonly status: "active" | "archived" | "draft" | "paused";
15
18
  readonly publishedVersion: number | null;
@@ -20,11 +23,13 @@ export declare const list: ((input?: {
20
23
  readonly nextCursor: string | null;
21
24
  }, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
22
25
  readonly items: (input?: {
26
+ readonly namespaceId?: string | undefined;
23
27
  readonly status?: "active" | "archived" | "draft" | "paused" | undefined;
24
28
  readonly limit?: number | null | undefined;
25
29
  readonly cursor?: string | undefined;
26
30
  } | undefined) => import("effect/Stream").Stream<{
27
31
  readonly id: string & import("effect/Brand").Brand<"JourneyId">;
32
+ readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
28
33
  readonly name: string;
29
34
  readonly status: "active" | "archived" | "draft" | "paused";
30
35
  readonly publishedVersion: number | null;
@@ -35,6 +40,7 @@ export declare const list: ((input?: {
35
40
  };
36
41
  export declare const create: (input: {
37
42
  readonly name: string;
43
+ readonly namespaceId?: string | undefined;
38
44
  readonly definition: {
39
45
  readonly trigger: {
40
46
  readonly type: "event";
@@ -56,6 +62,11 @@ export declare const create: (input: {
56
62
  readonly template: string;
57
63
  readonly publicationId?: string | undefined;
58
64
  readonly senderId?: string | undefined;
65
+ readonly tracking?: {
66
+ readonly opens?: boolean | undefined;
67
+ readonly clicks?: boolean | undefined;
68
+ } | undefined;
69
+ readonly topicName?: string | undefined;
59
70
  readonly templateData?: {
60
71
  readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | {
61
72
  readonly [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
@@ -83,6 +94,9 @@ export declare const create: (input: {
83
94
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
84
95
  } | null | undefined;
85
96
  } | undefined;
97
+ readonly eventBindings?: {
98
+ readonly [x: string]: string | undefined;
99
+ } | undefined;
86
100
  };
87
101
  readonly next: readonly {
88
102
  readonly nodeId: string;
@@ -133,6 +147,7 @@ export declare const create: (input: {
133
147
  readonly eventBindings?: {
134
148
  readonly [x: string]: string | undefined;
135
149
  } | undefined;
150
+ readonly flowActionDataBinding?: string | undefined;
136
151
  };
137
152
  readonly next: readonly {
138
153
  readonly nodeId: string;
@@ -149,6 +164,10 @@ export declare const create: (input: {
149
164
  readonly type: "wait_for_event";
150
165
  readonly config: {
151
166
  readonly eventName: string;
167
+ readonly correlation?: {
168
+ readonly eventProperty: string;
169
+ readonly entryProperty: string;
170
+ } | undefined;
152
171
  readonly timeoutSeconds: number;
153
172
  };
154
173
  readonly next: readonly {
@@ -202,6 +221,21 @@ export declare const create: (input: {
202
221
  readonly type: "event";
203
222
  readonly eventName: string;
204
223
  readonly occurred: boolean;
224
+ } | {
225
+ readonly type: "entry_event_property";
226
+ readonly property: string;
227
+ readonly comparison: {
228
+ readonly operator: "eq" | "neq";
229
+ readonly value: string | number | boolean | null;
230
+ } | {
231
+ readonly operator: "gt" | "gte" | "lt" | "lte";
232
+ readonly value: number;
233
+ } | {
234
+ readonly operator: "contains" | "ends_with" | "not_contains" | "starts_with";
235
+ readonly value: string;
236
+ } | {
237
+ readonly operator: "exists" | "not_exists";
238
+ };
205
239
  })[];
206
240
  } | undefined;
207
241
  }[];
@@ -244,6 +278,9 @@ export declare const create: (input: {
244
278
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
245
279
  } | null | undefined;
246
280
  } | undefined;
281
+ readonly eventBindings?: {
282
+ readonly [x: string]: string | undefined;
283
+ } | undefined;
247
284
  };
248
285
  readonly next: readonly {
249
286
  readonly nodeId: string;
@@ -263,6 +300,9 @@ export declare const create: (input: {
263
300
  readonly enrollment?: {
264
301
  readonly type: "shopify_order";
265
302
  readonly shop: string;
303
+ } | {
304
+ readonly type: "event_property";
305
+ readonly property: string;
266
306
  } | undefined;
267
307
  };
268
308
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysCreate">;
@@ -300,6 +340,11 @@ export declare const replaceDraft: (input: {
300
340
  readonly template: string;
301
341
  readonly publicationId?: string | undefined;
302
342
  readonly senderId?: string | undefined;
343
+ readonly tracking?: {
344
+ readonly opens?: boolean | undefined;
345
+ readonly clicks?: boolean | undefined;
346
+ } | undefined;
347
+ readonly topicName?: string | undefined;
303
348
  readonly templateData?: {
304
349
  readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | {
305
350
  readonly [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
@@ -327,6 +372,9 @@ export declare const replaceDraft: (input: {
327
372
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
328
373
  } | null | undefined;
329
374
  } | undefined;
375
+ readonly eventBindings?: {
376
+ readonly [x: string]: string | undefined;
377
+ } | undefined;
330
378
  };
331
379
  readonly next: readonly {
332
380
  readonly nodeId: string;
@@ -377,6 +425,7 @@ export declare const replaceDraft: (input: {
377
425
  readonly eventBindings?: {
378
426
  readonly [x: string]: string | undefined;
379
427
  } | undefined;
428
+ readonly flowActionDataBinding?: string | undefined;
380
429
  };
381
430
  readonly next: readonly {
382
431
  readonly nodeId: string;
@@ -393,6 +442,10 @@ export declare const replaceDraft: (input: {
393
442
  readonly type: "wait_for_event";
394
443
  readonly config: {
395
444
  readonly eventName: string;
445
+ readonly correlation?: {
446
+ readonly eventProperty: string;
447
+ readonly entryProperty: string;
448
+ } | undefined;
396
449
  readonly timeoutSeconds: number;
397
450
  };
398
451
  readonly next: readonly {
@@ -446,6 +499,21 @@ export declare const replaceDraft: (input: {
446
499
  readonly type: "event";
447
500
  readonly eventName: string;
448
501
  readonly occurred: boolean;
502
+ } | {
503
+ readonly type: "entry_event_property";
504
+ readonly property: string;
505
+ readonly comparison: {
506
+ readonly operator: "eq" | "neq";
507
+ readonly value: string | number | boolean | null;
508
+ } | {
509
+ readonly operator: "gt" | "gte" | "lt" | "lte";
510
+ readonly value: number;
511
+ } | {
512
+ readonly operator: "contains" | "ends_with" | "not_contains" | "starts_with";
513
+ readonly value: string;
514
+ } | {
515
+ readonly operator: "exists" | "not_exists";
516
+ };
449
517
  })[];
450
518
  } | undefined;
451
519
  }[];
@@ -488,6 +556,9 @@ export declare const replaceDraft: (input: {
488
556
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
489
557
  } | null | undefined;
490
558
  } | undefined;
559
+ readonly eventBindings?: {
560
+ readonly [x: string]: string | undefined;
561
+ } | undefined;
491
562
  };
492
563
  readonly next: readonly {
493
564
  readonly nodeId: string;
@@ -507,6 +578,9 @@ export declare const replaceDraft: (input: {
507
578
  readonly enrollment?: {
508
579
  readonly type: "shopify_order";
509
580
  readonly shop: string;
581
+ } | {
582
+ readonly type: "event_property";
583
+ readonly property: string;
510
584
  } | undefined;
511
585
  };
512
586
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysReplaceDraft">;
@@ -547,6 +621,7 @@ export declare const listRuns: ((input: {
547
621
  }) => import("effect/Stream").Stream<{
548
622
  readonly items: readonly {
549
623
  readonly id: string & import("effect/Brand").Brand<"JourneyRunId">;
624
+ readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
550
625
  readonly journeyId: string & import("effect/Brand").Brand<"JourneyId">;
551
626
  readonly version: number;
552
627
  readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
@@ -576,6 +651,7 @@ export declare const listRuns: ((input: {
576
651
  readonly cursor?: string | undefined;
577
652
  }) => import("effect/Stream").Stream<{
578
653
  readonly id: string & import("effect/Brand").Brand<"JourneyRunId">;
654
+ readonly namespaceId?: (string & import("effect/Brand").Brand<"NamespaceId">) | null;
579
655
  readonly journeyId: string & import("effect/Brand").Brand<"JourneyId">;
580
656
  readonly version: number;
581
657
  readonly contactId: string & import("effect/Brand").Brand<"ContactId">;
@@ -1127,6 +1127,7 @@ export declare const getThreadContent: ((input: {
1127
1127
  } | null;
1128
1128
  readonly summary: string | null;
1129
1129
  readonly contextMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1130
+ readonly flowSubmissionHandledBy?: "app";
1130
1131
  })[];
1131
1132
  readonly nextCursor: string | null;
1132
1133
  }, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
@@ -1231,6 +1232,7 @@ export declare const getThreadContent: ((input: {
1231
1232
  } | null;
1232
1233
  readonly summary: string | null;
1233
1234
  readonly contextMessageId: (string & import("effect/Brand").Brand<"MessageId">) | null;
1235
+ readonly flowSubmissionHandledBy?: "app";
1234
1236
  }, import("./errors.js").ForbiddenError | import("./errors.js").GatewayTimeoutError | import("effect/http/HttpClientError").HttpClientError | import("./errors.js").InternalError | import("./errors.js").MalformedRequestError | import("./errors.js").ResourceNotFoundError | import("./errors.js").SamvaTimeoutError | import("effect/Schema").SchemaError | import("./errors.js").UnauthorizedError | import("./errors.js").ValidationError, import("./client.js").Service>;
1235
1237
  };
1236
1238
  export declare const listThreadNotes: ((input: {
@@ -251,6 +251,33 @@ export declare const create: (input: {
251
251
  } | null | undefined;
252
252
  } | undefined;
253
253
  readonly flowToken?: string | undefined;
254
+ readonly flowActionData?: {
255
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
256
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
257
+ } | null)[] | {
258
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
259
+ } | null)[] | {
260
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
261
+ } | null)[] | {
262
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
263
+ } | null)[] | {
264
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
265
+ } | null)[] | {
266
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
267
+ } | null)[] | {
268
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
269
+ } | null)[] | {
270
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
271
+ } | null)[] | {
272
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
273
+ } | null)[] | {
274
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
275
+ } | null)[] | {
276
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
277
+ } | null)[] | {
278
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
279
+ } | null | undefined;
280
+ } | undefined;
254
281
  } | {
255
282
  readonly templateSlug: string;
256
283
  readonly templateData?: {
@@ -281,6 +308,33 @@ export declare const create: (input: {
281
308
  } | null | undefined;
282
309
  } | undefined;
283
310
  readonly flowToken?: string | undefined;
311
+ readonly flowActionData?: {
312
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
313
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
314
+ } | null)[] | {
315
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
316
+ } | null)[] | {
317
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
318
+ } | null)[] | {
319
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
320
+ } | null)[] | {
321
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
322
+ } | null)[] | {
323
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
324
+ } | null)[] | {
325
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
326
+ } | null)[] | {
327
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
328
+ } | null)[] | {
329
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
330
+ } | null)[] | {
331
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
332
+ } | null)[] | {
333
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
334
+ } | null)[] | {
335
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
336
+ } | null | undefined;
337
+ } | undefined;
284
338
  } | {
285
339
  readonly media: {
286
340
  readonly type: "image";
@@ -624,12 +678,18 @@ export declare const list: ((input?: {
624
678
  readonly [x: string]: import("./generated/index.js").JsonValue;
625
679
  };
626
680
  readonly flowToken?: string;
681
+ readonly flowActionData?: {
682
+ readonly [x: string]: import("./generated/index.js").JsonValue;
683
+ };
627
684
  } | {
628
685
  readonly templateSlug: string;
629
686
  readonly templateData?: {
630
687
  readonly [x: string]: import("./generated/index.js").JsonValue;
631
688
  };
632
689
  readonly flowToken?: string;
690
+ readonly flowActionData?: {
691
+ readonly [x: string]: import("./generated/index.js").JsonValue;
692
+ };
633
693
  } | {
634
694
  readonly media: {
635
695
  readonly type: "image";
@@ -949,12 +1009,18 @@ export declare const list: ((input?: {
949
1009
  readonly [x: string]: import("./generated/index.js").JsonValue;
950
1010
  };
951
1011
  readonly flowToken?: string;
1012
+ readonly flowActionData?: {
1013
+ readonly [x: string]: import("./generated/index.js").JsonValue;
1014
+ };
952
1015
  } | {
953
1016
  readonly templateSlug: string;
954
1017
  readonly templateData?: {
955
1018
  readonly [x: string]: import("./generated/index.js").JsonValue;
956
1019
  };
957
1020
  readonly flowToken?: string;
1021
+ readonly flowActionData?: {
1022
+ readonly [x: string]: import("./generated/index.js").JsonValue;
1023
+ };
958
1024
  } | {
959
1025
  readonly media: {
960
1026
  readonly type: "image";
@@ -221,6 +221,7 @@ export declare const addEntry: (input: {
221
221
  readonly entryPath: string;
222
222
  readonly name: string;
223
223
  readonly slug: string;
224
+ readonly channel?: "email" | "whatsapp" | undefined;
224
225
  readonly description?: string | null | undefined;
225
226
  readonly category?: "alert" | "marketing" | "notification" | "reminder" | "support" | "transactional" | "verification" | null | undefined;
226
227
  }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"templatesAddEntry">;