samva 0.26.0 → 0.28.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 +7 -0
- package/README.md +14 -7
- package/dist/client/sdk.gen.d.ts +322 -143
- package/dist/client/sdk.gen.js +1085 -332
- package/dist/client/types.gen.d.ts +1342 -479
- package/dist/effect/agents.d.ts +119 -0
- package/dist/effect/agents.js +29 -0
- package/dist/effect/analytics.d.ts +1 -1
- package/dist/effect/analytics.js +1 -1
- package/dist/effect/api-keys.d.ts +6 -6
- package/dist/effect/attachments.d.ts +1 -1
- package/dist/effect/brands.d.ts +2 -0
- package/dist/effect/campaigns.d.ts +275 -25
- package/dist/effect/campaigns.js +7 -1
- package/dist/effect/contact-groups.d.ts +9 -9
- package/dist/effect/contacts.d.ts +74 -81
- package/dist/effect/contacts.js +7 -3
- package/dist/effect/conversations.d.ts +14 -6
- package/dist/effect/email.d.ts +34 -34
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +3 -3
- package/dist/effect/extensions.d.ts +6 -6
- package/dist/effect/generated/agents.d.ts +6 -28
- package/dist/effect/generated/agents.js +270 -0
- package/dist/effect/generated/analytics.d.ts +3 -3
- package/dist/effect/generated/analytics.js +1 -1
- package/dist/effect/generated/api-keys.d.ts +6 -6
- package/dist/effect/generated/api-keys.js +2 -2
- package/dist/effect/generated/attachments.d.ts +3 -3
- package/dist/effect/generated/attachments.js +1 -1
- package/dist/effect/generated/brands.d.ts +16 -0
- package/dist/effect/generated/campaigns.d.ts +1181 -302
- package/dist/effect/generated/campaigns.js +169 -36
- package/dist/effect/generated/contact-events.d.ts +3 -3
- package/dist/effect/generated/contact-events.js +1 -1
- package/dist/effect/generated/contact-groups.d.ts +9 -9
- package/dist/effect/generated/contact-groups.js +7 -7
- package/dist/effect/generated/contacts.d.ts +2063 -290
- package/dist/effect/generated/contacts.js +343 -75
- package/dist/effect/generated/conversations.d.ts +14 -6
- package/dist/effect/generated/conversations.js +6 -6
- package/dist/effect/generated/email.d.ts +55 -70
- package/dist/effect/generated/email.js +18 -21
- package/dist/effect/generated/extension-installations.d.ts +3 -3
- package/dist/effect/generated/extension-installations.js +1 -1
- package/dist/effect/generated/extensions.d.ts +6 -6
- package/dist/effect/generated/extensions.js +2 -2
- package/dist/effect/generated/index.d.ts +5 -3
- package/dist/effect/generated/journeys.d.ts +9 -9
- package/dist/effect/generated/journeys.js +3 -3
- package/dist/effect/generated/mailboxes.d.ts +466 -712
- package/dist/effect/generated/mailboxes.js +22 -14
- package/dist/effect/generated/messages.d.ts +53 -29
- package/dist/effect/generated/messages.js +9 -5
- package/dist/effect/generated/namespaces.d.ts +3 -3
- package/dist/effect/generated/namespaces.js +1 -1
- package/dist/effect/generated/operations.d.ts +3 -3
- package/dist/effect/generated/operations.js +1 -1
- package/dist/effect/generated/organizations.d.ts +0 -9
- package/dist/effect/generated/organizations.js +1 -4
- package/dist/effect/generated/scheduled-messages.d.ts +69 -20
- package/dist/effect/generated/scheduled-messages.js +22 -3
- package/dist/effect/generated/shared.d.ts +431 -177
- package/dist/effect/generated/shared.js +216 -108
- package/dist/effect/generated/subscriptions.d.ts +4 -7
- package/dist/effect/generated/subscriptions.js +3 -4
- package/dist/effect/generated/templates.d.ts +71 -407
- package/dist/effect/generated/templates.js +23 -23
- package/dist/effect/generated/topic-forms.d.ts +656 -0
- package/dist/effect/generated/topic-forms.js +145 -0
- package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
- package/dist/effect/generated/topics.js +267 -0
- package/dist/effect/generated/webhooks.d.ts +6 -6
- package/dist/effect/generated/webhooks.js +2 -2
- package/dist/effect/generated-metadata.d.ts +78 -24
- package/dist/effect/generated-metadata.js +61 -27
- package/dist/effect/index.d.ts +3 -1
- package/dist/effect/index.js +5 -3
- package/dist/effect/internal/operation.js +4 -3
- package/dist/effect/internal/send.d.ts +4 -4
- package/dist/effect/journeys.d.ts +119 -119
- package/dist/effect/mailboxes.d.ts +137 -121
- package/dist/effect/messages.d.ts +19 -11
- package/dist/effect/namespaces.d.ts +3 -3
- package/dist/effect/operations.d.ts +3 -3
- package/dist/effect/scheduled-messages.d.ts +6 -6
- package/dist/effect/subscriptions.d.ts +1 -2
- package/dist/effect/templates.d.ts +13 -13
- package/dist/effect/topic-forms.d.ts +30 -0
- package/dist/effect/topic-forms.js +21 -0
- package/dist/effect/topics.d.ts +94 -0
- package/dist/effect/topics.js +29 -0
- package/dist/effect/webhooks.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/errors.gen.d.ts +65 -8
- package/dist/promises/errors.gen.js +139 -7
- package/dist/promises/index.d.ts +7 -3
- package/dist/promises/index.js +9 -5
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +117 -23
- package/dist/service-map.js +71 -10
- package/package.json +17 -9
- package/dist/effect/generated/unsubscribe-groups.js +0 -284
- package/dist/effect/unsubscribe-groups.d.ts +0 -74
- package/dist/effect/unsubscribe-groups.js +0 -29
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { ApiKeySecurityMiddleware, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, ResourceNotFoundError, TopicId, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
//#region src/effect/generated/topic-forms.ts
|
|
5
|
+
const TopicForm = /* @__PURE__ */ Schema.Struct({
|
|
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
|
+
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})$" })),
|
|
8
|
+
topicId: TopicId,
|
|
9
|
+
allowedOrigins: Schema.Array(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" }))).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
|
|
10
|
+
confirmationTitle: 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" })),
|
|
11
|
+
confirmationMessage: 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" })),
|
|
12
|
+
successTitle: 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" })),
|
|
13
|
+
successMessage: 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" })),
|
|
14
|
+
redirectUrl: 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]),
|
|
15
|
+
linkOrigin: Schema.String,
|
|
16
|
+
createdAt: Schema.String,
|
|
17
|
+
updatedAt: Schema.String
|
|
18
|
+
}).annotate({ identifier: "TopicForm" });
|
|
19
|
+
const TopicFormsListPathParams = /* @__PURE__ */ Schema.Struct({ id: TopicId });
|
|
20
|
+
const TopicFormsList200 = /* @__PURE__ */ Schema.Struct({ items: Schema.Array(TopicForm) });
|
|
21
|
+
const TopicFormsList401 = UnauthorizedError;
|
|
22
|
+
const TopicFormsList403 = /* @__PURE__ */ Schema.Union([ForbiddenError, FlagDisabledError]);
|
|
23
|
+
const TopicFormsList404 = ResourceNotFoundError;
|
|
24
|
+
const TopicFormsList422 = ValidationError;
|
|
25
|
+
const TopicFormsList500 = InternalError;
|
|
26
|
+
const TopicFormsList504 = GatewayTimeoutError;
|
|
27
|
+
const TopicFormsCreatePathParams = /* @__PURE__ */ Schema.Struct({ id: TopicId });
|
|
28
|
+
const TopicFormsCreateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
29
|
+
allowedOrigins: Schema.Array(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" }))).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })),
|
|
30
|
+
confirmationTitle: 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" })),
|
|
31
|
+
confirmationMessage: 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" })),
|
|
32
|
+
successTitle: 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" })),
|
|
33
|
+
successMessage: 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" })),
|
|
34
|
+
redirectUrl: 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])
|
|
35
|
+
});
|
|
36
|
+
const TopicFormsCreate201 = TopicForm;
|
|
37
|
+
const TopicFormsCreate401 = UnauthorizedError;
|
|
38
|
+
const TopicFormsCreate403 = /* @__PURE__ */ Schema.Union([ForbiddenError, FlagDisabledError]);
|
|
39
|
+
const TopicFormsCreate404 = ResourceNotFoundError;
|
|
40
|
+
const TopicFormsCreate422 = ValidationError;
|
|
41
|
+
const TopicFormsCreate500 = InternalError;
|
|
42
|
+
const TopicFormsCreate504 = GatewayTimeoutError;
|
|
43
|
+
const TopicFormsGetPathParams = /* @__PURE__ */ Schema.Struct({
|
|
44
|
+
id: TopicId,
|
|
45
|
+
formId: 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})$" }))
|
|
46
|
+
});
|
|
47
|
+
const TopicFormsGet200 = TopicForm;
|
|
48
|
+
const TopicFormsGet401 = UnauthorizedError;
|
|
49
|
+
const TopicFormsGet403 = /* @__PURE__ */ Schema.Union([ForbiddenError, FlagDisabledError]);
|
|
50
|
+
const TopicFormsGet404 = ResourceNotFoundError;
|
|
51
|
+
const TopicFormsGet422 = ValidationError;
|
|
52
|
+
const TopicFormsGet500 = InternalError;
|
|
53
|
+
const TopicFormsGet504 = GatewayTimeoutError;
|
|
54
|
+
const TopicFormsRemovePathParams = /* @__PURE__ */ Schema.Struct({
|
|
55
|
+
id: TopicId,
|
|
56
|
+
formId: 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})$" }))
|
|
57
|
+
});
|
|
58
|
+
const TopicFormsRemove200 = /* @__PURE__ */ Schema.Struct({ success: Schema.Boolean });
|
|
59
|
+
const TopicFormsRemove401 = UnauthorizedError;
|
|
60
|
+
const TopicFormsRemove403 = /* @__PURE__ */ Schema.Union([ForbiddenError, FlagDisabledError]);
|
|
61
|
+
const TopicFormsRemove404 = ResourceNotFoundError;
|
|
62
|
+
const TopicFormsRemove422 = ValidationError;
|
|
63
|
+
const TopicFormsRemove500 = InternalError;
|
|
64
|
+
const TopicFormsRemove504 = GatewayTimeoutError;
|
|
65
|
+
const TopicFormsUpdatePathParams = /* @__PURE__ */ Schema.Struct({
|
|
66
|
+
id: TopicId,
|
|
67
|
+
formId: 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})$" }))
|
|
68
|
+
});
|
|
69
|
+
const TopicFormsUpdateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
70
|
+
allowedOrigins: Schema.optionalKey(Schema.Union([Schema.Array(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" }))).check(Schema.isMaxLength(20).annotate({ expected: "a value with a length of at most 20" })), Schema.Null])),
|
|
71
|
+
confirmationTitle: 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])),
|
|
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
|
+
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
|
+
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.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]), Schema.Null]))
|
|
76
|
+
});
|
|
77
|
+
const TopicFormsUpdate200 = TopicForm;
|
|
78
|
+
const TopicFormsUpdate401 = UnauthorizedError;
|
|
79
|
+
const TopicFormsUpdate403 = /* @__PURE__ */ Schema.Union([ForbiddenError, FlagDisabledError]);
|
|
80
|
+
const TopicFormsUpdate404 = ResourceNotFoundError;
|
|
81
|
+
const TopicFormsUpdate422 = ValidationError;
|
|
82
|
+
const TopicFormsUpdate500 = InternalError;
|
|
83
|
+
const TopicFormsUpdate504 = GatewayTimeoutError;
|
|
84
|
+
var TopicFormsGroup = class extends HttpApiGroup.make("Topic forms").add(HttpApiEndpoint.get("topicFormsList", "/v1/topics/:id/forms", {
|
|
85
|
+
params: TopicFormsListPathParams,
|
|
86
|
+
success: TopicFormsList200,
|
|
87
|
+
error: [
|
|
88
|
+
TopicFormsList401.pipe(HttpApiSchema.status(401)),
|
|
89
|
+
TopicFormsList403.pipe(HttpApiSchema.status(403)),
|
|
90
|
+
TopicFormsList404.pipe(HttpApiSchema.status(404)),
|
|
91
|
+
TopicFormsList422.pipe(HttpApiSchema.status(422)),
|
|
92
|
+
TopicFormsList500,
|
|
93
|
+
TopicFormsList504.pipe(HttpApiSchema.status(504))
|
|
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. Requires topicSignup. 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
|
+
params: TopicFormsCreatePathParams,
|
|
97
|
+
payload: TopicFormsCreateRequestJson,
|
|
98
|
+
success: TopicFormsCreate201.pipe(HttpApiSchema.status(201)),
|
|
99
|
+
error: [
|
|
100
|
+
TopicFormsCreate401.pipe(HttpApiSchema.status(401)),
|
|
101
|
+
TopicFormsCreate403.pipe(HttpApiSchema.status(403)),
|
|
102
|
+
TopicFormsCreate404.pipe(HttpApiSchema.status(404)),
|
|
103
|
+
TopicFormsCreate422.pipe(HttpApiSchema.status(422)),
|
|
104
|
+
TopicFormsCreate500,
|
|
105
|
+
TopicFormsCreate504.pipe(HttpApiSchema.status(504))
|
|
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. Requires topicSignup."), HttpApiEndpoint.get("topicFormsGet", "/v1/topics/:id/forms/:formId", {
|
|
108
|
+
params: TopicFormsGetPathParams,
|
|
109
|
+
success: TopicFormsGet200,
|
|
110
|
+
error: [
|
|
111
|
+
TopicFormsGet401.pipe(HttpApiSchema.status(401)),
|
|
112
|
+
TopicFormsGet403.pipe(HttpApiSchema.status(403)),
|
|
113
|
+
TopicFormsGet404.pipe(HttpApiSchema.status(404)),
|
|
114
|
+
TopicFormsGet422.pipe(HttpApiSchema.status(422)),
|
|
115
|
+
TopicFormsGet500,
|
|
116
|
+
TopicFormsGet504.pipe(HttpApiSchema.status(504))
|
|
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. Requires topicSignup."), HttpApiEndpoint.delete("topicFormsRemove", "/v1/topics/:id/forms/:formId", {
|
|
119
|
+
params: TopicFormsRemovePathParams,
|
|
120
|
+
success: TopicFormsRemove200,
|
|
121
|
+
error: [
|
|
122
|
+
TopicFormsRemove401.pipe(HttpApiSchema.status(401)),
|
|
123
|
+
TopicFormsRemove403.pipe(HttpApiSchema.status(403)),
|
|
124
|
+
TopicFormsRemove404.pipe(HttpApiSchema.status(404)),
|
|
125
|
+
TopicFormsRemove422.pipe(HttpApiSchema.status(422)),
|
|
126
|
+
TopicFormsRemove500,
|
|
127
|
+
TopicFormsRemove504.pipe(HttpApiSchema.status(504))
|
|
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. Requires topicSignup."), HttpApiEndpoint.patch("topicFormsUpdate", "/v1/topics/:id/forms/:formId", {
|
|
130
|
+
params: TopicFormsUpdatePathParams,
|
|
131
|
+
payload: TopicFormsUpdateRequestJson,
|
|
132
|
+
success: TopicFormsUpdate200,
|
|
133
|
+
error: [
|
|
134
|
+
TopicFormsUpdate401.pipe(HttpApiSchema.status(401)),
|
|
135
|
+
TopicFormsUpdate403.pipe(HttpApiSchema.status(403)),
|
|
136
|
+
TopicFormsUpdate404.pipe(HttpApiSchema.status(404)),
|
|
137
|
+
TopicFormsUpdate422.pipe(HttpApiSchema.status(422)),
|
|
138
|
+
TopicFormsUpdate500,
|
|
139
|
+
TopicFormsUpdate504.pipe(HttpApiSchema.status(504))
|
|
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. Requires topicSignup.")).annotate(OpenApi.Description, "Hosted and embedded double opt-in signup forms for topics") {};
|
|
142
|
+
//#endregion
|
|
143
|
+
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
|
+
|
|
145
|
+
//# sourceMappingURL=topic-forms.js.map
|