samva 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +17 -0
- package/README.md +2 -1
- package/dist/client/sdk.gen.d.ts +325 -331
- package/dist/client/sdk.gen.js +406 -454
- package/dist/client/types.gen.d.ts +3465 -750
- package/dist/effect/agents.d.ts +222 -17
- package/dist/effect/agents.js +7 -1
- package/dist/effect/analytics.d.ts +21 -15
- package/dist/effect/api-keys.d.ts +30 -24
- package/dist/effect/campaigns.d.ts +695 -39
- package/dist/effect/categories.d.ts +3 -3
- package/dist/effect/contact-groups.d.ts +15 -15
- package/dist/effect/contacts.d.ts +56 -52
- package/dist/effect/conversations.d.ts +51 -45
- package/dist/effect/email.d.ts +82 -82
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +64 -12
- package/dist/effect/extensions.d.ts +16 -16
- package/dist/effect/generated/agents.d.ts +2902 -150
- package/dist/effect/generated/agents.js +219 -31
- package/dist/effect/generated/analytics.d.ts +127 -136
- package/dist/effect/generated/analytics.js +72 -37
- package/dist/effect/generated/api-keys.d.ts +243 -47
- package/dist/effect/generated/api-keys.js +27 -12
- package/dist/effect/generated/attachments.d.ts +89 -1
- package/dist/effect/generated/attachments.js +10 -2
- package/dist/effect/generated/brands.d.ts +133 -1
- package/dist/effect/generated/brands.js +22 -10
- package/dist/effect/generated/campaigns.d.ts +1467 -143
- package/dist/effect/generated/campaigns.js +84 -20
- package/dist/effect/generated/contact-events.d.ts +26 -4
- package/dist/effect/generated/contact-events.js +5 -3
- package/dist/effect/generated/contact-groups.d.ts +233 -13
- package/dist/effect/generated/contact-groups.js +33 -17
- package/dist/effect/generated/contacts.d.ts +634 -96
- package/dist/effect/generated/contacts.js +82 -20
- package/dist/effect/generated/conversations.d.ts +501 -108
- package/dist/effect/generated/conversations.js +106 -22
- package/dist/effect/generated/custom-fields.d.ts +89 -1
- package/dist/effect/generated/custom-fields.js +11 -3
- package/dist/effect/generated/email.d.ts +1447 -83
- package/dist/effect/generated/email.js +167 -43
- package/dist/effect/generated/events.d.ts +51 -7
- package/dist/effect/generated/events.js +9 -5
- package/dist/effect/generated/extension-installations.d.ts +1052 -77
- package/dist/effect/generated/extension-installations.js +45 -31
- package/dist/effect/generated/extensions.d.ts +123 -13
- package/dist/effect/generated/extensions.js +20 -10
- package/dist/effect/generated/feedback.d.ts +23 -1
- package/dist/effect/generated/feedback.js +6 -4
- package/dist/effect/generated/index.d.ts +3 -1
- package/dist/effect/generated/journeys.d.ts +684 -16
- package/dist/effect/generated/journeys.js +37 -9
- package/dist/effect/generated/mailboxes.d.ts +6169 -1734
- package/dist/effect/generated/mailboxes.js +549 -344
- package/dist/effect/generated/media.d.ts +125 -15
- package/dist/effect/generated/media.js +15 -2
- package/dist/effect/generated/messages.d.ts +2036 -117
- package/dist/effect/generated/messages.js +286 -54
- package/dist/effect/generated/namespaces.d.ts +215 -55
- package/dist/effect/generated/namespaces.js +30 -12
- package/dist/effect/generated/newsletter-domains.d.ts +98 -12
- package/dist/effect/generated/newsletter-domains.js +20 -13
- package/dist/effect/generated/newsletter-issues.d.ts +354 -19
- package/dist/effect/generated/newsletter-issues.js +162 -98
- package/dist/effect/generated/newsletters.d.ts +123 -13
- package/dist/effect/generated/newsletters.js +19 -9
- package/dist/effect/generated/operations.d.ts +76 -10
- package/dist/effect/generated/operations.js +12 -6
- package/dist/effect/generated/organizations.d.ts +287 -7
- package/dist/effect/generated/organizations.js +33 -5
- package/dist/effect/generated/policies.d.ts +953 -0
- package/dist/effect/generated/policies.js +116 -0
- package/dist/effect/generated/scheduled-messages.d.ts +4418 -49
- package/dist/effect/generated/scheduled-messages.js +77 -13
- package/dist/effect/generated/shared.d.ts +3213 -521
- package/dist/effect/generated/shared.js +713 -128
- package/dist/effect/generated/subscriptions.d.ts +23 -1
- package/dist/effect/generated/subscriptions.js +6 -4
- package/dist/effect/generated/templates.d.ts +2081 -693
- package/dist/effect/generated/templates.js +482 -267
- package/dist/effect/generated/topic-forms.d.ts +111 -1
- package/dist/effect/generated/topic-forms.js +23 -13
- package/dist/effect/generated/topics.d.ts +353 -43
- package/dist/effect/generated/topics.js +67 -19
- package/dist/effect/generated/webhooks.d.ts +318 -57
- package/dist/effect/generated/webhooks.js +68 -17
- package/dist/effect/generated/whoami.d.ts +35 -5
- package/dist/effect/generated/whoami.js +4 -2
- package/dist/effect/generated-metadata.d.ts +56 -32
- package/dist/effect/generated-metadata.js +137 -105
- package/dist/effect/index.d.ts +1 -0
- package/dist/effect/index.js +3 -2
- package/dist/effect/internal/client.js +1 -1
- package/dist/effect/internal/email-sender.d.ts +1 -1
- package/dist/effect/internal/operation.js +5 -32
- package/dist/effect/internal/send.d.ts +1 -1
- package/dist/effect/journeys.d.ts +169 -83
- package/dist/effect/mailboxes.d.ts +978 -301
- package/dist/effect/mailboxes.js +1 -11
- package/dist/effect/media.d.ts +1 -1
- package/dist/effect/messages.d.ts +40 -40
- package/dist/effect/namespaces.d.ts +15 -15
- package/dist/effect/newsletter-domains.d.ts +5 -5
- package/dist/effect/newsletters.d.ts +1 -1
- package/dist/effect/operations.d.ts +11 -11
- package/dist/effect/organizations.d.ts +2 -2
- package/dist/effect/policies.d.ts +65 -0
- package/dist/effect/policies.js +16 -0
- package/dist/effect/scheduled-messages.d.ts +869 -8
- package/dist/effect/templates.d.ts +43 -45
- package/dist/effect/templates.js +5 -3
- package/dist/effect/topics.d.ts +23 -23
- package/dist/effect/webhooks.d.ts +29 -26
- package/dist/index.js +2 -2
- package/dist/mailbox/test.js +11 -4
- package/dist/mailbox/types.d.ts +39 -3
- package/dist/normalize.js +13 -1
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +4 -2
- package/dist/promises/client.js +5 -3
- package/dist/promises/errors.gen.d.ts +38 -2
- package/dist/promises/errors.gen.js +394 -34
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +39 -28
- package/dist/service-map.js +220 -782
- package/package.json +13 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ConflictError,
|
|
1
|
+
import { ApiKeySecurityMiddleware, ConflictError, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, 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/extensions.ts
|
|
@@ -13,10 +13,10 @@ const ExtensionVersion = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
13
13
|
bundle: Schema.Union([ExtensionBundle, Schema.Null]),
|
|
14
14
|
publishedAt: Schema.String,
|
|
15
15
|
manifest: Schema.Struct({
|
|
16
|
-
name: Schema.String.check(Schema.isPattern(
|
|
16
|
+
name: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-z][a-z0-9-]{1,62}[a-z0-9]$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z][a-z0-9-]{1,62}[a-z0-9]$" })),
|
|
17
17
|
displayName: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(80).annotate({ expected: "a string with at most 80 code points" })).check(Schema.isMaxLength(80).annotate({ expected: "a value with a length of at most 80" })),
|
|
18
18
|
description: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" })), Schema.Null])),
|
|
19
|
-
version: Schema.String.check(Schema.isPattern(
|
|
19
|
+
version: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\d{1,6}\\.\\d{1,6}\\.\\d{1,6}(?:-[0-9A-Za-z.-]{1,64})?$", "u")).annotate({ expected: "a string matching the RegExp ^\\d{1,6}\\.\\d{1,6}\\.\\d{1,6}(?:-[0-9A-Za-z.-]{1,64})?$" })),
|
|
20
20
|
runtime: Schema.Union([Schema.Literal("hosted"), Schema.Literal("webhook")]),
|
|
21
21
|
events: Schema.Array(Schema.Union([
|
|
22
22
|
Schema.Literal("mailbox.message.received"),
|
|
@@ -66,11 +66,12 @@ const PublishExtensionVersionResponse = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
66
66
|
}).annotate({ identifier: "PublishExtensionVersionResponse" }))();
|
|
67
67
|
const ExtensionsListQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
68
68
|
limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
|
|
69
|
-
cursor: Schema.optionalKey(Schema.
|
|
70
|
-
after: Schema.optionalKey(Schema.
|
|
71
|
-
before: Schema.optionalKey(Schema.
|
|
69
|
+
cursor: Schema.optionalKey(Schema.String),
|
|
70
|
+
after: Schema.optionalKey(Schema.String),
|
|
71
|
+
before: Schema.optionalKey(Schema.String)
|
|
72
72
|
}))();
|
|
73
73
|
const ExtensionsList200 = ExtensionPage;
|
|
74
|
+
const ExtensionsList400 = MalformedRequestError;
|
|
74
75
|
const ExtensionsList401 = UnauthorizedError;
|
|
75
76
|
const ExtensionsList403 = ForbiddenError;
|
|
76
77
|
const ExtensionsList404 = ResourceNotFoundError;
|
|
@@ -79,10 +80,10 @@ const ExtensionsList500 = InternalError;
|
|
|
79
80
|
const ExtensionsList504 = GatewayTimeoutError;
|
|
80
81
|
const ExtensionsPublishRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
81
82
|
manifest: Schema.Struct({
|
|
82
|
-
name: Schema.String.check(Schema.isPattern(
|
|
83
|
+
name: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^[a-z][a-z0-9-]{1,62}[a-z0-9]$", "u")).annotate({ expected: "a string matching the RegExp ^[a-z][a-z0-9-]{1,62}[a-z0-9]$" })),
|
|
83
84
|
displayName: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(80).annotate({ expected: "a string with at most 80 code points" })).check(Schema.isMaxLength(80).annotate({ expected: "a value with a length of at most 80" })),
|
|
84
85
|
description: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMaxCodePoints(500).annotate({ expected: "a string with at most 500 code points" })).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" })), Schema.Null])),
|
|
85
|
-
version: Schema.String.check(Schema.isPattern(
|
|
86
|
+
version: Schema.String.check(Schema.isPattern(new globalThis.RegExp("^\\d{1,6}\\.\\d{1,6}\\.\\d{1,6}(?:-[0-9A-Za-z.-]{1,64})?$", "u")).annotate({ expected: "a string matching the RegExp ^\\d{1,6}\\.\\d{1,6}\\.\\d{1,6}(?:-[0-9A-Za-z.-]{1,64})?$" })),
|
|
86
87
|
runtime: Schema.Union([Schema.Literal("hosted"), Schema.Literal("webhook")]),
|
|
87
88
|
events: Schema.Array(Schema.Union([
|
|
88
89
|
Schema.Literal("mailbox.message.received"),
|
|
@@ -103,6 +104,7 @@ const ExtensionsPublishRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
103
104
|
bundle: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
104
105
|
}))();
|
|
105
106
|
const ExtensionsPublish201 = PublishExtensionVersionResponse;
|
|
107
|
+
const ExtensionsPublish400 = MalformedRequestError;
|
|
106
108
|
const ExtensionsPublish401 = UnauthorizedError;
|
|
107
109
|
const ExtensionsPublish403 = ForbiddenError;
|
|
108
110
|
const ExtensionsPublish404 = ResourceNotFoundError;
|
|
@@ -112,6 +114,7 @@ const ExtensionsPublish500 = InternalError;
|
|
|
112
114
|
const ExtensionsPublish504 = GatewayTimeoutError;
|
|
113
115
|
const ExtensionsGetPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: Schema.String.annotate({ description: "The extension's id (`ext_…`) or its name." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })) }))();
|
|
114
116
|
const ExtensionsGet200 = Extension;
|
|
117
|
+
const ExtensionsGet400 = MalformedRequestError;
|
|
115
118
|
const ExtensionsGet401 = UnauthorizedError;
|
|
116
119
|
const ExtensionsGet403 = ForbiddenError;
|
|
117
120
|
const ExtensionsGet404 = ResourceNotFoundError;
|
|
@@ -121,9 +124,10 @@ const ExtensionsGet504 = GatewayTimeoutError;
|
|
|
121
124
|
const ExtensionsListVersionsPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: Schema.String.annotate({ description: "The extension's id (`ext_…`) or its name." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" })).check(Schema.isMaxLength(64).annotate({ expected: "a value with a length of at most 64" })) }))();
|
|
122
125
|
const ExtensionsListVersionsQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
123
126
|
limit: Schema.optionalKey(Schema.Union([Schema.Finite.annotate({ description: "Items per page, at most 100." }).check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
|
|
124
|
-
cursor: Schema.optionalKey(Schema.
|
|
127
|
+
cursor: Schema.optionalKey(Schema.String)
|
|
125
128
|
}))();
|
|
126
129
|
const ExtensionsListVersions200 = ExtensionVersionPage;
|
|
130
|
+
const ExtensionsListVersions400 = MalformedRequestError;
|
|
127
131
|
const ExtensionsListVersions401 = UnauthorizedError;
|
|
128
132
|
const ExtensionsListVersions403 = ForbiddenError;
|
|
129
133
|
const ExtensionsListVersions404 = ResourceNotFoundError;
|
|
@@ -135,6 +139,7 @@ const ExtensionsGetVersionPathParams = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
135
139
|
versionId: Schema.String.annotate({ description: "The version's id (`extver_…`) or its version string, such as `1.0.0`." }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(85).annotate({ expected: "a string with at most 85 code points" })).check(Schema.isMaxLength(85).annotate({ expected: "a value with a length of at most 85" }))
|
|
136
140
|
}))();
|
|
137
141
|
const ExtensionsGetVersion200 = ExtensionVersion;
|
|
142
|
+
const ExtensionsGetVersion400 = MalformedRequestError;
|
|
138
143
|
const ExtensionsGetVersion401 = UnauthorizedError;
|
|
139
144
|
const ExtensionsGetVersion403 = ForbiddenError;
|
|
140
145
|
const ExtensionsGetVersion404 = ResourceNotFoundError;
|
|
@@ -145,6 +150,7 @@ var ExtensionsGroup = class extends HttpApiGroup.make("Extensions").add(HttpApiE
|
|
|
145
150
|
query: ExtensionsListQuery,
|
|
146
151
|
success: ExtensionsList200,
|
|
147
152
|
error: [
|
|
153
|
+
ExtensionsList400.pipe(HttpApiSchema.status(400)),
|
|
148
154
|
ExtensionsList401.pipe(HttpApiSchema.status(401)),
|
|
149
155
|
ExtensionsList403.pipe(HttpApiSchema.status(403)),
|
|
150
156
|
ExtensionsList404.pipe(HttpApiSchema.status(404)),
|
|
@@ -156,6 +162,7 @@ var ExtensionsGroup = class extends HttpApiGroup.make("Extensions").add(HttpApiE
|
|
|
156
162
|
payload: ExtensionsPublishRequestJson,
|
|
157
163
|
success: ExtensionsPublish201.pipe(HttpApiSchema.status(201)),
|
|
158
164
|
error: [
|
|
165
|
+
ExtensionsPublish400.pipe(HttpApiSchema.status(400)),
|
|
159
166
|
ExtensionsPublish401.pipe(HttpApiSchema.status(401)),
|
|
160
167
|
ExtensionsPublish403.pipe(HttpApiSchema.status(403)),
|
|
161
168
|
ExtensionsPublish404.pipe(HttpApiSchema.status(404)),
|
|
@@ -168,6 +175,7 @@ var ExtensionsGroup = class extends HttpApiGroup.make("Extensions").add(HttpApiE
|
|
|
168
175
|
params: ExtensionsGetPathParams,
|
|
169
176
|
success: ExtensionsGet200,
|
|
170
177
|
error: [
|
|
178
|
+
ExtensionsGet400.pipe(HttpApiSchema.status(400)),
|
|
171
179
|
ExtensionsGet401.pipe(HttpApiSchema.status(401)),
|
|
172
180
|
ExtensionsGet403.pipe(HttpApiSchema.status(403)),
|
|
173
181
|
ExtensionsGet404.pipe(HttpApiSchema.status(404)),
|
|
@@ -180,6 +188,7 @@ var ExtensionsGroup = class extends HttpApiGroup.make("Extensions").add(HttpApiE
|
|
|
180
188
|
query: ExtensionsListVersionsQuery,
|
|
181
189
|
success: ExtensionsListVersions200,
|
|
182
190
|
error: [
|
|
191
|
+
ExtensionsListVersions400.pipe(HttpApiSchema.status(400)),
|
|
183
192
|
ExtensionsListVersions401.pipe(HttpApiSchema.status(401)),
|
|
184
193
|
ExtensionsListVersions403.pipe(HttpApiSchema.status(403)),
|
|
185
194
|
ExtensionsListVersions404.pipe(HttpApiSchema.status(404)),
|
|
@@ -191,6 +200,7 @@ var ExtensionsGroup = class extends HttpApiGroup.make("Extensions").add(HttpApiE
|
|
|
191
200
|
params: ExtensionsGetVersionPathParams,
|
|
192
201
|
success: ExtensionsGetVersion200,
|
|
193
202
|
error: [
|
|
203
|
+
ExtensionsGetVersion400.pipe(HttpApiSchema.status(400)),
|
|
194
204
|
ExtensionsGetVersion401.pipe(HttpApiSchema.status(401)),
|
|
195
205
|
ExtensionsGetVersion403.pipe(HttpApiSchema.status(403)),
|
|
196
206
|
ExtensionsGetVersion404.pipe(HttpApiSchema.status(404)),
|
|
@@ -199,6 +209,6 @@ var ExtensionsGroup = class extends HttpApiGroup.make("Extensions").add(HttpApiE
|
|
|
199
209
|
ExtensionsGetVersion504.pipe(HttpApiSchema.status(504))
|
|
200
210
|
]
|
|
201
211
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "extensions.getVersion").annotate(OpenApi.Summary, "Get an extension version").annotate(OpenApi.Description, "Returns one version, by its id or version string, with the manifest it was published with.")).annotate(OpenApi.Description, "Code that receives mailbox events and acts through the mailbox API") {};
|
|
202
|
-
export { Extension, ExtensionBundle, ExtensionPage, ExtensionVersion, ExtensionVersionPage, ExtensionVersionSummary, ExtensionsGet200, ExtensionsGet401, ExtensionsGet403, ExtensionsGet404, ExtensionsGet422, ExtensionsGet500, ExtensionsGet504, ExtensionsGetPathParams, ExtensionsGetVersion200, ExtensionsGetVersion401, ExtensionsGetVersion403, ExtensionsGetVersion404, ExtensionsGetVersion422, ExtensionsGetVersion500, ExtensionsGetVersion504, ExtensionsGetVersionPathParams, ExtensionsGroup, ExtensionsList200, ExtensionsList401, ExtensionsList403, ExtensionsList404, ExtensionsList422, ExtensionsList500, ExtensionsList504, ExtensionsListQuery, ExtensionsListVersions200, ExtensionsListVersions401, ExtensionsListVersions403, ExtensionsListVersions404, ExtensionsListVersions422, ExtensionsListVersions500, ExtensionsListVersions504, ExtensionsListVersionsPathParams, ExtensionsListVersionsQuery, ExtensionsPublish201, ExtensionsPublish401, ExtensionsPublish403, ExtensionsPublish404, ExtensionsPublish409, ExtensionsPublish422, ExtensionsPublish500, ExtensionsPublish504, ExtensionsPublishRequestJson, PublishExtensionVersionResponse };
|
|
212
|
+
export { Extension, ExtensionBundle, ExtensionPage, ExtensionVersion, ExtensionVersionPage, ExtensionVersionSummary, ExtensionsGet200, ExtensionsGet400, ExtensionsGet401, ExtensionsGet403, ExtensionsGet404, ExtensionsGet422, ExtensionsGet500, ExtensionsGet504, ExtensionsGetPathParams, ExtensionsGetVersion200, ExtensionsGetVersion400, ExtensionsGetVersion401, ExtensionsGetVersion403, ExtensionsGetVersion404, ExtensionsGetVersion422, ExtensionsGetVersion500, ExtensionsGetVersion504, ExtensionsGetVersionPathParams, ExtensionsGroup, ExtensionsList200, ExtensionsList400, ExtensionsList401, ExtensionsList403, ExtensionsList404, ExtensionsList422, ExtensionsList500, ExtensionsList504, ExtensionsListQuery, ExtensionsListVersions200, ExtensionsListVersions400, ExtensionsListVersions401, ExtensionsListVersions403, ExtensionsListVersions404, ExtensionsListVersions422, ExtensionsListVersions500, ExtensionsListVersions504, ExtensionsListVersionsPathParams, ExtensionsListVersionsQuery, ExtensionsPublish201, ExtensionsPublish400, ExtensionsPublish401, ExtensionsPublish403, ExtensionsPublish404, ExtensionsPublish409, ExtensionsPublish422, ExtensionsPublish500, ExtensionsPublish504, ExtensionsPublishRequestJson, PublishExtensionVersionResponse };
|
|
203
213
|
|
|
204
214
|
//# sourceMappingURL=extensions.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as EffectBrand from "effect/Brand";
|
|
2
2
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import * as Schema from "effect/Schema";
|
|
4
|
-
import { ApiKeySecurityMiddleware, FeedbackContext, ForbiddenError, GatewayTimeoutError, InternalError, UnauthorizedError, ValidationError } from "./shared";
|
|
4
|
+
import { ApiKeySecurityMiddleware, FeedbackContext, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, UnauthorizedError, ValidationError } from "./shared";
|
|
5
5
|
export type FeedbackId = string & EffectBrand.Brand<"FeedbackId">;
|
|
6
6
|
export declare const FeedbackId: Schema.brand<Schema.String, "FeedbackId">;
|
|
7
7
|
export type FeedbackReceipt = {
|
|
@@ -30,6 +30,8 @@ export declare const FeedbackSend201: Schema.Struct<{
|
|
|
30
30
|
readonly id: Schema.brand<Schema.String, "FeedbackId">;
|
|
31
31
|
readonly createdAt: Schema.String;
|
|
32
32
|
}>;
|
|
33
|
+
export type FeedbackSend400 = MalformedRequestError;
|
|
34
|
+
export declare const FeedbackSend400: typeof MalformedRequestError;
|
|
33
35
|
export type FeedbackSend401 = UnauthorizedError;
|
|
34
36
|
export declare const FeedbackSend401: typeof UnauthorizedError;
|
|
35
37
|
export type FeedbackSend403 = ForbiddenError;
|
|
@@ -78,6 +80,26 @@ declare const FeedbackGroup_base: HttpApiGroup.HttpApiGroup<"Feedback", HttpApiE
|
|
|
78
80
|
readonly _tag: Schema.tag<"GatewayTimeoutError">;
|
|
79
81
|
readonly message: Schema.String;
|
|
80
82
|
readonly retryAfterSeconds: Schema.Finite;
|
|
83
|
+
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<MalformedRequestError, {
|
|
84
|
+
readonly _tag: "MalformedRequestError";
|
|
85
|
+
readonly message: string;
|
|
86
|
+
readonly fields: {
|
|
87
|
+
readonly [x: string]: readonly string[];
|
|
88
|
+
};
|
|
89
|
+
}, readonly [Schema.Struct<{
|
|
90
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
91
|
+
readonly message: Schema.String;
|
|
92
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
93
|
+
}>], {
|
|
94
|
+
readonly _tag: "MalformedRequestError";
|
|
95
|
+
readonly message: string;
|
|
96
|
+
readonly fields: {
|
|
97
|
+
readonly [x: string]: readonly string[];
|
|
98
|
+
};
|
|
99
|
+
}>, Schema.Struct<{
|
|
100
|
+
readonly _tag: Schema.tag<"MalformedRequestError">;
|
|
101
|
+
readonly message: Schema.String;
|
|
102
|
+
readonly fields: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
81
103
|
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
|
|
82
104
|
readonly _tag: "UnauthorizedError";
|
|
83
105
|
readonly message: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, FeedbackContext, ForbiddenError, GatewayTimeoutError, InternalError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
1
|
+
import { ApiKeySecurityMiddleware, FeedbackContext, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, 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/feedback.ts
|
|
5
|
-
const FeedbackId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(
|
|
5
|
+
const FeedbackId = /* @__PURE__ */ (() => Schema.String.check(Schema.isPattern(new globalThis.RegExp("^fdbk_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
6
6
|
expected: "a string matching the RegExp ^fdbk_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
7
7
|
identifier: "FeedbackId"
|
|
8
8
|
})).pipe(Schema.brand("FeedbackId")))();
|
|
@@ -11,7 +11,7 @@ const FeedbackReceipt = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
11
11
|
createdAt: Schema.String
|
|
12
12
|
}).annotate({ identifier: "FeedbackReceipt" }))();
|
|
13
13
|
const FeedbackSendRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
14
|
-
message: Schema.String.annotate({ description: "What happened and what you expected, in plain language (at most 4000 characters)." }).check(Schema.isMaxCodePoints(4e3).annotate({ expected: "a string with at most 4000 code points" })).check(Schema.isPattern(
|
|
14
|
+
message: Schema.String.annotate({ description: "What happened and what you expected, in plain language (at most 4000 characters)." }).check(Schema.isMaxCodePoints(4e3).annotate({ expected: "a string with at most 4000 code points" })).check(Schema.isPattern(new globalThis.RegExp("\\S", "u")).annotate({ expected: "a string matching the RegExp \\S" })).check(Schema.isMaxLength(4e3).annotate({ expected: "a value with a length of at most 4000" })),
|
|
15
15
|
category: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
16
16
|
Schema.Literal("bug"),
|
|
17
17
|
Schema.Literal("confusing"),
|
|
@@ -21,6 +21,7 @@ const FeedbackSendRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
21
21
|
context: Schema.optionalKey(Schema.Union([FeedbackContext, Schema.Null]))
|
|
22
22
|
}))();
|
|
23
23
|
const FeedbackSend201 = FeedbackReceipt;
|
|
24
|
+
const FeedbackSend400 = MalformedRequestError;
|
|
24
25
|
const FeedbackSend401 = UnauthorizedError;
|
|
25
26
|
const FeedbackSend403 = ForbiddenError;
|
|
26
27
|
const FeedbackSend422 = ValidationError;
|
|
@@ -30,6 +31,7 @@ var FeedbackGroup = class extends HttpApiGroup.make("Feedback").add(HttpApiEndpo
|
|
|
30
31
|
payload: FeedbackSendRequestJson,
|
|
31
32
|
success: FeedbackSend201.pipe(HttpApiSchema.status(201)),
|
|
32
33
|
error: [
|
|
34
|
+
FeedbackSend400.pipe(HttpApiSchema.status(400)),
|
|
33
35
|
FeedbackSend401.pipe(HttpApiSchema.status(401)),
|
|
34
36
|
FeedbackSend403.pipe(HttpApiSchema.status(403)),
|
|
35
37
|
FeedbackSend422.pipe(HttpApiSchema.status(422)),
|
|
@@ -37,6 +39,6 @@ var FeedbackGroup = class extends HttpApiGroup.make("Feedback").add(HttpApiEndpo
|
|
|
37
39
|
FeedbackSend504.pipe(HttpApiSchema.status(504))
|
|
38
40
|
]
|
|
39
41
|
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "feedback.send").annotate(OpenApi.Summary, "Send feedback").annotate(OpenApi.Description, "Tells Samva what was confusing, broken, or missing in the API. Programs and coding agents can call it the moment something goes wrong, naming the operation and resource involved. Samva's team reads every report; the answer is a receipt, not a reply.")).annotate(OpenApi.Description, "Reports to Samva about the API itself.") {};
|
|
40
|
-
export { FeedbackGroup, FeedbackId, FeedbackReceipt, FeedbackSend201, FeedbackSend401, FeedbackSend403, FeedbackSend422, FeedbackSend500, FeedbackSend504, FeedbackSendRequestJson };
|
|
42
|
+
export { FeedbackGroup, FeedbackId, FeedbackReceipt, FeedbackSend201, FeedbackSend400, FeedbackSend401, FeedbackSend403, FeedbackSend422, FeedbackSend500, FeedbackSend504, FeedbackSendRequestJson };
|
|
41
43
|
|
|
42
44
|
//# sourceMappingURL=feedback.js.map
|
|
@@ -25,6 +25,7 @@ import { NewsletterIssuesGroup } from "./newsletter-issues";
|
|
|
25
25
|
import { NewslettersGroup } from "./newsletters";
|
|
26
26
|
import { OperationsGroup } from "./operations";
|
|
27
27
|
import { OrganizationsGroup } from "./organizations";
|
|
28
|
+
import { PoliciesGroup } from "./policies";
|
|
28
29
|
import { ScheduledMessagesGroup } from "./scheduled-messages";
|
|
29
30
|
import { SubscriptionsGroup } from "./subscriptions";
|
|
30
31
|
import { TemplatesGroup } from "./templates";
|
|
@@ -60,12 +61,13 @@ export * from "./newsletter-domains";
|
|
|
60
61
|
export * from "./newsletter-issues";
|
|
61
62
|
export * from "./operations";
|
|
62
63
|
export * from "./organizations";
|
|
64
|
+
export * from "./policies";
|
|
63
65
|
export * from "./subscriptions";
|
|
64
66
|
export * from "./templates";
|
|
65
67
|
export * from "./topics";
|
|
66
68
|
export * from "./topic-forms";
|
|
67
69
|
export * from "./webhooks";
|
|
68
70
|
export * from "./whoami";
|
|
69
|
-
declare const SamvaApi_base: HttpApi.HttpApi<"SamvaApi", typeof AgentsGroup | typeof AnalyticsGroup | typeof APIKeysGroup | typeof AttachmentsGroup | typeof BrandsGroup | typeof CampaignsGroup | typeof ContactEventsGroup | typeof ContactGroupsGroup | typeof ContactsGroup | typeof ConversationsGroup | typeof CustomFieldsGroup | typeof EmailGroup | typeof EventsGroup | typeof ExtensionInstallationsGroup | typeof ExtensionsGroup | typeof FeedbackGroup | typeof JourneysGroup | typeof MailboxesGroup | typeof MediaGroup | typeof MessagesGroup | typeof NamespacesGroup | typeof NewsletterDomainsGroup | typeof NewsletterIssuesGroup | typeof NewslettersGroup | typeof OperationsGroup | typeof OrganizationsGroup | typeof ScheduledMessagesGroup | typeof SubscriptionsGroup | typeof TemplatesGroup | typeof TopicFormsGroup | typeof TopicsGroup | typeof WebhooksGroup | typeof WhoamiGroup>;
|
|
71
|
+
declare const SamvaApi_base: HttpApi.HttpApi<"SamvaApi", typeof AgentsGroup | typeof AnalyticsGroup | typeof APIKeysGroup | typeof AttachmentsGroup | typeof BrandsGroup | typeof CampaignsGroup | typeof ContactEventsGroup | typeof ContactGroupsGroup | typeof ContactsGroup | typeof ConversationsGroup | typeof CustomFieldsGroup | typeof EmailGroup | typeof EventsGroup | typeof ExtensionInstallationsGroup | typeof ExtensionsGroup | typeof FeedbackGroup | typeof JourneysGroup | typeof MailboxesGroup | typeof MediaGroup | typeof MessagesGroup | typeof NamespacesGroup | typeof NewsletterDomainsGroup | typeof NewsletterIssuesGroup | typeof NewslettersGroup | typeof OperationsGroup | typeof OrganizationsGroup | typeof PoliciesGroup | typeof ScheduledMessagesGroup | typeof SubscriptionsGroup | typeof TemplatesGroup | typeof TopicFormsGroup | typeof TopicsGroup | typeof WebhooksGroup | typeof WhoamiGroup>;
|
|
70
72
|
export declare class SamvaApi extends SamvaApi_base {
|
|
71
73
|
}
|