samva 0.6.0 → 0.7.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 (50) hide show
  1. package/README.md +2 -2
  2. package/dist/{categories-4u9Az4No.js → categories-DvsHUJtX.js} +9 -1
  3. package/dist/client/sdk.gen.d.ts +91 -18
  4. package/dist/client/types.gen.d.ts +510 -94
  5. package/dist/{client-DCM6U0-I.js → client-5O8KsY5Z.js} +490 -165
  6. package/dist/{client-attribution-DYUSAa76.js → client-attribution-27MNycCV.js} +2 -2
  7. package/dist/effect/analytics.js +1 -1
  8. package/dist/effect/api-keys.js +1 -1
  9. package/dist/effect/attachments.js +1 -1
  10. package/dist/effect/brands.d.ts +212 -0
  11. package/dist/effect/brands.js +24 -0
  12. package/dist/effect/campaigns.d.ts +1 -1
  13. package/dist/effect/campaigns.js +1 -1
  14. package/dist/effect/categories.js +1 -1
  15. package/dist/effect/client.js +1 -1
  16. package/dist/effect/contact-groups.js +1 -1
  17. package/dist/effect/contacts.js +1 -1
  18. package/dist/effect/conversations.d.ts +12 -3
  19. package/dist/effect/conversations.js +1 -1
  20. package/dist/effect/custom-fields.js +1 -1
  21. package/dist/effect/email.d.ts +17 -6
  22. package/dist/effect/email.js +2 -2
  23. package/dist/effect/generated-metadata.d.ts +8 -0
  24. package/dist/effect/generated.d.ts +2742 -1810
  25. package/dist/effect/index.d.ts +2 -2
  26. package/dist/effect/index.js +4 -4
  27. package/dist/effect/internal/operation.d.ts +10 -4
  28. package/dist/effect/media.js +1 -1
  29. package/dist/effect/messages.d.ts +22 -6
  30. package/dist/effect/messages.js +1 -1
  31. package/dist/effect/operations.js +1 -1
  32. package/dist/effect/organizations.d.ts +0 -264
  33. package/dist/effect/organizations.js +1 -1
  34. package/dist/effect/retry.js +1 -1
  35. package/dist/effect/scheduled-messages.js +1 -1
  36. package/dist/effect/templates.d.ts +230 -0
  37. package/dist/effect/templates.js +7 -3
  38. package/dist/effect/unsubscribe-groups.js +1 -1
  39. package/dist/effect/webhooks.js +2 -2
  40. package/dist/index.js +2 -2
  41. package/dist/{operation-02YX3hY9.js → operation-Cb5V9FJ7.js} +29 -5
  42. package/dist/promises/errors.gen.d.ts +22 -4
  43. package/dist/promises/index.d.ts +3 -3
  44. package/dist/promises/index.js +2 -2
  45. package/dist/promises/types.gen.d.ts +1 -1
  46. package/dist/{promises-8MaPNAam.js → promises-C2yyw-pf.js} +329 -36
  47. package/dist/service-map.d.ts +36 -6
  48. package/package.json +7 -7
  49. package/dist/effect/design.d.ts +0 -209
  50. package/dist/effect/design.js +0 -13
@@ -6,6 +6,7 @@ export declare const list: ((input?: {
6
6
  readonly channel?: string | null | undefined;
7
7
  readonly status?: string | null | undefined;
8
8
  readonly search?: string | null | undefined;
9
+ readonly projectId?: string | null | undefined;
9
10
  readonly sortBy?: string | null | undefined;
10
11
  readonly sortOrder?: string | null | undefined;
11
12
  } | undefined) => import("effect/Effect").Effect<{
@@ -37,6 +38,11 @@ export declare const list: ((input?: {
37
38
  } | null;
38
39
  } | null;
39
40
  readonly publicationId: (string & import("effect/Brand").Brand<"TemplatePublicationId">) | null;
41
+ readonly brand: {
42
+ readonly slug: string;
43
+ readonly digest: string;
44
+ readonly stale: boolean;
45
+ } | null;
40
46
  readonly inputContractId: (string & import("effect/Brand").Brand<"TemplateInputContractId">) | null;
41
47
  readonly inputSchema: {
42
48
  readonly [x: string]: import("./generated").JsonValue;
@@ -65,6 +71,7 @@ export declare const list: ((input?: {
65
71
  readonly channel?: string | null | undefined;
66
72
  readonly status?: string | null | undefined;
67
73
  readonly search?: string | null | undefined;
74
+ readonly projectId?: string | null | undefined;
68
75
  readonly sortBy?: string | null | undefined;
69
76
  readonly sortOrder?: string | null | undefined;
70
77
  } | undefined) => import("effect/Stream").Stream<{
@@ -96,6 +103,11 @@ export declare const list: ((input?: {
96
103
  } | null;
97
104
  } | null;
98
105
  readonly publicationId: (string & import("effect/Brand").Brand<"TemplatePublicationId">) | null;
106
+ readonly brand: {
107
+ readonly slug: string;
108
+ readonly digest: string;
109
+ readonly stale: boolean;
110
+ } | null;
99
111
  readonly inputContractId: (string & import("effect/Brand").Brand<"TemplateInputContractId">) | null;
100
112
  readonly inputSchema: {
101
113
  readonly [x: string]: import("./generated").JsonValue;
@@ -124,6 +136,7 @@ export declare const list: ((input?: {
124
136
  readonly channel?: string | null | undefined;
125
137
  readonly status?: string | null | undefined;
126
138
  readonly search?: string | null | undefined;
139
+ readonly projectId?: string | null | undefined;
127
140
  readonly sortBy?: string | null | undefined;
128
141
  readonly sortOrder?: string | null | undefined;
129
142
  } | undefined) => import("effect/Stream").Stream<{
@@ -154,6 +167,11 @@ export declare const list: ((input?: {
154
167
  } | null;
155
168
  } | null;
156
169
  readonly publicationId: (string & import("effect/Brand").Brand<"TemplatePublicationId">) | null;
170
+ readonly brand: {
171
+ readonly slug: string;
172
+ readonly digest: string;
173
+ readonly stale: boolean;
174
+ } | null;
157
175
  readonly inputContractId: (string & import("effect/Brand").Brand<"TemplateInputContractId">) | null;
158
176
  readonly inputSchema: {
159
177
  readonly [x: string]: import("./generated").JsonValue;
@@ -174,6 +192,7 @@ export declare const create: (input: {
174
192
  readonly projectName?: string | null | undefined;
175
193
  readonly slug?: string | null | undefined;
176
194
  readonly galleryTemplateId?: string | null | undefined;
195
+ readonly useBrand?: boolean | null | undefined;
177
196
  readonly description?: string | null | undefined;
178
197
  readonly category?: string | null | undefined;
179
198
  readonly isActive?: boolean | null | undefined;
@@ -206,6 +225,11 @@ export declare const create: (input: {
206
225
  } | null;
207
226
  } | null;
208
227
  readonly publicationId: (string & import("effect/Brand").Brand<"TemplatePublicationId">) | null;
228
+ readonly brand: {
229
+ readonly slug: string;
230
+ readonly digest: string;
231
+ readonly stale: boolean;
232
+ } | null;
209
233
  readonly inputContractId: (string & import("effect/Brand").Brand<"TemplateInputContractId">) | null;
210
234
  readonly inputSchema: {
211
235
  readonly [x: string]: import("./generated").JsonValue;
@@ -220,6 +244,60 @@ export declare const create: (input: {
220
244
  readonly createdAt: string;
221
245
  readonly updatedAt: string;
222
246
  }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
247
+ export declare const addEntry: (input: {
248
+ readonly projectId: string;
249
+ readonly entryPath: string;
250
+ readonly name: string;
251
+ readonly slug: string;
252
+ readonly description?: string | null | undefined;
253
+ readonly category?: string | null | undefined;
254
+ }) => import("effect/Effect").Effect<{
255
+ readonly id: string & import("effect/Brand").Brand<"TemplateId">;
256
+ readonly organizationId: string & import("effect/Brand").Brand<"OrganizationId">;
257
+ readonly projectId: string & import("effect/Brand").Brand<"TemplateProjectId">;
258
+ readonly entryPath: string;
259
+ readonly name: string;
260
+ readonly slug: string;
261
+ readonly familyId: (string & import("effect/Brand").Brand<"TemplateFamilyId">) | null;
262
+ readonly channel: "email";
263
+ readonly description: string | null;
264
+ readonly category: string | null;
265
+ readonly fromDefault?: {
266
+ readonly email: string;
267
+ readonly name?: string | null;
268
+ } | null;
269
+ readonly replyToDefault?: readonly string[] | null;
270
+ readonly trackingDefault?: {
271
+ readonly opens?: boolean | null;
272
+ readonly clicks?: boolean | null;
273
+ } | null;
274
+ readonly email: {
275
+ readonly subject: string;
276
+ readonly preheader: string | null;
277
+ readonly headers: {
278
+ readonly [x: string]: string;
279
+ } | null;
280
+ } | null;
281
+ readonly publicationId: (string & import("effect/Brand").Brand<"TemplatePublicationId">) | null;
282
+ readonly brand: {
283
+ readonly slug: string;
284
+ readonly digest: string;
285
+ readonly stale: boolean;
286
+ } | null;
287
+ readonly inputContractId: (string & import("effect/Brand").Brand<"TemplateInputContractId">) | null;
288
+ readonly inputSchema: {
289
+ readonly [x: string]: import("./generated").JsonValue;
290
+ } | null;
291
+ readonly usageCount: number;
292
+ readonly lastUsedAt: string | null;
293
+ readonly status: string;
294
+ readonly isActive: boolean;
295
+ readonly isDefault: boolean;
296
+ readonly publishedAt?: string | null;
297
+ readonly publishedBy?: string | null;
298
+ readonly createdAt: string;
299
+ readonly updatedAt: string;
300
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
223
301
  export declare const listFamilies: ((input?: {
224
302
  readonly page?: string | null | undefined;
225
303
  readonly limit?: string | null | undefined;
@@ -450,6 +528,11 @@ export declare const getById: (input: {
450
528
  } | null;
451
529
  } | null;
452
530
  readonly publicationId: (string & import("effect/Brand").Brand<"TemplatePublicationId">) | null;
531
+ readonly brand: {
532
+ readonly slug: string;
533
+ readonly digest: string;
534
+ readonly stale: boolean;
535
+ } | null;
453
536
  readonly inputContractId: (string & import("effect/Brand").Brand<"TemplateInputContractId">) | null;
454
537
  readonly inputSchema: {
455
538
  readonly [x: string]: import("./generated").JsonValue;
@@ -474,6 +557,7 @@ export declare const update: (input: {
474
557
  readonly data: {
475
558
  readonly name?: string | null | undefined;
476
559
  readonly slug?: string | null | undefined;
560
+ readonly entryPath?: string | null | undefined;
477
561
  readonly description?: string | null | undefined;
478
562
  readonly category?: string | null | undefined;
479
563
  readonly fromDefault?: {
@@ -511,6 +595,11 @@ export declare const update: (input: {
511
595
  } | null;
512
596
  } | null;
513
597
  readonly publicationId: (string & import("effect/Brand").Brand<"TemplatePublicationId">) | null;
598
+ readonly brand: {
599
+ readonly slug: string;
600
+ readonly digest: string;
601
+ readonly stale: boolean;
602
+ } | null;
514
603
  readonly inputContractId: (string & import("effect/Brand").Brand<"TemplateInputContractId">) | null;
515
604
  readonly inputSchema: {
516
605
  readonly [x: string]: import("./generated").JsonValue;
@@ -712,6 +801,94 @@ export declare const patchWorkspace: (input: {
712
801
  readonly [x: string]: string;
713
802
  };
714
803
  }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError, import("./client").Service>;
804
+ export declare const putWorkspaceAsset: (input: {
805
+ readonly id: string;
806
+ readonly expectedRevision: string;
807
+ readonly path: string;
808
+ readonly contentBase64: string;
809
+ readonly replace: boolean;
810
+ readonly idempotencyKey: string;
811
+ }) => import("effect/Effect").Effect<{
812
+ readonly workspace: {
813
+ readonly projectId: string & import("effect/Brand").Brand<"TemplateProjectId">;
814
+ readonly organizationId: (string & import("effect/Brand").Brand<"OrganizationId">) | null;
815
+ readonly ownerEpoch: number;
816
+ readonly repositoryName: string;
817
+ readonly defaultBranch: string;
818
+ readonly baseCommit: string;
819
+ readonly remoteHead: string;
820
+ readonly pendingRemoteHead: string | null;
821
+ readonly revision: string;
822
+ readonly overlay: {
823
+ readonly [x: string]: string | null;
824
+ };
825
+ readonly assetChanges: readonly {
826
+ readonly path: string;
827
+ readonly status: "added" | "deleted" | "modified";
828
+ }[];
829
+ readonly conflicts: readonly {
830
+ readonly path: string;
831
+ readonly base: string | null;
832
+ readonly draft: string | null;
833
+ readonly main: string | null;
834
+ }[];
835
+ readonly provenance: {
836
+ readonly references: readonly {
837
+ readonly kind: string;
838
+ readonly digest: string;
839
+ readonly locator?: string;
840
+ }[];
841
+ };
842
+ readonly mounts: readonly ({
843
+ readonly kind: "project";
844
+ readonly root: "/project";
845
+ readonly access: "read-write";
846
+ } | {
847
+ readonly root: string;
848
+ readonly digest: string;
849
+ readonly fileCount: number;
850
+ readonly byteSize: number;
851
+ readonly kind: "started-from";
852
+ readonly access: "read-only";
853
+ readonly templateId: string;
854
+ readonly slug: string;
855
+ readonly name: string;
856
+ } | {
857
+ readonly root: string;
858
+ readonly digest: string;
859
+ readonly fileCount: number;
860
+ readonly byteSize: number;
861
+ readonly kind: "resource";
862
+ readonly access: "read-only";
863
+ readonly resourceId: string;
864
+ readonly name: string;
865
+ } | {
866
+ readonly root: string;
867
+ readonly digest: string;
868
+ readonly fileCount: number;
869
+ readonly byteSize: number;
870
+ readonly kind: "library-template";
871
+ readonly access: "read-only";
872
+ readonly templateId: string;
873
+ readonly slug: string;
874
+ readonly name: string;
875
+ })[];
876
+ readonly libraryManifestDigest: string;
877
+ readonly createdAt: string;
878
+ readonly updatedAt: string;
879
+ readonly createdBy: {
880
+ readonly userId: string & import("effect/Brand").Brand<"UserId">;
881
+ readonly via: "agent" | "api" | "mcp";
882
+ };
883
+ readonly updatedBy: {
884
+ readonly userId: string & import("effect/Brand").Brand<"UserId">;
885
+ readonly via: "agent" | "api" | "mcp";
886
+ };
887
+ };
888
+ readonly files: {
889
+ readonly [x: string]: string;
890
+ };
891
+ }, import("./generated").ConflictError | import("./generated").ForbiddenError | import("./generated").GatewayTimeoutError | import("effect/unstable/http/HttpClientError").HttpClientError | import("./generated").InternalError | import("./generated").ResourceNotFoundError | import("effect/Schema").SchemaError | import("./generated").UnauthorizedError | import("./generated").ValidationError, import("./client").Service>;
715
892
  export declare const resolveWorkspaceConflict: (input: {
716
893
  readonly id: string;
717
894
  readonly expectedRevision: string;
@@ -1380,6 +1557,7 @@ export declare const publish: (input: {
1380
1557
  readonly commitSha: string;
1381
1558
  readonly entryPath: string;
1382
1559
  readonly expectedWorkspaceRevision: string;
1560
+ readonly ifCurrentPublicationId?: string | null | undefined;
1383
1561
  }) => import("effect/Effect").Effect<{
1384
1562
  readonly id: string & import("effect/Brand").Brand<"TemplatePublicationId">;
1385
1563
  readonly organizationId: string & import("effect/Brand").Brand<"OrganizationId">;
@@ -1429,6 +1607,32 @@ export declare const publish: (input: {
1429
1607
  readonly entryPath: string;
1430
1608
  readonly treeDigest: string;
1431
1609
  };
1610
+ readonly brand?: {
1611
+ readonly slug: string;
1612
+ readonly css: string;
1613
+ readonly assets: {
1614
+ readonly logoUrl?: string | null;
1615
+ readonly logoDarkUrl?: string | null;
1616
+ readonly iconUrl?: string | null;
1617
+ };
1618
+ readonly footer: {
1619
+ readonly companyName?: string | null;
1620
+ readonly address?: {
1621
+ readonly street1: string;
1622
+ readonly street2?: string | null;
1623
+ readonly city: string;
1624
+ readonly region: string;
1625
+ readonly postalCode: string;
1626
+ readonly country: string;
1627
+ } | null;
1628
+ readonly socialLinks?: readonly {
1629
+ readonly label: string;
1630
+ readonly url: string;
1631
+ }[] | null;
1632
+ };
1633
+ readonly digest: string;
1634
+ readonly rendersFooter: "every" | "none" | "some";
1635
+ };
1432
1636
  };
1433
1637
  readonly executable: {
1434
1638
  readonly key: string;
@@ -1545,6 +1749,32 @@ export declare const getPublication: (input: {
1545
1749
  readonly entryPath: string;
1546
1750
  readonly treeDigest: string;
1547
1751
  };
1752
+ readonly brand?: {
1753
+ readonly slug: string;
1754
+ readonly css: string;
1755
+ readonly assets: {
1756
+ readonly logoUrl?: string | null;
1757
+ readonly logoDarkUrl?: string | null;
1758
+ readonly iconUrl?: string | null;
1759
+ };
1760
+ readonly footer: {
1761
+ readonly companyName?: string | null;
1762
+ readonly address?: {
1763
+ readonly street1: string;
1764
+ readonly street2?: string | null;
1765
+ readonly city: string;
1766
+ readonly region: string;
1767
+ readonly postalCode: string;
1768
+ readonly country: string;
1769
+ } | null;
1770
+ readonly socialLinks?: readonly {
1771
+ readonly label: string;
1772
+ readonly url: string;
1773
+ }[] | null;
1774
+ };
1775
+ readonly digest: string;
1776
+ readonly rendersFooter: "every" | "none" | "some";
1777
+ };
1548
1778
  };
1549
1779
  readonly executable: {
1550
1780
  readonly key: string;
@@ -1,10 +1,11 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-02YX3hY9.js";
3
- import { C as UpdateTemplatePayload, s as CreateTemplatePayload } from "../client-DCM6U0-I.js";
2
+ import { n as make } from "../operation-Cb5V9FJ7.js";
3
+ import { d as CreateTemplatePayload, k as UpdateTemplatePayload } from "../client-5O8KsY5Z.js";
4
4
  //#region src/effect/templates.ts
5
5
  var templates_exports = /* @__PURE__ */ __exportAll({
6
6
  CreatePayload: () => CreateTemplatePayload,
7
7
  UpdatePayload: () => UpdateTemplatePayload,
8
+ addEntry: () => addEntry,
8
9
  attachFamilyMember: () => attachFamilyMember,
9
10
  attachWorkspaceResource: () => attachWorkspaceResource,
10
11
  checkWorkspace: () => checkWorkspace,
@@ -26,6 +27,7 @@ var templates_exports = /* @__PURE__ */ __exportAll({
26
27
  openWorkspace: () => openWorkspace,
27
28
  patchWorkspace: () => patchWorkspace,
28
29
  publish: () => publish,
30
+ putWorkspaceAsset: () => putWorkspaceAsset,
29
31
  reconcileWorkspace: () => reconcileWorkspace,
30
32
  remove: () => remove,
31
33
  removeWorkspaceResource: () => removeWorkspaceResource,
@@ -39,6 +41,7 @@ var templates_exports = /* @__PURE__ */ __exportAll({
39
41
  });
40
42
  const list = make("templatesList");
41
43
  const create = make("templatesCreate");
44
+ const addEntry = make("templatesAddEntry");
42
45
  const listFamilies = make("templatesListFamilies");
43
46
  const createFamily = make("templatesCreateFamily");
44
47
  const getFamily = make("templatesGetFamily");
@@ -54,6 +57,7 @@ const openWorkspace = make("templatesOpenWorkspace");
54
57
  const getGitRepository = make("templatesGetGitRepository");
55
58
  const issueGitCredential = make("templatesIssueGitCredential");
56
59
  const patchWorkspace = make("templatesPatchWorkspace");
60
+ const putWorkspaceAsset = make("templatesPutWorkspaceAsset");
57
61
  const resolveWorkspaceConflict = make("templatesResolveWorkspaceConflict");
58
62
  const attachWorkspaceResource = make("templatesAttachWorkspaceResource");
59
63
  const removeWorkspaceResource = make("templatesRemoveWorkspaceResource");
@@ -69,6 +73,6 @@ const getInputContract = make("templatesGetInputContract");
69
73
  const diffWorkspace = make("templatesDiffWorkspace");
70
74
  const workspaceHistory = make("templatesWorkspaceHistory");
71
75
  //#endregion
72
- export { CreateTemplatePayload as CreatePayload, UpdateTemplatePayload as UpdatePayload, attachFamilyMember, attachWorkspaceResource, checkWorkspace, create, createFamily, createFamilyFromTemplate, deleteFamily, detachFamilyMember, diffWorkspace, getById, getFamily, getGitRepository, getInputContract, getPublication, issueGitCredential, list, listFamilies, listInputContracts, openWorkspace, patchWorkspace, publish, reconcileWorkspace, remove, removeWorkspaceResource, renameFamily, renderWorkspaceFixture, resolveWorkspaceConflict, restoreWorkspace, saveWorkspace, templates_exports as t, update, workspaceHistory };
76
+ export { CreateTemplatePayload as CreatePayload, UpdateTemplatePayload as UpdatePayload, addEntry, attachFamilyMember, attachWorkspaceResource, checkWorkspace, create, createFamily, createFamilyFromTemplate, deleteFamily, detachFamilyMember, diffWorkspace, getById, getFamily, getGitRepository, getInputContract, getPublication, issueGitCredential, list, listFamilies, listInputContracts, openWorkspace, patchWorkspace, publish, putWorkspaceAsset, reconcileWorkspace, remove, removeWorkspaceResource, renameFamily, renderWorkspaceFixture, resolveWorkspaceConflict, restoreWorkspace, saveWorkspace, templates_exports as t, update, workspaceHistory };
73
77
 
74
78
  //# sourceMappingURL=templates.js.map
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-02YX3hY9.js";
2
+ import { n as make } from "../operation-Cb5V9FJ7.js";
3
3
  //#region src/effect/unsubscribe-groups.ts
4
4
  var unsubscribe_groups_exports = /* @__PURE__ */ __exportAll({
5
5
  addEmails: () => addEmails,
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.js";
2
- import { n as make } from "../operation-02YX3hY9.js";
3
- import { b as TestWebhookPayload, c as CreateWebhookPayload, w as UpdateWebhookPayload } from "../client-DCM6U0-I.js";
2
+ import { n as make } from "../operation-Cb5V9FJ7.js";
3
+ import { A as UpdateWebhookPayload, T as TestWebhookPayload, f as CreateWebhookPayload } from "../client-5O8KsY5Z.js";
4
4
  //#region src/effect/webhooks.ts
5
5
  var webhooks_exports = /* @__PURE__ */ __exportAll({
6
6
  CreatePayload: () => CreateWebhookPayload,
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as SamvaTransportError, a as DeliveryUnavailableError, b as fromApiError, c as FlagDisabledError, d as InternalError, f as OnboardingReviewRequiredError, g as SamvaApiError, h as ResourceNotFoundError, i as ConflictError, l as ForbiddenError, m as RateLimitedError, n as AnalyticsQueryError, o as EmailChannelError, p as PaymentRequiredError, r as BillingProviderError, s as ExternalServiceError, t as createClient, u as GatewayTimeoutError, v as UnauthorizedError, y as ValidationError } from "./promises-8MaPNAam.js";
2
- export { AnalyticsQueryError, BillingProviderError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, UnauthorizedError, ValidationError, createClient, fromApiError };
1
+ import { S as fromApiError, _ as ResourceNotFoundError, a as CampaignFooterRequiredError, b as UnauthorizedError, c as EmailChannelError, d as ForbiddenError, f as GatewayTimeoutError, g as RateLimitedError, h as PaymentRequiredError, i as BrandAddressRequiredError, l as ExternalServiceError, m as OnboardingReviewRequiredError, n as AnalyticsQueryError, o as ConflictError, p as InternalError, r as BillingProviderError, s as DeliveryUnavailableError, t as createClient, u as FlagDisabledError, v as SamvaApiError, x as ValidationError, y as SamvaTransportError } from "./promises-C2yyw-pf.js";
2
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, UnauthorizedError, ValidationError, createClient, fromApiError };
@@ -1,12 +1,28 @@
1
1
  import { n as buildMessagesSendPayload, r as replyToEmailsPayload, t as buildEmailSendPayload } from "./normalize-B79uJIeb.js";
2
- import { t as Service, y as SamvaApi } from "./client-DCM6U0-I.js";
2
+ import { t as Service, w as SamvaApi } from "./client-5O8KsY5Z.js";
3
3
  import { generateIdempotencyKey, withRetry } from "./effect/retry.js";
4
4
  import { Effect, Option, Predicate, Stream } from "effect";
5
5
  //#region src/service-map.ts
6
6
  /** How each generated Effect operation is adapted to the Promise facade's direct input shape. */
7
7
  const SDK_OPERATION_CALLS = {
8
- designGet: { kind: "none" },
9
- designUpdate: { kind: "payload" },
8
+ brandsList: { kind: "none" },
9
+ brandsCreate: { kind: "payload" },
10
+ brandsGet: {
11
+ kind: "path",
12
+ paths: ["slug"]
13
+ },
14
+ brandsUpdate: {
15
+ kind: "pathPayload",
16
+ paths: ["slug"]
17
+ },
18
+ brandsRemove: {
19
+ kind: "path",
20
+ paths: ["slug"]
21
+ },
22
+ brandsSetDefault: {
23
+ kind: "path",
24
+ paths: ["slug"]
25
+ },
10
26
  operationsList: { kind: "params" },
11
27
  operationsGet: {
12
28
  kind: "path",
@@ -338,6 +354,10 @@ const SDK_OPERATION_CALLS = {
338
354
  },
339
355
  templatesList: { kind: "params" },
340
356
  templatesCreate: { kind: "payload" },
357
+ templatesAddEntry: {
358
+ kind: "pathPayload",
359
+ paths: ["projectId"]
360
+ },
341
361
  templatesListFamilies: { kind: "params" },
342
362
  templatesCreateFamily: { kind: "payload" },
343
363
  templatesGetFamily: {
@@ -392,6 +412,10 @@ const SDK_OPERATION_CALLS = {
392
412
  kind: "pathPayload",
393
413
  paths: ["id"]
394
414
  },
415
+ templatesPutWorkspaceAsset: {
416
+ kind: "pathPayload",
417
+ paths: ["id"]
418
+ },
395
419
  templatesResolveWorkspaceConflict: {
396
420
  kind: "pathPayload",
397
421
  paths: ["id"]
@@ -670,12 +694,12 @@ const MODULE_NAMES = {
670
694
  analytics: "Analytics",
671
695
  apiKeys: "ApiKeys",
672
696
  attachments: "Attachments",
697
+ brands: "Brands",
673
698
  campaigns: "Campaigns",
674
699
  contactGroups: "ContactGroups",
675
700
  contacts: "Contacts",
676
701
  conversations: "Conversations",
677
702
  customFields: "CustomFields",
678
- design: "Design",
679
703
  email: "Email",
680
704
  media: "Media",
681
705
  messages: "Messages",
@@ -774,4 +798,4 @@ const addEmailSender = Effect.fn("Email.addSender")(function* (input, options) {
774
798
  //#endregion
775
799
  export { sendMessage as i, make as n, sendEmail as r, addEmailSender as t };
776
800
 
777
- //# sourceMappingURL=operation-02YX3hY9.js.map
801
+ //# sourceMappingURL=operation-Cb5V9FJ7.js.map
@@ -1,4 +1,4 @@
1
- export type SamvaApiErrorTag = "AnalyticsQueryError" | "BillingProviderError" | "ConflictError" | "DeliveryUnavailableError" | "EmailChannelError" | "ExternalServiceError" | "FlagDisabledError" | "ForbiddenError" | "GatewayTimeoutError" | "InternalError" | "OnboardingReviewRequiredError" | "PaymentRequiredError" | "RateLimitedError" | "ResourceNotFoundError" | "UnauthorizedError" | "ValidationError";
1
+ export type SamvaApiErrorTag = "AnalyticsQueryError" | "BillingProviderError" | "BrandAddressRequiredError" | "CampaignFooterRequiredError" | "ConflictError" | "DeliveryUnavailableError" | "EmailChannelError" | "ExternalServiceError" | "FlagDisabledError" | "ForbiddenError" | "GatewayTimeoutError" | "InternalError" | "OnboardingReviewRequiredError" | "PaymentRequiredError" | "RateLimitedError" | "ResourceNotFoundError" | "UnauthorizedError" | "ValidationError";
2
2
  export interface SamvaApiErrorContext {
3
3
  readonly request?: Request | undefined;
4
4
  readonly response?: Response | undefined;
@@ -36,6 +36,24 @@ export declare class BillingProviderError extends SamvaApiError<"BillingProvider
36
36
  readonly _tag: "BillingProviderError";
37
37
  constructor(payload: Omit<BillingProviderErrorPayload, "_tag">, context?: SamvaApiErrorContext);
38
38
  }
39
+ type BrandAddressRequiredErrorPayload = {
40
+ readonly _tag: "BrandAddressRequiredError";
41
+ readonly brand: string | null;
42
+ readonly message: string;
43
+ };
44
+ export declare class BrandAddressRequiredError extends SamvaApiError<"BrandAddressRequiredError"> {
45
+ readonly _tag: "BrandAddressRequiredError";
46
+ readonly "brand": string | null;
47
+ constructor(payload: Omit<BrandAddressRequiredErrorPayload, "_tag">, context?: SamvaApiErrorContext);
48
+ }
49
+ type CampaignFooterRequiredErrorPayload = {
50
+ readonly _tag: "CampaignFooterRequiredError";
51
+ readonly message: string;
52
+ };
53
+ export declare class CampaignFooterRequiredError extends SamvaApiError<"CampaignFooterRequiredError"> {
54
+ readonly _tag: "CampaignFooterRequiredError";
55
+ constructor(payload: Omit<CampaignFooterRequiredErrorPayload, "_tag">, context?: SamvaApiErrorContext);
56
+ }
39
57
  type ConflictErrorPayload = {
40
58
  readonly _tag: "ConflictError";
41
59
  readonly id?: string | null;
@@ -116,7 +134,7 @@ export declare class InternalError extends SamvaApiError<"InternalError"> {
116
134
  type OnboardingReviewRequiredErrorPayload = {
117
135
  readonly _tag: "OnboardingReviewRequiredError";
118
136
  readonly code: "review_required" | "review_in_progress" | "information_required" | "review_rejected" | "identity_review_required" | "identity_review_rejected" | "identity_changed";
119
- readonly decision: "undecided" | "approved" | "rejected" | "exempt";
137
+ readonly decision: "undecided" | "approved" | "rejected";
120
138
  readonly identityId?: string | null;
121
139
  readonly nextAction: "wait_for_review" | "provide_information" | "verify_sending_identity" | "reapply" | "contact_support";
122
140
  readonly stage: "collecting" | "automated_review" | "manual_review" | "information_requested" | "complete";
@@ -124,7 +142,7 @@ type OnboardingReviewRequiredErrorPayload = {
124
142
  export declare class OnboardingReviewRequiredError extends SamvaApiError<"OnboardingReviewRequiredError"> {
125
143
  readonly _tag: "OnboardingReviewRequiredError";
126
144
  readonly "code": "review_required" | "review_in_progress" | "information_required" | "review_rejected" | "identity_review_required" | "identity_review_rejected" | "identity_changed";
127
- readonly "decision": "undecided" | "approved" | "rejected" | "exempt";
145
+ readonly "decision": "undecided" | "approved" | "rejected";
128
146
  readonly "identityId"?: string | null;
129
147
  readonly "nextAction": "wait_for_review" | "provide_information" | "verify_sending_identity" | "reapply" | "contact_support";
130
148
  readonly "stage": "collecting" | "automated_review" | "manual_review" | "information_requested" | "complete";
@@ -181,7 +199,7 @@ export declare class ValidationError extends SamvaApiError<"ValidationError"> {
181
199
  readonly "fields"?: Record<string, Array<string>> | null;
182
200
  constructor(payload: Omit<ValidationErrorPayload, "_tag">, context?: SamvaApiErrorContext);
183
201
  }
184
- export type AnySamvaApiError = AnalyticsQueryError | BillingProviderError | ConflictError | DeliveryUnavailableError | EmailChannelError | ExternalServiceError | FlagDisabledError | ForbiddenError | GatewayTimeoutError | InternalError | OnboardingReviewRequiredError | PaymentRequiredError | RateLimitedError | ResourceNotFoundError | UnauthorizedError | ValidationError;
202
+ export type AnySamvaApiError = AnalyticsQueryError | BillingProviderError | BrandAddressRequiredError | CampaignFooterRequiredError | ConflictError | DeliveryUnavailableError | EmailChannelError | ExternalServiceError | FlagDisabledError | ForbiddenError | GatewayTimeoutError | InternalError | OnboardingReviewRequiredError | PaymentRequiredError | RateLimitedError | ResourceNotFoundError | UnauthorizedError | ValidationError;
185
203
  /** Convert a decoded error payload into its generated JavaScript error class. */
186
204
  export declare function fromApiError(error: unknown, context?: SamvaApiErrorContext): AnySamvaApiError | SamvaTransportError;
187
205
  export {};
@@ -27,7 +27,7 @@
27
27
  * ```
28
28
  */
29
29
  import { type Client, type Config } from "../client/client";
30
- import { Analytics as analytics, ApiKeys as apiKeys, Attachments as attachments, Campaigns as campaigns, ContactGroups as contactGroups, Contacts as contacts, Conversations as conversations, CustomFields as customFields, Design as design, Email as email, Media as media, Messages as messages, Operations as operations, Organizations as organizations, ScheduledMessages as scheduledMessages, Templates as templates, Unsubscribe as unsubscribeGroups, Webhooks as webhooks } from "../client/sdk.gen";
30
+ import { Analytics as analytics, ApiKeys as apiKeys, Attachments as attachments, Brands as brands, Campaigns as campaigns, ContactGroups as contactGroups, Contacts as contacts, Conversations as conversations, CustomFields as customFields, Email as email, Media as media, Messages as messages, Operations as operations, Organizations as organizations, ScheduledMessages as scheduledMessages, Templates as templates, Unsubscribe as unsubscribeGroups, Webhooks as webhooks } from "../client/sdk.gen";
31
31
  import type { MessagesSendData } from "../client/types.gen";
32
32
  export * from "./errors.gen";
33
33
  export type * from "./types.gen";
@@ -116,13 +116,13 @@ export interface SamvaRawClient {
116
116
  readonly client: Client;
117
117
  readonly messages: typeof messages;
118
118
  readonly scheduledMessages: typeof scheduledMessages;
119
+ readonly brands: typeof brands;
119
120
  readonly campaigns: typeof campaigns;
120
121
  readonly email: typeof email;
121
122
  readonly media: typeof media;
122
123
  readonly templates: PromiseTemplatesTransport;
123
124
  readonly contacts: typeof contacts;
124
125
  readonly conversations: typeof conversations;
125
- readonly design: typeof design;
126
126
  readonly webhooks: typeof webhooks;
127
127
  readonly operations: typeof operations;
128
128
  readonly apiKeys: typeof apiKeys;
@@ -138,13 +138,13 @@ export interface SamvaClient {
138
138
  readonly raw: SamvaRawClient;
139
139
  readonly messages: DirectService<PromiseMessagesTransport>;
140
140
  readonly scheduledMessages: DirectService<typeof scheduledMessages>;
141
+ readonly brands: DirectService<typeof brands>;
141
142
  readonly campaigns: DirectService<typeof campaigns>;
142
143
  readonly email: DirectService<PromiseEmailTransport>;
143
144
  readonly media: DirectService<typeof media>;
144
145
  readonly templates: DirectService<PromiseTemplatesTransport>;
145
146
  readonly contacts: DirectService<typeof contacts>;
146
147
  readonly conversations: DirectService<typeof conversations>;
147
- readonly design: DirectService<typeof design>;
148
148
  readonly webhooks: DirectService<typeof webhooks>;
149
149
  readonly operations: DirectService<typeof operations>;
150
150
  readonly apiKeys: DirectService<typeof apiKeys>;
@@ -1,2 +1,2 @@
1
- import { _ as SamvaTransportError, a as DeliveryUnavailableError, b as fromApiError, c as FlagDisabledError, d as InternalError, f as OnboardingReviewRequiredError, g as SamvaApiError, h as ResourceNotFoundError, i as ConflictError, l as ForbiddenError, m as RateLimitedError, n as AnalyticsQueryError, o as EmailChannelError, p as PaymentRequiredError, r as BillingProviderError, s as ExternalServiceError, t as createClient, u as GatewayTimeoutError, v as UnauthorizedError, y as ValidationError } from "../promises-8MaPNAam.js";
2
- export { AnalyticsQueryError, BillingProviderError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, UnauthorizedError, ValidationError, createClient, fromApiError };
1
+ import { S as fromApiError, _ as ResourceNotFoundError, a as CampaignFooterRequiredError, b as UnauthorizedError, c as EmailChannelError, d as ForbiddenError, f as GatewayTimeoutError, g as RateLimitedError, h as PaymentRequiredError, i as BrandAddressRequiredError, l as ExternalServiceError, m as OnboardingReviewRequiredError, n as AnalyticsQueryError, o as ConflictError, p as InternalError, r as BillingProviderError, s as DeliveryUnavailableError, t as createClient, u as FlagDisabledError, v as SamvaApiError, x as ValidationError, y as SamvaTransportError } from "../promises-C2yyw-pf.js";
2
+ export { AnalyticsQueryError, BillingProviderError, BrandAddressRequiredError, CampaignFooterRequiredError, ConflictError, DeliveryUnavailableError, EmailChannelError, ExternalServiceError, FlagDisabledError, ForbiddenError, GatewayTimeoutError, InternalError, OnboardingReviewRequiredError, PaymentRequiredError, RateLimitedError, ResourceNotFoundError, SamvaApiError, SamvaTransportError, UnauthorizedError, ValidationError, createClient, fromApiError };