samva 0.27.0 → 0.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +7 -0
- package/README.md +14 -7
- package/dist/client/sdk.gen.d.ts +322 -143
- package/dist/client/sdk.gen.js +604 -95
- package/dist/client/types.gen.d.ts +1342 -479
- package/dist/effect/agents.d.ts +6 -8
- package/dist/effect/analytics.d.ts +1 -1
- package/dist/effect/api-keys.d.ts +6 -6
- package/dist/effect/attachments.d.ts +1 -1
- package/dist/effect/brands.d.ts +2 -0
- package/dist/effect/campaigns.d.ts +275 -25
- package/dist/effect/campaigns.js +7 -1
- package/dist/effect/contact-groups.d.ts +9 -9
- package/dist/effect/contacts.d.ts +74 -81
- package/dist/effect/contacts.js +7 -3
- package/dist/effect/conversations.d.ts +14 -6
- package/dist/effect/email.d.ts +34 -34
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +3 -3
- package/dist/effect/extensions.d.ts +6 -6
- package/dist/effect/generated/agents.d.ts +6 -28
- package/dist/effect/generated/agents.js +2 -3
- package/dist/effect/generated/analytics.d.ts +3 -3
- package/dist/effect/generated/analytics.js +1 -1
- package/dist/effect/generated/api-keys.d.ts +6 -6
- package/dist/effect/generated/api-keys.js +2 -2
- package/dist/effect/generated/attachments.d.ts +3 -3
- package/dist/effect/generated/attachments.js +1 -1
- package/dist/effect/generated/brands.d.ts +16 -0
- package/dist/effect/generated/campaigns.d.ts +1181 -302
- package/dist/effect/generated/campaigns.js +169 -36
- package/dist/effect/generated/contact-events.d.ts +3 -3
- package/dist/effect/generated/contact-events.js +1 -1
- package/dist/effect/generated/contact-groups.d.ts +9 -9
- package/dist/effect/generated/contact-groups.js +7 -7
- package/dist/effect/generated/contacts.d.ts +2063 -290
- package/dist/effect/generated/contacts.js +343 -75
- package/dist/effect/generated/conversations.d.ts +14 -6
- package/dist/effect/generated/conversations.js +6 -6
- package/dist/effect/generated/email.d.ts +40 -40
- package/dist/effect/generated/email.js +15 -15
- package/dist/effect/generated/extension-installations.d.ts +3 -3
- package/dist/effect/generated/extension-installations.js +1 -1
- package/dist/effect/generated/extensions.d.ts +6 -6
- package/dist/effect/generated/extensions.js +2 -2
- package/dist/effect/generated/index.d.ts +5 -3
- package/dist/effect/generated/journeys.d.ts +9 -9
- package/dist/effect/generated/journeys.js +3 -3
- package/dist/effect/generated/mailboxes.d.ts +172 -124
- package/dist/effect/generated/mailboxes.js +22 -14
- package/dist/effect/generated/messages.d.ts +53 -29
- package/dist/effect/generated/messages.js +9 -5
- package/dist/effect/generated/namespaces.d.ts +3 -3
- package/dist/effect/generated/namespaces.js +1 -1
- package/dist/effect/generated/operations.d.ts +3 -3
- package/dist/effect/generated/operations.js +1 -1
- package/dist/effect/generated/organizations.d.ts +0 -9
- package/dist/effect/generated/organizations.js +1 -4
- package/dist/effect/generated/scheduled-messages.d.ts +69 -20
- package/dist/effect/generated/scheduled-messages.js +22 -3
- package/dist/effect/generated/shared.d.ts +396 -107
- package/dist/effect/generated/shared.js +170 -89
- package/dist/effect/generated/subscriptions.d.ts +4 -7
- package/dist/effect/generated/subscriptions.js +3 -4
- package/dist/effect/generated/templates.d.ts +71 -407
- package/dist/effect/generated/templates.js +23 -23
- package/dist/effect/generated/topic-forms.d.ts +656 -0
- package/dist/effect/generated/topic-forms.js +145 -0
- package/dist/effect/generated/{unsubscribe-groups.d.ts → topics.d.ts} +640 -435
- package/dist/effect/generated/topics.js +267 -0
- package/dist/effect/generated/webhooks.d.ts +6 -6
- package/dist/effect/generated/webhooks.js +2 -2
- package/dist/effect/generated-metadata.d.ts +78 -24
- package/dist/effect/generated-metadata.js +61 -27
- package/dist/effect/index.d.ts +2 -1
- package/dist/effect/index.js +4 -3
- package/dist/effect/internal/operation.js +3 -3
- package/dist/effect/internal/send.d.ts +4 -4
- package/dist/effect/journeys.d.ts +7 -7
- package/dist/effect/mailboxes.d.ts +137 -121
- package/dist/effect/messages.d.ts +19 -11
- package/dist/effect/namespaces.d.ts +3 -3
- package/dist/effect/operations.d.ts +3 -3
- package/dist/effect/scheduled-messages.d.ts +6 -6
- package/dist/effect/subscriptions.d.ts +1 -2
- package/dist/effect/templates.d.ts +13 -13
- package/dist/effect/topic-forms.d.ts +30 -0
- package/dist/effect/topic-forms.js +21 -0
- package/dist/effect/topics.d.ts +94 -0
- package/dist/effect/topics.js +29 -0
- package/dist/effect/webhooks.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/package.js +1 -1
- package/dist/promises/errors.gen.d.ts +65 -8
- package/dist/promises/errors.gen.js +139 -7
- package/dist/promises/index.d.ts +5 -3
- package/dist/promises/index.js +7 -5
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +74 -25
- package/dist/service-map.js +43 -12
- package/package.json +12 -8
- package/dist/effect/generated/unsubscribe-groups.js +0 -284
- package/dist/effect/unsubscribe-groups.d.ts +0 -74
- package/dist/effect/unsubscribe-groups.js +0 -29
package/dist/service-map.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export declare const SDK_SERVICE_OPERATIONS: {
|
|
|
48
48
|
readonly setDefault: "brandsSetDefault";
|
|
49
49
|
};
|
|
50
50
|
readonly campaigns: {
|
|
51
|
+
readonly preview: "campaignsPreview";
|
|
52
|
+
readonly sendTest: "campaignsSendTest";
|
|
51
53
|
readonly list: "campaignsList";
|
|
52
54
|
readonly create: "campaignsCreate";
|
|
53
55
|
readonly get: "campaignsGet";
|
|
@@ -56,6 +58,7 @@ export declare const SDK_SERVICE_OPERATIONS: {
|
|
|
56
58
|
readonly listRuns: "campaignsListRuns";
|
|
57
59
|
readonly scheduleRun: "campaignsScheduleRun";
|
|
58
60
|
readonly getRun: "campaignsGetRun";
|
|
61
|
+
readonly getRunReport: "campaignsGetRunReport";
|
|
59
62
|
readonly pauseRun: "campaignsPauseRun";
|
|
60
63
|
readonly resumeRun: "campaignsResumeRun";
|
|
61
64
|
readonly cancelRun: "campaignsCancelRun";
|
|
@@ -87,7 +90,9 @@ export declare const SDK_SERVICE_OPERATIONS: {
|
|
|
87
90
|
readonly addTags: "contactsAddTags";
|
|
88
91
|
readonly removeTags: "contactsRemoveTags";
|
|
89
92
|
readonly getEngagement: "contactsGetEngagement";
|
|
90
|
-
readonly
|
|
93
|
+
readonly planImport: "contactsPlanImport";
|
|
94
|
+
readonly startImport: "contactsStartImport";
|
|
95
|
+
readonly getImportJob: "contactsGetImportJob";
|
|
91
96
|
readonly bulkDelete: "contactsBulkDelete";
|
|
92
97
|
readonly bulkUpdateTags: "contactsBulkUpdateTags";
|
|
93
98
|
readonly bulkUpdateStatus: "contactsBulkUpdateStatus";
|
|
@@ -285,16 +290,23 @@ export declare const SDK_SERVICE_OPERATIONS: {
|
|
|
285
290
|
readonly subscriptions: {
|
|
286
291
|
readonly subscribe: "subscriptionsSubscribe";
|
|
287
292
|
};
|
|
288
|
-
readonly
|
|
289
|
-
readonly list: "
|
|
290
|
-
readonly
|
|
291
|
-
readonly
|
|
292
|
-
readonly
|
|
293
|
-
readonly
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
readonly
|
|
297
|
-
readonly
|
|
293
|
+
readonly topicForms: {
|
|
294
|
+
readonly list: "topicFormsList";
|
|
295
|
+
readonly get: "topicFormsGet";
|
|
296
|
+
readonly create: "topicFormsCreate";
|
|
297
|
+
readonly update: "topicFormsUpdate";
|
|
298
|
+
readonly remove: "topicFormsRemove";
|
|
299
|
+
};
|
|
300
|
+
readonly topics: {
|
|
301
|
+
readonly list: "topicsList";
|
|
302
|
+
readonly get: "topicsGet";
|
|
303
|
+
readonly create: "topicsCreate";
|
|
304
|
+
readonly update: "topicsUpdate";
|
|
305
|
+
readonly remove: "topicsRemove";
|
|
306
|
+
readonly setDefault: "topicsSetDefault";
|
|
307
|
+
readonly listSubscriptions: "topicsListSubscriptions";
|
|
308
|
+
readonly setSubscriptions: "topicsSetSubscriptions";
|
|
309
|
+
readonly checkSubscription: "topicsCheckSubscription";
|
|
298
310
|
};
|
|
299
311
|
readonly whoami: {
|
|
300
312
|
readonly get: "whoamiGet";
|
|
@@ -512,6 +524,12 @@ export declare const SDK_OPERATION_CALLS: {
|
|
|
512
524
|
readonly kind: "pathPayload";
|
|
513
525
|
readonly paths: readonly ["id"];
|
|
514
526
|
};
|
|
527
|
+
readonly campaignsPreview: {
|
|
528
|
+
readonly kind: "payload";
|
|
529
|
+
};
|
|
530
|
+
readonly campaignsSendTest: {
|
|
531
|
+
readonly kind: "payload";
|
|
532
|
+
};
|
|
515
533
|
readonly campaignsList: {
|
|
516
534
|
readonly kind: "params";
|
|
517
535
|
};
|
|
@@ -542,6 +560,10 @@ export declare const SDK_OPERATION_CALLS: {
|
|
|
542
560
|
readonly kind: "path";
|
|
543
561
|
readonly paths: readonly ["id", "runId"];
|
|
544
562
|
};
|
|
563
|
+
readonly campaignsGetRunReport: {
|
|
564
|
+
readonly kind: "path";
|
|
565
|
+
readonly paths: readonly ["id", "runId"];
|
|
566
|
+
};
|
|
545
567
|
readonly campaignsPauseRun: {
|
|
546
568
|
readonly kind: "path";
|
|
547
569
|
readonly paths: readonly ["id", "runId"];
|
|
@@ -944,9 +966,16 @@ export declare const SDK_OPERATION_CALLS: {
|
|
|
944
966
|
readonly kind: "path";
|
|
945
967
|
readonly paths: readonly ["id"];
|
|
946
968
|
};
|
|
947
|
-
readonly
|
|
969
|
+
readonly contactsPlanImport: {
|
|
970
|
+
readonly kind: "payload";
|
|
971
|
+
};
|
|
972
|
+
readonly contactsStartImport: {
|
|
948
973
|
readonly kind: "payload";
|
|
949
974
|
};
|
|
975
|
+
readonly contactsGetImportJob: {
|
|
976
|
+
readonly kind: "path";
|
|
977
|
+
readonly paths: readonly ["id"];
|
|
978
|
+
};
|
|
950
979
|
readonly contactsBulkDelete: {
|
|
951
980
|
readonly kind: "payload";
|
|
952
981
|
};
|
|
@@ -1269,37 +1298,57 @@ export declare const SDK_OPERATION_CALLS: {
|
|
|
1269
1298
|
readonly subscriptionsSubscribe: {
|
|
1270
1299
|
readonly kind: "payload";
|
|
1271
1300
|
};
|
|
1272
|
-
readonly
|
|
1273
|
-
readonly kind: "
|
|
1301
|
+
readonly topicFormsList: {
|
|
1302
|
+
readonly kind: "path";
|
|
1303
|
+
readonly paths: readonly ["id"];
|
|
1274
1304
|
};
|
|
1275
|
-
readonly
|
|
1276
|
-
readonly kind: "
|
|
1305
|
+
readonly topicFormsGet: {
|
|
1306
|
+
readonly kind: "path";
|
|
1307
|
+
readonly paths: readonly ["id", "formId"];
|
|
1277
1308
|
};
|
|
1278
|
-
readonly
|
|
1309
|
+
readonly topicFormsCreate: {
|
|
1279
1310
|
readonly kind: "pathPayload";
|
|
1280
1311
|
readonly paths: readonly ["id"];
|
|
1281
1312
|
};
|
|
1282
|
-
readonly
|
|
1313
|
+
readonly topicFormsUpdate: {
|
|
1314
|
+
readonly kind: "pathPayload";
|
|
1315
|
+
readonly paths: readonly ["id", "formId"];
|
|
1316
|
+
};
|
|
1317
|
+
readonly topicFormsRemove: {
|
|
1318
|
+
readonly kind: "path";
|
|
1319
|
+
readonly paths: readonly ["id", "formId"];
|
|
1320
|
+
};
|
|
1321
|
+
readonly topicsList: {
|
|
1322
|
+
readonly kind: "params";
|
|
1323
|
+
};
|
|
1324
|
+
readonly topicsGet: {
|
|
1283
1325
|
readonly kind: "path";
|
|
1284
1326
|
readonly paths: readonly ["id"];
|
|
1285
1327
|
};
|
|
1286
|
-
readonly
|
|
1328
|
+
readonly topicsCreate: {
|
|
1329
|
+
readonly kind: "payload";
|
|
1330
|
+
};
|
|
1331
|
+
readonly topicsUpdate: {
|
|
1332
|
+
readonly kind: "pathPayload";
|
|
1333
|
+
readonly paths: readonly ["id"];
|
|
1334
|
+
};
|
|
1335
|
+
readonly topicsRemove: {
|
|
1287
1336
|
readonly kind: "path";
|
|
1288
1337
|
readonly paths: readonly ["id"];
|
|
1289
1338
|
};
|
|
1290
|
-
readonly
|
|
1291
|
-
readonly kind: "
|
|
1339
|
+
readonly topicsSetDefault: {
|
|
1340
|
+
readonly kind: "path";
|
|
1292
1341
|
readonly paths: readonly ["id"];
|
|
1293
1342
|
};
|
|
1294
|
-
readonly
|
|
1295
|
-
readonly kind: "
|
|
1343
|
+
readonly topicsListSubscriptions: {
|
|
1344
|
+
readonly kind: "pathParams";
|
|
1296
1345
|
readonly paths: readonly ["id"];
|
|
1297
1346
|
};
|
|
1298
|
-
readonly
|
|
1347
|
+
readonly topicsSetSubscriptions: {
|
|
1299
1348
|
readonly kind: "pathPayload";
|
|
1300
1349
|
readonly paths: readonly ["id"];
|
|
1301
1350
|
};
|
|
1302
|
-
readonly
|
|
1351
|
+
readonly topicsCheckSubscription: {
|
|
1303
1352
|
readonly kind: "params";
|
|
1304
1353
|
};
|
|
1305
1354
|
readonly agentsList: {
|
package/dist/service-map.js
CHANGED
|
@@ -90,6 +90,8 @@ const SDK_OPERATION_CALLS = {
|
|
|
90
90
|
kind: "pathPayload",
|
|
91
91
|
paths: ["id"]
|
|
92
92
|
},
|
|
93
|
+
campaignsPreview: { kind: "payload" },
|
|
94
|
+
campaignsSendTest: { kind: "payload" },
|
|
93
95
|
campaignsList: { kind: "params" },
|
|
94
96
|
campaignsCreate: { kind: "payload" },
|
|
95
97
|
campaignsGet: {
|
|
@@ -116,6 +118,10 @@ const SDK_OPERATION_CALLS = {
|
|
|
116
118
|
kind: "path",
|
|
117
119
|
paths: ["id", "runId"]
|
|
118
120
|
},
|
|
121
|
+
campaignsGetRunReport: {
|
|
122
|
+
kind: "path",
|
|
123
|
+
paths: ["id", "runId"]
|
|
124
|
+
},
|
|
119
125
|
campaignsPauseRun: {
|
|
120
126
|
kind: "path",
|
|
121
127
|
paths: ["id", "runId"]
|
|
@@ -454,7 +460,12 @@ const SDK_OPERATION_CALLS = {
|
|
|
454
460
|
kind: "path",
|
|
455
461
|
paths: ["id"]
|
|
456
462
|
},
|
|
457
|
-
|
|
463
|
+
contactsPlanImport: { kind: "payload" },
|
|
464
|
+
contactsStartImport: { kind: "payload" },
|
|
465
|
+
contactsGetImportJob: {
|
|
466
|
+
kind: "path",
|
|
467
|
+
paths: ["id"]
|
|
468
|
+
},
|
|
458
469
|
contactsBulkDelete: { kind: "payload" },
|
|
459
470
|
contactsBulkUpdateTags: { kind: "payload" },
|
|
460
471
|
contactsBulkUpdateStatus: { kind: "payload" },
|
|
@@ -717,33 +728,53 @@ const SDK_OPERATION_CALLS = {
|
|
|
717
728
|
paths: ["id"]
|
|
718
729
|
},
|
|
719
730
|
subscriptionsSubscribe: { kind: "payload" },
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
731
|
+
topicFormsList: {
|
|
732
|
+
kind: "path",
|
|
733
|
+
paths: ["id"]
|
|
734
|
+
},
|
|
735
|
+
topicFormsGet: {
|
|
736
|
+
kind: "path",
|
|
737
|
+
paths: ["id", "formId"]
|
|
738
|
+
},
|
|
739
|
+
topicFormsCreate: {
|
|
723
740
|
kind: "pathPayload",
|
|
724
741
|
paths: ["id"]
|
|
725
742
|
},
|
|
726
|
-
|
|
743
|
+
topicFormsUpdate: {
|
|
744
|
+
kind: "pathPayload",
|
|
745
|
+
paths: ["id", "formId"]
|
|
746
|
+
},
|
|
747
|
+
topicFormsRemove: {
|
|
748
|
+
kind: "path",
|
|
749
|
+
paths: ["id", "formId"]
|
|
750
|
+
},
|
|
751
|
+
topicsList: { kind: "params" },
|
|
752
|
+
topicsGet: {
|
|
727
753
|
kind: "path",
|
|
728
754
|
paths: ["id"]
|
|
729
755
|
},
|
|
730
|
-
|
|
756
|
+
topicsCreate: { kind: "payload" },
|
|
757
|
+
topicsUpdate: {
|
|
758
|
+
kind: "pathPayload",
|
|
759
|
+
paths: ["id"]
|
|
760
|
+
},
|
|
761
|
+
topicsRemove: {
|
|
731
762
|
kind: "path",
|
|
732
763
|
paths: ["id"]
|
|
733
764
|
},
|
|
734
|
-
|
|
735
|
-
kind: "
|
|
765
|
+
topicsSetDefault: {
|
|
766
|
+
kind: "path",
|
|
736
767
|
paths: ["id"]
|
|
737
768
|
},
|
|
738
|
-
|
|
739
|
-
kind: "
|
|
769
|
+
topicsListSubscriptions: {
|
|
770
|
+
kind: "pathParams",
|
|
740
771
|
paths: ["id"]
|
|
741
772
|
},
|
|
742
|
-
|
|
773
|
+
topicsSetSubscriptions: {
|
|
743
774
|
kind: "pathPayload",
|
|
744
775
|
paths: ["id"]
|
|
745
776
|
},
|
|
746
|
-
|
|
777
|
+
topicsCheckSubscription: { kind: "params" },
|
|
747
778
|
agentsList: { kind: "params" },
|
|
748
779
|
agentsCreate: { kind: "payload" },
|
|
749
780
|
agentsGet: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "samva",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"description": "TypeScript SDK for the Samva email API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api-client",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
],
|
|
16
16
|
"homepage": "https://samva.dev",
|
|
17
17
|
"bugs": {
|
|
18
|
-
"url": "https://github.com/
|
|
18
|
+
"url": "https://github.com/SamvaHQ/samva-typescript/issues"
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"author": "Arya Labs, Inc.",
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "https://github.com/SamvaHQ/samva-typescript.git",
|
|
25
25
|
"directory": "packages/sdk"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
@@ -163,9 +163,13 @@
|
|
|
163
163
|
"types": "./dist/effect/templates.d.ts",
|
|
164
164
|
"import": "./dist/effect/templates.js"
|
|
165
165
|
},
|
|
166
|
-
"./effect/
|
|
167
|
-
"types": "./dist/effect/
|
|
168
|
-
"import": "./dist/effect/
|
|
166
|
+
"./effect/topic-forms": {
|
|
167
|
+
"types": "./dist/effect/topic-forms.d.ts",
|
|
168
|
+
"import": "./dist/effect/topic-forms.js"
|
|
169
|
+
},
|
|
170
|
+
"./effect/topics": {
|
|
171
|
+
"types": "./dist/effect/topics.d.ts",
|
|
172
|
+
"import": "./dist/effect/topics.js"
|
|
169
173
|
},
|
|
170
174
|
"./effect/webhooks": {
|
|
171
175
|
"types": "./dist/effect/webhooks.d.ts",
|
|
@@ -194,7 +198,7 @@
|
|
|
194
198
|
"generate:openapi": "bun run scripts/openapi.ts",
|
|
195
199
|
"generate:promises": "bun run codegen/generate-promises.ts && bun run scripts/generate-promise-errors.ts && oxfmt --config=../../oxfmt.config.ts src/client src/promises/errors.gen.ts src/promises/types.gen.ts",
|
|
196
200
|
"generate:effect": "bun run codegen/generate-effect.ts && oxfmt --config=../../oxfmt.config.ts src/effect/generated src/effect/generated-metadata.ts && bun run codegen/normalize-effect.ts",
|
|
197
|
-
"generate": "bun run --filter @samva/openapi
|
|
201
|
+
"generate": "bun run --filter @samva/openapi build && bun generate:openapi && bun generate:promises && bun generate:effect",
|
|
198
202
|
"test": "vitest run --root ../.. --project packages packages/sdk/tests",
|
|
199
203
|
"test:generation": "bun scripts/check-generation.ts",
|
|
200
204
|
"test:packed": "bun run build && bun scripts/test-packed-consumers.ts",
|
|
@@ -204,7 +208,7 @@
|
|
|
204
208
|
"typecheck": "tsc-rs --noEmit && tsc-rs --noEmit -p codegen/tsconfig.json && tsc-rs --noEmit -p tests/tsconfig.json && tsc-rs --noEmit --project tests/parity/tsconfig.json"
|
|
205
209
|
},
|
|
206
210
|
"dependencies": {
|
|
207
|
-
"@samva/webhooks": "0.
|
|
211
|
+
"@samva/webhooks": "0.28.1"
|
|
208
212
|
},
|
|
209
213
|
"devDependencies": {
|
|
210
214
|
"@effect/openapi-generator": "4.0.4",
|
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
import { ApiKeySecurityMiddleware, BillingProviderError, ConflictError, ContactId, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, PaymentRequiredError, ResourceNotFoundError, UnauthorizedError, UnsubscribeId, 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/unsubscribe-groups.ts
|
|
5
|
-
const UnsubscribeGroupMemberId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/* @__PURE__ */ new RegExp("^unsubm_[0-9a-hjkmnp-tv-z]{16,24}$", "u")).annotate({
|
|
6
|
-
expected: "a string matching the RegExp ^unsubm_[0-9a-hjkmnp-tv-z]{16,24}$",
|
|
7
|
-
identifier: "UnsubscribeGroupMemberId"
|
|
8
|
-
})).pipe(Schema.brand("UnsubscribeGroupMemberId"));
|
|
9
|
-
const UnsubscribeGroupMemberByEmail = /* @__PURE__ */ Schema.Struct({ email: Schema.String }).annotate({ identifier: "UnsubscribeGroupMemberByEmail" });
|
|
10
|
-
const UnsubscribeGroupMemberByPhone = /* @__PURE__ */ Schema.Struct({ phone: Schema.String }).annotate({ identifier: "UnsubscribeGroupMemberByPhone" });
|
|
11
|
-
const UnsubscribeGroupList = /* @__PURE__ */ Schema.Struct({ items: Schema.Array(Schema.Struct({
|
|
12
|
-
id: UnsubscribeId,
|
|
13
|
-
organizationId: Schema.String,
|
|
14
|
-
name: Schema.String,
|
|
15
|
-
description: Schema.Union([Schema.String, Schema.Null]),
|
|
16
|
-
isDefault: Schema.Boolean,
|
|
17
|
-
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
18
|
-
createdAt: Schema.String,
|
|
19
|
-
updatedAt: Schema.String
|
|
20
|
-
})).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })) }).annotate({ identifier: "UnsubscribeGroupList" });
|
|
21
|
-
const UnsubscribeGroupMemberByContact = /* @__PURE__ */ Schema.Struct({ contactId: ContactId }).annotate({ identifier: "UnsubscribeGroupMemberByContact" });
|
|
22
|
-
const UnsubscribeGroupMemberPage = /* @__PURE__ */ Schema.Struct({
|
|
23
|
-
items: Schema.Array(Schema.Struct({
|
|
24
|
-
id: UnsubscribeGroupMemberId,
|
|
25
|
-
contactId: ContactId,
|
|
26
|
-
source: Schema.Union([
|
|
27
|
-
Schema.Literal("link"),
|
|
28
|
-
Schema.Literal("api"),
|
|
29
|
-
Schema.Literal("manual"),
|
|
30
|
-
Schema.Literal("complaint")
|
|
31
|
-
]),
|
|
32
|
-
unsubscribedAt: Schema.String,
|
|
33
|
-
createdAt: Schema.String
|
|
34
|
-
})),
|
|
35
|
-
nextCursor: Schema.Union([Schema.String, Schema.Null])
|
|
36
|
-
}).annotate({ identifier: "UnsubscribeGroupMemberPage" });
|
|
37
|
-
const UnsubscribeGroupMemberRef = /* @__PURE__ */ Schema.Union([
|
|
38
|
-
UnsubscribeGroupMemberByContact,
|
|
39
|
-
UnsubscribeGroupMemberByEmail,
|
|
40
|
-
UnsubscribeGroupMemberByPhone
|
|
41
|
-
]).annotate({ identifier: "UnsubscribeGroupMemberRef" });
|
|
42
|
-
const UnsubscribeList200 = UnsubscribeGroupList;
|
|
43
|
-
const UnsubscribeList401 = UnauthorizedError;
|
|
44
|
-
const UnsubscribeList403 = ForbiddenError;
|
|
45
|
-
const UnsubscribeList422 = ValidationError;
|
|
46
|
-
const UnsubscribeList500 = InternalError;
|
|
47
|
-
const UnsubscribeList504 = GatewayTimeoutError;
|
|
48
|
-
const UnsubscribeCreateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
49
|
-
name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
50
|
-
description: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null]))
|
|
51
|
-
});
|
|
52
|
-
const UnsubscribeCreate201 = /* @__PURE__ */ Schema.Struct({
|
|
53
|
-
id: UnsubscribeId,
|
|
54
|
-
organizationId: Schema.String,
|
|
55
|
-
name: Schema.String,
|
|
56
|
-
description: Schema.Union([Schema.String, Schema.Null]),
|
|
57
|
-
isDefault: Schema.Boolean,
|
|
58
|
-
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
59
|
-
createdAt: Schema.String,
|
|
60
|
-
updatedAt: Schema.String
|
|
61
|
-
});
|
|
62
|
-
const UnsubscribeCreate401 = UnauthorizedError;
|
|
63
|
-
const UnsubscribeCreate403 = ForbiddenError;
|
|
64
|
-
const UnsubscribeCreate409 = ConflictError;
|
|
65
|
-
const UnsubscribeCreate422 = ValidationError;
|
|
66
|
-
const UnsubscribeCreate500 = InternalError;
|
|
67
|
-
const UnsubscribeCreate504 = GatewayTimeoutError;
|
|
68
|
-
const UnsubscribeRemovePathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
69
|
-
const UnsubscribeRemove200 = /* @__PURE__ */ Schema.Struct({ success: Schema.Boolean });
|
|
70
|
-
const UnsubscribeRemove401 = UnauthorizedError;
|
|
71
|
-
const UnsubscribeRemove403 = ForbiddenError;
|
|
72
|
-
const UnsubscribeRemove404 = ResourceNotFoundError;
|
|
73
|
-
const UnsubscribeRemove409 = ConflictError;
|
|
74
|
-
const UnsubscribeRemove422 = ValidationError;
|
|
75
|
-
const UnsubscribeRemove500 = InternalError;
|
|
76
|
-
const UnsubscribeRemove504 = GatewayTimeoutError;
|
|
77
|
-
const UnsubscribeUpdatePathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
78
|
-
const UnsubscribeUpdateRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
79
|
-
name: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })), Schema.Null])),
|
|
80
|
-
description: Schema.optionalKey(Schema.Union([Schema.Union([Schema.String, Schema.Null]), Schema.Null]))
|
|
81
|
-
});
|
|
82
|
-
const UnsubscribeUpdate200 = /* @__PURE__ */ Schema.Struct({
|
|
83
|
-
id: UnsubscribeId,
|
|
84
|
-
organizationId: Schema.String,
|
|
85
|
-
name: Schema.String,
|
|
86
|
-
description: Schema.Union([Schema.String, Schema.Null]),
|
|
87
|
-
isDefault: Schema.Boolean,
|
|
88
|
-
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
89
|
-
createdAt: Schema.String,
|
|
90
|
-
updatedAt: Schema.String
|
|
91
|
-
});
|
|
92
|
-
const UnsubscribeUpdate401 = UnauthorizedError;
|
|
93
|
-
const UnsubscribeUpdate403 = ForbiddenError;
|
|
94
|
-
const UnsubscribeUpdate404 = ResourceNotFoundError;
|
|
95
|
-
const UnsubscribeUpdate422 = ValidationError;
|
|
96
|
-
const UnsubscribeUpdate500 = InternalError;
|
|
97
|
-
const UnsubscribeUpdate504 = GatewayTimeoutError;
|
|
98
|
-
const UnsubscribeSetDefaultPathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
99
|
-
const UnsubscribeSetDefault200 = /* @__PURE__ */ Schema.Struct({
|
|
100
|
-
id: UnsubscribeId,
|
|
101
|
-
organizationId: Schema.String,
|
|
102
|
-
name: Schema.String,
|
|
103
|
-
description: Schema.Union([Schema.String, Schema.Null]),
|
|
104
|
-
isDefault: Schema.Boolean,
|
|
105
|
-
memberCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
106
|
-
createdAt: Schema.String,
|
|
107
|
-
updatedAt: Schema.String
|
|
108
|
-
});
|
|
109
|
-
const UnsubscribeSetDefault401 = UnauthorizedError;
|
|
110
|
-
const UnsubscribeSetDefault403 = ForbiddenError;
|
|
111
|
-
const UnsubscribeSetDefault404 = ResourceNotFoundError;
|
|
112
|
-
const UnsubscribeSetDefault422 = ValidationError;
|
|
113
|
-
const UnsubscribeSetDefault500 = InternalError;
|
|
114
|
-
const UnsubscribeSetDefault504 = GatewayTimeoutError;
|
|
115
|
-
const UnsubscribeListMembersPathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
116
|
-
const UnsubscribeListMembersQuery = /* @__PURE__ */ Schema.Struct({
|
|
117
|
-
limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
118
|
-
cursor: Schema.optionalKey(Schema.Union([Cursor, Schema.Null]))
|
|
119
|
-
});
|
|
120
|
-
const UnsubscribeListMembers200 = UnsubscribeGroupMemberPage;
|
|
121
|
-
const UnsubscribeListMembers401 = UnauthorizedError;
|
|
122
|
-
const UnsubscribeListMembers403 = ForbiddenError;
|
|
123
|
-
const UnsubscribeListMembers404 = ResourceNotFoundError;
|
|
124
|
-
const UnsubscribeListMembers422 = ValidationError;
|
|
125
|
-
const UnsubscribeListMembers500 = InternalError;
|
|
126
|
-
const UnsubscribeListMembers504 = GatewayTimeoutError;
|
|
127
|
-
const UnsubscribeAddMembersPathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
128
|
-
const UnsubscribeAddMembersRequestJson = /* @__PURE__ */ Schema.Struct({
|
|
129
|
-
members: Schema.Array(UnsubscribeGroupMemberRef).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
|
|
130
|
-
source: Schema.optionalKey(Schema.Union([Schema.Union([
|
|
131
|
-
Schema.Literal("link"),
|
|
132
|
-
Schema.Literal("api"),
|
|
133
|
-
Schema.Literal("manual"),
|
|
134
|
-
Schema.Literal("complaint")
|
|
135
|
-
]), Schema.Null]))
|
|
136
|
-
});
|
|
137
|
-
const UnsubscribeAddMembers200 = /* @__PURE__ */ Schema.Struct({
|
|
138
|
-
added: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
139
|
-
skipped: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
140
|
-
});
|
|
141
|
-
const UnsubscribeAddMembers401 = UnauthorizedError;
|
|
142
|
-
const UnsubscribeAddMembers402 = PaymentRequiredError;
|
|
143
|
-
const UnsubscribeAddMembers403 = ForbiddenError;
|
|
144
|
-
const UnsubscribeAddMembers404 = ResourceNotFoundError;
|
|
145
|
-
const UnsubscribeAddMembers422 = ValidationError;
|
|
146
|
-
const UnsubscribeAddMembers500 = InternalError;
|
|
147
|
-
const UnsubscribeAddMembers502 = BillingProviderError;
|
|
148
|
-
const UnsubscribeAddMembers504 = GatewayTimeoutError;
|
|
149
|
-
const UnsubscribeRemoveMembersPathParams = /* @__PURE__ */ Schema.Struct({ id: UnsubscribeId });
|
|
150
|
-
const UnsubscribeRemoveMembersRequestJson = /* @__PURE__ */ Schema.Struct({ members: Schema.Array(UnsubscribeGroupMemberRef).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })) });
|
|
151
|
-
const UnsubscribeRemoveMembers200 = /* @__PURE__ */ Schema.Struct({ removed: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })) });
|
|
152
|
-
const UnsubscribeRemoveMembers401 = UnauthorizedError;
|
|
153
|
-
const UnsubscribeRemoveMembers403 = ForbiddenError;
|
|
154
|
-
const UnsubscribeRemoveMembers404 = ResourceNotFoundError;
|
|
155
|
-
const UnsubscribeRemoveMembers422 = ValidationError;
|
|
156
|
-
const UnsubscribeRemoveMembers500 = InternalError;
|
|
157
|
-
const UnsubscribeRemoveMembers504 = GatewayTimeoutError;
|
|
158
|
-
const UnsubscribeCheckSubscriptionQuery = /* @__PURE__ */ Schema.Struct({
|
|
159
|
-
contactId: Schema.optionalKey(Schema.Union([ContactId, Schema.Null])),
|
|
160
|
-
email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
161
|
-
phone: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
|
|
162
|
-
groupIds: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
|
|
163
|
-
});
|
|
164
|
-
const UnsubscribeCheckSubscription200 = /* @__PURE__ */ Schema.Struct({
|
|
165
|
-
contactId: Schema.Union([ContactId, Schema.Null]),
|
|
166
|
-
unsubscribedGroups: Schema.Array(Schema.Struct({
|
|
167
|
-
groupId: Schema.String,
|
|
168
|
-
groupName: Schema.String,
|
|
169
|
-
unsubscribedAt: Schema.String
|
|
170
|
-
}))
|
|
171
|
-
});
|
|
172
|
-
const UnsubscribeCheckSubscription401 = UnauthorizedError;
|
|
173
|
-
const UnsubscribeCheckSubscription403 = ForbiddenError;
|
|
174
|
-
const UnsubscribeCheckSubscription422 = ValidationError;
|
|
175
|
-
const UnsubscribeCheckSubscription500 = InternalError;
|
|
176
|
-
const UnsubscribeCheckSubscription504 = GatewayTimeoutError;
|
|
177
|
-
var UnsubscribeGroupsGroup = class extends HttpApiGroup.make("Unsubscribe Groups").add(HttpApiEndpoint.get("unsubscribeList", "/v1/unsubscribe-groups", {
|
|
178
|
-
success: UnsubscribeList200,
|
|
179
|
-
error: [
|
|
180
|
-
UnsubscribeList401.pipe(HttpApiSchema.status(401)),
|
|
181
|
-
UnsubscribeList403.pipe(HttpApiSchema.status(403)),
|
|
182
|
-
UnsubscribeList422.pipe(HttpApiSchema.status(422)),
|
|
183
|
-
UnsubscribeList500,
|
|
184
|
-
UnsubscribeList504.pipe(HttpApiSchema.status(504))
|
|
185
|
-
]
|
|
186
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.list").annotate(OpenApi.Summary, "List unsubscribe groups").annotate(OpenApi.Description, "Returns every unsubscribe group in the organization, the default group first, then by name. An organization holds at most 200, so the list is never paged."), HttpApiEndpoint.post("unsubscribeCreate", "/v1/unsubscribe-groups", {
|
|
187
|
-
payload: UnsubscribeCreateRequestJson,
|
|
188
|
-
success: UnsubscribeCreate201.pipe(HttpApiSchema.status(201)),
|
|
189
|
-
error: [
|
|
190
|
-
UnsubscribeCreate401.pipe(HttpApiSchema.status(401)),
|
|
191
|
-
UnsubscribeCreate403.pipe(HttpApiSchema.status(403)),
|
|
192
|
-
UnsubscribeCreate409.pipe(HttpApiSchema.status(409)),
|
|
193
|
-
UnsubscribeCreate422.pipe(HttpApiSchema.status(422)),
|
|
194
|
-
UnsubscribeCreate500,
|
|
195
|
-
UnsubscribeCreate504.pipe(HttpApiSchema.status(504))
|
|
196
|
-
]
|
|
197
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.create").annotate(OpenApi.Summary, "Create an unsubscribe group").annotate(OpenApi.Description, "Creates a new unsubscribe group and returns it with a 201 Created status. An organization holds at most 200 groups."), HttpApiEndpoint.delete("unsubscribeRemove", "/v1/unsubscribe-groups/:id", {
|
|
198
|
-
params: UnsubscribeRemovePathParams,
|
|
199
|
-
success: UnsubscribeRemove200,
|
|
200
|
-
error: [
|
|
201
|
-
UnsubscribeRemove401.pipe(HttpApiSchema.status(401)),
|
|
202
|
-
UnsubscribeRemove403.pipe(HttpApiSchema.status(403)),
|
|
203
|
-
UnsubscribeRemove404.pipe(HttpApiSchema.status(404)),
|
|
204
|
-
UnsubscribeRemove409.pipe(HttpApiSchema.status(409)),
|
|
205
|
-
UnsubscribeRemove422.pipe(HttpApiSchema.status(422)),
|
|
206
|
-
UnsubscribeRemove500,
|
|
207
|
-
UnsubscribeRemove504.pipe(HttpApiSchema.status(504))
|
|
208
|
-
]
|
|
209
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.remove").annotate(OpenApi.Summary, "Delete an unsubscribe group").annotate(OpenApi.Description, "Permanently deletes an unsubscribe group by its ID. The default group cannot be deleted; make another group the default first. A group a scheduled or running campaign uses cannot be deleted until that run finishes or is cancelled."), HttpApiEndpoint.patch("unsubscribeUpdate", "/v1/unsubscribe-groups/:id", {
|
|
210
|
-
params: UnsubscribeUpdatePathParams,
|
|
211
|
-
payload: UnsubscribeUpdateRequestJson,
|
|
212
|
-
success: UnsubscribeUpdate200,
|
|
213
|
-
error: [
|
|
214
|
-
UnsubscribeUpdate401.pipe(HttpApiSchema.status(401)),
|
|
215
|
-
UnsubscribeUpdate403.pipe(HttpApiSchema.status(403)),
|
|
216
|
-
UnsubscribeUpdate404.pipe(HttpApiSchema.status(404)),
|
|
217
|
-
UnsubscribeUpdate422.pipe(HttpApiSchema.status(422)),
|
|
218
|
-
UnsubscribeUpdate500,
|
|
219
|
-
UnsubscribeUpdate504.pipe(HttpApiSchema.status(504))
|
|
220
|
-
]
|
|
221
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.update").annotate(OpenApi.Summary, "Update an unsubscribe group").annotate(OpenApi.Description, "Updates the name or description of an unsubscribe group."), HttpApiEndpoint.post("unsubscribeSetDefault", "/v1/unsubscribe-groups/:id/default", {
|
|
222
|
-
params: UnsubscribeSetDefaultPathParams,
|
|
223
|
-
success: UnsubscribeSetDefault200,
|
|
224
|
-
error: [
|
|
225
|
-
UnsubscribeSetDefault401.pipe(HttpApiSchema.status(401)),
|
|
226
|
-
UnsubscribeSetDefault403.pipe(HttpApiSchema.status(403)),
|
|
227
|
-
UnsubscribeSetDefault404.pipe(HttpApiSchema.status(404)),
|
|
228
|
-
UnsubscribeSetDefault422.pipe(HttpApiSchema.status(422)),
|
|
229
|
-
UnsubscribeSetDefault500,
|
|
230
|
-
UnsubscribeSetDefault504.pipe(HttpApiSchema.status(504))
|
|
231
|
-
]
|
|
232
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.setDefault").annotate(OpenApi.Summary, "Make an unsubscribe group the default").annotate(OpenApi.Description, "Makes this group the organization's default: campaigns that name no group, and whose template and sending domain name none, unsubscribe recipients from it."), HttpApiEndpoint.get("unsubscribeListMembers", "/v1/unsubscribe-groups/:id/members", {
|
|
233
|
-
params: UnsubscribeListMembersPathParams,
|
|
234
|
-
query: UnsubscribeListMembersQuery,
|
|
235
|
-
success: UnsubscribeListMembers200,
|
|
236
|
-
error: [
|
|
237
|
-
UnsubscribeListMembers401.pipe(HttpApiSchema.status(401)),
|
|
238
|
-
UnsubscribeListMembers403.pipe(HttpApiSchema.status(403)),
|
|
239
|
-
UnsubscribeListMembers404.pipe(HttpApiSchema.status(404)),
|
|
240
|
-
UnsubscribeListMembers422.pipe(HttpApiSchema.status(422)),
|
|
241
|
-
UnsubscribeListMembers500,
|
|
242
|
-
UnsubscribeListMembers504.pipe(HttpApiSchema.status(504))
|
|
243
|
-
]
|
|
244
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.listMembers").annotate(OpenApi.Summary, "List unsubscribe group members").annotate(OpenApi.Description, "Returns the contacts that have left an unsubscribe group, newest first. Pass `nextCursor` back as `cursor` for the next page; it is null on the last page."), HttpApiEndpoint.post("unsubscribeAddMembers", "/v1/unsubscribe-groups/:id/members", {
|
|
245
|
-
params: UnsubscribeAddMembersPathParams,
|
|
246
|
-
payload: UnsubscribeAddMembersRequestJson,
|
|
247
|
-
success: UnsubscribeAddMembers200,
|
|
248
|
-
error: [
|
|
249
|
-
UnsubscribeAddMembers401.pipe(HttpApiSchema.status(401)),
|
|
250
|
-
UnsubscribeAddMembers402.pipe(HttpApiSchema.status(402)),
|
|
251
|
-
UnsubscribeAddMembers403.pipe(HttpApiSchema.status(403)),
|
|
252
|
-
UnsubscribeAddMembers404.pipe(HttpApiSchema.status(404)),
|
|
253
|
-
UnsubscribeAddMembers422.pipe(HttpApiSchema.status(422)),
|
|
254
|
-
UnsubscribeAddMembers500,
|
|
255
|
-
UnsubscribeAddMembers502.pipe(HttpApiSchema.status(502)),
|
|
256
|
-
UnsubscribeAddMembers504.pipe(HttpApiSchema.status(504))
|
|
257
|
-
]
|
|
258
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.addMembers").annotate(OpenApi.Summary, "Add contacts to an unsubscribe group").annotate(OpenApi.Description, "Moves contacts out of an unsubscribe group's audience and returns the number added and the number skipped. Leaving a group stops that group's sends to the contact on every channel. Each member is a contact ID, an email address, or a phone number; an address no contact holds gets a new contact, so an import from another email service needs no contacts first."), HttpApiEndpoint.delete("unsubscribeRemoveMembers", "/v1/unsubscribe-groups/:id/members", {
|
|
259
|
-
params: UnsubscribeRemoveMembersPathParams,
|
|
260
|
-
payload: UnsubscribeRemoveMembersRequestJson,
|
|
261
|
-
success: UnsubscribeRemoveMembers200,
|
|
262
|
-
error: [
|
|
263
|
-
UnsubscribeRemoveMembers401.pipe(HttpApiSchema.status(401)),
|
|
264
|
-
UnsubscribeRemoveMembers403.pipe(HttpApiSchema.status(403)),
|
|
265
|
-
UnsubscribeRemoveMembers404.pipe(HttpApiSchema.status(404)),
|
|
266
|
-
UnsubscribeRemoveMembers422.pipe(HttpApiSchema.status(422)),
|
|
267
|
-
UnsubscribeRemoveMembers500,
|
|
268
|
-
UnsubscribeRemoveMembers504.pipe(HttpApiSchema.status(504))
|
|
269
|
-
]
|
|
270
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.removeMembers").annotate(OpenApi.Summary, "Remove contacts from an unsubscribe group").annotate(OpenApi.Description, "Returns contacts to an unsubscribe group's audience and returns the number removed. Each member is a contact ID, an email address, or a phone number; an address no contact holds is skipped."), HttpApiEndpoint.get("unsubscribeCheckSubscription", "/v1/unsubscribe-groups/check", {
|
|
271
|
-
query: UnsubscribeCheckSubscriptionQuery,
|
|
272
|
-
success: UnsubscribeCheckSubscription200,
|
|
273
|
-
error: [
|
|
274
|
-
UnsubscribeCheckSubscription401.pipe(HttpApiSchema.status(401)),
|
|
275
|
-
UnsubscribeCheckSubscription403.pipe(HttpApiSchema.status(403)),
|
|
276
|
-
UnsubscribeCheckSubscription422.pipe(HttpApiSchema.status(422)),
|
|
277
|
-
UnsubscribeCheckSubscription500,
|
|
278
|
-
UnsubscribeCheckSubscription504.pipe(HttpApiSchema.status(504))
|
|
279
|
-
]
|
|
280
|
-
}).middleware(ApiKeySecurityMiddleware).annotate(OpenApi.Identifier, "unsubscribe.checkSubscription").annotate(OpenApi.Summary, "Check unsubscribe group membership").annotate(OpenApi.Description, "Returns the unsubscribe groups a contact has left, optionally limited to a specified set of groups. Name the contact by exactly one of `contactId`, `email`, or `phone`. Membership belongs to the contact, so the answer is the same whichever identifier names it; `contactId` is null, and no groups are returned, when no contact holds the email or phone.")).annotate(OpenApi.Description, "Manage unsubscribe groups and members") {};
|
|
281
|
-
//#endregion
|
|
282
|
-
export { UnsubscribeAddMembers200, UnsubscribeAddMembers401, UnsubscribeAddMembers402, UnsubscribeAddMembers403, UnsubscribeAddMembers404, UnsubscribeAddMembers422, UnsubscribeAddMembers500, UnsubscribeAddMembers502, UnsubscribeAddMembers504, UnsubscribeAddMembersPathParams, UnsubscribeAddMembersRequestJson, UnsubscribeCheckSubscription200, UnsubscribeCheckSubscription401, UnsubscribeCheckSubscription403, UnsubscribeCheckSubscription422, UnsubscribeCheckSubscription500, UnsubscribeCheckSubscription504, UnsubscribeCheckSubscriptionQuery, UnsubscribeCreate201, UnsubscribeCreate401, UnsubscribeCreate403, UnsubscribeCreate409, UnsubscribeCreate422, UnsubscribeCreate500, UnsubscribeCreate504, UnsubscribeCreateRequestJson, UnsubscribeGroupList, UnsubscribeGroupMemberByContact, UnsubscribeGroupMemberByEmail, UnsubscribeGroupMemberByPhone, UnsubscribeGroupMemberId, UnsubscribeGroupMemberPage, UnsubscribeGroupMemberRef, UnsubscribeGroupsGroup, UnsubscribeList200, UnsubscribeList401, UnsubscribeList403, UnsubscribeList422, UnsubscribeList500, UnsubscribeList504, UnsubscribeListMembers200, UnsubscribeListMembers401, UnsubscribeListMembers403, UnsubscribeListMembers404, UnsubscribeListMembers422, UnsubscribeListMembers500, UnsubscribeListMembers504, UnsubscribeListMembersPathParams, UnsubscribeListMembersQuery, UnsubscribeRemove200, UnsubscribeRemove401, UnsubscribeRemove403, UnsubscribeRemove404, UnsubscribeRemove409, UnsubscribeRemove422, UnsubscribeRemove500, UnsubscribeRemove504, UnsubscribeRemoveMembers200, UnsubscribeRemoveMembers401, UnsubscribeRemoveMembers403, UnsubscribeRemoveMembers404, UnsubscribeRemoveMembers422, UnsubscribeRemoveMembers500, UnsubscribeRemoveMembers504, UnsubscribeRemoveMembersPathParams, UnsubscribeRemoveMembersRequestJson, UnsubscribeRemovePathParams, UnsubscribeSetDefault200, UnsubscribeSetDefault401, UnsubscribeSetDefault403, UnsubscribeSetDefault404, UnsubscribeSetDefault422, UnsubscribeSetDefault500, UnsubscribeSetDefault504, UnsubscribeSetDefaultPathParams, UnsubscribeUpdate200, UnsubscribeUpdate401, UnsubscribeUpdate403, UnsubscribeUpdate404, UnsubscribeUpdate422, UnsubscribeUpdate500, UnsubscribeUpdate504, UnsubscribeUpdatePathParams, UnsubscribeUpdateRequestJson };
|
|
283
|
-
|
|
284
|
-
//# sourceMappingURL=unsubscribe-groups.js.map
|