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
package/dist/service-map.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/service-map.ts
|
|
2
2
|
/** How each generated Effect operation is adapted to the Promise facade's direct input shape. */
|
|
3
3
|
const SDK_OPERATION_CALLS = {
|
|
4
4
|
brandsList: { kind: "none" },
|
|
@@ -148,7 +148,7 @@ const SDK_OPERATION_CALLS = {
|
|
|
148
148
|
emailRespondToOnboardingInformationRequest: { kind: "payload" },
|
|
149
149
|
emailAddDomain: { kind: "payload" },
|
|
150
150
|
emailRotateDomainDkim: {
|
|
151
|
-
kind: "
|
|
151
|
+
kind: "path",
|
|
152
152
|
paths: ["id"]
|
|
153
153
|
},
|
|
154
154
|
emailGetDomainVerification: {
|
|
@@ -260,7 +260,7 @@ const SDK_OPERATION_CALLS = {
|
|
|
260
260
|
kind: "path",
|
|
261
261
|
paths: ["id"]
|
|
262
262
|
},
|
|
263
|
-
emailAddSender: { kind: "
|
|
263
|
+
emailAddSender: { kind: "payload" },
|
|
264
264
|
emailCheckSenderVerification: {
|
|
265
265
|
kind: "path",
|
|
266
266
|
paths: ["id"]
|
|
@@ -645,7 +645,7 @@ const SDK_OPERATION_CALLS = {
|
|
|
645
645
|
organizationsUpdate: { kind: "payload" },
|
|
646
646
|
organizationsCreateAvatarUpload: { kind: "none" },
|
|
647
647
|
organizationsGetUsage: { kind: "params" },
|
|
648
|
-
organizationsDelete: { kind: "
|
|
648
|
+
organizationsDelete: { kind: "payload" },
|
|
649
649
|
apiKeysList: { kind: "params" },
|
|
650
650
|
apiKeysCreate: { kind: "payload" },
|
|
651
651
|
apiKeysGet: {
|
|
@@ -728,60 +728,81 @@ const SDK_OPERATION_CALLS = {
|
|
|
728
728
|
paths: ["id"]
|
|
729
729
|
},
|
|
730
730
|
subscriptionsSubscribe: { kind: "payload" },
|
|
731
|
-
|
|
731
|
+
newslettersList: { kind: "params" },
|
|
732
|
+
newslettersGet: {
|
|
732
733
|
kind: "path",
|
|
733
734
|
paths: ["id"]
|
|
734
735
|
},
|
|
735
|
-
|
|
736
|
+
newslettersCreate: {
|
|
737
|
+
kind: "optionalIdempotentPathPayload",
|
|
738
|
+
paths: []
|
|
739
|
+
},
|
|
740
|
+
newslettersUpdate: {
|
|
741
|
+
kind: "optionalIdempotentPathPayload",
|
|
742
|
+
paths: ["id"]
|
|
743
|
+
},
|
|
744
|
+
newslettersRemove: {
|
|
745
|
+
kind: "optionalIdempotentPath",
|
|
746
|
+
paths: ["id"]
|
|
747
|
+
},
|
|
748
|
+
newsletterIssuesList: {
|
|
736
749
|
kind: "path",
|
|
737
750
|
paths: ["id"]
|
|
738
751
|
},
|
|
739
|
-
|
|
752
|
+
newsletterIssuesOpen: {
|
|
753
|
+
kind: "path",
|
|
754
|
+
paths: ["id"]
|
|
755
|
+
},
|
|
756
|
+
newsletterIssuesGet: {
|
|
740
757
|
kind: "pathParams",
|
|
741
758
|
paths: ["id"]
|
|
742
759
|
},
|
|
743
|
-
|
|
744
|
-
kind: "
|
|
760
|
+
newsletterIssuesCreate: {
|
|
761
|
+
kind: "optionalIdempotentPathPayload",
|
|
745
762
|
paths: ["id"]
|
|
746
763
|
},
|
|
747
|
-
|
|
748
|
-
kind: "
|
|
764
|
+
newsletterIssuesUpdate: {
|
|
765
|
+
kind: "optionalIdempotentPathPayload",
|
|
749
766
|
paths: ["id"]
|
|
750
767
|
},
|
|
751
|
-
|
|
752
|
-
kind: "
|
|
768
|
+
newsletterIssuesRemove: {
|
|
769
|
+
kind: "optionalIdempotentPathPayload",
|
|
753
770
|
paths: ["id"]
|
|
754
771
|
},
|
|
755
|
-
|
|
756
|
-
kind: "
|
|
772
|
+
newsletterIssuesSave: {
|
|
773
|
+
kind: "optionalIdempotentPathPayload",
|
|
757
774
|
paths: ["id"]
|
|
758
775
|
},
|
|
759
|
-
|
|
760
|
-
kind: "
|
|
776
|
+
newsletterIssuesCheck: {
|
|
777
|
+
kind: "optionalIdempotentPathPayload",
|
|
761
778
|
paths: ["id"]
|
|
762
779
|
},
|
|
763
|
-
|
|
764
|
-
kind: "
|
|
780
|
+
newsletterIssuesRender: {
|
|
781
|
+
kind: "optionalIdempotentPathPayload",
|
|
765
782
|
paths: ["id"]
|
|
766
783
|
},
|
|
767
|
-
|
|
784
|
+
newsletterIssuesHead: {
|
|
768
785
|
kind: "path",
|
|
769
786
|
paths: ["id"]
|
|
770
787
|
},
|
|
771
|
-
|
|
788
|
+
newsletterIssuesHistory: {
|
|
772
789
|
kind: "pathParams",
|
|
773
790
|
paths: ["id"]
|
|
774
791
|
},
|
|
775
|
-
|
|
776
|
-
kind: "
|
|
792
|
+
newsletterDomainsAdd: {
|
|
793
|
+
kind: "optionalIdempotentPathPayload",
|
|
777
794
|
paths: ["id"]
|
|
778
795
|
},
|
|
779
|
-
|
|
796
|
+
newsletterDomainsList: {
|
|
797
|
+
kind: "pathParams",
|
|
798
|
+
paths: ["id"]
|
|
799
|
+
},
|
|
800
|
+
newsletterDomainsGet: {
|
|
780
801
|
kind: "path",
|
|
781
802
|
paths: ["id", "hostname"]
|
|
782
803
|
},
|
|
783
|
-
|
|
784
|
-
kind: "
|
|
804
|
+
newsletterDomainsRemove: {
|
|
805
|
+
kind: "optionalIdempotentPath",
|
|
785
806
|
paths: ["id", "hostname"]
|
|
786
807
|
},
|
|
787
808
|
topicFormsList: {
|
|
@@ -1014,7 +1035,7 @@ const SDK_OPERATION_CALLS = {
|
|
|
1014
1035
|
]
|
|
1015
1036
|
},
|
|
1016
1037
|
mailboxesSendMessage: {
|
|
1017
|
-
kind: "
|
|
1038
|
+
kind: "pathPayload",
|
|
1018
1039
|
paths: ["id"]
|
|
1019
1040
|
},
|
|
1020
1041
|
mailboxesGetMessage: {
|
|
@@ -1042,15 +1063,15 @@ const SDK_OPERATION_CALLS = {
|
|
|
1042
1063
|
]
|
|
1043
1064
|
},
|
|
1044
1065
|
mailboxesReply: {
|
|
1045
|
-
kind: "
|
|
1066
|
+
kind: "pathPayload",
|
|
1046
1067
|
paths: ["id", "messageId"]
|
|
1047
1068
|
},
|
|
1048
1069
|
mailboxesReplyAll: {
|
|
1049
|
-
kind: "
|
|
1070
|
+
kind: "pathPayload",
|
|
1050
1071
|
paths: ["id", "messageId"]
|
|
1051
1072
|
},
|
|
1052
1073
|
mailboxesForward: {
|
|
1053
|
-
kind: "
|
|
1074
|
+
kind: "pathPayload",
|
|
1054
1075
|
paths: ["id", "messageId"]
|
|
1055
1076
|
},
|
|
1056
1077
|
mailboxesListQuarantine: {
|
|
@@ -1086,7 +1107,7 @@ const SDK_OPERATION_CALLS = {
|
|
|
1086
1107
|
paths: ["id", "draftId"]
|
|
1087
1108
|
},
|
|
1088
1109
|
mailboxesSendDraft: {
|
|
1089
|
-
kind: "
|
|
1110
|
+
kind: "path",
|
|
1090
1111
|
paths: ["id", "draftId"]
|
|
1091
1112
|
},
|
|
1092
1113
|
mailboxesListActions: {
|
|
@@ -1192,7 +1213,6 @@ const SDK_OPERATION_CALLS = {
|
|
|
1192
1213
|
paths: ["id", "runId"]
|
|
1193
1214
|
}
|
|
1194
1215
|
};
|
|
1195
|
-
//#endregion
|
|
1196
1216
|
export { SDK_OPERATION_CALLS };
|
|
1197
1217
|
|
|
1198
1218
|
//# sourceMappingURL=service-map.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "samva",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "TypeScript SDK for the Samva email API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api-client",
|
|
@@ -147,9 +147,9 @@
|
|
|
147
147
|
"types": "./dist/effect/organizations.d.ts",
|
|
148
148
|
"import": "./dist/effect/organizations.js"
|
|
149
149
|
},
|
|
150
|
-
"./effect/
|
|
151
|
-
"types": "./dist/effect/
|
|
152
|
-
"import": "./dist/effect/
|
|
150
|
+
"./effect/newsletter-domains": {
|
|
151
|
+
"types": "./dist/effect/newsletter-domains.d.ts",
|
|
152
|
+
"import": "./dist/effect/newsletter-domains.js"
|
|
153
153
|
},
|
|
154
154
|
"./effect/retry": {
|
|
155
155
|
"types": "./dist/effect/retry.d.ts",
|
|
@@ -192,9 +192,25 @@
|
|
|
192
192
|
"import": "./dist/webhooks/effect.js"
|
|
193
193
|
},
|
|
194
194
|
"./package.json": "./package.json",
|
|
195
|
-
"./
|
|
196
|
-
"types": "./dist/
|
|
197
|
-
"import": "./dist/
|
|
195
|
+
"./mailbox": {
|
|
196
|
+
"types": "./dist/mailbox/index.d.ts",
|
|
197
|
+
"import": "./dist/mailbox/index.js"
|
|
198
|
+
},
|
|
199
|
+
"./mailbox/test": {
|
|
200
|
+
"types": "./dist/mailbox/test.d.ts",
|
|
201
|
+
"import": "./dist/mailbox/test.js"
|
|
202
|
+
},
|
|
203
|
+
"./mailbox/webhook": {
|
|
204
|
+
"types": "./dist/mailbox/webhook.d.ts",
|
|
205
|
+
"import": "./dist/mailbox/webhook.js"
|
|
206
|
+
},
|
|
207
|
+
"./effect/newsletter-issues": {
|
|
208
|
+
"types": "./dist/effect/newsletter-issues.d.ts",
|
|
209
|
+
"import": "./dist/effect/newsletter-issues.js"
|
|
210
|
+
},
|
|
211
|
+
"./effect/newsletters": {
|
|
212
|
+
"types": "./dist/effect/newsletters.d.ts",
|
|
213
|
+
"import": "./dist/effect/newsletters.js"
|
|
198
214
|
}
|
|
199
215
|
},
|
|
200
216
|
"publishConfig": {
|
|
@@ -213,25 +229,25 @@
|
|
|
213
229
|
"test:tarball": "bun run build && bun scripts/check-tarball.ts",
|
|
214
230
|
"test:startup": "bun run build && bun scripts/check-startup.ts",
|
|
215
231
|
"test:tree-shaking": "bun run build && bun scripts/check-tree-shaking.ts",
|
|
216
|
-
"typecheck": "
|
|
232
|
+
"typecheck": "effect-tsgo tsrs --noEmit && effect-tsgo tsrs --noEmit -p codegen/tsconfig.json && effect-tsgo tsrs --noEmit -p tests/tsconfig.json && effect-tsgo tsrs --noEmit --project tests/parity/tsconfig.json"
|
|
217
233
|
},
|
|
218
234
|
"dependencies": {
|
|
219
|
-
"@samva/webhooks": "0.
|
|
235
|
+
"@samva/webhooks": "0.31.0"
|
|
220
236
|
},
|
|
221
237
|
"devDependencies": {
|
|
222
|
-
"@effect/openapi-generator": "4.0.
|
|
223
|
-
"@effect/platform-node": "4.0.
|
|
224
|
-
"@effect/
|
|
238
|
+
"@effect/openapi-generator": "4.0.6",
|
|
239
|
+
"@effect/platform-node": "4.0.6",
|
|
240
|
+
"@effect/tsgo": "0.63.0",
|
|
241
|
+
"@effect/vitest": "4.0.6",
|
|
225
242
|
"@samva/openapi": "0.0.0",
|
|
226
|
-
"@types/node": "^26.6.
|
|
227
|
-
"effect": "4.0.
|
|
228
|
-
"
|
|
229
|
-
"tsdown": "^0.22.13",
|
|
243
|
+
"@types/node": "^26.6.5",
|
|
244
|
+
"effect": "4.0.6",
|
|
245
|
+
"tsdown": "0.23.1",
|
|
230
246
|
"typescript": "^7.0.2",
|
|
231
|
-
"vitest": "
|
|
247
|
+
"vitest": "5.0.3"
|
|
232
248
|
},
|
|
233
249
|
"peerDependencies": {
|
|
234
|
-
"effect": "4.0.
|
|
250
|
+
"effect": "^4.0.4"
|
|
235
251
|
},
|
|
236
252
|
"peerDependenciesMeta": {
|
|
237
253
|
"effect": {
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, ConflictError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, OrganizationId, 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/publication-domains.ts
|
|
5
|
-
const TopicPublicationDomainsAddPathParams = /* @__PURE__ */ (() => Schema.Struct({ id: TopicId }))();
|
|
6
|
-
const TopicPublicationDomainsAddRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
7
|
-
hostname: Schema.String.check(Schema.isMaxCodePoints(253).annotate({ expected: "a string with at most 253 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[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])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$" })).check(Schema.isMaxLength(253).annotate({ expected: "a value with a length of at most 253" })),
|
|
8
|
-
idempotencyKey: 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})$" }))
|
|
9
|
-
}))();
|
|
10
|
-
const TopicPublicationDomainsAdd200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
11
|
-
organizationId: OrganizationId,
|
|
12
|
-
topicId: TopicId,
|
|
13
|
-
hostname: Schema.String.check(Schema.isMaxCodePoints(253).annotate({ expected: "a string with at most 253 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[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])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$" })).check(Schema.isMaxLength(253).annotate({ expected: "a value with a length of at most 253" })),
|
|
14
|
-
canonicalHostname: Schema.String,
|
|
15
|
-
phase: Schema.Union([
|
|
16
|
-
Schema.Literal("pending"),
|
|
17
|
-
Schema.Literal("active"),
|
|
18
|
-
Schema.Literal("removing"),
|
|
19
|
-
Schema.Literal("removed"),
|
|
20
|
-
Schema.Literal("conflict")
|
|
21
|
-
]),
|
|
22
|
-
active: Schema.Boolean,
|
|
23
|
-
hostnameStatus: Schema.Union([Schema.String, Schema.Null]),
|
|
24
|
-
sslStatus: Schema.Union([Schema.String, Schema.Null]),
|
|
25
|
-
cname: Schema.Struct({
|
|
26
|
-
type: Schema.Union([Schema.Literal("CNAME"), Schema.Literal("TXT")]),
|
|
27
|
-
name: Schema.String,
|
|
28
|
-
value: Schema.String
|
|
29
|
-
}),
|
|
30
|
-
verificationRecords: Schema.Array(Schema.Struct({
|
|
31
|
-
type: Schema.Union([Schema.Literal("CNAME"), Schema.Literal("TXT")]),
|
|
32
|
-
name: Schema.String,
|
|
33
|
-
value: Schema.String
|
|
34
|
-
})),
|
|
35
|
-
verificationErrors: Schema.Array(Schema.String)
|
|
36
|
-
}))();
|
|
37
|
-
const TopicPublicationDomainsAdd401 = UnauthorizedError;
|
|
38
|
-
const TopicPublicationDomainsAdd403 = /* @__PURE__ */ (() => Schema.Union([ForbiddenError, FlagDisabledError]))();
|
|
39
|
-
const TopicPublicationDomainsAdd404 = ResourceNotFoundError;
|
|
40
|
-
const TopicPublicationDomainsAdd409 = ConflictError;
|
|
41
|
-
const TopicPublicationDomainsAdd422 = ValidationError;
|
|
42
|
-
const TopicPublicationDomainsAdd500 = InternalError;
|
|
43
|
-
const TopicPublicationDomainsAdd504 = GatewayTimeoutError;
|
|
44
|
-
const TopicPublicationDomainsGetPathParams = /* @__PURE__ */ (() => Schema.Struct({
|
|
45
|
-
id: TopicId,
|
|
46
|
-
hostname: Schema.String.check(Schema.isMaxCodePoints(253).annotate({ expected: "a string with at most 253 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[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])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$" })).check(Schema.isMaxLength(253).annotate({ expected: "a value with a length of at most 253" }))
|
|
47
|
-
}))();
|
|
48
|
-
const TopicPublicationDomainsGet200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
49
|
-
organizationId: OrganizationId,
|
|
50
|
-
topicId: TopicId,
|
|
51
|
-
hostname: Schema.String.check(Schema.isMaxCodePoints(253).annotate({ expected: "a string with at most 253 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[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])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$" })).check(Schema.isMaxLength(253).annotate({ expected: "a value with a length of at most 253" })),
|
|
52
|
-
canonicalHostname: Schema.String,
|
|
53
|
-
phase: Schema.Union([
|
|
54
|
-
Schema.Literal("pending"),
|
|
55
|
-
Schema.Literal("active"),
|
|
56
|
-
Schema.Literal("removing"),
|
|
57
|
-
Schema.Literal("removed"),
|
|
58
|
-
Schema.Literal("conflict")
|
|
59
|
-
]),
|
|
60
|
-
active: Schema.Boolean,
|
|
61
|
-
hostnameStatus: Schema.Union([Schema.String, Schema.Null]),
|
|
62
|
-
sslStatus: Schema.Union([Schema.String, Schema.Null]),
|
|
63
|
-
cname: Schema.Struct({
|
|
64
|
-
type: Schema.Union([Schema.Literal("CNAME"), Schema.Literal("TXT")]),
|
|
65
|
-
name: Schema.String,
|
|
66
|
-
value: Schema.String
|
|
67
|
-
}),
|
|
68
|
-
verificationRecords: Schema.Array(Schema.Struct({
|
|
69
|
-
type: Schema.Union([Schema.Literal("CNAME"), Schema.Literal("TXT")]),
|
|
70
|
-
name: Schema.String,
|
|
71
|
-
value: Schema.String
|
|
72
|
-
})),
|
|
73
|
-
verificationErrors: Schema.Array(Schema.String)
|
|
74
|
-
}))();
|
|
75
|
-
const TopicPublicationDomainsGet401 = UnauthorizedError;
|
|
76
|
-
const TopicPublicationDomainsGet403 = /* @__PURE__ */ (() => Schema.Union([ForbiddenError, FlagDisabledError]))();
|
|
77
|
-
const TopicPublicationDomainsGet404 = ResourceNotFoundError;
|
|
78
|
-
const TopicPublicationDomainsGet409 = ConflictError;
|
|
79
|
-
const TopicPublicationDomainsGet422 = ValidationError;
|
|
80
|
-
const TopicPublicationDomainsGet500 = InternalError;
|
|
81
|
-
const TopicPublicationDomainsGet504 = GatewayTimeoutError;
|
|
82
|
-
const TopicPublicationDomainsRemovePathParams = /* @__PURE__ */ (() => Schema.Struct({
|
|
83
|
-
id: TopicId,
|
|
84
|
-
hostname: Schema.String.check(Schema.isMaxCodePoints(253).annotate({ expected: "a string with at most 253 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[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])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$" })).check(Schema.isMaxLength(253).annotate({ expected: "a value with a length of at most 253" }))
|
|
85
|
-
}))();
|
|
86
|
-
const TopicPublicationDomainsRemoveQuery = /* @__PURE__ */ (() => Schema.Struct({ idempotencyKey: 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})$" })) }))();
|
|
87
|
-
const TopicPublicationDomainsRemove200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
88
|
-
organizationId: OrganizationId,
|
|
89
|
-
topicId: TopicId,
|
|
90
|
-
hostname: Schema.String.check(Schema.isMaxCodePoints(253).annotate({ expected: "a string with at most 253 code points" })).check(Schema.isPattern(/* @__PURE__ */ new RegExp("^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z](?:[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])?\\.)+[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?$" })).check(Schema.isMaxLength(253).annotate({ expected: "a value with a length of at most 253" })),
|
|
91
|
-
canonicalHostname: Schema.String,
|
|
92
|
-
phase: Schema.Union([
|
|
93
|
-
Schema.Literal("pending"),
|
|
94
|
-
Schema.Literal("active"),
|
|
95
|
-
Schema.Literal("removing"),
|
|
96
|
-
Schema.Literal("removed"),
|
|
97
|
-
Schema.Literal("conflict")
|
|
98
|
-
]),
|
|
99
|
-
active: Schema.Boolean,
|
|
100
|
-
hostnameStatus: Schema.Union([Schema.String, Schema.Null]),
|
|
101
|
-
sslStatus: Schema.Union([Schema.String, Schema.Null]),
|
|
102
|
-
cname: Schema.Struct({
|
|
103
|
-
type: Schema.Union([Schema.Literal("CNAME"), Schema.Literal("TXT")]),
|
|
104
|
-
name: Schema.String,
|
|
105
|
-
value: Schema.String
|
|
106
|
-
}),
|
|
107
|
-
verificationRecords: Schema.Array(Schema.Struct({
|
|
108
|
-
type: Schema.Union([Schema.Literal("CNAME"), Schema.Literal("TXT")]),
|
|
109
|
-
name: Schema.String,
|
|
110
|
-
value: Schema.String
|
|
111
|
-
})),
|
|
112
|
-
verificationErrors: Schema.Array(Schema.String)
|
|
113
|
-
}))();
|
|
114
|
-
const TopicPublicationDomainsRemove401 = UnauthorizedError;
|
|
115
|
-
const TopicPublicationDomainsRemove403 = /* @__PURE__ */ (() => Schema.Union([ForbiddenError, FlagDisabledError]))();
|
|
116
|
-
const TopicPublicationDomainsRemove404 = ResourceNotFoundError;
|
|
117
|
-
const TopicPublicationDomainsRemove409 = ConflictError;
|
|
118
|
-
const TopicPublicationDomainsRemove422 = ValidationError;
|
|
119
|
-
const TopicPublicationDomainsRemove500 = InternalError;
|
|
120
|
-
const TopicPublicationDomainsRemove504 = GatewayTimeoutError;
|
|
121
|
-
var PublicationDomainsGroup = class extends HttpApiGroup.make("Publication domains").add(HttpApiEndpoint.post("topicPublicationDomainsAdd", "/v1/topics/:id/publication/domains", {
|
|
122
|
-
params: TopicPublicationDomainsAddPathParams,
|
|
123
|
-
payload: TopicPublicationDomainsAddRequestJson,
|
|
124
|
-
success: TopicPublicationDomainsAdd200,
|
|
125
|
-
error: [
|
|
126
|
-
TopicPublicationDomainsAdd401.pipe(HttpApiSchema.status(401)),
|
|
127
|
-
TopicPublicationDomainsAdd403.pipe(HttpApiSchema.status(403)),
|
|
128
|
-
TopicPublicationDomainsAdd404.pipe(HttpApiSchema.status(404)),
|
|
129
|
-
TopicPublicationDomainsAdd409.pipe(HttpApiSchema.status(409)),
|
|
130
|
-
TopicPublicationDomainsAdd422.pipe(HttpApiSchema.status(422)),
|
|
131
|
-
TopicPublicationDomainsAdd500,
|
|
132
|
-
TopicPublicationDomainsAdd504.pipe(HttpApiSchema.status(504))
|
|
133
|
-
]
|
|
134
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicPublicationDomains.add").annotate(OpenApi.Summary, "Add a publication domain").annotate(OpenApi.Description, "Claims a hostname for an opt-in topic with its public archive enabled and published. Requires issueWeb. Reuse the UUID idempotencyKey when retrying. The hostname serves no publication until Cloudflare confirms both ownership and SSL are active."), HttpApiEndpoint.get("topicPublicationDomainsGet", "/v1/topics/:id/publication/domains/:hostname", {
|
|
135
|
-
params: TopicPublicationDomainsGetPathParams,
|
|
136
|
-
success: TopicPublicationDomainsGet200,
|
|
137
|
-
error: [
|
|
138
|
-
TopicPublicationDomainsGet401.pipe(HttpApiSchema.status(401)),
|
|
139
|
-
TopicPublicationDomainsGet403.pipe(HttpApiSchema.status(403)),
|
|
140
|
-
TopicPublicationDomainsGet404.pipe(HttpApiSchema.status(404)),
|
|
141
|
-
TopicPublicationDomainsGet409.pipe(HttpApiSchema.status(409)),
|
|
142
|
-
TopicPublicationDomainsGet422.pipe(HttpApiSchema.status(422)),
|
|
143
|
-
TopicPublicationDomainsGet500,
|
|
144
|
-
TopicPublicationDomainsGet504.pipe(HttpApiSchema.status(504))
|
|
145
|
-
]
|
|
146
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicPublicationDomains.get").annotate(OpenApi.Summary, "Get a publication domain").annotate(OpenApi.Description, "Rechecks ownership and certificate status, returning DNS verification records. Domains outside this topic's organization or namespace return 404."), HttpApiEndpoint.delete("topicPublicationDomainsRemove", "/v1/topics/:id/publication/domains/:hostname", {
|
|
147
|
-
params: TopicPublicationDomainsRemovePathParams,
|
|
148
|
-
query: TopicPublicationDomainsRemoveQuery,
|
|
149
|
-
success: TopicPublicationDomainsRemove200,
|
|
150
|
-
error: [
|
|
151
|
-
TopicPublicationDomainsRemove401.pipe(HttpApiSchema.status(401)),
|
|
152
|
-
TopicPublicationDomainsRemove403.pipe(HttpApiSchema.status(403)),
|
|
153
|
-
TopicPublicationDomainsRemove404.pipe(HttpApiSchema.status(404)),
|
|
154
|
-
TopicPublicationDomainsRemove409.pipe(HttpApiSchema.status(409)),
|
|
155
|
-
TopicPublicationDomainsRemove422.pipe(HttpApiSchema.status(422)),
|
|
156
|
-
TopicPublicationDomainsRemove500,
|
|
157
|
-
TopicPublicationDomainsRemove504.pipe(HttpApiSchema.status(504))
|
|
158
|
-
]
|
|
159
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "topicPublicationDomains.remove").annotate(OpenApi.Summary, "Remove a publication domain").annotate(OpenApi.Description, "Revokes publication lookup before removing the Cloudflare hostname. Reuse the UUID idempotencyKey query value on retries. Pending provider teardown is reported as removing. Removal remains available after the topic archive is disabled.")).annotate(OpenApi.Description, "Cloudflare for SaaS custom domains for public topic archives") {};
|
|
160
|
-
//#endregion
|
|
161
|
-
export { PublicationDomainsGroup, TopicPublicationDomainsAdd200, TopicPublicationDomainsAdd401, TopicPublicationDomainsAdd403, TopicPublicationDomainsAdd404, TopicPublicationDomainsAdd409, TopicPublicationDomainsAdd422, TopicPublicationDomainsAdd500, TopicPublicationDomainsAdd504, TopicPublicationDomainsAddPathParams, TopicPublicationDomainsAddRequestJson, TopicPublicationDomainsGet200, TopicPublicationDomainsGet401, TopicPublicationDomainsGet403, TopicPublicationDomainsGet404, TopicPublicationDomainsGet409, TopicPublicationDomainsGet422, TopicPublicationDomainsGet500, TopicPublicationDomainsGet504, TopicPublicationDomainsGetPathParams, TopicPublicationDomainsRemove200, TopicPublicationDomainsRemove401, TopicPublicationDomainsRemove403, TopicPublicationDomainsRemove404, TopicPublicationDomainsRemove409, TopicPublicationDomainsRemove422, TopicPublicationDomainsRemove500, TopicPublicationDomainsRemove504, TopicPublicationDomainsRemovePathParams, TopicPublicationDomainsRemoveQuery };
|
|
162
|
-
|
|
163
|
-
//# sourceMappingURL=publication-domains.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const add: (input: {
|
|
2
|
-
readonly id: string;
|
|
3
|
-
readonly hostname: string;
|
|
4
|
-
readonly idempotencyKey: string;
|
|
5
|
-
}) => import("./internal/operation").OperationResult<"topicPublicationDomainsAdd">;
|
|
6
|
-
export declare const get: (input: {
|
|
7
|
-
readonly id: string;
|
|
8
|
-
readonly hostname: string;
|
|
9
|
-
}) => import("./internal/operation").OperationResult<"topicPublicationDomainsGet">;
|
|
10
|
-
export declare const remove: (input: {
|
|
11
|
-
readonly id: string;
|
|
12
|
-
readonly hostname: string;
|
|
13
|
-
readonly idempotencyKey: string;
|
|
14
|
-
}) => import("./internal/operation").OperationResult<"topicPublicationDomainsRemove">;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { forGroup } from "./internal/operation.js";
|
|
3
|
-
import { PublicationDomainsGroup } from "./generated/publication-domains.js";
|
|
4
|
-
//#region src/effect/publication-domains.ts
|
|
5
|
-
var publication_domains_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
-
add: () => add,
|
|
7
|
-
get: () => get,
|
|
8
|
-
remove: () => remove
|
|
9
|
-
});
|
|
10
|
-
const make = /* @__PURE__ */ forGroup(PublicationDomainsGroup);
|
|
11
|
-
const add = /* @__PURE__ */ make("topicPublicationDomainsAdd");
|
|
12
|
-
const get = /* @__PURE__ */ make("topicPublicationDomainsGet");
|
|
13
|
-
const remove = /* @__PURE__ */ make("topicPublicationDomainsRemove");
|
|
14
|
-
//#endregion
|
|
15
|
-
export { add, get, publication_domains_exports, remove };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=publication-domains.js.map
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { forGroup } from "./internal/operation.js";
|
|
3
|
-
import { TopicIssuesGroup } from "./generated/topic-issues.js";
|
|
4
|
-
//#region src/effect/topic-issues.ts
|
|
5
|
-
var topic_issues_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
-
check: () => check,
|
|
7
|
-
create: () => create,
|
|
8
|
-
get: () => get,
|
|
9
|
-
head: () => head,
|
|
10
|
-
history: () => history,
|
|
11
|
-
list: () => list,
|
|
12
|
-
open: () => open,
|
|
13
|
-
remove: () => remove,
|
|
14
|
-
render: () => render,
|
|
15
|
-
save: () => save,
|
|
16
|
-
update: () => update
|
|
17
|
-
});
|
|
18
|
-
const make = /* @__PURE__ */ forGroup(TopicIssuesGroup);
|
|
19
|
-
const list = /* @__PURE__ */ make("topicIssuesList");
|
|
20
|
-
const open = /* @__PURE__ */ make("topicIssuesOpen");
|
|
21
|
-
const get = /* @__PURE__ */ make("topicIssuesGet");
|
|
22
|
-
const create = /* @__PURE__ */ make("topicIssuesCreate");
|
|
23
|
-
const update = /* @__PURE__ */ make("topicIssuesUpdate");
|
|
24
|
-
const remove = /* @__PURE__ */ make("topicIssuesRemove");
|
|
25
|
-
const save = /* @__PURE__ */ make("topicIssuesSave");
|
|
26
|
-
const check = /* @__PURE__ */ make("topicIssuesCheck");
|
|
27
|
-
const render = /* @__PURE__ */ make("topicIssuesRender");
|
|
28
|
-
const head = /* @__PURE__ */ make("topicIssuesHead");
|
|
29
|
-
const history = /* @__PURE__ */ make("topicIssuesHistory");
|
|
30
|
-
//#endregion
|
|
31
|
-
export { check, create, get, head, history, list, open, remove, render, save, topic_issues_exports, update };
|
|
32
|
-
|
|
33
|
-
//# sourceMappingURL=topic-issues.js.map
|