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
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ContactId, ConversationId,
|
|
1
|
+
import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MalformedRequestError, MessagePage, NamespaceId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
// src/effect/generated/conversations.ts
|
|
5
5
|
const UnknownRecord = /* @__PURE__ */ (() => Schema.Record(Schema.String, JsonValue).annotate({ identifier: "UnknownRecord" }))();
|
|
6
6
|
const ConversationSummary = /* @__PURE__ */ (() => Schema.Struct({
|
|
7
7
|
id: ConversationId,
|
|
8
|
+
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
8
9
|
title: Schema.Union([Schema.String, Schema.Null]),
|
|
9
10
|
externalId: Schema.Union([Schema.String, Schema.Null]),
|
|
10
11
|
status: Schema.Union([
|
|
@@ -14,8 +15,16 @@ const ConversationSummary = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
14
15
|
Schema.Literal("escalated"),
|
|
15
16
|
Schema.Literal("archived")
|
|
16
17
|
]),
|
|
17
|
-
primaryChannel: Schema.
|
|
18
|
-
|
|
18
|
+
primaryChannel: Schema.Union([
|
|
19
|
+
Schema.Literal("sms"),
|
|
20
|
+
Schema.Literal("whatsapp"),
|
|
21
|
+
Schema.Literal("email")
|
|
22
|
+
]),
|
|
23
|
+
channels: Schema.Array(Schema.Union([
|
|
24
|
+
Schema.Literal("sms"),
|
|
25
|
+
Schema.Literal("whatsapp"),
|
|
26
|
+
Schema.Literal("email")
|
|
27
|
+
])),
|
|
19
28
|
priority: 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" })),
|
|
20
29
|
urgency: Schema.Union([
|
|
21
30
|
Schema.Literal("low"),
|
|
@@ -56,6 +65,7 @@ const ConversationPage = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
56
65
|
}).annotate({ identifier: "ConversationPage" }))();
|
|
57
66
|
const Conversation = /* @__PURE__ */ (() => Schema.Struct({
|
|
58
67
|
id: ConversationId,
|
|
68
|
+
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
59
69
|
title: Schema.Union([Schema.String, Schema.Null]),
|
|
60
70
|
externalId: Schema.Union([Schema.String, Schema.Null]),
|
|
61
71
|
status: Schema.Union([
|
|
@@ -65,8 +75,16 @@ const Conversation = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
65
75
|
Schema.Literal("escalated"),
|
|
66
76
|
Schema.Literal("archived")
|
|
67
77
|
]),
|
|
68
|
-
primaryChannel: Schema.
|
|
69
|
-
|
|
78
|
+
primaryChannel: Schema.Union([
|
|
79
|
+
Schema.Literal("sms"),
|
|
80
|
+
Schema.Literal("whatsapp"),
|
|
81
|
+
Schema.Literal("email")
|
|
82
|
+
]),
|
|
83
|
+
channels: Schema.Array(Schema.Union([
|
|
84
|
+
Schema.Literal("sms"),
|
|
85
|
+
Schema.Literal("whatsapp"),
|
|
86
|
+
Schema.Literal("email")
|
|
87
|
+
])),
|
|
70
88
|
priority: 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" })),
|
|
71
89
|
urgency: Schema.Union([
|
|
72
90
|
Schema.Literal("low"),
|
|
@@ -109,33 +127,48 @@ const Conversation = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
109
127
|
}).annotate({ identifier: "Conversation" }))();
|
|
110
128
|
const ConversationsListQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
111
129
|
limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
|
|
112
|
-
cursor: Schema.optionalKey(Schema.
|
|
113
|
-
|
|
130
|
+
cursor: Schema.optionalKey(Schema.String),
|
|
131
|
+
namespaceId: Schema.optionalKey(NamespaceId),
|
|
132
|
+
status: Schema.optionalKey(Schema.Union([
|
|
114
133
|
Schema.Literal("active"),
|
|
115
134
|
Schema.Literal("waiting"),
|
|
116
135
|
Schema.Literal("resolved"),
|
|
117
136
|
Schema.Literal("escalated"),
|
|
118
137
|
Schema.Literal("archived")
|
|
119
|
-
])
|
|
120
|
-
channel: Schema.optionalKey(Schema.Union([
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
138
|
+
])),
|
|
139
|
+
channel: Schema.optionalKey(Schema.Union([
|
|
140
|
+
Schema.Literal("sms"),
|
|
141
|
+
Schema.Literal("whatsapp"),
|
|
142
|
+
Schema.Literal("email")
|
|
143
|
+
])),
|
|
144
|
+
contactId: Schema.optionalKey(ContactId),
|
|
145
|
+
mailboxId: Schema.optionalKey(MailboxId),
|
|
146
|
+
after: Schema.optionalKey(Schema.String),
|
|
147
|
+
before: Schema.optionalKey(Schema.String)
|
|
125
148
|
}))();
|
|
126
149
|
const ConversationsList200 = ConversationPage;
|
|
150
|
+
const ConversationsList400 = MalformedRequestError;
|
|
127
151
|
const ConversationsList401 = UnauthorizedError;
|
|
128
152
|
const ConversationsList403 = ForbiddenError;
|
|
129
153
|
const ConversationsList422 = ValidationError;
|
|
130
154
|
const ConversationsList500 = InternalError;
|
|
131
155
|
const ConversationsList504 = GatewayTimeoutError;
|
|
132
156
|
const ConversationsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
157
|
+
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
133
158
|
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
134
159
|
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
135
160
|
externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
136
161
|
parentConversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
137
|
-
channels: Schema.Array(Schema.
|
|
138
|
-
|
|
162
|
+
channels: Schema.Array(Schema.Union([
|
|
163
|
+
Schema.Literal("sms"),
|
|
164
|
+
Schema.Literal("whatsapp"),
|
|
165
|
+
Schema.Literal("email")
|
|
166
|
+
])),
|
|
167
|
+
primaryChannel: Schema.Union([
|
|
168
|
+
Schema.Literal("sms"),
|
|
169
|
+
Schema.Literal("whatsapp"),
|
|
170
|
+
Schema.Literal("email")
|
|
171
|
+
]),
|
|
139
172
|
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
140
173
|
Schema.Literal("active"),
|
|
141
174
|
Schema.Literal("waiting"),
|
|
@@ -165,13 +198,17 @@ const ConversationsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
165
198
|
isPrivate: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
166
199
|
}))();
|
|
167
200
|
const ConversationsCreate201 = Conversation;
|
|
201
|
+
const ConversationsCreate400 = MalformedRequestError;
|
|
168
202
|
const ConversationsCreate401 = UnauthorizedError;
|
|
169
203
|
const ConversationsCreate403 = ForbiddenError;
|
|
204
|
+
const ConversationsCreate404 = ResourceNotFoundError;
|
|
205
|
+
const ConversationsCreate409 = ConflictError;
|
|
170
206
|
const ConversationsCreate422 = ValidationError;
|
|
171
207
|
const ConversationsCreate500 = InternalError;
|
|
172
208
|
const ConversationsCreate504 = GatewayTimeoutError;
|
|
173
209
|
const ConversationsGetByIdPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
174
210
|
const ConversationsGetById200 = Conversation;
|
|
211
|
+
const ConversationsGetById400 = MalformedRequestError;
|
|
175
212
|
const ConversationsGetById401 = UnauthorizedError;
|
|
176
213
|
const ConversationsGetById403 = ForbiddenError;
|
|
177
214
|
const ConversationsGetById404 = ResourceNotFoundError;
|
|
@@ -184,7 +221,11 @@ const ConversationsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
184
221
|
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
185
222
|
externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
186
223
|
parentConversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
187
|
-
primaryChannel: Schema.optionalKey(Schema.Union([Schema.
|
|
224
|
+
primaryChannel: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
225
|
+
Schema.Literal("sms"),
|
|
226
|
+
Schema.Literal("whatsapp"),
|
|
227
|
+
Schema.Literal("email")
|
|
228
|
+
]), Schema.Null])),
|
|
188
229
|
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
189
230
|
Schema.Literal("active"),
|
|
190
231
|
Schema.Literal("waiting"),
|
|
@@ -212,15 +253,18 @@ const ConversationsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
212
253
|
isPrivate: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
213
254
|
}))();
|
|
214
255
|
const ConversationsUpdate200 = Conversation;
|
|
256
|
+
const ConversationsUpdate400 = MalformedRequestError;
|
|
215
257
|
const ConversationsUpdate401 = UnauthorizedError;
|
|
216
258
|
const ConversationsUpdate403 = ForbiddenError;
|
|
217
259
|
const ConversationsUpdate404 = ResourceNotFoundError;
|
|
260
|
+
const ConversationsUpdate409 = ConflictError;
|
|
218
261
|
const ConversationsUpdate422 = ValidationError;
|
|
219
262
|
const ConversationsUpdate500 = InternalError;
|
|
220
263
|
const ConversationsUpdate504 = GatewayTimeoutError;
|
|
221
264
|
const ConversationsAddCategoriesPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
222
265
|
const ConversationsAddCategoriesRequestJson = /* @__PURE__ */ (() => Schema.Struct({ categories: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) }))();
|
|
223
266
|
const ConversationsAddCategories200 = Conversation;
|
|
267
|
+
const ConversationsAddCategories400 = MalformedRequestError;
|
|
224
268
|
const ConversationsAddCategories401 = UnauthorizedError;
|
|
225
269
|
const ConversationsAddCategories403 = ForbiddenError;
|
|
226
270
|
const ConversationsAddCategories404 = ResourceNotFoundError;
|
|
@@ -230,6 +274,7 @@ const ConversationsAddCategories504 = GatewayTimeoutError;
|
|
|
230
274
|
const ConversationsRemoveCategoriesPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
231
275
|
const ConversationsRemoveCategoriesRequestJson = /* @__PURE__ */ (() => Schema.Struct({ categories: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) }))();
|
|
232
276
|
const ConversationsRemoveCategories200 = Conversation;
|
|
277
|
+
const ConversationsRemoveCategories400 = MalformedRequestError;
|
|
233
278
|
const ConversationsRemoveCategories401 = UnauthorizedError;
|
|
234
279
|
const ConversationsRemoveCategories403 = ForbiddenError;
|
|
235
280
|
const ConversationsRemoveCategories404 = ResourceNotFoundError;
|
|
@@ -237,8 +282,17 @@ const ConversationsRemoveCategories422 = ValidationError;
|
|
|
237
282
|
const ConversationsRemoveCategories500 = InternalError;
|
|
238
283
|
const ConversationsRemoveCategories504 = GatewayTimeoutError;
|
|
239
284
|
const ConversationsAddChannelsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
240
|
-
const ConversationsAddChannelsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ channels: Schema.TupleWithRest(Schema.Tuple([Schema.
|
|
285
|
+
const ConversationsAddChannelsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ channels: Schema.TupleWithRest(Schema.Tuple([Schema.Union([
|
|
286
|
+
Schema.Literal("sms"),
|
|
287
|
+
Schema.Literal("whatsapp"),
|
|
288
|
+
Schema.Literal("email")
|
|
289
|
+
])]), [Schema.Union([
|
|
290
|
+
Schema.Literal("sms"),
|
|
291
|
+
Schema.Literal("whatsapp"),
|
|
292
|
+
Schema.Literal("email")
|
|
293
|
+
])]) }))();
|
|
241
294
|
const ConversationsAddChannels200 = Conversation;
|
|
295
|
+
const ConversationsAddChannels400 = MalformedRequestError;
|
|
242
296
|
const ConversationsAddChannels401 = UnauthorizedError;
|
|
243
297
|
const ConversationsAddChannels403 = ForbiddenError;
|
|
244
298
|
const ConversationsAddChannels404 = ResourceNotFoundError;
|
|
@@ -246,8 +300,17 @@ const ConversationsAddChannels422 = ValidationError;
|
|
|
246
300
|
const ConversationsAddChannels500 = InternalError;
|
|
247
301
|
const ConversationsAddChannels504 = GatewayTimeoutError;
|
|
248
302
|
const ConversationsRemoveChannelsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
249
|
-
const ConversationsRemoveChannelsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ channels: Schema.TupleWithRest(Schema.Tuple([Schema.
|
|
303
|
+
const ConversationsRemoveChannelsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ channels: Schema.TupleWithRest(Schema.Tuple([Schema.Union([
|
|
304
|
+
Schema.Literal("sms"),
|
|
305
|
+
Schema.Literal("whatsapp"),
|
|
306
|
+
Schema.Literal("email")
|
|
307
|
+
])]), [Schema.Union([
|
|
308
|
+
Schema.Literal("sms"),
|
|
309
|
+
Schema.Literal("whatsapp"),
|
|
310
|
+
Schema.Literal("email")
|
|
311
|
+
])]) }))();
|
|
250
312
|
const ConversationsRemoveChannels200 = Conversation;
|
|
313
|
+
const ConversationsRemoveChannels400 = MalformedRequestError;
|
|
251
314
|
const ConversationsRemoveChannels401 = UnauthorizedError;
|
|
252
315
|
const ConversationsRemoveChannels403 = ForbiddenError;
|
|
253
316
|
const ConversationsRemoveChannels404 = ResourceNotFoundError;
|
|
@@ -257,6 +320,7 @@ const ConversationsRemoveChannels504 = GatewayTimeoutError;
|
|
|
257
320
|
const ConversationsAddContactsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
258
321
|
const ConversationsAddContactsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ contactIds: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })) }))();
|
|
259
322
|
const ConversationsAddContacts200 = Conversation;
|
|
323
|
+
const ConversationsAddContacts400 = MalformedRequestError;
|
|
260
324
|
const ConversationsAddContacts401 = UnauthorizedError;
|
|
261
325
|
const ConversationsAddContacts403 = ForbiddenError;
|
|
262
326
|
const ConversationsAddContacts404 = ResourceNotFoundError;
|
|
@@ -266,6 +330,7 @@ const ConversationsAddContacts504 = GatewayTimeoutError;
|
|
|
266
330
|
const ConversationsRemoveContactsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
267
331
|
const ConversationsRemoveContactsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ contactIds: Schema.TupleWithRest(Schema.Tuple([ContactId]), [ContactId]).check(Schema.isMaxLength(1e3).annotate({ expected: "a value with a length of at most 1000" })) }))();
|
|
268
332
|
const ConversationsRemoveContacts200 = Conversation;
|
|
333
|
+
const ConversationsRemoveContacts400 = MalformedRequestError;
|
|
269
334
|
const ConversationsRemoveContacts401 = UnauthorizedError;
|
|
270
335
|
const ConversationsRemoveContacts403 = ForbiddenError;
|
|
271
336
|
const ConversationsRemoveContacts404 = ResourceNotFoundError;
|
|
@@ -275,11 +340,12 @@ const ConversationsRemoveContacts504 = GatewayTimeoutError;
|
|
|
275
340
|
const ConversationsListMessagesPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
276
341
|
const ConversationsListMessagesQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
277
342
|
limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
|
|
278
|
-
cursor: Schema.optionalKey(Schema.
|
|
279
|
-
after: Schema.optionalKey(Schema.
|
|
280
|
-
before: Schema.optionalKey(Schema.
|
|
343
|
+
cursor: Schema.optionalKey(Schema.String),
|
|
344
|
+
after: Schema.optionalKey(Schema.String),
|
|
345
|
+
before: Schema.optionalKey(Schema.String)
|
|
281
346
|
}))();
|
|
282
347
|
const ConversationsListMessages200 = MessagePage;
|
|
348
|
+
const ConversationsListMessages400 = MalformedRequestError;
|
|
283
349
|
const ConversationsListMessages401 = UnauthorizedError;
|
|
284
350
|
const ConversationsListMessages403 = ForbiddenError;
|
|
285
351
|
const ConversationsListMessages404 = ResourceNotFoundError;
|
|
@@ -289,6 +355,7 @@ const ConversationsListMessages504 = GatewayTimeoutError;
|
|
|
289
355
|
const ConversationsAddTagsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
290
356
|
const ConversationsAddTagsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) }))();
|
|
291
357
|
const ConversationsAddTags200 = Conversation;
|
|
358
|
+
const ConversationsAddTags400 = MalformedRequestError;
|
|
292
359
|
const ConversationsAddTags401 = UnauthorizedError;
|
|
293
360
|
const ConversationsAddTags403 = ForbiddenError;
|
|
294
361
|
const ConversationsAddTags404 = ResourceNotFoundError;
|
|
@@ -298,6 +365,7 @@ const ConversationsAddTags504 = GatewayTimeoutError;
|
|
|
298
365
|
const ConversationsRemoveTagsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
299
366
|
const ConversationsRemoveTagsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) }))();
|
|
300
367
|
const ConversationsRemoveTags200 = Conversation;
|
|
368
|
+
const ConversationsRemoveTags400 = MalformedRequestError;
|
|
301
369
|
const ConversationsRemoveTags401 = UnauthorizedError;
|
|
302
370
|
const ConversationsRemoveTags403 = ForbiddenError;
|
|
303
371
|
const ConversationsRemoveTags404 = ResourceNotFoundError;
|
|
@@ -308,6 +376,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
308
376
|
query: ConversationsListQuery,
|
|
309
377
|
success: ConversationsList200,
|
|
310
378
|
error: [
|
|
379
|
+
ConversationsList400.pipe(HttpApiSchema.status(400)),
|
|
311
380
|
ConversationsList401.pipe(HttpApiSchema.status(401)),
|
|
312
381
|
ConversationsList403.pipe(HttpApiSchema.status(403)),
|
|
313
382
|
ConversationsList422.pipe(HttpApiSchema.status(422)),
|
|
@@ -318,8 +387,11 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
318
387
|
payload: ConversationsCreateRequestJson,
|
|
319
388
|
success: ConversationsCreate201.pipe(HttpApiSchema.status(201)),
|
|
320
389
|
error: [
|
|
390
|
+
ConversationsCreate400.pipe(HttpApiSchema.status(400)),
|
|
321
391
|
ConversationsCreate401.pipe(HttpApiSchema.status(401)),
|
|
322
392
|
ConversationsCreate403.pipe(HttpApiSchema.status(403)),
|
|
393
|
+
ConversationsCreate404.pipe(HttpApiSchema.status(404)),
|
|
394
|
+
ConversationsCreate409.pipe(HttpApiSchema.status(409)),
|
|
323
395
|
ConversationsCreate422.pipe(HttpApiSchema.status(422)),
|
|
324
396
|
ConversationsCreate500,
|
|
325
397
|
ConversationsCreate504.pipe(HttpApiSchema.status(504))
|
|
@@ -328,6 +400,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
328
400
|
params: ConversationsGetByIdPathParams,
|
|
329
401
|
success: ConversationsGetById200,
|
|
330
402
|
error: [
|
|
403
|
+
ConversationsGetById400.pipe(HttpApiSchema.status(400)),
|
|
331
404
|
ConversationsGetById401.pipe(HttpApiSchema.status(401)),
|
|
332
405
|
ConversationsGetById403.pipe(HttpApiSchema.status(403)),
|
|
333
406
|
ConversationsGetById404.pipe(HttpApiSchema.status(404)),
|
|
@@ -340,9 +413,11 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
340
413
|
payload: ConversationsUpdateRequestJson,
|
|
341
414
|
success: ConversationsUpdate200,
|
|
342
415
|
error: [
|
|
416
|
+
ConversationsUpdate400.pipe(HttpApiSchema.status(400)),
|
|
343
417
|
ConversationsUpdate401.pipe(HttpApiSchema.status(401)),
|
|
344
418
|
ConversationsUpdate403.pipe(HttpApiSchema.status(403)),
|
|
345
419
|
ConversationsUpdate404.pipe(HttpApiSchema.status(404)),
|
|
420
|
+
ConversationsUpdate409.pipe(HttpApiSchema.status(409)),
|
|
346
421
|
ConversationsUpdate422.pipe(HttpApiSchema.status(422)),
|
|
347
422
|
ConversationsUpdate500,
|
|
348
423
|
ConversationsUpdate504.pipe(HttpApiSchema.status(504))
|
|
@@ -352,6 +427,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
352
427
|
payload: ConversationsAddCategoriesRequestJson,
|
|
353
428
|
success: ConversationsAddCategories200,
|
|
354
429
|
error: [
|
|
430
|
+
ConversationsAddCategories400.pipe(HttpApiSchema.status(400)),
|
|
355
431
|
ConversationsAddCategories401.pipe(HttpApiSchema.status(401)),
|
|
356
432
|
ConversationsAddCategories403.pipe(HttpApiSchema.status(403)),
|
|
357
433
|
ConversationsAddCategories404.pipe(HttpApiSchema.status(404)),
|
|
@@ -364,6 +440,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
364
440
|
payload: ConversationsRemoveCategoriesRequestJson,
|
|
365
441
|
success: ConversationsRemoveCategories200,
|
|
366
442
|
error: [
|
|
443
|
+
ConversationsRemoveCategories400.pipe(HttpApiSchema.status(400)),
|
|
367
444
|
ConversationsRemoveCategories401.pipe(HttpApiSchema.status(401)),
|
|
368
445
|
ConversationsRemoveCategories403.pipe(HttpApiSchema.status(403)),
|
|
369
446
|
ConversationsRemoveCategories404.pipe(HttpApiSchema.status(404)),
|
|
@@ -376,6 +453,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
376
453
|
payload: ConversationsAddChannelsRequestJson,
|
|
377
454
|
success: ConversationsAddChannels200,
|
|
378
455
|
error: [
|
|
456
|
+
ConversationsAddChannels400.pipe(HttpApiSchema.status(400)),
|
|
379
457
|
ConversationsAddChannels401.pipe(HttpApiSchema.status(401)),
|
|
380
458
|
ConversationsAddChannels403.pipe(HttpApiSchema.status(403)),
|
|
381
459
|
ConversationsAddChannels404.pipe(HttpApiSchema.status(404)),
|
|
@@ -388,6 +466,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
388
466
|
payload: ConversationsRemoveChannelsRequestJson,
|
|
389
467
|
success: ConversationsRemoveChannels200,
|
|
390
468
|
error: [
|
|
469
|
+
ConversationsRemoveChannels400.pipe(HttpApiSchema.status(400)),
|
|
391
470
|
ConversationsRemoveChannels401.pipe(HttpApiSchema.status(401)),
|
|
392
471
|
ConversationsRemoveChannels403.pipe(HttpApiSchema.status(403)),
|
|
393
472
|
ConversationsRemoveChannels404.pipe(HttpApiSchema.status(404)),
|
|
@@ -400,6 +479,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
400
479
|
payload: ConversationsAddContactsRequestJson,
|
|
401
480
|
success: ConversationsAddContacts200,
|
|
402
481
|
error: [
|
|
482
|
+
ConversationsAddContacts400.pipe(HttpApiSchema.status(400)),
|
|
403
483
|
ConversationsAddContacts401.pipe(HttpApiSchema.status(401)),
|
|
404
484
|
ConversationsAddContacts403.pipe(HttpApiSchema.status(403)),
|
|
405
485
|
ConversationsAddContacts404.pipe(HttpApiSchema.status(404)),
|
|
@@ -412,6 +492,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
412
492
|
payload: ConversationsRemoveContactsRequestJson,
|
|
413
493
|
success: ConversationsRemoveContacts200,
|
|
414
494
|
error: [
|
|
495
|
+
ConversationsRemoveContacts400.pipe(HttpApiSchema.status(400)),
|
|
415
496
|
ConversationsRemoveContacts401.pipe(HttpApiSchema.status(401)),
|
|
416
497
|
ConversationsRemoveContacts403.pipe(HttpApiSchema.status(403)),
|
|
417
498
|
ConversationsRemoveContacts404.pipe(HttpApiSchema.status(404)),
|
|
@@ -424,6 +505,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
424
505
|
query: ConversationsListMessagesQuery,
|
|
425
506
|
success: ConversationsListMessages200,
|
|
426
507
|
error: [
|
|
508
|
+
ConversationsListMessages400.pipe(HttpApiSchema.status(400)),
|
|
427
509
|
ConversationsListMessages401.pipe(HttpApiSchema.status(401)),
|
|
428
510
|
ConversationsListMessages403.pipe(HttpApiSchema.status(403)),
|
|
429
511
|
ConversationsListMessages404.pipe(HttpApiSchema.status(404)),
|
|
@@ -436,6 +518,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
436
518
|
payload: ConversationsAddTagsRequestJson,
|
|
437
519
|
success: ConversationsAddTags200,
|
|
438
520
|
error: [
|
|
521
|
+
ConversationsAddTags400.pipe(HttpApiSchema.status(400)),
|
|
439
522
|
ConversationsAddTags401.pipe(HttpApiSchema.status(401)),
|
|
440
523
|
ConversationsAddTags403.pipe(HttpApiSchema.status(403)),
|
|
441
524
|
ConversationsAddTags404.pipe(HttpApiSchema.status(404)),
|
|
@@ -448,6 +531,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
448
531
|
payload: ConversationsRemoveTagsRequestJson,
|
|
449
532
|
success: ConversationsRemoveTags200,
|
|
450
533
|
error: [
|
|
534
|
+
ConversationsRemoveTags400.pipe(HttpApiSchema.status(400)),
|
|
451
535
|
ConversationsRemoveTags401.pipe(HttpApiSchema.status(401)),
|
|
452
536
|
ConversationsRemoveTags403.pipe(HttpApiSchema.status(403)),
|
|
453
537
|
ConversationsRemoveTags404.pipe(HttpApiSchema.status(404)),
|
|
@@ -456,6 +540,6 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
456
540
|
ConversationsRemoveTags504.pipe(HttpApiSchema.status(504))
|
|
457
541
|
]
|
|
458
542
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.removeTags").annotate(OpenApi.Summary, "Remove conversation tags").annotate(OpenApi.Description, "Removes the given tags from the conversation and returns the conversation. A tag the conversation does not have is ignored.")).annotate(OpenApi.Description, "Create, update, and list conversations with your contacts.") {};
|
|
459
|
-
export { Conversation, ConversationContact, ConversationContext, ConversationPage, ConversationSummary, ConversationsAddCategories200, ConversationsAddCategories401, ConversationsAddCategories403, ConversationsAddCategories404, ConversationsAddCategories422, ConversationsAddCategories500, ConversationsAddCategories504, ConversationsAddCategoriesPathParams, ConversationsAddCategoriesRequestJson, ConversationsAddChannels200, ConversationsAddChannels401, ConversationsAddChannels403, ConversationsAddChannels404, ConversationsAddChannels422, ConversationsAddChannels500, ConversationsAddChannels504, ConversationsAddChannelsPathParams, ConversationsAddChannelsRequestJson, ConversationsAddContacts200, ConversationsAddContacts401, ConversationsAddContacts403, ConversationsAddContacts404, ConversationsAddContacts422, ConversationsAddContacts500, ConversationsAddContacts504, ConversationsAddContactsPathParams, ConversationsAddContactsRequestJson, ConversationsAddTags200, ConversationsAddTags401, ConversationsAddTags403, ConversationsAddTags404, ConversationsAddTags422, ConversationsAddTags500, ConversationsAddTags504, ConversationsAddTagsPathParams, ConversationsAddTagsRequestJson, ConversationsCreate201, ConversationsCreate401, ConversationsCreate403, ConversationsCreate422, ConversationsCreate500, ConversationsCreate504, ConversationsCreateRequestJson, ConversationsGetById200, ConversationsGetById401, ConversationsGetById403, ConversationsGetById404, ConversationsGetById422, ConversationsGetById500, ConversationsGetById504, ConversationsGetByIdPathParams, ConversationsGroup, ConversationsList200, ConversationsList401, ConversationsList403, ConversationsList422, ConversationsList500, ConversationsList504, ConversationsListMessages200, ConversationsListMessages401, ConversationsListMessages403, ConversationsListMessages404, ConversationsListMessages422, ConversationsListMessages500, ConversationsListMessages504, ConversationsListMessagesPathParams, ConversationsListMessagesQuery, ConversationsListQuery, ConversationsRemoveCategories200, ConversationsRemoveCategories401, ConversationsRemoveCategories403, ConversationsRemoveCategories404, ConversationsRemoveCategories422, ConversationsRemoveCategories500, ConversationsRemoveCategories504, ConversationsRemoveCategoriesPathParams, ConversationsRemoveCategoriesRequestJson, ConversationsRemoveChannels200, ConversationsRemoveChannels401, ConversationsRemoveChannels403, ConversationsRemoveChannels404, ConversationsRemoveChannels422, ConversationsRemoveChannels500, ConversationsRemoveChannels504, ConversationsRemoveChannelsPathParams, ConversationsRemoveChannelsRequestJson, ConversationsRemoveContacts200, ConversationsRemoveContacts401, ConversationsRemoveContacts403, ConversationsRemoveContacts404, ConversationsRemoveContacts422, ConversationsRemoveContacts500, ConversationsRemoveContacts504, ConversationsRemoveContactsPathParams, ConversationsRemoveContactsRequestJson, ConversationsRemoveTags200, ConversationsRemoveTags401, ConversationsRemoveTags403, ConversationsRemoveTags404, ConversationsRemoveTags422, ConversationsRemoveTags500, ConversationsRemoveTags504, ConversationsRemoveTagsPathParams, ConversationsRemoveTagsRequestJson, ConversationsUpdate200, ConversationsUpdate401, ConversationsUpdate403, ConversationsUpdate404, ConversationsUpdate422, ConversationsUpdate500, ConversationsUpdate504, ConversationsUpdatePathParams, ConversationsUpdateRequestJson, UnknownRecord };
|
|
543
|
+
export { Conversation, ConversationContact, ConversationContext, ConversationPage, ConversationSummary, ConversationsAddCategories200, ConversationsAddCategories400, ConversationsAddCategories401, ConversationsAddCategories403, ConversationsAddCategories404, ConversationsAddCategories422, ConversationsAddCategories500, ConversationsAddCategories504, ConversationsAddCategoriesPathParams, ConversationsAddCategoriesRequestJson, ConversationsAddChannels200, ConversationsAddChannels400, ConversationsAddChannels401, ConversationsAddChannels403, ConversationsAddChannels404, ConversationsAddChannels422, ConversationsAddChannels500, ConversationsAddChannels504, ConversationsAddChannelsPathParams, ConversationsAddChannelsRequestJson, ConversationsAddContacts200, ConversationsAddContacts400, ConversationsAddContacts401, ConversationsAddContacts403, ConversationsAddContacts404, ConversationsAddContacts422, ConversationsAddContacts500, ConversationsAddContacts504, ConversationsAddContactsPathParams, ConversationsAddContactsRequestJson, ConversationsAddTags200, ConversationsAddTags400, ConversationsAddTags401, ConversationsAddTags403, ConversationsAddTags404, ConversationsAddTags422, ConversationsAddTags500, ConversationsAddTags504, ConversationsAddTagsPathParams, ConversationsAddTagsRequestJson, ConversationsCreate201, ConversationsCreate400, ConversationsCreate401, ConversationsCreate403, ConversationsCreate404, ConversationsCreate409, ConversationsCreate422, ConversationsCreate500, ConversationsCreate504, ConversationsCreateRequestJson, ConversationsGetById200, ConversationsGetById400, ConversationsGetById401, ConversationsGetById403, ConversationsGetById404, ConversationsGetById422, ConversationsGetById500, ConversationsGetById504, ConversationsGetByIdPathParams, ConversationsGroup, ConversationsList200, ConversationsList400, ConversationsList401, ConversationsList403, ConversationsList422, ConversationsList500, ConversationsList504, ConversationsListMessages200, ConversationsListMessages400, ConversationsListMessages401, ConversationsListMessages403, ConversationsListMessages404, ConversationsListMessages422, ConversationsListMessages500, ConversationsListMessages504, ConversationsListMessagesPathParams, ConversationsListMessagesQuery, ConversationsListQuery, ConversationsRemoveCategories200, ConversationsRemoveCategories400, ConversationsRemoveCategories401, ConversationsRemoveCategories403, ConversationsRemoveCategories404, ConversationsRemoveCategories422, ConversationsRemoveCategories500, ConversationsRemoveCategories504, ConversationsRemoveCategoriesPathParams, ConversationsRemoveCategoriesRequestJson, ConversationsRemoveChannels200, ConversationsRemoveChannels400, ConversationsRemoveChannels401, ConversationsRemoveChannels403, ConversationsRemoveChannels404, ConversationsRemoveChannels422, ConversationsRemoveChannels500, ConversationsRemoveChannels504, ConversationsRemoveChannelsPathParams, ConversationsRemoveChannelsRequestJson, ConversationsRemoveContacts200, ConversationsRemoveContacts400, ConversationsRemoveContacts401, ConversationsRemoveContacts403, ConversationsRemoveContacts404, ConversationsRemoveContacts422, ConversationsRemoveContacts500, ConversationsRemoveContacts504, ConversationsRemoveContactsPathParams, ConversationsRemoveContactsRequestJson, ConversationsRemoveTags200, ConversationsRemoveTags400, ConversationsRemoveTags401, ConversationsRemoveTags403, ConversationsRemoveTags404, ConversationsRemoveTags422, ConversationsRemoveTags500, ConversationsRemoveTags504, ConversationsRemoveTagsPathParams, ConversationsRemoveTagsRequestJson, ConversationsUpdate200, ConversationsUpdate400, ConversationsUpdate401, ConversationsUpdate403, ConversationsUpdate404, ConversationsUpdate409, ConversationsUpdate422, ConversationsUpdate500, ConversationsUpdate504, ConversationsUpdatePathParams, ConversationsUpdateRequestJson, UnknownRecord };
|
|
460
544
|
|
|
461
545
|
//# sourceMappingURL=conversations.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as EffectBrand from "effect/Brand";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
|
-
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, OrganizationId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
|
|
4
|
+
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, OrganizationId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
|
|
5
5
|
export type CustomFieldDefinitionId = string & EffectBrand.Brand<"CustomFieldDefinitionId">;
|
|
6
6
|
export declare const CustomFieldDefinitionId: Schema.brand<Schema.String, "CustomFieldDefinitionId">;
|
|
7
7
|
export type CustomFieldList = {
|
|
@@ -50,6 +50,8 @@ export declare const CustomFieldsList200: Schema.Struct<{
|
|
|
50
50
|
readonly updatedAt: Schema.String;
|
|
51
51
|
}>>;
|
|
52
52
|
}>;
|
|
53
|
+
export type CustomFieldsList400 = MalformedRequestError;
|
|
54
|
+
export declare const CustomFieldsList400: typeof MalformedRequestError;
|
|
53
55
|
export type CustomFieldsList401 = UnauthorizedError;
|
|
54
56
|
export declare const CustomFieldsList401: typeof UnauthorizedError;
|
|
55
57
|
export type CustomFieldsList403 = ForbiddenError;
|
|
@@ -104,6 +106,8 @@ export declare const CustomFieldsCreate201: Schema.Struct<{
|
|
|
104
106
|
readonly createdAt: Schema.String;
|
|
105
107
|
readonly updatedAt: Schema.String;
|
|
106
108
|
}>;
|
|
109
|
+
export type CustomFieldsCreate400 = MalformedRequestError;
|
|
110
|
+
export declare const CustomFieldsCreate400: typeof MalformedRequestError;
|
|
107
111
|
export type CustomFieldsCreate401 = UnauthorizedError;
|
|
108
112
|
export declare const CustomFieldsCreate401: typeof UnauthorizedError;
|
|
109
113
|
export type CustomFieldsCreate403 = ForbiddenError;
|
|
@@ -128,6 +132,8 @@ export type CustomFieldsRemove200 = {
|
|
|
128
132
|
export declare const CustomFieldsRemove200: Schema.Struct<{
|
|
129
133
|
readonly success: Schema.Boolean;
|
|
130
134
|
}>;
|
|
135
|
+
export type CustomFieldsRemove400 = MalformedRequestError;
|
|
136
|
+
export declare const CustomFieldsRemove400: typeof MalformedRequestError;
|
|
131
137
|
export type CustomFieldsRemove401 = UnauthorizedError;
|
|
132
138
|
export declare const CustomFieldsRemove401: typeof UnauthorizedError;
|
|
133
139
|
export type CustomFieldsRemove403 = ForbiddenError;
|
|
@@ -186,6 +192,8 @@ export declare const CustomFieldsUpdate200: Schema.Struct<{
|
|
|
186
192
|
readonly createdAt: Schema.String;
|
|
187
193
|
readonly updatedAt: Schema.String;
|
|
188
194
|
}>;
|
|
195
|
+
export type CustomFieldsUpdate400 = MalformedRequestError;
|
|
196
|
+
export declare const CustomFieldsUpdate400: typeof MalformedRequestError;
|
|
189
197
|
export type CustomFieldsUpdate401 = UnauthorizedError;
|
|
190
198
|
export declare const CustomFieldsUpdate401: typeof UnauthorizedError;
|
|
191
199
|
export type CustomFieldsUpdate403 = ForbiddenError;
|
|
@@ -266,6 +274,26 @@ declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields",
|
|
|
266
274
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
267
275
|
readonly message: Schema.String;
|
|
268
276
|
readonly retryAfterSeconds: Schema.Finite;
|
|
277
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
278
|
+
readonly _tag: "MalformedRequestError";
|
|
279
|
+
readonly message: string;
|
|
280
|
+
readonly fields: {
|
|
281
|
+
readonly [x: string]: readonly string[];
|
|
282
|
+
};
|
|
283
|
+
}, readonly [Schema.Struct<{
|
|
284
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
285
|
+
readonly message: Schema.String;
|
|
286
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
287
|
+
}>], {
|
|
288
|
+
readonly _tag: "MalformedRequestError";
|
|
289
|
+
readonly message: string;
|
|
290
|
+
readonly fields: {
|
|
291
|
+
readonly [x: string]: readonly string[];
|
|
292
|
+
};
|
|
293
|
+
}>, Schema.Struct<{
|
|
294
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
295
|
+
readonly message: Schema.String;
|
|
296
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
269
297
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
270
298
|
readonly _tag: "UnauthorizedError";
|
|
271
299
|
readonly message: string;
|
|
@@ -340,6 +368,26 @@ declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields",
|
|
|
340
368
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
341
369
|
readonly message: Schema.String;
|
|
342
370
|
readonly retryAfterSeconds: Schema.Finite;
|
|
371
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
372
|
+
readonly _tag: "MalformedRequestError";
|
|
373
|
+
readonly message: string;
|
|
374
|
+
readonly fields: {
|
|
375
|
+
readonly [x: string]: readonly string[];
|
|
376
|
+
};
|
|
377
|
+
}, readonly [Schema.Struct<{
|
|
378
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
379
|
+
readonly message: Schema.String;
|
|
380
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
381
|
+
}>], {
|
|
382
|
+
readonly _tag: "MalformedRequestError";
|
|
383
|
+
readonly message: string;
|
|
384
|
+
readonly fields: {
|
|
385
|
+
readonly [x: string]: readonly string[];
|
|
386
|
+
};
|
|
387
|
+
}>, Schema.Struct<{
|
|
388
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
389
|
+
readonly message: Schema.String;
|
|
390
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
343
391
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
344
392
|
readonly _tag: "UnauthorizedError";
|
|
345
393
|
readonly message: string;
|
|
@@ -404,6 +452,26 @@ declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields",
|
|
|
404
452
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
405
453
|
readonly message: Schema.String;
|
|
406
454
|
readonly retryAfterSeconds: Schema.Finite;
|
|
455
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
456
|
+
readonly _tag: "MalformedRequestError";
|
|
457
|
+
readonly message: string;
|
|
458
|
+
readonly fields: {
|
|
459
|
+
readonly [x: string]: readonly string[];
|
|
460
|
+
};
|
|
461
|
+
}, readonly [Schema.Struct<{
|
|
462
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
463
|
+
readonly message: Schema.String;
|
|
464
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
465
|
+
}>], {
|
|
466
|
+
readonly _tag: "MalformedRequestError";
|
|
467
|
+
readonly message: string;
|
|
468
|
+
readonly fields: {
|
|
469
|
+
readonly [x: string]: readonly string[];
|
|
470
|
+
};
|
|
471
|
+
}>, Schema.Struct<{
|
|
472
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
473
|
+
readonly message: Schema.String;
|
|
474
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
407
475
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
408
476
|
readonly _tag: "ResourceNotFoundError";
|
|
409
477
|
readonly resource: string;
|
|
@@ -504,6 +572,26 @@ declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields",
|
|
|
504
572
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
505
573
|
readonly message: Schema.String;
|
|
506
574
|
readonly retryAfterSeconds: Schema.Finite;
|
|
575
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
576
|
+
readonly _tag: "MalformedRequestError";
|
|
577
|
+
readonly message: string;
|
|
578
|
+
readonly fields: {
|
|
579
|
+
readonly [x: string]: readonly string[];
|
|
580
|
+
};
|
|
581
|
+
}, readonly [Schema.Struct<{
|
|
582
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
583
|
+
readonly message: Schema.String;
|
|
584
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
585
|
+
}>], {
|
|
586
|
+
readonly _tag: "MalformedRequestError";
|
|
587
|
+
readonly message: string;
|
|
588
|
+
readonly fields: {
|
|
589
|
+
readonly [x: string]: readonly string[];
|
|
590
|
+
};
|
|
591
|
+
}>, Schema.Struct<{
|
|
592
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
593
|
+
readonly message: Schema.String;
|
|
594
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
507
595
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
508
596
|
readonly _tag: "ResourceNotFoundError";
|
|
509
597
|
readonly resource: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, OrganizationId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
1
|
+
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, OrganizationId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
4
|
// src/effect/generated/custom-fields.ts
|
|
5
|
-
const CustomFieldDefinitionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
5
|
+
const CustomFieldDefinitionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^cfield_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
6
6
|
expected: "a string matching the RegExp ^cfield_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
7
7
|
identifier: "CustomFieldDefinitionId"
|
|
8
8
|
})).pipe(Schema.brand("CustomFieldDefinitionId")))();
|
|
@@ -26,6 +26,7 @@ const CustomFieldList = /* @__PURE__ */ (() => Schema.Struct({ items: Schema.Arr
|
|
|
26
26
|
updatedAt: Schema.String
|
|
27
27
|
})).check(Schema.isMaxLength(100).annotate({ expected: "a value with a length of at most 100" })) }).annotate({ identifier: "CustomFieldList" }))();
|
|
28
28
|
const CustomFieldsList200 = CustomFieldList;
|
|
29
|
+
const CustomFieldsList400 = MalformedRequestError;
|
|
29
30
|
const CustomFieldsList401 = UnauthorizedError;
|
|
30
31
|
const CustomFieldsList403 = ForbiddenError;
|
|
31
32
|
const CustomFieldsList422 = ValidationError;
|
|
@@ -65,6 +66,7 @@ const CustomFieldsCreate201 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
65
66
|
createdAt: Schema.String,
|
|
66
67
|
updatedAt: Schema.String
|
|
67
68
|
}))();
|
|
69
|
+
const CustomFieldsCreate400 = MalformedRequestError;
|
|
68
70
|
const CustomFieldsCreate401 = UnauthorizedError;
|
|
69
71
|
const CustomFieldsCreate403 = ForbiddenError;
|
|
70
72
|
const CustomFieldsCreate409 = ConflictError;
|
|
@@ -73,6 +75,7 @@ const CustomFieldsCreate500 = InternalError;
|
|
|
73
75
|
const CustomFieldsCreate504 = GatewayTimeoutError;
|
|
74
76
|
const CustomFieldsRemovePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: CustomFieldDefinitionId }))();
|
|
75
77
|
const CustomFieldsRemove200 = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Boolean }))();
|
|
78
|
+
const CustomFieldsRemove400 = MalformedRequestError;
|
|
76
79
|
const CustomFieldsRemove401 = UnauthorizedError;
|
|
77
80
|
const CustomFieldsRemove403 = ForbiddenError;
|
|
78
81
|
const CustomFieldsRemove404 = ResourceNotFoundError;
|
|
@@ -106,6 +109,7 @@ const CustomFieldsUpdate200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
106
109
|
createdAt: Schema.String,
|
|
107
110
|
updatedAt: Schema.String
|
|
108
111
|
}))();
|
|
112
|
+
const CustomFieldsUpdate400 = MalformedRequestError;
|
|
109
113
|
const CustomFieldsUpdate401 = UnauthorizedError;
|
|
110
114
|
const CustomFieldsUpdate403 = ForbiddenError;
|
|
111
115
|
const CustomFieldsUpdate404 = ResourceNotFoundError;
|
|
@@ -115,6 +119,7 @@ const CustomFieldsUpdate504 = GatewayTimeoutError;
|
|
|
115
119
|
var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(HttpApiEndpoint.get("customFieldsList", "/v1/custom-fields", {
|
|
116
120
|
success: CustomFieldsList200,
|
|
117
121
|
error: [
|
|
122
|
+
CustomFieldsList400.pipe(HttpApiSchema.status(400)),
|
|
118
123
|
CustomFieldsList401.pipe(HttpApiSchema.status(401)),
|
|
119
124
|
CustomFieldsList403.pipe(HttpApiSchema.status(403)),
|
|
120
125
|
CustomFieldsList422.pipe(HttpApiSchema.status(422)),
|
|
@@ -125,6 +130,7 @@ var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(Htt
|
|
|
125
130
|
payload: CustomFieldsCreateRequestJson,
|
|
126
131
|
success: CustomFieldsCreate201.pipe(HttpApiSchema.status(201)),
|
|
127
132
|
error: [
|
|
133
|
+
CustomFieldsCreate400.pipe(HttpApiSchema.status(400)),
|
|
128
134
|
CustomFieldsCreate401.pipe(HttpApiSchema.status(401)),
|
|
129
135
|
CustomFieldsCreate403.pipe(HttpApiSchema.status(403)),
|
|
130
136
|
CustomFieldsCreate409.pipe(HttpApiSchema.status(409)),
|
|
@@ -136,6 +142,7 @@ var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(Htt
|
|
|
136
142
|
params: CustomFieldsRemovePathParams,
|
|
137
143
|
success: CustomFieldsRemove200,
|
|
138
144
|
error: [
|
|
145
|
+
CustomFieldsRemove400.pipe(HttpApiSchema.status(400)),
|
|
139
146
|
CustomFieldsRemove401.pipe(HttpApiSchema.status(401)),
|
|
140
147
|
CustomFieldsRemove403.pipe(HttpApiSchema.status(403)),
|
|
141
148
|
CustomFieldsRemove404.pipe(HttpApiSchema.status(404)),
|
|
@@ -148,6 +155,7 @@ var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(Htt
|
|
|
148
155
|
payload: CustomFieldsUpdateRequestJson,
|
|
149
156
|
success: CustomFieldsUpdate200,
|
|
150
157
|
error: [
|
|
158
|
+
CustomFieldsUpdate400.pipe(HttpApiSchema.status(400)),
|
|
151
159
|
CustomFieldsUpdate401.pipe(HttpApiSchema.status(401)),
|
|
152
160
|
CustomFieldsUpdate403.pipe(HttpApiSchema.status(403)),
|
|
153
161
|
CustomFieldsUpdate404.pipe(HttpApiSchema.status(404)),
|
|
@@ -156,6 +164,6 @@ var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(Htt
|
|
|
156
164
|
CustomFieldsUpdate504.pipe(HttpApiSchema.status(504))
|
|
157
165
|
]
|
|
158
166
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "customFields.update").annotate(OpenApi.Summary, "Update a custom field").annotate(OpenApi.Description, "Updates an existing custom field definition and returns the updated field.")).annotate(OpenApi.Description, "Custom field definitions for contact metadata") {};
|
|
159
|
-
export { CustomFieldDefinitionId, CustomFieldList, CustomFieldsCreate201, CustomFieldsCreate401, CustomFieldsCreate403, CustomFieldsCreate409, CustomFieldsCreate422, CustomFieldsCreate500, CustomFieldsCreate504, CustomFieldsCreateRequestJson, CustomFieldsGroup, CustomFieldsList200, CustomFieldsList401, CustomFieldsList403, CustomFieldsList422, CustomFieldsList500, CustomFieldsList504, CustomFieldsRemove200, CustomFieldsRemove401, CustomFieldsRemove403, CustomFieldsRemove404, CustomFieldsRemove422, CustomFieldsRemove500, CustomFieldsRemove504, CustomFieldsRemovePathParams, CustomFieldsUpdate200, CustomFieldsUpdate401, CustomFieldsUpdate403, CustomFieldsUpdate404, CustomFieldsUpdate422, CustomFieldsUpdate500, CustomFieldsUpdate504, CustomFieldsUpdatePathParams, CustomFieldsUpdateRequestJson };
|
|
167
|
+
export { CustomFieldDefinitionId, CustomFieldList, CustomFieldsCreate201, CustomFieldsCreate400, CustomFieldsCreate401, CustomFieldsCreate403, CustomFieldsCreate409, CustomFieldsCreate422, CustomFieldsCreate500, CustomFieldsCreate504, CustomFieldsCreateRequestJson, CustomFieldsGroup, CustomFieldsList200, CustomFieldsList400, CustomFieldsList401, CustomFieldsList403, CustomFieldsList422, CustomFieldsList500, CustomFieldsList504, CustomFieldsRemove200, CustomFieldsRemove400, CustomFieldsRemove401, CustomFieldsRemove403, CustomFieldsRemove404, CustomFieldsRemove422, CustomFieldsRemove500, CustomFieldsRemove504, CustomFieldsRemovePathParams, CustomFieldsUpdate200, CustomFieldsUpdate400, CustomFieldsUpdate401, CustomFieldsUpdate403, CustomFieldsUpdate404, CustomFieldsUpdate422, CustomFieldsUpdate500, CustomFieldsUpdate504, CustomFieldsUpdatePathParams, CustomFieldsUpdateRequestJson };
|
|
160
168
|
|
|
161
169
|
//# sourceMappingURL=custom-fields.js.map
|