samva 0.19.0 → 0.21.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 (51) hide show
  1. package/dist/client/sdk.gen.d.ts +72 -16
  2. package/dist/client/sdk.gen.js +216 -36
  3. package/dist/client/types.gen.d.ts +411 -65
  4. package/dist/effect/api-keys.d.ts +7 -0
  5. package/dist/effect/campaigns.d.ts +66 -3
  6. package/dist/effect/contacts.d.ts +24 -4
  7. package/dist/effect/email.d.ts +22 -6
  8. package/dist/effect/errors.d.ts +1 -1
  9. package/dist/effect/errors.js +2 -2
  10. package/dist/effect/generated/api-keys.d.ts +15 -0
  11. package/dist/effect/generated/api-keys.js +2 -0
  12. package/dist/effect/generated/campaigns.d.ts +136 -4
  13. package/dist/effect/generated/campaigns.js +22 -1
  14. package/dist/effect/generated/contacts.d.ts +131 -1
  15. package/dist/effect/generated/contacts.js +17 -2
  16. package/dist/effect/generated/email.d.ts +162 -1
  17. package/dist/effect/generated/email.js +31 -11
  18. package/dist/effect/generated/journeys.d.ts +31 -61
  19. package/dist/effect/generated/journeys.js +9 -5
  20. package/dist/effect/generated/mailboxes.d.ts +274 -78
  21. package/dist/effect/generated/mailboxes.js +28 -20
  22. package/dist/effect/generated/messages.d.ts +4 -1
  23. package/dist/effect/generated/messages.js +2 -1
  24. package/dist/effect/generated/namespaces.d.ts +432 -2
  25. package/dist/effect/generated/namespaces.js +91 -4
  26. package/dist/effect/generated/shared.d.ts +38 -29
  27. package/dist/effect/generated/shared.js +28 -23
  28. package/dist/effect/generated/templates.d.ts +80 -1
  29. package/dist/effect/generated/templates.js +18 -6
  30. package/dist/effect/generated/webhooks.d.ts +120 -0
  31. package/dist/effect/generated/webhooks.js +27 -3
  32. package/dist/effect/generated-metadata.d.ts +20 -4
  33. package/dist/effect/generated-metadata.js +4 -4
  34. package/dist/effect/index.js +2 -2
  35. package/dist/effect/journeys.d.ts +12 -4
  36. package/dist/effect/mailboxes.d.ts +11 -11
  37. package/dist/effect/messages.d.ts +3 -0
  38. package/dist/effect/namespaces.d.ts +29 -0
  39. package/dist/effect/namespaces.js +7 -1
  40. package/dist/effect/templates.d.ts +28 -1
  41. package/dist/effect/webhooks.d.ts +7 -0
  42. package/dist/effect/webhooks.js +3 -1
  43. package/dist/index.js +2 -2
  44. package/dist/package.js +1 -1
  45. package/dist/promises/errors.gen.d.ts +2 -12
  46. package/dist/promises/errors.gen.js +1 -26
  47. package/dist/promises/index.js +2 -2
  48. package/dist/promises/types.gen.d.ts +1 -1
  49. package/dist/service-map.d.ts +20 -0
  50. package/dist/service-map.js +20 -0
  51. package/package.json +5 -3
@@ -362,13 +362,6 @@ export type MailboxMetadata = {
362
362
  export declare const MailboxMetadata: Schema.$Record<Schema.String, Schema.String>;
363
363
  export type MailboxEndpointId = string & EffectBrand.Brand<"MailboxEndpointId">;
364
364
  export declare const MailboxEndpointId: Schema.brand<Schema.String, "MailboxEndpointId">;
365
- declare const MailboxChannelUnsupportedError_base: Schema.Class<MailboxChannelUnsupportedError, Schema.Struct<{
366
- readonly _tag: Schema.tag<"MailboxChannelUnsupportedError">;
367
- readonly message: Schema.String;
368
- readonly channel: Schema.String;
369
- }>, import("effect/Cause").YieldableError>;
370
- export declare class MailboxChannelUnsupportedError extends MailboxChannelUnsupportedError_base {
371
- }
372
365
  export type MailboxMetadataPatch = {
373
366
  readonly [x: string]: string | null;
374
367
  };
@@ -501,6 +494,8 @@ export type NamespaceMetadata = {
501
494
  readonly [x: string]: string;
502
495
  };
503
496
  export declare const NamespaceMetadata: Schema.$Record<Schema.String, Schema.String>;
497
+ export type NamespaceResourceType = "domain" | "sender" | "contact" | "template";
498
+ export declare const NamespaceResourceType: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
504
499
  export type OperationResource = {
505
500
  readonly type: string;
506
501
  readonly id: string;
@@ -601,28 +596,6 @@ export declare const CreateMediaPayload: Schema.Struct<{
601
596
  readonly purpose: Schema.Union<readonly [Schema.Literal<"attachment">, Schema.Literal<"avatar">, Schema.Literal<"review_evidence">]>;
602
597
  readonly checksumSha256: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
603
598
  }>;
604
- export type CreateTemplatePayload = {
605
- readonly name: string;
606
- readonly projectName?: string | null;
607
- readonly slug?: string | null;
608
- readonly galleryTemplateId?: string | null;
609
- readonly useBrand?: boolean | null;
610
- readonly description?: string | null | null;
611
- readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null;
612
- readonly isActive?: boolean | null;
613
- readonly idempotencyKey: string;
614
- };
615
- export declare const CreateTemplatePayload: Schema.Struct<{
616
- readonly name: Schema.String;
617
- readonly projectName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
618
- readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
619
- readonly galleryTemplateId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
620
- readonly useBrand: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
621
- readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
622
- readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>, Schema.Null]>>;
623
- readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
624
- readonly idempotencyKey: Schema.String;
625
- }>;
626
599
  export type DenyMailboxActionPayload = {
627
600
  readonly reason: string;
628
601
  };
@@ -744,6 +717,32 @@ export declare const ApiKeyMailboxAccess: Schema.Struct<{
744
717
  readonly mailboxIds: Schema.optionalKey<Schema.Union<readonly [Schema.TupleWithRest<Schema.Tuple<readonly [Schema.brand<Schema.String, "MailboxId">]>, readonly [Schema.brand<Schema.String, "MailboxId">]>, Schema.Null]>>;
745
718
  readonly sendMode: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"send">, Schema.Literal<"approval">]>, Schema.Null]>>;
746
719
  }>;
720
+ export type CreateTemplatePayload = {
721
+ readonly name: string;
722
+ readonly projectName?: string | null;
723
+ readonly slug?: string | null;
724
+ readonly galleryTemplateId?: string | null;
725
+ readonly useBrand?: boolean | null;
726
+ readonly description?: string | null | null;
727
+ readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null;
728
+ readonly isActive?: boolean | null;
729
+ readonly namespaceId?: NamespaceId | null;
730
+ readonly shared?: boolean | null;
731
+ readonly idempotencyKey: string;
732
+ };
733
+ export declare const CreateTemplatePayload: Schema.Struct<{
734
+ readonly name: Schema.String;
735
+ readonly projectName: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
736
+ readonly slug: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
737
+ readonly galleryTemplateId: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
738
+ readonly useBrand: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
739
+ readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
740
+ readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>, Schema.Null]>>;
741
+ readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
742
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
743
+ readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
744
+ readonly idempotencyKey: Schema.String;
745
+ }>;
747
746
  export type CreateWebhookPayload = {
748
747
  readonly name: string;
749
748
  readonly url: string;
@@ -1263,6 +1262,14 @@ export declare const CreateNamespacePayload: Schema.Struct<{
1263
1262
  readonly name: Schema.String;
1264
1263
  readonly metadata: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.String>, Schema.Null]>>;
1265
1264
  }>;
1265
+ export type AssignNamespaceResourcePayload = {
1266
+ readonly type: NamespaceResourceType;
1267
+ readonly resourceId: string;
1268
+ };
1269
+ export declare const AssignNamespaceResourcePayload: Schema.Struct<{
1270
+ readonly type: Schema.Union<readonly [Schema.Literal<"domain">, Schema.Literal<"sender">, Schema.Literal<"contact">, Schema.Literal<"template">]>;
1271
+ readonly resourceId: Schema.String;
1272
+ }>;
1266
1273
  export type Operation = {
1267
1274
  readonly id: OperationId;
1268
1275
  readonly organizationId: string;
@@ -1327,6 +1334,7 @@ export type UpdateTemplatePayload = {
1327
1334
  readonly fromDefault?: TemplateFromDefault | null | null;
1328
1335
  readonly replyToDefault?: ReadonlyArray<string> | null | null;
1329
1336
  readonly isActive?: boolean | null;
1337
+ readonly shared?: boolean | null;
1330
1338
  };
1331
1339
  };
1332
1340
  export declare const UpdateTemplatePayload: Schema.Struct<{
@@ -1342,6 +1350,7 @@ export declare const UpdateTemplatePayload: Schema.Struct<{
1342
1350
  }>, Schema.Null]>, Schema.Null]>>;
1343
1351
  readonly replyToDefault: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
1344
1352
  readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1353
+ readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
1345
1354
  }>;
1346
1355
  }>;
1347
1356
  export type ApiKeyAccess = {
@@ -295,10 +295,6 @@ const MailboxEndpointId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/
295
295
  expected: "a string matching the RegExp ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$",
296
296
  identifier: "MailboxEndpointId"
297
297
  })).pipe(Schema.brand("MailboxEndpointId"));
298
- var MailboxChannelUnsupportedError = class extends Schema.TaggedError()("MailboxChannelUnsupportedError", Schema.Struct({
299
- message: Schema.String,
300
- channel: Schema.String
301
- })) {};
302
298
  const MailboxMetadataPatch = /* @__PURE__ */ Schema.Record(Schema.String, Schema.Union([Schema.String.check(Schema.isMaxCodePoints(512).annotate({ expected: "a string with at most 512 code points" })).check(Schema.isMaxLength(512).annotate({ expected: "a value with a length of at most 512" })), Schema.Null])).check(Schema.isPropertyNames(Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(64).annotate({ expected: "a string with at most 64 code points" }))).annotate({
303
299
  expected: "an object with property names matching the schema",
304
300
  identifier: "MailboxMetadataPatch"
@@ -457,6 +453,12 @@ const NamespaceMetadata = /* @__PURE__ */ Schema.Record(Schema.String, Schema.St
457
453
  description: "Your own labels for the namespace, such as the id of your customer it serves. Samva stores them and never reads them.",
458
454
  identifier: "NamespaceMetadata"
459
455
  });
456
+ const NamespaceResourceType = /* @__PURE__ */ Schema.Union([
457
+ Schema.Literal("domain"),
458
+ Schema.Literal("sender"),
459
+ Schema.Literal("contact"),
460
+ Schema.Literal("template")
461
+ ]).annotate({ identifier: "NamespaceResourceType" });
460
462
  const OperationResource = /* @__PURE__ */ Schema.Struct({
461
463
  type: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(80).annotate({ expected: "a string with at most 80 code points" })).check(Schema.isMaxLength(80).annotate({ expected: "a value with a length of at most 80" })),
462
464
  id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
@@ -465,6 +467,22 @@ const TemplateFromDefault = /* @__PURE__ */ Schema.Struct({
465
467
  email: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
466
468
  name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]))
467
469
  }).annotate({ identifier: "TemplateFromDefault" });
470
+ const TestWebhookPayload = /* @__PURE__ */ Schema.Struct({ data: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null])) }).annotate({ identifier: "TestWebhookPayload" });
471
+ const ApiKeyMailboxAccess = /* @__PURE__ */ Schema.Struct({
472
+ permissions: Schema.TupleWithRest(Schema.Tuple([Schema.Union([
473
+ Schema.Literal("read"),
474
+ Schema.Literal("update"),
475
+ Schema.Literal("send"),
476
+ Schema.Literal("quarantine.read")
477
+ ])]), [Schema.Union([
478
+ Schema.Literal("read"),
479
+ Schema.Literal("update"),
480
+ Schema.Literal("send"),
481
+ Schema.Literal("quarantine.read")
482
+ ])]).annotate({ description: "`read` reads mailboxes, threads, and messages; `update` changes thread state, labels, drafts, and notes; `send` sends and replies; `quarantine.read` reads quarantined mail." }),
483
+ mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null]).annotate({ description: "The mailboxes the key may act on. Omit to reach every mailbox the owner can." })),
484
+ sendMode: Schema.optionalKey(Schema.Union([MailboxSendMode, Schema.Null]).annotate({ description: "Defaults to `send`. With `approval`, each send waits until a person other than the key approves it." }))
485
+ }).annotate({ identifier: "ApiKeyMailboxAccess" });
468
486
  const CreateTemplatePayload = /* @__PURE__ */ Schema.Struct({
469
487
  name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })),
470
488
  projectName: Schema.optionalKey(Schema.Union([Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(200).annotate({ expected: "a string with at most 200 code points" })).check(Schema.isMaxLength(200).annotate({ expected: "a value with a length of at most 200" })), Schema.Null])),
@@ -482,24 +500,10 @@ const CreateTemplatePayload = /* @__PURE__ */ Schema.Struct({
482
500
  Schema.Literal("alert")
483
501
  ]), Schema.Null]), Schema.Null])),
484
502
  isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
503
+ namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "The namespace the new template project belongs to; the project and every entry added to it share it. Omit for organization level. A namespace-scoped key always creates in its own namespace." })),
504
+ shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the new organization-level project with every namespace: namespace-scoped keys read and send its entries but cannot change them. Defaults to false. Not with `namespaceId`, and not from a namespace-scoped key." })),
485
505
  idempotencyKey: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(255).annotate({ expected: "a string with at most 255 code points" })).check(Schema.isMaxLength(255).annotate({ expected: "a value with a length of at most 255" }))
486
506
  }).annotate({ identifier: "CreateTemplatePayload" });
487
- const TestWebhookPayload = /* @__PURE__ */ Schema.Struct({ data: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, JsonValue), Schema.Null])) }).annotate({ identifier: "TestWebhookPayload" });
488
- const ApiKeyMailboxAccess = /* @__PURE__ */ Schema.Struct({
489
- permissions: Schema.TupleWithRest(Schema.Tuple([Schema.Union([
490
- Schema.Literal("read"),
491
- Schema.Literal("update"),
492
- Schema.Literal("send"),
493
- Schema.Literal("quarantine.read")
494
- ])]), [Schema.Union([
495
- Schema.Literal("read"),
496
- Schema.Literal("update"),
497
- Schema.Literal("send"),
498
- Schema.Literal("quarantine.read")
499
- ])]).annotate({ description: "`read` reads mailboxes, threads, and messages; `update` changes thread state, labels, drafts, and notes; `send` sends and replies; `quarantine.read` reads quarantined mail." }),
500
- mailboxIds: Schema.optionalKey(Schema.Union([Schema.TupleWithRest(Schema.Tuple([MailboxId]), [MailboxId]), Schema.Null]).annotate({ description: "The mailboxes the key may act on. Omit to reach every mailbox the owner can." })),
501
- sendMode: Schema.optionalKey(Schema.Union([MailboxSendMode, Schema.Null]).annotate({ description: "Defaults to `send`. With `approval`, each send waits until a person other than the key approves it." }))
502
- }).annotate({ identifier: "ApiKeyMailboxAccess" });
503
507
  const CreateWebhookPayload = /* @__PURE__ */ Schema.Struct({
504
508
  name: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })).check(Schema.isMaxCodePoints(100).annotate({ expected: "a string with at most 100 code points" })).check(Schema.isMaxLength(100).annotate({ expected: "a value with a length of at most 100" })),
505
509
  url: Schema.String,
@@ -821,13 +825,14 @@ const UpdateTemplatePayload = /* @__PURE__ */ Schema.Struct({ data: Schema.Struc
821
825
  ]), Schema.Null]), Schema.Null])),
822
826
  fromDefault: Schema.optionalKey(Schema.Union([Schema.Union([TemplateFromDefault, Schema.Null]), Schema.Null])),
823
827
  replyToDefault: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Array(Schema.String), Schema.Null]), Schema.Null])),
824
- isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]))
828
+ isActive: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null])),
829
+ shared: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({ description: "Share the template's project with every namespace, or stop sharing it. Applies to every entry in the project. Only an organization-level project is shared." }))
825
830
  }) }).annotate({ identifier: "UpdateTemplatePayload" });
826
831
  const ApiKeyAccess = /* @__PURE__ */ Schema.Union([Schema.Struct({ mode: Schema.Literal("full") }), Schema.Struct({
827
832
  mode: Schema.Literal("restricted"),
828
833
  resources: ApiKeyResourceAccess,
829
834
  mailboxes: Schema.optionalKey(Schema.Union([ApiKeyMailboxAccess, Schema.Null])),
830
- namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "Confines the key to one namespace: it reaches only that namespace's mailboxes. A key scoped to a namespace or to listed mailboxes holds mailbox access only." }))
835
+ namespaceId: Schema.optionalKey(Schema.Union([NamespaceId, Schema.Null]).annotate({ description: "Confines the key to one namespace: it reaches only that namespace's domains, senders, numbers, mailboxes, contacts, templates, and messages, never organization-level ones, and only endpoints that confine to a namespace (others answer 403). It holds grants only on `mailboxes`, `messages`, `email`, `domains`, `contacts`, and `templates`. A key scoped to listed mailboxes holds mailbox access only." }))
831
836
  })]).annotate({ identifier: "ApiKeyAccess" });
832
837
  const MessagePage = /* @__PURE__ */ Schema.Struct({
833
838
  items: Schema.Array(MessageSummary),
@@ -1068,6 +1073,6 @@ const ApiKeySecurity = HttpApiSecurity.apiKey({
1068
1073
  });
1069
1074
  var ApiKeySecurityMiddleware = class extends HttpApiMiddleware.Service()("apiKey security", { security: { apiKey: ApiKeySecurity } }) {};
1070
1075
  //#endregion
1071
- export { AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignFooterRequiredError, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, Cursor, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailChannelError, EmailContent, EmailDispatchContent, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, GatewayTimeoutError, IanaTimezone, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxChannelUnsupportedError, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, NamespaceId, NamespaceMetadata, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SenderNotReadyError, SendsSeries, SkippedRecipient, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplatePublicationId, TestWebhookPayload, UnauthorizedError, UnsubscribeId, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
1076
+ export { AnalyticsQueryError, ApiKeyAccess, ApiKeyId, ApiKeyMailboxAccess, ApiKeyResourceAccess, ApiKeySecurity, ApiKeySecurityMiddleware, AttachmentId, BillingProviderError, BrandAddress, BrandAddressRequiredError, BrandAssets, BrandFooter, BrandSocialLink, CampaignFooterRequiredError, ConflictError, ContactConsent, ContactEvent, ContactEventReference, ContactGroupId, ContactId, ContactIdentity, ContactIdentityChannel, ContactIdentityId, ConversationId, CreateBrand, CreateEventPayload, CreateMailboxEndpointPayload, CreateTemplatePayload, CreateWebhookPayload, Cursor, DeliveryUnavailableError, EmailAttachment, EmailAttachments, EmailBccRecipients, EmailCcRecipients, EmailChannelError, EmailContent, EmailDispatchContent, EmailDomainId, EmailFooterOverride, EmailRecipient, EmailRecipients, EmailSender, EmailSenderId, EmailTrackingOverrideV1, ExtensionId, ExtensionVersionId, ExtensionVersionRef, ExternalServiceError, FeedbackContext, FlagDisabledError, ForbiddenError, GatewayTimeoutError, IanaTimezone, InternalError, JourneyBranchEdge, JourneyBranchNode, JourneyComparison, JourneyCondition, JourneyContactCreatedTrigger, JourneyContactProperty, JourneyCustomEventName, JourneyCustomEventTrigger, JourneyCustomFieldPredicate, JourneyDefinition, JourneyEmptyConfig, JourneyEqualityComparison, JourneyEventName, JourneyEventPredicate, JourneyExitNode, JourneyGoal, JourneyGroupJoinedTrigger, JourneyName, JourneyNextEdge, JourneyNode, JourneyNodeId, JourneyNumericComparison, JourneyPredicate, JourneyPresenceComparison, JourneyPropertyPredicate, JourneySendEmailConfig, JourneySendEmailNode, JourneyStringComparison, JourneyTagAddedTrigger, JourneyTagPredicate, JourneyTrigger, JourneyUpdateTagsConfig, JourneyUpdateTagsNode, JourneyWaitConfig, JourneyWaitEventEdge, JourneyWaitForEventConfig, JourneyWaitForEventNode, JourneyWaitNode, JourneyWebhookConfig, JourneyWebhookNode, JsonObject, JsonValue, MailboxActionDecision, MailboxActionId, MailboxChannel, MailboxDraftId, MailboxEndpointId, MailboxGrantRole, MailboxId, MailboxLabelId, MailboxMetadata, MailboxMetadataPatch, MailboxPolicyId, MailboxPolicyOutcomeKind, MailboxSendConflictError, MailboxSendError, MailboxSendMode, MailboxSendOutcome, MailboxSendReceipt, MailboxSendRefusedError, MailboxThreadFolder, MailboxThreadId, MailboxThreadPriority, MediaId, MessageId, MessageMetadata, MessagePage, MessageSummary, NamespaceId, NamespaceMetadata, NamespaceResourceType, OnboardingReviewRequiredError, Operation, OperationAccepted, OperationId, OperationResource, OperationResourceLink, OrganizationId, PaymentRequiredError, RateLimitedError, RenderLocale, RenderTimeZone, ReplyToAddresses, ResourceNotFoundError, SendFeedback, SenderNotReadyError, SendsSeries, SkippedRecipient, SuccessResponse, TemplateData, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplatePublicationId, TestWebhookPayload, UnauthorizedError, UnsubscribeId, UpdateBrand, UpdateTemplatePayload, UpdateWebhookPayload, UserId, ValidationError, WebhookEndpointId, AbsoluteInstant as __SamvaRuntimeAbsoluteInstant, SensitiveString as __SamvaRuntimeSensitiveString };
1072
1077
 
1073
1078
  //# sourceMappingURL=shared.js.map
@@ -1,7 +1,7 @@
1
1
  import type * as EffectBrand from "effect/Brand";
2
2
  import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
3
3
  import * as Schema from "effect/Schema";
4
- import { ApiKeySecurityMiddleware, BrandAssets, BrandFooter, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, OrganizationId, RenderLocale, RenderTimeZone, ResourceNotFoundError, SuccessResponse, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplatePublicationId, UnauthorizedError, UserId, ValidationError } from "./shared";
4
+ import { ApiKeySecurityMiddleware, BrandAssets, BrandFooter, ConflictError, Cursor, ForbiddenError, GatewayTimeoutError, InternalError, JsonValue, NamespaceId, OrganizationId, RenderLocale, RenderTimeZone, ResourceNotFoundError, SuccessResponse, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplatePublicationId, UnauthorizedError, UserId, ValidationError } from "./shared";
5
5
  export type TemplateProjectId = string & EffectBrand.Brand<"TemplateProjectId">;
6
6
  export declare const TemplateProjectId: Schema.brand<Schema.String, "TemplateProjectId">;
7
7
  export type TemplatePublicationBrand = {
@@ -21,10 +21,12 @@ export declare const VersionCursor: Schema.String;
21
21
  export type BrandFooterBlock = {
22
22
  readonly html: string;
23
23
  readonly text: string;
24
+ readonly headCss?: string | null;
24
25
  };
25
26
  export declare const BrandFooterBlock: Schema.Struct<{
26
27
  readonly html: Schema.String;
27
28
  readonly text: Schema.String;
29
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
28
30
  }>;
29
31
  export type TemplatePublicationRender = {
30
32
  readonly subject: string;
@@ -90,6 +92,8 @@ export type TemplateSummary = {
90
92
  readonly name: string;
91
93
  readonly channel: "email";
92
94
  readonly projectId: TemplateProjectId;
95
+ readonly namespaceId: NamespaceId | null;
96
+ readonly shared: boolean;
93
97
  readonly entryPath: string;
94
98
  readonly status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
95
99
  readonly isActive: boolean;
@@ -107,6 +111,8 @@ export declare const TemplateSummary: Schema.Struct<{
107
111
  readonly name: Schema.String;
108
112
  readonly channel: Schema.Literal<"email">;
109
113
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
114
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
115
+ readonly shared: Schema.Boolean;
110
116
  readonly entryPath: Schema.String;
111
117
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
112
118
  readonly isActive: Schema.Boolean;
@@ -131,6 +137,8 @@ export type Template = {
131
137
  readonly name: string;
132
138
  readonly channel: "email";
133
139
  readonly projectId: TemplateProjectId;
140
+ readonly namespaceId: NamespaceId | null;
141
+ readonly shared: boolean;
134
142
  readonly entryPath: string;
135
143
  readonly status: "draft" | "pending" | "approved" | "published" | "rejected" | "archived";
136
144
  readonly isActive: boolean;
@@ -168,6 +176,8 @@ export declare const Template: Schema.Struct<{
168
176
  readonly name: Schema.String;
169
177
  readonly channel: Schema.Literal<"email">;
170
178
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
179
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
180
+ readonly shared: Schema.Boolean;
171
181
  readonly entryPath: Schema.String;
172
182
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
173
183
  readonly isActive: Schema.Boolean;
@@ -210,10 +220,12 @@ export declare const BrandRenderedFooter: Schema.Struct<{
210
220
  readonly withUnsubscribe: Schema.Struct<{
211
221
  readonly html: Schema.String;
212
222
  readonly text: Schema.String;
223
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
213
224
  }>;
214
225
  readonly withoutUnsubscribe: Schema.Struct<{
215
226
  readonly html: Schema.String;
216
227
  readonly text: Schema.String;
228
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
217
229
  }>;
218
230
  }>;
219
231
  export type TemplateFamily = {
@@ -250,6 +262,8 @@ export declare const TemplatePage: Schema.Struct<{
250
262
  readonly name: Schema.String;
251
263
  readonly channel: Schema.Literal<"email">;
252
264
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
265
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
266
+ readonly shared: Schema.Boolean;
253
267
  readonly entryPath: Schema.String;
254
268
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
255
269
  readonly isActive: Schema.Boolean;
@@ -301,6 +315,8 @@ export type TemplatesListQuery = {
301
315
  readonly status?: "draft" | "pending" | "approved" | "published" | "rejected" | "archived" | null;
302
316
  readonly search?: string | null;
303
317
  readonly projectId?: TemplateProjectId | null;
318
+ readonly namespaceId?: NamespaceId | null;
319
+ readonly shared?: "true" | "false" | null;
304
320
  };
305
321
  export declare const TemplatesListQuery: Schema.Struct<{
306
322
  readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
@@ -310,6 +326,8 @@ export declare const TemplatesListQuery: Schema.Struct<{
310
326
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>, Schema.Null]>>;
311
327
  readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
312
328
  readonly projectId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateProjectId">, Schema.Null]>>;
329
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
330
+ readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"true">, Schema.Literal<"false">]>, Schema.Null]>>;
313
331
  }>;
314
332
  export type TemplatesList200 = TemplatePage;
315
333
  export declare const TemplatesList200: Schema.Struct<{
@@ -319,6 +337,8 @@ export declare const TemplatesList200: Schema.Struct<{
319
337
  readonly name: Schema.String;
320
338
  readonly channel: Schema.Literal<"email">;
321
339
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
340
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
341
+ readonly shared: Schema.Boolean;
322
342
  readonly entryPath: Schema.String;
323
343
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
324
344
  readonly isActive: Schema.Boolean;
@@ -358,6 +378,8 @@ export type TemplatesCreateRequestJson = {
358
378
  readonly description?: string | null | null;
359
379
  readonly category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null;
360
380
  readonly isActive?: boolean | null;
381
+ readonly namespaceId?: NamespaceId | null;
382
+ readonly shared?: boolean | null;
361
383
  readonly idempotencyKey: string;
362
384
  };
363
385
  export declare const TemplatesCreateRequestJson: Schema.Struct<{
@@ -369,6 +391,8 @@ export declare const TemplatesCreateRequestJson: Schema.Struct<{
369
391
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
370
392
  readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>, Schema.Null]>>;
371
393
  readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
394
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
395
+ readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
372
396
  readonly idempotencyKey: Schema.String;
373
397
  }>;
374
398
  export type TemplatesCreate201 = Template;
@@ -378,6 +402,8 @@ export declare const TemplatesCreate201: Schema.Struct<{
378
402
  readonly name: Schema.String;
379
403
  readonly channel: Schema.Literal<"email">;
380
404
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
405
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
406
+ readonly shared: Schema.Boolean;
381
407
  readonly entryPath: Schema.String;
382
408
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
383
409
  readonly isActive: Schema.Boolean;
@@ -416,6 +442,8 @@ export type TemplatesCreate401 = UnauthorizedError;
416
442
  export declare const TemplatesCreate401: typeof UnauthorizedError;
417
443
  export type TemplatesCreate403 = ForbiddenError;
418
444
  export declare const TemplatesCreate403: typeof ForbiddenError;
445
+ export type TemplatesCreate404 = ResourceNotFoundError;
446
+ export declare const TemplatesCreate404: typeof ResourceNotFoundError;
419
447
  export type TemplatesCreate409 = ConflictError;
420
448
  export declare const TemplatesCreate409: typeof ConflictError;
421
449
  export type TemplatesCreate422 = ValidationError;
@@ -437,6 +465,8 @@ export declare const TemplatesGetById200: Schema.Struct<{
437
465
  readonly name: Schema.String;
438
466
  readonly channel: Schema.Literal<"email">;
439
467
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
468
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
469
+ readonly shared: Schema.Boolean;
440
470
  readonly entryPath: Schema.String;
441
471
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
442
472
  readonly isActive: Schema.Boolean;
@@ -521,6 +551,7 @@ export type TemplatesUpdateRequestJson = {
521
551
  readonly fromDefault?: TemplateFromDefault | null | null;
522
552
  readonly replyToDefault?: ReadonlyArray<string> | null | null;
523
553
  readonly isActive?: boolean | null;
554
+ readonly shared?: boolean | null;
524
555
  };
525
556
  };
526
557
  export declare const TemplatesUpdateRequestJson: Schema.Struct<{
@@ -536,6 +567,7 @@ export declare const TemplatesUpdateRequestJson: Schema.Struct<{
536
567
  }>, Schema.Null]>, Schema.Null]>>;
537
568
  readonly replyToDefault: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
538
569
  readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
570
+ readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
539
571
  }>;
540
572
  }>;
541
573
  export type TemplatesUpdate200 = Template;
@@ -545,6 +577,8 @@ export declare const TemplatesUpdate200: Schema.Struct<{
545
577
  readonly name: Schema.String;
546
578
  readonly channel: Schema.Literal<"email">;
547
579
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
580
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
581
+ readonly shared: Schema.Boolean;
548
582
  readonly entryPath: Schema.String;
549
583
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
550
584
  readonly isActive: Schema.Boolean;
@@ -870,10 +904,12 @@ export declare const TemplatesPublish201: Schema.Struct<{
870
904
  readonly withUnsubscribe: Schema.Struct<{
871
905
  readonly html: Schema.String;
872
906
  readonly text: Schema.String;
907
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
873
908
  }>;
874
909
  readonly withoutUnsubscribe: Schema.Struct<{
875
910
  readonly html: Schema.String;
876
911
  readonly text: Schema.String;
912
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
877
913
  }>;
878
914
  }>;
879
915
  readonly digest: Schema.String;
@@ -1143,10 +1179,12 @@ export declare const TemplatesGetPublication200: Schema.Struct<{
1143
1179
  readonly withUnsubscribe: Schema.Struct<{
1144
1180
  readonly html: Schema.String;
1145
1181
  readonly text: Schema.String;
1182
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1146
1183
  }>;
1147
1184
  readonly withoutUnsubscribe: Schema.Struct<{
1148
1185
  readonly html: Schema.String;
1149
1186
  readonly text: Schema.String;
1187
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
1150
1188
  }>;
1151
1189
  }>;
1152
1190
  readonly digest: Schema.String;
@@ -3586,6 +3624,8 @@ export declare const TemplatesAddEntry201: Schema.Struct<{
3586
3624
  readonly name: Schema.String;
3587
3625
  readonly channel: Schema.Literal<"email">;
3588
3626
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
3627
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
3628
+ readonly shared: Schema.Boolean;
3589
3629
  readonly entryPath: Schema.String;
3590
3630
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3591
3631
  readonly isActive: Schema.Boolean;
@@ -3648,6 +3688,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
3648
3688
  readonly name: Schema.String;
3649
3689
  readonly channel: Schema.Literal<"email">;
3650
3690
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
3691
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
3692
+ readonly shared: Schema.Boolean;
3651
3693
  readonly entryPath: Schema.String;
3652
3694
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
3653
3695
  readonly isActive: Schema.Boolean;
@@ -4259,6 +4301,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4259
4301
  readonly description: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Null]>, Schema.Null]>>;
4260
4302
  readonly category: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"transactional">, Schema.Literal<"marketing">, Schema.Literal<"support">, Schema.Literal<"notification">, Schema.Literal<"verification">, Schema.Literal<"reminder">, Schema.Literal<"alert">]>, Schema.Null]>, Schema.Null]>>;
4261
4303
  readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
4304
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
4305
+ readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
4262
4306
  readonly idempotencyKey: Schema.String;
4263
4307
  }>>, never, Schema.toCodecJson<Schema.Struct<{
4264
4308
  readonly id: Schema.brand<Schema.String, "TemplateId">;
@@ -4266,6 +4310,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4266
4310
  readonly name: Schema.String;
4267
4311
  readonly channel: Schema.Literal<"email">;
4268
4312
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
4313
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
4314
+ readonly shared: Schema.Boolean;
4269
4315
  readonly entryPath: Schema.String;
4270
4316
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
4271
4317
  readonly isActive: Schema.Boolean;
@@ -4347,6 +4393,26 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4347
4393
  readonly _tag: Schema.tag<"GatewayTimeoutError">;
4348
4394
  readonly message: Schema.String;
4349
4395
  readonly retryAfterSeconds: Schema.Finite;
4396
+ }>, never, never> | Schema.decodeTo<Schema.declareConstructor<ResourceNotFoundError, {
4397
+ readonly _tag: "ResourceNotFoundError";
4398
+ readonly resource: string;
4399
+ readonly id: string;
4400
+ readonly message: string;
4401
+ }, readonly [Schema.Struct<{
4402
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
4403
+ readonly resource: Schema.String;
4404
+ readonly id: Schema.String;
4405
+ readonly message: Schema.String;
4406
+ }>], {
4407
+ readonly _tag: "ResourceNotFoundError";
4408
+ readonly resource: string;
4409
+ readonly id: string;
4410
+ readonly message: string;
4411
+ }>, Schema.Struct<{
4412
+ readonly _tag: Schema.tag<"ResourceNotFoundError">;
4413
+ readonly resource: Schema.String;
4414
+ readonly id: Schema.String;
4415
+ readonly message: Schema.String;
4350
4416
  }>, never, never> | Schema.decodeTo<Schema.declareConstructor<UnauthorizedError, {
4351
4417
  readonly _tag: "UnauthorizedError";
4352
4418
  readonly message: string;
@@ -4903,6 +4969,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
4903
4969
  readonly name: Schema.String;
4904
4970
  readonly channel: Schema.Literal<"email">;
4905
4971
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
4972
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
4973
+ readonly shared: Schema.Boolean;
4906
4974
  readonly entryPath: Schema.String;
4907
4975
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
4908
4976
  readonly isActive: Schema.Boolean;
@@ -5378,10 +5446,12 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5378
5446
  readonly withUnsubscribe: Schema.Struct<{
5379
5447
  readonly html: Schema.String;
5380
5448
  readonly text: Schema.String;
5449
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5381
5450
  }>;
5382
5451
  readonly withoutUnsubscribe: Schema.Struct<{
5383
5452
  readonly html: Schema.String;
5384
5453
  readonly text: Schema.String;
5454
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5385
5455
  }>;
5386
5456
  }>;
5387
5457
  readonly digest: Schema.String;
@@ -5647,6 +5717,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5647
5717
  readonly status: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>, Schema.Null]>>;
5648
5718
  readonly search: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
5649
5719
  readonly projectId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "TemplateProjectId">, Schema.Null]>>;
5720
+ readonly namespaceId: Schema.optionalKey<Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>>;
5721
+ readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"true">, Schema.Literal<"false">]>, Schema.Null]>>;
5650
5722
  }>>, never, never, Schema.toCodecJson<Schema.Struct<{
5651
5723
  readonly items: Schema.$Array<Schema.Struct<{
5652
5724
  readonly id: Schema.brand<Schema.String, "TemplateId">;
@@ -5654,6 +5726,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
5654
5726
  readonly name: Schema.String;
5655
5727
  readonly channel: Schema.Literal<"email">;
5656
5728
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
5729
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
5730
+ readonly shared: Schema.Boolean;
5657
5731
  readonly entryPath: Schema.String;
5658
5732
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
5659
5733
  readonly isActive: Schema.Boolean;
@@ -6347,10 +6421,12 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
6347
6421
  readonly withUnsubscribe: Schema.Struct<{
6348
6422
  readonly html: Schema.String;
6349
6423
  readonly text: Schema.String;
6424
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6350
6425
  }>;
6351
6426
  readonly withoutUnsubscribe: Schema.Struct<{
6352
6427
  readonly html: Schema.String;
6353
6428
  readonly text: Schema.String;
6429
+ readonly headCss: Schema.optionalKey<Schema.Union<readonly [Schema.String, Schema.Null]>>;
6354
6430
  }>;
6355
6431
  }>;
6356
6432
  readonly digest: Schema.String;
@@ -7913,6 +7989,7 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7913
7989
  }>, Schema.Null]>, Schema.Null]>>;
7914
7990
  readonly replyToDefault: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.$Array<Schema.String>, Schema.Null]>, Schema.Null]>>;
7915
7991
  readonly isActive: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
7992
+ readonly shared: Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, Schema.Null]>>;
7916
7993
  }>;
7917
7994
  }>>, never, Schema.toCodecJson<Schema.Struct<{
7918
7995
  readonly id: Schema.brand<Schema.String, "TemplateId">;
@@ -7920,6 +7997,8 @@ declare const TemplatesGroup_base: HttpApiGroup.HttpApiGroup<"Templates", HttpAp
7920
7997
  readonly name: Schema.String;
7921
7998
  readonly channel: Schema.Literal<"email">;
7922
7999
  readonly projectId: Schema.brand<Schema.String, "TemplateProjectId">;
8000
+ readonly namespaceId: Schema.Union<readonly [Schema.brand<Schema.String, "NamespaceId">, Schema.Null]>;
8001
+ readonly shared: Schema.Boolean;
7923
8002
  readonly entryPath: Schema.String;
7924
8003
  readonly status: Schema.Union<readonly [Schema.Literal<"draft">, Schema.Literal<"pending">, Schema.Literal<"approved">, Schema.Literal<"published">, Schema.Literal<"rejected">, Schema.Literal<"archived">]>;
7925
8004
  readonly isActive: Schema.Boolean;