samva 0.29.1 → 0.31.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 +23 -5
- package/README.md +166 -133
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/client/client/client.gen.js +1 -2
- package/dist/client/client/utils.gen.js +1 -2
- package/dist/client/client.gen.js +1 -2
- package/dist/client/core/auth.gen.js +1 -2
- package/dist/client/core/bodySerializer.gen.js +1 -2
- package/dist/client/core/params.gen.js +1 -2
- package/dist/client/core/pathSerializer.gen.js +1 -2
- package/dist/client/core/serverSentEvents.gen.js +1 -2
- package/dist/client/core/utils.gen.js +1 -2
- package/dist/client/sdk.gen.d.ts +218 -192
- package/dist/client/sdk.gen.js +2397 -1154
- package/dist/client/types.gen.d.ts +767 -376
- package/dist/client-attribution.js +1 -2
- package/dist/effect/agents.d.ts +33 -11
- package/dist/effect/agents.js +1 -2
- package/dist/effect/analytics.d.ts +6 -6
- package/dist/effect/analytics.js +1 -2
- package/dist/effect/api-keys.d.ts +8 -8
- package/dist/effect/api-keys.js +1 -2
- package/dist/effect/attachments.d.ts +4 -4
- package/dist/effect/attachments.js +1 -2
- package/dist/effect/brands.d.ts +6 -6
- package/dist/effect/brands.js +1 -2
- package/dist/effect/campaigns.d.ts +15 -16
- package/dist/effect/campaigns.js +1 -2
- package/dist/effect/categories.js +1 -2
- package/dist/effect/client.js +1 -2
- package/dist/effect/contact-groups.d.ts +10 -10
- package/dist/effect/contact-groups.js +1 -2
- package/dist/effect/contacts.d.ts +23 -24
- package/dist/effect/contacts.js +1 -2
- package/dist/effect/conversations.d.ts +16 -13
- package/dist/effect/conversations.js +1 -2
- package/dist/effect/custom-fields.d.ts +4 -4
- package/dist/effect/custom-fields.js +1 -2
- package/dist/effect/email.d.ts +61 -63
- package/dist/effect/email.js +1 -2
- package/dist/effect/events.d.ts +2 -4
- package/dist/effect/events.js +1 -2
- package/dist/effect/extension-installations.d.ts +9 -9
- package/dist/effect/extension-installations.js +1 -2
- package/dist/effect/extensions.d.ts +5 -5
- package/dist/effect/extensions.js +1 -2
- package/dist/effect/feedback.d.ts +1 -1
- package/dist/effect/feedback.js +1 -2
- package/dist/effect/generated/agents.d.ts +264 -22
- package/dist/effect/generated/agents.js +2 -3
- package/dist/effect/generated/analytics.js +1 -2
- package/dist/effect/generated/api-keys.js +1 -2
- package/dist/effect/generated/attachments.js +1 -2
- package/dist/effect/generated/brands.js +1 -2
- package/dist/effect/generated/campaigns.d.ts +160 -155
- package/dist/effect/generated/campaigns.js +7 -9
- package/dist/effect/generated/contact-events.js +1 -2
- package/dist/effect/generated/contact-groups.d.ts +26 -26
- package/dist/effect/generated/contact-groups.js +22 -19
- package/dist/effect/generated/contacts.d.ts +119 -90
- package/dist/effect/generated/contacts.js +32 -32
- package/dist/effect/generated/conversations.d.ts +26 -23
- package/dist/effect/generated/conversations.js +10 -10
- package/dist/effect/generated/custom-fields.d.ts +6 -6
- package/dist/effect/generated/custom-fields.js +3 -4
- package/dist/effect/generated/email.d.ts +38 -38
- package/dist/effect/generated/email.js +13 -14
- package/dist/effect/generated/events.d.ts +18 -9
- package/dist/effect/generated/events.js +8 -6
- package/dist/effect/generated/extension-installations.d.ts +2 -2
- package/dist/effect/generated/extension-installations.js +6 -3
- package/dist/effect/generated/extensions.js +1 -2
- package/dist/effect/generated/feedback.js +1 -2
- package/dist/effect/generated/index.d.ts +7 -5
- package/dist/effect/generated/journeys.js +1 -2
- package/dist/effect/generated/mailboxes.d.ts +44 -44
- package/dist/effect/generated/mailboxes.js +17 -18
- package/dist/effect/generated/media.js +1 -2
- package/dist/effect/generated/messages.d.ts +42 -42
- package/dist/effect/generated/messages.js +3 -4
- package/dist/effect/generated/namespaces.js +1 -2
- package/dist/effect/generated/{publication-domains.d.ts → newsletter-domains.d.ts} +304 -80
- package/dist/effect/generated/newsletter-domains.js +218 -0
- package/dist/effect/generated/{topic-issues.d.ts → newsletter-issues.d.ts} +330 -288
- package/dist/effect/generated/{topic-issues.js → newsletter-issues.js} +255 -246
- package/dist/effect/generated/newsletters.d.ts +741 -0
- package/dist/effect/generated/newsletters.js +143 -0
- package/dist/effect/generated/operations.js +1 -2
- package/dist/effect/generated/organizations.d.ts +9 -9
- package/dist/effect/generated/organizations.js +4 -5
- package/dist/effect/generated/scheduled-messages.d.ts +174 -169
- package/dist/effect/generated/scheduled-messages.js +7 -7
- package/dist/effect/generated/shared.d.ts +276 -208
- package/dist/effect/generated/shared.js +50 -36
- package/dist/effect/generated/subscriptions.js +1 -2
- package/dist/effect/generated/templates.d.ts +118 -67
- package/dist/effect/generated/templates.js +43 -35
- package/dist/effect/generated/topic-forms.d.ts +79 -19
- package/dist/effect/generated/topic-forms.js +13 -14
- package/dist/effect/generated/topics.d.ts +27 -65
- package/dist/effect/generated/topics.js +13 -20
- package/dist/effect/generated/webhooks.d.ts +9 -9
- package/dist/effect/generated/webhooks.js +4 -5
- package/dist/effect/generated/whoami.js +1 -2
- package/dist/effect/generated-metadata.d.ts +475 -70
- package/dist/effect/generated-metadata.js +642 -432
- package/dist/effect/index.d.ts +3 -2
- package/dist/effect/index.js +4 -3
- package/dist/effect/internal/client.d.ts +5 -0
- package/dist/effect/internal/client.js +9 -5
- package/dist/effect/internal/email-sender.d.ts +1 -1
- package/dist/effect/internal/email-sender.js +4 -3
- package/dist/effect/internal/mailbox-events.js +1 -2
- package/dist/effect/internal/operation.d.ts +4 -15
- package/dist/effect/internal/operation.js +21 -33
- package/dist/effect/internal/send.js +2 -3
- package/dist/effect/journeys.d.ts +14 -14
- package/dist/effect/journeys.js +1 -2
- package/dist/effect/mailboxes.d.ts +60 -70
- package/dist/effect/mailboxes.js +1 -2
- package/dist/effect/media.d.ts +5 -5
- package/dist/effect/media.js +1 -2
- package/dist/effect/messages.d.ts +9 -9
- package/dist/effect/messages.js +1 -2
- package/dist/effect/namespaces.d.ts +8 -8
- package/dist/effect/namespaces.js +1 -2
- package/dist/effect/newsletter-domains.d.ts +71 -0
- package/dist/effect/newsletter-domains.js +18 -0
- package/dist/effect/{topic-issues.d.ts → newsletter-issues.d.ts} +11 -15
- package/dist/effect/newsletter-issues.js +32 -0
- package/dist/effect/newsletters.d.ts +22 -0
- package/dist/effect/newsletters.js +20 -0
- package/dist/effect/operations.d.ts +3 -3
- package/dist/effect/operations.js +1 -2
- package/dist/effect/organizations.d.ts +8 -10
- package/dist/effect/organizations.js +1 -2
- package/dist/effect/pagination.js +1 -2
- package/dist/effect/retry.d.ts +4 -4
- package/dist/effect/retry.js +5 -6
- package/dist/effect/runtime.js +1 -2
- package/dist/effect/scheduled-messages.d.ts +5 -6
- package/dist/effect/scheduled-messages.js +1 -2
- package/dist/effect/subscriptions.d.ts +1 -1
- package/dist/effect/subscriptions.js +1 -2
- package/dist/effect/templates.d.ts +34 -43
- package/dist/effect/templates.js +1 -2
- package/dist/effect/topic-forms.d.ts +5 -5
- package/dist/effect/topic-forms.js +1 -2
- package/dist/effect/topics.d.ts +9 -13
- package/dist/effect/topics.js +1 -2
- package/dist/effect/webhooks.d.ts +11 -11
- package/dist/effect/webhooks.js +1 -2
- package/dist/effect/whoami.d.ts +1 -1
- package/dist/effect/whoami.js +1 -2
- package/dist/index.js +2 -2
- package/dist/inline-attachments.js +1 -2
- package/dist/mailbox/dispatch.d.ts +10 -0
- package/dist/mailbox/dispatch.js +66 -0
- package/dist/mailbox/index.d.ts +17 -0
- package/dist/mailbox/index.js +30 -0
- package/dist/mailbox/test.d.ts +25 -0
- package/dist/mailbox/test.js +174 -0
- package/dist/mailbox/types.d.ts +184 -0
- package/dist/mailbox/webhook.d.ts +10 -0
- package/dist/mailbox/webhook.js +41 -0
- package/dist/mailbox-events.js +1 -2
- package/dist/normalize.js +1 -2
- package/dist/package.js +2 -3
- package/dist/promises/client.d.ts +215 -0
- package/dist/promises/client.js +324 -0
- package/dist/promises/errors.gen.js +1 -2
- package/dist/promises/index.d.ts +2 -196
- package/dist/promises/index.js +3 -295
- package/dist/promises/request.d.ts +15 -0
- package/dist/promises/request.js +75 -0
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/request-policy.d.ts +3 -0
- package/dist/request-policy.js +16 -0
- package/dist/service-map.d.ts +78 -47
- package/dist/service-map.js +52 -32
- package/package.json +34 -18
- package/dist/effect/generated/publication-domains.js +0 -163
- package/dist/effect/publication-domains.d.ts +0 -14
- package/dist/effect/publication-domains.js +0 -17
- package/dist/effect/topic-issues.js +0 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactGroupId, ContactId, ContactIdentity, ContactIdentityId, ConversationId, Cursor,
|
|
1
|
+
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactGroupId, ContactId, ContactIdentity, ContactIdentityId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, MessageId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TopicId, 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/contacts.ts
|
|
5
5
|
const ContactCustomFields = /* @__PURE__ */ (() => Schema.Record(Schema.String, Schema.Union([
|
|
6
6
|
Schema.String,
|
|
7
7
|
Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
@@ -111,11 +111,11 @@ const ContactProfile = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
111
111
|
]), Schema.Null]))
|
|
112
112
|
}).annotate({ identifier: "ContactProfile" }))();
|
|
113
113
|
const ContactProfileUpdate = /* @__PURE__ */ (() => Schema.Struct({
|
|
114
|
-
firstName: Schema.optionalKey(Schema.Union([Schema.
|
|
115
|
-
lastName: Schema.optionalKey(Schema.Union([Schema.
|
|
116
|
-
company: Schema.optionalKey(Schema.Union([Schema.
|
|
117
|
-
jobTitle: Schema.optionalKey(Schema.Union([Schema.
|
|
118
|
-
location: Schema.optionalKey(Schema.Union([
|
|
114
|
+
firstName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
115
|
+
lastName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
116
|
+
company: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
117
|
+
jobTitle: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
118
|
+
location: Schema.optionalKey(Schema.Union([ContactLocation, Schema.Null])),
|
|
119
119
|
customFields: Schema.optionalKey(Schema.Union([ContactCustomFields, Schema.Null]))
|
|
120
120
|
}).annotate({ identifier: "ContactProfileUpdate" }))();
|
|
121
121
|
const ContactSummary = /* @__PURE__ */ (() => Schema.Struct({
|
|
@@ -263,11 +263,11 @@ const ContactsList504 = GatewayTimeoutError;
|
|
|
263
263
|
const ContactsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
264
264
|
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
265
265
|
name: Schema.String,
|
|
266
|
-
displayName: Schema.optionalKey(Schema.Union([Schema.
|
|
267
|
-
avatar: Schema.optionalKey(Schema.Union([Schema.
|
|
266
|
+
displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
267
|
+
avatar: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
268
268
|
identities: Schema.optionalKey(Schema.Union([Schema.Array(ContactIdentityInput), Schema.Null])),
|
|
269
|
-
profile: Schema.optionalKey(Schema.Union([
|
|
270
|
-
preferences: Schema.optionalKey(Schema.Union([
|
|
269
|
+
profile: Schema.optionalKey(Schema.Union([ContactProfile, Schema.Null])),
|
|
270
|
+
preferences: Schema.optionalKey(Schema.Union([ContactPreferences, Schema.Null])),
|
|
271
271
|
tags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
272
272
|
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
273
273
|
Schema.Literal("active"),
|
|
@@ -275,9 +275,9 @@ const ContactsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
275
275
|
Schema.Literal("blocked"),
|
|
276
276
|
Schema.Literal("archived")
|
|
277
277
|
]), Schema.Null])),
|
|
278
|
-
statusReason: Schema.optionalKey(Schema.Union([Schema.
|
|
279
|
-
externalId: Schema.optionalKey(Schema.Union([Schema.
|
|
280
|
-
metadata: Schema.optionalKey(Schema.Union([
|
|
278
|
+
statusReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
279
|
+
externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
280
|
+
metadata: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null]))
|
|
281
281
|
}))();
|
|
282
282
|
const ContactsCreate201 = Contact;
|
|
283
283
|
const ContactsCreate401 = UnauthorizedError;
|
|
@@ -309,18 +309,18 @@ const ContactsRemove504 = GatewayTimeoutError;
|
|
|
309
309
|
const ContactsUpdatePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ContactId }))();
|
|
310
310
|
const ContactsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
311
311
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
312
|
-
displayName: Schema.optionalKey(Schema.Union([Schema.
|
|
313
|
-
avatar: Schema.optionalKey(Schema.Union([Schema.
|
|
312
|
+
displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
313
|
+
avatar: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
314
314
|
profile: Schema.optionalKey(Schema.Union([ContactProfileUpdate, Schema.Null])),
|
|
315
|
-
preferences: Schema.optionalKey(Schema.Union([
|
|
315
|
+
preferences: Schema.optionalKey(Schema.Union([ContactPreferences, Schema.Null])),
|
|
316
316
|
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
317
317
|
Schema.Literal("active"),
|
|
318
318
|
Schema.Literal("paused"),
|
|
319
319
|
Schema.Literal("blocked"),
|
|
320
320
|
Schema.Literal("archived")
|
|
321
321
|
]), Schema.Null])),
|
|
322
|
-
statusReason: Schema.optionalKey(Schema.Union([Schema.
|
|
323
|
-
externalId: Schema.optionalKey(Schema.Union([Schema.
|
|
322
|
+
statusReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
323
|
+
externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
324
324
|
metadata: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null]))
|
|
325
325
|
}))();
|
|
326
326
|
const ContactsUpdate200 = Contact;
|
|
@@ -519,11 +519,11 @@ const ContactsFindOrCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
519
519
|
lookup: ContactLookup,
|
|
520
520
|
create: Schema.optionalKey(Schema.Union([Schema.Struct({
|
|
521
521
|
name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
522
|
-
displayName: Schema.optionalKey(Schema.Union([Schema.
|
|
523
|
-
avatar: Schema.optionalKey(Schema.Union([Schema.
|
|
522
|
+
displayName: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
523
|
+
avatar: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
524
524
|
identities: Schema.optionalKey(Schema.Union([Schema.Array(ContactIdentityInput), Schema.Null])),
|
|
525
|
-
profile: Schema.optionalKey(Schema.Union([
|
|
526
|
-
externalId: Schema.optionalKey(Schema.Union([Schema.
|
|
525
|
+
profile: Schema.optionalKey(Schema.Union([ContactProfile, Schema.Null])),
|
|
526
|
+
externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
527
527
|
}), Schema.Null]))
|
|
528
528
|
}))();
|
|
529
529
|
const ContactsFindOrCreate200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
@@ -539,6 +539,7 @@ const ContactsFindOrCreate422 = ValidationError;
|
|
|
539
539
|
const ContactsFindOrCreate500 = InternalError;
|
|
540
540
|
const ContactsFindOrCreate502 = BillingProviderError;
|
|
541
541
|
const ContactsFindOrCreate504 = GatewayTimeoutError;
|
|
542
|
+
const ContactsStartImportHeaders = /* @__PURE__ */ (() => Schema.Struct({ "idempotency-key": Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" })), Schema.Null])) }))();
|
|
542
543
|
const ContactsStartImportRequestJson = /* @__PURE__ */ (() => Schema.Union([Schema.Struct({
|
|
543
544
|
mode: Schema.Literal("new"),
|
|
544
545
|
input: Schema.Struct({
|
|
@@ -578,8 +579,7 @@ const ContactsStartImportRequestJson = /* @__PURE__ */ (() => Schema.Union([Sche
|
|
|
578
579
|
suppressionFree: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "The operator declares this beehiiv export was filtered to Suppression does not exist." }))
|
|
579
580
|
})]).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" }))
|
|
580
581
|
}),
|
|
581
|
-
planHash: Schema.String
|
|
582
|
-
idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isBetweenLength(1, 255).annotate({ expected: "a value with a length between 1 and 255" }))
|
|
582
|
+
planHash: Schema.String
|
|
583
583
|
}), Schema.Struct({
|
|
584
584
|
mode: Schema.Literal("resume"),
|
|
585
585
|
jobId: ContactImportJobId,
|
|
@@ -629,7 +629,7 @@ const ContactsStartImport202 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
629
629
|
}))();
|
|
630
630
|
const ContactsStartImport401 = UnauthorizedError;
|
|
631
631
|
const ContactsStartImport402 = PaymentRequiredError;
|
|
632
|
-
const ContactsStartImport403 =
|
|
632
|
+
const ContactsStartImport403 = ForbiddenError;
|
|
633
633
|
const ContactsStartImport404 = ResourceNotFoundError;
|
|
634
634
|
const ContactsStartImport409 = ConflictError;
|
|
635
635
|
const ContactsStartImport422 = ValidationError;
|
|
@@ -749,7 +749,7 @@ const ContactsPlanImport200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
749
749
|
diagnosticsTruncated: Schema.Boolean
|
|
750
750
|
}))();
|
|
751
751
|
const ContactsPlanImport401 = UnauthorizedError;
|
|
752
|
-
const ContactsPlanImport403 =
|
|
752
|
+
const ContactsPlanImport403 = ForbiddenError;
|
|
753
753
|
const ContactsPlanImport404 = ResourceNotFoundError;
|
|
754
754
|
const ContactsPlanImport422 = ValidationError;
|
|
755
755
|
const ContactsPlanImport500 = InternalError;
|
|
@@ -980,6 +980,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
|
|
|
980
980
|
ContactsFindOrCreate504.pipe(HttpApiSchema.status(504))
|
|
981
981
|
]
|
|
982
982
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.findOrCreate").annotate(OpenApi.Summary, "Find or create a contact").annotate(OpenApi.Description, "Looks up exactly one identifier through `lookup: { type, value }`. Returns `{ contact, created: false }` unchanged when it exists. Otherwise creates the lookup identity (or external ID), applies `create` attributes, and returns `{ contact, created: true }`. Additional addresses belong in `create.identities`, custom fields in `create.profile.customFields`; custom field keys must be defined and values must match their types. An external ID lookup cannot be contradicted by `create.externalId`. Creation returns HTTP 409 ConflictError if an externalId or address belongs to another contact; the conflicting field is named and no contact is created. Use the update endpoint to change an existing contact."), HttpApiEndpoint.post("contactsStartImport", "/v1/contacts/imports", {
|
|
983
|
+
headers: ContactsStartImportHeaders,
|
|
983
984
|
payload: ContactsStartImportRequestJson,
|
|
984
985
|
success: ContactsStartImport202.pipe(HttpApiSchema.status(202)),
|
|
985
986
|
error: [
|
|
@@ -993,7 +994,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
|
|
|
993
994
|
ContactsStartImport502.pipe(HttpApiSchema.status(502)),
|
|
994
995
|
ContactsStartImport504.pipe(HttpApiSchema.status(504))
|
|
995
996
|
]
|
|
996
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.startImport").annotate(OpenApi.Summary, "Start or resume a list migration").annotate(OpenApi.Description, "The complete encoded JSON request, including new-start metadata, must not exceed 3000000 bytes. Admits a durable import using the preview hash and an
|
|
997
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.startImport").annotate(OpenApi.Summary, "Start or resume a list migration").annotate(OpenApi.Description, "The complete encoded JSON request, including new-start metadata, must not exceed 3000000 bytes. Admits a durable import using the preview hash and an Idempotency-Key header, or resumes the same persisted input at its committed cursor. The header is required for mode:new and optional for mode:resume. Only mode:new supports idempotent replay. Resume uses expectedGeneration and must not be automatically retried; read getImportJob after an ambiguous response. Imports never restore an existing unsubscribe, suppression or bounce. Namespace-scoped credentials cannot create organization-wide suppressions; those rows are conflicts and create no contact. New active contacts are billable and normal contact events apply."), HttpApiEndpoint.get("contactsGetImportJob", "/v1/contacts/imports/:id", {
|
|
997
998
|
params: ContactsGetImportJobPathParams,
|
|
998
999
|
success: ContactsGetImportJob200,
|
|
999
1000
|
error: [
|
|
@@ -1004,7 +1005,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
|
|
|
1004
1005
|
ContactsGetImportJob500,
|
|
1005
1006
|
ContactsGetImportJob504.pipe(HttpApiSchema.status(504))
|
|
1006
1007
|
]
|
|
1007
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.getImportJob").annotate(OpenApi.Summary, "Get list migration progress").annotate(OpenApi.Description, "Returns the visible import job's committed counts, generation, terminal failure and resumability. The job persists across worker restarts and page reloads.
|
|
1008
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.getImportJob").annotate(OpenApi.Summary, "Get list migration progress").annotate(OpenApi.Description, "Returns the visible import job's committed counts, generation, terminal failure and resumability. The job persists across worker restarts and page reloads."), HttpApiEndpoint.post("contactsPlanImport", "/v1/contacts/imports/plan", {
|
|
1008
1009
|
payload: ContactsPlanImportRequestJson,
|
|
1009
1010
|
success: ContactsPlanImport200,
|
|
1010
1011
|
error: [
|
|
@@ -1015,8 +1016,7 @@ var ContactsGroup = class extends HttpApiGroup.make("Contacts").add(HttpApiEndpo
|
|
|
1015
1016
|
ContactsPlanImport500,
|
|
1016
1017
|
ContactsPlanImport504.pipe(HttpApiSchema.status(504))
|
|
1017
1018
|
]
|
|
1018
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.planImport").annotate(OpenApi.Summary, "Preview a list migration").annotate(OpenApi.Description, "The complete encoded JSON request must not exceed 3000000 bytes. Reads multiple declared export files without changing contacts. Restrictive evidence wins per address. Returns estimated counts and at most 100 diagnostics; processing rechecks current restrictions. Filenames never establish permission.
|
|
1019
|
-
|
|
1020
|
-
export { BulkUpdateResult, Contact, ContactActivityPage, ContactCustomFields, ContactGroupMembershipPage, ContactIdentityInput, ContactImportJobId, ContactListMembership, ContactLocation, ContactLookup, ContactPage, ContactPreferences, ContactProfile, ContactProfileUpdate, ContactSummary, ContactsAddIdentity200, ContactsAddIdentity401, ContactsAddIdentity403, ContactsAddIdentity404, ContactsAddIdentity409, ContactsAddIdentity422, ContactsAddIdentity500, ContactsAddIdentity504, ContactsAddIdentityPathParams, ContactsAddIdentityRequestJson, ContactsAddTags200, ContactsAddTags401, ContactsAddTags403, ContactsAddTags404, ContactsAddTags422, ContactsAddTags500, ContactsAddTags504, ContactsAddTagsPathParams, ContactsAddTagsRequestJson, ContactsBulkDelete200, ContactsBulkDelete401, ContactsBulkDelete403, ContactsBulkDelete422, ContactsBulkDelete500, ContactsBulkDelete502, ContactsBulkDelete504, ContactsBulkDeleteRequestJson, ContactsBulkUpdateStatus200, ContactsBulkUpdateStatus401, ContactsBulkUpdateStatus402, ContactsBulkUpdateStatus403, ContactsBulkUpdateStatus422, ContactsBulkUpdateStatus500, ContactsBulkUpdateStatus502, ContactsBulkUpdateStatus504, ContactsBulkUpdateStatusRequestJson, ContactsBulkUpdateTags200, ContactsBulkUpdateTags401, ContactsBulkUpdateTags403, ContactsBulkUpdateTags422, ContactsBulkUpdateTags500, ContactsBulkUpdateTags504, ContactsBulkUpdateTagsRequestJson, ContactsCreate201, ContactsCreate401, ContactsCreate402, ContactsCreate403, ContactsCreate404, ContactsCreate409, ContactsCreate422, ContactsCreate500, ContactsCreate502, ContactsCreate504, ContactsCreateRequestJson, ContactsExport200, ContactsExport401, ContactsExport403, ContactsExport422, ContactsExport500, ContactsExport504, ContactsExportRequestJson, ContactsFind200, ContactsFind401, ContactsFind403, ContactsFind404, ContactsFind409, ContactsFind422, ContactsFind500, ContactsFind504, ContactsFindOrCreate200, ContactsFindOrCreate401, ContactsFindOrCreate402, ContactsFindOrCreate403, ContactsFindOrCreate404, ContactsFindOrCreate409, ContactsFindOrCreate422, ContactsFindOrCreate500, ContactsFindOrCreate502, ContactsFindOrCreate504, ContactsFindOrCreateRequestJson, ContactsFindRequestJson, ContactsGet200, ContactsGet401, ContactsGet403, ContactsGet404, ContactsGet422, ContactsGet500, ContactsGet504, ContactsGetActivityTimeline200, ContactsGetActivityTimeline401, ContactsGetActivityTimeline403, ContactsGetActivityTimeline404, ContactsGetActivityTimeline422, ContactsGetActivityTimeline500, ContactsGetActivityTimeline504, ContactsGetActivityTimelinePathParams, ContactsGetActivityTimelineQuery, ContactsGetEngagement200, ContactsGetEngagement401, ContactsGetEngagement403, ContactsGetEngagement404, ContactsGetEngagement422, ContactsGetEngagement500, ContactsGetEngagement504, ContactsGetEngagementPathParams, ContactsGetGroupMemberships200, ContactsGetGroupMemberships401, ContactsGetGroupMemberships403, ContactsGetGroupMemberships404, ContactsGetGroupMemberships422, ContactsGetGroupMemberships500, ContactsGetGroupMemberships504, ContactsGetGroupMembershipsPathParams, ContactsGetGroupMembershipsQuery, ContactsGetImportJob200, ContactsGetImportJob401, ContactsGetImportJob403, ContactsGetImportJob404, ContactsGetImportJob422, ContactsGetImportJob500, ContactsGetImportJob504, ContactsGetImportJobPathParams, ContactsGetPathParams, ContactsGroup, ContactsList200, ContactsList401, ContactsList403, ContactsList422, ContactsList500, ContactsList504, ContactsListQuery, ContactsPlanImport200, ContactsPlanImport401, ContactsPlanImport403, ContactsPlanImport404, ContactsPlanImport422, ContactsPlanImport500, ContactsPlanImport504, ContactsPlanImportRequestJson, ContactsRemove200, ContactsRemove401, ContactsRemove403, ContactsRemove404, ContactsRemove422, ContactsRemove500, ContactsRemove502, ContactsRemove504, ContactsRemoveIdentity200, ContactsRemoveIdentity401, ContactsRemoveIdentity403, ContactsRemoveIdentity404, ContactsRemoveIdentity422, ContactsRemoveIdentity500, ContactsRemoveIdentity504, ContactsRemoveIdentityPathParams, ContactsRemovePathParams, ContactsRemoveTags200, ContactsRemoveTags401, ContactsRemoveTags403, ContactsRemoveTags404, ContactsRemoveTags422, ContactsRemoveTags500, ContactsRemoveTags504, ContactsRemoveTagsPathParams, ContactsRemoveTagsRequestJson, ContactsSetConsent200, ContactsSetConsent401, ContactsSetConsent403, ContactsSetConsent404, ContactsSetConsent422, ContactsSetConsent500, ContactsSetConsent504, ContactsSetConsentPathParams, ContactsSetConsentRequestJson, ContactsStartImport202, ContactsStartImport401, ContactsStartImport402, ContactsStartImport403, ContactsStartImport404, ContactsStartImport409, ContactsStartImport422, ContactsStartImport500, ContactsStartImport502, ContactsStartImport504, ContactsStartImportRequestJson, ContactsUpdate200, ContactsUpdate401, ContactsUpdate402, ContactsUpdate403, ContactsUpdate404, ContactsUpdate422, ContactsUpdate500, ContactsUpdate502, ContactsUpdate504, ContactsUpdatePathParams, ContactsUpdateRequestJson };
|
|
1019
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "contacts.planImport").annotate(OpenApi.Summary, "Preview a list migration").annotate(OpenApi.Description, "The complete encoded JSON request must not exceed 3000000 bytes. Reads multiple declared export files without changing contacts. Restrictive evidence wins per address. Returns estimated counts and at most 100 diagnostics; processing rechecks current restrictions. Filenames never establish permission. Missing required columns refuse the file; unknown status values are conflicts and never subscribe a reader.")).annotate(OpenApi.Description, "Contact CRUD, bulk operations, engagement metrics, and activity timeline") {};
|
|
1020
|
+
export { BulkUpdateResult, Contact, ContactActivityPage, ContactCustomFields, ContactGroupMembershipPage, ContactIdentityInput, ContactImportJobId, ContactListMembership, ContactLocation, ContactLookup, ContactPage, ContactPreferences, ContactProfile, ContactProfileUpdate, ContactSummary, ContactsAddIdentity200, ContactsAddIdentity401, ContactsAddIdentity403, ContactsAddIdentity404, ContactsAddIdentity409, ContactsAddIdentity422, ContactsAddIdentity500, ContactsAddIdentity504, ContactsAddIdentityPathParams, ContactsAddIdentityRequestJson, ContactsAddTags200, ContactsAddTags401, ContactsAddTags403, ContactsAddTags404, ContactsAddTags422, ContactsAddTags500, ContactsAddTags504, ContactsAddTagsPathParams, ContactsAddTagsRequestJson, ContactsBulkDelete200, ContactsBulkDelete401, ContactsBulkDelete403, ContactsBulkDelete422, ContactsBulkDelete500, ContactsBulkDelete502, ContactsBulkDelete504, ContactsBulkDeleteRequestJson, ContactsBulkUpdateStatus200, ContactsBulkUpdateStatus401, ContactsBulkUpdateStatus402, ContactsBulkUpdateStatus403, ContactsBulkUpdateStatus422, ContactsBulkUpdateStatus500, ContactsBulkUpdateStatus502, ContactsBulkUpdateStatus504, ContactsBulkUpdateStatusRequestJson, ContactsBulkUpdateTags200, ContactsBulkUpdateTags401, ContactsBulkUpdateTags403, ContactsBulkUpdateTags422, ContactsBulkUpdateTags500, ContactsBulkUpdateTags504, ContactsBulkUpdateTagsRequestJson, ContactsCreate201, ContactsCreate401, ContactsCreate402, ContactsCreate403, ContactsCreate404, ContactsCreate409, ContactsCreate422, ContactsCreate500, ContactsCreate502, ContactsCreate504, ContactsCreateRequestJson, ContactsExport200, ContactsExport401, ContactsExport403, ContactsExport422, ContactsExport500, ContactsExport504, ContactsExportRequestJson, ContactsFind200, ContactsFind401, ContactsFind403, ContactsFind404, ContactsFind409, ContactsFind422, ContactsFind500, ContactsFind504, ContactsFindOrCreate200, ContactsFindOrCreate401, ContactsFindOrCreate402, ContactsFindOrCreate403, ContactsFindOrCreate404, ContactsFindOrCreate409, ContactsFindOrCreate422, ContactsFindOrCreate500, ContactsFindOrCreate502, ContactsFindOrCreate504, ContactsFindOrCreateRequestJson, ContactsFindRequestJson, ContactsGet200, ContactsGet401, ContactsGet403, ContactsGet404, ContactsGet422, ContactsGet500, ContactsGet504, ContactsGetActivityTimeline200, ContactsGetActivityTimeline401, ContactsGetActivityTimeline403, ContactsGetActivityTimeline404, ContactsGetActivityTimeline422, ContactsGetActivityTimeline500, ContactsGetActivityTimeline504, ContactsGetActivityTimelinePathParams, ContactsGetActivityTimelineQuery, ContactsGetEngagement200, ContactsGetEngagement401, ContactsGetEngagement403, ContactsGetEngagement404, ContactsGetEngagement422, ContactsGetEngagement500, ContactsGetEngagement504, ContactsGetEngagementPathParams, ContactsGetGroupMemberships200, ContactsGetGroupMemberships401, ContactsGetGroupMemberships403, ContactsGetGroupMemberships404, ContactsGetGroupMemberships422, ContactsGetGroupMemberships500, ContactsGetGroupMemberships504, ContactsGetGroupMembershipsPathParams, ContactsGetGroupMembershipsQuery, ContactsGetImportJob200, ContactsGetImportJob401, ContactsGetImportJob403, ContactsGetImportJob404, ContactsGetImportJob422, ContactsGetImportJob500, ContactsGetImportJob504, ContactsGetImportJobPathParams, ContactsGetPathParams, ContactsGroup, ContactsList200, ContactsList401, ContactsList403, ContactsList422, ContactsList500, ContactsList504, ContactsListQuery, ContactsPlanImport200, ContactsPlanImport401, ContactsPlanImport403, ContactsPlanImport404, ContactsPlanImport422, ContactsPlanImport500, ContactsPlanImport504, ContactsPlanImportRequestJson, ContactsRemove200, ContactsRemove401, ContactsRemove403, ContactsRemove404, ContactsRemove422, ContactsRemove500, ContactsRemove502, ContactsRemove504, ContactsRemoveIdentity200, ContactsRemoveIdentity401, ContactsRemoveIdentity403, ContactsRemoveIdentity404, ContactsRemoveIdentity422, ContactsRemoveIdentity500, ContactsRemoveIdentity504, ContactsRemoveIdentityPathParams, ContactsRemovePathParams, ContactsRemoveTags200, ContactsRemoveTags401, ContactsRemoveTags403, ContactsRemoveTags404, ContactsRemoveTags422, ContactsRemoveTags500, ContactsRemoveTags504, ContactsRemoveTagsPathParams, ContactsRemoveTagsRequestJson, ContactsSetConsent200, ContactsSetConsent401, ContactsSetConsent403, ContactsSetConsent404, ContactsSetConsent422, ContactsSetConsent500, ContactsSetConsent504, ContactsSetConsentPathParams, ContactsSetConsentRequestJson, ContactsStartImport202, ContactsStartImport401, ContactsStartImport402, ContactsStartImport403, ContactsStartImport404, ContactsStartImport409, ContactsStartImport422, ContactsStartImport500, ContactsStartImport502, ContactsStartImport504, ContactsStartImportHeaders, ContactsStartImportRequestJson, ContactsUpdate200, ContactsUpdate401, ContactsUpdate402, ContactsUpdate403, ContactsUpdate404, ContactsUpdate422, ContactsUpdate500, ContactsUpdate502, ContactsUpdate504, ContactsUpdatePathParams, ContactsUpdateRequestJson };
|
|
1021
1021
|
|
|
1022
1022
|
//# sourceMappingURL=contacts.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
|
-
import { ApiKeySecurityMiddleware, ContactId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
|
|
3
|
+
import { ApiKeySecurityMiddleware, ContactId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared";
|
|
4
4
|
export type UnknownRecord = {
|
|
5
5
|
readonly [x: string]: JsonValue;
|
|
6
6
|
};
|
|
@@ -188,6 +188,7 @@ export type ConversationsListQuery = {
|
|
|
188
188
|
readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null;
|
|
189
189
|
readonly channel?: "email" | null;
|
|
190
190
|
readonly contactId?: ContactId | null;
|
|
191
|
+
readonly mailboxId?: MailboxId | null;
|
|
191
192
|
readonly after?: string | null;
|
|
192
193
|
readonly before?: string | null;
|
|
193
194
|
};
|
|
@@ -197,6 +198,7 @@ export declare const ConversationsListQuery: Schema.Struct<{
|
|
|
197
198
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
|
|
198
199
|
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
|
|
199
200
|
readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
|
|
201
|
+
readonly mailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
200
202
|
readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
201
203
|
readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
202
204
|
}>;
|
|
@@ -242,7 +244,7 @@ export type ConversationsCreateRequestJson = {
|
|
|
242
244
|
readonly urgency?: "low" | "medium" | "high" | "critical" | null;
|
|
243
245
|
readonly complexity?: "simple" | "moderate" | "complex" | null;
|
|
244
246
|
readonly metadata?: JsonObject | null;
|
|
245
|
-
readonly context?: ConversationContext | null
|
|
247
|
+
readonly context?: ConversationContext | null;
|
|
246
248
|
readonly tags?: ReadonlyArray<string> | null;
|
|
247
249
|
readonly categories?: ReadonlyArray<string> | null;
|
|
248
250
|
readonly isTest?: boolean | null;
|
|
@@ -262,7 +264,7 @@ export declare const ConversationsCreateRequestJson: Schema.Struct<{
|
|
|
262
264
|
readonly urgency: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>, Schema.Null]>>;
|
|
263
265
|
readonly complexity: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"simple">, Schema.Literal<"moderate">, Schema.Literal<"complex">]>, Schema.Null]>>;
|
|
264
266
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
265
|
-
readonly context: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
267
|
+
readonly context: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
266
268
|
readonly customerData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
267
269
|
readonly previousConversations: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
268
270
|
readonly sessionVariables: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
@@ -272,7 +274,7 @@ export declare const ConversationsCreateRequestJson: Schema.Struct<{
|
|
|
272
274
|
readonly pendingSteps: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
273
275
|
readonly workflowData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
274
276
|
}>, Schema.Null]>>;
|
|
275
|
-
}>, Schema.Null]
|
|
277
|
+
}>, Schema.Null]>>;
|
|
276
278
|
readonly tags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
277
279
|
readonly categories: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
278
280
|
readonly isTest: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
@@ -419,16 +421,16 @@ export declare const ConversationsUpdatePathParams: Schema.Struct<{
|
|
|
419
421
|
}>;
|
|
420
422
|
export type ConversationsUpdateRequestJson = {
|
|
421
423
|
readonly title?: string | null;
|
|
422
|
-
readonly description?: string | null
|
|
423
|
-
readonly externalId?: string | null
|
|
424
|
-
readonly parentConversationId?: ConversationId | null
|
|
424
|
+
readonly description?: string | null;
|
|
425
|
+
readonly externalId?: string | null;
|
|
426
|
+
readonly parentConversationId?: ConversationId | null;
|
|
425
427
|
readonly primaryChannel?: "email" | null;
|
|
426
428
|
readonly status?: "active" | "waiting" | "resolved" | "escalated" | "archived" | null;
|
|
427
|
-
readonly statusReason?: string | null
|
|
429
|
+
readonly statusReason?: string | null;
|
|
428
430
|
readonly priority?: number | null;
|
|
429
431
|
readonly urgency?: "low" | "medium" | "high" | "critical" | null;
|
|
430
432
|
readonly complexity?: "simple" | "moderate" | "complex" | null;
|
|
431
|
-
readonly context?: ConversationContext | null
|
|
433
|
+
readonly context?: ConversationContext | null;
|
|
432
434
|
readonly metadata?: JsonObject | null;
|
|
433
435
|
readonly isTest?: boolean | null;
|
|
434
436
|
readonly isInternal?: boolean | null;
|
|
@@ -436,16 +438,16 @@ export type ConversationsUpdateRequestJson = {
|
|
|
436
438
|
};
|
|
437
439
|
export declare const ConversationsUpdateRequestJson: Schema.Struct<{
|
|
438
440
|
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
439
|
-
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
440
|
-
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
441
|
-
readonly parentConversationId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
441
|
+
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
442
|
+
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
443
|
+
readonly parentConversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
442
444
|
readonly primaryChannel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
|
|
443
445
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
|
|
444
|
-
readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
446
|
+
readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
445
447
|
readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
446
448
|
readonly urgency: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>, Schema.Null]>>;
|
|
447
449
|
readonly complexity: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"simple">, Schema.Literal<"moderate">, Schema.Literal<"complex">]>, Schema.Null]>>;
|
|
448
|
-
readonly context: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
450
|
+
readonly context: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
449
451
|
readonly customerData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
450
452
|
readonly previousConversations: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
451
453
|
readonly sessionVariables: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
@@ -455,7 +457,7 @@ export declare const ConversationsUpdateRequestJson: Schema.Struct<{
|
|
|
455
457
|
readonly pendingSteps: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
456
458
|
readonly workflowData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
457
459
|
}>, Schema.Null]>>;
|
|
458
|
-
}>, Schema.Null]
|
|
460
|
+
}>, Schema.Null]>>;
|
|
459
461
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
460
462
|
readonly isTest: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
461
463
|
readonly isInternal: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
@@ -1731,7 +1733,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1731
1733
|
readonly urgency: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>, Schema.Null]>>;
|
|
1732
1734
|
readonly complexity: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"simple">, Schema.Literal<"moderate">, Schema.Literal<"complex">]>, Schema.Null]>>;
|
|
1733
1735
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
1734
|
-
readonly context: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1736
|
+
readonly context: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1735
1737
|
readonly customerData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
1736
1738
|
readonly previousConversations: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
1737
1739
|
readonly sessionVariables: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
@@ -1741,7 +1743,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1741
1743
|
readonly pendingSteps: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
1742
1744
|
readonly workflowData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
1743
1745
|
}>, Schema.Null]>>;
|
|
1744
|
-
}>, Schema.Null]
|
|
1746
|
+
}>, Schema.Null]>>;
|
|
1745
1747
|
readonly tags: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
1746
1748
|
readonly categories: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
1747
1749
|
readonly isTest: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
@@ -1995,6 +1997,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
1995
1997
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
|
|
1996
1998
|
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
|
|
1997
1999
|
readonly contactId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ContactId">, Schema.Null]>>;
|
|
2000
|
+
readonly mailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
1998
2001
|
readonly after: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1999
2002
|
readonly before: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
2000
2003
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -2718,16 +2721,16 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
2718
2721
|
readonly id: Schema.brand<Schema.String, "ConversationId">;
|
|
2719
2722
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
2720
2723
|
readonly title: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
2721
|
-
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
2722
|
-
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
2723
|
-
readonly parentConversationId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
2724
|
+
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
2725
|
+
readonly externalId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
2726
|
+
readonly parentConversationId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "ConversationId">, Schema.Null]>>;
|
|
2724
2727
|
readonly primaryChannel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"email">, Schema.Null]>>;
|
|
2725
2728
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"waiting">, Schema.Literal<"resolved">, Schema.Literal<"escalated">, Schema.Literal<"archived">]>, Schema.Null]>>;
|
|
2726
|
-
readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
2729
|
+
readonly statusReason: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
2727
2730
|
readonly priority: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
2728
2731
|
readonly urgency: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"low">, Schema.Literal<"medium">, Schema.Literal<"high">, Schema.Literal<"critical">]>, Schema.Null]>>;
|
|
2729
2732
|
readonly complexity: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"simple">, Schema.Literal<"moderate">, Schema.Literal<"complex">]>, Schema.Null]>>;
|
|
2730
|
-
readonly context: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
2733
|
+
readonly context: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
2731
2734
|
readonly customerData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
2732
2735
|
readonly previousConversations: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
2733
2736
|
readonly sessionVariables: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
@@ -2737,7 +2740,7 @@ declare const ConversationsGroup_base: HttpApiGroup.HttpApiGroup<"Conversations"
|
|
|
2737
2740
|
readonly pendingSteps: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
2738
2741
|
readonly workflowData: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
2739
2742
|
}>, Schema.Null]>>;
|
|
2740
|
-
}>, Schema.Null]
|
|
2743
|
+
}>, Schema.Null]>>;
|
|
2741
2744
|
readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.suspend<Schema.Codec<JsonValue, JsonValue, never, never>>>, Schema.Null]>>;
|
|
2742
2745
|
readonly isTest: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
2743
2746
|
readonly isInternal: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ContactId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MessagePage, ResourceNotFoundError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
1
|
+
import { ApiKeySecurityMiddleware, ContactId, ConversationId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonObject, JsonValue, MailboxId, 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
|
|
5
5
|
const UnknownRecord = /* @__PURE__ */ (() => Schema.Record(Schema.String, JsonValue).annotate({ identifier: "UnknownRecord" }))();
|
|
6
6
|
const ConversationSummary = /* @__PURE__ */ (() => Schema.Struct({
|
|
7
7
|
id: ConversationId,
|
|
@@ -119,6 +119,7 @@ const ConversationsListQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
119
119
|
]), Schema.Null])),
|
|
120
120
|
channel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
|
|
121
121
|
contactId: Schema.optionalKey(Schema.Union([ContactId, Schema.Null])),
|
|
122
|
+
mailboxId: Schema.optionalKey(Schema.Union([MailboxId, Schema.Null])),
|
|
122
123
|
after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
123
124
|
before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
124
125
|
}))();
|
|
@@ -156,7 +157,7 @@ const ConversationsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
156
157
|
Schema.Literal("complex")
|
|
157
158
|
]), Schema.Null])),
|
|
158
159
|
metadata: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null])),
|
|
159
|
-
context: Schema.optionalKey(Schema.Union([
|
|
160
|
+
context: Schema.optionalKey(Schema.Union([ConversationContext, Schema.Null])),
|
|
160
161
|
tags: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
161
162
|
categories: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
162
163
|
isTest: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
@@ -180,9 +181,9 @@ const ConversationsGetById504 = GatewayTimeoutError;
|
|
|
180
181
|
const ConversationsUpdatePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: ConversationId }))();
|
|
181
182
|
const ConversationsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
182
183
|
title: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
183
|
-
description: Schema.optionalKey(Schema.Union([Schema.
|
|
184
|
-
externalId: Schema.optionalKey(Schema.Union([Schema.
|
|
185
|
-
parentConversationId: Schema.optionalKey(Schema.Union([
|
|
184
|
+
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
185
|
+
externalId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
186
|
+
parentConversationId: Schema.optionalKey(Schema.Union([ConversationId, Schema.Null])),
|
|
186
187
|
primaryChannel: Schema.optionalKey(Schema.Union([Schema.Literal("email"), Schema.Null])),
|
|
187
188
|
status: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
188
189
|
Schema.Literal("active"),
|
|
@@ -191,7 +192,7 @@ const ConversationsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
191
192
|
Schema.Literal("escalated"),
|
|
192
193
|
Schema.Literal("archived")
|
|
193
194
|
]), Schema.Null])),
|
|
194
|
-
statusReason: Schema.optionalKey(Schema.Union([Schema.
|
|
195
|
+
statusReason: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
195
196
|
priority: Schema.optionalKey(Schema.Union([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" })), Schema.Null])),
|
|
196
197
|
urgency: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
197
198
|
Schema.Literal("low"),
|
|
@@ -204,7 +205,7 @@ const ConversationsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
204
205
|
Schema.Literal("moderate"),
|
|
205
206
|
Schema.Literal("complex")
|
|
206
207
|
]), Schema.Null])),
|
|
207
|
-
context: Schema.optionalKey(Schema.Union([
|
|
208
|
+
context: Schema.optionalKey(Schema.Union([ConversationContext, Schema.Null])),
|
|
208
209
|
metadata: Schema.optionalKey(Schema.Union([JsonObject, Schema.Null])),
|
|
209
210
|
isTest: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
210
211
|
isInternal: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
@@ -313,7 +314,7 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
313
314
|
ConversationsList500,
|
|
314
315
|
ConversationsList504.pipe(HttpApiSchema.status(504))
|
|
315
316
|
]
|
|
316
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.list").annotate(OpenApi.Summary, "List conversations").annotate(OpenApi.Description, "Returns conversation summaries, most recently active first, filterable by status, channel, contact, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`."), HttpApiEndpoint.post("conversationsCreate", "/v1/conversations", {
|
|
317
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "conversations.list").annotate(OpenApi.Summary, "List conversations").annotate(OpenApi.Description, "Returns conversation summaries, most recently active first, filterable by status, channel, contact, mailbox, and creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. A conversation that gains activity while you page moves ahead of the cursor, so a walk lists each conversation at most once. Read a conversation's contacts, metadata, and resolution with `GET /v1/conversations/{id}`."), HttpApiEndpoint.post("conversationsCreate", "/v1/conversations", {
|
|
317
318
|
payload: ConversationsCreateRequestJson,
|
|
318
319
|
success: ConversationsCreate201.pipe(HttpApiSchema.status(201)),
|
|
319
320
|
error: [
|
|
@@ -455,7 +456,6 @@ var ConversationsGroup = class extends HttpApiGroup.make("Conversations").add(Ht
|
|
|
455
456
|
ConversationsRemoveTags504.pipe(HttpApiSchema.status(504))
|
|
456
457
|
]
|
|
457
458
|
}).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.") {};
|
|
458
|
-
//#endregion
|
|
459
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 };
|
|
460
460
|
|
|
461
461
|
//# sourceMappingURL=conversations.js.map
|
|
@@ -65,7 +65,7 @@ export type CustomFieldsCreateRequestJson = {
|
|
|
65
65
|
readonly label: string;
|
|
66
66
|
readonly type: "text" | "number" | "boolean" | "date" | "select";
|
|
67
67
|
readonly options?: ReadonlyArray<string> | null;
|
|
68
|
-
readonly defaultValue?: string | null
|
|
68
|
+
readonly defaultValue?: string | null;
|
|
69
69
|
readonly isRequired?: boolean | null;
|
|
70
70
|
readonly sortOrder?: number | null;
|
|
71
71
|
};
|
|
@@ -74,7 +74,7 @@ export declare const CustomFieldsCreateRequestJson: Schema.Struct<{
|
|
|
74
74
|
readonly label: Schema.String;
|
|
75
75
|
readonly type: Schema.Union<readonly [Schema.Literal<"text">, Schema.Literal<"number">, Schema.Literal<"boolean">, Schema.Literal<"date">, Schema.Literal<"select">]>;
|
|
76
76
|
readonly options: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
77
|
-
readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
77
|
+
readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
78
78
|
readonly isRequired: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
79
79
|
readonly sortOrder: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
80
80
|
}>;
|
|
@@ -149,14 +149,14 @@ export declare const CustomFieldsUpdatePathParams: Schema.Struct<{
|
|
|
149
149
|
export type CustomFieldsUpdateRequestJson = {
|
|
150
150
|
readonly label?: string | null;
|
|
151
151
|
readonly options?: ReadonlyArray<string> | null;
|
|
152
|
-
readonly defaultValue?: string | null
|
|
152
|
+
readonly defaultValue?: string | null;
|
|
153
153
|
readonly isRequired?: boolean | null;
|
|
154
154
|
readonly sortOrder?: number | null;
|
|
155
155
|
};
|
|
156
156
|
export declare const CustomFieldsUpdateRequestJson: Schema.Struct<{
|
|
157
157
|
readonly label: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
158
158
|
readonly options: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
159
|
-
readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
159
|
+
readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
160
160
|
readonly isRequired: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
161
161
|
readonly sortOrder: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
162
162
|
}>;
|
|
@@ -203,7 +203,7 @@ declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields",
|
|
|
203
203
|
readonly label: Schema.String;
|
|
204
204
|
readonly type: Schema.Union<readonly [Schema.Literal<"text">, Schema.Literal<"number">, Schema.Literal<"boolean">, Schema.Literal<"date">, Schema.Literal<"select">]>;
|
|
205
205
|
readonly options: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
206
|
-
readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
206
|
+
readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
207
207
|
readonly isRequired: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
208
208
|
readonly sortOrder: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
209
209
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -461,7 +461,7 @@ declare const CustomFieldsGroup_base: HttpApiGroup.HttpApiGroup<"Custom Fields",
|
|
|
461
461
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
462
462
|
readonly label: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
463
463
|
readonly options: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>>;
|
|
464
|
-
readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
464
|
+
readonly defaultValue: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
465
465
|
readonly isRequired: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
|
|
466
466
|
readonly sortOrder: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
467
467
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiKeySecurityMiddleware, ConflictError, ForbiddenError, GatewayTimeoutError, InternalError, 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
5
|
const CustomFieldDefinitionId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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"
|
|
@@ -42,7 +42,7 @@ const CustomFieldsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
42
42
|
Schema.Literal("select")
|
|
43
43
|
]),
|
|
44
44
|
options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
45
|
-
defaultValue: Schema.optionalKey(Schema.Union([Schema.
|
|
45
|
+
defaultValue: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
46
46
|
isRequired: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
47
47
|
sortOrder: Schema.optionalKey(Schema.Union([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" })), Schema.Null]))
|
|
48
48
|
}))();
|
|
@@ -83,7 +83,7 @@ const CustomFieldsUpdatePathParams = /* @__PURE__ */ (() => Schema.Struct({ id:
|
|
|
83
83
|
const CustomFieldsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
84
84
|
label: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
85
85
|
options: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
|
|
86
|
-
defaultValue: Schema.optionalKey(Schema.Union([Schema.
|
|
86
|
+
defaultValue: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
87
87
|
isRequired: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
88
88
|
sortOrder: Schema.optionalKey(Schema.Union([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" })), Schema.Null]))
|
|
89
89
|
}))();
|
|
@@ -156,7 +156,6 @@ var CustomFieldsGroup = class extends HttpApiGroup.make("Custom Fields").add(Htt
|
|
|
156
156
|
CustomFieldsUpdate504.pipe(HttpApiSchema.status(504))
|
|
157
157
|
]
|
|
158
158
|
}).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
|
-
//#endregion
|
|
160
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 };
|
|
161
160
|
|
|
162
161
|
//# sourceMappingURL=custom-fields.js.map
|