632 lines
28 KiB
TypeScript
632 lines
28 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import type { Client, Options as Options2, TDataShape } from "./client";
|
|
import { client } from "./client.gen";
|
|
import type {
|
|
AcceptWorkspaceInviteData,
|
|
AcceptWorkspaceInviteErrors,
|
|
AcceptWorkspaceInviteResponses,
|
|
CreateAnalyticsEventData,
|
|
CreateAnalyticsEventErrors,
|
|
CreateAnalyticsEventResponses,
|
|
CreateAnalyticsPageViewData,
|
|
CreateAnalyticsPageViewErrors,
|
|
CreateAnalyticsPageViewResponses,
|
|
CreateLegacyEntityRowData,
|
|
CreateLegacyEntityRowErrors,
|
|
CreateLegacyEntityRowResponses,
|
|
CreateLegacyRowRelationshipData,
|
|
CreateLegacyRowRelationshipErrors,
|
|
CreateLegacyRowRelationshipResponses,
|
|
CreateSupportTicketFromInboundEmailData,
|
|
CreateSupportTicketFromInboundEmailErrors,
|
|
CreateSupportTicketFromInboundEmailResponses,
|
|
CreateWorkspaceInviteData,
|
|
CreateWorkspaceInviteErrors,
|
|
CreateWorkspaceInviteResponses,
|
|
DeleteLegacyEntityRowData,
|
|
DeleteLegacyEntityRowErrors,
|
|
DeleteLegacyEntityRowResponses,
|
|
DeleteLegacyRowRelationshipData,
|
|
DeleteLegacyRowRelationshipErrors,
|
|
DeleteLegacyRowRelationshipResponses,
|
|
EnqueueExportArtifactRetentionData,
|
|
EnqueueExportArtifactRetentionErrors,
|
|
EnqueueExportArtifactRetentionResponses,
|
|
GetAccountData,
|
|
GetAccountErrors,
|
|
GetAccountResponses,
|
|
GetAdminAnalyticsOverviewData,
|
|
GetAdminAnalyticsOverviewErrors,
|
|
GetAdminAnalyticsOverviewResponses,
|
|
GetApiDocsData,
|
|
GetApiDocsResponses,
|
|
GetApiUsageData,
|
|
GetApiUsageErrors,
|
|
GetApiUsageResponses,
|
|
GetCurrentUserSessionData,
|
|
GetCurrentUserSessionErrors,
|
|
GetCurrentUserSessionResponses,
|
|
GetExportDownloadUrlData,
|
|
GetExportDownloadUrlErrors,
|
|
GetExportDownloadUrlResponses,
|
|
GetExportJobProgressData,
|
|
GetExportJobProgressErrors,
|
|
GetExportJobProgressResponses,
|
|
GetHealthzData,
|
|
GetHealthzResponses,
|
|
GetLegacyEntityByNameData,
|
|
GetLegacyEntityByNameErrors,
|
|
GetLegacyEntityByNameResponses,
|
|
GetLegacyEntityRowData,
|
|
GetLegacyEntityRowErrors,
|
|
GetLegacyEntityRowResponses,
|
|
GetLegacyRowRelationshipData,
|
|
GetLegacyRowRelationshipErrors,
|
|
GetLegacyRowRelationshipResponses,
|
|
GetMetricsData,
|
|
GetMetricsErrors,
|
|
GetMetricsResponses,
|
|
GetOpenApiDocumentData,
|
|
GetOpenApiDocumentResponses,
|
|
GetPublicAnalyticsOverviewData,
|
|
GetPublicAnalyticsOverviewErrors,
|
|
GetPublicAnalyticsOverviewResponses,
|
|
GetReadyzData,
|
|
GetReadyzErrors,
|
|
GetReadyzResponses,
|
|
GetStatusData,
|
|
GetStatusErrors,
|
|
GetStatusResponses,
|
|
GetV1HealthData,
|
|
GetV1HealthResponses,
|
|
ListAccountsData,
|
|
ListAccountsErrors,
|
|
ListAccountsResponses,
|
|
ListLegacyEntityRowsData,
|
|
ListLegacyEntityRowsErrors,
|
|
ListLegacyEntityRowsResponses,
|
|
ListWorkspaceAuthProvidersData,
|
|
ListWorkspaceAuthProvidersErrors,
|
|
ListWorkspaceAuthProvidersResponses,
|
|
ListWorkspaceInvitesData,
|
|
ListWorkspaceInvitesErrors,
|
|
ListWorkspaceInvitesResponses,
|
|
LoginWithPasswordData,
|
|
LoginWithPasswordErrors,
|
|
LoginWithPasswordResponses,
|
|
LogoutApiSessionData,
|
|
LogoutApiSessionErrors,
|
|
LogoutApiSessionResponses,
|
|
PostDeviceRegisterData,
|
|
PostDeviceRegisterErrors,
|
|
PostDeviceRegisterResponses,
|
|
PostDeviceRevokeData,
|
|
PostDeviceRevokeErrors,
|
|
PostDeviceRevokeResponses,
|
|
ReceiveEmailSequenceMailjetWebhookData,
|
|
ReceiveEmailSequenceMailjetWebhookErrors,
|
|
ReceiveEmailSequenceMailjetWebhookResponses,
|
|
ReceiveStripeBillingWebhookData,
|
|
ReceiveStripeBillingWebhookErrors,
|
|
ReceiveStripeBillingWebhookResponses,
|
|
RefreshJwtTokenData,
|
|
RefreshJwtTokenErrors,
|
|
RefreshJwtTokenResponses,
|
|
RetryEventWebhookAttemptData,
|
|
RetryEventWebhookAttemptErrors,
|
|
RetryEventWebhookAttemptResponses,
|
|
RevalidateWorkspaceContextData,
|
|
RevalidateWorkspaceContextErrors,
|
|
RevalidateWorkspaceContextResponses,
|
|
RevokeWorkspaceInviteData,
|
|
RevokeWorkspaceInviteErrors,
|
|
RevokeWorkspaceInviteResponses,
|
|
StreamNotificationsData,
|
|
StreamNotificationsErrors,
|
|
StreamNotificationsResponse,
|
|
StreamNotificationsResponses,
|
|
UpdateLegacyEntityRowData,
|
|
UpdateLegacyEntityRowErrors,
|
|
UpdateLegacyEntityRowResponses,
|
|
UploadAiFileData,
|
|
UploadAiFileErrors,
|
|
UploadAiFileResponses,
|
|
ValidateApiKeyData,
|
|
ValidateApiKeyErrors,
|
|
ValidateApiKeyResponses,
|
|
} from "./types.gen";
|
|
|
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<
|
|
TData,
|
|
ThrowOnError,
|
|
TResponse
|
|
> & {
|
|
/**
|
|
* You can provide a client instance returned by `createClient()` instead of
|
|
* individual options. This might be also useful if you want to implement a
|
|
* custom client.
|
|
*/
|
|
client?: Client;
|
|
/**
|
|
* You can pass arbitrary values through the `meta` object. This can be
|
|
* used to access values that aren't defined as part of the SDK function.
|
|
*/
|
|
meta?: Record<string, unknown>;
|
|
};
|
|
|
|
export const getHealthz = <ThrowOnError extends boolean = false>(options?: Options<GetHealthzData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetHealthzResponses, unknown, ThrowOnError>({ url: "/healthz", ...options });
|
|
|
|
export const getV1Health = <ThrowOnError extends boolean = false>(options?: Options<GetV1HealthData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetV1HealthResponses, unknown, ThrowOnError>({ url: "/v1/health", ...options });
|
|
|
|
export const getReadyz = <ThrowOnError extends boolean = false>(options?: Options<GetReadyzData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetReadyzResponses, GetReadyzErrors, ThrowOnError>({ url: "/readyz", ...options });
|
|
|
|
export const getStatus = <ThrowOnError extends boolean = false>(options?: Options<GetStatusData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetStatusResponses, GetStatusErrors, ThrowOnError>({ url: "/status", ...options });
|
|
|
|
export const getMetrics = <ThrowOnError extends boolean = false>(options?: Options<GetMetricsData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetMetricsResponses, GetMetricsErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/metrics",
|
|
...options,
|
|
});
|
|
|
|
export const getCurrentUserSession = <ThrowOnError extends boolean = false>(options?: Options<GetCurrentUserSessionData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetCurrentUserSessionResponses, GetCurrentUserSessionErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/session/current-user",
|
|
...options,
|
|
});
|
|
|
|
export const getApiDocs = <ThrowOnError extends boolean = false>(options?: Options<GetApiDocsData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetApiDocsResponses, unknown, ThrowOnError>({ url: "/v1/docs", ...options });
|
|
|
|
export const getOpenApiDocument = <ThrowOnError extends boolean = false>(options?: Options<GetOpenApiDocumentData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetOpenApiDocumentResponses, unknown, ThrowOnError>({ url: "/v1/openapi.json", ...options });
|
|
|
|
export const loginWithPassword = <ThrowOnError extends boolean = false>(options: Options<LoginWithPasswordData, ThrowOnError>) =>
|
|
(options.client ?? client).post<LoginWithPasswordResponses, LoginWithPasswordErrors, ThrowOnError>({
|
|
url: "/v1/auth/login",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
export const refreshJwtToken = <ThrowOnError extends boolean = false>(options?: Options<RefreshJwtTokenData, ThrowOnError>) =>
|
|
(options?.client ?? client).post<RefreshJwtTokenResponses, RefreshJwtTokenErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/auth/refresh-token",
|
|
...options,
|
|
});
|
|
|
|
export const logoutApiSession = <ThrowOnError extends boolean = false>(options?: Options<LogoutApiSessionData, ThrowOnError>) =>
|
|
(options?.client ?? client).post<LogoutApiSessionResponses, LogoutApiSessionErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/auth/logout",
|
|
...options,
|
|
});
|
|
|
|
export const validateApiKey = <ThrowOnError extends boolean = false>(options?: Options<ValidateApiKeyData, ThrowOnError>) =>
|
|
(options?.client ?? client).post<ValidateApiKeyResponses, ValidateApiKeyErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/api-keys/validate",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options?.headers,
|
|
},
|
|
});
|
|
|
|
export const uploadAiFile = <ThrowOnError extends boolean = false>(options?: Options<UploadAiFileData, ThrowOnError>) =>
|
|
(options?.client ?? client).post<UploadAiFileResponses, UploadAiFileErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/ai/upload",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Accepts Mailjet inbound (parse) email webhooks authenticated with HTTP Basic Auth and creates an idempotent support ticket for the matched tenant inbound address.
|
|
*/
|
|
export const createSupportTicketFromInboundEmail = <ThrowOnError extends boolean = false>(
|
|
options: Options<CreateSupportTicketFromInboundEmailData, ThrowOnError>
|
|
) =>
|
|
(options.client ?? client).post<CreateSupportTicketFromInboundEmailResponses, CreateSupportTicketFromInboundEmailErrors, ThrowOnError>({
|
|
security: [{ scheme: "basic", type: "http" }],
|
|
url: "/v1/support/inbound-email",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
export const createAnalyticsEvent = <ThrowOnError extends boolean = false>(options: Options<CreateAnalyticsEventData, ThrowOnError>) =>
|
|
(options.client ?? client).post<CreateAnalyticsEventResponses, CreateAnalyticsEventErrors, ThrowOnError>({
|
|
security: [{ name: "x-analytics-token", type: "apiKey" }],
|
|
url: "/v1/analytics/events",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
export const createAnalyticsPageView = <ThrowOnError extends boolean = false>(options: Options<CreateAnalyticsPageViewData, ThrowOnError>) =>
|
|
(options.client ?? client).post<CreateAnalyticsPageViewResponses, CreateAnalyticsPageViewErrors, ThrowOnError>({
|
|
security: [{ name: "x-analytics-token", type: "apiKey" }],
|
|
url: "/v1/analytics/page-views",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
export const getPublicAnalyticsOverview = <ThrowOnError extends boolean = false>(options?: Options<GetPublicAnalyticsOverviewData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetPublicAnalyticsOverviewResponses, GetPublicAnalyticsOverviewErrors, ThrowOnError>({
|
|
security: [{ name: "x-analytics-token", type: "apiKey" }],
|
|
url: "/v1/analytics/public",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Revalidates a workspace context switch for a tenant/user pair using service-token credentials. The response is a request-ID-correlated, redacted context validity envelope and never includes SSO provider secrets or invite/token material.
|
|
*/
|
|
export const revalidateWorkspaceContext = <ThrowOnError extends boolean = false>(options: Options<RevalidateWorkspaceContextData, ThrowOnError>) =>
|
|
(options.client ?? client).post<RevalidateWorkspaceContextResponses, RevalidateWorkspaceContextErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/workspaces/{tenantId}/context/revalidate",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Lists redacted tenant-scoped OIDC/SAML provider metadata for service-token callers. Responses expose provider status and non-secret endpoints only; client secrets, SAML certificates/private keys, token hashes, invite tokens, and raw metadata documents are omitted.
|
|
*/
|
|
export const listWorkspaceAuthProviders = <ThrowOnError extends boolean = false>(options: Options<ListWorkspaceAuthProvidersData, ThrowOnError>) =>
|
|
(options.client ?? client).get<ListWorkspaceAuthProvidersResponses, ListWorkspaceAuthProvidersErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/workspaces/{tenantId}/auth/providers",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Lists tenant-scoped workspace invites for service-token callers. Response envelopes expose lifecycle timestamps, status, and tokenPrefix only while omitting reusable invite token material.
|
|
*/
|
|
export const listWorkspaceInvites = <ThrowOnError extends boolean = false>(options: Options<ListWorkspaceInvitesData, ThrowOnError>) =>
|
|
(options.client ?? client).get<ListWorkspaceInvitesResponses, ListWorkspaceInvitesErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/workspaces/{tenantId}/invites",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Creates a tenant workspace invite. The response includes the one-time invite token only in the top-level token field; invite envelopes expose only tokenPrefix and never reusable token examples.
|
|
*/
|
|
export const createWorkspaceInvite = <ThrowOnError extends boolean = false>(options: Options<CreateWorkspaceInviteData, ThrowOnError>) =>
|
|
(options.client ?? client).post<CreateWorkspaceInviteResponses, CreateWorkspaceInviteErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/workspaces/{tenantId}/invites",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Accepts a workspace invite with a one-time token in the request body. Success and error responses are redacted and never echo the token.
|
|
*/
|
|
export const acceptWorkspaceInvite = <ThrowOnError extends boolean = false>(options: Options<AcceptWorkspaceInviteData, ThrowOnError>) =>
|
|
(options.client ?? client).post<AcceptWorkspaceInviteResponses, AcceptWorkspaceInviteErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/workspaces/{tenantId}/invites/{inviteId}/accept",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Revokes a pending workspace invite by tenant and invite id. Request and error paths do not expose token material.
|
|
*/
|
|
export const revokeWorkspaceInvite = <ThrowOnError extends boolean = false>(options: Options<RevokeWorkspaceInviteData, ThrowOnError>) =>
|
|
(options.client ?? client).post<RevokeWorkspaceInviteResponses, RevokeWorkspaceInviteErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/workspaces/{tenantId}/invites/{inviteId}/revoke",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
export const getAdminAnalyticsOverview = <ThrowOnError extends boolean = false>(options?: Options<GetAdminAnalyticsOverviewData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetAdminAnalyticsOverviewResponses, GetAdminAnalyticsOverviewErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/analytics/admin",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Streams bounded, tenant/user scoped notification delivery diagnostics as sanitized SSE frames for authenticated service clients. The initial snapshot and reconnect cursor are deterministic for Last-Event-ID resume semantics; the stream does not expose provider payloads, provider message ids, metadata, tokens, request bodies, or raw secrets.
|
|
*/
|
|
export const streamNotifications = <ThrowOnError extends boolean = false>(
|
|
options?: Options<StreamNotificationsData, ThrowOnError, StreamNotificationsResponse>
|
|
) =>
|
|
(options?.client ?? client).sse.get<StreamNotificationsResponses, StreamNotificationsErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/notifications/stream",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Lists tenant account metadata and subscription summaries for service-token callers from the canonical API runtime.
|
|
*/
|
|
export const listAccounts = <ThrowOnError extends boolean = false>(options?: Options<ListAccountsData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<ListAccountsResponses, ListAccountsErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/accounts",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Looks up one tenant account by id or slug for service-token callers from the canonical API runtime.
|
|
*/
|
|
export const getAccount = <ThrowOnError extends boolean = false>(options: Options<GetAccountData, ThrowOnError>) =>
|
|
(options.client ?? client).get<GetAccountResponses, GetAccountErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/accounts/{id}",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Canonical API-host entry point for API usage metadata. The API runtime validates the tenant API key and reads usage state through DB package boundaries.
|
|
*/
|
|
export const getApiUsage = <ThrowOnError extends boolean = false>(options?: Options<GetApiUsageData, ThrowOnError>) =>
|
|
(options?.client ?? client).get<GetApiUsageResponses, GetApiUsageErrors, ThrowOnError>({
|
|
security: [{ name: "x-api-key", type: "apiKey" }],
|
|
url: "/v1/usage",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Canonical API-host entry point for Stripe billing lifecycle webhooks. The API runtime preserves the raw body and signature headers and applies subscription updates through API-owned billing services.
|
|
*/
|
|
export const receiveStripeBillingWebhook = <ThrowOnError extends boolean = false>(options: Options<ReceiveStripeBillingWebhookData, ThrowOnError>) =>
|
|
(options.client ?? client).post<ReceiveStripeBillingWebhookResponses, ReceiveStripeBillingWebhookErrors, ThrowOnError>({
|
|
security: [{ name: "stripe-signature", type: "apiKey" }],
|
|
url: "/v1/billing/stripe/webhooks",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Accepts Mailjet provider event webhooks for email sequences, authenticated with HTTP Basic Auth. Bounce, blocked, and spam events correlate by provider message id (Message_GUID), mark the sequence delivery bounced, and fail the in-flight run without echoing provider payloads.
|
|
*/
|
|
export const receiveEmailSequenceMailjetWebhook = <ThrowOnError extends boolean = false>(
|
|
options: Options<ReceiveEmailSequenceMailjetWebhookData, ThrowOnError>
|
|
) =>
|
|
(options.client ?? client).post<ReceiveEmailSequenceMailjetWebhookResponses, ReceiveEmailSequenceMailjetWebhookErrors, ThrowOnError>({
|
|
security: [{ scheme: "basic", type: "http" }],
|
|
url: "/v1/email-sequences/mailjet/webhooks",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
export const retryEventWebhookAttempt = <ThrowOnError extends boolean = false>(options: Options<RetryEventWebhookAttemptData, ThrowOnError>) =>
|
|
(options.client ?? client).post<RetryEventWebhookAttemptResponses, RetryEventWebhookAttemptErrors, ThrowOnError>({
|
|
security: [{ scheme: "basic", type: "http" }],
|
|
url: "/v1/events/webhooks/attempts/{id}",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Queues the expired export artifact retention cleanup job for operators. Optional Idempotency-Key deduplicates operator retries; x-request-id remains correlation-only. The response does not expose Redis or storage credentials.
|
|
*/
|
|
export const enqueueExportArtifactRetention = <ThrowOnError extends boolean = false>(options?: Options<EnqueueExportArtifactRetentionData, ThrowOnError>) =>
|
|
(options?.client ?? client).post<EnqueueExportArtifactRetentionResponses, EnqueueExportArtifactRetentionErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/maintenance/export-retention/enqueue",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options?.headers,
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Authorize with either the configured service token bearer credential or a stored API key supplied in x-api-key. Stored API keys are tenant-bound and must include an entity permission for the resolved tenant/entity plus the documented CRUD operation.
|
|
*/
|
|
export const listLegacyEntityRows = <ThrowOnError extends boolean = false>(options: Options<ListLegacyEntityRowsData, ThrowOnError>) =>
|
|
(options.client ?? client).get<ListLegacyEntityRowsResponses, ListLegacyEntityRowsErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/entities/{entity}/rows",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Authorize with either the configured service token bearer credential or a stored API key supplied in x-api-key. Stored API keys are tenant-bound and must include an entity permission for the resolved tenant/entity plus the documented CRUD operation.
|
|
*/
|
|
export const createLegacyEntityRow = <ThrowOnError extends boolean = false>(options: Options<CreateLegacyEntityRowData, ThrowOnError>) =>
|
|
(options.client ?? client).post<CreateLegacyEntityRowResponses, CreateLegacyEntityRowErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/entities/{entity}/rows",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Authorize with either the configured service token bearer credential or a stored API key supplied in x-api-key. Stored API keys are tenant-bound and must include an entity permission for the resolved tenant/entity plus the documented CRUD operation.
|
|
*/
|
|
export const deleteLegacyEntityRow = <ThrowOnError extends boolean = false>(options: Options<DeleteLegacyEntityRowData, ThrowOnError>) =>
|
|
(options.client ?? client).delete<DeleteLegacyEntityRowResponses, DeleteLegacyEntityRowErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/entities/{entity}/rows/{rowId}",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Authorize with either the configured service token bearer credential or a stored API key supplied in x-api-key. Stored API keys are tenant-bound and must include an entity permission for the resolved tenant/entity plus the documented CRUD operation.
|
|
*/
|
|
export const getLegacyEntityRow = <ThrowOnError extends boolean = false>(options: Options<GetLegacyEntityRowData, ThrowOnError>) =>
|
|
(options.client ?? client).get<GetLegacyEntityRowResponses, GetLegacyEntityRowErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/entities/{entity}/rows/{rowId}",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Authorize with either the configured service token bearer credential or a stored API key supplied in x-api-key. Stored API keys are tenant-bound and must include an entity permission for the resolved tenant/entity plus the documented CRUD operation.
|
|
*/
|
|
export const updateLegacyEntityRow = <ThrowOnError extends boolean = false>(options: Options<UpdateLegacyEntityRowData, ThrowOnError>) =>
|
|
(options.client ?? client).patch<UpdateLegacyEntityRowResponses, UpdateLegacyEntityRowErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/entities/{entity}/rows/{rowId}",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Authorize with either the configured service token bearer credential or a stored API key supplied in x-api-key. Stored API keys are tenant-bound and must include an entity permission for the resolved tenant/entity plus the documented CRUD operation.
|
|
*/
|
|
export const createLegacyRowRelationship = <ThrowOnError extends boolean = false>(options: Options<CreateLegacyRowRelationshipData, ThrowOnError>) =>
|
|
(options.client ?? client).post<CreateLegacyRowRelationshipResponses, CreateLegacyRowRelationshipErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/relationships",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Authorize with either the configured service token bearer credential or a stored API key supplied in x-api-key. Stored API keys are tenant-bound and must include an entity permission for the resolved tenant/entity plus the documented CRUD operation.
|
|
*/
|
|
export const deleteLegacyRowRelationship = <ThrowOnError extends boolean = false>(options: Options<DeleteLegacyRowRelationshipData, ThrowOnError>) =>
|
|
(options.client ?? client).delete<DeleteLegacyRowRelationshipResponses, DeleteLegacyRowRelationshipErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/relationships/{id}",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Authorize with either the configured service token bearer credential or a stored API key supplied in x-api-key. Stored API keys are tenant-bound and must include an entity permission for the resolved tenant/entity plus the documented CRUD operation.
|
|
*/
|
|
export const getLegacyRowRelationship = <ThrowOnError extends boolean = false>(options: Options<GetLegacyRowRelationshipData, ThrowOnError>) =>
|
|
(options.client ?? client).get<GetLegacyRowRelationshipResponses, GetLegacyRowRelationshipErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/relationships/{id}",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Creates a short-lived signed GET URL for a completed, unexpired export job. Authorize with either the configured service token bearer credential or a tenant-bound stored API key supplied in x-api-key; stored API keys are scoped to their own tenant and this route does not publish CRUD entity-scope claims. Responses never include export artifact bucket/key values, storage credentials, signed URL internals beyond the URL envelope, payload filters, or object bodies.
|
|
*/
|
|
export const getExportDownloadUrl = <ThrowOnError extends boolean = false>(options: Options<GetExportDownloadUrlData, ThrowOnError>) =>
|
|
(options.client ?? client).get<GetExportDownloadUrlResponses, GetExportDownloadUrlErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/exports/{exportJobId}/download-url",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Poll a tenant-scoped export job's progress envelope. Authorize with either the configured service-token bearer credential or a tenant-bound stored API key supplied in x-api-key; stored API keys are scoped to their own tenant. Responses contain progress fields only (status, percent, rowCount) — no artifact URLs, no compliance-pause internals, no payload filters.
|
|
*/
|
|
export const getExportJobProgress = <ThrowOnError extends boolean = false>(options: Options<GetExportJobProgressData, ThrowOnError>) =>
|
|
(options.client ?? client).get<GetExportJobProgressResponses, GetExportJobProgressErrors, ThrowOnError>({
|
|
security: [
|
|
{ scheme: "bearer", type: "http" },
|
|
{ name: "x-api-key", type: "apiKey" },
|
|
],
|
|
url: "/v1/exports/{exportJobId}/progress",
|
|
...options,
|
|
});
|
|
|
|
/**
|
|
* Register or update a mobile push token (APNs / FCM / WebPush) for the authenticated principal. Requires a service-token bearer credential; the body's userId + tenantId are reconciled downstream against the authenticated principal. Tokens are upserted by their globally unique value so cold-start replays are idempotent.
|
|
*/
|
|
export const postDeviceRegister = <ThrowOnError extends boolean = false>(options: Options<PostDeviceRegisterData, ThrowOnError>) =>
|
|
(options.client ?? client).post<PostDeviceRegisterResponses, PostDeviceRegisterErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/devices/register",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Revoke a mobile push token. Requires a service-token bearer credential; the handler revokes by token hash and never echoes the raw token in the response.
|
|
*/
|
|
export const postDeviceRevoke = <ThrowOnError extends boolean = false>(options: Options<PostDeviceRevokeData, ThrowOnError>) =>
|
|
(options.client ?? client).post<PostDeviceRevokeResponses, PostDeviceRevokeErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/devices/revoke",
|
|
...options,
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
...options.headers,
|
|
},
|
|
});
|
|
|
|
export const getLegacyEntityByName = <ThrowOnError extends boolean = false>(options: Options<GetLegacyEntityByNameData, ThrowOnError>) =>
|
|
(options.client ?? client).get<GetLegacyEntityByNameResponses, GetLegacyEntityByNameErrors, ThrowOnError>({
|
|
security: [{ scheme: "bearer", type: "http" }],
|
|
url: "/v1/entities/{entity}",
|
|
...options,
|
|
});
|