samva 0.35.0 → 0.37.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 +1 -0
- package/dist/client/sdk.gen.d.ts +102 -82
- package/dist/client/sdk.gen.js +322 -244
- package/dist/client/types.gen.d.ts +600 -378
- package/dist/effect/agents.d.ts +194 -4
- package/dist/effect/agents.js +3 -1
- package/dist/effect/analytics.d.ts +6 -0
- package/dist/effect/api-keys.d.ts +3 -6
- package/dist/effect/campaigns.d.ts +216 -216
- package/dist/effect/conversations.d.ts +6 -0
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +53 -1
- package/dist/effect/generated/agents.d.ts +1803 -81
- package/dist/effect/generated/agents.js +92 -26
- package/dist/effect/generated/analytics.d.ts +19 -1
- package/dist/effect/generated/analytics.js +8 -2
- package/dist/effect/generated/api-keys.d.ts +4 -29
- package/dist/effect/generated/api-keys.js +5 -6
- package/dist/effect/generated/campaigns.d.ts +22 -0
- package/dist/effect/generated/campaigns.js +3 -1
- package/dist/effect/generated/conversations.d.ts +104 -3
- package/dist/effect/generated/conversations.js +12 -2
- package/dist/effect/generated/extension-installations.d.ts +845 -68
- package/dist/effect/generated/extension-installations.js +22 -26
- package/dist/effect/generated/index.d.ts +3 -1
- package/dist/effect/generated/mailboxes.d.ts +3423 -1446
- package/dist/effect/generated/mailboxes.js +226 -220
- package/dist/effect/generated/namespaces.d.ts +7 -31
- package/dist/effect/generated/namespaces.js +4 -4
- 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 +45 -4
- package/dist/effect/generated/scheduled-messages.js +8 -3
- package/dist/effect/generated/shared.d.ts +893 -224
- package/dist/effect/generated/shared.js +194 -60
- package/dist/effect/generated/templates.d.ts +474 -668
- package/dist/effect/generated/templates.js +65 -45
- package/dist/effect/generated/webhooks.d.ts +22 -19
- package/dist/effect/generated/webhooks.js +10 -1
- package/dist/effect/generated/whoami.d.ts +0 -4
- package/dist/effect/generated-metadata.d.ts +36 -32
- package/dist/effect/generated-metadata.js +127 -105
- package/dist/effect/index.d.ts +1 -0
- package/dist/effect/index.js +3 -2
- package/dist/effect/internal/operation.js +5 -32
- package/dist/effect/journeys.d.ts +146 -146
- package/dist/effect/mailboxes.d.ts +575 -129
- package/dist/effect/mailboxes.js +1 -11
- package/dist/effect/policies.d.ts +65 -0
- package/dist/effect/policies.js +16 -0
- package/dist/effect/scheduled-messages.d.ts +6 -0
- package/dist/effect/templates.d.ts +6 -8
- package/dist/effect/templates.js +5 -3
- package/dist/effect/topics.d.ts +2 -2
- package/dist/effect/webhooks.d.ts +7 -4
- package/dist/index.js +2 -2
- package/dist/mailbox/test.js +11 -4
- package/dist/mailbox/types.d.ts +39 -3
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +3 -1
- package/dist/promises/client.js +5 -3
- package/dist/promises/errors.gen.d.ts +18 -2
- package/dist/promises/errors.gen.js +335 -33
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +30 -28
- package/dist/service-map.js +219 -786
- package/package.json +6 -2
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
|
-
import { ApiKeySecurityMiddleware, ContactId, ConversationId, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MalformedRequestError, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
|
|
3
|
+
import { ApiKeySecurityMiddleware, ConflictError, ContactId, ConversationId, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MalformedRequestError, MessagePage, NamespaceId, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
|
|
4
4
|
export type UnknownRecord = {
|
|
5
5
|
readonly [x: string]: JsonValue;
|
|
6
6
|
};
|
|
7
7
|
export declare const UnknownRecord: Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>;
|
|
8
8
|
export type ConversationSummary = {
|
|
9
9
|
readonly id: ConversationId;
|
|
10
|
+
readonly namespaceId: NamespaceId | null;
|
|
10
11
|
readonly title: string | null;
|
|
11
12
|
readonly externalId: string | null;
|
|
12
13
|
readonly status: "active" | "waiting" | "resolved" | "escalated" | "archived";
|
|
@@ -22,6 +23,7 @@ export type ConversationSummary = {
|
|
|
22
23
|
};
|
|
23
24
|
export declare const ConversationSummary: Schema.Struct<{
|
|
24
25
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
26
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
25
27
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
26
28
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
27
29
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -84,6 +86,7 @@ export type ConversationPage = {
|
|
|
84
86
|
export declare const ConversationPage: Schema.Struct<{
|
|
85
87
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
86
88
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
89
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
87
90
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
88
91
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
89
92
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -101,6 +104,7 @@ export declare const ConversationPage: Schema.Struct<{
|
|
|
101
104
|
}>;
|
|
102
105
|
export type Conversation = {
|
|
103
106
|
readonly id: ConversationId;
|
|
107
|
+
readonly namespaceId: NamespaceId | null;
|
|
104
108
|
readonly title: string | null;
|
|
105
109
|
readonly externalId: string | null;
|
|
106
110
|
readonly status: "active" | "waiting" | "resolved" | "escalated" | "archived";
|
|
@@ -133,6 +137,7 @@ export type Conversation = {
|
|
|
133
137
|
};
|
|
134
138
|
export declare const Conversation: Schema.Struct<{
|
|
135
139
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
140
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
136
141
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
137
142
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
138
143
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -185,6 +190,7 @@ export declare const Conversation: Schema.Struct<{
|
|
|
185
190
|
export type ConversationsListQuery = {
|
|
186
191
|
readonly limit?: number | null;
|
|
187
192
|
readonly cursor?: string;
|
|
193
|
+
readonly namespaceId?: NamespaceId;
|
|
188
194
|
readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived";
|
|
189
195
|
readonly channel?: "sms" | "whatsapp" | "email";
|
|
190
196
|
readonly contactId?: ContactId;
|
|
@@ -195,6 +201,7 @@ export type ConversationsListQuery = {
|
|
|
195
201
|
export declare const ConversationsListQuery: Schema.Struct<{
|
|
196
202
|
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
197
203
|
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
204
|
+
readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
|
|
198
205
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>>;
|
|
199
206
|
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
|
|
200
207
|
readonly contactId: Schema.optionalKey<Schema.brand<Schema.String, "ContactId">>;
|
|
@@ -206,6 +213,7 @@ export type ConversationsList200 = ConversationPage;
|
|
|
206
213
|
export declare const ConversationsList200: Schema.Struct<{
|
|
207
214
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
208
215
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
216
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
209
217
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
210
218
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
211
219
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -234,6 +242,7 @@ export declare const ConversationsList500: typeof InternalError;
|
|
|
234
242
|
export type ConversationsList504 = GatewayTimeoutError;
|
|
235
243
|
export declare const ConversationsList504: typeof GatewayTimeoutError;
|
|
236
244
|
export type ConversationsCreateRequestJson = {
|
|
245
|
+
readonly namespaceId?: NamespaceId | null;
|
|
237
246
|
readonly title?: string | null;
|
|
238
247
|
readonly description?: string | null;
|
|
239
248
|
readonly externalId?: string | null;
|
|
@@ -254,6 +263,7 @@ export type ConversationsCreateRequestJson = {
|
|
|
254
263
|
readonly isPrivate?: boolean | null;
|
|
255
264
|
};
|
|
256
265
|
export declare const ConversationsCreateRequestJson: Schema.Struct<{
|
|
266
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
257
267
|
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
258
268
|
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
259
269
|
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -286,6 +296,7 @@ export declare const ConversationsCreateRequestJson: Schema.Struct<{
|
|
|
286
296
|
export type ConversationsCreate201 = Conversation;
|
|
287
297
|
export declare const ConversationsCreate201: Schema.Struct<{
|
|
288
298
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
299
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
289
300
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
290
301
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
291
302
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -341,6 +352,10 @@ export type ConversationsCreate401 = UnauthorizedError;
|
|
|
341
352
|
export declare const ConversationsCreate401: typeof UnauthorizedError;
|
|
342
353
|
export type ConversationsCreate403 = ForbiddenError;
|
|
343
354
|
export declare const ConversationsCreate403: typeof ForbiddenError;
|
|
355
|
+
export type ConversationsCreate404 = ResourceNotFoundError;
|
|
356
|
+
export declare const ConversationsCreate404: typeof ResourceNotFoundError;
|
|
357
|
+
export type ConversationsCreate409 = ConflictError;
|
|
358
|
+
export declare const ConversationsCreate409: typeof ConflictError;
|
|
344
359
|
export type ConversationsCreate422 = ValidationError;
|
|
345
360
|
export declare const ConversationsCreate422: typeof ValidationError;
|
|
346
361
|
export type ConversationsCreate500 = InternalError;
|
|
@@ -356,6 +371,7 @@ export declare const ConversationsGetByIdPathParams: Schema.Struct<{
|
|
|
356
371
|
export type ConversationsGetById200 = Conversation;
|
|
357
372
|
export declare const ConversationsGetById200: Schema.Struct<{
|
|
358
373
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
374
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
359
375
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
360
376
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
361
377
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -472,6 +488,7 @@ export declare const ConversationsUpdateRequestJson: Schema.Struct<{
|
|
|
472
488
|
export type ConversationsUpdate200 = Conversation;
|
|
473
489
|
export declare const ConversationsUpdate200: Schema.Struct<{
|
|
474
490
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
491
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
475
492
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
476
493
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
477
494
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -529,6 +546,8 @@ export type ConversationsUpdate403 = ForbiddenError;
|
|
|
529
546
|
export declare const ConversationsUpdate403: typeof ForbiddenError;
|
|
530
547
|
export type ConversationsUpdate404 = ResourceNotFoundError;
|
|
531
548
|
export declare const ConversationsUpdate404: typeof ResourceNotFoundError;
|
|
549
|
+
export type ConversationsUpdate409 = ConflictError;
|
|
550
|
+
export declare const ConversationsUpdate409: typeof ConflictError;
|
|
532
551
|
export type ConversationsUpdate422 = ValidationError;
|
|
533
552
|
export declare const ConversationsUpdate422: typeof ValidationError;
|
|
534
553
|
export type ConversationsUpdate500 = InternalError;
|
|
@@ -550,6 +569,7 @@ export declare const ConversationsAddCategoriesRequestJson: Schema.Struct<{
|
|
|
550
569
|
export type ConversationsAddCategories200 = Conversation;
|
|
551
570
|
export declare const ConversationsAddCategories200: Schema.Struct<{
|
|
552
571
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
572
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
553
573
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
554
574
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
555
575
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -628,6 +648,7 @@ export declare const ConversationsRemoveCategoriesRequestJson: Schema.Struct<{
|
|
|
628
648
|
export type ConversationsRemoveCategories200 = Conversation;
|
|
629
649
|
export declare const ConversationsRemoveCategories200: Schema.Struct<{
|
|
630
650
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
651
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
631
652
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
632
653
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
633
654
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -709,6 +730,7 @@ export declare const ConversationsAddChannelsRequestJson: Schema.Struct<{
|
|
|
709
730
|
export type ConversationsAddChannels200 = Conversation;
|
|
710
731
|
export declare const ConversationsAddChannels200: Schema.Struct<{
|
|
711
732
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
733
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
712
734
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
713
735
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
714
736
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -790,6 +812,7 @@ export declare const ConversationsRemoveChannelsRequestJson: Schema.Struct<{
|
|
|
790
812
|
export type ConversationsRemoveChannels200 = Conversation;
|
|
791
813
|
export declare const ConversationsRemoveChannels200: Schema.Struct<{
|
|
792
814
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
815
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
793
816
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
794
817
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
795
818
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -868,6 +891,7 @@ export declare const ConversationsAddContactsRequestJson: Schema.Struct<{
|
|
|
868
891
|
export type ConversationsAddContacts200 = Conversation;
|
|
869
892
|
export declare const ConversationsAddContacts200: Schema.Struct<{
|
|
870
893
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
894
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
871
895
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
872
896
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
873
897
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -946,6 +970,7 @@ export declare const ConversationsRemoveContactsRequestJson: Schema.Struct<{
|
|
|
946
970
|
export type ConversationsRemoveContacts200 = Conversation;
|
|
947
971
|
export declare const ConversationsRemoveContacts200: Schema.Struct<{
|
|
948
972
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
973
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
949
974
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
950
975
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
951
976
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -1075,6 +1100,7 @@ export declare const ConversationsAddTagsRequestJson: Schema.Struct<{
|
|
|
1075
1100
|
export type ConversationsAddTags200 = Conversation;
|
|
1076
1101
|
export declare const ConversationsAddTags200: Schema.Struct<{
|
|
1077
1102
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
1103
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
1078
1104
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1079
1105
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1080
1106
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -1153,6 +1179,7 @@ export declare const ConversationsRemoveTagsRequestJson: Schema.Struct<{
|
|
|
1153
1179
|
export type ConversationsRemoveTags200 = Conversation;
|
|
1154
1180
|
export declare const ConversationsRemoveTags200: Schema.Struct<{
|
|
1155
1181
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
1182
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
1156
1183
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1157
1184
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1158
1185
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -1222,6 +1249,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1222
1249
|
readonly categories: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
|
|
1223
1250
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1224
1251
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
1252
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
1225
1253
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1226
1254
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1227
1255
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -1376,6 +1404,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1376
1404
|
readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>, readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>;
|
|
1377
1405
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1378
1406
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
1407
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
1379
1408
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1380
1409
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1381
1410
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -1530,6 +1559,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1530
1559
|
readonly contactIds: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "ContactId">]>, readonly [Schema.brand<Schema.String, "ContactId">]>;
|
|
1531
1560
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1532
1561
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
1562
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
1533
1563
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1534
1564
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1535
1565
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -1684,6 +1714,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1684
1714
|
readonly tags: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
|
|
1685
1715
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1686
1716
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
1717
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
1687
1718
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1688
1719
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1689
1720
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -1833,6 +1864,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1833
1864
|
readonly message: Schema.String;
|
|
1834
1865
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
1835
1866
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"conversationsCreate", "POST", "/v1/conversations", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1867
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
1836
1868
|
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1837
1869
|
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1838
1870
|
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
@@ -1863,6 +1895,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1863
1895
|
readonly isPrivate: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
1864
1896
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1865
1897
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
1898
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
1866
1899
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1867
1900
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1868
1901
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -1911,7 +1944,27 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1911
1944
|
readonly resolutionType: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"automated">, Schema.Literal<"human_assisted">, Schema.Literal<"escalated">, Schema.Literal<"abandoned">, Schema.Literal<"timeout">]>, Schema.Null]>;
|
|
1912
1945
|
readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1913
1946
|
readonly updatedAt: Schema.String;
|
|
1914
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<
|
|
1947
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
1948
|
+
readonly _tag: "ConflictError";
|
|
1949
|
+
readonly message: string;
|
|
1950
|
+
readonly resource: string;
|
|
1951
|
+
readonly id?: string | null;
|
|
1952
|
+
}, readonly [Schema.Struct<{
|
|
1953
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
1954
|
+
readonly message: Schema.String;
|
|
1955
|
+
readonly resource: Schema.String;
|
|
1956
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1957
|
+
}>], {
|
|
1958
|
+
readonly _tag: "ConflictError";
|
|
1959
|
+
readonly message: string;
|
|
1960
|
+
readonly resource: string;
|
|
1961
|
+
readonly id?: string | null;
|
|
1962
|
+
}>, Schema.Struct<{
|
|
1963
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
1964
|
+
readonly message: Schema.String;
|
|
1965
|
+
readonly resource: Schema.String;
|
|
1966
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1967
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
1915
1968
|
readonly _tag: "ForbiddenError";
|
|
1916
1969
|
readonly message: string;
|
|
1917
1970
|
}, readonly [Schema.Struct<{
|
|
@@ -1959,6 +2012,26 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1959
2012
|
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
1960
2013
|
readonly message: Schema.String;
|
|
1961
2014
|
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
2015
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
|
|
2016
|
+
readonly _tag: "ResourceNotFoundError";
|
|
2017
|
+
readonly resource: string;
|
|
2018
|
+
readonly id: string;
|
|
2019
|
+
readonly message: string;
|
|
2020
|
+
}, readonly [Schema.Struct<{
|
|
2021
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
2022
|
+
readonly resource: Schema.String;
|
|
2023
|
+
readonly id: Schema.String;
|
|
2024
|
+
readonly message: Schema.String;
|
|
2025
|
+
}>], {
|
|
2026
|
+
readonly _tag: "ResourceNotFoundError";
|
|
2027
|
+
readonly resource: string;
|
|
2028
|
+
readonly id: string;
|
|
2029
|
+
readonly message: string;
|
|
2030
|
+
}>, Schema.Struct<{
|
|
2031
|
+
readonly _tag: Schema.tag<"ResourceNotFoundError">;
|
|
2032
|
+
readonly resource: Schema.String;
|
|
2033
|
+
readonly id: Schema.String;
|
|
2034
|
+
readonly message: Schema.String;
|
|
1962
2035
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
1963
2036
|
readonly _tag: "UnauthorizedError";
|
|
1964
2037
|
readonly message: string;
|
|
@@ -1995,6 +2068,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1995
2068
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
1996
2069
|
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1997
2070
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
2071
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
1998
2072
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1999
2073
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2000
2074
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -2146,6 +2220,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
2146
2220
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"conversationsList", "GET", "/v1/conversations", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
2147
2221
|
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
2148
2222
|
readonly cursor: Schema.optionalKey<Schema.String>;
|
|
2223
|
+
readonly namespaceId: Schema.optionalKey<Schema.brand<Schema.String, "NamespaceId">>;
|
|
2149
2224
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>>;
|
|
2150
2225
|
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
|
|
2151
2226
|
readonly contactId: Schema.optionalKey<Schema.brand<Schema.String, "ContactId">>;
|
|
@@ -2155,6 +2230,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
2155
2230
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
2156
2231
|
readonly items: Schema.$Array<Schema.Struct<{
|
|
2157
2232
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
2233
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
2158
2234
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2159
2235
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2160
2236
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -2379,6 +2455,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
2379
2455
|
readonly categories: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
|
|
2380
2456
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
2381
2457
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
2458
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
2382
2459
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2383
2460
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2384
2461
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -2533,6 +2610,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
2533
2610
|
readonly channels: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>, readonly [Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>]>;
|
|
2534
2611
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
2535
2612
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
2613
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
2536
2614
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2537
2615
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2538
2616
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -2687,6 +2765,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
2687
2765
|
readonly contactIds: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "ContactId">]>, readonly [Schema.brand<Schema.String, "ContactId">]>;
|
|
2688
2766
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
2689
2767
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
2768
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
2690
2769
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2691
2770
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2692
2771
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -2841,6 +2920,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
2841
2920
|
readonly tags: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.String]>, readonly [Schema.String]>;
|
|
2842
2921
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
2843
2922
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
2923
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
2844
2924
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2845
2925
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
2846
2926
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -3019,6 +3099,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
3019
3099
|
readonly isPrivate: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
3020
3100
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
3021
3101
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
3102
|
+
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
3022
3103
|
readonly title: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3023
3104
|
readonly externalId: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3024
3105
|
readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>;
|
|
@@ -3067,7 +3148,27 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
3067
3148
|
readonly resolutionType: Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"automated">, Schema.Literal<"human_assisted">, Schema.Literal<"escalated">, Schema.Literal<"abandoned">, Schema.Literal<"timeout">]>, Schema.Null]>;
|
|
3068
3149
|
readonly resolutionNotes: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
3069
3150
|
readonly updatedAt: Schema.String;
|
|
3070
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<
|
|
3151
|
+
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<ConflictError, {
|
|
3152
|
+
readonly _tag: "ConflictError";
|
|
3153
|
+
readonly message: string;
|
|
3154
|
+
readonly resource: string;
|
|
3155
|
+
readonly id?: string | null;
|
|
3156
|
+
}, readonly [Schema.Struct<{
|
|
3157
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
3158
|
+
readonly message: Schema.String;
|
|
3159
|
+
readonly resource: Schema.String;
|
|
3160
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3161
|
+
}>], {
|
|
3162
|
+
readonly _tag: "ConflictError";
|
|
3163
|
+
readonly message: string;
|
|
3164
|
+
readonly resource: string;
|
|
3165
|
+
readonly id?: string | null;
|
|
3166
|
+
}>, Schema.Struct<{
|
|
3167
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
3168
|
+
readonly message: Schema.String;
|
|
3169
|
+
readonly resource: Schema.String;
|
|
3170
|
+
readonly id: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
3171
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
3071
3172
|
readonly _tag: "ForbiddenError";
|
|
3072
3173
|
readonly message: string;
|
|
3073
3174
|
}, readonly [Schema.Struct<{
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ContactId, ConversationId, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MalformedRequestError, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
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([
|
|
@@ -64,6 +65,7 @@ const ConversationPage = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
64
65
|
}).annotate({ identifier: "ConversationPage" }))();
|
|
65
66
|
const Conversation = /* @__PURE__ */ (() => Schema.Struct({
|
|
66
67
|
id: ConversationId,
|
|
68
|
+
namespaceId: Schema.Union([NamespaceId, Schema.Null]),
|
|
67
69
|
title: Schema.Union([Schema.String, Schema.Null]),
|
|
68
70
|
externalId: Schema.Union([Schema.String, Schema.Null]),
|
|
69
71
|
status: Schema.Union([
|
|
@@ -126,6 +128,7 @@ const Conversation = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
126
128
|
const ConversationsListQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
127
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])),
|
|
128
130
|
cursor: Schema.optionalKey(Schema.String),
|
|
131
|
+
namespaceId: Schema.optionalKey(NamespaceId),
|
|
129
132
|
status: Schema.optionalKey(Schema.Union([
|
|
130
133
|
Schema.Literal("active"),
|
|
131
134
|
Schema.Literal("waiting"),
|
|
@@ -151,6 +154,7 @@ const ConversationsList422 = ValidationError;
|
|
|
151
154
|
const ConversationsList500 = InternalError;
|
|
152
155
|
const ConversationsList504 = GatewayTimeoutError;
|
|
153
156
|
const ConversationsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
157
|
+
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
154
158
|
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
155
159
|
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
156
160
|
externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
@@ -197,6 +201,8 @@ const ConversationsCreate201 = Conversation;
|
|
|
197
201
|
const ConversationsCreate400 = MalformedRequestError;
|
|
198
202
|
const ConversationsCreate401 = UnauthorizedError;
|
|
199
203
|
const ConversationsCreate403 = ForbiddenError;
|
|
204
|
+
const ConversationsCreate404 = ResourceNotFoundError;
|
|
205
|
+
const ConversationsCreate409 = ConflictError;
|
|
200
206
|
const ConversationsCreate422 = ValidationError;
|
|
201
207
|
const ConversationsCreate500 = InternalError;
|
|
202
208
|
const ConversationsCreate504 = GatewayTimeoutError;
|
|
@@ -251,6 +257,7 @@ const ConversationsUpdate400 = MalformedRequestError;
|
|
|
251
257
|
const ConversationsUpdate401 = UnauthorizedError;
|
|
252
258
|
const ConversationsUpdate403 = ForbiddenError;
|
|
253
259
|
const ConversationsUpdate404 = ResourceNotFoundError;
|
|
260
|
+
const ConversationsUpdate409 = ConflictError;
|
|
254
261
|
const ConversationsUpdate422 = ValidationError;
|
|
255
262
|
const ConversationsUpdate500 = InternalError;
|
|
256
263
|
const ConversationsUpdate504 = GatewayTimeoutError;
|
|
@@ -383,6 +390,8 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
383
390
|
ConversationsCreate400.pipe(HttpApiSchema.status(400)),
|
|
384
391
|
ConversationsCreate401.pipe(HttpApiSchema.status(401)),
|
|
385
392
|
ConversationsCreate403.pipe(HttpApiSchema.status(403)),
|
|
393
|
+
ConversationsCreate404.pipe(HttpApiSchema.status(404)),
|
|
394
|
+
ConversationsCreate409.pipe(HttpApiSchema.status(409)),
|
|
386
395
|
ConversationsCreate422.pipe(HttpApiSchema.status(422)),
|
|
387
396
|
ConversationsCreate500,
|
|
388
397
|
ConversationsCreate504.pipe(HttpApiSchema.status(504))
|
|
@@ -408,6 +417,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
408
417
|
ConversationsUpdate401.pipe(HttpApiSchema.status(401)),
|
|
409
418
|
ConversationsUpdate403.pipe(HttpApiSchema.status(403)),
|
|
410
419
|
ConversationsUpdate404.pipe(HttpApiSchema.status(404)),
|
|
420
|
+
ConversationsUpdate409.pipe(HttpApiSchema.status(409)),
|
|
411
421
|
ConversationsUpdate422.pipe(HttpApiSchema.status(422)),
|
|
412
422
|
ConversationsUpdate500,
|
|
413
423
|
ConversationsUpdate504.pipe(HttpApiSchema.status(504))
|
|
@@ -530,6 +540,6 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
530
540
|
ConversationsRemoveTags504.pipe(HttpApiSchema.status(504))
|
|
531
541
|
]
|
|
532
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.") {};
|
|
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 };
|
|
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 };
|
|
534
544
|
|
|
535
545
|
//# sourceMappingURL=conversations.js.map
|