samva 0.34.0 → 0.36.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 +17 -0
- package/README.md +2 -1
- package/dist/client/sdk.gen.d.ts +325 -331
- package/dist/client/sdk.gen.js +406 -454
- package/dist/client/types.gen.d.ts +3465 -750
- package/dist/effect/agents.d.ts +222 -17
- package/dist/effect/agents.js +7 -1
- package/dist/effect/analytics.d.ts +21 -15
- package/dist/effect/api-keys.d.ts +30 -24
- package/dist/effect/campaigns.d.ts +695 -39
- package/dist/effect/categories.d.ts +3 -3
- package/dist/effect/contact-groups.d.ts +15 -15
- package/dist/effect/contacts.d.ts +56 -52
- package/dist/effect/conversations.d.ts +51 -45
- package/dist/effect/email.d.ts +82 -82
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +64 -12
- package/dist/effect/extensions.d.ts +16 -16
- package/dist/effect/generated/agents.d.ts +2902 -150
- package/dist/effect/generated/agents.js +219 -31
- package/dist/effect/generated/analytics.d.ts +127 -136
- package/dist/effect/generated/analytics.js +72 -37
- package/dist/effect/generated/api-keys.d.ts +243 -47
- package/dist/effect/generated/api-keys.js +27 -12
- package/dist/effect/generated/attachments.d.ts +89 -1
- package/dist/effect/generated/attachments.js +10 -2
- package/dist/effect/generated/brands.d.ts +133 -1
- package/dist/effect/generated/brands.js +22 -10
- package/dist/effect/generated/campaigns.d.ts +1467 -143
- package/dist/effect/generated/campaigns.js +84 -20
- package/dist/effect/generated/contact-events.d.ts +26 -4
- package/dist/effect/generated/contact-events.js +5 -3
- package/dist/effect/generated/contact-groups.d.ts +233 -13
- package/dist/effect/generated/contact-groups.js +33 -17
- package/dist/effect/generated/contacts.d.ts +634 -96
- package/dist/effect/generated/contacts.js +82 -20
- package/dist/effect/generated/conversations.d.ts +501 -108
- package/dist/effect/generated/conversations.js +106 -22
- package/dist/effect/generated/custom-fields.d.ts +89 -1
- package/dist/effect/generated/custom-fields.js +11 -3
- package/dist/effect/generated/email.d.ts +1447 -83
- package/dist/effect/generated/email.js +167 -43
- package/dist/effect/generated/events.d.ts +51 -7
- package/dist/effect/generated/events.js +9 -5
- package/dist/effect/generated/extension-installations.d.ts +1052 -77
- package/dist/effect/generated/extension-installations.js +45 -31
- package/dist/effect/generated/extensions.d.ts +123 -13
- package/dist/effect/generated/extensions.js +20 -10
- package/dist/effect/generated/feedback.d.ts +23 -1
- package/dist/effect/generated/feedback.js +6 -4
- package/dist/effect/generated/index.d.ts +3 -1
- package/dist/effect/generated/journeys.d.ts +684 -16
- package/dist/effect/generated/journeys.js +37 -9
- package/dist/effect/generated/mailboxes.d.ts +6169 -1734
- package/dist/effect/generated/mailboxes.js +549 -344
- package/dist/effect/generated/media.d.ts +125 -15
- package/dist/effect/generated/media.js +15 -2
- package/dist/effect/generated/messages.d.ts +2036 -117
- package/dist/effect/generated/messages.js +286 -54
- package/dist/effect/generated/namespaces.d.ts +215 -55
- package/dist/effect/generated/namespaces.js +30 -12
- package/dist/effect/generated/newsletter-domains.d.ts +98 -12
- package/dist/effect/generated/newsletter-domains.js +20 -13
- package/dist/effect/generated/newsletter-issues.d.ts +354 -19
- package/dist/effect/generated/newsletter-issues.js +162 -98
- package/dist/effect/generated/newsletters.d.ts +123 -13
- package/dist/effect/generated/newsletters.js +19 -9
- package/dist/effect/generated/operations.d.ts +76 -10
- package/dist/effect/generated/operations.js +12 -6
- package/dist/effect/generated/organizations.d.ts +287 -7
- package/dist/effect/generated/organizations.js +33 -5
- package/dist/effect/generated/policies.d.ts +953 -0
- package/dist/effect/generated/policies.js +116 -0
- package/dist/effect/generated/scheduled-messages.d.ts +4418 -49
- package/dist/effect/generated/scheduled-messages.js +77 -13
- package/dist/effect/generated/shared.d.ts +3213 -521
- package/dist/effect/generated/shared.js +713 -128
- package/dist/effect/generated/subscriptions.d.ts +23 -1
- package/dist/effect/generated/subscriptions.js +6 -4
- package/dist/effect/generated/templates.d.ts +2081 -693
- package/dist/effect/generated/templates.js +482 -267
- package/dist/effect/generated/topic-forms.d.ts +111 -1
- package/dist/effect/generated/topic-forms.js +23 -13
- package/dist/effect/generated/topics.d.ts +353 -43
- package/dist/effect/generated/topics.js +67 -19
- package/dist/effect/generated/webhooks.d.ts +318 -57
- package/dist/effect/generated/webhooks.js +68 -17
- package/dist/effect/generated/whoami.d.ts +35 -5
- package/dist/effect/generated/whoami.js +4 -2
- package/dist/effect/generated-metadata.d.ts +56 -32
- package/dist/effect/generated-metadata.js +137 -105
- package/dist/effect/index.d.ts +1 -0
- package/dist/effect/index.js +3 -2
- package/dist/effect/internal/client.js +1 -1
- package/dist/effect/internal/email-sender.d.ts +1 -1
- package/dist/effect/internal/operation.js +5 -32
- package/dist/effect/internal/send.d.ts +1 -1
- package/dist/effect/journeys.d.ts +169 -83
- package/dist/effect/mailboxes.d.ts +978 -301
- package/dist/effect/mailboxes.js +1 -11
- package/dist/effect/media.d.ts +1 -1
- package/dist/effect/messages.d.ts +40 -40
- package/dist/effect/namespaces.d.ts +15 -15
- package/dist/effect/newsletter-domains.d.ts +5 -5
- package/dist/effect/newsletters.d.ts +1 -1
- package/dist/effect/operations.d.ts +11 -11
- package/dist/effect/organizations.d.ts +2 -2
- package/dist/effect/policies.d.ts +65 -0
- package/dist/effect/policies.js +16 -0
- package/dist/effect/scheduled-messages.d.ts +869 -8
- package/dist/effect/templates.d.ts +43 -45
- package/dist/effect/templates.js +5 -3
- package/dist/effect/topics.d.ts +23 -23
- package/dist/effect/webhooks.d.ts +29 -26
- package/dist/index.js +2 -2
- package/dist/mailbox/test.js +11 -4
- package/dist/mailbox/types.d.ts +39 -3
- package/dist/normalize.js +13 -1
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +4 -2
- package/dist/promises/client.js +5 -3
- package/dist/promises/errors.gen.d.ts +38 -2
- package/dist/promises/errors.gen.js +394 -34
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +39 -28
- package/dist/service-map.js +220 -782
- package/package.json +13 -8
|
@@ -3,11 +3,18 @@ import { HttpApiMiddleware, HttpApiSecurity } from "effect/http-api";
|
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
// src/effect/generated/shared.ts
|
|
5
5
|
const JsonValue = Schema.suspend(() => __recursive_JsonValue);
|
|
6
|
-
const
|
|
7
|
-
const NamespaceId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
6
|
+
const NamespaceId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^ns_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
8
7
|
expected: "a string matching the RegExp ^ns_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
9
8
|
identifier: "NamespaceId"
|
|
10
9
|
})).pipe(Schema.brand("NamespaceId")))();
|
|
10
|
+
const AgentId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^agt_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
11
|
+
expected: "a string matching the RegExp ^agt_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
12
|
+
identifier: "AgentId"
|
|
13
|
+
})).pipe(Schema.brand("AgentId")))();
|
|
14
|
+
var MalformedRequestError = class extends Schema.TaggedError()("MalformedRequestError", Schema.Struct({
|
|
15
|
+
message: Schema.String,
|
|
16
|
+
fields: Schema.Record(Schema.String, Schema.Array(Schema.String))
|
|
17
|
+
})) {};
|
|
11
18
|
var UnauthorizedError = class extends Schema.TaggedError()("UnauthorizedError", Schema.Struct({ message: Schema.String })) {};
|
|
12
19
|
var ForbiddenError = class extends Schema.TaggedError()("ForbiddenError", Schema.Struct({ message: Schema.String })) {};
|
|
13
20
|
var ValidationError = class extends Schema.TaggedError()("ValidationError", Schema.Struct({
|
|
@@ -19,15 +26,19 @@ var GatewayTimeoutError = class extends Schema.TaggedError()("GatewayTimeoutErro
|
|
|
19
26
|
message: Schema.String,
|
|
20
27
|
retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
21
28
|
})) {};
|
|
22
|
-
const AgentName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isPattern(
|
|
29
|
+
const AgentName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
|
|
23
30
|
expected: "a string matching the RegExp ^\\S[\\s\\S]*\\S$|^\\S$|^$",
|
|
24
31
|
identifier: "AgentName"
|
|
25
32
|
})).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })))();
|
|
26
|
-
const
|
|
33
|
+
const KnowledgeSourceId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^ksrc_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
34
|
+
expected: "a string matching the RegExp ^ksrc_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
35
|
+
identifier: "KnowledgeSourceId"
|
|
36
|
+
})).pipe(Schema.brand("KnowledgeSourceId")))();
|
|
37
|
+
const MailboxEndpointId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
27
38
|
expected: "a string matching the RegExp ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
28
39
|
identifier: "MailboxEndpointId"
|
|
29
40
|
})).pipe(Schema.brand("MailboxEndpointId")))();
|
|
30
|
-
const IntegrationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
41
|
+
const IntegrationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^intg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
31
42
|
expected: "a string matching the RegExp ^intg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
32
43
|
identifier: "IntegrationId"
|
|
33
44
|
})).pipe(Schema.brand("IntegrationId")))();
|
|
@@ -36,11 +47,43 @@ const AgentToolScope = /* @__PURE__ */ (() => Schema.Union([
|
|
|
36
47
|
Schema.Struct({ kind: Schema.Literal("readOnly") }),
|
|
37
48
|
Schema.Struct({
|
|
38
49
|
kind: Schema.Literal("selected"),
|
|
39
|
-
names: Schema.Array(Schema.String.check(Schema.isPattern(
|
|
50
|
+
names: Schema.Array(Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-z][a-z0-9_.]{0,63}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z][a-z0-9_.]{0,63}$" }))).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
|
|
40
51
|
})
|
|
41
52
|
]).annotate({ identifier: "AgentToolScope" }))();
|
|
42
|
-
const
|
|
53
|
+
const PolicyEffect = /* @__PURE__ */ (() => Schema.Union([
|
|
54
|
+
Schema.Literal("read"),
|
|
55
|
+
Schema.Literal("write"),
|
|
56
|
+
Schema.Literal("final")
|
|
57
|
+
]).annotate({ identifier: "PolicyEffect" }))();
|
|
58
|
+
const ApiKeyId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^key_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
59
|
+
expected: "a string matching the RegExp ^key_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
60
|
+
identifier: "ApiKeyId"
|
|
61
|
+
})).pipe(Schema.brand("ApiKeyId")))();
|
|
62
|
+
const UserId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
63
|
+
expected: "a string matching the RegExp ^user_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
64
|
+
identifier: "UserId"
|
|
65
|
+
})).pipe(Schema.brand("UserId")))();
|
|
66
|
+
const ExtensionInstallationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^exti_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
67
|
+
expected: "a string matching the RegExp ^exti_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
68
|
+
identifier: "ExtensionInstallationId"
|
|
69
|
+
})).pipe(Schema.brand("ExtensionInstallationId")))();
|
|
70
|
+
const PolicyRequirement = /* @__PURE__ */ (() => Schema.Union([
|
|
71
|
+
Schema.Literal("run"),
|
|
72
|
+
Schema.Literal("model"),
|
|
73
|
+
Schema.Literal("person"),
|
|
74
|
+
Schema.Literal("never")
|
|
75
|
+
]).annotate({ identifier: "PolicyRequirement" }))();
|
|
43
76
|
const AgentModel = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("standard"), Schema.Literal("max")]).annotate({ identifier: "AgentModel" }))();
|
|
77
|
+
const CatalogModelId = /* @__PURE__ */ (() => Schema.String.check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9][a-z0-9._-]*\\/[A-Za-z0-9._:~-]+$", "u")).annotate({
|
|
78
|
+
expected: "a string matching the RegExp ^[a-z0-9][a-z0-9._-]*\\/[A-Za-z0-9._:~-]+$",
|
|
79
|
+
identifier: "CatalogModelId"
|
|
80
|
+
})).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })))();
|
|
81
|
+
const AgentReasoning = /* @__PURE__ */ (() => Schema.Union([
|
|
82
|
+
Schema.Literal("auto"),
|
|
83
|
+
Schema.Literal("low"),
|
|
84
|
+
Schema.Literal("medium"),
|
|
85
|
+
Schema.Literal("high")
|
|
86
|
+
]).annotate({ identifier: "AgentReasoning" }))();
|
|
44
87
|
const TimeZone = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "TimeZone" }))();
|
|
45
88
|
const Weekday = /* @__PURE__ */ (() => Schema.Union([
|
|
46
89
|
Schema.Literal("monday"),
|
|
@@ -51,27 +94,39 @@ const Weekday = /* @__PURE__ */ (() => Schema.Union([
|
|
|
51
94
|
Schema.Literal("saturday"),
|
|
52
95
|
Schema.Literal("sunday")
|
|
53
96
|
]).annotate({ identifier: "Weekday" }))();
|
|
54
|
-
const ClockTime = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
97
|
+
const ClockTime = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?:[01]\\d|2[0-3]):[0-5]\\d$", "u")).annotate({
|
|
55
98
|
expected: "a string matching the RegExp ^(?:[01]\\d|2[0-3]):[0-5]\\d$",
|
|
56
99
|
identifier: "ClockTime"
|
|
57
100
|
})))();
|
|
101
|
+
var PaymentRequiredError = class extends Schema.TaggedError()("PaymentRequiredError", Schema.Struct({
|
|
102
|
+
message: Schema.String,
|
|
103
|
+
resource: Schema.String,
|
|
104
|
+
currentUsage: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
105
|
+
limit: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
106
|
+
})) {};
|
|
58
107
|
var ResourceNotFoundError = class extends Schema.TaggedError()("ResourceNotFoundError", Schema.Struct({
|
|
59
108
|
resource: Schema.String,
|
|
60
109
|
id: Schema.String,
|
|
61
110
|
message: Schema.String
|
|
62
111
|
})) {};
|
|
112
|
+
const MonthlySpendCapDollars = /* @__PURE__ */ (() => Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(.01).annotate({ expected: "a value greater than or equal to 0.01" })).check(Schema.isLessThanOrEqualTo(1e5).annotate({
|
|
113
|
+
expected: "a value less than or equal to 100000",
|
|
114
|
+
identifier: "MonthlySpendCapDollars"
|
|
115
|
+
})))();
|
|
63
116
|
var ConflictError = class extends Schema.TaggedError()("ConflictError", Schema.Struct({
|
|
64
117
|
message: Schema.String,
|
|
65
118
|
resource: Schema.String,
|
|
66
119
|
id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
67
120
|
})) {};
|
|
68
|
-
const VersionCursor = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "VersionCursor" }))();
|
|
69
121
|
var AnalyticsQueryError = class extends Schema.TaggedError()("AnalyticsQueryError", Schema.Struct({ message: Schema.String })) {};
|
|
70
122
|
const ApiKeyResourceAccess = /* @__PURE__ */ (() => Schema.Struct({
|
|
71
123
|
messages: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
72
124
|
email: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
125
|
+
sms: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
126
|
+
whatsapp: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
73
127
|
domains: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
74
128
|
phoneNumbers: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
129
|
+
whatsappAccounts: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
75
130
|
contacts: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
76
131
|
conversations: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
77
132
|
templates: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
@@ -82,46 +137,32 @@ const ApiKeyResourceAccess = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
82
137
|
billing: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null])),
|
|
83
138
|
analytics: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("read"), Schema.Literal("write")]), Schema.Null]))
|
|
84
139
|
}).annotate({ identifier: "ApiKeyResourceAccess" }))();
|
|
85
|
-
const MailboxId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
140
|
+
const MailboxId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^mbx_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
86
141
|
expected: "a string matching the RegExp ^mbx_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
87
142
|
identifier: "MailboxId"
|
|
88
143
|
})).pipe(Schema.brand("MailboxId")))();
|
|
89
|
-
const MailboxSendMode = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("send"), Schema.Literal("approval")]).annotate({
|
|
90
|
-
description: "How the grantee's sends execute: `send` runs them within account limits; `approval` holds each one until a different member approves it.",
|
|
91
|
-
identifier: "MailboxSendMode"
|
|
92
|
-
}))();
|
|
93
|
-
var PaymentRequiredError = class extends Schema.TaggedError()("PaymentRequiredError", Schema.Struct({
|
|
94
|
-
message: Schema.String,
|
|
95
|
-
resource: Schema.String,
|
|
96
|
-
currentUsage: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
97
|
-
limit: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
98
|
-
})) {};
|
|
99
144
|
var RateLimitedError = class extends Schema.TaggedError()("RateLimitedError", Schema.Struct({
|
|
100
145
|
message: Schema.String,
|
|
101
146
|
retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
102
147
|
})) {};
|
|
103
148
|
var BillingProviderError = class extends Schema.TaggedError()("BillingProviderError", Schema.Struct({ message: Schema.String })) {};
|
|
104
|
-
const ApiKeyId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^key_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
105
|
-
expected: "a string matching the RegExp ^key_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
106
|
-
identifier: "ApiKeyId"
|
|
107
|
-
})).pipe(Schema.brand("ApiKeyId")))();
|
|
108
149
|
const SuccessResponse = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Boolean }).annotate({ identifier: "SuccessResponse" }))();
|
|
109
|
-
const MessageId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
150
|
+
const MessageId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^msg_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
110
151
|
expected: "a string matching the RegExp ^msg_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
111
152
|
identifier: "MessageId"
|
|
112
153
|
})).pipe(Schema.brand("MessageId")))();
|
|
113
|
-
const AttachmentId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
154
|
+
const AttachmentId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^att_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
114
155
|
expected: "a string matching the RegExp ^att_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
115
156
|
identifier: "AttachmentId"
|
|
116
157
|
})).pipe(Schema.brand("AttachmentId")))();
|
|
117
|
-
const OrganizationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
158
|
+
const OrganizationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^org_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
118
159
|
expected: "a string matching the RegExp ^org_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
119
160
|
identifier: "OrganizationId"
|
|
120
161
|
})).pipe(Schema.brand("OrganizationId")))();
|
|
121
162
|
const BrandAssets = /* @__PURE__ */ (() => Schema.Struct({
|
|
122
|
-
logoUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(
|
|
123
|
-
logoDarkUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(
|
|
124
|
-
iconUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(
|
|
163
|
+
logoUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
|
|
164
|
+
logoDarkUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
|
|
165
|
+
iconUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null]))
|
|
125
166
|
}).annotate({ identifier: "BrandAssets" }))();
|
|
126
167
|
const BrandAddress = /* @__PURE__ */ (() => Schema.Struct({
|
|
127
168
|
street1: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
@@ -133,25 +174,25 @@ const BrandAddress = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
133
174
|
}).annotate({ identifier: "BrandAddress" }))();
|
|
134
175
|
const BrandSocialLink = /* @__PURE__ */ (() => Schema.Struct({
|
|
135
176
|
label: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })),
|
|
136
|
-
url: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(
|
|
177
|
+
url: Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" }))
|
|
137
178
|
}).annotate({ identifier: "BrandSocialLink" }))();
|
|
138
|
-
const CampaignId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
179
|
+
const CampaignId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^camp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
139
180
|
expected: "a string matching the RegExp ^camp_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
140
181
|
identifier: "CampaignId"
|
|
141
182
|
})).pipe(Schema.brand("CampaignId")))();
|
|
142
|
-
const MediaId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
183
|
+
const MediaId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^media_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
143
184
|
expected: "a string matching the RegExp ^media_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
144
185
|
identifier: "MediaId"
|
|
145
186
|
})).pipe(Schema.brand("MediaId")))();
|
|
146
|
-
const TemplatePublicationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
187
|
+
const TemplatePublicationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tpub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
147
188
|
expected: "a string matching the RegExp ^tpub_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
148
189
|
identifier: "TemplatePublicationId"
|
|
149
190
|
})).pipe(Schema.brand("TemplatePublicationId")))();
|
|
150
|
-
const TemplateInputContractId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
191
|
+
const TemplateInputContractId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tcon_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
151
192
|
expected: "a string matching the RegExp ^tcon_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
152
193
|
identifier: "TemplateInputContractId"
|
|
153
194
|
})).pipe(Schema.brand("TemplateInputContractId")))();
|
|
154
|
-
const TemplateId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
195
|
+
const TemplateId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
155
196
|
expected: "a string matching the RegExp ^tmpl_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
156
197
|
identifier: "TemplateId"
|
|
157
198
|
})).pipe(Schema.brand("TemplateId")))();
|
|
@@ -165,7 +206,7 @@ const RenderTimeZone = /* @__PURE__ */ (() => Schema.String.check(Schema.isMaxCo
|
|
|
165
206
|
identifier: "RenderTimeZone"
|
|
166
207
|
})).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })))();
|
|
167
208
|
const ReplyToAddresses = /* @__PURE__ */ (() => Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({ identifier: "ReplyToAddresses" }))();
|
|
168
|
-
const TopicId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
209
|
+
const TopicId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^unsub_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
169
210
|
expected: "a string matching the RegExp ^unsub_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
170
211
|
identifier: "TopicId"
|
|
171
212
|
})).pipe(Schema.brand("TopicId")))();
|
|
@@ -181,20 +222,38 @@ const EmailCustomHeaders = /* @__PURE__ */ (() => Schema.Record(Schema.String, S
|
|
|
181
222
|
expected: "a value with at most 11 entries",
|
|
182
223
|
identifier: "EmailCustomHeaders"
|
|
183
224
|
})))();
|
|
184
|
-
const ConversationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
225
|
+
const ConversationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^conv_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
185
226
|
expected: "a string matching the RegExp ^conv_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
186
227
|
identifier: "ConversationId"
|
|
187
228
|
})).pipe(Schema.brand("ConversationId")))();
|
|
188
229
|
const CampaignContentMetadata = /* @__PURE__ */ (() => Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null]).annotate({ identifier: "CampaignContentMetadata" }))();
|
|
189
|
-
const
|
|
230
|
+
const WhatsAppTemplateDispatchData = /* @__PURE__ */ (() => Schema.Record(Schema.String, JsonValue).annotate({ identifier: "WhatsAppTemplateDispatchData" }))();
|
|
231
|
+
const WhatsAppTemplateContactBinding = /* @__PURE__ */ (() => Schema.Struct({ contact: Schema.Union([
|
|
232
|
+
Schema.Literal("id"),
|
|
233
|
+
Schema.Literal("name"),
|
|
234
|
+
Schema.Literal("displayName"),
|
|
235
|
+
Schema.Literal("externalId"),
|
|
236
|
+
Schema.Literal("phone"),
|
|
237
|
+
Schema.Literal("email"),
|
|
238
|
+
Schema.Literal("firstName"),
|
|
239
|
+
Schema.Literal("lastName"),
|
|
240
|
+
Schema.Literal("company"),
|
|
241
|
+
Schema.Literal("jobTitle")
|
|
242
|
+
]) }).annotate({ identifier: "WhatsAppTemplateContactBinding" }))();
|
|
243
|
+
const WhatsAppTemplateCustomFieldBinding = /* @__PURE__ */ (() => Schema.Struct({ customField: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })) }).annotate({ identifier: "WhatsAppTemplateCustomFieldBinding" }))();
|
|
244
|
+
const WhatsAppBusinessAccountId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^waba_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
245
|
+
expected: "a string matching the RegExp ^waba_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
246
|
+
identifier: "WhatsAppBusinessAccountId"
|
|
247
|
+
})).pipe(Schema.brand("WhatsAppBusinessAccountId")))();
|
|
248
|
+
const ContactId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^contact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
190
249
|
expected: "a string matching the RegExp ^contact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
191
250
|
identifier: "ContactId"
|
|
192
251
|
})).pipe(Schema.brand("ContactId")))();
|
|
193
|
-
const ContactGroupId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
252
|
+
const ContactGroupId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
194
253
|
expected: "a string matching the RegExp ^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
195
254
|
identifier: "ContactGroupId"
|
|
196
255
|
})).pipe(Schema.brand("ContactGroupId")))();
|
|
197
|
-
const CampaignRunId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
256
|
+
const CampaignRunId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^crun_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
198
257
|
expected: "a string matching the RegExp ^crun_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
199
258
|
identifier: "CampaignRunId"
|
|
200
259
|
})).pipe(Schema.brand("CampaignRunId")))();
|
|
@@ -210,7 +269,7 @@ var FlagDisabledError = class extends Schema.TaggedError()("FlagDisabledError",
|
|
|
210
269
|
flag: Schema.String,
|
|
211
270
|
message: Schema.String
|
|
212
271
|
})) {};
|
|
213
|
-
const EmailDomainId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
272
|
+
const EmailDomainId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^dom_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
214
273
|
expected: "a string matching the RegExp ^dom_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
215
274
|
identifier: "EmailDomainId"
|
|
216
275
|
})).pipe(Schema.brand("EmailDomainId")))();
|
|
@@ -305,11 +364,11 @@ var DeliveryUnavailableError = class extends Schema.TaggedError()("DeliveryUnava
|
|
|
305
364
|
message: Schema.String,
|
|
306
365
|
retryAfterSeconds: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
307
366
|
})) {};
|
|
308
|
-
const ContactIdentityId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
367
|
+
const ContactIdentityId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^cident_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
309
368
|
expected: "a string matching the RegExp ^cident_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
310
369
|
identifier: "ContactIdentityId"
|
|
311
370
|
})).pipe(Schema.brand("ContactIdentityId")))();
|
|
312
|
-
const WebhookEndpointId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
371
|
+
const WebhookEndpointId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^wep_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
313
372
|
expected: "a string matching the RegExp ^wep_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
314
373
|
identifier: "WebhookEndpointId"
|
|
315
374
|
})).pipe(Schema.brand("WebhookEndpointId")))();
|
|
@@ -323,38 +382,34 @@ var EmailChannelError = class extends Schema.TaggedError()("EmailChannelError",
|
|
|
323
382
|
message: Schema.String,
|
|
324
383
|
statusCode: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })), Schema.Null]))
|
|
325
384
|
})) {};
|
|
326
|
-
const OperationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
385
|
+
const OperationId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^op_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
327
386
|
expected: "a string matching the RegExp ^op_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
328
387
|
identifier: "OperationId"
|
|
329
388
|
})).pipe(Schema.brand("OperationId")))();
|
|
330
|
-
const EmailSenderId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
389
|
+
const EmailSenderId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^sender_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
331
390
|
expected: "a string matching the RegExp ^sender_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
332
391
|
identifier: "EmailSenderId"
|
|
333
392
|
})).pipe(Schema.brand("EmailSenderId")))();
|
|
334
|
-
const ExtensionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
393
|
+
const ExtensionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^ext_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
335
394
|
expected: "a string matching the RegExp ^ext_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
336
395
|
identifier: "ExtensionId"
|
|
337
396
|
})).pipe(Schema.brand("ExtensionId")))();
|
|
338
|
-
const ExtensionVersionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
397
|
+
const ExtensionVersionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^extver_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
339
398
|
expected: "a string matching the RegExp ^extver_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
340
399
|
identifier: "ExtensionVersionId"
|
|
341
400
|
})).pipe(Schema.brand("ExtensionVersionId")))();
|
|
342
|
-
const UserId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^user_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
343
|
-
expected: "a string matching the RegExp ^user_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
344
|
-
identifier: "UserId"
|
|
345
|
-
})).pipe(Schema.brand("UserId")))();
|
|
346
401
|
const FeedbackContext = /* @__PURE__ */ (() => Schema.Struct({
|
|
347
402
|
operation: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "The operation the report is about, as an SDK method, MCP tool, CLI command, or `METHOD /path` (for example `POST /v1/messages`)." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null])),
|
|
348
403
|
resourceId: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "The id of the resource involved, such as a message or domain id." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null]))
|
|
349
404
|
}).annotate({ identifier: "FeedbackContext" }))();
|
|
350
|
-
const JourneyName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isPattern(
|
|
405
|
+
const JourneyName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\S[\\s\\S]*\\S$|^\\S$|^$", "u")).annotate({
|
|
351
406
|
expected: "a string matching the RegExp ^\\S[\\s\\S]*\\S$|^\\S$|^$",
|
|
352
407
|
identifier: "JourneyName"
|
|
353
408
|
})).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })))();
|
|
354
409
|
const JourneyCustomEventName = /* @__PURE__ */ (() => Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({
|
|
355
410
|
expected: "a string with at most 255 code points",
|
|
356
411
|
identifier: "JourneyCustomEventName"
|
|
357
|
-
})).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(
|
|
412
|
+
})).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$")).annotate({ expected: "a string matching the RegExp ^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$" })))();
|
|
358
413
|
const JourneyContactCreatedTrigger = /* @__PURE__ */ (() => Schema.Struct({ type: Schema.Literal("contact.created") }).annotate({ identifier: "JourneyContactCreatedTrigger" }))();
|
|
359
414
|
const JourneyTagAddedTrigger = /* @__PURE__ */ (() => Schema.Struct({
|
|
360
415
|
type: Schema.Literal("contact.tag_added"),
|
|
@@ -418,7 +473,11 @@ const JourneyUpdateTagsConfig = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
418
473
|
add: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))),
|
|
419
474
|
remove: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })))
|
|
420
475
|
}).annotate({ identifier: "JourneyUpdateTagsConfig" }))();
|
|
421
|
-
const MailboxChannel = /* @__PURE__ */ (() => Schema.
|
|
476
|
+
const MailboxChannel = /* @__PURE__ */ (() => Schema.Union([
|
|
477
|
+
Schema.Literal("sms"),
|
|
478
|
+
Schema.Literal("whatsapp"),
|
|
479
|
+
Schema.Literal("email")
|
|
480
|
+
]).annotate({
|
|
422
481
|
description: "The channel an endpoint, thread, or message belongs to.",
|
|
423
482
|
identifier: "MailboxChannel"
|
|
424
483
|
}))();
|
|
@@ -430,22 +489,32 @@ const MailboxMetadataPatch = /* @__PURE__ */ (() => Schema.Record(Schema.String,
|
|
|
430
489
|
expected: "an object with property names matching the schema",
|
|
431
490
|
identifier: "MailboxMetadataPatch"
|
|
432
491
|
})))();
|
|
433
|
-
const MailboxThreadId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
492
|
+
const MailboxThreadId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^thread_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
434
493
|
expected: "a string matching the RegExp ^thread_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
435
494
|
identifier: "MailboxThreadId"
|
|
436
495
|
})).pipe(Schema.brand("MailboxThreadId")))();
|
|
437
|
-
const MailboxActionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
496
|
+
const MailboxActionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
438
497
|
expected: "a string matching the RegExp ^mbxact_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
439
498
|
identifier: "MailboxActionId"
|
|
440
499
|
})).pipe(Schema.brand("MailboxActionId")))();
|
|
441
|
-
const MailboxDraftId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
500
|
+
const MailboxDraftId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
442
501
|
expected: "a string matching the RegExp ^mdraft_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
443
502
|
identifier: "MailboxDraftId"
|
|
444
503
|
})).pipe(Schema.brand("MailboxDraftId")))();
|
|
445
|
-
const
|
|
446
|
-
expected: "a string matching the RegExp ^
|
|
447
|
-
identifier: "
|
|
448
|
-
})).pipe(Schema.brand("
|
|
504
|
+
const PolicyDecisionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^pdec_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
505
|
+
expected: "a string matching the RegExp ^pdec_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
506
|
+
identifier: "PolicyDecisionId"
|
|
507
|
+
})).pipe(Schema.brand("PolicyDecisionId")))();
|
|
508
|
+
const PolicyReviewRound = /* @__PURE__ */ (() => Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })).check(Schema.isGreaterThan(0).annotate({
|
|
509
|
+
expected: "a value greater than 0",
|
|
510
|
+
identifier: "PolicyReviewRound"
|
|
511
|
+
})))();
|
|
512
|
+
const PolicyDecider = /* @__PURE__ */ (() => Schema.Union([
|
|
513
|
+
Schema.Literal("rule"),
|
|
514
|
+
Schema.Literal("model"),
|
|
515
|
+
Schema.Literal("person"),
|
|
516
|
+
Schema.Literal("agent")
|
|
517
|
+
]).annotate({ identifier: "PolicyDecider" }))();
|
|
449
518
|
const MailboxSendError = /* @__PURE__ */ (() => Schema.Union([
|
|
450
519
|
Schema.TaggedStruct("SenderNotReadyError", {
|
|
451
520
|
message: Schema.String,
|
|
@@ -505,6 +574,10 @@ const MailboxSendError = /* @__PURE__ */ (() => Schema.Union([
|
|
|
505
574
|
message: Schema.String
|
|
506
575
|
})
|
|
507
576
|
]).annotate({ identifier: "MailboxSendError" }))();
|
|
577
|
+
var WhatsAppServiceWindowClosedError = class extends Schema.TaggedError()("WhatsAppServiceWindowClosedError", Schema.Struct({
|
|
578
|
+
message: Schema.String,
|
|
579
|
+
closedAt: Schema.Union([Schema.String, Schema.Null])
|
|
580
|
+
})) {};
|
|
508
581
|
const MailboxThreadFolder = /* @__PURE__ */ (() => Schema.Union([
|
|
509
582
|
Schema.Literal("inbox"),
|
|
510
583
|
Schema.Literal("assigned"),
|
|
@@ -518,11 +591,10 @@ const MailboxGrantRole = /* @__PURE__ */ (() => Schema.Union([
|
|
|
518
591
|
Schema.Literal("collaborator"),
|
|
519
592
|
Schema.Literal("viewer")
|
|
520
593
|
]).annotate({ identifier: "MailboxGrantRole" }))();
|
|
521
|
-
const MailboxLabelId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
594
|
+
const MailboxLabelId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^label_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
522
595
|
expected: "a string matching the RegExp ^label_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
523
596
|
identifier: "MailboxLabelId"
|
|
524
597
|
})).pipe(Schema.brand("MailboxLabelId")))();
|
|
525
|
-
const MailboxPolicyOutcomeKind = /* @__PURE__ */ (() => Schema.Union([Schema.Literal("requireApproval"), Schema.Literal("deny")]).annotate({ identifier: "MailboxPolicyOutcomeKind" }))();
|
|
526
598
|
const MailboxThreadPriority = /* @__PURE__ */ (() => Schema.Union([
|
|
527
599
|
Schema.Literal("low"),
|
|
528
600
|
Schema.Literal("normal"),
|
|
@@ -534,6 +606,106 @@ const EmailSender = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
|
|
|
534
606
|
email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
535
607
|
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null]))
|
|
536
608
|
}), Schema.Null]).annotate({ identifier: "EmailSender" }))();
|
|
609
|
+
const WhatsAppTextContent = /* @__PURE__ */ (() => Schema.Struct({ text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(4096).annotate({ expected: "a string with at most 4096 code points" })).check(Schema.isMaxLength(4096).annotate({ expected: "a value with a length of at most 4096" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })) }).annotate({ identifier: "WhatsAppTextContent" }))();
|
|
610
|
+
const WhatsAppTemplateData = /* @__PURE__ */ (() => Schema.Record(Schema.String, JsonValue).annotate({ identifier: "WhatsAppTemplateData" }))();
|
|
611
|
+
const WhatsAppImageLink = /* @__PURE__ */ (() => Schema.Struct({
|
|
612
|
+
type: Schema.Literal("image"),
|
|
613
|
+
caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
614
|
+
url: Schema.String
|
|
615
|
+
}).annotate({ identifier: "WhatsAppImageLink" }))();
|
|
616
|
+
const WhatsAppVideoLink = /* @__PURE__ */ (() => Schema.Struct({
|
|
617
|
+
type: Schema.Literal("video"),
|
|
618
|
+
caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
619
|
+
url: Schema.String
|
|
620
|
+
}).annotate({ identifier: "WhatsAppVideoLink" }))();
|
|
621
|
+
const WhatsAppAudioLink = /* @__PURE__ */ (() => Schema.Struct({
|
|
622
|
+
type: Schema.Literal("audio"),
|
|
623
|
+
url: Schema.String
|
|
624
|
+
}).annotate({ identifier: "WhatsAppAudioLink" }))();
|
|
625
|
+
const WhatsAppDocumentLink = /* @__PURE__ */ (() => Schema.Struct({
|
|
626
|
+
type: Schema.Literal("document"),
|
|
627
|
+
caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
628
|
+
filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
629
|
+
url: Schema.String
|
|
630
|
+
}).annotate({ identifier: "WhatsAppDocumentLink" }))();
|
|
631
|
+
const WhatsAppStickerLink = /* @__PURE__ */ (() => Schema.Struct({
|
|
632
|
+
type: Schema.Literal("sticker"),
|
|
633
|
+
url: Schema.String
|
|
634
|
+
}).annotate({ identifier: "WhatsAppStickerLink" }))();
|
|
635
|
+
const WhatsAppTextHeader = /* @__PURE__ */ (() => Schema.Struct({
|
|
636
|
+
type: Schema.Literal("text"),
|
|
637
|
+
text: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))
|
|
638
|
+
}).annotate({ identifier: "WhatsAppTextHeader" }))();
|
|
639
|
+
const WhatsAppImageHeaderLink = /* @__PURE__ */ (() => Schema.Struct({
|
|
640
|
+
type: Schema.Literal("image"),
|
|
641
|
+
url: Schema.String
|
|
642
|
+
}).annotate({ identifier: "WhatsAppImageHeaderLink" }))();
|
|
643
|
+
const WhatsAppVideoHeaderLink = /* @__PURE__ */ (() => Schema.Struct({
|
|
644
|
+
type: Schema.Literal("video"),
|
|
645
|
+
url: Schema.String
|
|
646
|
+
}).annotate({ identifier: "WhatsAppVideoHeaderLink" }))();
|
|
647
|
+
const WhatsAppDocumentHeaderLink = /* @__PURE__ */ (() => Schema.Struct({
|
|
648
|
+
type: Schema.Literal("document"),
|
|
649
|
+
filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
650
|
+
url: Schema.String
|
|
651
|
+
}).annotate({ identifier: "WhatsAppDocumentHeaderLink" }))();
|
|
652
|
+
const WhatsAppReplyButton = /* @__PURE__ */ (() => Schema.Struct({
|
|
653
|
+
id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(256).annotate({ expected: "a string with at most 256 code points" })).check(Schema.isMaxLength(256).annotate({ expected: "a value with a length of at most 256" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
654
|
+
title: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" })).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))
|
|
655
|
+
}).annotate({ identifier: "WhatsAppReplyButton" }))();
|
|
656
|
+
const WhatsAppListRow = /* @__PURE__ */ (() => Schema.Struct({
|
|
657
|
+
id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
658
|
+
title: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(24).annotate({ expected: "a string with at most 24 code points" })).check(Schema.isMaxLength(24).annotate({ expected: "a value with a length of at most 24" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
659
|
+
description: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(72).annotate({ expected: "a string with at most 72 code points" })).check(Schema.isMaxLength(72).annotate({ expected: "a value with a length of at most 72" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
|
|
660
|
+
}).annotate({ identifier: "WhatsAppListRow" }))();
|
|
661
|
+
const WhatsAppFlowId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^waflow_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
662
|
+
expected: "a string matching the RegExp ^waflow_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
663
|
+
identifier: "WhatsAppFlowId"
|
|
664
|
+
})).pipe(Schema.brand("WhatsAppFlowId")))();
|
|
665
|
+
const WhatsAppLocation = /* @__PURE__ */ (() => Schema.Struct({
|
|
666
|
+
latitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(-90).annotate({ expected: "a value greater than or equal to -90" })).check(Schema.isLessThanOrEqualTo(90).annotate({ expected: "a value less than or equal to 90" })),
|
|
667
|
+
longitude: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(-180).annotate({ expected: "a value greater than or equal to -180" })).check(Schema.isLessThanOrEqualTo(180).annotate({ expected: "a value less than or equal to 180" })),
|
|
668
|
+
name: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
669
|
+
address: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
|
|
670
|
+
}).annotate({ identifier: "WhatsAppLocation" }))();
|
|
671
|
+
const WhatsAppContactCard = /* @__PURE__ */ (() => Schema.Struct({
|
|
672
|
+
name: Schema.Struct({
|
|
673
|
+
formattedName: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
674
|
+
firstName: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
675
|
+
lastName: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
676
|
+
middleName: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
677
|
+
prefix: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
678
|
+
suffix: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
|
|
679
|
+
}),
|
|
680
|
+
phones: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
681
|
+
phone: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
682
|
+
type: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
683
|
+
waId: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
|
|
684
|
+
}))),
|
|
685
|
+
emails: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
686
|
+
email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
687
|
+
type: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
|
|
688
|
+
}))),
|
|
689
|
+
urls: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
690
|
+
url: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
691
|
+
type: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
|
|
692
|
+
}))),
|
|
693
|
+
org: Schema.optionalKey(Schema.Struct({
|
|
694
|
+
company: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
695
|
+
department: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
696
|
+
title: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
|
|
697
|
+
})),
|
|
698
|
+
addresses: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
699
|
+
street: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
700
|
+
city: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
701
|
+
state: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
702
|
+
zip: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
703
|
+
country: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
704
|
+
countryCode: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
705
|
+
type: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1e3).annotate({ expected: "a string with at most 1000 code points" })).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
|
|
706
|
+
}))),
|
|
707
|
+
birthday: Schema.optionalKey(Schema.String)
|
|
708
|
+
}).annotate({ identifier: "WhatsAppContactCard" }))();
|
|
537
709
|
const IanaTimezone = /* @__PURE__ */ (() => Schema.String.annotate({ identifier: "IanaTimezone" }))();
|
|
538
710
|
const NamespaceMetadata = /* @__PURE__ */ (() => Schema.Record(Schema.String, Schema.String).annotate({
|
|
539
711
|
description: "Your own labels for the namespace, such as the id of your customer it serves. Samva stores them and never reads them.",
|
|
@@ -542,14 +714,16 @@ const NamespaceMetadata = /* @__PURE__ */ (() => Schema.Record(Schema.String, Sc
|
|
|
542
714
|
const NamespaceResourceType = /* @__PURE__ */ (() => Schema.Union([
|
|
543
715
|
Schema.Literal("domain"),
|
|
544
716
|
Schema.Literal("sender"),
|
|
717
|
+
Schema.Literal("whatsappNumber"),
|
|
718
|
+
Schema.Literal("smsNumber"),
|
|
545
719
|
Schema.Literal("contact"),
|
|
546
720
|
Schema.Literal("template")
|
|
547
721
|
]).annotate({ identifier: "NamespaceResourceType" }))();
|
|
548
|
-
const NewsletterId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
722
|
+
const NewsletterId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^nl_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
549
723
|
expected: "a string matching the RegExp ^nl_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
550
724
|
identifier: "NewsletterId"
|
|
551
725
|
})).pipe(Schema.brand("NewsletterId")))();
|
|
552
|
-
const TemplateProjectId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
726
|
+
const TemplateProjectId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^tproj_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
553
727
|
expected: "a string matching the RegExp ^tproj_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
554
728
|
identifier: "TemplateProjectId"
|
|
555
729
|
})).pipe(Schema.brand("TemplateProjectId")))();
|
|
@@ -557,6 +731,10 @@ const OperationResource = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
557
731
|
type: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(80).annotate({ expected: "a string with at most 80 code points" })).check(Schema.isMaxLength(80).annotate({ expected: "a value with a length of at most 80" })),
|
|
558
732
|
id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
|
|
559
733
|
}).annotate({ identifier: "OperationResource" }))();
|
|
734
|
+
const PolicyVersion = /* @__PURE__ */ (() => Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({
|
|
735
|
+
expected: "a value less than or equal to 9007199254740991",
|
|
736
|
+
identifier: "PolicyVersion"
|
|
737
|
+
})))();
|
|
560
738
|
const TemplateFromDefault = /* @__PURE__ */ (() => Schema.Struct({
|
|
561
739
|
email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
562
740
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
@@ -565,13 +743,20 @@ const TemplateTrackingDefault = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
565
743
|
opens: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
566
744
|
clicks: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
567
745
|
}).annotate({ identifier: "TemplateTrackingDefault" }))();
|
|
746
|
+
var TemplateInUseError = class extends Schema.TaggedError()("TemplateInUseError", Schema.Struct({
|
|
747
|
+
message: Schema.String,
|
|
748
|
+
references: Schema.Array(Schema.Struct({
|
|
749
|
+
kind: Schema.String,
|
|
750
|
+
id: Schema.String
|
|
751
|
+
}))
|
|
752
|
+
})) {};
|
|
568
753
|
const TopicContactByEmail = /* @__PURE__ */ (() => Schema.Struct({ email: Schema.String }).annotate({ identifier: "TopicContactByEmail" }))();
|
|
569
754
|
const TopicContactByPhone = /* @__PURE__ */ (() => Schema.Struct({ phone: Schema.String }).annotate({ identifier: "TopicContactByPhone" }))();
|
|
570
755
|
const TestWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null])) }).annotate({ identifier: "TestWebhookPayload" }))();
|
|
571
756
|
const CreateTemplatePayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
572
757
|
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })),
|
|
573
758
|
projectName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null])),
|
|
574
|
-
slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(
|
|
759
|
+
slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
|
|
575
760
|
galleryTemplateId: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(128).annotate({ expected: "a string with at most 128 code points" })).check(Schema.isMaxLength(128).annotate({ expected: "a value with a length of at most 128" })), Schema.Null])),
|
|
576
761
|
useBrand: Schema.optionalKey(Schema.Union([Schema.Boolean.annotate({ description: "With `galleryTemplateId`: whether the new project's `theme.css` imports the organization's default brand (`@import \"samva:brand\";`) over the starter's look. Defaults to false." }), Schema.Null])),
|
|
577
762
|
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -584,20 +769,51 @@ const CreateTemplatePayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
584
769
|
Schema.Literal("reminder"),
|
|
585
770
|
Schema.Literal("alert")
|
|
586
771
|
]), Schema.Null])),
|
|
587
|
-
isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
588
772
|
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "The namespace the new template project belongs to; the project and every entry added to it share it. Omit for organization level. A namespace-scoped key always creates in its own namespace." })),
|
|
589
773
|
shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the new organization-level project with every namespace: namespace-scoped keys read and send its entries but cannot change them. Defaults to false. Not with `namespaceId`, and not from a namespace-scoped key." }))
|
|
590
774
|
}).annotate({ identifier: "CreateTemplatePayload" }))();
|
|
591
775
|
const AgentIntegrationGrant = /* @__PURE__ */ (() => Schema.Struct({
|
|
592
776
|
integrationId: IntegrationId,
|
|
593
|
-
tools: AgentToolScope
|
|
594
|
-
requireApproval: Schema.Array(Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z][a-z0-9_.]{0,63}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z][a-z0-9_.]{0,63}$" })))
|
|
777
|
+
tools: AgentToolScope
|
|
595
778
|
}).annotate({ identifier: "AgentIntegrationGrant" }))();
|
|
779
|
+
const PolicySubject = /* @__PURE__ */ (() => Schema.Union([
|
|
780
|
+
Schema.Struct({
|
|
781
|
+
kind: Schema.Literal("agent"),
|
|
782
|
+
id: AgentId
|
|
783
|
+
}),
|
|
784
|
+
Schema.Struct({
|
|
785
|
+
kind: Schema.Literal("apiKey"),
|
|
786
|
+
id: ApiKeyId
|
|
787
|
+
}),
|
|
788
|
+
Schema.Struct({
|
|
789
|
+
kind: Schema.Literal("member"),
|
|
790
|
+
userId: UserId
|
|
791
|
+
}),
|
|
792
|
+
Schema.Struct({
|
|
793
|
+
kind: Schema.Literal("extension"),
|
|
794
|
+
id: ExtensionInstallationId
|
|
795
|
+
})
|
|
796
|
+
]).annotate({ identifier: "PolicySubject" }))();
|
|
797
|
+
const AgentModelChoice = /* @__PURE__ */ (() => Schema.Union([AgentModel, CatalogModelId]).annotate({ identifier: "AgentModelChoice" }))();
|
|
596
798
|
const WorkingHoursRange = /* @__PURE__ */ (() => Schema.Struct({
|
|
597
799
|
day: Weekday,
|
|
598
800
|
opens: ClockTime,
|
|
599
801
|
closes: ClockTime
|
|
600
802
|
}).annotate({ identifier: "WorkingHoursRange" }))();
|
|
803
|
+
const ApiKeyMailboxAccess = /* @__PURE__ */ (() => Schema.Struct({
|
|
804
|
+
permissions: Schema.TupleWithRest(Schema.Tuple([Schema.Union([
|
|
805
|
+
Schema.Literal("read"),
|
|
806
|
+
Schema.Literal("update"),
|
|
807
|
+
Schema.Literal("send"),
|
|
808
|
+
Schema.Literal("quarantine.read")
|
|
809
|
+
])]), [Schema.Union([
|
|
810
|
+
Schema.Literal("read"),
|
|
811
|
+
Schema.Literal("update"),
|
|
812
|
+
Schema.Literal("send"),
|
|
813
|
+
Schema.Literal("quarantine.read")
|
|
814
|
+
])]).annotate({ description: "`read` reads mailboxes, threads, and messages; `update` changes thread state, labels, drafts, and notes; `send` sends and replies; `quarantine.read` reads quarantined mail." }),
|
|
815
|
+
mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null]).annotate({ description: "The mailboxes the key may act on. Omit to reach every mailbox the owner can." }))
|
|
816
|
+
}).annotate({ identifier: "ApiKeyMailboxAccess" }))();
|
|
601
817
|
const CampaignReplyMailbox = /* @__PURE__ */ (() => Schema.Union([MailboxId, Schema.Null]).annotate({
|
|
602
818
|
description: "Omit to inherit the topic mailbox; null disables mailbox inheritance. An explicit email.replyTo overrides an inherited mailbox.",
|
|
603
819
|
identifier: "CampaignReplyMailbox"
|
|
@@ -631,6 +847,8 @@ const CreateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
631
847
|
Schema.Literal("webhook.test"),
|
|
632
848
|
Schema.Literal("domain.updated"),
|
|
633
849
|
Schema.Literal("domain.warming.updated"),
|
|
850
|
+
Schema.Literal("email.sending.paused"),
|
|
851
|
+
Schema.Literal("email.sending.resumed"),
|
|
634
852
|
Schema.Literal("template.registration.updated"),
|
|
635
853
|
Schema.Literal("flow.registration.updated"),
|
|
636
854
|
Schema.Literal("whatsapp.number.connected"),
|
|
@@ -646,7 +864,11 @@ const CreateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
646
864
|
Schema.Literal("mailbox.message.failed"),
|
|
647
865
|
Schema.Literal("journey.webhook")
|
|
648
866
|
])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
649
|
-
channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.
|
|
867
|
+
channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Union([
|
|
868
|
+
Schema.Literal("sms"),
|
|
869
|
+
Schema.Literal("whatsapp"),
|
|
870
|
+
Schema.Literal("email")
|
|
871
|
+
])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
650
872
|
mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null])),
|
|
651
873
|
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
652
874
|
headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
|
|
@@ -681,6 +903,8 @@ const UpdateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
681
903
|
Schema.Literal("webhook.test"),
|
|
682
904
|
Schema.Literal("domain.updated"),
|
|
683
905
|
Schema.Literal("domain.warming.updated"),
|
|
906
|
+
Schema.Literal("email.sending.paused"),
|
|
907
|
+
Schema.Literal("email.sending.resumed"),
|
|
684
908
|
Schema.Literal("template.registration.updated"),
|
|
685
909
|
Schema.Literal("flow.registration.updated"),
|
|
686
910
|
Schema.Literal("whatsapp.number.connected"),
|
|
@@ -696,30 +920,29 @@ const UpdateWebhookPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
696
920
|
Schema.Literal("mailbox.message.failed"),
|
|
697
921
|
Schema.Literal("journey.webhook")
|
|
698
922
|
])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
699
|
-
channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.
|
|
923
|
+
channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Union([
|
|
924
|
+
Schema.Literal("sms"),
|
|
925
|
+
Schema.Literal("whatsapp"),
|
|
926
|
+
Schema.Literal("email")
|
|
927
|
+
])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
700
928
|
mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null])),
|
|
701
929
|
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
702
930
|
headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
|
|
703
931
|
status: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("active"), Schema.Literal("disabled")]), Schema.Null]))
|
|
704
932
|
}).annotate({ identifier: "UpdateWebhookPayload" }))();
|
|
705
|
-
const
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
Schema.Literal("quarantine.read")
|
|
716
|
-
])]).annotate({ description: "`read` reads mailboxes, threads, and messages; `update` changes thread state, labels, drafts, and notes; `send` sends and replies; `quarantine.read` reads quarantined mail." }),
|
|
717
|
-
mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null]).annotate({ description: "The mailboxes the key may act on. Omit to reach every mailbox the owner can." })),
|
|
718
|
-
sendMode: Schema.optionalKey(Schema.Union([MailboxSendMode, Schema.Null]).annotate({ description: "Defaults to `send`. With `approval`, each send waits until a person other than the key approves it." }))
|
|
719
|
-
}).annotate({ identifier: "ApiKeyMailboxAccess" }))();
|
|
933
|
+
const CreateMailboxChatDraftPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
934
|
+
channel: Schema.Union([Schema.Literal("whatsapp"), Schema.Literal("sms")]),
|
|
935
|
+
to: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
936
|
+
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
937
|
+
inReplyToMessageId: Schema.optionalKey(Schema.Union([MessageId, Schema.Null]))
|
|
938
|
+
}).annotate({ identifier: "CreateMailboxChatDraftPayload" }))();
|
|
939
|
+
const WhatsAppReaction = /* @__PURE__ */ (() => Schema.Struct({
|
|
940
|
+
messageId: MessageId,
|
|
941
|
+
emoji: Schema.String
|
|
942
|
+
}).annotate({ identifier: "WhatsAppReaction" }))();
|
|
720
943
|
const BrandFooter = /* @__PURE__ */ (() => Schema.Struct({
|
|
721
944
|
companyName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })), Schema.Null])),
|
|
722
|
-
websiteUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(
|
|
945
|
+
websiteUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(new globalThis.RegExp("^https:\\/\\/[^\\s]+$", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/[^\\s]+$" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null])),
|
|
723
946
|
address: Schema.optionalKey(Schema.Union([BrandAddress, Schema.Null])),
|
|
724
947
|
socialLinks: Schema.optionalKey(Schema.Union([Schema.Array(BrandSocialLink).check(Schema.isMaxLength(12).annotate({ expected: "a value with a length of at most 12" })), Schema.Null]))
|
|
725
948
|
}).annotate({ identifier: "BrandFooter" }))();
|
|
@@ -730,7 +953,45 @@ const EmailAttachment = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
730
953
|
contentType: Schema.String,
|
|
731
954
|
size: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(26214400).annotate({ expected: "a value less than or equal to 26214400" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" }))
|
|
732
955
|
}).annotate({ identifier: "EmailAttachment" }))();
|
|
956
|
+
const WhatsAppImageUpload = /* @__PURE__ */ (() => Schema.Struct({
|
|
957
|
+
type: Schema.Literal("image"),
|
|
958
|
+
caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
959
|
+
mediaId: MediaId
|
|
960
|
+
}).annotate({ identifier: "WhatsAppImageUpload" }))();
|
|
961
|
+
const WhatsAppVideoUpload = /* @__PURE__ */ (() => Schema.Struct({
|
|
962
|
+
type: Schema.Literal("video"),
|
|
963
|
+
caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
964
|
+
mediaId: MediaId
|
|
965
|
+
}).annotate({ identifier: "WhatsAppVideoUpload" }))();
|
|
966
|
+
const WhatsAppAudioUpload = /* @__PURE__ */ (() => Schema.Struct({
|
|
967
|
+
type: Schema.Literal("audio"),
|
|
968
|
+
mediaId: MediaId
|
|
969
|
+
}).annotate({ identifier: "WhatsAppAudioUpload" }))();
|
|
970
|
+
const WhatsAppDocumentUpload = /* @__PURE__ */ (() => Schema.Struct({
|
|
971
|
+
type: Schema.Literal("document"),
|
|
972
|
+
caption: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
973
|
+
filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
974
|
+
mediaId: MediaId
|
|
975
|
+
}).annotate({ identifier: "WhatsAppDocumentUpload" }))();
|
|
976
|
+
const WhatsAppStickerUpload = /* @__PURE__ */ (() => Schema.Struct({
|
|
977
|
+
type: Schema.Literal("sticker"),
|
|
978
|
+
mediaId: MediaId
|
|
979
|
+
}).annotate({ identifier: "WhatsAppStickerUpload" }))();
|
|
980
|
+
const WhatsAppImageHeaderUpload = /* @__PURE__ */ (() => Schema.Struct({
|
|
981
|
+
type: Schema.Literal("image"),
|
|
982
|
+
mediaId: MediaId
|
|
983
|
+
}).annotate({ identifier: "WhatsAppImageHeaderUpload" }))();
|
|
984
|
+
const WhatsAppVideoHeaderUpload = /* @__PURE__ */ (() => Schema.Struct({
|
|
985
|
+
type: Schema.Literal("video"),
|
|
986
|
+
mediaId: MediaId
|
|
987
|
+
}).annotate({ identifier: "WhatsAppVideoHeaderUpload" }))();
|
|
988
|
+
const WhatsAppDocumentHeaderUpload = /* @__PURE__ */ (() => Schema.Struct({
|
|
989
|
+
type: Schema.Literal("document"),
|
|
990
|
+
filename: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
991
|
+
mediaId: MediaId
|
|
992
|
+
}).annotate({ identifier: "WhatsAppDocumentHeaderUpload" }))();
|
|
733
993
|
const TemplateData = /* @__PURE__ */ (() => Schema.Union([JsonObject, Schema.Null]).annotate({ identifier: "TemplateData" }))();
|
|
994
|
+
const SmsTemplateData = /* @__PURE__ */ (() => Schema.Union([JsonObject, Schema.Null]).annotate({ identifier: "SmsTemplateData" }))();
|
|
734
995
|
const ContactConsent = /* @__PURE__ */ (() => Schema.Struct({
|
|
735
996
|
status: Schema.Union([Schema.Literal("opted_in"), Schema.Literal("opted_out")]),
|
|
736
997
|
source: Schema.String,
|
|
@@ -738,6 +999,19 @@ const ContactConsent = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
738
999
|
proof: Schema.Union([JsonObject, Schema.Null])
|
|
739
1000
|
}).annotate({ identifier: "ContactConsent" }))();
|
|
740
1001
|
const JourneyWebhookConfig = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.optionalKey(JsonObject) }).annotate({ identifier: "JourneyWebhookConfig" }))();
|
|
1002
|
+
const SendMailboxChatPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
1003
|
+
channel: Schema.Union([Schema.Literal("whatsapp"), Schema.Literal("sms")]),
|
|
1004
|
+
to: Schema.String,
|
|
1005
|
+
text: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
1006
|
+
templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
|
|
1007
|
+
templateData: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null]))
|
|
1008
|
+
}).annotate({ identifier: "SendMailboxChatPayload" }))();
|
|
1009
|
+
const ReplyMailboxChatPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
1010
|
+
channel: Schema.Union([Schema.Literal("whatsapp"), Schema.Literal("sms")]),
|
|
1011
|
+
text: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
1012
|
+
templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
|
|
1013
|
+
templateData: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null]))
|
|
1014
|
+
}).annotate({ identifier: "ReplyMailboxChatPayload" }))();
|
|
741
1015
|
const SkippedRecipient = /* @__PURE__ */ (() => Schema.Struct({
|
|
742
1016
|
address: Schema.String,
|
|
743
1017
|
reason: Schema.Union([
|
|
@@ -750,6 +1024,7 @@ const SkippedRecipient = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
750
1024
|
topicId: Schema.optionalKey(Schema.Union([TopicId, Schema.Null]))
|
|
751
1025
|
}).annotate({ identifier: "SkippedRecipient" }))();
|
|
752
1026
|
const CampaignConversationRef = /* @__PURE__ */ (() => Schema.Union([ConversationId, Schema.Null]).annotate({ identifier: "CampaignConversationRef" }))();
|
|
1027
|
+
const WhatsAppTemplateBinding = /* @__PURE__ */ (() => Schema.Union([WhatsAppTemplateContactBinding, WhatsAppTemplateCustomFieldBinding]).annotate({ identifier: "WhatsAppTemplateBinding" }))();
|
|
753
1028
|
const ContactEvent = /* @__PURE__ */ (() => Schema.Struct({
|
|
754
1029
|
id: Schema.String,
|
|
755
1030
|
contactId: ContactId,
|
|
@@ -771,7 +1046,7 @@ const ContactEventReference = /* @__PURE__ */ (() => Schema.Union([
|
|
|
771
1046
|
email: Schema.optionalKey(Schema.Never)
|
|
772
1047
|
}),
|
|
773
1048
|
Schema.Struct({
|
|
774
|
-
email: Schema.String.check(Schema.isPattern(
|
|
1049
|
+
email: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$", "u")).annotate({ expected: "a string matching the RegExp ^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$" })),
|
|
775
1050
|
id: Schema.optionalKey(Schema.Never),
|
|
776
1051
|
externalId: Schema.optionalKey(Schema.Never)
|
|
777
1052
|
})
|
|
@@ -781,6 +1056,16 @@ const EmailRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ cont
|
|
|
781
1056
|
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
|
|
782
1057
|
displayName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null]))
|
|
783
1058
|
})]).annotate({ identifier: "EmailRecipient" }))();
|
|
1059
|
+
const SmsRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ contactId: ContactId }), Schema.Struct({
|
|
1060
|
+
phone: Schema.String,
|
|
1061
|
+
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
|
|
1062
|
+
displayName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null]))
|
|
1063
|
+
})]).annotate({ identifier: "SmsRecipient" }))();
|
|
1064
|
+
const WhatsAppRecipient = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ contactId: ContactId }), Schema.Struct({
|
|
1065
|
+
phone: Schema.String,
|
|
1066
|
+
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
|
|
1067
|
+
displayName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null]))
|
|
1068
|
+
})]).annotate({ identifier: "WhatsAppRecipient" }))();
|
|
784
1069
|
const TopicContactById = /* @__PURE__ */ (() => Schema.Struct({ contactId: ContactId }).annotate({ identifier: "TopicContactById" }))();
|
|
785
1070
|
const CampaignAudience = /* @__PURE__ */ (() => Schema.Struct({
|
|
786
1071
|
topicId: TopicId,
|
|
@@ -819,7 +1104,11 @@ const MessageSummary = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
819
1104
|
campaignId: CampaignId,
|
|
820
1105
|
runId: CampaignRunId
|
|
821
1106
|
}), Schema.Null])),
|
|
822
|
-
channel: Schema.
|
|
1107
|
+
channel: Schema.Union([
|
|
1108
|
+
Schema.Literal("sms"),
|
|
1109
|
+
Schema.Literal("whatsapp"),
|
|
1110
|
+
Schema.Literal("email")
|
|
1111
|
+
]),
|
|
823
1112
|
direction: Schema.Union([Schema.Literal("outbound"), Schema.Literal("inbound")]),
|
|
824
1113
|
status: Schema.Union([
|
|
825
1114
|
Schema.Literal("pending"),
|
|
@@ -852,7 +1141,7 @@ const MessageSummary = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
852
1141
|
createdAt: Schema.String
|
|
853
1142
|
}).annotate({ identifier: "MessageSummary" }))();
|
|
854
1143
|
const JourneySendEmailConfig = /* @__PURE__ */ (() => Schema.Struct({
|
|
855
|
-
template: Schema.Union([TemplateId, Schema.String.check(Schema.isPattern(
|
|
1144
|
+
template: Schema.Union([TemplateId, Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" }))]),
|
|
856
1145
|
senderId: Schema.optionalKey(EmailSenderId),
|
|
857
1146
|
templateData: Schema.optionalKey(JsonObject)
|
|
858
1147
|
}).annotate({ identifier: "JourneySendEmailConfig" }))();
|
|
@@ -861,7 +1150,7 @@ const ExtensionVersionRef = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
861
1150
|
version: Schema.String
|
|
862
1151
|
}).annotate({ identifier: "ExtensionVersionRef" }))();
|
|
863
1152
|
const SendFeedback = /* @__PURE__ */ (() => Schema.Struct({
|
|
864
|
-
message: Schema.String.annotate({ description: "What happened and what you expected, in plain language (at most 4000 characters)." }).check(Schema.isMaxCodePoints(4e3).annotate({ expected: "a string with at most 4000 code points" })).check(Schema.isPattern(
|
|
1153
|
+
message: Schema.String.annotate({ description: "What happened and what you expected, in plain language (at most 4000 characters)." }).check(Schema.isMaxCodePoints(4e3).annotate({ expected: "a string with at most 4000 code points" })).check(Schema.isPattern(new globalThis.RegExp("\\S", "u")).annotate({ expected: "a string matching the RegExp \\S" })).check(Schema.isMaxLength(4e3).annotate({ expected: "a value with a length of at most 4000" })),
|
|
865
1154
|
category: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
866
1155
|
Schema.Literal("bug"),
|
|
867
1156
|
Schema.Literal("confusing"),
|
|
@@ -901,25 +1190,93 @@ const CreateMailboxEndpointPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
901
1190
|
displayName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null]))
|
|
902
1191
|
}).annotate({ identifier: "CreateMailboxEndpointPayload" }))();
|
|
903
1192
|
const MailboxActionDecision = /* @__PURE__ */ (() => Schema.Struct({
|
|
1193
|
+
id: PolicyDecisionId,
|
|
1194
|
+
reviewRound: PolicyReviewRound,
|
|
1195
|
+
requirement: PolicyRequirement,
|
|
1196
|
+
decider: PolicyDecider,
|
|
904
1197
|
outcome: Schema.Union([
|
|
905
1198
|
Schema.Literal("allow"),
|
|
906
|
-
Schema.Literal("
|
|
907
|
-
Schema.Literal("
|
|
1199
|
+
Schema.Literal("hold"),
|
|
1200
|
+
Schema.Literal("refuse")
|
|
908
1201
|
]),
|
|
909
|
-
reason: Schema.
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
1202
|
+
reason: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
1203
|
+
scopes: Schema.Array(Schema.Struct({
|
|
1204
|
+
kind: Schema.Union([
|
|
1205
|
+
Schema.Literal("organization"),
|
|
1206
|
+
Schema.Literal("mailbox"),
|
|
1207
|
+
Schema.Literal("agent"),
|
|
1208
|
+
Schema.Literal("apiKey")
|
|
1209
|
+
]),
|
|
1210
|
+
id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
|
|
1211
|
+
})),
|
|
1212
|
+
rule: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
1213
|
+
scope: Schema.Struct({
|
|
1214
|
+
kind: Schema.Union([
|
|
1215
|
+
Schema.Literal("organization"),
|
|
1216
|
+
Schema.Literal("mailbox"),
|
|
1217
|
+
Schema.Literal("agent"),
|
|
1218
|
+
Schema.Literal("apiKey")
|
|
1219
|
+
]),
|
|
1220
|
+
id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
|
|
1221
|
+
}),
|
|
1222
|
+
index: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
1223
|
+
}), Schema.Null])),
|
|
1224
|
+
guard: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
1225
|
+
guardReason: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
1226
|
+
resolution: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
1227
|
+
by: UserId,
|
|
1228
|
+
at: Schema.String,
|
|
1229
|
+
as: Schema.Union([
|
|
1230
|
+
Schema.Literal("approved"),
|
|
1231
|
+
Schema.Literal("edited"),
|
|
1232
|
+
Schema.Literal("denied"),
|
|
1233
|
+
Schema.Literal("alwaysAllowed")
|
|
1234
|
+
]),
|
|
1235
|
+
diff: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
1236
|
+
text: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
1237
|
+
before: Schema.Union([Schema.String, Schema.Null]),
|
|
1238
|
+
after: Schema.Union([Schema.String, Schema.Null])
|
|
1239
|
+
}), Schema.Null])),
|
|
1240
|
+
html: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
1241
|
+
before: Schema.Union([Schema.String, Schema.Null]),
|
|
1242
|
+
after: Schema.Union([Schema.String, Schema.Null])
|
|
1243
|
+
}), Schema.Null]))
|
|
1244
|
+
}), Schema.Null]))
|
|
1245
|
+
}), Schema.Null]))
|
|
917
1246
|
}).annotate({ identifier: "MailboxActionDecision" }))();
|
|
918
1247
|
const MailboxSendOutcome = /* @__PURE__ */ (() => Schema.Struct({
|
|
919
1248
|
code: Schema.String,
|
|
920
1249
|
message: Schema.String,
|
|
921
1250
|
error: Schema.optionalKey(Schema.Union([MailboxSendError, Schema.Null]))
|
|
922
1251
|
}).annotate({ identifier: "MailboxSendOutcome" }))();
|
|
1252
|
+
const WhatsAppTemplateIdContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
1253
|
+
templateId: TemplateId,
|
|
1254
|
+
templateData: Schema.optionalKey(WhatsAppTemplateData),
|
|
1255
|
+
flowToken: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
|
|
1256
|
+
}).annotate({ identifier: "WhatsAppTemplateIdContent" }))();
|
|
1257
|
+
const WhatsAppTemplateSlugContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
1258
|
+
templateSlug: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })),
|
|
1259
|
+
templateData: Schema.optionalKey(WhatsAppTemplateData),
|
|
1260
|
+
flowToken: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })))
|
|
1261
|
+
}).annotate({ identifier: "WhatsAppTemplateSlugContent" }))();
|
|
1262
|
+
const WhatsAppListSection = /* @__PURE__ */ (() => Schema.Struct({
|
|
1263
|
+
title: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(24).annotate({ expected: "a string with at most 24 code points" })).check(Schema.isMaxLength(24).annotate({ expected: "a value with a length of at most 24" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
1264
|
+
rows: Schema.Array(WhatsAppListRow).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
|
|
1265
|
+
}).annotate({ identifier: "WhatsAppListSection" }))();
|
|
1266
|
+
const WhatsAppFlowMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
1267
|
+
type: Schema.Literal("flow"),
|
|
1268
|
+
header: Schema.optionalKey(WhatsAppTextHeader),
|
|
1269
|
+
body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
1270
|
+
footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
1271
|
+
flowId: WhatsAppFlowId,
|
|
1272
|
+
cta: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(30).annotate({ expected: "a string with at most 30 code points" })).check(Schema.isMaxLength(30).annotate({ expected: "a value with a length of at most 30" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
1273
|
+
token: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
1274
|
+
action: Schema.optionalKey(Schema.Union([Schema.Literal("navigate"), Schema.Literal("data_exchange")])),
|
|
1275
|
+
screen: Schema.optionalKey(Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[A-Za-z_]{1,100}$", "u")).annotate({ expected: "a string matching the RegExp ^[A-Za-z_]{1,100}$" }))),
|
|
1276
|
+
data: Schema.optionalKey(Schema.Record(Schema.String, JsonValue))
|
|
1277
|
+
}).annotate({ identifier: "WhatsAppFlowMessage" }))();
|
|
1278
|
+
const WhatsAppLocationContent = /* @__PURE__ */ (() => Schema.Struct({ location: WhatsAppLocation }).annotate({ identifier: "WhatsAppLocationContent" }))();
|
|
1279
|
+
const WhatsAppContactsContent = /* @__PURE__ */ (() => Schema.Struct({ contacts: Schema.Array(WhatsAppContactCard).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(257).annotate({ expected: "a value with a length of at most 257" })) }).annotate({ identifier: "WhatsAppContactsContent" }))();
|
|
923
1280
|
const Operation = /* @__PURE__ */ (() => Schema.Struct({
|
|
924
1281
|
id: OperationId,
|
|
925
1282
|
organizationId: Schema.String,
|
|
@@ -966,12 +1323,12 @@ const Operation = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
966
1323
|
}).annotate({ identifier: "Operation" }))();
|
|
967
1324
|
const OperationResourceLink = /* @__PURE__ */ (() => Schema.Struct({
|
|
968
1325
|
resource: OperationResource,
|
|
969
|
-
href: Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isPattern(
|
|
1326
|
+
href: Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\/v1\\/", "u")).annotate({ expected: "a string matching the RegExp ^\\/v1\\/" })).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" }))
|
|
970
1327
|
}).annotate({ identifier: "OperationResourceLink" }))();
|
|
971
1328
|
const UpdateTemplatePayload = /* @__PURE__ */ (() => Schema.Struct({ data: Schema.Struct({
|
|
972
1329
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
973
|
-
slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(
|
|
974
|
-
entryPath: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(
|
|
1330
|
+
slug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
|
|
1331
|
+
entryPath: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(new globalThis.RegExp("^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$", "u")).annotate({ expected: "a string matching the RegExp ^(?!\\/)(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?:templates|emails)\\/.+\\.tsx$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })), Schema.Null])),
|
|
975
1332
|
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
976
1333
|
category: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
977
1334
|
Schema.Literal("transactional"),
|
|
@@ -985,9 +1342,34 @@ const UpdateTemplatePayload = /* @__PURE__ */ (() => Schema.Struct({ data: Schem
|
|
|
985
1342
|
fromDefault: Schema.optionalKey(Schema.Union([TemplateFromDefault, Schema.Null])),
|
|
986
1343
|
replyToDefault: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
987
1344
|
trackingDefault: Schema.optionalKey(Schema.Union([TemplateTrackingDefault, Schema.Null]).annotate({ description: "Engagement tracking for sends of this template: `opens` and `clicks`, each inherited from the domain and organization defaults when omitted. A send request's own `tracking` still wins. Null clears the template's default." })),
|
|
988
|
-
isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
989
1345
|
shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the template's project with every namespace, or stop sharing it. Applies to every entry in the project. Only an organization-level project is shared." }))
|
|
990
1346
|
}) }).annotate({ identifier: "UpdateTemplatePayload" }))();
|
|
1347
|
+
const PolicyRuleMatch = /* @__PURE__ */ (() => Schema.Struct({
|
|
1348
|
+
kind: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
1349
|
+
Schema.Literal("send"),
|
|
1350
|
+
Schema.Literal("reply"),
|
|
1351
|
+
Schema.Literal("toolCall"),
|
|
1352
|
+
Schema.Literal("handoff")
|
|
1353
|
+
]), Schema.Null])),
|
|
1354
|
+
effect: Schema.optionalKey(Schema.Union([PolicyEffect, Schema.Null])),
|
|
1355
|
+
channel: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
1356
|
+
Schema.Literal("sms"),
|
|
1357
|
+
Schema.Literal("whatsapp"),
|
|
1358
|
+
Schema.Literal("email")
|
|
1359
|
+
]), Schema.Null])),
|
|
1360
|
+
integration: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
1361
|
+
tool: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)*(?:\\.\\*)?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z][a-z0-9_]*(?:\\.[a-z][a-z0-9_]*)*(?:\\.\\*)?$" })), Schema.Null])),
|
|
1362
|
+
subject: Schema.optionalKey(Schema.Union([
|
|
1363
|
+
Schema.Union([
|
|
1364
|
+
Schema.Literal("agent"),
|
|
1365
|
+
Schema.Literal("apiKey"),
|
|
1366
|
+
Schema.Literal("member"),
|
|
1367
|
+
Schema.Literal("extension")
|
|
1368
|
+
]),
|
|
1369
|
+
PolicySubject,
|
|
1370
|
+
Schema.Null
|
|
1371
|
+
]))
|
|
1372
|
+
}).annotate({ identifier: "PolicyRuleMatch" }))();
|
|
991
1373
|
const WorkingHours = /* @__PURE__ */ (() => Schema.Struct({
|
|
992
1374
|
timeZone: TimeZone,
|
|
993
1375
|
ranges: Schema.Array(WorkingHoursRange).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(28).annotate({ expected: "a value with a length of at most 28" }))
|
|
@@ -998,8 +1380,9 @@ const ApiKeyAccess = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({ mode:
|
|
|
998
1380
|
mailboxes: Schema.optionalKey(Schema.Union([ApiKeyMailboxAccess, Schema.Null])),
|
|
999
1381
|
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "Confines the key to one namespace: it reaches only that namespace's domains, senders, numbers, mailboxes, contacts, templates, and messages, never organization-level ones, and only endpoints that confine to a namespace (others answer 403). It holds grants only on `mailboxes`, `messages`, `email`, `domains`, `contacts`, and `templates`. A key scoped to listed mailboxes holds mailbox access only." }))
|
|
1000
1382
|
})]).annotate({ identifier: "ApiKeyAccess" }))();
|
|
1383
|
+
const WhatsAppReactionContent = /* @__PURE__ */ (() => Schema.Struct({ reaction: WhatsAppReaction }).annotate({ identifier: "WhatsAppReactionContent" }))();
|
|
1001
1384
|
const CreateBrand = /* @__PURE__ */ (() => Schema.Struct({
|
|
1002
|
-
slug: Schema.String.check(Schema.isPattern(
|
|
1385
|
+
slug: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })),
|
|
1003
1386
|
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })),
|
|
1004
1387
|
css: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(32768).annotate({ expected: "a string with at most 32768 code points" })).check(Schema.isMaxLength(32768).annotate({ expected: "a value with a length of at most 32768" })), Schema.Null])),
|
|
1005
1388
|
assets: Schema.optionalKey(Schema.Union([BrandAssets, Schema.Null])),
|
|
@@ -1007,15 +1390,71 @@ const CreateBrand = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1007
1390
|
isDefault: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
1008
1391
|
}).annotate({ identifier: "CreateBrand" }))();
|
|
1009
1392
|
const UpdateBrand = /* @__PURE__ */ (() => Schema.Struct({
|
|
1010
|
-
newSlug: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "Renames the brand. Projects importing `samva:brand/<old slug>` stop building until they import the new slug." }).check(Schema.isPattern(
|
|
1393
|
+
newSlug: Schema.optionalKey(Schema.Union([Schema.String.annotate({ description: "Renames the brand. Projects importing `samva:brand/<old slug>` stop building until they import the new slug." }).check(Schema.isPattern(new globalThis.RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" })), Schema.Null])),
|
|
1011
1394
|
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
|
|
1012
1395
|
css: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(32768).annotate({ expected: "a string with at most 32768 code points" })).check(Schema.isMaxLength(32768).annotate({ expected: "a value with a length of at most 32768" })), Schema.Null])),
|
|
1013
1396
|
assets: Schema.optionalKey(Schema.Union([BrandAssets, Schema.Null])),
|
|
1014
1397
|
footer: Schema.optionalKey(Schema.Union([BrandFooter, Schema.Null]))
|
|
1015
1398
|
}).annotate({ identifier: "UpdateBrand" }))();
|
|
1016
1399
|
const EmailAttachments = /* @__PURE__ */ (() => Schema.Union([Schema.Array(EmailAttachment).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema.Null]).annotate({ identifier: "EmailAttachments" }))();
|
|
1400
|
+
const CreateMailboxEmailDraftPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
1401
|
+
channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
|
|
1402
|
+
endpointId: Schema.optionalKey(Schema.Union([MailboxEndpointId, Schema.Null])),
|
|
1403
|
+
to: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
1404
|
+
cc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
1405
|
+
bcc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
1406
|
+
replyTo: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
1407
|
+
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1408
|
+
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1409
|
+
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1410
|
+
attachments: Schema.optionalKey(Schema.Union([Schema.Array(EmailAttachment).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema.Null])),
|
|
1411
|
+
inReplyToMessageId: Schema.optionalKey(Schema.Union([MessageId, Schema.Null]))
|
|
1412
|
+
}).annotate({ identifier: "CreateMailboxEmailDraftPayload" }))();
|
|
1413
|
+
const SendMailboxEmailPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
1414
|
+
channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
|
|
1415
|
+
to: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]),
|
|
1416
|
+
cc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
1417
|
+
bcc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
1418
|
+
replyTo: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
1419
|
+
subject: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
1420
|
+
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1421
|
+
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1422
|
+
attachments: Schema.optionalKey(Schema.Union([Schema.Array(EmailAttachment).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema.Null]))
|
|
1423
|
+
}).annotate({ identifier: "SendMailboxEmailPayload" }))();
|
|
1424
|
+
const ReplyMailboxEmailPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
1425
|
+
channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
|
|
1426
|
+
cc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
1427
|
+
bcc: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
1428
|
+
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1429
|
+
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1430
|
+
attachments: Schema.optionalKey(Schema.Union([Schema.Array(EmailAttachment).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" })), Schema.Null]))
|
|
1431
|
+
}).annotate({ identifier: "ReplyMailboxEmailPayload" }))();
|
|
1432
|
+
const WhatsAppImage = /* @__PURE__ */ (() => Schema.Union([WhatsAppImageLink, WhatsAppImageUpload]).annotate({ identifier: "WhatsAppImage" }))();
|
|
1433
|
+
const WhatsAppVideo = /* @__PURE__ */ (() => Schema.Union([WhatsAppVideoLink, WhatsAppVideoUpload]).annotate({ identifier: "WhatsAppVideo" }))();
|
|
1434
|
+
const WhatsAppAudio = /* @__PURE__ */ (() => Schema.Union([WhatsAppAudioLink, WhatsAppAudioUpload]).annotate({ identifier: "WhatsAppAudio" }))();
|
|
1435
|
+
const WhatsAppDocument = /* @__PURE__ */ (() => Schema.Union([WhatsAppDocumentLink, WhatsAppDocumentUpload]).annotate({ identifier: "WhatsAppDocument" }))();
|
|
1436
|
+
const WhatsAppSticker = /* @__PURE__ */ (() => Schema.Union([WhatsAppStickerLink, WhatsAppStickerUpload]).annotate({ identifier: "WhatsAppSticker" }))();
|
|
1437
|
+
const WhatsAppImageHeader = /* @__PURE__ */ (() => Schema.Union([WhatsAppImageHeaderLink, WhatsAppImageHeaderUpload]).annotate({ identifier: "WhatsAppImageHeader" }))();
|
|
1438
|
+
const WhatsAppVideoHeader = /* @__PURE__ */ (() => Schema.Union([WhatsAppVideoHeaderLink, WhatsAppVideoHeaderUpload]).annotate({ identifier: "WhatsAppVideoHeader" }))();
|
|
1439
|
+
const WhatsAppDocumentHeader = /* @__PURE__ */ (() => Schema.Union([WhatsAppDocumentHeaderLink, WhatsAppDocumentHeaderUpload]).annotate({ identifier: "WhatsAppDocumentHeader" }))();
|
|
1440
|
+
const SmsContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
1441
|
+
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1442
|
+
templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
|
|
1443
|
+
templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
|
|
1444
|
+
templateData: Schema.optionalKey(SmsTemplateData)
|
|
1445
|
+
}).annotate({ identifier: "SmsContent" }))();
|
|
1446
|
+
const SmsDispatchContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
1447
|
+
text: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1448
|
+
templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
|
|
1449
|
+
templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
|
|
1450
|
+
templateData: Schema.optionalKey(SmsTemplateData)
|
|
1451
|
+
}).annotate({ identifier: "SmsDispatchContent" }))();
|
|
1017
1452
|
const ContactIdentityChannel = /* @__PURE__ */ (() => Schema.Struct({
|
|
1018
|
-
channel: Schema.
|
|
1453
|
+
channel: Schema.Union([
|
|
1454
|
+
Schema.Literal("sms"),
|
|
1455
|
+
Schema.Literal("whatsapp"),
|
|
1456
|
+
Schema.Literal("email")
|
|
1457
|
+
]),
|
|
1019
1458
|
reachability: Schema.Union([
|
|
1020
1459
|
Schema.Literal("unknown"),
|
|
1021
1460
|
Schema.Literal("reachable"),
|
|
@@ -1023,9 +1462,13 @@ const ContactIdentityChannel = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1023
1462
|
]),
|
|
1024
1463
|
consent: Schema.Union([ContactConsent, Schema.Null])
|
|
1025
1464
|
}).annotate({ identifier: "ContactIdentityChannel" }))();
|
|
1465
|
+
const WhatsAppTemplateBindings = /* @__PURE__ */ (() => Schema.Record(Schema.String, WhatsAppTemplateBinding).annotate({ description: "Template parameters filled per recipient: parameter name to the contact field it reads." }).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))).annotate({
|
|
1466
|
+
expected: "an object with property names matching the schema",
|
|
1467
|
+
identifier: "WhatsAppTemplateBindings"
|
|
1468
|
+
})))();
|
|
1026
1469
|
const CreateEventPayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
1027
1470
|
contact: ContactEventReference,
|
|
1028
|
-
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(
|
|
1471
|
+
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })).check(Schema.isPattern(new globalThis.RegExp("^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$")).annotate({ expected: "a string matching the RegExp ^(?!(?:[Cc][Oo][Nn][Tt][Aa][Cc][Tt]|[Ss][Aa][Mm][Vv][Aa])\\.)[A-Za-z][A-Za-z0-9_.-]*$" })),
|
|
1029
1472
|
properties: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null])),
|
|
1030
1473
|
occurredAt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
1031
1474
|
}).annotate({ identifier: "CreateEventPayload" }))();
|
|
@@ -1035,6 +1478,14 @@ const EmailRecipients = /* @__PURE__ */ (() => Schema.Array(EmailRecipient).chec
|
|
|
1035
1478
|
})))();
|
|
1036
1479
|
const EmailCcRecipients = /* @__PURE__ */ (() => Schema.Union([Schema.Array(EmailRecipient), Schema.Null]).annotate({ identifier: "EmailCcRecipients" }))();
|
|
1037
1480
|
const EmailBccRecipients = /* @__PURE__ */ (() => Schema.Union([Schema.Array(EmailRecipient), Schema.Null]).annotate({ identifier: "EmailBccRecipients" }))();
|
|
1481
|
+
const SmsRecipients = /* @__PURE__ */ (() => Schema.Array(SmsRecipient).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(1).annotate({
|
|
1482
|
+
expected: "a value with a length of at most 1",
|
|
1483
|
+
identifier: "SmsRecipients"
|
|
1484
|
+
})))();
|
|
1485
|
+
const WhatsAppRecipients = /* @__PURE__ */ (() => Schema.Array(WhatsAppRecipient).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(1).annotate({
|
|
1486
|
+
expected: "a value with a length of at most 1",
|
|
1487
|
+
identifier: "WhatsAppRecipients"
|
|
1488
|
+
})))();
|
|
1038
1489
|
const TopicContactRef = /* @__PURE__ */ (() => Schema.Union([
|
|
1039
1490
|
TopicContactById,
|
|
1040
1491
|
TopicContactByEmail,
|
|
@@ -1127,23 +1578,32 @@ const MailboxSendReceipt = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1127
1578
|
createdAt: Schema.String,
|
|
1128
1579
|
updatedAt: Schema.String
|
|
1129
1580
|
}).annotate({ identifier: "MailboxSendReceipt" }))();
|
|
1581
|
+
const WhatsAppListMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
1582
|
+
type: Schema.Literal("list"),
|
|
1583
|
+
header: Schema.optionalKey(WhatsAppTextHeader),
|
|
1584
|
+
body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(4096).annotate({ expected: "a string with at most 4096 code points" })).check(Schema.isMaxLength(4096).annotate({ expected: "a value with a length of at most 4096" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
1585
|
+
footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
1586
|
+
button: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" })).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
1587
|
+
sections: Schema.Array(WhatsAppListSection).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(10).annotate({ expected: "a value with a length of at most 10" }))
|
|
1588
|
+
}).annotate({ identifier: "WhatsAppListMessage" }))();
|
|
1130
1589
|
const OperationAccepted = /* @__PURE__ */ (() => Schema.Struct({
|
|
1131
1590
|
operation: Operation,
|
|
1132
1591
|
links: Schema.Struct({
|
|
1133
|
-
self: Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isPattern(
|
|
1592
|
+
self: Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isPattern(new globalThis.RegExp("^\\/v1\\/", "u")).annotate({ expected: "a string matching the RegExp ^\\/v1\\/" })).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" })),
|
|
1134
1593
|
resource: OperationResourceLink
|
|
1135
1594
|
})
|
|
1136
1595
|
}).annotate({ identifier: "OperationAccepted" }))();
|
|
1137
|
-
const
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1596
|
+
const PolicyRule = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
|
|
1597
|
+
match: PolicyRuleMatch,
|
|
1598
|
+
note: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1599
|
+
decide: PolicyRequirement,
|
|
1600
|
+
atLeast: Schema.optionalKey(Schema.Union([Schema.Never, Schema.Null]))
|
|
1601
|
+
}), Schema.Struct({
|
|
1602
|
+
match: PolicyRuleMatch,
|
|
1603
|
+
note: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1604
|
+
decide: Schema.optionalKey(Schema.Union([Schema.Never, Schema.Null])),
|
|
1605
|
+
atLeast: PolicyRequirement
|
|
1606
|
+
})]).annotate({ identifier: "PolicyRule" }))();
|
|
1147
1607
|
const CampaignEmailInput = /* @__PURE__ */ (() => Schema.Struct({
|
|
1148
1608
|
subject: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
1149
1609
|
html: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -1152,7 +1612,7 @@ const CampaignEmailInput = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1152
1612
|
publicationId: Schema.optionalKey(TemplatePublicationId),
|
|
1153
1613
|
inputContractId: Schema.optionalKey(TemplateInputContractId),
|
|
1154
1614
|
templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
|
|
1155
|
-
templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(
|
|
1615
|
+
templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
|
|
1156
1616
|
templateData: Schema.optionalKey(TemplateData),
|
|
1157
1617
|
locale: Schema.optionalKey(RenderLocale),
|
|
1158
1618
|
timeZone: Schema.optionalKey(RenderTimeZone),
|
|
@@ -1172,7 +1632,7 @@ const EmailContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1172
1632
|
publicationId: Schema.optionalKey(TemplatePublicationId),
|
|
1173
1633
|
inputContractId: Schema.optionalKey(TemplateInputContractId),
|
|
1174
1634
|
templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null])),
|
|
1175
|
-
templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(
|
|
1635
|
+
templateSlug: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" })), Schema.Null])),
|
|
1176
1636
|
templateData: Schema.optionalKey(TemplateData),
|
|
1177
1637
|
locale: Schema.optionalKey(RenderLocale),
|
|
1178
1638
|
timeZone: Schema.optionalKey(RenderTimeZone),
|
|
@@ -1183,6 +1643,25 @@ const EmailContent = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1183
1643
|
footer: Schema.optionalKey(EmailFooterOverride),
|
|
1184
1644
|
headers: Schema.optionalKey(Schema.Union([EmailCustomHeaders, Schema.Null]))
|
|
1185
1645
|
}).annotate({ identifier: "EmailContent" }))();
|
|
1646
|
+
const WhatsAppOutboundMedia = /* @__PURE__ */ (() => Schema.Union([
|
|
1647
|
+
WhatsAppImage,
|
|
1648
|
+
WhatsAppVideo,
|
|
1649
|
+
WhatsAppAudio,
|
|
1650
|
+
WhatsAppDocument,
|
|
1651
|
+
WhatsAppSticker
|
|
1652
|
+
]).annotate({ identifier: "WhatsAppOutboundMedia" }))();
|
|
1653
|
+
const WhatsAppInteractiveHeader = /* @__PURE__ */ (() => Schema.Union([
|
|
1654
|
+
WhatsAppTextHeader,
|
|
1655
|
+
WhatsAppImageHeader,
|
|
1656
|
+
WhatsAppVideoHeader,
|
|
1657
|
+
WhatsAppDocumentHeader
|
|
1658
|
+
]).annotate({ identifier: "WhatsAppInteractiveHeader" }))();
|
|
1659
|
+
const SmsCampaignContentInput = /* @__PURE__ */ (() => Schema.Struct({
|
|
1660
|
+
channel: Schema.Literal("sms"),
|
|
1661
|
+
sms: SmsDispatchContent,
|
|
1662
|
+
conversationId: Schema.optionalKey(CampaignConversationRef),
|
|
1663
|
+
metadata: Schema.optionalKey(CampaignContentMetadata)
|
|
1664
|
+
}).annotate({ identifier: "SmsCampaignContentInput" }))();
|
|
1186
1665
|
const ContactIdentity = /* @__PURE__ */ (() => Schema.Struct({
|
|
1187
1666
|
id: ContactIdentityId,
|
|
1188
1667
|
type: Schema.Union([Schema.Literal("email"), Schema.Literal("phone")]),
|
|
@@ -1190,6 +1669,22 @@ const ContactIdentity = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
1190
1669
|
verified: Schema.Boolean,
|
|
1191
1670
|
channels: Schema.Array(ContactIdentityChannel)
|
|
1192
1671
|
}).annotate({ identifier: "ContactIdentity" }))();
|
|
1672
|
+
const WhatsAppTemplateDispatch = /* @__PURE__ */ (() => Schema.Struct({
|
|
1673
|
+
template: Schema.Union([TemplateId, Schema.String.check(Schema.isPattern(new globalThis.RegExp("^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$", "u")).annotate({ expected: "a string matching the RegExp ^(?=.{1,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$" }))]),
|
|
1674
|
+
templateData: Schema.optionalKey(WhatsAppTemplateDispatchData),
|
|
1675
|
+
bindings: Schema.optionalKey(WhatsAppTemplateBindings),
|
|
1676
|
+
businessAccountId: Schema.optionalKey(WhatsAppBusinessAccountId)
|
|
1677
|
+
}).annotate({ identifier: "WhatsAppTemplateDispatch" }))();
|
|
1678
|
+
const SmsSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
1679
|
+
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
1680
|
+
metadata: Schema.optionalKey(MessageMetadata),
|
|
1681
|
+
channel: Schema.Literal("sms"),
|
|
1682
|
+
to: SmsRecipients,
|
|
1683
|
+
sms: SmsContent
|
|
1684
|
+
}).annotate({
|
|
1685
|
+
description: "The payload is accepted by the contract today and the endpoint answers 403 until the channel launches for your organization.",
|
|
1686
|
+
identifier: "SmsSendMessagePayload"
|
|
1687
|
+
}))();
|
|
1193
1688
|
const JourneyWaitForEventNode = /* @__PURE__ */ (() => Schema.Struct({
|
|
1194
1689
|
type: Schema.Literal("wait_for_event"),
|
|
1195
1690
|
config: JourneyWaitForEventConfig,
|
|
@@ -1211,33 +1706,113 @@ var MailboxSendConflictError = class extends Schema.TaggedError()("MailboxSendCo
|
|
|
1211
1706
|
id: MailboxActionId,
|
|
1212
1707
|
receipt: MailboxSendReceipt
|
|
1213
1708
|
})) {};
|
|
1214
|
-
const
|
|
1709
|
+
const PolicyConfiguration = /* @__PURE__ */ (() => Schema.Struct({
|
|
1710
|
+
presets: Schema.Array(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))),
|
|
1711
|
+
rules: Schema.Array(PolicyRule),
|
|
1712
|
+
instructions: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
1713
|
+
}).annotate({ identifier: "PolicyConfiguration" }))();
|
|
1714
|
+
const EmailCampaignContentInput = /* @__PURE__ */ (() => Schema.Struct({
|
|
1215
1715
|
channel: Schema.Literal("email"),
|
|
1216
1716
|
email: CampaignEmailInput,
|
|
1217
1717
|
issue: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
1218
|
-
path: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(
|
|
1219
|
-
commit: Schema.String.check(Schema.isPattern(
|
|
1718
|
+
path: Schema.String.check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isPattern(new globalThis.RegExp("^(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?!.*\\p{Cc})issues\\/(?:[^/]+\\/)*[^/]+\\.md$", "u")).annotate({ expected: "a string matching the RegExp ^(?!.*\\\\)(?!.*(?:^|\\/)\\.{1,2}(?:\\/|$))(?!.*(?:^|\\/)\\.git(?:\\/|$))(?!.*\\p{Cc})issues\\/(?:[^/]+\\/)*[^/]+\\.md$" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })),
|
|
1719
|
+
commit: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-f0-9]{40}$", "u")).annotate({ expected: "a string matching the RegExp ^[a-f0-9]{40}$" }))
|
|
1220
1720
|
}), Schema.Null]).annotate({ description: "Render a saved Markdown issue from the audience topic's repository. Its saved title and preheader supply the email content; templateData supplies recipient fallbacks." })),
|
|
1221
1721
|
from: Schema.optionalKey(CampaignFromInput),
|
|
1222
1722
|
replyMailboxId: Schema.optionalKey(CampaignReplyMailbox),
|
|
1223
1723
|
conversationId: Schema.optionalKey(CampaignConversationRef),
|
|
1224
1724
|
metadata: Schema.optionalKey(CampaignContentMetadata)
|
|
1225
|
-
}).annotate({ identifier: "
|
|
1725
|
+
}).annotate({ identifier: "EmailCampaignContentInput" }))();
|
|
1726
|
+
const EmailSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
1727
|
+
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
1728
|
+
metadata: Schema.optionalKey(MessageMetadata),
|
|
1729
|
+
channel: Schema.Literal("email"),
|
|
1730
|
+
to: EmailRecipients,
|
|
1731
|
+
cc: Schema.optionalKey(EmailCcRecipients),
|
|
1732
|
+
bcc: Schema.optionalKey(EmailBccRecipients),
|
|
1733
|
+
from: Schema.optionalKey(EmailSender),
|
|
1734
|
+
email: EmailContent
|
|
1735
|
+
}).annotate({ identifier: "EmailSendMessagePayload" }))();
|
|
1736
|
+
const WhatsAppMediaContent = /* @__PURE__ */ (() => Schema.Struct({ media: WhatsAppOutboundMedia }).annotate({ identifier: "WhatsAppMediaContent" }))();
|
|
1737
|
+
const WhatsAppButtonsMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
1738
|
+
type: Schema.Literal("buttons"),
|
|
1739
|
+
header: Schema.optionalKey(WhatsAppInteractiveHeader),
|
|
1740
|
+
body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
1741
|
+
footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
1742
|
+
buttons: Schema.Array(WhatsAppReplyButton).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxLength(3).annotate({ expected: "a value with a length of at most 3" }))
|
|
1743
|
+
}).annotate({ identifier: "WhatsAppButtonsMessage" }))();
|
|
1744
|
+
const WhatsAppCtaUrlMessage = /* @__PURE__ */ (() => Schema.Struct({
|
|
1745
|
+
type: Schema.Literal("cta_url"),
|
|
1746
|
+
header: Schema.optionalKey(WhatsAppInteractiveHeader),
|
|
1747
|
+
body: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(1024).annotate({ expected: "a string with at most 1024 code points" })).check(Schema.isMaxLength(1024).annotate({ expected: "a value with a length of at most 1024" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
1748
|
+
footer: Schema.optionalKey(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(60).annotate({ expected: "a string with at most 60 code points" })).check(Schema.isMaxLength(60).annotate({ expected: "a value with a length of at most 60" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" }))),
|
|
1749
|
+
displayText: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(20).annotate({ expected: "a string with at most 20 code points" })).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })).check(Schema.isPattern(new globalThis.RegExp("\\S")).annotate({ expected: "a string matching the RegExp \\S" })),
|
|
1750
|
+
url: Schema.String
|
|
1751
|
+
}).annotate({ identifier: "WhatsAppCtaUrlMessage" }))();
|
|
1752
|
+
const WhatsAppCampaignContentInput = /* @__PURE__ */ (() => Schema.Struct({
|
|
1753
|
+
channel: Schema.Literal("whatsapp"),
|
|
1754
|
+
whatsapp: WhatsAppTemplateDispatch,
|
|
1755
|
+
conversationId: Schema.optionalKey(CampaignConversationRef),
|
|
1756
|
+
metadata: Schema.optionalKey(CampaignContentMetadata)
|
|
1757
|
+
}).annotate({ identifier: "WhatsAppCampaignContentInput" }))();
|
|
1758
|
+
const WhatsAppJourneySendNode = /* @__PURE__ */ (() => Schema.Struct({
|
|
1759
|
+
type: Schema.Literal("send_whatsapp"),
|
|
1760
|
+
config: WhatsAppTemplateDispatch,
|
|
1761
|
+
next: Schema.Tuple([JourneyNextEdge])
|
|
1762
|
+
}).annotate({ identifier: "WhatsAppJourneySendNode" }))();
|
|
1226
1763
|
const JourneyCondition = /* @__PURE__ */ (() => Schema.Struct({
|
|
1227
1764
|
match: Schema.Union([Schema.Literal("all"), Schema.Literal("any")]),
|
|
1228
1765
|
predicates: Schema.TupleWithRest(Schema.Tuple([JourneyPredicate]), [JourneyPredicate])
|
|
1229
1766
|
}).annotate({ identifier: "JourneyCondition" }))();
|
|
1767
|
+
const AgentDefinition = /* @__PURE__ */ (() => Schema.Struct({
|
|
1768
|
+
instructions: Schema.String.check(Schema.isMaxCodePoints(2e4).annotate({ expected: "a string with at most 20000 code points" })).check(Schema.isMaxLength(2e4).annotate({ expected: "a value with a length of at most 20000" })),
|
|
1769
|
+
knowledge: Schema.String.check(Schema.isMaxCodePoints(1e5).annotate({ expected: "a string with at most 100000 code points" })).check(Schema.isMaxLength(1e5).annotate({ expected: "a value with a length of at most 100000" })),
|
|
1770
|
+
knowledgeSourceIds: Schema.optionalKey(Schema.Array(KnowledgeSourceId).check(Schema.isMaxLength(25).annotate({ expected: "a value with a length of at most 25" }))),
|
|
1771
|
+
endpointIds: Schema.Array(MailboxEndpointId).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
|
|
1772
|
+
integrations: Schema.Array(AgentIntegrationGrant).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
|
|
1773
|
+
policy: PolicyConfiguration,
|
|
1774
|
+
model: AgentModelChoice,
|
|
1775
|
+
reasoning: AgentReasoning,
|
|
1776
|
+
workingHours: Schema.Union([WorkingHours, Schema.Null]),
|
|
1777
|
+
takeoverTimeoutMinutes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(1).annotate({ expected: "a value greater than or equal to 1" })).check(Schema.isLessThanOrEqualTo(10080).annotate({ expected: "a value less than or equal to 10080" }))
|
|
1778
|
+
}).annotate({ identifier: "AgentDefinition" }))();
|
|
1779
|
+
const WhatsAppInteractive = /* @__PURE__ */ (() => Schema.Union([
|
|
1780
|
+
WhatsAppButtonsMessage,
|
|
1781
|
+
WhatsAppListMessage,
|
|
1782
|
+
WhatsAppCtaUrlMessage,
|
|
1783
|
+
WhatsAppFlowMessage
|
|
1784
|
+
]).annotate({ identifier: "WhatsAppInteractive" }))();
|
|
1785
|
+
const CampaignContentInput = /* @__PURE__ */ (() => Schema.Union([
|
|
1786
|
+
EmailCampaignContentInput,
|
|
1787
|
+
SmsCampaignContentInput,
|
|
1788
|
+
WhatsAppCampaignContentInput
|
|
1789
|
+
]).annotate({ identifier: "CampaignContentInput" }))();
|
|
1230
1790
|
const JourneyBranchEdge = /* @__PURE__ */ (() => Schema.Struct({
|
|
1231
1791
|
nodeId: JourneyNodeId,
|
|
1232
1792
|
condition: Schema.optionalKey(JourneyCondition)
|
|
1233
1793
|
}).annotate({ identifier: "JourneyBranchEdge" }))();
|
|
1794
|
+
const WhatsAppInteractiveContent = /* @__PURE__ */ (() => Schema.Struct({ interactive: WhatsAppInteractive }).annotate({ identifier: "WhatsAppInteractiveContent" }))();
|
|
1234
1795
|
const JourneyBranchNode = /* @__PURE__ */ (() => Schema.Struct({
|
|
1235
1796
|
type: Schema.Literal("branch"),
|
|
1236
1797
|
config: JourneyEmptyConfig,
|
|
1237
1798
|
next: Schema.Array(JourneyBranchEdge).check(Schema.isMinLength(2).annotate({ expected: "a value with a length of at least 2" }))
|
|
1238
1799
|
}).annotate({ identifier: "JourneyBranchNode" }))();
|
|
1800
|
+
const WhatsAppContent = /* @__PURE__ */ (() => Schema.Union([
|
|
1801
|
+
WhatsAppTextContent,
|
|
1802
|
+
WhatsAppTemplateIdContent,
|
|
1803
|
+
WhatsAppTemplateSlugContent,
|
|
1804
|
+
WhatsAppMediaContent,
|
|
1805
|
+
WhatsAppInteractiveContent,
|
|
1806
|
+
WhatsAppReactionContent,
|
|
1807
|
+
WhatsAppLocationContent,
|
|
1808
|
+
WhatsAppContactsContent
|
|
1809
|
+
]).annotate({
|
|
1810
|
+
description: "Exactly one content source: text, an approved template (by id or slug, with its templateData), media, an interactive message (reply buttons, a list, a call-to-action link, or a flow), a reaction, a location, or contacts. Everything except a template needs the recipient's 24-hour customer service window to be open.",
|
|
1811
|
+
identifier: "WhatsAppContent"
|
|
1812
|
+
}))();
|
|
1239
1813
|
const JourneyNode = /* @__PURE__ */ (() => Schema.Union([
|
|
1240
1814
|
JourneySendEmailNode,
|
|
1815
|
+
WhatsAppJourneySendNode,
|
|
1241
1816
|
JourneyWaitNode,
|
|
1242
1817
|
JourneyWaitForEventNode,
|
|
1243
1818
|
JourneyBranchNode,
|
|
@@ -1245,6 +1820,16 @@ const JourneyNode = /* @__PURE__ */ (() => Schema.Union([
|
|
|
1245
1820
|
JourneyWebhookNode,
|
|
1246
1821
|
JourneyExitNode
|
|
1247
1822
|
]).annotate({ identifier: "JourneyNode" }))();
|
|
1823
|
+
const WhatsAppSendMessagePayload = /* @__PURE__ */ (() => Schema.Struct({
|
|
1824
|
+
conversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
1825
|
+
metadata: Schema.optionalKey(MessageMetadata),
|
|
1826
|
+
channel: Schema.Literal("whatsapp"),
|
|
1827
|
+
to: WhatsAppRecipients,
|
|
1828
|
+
whatsapp: WhatsAppContent
|
|
1829
|
+
}).annotate({
|
|
1830
|
+
description: "The payload is accepted by the contract today and the endpoint answers 403 until the channel launches for your organization.",
|
|
1831
|
+
identifier: "WhatsAppSendMessagePayload"
|
|
1832
|
+
}))();
|
|
1248
1833
|
const JourneyDefinition = /* @__PURE__ */ (() => Schema.Struct({
|
|
1249
1834
|
trigger: JourneyTrigger,
|
|
1250
1835
|
rootNodeId: JourneyNodeId,
|
|
@@ -1265,6 +1850,6 @@ const ApiKeySecurity = HttpApiSecurity.apiKey({
|
|
|
1265
1850
|
in: "header"
|
|
1266
1851
|
});
|
|
1267
1852
|
var ApiKeySecurityMiddleware = class extends HttpApiMiddleware.Service()("apiKey security", { security: { apiKey: ApiKeySecurity } }) {};
|
|
1268
|
-
export { AgentDefinition,
|
|
1853
|
+
export { AgentDefinition, AgentId, AgentIntegrationGrant, AgentModel, AgentModelChoice, AgentName, AgentReasoning, AgentToolScope, AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignAudience, CampaignContentInput, CampaignContentMetadata, CampaignConversationRef, CampaignEmailInput, CampaignFooterRequiredError, CampaignFromInput, CampaignId, CampaignLatestRun, CampaignReplyMailbox, CampaignRunId, CatalogModelId, ClockTime, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxChatDraftPayload, CreateMailboxEmailDraftPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCampaignContentInput, EmailCcRecipients, EmailChannelError, EmailContent, EmailCustomHeaders, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSendMessagePayload, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionInstallationId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, FromAddressRequiredError, GatewayTimeoutError, IanaTimezone, IntegrationId, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, KnowledgeSourceId, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxSendConflictError, MailboxSendError, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MalformedRequestError, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, MonthlySpendCapDollars, NamespaceId, NamespaceMetadata, NamespaceResourceType, NewsletterId, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, PolicyConfiguration, PolicyDecider, PolicyDecisionId, PolicyEffect, PolicyRequirement, PolicyReviewRound, PolicyRule, PolicyRuleMatch, PolicySubject, PolicyVersion, RateLimitedError, RenderLocale, RenderTimeZone, ReplyMailboxChatPayload, ReplyMailboxEmailPayload, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SendMailboxChatPayload, SendMailboxEmailPayload, SenderNotReadyError, SendsSeries, ServiceUnavailableError, SkippedRecipient, SmsCampaignContentInput, SmsContent, SmsDispatchContent, SmsRecipient, SmsRecipients, SmsSendMessagePayload, SmsTemplateData, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInUseError, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplateSourceError, TemplateTrackingDefault, TestWebhookPayload, TimeZone, TopicContactByEmail, TopicContactById, TopicContactByPhone, TopicContactRef, TopicId, UnauthorizedError, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, Weekday, WhatsAppAudio, WhatsAppAudioLink, WhatsAppAudioUpload, WhatsAppBusinessAccountId, WhatsAppButtonsMessage, WhatsAppCampaignContentInput, WhatsAppContactCard, WhatsAppContactsContent, WhatsAppContent, WhatsAppCtaUrlMessage, WhatsAppDocument, WhatsAppDocumentHeader, WhatsAppDocumentHeaderLink, WhatsAppDocumentHeaderUpload, WhatsAppDocumentLink, WhatsAppDocumentUpload, WhatsAppFlowId, WhatsAppFlowMessage, WhatsAppImage, WhatsAppImageHeader, WhatsAppImageHeaderLink, WhatsAppImageHeaderUpload, WhatsAppImageLink, WhatsAppImageUpload, WhatsAppInteractive, WhatsAppInteractiveContent, WhatsAppInteractiveHeader, WhatsAppJourneySendNode, WhatsAppListMessage, WhatsAppListRow, WhatsAppListSection, WhatsAppLocation, WhatsAppLocationContent, WhatsAppMediaContent, WhatsAppOutboundMedia, WhatsAppReaction, WhatsAppReactionContent, WhatsAppRecipient, WhatsAppRecipients, WhatsAppReplyButton, WhatsAppSendMessagePayload, WhatsAppServiceWindowClosedError, WhatsAppSticker, WhatsAppStickerLink, WhatsAppStickerUpload, WhatsAppTemplateBinding, WhatsAppTemplateBindings, WhatsAppTemplateContactBinding, WhatsAppTemplateCustomFieldBinding, WhatsAppTemplateData, WhatsAppTemplateDispatch, WhatsAppTemplateDispatchData, WhatsAppTemplateIdContent, WhatsAppTemplateSlugContent, WhatsAppTextContent, WhatsAppTextHeader, WhatsAppVideo, WhatsAppVideoHeader, WhatsAppVideoHeaderLink, WhatsAppVideoHeaderUpload, WhatsAppVideoLink, WhatsAppVideoUpload, WorkingHours, WorkingHoursRange, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
|
|
1269
1854
|
|
|
1270
1855
|
//# sourceMappingURL=shared.js.map
|