samva 0.16.0 → 0.17.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 +4 -1
- package/README.md +44 -1
- package/dist/analytics-CaqPRsry.js +207 -0
- package/dist/api-keys-Ce1Y4_Ip.js +274 -0
- package/dist/attachments-DYqVIraC.js +140 -0
- package/dist/brands-ZwuOGIWO.js +175 -0
- package/dist/campaigns-DZlz1E9E.js +522 -0
- package/dist/categories-CA4XIQAb.js +1011 -0
- package/dist/client/sdk.gen.d.ts +174 -3
- package/dist/client/types.gen.d.ts +1126 -11
- package/dist/client-DOzUrdTE.js +1115 -0
- package/dist/contact-groups-BLbFXnjq.js +446 -0
- package/dist/contacts-BbsoXXB4.js +787 -0
- package/dist/conversations-_sRHueML.js +494 -0
- package/dist/custom-fields-BHWbwlKn.js +176 -0
- package/dist/effect/analytics.js +2 -21
- package/dist/effect/api-keys.d.ts +1 -1
- package/dist/effect/api-keys.js +2 -28
- package/dist/effect/attachments.js +2 -17
- package/dist/effect/brands.d.ts +1 -1
- package/dist/effect/brands.js +3 -24
- package/dist/effect/campaigns.js +2 -33
- package/dist/effect/categories.js +1 -1
- package/dist/effect/client.d.ts +1 -1
- package/dist/effect/client.js +3 -4
- package/dist/effect/contact-groups.js +2 -29
- package/dist/effect/contacts.d.ts +52 -0
- package/dist/effect/contacts.js +2 -47
- package/dist/effect/conversations.js +2 -35
- package/dist/effect/custom-fields.js +2 -17
- package/dist/effect/email.d.ts +3 -2
- package/dist/effect/email.js +2 -137
- package/dist/effect/events.d.ts +121 -0
- package/dist/effect/events.js +3 -0
- package/dist/effect/extension-installations.js +2 -27
- package/dist/effect/extensions.js +2 -19
- package/dist/effect/feedback.d.ts +1 -1
- package/dist/effect/feedback.js +3 -13
- package/dist/effect/generated/analytics.d.ts +715 -0
- package/dist/effect/generated/api-keys.d.ts +1627 -0
- package/dist/effect/generated/attachments.d.ts +554 -0
- package/dist/effect/generated/brands.d.ts +1118 -0
- package/dist/effect/generated/campaigns.d.ts +3783 -0
- package/dist/effect/generated/contact-events.d.ts +158 -0
- package/dist/effect/generated/contact-groups.d.ts +1445 -0
- package/dist/effect/generated/contacts.d.ts +3789 -0
- package/dist/effect/generated/conversations.d.ts +2870 -0
- package/dist/effect/generated/custom-fields.d.ts +562 -0
- package/dist/effect/generated/email.d.ts +10622 -0
- package/dist/effect/generated/events.d.ts +463 -0
- package/dist/effect/generated/extension-installations.d.ts +1786 -0
- package/dist/effect/generated/extensions.d.ts +927 -0
- package/dist/effect/generated/feedback.d.ts +116 -0
- package/dist/effect/generated/index.d.ts +61 -0
- package/dist/effect/generated/journeys.d.ts +6135 -0
- package/dist/effect/generated/mailboxes.d.ts +13641 -0
- package/dist/effect/generated/media.d.ts +741 -0
- package/dist/effect/generated/messages.d.ts +2355 -0
- package/dist/effect/generated/namespaces.d.ts +654 -0
- package/dist/effect/generated/operations.d.ts +514 -0
- package/dist/effect/generated/organizations.d.ts +1111 -0
- package/dist/effect/generated/scheduled-messages.d.ts +1798 -0
- package/dist/effect/generated/shared.d.ts +3250 -0
- package/dist/effect/generated/subscriptions.d.ts +188 -0
- package/dist/effect/generated/templates.d.ts +8177 -0
- package/dist/effect/generated/unsubscribe-groups.d.ts +1153 -0
- package/dist/effect/generated/webhooks.d.ts +1697 -0
- package/dist/effect/generated/whoami.d.ts +291 -0
- package/dist/effect/generated-metadata.d.ts +1627 -0
- package/dist/effect/index.d.ts +3 -1
- package/dist/effect/index.js +29 -27
- package/dist/effect/internal/client.d.ts +10 -7
- package/dist/effect/internal/email-sender.d.ts +17 -0
- package/dist/effect/internal/operation.d.ts +12 -72
- package/dist/effect/internal/send.d.ts +60 -0
- package/dist/effect/journeys.d.ts +2153 -0
- package/dist/effect/journeys.js +2 -0
- package/dist/effect/mailboxes.d.ts +112 -112
- package/dist/effect/mailboxes.js +1 -1
- package/dist/effect/media.js +3 -1
- package/dist/effect/messages.d.ts +2 -2
- package/dist/effect/messages.js +3 -1
- package/dist/effect/namespaces.js +2 -19
- package/dist/effect/operations.js +2 -15
- package/dist/effect/organizations.js +2 -23
- package/dist/effect/retry.js +1 -1
- package/dist/effect/scheduled-messages.js +2 -19
- package/dist/effect/subscriptions.js +2 -9
- package/dist/effect/templates.d.ts +1 -1
- package/dist/effect/templates.js +3 -78
- package/dist/effect/unsubscribe-groups.js +2 -27
- package/dist/effect/webhooks.d.ts +9 -9
- package/dist/effect/webhooks.js +3 -33
- package/dist/effect/whoami.d.ts +8 -8
- package/dist/effect/whoami.js +2 -9
- package/dist/email-R0NAA9PW.js +2498 -0
- package/dist/events-CxbTUHYT.js +82 -0
- package/dist/extension-installations-CD94LPmk.js +407 -0
- package/dist/extensions-BKyNQLvu.js +220 -0
- package/dist/feedback-Bpa09JOS.js +52 -0
- package/dist/index.js +2 -2
- package/dist/{inline-attachments-Cegg6tTF.js → inline-attachments-Bi1hDltp.js} +2 -2
- package/dist/journeys-CARo_BJT.js +499 -0
- package/dist/mailboxes-BRDn7BIK.js +2470 -0
- package/dist/media-VrrtNnft.js +181 -0
- package/dist/namespaces-CcvEbG-y.js +152 -0
- package/dist/{operation-BTXjPrwf.js → operation-n_IYgNVK.js} +75 -90
- package/dist/operations-CmB3FHwf.js +93 -0
- package/dist/organizations-A-plufWc.js +252 -0
- package/dist/promises/index.d.ts +7 -3
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/{promises-KrA2nSLg.js → promises---Kbh-7z.js} +467 -3
- package/dist/runtime-P0l1_2-C.js +25 -0
- package/dist/scheduled-messages-DkKZRRaN.js +207 -0
- package/dist/send-Bxc0XfGE.js +722 -0
- package/dist/service-map.d.ts +85 -0
- package/dist/subscriptions-DEXYtMXg.js +67 -0
- package/dist/templates-DZomxsG7.js +2289 -0
- package/dist/unsubscribe-groups-Iqk4Isf9.js +291 -0
- package/dist/webhooks-CPXuu8Xf.js +530 -0
- package/dist/whoami-Ccz0jwlt.js +59 -0
- package/package.json +13 -3
- package/dist/categories-DV51kr2H.js +0 -187
- package/dist/client-BMUew5Wp.js +0 -13794
- package/dist/effect/generated.d.ts +0 -64004
- package/dist/mailboxes-Thp5z0oX.js +0 -161
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { B as ExtensionId, D as Cursor, H as ExtensionVersionRef, Jt as UnauthorizedError, K as ForbiddenError, Lt as ResourceNotFoundError, V as ExtensionVersionId, Y as InternalError, en as ValidationError, m as ConflictError, q as GatewayTimeoutError, s as ApiKeySecurityMiddleware } from "./client-DOzUrdTE.js";
|
|
3
|
+
import { n as forGroup } from "./operation-n_IYgNVK.js";
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
5
|
+
import * as Schema from "effect/Schema";
|
|
6
|
+
//#region src/effect/generated/extensions.ts
|
|
7
|
+
const ExtensionBundle = /* @__PURE__ */ Schema.Struct({
|
|
8
|
+
sha256: Schema.String,
|
|
9
|
+
sizeBytes: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" }))
|
|
10
|
+
}).annotate({ identifier: "ExtensionBundle" });
|
|
11
|
+
const ExtensionVersion = /* @__PURE__ */ Schema.Struct({
|
|
12
|
+
id: ExtensionVersionId,
|
|
13
|
+
version: Schema.String,
|
|
14
|
+
runtime: Schema.Union([Schema.Literal("hosted"), Schema.Literal("webhook")]),
|
|
15
|
+
bundle: Schema.Union([ExtensionBundle, Schema.Null]),
|
|
16
|
+
publishedAt: Schema.String,
|
|
17
|
+
manifest: Schema.Struct({
|
|
18
|
+
name: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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]$" })),
|
|
19
|
+
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" })),
|
|
20
|
+
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])),
|
|
21
|
+
version: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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})?$" })),
|
|
22
|
+
runtime: Schema.Union([Schema.Literal("hosted"), Schema.Literal("webhook")]),
|
|
23
|
+
events: Schema.Array(Schema.Union([
|
|
24
|
+
Schema.Literal("mailbox.message.received"),
|
|
25
|
+
Schema.Literal("mailbox.message.sent"),
|
|
26
|
+
Schema.Literal("mailbox.action.pending_approval"),
|
|
27
|
+
Schema.Literal("mailbox.message.quarantined"),
|
|
28
|
+
Schema.Literal("mailbox.message.released"),
|
|
29
|
+
Schema.Literal("mailbox.message.discarded")
|
|
30
|
+
])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
31
|
+
permissions: Schema.Array(Schema.Union([
|
|
32
|
+
Schema.Literal("read"),
|
|
33
|
+
Schema.Literal("update"),
|
|
34
|
+
Schema.Literal("send"),
|
|
35
|
+
Schema.Literal("quarantine.read")
|
|
36
|
+
]))
|
|
37
|
+
})
|
|
38
|
+
}).annotate({ identifier: "ExtensionVersion" });
|
|
39
|
+
const ExtensionVersionSummary = /* @__PURE__ */ Schema.Struct({
|
|
40
|
+
id: ExtensionVersionId,
|
|
41
|
+
version: Schema.String,
|
|
42
|
+
runtime: Schema.Union([Schema.Literal("hosted"), Schema.Literal("webhook")]),
|
|
43
|
+
bundle: Schema.Union([ExtensionBundle, Schema.Null]),
|
|
44
|
+
publishedAt: Schema.String
|
|
45
|
+
}).annotate({ identifier: "ExtensionVersionSummary" });
|
|
46
|
+
const Extension = /* @__PURE__ */ Schema.Struct({
|
|
47
|
+
id: ExtensionId,
|
|
48
|
+
name: Schema.String,
|
|
49
|
+
displayName: Schema.String,
|
|
50
|
+
description: Schema.Union([Schema.String, Schema.Null]),
|
|
51
|
+
runtime: Schema.Union([Schema.Literal("hosted"), Schema.Literal("webhook")]),
|
|
52
|
+
latestVersion: ExtensionVersionRef,
|
|
53
|
+
createdAt: Schema.String,
|
|
54
|
+
updatedAt: Schema.String
|
|
55
|
+
}).annotate({ identifier: "Extension" });
|
|
56
|
+
const ExtensionVersionPage = /* @__PURE__ */ Schema.Struct({
|
|
57
|
+
items: Schema.Array(ExtensionVersionSummary),
|
|
58
|
+
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
59
|
+
}).annotate({ identifier: "ExtensionVersionPage" });
|
|
60
|
+
const ExtensionPage = /* @__PURE__ */ Schema.Struct({
|
|
61
|
+
items: Schema.Array(Extension),
|
|
62
|
+
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
63
|
+
}).annotate({ identifier: "ExtensionPage" });
|
|
64
|
+
const PublishExtensionVersionResponse = /* @__PURE__ */ Schema.Struct({
|
|
65
|
+
extension: Extension,
|
|
66
|
+
version: ExtensionVersion
|
|
67
|
+
}).annotate({ identifier: "PublishExtensionVersionResponse" });
|
|
68
|
+
const ExtensionsListQuery = /* @__PURE__ */ Schema.Struct({
|
|
69
|
+
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
70
|
+
cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null])),
|
|
71
|
+
after: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
72
|
+
before: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
73
|
+
});
|
|
74
|
+
const ExtensionsList200 = ExtensionPage;
|
|
75
|
+
const ExtensionsList401 = UnauthorizedError;
|
|
76
|
+
const ExtensionsList403 = ForbiddenError;
|
|
77
|
+
const ExtensionsList404 = ResourceNotFoundError;
|
|
78
|
+
const ExtensionsList422 = ValidationError;
|
|
79
|
+
const ExtensionsList500 = InternalError;
|
|
80
|
+
const ExtensionsList504 = GatewayTimeoutError;
|
|
81
|
+
const ExtensionsPublishRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
82
|
+
manifest: Schema.Struct({
|
|
83
|
+
name: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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]$" })),
|
|
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" })),
|
|
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])),
|
|
86
|
+
version: Schema.String.check(Schema.isPattern(/* @__PURE__ */ new 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})?$" })),
|
|
87
|
+
runtime: Schema.Union([Schema.Literal("hosted"), Schema.Literal("webhook")]),
|
|
88
|
+
events: Schema.Array(Schema.Union([
|
|
89
|
+
Schema.Literal("mailbox.message.received"),
|
|
90
|
+
Schema.Literal("mailbox.message.sent"),
|
|
91
|
+
Schema.Literal("mailbox.action.pending_approval"),
|
|
92
|
+
Schema.Literal("mailbox.message.quarantined"),
|
|
93
|
+
Schema.Literal("mailbox.message.released"),
|
|
94
|
+
Schema.Literal("mailbox.message.discarded")
|
|
95
|
+
])).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
96
|
+
permissions: Schema.Array(Schema.Union([
|
|
97
|
+
Schema.Literal("read"),
|
|
98
|
+
Schema.Literal("update"),
|
|
99
|
+
Schema.Literal("send"),
|
|
100
|
+
Schema.Literal("quarantine.read")
|
|
101
|
+
]))
|
|
102
|
+
}),
|
|
103
|
+
bundle: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
104
|
+
});
|
|
105
|
+
const ExtensionsPublish201 = PublishExtensionVersionResponse;
|
|
106
|
+
const ExtensionsPublish401 = UnauthorizedError;
|
|
107
|
+
const ExtensionsPublish403 = ForbiddenError;
|
|
108
|
+
const ExtensionsPublish404 = ResourceNotFoundError;
|
|
109
|
+
const ExtensionsPublish409 = ConflictError;
|
|
110
|
+
const ExtensionsPublish422 = ValidationError;
|
|
111
|
+
const ExtensionsPublish500 = InternalError;
|
|
112
|
+
const ExtensionsPublish504 = GatewayTimeoutError;
|
|
113
|
+
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
|
+
const ExtensionsGet200 = Extension;
|
|
115
|
+
const ExtensionsGet401 = UnauthorizedError;
|
|
116
|
+
const ExtensionsGet403 = ForbiddenError;
|
|
117
|
+
const ExtensionsGet404 = ResourceNotFoundError;
|
|
118
|
+
const ExtensionsGet422 = ValidationError;
|
|
119
|
+
const ExtensionsGet500 = InternalError;
|
|
120
|
+
const ExtensionsGet504 = GatewayTimeoutError;
|
|
121
|
+
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
|
+
const ExtensionsListVersionsQuery = /* @__PURE__ */ Schema.Struct({
|
|
123
|
+
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
124
|
+
cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
|
|
125
|
+
});
|
|
126
|
+
const ExtensionsListVersions200 = ExtensionVersionPage;
|
|
127
|
+
const ExtensionsListVersions401 = UnauthorizedError;
|
|
128
|
+
const ExtensionsListVersions403 = ForbiddenError;
|
|
129
|
+
const ExtensionsListVersions404 = ResourceNotFoundError;
|
|
130
|
+
const ExtensionsListVersions422 = ValidationError;
|
|
131
|
+
const ExtensionsListVersions500 = InternalError;
|
|
132
|
+
const ExtensionsListVersions504 = GatewayTimeoutError;
|
|
133
|
+
const ExtensionsGetVersionPathParams = /* @__PURE__ */ Schema.Struct({
|
|
134
|
+
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" })),
|
|
135
|
+
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
|
+
});
|
|
137
|
+
const ExtensionsGetVersion200 = ExtensionVersion;
|
|
138
|
+
const ExtensionsGetVersion401 = UnauthorizedError;
|
|
139
|
+
const ExtensionsGetVersion403 = ForbiddenError;
|
|
140
|
+
const ExtensionsGetVersion404 = ResourceNotFoundError;
|
|
141
|
+
const ExtensionsGetVersion422 = ValidationError;
|
|
142
|
+
const ExtensionsGetVersion500 = InternalError;
|
|
143
|
+
const ExtensionsGetVersion504 = GatewayTimeoutError;
|
|
144
|
+
var ExtensionsGroup = class extends HttpApiGroup.make("Extensions").add(HttpApiEndpoint.get("extensionsList", "/v1/extensions", {
|
|
145
|
+
query: ExtensionsListQuery,
|
|
146
|
+
success: ExtensionsList200,
|
|
147
|
+
error: [
|
|
148
|
+
ExtensionsList401.pipe(HttpApiSchema.status(401)),
|
|
149
|
+
ExtensionsList403.pipe(HttpApiSchema.status(403)),
|
|
150
|
+
ExtensionsList404.pipe(HttpApiSchema.status(404)),
|
|
151
|
+
ExtensionsList422.pipe(HttpApiSchema.status(422)),
|
|
152
|
+
ExtensionsList500,
|
|
153
|
+
ExtensionsList504.pipe(HttpApiSchema.status(504))
|
|
154
|
+
]
|
|
155
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "extensions.list").annotate(OpenApi.Summary, "List extensions").annotate(OpenApi.Description, "Returns the organization's published extensions with their latest version, newest first, filterable by creation time (`after`, `before`). Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("extensionsPublish", "/v1/extensions", {
|
|
156
|
+
payload: ExtensionsPublishRequestJson,
|
|
157
|
+
success: ExtensionsPublish201.pipe(HttpApiSchema.status(201)),
|
|
158
|
+
error: [
|
|
159
|
+
ExtensionsPublish401.pipe(HttpApiSchema.status(401)),
|
|
160
|
+
ExtensionsPublish403.pipe(HttpApiSchema.status(403)),
|
|
161
|
+
ExtensionsPublish404.pipe(HttpApiSchema.status(404)),
|
|
162
|
+
ExtensionsPublish409.pipe(HttpApiSchema.status(409)),
|
|
163
|
+
ExtensionsPublish422.pipe(HttpApiSchema.status(422)),
|
|
164
|
+
ExtensionsPublish500,
|
|
165
|
+
ExtensionsPublish504.pipe(HttpApiSchema.status(504))
|
|
166
|
+
]
|
|
167
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "extensions.publish").annotate(OpenApi.Summary, "Publish an extension version").annotate(OpenApi.Description, "Publishes one version from its manifest and returns it with status 201, creating the extension named by the manifest on its first version. A hosted manifest carries its bundle. Publishing a version again with the same manifest and bundle returns it; a different one conflicts, so bump the manifest's version. Only a person can publish, not an API key."), HttpApiEndpoint.get("extensionsGet", "/v1/extensions/:id", {
|
|
168
|
+
params: ExtensionsGetPathParams,
|
|
169
|
+
success: ExtensionsGet200,
|
|
170
|
+
error: [
|
|
171
|
+
ExtensionsGet401.pipe(HttpApiSchema.status(401)),
|
|
172
|
+
ExtensionsGet403.pipe(HttpApiSchema.status(403)),
|
|
173
|
+
ExtensionsGet404.pipe(HttpApiSchema.status(404)),
|
|
174
|
+
ExtensionsGet422.pipe(HttpApiSchema.status(422)),
|
|
175
|
+
ExtensionsGet500,
|
|
176
|
+
ExtensionsGet504.pipe(HttpApiSchema.status(504))
|
|
177
|
+
]
|
|
178
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "extensions.get").annotate(OpenApi.Summary, "Get an extension").annotate(OpenApi.Description, "Returns one extension by its id or name. Its versions are `GET /v1/extensions/{id}/versions`."), HttpApiEndpoint.get("extensionsListVersions", "/v1/extensions/:id/versions", {
|
|
179
|
+
params: ExtensionsListVersionsPathParams,
|
|
180
|
+
query: ExtensionsListVersionsQuery,
|
|
181
|
+
success: ExtensionsListVersions200,
|
|
182
|
+
error: [
|
|
183
|
+
ExtensionsListVersions401.pipe(HttpApiSchema.status(401)),
|
|
184
|
+
ExtensionsListVersions403.pipe(HttpApiSchema.status(403)),
|
|
185
|
+
ExtensionsListVersions404.pipe(HttpApiSchema.status(404)),
|
|
186
|
+
ExtensionsListVersions422.pipe(HttpApiSchema.status(422)),
|
|
187
|
+
ExtensionsListVersions500,
|
|
188
|
+
ExtensionsListVersions504.pipe(HttpApiSchema.status(504))
|
|
189
|
+
]
|
|
190
|
+
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "extensions.listVersions").annotate(OpenApi.Summary, "List an extension's versions").annotate(OpenApi.Description, "Returns summaries of an extension's published versions, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page. Read a version's manifest with `GET /v1/extensions/{id}/versions/{versionId}`."), HttpApiEndpoint.get("extensionsGetVersion", "/v1/extensions/:id/versions/:versionId", {
|
|
191
|
+
params: ExtensionsGetVersionPathParams,
|
|
192
|
+
success: ExtensionsGetVersion200,
|
|
193
|
+
error: [
|
|
194
|
+
ExtensionsGetVersion401.pipe(HttpApiSchema.status(401)),
|
|
195
|
+
ExtensionsGetVersion403.pipe(HttpApiSchema.status(403)),
|
|
196
|
+
ExtensionsGetVersion404.pipe(HttpApiSchema.status(404)),
|
|
197
|
+
ExtensionsGetVersion422.pipe(HttpApiSchema.status(422)),
|
|
198
|
+
ExtensionsGetVersion500,
|
|
199
|
+
ExtensionsGetVersion504.pipe(HttpApiSchema.status(504))
|
|
200
|
+
]
|
|
201
|
+
}).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
|
+
//#endregion
|
|
203
|
+
//#region src/effect/extensions.ts
|
|
204
|
+
var extensions_exports = /* @__PURE__ */ __exportAll({
|
|
205
|
+
get: () => get,
|
|
206
|
+
getVersion: () => getVersion,
|
|
207
|
+
list: () => list,
|
|
208
|
+
listVersions: () => listVersions,
|
|
209
|
+
publish: () => publish
|
|
210
|
+
});
|
|
211
|
+
const make = forGroup(ExtensionsGroup);
|
|
212
|
+
const list = make("extensionsList");
|
|
213
|
+
const publish = make("extensionsPublish");
|
|
214
|
+
const get = make("extensionsGet");
|
|
215
|
+
const listVersions = make("extensionsListVersions");
|
|
216
|
+
const getVersion = make("extensionsGetVersion");
|
|
217
|
+
//#endregion
|
|
218
|
+
export { listVersions as a, list as i, get as n, publish as o, getVersion as r, extensions_exports as t };
|
|
219
|
+
|
|
220
|
+
//# sourceMappingURL=extensions-BKyNQLvu.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { Jt as UnauthorizedError, K as ForbiddenError, Rt as SendFeedback, W as FeedbackContext, Y as InternalError, en as ValidationError, q as GatewayTimeoutError, s as ApiKeySecurityMiddleware } from "./client-DOzUrdTE.js";
|
|
3
|
+
import { n as forGroup } from "./operation-n_IYgNVK.js";
|
|
4
|
+
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
5
|
+
import * as Schema from "effect/Schema";
|
|
6
|
+
//#region src/effect/generated/feedback.ts
|
|
7
|
+
const FeedbackId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^fdbk_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
8
|
+
expected: "a string matching the RegExp ^fdbk_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
9
|
+
identifier: "FeedbackId"
|
|
10
|
+
})).pipe(Schema.brand("FeedbackId"));
|
|
11
|
+
const FeedbackReceipt = /* @__PURE__ */ Schema.Struct({
|
|
12
|
+
id: FeedbackId,
|
|
13
|
+
createdAt: Schema.String
|
|
14
|
+
}).annotate({ identifier: "FeedbackReceipt" });
|
|
15
|
+
const FeedbackSendRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
16
|
+
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(/* @__PURE__ */ new 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" })),
|
|
17
|
+
category: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
18
|
+
Schema.Literal("bug"),
|
|
19
|
+
Schema.Literal("confusing"),
|
|
20
|
+
Schema.Literal("missing"),
|
|
21
|
+
Schema.Literal("other")
|
|
22
|
+
]).annotate({ description: "`bug`: the API behaved wrongly. `confusing`: a response, error, or doc was hard to act on. `missing`: a capability or field you needed does not exist. `other`: anything else." }), Schema.Null])),
|
|
23
|
+
context: Schema.optionalKey(Schema.Union([FeedbackContext, Schema.Null]))
|
|
24
|
+
});
|
|
25
|
+
const FeedbackSend201 = FeedbackReceipt;
|
|
26
|
+
const FeedbackSend401 = UnauthorizedError;
|
|
27
|
+
const FeedbackSend403 = ForbiddenError;
|
|
28
|
+
const FeedbackSend422 = ValidationError;
|
|
29
|
+
const FeedbackSend500 = InternalError;
|
|
30
|
+
const FeedbackSend504 = GatewayTimeoutError;
|
|
31
|
+
var FeedbackGroup = class extends HttpApiGroup.make("Feedback").add(HttpApiEndpoint.post("feedbackSend", "/v1/feedback", {
|
|
32
|
+
payload: FeedbackSendRequestJson,
|
|
33
|
+
success: FeedbackSend201.pipe(HttpApiSchema.status(201)),
|
|
34
|
+
error: [
|
|
35
|
+
FeedbackSend401.pipe(HttpApiSchema.status(401)),
|
|
36
|
+
FeedbackSend403.pipe(HttpApiSchema.status(403)),
|
|
37
|
+
FeedbackSend422.pipe(HttpApiSchema.status(422)),
|
|
38
|
+
FeedbackSend500,
|
|
39
|
+
FeedbackSend504.pipe(HttpApiSchema.status(504))
|
|
40
|
+
]
|
|
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.") {};
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/effect/feedback.ts
|
|
44
|
+
var feedback_exports = /* @__PURE__ */ __exportAll({
|
|
45
|
+
SendPayload: () => SendFeedback,
|
|
46
|
+
send: () => send
|
|
47
|
+
});
|
|
48
|
+
const send = forGroup(FeedbackGroup)("feedbackSend");
|
|
49
|
+
//#endregion
|
|
50
|
+
export { send as n, feedback_exports as t };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=feedback-Bpa09JOS.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MediaUploadError } from "./inline-attachments-
|
|
2
|
-
import { C as SenderNotReadyError, E as fromApiError, S as SamvaTransportError, T as ValidationError, _ as OnboardingReviewRequiredError, a as CampaignFooterRequiredError, b as ResourceNotFoundError, c as EmailChannelError, d as ForbiddenError, f as GatewayTimeoutError, g as MailboxSendRefusedError, h as MailboxSendConflictError, i as BrandAddressRequiredError, l as ExternalServiceError, m as MailboxChannelUnsupportedError, n as AnalyticsQueryError, o as ConflictError, p as InternalError, r as BillingProviderError, s as DeliveryUnavailableError, t as createClient, u as FlagDisabledError, v as PaymentRequiredError, w as UnauthorizedError, x as SamvaApiError, y as RateLimitedError } from "./promises-
|
|
1
|
+
import { t as MediaUploadError } from "./inline-attachments-Bi1hDltp.js";
|
|
2
|
+
import { C as SenderNotReadyError, E as fromApiError, S as SamvaTransportError, T as ValidationError, _ as OnboardingReviewRequiredError, a as CampaignFooterRequiredError, b as ResourceNotFoundError, c as EmailChannelError, d as ForbiddenError, f as GatewayTimeoutError, g as MailboxSendRefusedError, h as MailboxSendConflictError, i as BrandAddressRequiredError, l as ExternalServiceError, m as MailboxChannelUnsupportedError, n as AnalyticsQueryError, o as ConflictError, p as InternalError, r as BillingProviderError, s as DeliveryUnavailableError, t as createClient, u as FlagDisabledError, v as PaymentRequiredError, w as UnauthorizedError, x as SamvaApiError, y as RateLimitedError } from "./promises---Kbh-7z.js";
|
|
3
3
|
import { n as MailboxEventStreamError, t as MailboxEventStream } from "./mailbox-events-VKR4f3qq.js";
|
|
4
4
|
export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, MailboxChannelUnsupportedError, MailboxEventStream, MailboxEventStreamError, MailboxSendConflictError, MailboxSendRefusedError, MediaUploadError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, SenderNotReadyError, UnauthorizedError, ValidationError, createClient, fromApiError };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#endregion
|
|
2
2
|
//#region src/client-attribution.ts
|
|
3
|
-
const SDK_VERSION = "0.
|
|
3
|
+
const SDK_VERSION = "0.17.0";
|
|
4
4
|
const CLIENT_ATTRIBUTION_HEADER = "x-samva-client";
|
|
5
5
|
const clientAttribution = (surface) => `${surface}/${SDK_VERSION}`;
|
|
6
6
|
/** A failed upload of an attachment's bytes to its presigned media URL. */
|
|
@@ -118,4 +118,4 @@ const withUploadedAttachments = (payload, uploaded) => {
|
|
|
118
118
|
//#endregion
|
|
119
119
|
export { withUploadedAttachments as a, uploadContentType as i, mediaCreateBody as n, CLIENT_ATTRIBUTION_HEADER as o, planInlineUploads as r, clientAttribution as s, MediaUploadError as t };
|
|
120
120
|
|
|
121
|
-
//# sourceMappingURL=inline-attachments-
|
|
121
|
+
//# sourceMappingURL=inline-attachments-Bi1hDltp.js.map
|