samva 0.34.0 → 0.35.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/README.md +1 -1
- package/dist/client/sdk.gen.d.ts +224 -250
- package/dist/client/sdk.gen.js +84 -210
- package/dist/client/types.gen.d.ts +2894 -401
- package/dist/effect/agents.d.ts +28 -13
- package/dist/effect/agents.js +5 -1
- package/dist/effect/analytics.d.ts +15 -15
- package/dist/effect/api-keys.d.ts +27 -18
- package/dist/effect/campaigns.d.ts +721 -65
- 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 +45 -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 +11 -11
- package/dist/effect/extensions.d.ts +16 -16
- package/dist/effect/generated/agents.d.ts +1063 -33
- package/dist/effect/generated/agents.js +133 -11
- package/dist/effect/generated/analytics.d.ts +109 -136
- package/dist/effect/generated/analytics.js +65 -36
- package/dist/effect/generated/api-keys.d.ts +240 -19
- package/dist/effect/generated/api-keys.js +24 -8
- 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 +1442 -140
- package/dist/effect/generated/campaigns.js +82 -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 +398 -106
- package/dist/effect/generated/conversations.js +96 -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 +208 -10
- package/dist/effect/generated/extension-installations.js +26 -8
- 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/journeys.d.ts +684 -16
- package/dist/effect/generated/journeys.js +37 -9
- package/dist/effect/generated/mailboxes.d.ts +3085 -627
- package/dist/effect/generated/mailboxes.js +340 -141
- 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 +209 -25
- package/dist/effect/generated/namespaces.js +27 -9
- 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/scheduled-messages.d.ts +4427 -99
- package/dist/effect/generated/scheduled-messages.js +71 -12
- package/dist/effect/generated/shared.d.ts +2213 -190
- package/dist/effect/generated/shared.js +527 -76
- package/dist/effect/generated/subscriptions.d.ts +23 -1
- package/dist/effect/generated/subscriptions.js +6 -4
- package/dist/effect/generated/templates.d.ts +1718 -136
- package/dist/effect/generated/templates.js +421 -226
- 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 +296 -38
- package/dist/effect/generated/webhooks.js +58 -16
- package/dist/effect/generated/whoami.d.ts +35 -1
- package/dist/effect/generated/whoami.js +4 -2
- package/dist/effect/generated-metadata.d.ts +20 -0
- package/dist/effect/generated-metadata.js +10 -0
- package/dist/effect/index.js +2 -2
- package/dist/effect/internal/client.js +1 -1
- package/dist/effect/internal/email-sender.d.ts +1 -1
- package/dist/effect/internal/send.d.ts +1 -1
- package/dist/effect/journeys.d.ts +105 -19
- package/dist/effect/mailboxes.d.ts +405 -174
- 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/scheduled-messages.d.ts +863 -8
- package/dist/effect/templates.d.ts +37 -37
- package/dist/effect/topics.d.ts +21 -21
- package/dist/effect/webhooks.d.ts +22 -22
- package/dist/index.js +2 -2
- package/dist/normalize.js +13 -1
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +1 -1
- package/dist/promises/client.js +2 -2
- package/dist/promises/errors.gen.d.ts +22 -2
- package/dist/promises/errors.gen.js +60 -2
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +9 -0
- package/dist/service-map.js +5 -0
- package/package.json +9 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ContactId, ConversationId,
|
|
1
|
+
import { ApiKeySecurityMiddleware, ContactId, ConversationId, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MalformedRequestError, MessagePage, 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
|
|
@@ -14,8 +14,16 @@ const ConversationSummary = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
14
14
|
Schema.Literal("escalated"),
|
|
15
15
|
Schema.Literal("archived")
|
|
16
16
|
]),
|
|
17
|
-
primaryChannel: Schema.
|
|
18
|
-
|
|
17
|
+
primaryChannel: Schema.Union([
|
|
18
|
+
Schema.Literal("sms"),
|
|
19
|
+
Schema.Literal("whatsapp"),
|
|
20
|
+
Schema.Literal("email")
|
|
21
|
+
]),
|
|
22
|
+
channels: Schema.Array(Schema.Union([
|
|
23
|
+
Schema.Literal("sms"),
|
|
24
|
+
Schema.Literal("whatsapp"),
|
|
25
|
+
Schema.Literal("email")
|
|
26
|
+
])),
|
|
19
27
|
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
28
|
urgency: Schema.Union([
|
|
21
29
|
Schema.Literal("low"),
|
|
@@ -65,8 +73,16 @@ const Conversation = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
65
73
|
Schema.Literal("escalated"),
|
|
66
74
|
Schema.Literal("archived")
|
|
67
75
|
]),
|
|
68
|
-
primaryChannel: Schema.
|
|
69
|
-
|
|
76
|
+
primaryChannel: Schema.Union([
|
|
77
|
+
Schema.Literal("sms"),
|
|
78
|
+
Schema.Literal("whatsapp"),
|
|
79
|
+
Schema.Literal("email")
|
|
80
|
+
]),
|
|
81
|
+
channels: Schema.Array(Schema.Union([
|
|
82
|
+
Schema.Literal("sms"),
|
|
83
|
+
Schema.Literal("whatsapp"),
|
|
84
|
+
Schema.Literal("email")
|
|
85
|
+
])),
|
|
70
86
|
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
87
|
urgency: Schema.Union([
|
|
72
88
|
Schema.Literal("low"),
|
|
@@ -109,21 +125,26 @@ const Conversation = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
109
125
|
}).annotate({ identifier: "Conversation" }))();
|
|
110
126
|
const ConversationsListQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
111
127
|
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
|
-
status: Schema.optionalKey(Schema.Union([
|
|
128
|
+
cursor: Schema.optionalKey(Schema.String),
|
|
129
|
+
status: Schema.optionalKey(Schema.Union([
|
|
114
130
|
Schema.Literal("active"),
|
|
115
131
|
Schema.Literal("waiting"),
|
|
116
132
|
Schema.Literal("resolved"),
|
|
117
133
|
Schema.Literal("escalated"),
|
|
118
134
|
Schema.Literal("archived")
|
|
119
|
-
])
|
|
120
|
-
channel: Schema.optionalKey(Schema.Union([
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
135
|
+
])),
|
|
136
|
+
channel: Schema.optionalKey(Schema.Union([
|
|
137
|
+
Schema.Literal("sms"),
|
|
138
|
+
Schema.Literal("whatsapp"),
|
|
139
|
+
Schema.Literal("email")
|
|
140
|
+
])),
|
|
141
|
+
contactId: Schema.optionalKey(ContactId),
|
|
142
|
+
mailboxId: Schema.optionalKey(MailboxId),
|
|
143
|
+
after: Schema.optionalKey(Schema.String),
|
|
144
|
+
before: Schema.optionalKey(Schema.String)
|
|
125
145
|
}))();
|
|
126
146
|
const ConversationsList200 = ConversationPage;
|
|
147
|
+
const ConversationsList400 = MalformedRequestError;
|
|
127
148
|
const ConversationsList401 = UnauthorizedError;
|
|
128
149
|
const ConversationsList403 = ForbiddenError;
|
|
129
150
|
const ConversationsList422 = ValidationError;
|
|
@@ -134,8 +155,16 @@ const ConversationsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
134
155
|
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
135
156
|
externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
136
157
|
parentConversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
137
|
-
channels: Schema.Array(Schema.
|
|
138
|
-
|
|
158
|
+
channels: Schema.Array(Schema.Union([
|
|
159
|
+
Schema.Literal("sms"),
|
|
160
|
+
Schema.Literal("whatsapp"),
|
|
161
|
+
Schema.Literal("email")
|
|
162
|
+
])),
|
|
163
|
+
primaryChannel: Schema.Union([
|
|
164
|
+
Schema.Literal("sms"),
|
|
165
|
+
Schema.Literal("whatsapp"),
|
|
166
|
+
Schema.Literal("email")
|
|
167
|
+
]),
|
|
139
168
|
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
140
169
|
Schema.Literal("active"),
|
|
141
170
|
Schema.Literal("waiting"),
|
|
@@ -165,6 +194,7 @@ const ConversationsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
165
194
|
isPrivate: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
166
195
|
}))();
|
|
167
196
|
const ConversationsCreate201 = Conversation;
|
|
197
|
+
const ConversationsCreate400 = MalformedRequestError;
|
|
168
198
|
const ConversationsCreate401 = UnauthorizedError;
|
|
169
199
|
const ConversationsCreate403 = ForbiddenError;
|
|
170
200
|
const ConversationsCreate422 = ValidationError;
|
|
@@ -172,6 +202,7 @@ const ConversationsCreate500 = InternalError;
|
|
|
172
202
|
const ConversationsCreate504 = GatewayTimeoutError;
|
|
173
203
|
const ConversationsGetByIdPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
174
204
|
const ConversationsGetById200 = Conversation;
|
|
205
|
+
const ConversationsGetById400 = MalformedRequestError;
|
|
175
206
|
const ConversationsGetById401 = UnauthorizedError;
|
|
176
207
|
const ConversationsGetById403 = ForbiddenError;
|
|
177
208
|
const ConversationsGetById404 = ResourceNotFoundError;
|
|
@@ -184,7 +215,11 @@ const ConversationsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
184
215
|
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
185
216
|
externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
186
217
|
parentConversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
187
|
-
primaryChannel: Schema.optionalKey(Schema.Union([Schema.
|
|
218
|
+
primaryChannel: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
219
|
+
Schema.Literal("sms"),
|
|
220
|
+
Schema.Literal("whatsapp"),
|
|
221
|
+
Schema.Literal("email")
|
|
222
|
+
]), Schema.Null])),
|
|
188
223
|
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
189
224
|
Schema.Literal("active"),
|
|
190
225
|
Schema.Literal("waiting"),
|
|
@@ -212,6 +247,7 @@ const ConversationsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
212
247
|
isPrivate: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
|
|
213
248
|
}))();
|
|
214
249
|
const ConversationsUpdate200 = Conversation;
|
|
250
|
+
const ConversationsUpdate400 = MalformedRequestError;
|
|
215
251
|
const ConversationsUpdate401 = UnauthorizedError;
|
|
216
252
|
const ConversationsUpdate403 = ForbiddenError;
|
|
217
253
|
const ConversationsUpdate404 = ResourceNotFoundError;
|
|
@@ -221,6 +257,7 @@ const ConversationsUpdate504 = GatewayTimeoutError;
|
|
|
221
257
|
const ConversationsAddCategoriesPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
222
258
|
const ConversationsAddCategoriesRequestJson = /* @__PURE__ */ (() => Schema.Struct({ categories: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) }))();
|
|
223
259
|
const ConversationsAddCategories200 = Conversation;
|
|
260
|
+
const ConversationsAddCategories400 = MalformedRequestError;
|
|
224
261
|
const ConversationsAddCategories401 = UnauthorizedError;
|
|
225
262
|
const ConversationsAddCategories403 = ForbiddenError;
|
|
226
263
|
const ConversationsAddCategories404 = ResourceNotFoundError;
|
|
@@ -230,6 +267,7 @@ const ConversationsAddCategories504 = GatewayTimeoutError;
|
|
|
230
267
|
const ConversationsRemoveCategoriesPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
231
268
|
const ConversationsRemoveCategoriesRequestJson = /* @__PURE__ */ (() => Schema.Struct({ categories: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) }))();
|
|
232
269
|
const ConversationsRemoveCategories200 = Conversation;
|
|
270
|
+
const ConversationsRemoveCategories400 = MalformedRequestError;
|
|
233
271
|
const ConversationsRemoveCategories401 = UnauthorizedError;
|
|
234
272
|
const ConversationsRemoveCategories403 = ForbiddenError;
|
|
235
273
|
const ConversationsRemoveCategories404 = ResourceNotFoundError;
|
|
@@ -237,8 +275,17 @@ const ConversationsRemoveCategories422 = ValidationError;
|
|
|
237
275
|
const ConversationsRemoveCategories500 = InternalError;
|
|
238
276
|
const ConversationsRemoveCategories504 = GatewayTimeoutError;
|
|
239
277
|
const ConversationsAddChannelsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
240
|
-
const ConversationsAddChannelsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ channels: Schema.TupleWithRest(Schema.Tuple([Schema.
|
|
278
|
+
const ConversationsAddChannelsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ channels: Schema.TupleWithRest(Schema.Tuple([Schema.Union([
|
|
279
|
+
Schema.Literal("sms"),
|
|
280
|
+
Schema.Literal("whatsapp"),
|
|
281
|
+
Schema.Literal("email")
|
|
282
|
+
])]), [Schema.Union([
|
|
283
|
+
Schema.Literal("sms"),
|
|
284
|
+
Schema.Literal("whatsapp"),
|
|
285
|
+
Schema.Literal("email")
|
|
286
|
+
])]) }))();
|
|
241
287
|
const ConversationsAddChannels200 = Conversation;
|
|
288
|
+
const ConversationsAddChannels400 = MalformedRequestError;
|
|
242
289
|
const ConversationsAddChannels401 = UnauthorizedError;
|
|
243
290
|
const ConversationsAddChannels403 = ForbiddenError;
|
|
244
291
|
const ConversationsAddChannels404 = ResourceNotFoundError;
|
|
@@ -246,8 +293,17 @@ const ConversationsAddChannels422 = ValidationError;
|
|
|
246
293
|
const ConversationsAddChannels500 = InternalError;
|
|
247
294
|
const ConversationsAddChannels504 = GatewayTimeoutError;
|
|
248
295
|
const ConversationsRemoveChannelsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
249
|
-
const ConversationsRemoveChannelsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ channels: Schema.TupleWithRest(Schema.Tuple([Schema.
|
|
296
|
+
const ConversationsRemoveChannelsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ channels: Schema.TupleWithRest(Schema.Tuple([Schema.Union([
|
|
297
|
+
Schema.Literal("sms"),
|
|
298
|
+
Schema.Literal("whatsapp"),
|
|
299
|
+
Schema.Literal("email")
|
|
300
|
+
])]), [Schema.Union([
|
|
301
|
+
Schema.Literal("sms"),
|
|
302
|
+
Schema.Literal("whatsapp"),
|
|
303
|
+
Schema.Literal("email")
|
|
304
|
+
])]) }))();
|
|
250
305
|
const ConversationsRemoveChannels200 = Conversation;
|
|
306
|
+
const ConversationsRemoveChannels400 = MalformedRequestError;
|
|
251
307
|
const ConversationsRemoveChannels401 = UnauthorizedError;
|
|
252
308
|
const ConversationsRemoveChannels403 = ForbiddenError;
|
|
253
309
|
const ConversationsRemoveChannels404 = ResourceNotFoundError;
|
|
@@ -257,6 +313,7 @@ const ConversationsRemoveChannels504 = GatewayTimeoutError;
|
|
|
257
313
|
const ConversationsAddContactsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
258
314
|
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
315
|
const ConversationsAddContacts200 = Conversation;
|
|
316
|
+
const ConversationsAddContacts400 = MalformedRequestError;
|
|
260
317
|
const ConversationsAddContacts401 = UnauthorizedError;
|
|
261
318
|
const ConversationsAddContacts403 = ForbiddenError;
|
|
262
319
|
const ConversationsAddContacts404 = ResourceNotFoundError;
|
|
@@ -266,6 +323,7 @@ const ConversationsAddContacts504 = GatewayTimeoutError;
|
|
|
266
323
|
const ConversationsRemoveContactsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
267
324
|
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
325
|
const ConversationsRemoveContacts200 = Conversation;
|
|
326
|
+
const ConversationsRemoveContacts400 = MalformedRequestError;
|
|
269
327
|
const ConversationsRemoveContacts401 = UnauthorizedError;
|
|
270
328
|
const ConversationsRemoveContacts403 = ForbiddenError;
|
|
271
329
|
const ConversationsRemoveContacts404 = ResourceNotFoundError;
|
|
@@ -275,11 +333,12 @@ const ConversationsRemoveContacts504 = GatewayTimeoutError;
|
|
|
275
333
|
const ConversationsListMessagesPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
276
334
|
const ConversationsListMessagesQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
277
335
|
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.
|
|
336
|
+
cursor: Schema.optionalKey(Schema.String),
|
|
337
|
+
after: Schema.optionalKey(Schema.String),
|
|
338
|
+
before: Schema.optionalKey(Schema.String)
|
|
281
339
|
}))();
|
|
282
340
|
const ConversationsListMessages200 = MessagePage;
|
|
341
|
+
const ConversationsListMessages400 = MalformedRequestError;
|
|
283
342
|
const ConversationsListMessages401 = UnauthorizedError;
|
|
284
343
|
const ConversationsListMessages403 = ForbiddenError;
|
|
285
344
|
const ConversationsListMessages404 = ResourceNotFoundError;
|
|
@@ -289,6 +348,7 @@ const ConversationsListMessages504 = GatewayTimeoutError;
|
|
|
289
348
|
const ConversationsAddTagsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
290
349
|
const ConversationsAddTagsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) }))();
|
|
291
350
|
const ConversationsAddTags200 = Conversation;
|
|
351
|
+
const ConversationsAddTags400 = MalformedRequestError;
|
|
292
352
|
const ConversationsAddTags401 = UnauthorizedError;
|
|
293
353
|
const ConversationsAddTags403 = ForbiddenError;
|
|
294
354
|
const ConversationsAddTags404 = ResourceNotFoundError;
|
|
@@ -298,6 +358,7 @@ const ConversationsAddTags504 = GatewayTimeoutError;
|
|
|
298
358
|
const ConversationsRemoveTagsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
299
359
|
const ConversationsRemoveTagsRequestJson = /* @__PURE__ */ (() => Schema.Struct({ tags: Schema.TupleWithRest(Schema.Tuple([Schema.String]), [Schema.String]) }))();
|
|
300
360
|
const ConversationsRemoveTags200 = Conversation;
|
|
361
|
+
const ConversationsRemoveTags400 = MalformedRequestError;
|
|
301
362
|
const ConversationsRemoveTags401 = UnauthorizedError;
|
|
302
363
|
const ConversationsRemoveTags403 = ForbiddenError;
|
|
303
364
|
const ConversationsRemoveTags404 = ResourceNotFoundError;
|
|
@@ -308,6 +369,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
308
369
|
query: ConversationsListQuery,
|
|
309
370
|
success: ConversationsList200,
|
|
310
371
|
error: [
|
|
372
|
+
ConversationsList400.pipe(HttpApiSchema.status(400)),
|
|
311
373
|
ConversationsList401.pipe(HttpApiSchema.status(401)),
|
|
312
374
|
ConversationsList403.pipe(HttpApiSchema.status(403)),
|
|
313
375
|
ConversationsList422.pipe(HttpApiSchema.status(422)),
|
|
@@ -318,6 +380,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
318
380
|
payload: ConversationsCreateRequestJson,
|
|
319
381
|
success: ConversationsCreate201.pipe(HttpApiSchema.status(201)),
|
|
320
382
|
error: [
|
|
383
|
+
ConversationsCreate400.pipe(HttpApiSchema.status(400)),
|
|
321
384
|
ConversationsCreate401.pipe(HttpApiSchema.status(401)),
|
|
322
385
|
ConversationsCreate403.pipe(HttpApiSchema.status(403)),
|
|
323
386
|
ConversationsCreate422.pipe(HttpApiSchema.status(422)),
|
|
@@ -328,6 +391,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
328
391
|
params: ConversationsGetByIdPathParams,
|
|
329
392
|
success: ConversationsGetById200,
|
|
330
393
|
error: [
|
|
394
|
+
ConversationsGetById400.pipe(HttpApiSchema.status(400)),
|
|
331
395
|
ConversationsGetById401.pipe(HttpApiSchema.status(401)),
|
|
332
396
|
ConversationsGetById403.pipe(HttpApiSchema.status(403)),
|
|
333
397
|
ConversationsGetById404.pipe(HttpApiSchema.status(404)),
|
|
@@ -340,6 +404,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
340
404
|
payload: ConversationsUpdateRequestJson,
|
|
341
405
|
success: ConversationsUpdate200,
|
|
342
406
|
error: [
|
|
407
|
+
ConversationsUpdate400.pipe(HttpApiSchema.status(400)),
|
|
343
408
|
ConversationsUpdate401.pipe(HttpApiSchema.status(401)),
|
|
344
409
|
ConversationsUpdate403.pipe(HttpApiSchema.status(403)),
|
|
345
410
|
ConversationsUpdate404.pipe(HttpApiSchema.status(404)),
|
|
@@ -352,6 +417,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
352
417
|
payload: ConversationsAddCategoriesRequestJson,
|
|
353
418
|
success: ConversationsAddCategories200,
|
|
354
419
|
error: [
|
|
420
|
+
ConversationsAddCategories400.pipe(HttpApiSchema.status(400)),
|
|
355
421
|
ConversationsAddCategories401.pipe(HttpApiSchema.status(401)),
|
|
356
422
|
ConversationsAddCategories403.pipe(HttpApiSchema.status(403)),
|
|
357
423
|
ConversationsAddCategories404.pipe(HttpApiSchema.status(404)),
|
|
@@ -364,6 +430,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
364
430
|
payload: ConversationsRemoveCategoriesRequestJson,
|
|
365
431
|
success: ConversationsRemoveCategories200,
|
|
366
432
|
error: [
|
|
433
|
+
ConversationsRemoveCategories400.pipe(HttpApiSchema.status(400)),
|
|
367
434
|
ConversationsRemoveCategories401.pipe(HttpApiSchema.status(401)),
|
|
368
435
|
ConversationsRemoveCategories403.pipe(HttpApiSchema.status(403)),
|
|
369
436
|
ConversationsRemoveCategories404.pipe(HttpApiSchema.status(404)),
|
|
@@ -376,6 +443,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
376
443
|
payload: ConversationsAddChannelsRequestJson,
|
|
377
444
|
success: ConversationsAddChannels200,
|
|
378
445
|
error: [
|
|
446
|
+
ConversationsAddChannels400.pipe(HttpApiSchema.status(400)),
|
|
379
447
|
ConversationsAddChannels401.pipe(HttpApiSchema.status(401)),
|
|
380
448
|
ConversationsAddChannels403.pipe(HttpApiSchema.status(403)),
|
|
381
449
|
ConversationsAddChannels404.pipe(HttpApiSchema.status(404)),
|
|
@@ -388,6 +456,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
388
456
|
payload: ConversationsRemoveChannelsRequestJson,
|
|
389
457
|
success: ConversationsRemoveChannels200,
|
|
390
458
|
error: [
|
|
459
|
+
ConversationsRemoveChannels400.pipe(HttpApiSchema.status(400)),
|
|
391
460
|
ConversationsRemoveChannels401.pipe(HttpApiSchema.status(401)),
|
|
392
461
|
ConversationsRemoveChannels403.pipe(HttpApiSchema.status(403)),
|
|
393
462
|
ConversationsRemoveChannels404.pipe(HttpApiSchema.status(404)),
|
|
@@ -400,6 +469,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
400
469
|
payload: ConversationsAddContactsRequestJson,
|
|
401
470
|
success: ConversationsAddContacts200,
|
|
402
471
|
error: [
|
|
472
|
+
ConversationsAddContacts400.pipe(HttpApiSchema.status(400)),
|
|
403
473
|
ConversationsAddContacts401.pipe(HttpApiSchema.status(401)),
|
|
404
474
|
ConversationsAddContacts403.pipe(HttpApiSchema.status(403)),
|
|
405
475
|
ConversationsAddContacts404.pipe(HttpApiSchema.status(404)),
|
|
@@ -412,6 +482,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
412
482
|
payload: ConversationsRemoveContactsRequestJson,
|
|
413
483
|
success: ConversationsRemoveContacts200,
|
|
414
484
|
error: [
|
|
485
|
+
ConversationsRemoveContacts400.pipe(HttpApiSchema.status(400)),
|
|
415
486
|
ConversationsRemoveContacts401.pipe(HttpApiSchema.status(401)),
|
|
416
487
|
ConversationsRemoveContacts403.pipe(HttpApiSchema.status(403)),
|
|
417
488
|
ConversationsRemoveContacts404.pipe(HttpApiSchema.status(404)),
|
|
@@ -424,6 +495,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
424
495
|
query: ConversationsListMessagesQuery,
|
|
425
496
|
success: ConversationsListMessages200,
|
|
426
497
|
error: [
|
|
498
|
+
ConversationsListMessages400.pipe(HttpApiSchema.status(400)),
|
|
427
499
|
ConversationsListMessages401.pipe(HttpApiSchema.status(401)),
|
|
428
500
|
ConversationsListMessages403.pipe(HttpApiSchema.status(403)),
|
|
429
501
|
ConversationsListMessages404.pipe(HttpApiSchema.status(404)),
|
|
@@ -436,6 +508,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
436
508
|
payload: ConversationsAddTagsRequestJson,
|
|
437
509
|
success: ConversationsAddTags200,
|
|
438
510
|
error: [
|
|
511
|
+
ConversationsAddTags400.pipe(HttpApiSchema.status(400)),
|
|
439
512
|
ConversationsAddTags401.pipe(HttpApiSchema.status(401)),
|
|
440
513
|
ConversationsAddTags403.pipe(HttpApiSchema.status(403)),
|
|
441
514
|
ConversationsAddTags404.pipe(HttpApiSchema.status(404)),
|
|
@@ -448,6 +521,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
448
521
|
payload: ConversationsRemoveTagsRequestJson,
|
|
449
522
|
success: ConversationsRemoveTags200,
|
|
450
523
|
error: [
|
|
524
|
+
ConversationsRemoveTags400.pipe(HttpApiSchema.status(400)),
|
|
451
525
|
ConversationsRemoveTags401.pipe(HttpApiSchema.status(401)),
|
|
452
526
|
ConversationsRemoveTags403.pipe(HttpApiSchema.status(403)),
|
|
453
527
|
ConversationsRemoveTags404.pipe(HttpApiSchema.status(404)),
|
|
@@ -456,6 +530,6 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
456
530
|
ConversationsRemoveTags504.pipe(HttpApiSchema.status(504))
|
|
457
531
|
]
|
|
458
532
|
}).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 };
|
|
533
|
+
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, 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, ConversationsUpdate422, ConversationsUpdate500, ConversationsUpdate504, ConversationsUpdatePathParams, ConversationsUpdateRequestJson, UnknownRecord };
|
|
460
534
|
|
|
461
535
|
//# 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
|