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,
|
|
1
|
+
import { ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, 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/topic-forms.ts
|
|
5
5
|
const TopicForm = /* @__PURE__ */ (() => Schema.Struct({
|
|
6
6
|
id: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" })),
|
|
7
7
|
publicKey: Schema.String.annotate({ format: "uuid" }).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$", "u")).annotate({ expected: "a string matching the RegExp ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$" })),
|
|
@@ -19,7 +19,7 @@ const TopicForm = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
19
19
|
const TopicFormsListPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: TopicId }))();
|
|
20
20
|
const TopicFormsList200 = /* @__PURE__ */ (() => Schema.Struct({ items: Schema.Array(TopicForm) }))();
|
|
21
21
|
const TopicFormsList401 = UnauthorizedError;
|
|
22
|
-
const TopicFormsList403 =
|
|
22
|
+
const TopicFormsList403 = ForbiddenError;
|
|
23
23
|
const TopicFormsList404 = ResourceNotFoundError;
|
|
24
24
|
const TopicFormsList422 = ValidationError;
|
|
25
25
|
const TopicFormsList500 = InternalError;
|
|
@@ -35,7 +35,7 @@ const TopicFormsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
35
35
|
}))();
|
|
36
36
|
const TopicFormsCreate201 = TopicForm;
|
|
37
37
|
const TopicFormsCreate401 = UnauthorizedError;
|
|
38
|
-
const TopicFormsCreate403 =
|
|
38
|
+
const TopicFormsCreate403 = ForbiddenError;
|
|
39
39
|
const TopicFormsCreate404 = ResourceNotFoundError;
|
|
40
40
|
const TopicFormsCreate422 = ValidationError;
|
|
41
41
|
const TopicFormsCreate500 = InternalError;
|
|
@@ -46,7 +46,7 @@ const TopicFormsGetPathParams = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
46
46
|
}))();
|
|
47
47
|
const TopicFormsGet200 = TopicForm;
|
|
48
48
|
const TopicFormsGet401 = UnauthorizedError;
|
|
49
|
-
const TopicFormsGet403 =
|
|
49
|
+
const TopicFormsGet403 = ForbiddenError;
|
|
50
50
|
const TopicFormsGet404 = ResourceNotFoundError;
|
|
51
51
|
const TopicFormsGet422 = ValidationError;
|
|
52
52
|
const TopicFormsGet500 = InternalError;
|
|
@@ -57,7 +57,7 @@ const TopicFormsRemovePathParams = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
57
57
|
}))();
|
|
58
58
|
const TopicFormsRemove200 = /* @__PURE__ */ (() => Schema.Struct({ success: Schema.Boolean }))();
|
|
59
59
|
const TopicFormsRemove401 = UnauthorizedError;
|
|
60
|
-
const TopicFormsRemove403 =
|
|
60
|
+
const TopicFormsRemove403 = ForbiddenError;
|
|
61
61
|
const TopicFormsRemove404 = ResourceNotFoundError;
|
|
62
62
|
const TopicFormsRemove422 = ValidationError;
|
|
63
63
|
const TopicFormsRemove500 = InternalError;
|
|
@@ -72,11 +72,11 @@ const TopicFormsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
72
72
|
confirmationMessage: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ expected: "a string with at most 2000 code points" })).check(Schema.isMaxLength(2e3).annotate({ expected: "a value with a length of at most 2000" })), Schema.Null])),
|
|
73
73
|
successTitle: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(120).annotate({ expected: "a string with at most 120 code points" })).check(Schema.isMaxLength(120).annotate({ expected: "a value with a length of at most 120" })), Schema.Null])),
|
|
74
74
|
successMessage: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(2e3).annotate({ expected: "a string with at most 2000 code points" })).check(Schema.isMaxLength(2e3).annotate({ expected: "a value with a length of at most 2000" })), Schema.Null])),
|
|
75
|
-
redirectUrl: Schema.optionalKey(Schema.Union([Schema.
|
|
75
|
+
redirectUrl: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(2048).annotate({ expected: "a string with at most 2048 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^https:\\/\\/", "u")).annotate({ expected: "a string matching the RegExp ^https:\\/\\/" })).check(Schema.isMaxLength(2048).annotate({ expected: "a value with a length of at most 2048" })), Schema.Null]))
|
|
76
76
|
}))();
|
|
77
77
|
const TopicFormsUpdate200 = TopicForm;
|
|
78
78
|
const TopicFormsUpdate401 = UnauthorizedError;
|
|
79
|
-
const TopicFormsUpdate403 =
|
|
79
|
+
const TopicFormsUpdate403 = ForbiddenError;
|
|
80
80
|
const TopicFormsUpdate404 = ResourceNotFoundError;
|
|
81
81
|
const TopicFormsUpdate422 = ValidationError;
|
|
82
82
|
const TopicFormsUpdate500 = InternalError;
|
|
@@ -92,7 +92,7 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
|
|
|
92
92
|
TopicFormsList500,
|
|
93
93
|
TopicFormsList504.pipe(HttpApiSchema.status(504))
|
|
94
94
|
]
|
|
95
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.list").annotate(OpenApi.Summary, "List topic forms").annotate(OpenApi.Description, "Lists the signup forms belonging to the visible topic.
|
|
95
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.list").annotate(OpenApi.Summary, "List topic forms").annotate(OpenApi.Description, "Lists the signup forms belonging to the visible topic. Forms contain exact HTTPS allowed origins, bounded confirmation and success copy, an optional HTTPS redirect, and a public key for hosted or embedded signup."), HttpApiEndpoint.post("topicFormsCreate", "/v1/topics/:id/forms", {
|
|
96
96
|
params: TopicFormsCreatePathParams,
|
|
97
97
|
payload: TopicFormsCreateRequestJson,
|
|
98
98
|
success: TopicFormsCreate201.pipe(HttpApiSchema.status(201)),
|
|
@@ -104,7 +104,7 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
|
|
|
104
104
|
TopicFormsCreate500,
|
|
105
105
|
TopicFormsCreate504.pipe(HttpApiSchema.status(504))
|
|
106
106
|
]
|
|
107
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.create").annotate(OpenApi.Summary, "Create a topic form").annotate(OpenApi.Description, "Creates a signup form for the visible topic and returns 201. The server generates its opaque public key. allowedOrigins contains exact HTTPS origins; the canonical web origin and current topic link origin are also accepted. Copy is plain text and redirectUrl is HTTPS or null.
|
|
107
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.create").annotate(OpenApi.Summary, "Create a topic form").annotate(OpenApi.Description, "Creates a signup form for the visible topic and returns 201. The server generates its opaque public key. allowedOrigins contains exact HTTPS origins; the canonical web origin and current topic link origin are also accepted. Copy is plain text and redirectUrl is HTTPS or null."), HttpApiEndpoint.get("topicFormsGet", "/v1/topics/:id/forms/:formId", {
|
|
108
108
|
params: TopicFormsGetPathParams,
|
|
109
109
|
success: TopicFormsGet200,
|
|
110
110
|
error: [
|
|
@@ -115,7 +115,7 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
|
|
|
115
115
|
TopicFormsGet500,
|
|
116
116
|
TopicFormsGet504.pipe(HttpApiSchema.status(504))
|
|
117
117
|
]
|
|
118
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.get").annotate(OpenApi.Summary, "Get a topic form").annotate(OpenApi.Description, "Returns a signup form belonging to the visible topic, including its public key and current link origin. Forms outside the caller namespace or organization return 404.
|
|
118
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.get").annotate(OpenApi.Summary, "Get a topic form").annotate(OpenApi.Description, "Returns a signup form belonging to the visible topic, including its public key and current link origin. Forms outside the caller namespace or organization return 404."), HttpApiEndpoint.delete("topicFormsRemove", "/v1/topics/:id/forms/:formId", {
|
|
119
119
|
params: TopicFormsRemovePathParams,
|
|
120
120
|
success: TopicFormsRemove200,
|
|
121
121
|
error: [
|
|
@@ -126,7 +126,7 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
|
|
|
126
126
|
TopicFormsRemove500,
|
|
127
127
|
TopicFormsRemove504.pipe(HttpApiSchema.status(504))
|
|
128
128
|
]
|
|
129
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.remove").annotate(OpenApi.Summary, "Delete a topic form").annotate(OpenApi.Description, "Deletes a form belonging to the visible topic. Its public key immediately stops accepting signups. Existing email confirmation links keep their snapshotted copy and remain valid until expiry.
|
|
129
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.remove").annotate(OpenApi.Summary, "Delete a topic form").annotate(OpenApi.Description, "Deletes a form belonging to the visible topic. Its public key immediately stops accepting signups. Existing email confirmation links keep their snapshotted copy and remain valid until expiry."), HttpApiEndpoint.patch("topicFormsUpdate", "/v1/topics/:id/forms/:formId", {
|
|
130
130
|
params: TopicFormsUpdatePathParams,
|
|
131
131
|
payload: TopicFormsUpdateRequestJson,
|
|
132
132
|
success: TopicFormsUpdate200,
|
|
@@ -138,8 +138,7 @@ var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApi
|
|
|
138
138
|
TopicFormsUpdate500,
|
|
139
139
|
TopicFormsUpdate504.pipe(HttpApiSchema.status(504))
|
|
140
140
|
]
|
|
141
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.update").annotate(OpenApi.Summary, "Update a topic form").annotate(OpenApi.Description, "Updates only the supplied form fields. allowedOrigins replaces the complete exact-origin allowlist; redirectUrl null clears the success redirect. The public key remains stable.
|
|
142
|
-
//#endregion
|
|
141
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicForms.update").annotate(OpenApi.Summary, "Update a topic form").annotate(OpenApi.Description, "Updates only the supplied form fields. allowedOrigins replaces the complete exact-origin allowlist; redirectUrl null clears the success redirect. The public key remains stable.")).annotate(OpenApi.Description, "Hosted and embedded double opt-in signup forms for topics") {};
|
|
143
142
|
export { TopicForm, TopicFormsCreate201, TopicFormsCreate401, TopicFormsCreate403, TopicFormsCreate404, TopicFormsCreate422, TopicFormsCreate500, TopicFormsCreate504, TopicFormsCreatePathParams, TopicFormsCreateRequestJson, TopicFormsGet200, TopicFormsGet401, TopicFormsGet403, TopicFormsGet404, TopicFormsGet422, TopicFormsGet500, TopicFormsGet504, TopicFormsGetPathParams, TopicFormsGroup, TopicFormsList200, TopicFormsList401, TopicFormsList403, TopicFormsList404, TopicFormsList422, TopicFormsList500, TopicFormsList504, TopicFormsListPathParams, TopicFormsRemove200, TopicFormsRemove401, TopicFormsRemove403, TopicFormsRemove404, TopicFormsRemove422, TopicFormsRemove500, TopicFormsRemove504, TopicFormsRemovePathParams, TopicFormsUpdate200, TopicFormsUpdate401, TopicFormsUpdate403, TopicFormsUpdate404, TopicFormsUpdate422, TopicFormsUpdate500, TopicFormsUpdate504, TopicFormsUpdatePathParams, TopicFormsUpdateRequestJson };
|
|
144
143
|
|
|
145
144
|
//# sourceMappingURL=topic-forms.js.map
|
|
@@ -67,8 +67,6 @@ export type Topic = {
|
|
|
67
67
|
readonly defaultSenderId: EmailSenderId | null;
|
|
68
68
|
readonly replyMailboxId: MailboxId | null;
|
|
69
69
|
readonly templateId: TemplateId | null;
|
|
70
|
-
readonly archiveEnabled: boolean;
|
|
71
|
-
readonly publicationSlug: string | null;
|
|
72
70
|
readonly subscriptions: TopicSubscriptionCounts;
|
|
73
71
|
readonly createdAt: string;
|
|
74
72
|
readonly updatedAt: string;
|
|
@@ -83,8 +81,6 @@ export declare const Topic: Schema.Struct<{
|
|
|
83
81
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
84
82
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
85
83
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
86
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
87
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
88
84
|
readonly subscriptions: Schema.Struct<{
|
|
89
85
|
readonly email: Schema.Struct<{
|
|
90
86
|
readonly subscribed: Schema.Finite;
|
|
@@ -125,8 +121,6 @@ export declare const TopicList: Schema.Struct<{
|
|
|
125
121
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
126
122
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
127
123
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
128
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
129
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
130
124
|
readonly subscriptions: Schema.Struct<{
|
|
131
125
|
readonly email: Schema.Struct<{
|
|
132
126
|
readonly subscribed: Schema.Finite;
|
|
@@ -155,8 +149,6 @@ export declare const TopicsList200: Schema.Struct<{
|
|
|
155
149
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
156
150
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
157
151
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
158
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
159
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
160
152
|
readonly subscriptions: Schema.Struct<{
|
|
161
153
|
readonly email: Schema.Struct<{
|
|
162
154
|
readonly subscribed: Schema.Finite;
|
|
@@ -179,25 +171,21 @@ export type TopicsList504 = GatewayTimeoutError;
|
|
|
179
171
|
export declare const TopicsList504: typeof GatewayTimeoutError;
|
|
180
172
|
export type TopicsCreateRequestJson = {
|
|
181
173
|
readonly name: string;
|
|
182
|
-
readonly description?: string | null
|
|
183
|
-
readonly namespaceId?: NamespaceId | null
|
|
174
|
+
readonly description?: string | null;
|
|
175
|
+
readonly namespaceId?: NamespaceId | null;
|
|
184
176
|
readonly default?: "opt_out" | "opt_in" | null;
|
|
185
|
-
readonly
|
|
186
|
-
readonly
|
|
187
|
-
readonly
|
|
188
|
-
readonly replyMailboxId?: MailboxId | null | null;
|
|
189
|
-
readonly templateId?: TemplateId | null | null;
|
|
177
|
+
readonly defaultSenderId?: EmailSenderId | null;
|
|
178
|
+
readonly replyMailboxId?: MailboxId | null;
|
|
179
|
+
readonly templateId?: TemplateId | null;
|
|
190
180
|
};
|
|
191
181
|
export declare const TopicsCreateRequestJson: Schema.Struct<{
|
|
192
182
|
readonly name: Schema.String;
|
|
193
|
-
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
194
|
-
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
183
|
+
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
184
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
195
185
|
readonly default: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>, Schema.Null]>>;
|
|
196
|
-
readonly
|
|
197
|
-
readonly
|
|
198
|
-
readonly
|
|
199
|
-
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
|
|
200
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>, Schema.Null]>>;
|
|
186
|
+
readonly defaultSenderId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>>;
|
|
187
|
+
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
188
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
201
189
|
}>;
|
|
202
190
|
export type TopicsCreate201 = Topic;
|
|
203
191
|
export declare const TopicsCreate201: Schema.Struct<{
|
|
@@ -210,8 +198,6 @@ export declare const TopicsCreate201: Schema.Struct<{
|
|
|
210
198
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
211
199
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
212
200
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
213
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
214
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
215
201
|
readonly subscriptions: Schema.Struct<{
|
|
216
202
|
readonly email: Schema.Struct<{
|
|
217
203
|
readonly subscribed: Schema.Finite;
|
|
@@ -252,8 +238,6 @@ export declare const TopicsGet200: Schema.Struct<{
|
|
|
252
238
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
253
239
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
254
240
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
255
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
256
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
257
241
|
readonly subscriptions: Schema.Struct<{
|
|
258
242
|
readonly email: Schema.Struct<{
|
|
259
243
|
readonly subscribed: Schema.Finite;
|
|
@@ -309,23 +293,19 @@ export declare const TopicsUpdatePathParams: Schema.Struct<{
|
|
|
309
293
|
}>;
|
|
310
294
|
export type TopicsUpdateRequestJson = {
|
|
311
295
|
readonly name?: string | null;
|
|
312
|
-
readonly description?: string | null
|
|
296
|
+
readonly description?: string | null;
|
|
313
297
|
readonly default?: "opt_out" | "opt_in" | null;
|
|
314
|
-
readonly
|
|
315
|
-
readonly
|
|
316
|
-
readonly
|
|
317
|
-
readonly replyMailboxId?: MailboxId | null | null;
|
|
318
|
-
readonly templateId?: TemplateId | null | null;
|
|
298
|
+
readonly defaultSenderId?: EmailSenderId | null;
|
|
299
|
+
readonly replyMailboxId?: MailboxId | null;
|
|
300
|
+
readonly templateId?: TemplateId | null;
|
|
319
301
|
};
|
|
320
302
|
export declare const TopicsUpdateRequestJson: Schema.Struct<{
|
|
321
303
|
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
322
|
-
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
304
|
+
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
323
305
|
readonly default: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>, Schema.Null]>>;
|
|
324
|
-
readonly
|
|
325
|
-
readonly
|
|
326
|
-
readonly
|
|
327
|
-
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
|
|
328
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>, Schema.Null]>>;
|
|
306
|
+
readonly defaultSenderId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>>;
|
|
307
|
+
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
308
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
329
309
|
}>;
|
|
330
310
|
export type TopicsUpdate200 = Topic;
|
|
331
311
|
export declare const TopicsUpdate200: Schema.Struct<{
|
|
@@ -338,8 +318,6 @@ export declare const TopicsUpdate200: Schema.Struct<{
|
|
|
338
318
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
339
319
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
340
320
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
341
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
342
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
343
321
|
readonly subscriptions: Schema.Struct<{
|
|
344
322
|
readonly email: Schema.Struct<{
|
|
345
323
|
readonly subscribed: Schema.Finite;
|
|
@@ -380,8 +358,6 @@ export declare const TopicsSetDefault200: Schema.Struct<{
|
|
|
380
358
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
381
359
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
382
360
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
383
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
384
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
385
361
|
readonly subscriptions: Schema.Struct<{
|
|
386
362
|
readonly email: Schema.Struct<{
|
|
387
363
|
readonly subscribed: Schema.Finite;
|
|
@@ -626,14 +602,12 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
|
|
|
626
602
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
627
603
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"topicsCreate", "POST", "/v1/topics", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
628
604
|
readonly name: Schema.String;
|
|
629
|
-
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
630
|
-
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
605
|
+
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
606
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
631
607
|
readonly default: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>, Schema.Null]>>;
|
|
632
|
-
readonly
|
|
633
|
-
readonly
|
|
634
|
-
readonly
|
|
635
|
-
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
|
|
636
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>, Schema.Null]>>;
|
|
608
|
+
readonly defaultSenderId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>>;
|
|
609
|
+
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
610
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
637
611
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
638
612
|
readonly id: Schema.brand<Schema.String, "TopicId">;
|
|
639
613
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
@@ -644,8 +618,6 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
|
|
|
644
618
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
645
619
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
646
620
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
647
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
648
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
649
621
|
readonly subscriptions: Schema.Struct<{
|
|
650
622
|
readonly email: Schema.Struct<{
|
|
651
623
|
readonly subscribed: Schema.Finite;
|
|
@@ -766,8 +738,6 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
|
|
|
766
738
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
767
739
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
768
740
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
769
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
770
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
771
741
|
readonly subscriptions: Schema.Struct<{
|
|
772
742
|
readonly email: Schema.Struct<{
|
|
773
743
|
readonly subscribed: Schema.Finite;
|
|
@@ -869,8 +839,6 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
|
|
|
869
839
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
870
840
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
871
841
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
872
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
873
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
874
842
|
readonly subscriptions: Schema.Struct<{
|
|
875
843
|
readonly email: Schema.Struct<{
|
|
876
844
|
readonly subscribed: Schema.Finite;
|
|
@@ -1155,8 +1123,6 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
|
|
|
1155
1123
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
1156
1124
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
1157
1125
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
1158
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
1159
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1160
1126
|
readonly subscriptions: Schema.Struct<{
|
|
1161
1127
|
readonly email: Schema.Struct<{
|
|
1162
1128
|
readonly subscribed: Schema.Finite;
|
|
@@ -1380,13 +1346,11 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
|
|
|
1380
1346
|
readonly id: Schema.brand<Schema.String, "TopicId">;
|
|
1381
1347
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1382
1348
|
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1383
|
-
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1349
|
+
readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1384
1350
|
readonly default: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"opt_out">, Schema.Literal<"opt_in">]>, Schema.Null]>>;
|
|
1385
|
-
readonly
|
|
1386
|
-
readonly
|
|
1387
|
-
readonly
|
|
1388
|
-
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>, Schema.Null]>>;
|
|
1389
|
-
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>, Schema.Null]>>;
|
|
1351
|
+
readonly defaultSenderId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>>;
|
|
1352
|
+
readonly replyMailboxId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>>;
|
|
1353
|
+
readonly templateId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>>;
|
|
1390
1354
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1391
1355
|
readonly id: Schema.brand<Schema.String, "TopicId">;
|
|
1392
1356
|
readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
|
|
@@ -1397,8 +1361,6 @@ declare const TopicsGroup_base: HttpApiGroup.HttpApiGroup<"Topics", HttpApiEndpo
|
|
|
1397
1361
|
readonly defaultSenderId: Schema.Union<readonly [Schema.brand<Schema.String, "EmailSenderId">, Schema.Null]>;
|
|
1398
1362
|
readonly replyMailboxId: Schema.Union<readonly [Schema.brand<Schema.String, "MailboxId">, Schema.Null]>;
|
|
1399
1363
|
readonly templateId: Schema.Union<readonly [Schema.brand<Schema.String, "TemplateId">, Schema.Null]>;
|
|
1400
|
-
readonly archiveEnabled: Schema.Boolean;
|
|
1401
|
-
readonly publicationSlug: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
1402
1364
|
readonly subscriptions: Schema.Struct<{
|
|
1403
1365
|
readonly email: Schema.Struct<{
|
|
1404
1366
|
readonly subscribed: Schema.Finite;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, Cursor, EmailSenderId, ForbiddenError, GatewayTimeoutError, InternalError, MailboxId, NamespaceId, PaymentRequiredError, ResourceNotFoundError, TemplateId, TopicContactRef, 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/topics.ts
|
|
5
5
|
const TopicSubscriptionCounts = /* @__PURE__ */ (() => Schema.Struct({ email: Schema.Struct({
|
|
6
6
|
subscribed: 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" })),
|
|
7
7
|
unsubscribed: 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" }))
|
|
@@ -36,8 +36,6 @@ const Topic = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
36
36
|
defaultSenderId: Schema.Union([EmailSenderId, Schema.Null]),
|
|
37
37
|
replyMailboxId: Schema.Union([MailboxId, Schema.Null]),
|
|
38
38
|
templateId: Schema.Union([TemplateId, Schema.Null]),
|
|
39
|
-
archiveEnabled: Schema.Boolean,
|
|
40
|
-
publicationSlug: Schema.Union([Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$" })), Schema.Null]),
|
|
41
39
|
subscriptions: TopicSubscriptionCounts,
|
|
42
40
|
createdAt: Schema.String,
|
|
43
41
|
updatedAt: Schema.String
|
|
@@ -56,14 +54,12 @@ const TopicsList500 = InternalError;
|
|
|
56
54
|
const TopicsList504 = GatewayTimeoutError;
|
|
57
55
|
const TopicsCreateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
58
56
|
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
59
|
-
description: Schema.optionalKey(Schema.Union([Schema.
|
|
60
|
-
namespaceId: Schema.optionalKey(Schema.Union([
|
|
57
|
+
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
58
|
+
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
61
59
|
default: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("opt_out"), Schema.Literal("opt_in")]), Schema.Null])),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
replyMailboxId: Schema.optionalKey(Schema.Union([Schema.Union([MailboxId, Schema.Null]), Schema.Null])),
|
|
66
|
-
templateId: Schema.optionalKey(Schema.Union([Schema.Union([TemplateId, Schema.Null]), Schema.Null]))
|
|
60
|
+
defaultSenderId: Schema.optionalKey(Schema.Union([EmailSenderId, Schema.Null])),
|
|
61
|
+
replyMailboxId: Schema.optionalKey(Schema.Union([MailboxId, Schema.Null])),
|
|
62
|
+
templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null]))
|
|
67
63
|
}))();
|
|
68
64
|
const TopicsCreate201 = Topic;
|
|
69
65
|
const TopicsCreate401 = UnauthorizedError;
|
|
@@ -93,13 +89,11 @@ const TopicsRemove504 = GatewayTimeoutError;
|
|
|
93
89
|
const TopicsUpdatePathParams = /* @__PURE__ */ (() => Schema.Struct({ id: TopicId }))();
|
|
94
90
|
const TopicsUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
95
91
|
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
96
|
-
description: Schema.optionalKey(Schema.Union([Schema.
|
|
92
|
+
description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
97
93
|
default: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("opt_out"), Schema.Literal("opt_in")]), Schema.Null])),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
replyMailboxId: Schema.optionalKey(Schema.Union([Schema.Union([MailboxId, Schema.Null]), Schema.Null])),
|
|
102
|
-
templateId: Schema.optionalKey(Schema.Union([Schema.Union([TemplateId, Schema.Null]), Schema.Null]))
|
|
94
|
+
defaultSenderId: Schema.optionalKey(Schema.Union([EmailSenderId, Schema.Null])),
|
|
95
|
+
replyMailboxId: Schema.optionalKey(Schema.Union([MailboxId, Schema.Null])),
|
|
96
|
+
templateId: Schema.optionalKey(Schema.Union([TemplateId, Schema.Null]))
|
|
103
97
|
}))();
|
|
104
98
|
const TopicsUpdate200 = Topic;
|
|
105
99
|
const TopicsUpdate401 = UnauthorizedError;
|
|
@@ -184,7 +178,7 @@ var TopicsGroup = class extends HttpApiGroup.make("Topics").add(HttpApiEndpoint.
|
|
|
184
178
|
TopicsCreate500,
|
|
185
179
|
TopicsCreate504.pipe(HttpApiSchema.status(504))
|
|
186
180
|
]
|
|
187
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.create").annotate(OpenApi.Summary, "Create a topic").annotate(OpenApi.Description, "Creates a topic in the caller's or requested namespace. The subscription default is opt_out when omitted.
|
|
181
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.create").annotate(OpenApi.Summary, "Create a topic").annotate(OpenApi.Description, "Creates a topic in the caller's or requested namespace. The subscription default is opt_out when omitted. Sending defaults must be compatible with that namespace. An organization holds at most 200 topics."), HttpApiEndpoint.get("topicsGet", "/v1/topics/:id", {
|
|
188
182
|
params: TopicsGetPathParams,
|
|
189
183
|
success: TopicsGet200,
|
|
190
184
|
error: [
|
|
@@ -195,7 +189,7 @@ var TopicsGroup = class extends HttpApiGroup.make("Topics").add(HttpApiEndpoint.
|
|
|
195
189
|
TopicsGet500,
|
|
196
190
|
TopicsGet504.pipe(HttpApiSchema.status(504))
|
|
197
191
|
]
|
|
198
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.get").annotate(OpenApi.Summary, "Get a topic").annotate(OpenApi.Description, "Returns a visible topic, its
|
|
192
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.get").annotate(OpenApi.Summary, "Get a topic").annotate(OpenApi.Description, "Returns a visible topic, its sending defaults, and explicit subscription counts by channel and status. Individual subscriptions are read through listSubscriptions."), HttpApiEndpoint.delete("topicsRemove", "/v1/topics/:id", {
|
|
199
193
|
params: TopicsRemovePathParams,
|
|
200
194
|
success: TopicsRemove200,
|
|
201
195
|
error: [
|
|
@@ -220,7 +214,7 @@ var TopicsGroup = class extends HttpApiGroup.make("Topics").add(HttpApiEndpoint.
|
|
|
220
214
|
TopicsUpdate500,
|
|
221
215
|
TopicsUpdate504.pipe(HttpApiSchema.status(504))
|
|
222
216
|
]
|
|
223
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.update").annotate(OpenApi.Summary, "Update a topic").annotate(OpenApi.Description, "Updates named fields. Changing the default does not change any explicit subscription status. Null clears a
|
|
217
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.update").annotate(OpenApi.Summary, "Update a topic").annotate(OpenApi.Description, "Updates named fields. Changing the default does not change any explicit subscription status. Null clears a sending default."), HttpApiEndpoint.post("topicsSetDefault", "/v1/topics/:id/default", {
|
|
224
218
|
params: TopicsSetDefaultPathParams,
|
|
225
219
|
success: TopicsSetDefault200,
|
|
226
220
|
error: [
|
|
@@ -269,7 +263,6 @@ var TopicsGroup = class extends HttpApiGroup.make("Topics").add(HttpApiEndpoint.
|
|
|
269
263
|
TopicsCheckSubscription504.pipe(HttpApiSchema.status(504))
|
|
270
264
|
]
|
|
271
265
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topics.checkSubscription").annotate(OpenApi.Summary, "Check topic subscriptions").annotate(OpenApi.Description, "Name exactly one contactId, email, or phone and a channel. Returns effective status, using the topic default when no explicit subscription exists. topicIds is an optional comma-separated list. Addresses resolve within the requested namespace; an unknown address returns contactId null and the effective defaults.")).annotate(OpenApi.Description, "Topics and per-channel contact subscriptions") {};
|
|
272
|
-
//#endregion
|
|
273
266
|
export { Topic, TopicList, TopicSetSubscriptionsResult, TopicSubscription, TopicSubscriptionCheck, TopicSubscriptionCounts, TopicSubscriptionPage, TopicsCheckSubscription200, TopicsCheckSubscription401, TopicsCheckSubscription403, TopicsCheckSubscription404, TopicsCheckSubscription422, TopicsCheckSubscription500, TopicsCheckSubscription504, TopicsCheckSubscriptionQuery, TopicsCreate201, TopicsCreate401, TopicsCreate403, TopicsCreate404, TopicsCreate409, TopicsCreate422, TopicsCreate500, TopicsCreate504, TopicsCreateRequestJson, TopicsGet200, TopicsGet401, TopicsGet403, TopicsGet404, TopicsGet422, TopicsGet500, TopicsGet504, TopicsGetPathParams, TopicsGroup, TopicsList200, TopicsList401, TopicsList403, TopicsList422, TopicsList500, TopicsList504, TopicsListQuery, TopicsListSubscriptions200, TopicsListSubscriptions401, TopicsListSubscriptions403, TopicsListSubscriptions404, TopicsListSubscriptions422, TopicsListSubscriptions500, TopicsListSubscriptions504, TopicsListSubscriptionsPathParams, TopicsListSubscriptionsQuery, TopicsRemove200, TopicsRemove401, TopicsRemove403, TopicsRemove404, TopicsRemove409, TopicsRemove422, TopicsRemove500, TopicsRemove504, TopicsRemovePathParams, TopicsSetDefault200, TopicsSetDefault401, TopicsSetDefault403, TopicsSetDefault404, TopicsSetDefault422, TopicsSetDefault500, TopicsSetDefault504, TopicsSetDefaultPathParams, TopicsSetSubscriptions200, TopicsSetSubscriptions401, TopicsSetSubscriptions402, TopicsSetSubscriptions403, TopicsSetSubscriptions404, TopicsSetSubscriptions422, TopicsSetSubscriptions500, TopicsSetSubscriptions502, TopicsSetSubscriptions504, TopicsSetSubscriptionsPathParams, TopicsSetSubscriptionsRequestJson, TopicsUpdate200, TopicsUpdate401, TopicsUpdate403, TopicsUpdate404, TopicsUpdate409, TopicsUpdate422, TopicsUpdate500, TopicsUpdate504, TopicsUpdatePathParams, TopicsUpdateRequestJson };
|
|
274
267
|
|
|
275
268
|
//# sourceMappingURL=topics.js.map
|
|
@@ -405,9 +405,9 @@ export type WebhooksUpdateRequestJson = {
|
|
|
405
405
|
readonly name?: string | null;
|
|
406
406
|
readonly url?: string | null;
|
|
407
407
|
readonly eventTypes?: ReadonlyArray<"message.sent" | "message.delivered" | "message.read" | "message.failed" | "message.bounced" | "message.complained" | "message.received" | "message.opened" | "message.clicked" | "contact.created" | "contact.updated" | "contact.deleted" | "contact.subscribed" | "contact.unsubscribed" | "contact.resubscribed" | "contact.consent_changed" | "conversation.created" | "conversation.updated" | "conversation.archived" | "webhook.created" | "webhook.updated" | "webhook.deleted" | "webhook.test" | "domain.updated" | "domain.warming.updated" | "template.registration.updated" | "flow.registration.updated" | "whatsapp.number.connected" | "mailbox.message.received" | "mailbox.message.sent" | "mailbox.action.pending_approval" | "mailbox.action.resolved" | "mailbox.message.quarantined" | "mailbox.message.released" | "mailbox.message.discarded" | "mailbox.message.delivered" | "mailbox.message.read" | "mailbox.message.failed" | "journey.webhook"> | null;
|
|
408
|
-
readonly channels?: ReadonlyArray<"email"> | null
|
|
409
|
-
readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null
|
|
410
|
-
readonly namespaceId?: NamespaceId | null
|
|
408
|
+
readonly channels?: ReadonlyArray<"email"> | null;
|
|
409
|
+
readonly mailboxIds?: readonly [MailboxId, ...Array<MailboxId>] | null;
|
|
410
|
+
readonly namespaceId?: NamespaceId | null;
|
|
411
411
|
readonly headers?: {
|
|
412
412
|
readonly [x: string]: string;
|
|
413
413
|
} | null;
|
|
@@ -417,9 +417,9 @@ export declare const WebhooksUpdateRequestJson: Schema.Struct<{
|
|
|
417
417
|
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
418
418
|
readonly url: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
419
419
|
readonly eventTypes: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"message.sent">, Schema.Literal<"message.delivered">, Schema.Literal<"message.read">, Schema.Literal<"message.failed">, Schema.Literal<"message.bounced">, Schema.Literal<"message.complained">, Schema.Literal<"message.received">, Schema.Literal<"message.opened">, Schema.Literal<"message.clicked">, Schema.Literal<"contact.created">, Schema.Literal<"contact.updated">, Schema.Literal<"contact.deleted">, Schema.Literal<"contact.subscribed">, Schema.Literal<"contact.unsubscribed">, Schema.Literal<"contact.resubscribed">, Schema.Literal<"contact.consent_changed">, Schema.Literal<"conversation.created">, Schema.Literal<"conversation.updated">, Schema.Literal<"conversation.archived">, Schema.Literal<"webhook.created">, Schema.Literal<"webhook.updated">, Schema.Literal<"webhook.deleted">, Schema.Literal<"webhook.test">, Schema.Literal<"domain.updated">, Schema.Literal<"domain.warming.updated">, Schema.Literal<"template.registration.updated">, Schema.Literal<"flow.registration.updated">, Schema.Literal<"whatsapp.number.connected">, Schema.Literal<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.action.resolved">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>, Schema.Null]>>;
|
|
420
|
-
readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema
|
|
421
|
-
readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
422
|
-
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
420
|
+
readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
|
|
421
|
+
readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "MailboxId">]>, readonly [Schema.brand<Schema.String, "MailboxId">]>, Schema.Null]>>;
|
|
422
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
423
423
|
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
424
424
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
|
|
425
425
|
}>;
|
|
@@ -1692,9 +1692,9 @@ declare const WebhooksGroup_base: HttpApiGroup.HttpApiGroup<"Webhooks", HttpApiE
|
|
|
1692
1692
|
readonly name: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1693
1693
|
readonly url: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
|
|
1694
1694
|
readonly eventTypes: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"message.sent">, Schema.Literal<"message.delivered">, Schema.Literal<"message.read">, Schema.Literal<"message.failed">, Schema.Literal<"message.bounced">, Schema.Literal<"message.complained">, Schema.Literal<"message.received">, Schema.Literal<"message.opened">, Schema.Literal<"message.clicked">, Schema.Literal<"contact.created">, Schema.Literal<"contact.updated">, Schema.Literal<"contact.deleted">, Schema.Literal<"contact.subscribed">, Schema.Literal<"contact.unsubscribed">, Schema.Literal<"contact.resubscribed">, Schema.Literal<"contact.consent_changed">, Schema.Literal<"conversation.created">, Schema.Literal<"conversation.updated">, Schema.Literal<"conversation.archived">, Schema.Literal<"webhook.created">, Schema.Literal<"webhook.updated">, Schema.Literal<"webhook.deleted">, Schema.Literal<"webhook.test">, Schema.Literal<"domain.updated">, Schema.Literal<"domain.warming.updated">, Schema.Literal<"template.registration.updated">, Schema.Literal<"flow.registration.updated">, Schema.Literal<"whatsapp.number.connected">, Schema.Literal<"mailbox.message.received">, Schema.Literal<"mailbox.message.sent">, Schema.Literal<"mailbox.action.pending_approval">, Schema.Literal<"mailbox.action.resolved">, Schema.Literal<"mailbox.message.quarantined">, Schema.Literal<"mailbox.message.released">, Schema.Literal<"mailbox.message.discarded">, Schema.Literal<"mailbox.message.delivered">, Schema.Literal<"mailbox.message.read">, Schema.Literal<"mailbox.message.failed">, Schema.Literal<"journey.webhook">]>>, Schema.Null]>>;
|
|
1695
|
-
readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema
|
|
1696
|
-
readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1697
|
-
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
1695
|
+
readonly channels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
|
|
1696
|
+
readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "MailboxId">]>, readonly [Schema.brand<Schema.String, "MailboxId">]>, Schema.Null]>>;
|
|
1697
|
+
readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
|
|
1698
1698
|
readonly headers: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
|
|
1699
1699
|
readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>, Schema.Null]>>;
|
|
1700
1700
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -2,7 +2,7 @@ import { SensitiveString } from "../runtime.js";
|
|
|
2
2
|
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, MailboxId, NamespaceId, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SuccessResponse, UnauthorizedError, ValidationError, WebhookEndpointId } from "./shared.js";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
4
|
import * as Schema from "effect/Schema";
|
|
5
|
-
|
|
5
|
+
// src/effect/generated/webhooks.ts
|
|
6
6
|
const WebhookDeliveryCounts = /* @__PURE__ */ (() => Schema.Struct({
|
|
7
7
|
total: 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" })),
|
|
8
8
|
pending: 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" })),
|
|
@@ -335,9 +335,9 @@ const WebhooksUpdateRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
335
335
|
Schema.Literal("mailbox.message.failed"),
|
|
336
336
|
Schema.Literal("journey.webhook")
|
|
337
337
|
])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
338
|
-
channels: Schema.optionalKey(Schema.Union([Schema.
|
|
339
|
-
mailboxIds: Schema.optionalKey(Schema.Union([Schema.
|
|
340
|
-
namespaceId: Schema.optionalKey(Schema.Union([
|
|
338
|
+
channels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Literal("email")).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
339
|
+
mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null])),
|
|
340
|
+
namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null])),
|
|
341
341
|
headers: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
|
|
342
342
|
status: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("active"), Schema.Literal("disabled")]), Schema.Null]))
|
|
343
343
|
}))();
|
|
@@ -550,7 +550,6 @@ var WebhooksGroup = class extends HttpApiGroup.make("Webhooks").add(HttpApiEndpo
|
|
|
550
550
|
WebhooksTest504.pipe(HttpApiSchema.status(504))
|
|
551
551
|
]
|
|
552
552
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "webhooks.test").annotate(OpenApi.Summary, "Send a test webhook delivery").annotate(OpenApi.Description, "Queues a signed webhook.test event through the normal delivery and retry lifecycle.")).annotate(OpenApi.Description, "Customer event webhook management, testing, and delivery logs") {};
|
|
553
|
-
//#endregion
|
|
554
553
|
export { WebhookAttemptId, WebhookDailyDeliveries, WebhookDeliveryCounts, WebhookDeliveryId, WebhookDeliveryPage, WebhookEndpoint, WebhookEndpointListItem, WebhookEndpointPage, WebhookEventId, WebhookSigningSecret, WebhookStatsResponse, WebhooksCreate201, WebhooksCreate401, WebhooksCreate402, WebhooksCreate403, WebhooksCreate404, WebhooksCreate409, WebhooksCreate422, WebhooksCreate500, WebhooksCreate502, WebhooksCreate504, WebhooksCreateRequestJson, WebhooksGet200, WebhooksGet401, WebhooksGet403, WebhooksGet404, WebhooksGet422, WebhooksGet500, WebhooksGet504, WebhooksGetLogs200, WebhooksGetLogs401, WebhooksGetLogs403, WebhooksGetLogs404, WebhooksGetLogs422, WebhooksGetLogs500, WebhooksGetLogs504, WebhooksGetLogsPathParams, WebhooksGetLogsQuery, WebhooksGetPathParams, WebhooksGetSecret200, WebhooksGetSecret401, WebhooksGetSecret403, WebhooksGetSecret404, WebhooksGetSecret422, WebhooksGetSecret500, WebhooksGetSecret504, WebhooksGetSecretPathParams, WebhooksGetStats200, WebhooksGetStats401, WebhooksGetStats403, WebhooksGetStats404, WebhooksGetStats422, WebhooksGetStats500, WebhooksGetStats504, WebhooksGetStatsPathParams, WebhooksGetStatsQuery, WebhooksGroup, WebhooksList200, WebhooksList401, WebhooksList403, WebhooksList422, WebhooksList500, WebhooksList504, WebhooksListQuery, WebhooksRegenerateSecret200, WebhooksRegenerateSecret401, WebhooksRegenerateSecret403, WebhooksRegenerateSecret404, WebhooksRegenerateSecret422, WebhooksRegenerateSecret500, WebhooksRegenerateSecret504, WebhooksRegenerateSecretPathParams, WebhooksRemove200, WebhooksRemove401, WebhooksRemove403, WebhooksRemove404, WebhooksRemove422, WebhooksRemove500, WebhooksRemove502, WebhooksRemove504, WebhooksRemovePathParams, WebhooksRetryDelivery200, WebhooksRetryDelivery401, WebhooksRetryDelivery403, WebhooksRetryDelivery404, WebhooksRetryDelivery422, WebhooksRetryDelivery429, WebhooksRetryDelivery500, WebhooksRetryDelivery504, WebhooksRetryDeliveryPathParams, WebhooksTest202, WebhooksTest401, WebhooksTest403, WebhooksTest404, WebhooksTest422, WebhooksTest500, WebhooksTest504, WebhooksTestPathParams, WebhooksTestRequestJson, WebhooksUpdate200, WebhooksUpdate401, WebhooksUpdate403, WebhooksUpdate404, WebhooksUpdate409, WebhooksUpdate422, WebhooksUpdate500, WebhooksUpdate504, WebhooksUpdatePathParams, WebhooksUpdateRequestJson };
|
|
555
554
|
|
|
556
555
|
//# sourceMappingURL=webhooks.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiKeyAccess, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, OrganizationId, 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/whoami.ts
|
|
5
5
|
const WhoamiUser = /* @__PURE__ */ (() => Schema.Struct({
|
|
6
6
|
id: Schema.String,
|
|
7
7
|
name: Schema.String,
|
|
@@ -48,7 +48,6 @@ var WhoamiGroup = class extends HttpApiGroup.make("Whoami").add(HttpApiEndpoint.
|
|
|
48
48
|
WhoamiGet504.pipe(HttpApiSchema.status(504))
|
|
49
49
|
]
|
|
50
50
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "whoami.get").annotate(OpenApi.Summary, "Get the calling credential").annotate(OpenApi.Description, "Returns the organization the request acts in and the credential it presents: an API key with its name, prefix, and access, or a signed-in user with their role. Any valid credential may call it, whatever its grants.")).annotate(OpenApi.Description, "The organization and credential behind the request.") {};
|
|
51
|
-
//#endregion
|
|
52
51
|
export { Whoami, WhoamiApiKeyCredential, WhoamiGet200, WhoamiGet401, WhoamiGet403, WhoamiGet422, WhoamiGet500, WhoamiGet504, WhoamiGroup, WhoamiOrganization, WhoamiUser, WhoamiUserCredential };
|
|
53
52
|
|
|
54
53
|
//# sourceMappingURL=whoami.js.map
|