samva 0.4.0 → 0.6.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.
Files changed (63) hide show
  1. package/AGENTS.md +3 -2
  2. package/README.md +12 -2
  3. package/dist/{categories-CsUa8ojo.js → categories-4u9Az4No.js} +28 -8
  4. package/dist/client/sdk.gen.d.ts +545 -74
  5. package/dist/client/types.gen.d.ts +3907 -747
  6. package/dist/{client-BmZK_uCt.js → client-DCM6U0-I.js} +3061 -808
  7. package/dist/{client-attribution-BslSOa_8.js → client-attribution-DYUSAa76.js} +2 -2
  8. package/dist/effect/analytics.d.ts +66 -0
  9. package/dist/effect/analytics.js +21 -0
  10. package/dist/effect/api-keys.d.ts +198 -34
  11. package/dist/effect/api-keys.js +1 -1
  12. package/dist/effect/attachments.d.ts +53 -0
  13. package/dist/effect/attachments.js +17 -0
  14. package/dist/effect/campaigns.d.ts +52 -18
  15. package/dist/effect/campaigns.js +1 -1
  16. package/dist/effect/categories.d.ts +3 -3
  17. package/dist/effect/categories.js +1 -1
  18. package/dist/effect/client.js +1 -1
  19. package/dist/effect/contact-groups.d.ts +375 -0
  20. package/dist/effect/contact-groups.js +29 -0
  21. package/dist/effect/contacts.d.ts +35 -19
  22. package/dist/effect/contacts.js +1 -1
  23. package/dist/effect/conversations.d.ts +191 -44
  24. package/dist/effect/conversations.js +1 -1
  25. package/dist/effect/custom-fields.d.ts +111 -0
  26. package/dist/effect/custom-fields.js +17 -0
  27. package/dist/effect/design.d.ts +2 -2
  28. package/dist/effect/design.js +1 -1
  29. package/dist/effect/email.d.ts +931 -97
  30. package/dist/effect/email.js +27 -3
  31. package/dist/effect/generated-metadata.d.ts +16 -4
  32. package/dist/effect/generated.d.ts +19596 -10819
  33. package/dist/effect/index.d.ts +6 -1
  34. package/dist/effect/index.js +8 -3
  35. package/dist/effect/internal/operation.d.ts +124 -26
  36. package/dist/effect/media.d.ts +8 -8
  37. package/dist/effect/media.js +1 -1
  38. package/dist/effect/messages.d.ts +473 -64
  39. package/dist/effect/messages.js +5 -3
  40. package/dist/effect/operations.d.ts +6 -6
  41. package/dist/effect/operations.js +1 -1
  42. package/dist/effect/organizations.d.ts +7 -110
  43. package/dist/effect/organizations.js +2 -4
  44. package/dist/effect/retry.js +1 -1
  45. package/dist/effect/scheduled-messages.d.ts +96 -12
  46. package/dist/effect/scheduled-messages.js +5 -3
  47. package/dist/effect/templates.d.ts +35 -295
  48. package/dist/effect/templates.js +3 -5
  49. package/dist/effect/unsubscribe-groups.d.ts +161 -0
  50. package/dist/effect/unsubscribe-groups.js +25 -0
  51. package/dist/effect/webhooks.d.ts +52 -18
  52. package/dist/effect/webhooks.js +2 -2
  53. package/dist/index.js +2 -2
  54. package/dist/{normalize-BiIJnycv.js → normalize-B79uJIeb.js} +13 -14
  55. package/dist/normalize.d.ts +3 -7
  56. package/dist/{operation-B1knNlxk.js → operation-02YX3hY9.js} +144 -8
  57. package/dist/promises/errors.gen.d.ts +47 -39
  58. package/dist/promises/index.d.ts +19 -4
  59. package/dist/promises/index.js +2 -2
  60. package/dist/promises/types.gen.d.ts +1 -1
  61. package/dist/{promises-n1opem5V.js → promises-8MaPNAam.js} +1679 -267
  62. package/dist/service-map.d.ts +221 -8
  63. package/package.json +29 -9
@@ -4,6 +4,14 @@
4
4
  * is visible in review and test failures.
5
5
  */
6
6
  export declare const SDK_SERVICE_OPERATIONS: {
7
+ readonly analytics: {
8
+ readonly getStats: "analyticsGetStats";
9
+ readonly getChannelStats: "analyticsGetChannelStats";
10
+ readonly getTopContacts: "analyticsGetTopContacts";
11
+ readonly getHourlyDistribution: "analyticsGetHourlyDistribution";
12
+ readonly getDeliveryMetrics: "analyticsGetDeliveryMetrics";
13
+ readonly exportData: "analyticsExportData";
14
+ };
7
15
  readonly apiKeys: {
8
16
  readonly list: "apiKeysList";
9
17
  readonly create: "apiKeysCreate";
@@ -15,6 +23,12 @@ export declare const SDK_SERVICE_OPERATIONS: {
15
23
  readonly getStats: "apiKeysGetStats";
16
24
  readonly getActivity: "apiKeysGetActivity";
17
25
  };
26
+ readonly attachments: {
27
+ readonly list: "attachmentsList";
28
+ readonly getById: "attachmentsGetById";
29
+ readonly remove: "attachmentsRemove";
30
+ readonly downloadUrl: "attachmentsDownloadUrl";
31
+ };
18
32
  readonly campaigns: {
19
33
  readonly list: "campaignsList";
20
34
  readonly create: "campaignsCreate";
@@ -29,6 +43,18 @@ export declare const SDK_SERVICE_OPERATIONS: {
29
43
  readonly cancelRun: "campaignsCancelRun";
30
44
  readonly listRecipients: "campaignsListRecipients";
31
45
  };
46
+ readonly contactGroups: {
47
+ readonly list: "contactGroupsList";
48
+ readonly create: "contactGroupsCreate";
49
+ readonly getById: "contactGroupsGetById";
50
+ readonly update: "contactGroupsUpdate";
51
+ readonly remove: "contactGroupsRemove";
52
+ readonly preview: "contactGroupsPreview";
53
+ readonly evaluateDynamic: "contactGroupsEvaluateDynamic";
54
+ readonly getMembers: "contactGroupsGetMembers";
55
+ readonly addMembers: "contactGroupsAddMembers";
56
+ readonly removeMembers: "contactGroupsRemoveMembers";
57
+ };
32
58
  readonly contacts: {
33
59
  readonly list: "contactsList";
34
60
  readonly create: "contactsCreate";
@@ -55,6 +81,12 @@ export declare const SDK_SERVICE_OPERATIONS: {
55
81
  readonly addContacts: "conversationsAddContacts";
56
82
  readonly removeContacts: "conversationsRemoveContacts";
57
83
  };
84
+ readonly customFields: {
85
+ readonly list: "customFieldsList";
86
+ readonly create: "customFieldsCreate";
87
+ readonly update: "customFieldsUpdate";
88
+ readonly remove: "customFieldsRemove";
89
+ };
58
90
  readonly design: {
59
91
  readonly get: "designGet";
60
92
  readonly update: "designUpdate";
@@ -67,6 +99,7 @@ export declare const SDK_SERVICE_OPERATIONS: {
67
99
  readonly updateRecipientTrackingPreference: "emailUpdateRecipientTrackingPreference";
68
100
  readonly listDomains: "emailListDomains";
69
101
  readonly addDomain: "emailAddDomain";
102
+ readonly rotateDomainDkim: "emailRotateDomainDkim";
70
103
  readonly getDomainVerification: "emailGetDomainVerification";
71
104
  readonly advanceDomainVerification: "emailAdvanceDomainVerification";
72
105
  readonly getDomainById: "emailGetDomainById";
@@ -86,7 +119,18 @@ export declare const SDK_SERVICE_OPERATIONS: {
86
119
  readonly buildCustomTrackingDomainConnectApplyUrl: "emailBuildCustomTrackingDomainConnectApplyUrl";
87
120
  readonly completeCustomTrackingDomainConnect: "emailCompleteCustomTrackingDomainConnect";
88
121
  readonly disableCustomTracking: "emailDisableCustomTracking";
122
+ readonly getDomainWarming: "emailGetDomainWarming";
123
+ readonly createDomainWarmingPlan: "emailCreateDomainWarmingPlan";
124
+ readonly updateDomainWarmingPolicy: "emailUpdateDomainWarmingPolicy";
125
+ readonly cancelDomainWarmingBatch: "emailCancelDomainWarmingBatch";
126
+ readonly pauseDomainWarming: "emailPauseDomainWarming";
127
+ readonly resumeDomainWarming: "emailResumeDomainWarming";
128
+ readonly completeDomainWarming: "emailCompleteDomainWarming";
129
+ readonly getOnboardingReview: "emailGetOnboardingReview";
130
+ readonly reapplyOnboardingReview: "emailReapplyOnboardingReview";
131
+ readonly respondToOnboardingInformationRequest: "emailRespondToOnboardingInformationRequest";
89
132
  readonly listSenders: "emailListSenders";
133
+ readonly getSender: "emailGetSender";
90
134
  readonly addSender: "emailAddSender";
91
135
  readonly checkSenderVerification: "emailCheckSenderVerification";
92
136
  readonly removeSender: "emailRemoveSender";
@@ -114,6 +158,7 @@ export declare const SDK_SERVICE_OPERATIONS: {
114
158
  readonly messages: {
115
159
  readonly list: "messagesList";
116
160
  readonly send: "messagesSend";
161
+ readonly validateEmail: "messagesValidateEmail";
117
162
  readonly get: "messagesGet";
118
163
  readonly getEmail: "messagesGetEmail";
119
164
  readonly remove: "messagesRemove";
@@ -133,7 +178,6 @@ export declare const SDK_SERVICE_OPERATIONS: {
133
178
  readonly retry: "operationsRetry";
134
179
  };
135
180
  readonly organizations: {
136
- readonly bootstrap: "organizationsBootstrap";
137
181
  readonly create: "organizationsCreate";
138
182
  readonly get: "organizationsGet";
139
183
  readonly update: "organizationsUpdate";
@@ -145,11 +189,11 @@ export declare const SDK_SERVICE_OPERATIONS: {
145
189
  readonly create: "scheduledMessagesCreate";
146
190
  readonly get: "scheduledMessagesGet";
147
191
  readonly cancel: "scheduledMessagesCancel";
192
+ readonly resume: "scheduledMessagesResume";
148
193
  };
149
194
  readonly templates: {
150
195
  readonly list: "templatesList";
151
196
  readonly create: "templatesCreate";
152
- readonly listDashboard: "templatesListDashboard";
153
197
  readonly listFamilies: "templatesListFamilies";
154
198
  readonly createFamily: "templatesCreateFamily";
155
199
  readonly getFamily: "templatesGetFamily";
@@ -180,6 +224,16 @@ export declare const SDK_SERVICE_OPERATIONS: {
180
224
  readonly listInputContracts: "templatesListInputContracts";
181
225
  readonly getInputContract: "templatesGetInputContract";
182
226
  };
227
+ readonly unsubscribeGroups: {
228
+ readonly list: "unsubscribeList";
229
+ readonly create: "unsubscribeCreate";
230
+ readonly update: "unsubscribeUpdate";
231
+ readonly remove: "unsubscribeRemove";
232
+ readonly listMembers: "unsubscribeListMembers";
233
+ readonly addEmails: "unsubscribeAddEmails";
234
+ readonly removeEmails: "unsubscribeRemoveEmails";
235
+ readonly checkSubscription: "unsubscribeCheckSubscription";
236
+ };
183
237
  readonly webhooks: {
184
238
  readonly list: "webhooksList";
185
239
  readonly create: "webhooksCreate";
@@ -218,6 +272,9 @@ export declare const SDK_OPERATION_CALLS: {
218
272
  readonly messagesSend: {
219
273
  readonly kind: "payload";
220
274
  };
275
+ readonly messagesValidateEmail: {
276
+ readonly kind: "payload";
277
+ };
221
278
  readonly messagesGet: {
222
279
  readonly kind: "path";
223
280
  readonly paths: readonly ["id"];
@@ -271,6 +328,10 @@ export declare const SDK_OPERATION_CALLS: {
271
328
  readonly kind: "path";
272
329
  readonly paths: readonly ["id"];
273
330
  };
331
+ readonly scheduledMessagesResume: {
332
+ readonly kind: "pathPayload";
333
+ readonly paths: readonly ["id"];
334
+ };
274
335
  readonly campaignsList: {
275
336
  readonly kind: "params";
276
337
  };
@@ -332,9 +393,22 @@ export declare const SDK_OPERATION_CALLS: {
332
393
  readonly emailUpdateRecipientTrackingPreference: {
333
394
  readonly kind: "payload";
334
395
  };
396
+ readonly emailGetOnboardingReview: {
397
+ readonly kind: "none";
398
+ };
399
+ readonly emailReapplyOnboardingReview: {
400
+ readonly kind: "payload";
401
+ };
402
+ readonly emailRespondToOnboardingInformationRequest: {
403
+ readonly kind: "payload";
404
+ };
335
405
  readonly emailAddDomain: {
336
406
  readonly kind: "payload";
337
407
  };
408
+ readonly emailRotateDomainDkim: {
409
+ readonly kind: "idempotentPath";
410
+ readonly paths: readonly ["id"];
411
+ };
338
412
  readonly emailGetDomainVerification: {
339
413
  readonly kind: "path";
340
414
  readonly paths: readonly ["id"];
@@ -411,9 +485,41 @@ export declare const SDK_OPERATION_CALLS: {
411
485
  readonly kind: "path";
412
486
  readonly paths: readonly ["id"];
413
487
  };
488
+ readonly emailGetDomainWarming: {
489
+ readonly kind: "path";
490
+ readonly paths: readonly ["id"];
491
+ };
492
+ readonly emailCreateDomainWarmingPlan: {
493
+ readonly kind: "pathPayload";
494
+ readonly paths: readonly ["id"];
495
+ };
496
+ readonly emailUpdateDomainWarmingPolicy: {
497
+ readonly kind: "pathPayload";
498
+ readonly paths: readonly ["id"];
499
+ };
500
+ readonly emailCancelDomainWarmingBatch: {
501
+ readonly kind: "path";
502
+ readonly paths: readonly ["id", "batchId"];
503
+ };
504
+ readonly emailPauseDomainWarming: {
505
+ readonly kind: "pathPayload";
506
+ readonly paths: readonly ["id"];
507
+ };
508
+ readonly emailResumeDomainWarming: {
509
+ readonly kind: "pathPayload";
510
+ readonly paths: readonly ["id"];
511
+ };
512
+ readonly emailCompleteDomainWarming: {
513
+ readonly kind: "pathPayload";
514
+ readonly paths: readonly ["id"];
515
+ };
414
516
  readonly emailListSenders: {
415
517
  readonly kind: "params";
416
518
  };
519
+ readonly emailGetSender: {
520
+ readonly kind: "path";
521
+ readonly paths: readonly ["id"];
522
+ };
417
523
  readonly emailAddSender: {
418
524
  readonly kind: "idempotentPayload";
419
525
  };
@@ -574,9 +680,6 @@ export declare const SDK_OPERATION_CALLS: {
574
680
  readonly templatesCreate: {
575
681
  readonly kind: "payload";
576
682
  };
577
- readonly templatesListDashboard: {
578
- readonly kind: "params";
579
- };
580
683
  readonly templatesListFamilies: {
581
684
  readonly kind: "params";
582
685
  };
@@ -729,9 +832,6 @@ export declare const SDK_OPERATION_CALLS: {
729
832
  readonly kind: "path";
730
833
  readonly paths: readonly ["webhookId"];
731
834
  };
732
- readonly organizationsBootstrap: {
733
- readonly kind: "payload";
734
- };
735
835
  readonly organizationsCreate: {
736
836
  readonly kind: "payload";
737
837
  };
@@ -781,4 +881,117 @@ export declare const SDK_OPERATION_CALLS: {
781
881
  readonly kind: "pathParams";
782
882
  readonly paths: readonly ["id"];
783
883
  };
884
+ readonly attachmentsList: {
885
+ readonly kind: "params";
886
+ };
887
+ readonly attachmentsGetById: {
888
+ readonly kind: "path";
889
+ readonly paths: readonly ["id"];
890
+ };
891
+ readonly attachmentsRemove: {
892
+ readonly kind: "path";
893
+ readonly paths: readonly ["id"];
894
+ };
895
+ readonly attachmentsDownloadUrl: {
896
+ readonly kind: "pathParams";
897
+ readonly paths: readonly ["id"];
898
+ };
899
+ readonly contactGroupsList: {
900
+ readonly kind: "params";
901
+ };
902
+ readonly contactGroupsCreate: {
903
+ readonly kind: "payload";
904
+ };
905
+ readonly contactGroupsGetById: {
906
+ readonly kind: "path";
907
+ readonly paths: readonly ["id"];
908
+ };
909
+ readonly contactGroupsUpdate: {
910
+ readonly kind: "pathPayload";
911
+ readonly paths: readonly ["id"];
912
+ };
913
+ readonly contactGroupsRemove: {
914
+ readonly kind: "path";
915
+ readonly paths: readonly ["id"];
916
+ };
917
+ readonly contactGroupsPreview: {
918
+ readonly kind: "payload";
919
+ };
920
+ readonly contactGroupsEvaluateDynamic: {
921
+ readonly kind: "path";
922
+ readonly paths: readonly ["groupId"];
923
+ };
924
+ readonly contactGroupsGetMembers: {
925
+ readonly kind: "pathParams";
926
+ readonly paths: readonly ["groupId"];
927
+ };
928
+ readonly contactGroupsAddMembers: {
929
+ readonly kind: "pathPayload";
930
+ readonly paths: readonly ["groupId"];
931
+ };
932
+ readonly contactGroupsRemoveMembers: {
933
+ readonly kind: "pathPayload";
934
+ readonly paths: readonly ["groupId"];
935
+ };
936
+ readonly customFieldsList: {
937
+ readonly kind: "params";
938
+ };
939
+ readonly customFieldsCreate: {
940
+ readonly kind: "payload";
941
+ };
942
+ readonly customFieldsUpdate: {
943
+ readonly kind: "pathPayload";
944
+ readonly paths: readonly ["id"];
945
+ };
946
+ readonly customFieldsRemove: {
947
+ readonly kind: "path";
948
+ readonly paths: readonly ["id"];
949
+ };
950
+ readonly unsubscribeList: {
951
+ readonly kind: "params";
952
+ };
953
+ readonly unsubscribeCreate: {
954
+ readonly kind: "payload";
955
+ };
956
+ readonly unsubscribeUpdate: {
957
+ readonly kind: "pathPayload";
958
+ readonly paths: readonly ["id"];
959
+ };
960
+ readonly unsubscribeRemove: {
961
+ readonly kind: "path";
962
+ readonly paths: readonly ["id"];
963
+ };
964
+ readonly unsubscribeListMembers: {
965
+ readonly kind: "pathParams";
966
+ readonly paths: readonly ["groupId"];
967
+ };
968
+ readonly unsubscribeAddEmails: {
969
+ readonly kind: "pathPayload";
970
+ readonly paths: readonly ["groupId"];
971
+ };
972
+ readonly unsubscribeRemoveEmails: {
973
+ readonly kind: "pathPayload";
974
+ readonly paths: readonly ["groupId"];
975
+ };
976
+ readonly unsubscribeCheckSubscription: {
977
+ readonly kind: "params";
978
+ };
979
+ readonly analyticsGetStats: {
980
+ readonly kind: "params";
981
+ };
982
+ readonly analyticsGetChannelStats: {
983
+ readonly kind: "params";
984
+ };
985
+ readonly analyticsGetTopContacts: {
986
+ readonly kind: "params";
987
+ };
988
+ readonly analyticsGetHourlyDistribution: {
989
+ readonly kind: "params";
990
+ };
991
+ readonly analyticsGetDeliveryMetrics: {
992
+ readonly kind: "params";
993
+ };
994
+ readonly analyticsExportData: {
995
+ readonly kind: "payload";
996
+ };
784
997
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "samva",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "TypeScript SDK for the Samva email API",
5
5
  "keywords": [
6
6
  "api-client",
@@ -50,10 +50,18 @@
50
50
  "types": "./dist/effect/categories.d.ts",
51
51
  "import": "./dist/effect/categories.js"
52
52
  },
53
+ "./effect/analytics": {
54
+ "types": "./dist/effect/analytics.d.ts",
55
+ "import": "./dist/effect/analytics.js"
56
+ },
53
57
  "./effect/api-keys": {
54
58
  "types": "./dist/effect/api-keys.d.ts",
55
59
  "import": "./dist/effect/api-keys.js"
56
60
  },
61
+ "./effect/attachments": {
62
+ "types": "./dist/effect/attachments.d.ts",
63
+ "import": "./dist/effect/attachments.js"
64
+ },
57
65
  "./effect/campaigns": {
58
66
  "types": "./dist/effect/campaigns.d.ts",
59
67
  "import": "./dist/effect/campaigns.js"
@@ -62,6 +70,10 @@
62
70
  "types": "./dist/effect/client.d.ts",
63
71
  "import": "./dist/effect/client.js"
64
72
  },
73
+ "./effect/contact-groups": {
74
+ "types": "./dist/effect/contact-groups.d.ts",
75
+ "import": "./dist/effect/contact-groups.js"
76
+ },
65
77
  "./effect/contacts": {
66
78
  "types": "./dist/effect/contacts.d.ts",
67
79
  "import": "./dist/effect/contacts.js"
@@ -70,6 +82,10 @@
70
82
  "types": "./dist/effect/conversations.d.ts",
71
83
  "import": "./dist/effect/conversations.js"
72
84
  },
85
+ "./effect/custom-fields": {
86
+ "types": "./dist/effect/custom-fields.d.ts",
87
+ "import": "./dist/effect/custom-fields.js"
88
+ },
73
89
  "./effect/design": {
74
90
  "types": "./dist/effect/design.d.ts",
75
91
  "import": "./dist/effect/design.js"
@@ -106,6 +122,10 @@
106
122
  "types": "./dist/effect/templates.d.ts",
107
123
  "import": "./dist/effect/templates.js"
108
124
  },
125
+ "./effect/unsubscribe-groups": {
126
+ "types": "./dist/effect/unsubscribe-groups.d.ts",
127
+ "import": "./dist/effect/unsubscribe-groups.js"
128
+ },
109
129
  "./effect/webhooks": {
110
130
  "types": "./dist/effect/webhooks.d.ts",
111
131
  "import": "./dist/effect/webhooks.js"
@@ -134,23 +154,23 @@
134
154
  "test:tarball": "bun run build && bun scripts/check-tarball.ts",
135
155
  "test:tree-shaking": "bun run build && bun scripts/check-tree-shaking.ts",
136
156
  "test:types": "tsc --noEmit --project tests/parity/tsconfig.json",
137
- "typecheck": "tsc --noEmit"
157
+ "typecheck": "tsc --noEmit && tsc --noEmit -p codegen/tsconfig.json && tsc --noEmit -p tests/tsconfig.json"
138
158
  },
139
159
  "dependencies": {
140
- "@samva/webhooks": "0.4.0"
160
+ "@samva/webhooks": "0.6.0"
141
161
  },
142
162
  "devDependencies": {
143
- "@effect/openapi-generator": "4.0.0-rc.112",
144
- "@effect/platform-node": "4.0.0-rc.112",
145
- "@effect/vitest": "4.0.0-rc.112",
146
- "@types/node": "^26.4.0",
147
- "effect": "4.0.0-rc.112",
163
+ "@effect/openapi-generator": "4.0.0-rc.117",
164
+ "@effect/platform-node": "4.0.0-rc.117",
165
+ "@effect/vitest": "4.0.0-rc.117",
166
+ "@types/node": "^26.6.2",
167
+ "effect": "4.0.0-rc.117",
148
168
  "tsdown": "^0.22.13",
149
169
  "typescript": "^7.0.2",
150
170
  "vitest": "^4.1.11"
151
171
  },
152
172
  "peerDependencies": {
153
- "effect": "4.0.0-rc.112"
173
+ "effect": "4.0.0-rc.117"
154
174
  },
155
175
  "peerDependenciesMeta": {
156
176
  "effect": {