samva 0.48.0 → 0.50.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 (85) hide show
  1. package/dist/client/sdk.gen.d.ts +272 -33
  2. package/dist/client/sdk.gen.js +693 -55
  3. package/dist/client/types.gen.d.ts +1571 -206
  4. package/dist/effect/accounts.d.ts +6 -6
  5. package/dist/effect/agents.d.ts +13 -13
  6. package/dist/effect/analytics.d.ts +6 -6
  7. package/dist/effect/api-keys.d.ts +11 -11
  8. package/dist/effect/approval-requests.d.ts +4 -4
  9. package/dist/effect/attachments.d.ts +4 -4
  10. package/dist/effect/brands.d.ts +6 -6
  11. package/dist/effect/campaigns.d.ts +15 -15
  12. package/dist/effect/contact-groups.d.ts +10 -10
  13. package/dist/effect/contacts.d.ts +25 -25
  14. package/dist/effect/conversations.d.ts +13 -13
  15. package/dist/effect/custom-fields.d.ts +4 -4
  16. package/dist/effect/descriptors/integrations-catalog.d.ts +134 -0
  17. package/dist/effect/descriptors/integrations-catalog.js +122 -0
  18. package/dist/effect/descriptors/mailboxes.d.ts +73 -13
  19. package/dist/effect/descriptors/mailboxes.js +85 -13
  20. package/dist/effect/email.d.ts +61 -61
  21. package/dist/effect/events.d.ts +2 -2
  22. package/dist/effect/feedback.d.ts +1 -1
  23. package/dist/effect/generated/accounts.d.ts +1 -3
  24. package/dist/effect/generated/accounts.js +2 -7
  25. package/dist/effect/generated/api-keys.d.ts +15 -15
  26. package/dist/effect/generated/attachments.js +1 -1
  27. package/dist/effect/generated/integrations-catalog.d.ts +2702 -1
  28. package/dist/effect/generated/integrations-catalog.js +578 -3
  29. package/dist/effect/generated/journeys.d.ts +9 -11
  30. package/dist/effect/generated/journeys.js +6 -12
  31. package/dist/effect/generated/mailboxes.d.ts +1661 -669
  32. package/dist/effect/generated/mailboxes.js +291 -103
  33. package/dist/effect/generated/messages.d.ts +109 -4
  34. package/dist/effect/generated/messages.js +41 -8
  35. package/dist/effect/generated/shared.d.ts +199 -21
  36. package/dist/effect/generated/shared.js +50 -13
  37. package/dist/effect/generated/template-registrations.d.ts +32 -1
  38. package/dist/effect/generated/template-registrations.js +8 -5
  39. package/dist/effect/generated/templates.d.ts +1 -4
  40. package/dist/effect/generated/templates.js +2 -6
  41. package/dist/effect/generated/webhooks.d.ts +19 -19
  42. package/dist/effect/generated/webhooks.js +8 -8
  43. package/dist/effect/generated/whoami.d.ts +4 -4
  44. package/dist/effect/generated-metadata.d.ts +138 -18
  45. package/dist/effect/generated-metadata.js +366 -340
  46. package/dist/effect/integrations-catalog.d.ts +228 -3
  47. package/dist/effect/integrations-catalog.js +29 -1
  48. package/dist/effect/integrations.d.ts +7 -7
  49. package/dist/effect/internal/client.d.ts +7 -3
  50. package/dist/effect/internal/operation.d.ts +10 -6
  51. package/dist/effect/internal/operation.js +3 -3
  52. package/dist/effect/journeys.d.ts +14 -14
  53. package/dist/effect/mailboxes.d.ts +142 -92
  54. package/dist/effect/mailboxes.js +20 -8
  55. package/dist/effect/media.d.ts +5 -5
  56. package/dist/effect/messages.d.ts +9 -9
  57. package/dist/effect/namespaces.d.ts +11 -11
  58. package/dist/effect/newsletter-domains.d.ts +4 -4
  59. package/dist/effect/newsletter-issues.d.ts +11 -11
  60. package/dist/effect/newsletters.d.ts +5 -5
  61. package/dist/effect/operations.d.ts +3 -3
  62. package/dist/effect/organizations.d.ts +12 -12
  63. package/dist/effect/policies.d.ts +3 -3
  64. package/dist/effect/retry.js +1 -1
  65. package/dist/effect/scheduled-messages.d.ts +5 -5
  66. package/dist/effect/subscriptions.d.ts +1 -1
  67. package/dist/effect/template-registrations.d.ts +9 -3
  68. package/dist/effect/template-share-links.d.ts +5 -5
  69. package/dist/effect/templates.d.ts +37 -37
  70. package/dist/effect/topic-forms.d.ts +5 -5
  71. package/dist/effect/topics.d.ts +9 -9
  72. package/dist/effect/webhooks.d.ts +15 -15
  73. package/dist/effect/whatsapp-flows.d.ts +10 -10
  74. package/dist/effect/whatsapp-setup-links.d.ts +4 -4
  75. package/dist/effect/whatsapp.d.ts +12 -12
  76. package/dist/effect/whoami.d.ts +1 -1
  77. package/dist/inline-attachments.d.ts +0 -5
  78. package/dist/mailbox-events.d.ts +1 -5
  79. package/dist/mailbox-events.js +2 -2
  80. package/dist/package.js +1 -1
  81. package/dist/promises/client.d.ts +4 -4
  82. package/dist/promises/client.js +8 -4
  83. package/dist/promises/types.gen.d.ts +1 -1
  84. package/dist/service-map.d.ts +105 -11
  85. package/package.json +3 -3
@@ -1,3 +1,228 @@
1
+ export declare const recipeConnectionHandoff: (input: {
2
+ readonly provider: "shopify" | "whatsapp";
3
+ readonly integrationAccountId?: string | undefined;
4
+ readonly whatsappAccountId?: string | undefined;
5
+ readonly setupId?: string | undefined;
6
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeConnectionHandoff">;
7
+ export declare const recipeTestHandoff: (input: {
8
+ readonly channel: "email" | "whatsapp";
9
+ readonly templateId: string;
10
+ readonly publicationId: string;
11
+ readonly mailboxEndpointId: string;
12
+ readonly fixture?: string | undefined;
13
+ readonly senderId?: string | undefined;
14
+ readonly businessAccountId?: string | undefined;
15
+ readonly registrationId?: string | undefined;
16
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeTestHandoff">;
17
+ export declare const recipeSetupsList: (input?: never, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeSetupsList">;
18
+ export declare const recipeSetupGet: (input: {
19
+ readonly id: string;
20
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeSetupGet">;
21
+ export declare const recipeSetupReplace: (input: {
22
+ readonly id: string;
23
+ readonly references: {
24
+ readonly channel: "email" | "whatsapp";
25
+ readonly templateFamilyId?: string | undefined;
26
+ readonly integrationAccountId?: string | undefined;
27
+ readonly publicationId?: string | undefined;
28
+ readonly senderId?: string | undefined;
29
+ readonly whatsappAccountId?: string | undefined;
30
+ readonly registrationId?: string | undefined;
31
+ readonly mailboxEndpointId?: string | undefined;
32
+ readonly journeyId?: string | undefined;
33
+ readonly eventBindings?: {
34
+ readonly [x: string]: string | undefined;
35
+ } | undefined;
36
+ };
37
+ readonly revision: string | null;
38
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeSetupReplace">;
39
+ export declare const recipeSetupActivate: (input: {
40
+ readonly id: string;
41
+ readonly revision: string;
42
+ readonly selection: {
43
+ readonly channel: "email";
44
+ readonly publicationId: string;
45
+ readonly senderId?: string | undefined;
46
+ } | {
47
+ readonly channel: "whatsapp";
48
+ readonly whatsappAccountId: string;
49
+ readonly registrationId: string;
50
+ readonly eventBindings: {
51
+ readonly [x: string]: string | undefined;
52
+ };
53
+ };
54
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeSetupActivate">;
55
+ export declare const recipePreview: (input: {
56
+ readonly templateId: string;
57
+ readonly publicationId: string;
58
+ readonly fixture?: string | undefined;
59
+ readonly templateData?: {
60
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | {
61
+ readonly [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
62
+ } | null)[] | {
63
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
64
+ } | null)[] | {
65
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
66
+ } | null)[] | {
67
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
68
+ } | null)[] | {
69
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
70
+ } | null)[] | {
71
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
72
+ } | null)[] | {
73
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
74
+ } | null)[] | {
75
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
76
+ } | null)[] | {
77
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
78
+ } | null)[] | {
79
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
80
+ } | null)[] | {
81
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
82
+ } | null)[] | {
83
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
84
+ } | null | undefined;
85
+ } | undefined;
86
+ readonly channel: "email";
87
+ } | {
88
+ readonly templateId: string;
89
+ readonly publicationId: string;
90
+ readonly fixture?: string | undefined;
91
+ readonly templateData?: {
92
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
93
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
94
+ } | null)[] | {
95
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
96
+ } | null)[] | {
97
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
98
+ } | null)[] | {
99
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
100
+ } | null)[] | {
101
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
102
+ } | null)[] | {
103
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
104
+ } | null)[] | {
105
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
106
+ } | null)[] | {
107
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
108
+ } | null)[] | {
109
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
110
+ } | null)[] | {
111
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
112
+ } | null)[] | {
113
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
114
+ } | null)[] | {
115
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
116
+ } | null | undefined;
117
+ } | undefined;
118
+ readonly channel: "whatsapp";
119
+ readonly eventBindings?: {
120
+ readonly [x: string]: string | undefined;
121
+ } | undefined;
122
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipePreview">;
123
+ export declare const recipeWhatsAppChallengeBegin: (input: {
124
+ readonly accountId: string;
125
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeWhatsAppChallengeBegin">;
126
+ export declare const recipeWhatsAppChallengeGet: (input: {
127
+ readonly accountId: string;
128
+ readonly id: string;
129
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeWhatsAppChallengeGet">;
130
+ export declare const recipeWhatsAppChallengeConfirm: (input: {
131
+ readonly accountId: string;
132
+ readonly id: string;
133
+ readonly observedPhone: string;
134
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeWhatsAppChallengeConfirm">;
135
+ export declare const recipeTest: (input: {
136
+ readonly templateId: string;
137
+ readonly publicationId: string;
138
+ readonly fixture?: string | undefined;
139
+ readonly templateData?: {
140
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | /*elided*/ any | {
141
+ readonly [x: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null | undefined;
142
+ } | null)[] | {
143
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
144
+ } | null)[] | {
145
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
146
+ } | null)[] | {
147
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
148
+ } | null)[] | {
149
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
150
+ } | null)[] | {
151
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
152
+ } | null)[] | {
153
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
154
+ } | null)[] | {
155
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
156
+ } | null)[] | {
157
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
158
+ } | null)[] | {
159
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
160
+ } | null)[] | {
161
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
162
+ } | null)[] | {
163
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
164
+ } | null | undefined;
165
+ } | undefined;
166
+ readonly channel: "email";
167
+ readonly requestId: string;
168
+ readonly mailboxEndpointId: string;
169
+ readonly topicId?: string | undefined;
170
+ readonly senderId?: string | undefined;
171
+ } | {
172
+ readonly templateId: string;
173
+ readonly publicationId: string;
174
+ readonly fixture?: string | undefined;
175
+ readonly templateData?: {
176
+ readonly [x: string]: string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | readonly (string | number | boolean | any | {
177
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
178
+ } | null)[] | {
179
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
180
+ } | null)[] | {
181
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
182
+ } | null)[] | {
183
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
184
+ } | null)[] | {
185
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
186
+ } | null)[] | {
187
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
188
+ } | null)[] | {
189
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
190
+ } | null)[] | {
191
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
192
+ } | null)[] | {
193
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
194
+ } | null)[] | {
195
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
196
+ } | null)[] | {
197
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
198
+ } | null)[] | {
199
+ readonly [x: string]: string | number | boolean | any | any | null | undefined;
200
+ } | null | undefined;
201
+ } | undefined;
202
+ readonly channel: "whatsapp";
203
+ readonly eventBindings?: {
204
+ readonly [x: string]: string | undefined;
205
+ } | undefined;
206
+ readonly requestId: string;
207
+ readonly mailboxEndpointId: string;
208
+ readonly topicId?: string | undefined;
209
+ readonly businessAccountId: string;
210
+ readonly registrationId: string;
211
+ readonly challengeId: string;
212
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeTest">;
213
+ export declare const recipeTestReceipt: (input: {
214
+ readonly requestId: string;
215
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeTestReceipt">;
216
+ export declare const recipeCatalog: (input?: never, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeCatalog">;
217
+ export declare const recipeReadiness: (input: {
218
+ readonly channel: "email" | "whatsapp";
219
+ readonly integrationAccountId?: string | undefined;
220
+ readonly publicationId?: string | undefined;
221
+ readonly senderId?: string | undefined;
222
+ readonly whatsappAccountId?: string | undefined;
223
+ readonly registrationId?: string | undefined;
224
+ readonly mailboxEndpointId?: string | undefined;
225
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogRecipeReadiness">;
1
226
  export declare const prepare: (input: {
2
227
  readonly provider: string;
3
228
  readonly input?: {
@@ -27,12 +252,12 @@ export declare const prepare: (input: {
27
252
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
28
253
  } | null | undefined;
29
254
  } | undefined;
30
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"integrationCatalogPrepare">;
255
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogPrepare">;
31
256
  export declare const search: (input?: {
32
257
  readonly key?: string | undefined;
33
258
  readonly query?: string | undefined;
34
259
  readonly category?: "accounting" | "calendar" | "channel" | "commerce" | "crm" | "dns" | "forms" | "helpdesk" | "knowledge" | "other" | "payments" | "productivity" | "reviews" | "shipping" | undefined;
35
260
  readonly offset?: number | undefined;
36
261
  readonly limit?: number | undefined;
37
- } | undefined, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"integrationCatalogSearch">;
38
- export declare const list: (input?: never, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"integrationCatalogList">;
262
+ } | undefined, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogSearch">;
263
+ export declare const list: (input?: never, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationCatalogList">;
@@ -6,12 +6,40 @@ import { IntegrationsCatalogGroup } from "./generated/integrations-catalog.js";
6
6
  var integrations_catalog_exports = /* @__PURE__ */ __exportAll({
7
7
  list: () => list,
8
8
  prepare: () => prepare,
9
+ recipeCatalog: () => recipeCatalog,
10
+ recipeConnectionHandoff: () => recipeConnectionHandoff,
11
+ recipePreview: () => recipePreview,
12
+ recipeReadiness: () => recipeReadiness,
13
+ recipeSetupActivate: () => recipeSetupActivate,
14
+ recipeSetupGet: () => recipeSetupGet,
15
+ recipeSetupReplace: () => recipeSetupReplace,
16
+ recipeSetupsList: () => recipeSetupsList,
17
+ recipeTest: () => recipeTest,
18
+ recipeTestHandoff: () => recipeTestHandoff,
19
+ recipeTestReceipt: () => recipeTestReceipt,
20
+ recipeWhatsAppChallengeBegin: () => recipeWhatsAppChallengeBegin,
21
+ recipeWhatsAppChallengeConfirm: () => recipeWhatsAppChallengeConfirm,
22
+ recipeWhatsAppChallengeGet: () => recipeWhatsAppChallengeGet,
9
23
  search: () => search
10
24
  });
11
25
  const make = /* @__PURE__ */ forGroup(IntegrationsCatalogGroup, integrationCatalogOperations);
26
+ const recipeConnectionHandoff = /* @__PURE__ */ make("integrationCatalogRecipeConnectionHandoff");
27
+ const recipeTestHandoff = /* @__PURE__ */ make("integrationCatalogRecipeTestHandoff");
28
+ const recipeSetupsList = /* @__PURE__ */ make("integrationCatalogRecipeSetupsList");
29
+ const recipeSetupGet = /* @__PURE__ */ make("integrationCatalogRecipeSetupGet");
30
+ const recipeSetupReplace = /* @__PURE__ */ make("integrationCatalogRecipeSetupReplace");
31
+ const recipeSetupActivate = /* @__PURE__ */ make("integrationCatalogRecipeSetupActivate");
32
+ const recipePreview = /* @__PURE__ */ make("integrationCatalogRecipePreview");
33
+ const recipeWhatsAppChallengeBegin = /* @__PURE__ */ make("integrationCatalogRecipeWhatsAppChallengeBegin");
34
+ const recipeWhatsAppChallengeGet = /* @__PURE__ */ make("integrationCatalogRecipeWhatsAppChallengeGet");
35
+ const recipeWhatsAppChallengeConfirm = /* @__PURE__ */ make("integrationCatalogRecipeWhatsAppChallengeConfirm");
36
+ const recipeTest = /* @__PURE__ */ make("integrationCatalogRecipeTest");
37
+ const recipeTestReceipt = /* @__PURE__ */ make("integrationCatalogRecipeTestReceipt");
38
+ const recipeCatalog = /* @__PURE__ */ make("integrationCatalogRecipeCatalog");
39
+ const recipeReadiness = /* @__PURE__ */ make("integrationCatalogRecipeReadiness");
12
40
  const prepare = /* @__PURE__ */ make("integrationCatalogPrepare");
13
41
  const search = /* @__PURE__ */ make("integrationCatalogSearch");
14
42
  const list = /* @__PURE__ */ make("integrationCatalogList");
15
- export { integrations_catalog_exports, list, prepare, search };
43
+ export { integrations_catalog_exports, list, prepare, recipeCatalog, recipeConnectionHandoff, recipePreview, recipeReadiness, recipeSetupActivate, recipeSetupGet, recipeSetupReplace, recipeSetupsList, recipeTest, recipeTestHandoff, recipeTestReceipt, recipeWhatsAppChallengeBegin, recipeWhatsAppChallengeConfirm, recipeWhatsAppChallengeGet, search };
16
44
 
17
45
  //# sourceMappingURL=integrations-catalog.js.map
@@ -1,7 +1,7 @@
1
1
  export declare const list: ((input?: {
2
2
  readonly limit?: number | null | undefined;
3
3
  readonly cursor?: string | undefined;
4
- } | undefined, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"integrationsList">) & {
4
+ } | undefined, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationsList">) & {
5
5
  readonly pages: (input?: {
6
6
  readonly limit?: number | null | undefined;
7
7
  readonly cursor?: string | undefined;
@@ -108,21 +108,21 @@ export declare const install: (input: {
108
108
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
109
109
  } | null | undefined;
110
110
  } | undefined;
111
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"integrationsInstall">;
111
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationsInstall">;
112
112
  export declare const listTools: (input: {
113
113
  readonly integrationId: string;
114
114
  readonly offset?: number | null | undefined;
115
115
  readonly revision?: string | undefined;
116
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"integrationsListTools">;
116
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationsListTools">;
117
117
  export declare const readTool: (input: {
118
118
  readonly integrationId: string;
119
119
  readonly tool: string;
120
120
  readonly offset?: number | null | undefined;
121
121
  readonly revision?: string | undefined;
122
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"integrationsReadTool">;
122
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationsReadTool">;
123
123
  export declare const get: (input: {
124
124
  readonly integrationId: string;
125
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"integrationsGet">;
125
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationsGet">;
126
126
  export declare const update: (input: {
127
127
  readonly integrationId: string;
128
128
  readonly answerWithoutApproval?: boolean | undefined;
@@ -159,7 +159,7 @@ export declare const update: (input: {
159
159
  readonly [x: string]: string | number | boolean | any | any | null | undefined;
160
160
  } | null | undefined;
161
161
  } | undefined;
162
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"integrationsUpdate">;
162
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationsUpdate">;
163
163
  export declare const remove: (input: {
164
164
  readonly integrationId: string;
165
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"integrationsRemove">;
165
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"integrationsRemove">;
@@ -29,17 +29,21 @@ type FlattenGroups<Client> = {
29
29
  export type FlatRaw = UnionToIntersection<FlattenGroups<Api>>;
30
30
  export type Operation = keyof FlatRaw & string;
31
31
  type ApiEndpoints = HttpApiGroup.Endpoints<(typeof SamvaApi)["groups"][keyof (typeof SamvaApi)["groups"]]>;
32
- export type OperationSuccess<Name extends Operation> = HttpApiClient.SuccessType<HttpApiEndpoint.Success<Extract<ApiEndpoints, {
32
+ type OperationSuccess<Name extends Operation> = HttpApiClient.SuccessType<HttpApiEndpoint.Success<Extract<ApiEndpoints, {
33
33
  readonly identifier: Name;
34
34
  }>>>;
35
- export type RawCall = (request?: unknown) => Effect.Effect<unknown, unknown>;
35
+ type MethodReturn<Method> = Method extends (...args: infer _Args) => infer Return ? Return : never;
36
+ /** What one operation wrapper returns: the endpoint's decoded success and typed failure. */
37
+ export type OperationResult<Name extends Operation> = Effect.Effect<OperationSuccess<Name>, Effect.Error<MethodReturn<FlatRaw[Name]>>, Service>;
38
+ /** The generated call for one endpoint, with its decoded success and typed failure. */
39
+ type OperationCall<Name extends Operation> = (request?: unknown) => OperationResult<Name>;
36
40
  export interface Interface {
37
41
  readonly idempotency?: ((operation: string) => string | undefined) | undefined;
38
42
  /**
39
43
  * The generated call for one endpoint. A group's client is built on the first call to any of its
40
44
  * endpoints and reused, so a group the program never calls costs nothing.
41
45
  */
42
- readonly endpoint: (group: HttpApiGroup.Constraint, name: Operation) => Effect.Effect<RawCall>;
46
+ readonly endpoint: <Name extends Operation>(group: HttpApiGroup.Constraint, name: Name) => Effect.Effect<OperationCall<Name>>;
43
47
  /** The origin and headers a connection outside HTTP requests, such as the event stream, uses. */
44
48
  readonly connection: MailboxEventStreamConnection;
45
49
  /**
@@ -1,9 +1,9 @@
1
1
  import { type Brand, Effect, Redacted, Stream } from "effect";
2
2
  import type { HttpApiGroup } from "effect/http-api";
3
3
  import type { SDK_OPERATION_CALLS } from "../../service-map.js";
4
- import { type FlatRaw, type Operation, type OperationSuccess, Service } from "./client.js";
4
+ import { type FlatRaw, type Operation, type OperationResult } from "./client.js";
5
+ export type { OperationResult };
5
6
  export type SdkOperation = keyof typeof SDK_OPERATION_CALLS & Operation;
6
- type MethodReturn<Method> = Method extends (...args: infer _Args) => infer Return ? Return : never;
7
7
  type Wire<Value> = Value extends string ? Value extends Brand.Brand<string> ? string : Value : Value extends Redacted.Redacted<infer Raw> ? Raw | Value : Value extends number | boolean | bigint | symbol | null | undefined ? Value : Value extends Date ? Value : Value extends ReadonlyArray<infer Item> ? ReadonlyArray<Wire<Item>> : Value extends object ? {
8
8
  readonly [Key in keyof Value]: Wire<Value[Key]> | ({} extends Pick<Value, Key> ? undefined : never);
9
9
  } : Value;
@@ -16,6 +16,12 @@ type FlattenRequest<Request> = (Request extends {
16
16
  } ? Payload : unknown);
17
17
  export type RequestArg<Method> = Method extends (request: infer Request, ...rest: ReadonlyArray<unknown>) => unknown ? Request : never;
18
18
  type Input<Name extends SdkOperation> = Wire<FlattenRequest<NonNullable<RequestArg<FlatRaw[Name]>>>>;
19
+ /**
20
+ * The per-call options every exported operation wrapper accepts.
21
+ *
22
+ * @public — the exported operation wrappers in `src/effect/*.ts` carry it in their signatures, so
23
+ * declaration emit names it for the published `samva/effect/*` entrypoints.
24
+ */
19
25
  export interface OperationOptions {
20
26
  readonly idempotencyKey?: string | undefined;
21
27
  }
@@ -23,7 +29,7 @@ export interface OperationOptions {
23
29
  * What one operation wrapper reads at runtime. `codegen/generate-registry.ts` emits a table of these
24
30
  * beside each domain, so a focused entry carries its own operations' descriptors and not the API's.
25
31
  */
26
- export interface OperationDescriptor {
32
+ interface OperationDescriptor {
27
33
  readonly group: string;
28
34
  readonly method: string;
29
35
  readonly idempotent: boolean;
@@ -38,7 +44,6 @@ export interface OperationDescriptor {
38
44
  };
39
45
  }
40
46
  export type OperationDescriptors = Readonly<Record<string, OperationDescriptor>>;
41
- export type OperationResult<Name extends SdkOperation> = Effect.Effect<OperationSuccess<Name>, Effect.Error<MethodReturn<FlatRaw[Name]>>, Service>;
42
47
  type OperationFunction<Name extends SdkOperation> = (typeof SDK_OPERATION_CALLS)[Name] extends {
43
48
  readonly kind: "none";
44
49
  } ? (input?: never, options?: OperationOptions) => OperationResult<Name> : {} extends Input<Name> ? (input?: Input<Name>, options?: OperationOptions) => OperationResult<Name> : (input: Input<Name>, options?: OperationOptions) => OperationResult<Name>;
@@ -66,5 +71,4 @@ export declare const stripUndefined: <Value>(input: Value) => Value;
66
71
  */
67
72
  export declare const forGroup: (group: HttpApiGroup.Constraint, descriptors: OperationDescriptors) => <Name extends SdkOperation>(operationName: Name) => WithPagination<OperationFunction<Name>>;
68
73
  /** Call one endpoint with an already-shaped request, outside the direct-operation adapter. */
69
- export declare const callEndpoint: (group: HttpApiGroup.Constraint, name: SdkOperation, request: unknown) => Effect.Effect<unknown, unknown, Service>;
70
- export {};
74
+ export declare const callEndpoint: <Name extends SdkOperation>(group: HttpApiGroup.Constraint, name: Name, request: unknown) => OperationResult<Name>;
@@ -5,11 +5,11 @@ import { Service } from "./client.js";
5
5
  import { Effect, Predicate } from "effect";
6
6
  // src/effect/internal/operation.ts
7
7
  const traceName = (descriptor, operationName) => {
8
- const moduleName = descriptor.group.split(" ").map((word) => word[0].toUpperCase() + word.slice(1).toLowerCase()).join("");
9
- const prefix = moduleName[0].toLowerCase() + moduleName.slice(1);
8
+ const moduleName = descriptor.group.split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join("");
9
+ const prefix = moduleName.charAt(0).toLowerCase() + moduleName.slice(1);
10
10
  if (!operationName.startsWith(prefix)) return `Samva.${operationName}`;
11
11
  const method = operationName.slice(prefix.length);
12
- return `${moduleName}.${method[0].toLowerCase()}${method.slice(1)}`;
12
+ return `${moduleName}.${method.charAt(0).toLowerCase()}${method.slice(1)}`;
13
13
  };
14
14
  const stripUndefined = (input) => {
15
15
  if (!Predicate.isObject(input)) return input;
@@ -2,7 +2,7 @@ export declare const list: ((input?: {
2
2
  readonly status?: "active" | "archived" | "draft" | "paused" | undefined;
3
3
  readonly limit?: number | null | undefined;
4
4
  readonly cursor?: string | undefined;
5
- } | undefined, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysList">) & {
5
+ } | undefined, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysList">) & {
6
6
  readonly pages: (input?: {
7
7
  readonly status?: "active" | "archived" | "draft" | "paused" | undefined;
8
8
  readonly limit?: number | null | undefined;
@@ -265,17 +265,17 @@ export declare const create: (input: {
265
265
  readonly shop: string;
266
266
  } | undefined;
267
267
  };
268
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysCreate">;
268
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysCreate">;
269
269
  export declare const get: (input: {
270
270
  readonly id: string;
271
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysGet">;
271
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysGet">;
272
272
  export declare const update: (input: {
273
273
  readonly id: string;
274
274
  readonly name: string;
275
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysUpdate">;
275
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysUpdate">;
276
276
  export declare const remove: (input: {
277
277
  readonly id: string;
278
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysRemove">;
278
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysRemove">;
279
279
  export declare const replaceDraft: (input: {
280
280
  readonly id: string;
281
281
  readonly revision: string;
@@ -509,35 +509,35 @@ export declare const replaceDraft: (input: {
509
509
  readonly shop: string;
510
510
  } | undefined;
511
511
  };
512
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysReplaceDraft">;
512
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysReplaceDraft">;
513
513
  export declare const publish: (input: {
514
514
  readonly id: string;
515
515
  readonly revision: string;
516
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysPublish">;
516
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysPublish">;
517
517
  export declare const pause: (input: {
518
518
  readonly id: string;
519
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysPause">;
519
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysPause">;
520
520
  export declare const resume: (input: {
521
521
  readonly id: string;
522
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysResume">;
522
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysResume">;
523
523
  export declare const archive: (input: {
524
524
  readonly id: string;
525
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysArchive">;
525
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysArchive">;
526
526
  export declare const getVersion: (input: {
527
527
  readonly id: string;
528
528
  readonly version: string;
529
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysGetVersion">;
529
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysGetVersion">;
530
530
  export declare const stats: (input: {
531
531
  readonly id: string;
532
532
  readonly version?: number | null | undefined;
533
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysStats">;
533
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysStats">;
534
534
  export declare const listRuns: ((input: {
535
535
  readonly id: string;
536
536
  readonly status?: "active" | "exited" | "failed" | "paused" | undefined;
537
537
  readonly contactId?: string | undefined;
538
538
  readonly limit?: number | null | undefined;
539
539
  readonly cursor?: string | undefined;
540
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysListRuns">) & {
540
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysListRuns">) & {
541
541
  readonly pages: (input: {
542
542
  readonly id: string;
543
543
  readonly status?: "active" | "exited" | "failed" | "paused" | undefined;
@@ -599,4 +599,4 @@ export declare const listRuns: ((input: {
599
599
  export declare const getRun: (input: {
600
600
  readonly id: string;
601
601
  readonly runId: string;
602
- }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/operation.js").OperationResult<"journeysGetRun">;
602
+ }, options?: import("./internal/operation.js").OperationOptions) => import("./internal/client.js").OperationResult<"journeysGetRun">;