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
@@ -130,7 +130,8 @@ export type Message = {
130
130
  scheduling: {
131
131
  dueAt: string;
132
132
  expiresAt: string;
133
- waitReason: "rate" | "daily-quota" | "domain-health" | "sending-paused" | "upstream-unavailable" | "retry" | "campaign-paused" | "domain-warming" | "onboarding-review" | null;
133
+ waitReason: "rate" | "daily-quota" | "domain-health" | "sending-paused" | "upstream-unavailable" | "retry" | "campaign-paused" | "domain-warming" | "onboarding-review" | "content-review" | null;
134
+ reviewExpectedAt: string | null;
134
135
  } | null;
135
136
  id: string;
136
137
  messageId: string;
@@ -191,6 +192,8 @@ export type Message = {
191
192
  createdAt: string;
192
193
  updatedAt: string;
193
194
  }>;
195
+ waitReason: "rate" | "daily-quota" | "domain-health" | "sending-paused" | "upstream-unavailable" | "retry" | "campaign-paused" | "domain-warming" | "onboarding-review" | "content-review" | null;
196
+ reviewExpectedAt: string | null;
194
197
  };
195
198
  export type PaginationMeta = {
196
199
  page: number;
@@ -321,7 +324,7 @@ export type ValidationError = {
321
324
  export type OnboardingReviewRequiredError = {
322
325
  _tag: "OnboardingReviewRequiredError";
323
326
  code: "review_required" | "review_in_progress" | "information_required" | "review_rejected" | "identity_review_required" | "identity_review_rejected" | "identity_changed";
324
- decision: "undecided" | "approved" | "rejected" | "exempt";
327
+ decision: "undecided" | "approved" | "rejected";
325
328
  stage: "collecting" | "automated_review" | "manual_review" | "information_requested" | "complete";
326
329
  nextAction: "wait_for_review" | "provide_information" | "verify_sending_identity" | "reapply" | "contact_support";
327
330
  identityId?: string | null | undefined;
@@ -540,6 +543,15 @@ export type CampaignRun = {
540
543
  createdAt: string;
541
544
  updatedAt: string;
542
545
  };
546
+ export type BrandAddressRequiredError = {
547
+ _tag: "BrandAddressRequiredError";
548
+ message: string;
549
+ brand: string | null;
550
+ };
551
+ export type CampaignFooterRequiredError = {
552
+ _tag: "CampaignFooterRequiredError";
553
+ message: string;
554
+ };
543
555
  export type CampaignRunAction = {
544
556
  success: boolean;
545
557
  item: CampaignRun;
@@ -555,7 +567,8 @@ export type IdentityClearanceStatus = {
555
567
  updatedAt: string;
556
568
  };
557
569
  export type OnboardingReviewStatus = {
558
- decision: "undecided" | "approved" | "rejected" | "exempt";
570
+ decision: "undecided" | "approved" | "rejected";
571
+ trustTier: "screened" | "probation" | "established";
559
572
  stage: "collecting" | "automated_review" | "manual_review" | "information_requested" | "complete";
560
573
  generation: number;
561
574
  canSend: boolean;
@@ -734,7 +747,7 @@ export type EmailDomainVerification = {
734
747
  staleAt: string | null;
735
748
  nextRetryAt: string | null;
736
749
  status: "ready" | "blocked" | "unknown";
737
- reason: "domain-not-ready" | "domain-observation-stale" | "operator-paused" | "sending-paused" | "sending-status-stale" | "sending-status-unknown" | "ready";
750
+ reason: "domain-not-ready" | "domain-observation-stale" | "operator-paused" | "sending-paused" | "sending-status-unknown" | "ready";
738
751
  };
739
752
  dmarc: {
740
753
  status: "valid" | "missing" | "invalid" | "multiple" | "unknown";
@@ -1220,6 +1233,20 @@ export type TemplateFromDefault = {
1220
1233
  email: string;
1221
1234
  name?: string | null | undefined;
1222
1235
  };
1236
+ export type TemplatePublicationBrand = {
1237
+ /**
1238
+ * The brand the publication imports.
1239
+ */
1240
+ slug: string;
1241
+ /**
1242
+ * The brand's digest when the publication was built.
1243
+ */
1244
+ digest: string;
1245
+ /**
1246
+ * Whether the brand has changed since this publication was built. Publishing the same commit again picks up the change.
1247
+ */
1248
+ stale: boolean;
1249
+ };
1223
1250
  export type Template = {
1224
1251
  id: TemplateId;
1225
1252
  organizationId: OrganizationId;
@@ -1245,6 +1272,7 @@ export type Template = {
1245
1272
  } | null;
1246
1273
  } | null;
1247
1274
  publicationId: TemplatePublicationId | null;
1275
+ brand: TemplatePublicationBrand | null;
1248
1276
  inputContractId: TemplateInputContractId | null;
1249
1277
  inputSchema: {
1250
1278
  [key: string]: JsonValue;
@@ -1284,15 +1312,24 @@ export type CreateTemplatePayload = {
1284
1312
  projectName?: string | null | undefined;
1285
1313
  slug?: string | null | undefined;
1286
1314
  galleryTemplateId?: string | null | undefined;
1315
+ useBrand?: boolean | null | undefined;
1287
1316
  description?: string | null | null | undefined;
1288
1317
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
1289
1318
  isActive?: boolean | null | undefined;
1290
1319
  idempotencyKey: string;
1291
1320
  };
1321
+ export type AddTemplateEntryPayload = {
1322
+ entryPath: string;
1323
+ name: string;
1324
+ slug: string;
1325
+ description?: string | null | null | undefined;
1326
+ category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
1327
+ };
1292
1328
  export type UpdateTemplatePayload = {
1293
1329
  data: {
1294
1330
  name?: string | null | undefined;
1295
1331
  slug?: string | null | undefined;
1332
+ entryPath?: string | null | undefined;
1296
1333
  description?: string | null | null | undefined;
1297
1334
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
1298
1335
  fromDefault?: TemplateFromDefault | null | null | undefined;
@@ -1300,76 +1337,70 @@ export type UpdateTemplatePayload = {
1300
1337
  isActive?: boolean | null | undefined;
1301
1338
  };
1302
1339
  };
1303
- export type ThemeColors = {
1304
- [key: string]: string;
1340
+ export type BrandAssets = {
1341
+ logoUrl?: string | null | undefined;
1342
+ logoDarkUrl?: string | null | undefined;
1343
+ iconUrl?: string | null | undefined;
1305
1344
  };
1306
- export type Design = {
1307
- theme?: {
1308
- colors?: ThemeColors | null | undefined;
1309
- colorsDark?: ThemeColors | null | undefined;
1310
- radiusPx?: {
1311
- [key: string]: number;
1312
- } | null | undefined;
1313
- fontFamilies?: {
1314
- [key: string]: {
1315
- source: "system" | "google" | "custom";
1316
- family: string;
1317
- fallback: string;
1318
- faces?: Array<{
1319
- weight: number;
1320
- style: "normal" | "italic";
1321
- src: string;
1322
- unicodeRange?: string | null | undefined;
1323
- }> | null | undefined;
1324
- };
1325
- } | null | undefined;
1326
- fontWeights?: {
1327
- [key: string]: number;
1328
- } | null | undefined;
1329
- text?: {
1330
- [key: string]: {
1331
- sizePx: number;
1332
- lineHeightPx: number;
1333
- };
1334
- } | null | undefined;
1335
- leading?: {
1336
- [key: string]: number;
1337
- } | null | undefined;
1338
- spacingPx?: number | null | undefined;
1339
- containerPx?: {
1340
- [key: string]: number;
1341
- } | null | undefined;
1342
- tracking?: {
1343
- [key: string]: number;
1344
- } | null | undefined;
1345
- } | null | undefined;
1346
- assets?: {
1347
- logoUrl?: string | null | null | undefined;
1348
- logoDarkUrl?: string | null | null | undefined;
1349
- iconUrl?: string | null | null | undefined;
1350
- } | null | undefined;
1351
- footer?: {
1352
- companyName?: string | null | undefined;
1353
- address?: {
1354
- street1: string;
1355
- street2?: string | null | undefined;
1356
- city: string;
1357
- region: string;
1358
- postalCode: string;
1359
- country: string;
1360
- } | null | undefined;
1361
- socialLinks?: Array<{
1362
- label: string;
1363
- url: string;
1364
- }> | null | undefined;
1365
- customHtml?: string | null | undefined;
1366
- } | null | undefined;
1345
+ export type BrandAddress = {
1346
+ street1: string;
1347
+ street2?: string | null | undefined;
1348
+ city: string;
1349
+ region: string;
1350
+ postalCode: string;
1351
+ country: string;
1367
1352
  };
1368
- export type DesignSettings = {
1369
- design: Design | null;
1370
- footerCompleteness: {
1371
- missingAddress: boolean;
1372
- };
1353
+ export type BrandSocialLink = {
1354
+ label: string;
1355
+ url: string;
1356
+ };
1357
+ export type BrandFooter = {
1358
+ companyName?: string | null | undefined;
1359
+ address?: BrandAddress | null | undefined;
1360
+ socialLinks?: Array<BrandSocialLink> | null | undefined;
1361
+ };
1362
+ export type BrandId = string;
1363
+ export type Brand = {
1364
+ id: BrandId;
1365
+ /**
1366
+ * The brand's handle, unique in the organization; `samva:brand/<slug>` names it.
1367
+ */
1368
+ slug: string;
1369
+ name: string;
1370
+ /**
1371
+ * Whether bare `samva:brand` and domains without a brand resolve to this brand.
1372
+ */
1373
+ isDefault: boolean;
1374
+ /**
1375
+ * Brand theme CSS: `@theme` variables, one dark-mode `@theme` of colors, and `@font-face` rules with https WOFF2 sources.
1376
+ */
1377
+ css: string;
1378
+ assets: BrandAssets;
1379
+ footer: BrandFooter;
1380
+ /**
1381
+ * SHA-256 of the brand's css, assets and footer. A publication built against a different digest predates the brand's current content.
1382
+ */
1383
+ digest: string;
1384
+ createdAt: string;
1385
+ updatedAt: string;
1386
+ };
1387
+ export type BrandList = {
1388
+ items: Array<Brand>;
1389
+ };
1390
+ export type CreateBrand = {
1391
+ slug: string;
1392
+ name: string;
1393
+ css?: string | null | undefined;
1394
+ assets?: BrandAssets | null | undefined;
1395
+ footer?: BrandFooter | null | undefined;
1396
+ isDefault?: boolean | null | undefined;
1397
+ };
1398
+ export type UpdateBrand = {
1399
+ newSlug?: string | null | undefined;
1400
+ name?: string | null | undefined;
1401
+ css?: string | null | undefined;
1402
+ assets?: BrandAssets | null | undefined;
1403
+ footer?: BrandFooter | null | undefined;
1373
1404
  };
1374
1405
  export type CreateWebhookPayload = {
1375
1406
  name: string;
@@ -1462,7 +1493,6 @@ export type Organization = {
1462
1493
  metadata: {
1463
1494
  [key: string]: JsonValue;
1464
1495
  } | null;
1465
- design: Design | null;
1466
1496
  replyToDefault: Array<string> | null;
1467
1497
  defaultUnsubscribeGroupId: UnsubscribeId | null;
1468
1498
  emailFooterEnabledDefault: boolean | null;
@@ -1761,7 +1791,8 @@ export type MessagesGetEmailResponses = {
1761
1791
  scheduling: {
1762
1792
  dueAt: string;
1763
1793
  expiresAt: string;
1764
- waitReason: "rate" | "daily-quota" | "domain-health" | "sending-paused" | "upstream-unavailable" | "retry" | "campaign-paused" | "domain-warming" | "onboarding-review" | null;
1794
+ waitReason: "rate" | "daily-quota" | "domain-health" | "sending-paused" | "upstream-unavailable" | "retry" | "campaign-paused" | "domain-warming" | "onboarding-review" | "content-review" | null;
1795
+ reviewExpectedAt: string | null;
1765
1796
  } | null;
1766
1797
  id: string;
1767
1798
  messageId: string;
@@ -2615,9 +2646,9 @@ export type CampaignsScheduleRunErrors = {
2615
2646
  */
2616
2647
  409: ConflictError;
2617
2648
  /**
2618
- * ValidationError
2649
+ * ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError
2619
2650
  */
2620
- 422: ValidationError;
2651
+ 422: ValidationError | BrandAddressRequiredError | CampaignFooterRequiredError;
2621
2652
  /**
2622
2653
  * InternalError
2623
2654
  */
@@ -3147,6 +3178,7 @@ export type EmailListDomainsData = {
3147
3178
  query?: {
3148
3179
  page?: string | null | undefined;
3149
3180
  limit?: string | null | undefined;
3181
+ sendable?: "true" | null | undefined;
3150
3182
  };
3151
3183
  url: "/v1/email/domains";
3152
3184
  };
@@ -3826,6 +3858,7 @@ export type EmailUpdateDomainConfigData = {
3826
3858
  replyTo?: Array<string> | null | null | undefined;
3827
3859
  unsubscribeGroupId?: UnsubscribeId | null | null | undefined;
3828
3860
  footerEnabled?: boolean | null | null | undefined;
3861
+ brandSlug?: string | null | null | undefined;
3829
3862
  };
3830
3863
  path: {
3831
3864
  id: EmailDomainId;
@@ -3867,6 +3900,7 @@ export type EmailUpdateDomainConfigResponses = {
3867
3900
  replyTo: Array<string> | null;
3868
3901
  unsubscribeGroupId: UnsubscribeId | null;
3869
3902
  footerEnabled: boolean | null;
3903
+ brandSlug: string | null;
3870
3904
  };
3871
3905
  };
3872
3906
  export type EmailUpdateDomainConfigResponse = EmailUpdateDomainConfigResponses[keyof EmailUpdateDomainConfigResponses];
@@ -8529,6 +8563,7 @@ export type TemplatesListData = {
8529
8563
  channel?: "email" | null | undefined;
8530
8564
  status?: "draft" | "pending" | "approved" | "published" | "rejected" | "archived" | null | undefined;
8531
8565
  search?: string | null | undefined;
8566
+ projectId?: TemplateProjectId | null | undefined;
8532
8567
  sortBy?: "name" | "createdAt" | "updatedAt" | "usageCount" | "lastUsedAt" | null | undefined;
8533
8568
  sortOrder?: "asc" | "desc" | null | undefined;
8534
8569
  };
@@ -8569,6 +8604,7 @@ export type TemplatesCreateData = {
8569
8604
  projectName?: string | null | undefined;
8570
8605
  slug?: string | null | undefined;
8571
8606
  galleryTemplateId?: string | null | undefined;
8607
+ useBrand?: boolean | null | undefined;
8572
8608
  description?: string | null | null | undefined;
8573
8609
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
8574
8610
  isActive?: boolean | null | undefined;
@@ -9027,6 +9063,7 @@ export type TemplatesUpdateData = {
9027
9063
  data: {
9028
9064
  name?: string | null | undefined;
9029
9065
  slug?: string | null | undefined;
9066
+ entryPath?: string | null | undefined;
9030
9067
  description?: string | null | null | undefined;
9031
9068
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
9032
9069
  fromDefault?: TemplateFromDefault | null | null | undefined;
@@ -9078,6 +9115,58 @@ export type TemplatesUpdateResponses = {
9078
9115
  200: Template;
9079
9116
  };
9080
9117
  export type TemplatesUpdateResponse = TemplatesUpdateResponses[keyof TemplatesUpdateResponses];
9118
+ export type TemplatesAddEntryData = {
9119
+ body: {
9120
+ entryPath: string;
9121
+ name: string;
9122
+ slug: string;
9123
+ description?: string | null | null | undefined;
9124
+ category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
9125
+ };
9126
+ path: {
9127
+ projectId: TemplateProjectId;
9128
+ };
9129
+ query?: never;
9130
+ url: "/v1/templates/projects/{projectId}/entries";
9131
+ };
9132
+ export type TemplatesAddEntryErrors = {
9133
+ /**
9134
+ * UnauthorizedError
9135
+ */
9136
+ 401: UnauthorizedError;
9137
+ /**
9138
+ * ForbiddenError
9139
+ */
9140
+ 403: ForbiddenError;
9141
+ /**
9142
+ * ResourceNotFoundError
9143
+ */
9144
+ 404: ResourceNotFoundError;
9145
+ /**
9146
+ * ConflictError
9147
+ */
9148
+ 409: ConflictError;
9149
+ /**
9150
+ * ValidationError
9151
+ */
9152
+ 422: ValidationError;
9153
+ /**
9154
+ * InternalError
9155
+ */
9156
+ 500: InternalError;
9157
+ /**
9158
+ * GatewayTimeoutError
9159
+ */
9160
+ 504: GatewayTimeoutError;
9161
+ };
9162
+ export type TemplatesAddEntryError = TemplatesAddEntryErrors[keyof TemplatesAddEntryErrors];
9163
+ export type TemplatesAddEntryResponses = {
9164
+ /**
9165
+ * Success
9166
+ */
9167
+ 201: Template;
9168
+ };
9169
+ export type TemplatesAddEntryResponse = TemplatesAddEntryResponses[keyof TemplatesAddEntryResponses];
9081
9170
  export type TemplatesPatchWorkspaceData = {
9082
9171
  body: {
9083
9172
  expectedRevision: string;
@@ -9387,6 +9476,138 @@ export type TemplatesDiffWorkspaceResponses = {
9387
9476
  };
9388
9477
  };
9389
9478
  export type TemplatesDiffWorkspaceResponse = TemplatesDiffWorkspaceResponses[keyof TemplatesDiffWorkspaceResponses];
9479
+ export type TemplatesPutWorkspaceAssetData = {
9480
+ body: {
9481
+ expectedRevision: string;
9482
+ path: string;
9483
+ contentBase64: string;
9484
+ replace: boolean;
9485
+ idempotencyKey: string;
9486
+ };
9487
+ path: {
9488
+ id: TemplateId;
9489
+ };
9490
+ query?: never;
9491
+ url: "/v1/templates/{id}/workspace/assets";
9492
+ };
9493
+ export type TemplatesPutWorkspaceAssetErrors = {
9494
+ /**
9495
+ * UnauthorizedError
9496
+ */
9497
+ 401: UnauthorizedError;
9498
+ /**
9499
+ * ForbiddenError
9500
+ */
9501
+ 403: ForbiddenError;
9502
+ /**
9503
+ * ResourceNotFoundError
9504
+ */
9505
+ 404: ResourceNotFoundError;
9506
+ /**
9507
+ * ConflictError
9508
+ */
9509
+ 409: ConflictError;
9510
+ /**
9511
+ * ValidationError
9512
+ */
9513
+ 422: ValidationError;
9514
+ /**
9515
+ * InternalError
9516
+ */
9517
+ 500: InternalError;
9518
+ /**
9519
+ * GatewayTimeoutError
9520
+ */
9521
+ 504: GatewayTimeoutError;
9522
+ };
9523
+ export type TemplatesPutWorkspaceAssetError = TemplatesPutWorkspaceAssetErrors[keyof TemplatesPutWorkspaceAssetErrors];
9524
+ export type TemplatesPutWorkspaceAssetResponses = {
9525
+ /**
9526
+ * Success
9527
+ */
9528
+ 200: {
9529
+ workspace: {
9530
+ projectId: TemplateProjectId;
9531
+ organizationId: OrganizationId | null;
9532
+ ownerEpoch: number;
9533
+ repositoryName: string;
9534
+ defaultBranch: string;
9535
+ baseCommit: string;
9536
+ remoteHead: string;
9537
+ pendingRemoteHead: string | null;
9538
+ revision: string;
9539
+ overlay: {
9540
+ [key: string]: string | null;
9541
+ };
9542
+ assetChanges: Array<{
9543
+ path: string;
9544
+ status: "added" | "modified" | "deleted";
9545
+ }>;
9546
+ conflicts: Array<{
9547
+ path: string;
9548
+ base: string | null;
9549
+ draft: string | null;
9550
+ main: string | null;
9551
+ }>;
9552
+ provenance: {
9553
+ references: Array<{
9554
+ kind: string;
9555
+ digest: string;
9556
+ locator?: string | undefined;
9557
+ }>;
9558
+ };
9559
+ mounts: Array<{
9560
+ kind: "project";
9561
+ root: "/project";
9562
+ access: "read-write";
9563
+ } | {
9564
+ root: string;
9565
+ digest: string;
9566
+ fileCount: number;
9567
+ byteSize: number;
9568
+ kind: "started-from";
9569
+ access: "read-only";
9570
+ templateId: string;
9571
+ slug: string;
9572
+ name: string;
9573
+ } | {
9574
+ root: string;
9575
+ digest: string;
9576
+ fileCount: number;
9577
+ byteSize: number;
9578
+ kind: "resource";
9579
+ access: "read-only";
9580
+ resourceId: string;
9581
+ name: string;
9582
+ } | {
9583
+ root: string;
9584
+ digest: string;
9585
+ fileCount: number;
9586
+ byteSize: number;
9587
+ kind: "library-template";
9588
+ access: "read-only";
9589
+ templateId: string;
9590
+ slug: string;
9591
+ name: string;
9592
+ }>;
9593
+ libraryManifestDigest: string;
9594
+ createdAt: string;
9595
+ updatedAt: string;
9596
+ createdBy: {
9597
+ userId: UserId;
9598
+ via: "api" | "mcp" | "agent";
9599
+ };
9600
+ updatedBy: {
9601
+ userId: UserId;
9602
+ via: "api" | "mcp" | "agent";
9603
+ };
9604
+ };
9605
+ files: {
9606
+ [key: string]: string;
9607
+ };
9608
+ };
9609
+ };
9610
+ export type TemplatesPutWorkspaceAssetResponse = TemplatesPutWorkspaceAssetResponses[keyof TemplatesPutWorkspaceAssetResponses];
9390
9611
  export type TemplatesReconcileWorkspaceData = {
9391
9612
  body: {
9392
9613
  expectedRevision: string;
@@ -10183,6 +10404,7 @@ export type TemplatesPublishData = {
10183
10404
  commitSha: string;
10184
10405
  entryPath: string;
10185
10406
  expectedWorkspaceRevision: string;
10407
+ ifCurrentPublicationId?: TemplatePublicationId | null | undefined;
10186
10408
  };
10187
10409
  path: {
10188
10410
  id: TemplateId;
@@ -10274,6 +10496,14 @@ export type TemplatesPublishResponses = {
10274
10496
  entryPath: string;
10275
10497
  treeDigest: string;
10276
10498
  };
10499
+ brand?: {
10500
+ slug: string;
10501
+ css: string;
10502
+ assets: BrandAssets;
10503
+ footer: BrandFooter;
10504
+ digest: string;
10505
+ rendersFooter: "every" | "some" | "none";
10506
+ } | undefined;
10277
10507
  };
10278
10508
  executable: {
10279
10509
  key: string;
@@ -10425,6 +10655,14 @@ export type TemplatesGetPublicationResponses = {
10425
10655
  entryPath: string;
10426
10656
  treeDigest: string;
10427
10657
  };
10658
+ brand?: {
10659
+ slug: string;
10660
+ css: string;
10661
+ assets: BrandAssets;
10662
+ footer: BrandFooter;
10663
+ digest: string;
10664
+ rendersFooter: "every" | "some" | "none";
10665
+ } | undefined;
10428
10666
  };
10429
10667
  executable: {
10430
10668
  key: string;
@@ -10932,13 +11170,13 @@ export type TemplatesRemoveWorkspaceResourceResponses = {
10932
11170
  };
10933
11171
  };
10934
11172
  export type TemplatesRemoveWorkspaceResourceResponse = TemplatesRemoveWorkspaceResourceResponses[keyof TemplatesRemoveWorkspaceResourceResponses];
10935
- export type DesignGetData = {
11173
+ export type BrandsListData = {
10936
11174
  body?: never;
10937
11175
  path?: never;
10938
11176
  query?: never;
10939
- url: "/v1/design";
11177
+ url: "/v1/brands";
10940
11178
  };
10941
- export type DesignGetErrors = {
11179
+ export type BrandsListErrors = {
10942
11180
  /**
10943
11181
  * UnauthorizedError
10944
11182
  */
@@ -10956,23 +11194,28 @@ export type DesignGetErrors = {
10956
11194
  */
10957
11195
  504: GatewayTimeoutError;
10958
11196
  };
10959
- export type DesignGetError = DesignGetErrors[keyof DesignGetErrors];
10960
- export type DesignGetResponses = {
11197
+ export type BrandsListError = BrandsListErrors[keyof BrandsListErrors];
11198
+ export type BrandsListResponses = {
10961
11199
  /**
10962
- * DesignSettings
11200
+ * BrandList
10963
11201
  */
10964
- 200: DesignSettings;
11202
+ 200: BrandList;
10965
11203
  };
10966
- export type DesignGetResponse = DesignGetResponses[keyof DesignGetResponses];
10967
- export type DesignUpdateData = {
11204
+ export type BrandsListResponse = BrandsListResponses[keyof BrandsListResponses];
11205
+ export type BrandsCreateData = {
10968
11206
  body: {
10969
- design: Design | null;
11207
+ slug: string;
11208
+ name: string;
11209
+ css?: string | null | undefined;
11210
+ assets?: BrandAssets | null | undefined;
11211
+ footer?: BrandFooter | null | undefined;
11212
+ isDefault?: boolean | null | undefined;
10970
11213
  };
10971
11214
  path?: never;
10972
11215
  query?: never;
10973
- url: "/v1/design";
11216
+ url: "/v1/brands";
10974
11217
  };
10975
- export type DesignUpdateErrors = {
11218
+ export type BrandsCreateErrors = {
10976
11219
  /**
10977
11220
  * UnauthorizedError
10978
11221
  */
@@ -10981,6 +11224,10 @@ export type DesignUpdateErrors = {
10981
11224
  * ForbiddenError
10982
11225
  */
10983
11226
  403: ForbiddenError;
11227
+ /**
11228
+ * ConflictError
11229
+ */
11230
+ 409: ConflictError;
10984
11231
  /**
10985
11232
  * ValidationError
10986
11233
  */
@@ -10994,14 +11241,184 @@ export type DesignUpdateErrors = {
10994
11241
  */
10995
11242
  504: GatewayTimeoutError;
10996
11243
  };
10997
- export type DesignUpdateError = DesignUpdateErrors[keyof DesignUpdateErrors];
10998
- export type DesignUpdateResponses = {
11244
+ export type BrandsCreateError = BrandsCreateErrors[keyof BrandsCreateErrors];
11245
+ export type BrandsCreateResponses = {
11246
+ /**
11247
+ * Success
11248
+ */
11249
+ 201: Brand;
11250
+ };
11251
+ export type BrandsCreateResponse = BrandsCreateResponses[keyof BrandsCreateResponses];
11252
+ export type BrandsRemoveData = {
11253
+ body?: never;
11254
+ path: {
11255
+ slug: string;
11256
+ };
11257
+ query?: never;
11258
+ url: "/v1/brands/{slug}";
11259
+ };
11260
+ export type BrandsRemoveErrors = {
11261
+ /**
11262
+ * UnauthorizedError
11263
+ */
11264
+ 401: UnauthorizedError;
11265
+ /**
11266
+ * ForbiddenError
11267
+ */
11268
+ 403: ForbiddenError;
11269
+ /**
11270
+ * ResourceNotFoundError
11271
+ */
11272
+ 404: ResourceNotFoundError;
11273
+ /**
11274
+ * ConflictError
11275
+ */
11276
+ 409: ConflictError;
11277
+ /**
11278
+ * InternalError
11279
+ */
11280
+ 500: InternalError;
11281
+ /**
11282
+ * GatewayTimeoutError
11283
+ */
11284
+ 504: GatewayTimeoutError;
11285
+ };
11286
+ export type BrandsRemoveError = BrandsRemoveErrors[keyof BrandsRemoveErrors];
11287
+ export type BrandsRemoveResponses = {
11288
+ /**
11289
+ * SuccessResponse
11290
+ */
11291
+ 200: SuccessResponse;
11292
+ };
11293
+ export type BrandsRemoveResponse = BrandsRemoveResponses[keyof BrandsRemoveResponses];
11294
+ export type BrandsGetData = {
11295
+ body?: never;
11296
+ path: {
11297
+ slug: string;
11298
+ };
11299
+ query?: never;
11300
+ url: "/v1/brands/{slug}";
11301
+ };
11302
+ export type BrandsGetErrors = {
11303
+ /**
11304
+ * UnauthorizedError
11305
+ */
11306
+ 401: UnauthorizedError;
11307
+ /**
11308
+ * ForbiddenError
11309
+ */
11310
+ 403: ForbiddenError;
11311
+ /**
11312
+ * ResourceNotFoundError
11313
+ */
11314
+ 404: ResourceNotFoundError;
11315
+ /**
11316
+ * InternalError
11317
+ */
11318
+ 500: InternalError;
11319
+ /**
11320
+ * GatewayTimeoutError
11321
+ */
11322
+ 504: GatewayTimeoutError;
11323
+ };
11324
+ export type BrandsGetError = BrandsGetErrors[keyof BrandsGetErrors];
11325
+ export type BrandsGetResponses = {
11326
+ /**
11327
+ * Brand
11328
+ */
11329
+ 200: Brand;
11330
+ };
11331
+ export type BrandsGetResponse = BrandsGetResponses[keyof BrandsGetResponses];
11332
+ export type BrandsUpdateData = {
11333
+ body: {
11334
+ newSlug?: string | null | undefined;
11335
+ name?: string | null | undefined;
11336
+ css?: string | null | undefined;
11337
+ assets?: BrandAssets | null | undefined;
11338
+ footer?: BrandFooter | null | undefined;
11339
+ };
11340
+ path: {
11341
+ slug: string;
11342
+ };
11343
+ query?: never;
11344
+ url: "/v1/brands/{slug}";
11345
+ };
11346
+ export type BrandsUpdateErrors = {
11347
+ /**
11348
+ * UnauthorizedError
11349
+ */
11350
+ 401: UnauthorizedError;
11351
+ /**
11352
+ * ForbiddenError
11353
+ */
11354
+ 403: ForbiddenError;
11355
+ /**
11356
+ * ResourceNotFoundError
11357
+ */
11358
+ 404: ResourceNotFoundError;
11359
+ /**
11360
+ * ConflictError
11361
+ */
11362
+ 409: ConflictError;
11363
+ /**
11364
+ * ValidationError
11365
+ */
11366
+ 422: ValidationError;
11367
+ /**
11368
+ * InternalError
11369
+ */
11370
+ 500: InternalError;
11371
+ /**
11372
+ * GatewayTimeoutError
11373
+ */
11374
+ 504: GatewayTimeoutError;
11375
+ };
11376
+ export type BrandsUpdateError = BrandsUpdateErrors[keyof BrandsUpdateErrors];
11377
+ export type BrandsUpdateResponses = {
11378
+ /**
11379
+ * Brand
11380
+ */
11381
+ 200: Brand;
11382
+ };
11383
+ export type BrandsUpdateResponse = BrandsUpdateResponses[keyof BrandsUpdateResponses];
11384
+ export type BrandsSetDefaultData = {
11385
+ body?: never;
11386
+ path: {
11387
+ slug: string;
11388
+ };
11389
+ query?: never;
11390
+ url: "/v1/brands/{slug}/default";
11391
+ };
11392
+ export type BrandsSetDefaultErrors = {
11393
+ /**
11394
+ * UnauthorizedError
11395
+ */
11396
+ 401: UnauthorizedError;
11397
+ /**
11398
+ * ForbiddenError
11399
+ */
11400
+ 403: ForbiddenError;
11401
+ /**
11402
+ * ResourceNotFoundError
11403
+ */
11404
+ 404: ResourceNotFoundError;
11405
+ /**
11406
+ * InternalError
11407
+ */
11408
+ 500: InternalError;
11409
+ /**
11410
+ * GatewayTimeoutError
11411
+ */
11412
+ 504: GatewayTimeoutError;
11413
+ };
11414
+ export type BrandsSetDefaultError = BrandsSetDefaultErrors[keyof BrandsSetDefaultErrors];
11415
+ export type BrandsSetDefaultResponses = {
10999
11416
  /**
11000
- * DesignSettings
11417
+ * Brand
11001
11418
  */
11002
- 200: DesignSettings;
11419
+ 200: Brand;
11003
11420
  };
11004
- export type DesignUpdateResponse = DesignUpdateResponses[keyof DesignUpdateResponses];
11421
+ export type BrandsSetDefaultResponse = BrandsSetDefaultResponses[keyof BrandsSetDefaultResponses];
11005
11422
  export type WebhooksListData = {
11006
11423
  body?: never;
11007
11424
  path?: never;
@@ -11578,7 +11995,6 @@ export type OrganizationsUpdateData = {
11578
11995
  metadata?: {
11579
11996
  [key: string]: JsonValue;
11580
11997
  } | null | undefined;
11581
- design?: Design | null | null | undefined;
11582
11998
  replyToDefault?: Array<string> | null | null | undefined;
11583
11999
  defaultUnsubscribeGroupId?: UnsubscribeId | null | null | undefined;
11584
12000
  emailFooterEnabledDefault?: boolean | null | null | undefined;