samva 0.51.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +5 -2
- package/README.md +1 -0
- package/dist/client/sdk.gen.d.ts +82 -36
- package/dist/client/sdk.gen.js +192 -57
- package/dist/client/types.gen.d.ts +607 -291
- package/dist/effect/campaigns.d.ts +56 -56
- package/dist/effect/descriptors/integrations-catalog.d.ts +1 -1
- package/dist/effect/descriptors/integrations-catalog.js +1 -1
- package/dist/effect/descriptors/integrations.d.ts +1 -1
- package/dist/effect/descriptors/integrations.js +1 -1
- package/dist/effect/descriptors/logs.d.ts +21 -0
- package/dist/effect/descriptors/logs.js +23 -0
- package/dist/effect/descriptors/whats-app.d.ts +1 -1
- package/dist/effect/descriptors/whats-app.js +1 -1
- package/dist/effect/events.d.ts +16 -0
- package/dist/effect/generated/agents.js +4 -4
- package/dist/effect/generated/campaigns.d.ts +18 -6
- package/dist/effect/generated/campaigns.js +2 -6
- package/dist/effect/generated/email.js +3 -3
- package/dist/effect/generated/events.d.ts +48 -0
- package/dist/effect/generated/events.js +1 -1
- package/dist/effect/generated/index.d.ts +3 -1
- package/dist/effect/generated/integrations-catalog.d.ts +93 -49
- package/dist/effect/generated/integrations-catalog.js +17 -28
- package/dist/effect/generated/integrations.d.ts +20 -40
- package/dist/effect/generated/integrations.js +9 -13
- package/dist/effect/generated/journeys.d.ts +1113 -67
- package/dist/effect/generated/journeys.js +14 -8
- package/dist/effect/generated/logs.d.ts +2323 -0
- package/dist/effect/generated/logs.js +312 -0
- package/dist/effect/generated/mailboxes.d.ts +38 -24
- package/dist/effect/generated/mailboxes.js +22 -21
- package/dist/effect/generated/messages.d.ts +11 -882
- package/dist/effect/generated/messages.js +4 -243
- package/dist/effect/generated/newsletter-domains.d.ts +61 -13
- package/dist/effect/generated/newsletter-domains.js +5 -5
- package/dist/effect/generated/newsletter-issues.d.ts +166 -34
- package/dist/effect/generated/newsletter-issues.js +12 -12
- package/dist/effect/generated/newsletters.d.ts +76 -16
- package/dist/effect/generated/newsletters.js +6 -6
- package/dist/effect/generated/organizations.js +1 -1
- package/dist/effect/generated/scheduled-messages.d.ts +36 -0
- package/dist/effect/generated/scheduled-messages.js +1 -1
- package/dist/effect/generated/shared.d.ts +1706 -442
- package/dist/effect/generated/shared.js +370 -93
- package/dist/effect/generated/subscriptions.d.ts +4 -4
- package/dist/effect/generated/subscriptions.js +2 -6
- package/dist/effect/generated/template-registrations.d.ts +46 -10
- package/dist/effect/generated/template-registrations.js +4 -4
- package/dist/effect/generated/templates.js +2 -2
- package/dist/effect/generated/whats-app-flows.d.ts +173 -35
- package/dist/effect/generated/whats-app-flows.js +19 -17
- package/dist/effect/generated/whats-app-setup-links.d.ts +61 -13
- package/dist/effect/generated/whats-app-setup-links.js +5 -5
- package/dist/effect/generated/whats-app.d.ts +187 -65
- package/dist/effect/generated/whats-app.js +18 -24
- package/dist/effect/generated-metadata.d.ts +15 -3
- package/dist/effect/generated-metadata.js +375 -349
- package/dist/effect/index.d.ts +1 -0
- package/dist/effect/index.js +2 -1
- package/dist/effect/integrations-catalog.d.ts +92 -4
- package/dist/effect/integrations.d.ts +40 -8
- package/dist/effect/internal/client.js +25 -3
- package/dist/effect/internal/log-events.d.ts +19 -0
- package/dist/effect/internal/log-events.js +53 -0
- package/dist/effect/internal/mailbox-events.d.ts +6 -2
- package/dist/effect/internal/mailbox-events.js +4 -3
- package/dist/effect/journeys.d.ts +212 -146
- package/dist/effect/logs.d.ts +149 -0
- package/dist/effect/logs.js +18 -0
- package/dist/effect/mailboxes.d.ts +158 -150
- package/dist/effect/mailboxes.js +1 -1
- package/dist/effect/newsletter-domains.d.ts +2 -2
- package/dist/effect/scheduled-messages.d.ts +66 -0
- package/dist/effect/whatsapp-flows.d.ts +30 -0
- package/dist/effect/whatsapp-setup-links.d.ts +2 -2
- package/dist/effect/whatsapp.d.ts +73 -3
- package/dist/mailbox-events.d.ts +50 -3
- package/dist/mailbox-events.js +38 -19
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +3 -1
- package/dist/promises/client.js +3 -1
- package/dist/promises/errors.gen.d.ts +2 -0
- package/dist/promises/errors.gen.js +137 -34
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/request-id.d.ts +3 -0
- package/dist/request-id.js +7 -0
- package/dist/service-map.d.ts +14 -3
- package/package.json +6 -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,
|
|
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;
|
|
@@ -272,8 +276,8 @@ export type WhatsappFlowsList400 = MalformedRequestError;
|
|
|
272
276
|
export declare const WhatsappFlowsList400: typeof MalformedRequestError;
|
|
273
277
|
export type WhatsappFlowsList401 = UnauthorizedError;
|
|
274
278
|
export declare const WhatsappFlowsList401: typeof UnauthorizedError;
|
|
275
|
-
export type WhatsappFlowsList403 =
|
|
276
|
-
export declare const WhatsappFlowsList403:
|
|
279
|
+
export type WhatsappFlowsList403 = ForbiddenError;
|
|
280
|
+
export declare const WhatsappFlowsList403: typeof ForbiddenError;
|
|
277
281
|
export type WhatsappFlowsList422 = ValidationError;
|
|
278
282
|
export declare const WhatsappFlowsList422: typeof ValidationError;
|
|
279
283
|
export type WhatsappFlowsList500 = InternalError;
|
|
@@ -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;
|
|
@@ -319,8 +326,8 @@ export type WhatsappFlowsCreate400 = MalformedRequestError;
|
|
|
319
326
|
export declare const WhatsappFlowsCreate400: typeof MalformedRequestError;
|
|
320
327
|
export type WhatsappFlowsCreate401 = UnauthorizedError;
|
|
321
328
|
export declare const WhatsappFlowsCreate401: typeof UnauthorizedError;
|
|
322
|
-
export type WhatsappFlowsCreate403 =
|
|
323
|
-
export declare const WhatsappFlowsCreate403:
|
|
329
|
+
export type WhatsappFlowsCreate403 = ForbiddenError;
|
|
330
|
+
export declare const WhatsappFlowsCreate403: typeof ForbiddenError;
|
|
324
331
|
export type WhatsappFlowsCreate404 = ResourceNotFoundError;
|
|
325
332
|
export declare const WhatsappFlowsCreate404: typeof ResourceNotFoundError;
|
|
326
333
|
export type WhatsappFlowsCreate409 = ConflictError;
|
|
@@ -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;
|
|
@@ -366,8 +374,8 @@ export type WhatsappFlowsGet400 = MalformedRequestError;
|
|
|
366
374
|
export declare const WhatsappFlowsGet400: typeof MalformedRequestError;
|
|
367
375
|
export type WhatsappFlowsGet401 = UnauthorizedError;
|
|
368
376
|
export declare const WhatsappFlowsGet401: typeof UnauthorizedError;
|
|
369
|
-
export type WhatsappFlowsGet403 =
|
|
370
|
-
export declare const WhatsappFlowsGet403:
|
|
377
|
+
export type WhatsappFlowsGet403 = ForbiddenError;
|
|
378
|
+
export declare const WhatsappFlowsGet403: typeof ForbiddenError;
|
|
371
379
|
export type WhatsappFlowsGet404 = ResourceNotFoundError;
|
|
372
380
|
export declare const WhatsappFlowsGet404: typeof ResourceNotFoundError;
|
|
373
381
|
export type WhatsappFlowsGet422 = ValidationError;
|
|
@@ -398,8 +406,8 @@ export type WhatsappFlowsSetEndpoint400 = MalformedRequestError;
|
|
|
398
406
|
export declare const WhatsappFlowsSetEndpoint400: typeof MalformedRequestError;
|
|
399
407
|
export type WhatsappFlowsSetEndpoint401 = UnauthorizedError;
|
|
400
408
|
export declare const WhatsappFlowsSetEndpoint401: typeof UnauthorizedError;
|
|
401
|
-
export type WhatsappFlowsSetEndpoint403 =
|
|
402
|
-
export declare const WhatsappFlowsSetEndpoint403:
|
|
409
|
+
export type WhatsappFlowsSetEndpoint403 = ForbiddenError;
|
|
410
|
+
export declare const WhatsappFlowsSetEndpoint403: typeof ForbiddenError;
|
|
403
411
|
export type WhatsappFlowsSetEndpoint404 = ResourceNotFoundError;
|
|
404
412
|
export declare const WhatsappFlowsSetEndpoint404: typeof ResourceNotFoundError;
|
|
405
413
|
export type WhatsappFlowsSetEndpoint422 = ValidationError;
|
|
@@ -424,8 +432,8 @@ export type WhatsappFlowsRotateEndpointSecret400 = MalformedRequestError;
|
|
|
424
432
|
export declare const WhatsappFlowsRotateEndpointSecret400: typeof MalformedRequestError;
|
|
425
433
|
export type WhatsappFlowsRotateEndpointSecret401 = UnauthorizedError;
|
|
426
434
|
export declare const WhatsappFlowsRotateEndpointSecret401: typeof UnauthorizedError;
|
|
427
|
-
export type WhatsappFlowsRotateEndpointSecret403 =
|
|
428
|
-
export declare const WhatsappFlowsRotateEndpointSecret403:
|
|
435
|
+
export type WhatsappFlowsRotateEndpointSecret403 = ForbiddenError;
|
|
436
|
+
export declare const WhatsappFlowsRotateEndpointSecret403: typeof ForbiddenError;
|
|
429
437
|
export type WhatsappFlowsRotateEndpointSecret404 = ResourceNotFoundError;
|
|
430
438
|
export declare const WhatsappFlowsRotateEndpointSecret404: typeof ResourceNotFoundError;
|
|
431
439
|
export type WhatsappFlowsRotateEndpointSecret422 = ValidationError;
|
|
@@ -475,8 +483,8 @@ export type WhatsappFlowsListRegistrations400 = MalformedRequestError;
|
|
|
475
483
|
export declare const WhatsappFlowsListRegistrations400: typeof MalformedRequestError;
|
|
476
484
|
export type WhatsappFlowsListRegistrations401 = UnauthorizedError;
|
|
477
485
|
export declare const WhatsappFlowsListRegistrations401: typeof UnauthorizedError;
|
|
478
|
-
export type WhatsappFlowsListRegistrations403 =
|
|
479
|
-
export declare const WhatsappFlowsListRegistrations403:
|
|
486
|
+
export type WhatsappFlowsListRegistrations403 = ForbiddenError;
|
|
487
|
+
export declare const WhatsappFlowsListRegistrations403: typeof ForbiddenError;
|
|
480
488
|
export type WhatsappFlowsListRegistrations404 = ResourceNotFoundError;
|
|
481
489
|
export declare const WhatsappFlowsListRegistrations404: typeof ResourceNotFoundError;
|
|
482
490
|
export type WhatsappFlowsListRegistrations422 = ValidationError;
|
|
@@ -530,8 +538,8 @@ export type WhatsappFlowsRegister400 = MalformedRequestError;
|
|
|
530
538
|
export declare const WhatsappFlowsRegister400: typeof MalformedRequestError;
|
|
531
539
|
export type WhatsappFlowsRegister401 = UnauthorizedError;
|
|
532
540
|
export declare const WhatsappFlowsRegister401: typeof UnauthorizedError;
|
|
533
|
-
export type WhatsappFlowsRegister403 =
|
|
534
|
-
export declare const WhatsappFlowsRegister403:
|
|
541
|
+
export type WhatsappFlowsRegister403 = ForbiddenError;
|
|
542
|
+
export declare const WhatsappFlowsRegister403: typeof ForbiddenError;
|
|
535
543
|
export type WhatsappFlowsRegister404 = ResourceNotFoundError;
|
|
536
544
|
export declare const WhatsappFlowsRegister404: typeof ResourceNotFoundError;
|
|
537
545
|
export type WhatsappFlowsRegister409 = ConflictError;
|
|
@@ -568,8 +576,8 @@ export type WhatsappFlowsListVersions400 = MalformedRequestError;
|
|
|
568
576
|
export declare const WhatsappFlowsListVersions400: typeof MalformedRequestError;
|
|
569
577
|
export type WhatsappFlowsListVersions401 = UnauthorizedError;
|
|
570
578
|
export declare const WhatsappFlowsListVersions401: typeof UnauthorizedError;
|
|
571
|
-
export type WhatsappFlowsListVersions403 =
|
|
572
|
-
export declare const WhatsappFlowsListVersions403:
|
|
579
|
+
export type WhatsappFlowsListVersions403 = ForbiddenError;
|
|
580
|
+
export declare const WhatsappFlowsListVersions403: typeof ForbiddenError;
|
|
573
581
|
export type WhatsappFlowsListVersions404 = ResourceNotFoundError;
|
|
574
582
|
export declare const WhatsappFlowsListVersions404: typeof ResourceNotFoundError;
|
|
575
583
|
export type WhatsappFlowsListVersions422 = ValidationError;
|
|
@@ -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">;
|
|
@@ -608,8 +620,8 @@ export type WhatsappFlowsRecordVersion400 = MalformedRequestError;
|
|
|
608
620
|
export declare const WhatsappFlowsRecordVersion400: typeof MalformedRequestError;
|
|
609
621
|
export type WhatsappFlowsRecordVersion401 = UnauthorizedError;
|
|
610
622
|
export declare const WhatsappFlowsRecordVersion401: typeof UnauthorizedError;
|
|
611
|
-
export type WhatsappFlowsRecordVersion403 =
|
|
612
|
-
export declare const WhatsappFlowsRecordVersion403:
|
|
623
|
+
export type WhatsappFlowsRecordVersion403 = ForbiddenError;
|
|
624
|
+
export declare const WhatsappFlowsRecordVersion403: typeof ForbiddenError;
|
|
613
625
|
export type WhatsappFlowsRecordVersion404 = ResourceNotFoundError;
|
|
614
626
|
export declare const WhatsappFlowsRecordVersion404: typeof ResourceNotFoundError;
|
|
615
627
|
export type WhatsappFlowsRecordVersion409 = ConflictError;
|
|
@@ -639,8 +651,8 @@ export type WhatsappFlowsRotateEncryptionKey400 = MalformedRequestError;
|
|
|
639
651
|
export declare const WhatsappFlowsRotateEncryptionKey400: typeof MalformedRequestError;
|
|
640
652
|
export type WhatsappFlowsRotateEncryptionKey401 = UnauthorizedError;
|
|
641
653
|
export declare const WhatsappFlowsRotateEncryptionKey401: typeof UnauthorizedError;
|
|
642
|
-
export type WhatsappFlowsRotateEncryptionKey403 =
|
|
643
|
-
export declare const WhatsappFlowsRotateEncryptionKey403:
|
|
654
|
+
export type WhatsappFlowsRotateEncryptionKey403 = ForbiddenError;
|
|
655
|
+
export declare const WhatsappFlowsRotateEncryptionKey403: typeof ForbiddenError;
|
|
644
656
|
export type WhatsappFlowsRotateEncryptionKey404 = ResourceNotFoundError;
|
|
645
657
|
export declare const WhatsappFlowsRotateEncryptionKey404: typeof ResourceNotFoundError;
|
|
646
658
|
export type WhatsappFlowsRotateEncryptionKey422 = ValidationError;
|
|
@@ -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;
|
|
@@ -678,7 +692,7 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
678
692
|
}>, Schema.Null]>;
|
|
679
693
|
readonly createdAt: Schema.String;
|
|
680
694
|
readonly updatedAt: Schema.String;
|
|
681
|
-
}>>, Schema.toCodecJson<Schema.
|
|
695
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
682
696
|
readonly _tag: "ConflictError";
|
|
683
697
|
readonly message: string;
|
|
684
698
|
readonly resource: string;
|
|
@@ -698,6 +712,18 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
698
712
|
readonly message: Schema.String;
|
|
699
713
|
readonly resource: Schema.String;
|
|
700
714
|
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
715
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
716
|
+
readonly _tag: "ForbiddenError";
|
|
717
|
+
readonly message: string;
|
|
718
|
+
}, readonly [Schema.Struct<{
|
|
719
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
720
|
+
readonly message: Schema.String;
|
|
721
|
+
}>], {
|
|
722
|
+
readonly _tag: "ForbiddenError";
|
|
723
|
+
readonly message: string;
|
|
724
|
+
}>, Schema.Struct<{
|
|
725
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
726
|
+
readonly message: Schema.String;
|
|
701
727
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
702
728
|
readonly _tag: "GatewayTimeoutError";
|
|
703
729
|
readonly message: string;
|
|
@@ -794,6 +820,7 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
794
820
|
readonly handle: Schema.String;
|
|
795
821
|
readonly path: Schema.String;
|
|
796
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">]>>;
|
|
797
824
|
readonly endpoint: Schema.Union<readonly [Schema.Struct<{
|
|
798
825
|
readonly url: Schema.String;
|
|
799
826
|
readonly updatedAt: Schema.String;
|
|
@@ -811,7 +838,19 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
811
838
|
}>, Schema.Null]>;
|
|
812
839
|
readonly createdAt: Schema.String;
|
|
813
840
|
readonly updatedAt: Schema.String;
|
|
814
|
-
}>>, Schema.toCodecJson<Schema.
|
|
841
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
842
|
+
readonly _tag: "ForbiddenError";
|
|
843
|
+
readonly message: string;
|
|
844
|
+
}, readonly [Schema.Struct<{
|
|
845
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
846
|
+
readonly message: Schema.String;
|
|
847
|
+
}>], {
|
|
848
|
+
readonly _tag: "ForbiddenError";
|
|
849
|
+
readonly message: string;
|
|
850
|
+
}>, Schema.Struct<{
|
|
851
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
852
|
+
readonly message: Schema.String;
|
|
853
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
815
854
|
readonly _tag: "GatewayTimeoutError";
|
|
816
855
|
readonly message: string;
|
|
817
856
|
readonly retryAfterSeconds: number;
|
|
@@ -906,6 +945,7 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
906
945
|
readonly handle: Schema.String;
|
|
907
946
|
readonly path: Schema.String;
|
|
908
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">]>>;
|
|
909
949
|
readonly endpoint: Schema.Union<readonly [Schema.Struct<{
|
|
910
950
|
readonly url: Schema.String;
|
|
911
951
|
readonly updatedAt: Schema.String;
|
|
@@ -924,7 +964,19 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
924
964
|
readonly createdAt: Schema.String;
|
|
925
965
|
readonly updatedAt: Schema.String;
|
|
926
966
|
}>>;
|
|
927
|
-
}>>, Schema.toCodecJson<Schema.
|
|
967
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
968
|
+
readonly _tag: "ForbiddenError";
|
|
969
|
+
readonly message: string;
|
|
970
|
+
}, readonly [Schema.Struct<{
|
|
971
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
972
|
+
readonly message: Schema.String;
|
|
973
|
+
}>], {
|
|
974
|
+
readonly _tag: "ForbiddenError";
|
|
975
|
+
readonly message: string;
|
|
976
|
+
}>, Schema.Struct<{
|
|
977
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
978
|
+
readonly message: Schema.String;
|
|
979
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
928
980
|
readonly _tag: "GatewayTimeoutError";
|
|
929
981
|
readonly message: string;
|
|
930
982
|
readonly retryAfterSeconds: number;
|
|
@@ -1023,7 +1075,19 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
1023
1075
|
readonly createdAt: Schema.String;
|
|
1024
1076
|
readonly updatedAt: Schema.String;
|
|
1025
1077
|
}>>;
|
|
1026
|
-
}>>, Schema.toCodecJson<Schema.
|
|
1078
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1079
|
+
readonly _tag: "ForbiddenError";
|
|
1080
|
+
readonly message: string;
|
|
1081
|
+
}, readonly [Schema.Struct<{
|
|
1082
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1083
|
+
readonly message: Schema.String;
|
|
1084
|
+
}>], {
|
|
1085
|
+
readonly _tag: "ForbiddenError";
|
|
1086
|
+
readonly message: string;
|
|
1087
|
+
}>, Schema.Struct<{
|
|
1088
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1089
|
+
readonly message: Schema.String;
|
|
1090
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1027
1091
|
readonly _tag: "GatewayTimeoutError";
|
|
1028
1092
|
readonly message: string;
|
|
1029
1093
|
readonly retryAfterSeconds: number;
|
|
@@ -1125,7 +1189,19 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
1125
1189
|
readonly dataExchange: Schema.Boolean;
|
|
1126
1190
|
readonly createdAt: Schema.String;
|
|
1127
1191
|
}>>;
|
|
1128
|
-
}>>, Schema.toCodecJson<Schema.
|
|
1192
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1193
|
+
readonly _tag: "ForbiddenError";
|
|
1194
|
+
readonly message: string;
|
|
1195
|
+
}, readonly [Schema.Struct<{
|
|
1196
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1197
|
+
readonly message: Schema.String;
|
|
1198
|
+
}>], {
|
|
1199
|
+
readonly _tag: "ForbiddenError";
|
|
1200
|
+
readonly message: string;
|
|
1201
|
+
}>, Schema.Struct<{
|
|
1202
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1203
|
+
readonly message: Schema.String;
|
|
1204
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1129
1205
|
readonly _tag: "GatewayTimeoutError";
|
|
1130
1206
|
readonly message: string;
|
|
1131
1207
|
readonly retryAfterSeconds: number;
|
|
@@ -1215,10 +1291,12 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
1215
1291
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1216
1292
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"whatsappFlowsRecordVersion", "POST", "/v1/whatsapp/flows/:id/versions", Schema.toCodecStringTree<Schema.Struct<{
|
|
1217
1293
|
readonly id: Schema.brand<Schema.String, "WhatsAppFlowId">;
|
|
1218
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1294
|
+
}>>, never, Schema.toCodecJson<Schema.Union<readonly [Schema.Struct<{
|
|
1219
1295
|
readonly commitSha: Schema.String;
|
|
1220
1296
|
readonly expectedWorkspaceRevision: Schema.String;
|
|
1221
|
-
}
|
|
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<{
|
|
1222
1300
|
readonly id: Schema.brand<Schema.String, "WhatsAppFlowVersionId">;
|
|
1223
1301
|
readonly flowId: Schema.brand<Schema.String, "WhatsAppFlowId">;
|
|
1224
1302
|
readonly number: Schema.Finite;
|
|
@@ -1228,7 +1306,7 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
1228
1306
|
readonly screens: Schema.$Array<Schema.String>;
|
|
1229
1307
|
readonly dataExchange: Schema.Boolean;
|
|
1230
1308
|
readonly createdAt: Schema.String;
|
|
1231
|
-
}>>, Schema.toCodecJson<Schema.
|
|
1309
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
1232
1310
|
readonly _tag: "ConflictError";
|
|
1233
1311
|
readonly message: string;
|
|
1234
1312
|
readonly resource: string;
|
|
@@ -1248,6 +1326,18 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
1248
1326
|
readonly message: Schema.String;
|
|
1249
1327
|
readonly resource: Schema.String;
|
|
1250
1328
|
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1329
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1330
|
+
readonly _tag: "ForbiddenError";
|
|
1331
|
+
readonly message: string;
|
|
1332
|
+
}, readonly [Schema.Struct<{
|
|
1333
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1334
|
+
readonly message: Schema.String;
|
|
1335
|
+
}>], {
|
|
1336
|
+
readonly _tag: "ForbiddenError";
|
|
1337
|
+
readonly message: string;
|
|
1338
|
+
}>, Schema.Struct<{
|
|
1339
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1340
|
+
readonly message: Schema.String;
|
|
1251
1341
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1252
1342
|
readonly _tag: "GatewayTimeoutError";
|
|
1253
1343
|
readonly message: string;
|
|
@@ -1383,7 +1473,7 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
1383
1473
|
readonly statusChangedAt: Schema.String;
|
|
1384
1474
|
readonly createdAt: Schema.String;
|
|
1385
1475
|
readonly updatedAt: Schema.String;
|
|
1386
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof
|
|
1476
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof CredentialsError, typeof InternalError]> | Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
1387
1477
|
readonly _tag: "ConflictError";
|
|
1388
1478
|
readonly message: string;
|
|
1389
1479
|
readonly resource: string;
|
|
@@ -1403,6 +1493,18 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
1403
1493
|
readonly message: Schema.String;
|
|
1404
1494
|
readonly resource: Schema.String;
|
|
1405
1495
|
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1496
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1497
|
+
readonly _tag: "ForbiddenError";
|
|
1498
|
+
readonly message: string;
|
|
1499
|
+
}, readonly [Schema.Struct<{
|
|
1500
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1501
|
+
readonly message: Schema.String;
|
|
1502
|
+
}>], {
|
|
1503
|
+
readonly _tag: "ForbiddenError";
|
|
1504
|
+
readonly message: string;
|
|
1505
|
+
}>, Schema.Struct<{
|
|
1506
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1507
|
+
readonly message: Schema.String;
|
|
1406
1508
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1407
1509
|
readonly _tag: "GatewayTimeoutError";
|
|
1408
1510
|
readonly message: string;
|
|
@@ -1526,7 +1628,19 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
1526
1628
|
readonly publicKey: Schema.String;
|
|
1527
1629
|
readonly phoneNumberIds: Schema.$Array<Schema.String>;
|
|
1528
1630
|
readonly createdAt: Schema.String;
|
|
1529
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof
|
|
1631
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof CredentialsError, typeof InternalError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1632
|
+
readonly _tag: "ForbiddenError";
|
|
1633
|
+
readonly message: string;
|
|
1634
|
+
}, readonly [Schema.Struct<{
|
|
1635
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1636
|
+
readonly message: Schema.String;
|
|
1637
|
+
}>], {
|
|
1638
|
+
readonly _tag: "ForbiddenError";
|
|
1639
|
+
readonly message: string;
|
|
1640
|
+
}>, Schema.Struct<{
|
|
1641
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1642
|
+
readonly message: Schema.String;
|
|
1643
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1530
1644
|
readonly _tag: "GatewayTimeoutError";
|
|
1531
1645
|
readonly message: string;
|
|
1532
1646
|
readonly retryAfterSeconds: number;
|
|
@@ -1648,7 +1762,19 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
1648
1762
|
readonly url: Schema.String;
|
|
1649
1763
|
readonly updatedAt: Schema.String;
|
|
1650
1764
|
readonly secret: Schema.optionalKey<Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>>;
|
|
1651
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof
|
|
1765
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof CredentialsError, typeof InternalError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1766
|
+
readonly _tag: "ForbiddenError";
|
|
1767
|
+
readonly message: string;
|
|
1768
|
+
}, readonly [Schema.Struct<{
|
|
1769
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1770
|
+
readonly message: Schema.String;
|
|
1771
|
+
}>], {
|
|
1772
|
+
readonly _tag: "ForbiddenError";
|
|
1773
|
+
readonly message: string;
|
|
1774
|
+
}>, Schema.Struct<{
|
|
1775
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1776
|
+
readonly message: Schema.String;
|
|
1777
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1652
1778
|
readonly _tag: "GatewayTimeoutError";
|
|
1653
1779
|
readonly message: string;
|
|
1654
1780
|
readonly retryAfterSeconds: number;
|
|
@@ -1744,7 +1870,19 @@ declare const WhatsAppFlowsGroup_base: HttpApiGroup.HttpApiGroup<"WhatsApp flows
|
|
|
1744
1870
|
readonly url: Schema.String;
|
|
1745
1871
|
readonly updatedAt: Schema.String;
|
|
1746
1872
|
readonly secret: Schema.optionalKey<Schema.RedactedFromValue<Schema.Codec<string, string, never, never>>>;
|
|
1747
|
-
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof
|
|
1873
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof CredentialsError, typeof InternalError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1874
|
+
readonly _tag: "ForbiddenError";
|
|
1875
|
+
readonly message: string;
|
|
1876
|
+
}, readonly [Schema.Struct<{
|
|
1877
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1878
|
+
readonly message: Schema.String;
|
|
1879
|
+
}>], {
|
|
1880
|
+
readonly _tag: "ForbiddenError";
|
|
1881
|
+
readonly message: string;
|
|
1882
|
+
}>, Schema.Struct<{
|
|
1883
|
+
readonly _tag: Schema.tag<"ForbiddenError">;
|
|
1884
|
+
readonly message: Schema.String;
|
|
1885
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<GatewayTimeoutError, {
|
|
1748
1886
|
readonly _tag: "GatewayTimeoutError";
|
|
1749
1887
|
readonly message: string;
|
|
1750
1888
|
readonly retryAfterSeconds: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SensitiveString } from "../runtime.js";
|
|
2
|
-
import { ApiKeySecurityMiddleware, ConflictError, CredentialsError,
|
|
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,
|
|
@@ -95,7 +96,7 @@ const WhatsAppFlowList = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.Arr
|
|
|
95
96
|
const WhatsappFlowsList200 = WhatsAppFlowList;
|
|
96
97
|
const WhatsappFlowsList400 = MalformedRequestError;
|
|
97
98
|
const WhatsappFlowsList401 = UnauthorizedError;
|
|
98
|
-
const WhatsappFlowsList403 =
|
|
99
|
+
const WhatsappFlowsList403 = ForbiddenError;
|
|
99
100
|
const WhatsappFlowsList422 = ValidationError;
|
|
100
101
|
const WhatsappFlowsList500 = InternalError;
|
|
101
102
|
const WhatsappFlowsList504 = GatewayTimeoutError;
|
|
@@ -111,12 +112,13 @@ 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;
|
|
118
120
|
const WhatsappFlowsCreate401 = UnauthorizedError;
|
|
119
|
-
const WhatsappFlowsCreate403 =
|
|
121
|
+
const WhatsappFlowsCreate403 = ForbiddenError;
|
|
120
122
|
const WhatsappFlowsCreate404 = ResourceNotFoundError;
|
|
121
123
|
const WhatsappFlowsCreate409 = ConflictError;
|
|
122
124
|
const WhatsappFlowsCreate422 = ValidationError;
|
|
@@ -126,7 +128,7 @@ const WhatsappFlowsGetPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: Wh
|
|
|
126
128
|
const WhatsappFlowsGet200 = WhatsAppFlow;
|
|
127
129
|
const WhatsappFlowsGet400 = MalformedRequestError;
|
|
128
130
|
const WhatsappFlowsGet401 = UnauthorizedError;
|
|
129
|
-
const WhatsappFlowsGet403 =
|
|
131
|
+
const WhatsappFlowsGet403 = ForbiddenError;
|
|
130
132
|
const WhatsappFlowsGet404 = ResourceNotFoundError;
|
|
131
133
|
const WhatsappFlowsGet422 = ValidationError;
|
|
132
134
|
const WhatsappFlowsGet500 = InternalError;
|
|
@@ -136,7 +138,7 @@ const WhatsappFlowsSetEndpointRequestJson = /* @__PURE__ */ (() => Schema.Struct
|
|
|
136
138
|
const WhatsappFlowsSetEndpoint200 = WhatsAppFlowEndpointSettings;
|
|
137
139
|
const WhatsappFlowsSetEndpoint400 = MalformedRequestError;
|
|
138
140
|
const WhatsappFlowsSetEndpoint401 = UnauthorizedError;
|
|
139
|
-
const WhatsappFlowsSetEndpoint403 =
|
|
141
|
+
const WhatsappFlowsSetEndpoint403 = ForbiddenError;
|
|
140
142
|
const WhatsappFlowsSetEndpoint404 = ResourceNotFoundError;
|
|
141
143
|
const WhatsappFlowsSetEndpoint422 = ValidationError;
|
|
142
144
|
const WhatsappFlowsSetEndpoint500 = /* @__PURE__ */ (() => Schema.Union([CredentialsError, InternalError]))();
|
|
@@ -145,7 +147,7 @@ const WhatsappFlowsRotateEndpointSecretPathParams = /* @__PURE__ */ (() => Schem
|
|
|
145
147
|
const WhatsappFlowsRotateEndpointSecret200 = WhatsAppFlowEndpointSettings;
|
|
146
148
|
const WhatsappFlowsRotateEndpointSecret400 = MalformedRequestError;
|
|
147
149
|
const WhatsappFlowsRotateEndpointSecret401 = UnauthorizedError;
|
|
148
|
-
const WhatsappFlowsRotateEndpointSecret403 =
|
|
150
|
+
const WhatsappFlowsRotateEndpointSecret403 = ForbiddenError;
|
|
149
151
|
const WhatsappFlowsRotateEndpointSecret404 = ResourceNotFoundError;
|
|
150
152
|
const WhatsappFlowsRotateEndpointSecret422 = ValidationError;
|
|
151
153
|
const WhatsappFlowsRotateEndpointSecret500 = /* @__PURE__ */ (() => Schema.Union([CredentialsError, InternalError]))();
|
|
@@ -154,7 +156,7 @@ const WhatsappFlowsListRegistrationsPathParams = /* @__PURE__ */ (() => Schema.S
|
|
|
154
156
|
const WhatsappFlowsListRegistrations200 = WhatsAppFlowRegistrationList;
|
|
155
157
|
const WhatsappFlowsListRegistrations400 = MalformedRequestError;
|
|
156
158
|
const WhatsappFlowsListRegistrations401 = UnauthorizedError;
|
|
157
|
-
const WhatsappFlowsListRegistrations403 =
|
|
159
|
+
const WhatsappFlowsListRegistrations403 = ForbiddenError;
|
|
158
160
|
const WhatsappFlowsListRegistrations404 = ResourceNotFoundError;
|
|
159
161
|
const WhatsappFlowsListRegistrations422 = ValidationError;
|
|
160
162
|
const WhatsappFlowsListRegistrations500 = InternalError;
|
|
@@ -164,7 +166,7 @@ const WhatsappFlowsRegisterRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
164
166
|
const WhatsappFlowsRegister201 = WhatsAppFlowRegistration;
|
|
165
167
|
const WhatsappFlowsRegister400 = MalformedRequestError;
|
|
166
168
|
const WhatsappFlowsRegister401 = UnauthorizedError;
|
|
167
|
-
const WhatsappFlowsRegister403 =
|
|
169
|
+
const WhatsappFlowsRegister403 = ForbiddenError;
|
|
168
170
|
const WhatsappFlowsRegister404 = ResourceNotFoundError;
|
|
169
171
|
const WhatsappFlowsRegister409 = ConflictError;
|
|
170
172
|
const WhatsappFlowsRegister422 = ValidationError;
|
|
@@ -175,20 +177,20 @@ const WhatsappFlowsListVersionsPathParams = /* @__PURE__ */ (() => Schema.Struct
|
|
|
175
177
|
const WhatsappFlowsListVersions200 = WhatsAppFlowVersionList;
|
|
176
178
|
const WhatsappFlowsListVersions400 = MalformedRequestError;
|
|
177
179
|
const WhatsappFlowsListVersions401 = UnauthorizedError;
|
|
178
|
-
const WhatsappFlowsListVersions403 =
|
|
180
|
+
const WhatsappFlowsListVersions403 = ForbiddenError;
|
|
179
181
|
const WhatsappFlowsListVersions404 = ResourceNotFoundError;
|
|
180
182
|
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;
|
|
191
|
-
const WhatsappFlowsRecordVersion403 =
|
|
193
|
+
const WhatsappFlowsRecordVersion403 = ForbiddenError;
|
|
192
194
|
const WhatsappFlowsRecordVersion404 = ResourceNotFoundError;
|
|
193
195
|
const WhatsappFlowsRecordVersion409 = ConflictError;
|
|
194
196
|
const WhatsappFlowsRecordVersion422 = ValidationError;
|
|
@@ -199,7 +201,7 @@ const WhatsappFlowsRotateEncryptionKeyRequestJson = /* @__PURE__ */ (() => Schem
|
|
|
199
201
|
const WhatsappFlowsRotateEncryptionKey200 = WhatsAppFlowEncryptionKey;
|
|
200
202
|
const WhatsappFlowsRotateEncryptionKey400 = MalformedRequestError;
|
|
201
203
|
const WhatsappFlowsRotateEncryptionKey401 = UnauthorizedError;
|
|
202
|
-
const WhatsappFlowsRotateEncryptionKey403 =
|
|
204
|
+
const WhatsappFlowsRotateEncryptionKey403 = ForbiddenError;
|
|
203
205
|
const WhatsappFlowsRotateEncryptionKey404 = ResourceNotFoundError;
|
|
204
206
|
const WhatsappFlowsRotateEncryptionKey422 = ValidationError;
|
|
205
207
|
const WhatsappFlowsRotateEncryptionKey500 = /* @__PURE__ */ (() => Schema.Union([CredentialsError, InternalError]))();
|
|
@@ -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
|
|
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
|
|
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, "
|
|
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: [
|