samva 0.3.0 → 0.4.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 (49) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +5 -1
  3. package/dist/client/sdk.gen.d.ts +167 -184
  4. package/dist/client/types.gen.d.ts +1362 -662
  5. package/dist/{client-BOghX8fr.js → client-BmZK_uCt.js} +1797 -935
  6. package/dist/client-attribution-BslSOa_8.js +9 -0
  7. package/dist/client-attribution.d.ts +2 -0
  8. package/dist/effect/api-keys.d.ts +51 -51
  9. package/dist/effect/api-keys.js +1 -1
  10. package/dist/effect/campaigns.d.ts +253 -219
  11. package/dist/effect/campaigns.js +1 -1
  12. package/dist/effect/categories.d.ts +6 -6
  13. package/dist/effect/client.js +1 -1
  14. package/dist/effect/contacts.d.ts +225 -225
  15. package/dist/effect/contacts.js +1 -1
  16. package/dist/effect/conversations.d.ts +293 -293
  17. package/dist/effect/conversations.js +1 -1
  18. package/dist/effect/design.d.ts +76 -76
  19. package/dist/effect/design.js +1 -1
  20. package/dist/effect/email.d.ts +225 -213
  21. package/dist/effect/email.js +2 -2
  22. package/dist/effect/generated.d.ts +12174 -11888
  23. package/dist/effect/index.js +1 -1
  24. package/dist/effect/internal/client.d.ts +1 -1
  25. package/dist/effect/internal/operation.d.ts +20 -19
  26. package/dist/effect/media.d.ts +9 -9
  27. package/dist/effect/media.js +1 -1
  28. package/dist/effect/messages.d.ts +64 -61
  29. package/dist/effect/messages.js +1 -1
  30. package/dist/effect/operations.d.ts +17 -17
  31. package/dist/effect/operations.js +1 -1
  32. package/dist/effect/organizations.d.ts +162 -162
  33. package/dist/effect/organizations.js +1 -1
  34. package/dist/effect/runtime.d.ts +0 -2
  35. package/dist/effect/scheduled-messages.d.ts +290 -276
  36. package/dist/effect/scheduled-messages.js +1 -1
  37. package/dist/effect/templates.d.ts +1371 -1554
  38. package/dist/effect/templates.js +40 -30
  39. package/dist/effect/webhooks.d.ts +47 -47
  40. package/dist/effect/webhooks.js +2 -2
  41. package/dist/index.js +1 -1
  42. package/dist/{normalize-BKFjbR9t.js → normalize-BiIJnycv.js} +2 -3
  43. package/dist/{operation-C2Q4cFJL.js → operation-B1knNlxk.js} +65 -38
  44. package/dist/promises/index.d.ts +10 -8
  45. package/dist/promises/index.js +1 -1
  46. package/dist/promises/types.gen.d.ts +1 -1
  47. package/dist/{promises-oiy7mOyu.js → promises-n1opem5V.js} +293 -262
  48. package/dist/service-map.d.ts +70 -44
  49. package/package.json +13 -14
package/AGENTS.md CHANGED
@@ -6,7 +6,7 @@ required.
6
6
 
7
7
  Effect applications should import Pascal-cased domain modules from focused subpaths such as
8
8
  `samva/effect/email` and provide `Client.layerFetch` from `samva/effect/client`. Install the optional
9
- peer `effect@4.0.0-rc.111` when using those entrypoints. Keep that exact release candidate pinned. Tagged API
9
+ peer `effect@4.0.0-rc.112` when using those entrypoints. Keep that exact release candidate pinned. Tagged API
10
10
  failures remain in the Effect error channel and can be handled with `Effect.catchTag`.
11
11
 
12
12
  Treat exported request and response types as the API contract. Do not import package-internal files
package/README.md CHANGED
@@ -65,7 +65,7 @@ const messages = await client.messages.list({
65
65
  Install `effect` next to `samva` when using the Effect entrypoint:
66
66
 
67
67
  ```bash
68
- bun add samva effect@4.0.0-rc.111
68
+ bun add samva effect@4.0.0-rc.112
69
69
  ```
70
70
 
71
71
  ```typescript
@@ -114,6 +114,10 @@ const client = createClient({
114
114
 
115
115
  For terminal workflows (`samva login`, `samva org use`, `samva email send --dry-run`), see the [`@samva/cli` README](https://github.com/AryaLabsHQ/samva/tree/main/packages/cli).
116
116
 
117
+ The Promise and Effect clients identify their public SDK surface and package version with the
118
+ advisory `x-samva-client` request header. Supply your own value in `headers`, or set the header to
119
+ `null` in Promise request options or `undefined` in Effect client configuration to omit it.
120
+
117
121
  ## Service Surface
118
122
 
119
123
  The Promise client exposes:
@@ -1,5 +1,5 @@
1
1
  import { type Client, type ClientMeta, type Options as Options2, type RequestResult, type TDataShape } from "./client";
2
- import type { ActorTracking, ApiKeyId, ApiKeyPermissions, ApiKeysCreateErrors, ApiKeysCreateResponses, ApiKeysGetActivityErrors, ApiKeysGetActivityResponses, ApiKeysGetErrors, ApiKeysGetResponses, ApiKeysGetStatsErrors, ApiKeysGetStatsResponses, ApiKeysListErrors, ApiKeysListResponses, ApiKeysRemoveErrors, ApiKeysRemoveResponses, ApiKeysRevokeErrors, ApiKeysRevokeResponses, ApiKeysRotateErrors, ApiKeysRotateResponses, ApiKeysUpdateErrors, ApiKeysUpdateResponses, BlockedEmailId, CampaignAudience, CampaignContentInput, CampaignId, CampaignPolicy, CampaignRunId, CampaignsArchiveErrors, CampaignsArchiveResponses, CampaignsCancelRunErrors, CampaignsCancelRunResponses, CampaignsCreateErrors, CampaignsCreateResponses, CampaignsGetErrors, CampaignsGetResponses, CampaignsGetRunErrors, CampaignsGetRunResponses, CampaignsListErrors, CampaignsListRecipientsErrors, CampaignsListRecipientsResponses, CampaignsListResponses, CampaignsListRunsErrors, CampaignsListRunsResponses, CampaignsPauseRunErrors, CampaignsPauseRunResponses, CampaignsResumeRunErrors, CampaignsResumeRunResponses, CampaignsScheduleRunErrors, CampaignsScheduleRunResponses, CampaignsUpdateErrors, CampaignsUpdateResponses, ContactAccessConfig, ContactId, ContactIdentity, ContactPreferences, ContactsBulkDeleteErrors, ContactsBulkDeleteResponses, ContactsBulkImportErrors, ContactsBulkImportResponses, ContactsBulkUpdateStatusErrors, ContactsBulkUpdateStatusResponses, ContactsBulkUpdateTagsErrors, ContactsBulkUpdateTagsResponses, ContactsCreateErrors, ContactsCreateResponses, ContactsExportErrors, ContactsExportResponses, ContactsFindErrors, ContactsFindOrCreateErrors, ContactsFindOrCreateResponses, ContactsFindResponses, ContactsGetActivityTimelineErrors, ContactsGetActivityTimelineResponses, ContactsGetEngagementErrors, ContactsGetEngagementResponses, ContactsGetErrors, ContactsGetGroupMembershipsErrors, ContactsGetGroupMembershipsResponses, ContactsGetResponses, ContactsListErrors, ContactsListResponses, ContactsRemoveErrors, ContactsRemoveResponses, ContactsUpdateErrors, ContactsUpdateResponses, ConversationContext, ConversationId, ConversationMetadata, ConversationMetrics, ConversationsAddContactsErrors, ConversationsAddContactsResponses, ConversationsCreateErrors, ConversationsCreateResponses, ConversationsGetByIdErrors, ConversationsGetByIdResponses, ConversationsListErrors, ConversationsListMessagesErrors, ConversationsListMessagesResponses, ConversationsListResponses, ConversationsRemoveContactsErrors, ConversationsRemoveContactsResponses, ConversationsUpdateErrors, ConversationsUpdateResponses, Design as Design3, DesignGetErrors, DesignGetResponses, DesignUpdateErrors, DesignUpdateResponses, DispatchSendMessagePayload, EmailAddBlockErrors, EmailAddBlockResponses, EmailAddDomainErrors, EmailAddDomainResponses, EmailAddSenderErrors, EmailAddSenderResponses, EmailAdvanceDomainVerificationErrors, EmailAdvanceDomainVerificationResponses, EmailBuildCustomTrackingDomainConnectApplyUrlErrors, EmailBuildCustomTrackingDomainConnectApplyUrlResponses, EmailBuildDomainConnectApplyUrlErrors, EmailBuildDomainConnectApplyUrlResponses, EmailCheckBlockedErrors, EmailCheckBlockedResponses, EmailCheckSenderVerificationErrors, EmailCheckSenderVerificationResponses, EmailClearDomainDefaultSenderErrors, EmailClearDomainDefaultSenderResponses, EmailCompleteCustomTrackingDomainConnectErrors, EmailCompleteCustomTrackingDomainConnectResponses, EmailCompleteDomainConnectErrors, EmailCompleteDomainConnectResponses, EmailCreateForwardingRuleErrors, EmailCreateForwardingRuleResponses, EmailDeleteForwardingRuleErrors, EmailDeleteForwardingRuleResponses, EmailDetectRegistrarErrors, EmailDetectRegistrarResponses, EmailDisableCatchAllErrors, EmailDisableCatchAllResponses, EmailDisableCustomTrackingErrors, EmailDisableCustomTrackingResponses, EmailDomainId, EmailEnableCatchAllErrors, EmailEnableCatchAllResponses, EmailEnableCustomTrackingErrors, EmailEnableCustomTrackingResponses, EmailEnableReceivingErrors, EmailEnableReceivingResponses, EmailForwardingRuleId, EmailGetBlockLogsErrors, EmailGetBlockLogsResponses, EmailGetCatchAllConfigErrors, EmailGetCatchAllConfigResponses, EmailGetCatchAllStatsErrors, EmailGetCatchAllStatsResponses, EmailGetCustomTrackingDomainConnectErrors, EmailGetCustomTrackingDomainConnectResponses, EmailGetCustomTrackingErrors, EmailGetCustomTrackingResponses, EmailGetDomainByIdErrors, EmailGetDomainByIdResponses, EmailGetDomainConnectErrors, EmailGetDomainConnectResponses, EmailGetDomainVerificationErrors, EmailGetDomainVerificationResponses, EmailGetForwardingLogErrors, EmailGetForwardingLogResponses, EmailGetRecipientTrackingPreferenceErrors, EmailGetRecipientTrackingPreferenceResponses, EmailGetStatsErrors, EmailGetStatsResponses, EmailGetTrackingDefaultsErrors, EmailGetTrackingDefaultsResponses, EmailListBlocksErrors, EmailListBlocksResponses, EmailListDomainsErrors, EmailListDomainsResponses, EmailListForwardingRulesErrors, EmailListForwardingRulesResponses, EmailListSendersErrors, EmailListSendersResponses, EmailListSuppressionsErrors, EmailListSuppressionsResponses, EmailRemoveBlockErrors, EmailRemoveBlockResponses, EmailRemoveDomainErrors, EmailRemoveDomainResponses, EmailRemoveSenderErrors, EmailRemoveSenderResponses, EmailRemoveSuppressionErrors, EmailRemoveSuppressionResponses, EmailSenderId, EmailSendMessagePayload, EmailSetDefaultDomainErrors, EmailSetDefaultDomainResponses, EmailSetDefaultSenderErrors, EmailSetDefaultSenderResponses, EmailSetDomainDefaultSenderErrors, EmailSetDomainDefaultSenderResponses, EmailUpdateBlockErrors, EmailUpdateBlockResponses, EmailUpdateCatchAllConfigErrors, EmailUpdateCatchAllConfigResponses, EmailUpdateDomainConfigErrors, EmailUpdateDomainConfigResponses, EmailUpdateForwardingRuleErrors, EmailUpdateForwardingRuleResponses, EmailUpdateRecipientTrackingPreferenceErrors, EmailUpdateRecipientTrackingPreferenceResponses, EmailUpdateTrackingDefaultsErrors, EmailUpdateTrackingDefaultsResponses, ForwardingConditions, HumanProfile, JsonObject, JsonValue, MailboxExtensionId, MediaCompleteErrors, MediaCompleteResponses, MediaCreateErrors, MediaCreateResponses, MediaDownloadUrlErrors, MediaDownloadUrlResponses, MediaGetByIdErrors, MediaGetByIdResponses, MediaId, MediaRemoveErrors, MediaRemoveResponses, MessageId, MessagesGetEmailErrors, MessagesGetEmailResponses, MessagesGetErrors, MessagesGetEventsErrors, MessagesGetEventsResponses, MessagesGetResponses, MessagesGetStatusErrors, MessagesGetStatusResponses, MessagesListErrors, MessagesListResponses, MessagesRemoveErrors, MessagesRemoveResponses, MessagesSendErrors, MessagesSendResponses, OperationId, OperationsGetErrors, OperationsGetResponses, OperationsListErrors, OperationsListResponses, OperationsRetryErrors, OperationsRetryResponses, OrganizationsBootstrapErrors, OrganizationsBootstrapResponses, OrganizationsCreateErrors, OrganizationsCreateResponses, OrganizationsDeleteErrors, OrganizationsDeleteResponses, OrganizationsGetErrors, OrganizationsGetResponses, OrganizationsGetUsageErrors, OrganizationsGetUsageResponses, OrganizationsUpdateErrors, OrganizationsUpdateResponses, ScheduledMessageId, ScheduledMessagesCancelErrors, ScheduledMessagesCancelResponses, ScheduledMessagesCreateErrors, ScheduledMessagesCreateResponses, ScheduledMessagesGetErrors, ScheduledMessagesGetResponses, ScheduledMessagesListErrors, ScheduledMessagesListResponses, SuppressionId, TemplateCompliance, TemplateDocumentsApplyAgentProposalErrors, TemplateDocumentsApplyAgentProposalResponses, TemplateDocumentsBootstrapErrors, TemplateDocumentsBootstrapResponses, TemplateDocumentsCompleteAgentConversationClearErrors, TemplateDocumentsCompleteAgentConversationClearResponses, TemplateDocumentsGetErrors, TemplateDocumentsGetResponses, TemplateDocumentsIssueAgentAdmissionErrors, TemplateDocumentsIssueAgentAdmissionResponses, TemplateDocumentsPublishErrors, TemplateDocumentsPublishResponses, TemplateDocumentsRenderErrors, TemplateDocumentsRenderResponses, TemplateDocumentsReplaceErrors, TemplateDocumentsReplaceResponses, TemplateDocumentsRestoreErrors, TemplateDocumentsRestoreResponses, TemplateDocumentsSaveErrors, TemplateDocumentsSaveResponses, TemplateDocumentsSendErrors, TemplateDocumentsSendResponses, TemplateDocumentsSpamCheckErrors, TemplateDocumentsSpamCheckResponses, TemplateDocumentsTestSendErrors, TemplateDocumentsTestSendResponses, TemplateDocumentsUnpublishErrors, TemplateDocumentsUnpublishResponses, TemplateDocumentsVersionsErrors, TemplateDocumentsVersionsResponses, TemplateFamilyId, TemplateFromDefault, TemplateId, TemplatePerformance, TemplatesAddFamilyChannelErrors, TemplatesAddFamilyChannelResponses, TemplatesApproveErrors, TemplatesApproveResponses, TemplatesAttachFamilyMemberErrors, TemplatesAttachFamilyMemberResponses, TemplatesCreateErrors, TemplatesCreateFamilyErrors, TemplatesCreateFamilyFromTemplateErrors, TemplatesCreateFamilyFromTemplateResponses, TemplatesCreateFamilyResponses, TemplatesCreateResponses, TemplatesDeleteFamilyErrors, TemplatesDeleteFamilyResponses, TemplatesDetachFamilyMemberErrors, TemplatesDetachFamilyMemberResponses, TemplatesGetByIdErrors, TemplatesGetByIdResponses, TemplatesGetFamilyErrors, TemplatesGetFamilyResponses, TemplatesListDashboardErrors, TemplatesListDashboardResponses, TemplatesListErrors, TemplatesListFamiliesErrors, TemplatesListFamiliesResponses, TemplatesListResponses, TemplateSourceVersionId, TemplatesRemoveErrors, TemplatesRemoveResponses, TemplatesRenameFamilyErrors, TemplatesRenameFamilyResponses, TemplatesUpdateErrors, TemplatesUpdateResponses, TemplateVariable, TrackingRecipientEmail, UnknownRecord, UnsubscribeId, WebhookDeliveryId, WebhookEndpointId, WebhooksCreateErrors, WebhooksCreateResponses, WebhooksGetErrors, WebhooksGetLogsErrors, WebhooksGetLogsResponses, WebhooksGetResponses, WebhooksGetStatsErrors, WebhooksGetStatsResponses, WebhooksListErrors, WebhooksListResponses, WebhooksRegenerateSecretErrors, WebhooksRegenerateSecretResponses, WebhooksRemoveErrors, WebhooksRemoveResponses, WebhooksRetryDeliveryErrors, WebhooksRetryDeliveryResponses, WebhooksTestErrors, WebhooksTestResponses, WebhooksUpdateErrors, WebhooksUpdateResponses } from "./types.gen";
2
+ import type { ActorTracking, ApiKeyId, ApiKeyPermissions, ApiKeysCreateErrors, ApiKeysCreateResponses, ApiKeysGetActivityErrors, ApiKeysGetActivityResponses, ApiKeysGetErrors, ApiKeysGetResponses, ApiKeysGetStatsErrors, ApiKeysGetStatsResponses, ApiKeysListErrors, ApiKeysListResponses, ApiKeysRemoveErrors, ApiKeysRemoveResponses, ApiKeysRevokeErrors, ApiKeysRevokeResponses, ApiKeysRotateErrors, ApiKeysRotateResponses, ApiKeysUpdateErrors, ApiKeysUpdateResponses, BlockedEmailId, CampaignAudience, CampaignContentInput, CampaignId, CampaignPolicy, CampaignRunId, CampaignsArchiveErrors, CampaignsArchiveResponses, CampaignsCancelRunErrors, CampaignsCancelRunResponses, CampaignsCreateErrors, CampaignsCreateResponses, CampaignsGetErrors, CampaignsGetResponses, CampaignsGetRunErrors, CampaignsGetRunResponses, CampaignsListErrors, CampaignsListRecipientsErrors, CampaignsListRecipientsResponses, CampaignsListResponses, CampaignsListRunsErrors, CampaignsListRunsResponses, CampaignsPauseRunErrors, CampaignsPauseRunResponses, CampaignsResumeRunErrors, CampaignsResumeRunResponses, CampaignsScheduleRunErrors, CampaignsScheduleRunResponses, CampaignsUpdateErrors, CampaignsUpdateResponses, ContactAccessConfig, ContactId, ContactIdentity, ContactPreferences, ContactsBulkDeleteErrors, ContactsBulkDeleteResponses, ContactsBulkImportErrors, ContactsBulkImportResponses, ContactsBulkUpdateStatusErrors, ContactsBulkUpdateStatusResponses, ContactsBulkUpdateTagsErrors, ContactsBulkUpdateTagsResponses, ContactsCreateErrors, ContactsCreateResponses, ContactsExportErrors, ContactsExportResponses, ContactsFindErrors, ContactsFindOrCreateErrors, ContactsFindOrCreateResponses, ContactsFindResponses, ContactsGetActivityTimelineErrors, ContactsGetActivityTimelineResponses, ContactsGetEngagementErrors, ContactsGetEngagementResponses, ContactsGetErrors, ContactsGetGroupMembershipsErrors, ContactsGetGroupMembershipsResponses, ContactsGetResponses, ContactsListErrors, ContactsListResponses, ContactsRemoveErrors, ContactsRemoveResponses, ContactsUpdateErrors, ContactsUpdateResponses, ConversationContext, ConversationId, ConversationMetadata, ConversationMetrics, ConversationsAddContactsErrors, ConversationsAddContactsResponses, ConversationsCreateErrors, ConversationsCreateResponses, ConversationsGetByIdErrors, ConversationsGetByIdResponses, ConversationsListErrors, ConversationsListMessagesErrors, ConversationsListMessagesResponses, ConversationsListResponses, ConversationsRemoveContactsErrors, ConversationsRemoveContactsResponses, ConversationsUpdateErrors, ConversationsUpdateResponses, Design as Design3, DesignGetErrors, DesignGetResponses, DesignUpdateErrors, DesignUpdateResponses, DispatchSendMessagePayload, EmailAddBlockErrors, EmailAddBlockResponses, EmailAddDomainErrors, EmailAddDomainResponses, EmailAddSenderErrors, EmailAddSenderResponses, EmailAdvanceDomainVerificationErrors, EmailAdvanceDomainVerificationResponses, EmailBuildCustomTrackingDomainConnectApplyUrlErrors, EmailBuildCustomTrackingDomainConnectApplyUrlResponses, EmailBuildDomainConnectApplyUrlErrors, EmailBuildDomainConnectApplyUrlResponses, EmailCheckBlockedErrors, EmailCheckBlockedResponses, EmailCheckSenderVerificationErrors, EmailCheckSenderVerificationResponses, EmailClearDomainDefaultSenderErrors, EmailClearDomainDefaultSenderResponses, EmailCompleteCustomTrackingDomainConnectErrors, EmailCompleteCustomTrackingDomainConnectResponses, EmailCompleteDomainConnectErrors, EmailCompleteDomainConnectResponses, EmailCreateForwardingRuleErrors, EmailCreateForwardingRuleResponses, EmailDeleteForwardingRuleErrors, EmailDeleteForwardingRuleResponses, EmailDetectRegistrarErrors, EmailDetectRegistrarResponses, EmailDisableCatchAllErrors, EmailDisableCatchAllResponses, EmailDisableCustomTrackingErrors, EmailDisableCustomTrackingResponses, EmailDomainId, EmailEnableCatchAllErrors, EmailEnableCatchAllResponses, EmailEnableCustomTrackingErrors, EmailEnableCustomTrackingResponses, EmailEnableReceivingErrors, EmailEnableReceivingResponses, EmailForwardingRuleId, EmailGetBlockLogsErrors, EmailGetBlockLogsResponses, EmailGetCatchAllConfigErrors, EmailGetCatchAllConfigResponses, EmailGetCatchAllStatsErrors, EmailGetCatchAllStatsResponses, EmailGetCustomTrackingDomainConnectErrors, EmailGetCustomTrackingDomainConnectResponses, EmailGetCustomTrackingErrors, EmailGetCustomTrackingResponses, EmailGetDomainByIdErrors, EmailGetDomainByIdResponses, EmailGetDomainConnectErrors, EmailGetDomainConnectResponses, EmailGetDomainVerificationErrors, EmailGetDomainVerificationResponses, EmailGetForwardingLogErrors, EmailGetForwardingLogResponses, EmailGetRecipientTrackingPreferenceErrors, EmailGetRecipientTrackingPreferenceResponses, EmailGetStatsErrors, EmailGetStatsResponses, EmailGetTrackingDefaultsErrors, EmailGetTrackingDefaultsResponses, EmailListBlocksErrors, EmailListBlocksResponses, EmailListDomainsErrors, EmailListDomainsResponses, EmailListForwardingRulesErrors, EmailListForwardingRulesResponses, EmailListSendersErrors, EmailListSendersResponses, EmailListSuppressionsErrors, EmailListSuppressionsResponses, EmailRemoveBlockErrors, EmailRemoveBlockResponses, EmailRemoveDomainErrors, EmailRemoveDomainResponses, EmailRemoveSenderErrors, EmailRemoveSenderResponses, EmailRemoveSuppressionErrors, EmailRemoveSuppressionResponses, EmailSenderId, EmailSendMessagePayload, EmailSetDefaultDomainErrors, EmailSetDefaultDomainResponses, EmailSetDefaultSenderErrors, EmailSetDefaultSenderResponses, EmailSetDomainDefaultSenderErrors, EmailSetDomainDefaultSenderResponses, EmailUpdateBlockErrors, EmailUpdateBlockResponses, EmailUpdateCatchAllConfigErrors, EmailUpdateCatchAllConfigResponses, EmailUpdateDomainConfigErrors, EmailUpdateDomainConfigResponses, EmailUpdateForwardingRuleErrors, EmailUpdateForwardingRuleResponses, EmailUpdateRecipientTrackingPreferenceErrors, EmailUpdateRecipientTrackingPreferenceResponses, EmailUpdateTrackingDefaultsErrors, EmailUpdateTrackingDefaultsResponses, ForwardingConditions, HumanProfile, JsonObject, JsonValue, MediaCompleteErrors, MediaCompleteResponses, MediaCreateErrors, MediaCreateResponses, MediaDownloadUrlErrors, MediaDownloadUrlResponses, MediaGetByIdErrors, MediaGetByIdResponses, MediaId, MediaRemoveErrors, MediaRemoveResponses, MessageId, MessagesGetEmailErrors, MessagesGetEmailResponses, MessagesGetErrors, MessagesGetEventsErrors, MessagesGetEventsResponses, MessagesGetResponses, MessagesGetStatusErrors, MessagesGetStatusResponses, MessagesListErrors, MessagesListResponses, MessagesRemoveErrors, MessagesRemoveResponses, MessagesSendErrors, MessagesSendResponses, OperationId, OperationsGetErrors, OperationsGetResponses, OperationsListErrors, OperationsListResponses, OperationsRetryErrors, OperationsRetryResponses, OrganizationsBootstrapErrors, OrganizationsBootstrapResponses, OrganizationsCreateErrors, OrganizationsCreateResponses, OrganizationsDeleteErrors, OrganizationsDeleteResponses, OrganizationsGetErrors, OrganizationsGetResponses, OrganizationsGetUsageErrors, OrganizationsGetUsageResponses, OrganizationsUpdateErrors, OrganizationsUpdateResponses, ScheduledMessageId, ScheduledMessagesCancelErrors, ScheduledMessagesCancelResponses, ScheduledMessagesCreateErrors, ScheduledMessagesCreateResponses, ScheduledMessagesGetErrors, ScheduledMessagesGetResponses, ScheduledMessagesListErrors, ScheduledMessagesListResponses, SuppressionId, TemplateFamilyId, TemplateFromDefault, TemplateId, TemplateInputContractId, TemplateProjectId, TemplatePublicationId, TemplatesAttachFamilyMemberErrors, TemplatesAttachFamilyMemberResponses, TemplatesAttachWorkspaceResourceErrors, TemplatesAttachWorkspaceResourceResponses, TemplatesCheckWorkspaceErrors, TemplatesCheckWorkspaceResponses, TemplatesCreateErrors, TemplatesCreateFamilyErrors, TemplatesCreateFamilyFromTemplateErrors, TemplatesCreateFamilyFromTemplateResponses, TemplatesCreateFamilyResponses, TemplatesCreateResponses, TemplatesDeleteFamilyErrors, TemplatesDeleteFamilyResponses, TemplatesDetachFamilyMemberErrors, TemplatesDetachFamilyMemberResponses, TemplatesDiffWorkspaceErrors, TemplatesDiffWorkspaceResponses, TemplatesGetByIdErrors, TemplatesGetByIdResponses, TemplatesGetFamilyErrors, TemplatesGetFamilyResponses, TemplatesGetGitRepositoryErrors, TemplatesGetGitRepositoryResponses, TemplatesGetInputContractErrors, TemplatesGetInputContractResponses, TemplatesGetPublicationErrors, TemplatesGetPublicationResponses, TemplatesIssueGitCredentialErrors, TemplatesIssueGitCredentialResponses, TemplatesListDashboardErrors, TemplatesListDashboardResponses, TemplatesListErrors, TemplatesListFamiliesErrors, TemplatesListFamiliesResponses, TemplatesListInputContractsErrors, TemplatesListInputContractsResponses, TemplatesListResponses, TemplatesOpenWorkspaceErrors, TemplatesOpenWorkspaceResponses, TemplatesPatchWorkspaceErrors, TemplatesPatchWorkspaceResponses, TemplatesPublishErrors, TemplatesPublishResponses, TemplatesReconcileWorkspaceErrors, TemplatesReconcileWorkspaceResponses, TemplatesRemoveErrors, TemplatesRemoveResponses, TemplatesRemoveWorkspaceResourceErrors, TemplatesRemoveWorkspaceResourceResponses, TemplatesRenameFamilyErrors, TemplatesRenameFamilyResponses, TemplatesRenderWorkspaceFixtureErrors, TemplatesRenderWorkspaceFixtureResponses, TemplatesResolveWorkspaceConflictErrors, TemplatesResolveWorkspaceConflictResponses, TemplatesRestoreWorkspaceErrors, TemplatesRestoreWorkspaceResponses, TemplatesSaveWorkspaceErrors, TemplatesSaveWorkspaceResponses, TemplatesUpdateErrors, TemplatesUpdateResponses, TemplatesWorkspaceHistoryErrors, TemplatesWorkspaceHistoryResponses, TrackingRecipientEmail, UnknownRecord, UnsubscribeId, WebhookDeliveryId, WebhookEndpointId, WebhooksCreateErrors, WebhooksCreateResponses, WebhooksGetErrors, WebhooksGetLogsErrors, WebhooksGetLogsResponses, WebhooksGetResponses, WebhooksGetStatsErrors, WebhooksGetStatsResponses, WebhooksListErrors, WebhooksListResponses, WebhooksRegenerateSecretErrors, WebhooksRegenerateSecretResponses, WebhooksRemoveErrors, WebhooksRemoveResponses, WebhooksRetryDeliveryErrors, WebhooksRetryDeliveryResponses, WebhooksTestErrors, WebhooksTestResponses, WebhooksUpdateErrors, WebhooksUpdateResponses } from "./types.gen";
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -17,12 +17,13 @@ export declare class Messages {
17
17
  /**
18
18
  * List messages
19
19
  *
20
- * Returns a paginated list of messages across all channels, with optional filters for channel, status, conversation, contact, and date range.
20
+ * Returns a paginated list of messages across all channels, with optional filters for channel, direction, status, conversation, contact, and date range.
21
21
  */
22
22
  static list<ThrowOnError extends boolean = false>(parameters?: {
23
23
  page?: string | null | undefined;
24
24
  limit?: string | null | undefined;
25
25
  channel?: "email" | null | undefined;
26
+ direction?: "outbound" | "inbound" | null | undefined;
26
27
  status?: "pending" | "scheduled" | "queued" | "processing" | "sent" | "delivered" | "read" | "failed" | "bounced" | "complained" | null | undefined;
27
28
  conversationId?: ConversationId | null | undefined;
28
29
  contactId?: ContactId | null | undefined;
@@ -130,7 +131,7 @@ export declare class ScheduledMessages {
130
131
  /**
131
132
  * Schedule a message
132
133
  *
133
- * Schedules a message at the absolute ISO-8601 instant in scheduledFor. Optional timezone is validated IANA display metadata only and never changes the execution instant.
134
+ * Schedules a message for dispatch at the absolute ISO-8601 timestamp supplied in scheduledFor. Optional timezone is validated IANA display metadata only and never changes the execution instant.
134
135
  */
135
136
  static create<ThrowOnError extends boolean = false>(parameters: {
136
137
  send: DispatchSendMessagePayload;
@@ -287,7 +288,7 @@ export declare class Email {
287
288
  /**
288
289
  * Get email tracking defaults
289
290
  *
290
- * Returns the organization's default open and click tracking policy. Each field is independent and defaults to enabled. Recipient opt-out takes precedence over these defaults.
291
+ * Returns the workspace's independent defaults for open and click tracking, both enabled unless configured otherwise. Recipient opt-out takes precedence over these defaults.
291
292
  */
292
293
  static getTrackingDefaults<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): RequestResult<EmailGetTrackingDefaultsResponses, EmailGetTrackingDefaultsErrors, ThrowOnError>;
293
294
  /**
@@ -328,10 +329,14 @@ export declare class Email {
328
329
  /**
329
330
  * Add a sending domain
330
331
  *
331
- * Registers a domain for sending and returns it with the DNS records required to verify ownership and configure DKIM. Responds with 201.
332
+ * Registers a domain for sending and returns it with the DNS records required to verify ownership and configure DKIM. Responds with 201. Supplying a connection attaches the domain to that DNS account; the domain must sit inside the zone given with it.
332
333
  */
333
334
  static addDomain<ThrowOnError extends boolean = false>(parameters: {
334
335
  domain: string;
336
+ connection?: {
337
+ connectionId: string;
338
+ zone: string;
339
+ } | null | undefined;
335
340
  }, options?: Options<never, ThrowOnError>): RequestResult<EmailAddDomainResponses, EmailAddDomainErrors, ThrowOnError>;
336
341
  /**
337
342
  * Get domain verification
@@ -455,7 +460,7 @@ export declare class Email {
455
460
  /**
456
461
  * Disable a custom tracking domain
457
462
  *
458
- * Tears down a domain's custom tracking and its managed resources. Sends immediately revert to the shared tracking host. Existing custom links in already-delivered mail stop working.
463
+ * Disables a domain's custom tracking, removes its managed resources, and immediately returns sends to the shared tracking host. Existing custom links in already-delivered mail stop working.
459
464
  */
460
465
  static disableCustomTracking<ThrowOnError extends boolean = false>(parameters: {
461
466
  id: EmailDomainId;
@@ -518,9 +523,10 @@ export declare class Email {
518
523
  /**
519
524
  * Add a sender identity
520
525
  *
521
- * Creates a sender identity for an email address and returns it. Responds with 201.
526
+ * Durably creates a sender identity. The required Idempotency-Key replays the original sender for an identical request and conflicts when reused with different input.
522
527
  */
523
528
  static addSender<ThrowOnError extends boolean = false>(parameters: {
529
+ "idempotency-key": string;
524
530
  email: string;
525
531
  domainId?: EmailDomainId | null | undefined;
526
532
  name?: string | null | null | undefined;
@@ -537,7 +543,7 @@ export declare class Email {
537
543
  /**
538
544
  * Remove a sender identity
539
545
  *
540
- * Permanently deletes a sender identity from the organization.
546
+ * Accepts sender removal, marks it inactive, and retains its deleting lifecycle until provider identity and association cleanup is confirmed.
541
547
  */
542
548
  static removeSender<ThrowOnError extends boolean = false>(parameters: {
543
549
  id: EmailSenderId;
@@ -1136,26 +1142,17 @@ export declare class Templates {
1136
1142
  /**
1137
1143
  * Create a template
1138
1144
  *
1139
- * Creates a template from SML source; the source's root tag determines the template's channel. Returns the created template with status 201.
1145
+ * Creates an email template project from Samva's canonical TSX starter and returns its template entry with status 201.
1140
1146
  */
1141
1147
  static create<ThrowOnError extends boolean = false>(parameters: {
1142
1148
  name: string;
1149
+ projectName?: string | null | undefined;
1143
1150
  slug?: string | null | undefined;
1144
- origin?: "dashboard" | "tsx" | null | undefined;
1151
+ galleryTemplateId?: string | null | undefined;
1145
1152
  description?: string | null | null | undefined;
1146
1153
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
1147
- source: string;
1148
- subject?: string | null | undefined;
1149
- headers?: {
1150
- [key: string]: string;
1151
- } | null | null | undefined;
1152
- variableSchema?: Array<TemplateVariable> | null | null | undefined;
1153
- compliance?: TemplateCompliance | null | null | undefined;
1154
- performance?: TemplatePerformance | null | null | undefined;
1155
- designOverrides?: Design3 | null | null | undefined;
1156
1154
  isActive?: boolean | null | undefined;
1157
- isDefault?: boolean | null | undefined;
1158
- version?: number | null | undefined;
1155
+ idempotencyKey: string;
1159
1156
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesCreateResponses, TemplatesCreateErrors, ThrowOnError>;
1160
1157
  /**
1161
1158
  * List templates for the dashboard
@@ -1242,15 +1239,6 @@ export declare class Templates {
1242
1239
  familyId: TemplateFamilyId;
1243
1240
  templateId: TemplateId;
1244
1241
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesAttachFamilyMemberResponses, TemplatesAttachFamilyMemberErrors, ThrowOnError>;
1245
- /**
1246
- * Add a channel to a template family
1247
- *
1248
- * Creates a template for the requested channel in the family and returns the updated family with status 201.
1249
- */
1250
- static addFamilyChannel<ThrowOnError extends boolean = false>(parameters: {
1251
- familyId: TemplateFamilyId;
1252
- channel: "email";
1253
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesAddFamilyChannelResponses, TemplatesAddFamilyChannelErrors, ThrowOnError>;
1254
1242
  /**
1255
1243
  * Delete a template
1256
1244
  *
@@ -1262,7 +1250,7 @@ export declare class Templates {
1262
1250
  /**
1263
1251
  * Get a template
1264
1252
  *
1265
- * Returns template metadata and compiled channel content. Read live SML through the template-document API.
1253
+ * Returns template metadata, its project entry path, and compiled channel content. Open live project files through the workspace API.
1266
1254
  */
1267
1255
  static getById<ThrowOnError extends boolean = false>(parameters: {
1268
1256
  id: TemplateId;
@@ -1270,221 +1258,216 @@ export declare class Templates {
1270
1258
  /**
1271
1259
  * Update a template
1272
1260
  *
1273
- * Updates template metadata. Source changes use the template-document revision API.
1261
+ * Updates template metadata. Source changes use the project workspace API.
1274
1262
  */
1275
1263
  static update<ThrowOnError extends boolean = false>(parameters: {
1276
1264
  id: TemplateId;
1277
1265
  data: {
1278
1266
  name?: string | null | undefined;
1279
1267
  slug?: string | null | undefined;
1280
- origin?: "dashboard" | "tsx" | null | undefined;
1281
1268
  description?: string | null | null | undefined;
1282
1269
  category?: "transactional" | "marketing" | "support" | "notification" | "verification" | "reminder" | "alert" | null | null | undefined;
1283
1270
  fromDefault?: TemplateFromDefault | null | null | undefined;
1284
1271
  replyToDefault?: Array<string> | null | null | undefined;
1285
- variableSchema?: Array<TemplateVariable> | null | null | undefined;
1286
- compliance?: TemplateCompliance | null | null | undefined;
1287
- performance?: TemplatePerformance | null | null | undefined;
1288
- designOverrides?: Design3 | null | null | undefined;
1289
1272
  isActive?: boolean | null | undefined;
1290
- isDefault?: boolean | null | undefined;
1291
- version?: number | null | undefined;
1292
1273
  };
1293
1274
  }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesUpdateResponses, TemplatesUpdateErrors, ThrowOnError>;
1294
1275
  /**
1295
- * Approve a template
1276
+ * Patch template project files
1296
1277
  *
1297
- * Records compliance approval for a template with optional notes and moves its status to approved unless it is already published or archived.
1278
+ * Applies revision-checked file patches to the shared project workspace overlay.
1298
1279
  */
1299
- static approve<ThrowOnError extends boolean = false>(parameters: {
1280
+ static patchWorkspace<ThrowOnError extends boolean = false>(parameters: {
1300
1281
  id: TemplateId;
1301
- data: {
1302
- notes?: string | null | undefined;
1303
- };
1304
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesApproveResponses, TemplatesApproveErrors, ThrowOnError>;
1305
- }
1306
- export declare class Templates2 {
1307
- static templates: typeof Templates;
1308
- }
1309
- export declare class TemplateDocuments {
1282
+ expectedRevision: string;
1283
+ patches: Array<{
1284
+ path: string;
1285
+ content: string | null;
1286
+ }>;
1287
+ idempotencyKey: string;
1288
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesPatchWorkspaceResponses, TemplatesPatchWorkspaceErrors, ThrowOnError>;
1310
1289
  /**
1311
- * Bootstrap a template document
1290
+ * Open a template project workspace
1312
1291
  *
1313
- * Creates or loads the authoritative editable document for a template and returns its current snapshot.
1292
+ * Creates or opens the shared project workspace at the current Artifact branch head and returns its effective files.
1314
1293
  */
1315
- static bootstrap<ThrowOnError extends boolean = false>(parameters: {
1316
- templateId: TemplateId;
1317
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsBootstrapResponses, TemplateDocumentsBootstrapErrors, ThrowOnError>;
1294
+ static openWorkspace<ThrowOnError extends boolean = false>(parameters: {
1295
+ id: TemplateId;
1296
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesOpenWorkspaceResponses, TemplatesOpenWorkspaceErrors, ThrowOnError>;
1318
1297
  /**
1319
- * Get a template document
1298
+ * Diff a template project workspace
1320
1299
  *
1321
- * Returns the current authoritative source, revision, and metadata for a template document.
1300
+ * Returns exact added, modified, and deleted project files against the current Git base commit.
1322
1301
  */
1323
- static get<ThrowOnError extends boolean = false>(parameters: {
1324
- templateId: TemplateId;
1325
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsGetResponses, TemplateDocumentsGetErrors, ThrowOnError>;
1302
+ static diffWorkspace<ThrowOnError extends boolean = false>(parameters: {
1303
+ id: TemplateId;
1304
+ expectedRevision: string;
1305
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesDiffWorkspaceResponses, TemplatesDiffWorkspaceErrors, ThrowOnError>;
1326
1306
  /**
1327
- * Issue an agent admission
1307
+ * Reconcile a template project workspace
1328
1308
  *
1329
- * Authorizes a bounded template-agent operation against the current document and returns the admission context.
1309
+ * Fast-forwards or rebases the workspace onto the current Artifact branch head, retaining file conflicts for explicit resolution.
1330
1310
  */
1331
- static issueAgentAdmission<ThrowOnError extends boolean = false>(parameters: {
1332
- templateId: TemplateId;
1333
- method: "GET" | "HEAD" | "POST";
1334
- route: "prompt" | "read" | "abort" | "clear";
1335
- referenceDigest?: string | undefined;
1336
- research?: {
1337
- kind: "query";
1338
- query: string;
1339
- } | {
1340
- kind: "url";
1341
- url: string;
1342
- } | {
1343
- kind: "styleguide";
1344
- domain: string;
1345
- } | undefined;
1346
- competitorMessage?: {
1347
- watchId: MailboxExtensionId;
1348
- messageId: MessageId;
1349
- } | undefined;
1350
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsIssueAgentAdmissionResponses, TemplateDocumentsIssueAgentAdmissionErrors, ThrowOnError>;
1351
- /**
1352
- * Complete an agent conversation clear
1353
- *
1354
- * Records completion of an admitted agent conversation-clear operation for the template document.
1355
- */
1356
- static completeAgentConversationClear<ThrowOnError extends boolean = false>(parameters: {
1357
- templateId: TemplateId;
1358
- conversationId: string;
1359
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsCompleteAgentConversationClearResponses, TemplateDocumentsCompleteAgentConversationClearErrors, ThrowOnError>;
1311
+ static reconcileWorkspace<ThrowOnError extends boolean = false>(parameters: {
1312
+ id: TemplateId;
1313
+ expectedRevision: string;
1314
+ assetResolution?: "draft" | "remote" | undefined;
1315
+ expectedRemoteHead?: string | undefined;
1316
+ idempotencyKey: string;
1317
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesReconcileWorkspaceResponses, TemplatesReconcileWorkspaceErrors, ThrowOnError>;
1360
1318
  /**
1361
- * Apply an agent proposal
1319
+ * Resolve a template workspace conflict
1362
1320
  *
1363
- * Applies an admitted agent-authored source proposal when its revision and source digest still match the document.
1321
+ * Resolves one conflicted file by keeping the draft, using main, or supplying edited source.
1364
1322
  */
1365
- static applyAgentProposal<ThrowOnError extends boolean = false>(parameters: {
1366
- templateId: TemplateId;
1323
+ static resolveWorkspaceConflict<ThrowOnError extends boolean = false>(parameters: {
1324
+ id: TemplateId;
1367
1325
  expectedRevision: string;
1368
- sourceDigest: string;
1326
+ path: string;
1327
+ resolution: "draft" | "main" | {
1328
+ content: string | null;
1329
+ };
1369
1330
  idempotencyKey: string;
1370
- source: string;
1371
- references: Array<{
1372
- kind: string;
1373
- digest: string;
1374
- locator?: string | undefined;
1375
- }>;
1376
- proposalBinding?: string | undefined;
1377
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsApplyAgentProposalResponses, TemplateDocumentsApplyAgentProposalErrors, ThrowOnError>;
1331
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesResolveWorkspaceConflictResponses, TemplatesResolveWorkspaceConflictErrors, ThrowOnError>;
1378
1332
  /**
1379
- * Replace template source
1333
+ * Save a template project workspace
1380
1334
  *
1381
- * Replaces the editable SML source when the expected revision matches and returns the updated document snapshot.
1335
+ * Validates the effective project tree and creates one normal Git commit on the Artifact default branch.
1382
1336
  */
1383
- static replace<ThrowOnError extends boolean = false>(parameters: {
1384
- templateId: TemplateId;
1337
+ static saveWorkspace<ThrowOnError extends boolean = false>(parameters: {
1338
+ id: TemplateId;
1385
1339
  expectedRevision: string;
1386
- source: string;
1387
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsReplaceResponses, TemplateDocumentsReplaceErrors, ThrowOnError>;
1340
+ expectedHead: string;
1341
+ message: string;
1342
+ idempotencyKey: string;
1343
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesSaveWorkspaceResponses, TemplatesSaveWorkspaceErrors, ThrowOnError>;
1388
1344
  /**
1389
- * Save a template document
1345
+ * Stage a historical template project tree
1390
1346
  *
1391
- * Materializes the specified document revision as a durable template source version and returns its receipt.
1347
+ * Builds the template entry before atomically staging a reachable historical commit and its emitted source; a later Save appends a new commit without rewriting branch history.
1392
1348
  */
1393
- static save<ThrowOnError extends boolean = false>(parameters: {
1394
- templateId: TemplateId;
1395
- revision: string;
1396
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsSaveResponses, TemplateDocumentsSaveErrors, ThrowOnError>;
1349
+ static restoreWorkspace<ThrowOnError extends boolean = false>(parameters: {
1350
+ id: TemplateId;
1351
+ expectedRevision: string;
1352
+ commit: string;
1353
+ idempotencyKey: string;
1354
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesRestoreWorkspaceResponses, TemplatesRestoreWorkspaceErrors, ThrowOnError>;
1397
1355
  /**
1398
- * Render a template document
1356
+ * List template project commit history
1399
1357
  *
1400
- * Renders the specified document revision with optional variables and reports any missing variables.
1358
+ * Returns bounded history from the Artifact repository default branch.
1401
1359
  */
1402
- static render<ThrowOnError extends boolean = false>(parameters: {
1403
- templateId: TemplateId;
1404
- revision: string;
1405
- variables?: {
1406
- [key: string]: JsonValue;
1407
- } | null | undefined;
1408
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsRenderResponses, TemplateDocumentsRenderErrors, ThrowOnError>;
1360
+ static workspaceHistory<ThrowOnError extends boolean = false>(parameters: {
1361
+ id: TemplateId;
1362
+ limit?: string | null | undefined;
1363
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesWorkspaceHistoryResponses, TemplatesWorkspaceHistoryErrors, ThrowOnError>;
1409
1364
  /**
1410
- * Check a template document for spam
1365
+ * Check a template project workspace
1411
1366
  *
1412
- * Renders and analyzes the specified document revision for spam risks, returning issues and recommendations.
1367
+ * Builds the template entry from the current effective workspace tree, including unsaved file patches, and returns what the template declares plus every compile and target-client finding. Nothing is written and no message is rendered.
1413
1368
  */
1414
- static spamCheck<ThrowOnError extends boolean = false>(parameters: {
1415
- templateId: TemplateId;
1416
- revision: string;
1417
- variables?: {
1418
- [key: string]: JsonValue;
1419
- } | null | undefined;
1420
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsSpamCheckResponses, TemplateDocumentsSpamCheckErrors, ThrowOnError>;
1369
+ static checkWorkspace<ThrowOnError extends boolean = false>(parameters: {
1370
+ id: TemplateId;
1371
+ expectedRevision: string;
1372
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesCheckWorkspaceResponses, TemplatesCheckWorkspaceErrors, ThrowOnError>;
1421
1373
  /**
1422
- * Send a template test
1374
+ * Render a declared template workspace fixture
1423
1375
  *
1424
- * Renders the specified document revision and sends a test message to one recipient without publishing it.
1376
+ * Renders one of the named inputs the template declares against the current effective workspace tree. Only declared fixtures render here; arbitrary input renders against a publication.
1425
1377
  */
1426
- static testSend<ThrowOnError extends boolean = false>(parameters: {
1427
- templateId: TemplateId;
1428
- revision: string;
1429
- to: string;
1430
- variables?: {
1431
- [key: string]: JsonValue;
1432
- } | null | undefined;
1433
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsTestSendResponses, TemplateDocumentsTestSendErrors, ThrowOnError>;
1378
+ static renderWorkspaceFixture<ThrowOnError extends boolean = false>(parameters: {
1379
+ id: TemplateId;
1380
+ expectedRevision: string;
1381
+ fixture: string;
1382
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesRenderWorkspaceFixtureResponses, TemplatesRenderWorkspaceFixtureErrors, ThrowOnError>;
1434
1383
  /**
1435
- * Send a template document
1384
+ * Publish an exact template commit
1436
1385
  *
1437
- * Sends or schedules the specified document revision for one or more recipients with optional variables.
1386
+ * Builds an exact Git commit and entry path, stores the immutable executable and its assets, records the input contract it validates against, and makes that publication current.
1438
1387
  */
1439
- static send<ThrowOnError extends boolean = false>(parameters: {
1440
- templateId: TemplateId;
1441
- revision: string;
1442
- to: Array<{
1443
- address: string;
1444
- name?: string | null | undefined;
1445
- }>;
1446
- variables?: {
1447
- [key: string]: JsonValue;
1448
- } | null | undefined;
1449
- schedule?: string | null | null | undefined;
1450
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsSendResponses, TemplateDocumentsSendErrors, ThrowOnError>;
1388
+ static publish<ThrowOnError extends boolean = false>(parameters: {
1389
+ id: TemplateId;
1390
+ projectId: TemplateProjectId;
1391
+ commitSha: string;
1392
+ entryPath: string;
1393
+ expectedWorkspaceRevision: string;
1394
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesPublishResponses, TemplatesPublishErrors, ThrowOnError>;
1451
1395
  /**
1452
- * List template document versions
1396
+ * Get a template publication
1453
1397
  *
1454
- * Returns the saved source-version history for a template document.
1398
+ * Returns one immutable publication and its exact build receipt.
1455
1399
  */
1456
- static versions<ThrowOnError extends boolean = false>(parameters: {
1457
- templateId: TemplateId;
1458
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsVersionsResponses, TemplateDocumentsVersionsErrors, ThrowOnError>;
1400
+ static getPublication<ThrowOnError extends boolean = false>(parameters: {
1401
+ id: TemplateId;
1402
+ publicationId: TemplatePublicationId;
1403
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesGetPublicationResponses, TemplatesGetPublicationErrors, ThrowOnError>;
1459
1404
  /**
1460
- * Publish a template document
1405
+ * List a template's input contracts
1461
1406
  *
1462
- * Publishes the current saved template source version and returns its lifecycle receipt.
1407
+ * Returns every immutable input contract this template has published under, newest version first. Send against a contract to follow later publications that validate input identically.
1463
1408
  */
1464
- static publish<ThrowOnError extends boolean = false>(parameters: {
1465
- templateId: TemplateId;
1466
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsPublishResponses, TemplateDocumentsPublishErrors, ThrowOnError>;
1409
+ static listInputContracts<ThrowOnError extends boolean = false>(parameters: {
1410
+ id: TemplateId;
1411
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesListInputContractsResponses, TemplatesListInputContractsErrors, ThrowOnError>;
1467
1412
  /**
1468
- * Unpublish a template document
1413
+ * Get a template input contract
1469
1414
  *
1470
- * Unpublishes the current template source version and returns its lifecycle receipt.
1415
+ * Returns one immutable input contract and the published schema it validates against.
1471
1416
  */
1472
- static unpublish<ThrowOnError extends boolean = false>(parameters: {
1473
- templateId: TemplateId;
1474
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsUnpublishResponses, TemplateDocumentsUnpublishErrors, ThrowOnError>;
1417
+ static getInputContract<ThrowOnError extends boolean = false>(parameters: {
1418
+ id: TemplateId;
1419
+ inputContractId: TemplateInputContractId;
1420
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesGetInputContractResponses, TemplatesGetInputContractErrors, ThrowOnError>;
1475
1421
  /**
1476
- * Restore a template document version
1422
+ * Get a template project Git repository
1477
1423
  *
1478
- * Restores a saved source version into the editable document when the expected revision matches.
1424
+ * Returns the credential-free HTTPS remote and default branch for the template project repository.
1479
1425
  */
1480
- static restore<ThrowOnError extends boolean = false>(parameters: {
1481
- templateId: TemplateId;
1482
- versionId: TemplateSourceVersionId;
1426
+ static getGitRepository<ThrowOnError extends boolean = false>(parameters: {
1427
+ id: TemplateId;
1428
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesGetGitRepositoryResponses, TemplatesGetGitRepositoryErrors, ThrowOnError>;
1429
+ /**
1430
+ * Issue a template project Git credential
1431
+ *
1432
+ * Exchanges the caller's Samva authorization for a one-hour, repository-scoped Artifact Git credential.
1433
+ */
1434
+ static issueGitCredential<ThrowOnError extends boolean = false>(parameters: {
1435
+ id: TemplateId;
1436
+ scope: "read" | "write";
1437
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesIssueGitCredentialResponses, TemplatesIssueGitCredentialErrors, ThrowOnError>;
1438
+ /**
1439
+ * Attach a template workspace resource
1440
+ *
1441
+ * Adds or replaces one bounded persistent read-only resource and advances the workspace revision.
1442
+ */
1443
+ static attachWorkspaceResource<ThrowOnError extends boolean = false>(parameters: {
1444
+ id: TemplateId;
1483
1445
  expectedRevision: string;
1484
- }, options?: Options<never, ThrowOnError>): RequestResult<TemplateDocumentsRestoreResponses, TemplateDocumentsRestoreErrors, ThrowOnError>;
1446
+ resource: {
1447
+ resourceId: string;
1448
+ name: string;
1449
+ files: Array<{
1450
+ path: string;
1451
+ mediaType: string;
1452
+ contentBase64: string;
1453
+ }>;
1454
+ };
1455
+ idempotencyKey: string;
1456
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesAttachWorkspaceResourceResponses, TemplatesAttachWorkspaceResourceErrors, ThrowOnError>;
1457
+ /**
1458
+ * Remove a template workspace resource
1459
+ *
1460
+ * Removes one persistent resource from mounted context and advances the workspace revision.
1461
+ */
1462
+ static removeWorkspaceResource<ThrowOnError extends boolean = false>(parameters: {
1463
+ id: TemplateId;
1464
+ resourceId: string;
1465
+ expectedRevision: string;
1466
+ idempotencyKey: string;
1467
+ }, options?: Options<never, ThrowOnError>): RequestResult<TemplatesRemoveWorkspaceResourceResponses, TemplatesRemoveWorkspaceResourceErrors, ThrowOnError>;
1485
1468
  }
1486
- export declare class TemplateDocuments2 {
1487
- static templateDocuments: typeof TemplateDocuments;
1469
+ export declare class Templates2 {
1470
+ static templates: typeof Templates;
1488
1471
  }
1489
1472
  export declare class Design {
1490
1473
  /**
@@ -1519,7 +1502,7 @@ export declare class Webhooks {
1519
1502
  /**
1520
1503
  * Create a webhook
1521
1504
  *
1522
- * Creates a webhook endpoint subscribed to the given event types and returns it with a 201 response.
1505
+ * Creates a signed webhook endpoint for Samva delivery and inbound events, stores subscriptions, and returns the endpoint and signing secret with a 201 response.
1523
1506
  */
1524
1507
  static create<ThrowOnError extends boolean = false>(parameters: {
1525
1508
  name: string;
@@ -1659,7 +1642,7 @@ export declare class Organizations {
1659
1642
  /**
1660
1643
  * Delete the current workspace
1661
1644
  *
1662
- * Accepts owner-authorized durable workspace deletion. Repeating the same request with the same Idempotency-Key returns the existing organization-scoped operation.
1645
+ * Starts an owner-authorized durable workspace deletion operation, confirming the workspace name in the request. Repeating the same request with the same Idempotency-Key returns the existing organization-scoped operation.
1663
1646
  */
1664
1647
  static delete<ThrowOnError extends boolean = false>(parameters: {
1665
1648
  "idempotency-key": string;