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.
- package/dist/client/sdk.gen.d.ts +55 -18
- package/dist/client/sdk.gen.js +165 -45
- package/dist/client/types.gen.d.ts +313 -21
- package/dist/effect/brands.d.ts +8 -1
- package/dist/effect/descriptors/brands.d.ts +4 -4
- package/dist/effect/descriptors/brands.js +4 -4
- package/dist/effect/descriptors/email.d.ts +21 -1
- package/dist/effect/descriptors/email.js +21 -1
- package/dist/effect/email.d.ts +12 -0
- package/dist/effect/email.js +5 -1
- package/dist/effect/events.d.ts +16 -0
- package/dist/effect/generated/api-keys.js +2 -2
- package/dist/effect/generated/brands.d.ts +78 -8
- package/dist/effect/generated/brands.js +21 -12
- package/dist/effect/generated/email.d.ts +473 -2
- package/dist/effect/generated/email.js +106 -7
- package/dist/effect/generated/events.d.ts +48 -0
- package/dist/effect/generated/events.js +1 -1
- package/dist/effect/generated/journeys.d.ts +1173 -55
- package/dist/effect/generated/journeys.js +10 -4
- package/dist/effect/generated/logs.d.ts +12 -0
- package/dist/effect/generated/mailboxes.d.ts +8 -0
- package/dist/effect/generated/mailboxes.js +2 -1
- package/dist/effect/generated/messages.d.ts +16 -0
- package/dist/effect/generated/messages.js +7 -1
- package/dist/effect/generated/scheduled-messages.d.ts +36 -0
- package/dist/effect/generated/shared.d.ts +438 -15
- package/dist/effect/generated/shared.js +59 -13
- package/dist/effect/generated/templates.d.ts +34 -1
- package/dist/effect/generated/templates.js +18 -3
- package/dist/effect/generated/whats-app-flows.d.ts +23 -5
- package/dist/effect/generated/whats-app-flows.js +9 -7
- package/dist/effect/generated-metadata.d.ts +12 -0
- package/dist/effect/generated-metadata.js +2 -0
- package/dist/effect/journeys.d.ts +76 -0
- package/dist/effect/mailboxes.d.ts +2 -0
- package/dist/effect/scheduled-messages.d.ts +66 -0
- package/dist/effect/templates.d.ts +1 -0
- package/dist/effect/whatsapp-flows.d.ts +30 -0
- package/dist/package.js +1 -1
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +15 -5
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, ForbiddenError, GatewayTimeoutError, InternalError, JourneyDefinition, JourneyId, JourneyName, JourneyNodeId, JourneyStatus, JsonObject, MalformedRequestError, MessageId, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
1
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, ForbiddenError, GatewayTimeoutError, InternalError, JourneyDefinition, JourneyId, JourneyName, JourneyNodeId, JourneyStatus, JsonObject, MalformedRequestError, MessageId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
// src/effect/generated/journeys.ts
|
|
@@ -44,6 +44,7 @@ const DeleteJourneyResponse = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
44
44
|
}).annotate({ identifier: "DeleteJourneyResponse" }))();
|
|
45
45
|
const JourneyListItem = /* @__PURE__ */ (() => Schema.Struct({
|
|
46
46
|
id: JourneyId,
|
|
47
|
+
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
47
48
|
name: Schema.String,
|
|
48
49
|
status: JourneyStatus,
|
|
49
50
|
publishedVersion: Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })), Schema.Null]),
|
|
@@ -68,6 +69,7 @@ const JourneyRunStep = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
68
69
|
}).annotate({ identifier: "JourneyRunStep" }))();
|
|
69
70
|
const JourneyRun = /* @__PURE__ */ (() => Schema.Struct({
|
|
70
71
|
id: JourneyRunId,
|
|
72
|
+
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
71
73
|
journeyId: JourneyId,
|
|
72
74
|
version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
73
75
|
contactId: ContactId,
|
|
@@ -93,6 +95,7 @@ const JourneyStats = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
93
95
|
}).annotate({ identifier: "JourneyStats" }))();
|
|
94
96
|
const JourneyRunDetail = /* @__PURE__ */ (() => Schema.Struct({
|
|
95
97
|
id: JourneyRunId,
|
|
98
|
+
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
96
99
|
journeyId: JourneyId,
|
|
97
100
|
version: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(-9007199254740991).annotate({ expected: "a value greater than or equal to -9007199254740991" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
98
101
|
contactId: ContactId,
|
|
@@ -113,6 +116,7 @@ const JourneyRunPage = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
113
116
|
}).annotate({ identifier: "JourneyRunPage" }))();
|
|
114
117
|
const Journey = /* @__PURE__ */ (() => Schema.Struct({
|
|
115
118
|
id: JourneyId,
|
|
119
|
+
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
116
120
|
name: Schema.String,
|
|
117
121
|
status: JourneyStatus,
|
|
118
122
|
revision: Schema.String,
|
|
@@ -129,6 +133,7 @@ const JourneyVersion = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
129
133
|
publishedAt: Schema.String
|
|
130
134
|
}).annotate({ identifier: "JourneyVersion" }))();
|
|
131
135
|
const JourneysListQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
136
|
+
namespaceId: Schema.optionalKey(NamespaceId),
|
|
132
137
|
status: Schema.optionalKey(JourneyStatus),
|
|
133
138
|
limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
|
|
134
139
|
cursor: Schema.optionalKey(Schema.String)
|
|
@@ -142,6 +147,7 @@ const JourneysList500 = InternalError;
|
|
|
142
147
|
const JourneysList504 = GatewayTimeoutError;
|
|
143
148
|
const JourneysCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
144
149
|
name: JourneyName,
|
|
150
|
+
namespaceId: Schema.optionalKey(NamespaceId),
|
|
145
151
|
definition: JourneyDefinition
|
|
146
152
|
}))();
|
|
147
153
|
const JourneysCreate201 = Journey;
|
|
@@ -305,7 +311,7 @@ var JourneysGroup = class extends HttpApiGroup.make("Journeys").add(HttpApiEndpo
|
|
|
305
311
|
JourneysList500,
|
|
306
312
|
JourneysList504.pipe(HttpApiSchema.status(504))
|
|
307
313
|
]
|
|
308
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "journeys.list").annotate(OpenApi.Summary, "List journeys").annotate(OpenApi.Description, "Returns the
|
|
314
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "journeys.list").annotate(OpenApi.Summary, "List journeys").annotate(OpenApi.Description, "Returns the journeys the caller can access, newest first. Filter by namespaceId or status. Pass nextCursor back as cursor for the next page."), HttpApiEndpoint.post("journeysCreate", "/v1/journeys", {
|
|
309
315
|
payload: JourneysCreateRequestJson,
|
|
310
316
|
success: JourneysCreate201.pipe(HttpApiSchema.status(201)),
|
|
311
317
|
error: [
|
|
@@ -320,7 +326,7 @@ var JourneysGroup = class extends HttpApiGroup.make("Journeys").add(HttpApiEndpo
|
|
|
320
326
|
JourneysCreate502.pipe(HttpApiSchema.status(502)),
|
|
321
327
|
JourneysCreate504.pipe(HttpApiSchema.status(504))
|
|
322
328
|
]
|
|
323
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "journeys.create").annotate(OpenApi.Summary, "Create a journey").annotate(OpenApi.Description, "Creates a draft journey from a definition: a trigger, a root node, and a graph of at most 200 nodes that is acyclic and fully reachable.
|
|
329
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "journeys.create").annotate(OpenApi.Summary, "Create a journey").annotate(OpenApi.Description, "Creates a draft journey from a definition: a trigger, a root node, and a graph of at most 200 nodes that is acyclic and fully reachable. A namespace key creates in its own namespace. An organization key can pass namespaceId to place the journey in a namespace. The journey can use resources available in its scope. Requires a plan that includes journeys."), HttpApiEndpoint.get("journeysGet", "/v1/journeys/:id", {
|
|
324
330
|
params: JourneysGetPathParams,
|
|
325
331
|
success: JourneysGet200,
|
|
326
332
|
error: [
|
|
@@ -481,7 +487,7 @@ var JourneysGroup = class extends HttpApiGroup.make("Journeys").add(HttpApiEndpo
|
|
|
481
487
|
JourneysGetVersion500,
|
|
482
488
|
JourneysGetVersion504.pipe(HttpApiSchema.status(504))
|
|
483
489
|
]
|
|
484
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "journeys.getVersion").annotate(OpenApi.Summary, "Get a published journey version").annotate(OpenApi.Description, "Returns the immutable definition of one published version.")).annotate(OpenApi.Description, "
|
|
490
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "journeys.getVersion").annotate(OpenApi.Summary, "Get a published journey version").annotate(OpenApi.Description, "Returns the immutable definition of one published version.")).annotate(OpenApi.Description, "Versioned event-triggered automations that send email and WhatsApp, wait for events, and publish webhooks") {};
|
|
485
491
|
export { DeleteJourneyResponse, Journey, JourneyListItem, JourneyNodeStats, JourneyPage, JourneyRun, JourneyRunCounts, JourneyRunDetail, JourneyRunExitReason, JourneyRunId, JourneyRunPage, JourneyRunStatus, JourneyRunStep, JourneyRunStepOutcome, JourneyRunTrigger, JourneyStats, JourneyVersion, JourneysArchive200, JourneysArchive400, JourneysArchive401, JourneysArchive403, JourneysArchive404, JourneysArchive409, JourneysArchive422, JourneysArchive500, JourneysArchive504, JourneysArchivePathParams, JourneysCreate201, JourneysCreate400, JourneysCreate401, JourneysCreate402, JourneysCreate403, JourneysCreate404, JourneysCreate409, JourneysCreate422, JourneysCreate500, JourneysCreate502, JourneysCreate504, JourneysCreateRequestJson, JourneysGet200, JourneysGet400, JourneysGet401, JourneysGet403, JourneysGet404, JourneysGet422, JourneysGet500, JourneysGet504, JourneysGetPathParams, JourneysGetRun200, JourneysGetRun400, JourneysGetRun401, JourneysGetRun403, JourneysGetRun404, JourneysGetRun422, JourneysGetRun500, JourneysGetRun504, JourneysGetRunPathParams, JourneysGetVersion200, JourneysGetVersion400, JourneysGetVersion401, JourneysGetVersion403, JourneysGetVersion404, JourneysGetVersion422, JourneysGetVersion500, JourneysGetVersion504, JourneysGetVersionPathParams, JourneysGroup, JourneysList200, JourneysList400, JourneysList401, JourneysList403, JourneysList422, JourneysList500, JourneysList504, JourneysListQuery, JourneysListRuns200, JourneysListRuns400, JourneysListRuns401, JourneysListRuns403, JourneysListRuns404, JourneysListRuns422, JourneysListRuns500, JourneysListRuns504, JourneysListRunsPathParams, JourneysListRunsQuery, JourneysPause200, JourneysPause400, JourneysPause401, JourneysPause403, JourneysPause404, JourneysPause409, JourneysPause422, JourneysPause500, JourneysPause504, JourneysPausePathParams, JourneysPublish200, JourneysPublish400, JourneysPublish401, JourneysPublish402, JourneysPublish403, JourneysPublish404, JourneysPublish409, JourneysPublish422, JourneysPublish500, JourneysPublish502, JourneysPublish504, JourneysPublishPathParams, JourneysPublishRequestJson, JourneysRemove200, JourneysRemove400, JourneysRemove401, JourneysRemove403, JourneysRemove404, JourneysRemove409, JourneysRemove422, JourneysRemove500, JourneysRemove504, JourneysRemovePathParams, JourneysReplaceDraft200, JourneysReplaceDraft400, JourneysReplaceDraft401, JourneysReplaceDraft402, JourneysReplaceDraft403, JourneysReplaceDraft404, JourneysReplaceDraft409, JourneysReplaceDraft422, JourneysReplaceDraft500, JourneysReplaceDraft502, JourneysReplaceDraft504, JourneysReplaceDraftPathParams, JourneysReplaceDraftRequestJson, JourneysResume200, JourneysResume400, JourneysResume401, JourneysResume402, JourneysResume403, JourneysResume404, JourneysResume409, JourneysResume422, JourneysResume500, JourneysResume502, JourneysResume504, JourneysResumePathParams, JourneysStats200, JourneysStats400, JourneysStats401, JourneysStats403, JourneysStats404, JourneysStats422, JourneysStats500, JourneysStats504, JourneysStatsPathParams, JourneysStatsQuery, JourneysUpdate200, JourneysUpdate400, JourneysUpdate401, JourneysUpdate403, JourneysUpdate404, JourneysUpdate422, JourneysUpdate500, JourneysUpdate504, JourneysUpdatePathParams, JourneysUpdateRequestJson };
|
|
486
492
|
|
|
487
493
|
//# sourceMappingURL=journeys.js.map
|
|
@@ -447,6 +447,7 @@ export declare const MessageLogDetail: Schema.Struct<{
|
|
|
447
447
|
readonly parts: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
448
448
|
}>, Schema.Null]>>;
|
|
449
449
|
readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
450
|
+
readonly appHandlesFlowSubmission: Schema.optionalKey<Schema.Literal<true>>;
|
|
450
451
|
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
451
452
|
readonly template: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
452
453
|
readonly name: Schema.String;
|
|
@@ -479,6 +480,7 @@ export declare const MessageLogDetail: Schema.Struct<{
|
|
|
479
480
|
readonly coupon_code: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
480
481
|
readonly action: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
481
482
|
readonly flow_token: Schema.String;
|
|
483
|
+
readonly flow_action_data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
482
484
|
}>, Schema.Null]>>;
|
|
483
485
|
}>>;
|
|
484
486
|
}>>;
|
|
@@ -654,6 +656,7 @@ export declare const MessageLogDetail: Schema.Struct<{
|
|
|
654
656
|
}>>;
|
|
655
657
|
readonly flowResponse: Schema.optionalKey<Schema.Struct<{
|
|
656
658
|
readonly flowToken: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
659
|
+
readonly submissionHandler: Schema.optionalKey<Schema.Literal<"app">>;
|
|
657
660
|
readonly response: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>;
|
|
658
661
|
readonly body: Schema.optionalKey<Schema.String>;
|
|
659
662
|
}>>;
|
|
@@ -804,6 +807,7 @@ export declare const LogDetail: Schema.Union<readonly [Schema.Struct<{
|
|
|
804
807
|
readonly parts: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
805
808
|
}>, Schema.Null]>>;
|
|
806
809
|
readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
810
|
+
readonly appHandlesFlowSubmission: Schema.optionalKey<Schema.Literal<true>>;
|
|
807
811
|
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
808
812
|
readonly template: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
809
813
|
readonly name: Schema.String;
|
|
@@ -836,6 +840,7 @@ export declare const LogDetail: Schema.Union<readonly [Schema.Struct<{
|
|
|
836
840
|
readonly coupon_code: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
837
841
|
readonly action: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
838
842
|
readonly flow_token: Schema.String;
|
|
843
|
+
readonly flow_action_data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
839
844
|
}>, Schema.Null]>>;
|
|
840
845
|
}>>;
|
|
841
846
|
}>>;
|
|
@@ -1011,6 +1016,7 @@ export declare const LogDetail: Schema.Union<readonly [Schema.Struct<{
|
|
|
1011
1016
|
}>>;
|
|
1012
1017
|
readonly flowResponse: Schema.optionalKey<Schema.Struct<{
|
|
1013
1018
|
readonly flowToken: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1019
|
+
readonly submissionHandler: Schema.optionalKey<Schema.Literal<"app">>;
|
|
1014
1020
|
readonly response: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>;
|
|
1015
1021
|
readonly body: Schema.optionalKey<Schema.String>;
|
|
1016
1022
|
}>>;
|
|
@@ -1320,6 +1326,7 @@ export declare const LogsGet200: Schema.Union<readonly [Schema.Struct<{
|
|
|
1320
1326
|
readonly parts: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
1321
1327
|
}>, Schema.Null]>>;
|
|
1322
1328
|
readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1329
|
+
readonly appHandlesFlowSubmission: Schema.optionalKey<Schema.Literal<true>>;
|
|
1323
1330
|
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1324
1331
|
readonly template: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1325
1332
|
readonly name: Schema.String;
|
|
@@ -1352,6 +1359,7 @@ export declare const LogsGet200: Schema.Union<readonly [Schema.Struct<{
|
|
|
1352
1359
|
readonly coupon_code: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1353
1360
|
readonly action: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1354
1361
|
readonly flow_token: Schema.String;
|
|
1362
|
+
readonly flow_action_data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
1355
1363
|
}>, Schema.Null]>>;
|
|
1356
1364
|
}>>;
|
|
1357
1365
|
}>>;
|
|
@@ -1527,6 +1535,7 @@ export declare const LogsGet200: Schema.Union<readonly [Schema.Struct<{
|
|
|
1527
1535
|
}>>;
|
|
1528
1536
|
readonly flowResponse: Schema.optionalKey<Schema.Struct<{
|
|
1529
1537
|
readonly flowToken: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1538
|
+
readonly submissionHandler: Schema.optionalKey<Schema.Literal<"app">>;
|
|
1530
1539
|
readonly response: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>;
|
|
1531
1540
|
readonly body: Schema.optionalKey<Schema.String>;
|
|
1532
1541
|
}>>;
|
|
@@ -1748,6 +1757,7 @@ declare const LogsGroup_base: HttpApiGroup.HttpApiGroup<"Logs", HttpApiEndpoint.
|
|
|
1748
1757
|
readonly parts: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
1749
1758
|
}>, Schema.Null]>>;
|
|
1750
1759
|
readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1760
|
+
readonly appHandlesFlowSubmission: Schema.optionalKey<Schema.Literal<true>>;
|
|
1751
1761
|
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1752
1762
|
readonly template: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1753
1763
|
readonly name: Schema.String;
|
|
@@ -1780,6 +1790,7 @@ declare const LogsGroup_base: HttpApiGroup.HttpApiGroup<"Logs", HttpApiEndpoint.
|
|
|
1780
1790
|
readonly coupon_code: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1781
1791
|
readonly action: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1782
1792
|
readonly flow_token: Schema.String;
|
|
1793
|
+
readonly flow_action_data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>>;
|
|
1783
1794
|
}>, Schema.Null]>>;
|
|
1784
1795
|
}>>;
|
|
1785
1796
|
}>>;
|
|
@@ -1955,6 +1966,7 @@ declare const LogsGroup_base: HttpApiGroup.HttpApiGroup<"Logs", HttpApiEndpoint.
|
|
|
1955
1966
|
}>>;
|
|
1956
1967
|
readonly flowResponse: Schema.optionalKey<Schema.Struct<{
|
|
1957
1968
|
readonly flowToken: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1969
|
+
readonly submissionHandler: Schema.optionalKey<Schema.Literal<"app">>;
|
|
1958
1970
|
readonly response: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<import("./shared.js").JsonValue, import("./shared.js").JsonValue, never, never>>>;
|
|
1959
1971
|
readonly body: Schema.optionalKey<Schema.String>;
|
|
1960
1972
|
}>>;
|
|
@@ -827,6 +827,7 @@ export type MailboxChatMessage = {
|
|
|
827
827
|
readonly template: MailboxChatMessageTemplate | null;
|
|
828
828
|
readonly summary: string | null;
|
|
829
829
|
readonly contextMessageId: MessageId | null;
|
|
830
|
+
readonly flowSubmissionHandledBy?: "app";
|
|
830
831
|
};
|
|
831
832
|
export declare const MailboxChatMessage: Schema.Struct<{
|
|
832
833
|
readonly id: Schema.brand<Schema.String, "MessageId">;
|
|
@@ -867,6 +868,7 @@ export declare const MailboxChatMessage: Schema.Struct<{
|
|
|
867
868
|
}>, Schema.Null]>;
|
|
868
869
|
readonly summary: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
869
870
|
readonly contextMessageId: Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>;
|
|
871
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
870
872
|
}>;
|
|
871
873
|
export type MailboxThreadSummary = {
|
|
872
874
|
readonly id: MailboxThreadId;
|
|
@@ -1933,6 +1935,7 @@ export declare const MailboxMessage: Schema.Union<readonly [Schema.Struct<{
|
|
|
1933
1935
|
}>, Schema.Null]>;
|
|
1934
1936
|
readonly summary: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1935
1937
|
readonly contextMessageId: Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>;
|
|
1938
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
1936
1939
|
}>]>;
|
|
1937
1940
|
export type MailboxThreadPage = {
|
|
1938
1941
|
readonly items: ReadonlyArray<MailboxThreadSummary>;
|
|
@@ -2453,6 +2456,7 @@ export declare const MailboxThreadContentPage: Schema.Struct<{
|
|
|
2453
2456
|
}>, Schema.Null]>;
|
|
2454
2457
|
readonly summary: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2455
2458
|
readonly contextMessageId: Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>;
|
|
2459
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
2456
2460
|
}>]>>;
|
|
2457
2461
|
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2458
2462
|
}>;
|
|
@@ -8094,6 +8098,7 @@ export declare const MailboxesGetMessage200: Schema.Union<readonly [Schema.Struc
|
|
|
8094
8098
|
}>, Schema.Null]>;
|
|
8095
8099
|
readonly summary: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
8096
8100
|
readonly contextMessageId: Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>;
|
|
8101
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
8097
8102
|
}>]>;
|
|
8098
8103
|
export type MailboxesGetMessage400 = MalformedRequestError;
|
|
8099
8104
|
export declare const MailboxesGetMessage400: typeof MalformedRequestError;
|
|
@@ -10085,6 +10090,7 @@ export declare const MailboxesGetThreadContent200: Schema.Struct<{
|
|
|
10085
10090
|
}>, Schema.Null]>;
|
|
10086
10091
|
readonly summary: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
10087
10092
|
readonly contextMessageId: Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>;
|
|
10093
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
10088
10094
|
}>]>>;
|
|
10089
10095
|
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
10090
10096
|
}>;
|
|
@@ -16318,6 +16324,7 @@ declare const MailboxesGroup_base: HttpApiGroup.HttpApiGroup<"Mailboxes", HttpAp
|
|
|
16318
16324
|
}>, Schema.Null]>;
|
|
16319
16325
|
readonly summary: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
16320
16326
|
readonly contextMessageId: Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>;
|
|
16327
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
16321
16328
|
}>]>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
16322
16329
|
readonly _tag: "ForbiddenError";
|
|
16323
16330
|
readonly message: string;
|
|
@@ -17144,6 +17151,7 @@ declare const MailboxesGroup_base: HttpApiGroup.HttpApiGroup<"Mailboxes", HttpAp
|
|
|
17144
17151
|
}>, Schema.Null]>;
|
|
17145
17152
|
readonly summary: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
17146
17153
|
readonly contextMessageId: Schema.Union<readonly [Schema.brand<Schema.String, "MessageId">, Schema.Null]>;
|
|
17154
|
+
readonly flowSubmissionHandledBy: Schema.optionalKey<Schema.Literal<"app">>;
|
|
17147
17155
|
}>]>>;
|
|
17148
17156
|
readonly nextCursor: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
17149
17157
|
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
@@ -634,7 +634,8 @@ const MailboxChatMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
634
634
|
media: Schema.Array(MailboxChatMedia),
|
|
635
635
|
template: Schema.Union([MailboxChatMessageTemplate, Schema.Null]),
|
|
636
636
|
summary: Schema.Union([Schema.String, Schema.Null]),
|
|
637
|
-
contextMessageId: Schema.Union([MessageId, Schema.Null])
|
|
637
|
+
contextMessageId: Schema.Union([MessageId, Schema.Null]),
|
|
638
|
+
flowSubmissionHandledBy: Schema.optionalKey(Schema.Literal("app"))
|
|
638
639
|
}).annotate({ identifier: "MailboxChatMessage" }))();
|
|
639
640
|
const MailboxThreadSummary = /* @__PURE__ */ (() => Schema.Struct({
|
|
640
641
|
id: MailboxThreadId,
|
|
@@ -24,11 +24,13 @@ export type EstimatedProviderCost = {
|
|
|
24
24
|
readonly amount: string;
|
|
25
25
|
readonly currency: string;
|
|
26
26
|
readonly billingMode: "pass_through";
|
|
27
|
+
readonly category?: "marketing" | "utility" | "authentication" | "service";
|
|
27
28
|
};
|
|
28
29
|
export declare const EstimatedProviderCost: Schema.Struct<{
|
|
29
30
|
readonly amount: Schema.String;
|
|
30
31
|
readonly currency: Schema.String;
|
|
31
32
|
readonly billingMode: Schema.Literal<"pass_through">;
|
|
33
|
+
readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"service">]>>;
|
|
32
34
|
}>;
|
|
33
35
|
export type EmailAddress = {
|
|
34
36
|
readonly email: string;
|
|
@@ -161,6 +163,7 @@ export declare const MessageDeliveryObservation: Schema.Struct<{
|
|
|
161
163
|
readonly amount: Schema.String;
|
|
162
164
|
readonly currency: Schema.String;
|
|
163
165
|
readonly billingMode: Schema.Literal<"pass_through">;
|
|
166
|
+
readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"service">]>>;
|
|
164
167
|
}>, Schema.Null]>;
|
|
165
168
|
readonly createdAt: Schema.String;
|
|
166
169
|
readonly updatedAt: Schema.String;
|
|
@@ -270,6 +273,7 @@ export declare const MessageDeliveryList: Schema.Struct<{
|
|
|
270
273
|
readonly amount: Schema.String;
|
|
271
274
|
readonly currency: Schema.String;
|
|
272
275
|
readonly billingMode: Schema.Literal<"pass_through">;
|
|
276
|
+
readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"service">]>>;
|
|
273
277
|
}>, Schema.Null]>;
|
|
274
278
|
readonly createdAt: Schema.String;
|
|
275
279
|
readonly updatedAt: Schema.String;
|
|
@@ -539,10 +543,12 @@ export declare const MessagesSendRequestJson: Schema.Union<readonly [Schema.Stru
|
|
|
539
543
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
540
544
|
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
|
|
541
545
|
readonly flowToken: Schema.optionalKey<Schema.String>;
|
|
546
|
+
readonly flowActionData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
|
|
542
547
|
}>, Schema.Struct<{
|
|
543
548
|
readonly templateSlug: Schema.String;
|
|
544
549
|
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
|
|
545
550
|
readonly flowToken: Schema.optionalKey<Schema.String>;
|
|
551
|
+
readonly flowActionData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
|
|
546
552
|
}>, Schema.Struct<{
|
|
547
553
|
readonly media: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
548
554
|
readonly type: Schema.Literal<"image">;
|
|
@@ -897,6 +903,7 @@ export declare const MessagesGetContent200: Schema.Struct<{
|
|
|
897
903
|
readonly parts: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
898
904
|
}>, Schema.Null]>>;
|
|
899
905
|
readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
906
|
+
readonly appHandlesFlowSubmission: Schema.optionalKey<Schema.Literal<true>>;
|
|
900
907
|
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
901
908
|
readonly template: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
902
909
|
readonly name: Schema.String;
|
|
@@ -929,6 +936,7 @@ export declare const MessagesGetContent200: Schema.Struct<{
|
|
|
929
936
|
readonly coupon_code: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
930
937
|
readonly action: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
931
938
|
readonly flow_token: Schema.String;
|
|
939
|
+
readonly flow_action_data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
|
|
932
940
|
}>, Schema.Null]>>;
|
|
933
941
|
}>>;
|
|
934
942
|
}>>;
|
|
@@ -1104,6 +1112,7 @@ export declare const MessagesGetContent200: Schema.Struct<{
|
|
|
1104
1112
|
}>>;
|
|
1105
1113
|
readonly flowResponse: Schema.optionalKey<Schema.Struct<{
|
|
1106
1114
|
readonly flowToken: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1115
|
+
readonly submissionHandler: Schema.optionalKey<Schema.Literal<"app">>;
|
|
1107
1116
|
readonly response: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
|
|
1108
1117
|
readonly body: Schema.optionalKey<Schema.String>;
|
|
1109
1118
|
}>>;
|
|
@@ -1186,6 +1195,7 @@ export declare const MessagesListDeliveries200: Schema.Struct<{
|
|
|
1186
1195
|
readonly amount: Schema.String;
|
|
1187
1196
|
readonly currency: Schema.String;
|
|
1188
1197
|
readonly billingMode: Schema.Literal<"pass_through">;
|
|
1198
|
+
readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"service">]>>;
|
|
1189
1199
|
}>, Schema.Null]>;
|
|
1190
1200
|
readonly createdAt: Schema.String;
|
|
1191
1201
|
readonly updatedAt: Schema.String;
|
|
@@ -1775,6 +1785,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
1775
1785
|
readonly parts: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
1776
1786
|
}>, Schema.Null]>>;
|
|
1777
1787
|
readonly whatsapp: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1788
|
+
readonly appHandlesFlowSubmission: Schema.optionalKey<Schema.Literal<true>>;
|
|
1778
1789
|
readonly text: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1779
1790
|
readonly template: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1780
1791
|
readonly name: Schema.String;
|
|
@@ -1807,6 +1818,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
1807
1818
|
readonly coupon_code: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1808
1819
|
readonly action: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1809
1820
|
readonly flow_token: Schema.String;
|
|
1821
|
+
readonly flow_action_data: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
|
|
1810
1822
|
}>, Schema.Null]>>;
|
|
1811
1823
|
}>>;
|
|
1812
1824
|
}>>;
|
|
@@ -1982,6 +1994,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
1982
1994
|
}>>;
|
|
1983
1995
|
readonly flowResponse: Schema.optionalKey<Schema.Struct<{
|
|
1984
1996
|
readonly flowToken: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1997
|
+
readonly submissionHandler: Schema.optionalKey<Schema.Literal<"app">>;
|
|
1985
1998
|
readonly response: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
|
|
1986
1999
|
readonly body: Schema.optionalKey<Schema.String>;
|
|
1987
2000
|
}>>;
|
|
@@ -2676,6 +2689,7 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
2676
2689
|
readonly amount: Schema.String;
|
|
2677
2690
|
readonly currency: Schema.String;
|
|
2678
2691
|
readonly billingMode: Schema.Literal<"pass_through">;
|
|
2692
|
+
readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"marketing">, Schema.Literal<"utility">, Schema.Literal<"authentication">, Schema.Literal<"service">]>>;
|
|
2679
2693
|
}>, Schema.Null]>;
|
|
2680
2694
|
readonly createdAt: Schema.String;
|
|
2681
2695
|
readonly updatedAt: Schema.String;
|
|
@@ -3006,10 +3020,12 @@ declare const MessagesGroup_base: HttpApiGroup.HttpApiGroup<"Messages", HttpApiE
|
|
|
3006
3020
|
readonly templateId: Schema.brand<Schema.String, "TemplateId">;
|
|
3007
3021
|
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
|
|
3008
3022
|
readonly flowToken: Schema.optionalKey<Schema.String>;
|
|
3023
|
+
readonly flowActionData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
|
|
3009
3024
|
}>, Schema.Struct<{
|
|
3010
3025
|
readonly templateSlug: Schema.String;
|
|
3011
3026
|
readonly templateData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
|
|
3012
3027
|
readonly flowToken: Schema.optionalKey<Schema.String>;
|
|
3028
|
+
readonly flowActionData: Schema.optionalKey<Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>>;
|
|
3013
3029
|
}>, Schema.Struct<{
|
|
3014
3030
|
readonly media: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
3015
3031
|
readonly type: Schema.Literal<"image">;
|
|
@@ -14,7 +14,13 @@ const MessageDeliveryError = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
14
14
|
const EstimatedProviderCost = /* @__PURE__ */ (() => Schema.Struct({
|
|
15
15
|
amount: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\d+\\.\\d+$", "u")).annotate({ expected: "a string matching the RegExp ^\\d+\\.\\d+$" })),
|
|
16
16
|
currency: Schema.String,
|
|
17
|
-
billingMode: Schema.Literal("pass_through")
|
|
17
|
+
billingMode: Schema.Literal("pass_through"),
|
|
18
|
+
category: Schema.optionalKey(Schema.Union([
|
|
19
|
+
Schema.Literal("marketing"),
|
|
20
|
+
Schema.Literal("utility"),
|
|
21
|
+
Schema.Literal("authentication"),
|
|
22
|
+
Schema.Literal("service")
|
|
23
|
+
]))
|
|
18
24
|
}).annotate({ identifier: "EstimatedProviderCost" }))();
|
|
19
25
|
const EmailAddress = /* @__PURE__ */ (() => Schema.Struct({
|
|
20
26
|
email: Schema.String,
|