@haakco/custd-sdk 0.0.0-stage → 2.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.
- package/README.md +412 -2
- package/dist/admin-client-setup.d.ts +100 -0
- package/dist/admin-client-setup.js +398 -0
- package/dist/admin-data-labels.d.ts +124 -0
- package/dist/admin-data-labels.js +51 -0
- package/dist/admin-offboarding.d.ts +109 -0
- package/dist/admin-offboarding.js +108 -0
- package/dist/admin-predictions.d.ts +147 -0
- package/dist/admin-predictions.js +83 -0
- package/dist/admin-privacy-erasures.d.ts +62 -0
- package/dist/admin-privacy-erasures.js +72 -0
- package/dist/admin-retention.d.ts +51 -0
- package/dist/admin-retention.js +35 -0
- package/dist/admin-subject-exports.d.ts +48 -0
- package/dist/admin-subject-exports.js +28 -0
- package/dist/admin-tenant-storage.d.ts +27 -0
- package/dist/admin-tenant-storage.js +25 -0
- package/dist/admin-timeplans.d.ts +238 -0
- package/dist/admin-timeplans.js +146 -0
- package/dist/analytics-events.d.ts +85 -0
- package/dist/analytics-events.js +40 -0
- package/dist/backend-lifecycle.d.ts +85 -0
- package/dist/backend-lifecycle.js +212 -0
- package/dist/browser-manifest.json +7 -0
- package/dist/browser-script-BvgjdZSO.js +429 -0
- package/dist/browser-script.d.ts +1 -0
- package/dist/browser-script.js +5 -0
- package/dist/browser-tracker.d.ts +47 -0
- package/dist/browser-tracker.js +453 -0
- package/dist/browser.d.ts +1 -0
- package/dist/browser.js +1 -0
- package/dist/fixtures.d.ts +10 -0
- package/dist/fixtures.js +57 -0
- package/dist/index.d.ts +1310 -0
- package/dist/index.js +1706 -0
- package/dist/mobile-adapter.d.ts +25 -0
- package/dist/mobile-adapter.js +57 -0
- package/dist/mobile-context.d.ts +32 -0
- package/dist/mobile-context.js +156 -0
- package/dist/mobile-queue.d.ts +22 -0
- package/dist/mobile-queue.js +73 -0
- package/dist/oauth.d.ts +1 -0
- package/dist/oauth.js +8 -0
- package/dist/reporting-state.d.ts +46 -0
- package/dist/reporting-state.js +76 -0
- package/dist/runtime-readiness.d.ts +30 -0
- package/dist/runtime-readiness.js +150 -0
- package/dist/version.d.ts +10 -0
- package/dist/version.js +10 -0
- package/package.json +46 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1310 @@
|
|
|
1
|
+
import { ClientSetupClient } from "./admin-client-setup.js";
|
|
2
|
+
import { DataLabelAdminClient } from "./admin-data-labels.js";
|
|
3
|
+
import { OffboardingClient, type OffboardingDownloadResponse } from "./admin-offboarding.js";
|
|
4
|
+
import { PredictionAdminClient } from "./admin-predictions.js";
|
|
5
|
+
import { PrivacyErasureClient } from "./admin-privacy-erasures.js";
|
|
6
|
+
import { RetentionClient } from "./admin-retention.js";
|
|
7
|
+
import { SubjectExportClient } from "./admin-subject-exports.js";
|
|
8
|
+
import { TenantStorageClient } from "./admin-tenant-storage.js";
|
|
9
|
+
import { TimePlanAdminClient } from "./admin-timeplans.js";
|
|
10
|
+
import { AnalyticsEventClient } from "./analytics-events.js";
|
|
11
|
+
import { BackendLifecycleClient } from "./backend-lifecycle.js";
|
|
12
|
+
export { type ClientSetupApplyAndWaitOptions, type ClientSetupApplyAndWaitResult, type ClientSetupApplyOptions, type ClientSetupApplyResponse, ClientSetupClient, type ClientSetupManifest, type ClientSetupOAuthClientDesiredState, type ClientSetupOAuthPurposeProfile, type ClientSetupOperationStatus, type ClientSetupPrivacyDesiredState, type ClientSetupPrivacyRule, type ClientSetupReadinessResponse, type ClientSetupReportingPackDesiredState, type ClientSetupResourceStatus, type ClientSetupRetentionDesiredState, type ClientSetupSchemaDesiredState, validateClientSetupManifest, } from "./admin-client-setup.js";
|
|
13
|
+
export { DataLabelAdminClient, type DataLabelAssignmentListResponse, type DataLabelCatalogue, type DataLabelCatalogueAssignment, type DataLabelCatalogueDataset, type DataLabelCataloguePack, type DataLabelCatalogueResponse, type DataLabelDefinition, type DataLabelDefinitionCreateRequest, type DataLabelDefinitionListResponse, type DataLabelDefinitionUpdateRequest, type DataLabelPropagationPolicy, type DataLabelSensitivity, type DataLabelUsage, type DataLabelUsageListResponse, type DataLabelValue, type DataLabelValueCreateRequest, type DataLabelValueUpdateRequest, type DescriptiveDataLabel, type EventTypeDataLabelDefault, type EventTypeDataLabelDefaultRequest, type SchemaFieldDataLabelAssignment, type SchemaFieldDataLabelAssignmentRequest, } from "./admin-data-labels.js";
|
|
14
|
+
export { type OffboardingAcknowledgeResponse, type OffboardingCancelRequest, OffboardingClient, type OffboardingDownloadResponse, type OffboardingExecuteResponse, type OffboardingExportResponse, type OffboardingPreviewResponse, type OffboardingPreviewStore, type OffboardingReceiptPerStore, type OffboardingReceiptResponse, type OffboardingRequest, type OffboardingRequestCreate, type OffboardingRetryResponse, type OffboardingSchedule, type OffboardingScheduleListResponse, type OffboardingScheduleRequest, type OffboardingWaiver, } from "./admin-offboarding.js";
|
|
15
|
+
export { type PredictionActivateRequest, PredictionAdminClient, type PredictionDefinition, type PredictionDefinitionCreateRequest, type PredictionDefinitionListResponse, type PredictionDefinitionUpdateRequest, type PredictionEvaluationSummary, type PredictionOutcomeSummary, type PredictionPauseRequest, type PredictionRollbackRequest, type PredictionRunNowRequest, type PredictionRunSummary, type PredictionSignalSource, type PredictionSignalSourceCreateRequest, type PredictionThresholdEvent, type PredictionVersion, type PredictionVersionPublishRequest, } from "./admin-predictions.js";
|
|
16
|
+
export { type PrivacyErasure, PrivacyErasureClient, type PrivacyErasureCreateRequest, PrivacyErasureError, type PrivacyErasureListResponse, type PrivacyErasureRetryClassification, type PrivacyErasureSelector, type PrivacyErasureState, type PrivacyErasureStoreProgress, type PrivacyErasureWaitOptions, } from "./admin-privacy-erasures.js";
|
|
17
|
+
export { RetentionClient, type RetentionPolicy, type RetentionPolicyListResponse, type RetentionPolicyUpsertRequest, type RetentionRun, type RetentionRunDeletion, type RetentionRunPreview, type RetentionRunsListResponse, } from "./admin-retention.js";
|
|
18
|
+
export { type SubjectExport, SubjectExportClient, type SubjectExportCreateRequest, type SubjectExportDownloadResponse, type SubjectExportListResponse, type SubjectExportState, type SubjectExportSubject, } from "./admin-subject-exports.js";
|
|
19
|
+
export { TenantStorageClient, type TenantStorageCreateRequest, type TenantStorageListResponse, type TenantStorageLocation, } from "./admin-tenant-storage.js";
|
|
20
|
+
export { type TimePlan, TimePlanAdminClient, type TimePlanAllocation, type TimePlanAllocationBasis, type TimePlanAllocationPreview, type TimePlanAnnotation, type TimePlanAnnotationField, type TimePlanAnnotationInput, type TimePlanAnnotationListResponse, type TimePlanAnnotationSchema, type TimePlanAnnotationType, type TimePlanCalculationChange, type TimePlanCalculationReceipt, type TimePlanCommandRequest, type TimePlanCommandResult, type TimePlanCorrectedCommand, type TimePlanCreatedRun, type TimePlanDefinition, type TimePlanDefinitionBlock, type TimePlanDraftRequest, type TimePlanDraftRevisionRequest, type TimePlanHistoryResponse, type TimePlanListResponse, type TimePlanRedactionRequest, type TimePlanRevisionRequest, type TimePlanRun, type TimePlanRunBlock, type TimePlanRunRequest, type TimePlanThresholdCue, type TimePlanThresholdCueSeverity, type TimePlanTransition, type TimePlanVersion, validateTimePlanDefinition, } from "./admin-timeplans.js";
|
|
21
|
+
export { ANALYTICS_MAX_LABEL_FILTERS, AnalyticsEventClient, type AnalyticsEventQueryRequest, type AnalyticsEventQueryResponse, type AnalyticsEventRow, type AnalyticsEventSourceSummary, type AnalyticsEventTiming, type AnalyticsLabelFilter, type AnalyticsQuerySource, } from "./analytics-events.js";
|
|
22
|
+
export { BackendLifecycleClient, type BackendLifecycleDownloader, type BackendLifecycleRequester, type CompleteOffboardingOptions, type CompleteOffboardingResult, createVerifiedOffboardingExportReceiver, type OneTimeCredentialSecret, type PersistOffboardingExport, type PersistOneTimeCredentialSecret, type ReceiveAndVerifyOffboardingExport, type RotateCredentialOptions, type RotateCredentialResult, type VerifiedExportReceiverOptions, type VerifyZeroState, type ZeroStateReconciliationOptions, type ZeroStateReconciliationResult, } from "./backend-lifecycle.js";
|
|
23
|
+
export { classifyReportingData, getReportingViewState, type ReportingDataState, type ReportingQueryState, type ReportingViewState, reportingQueryKey, } from "./reporting-state.js";
|
|
24
|
+
export { checkRuntimeReadiness, type RuntimeReadinessCredentialResult, type RuntimeReadinessOAuthConfig, type RuntimeReadinessOptions, type RuntimeReadinessResult, } from "./runtime-readiness.js";
|
|
25
|
+
export type EventContext = {
|
|
26
|
+
page?: {
|
|
27
|
+
url?: string;
|
|
28
|
+
path?: string;
|
|
29
|
+
title?: string;
|
|
30
|
+
referrer?: string;
|
|
31
|
+
};
|
|
32
|
+
device?: {
|
|
33
|
+
type?: string;
|
|
34
|
+
os?: string;
|
|
35
|
+
browser?: string;
|
|
36
|
+
};
|
|
37
|
+
locale?: string;
|
|
38
|
+
timezone?: string;
|
|
39
|
+
ip?: string;
|
|
40
|
+
appVersion?: string;
|
|
41
|
+
networkState?: "offline" | "online" | "unknown";
|
|
42
|
+
};
|
|
43
|
+
export { createMobileAsyncQueueStorage, createMobileFlushTriggers, type MobileAppState, type MobileFlushTriggerOptions, type MobileKeyValueStorage, type MobileNetwork, type MobileNetworkState, type MobileSubscription, } from "./mobile-adapter.js";
|
|
44
|
+
export { createMobileEvent, type MobileEventContext, type MobileEventInput, type MobileNetworkState as MobileEventNetworkState, type MobilePlatform, type MobileSubject, } from "./mobile-context.js";
|
|
45
|
+
export { AsyncEventQueue, type AsyncQueueStorage } from "./mobile-queue.js";
|
|
46
|
+
export type EventEnvelope = {
|
|
47
|
+
eventUuid?: string;
|
|
48
|
+
eventTypeSlug: string;
|
|
49
|
+
schemaVersion: string;
|
|
50
|
+
timestamp: string;
|
|
51
|
+
sessionId?: string;
|
|
52
|
+
anonymousId?: string;
|
|
53
|
+
userUuid?: string | null;
|
|
54
|
+
companySlug?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The environment this event came from. One credential serves every
|
|
57
|
+
* environment, so this is how a preview build, a staging deploy, or a local
|
|
58
|
+
* machine declares itself without provisioning another credential. It is sent
|
|
59
|
+
* as the reserved `custd.environment` label, not as a field of its own.
|
|
60
|
+
*/
|
|
61
|
+
environment?: string;
|
|
62
|
+
labels?: Record<string, string>;
|
|
63
|
+
context: EventContext;
|
|
64
|
+
payload: Record<string, unknown>;
|
|
65
|
+
};
|
|
66
|
+
export type DogfoodEventInput = {
|
|
67
|
+
eventTypeSlug: string;
|
|
68
|
+
schemaVersion: string;
|
|
69
|
+
companySlug: string;
|
|
70
|
+
sourceSystem: string;
|
|
71
|
+
sourceCompany: string;
|
|
72
|
+
environment: string;
|
|
73
|
+
correlationId?: string;
|
|
74
|
+
strictPayloadKeys?: boolean;
|
|
75
|
+
payload?: Record<string, unknown>;
|
|
76
|
+
};
|
|
77
|
+
export type ProblemDetails = {
|
|
78
|
+
type: string;
|
|
79
|
+
title: string;
|
|
80
|
+
status: number;
|
|
81
|
+
detail?: string;
|
|
82
|
+
code?: string;
|
|
83
|
+
instance?: string;
|
|
84
|
+
traceId?: string;
|
|
85
|
+
fields?: Record<string, string>;
|
|
86
|
+
retryability?: "none" | "bounded";
|
|
87
|
+
nextAction?: {
|
|
88
|
+
action: "none" | "poll" | "retry" | "rotate" | "escalate";
|
|
89
|
+
pollAfterSeconds?: number;
|
|
90
|
+
maxRetries?: number;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
type EventResult = {
|
|
94
|
+
eventUuid?: string;
|
|
95
|
+
success?: boolean;
|
|
96
|
+
status?: number;
|
|
97
|
+
error?: ProblemDetails;
|
|
98
|
+
};
|
|
99
|
+
export type ProducerOAuthConfig = {
|
|
100
|
+
clientId: string;
|
|
101
|
+
clientSecret: string;
|
|
102
|
+
tokenUrl: string;
|
|
103
|
+
audience?: string;
|
|
104
|
+
scopes?: string[];
|
|
105
|
+
};
|
|
106
|
+
export type ProvisionedProducerCredentials = {
|
|
107
|
+
companySlug: string;
|
|
108
|
+
baseUrl: string;
|
|
109
|
+
tokenUrl: string;
|
|
110
|
+
audience?: string;
|
|
111
|
+
clientId: string;
|
|
112
|
+
clientSecret: string;
|
|
113
|
+
scopes?: string[];
|
|
114
|
+
environment?: string;
|
|
115
|
+
metadata?: Record<string, string>;
|
|
116
|
+
};
|
|
117
|
+
export type RedactedProvisionedProducerCredentials = Omit<ProvisionedProducerCredentials, "clientSecret">;
|
|
118
|
+
export type DataSpaceCreate = {
|
|
119
|
+
slug: string;
|
|
120
|
+
companyName: string;
|
|
121
|
+
};
|
|
122
|
+
export type DataSpace = {
|
|
123
|
+
slug: string;
|
|
124
|
+
companyName: string;
|
|
125
|
+
parentCompanySlug: string;
|
|
126
|
+
enabled: boolean;
|
|
127
|
+
};
|
|
128
|
+
export type DataSpaceEntitlementState = {
|
|
129
|
+
enabled: boolean;
|
|
130
|
+
activeDataSpaces: number;
|
|
131
|
+
maxActiveDataSpaces: number;
|
|
132
|
+
maxActiveProducersPerDataSpace: number;
|
|
133
|
+
};
|
|
134
|
+
export type DataSpaceListResponse = {
|
|
135
|
+
dataSpaces: DataSpace[];
|
|
136
|
+
entitlement: DataSpaceEntitlementState;
|
|
137
|
+
};
|
|
138
|
+
export type ProducerProvisionCreate = {
|
|
139
|
+
companySlug: string;
|
|
140
|
+
producerSlug: string;
|
|
141
|
+
displayName?: string;
|
|
142
|
+
environment?: string;
|
|
143
|
+
scopes?: string[];
|
|
144
|
+
scopeTemplate?: "events" | "schemas" | "managed-audit" | "managed-audit-reporting-read" | "managed-audit-reporting-subject-insight" | "managed-audit-event-read";
|
|
145
|
+
metadata?: Record<string, string>;
|
|
146
|
+
};
|
|
147
|
+
export type ProducerProvisionPublicClient = {
|
|
148
|
+
clientId: string;
|
|
149
|
+
companySlug: string;
|
|
150
|
+
producerSlug: string;
|
|
151
|
+
scopes: string[];
|
|
152
|
+
environment?: string;
|
|
153
|
+
metadata?: Record<string, string>;
|
|
154
|
+
};
|
|
155
|
+
export type ClientConfig = {
|
|
156
|
+
baseUrl: string;
|
|
157
|
+
/**
|
|
158
|
+
* The environment this process sends from: the default for events that do not
|
|
159
|
+
* declare their own. A credential is expected to carry every environment
|
|
160
|
+
* unless an operator deliberately restricts it.
|
|
161
|
+
*/
|
|
162
|
+
environment?: string;
|
|
163
|
+
getToken?: (options?: RequestOptions) => string | Promise<string>;
|
|
164
|
+
oauth?: ProducerOAuthConfig;
|
|
165
|
+
fetch?: typeof fetch;
|
|
166
|
+
defaultHeaders?: Record<string, string>;
|
|
167
|
+
retry?: RetryOptions;
|
|
168
|
+
batch?: BatchOptions;
|
|
169
|
+
queue?: QueueOptions;
|
|
170
|
+
compression?: CompressionOptions;
|
|
171
|
+
};
|
|
172
|
+
export type RequestOptions = {
|
|
173
|
+
signal?: AbortSignal;
|
|
174
|
+
/** Stable key for retry-safe POST operations supported by the API. */
|
|
175
|
+
idempotencyKey?: string;
|
|
176
|
+
};
|
|
177
|
+
export declare class AdminWorkflowError extends Error {
|
|
178
|
+
readonly status: number;
|
|
179
|
+
readonly reason: string;
|
|
180
|
+
readonly code: string;
|
|
181
|
+
readonly safeNextAction: string;
|
|
182
|
+
readonly name = "AdminWorkflowError";
|
|
183
|
+
constructor(status: number, reason: string, code: string, safeNextAction: string);
|
|
184
|
+
}
|
|
185
|
+
export declare class CustdRequestError extends Error {
|
|
186
|
+
readonly status: number | null;
|
|
187
|
+
readonly code: string;
|
|
188
|
+
readonly retryability: "none" | "bounded";
|
|
189
|
+
readonly nextAction: NonNullable<ProblemDetails["nextAction"]>;
|
|
190
|
+
readonly problem?: ProblemDetails | undefined;
|
|
191
|
+
readonly name = "CustdRequestError";
|
|
192
|
+
readonly cause?: unknown;
|
|
193
|
+
constructor(status: number | null, code: string, retryability: "none" | "bounded", nextAction: NonNullable<ProblemDetails["nextAction"]>, problem?: ProblemDetails | undefined, options?: {
|
|
194
|
+
cause?: unknown;
|
|
195
|
+
});
|
|
196
|
+
get unavailable(): boolean;
|
|
197
|
+
}
|
|
198
|
+
export type PreparedDataState = "accepted" | "processing" | "ready" | "failed";
|
|
199
|
+
export type PreparedDataAvailability = "complete" | "partial" | "stale" | "unavailable";
|
|
200
|
+
export type PreparedDataNextAction = "none" | "poll" | "retry" | "rotate" | "escalate";
|
|
201
|
+
export type PreparedDataStatus = {
|
|
202
|
+
tenantSlug: string;
|
|
203
|
+
processingState: PreparedDataState;
|
|
204
|
+
availability: PreparedDataAvailability;
|
|
205
|
+
observedAt: string;
|
|
206
|
+
watermark?: string;
|
|
207
|
+
provenance: {
|
|
208
|
+
owner: string;
|
|
209
|
+
generation?: string;
|
|
210
|
+
sourceUrn?: string;
|
|
211
|
+
watermark?: string;
|
|
212
|
+
};
|
|
213
|
+
retryability: "none" | "bounded";
|
|
214
|
+
warnings?: Array<{
|
|
215
|
+
code: string;
|
|
216
|
+
message: string;
|
|
217
|
+
}> | null;
|
|
218
|
+
nextAction: {
|
|
219
|
+
action: PreparedDataNextAction;
|
|
220
|
+
pollAfterSeconds?: number;
|
|
221
|
+
maxRetries?: number;
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
export type PreparedDataReceiptStatus = PreparedDataStatus & {
|
|
225
|
+
receiptUuid: string;
|
|
226
|
+
};
|
|
227
|
+
export type PreparedDataOutputStatus = PreparedDataStatus & {
|
|
228
|
+
outputUuid: string;
|
|
229
|
+
};
|
|
230
|
+
export type PreparedDataOutputList = {
|
|
231
|
+
outputs: PreparedDataOutputStatus[] | null;
|
|
232
|
+
};
|
|
233
|
+
export type PreparedDataQueryEnvelope = {
|
|
234
|
+
output: PreparedDataOutputStatus;
|
|
235
|
+
data: RenderedWidgetData;
|
|
236
|
+
};
|
|
237
|
+
export type BrokerEnv = Record<string, string | undefined>;
|
|
238
|
+
export type BrokerEnvClientOptions = Omit<ClientConfig, "baseUrl" | "getToken" | "oauth"> & {
|
|
239
|
+
baseUrl?: string;
|
|
240
|
+
scopes?: string[];
|
|
241
|
+
};
|
|
242
|
+
export type CompressionOptions = {
|
|
243
|
+
enabled?: boolean;
|
|
244
|
+
thresholdBytes?: number;
|
|
245
|
+
};
|
|
246
|
+
export type RetryOptions = {
|
|
247
|
+
maxAttempts?: number;
|
|
248
|
+
baseDelayMs?: number;
|
|
249
|
+
maxDelayMs?: number;
|
|
250
|
+
jitter?: number;
|
|
251
|
+
retryOnStatuses?: number[];
|
|
252
|
+
};
|
|
253
|
+
export type BatchOptions = {
|
|
254
|
+
maxBatchSize?: number;
|
|
255
|
+
flushIntervalMs?: number;
|
|
256
|
+
};
|
|
257
|
+
export type QueueOptions = {
|
|
258
|
+
enabled?: boolean;
|
|
259
|
+
storage?: QueueStorage;
|
|
260
|
+
maxQueueSize?: number;
|
|
261
|
+
flushOnOnline?: boolean;
|
|
262
|
+
flushTriggers?: Array<(flush: () => Promise<void>) => () => void>;
|
|
263
|
+
};
|
|
264
|
+
export type QueueStorage = {
|
|
265
|
+
load: () => EventEnvelope[];
|
|
266
|
+
save: (events: EventEnvelope[]) => void;
|
|
267
|
+
clear: () => void;
|
|
268
|
+
};
|
|
269
|
+
export type AdminTenantCreate = {
|
|
270
|
+
slug: string;
|
|
271
|
+
companyName: string;
|
|
272
|
+
};
|
|
273
|
+
export type AdminTenant = {
|
|
274
|
+
slug: string;
|
|
275
|
+
companyName: string;
|
|
276
|
+
enabled: boolean;
|
|
277
|
+
};
|
|
278
|
+
export type AdminTenantListResponse = {
|
|
279
|
+
tenants: AdminTenant[];
|
|
280
|
+
};
|
|
281
|
+
export type AdminOAuthClientCreate = {
|
|
282
|
+
clientId: string;
|
|
283
|
+
companySlug: string;
|
|
284
|
+
/**
|
|
285
|
+
* Custd derives the least-privilege scope set from `purposeProfile` and sets
|
|
286
|
+
* the matching client profile, so a caller states its intent rather than the
|
|
287
|
+
* scope vocabulary. Pass `scopes` explicitly only when no purpose profile fits.
|
|
288
|
+
*/
|
|
289
|
+
scopes?: string[];
|
|
290
|
+
environment?: string;
|
|
291
|
+
profile?: string;
|
|
292
|
+
purposeProfile?: string;
|
|
293
|
+
};
|
|
294
|
+
export type AdminOAuthClient = {
|
|
295
|
+
clientId: string;
|
|
296
|
+
companySlug: string;
|
|
297
|
+
scopes: string[];
|
|
298
|
+
environment?: string;
|
|
299
|
+
profile?: string;
|
|
300
|
+
purposeProfile?: string;
|
|
301
|
+
};
|
|
302
|
+
export type AdminOAuthClientCreateResponse = AdminOAuthClient & {
|
|
303
|
+
clientSecret: string;
|
|
304
|
+
};
|
|
305
|
+
export type AdminOAuthClientListResponse = {
|
|
306
|
+
clients: AdminOAuthClient[];
|
|
307
|
+
};
|
|
308
|
+
export type AdminOAuthClientSecretResponse = {
|
|
309
|
+
clientSecret: string;
|
|
310
|
+
};
|
|
311
|
+
export type AdminSiteCreate = {
|
|
312
|
+
companySlug: string;
|
|
313
|
+
name: string;
|
|
314
|
+
identityMode: "cookieless" | "extended";
|
|
315
|
+
allowedOrigins: string[];
|
|
316
|
+
rateLimitPerMinute?: number;
|
|
317
|
+
retentionDays?: number;
|
|
318
|
+
};
|
|
319
|
+
export type AdminSite = {
|
|
320
|
+
siteUuid: string;
|
|
321
|
+
companySlug: string;
|
|
322
|
+
name: string;
|
|
323
|
+
identityMode: "cookieless" | "extended";
|
|
324
|
+
allowedOrigins: string[];
|
|
325
|
+
rateLimitPerMinute: number;
|
|
326
|
+
retentionDays: number;
|
|
327
|
+
enabled: boolean;
|
|
328
|
+
};
|
|
329
|
+
export type AdminSiteCreateResponse = AdminSite & {
|
|
330
|
+
writeKey: string;
|
|
331
|
+
};
|
|
332
|
+
export type AdminSiteListResponse = {
|
|
333
|
+
sites: AdminSite[];
|
|
334
|
+
};
|
|
335
|
+
export type AdminSiteWriteKeyResponse = {
|
|
336
|
+
writeKey: string;
|
|
337
|
+
};
|
|
338
|
+
export type AdminSchemaRegister = {
|
|
339
|
+
eventTypeSlug: string;
|
|
340
|
+
version: string;
|
|
341
|
+
jsonSchema: Record<string, unknown>;
|
|
342
|
+
};
|
|
343
|
+
export type AdminSchemaVersionCreate = {
|
|
344
|
+
version: string;
|
|
345
|
+
jsonSchema: Record<string, unknown>;
|
|
346
|
+
};
|
|
347
|
+
export type AdminSchema = {
|
|
348
|
+
eventTypeSlug: string;
|
|
349
|
+
version: string;
|
|
350
|
+
jsonSchema?: Record<string, unknown>;
|
|
351
|
+
};
|
|
352
|
+
export type AdminSchemaListResponse = {
|
|
353
|
+
schemas: AdminSchema[];
|
|
354
|
+
};
|
|
355
|
+
export type AdminOAuthClientUpdateScopesRequest = {
|
|
356
|
+
companySlug?: string;
|
|
357
|
+
profile?: string;
|
|
358
|
+
scopes: string[];
|
|
359
|
+
};
|
|
360
|
+
export type AdminSchemaIssue = {
|
|
361
|
+
code?: string;
|
|
362
|
+
path?: string;
|
|
363
|
+
message: string;
|
|
364
|
+
};
|
|
365
|
+
export type AdminSchemaValidateRequest = {
|
|
366
|
+
tenantSlug: string;
|
|
367
|
+
eventTypeSlug: string;
|
|
368
|
+
dialect: "jsonschema" | "avro";
|
|
369
|
+
schemaJson: string;
|
|
370
|
+
};
|
|
371
|
+
export type AdminSchemaValidateResult = {
|
|
372
|
+
valid: boolean;
|
|
373
|
+
issues: AdminSchemaIssue[];
|
|
374
|
+
suggestedAction: "register" | "fix_before_register" | "none" | string;
|
|
375
|
+
};
|
|
376
|
+
export type AdminSchemaEnableRequest = {
|
|
377
|
+
tenantSlug: string;
|
|
378
|
+
eventTypeSlug: string;
|
|
379
|
+
version: string;
|
|
380
|
+
enabledAt?: string;
|
|
381
|
+
};
|
|
382
|
+
export type AdminSchemaDryRunRequest = {
|
|
383
|
+
tenantSlug: string;
|
|
384
|
+
eventTypeSlug: string;
|
|
385
|
+
dialect: "jsonschema" | "avro";
|
|
386
|
+
schemaJson: string;
|
|
387
|
+
samples: unknown[];
|
|
388
|
+
};
|
|
389
|
+
export type AdminSchemaDryRunResult = {
|
|
390
|
+
passed: number;
|
|
391
|
+
failed: number;
|
|
392
|
+
issues: AdminSchemaIssue[];
|
|
393
|
+
};
|
|
394
|
+
export type AdminSchemaAuditEntry = {
|
|
395
|
+
eventId: string;
|
|
396
|
+
eventTypeSlug: string;
|
|
397
|
+
version: string;
|
|
398
|
+
action: "registered" | "enabled" | "rolled_back" | string;
|
|
399
|
+
registeredAt: string;
|
|
400
|
+
registeredBy: string;
|
|
401
|
+
};
|
|
402
|
+
export type AdminSchemaAuditListResponse = {
|
|
403
|
+
entries: AdminSchemaAuditEntry[];
|
|
404
|
+
};
|
|
405
|
+
export type AdminPrivacyRulesResponse = {
|
|
406
|
+
tenantSlug: string;
|
|
407
|
+
purposes: string[];
|
|
408
|
+
hardDeleteAfterDays: number;
|
|
409
|
+
};
|
|
410
|
+
export type AdminPrivacyRuleUpdate = {
|
|
411
|
+
purposes: string[];
|
|
412
|
+
hardDeleteAfterDays?: number;
|
|
413
|
+
};
|
|
414
|
+
export type AdminPrivacyIdentifierMapping = {
|
|
415
|
+
identifierId: string;
|
|
416
|
+
internalIdHash: string;
|
|
417
|
+
internalIdHashPrefix: string;
|
|
418
|
+
saltVersion: number;
|
|
419
|
+
createdAt?: string;
|
|
420
|
+
};
|
|
421
|
+
export type AdminPrivacyIdentifierMapRequest = {
|
|
422
|
+
externalId: string;
|
|
423
|
+
};
|
|
424
|
+
export type AdminStorageAlertRule = {
|
|
425
|
+
ruleId: string;
|
|
426
|
+
tenantSlug: string;
|
|
427
|
+
metric: string;
|
|
428
|
+
thresholdPercent: number;
|
|
429
|
+
channel: string;
|
|
430
|
+
enabled: boolean;
|
|
431
|
+
createdAt?: string;
|
|
432
|
+
updatedAt?: string;
|
|
433
|
+
};
|
|
434
|
+
export type AdminStorageAlertRuleCreateRequest = {
|
|
435
|
+
metric: string;
|
|
436
|
+
thresholdPercent: number;
|
|
437
|
+
channel: string;
|
|
438
|
+
enabled: boolean;
|
|
439
|
+
};
|
|
440
|
+
export type AdminStorageAlertRuleListResponse = {
|
|
441
|
+
rules: AdminStorageAlertRule[];
|
|
442
|
+
};
|
|
443
|
+
export type AdminAuditEvent = {
|
|
444
|
+
/** Stable public audit event UUID. */
|
|
445
|
+
eventId: string;
|
|
446
|
+
tenantSlug: string;
|
|
447
|
+
actorKind: string;
|
|
448
|
+
actorReference?: string;
|
|
449
|
+
actorDisplayName: string;
|
|
450
|
+
actorRoles?: string[];
|
|
451
|
+
action: string;
|
|
452
|
+
resourceType: string;
|
|
453
|
+
resourceId?: string;
|
|
454
|
+
outcome: AdminAuditOutcome;
|
|
455
|
+
correlationId?: string;
|
|
456
|
+
operationId?: string;
|
|
457
|
+
changes?: AdminAuditChange[];
|
|
458
|
+
details?: Record<string, unknown>;
|
|
459
|
+
network?: AdminAuditNetworkDisclosure;
|
|
460
|
+
createdAt: string;
|
|
461
|
+
};
|
|
462
|
+
export type AdminAuditListCursor = {
|
|
463
|
+
cursor: string;
|
|
464
|
+
};
|
|
465
|
+
export type AdminAuditOutcome = "attempted" | "success" | "failure" | "denied" | "pending" | "unknown";
|
|
466
|
+
export type AdminAuditDisclosureState = "available" | "redacted" | "not_recorded";
|
|
467
|
+
export type AdminAuditChange = {
|
|
468
|
+
field: string;
|
|
469
|
+
before?: unknown;
|
|
470
|
+
after?: unknown;
|
|
471
|
+
};
|
|
472
|
+
export type AdminAuditNetworkDisclosure = {
|
|
473
|
+
ipAddress?: string;
|
|
474
|
+
ipAddressState: AdminAuditDisclosureState;
|
|
475
|
+
userAgent?: string;
|
|
476
|
+
userAgentState: AdminAuditDisclosureState;
|
|
477
|
+
};
|
|
478
|
+
export type AdminAuditRetentionDisclosure = {
|
|
479
|
+
eventMaxAgeSeconds: number;
|
|
480
|
+
ipAddressMaxAgeSeconds: number;
|
|
481
|
+
userAgentMaxAgeSeconds: number;
|
|
482
|
+
};
|
|
483
|
+
export type AdminAuditListResponse = {
|
|
484
|
+
events: AdminAuditEvent[];
|
|
485
|
+
nextCursor: AdminAuditListCursor;
|
|
486
|
+
coverageBeginsAt?: string;
|
|
487
|
+
retention?: AdminAuditRetentionDisclosure;
|
|
488
|
+
};
|
|
489
|
+
export type AdminAuditListOptions = {
|
|
490
|
+
scope?: "tenant" | "global";
|
|
491
|
+
companySlug?: string;
|
|
492
|
+
affectedTenantSlug?: string;
|
|
493
|
+
since?: string;
|
|
494
|
+
until?: string;
|
|
495
|
+
actorKind?: string;
|
|
496
|
+
actorReference?: string;
|
|
497
|
+
action?: string;
|
|
498
|
+
resourceType?: string;
|
|
499
|
+
resourceId?: string;
|
|
500
|
+
outcome?: AdminAuditOutcome;
|
|
501
|
+
correlationId?: string;
|
|
502
|
+
limit?: number;
|
|
503
|
+
cursor?: string;
|
|
504
|
+
};
|
|
505
|
+
export type AdminAuditExportResponse = {
|
|
506
|
+
bytes: Uint8Array;
|
|
507
|
+
contentType: string;
|
|
508
|
+
};
|
|
509
|
+
export type AdminReportingPackAuditEvent = {
|
|
510
|
+
action: string;
|
|
511
|
+
actorReference?: string;
|
|
512
|
+
actorDisplayName: string;
|
|
513
|
+
resourceType: string;
|
|
514
|
+
resourceId: string;
|
|
515
|
+
packKey: string;
|
|
516
|
+
createdAt: string;
|
|
517
|
+
};
|
|
518
|
+
export type AdminReportingPackAuditListResponse = {
|
|
519
|
+
events: AdminReportingPackAuditEvent[];
|
|
520
|
+
};
|
|
521
|
+
export type SelectorDefinition = {
|
|
522
|
+
selector: string;
|
|
523
|
+
type: string;
|
|
524
|
+
};
|
|
525
|
+
export type NumericSelector = SelectorDefinition & {
|
|
526
|
+
unit: string;
|
|
527
|
+
};
|
|
528
|
+
export type IdentitySelectors = {
|
|
529
|
+
subject?: SelectorDefinition;
|
|
530
|
+
session?: SelectorDefinition;
|
|
531
|
+
entity?: SelectorDefinition;
|
|
532
|
+
cohort?: SelectorDefinition;
|
|
533
|
+
correlation?: SelectorDefinition;
|
|
534
|
+
};
|
|
535
|
+
export type FilterDefinition = {
|
|
536
|
+
dimension: string;
|
|
537
|
+
operators: string[];
|
|
538
|
+
};
|
|
539
|
+
export type SubjectScopeRule = {
|
|
540
|
+
required: boolean;
|
|
541
|
+
dimension: string;
|
|
542
|
+
};
|
|
543
|
+
export type MatchPredicate = {
|
|
544
|
+
selector: string;
|
|
545
|
+
exact?: string;
|
|
546
|
+
anyOf?: string[];
|
|
547
|
+
nonEmpty?: boolean;
|
|
548
|
+
pattern?: string;
|
|
549
|
+
};
|
|
550
|
+
export type FlowRule = {
|
|
551
|
+
key: string;
|
|
552
|
+
correlationSelector: string;
|
|
553
|
+
familySelector?: string;
|
|
554
|
+
familyValue?: string;
|
|
555
|
+
stepSelector: string;
|
|
556
|
+
startMarkers: string[];
|
|
557
|
+
completionMarkers: string[];
|
|
558
|
+
includeUncorrelated: boolean;
|
|
559
|
+
};
|
|
560
|
+
export type PackMetric = {
|
|
561
|
+
key: string;
|
|
562
|
+
label: string;
|
|
563
|
+
kind: string;
|
|
564
|
+
unit?: string;
|
|
565
|
+
description?: string;
|
|
566
|
+
calculation: string;
|
|
567
|
+
numeric?: NumericSelector;
|
|
568
|
+
distinct?: SelectorDefinition;
|
|
569
|
+
measurementKind?: string;
|
|
570
|
+
maximumGapSeconds?: number;
|
|
571
|
+
resetPolicy?: string;
|
|
572
|
+
rolloverAt?: number;
|
|
573
|
+
canonicalUnit?: string;
|
|
574
|
+
percentile?: number;
|
|
575
|
+
numeratorMetric?: string;
|
|
576
|
+
denominatorMetric?: string;
|
|
577
|
+
seriesKey?: string;
|
|
578
|
+
hierarchyRootKey?: string;
|
|
579
|
+
match?: MatchPredicate[];
|
|
580
|
+
flowResult?: "steps" | "starts" | "completions" | "drop_offs" | "completion_rate" | "uncorrelated";
|
|
581
|
+
};
|
|
582
|
+
export type PackDimension = {
|
|
583
|
+
key: string;
|
|
584
|
+
label: string;
|
|
585
|
+
description?: string;
|
|
586
|
+
selector?: string;
|
|
587
|
+
allowedValuePattern?: string;
|
|
588
|
+
fallback?: string;
|
|
589
|
+
maxCardinality?: number;
|
|
590
|
+
};
|
|
591
|
+
export type PackTemplate = {
|
|
592
|
+
name: string;
|
|
593
|
+
allowedMetrics: string[];
|
|
594
|
+
allowedDimensions?: string[];
|
|
595
|
+
allowedFilters?: FilterDefinition[];
|
|
596
|
+
sourceModes: string[];
|
|
597
|
+
maxRows: number;
|
|
598
|
+
defaultRange?: string;
|
|
599
|
+
subjectScope?: SubjectScopeRule;
|
|
600
|
+
compositionRules?: string[];
|
|
601
|
+
eventTypes: string[];
|
|
602
|
+
aggregation: string;
|
|
603
|
+
flowRule?: string;
|
|
604
|
+
};
|
|
605
|
+
export type TrustDiagnostics = {
|
|
606
|
+
safeFields: string[];
|
|
607
|
+
redactionGuard: string[];
|
|
608
|
+
};
|
|
609
|
+
export type ProofProfile = {
|
|
610
|
+
key: string;
|
|
611
|
+
templates: string[];
|
|
612
|
+
safeMetadataFields: string[];
|
|
613
|
+
forbiddenFields: string[];
|
|
614
|
+
outputLayout: string;
|
|
615
|
+
};
|
|
616
|
+
export type PackDefinition = {
|
|
617
|
+
key: string;
|
|
618
|
+
displayName: string;
|
|
619
|
+
owner: string;
|
|
620
|
+
version: number;
|
|
621
|
+
enabled: boolean;
|
|
622
|
+
eventTypes: string[];
|
|
623
|
+
metrics: PackMetric[];
|
|
624
|
+
dimensions: PackDimension[];
|
|
625
|
+
templates: PackTemplate[];
|
|
626
|
+
flowRules?: FlowRule[];
|
|
627
|
+
trust: TrustDiagnostics;
|
|
628
|
+
proof: ProofProfile;
|
|
629
|
+
identity?: IdentitySelectors;
|
|
630
|
+
};
|
|
631
|
+
export type ReportingPackDraft = {
|
|
632
|
+
id: number;
|
|
633
|
+
revision: number;
|
|
634
|
+
definition: PackDefinition;
|
|
635
|
+
createdAt?: string;
|
|
636
|
+
updatedAt?: string;
|
|
637
|
+
};
|
|
638
|
+
export type ReportingPackDraftCreateRequest = {
|
|
639
|
+
definition: PackDefinition;
|
|
640
|
+
};
|
|
641
|
+
export type ReportingPackDraftUpdateRequest = {
|
|
642
|
+
definition: PackDefinition;
|
|
643
|
+
expectedRevision: number;
|
|
644
|
+
};
|
|
645
|
+
export type ReportingPackDraftListResponse = {
|
|
646
|
+
drafts: ReportingPackDraft[];
|
|
647
|
+
};
|
|
648
|
+
export type ReportingPackValidateResponse = {
|
|
649
|
+
valid: boolean;
|
|
650
|
+
};
|
|
651
|
+
export type ReportingPackPreviewQueryHint = {
|
|
652
|
+
template: string;
|
|
653
|
+
metrics: string[];
|
|
654
|
+
dimensions?: string[];
|
|
655
|
+
rangeDays?: number;
|
|
656
|
+
};
|
|
657
|
+
export type ReportingPackPreviewRequest = {
|
|
658
|
+
definition: PackDefinition;
|
|
659
|
+
tenantSlug: string;
|
|
660
|
+
query: ReportingPackPreviewQueryHint;
|
|
661
|
+
};
|
|
662
|
+
export type ReportingPackPreviewBucket = {
|
|
663
|
+
date: string;
|
|
664
|
+
value: RenderedMetricValue;
|
|
665
|
+
source: string;
|
|
666
|
+
queryDurationMs: number;
|
|
667
|
+
parquetUriCount?: number;
|
|
668
|
+
message?: string;
|
|
669
|
+
secondary?: RenderedMetricValue;
|
|
670
|
+
};
|
|
671
|
+
export type ReportingPackPreviewResponse = {
|
|
672
|
+
buckets?: ReportingPackPreviewBucket[];
|
|
673
|
+
value: RenderedMetricValue;
|
|
674
|
+
};
|
|
675
|
+
export type ReportingPackGeneration = {
|
|
676
|
+
id: number;
|
|
677
|
+
generationNumber: number;
|
|
678
|
+
sourceDraftId: number;
|
|
679
|
+
definition: PackDefinition;
|
|
680
|
+
state: string;
|
|
681
|
+
createdAt?: string;
|
|
682
|
+
};
|
|
683
|
+
export type ReportingPackGenerationStatusDetail = {
|
|
684
|
+
id: number;
|
|
685
|
+
generationNumber: number;
|
|
686
|
+
packKey: string;
|
|
687
|
+
state: string;
|
|
688
|
+
};
|
|
689
|
+
export type ReportingPackGenerationAcknowledgement = {
|
|
690
|
+
accepted: boolean;
|
|
691
|
+
consumer: string;
|
|
692
|
+
errorDetail?: string;
|
|
693
|
+
observedAt?: string;
|
|
694
|
+
observedGenerationId: number;
|
|
695
|
+
};
|
|
696
|
+
export type ReportingPackGenerationStatusResponse = {
|
|
697
|
+
generation: ReportingPackGenerationStatusDetail;
|
|
698
|
+
acknowledgements: ReportingPackGenerationAcknowledgement[];
|
|
699
|
+
};
|
|
700
|
+
export type ReportingPackMaterializationProvenance = {
|
|
701
|
+
status: string;
|
|
702
|
+
definitionFingerprint: string;
|
|
703
|
+
sourceCoverageCount: number;
|
|
704
|
+
};
|
|
705
|
+
export type ReportingPackRollupProvenance = {
|
|
706
|
+
generationId: number;
|
|
707
|
+
definitionFingerprint: string;
|
|
708
|
+
tenantSlug?: string;
|
|
709
|
+
materializations: ReportingPackMaterializationProvenance[];
|
|
710
|
+
};
|
|
711
|
+
export type ProducerReservation = {
|
|
712
|
+
producerSlug: string;
|
|
713
|
+
parentCompanySlug: string;
|
|
714
|
+
childCompanySlug?: string;
|
|
715
|
+
claimedByClientId?: string;
|
|
716
|
+
status: string;
|
|
717
|
+
reservedAt?: string;
|
|
718
|
+
expiresAt?: string;
|
|
719
|
+
maxTtlSeconds?: number;
|
|
720
|
+
};
|
|
721
|
+
export type ProducerReservationListResponse = {
|
|
722
|
+
reservations: ProducerReservation[];
|
|
723
|
+
};
|
|
724
|
+
export type ProducerReservationCreateRequest = {
|
|
725
|
+
producerSlug: string;
|
|
726
|
+
ttlSeconds?: number;
|
|
727
|
+
};
|
|
728
|
+
export type ProducerReservationClaimRequest = {
|
|
729
|
+
claimedByClientId: string;
|
|
730
|
+
};
|
|
731
|
+
export type MeasurementProjectCreate = {
|
|
732
|
+
projectCode: string;
|
|
733
|
+
name: string;
|
|
734
|
+
kind: string;
|
|
735
|
+
description?: string;
|
|
736
|
+
series: MeasurementSeriesCreate[];
|
|
737
|
+
target: MeasurementTargetCreate;
|
|
738
|
+
};
|
|
739
|
+
export type MeasurementProject = {
|
|
740
|
+
projectUuid: string;
|
|
741
|
+
projectCode: string;
|
|
742
|
+
name: string;
|
|
743
|
+
kind: string;
|
|
744
|
+
status: string;
|
|
745
|
+
description?: string;
|
|
746
|
+
series?: MeasurementSeries[];
|
|
747
|
+
target?: MeasurementTarget;
|
|
748
|
+
};
|
|
749
|
+
export type MeasurementSeries = {
|
|
750
|
+
seriesUuid: string;
|
|
751
|
+
seriesCode: string;
|
|
752
|
+
name: string;
|
|
753
|
+
unitSlug: string;
|
|
754
|
+
completionDirection: string;
|
|
755
|
+
source: string;
|
|
756
|
+
};
|
|
757
|
+
export type MeasurementTarget = {
|
|
758
|
+
targetUuid: string;
|
|
759
|
+
targetCode: string;
|
|
760
|
+
name: string;
|
|
761
|
+
targetValue: number;
|
|
762
|
+
targetDate?: string;
|
|
763
|
+
state: string;
|
|
764
|
+
};
|
|
765
|
+
export type MeasurementProjectListResponse = {
|
|
766
|
+
projects: MeasurementProject[];
|
|
767
|
+
};
|
|
768
|
+
export type MeasurementSeriesCreate = {
|
|
769
|
+
seriesCode: string;
|
|
770
|
+
name: string;
|
|
771
|
+
unitSlug: string;
|
|
772
|
+
completionDirection: string;
|
|
773
|
+
source: string;
|
|
774
|
+
};
|
|
775
|
+
export type MeasurementTargetCreate = {
|
|
776
|
+
targetCode: string;
|
|
777
|
+
name: string;
|
|
778
|
+
targetValue: number;
|
|
779
|
+
targetDate?: string;
|
|
780
|
+
state: string;
|
|
781
|
+
};
|
|
782
|
+
export type MeasurementObservationInput = {
|
|
783
|
+
seriesUuid: string;
|
|
784
|
+
observedAt: string;
|
|
785
|
+
value: number;
|
|
786
|
+
idempotencyKey?: string;
|
|
787
|
+
metadata?: Record<string, string>;
|
|
788
|
+
};
|
|
789
|
+
export type MeasurementObservationBulkRequest = {
|
|
790
|
+
rows: MeasurementObservationInput[];
|
|
791
|
+
};
|
|
792
|
+
export type MeasurementObservationResult = {
|
|
793
|
+
rowIndex: number;
|
|
794
|
+
success: boolean;
|
|
795
|
+
status?: number;
|
|
796
|
+
observationUuid?: string;
|
|
797
|
+
type?: string;
|
|
798
|
+
title?: string;
|
|
799
|
+
detail?: string;
|
|
800
|
+
};
|
|
801
|
+
export type MeasurementObservationBulkResponse = {
|
|
802
|
+
importId: string;
|
|
803
|
+
accepted: number;
|
|
804
|
+
rejected: number;
|
|
805
|
+
results: MeasurementObservationResult[];
|
|
806
|
+
};
|
|
807
|
+
export type MeasurementCSVImportResponse = {
|
|
808
|
+
importId: string;
|
|
809
|
+
accepted: number;
|
|
810
|
+
rejected: number;
|
|
811
|
+
results: MeasurementObservationResult[];
|
|
812
|
+
};
|
|
813
|
+
export type SchemaValidationIssue = {
|
|
814
|
+
path: string;
|
|
815
|
+
keyword: string;
|
|
816
|
+
message: string;
|
|
817
|
+
schemaLocation: string;
|
|
818
|
+
instanceLocation: string;
|
|
819
|
+
severity: string;
|
|
820
|
+
};
|
|
821
|
+
export type SchemaExampleResult = {
|
|
822
|
+
index: number;
|
|
823
|
+
valid: boolean;
|
|
824
|
+
class: string;
|
|
825
|
+
oldValid: boolean;
|
|
826
|
+
newValid: boolean;
|
|
827
|
+
issueCodes: string[];
|
|
828
|
+
issues: SchemaValidationIssue[];
|
|
829
|
+
};
|
|
830
|
+
export type SchemaValidationRequest = {
|
|
831
|
+
slug?: string;
|
|
832
|
+
name?: string;
|
|
833
|
+
version?: string;
|
|
834
|
+
jsonSchema: string;
|
|
835
|
+
examples?: Array<Record<string, unknown>>;
|
|
836
|
+
};
|
|
837
|
+
export type SchemaValidationResponse = {
|
|
838
|
+
valid: boolean;
|
|
839
|
+
schemaValid: boolean;
|
|
840
|
+
issues: SchemaValidationIssue[];
|
|
841
|
+
warnings: SchemaValidationIssue[];
|
|
842
|
+
exampleResults: SchemaExampleResult[];
|
|
843
|
+
normalizedSchema: string;
|
|
844
|
+
dialect: string;
|
|
845
|
+
checksum: string;
|
|
846
|
+
wouldCreateEventType: boolean;
|
|
847
|
+
wouldCreateVersion: boolean;
|
|
848
|
+
conflicts: Array<{
|
|
849
|
+
field: string;
|
|
850
|
+
message: string;
|
|
851
|
+
}>;
|
|
852
|
+
validatorEngine: string;
|
|
853
|
+
validatorVersion: string;
|
|
854
|
+
schemaChecksum: string;
|
|
855
|
+
schemaDialect: string;
|
|
856
|
+
};
|
|
857
|
+
export type SchemaInferenceRequest = {
|
|
858
|
+
samples: Array<Record<string, unknown>>;
|
|
859
|
+
};
|
|
860
|
+
export type SchemaInferenceResponse = {
|
|
861
|
+
valid: boolean;
|
|
862
|
+
issues: SchemaValidationIssue[];
|
|
863
|
+
inferenceWarnings: SchemaValidationIssue[];
|
|
864
|
+
candidateSchema: string;
|
|
865
|
+
validatorEngine: string;
|
|
866
|
+
validatorVersion: string;
|
|
867
|
+
schemaChecksum: string;
|
|
868
|
+
schemaDialect: string;
|
|
869
|
+
};
|
|
870
|
+
export type SendTestEventResponse = {
|
|
871
|
+
success: boolean;
|
|
872
|
+
eventUuid: string;
|
|
873
|
+
};
|
|
874
|
+
export type ReportingDashboard = {
|
|
875
|
+
key: string;
|
|
876
|
+
title: string;
|
|
877
|
+
hidden?: boolean;
|
|
878
|
+
defaultRange: string;
|
|
879
|
+
refreshSeconds: number;
|
|
880
|
+
requiredScopes: string[];
|
|
881
|
+
widgets: ReportingWidget[];
|
|
882
|
+
};
|
|
883
|
+
export type ReportingWidget = {
|
|
884
|
+
key: string;
|
|
885
|
+
title: string;
|
|
886
|
+
kind: string;
|
|
887
|
+
template: string;
|
|
888
|
+
metrics: string[];
|
|
889
|
+
dimensions?: string[];
|
|
890
|
+
};
|
|
891
|
+
export type ReportingQueryRequest = {
|
|
892
|
+
dashboardKey?: string;
|
|
893
|
+
widgetKey?: string;
|
|
894
|
+
template: string;
|
|
895
|
+
metrics: string[];
|
|
896
|
+
dimensions?: string[];
|
|
897
|
+
filters?: ReportingFilter[];
|
|
898
|
+
from?: string;
|
|
899
|
+
to?: string;
|
|
900
|
+
rangeDays?: number;
|
|
901
|
+
maxRows?: number;
|
|
902
|
+
countOnly?: boolean;
|
|
903
|
+
comparison?: "previous_period" | "previous_year";
|
|
904
|
+
};
|
|
905
|
+
export type ReportingFilter = {
|
|
906
|
+
dimension: string;
|
|
907
|
+
operator: string;
|
|
908
|
+
value?: string;
|
|
909
|
+
};
|
|
910
|
+
export type SubjectInsightRequest = {
|
|
911
|
+
template: string;
|
|
912
|
+
subject: string;
|
|
913
|
+
from?: string;
|
|
914
|
+
to?: string;
|
|
915
|
+
rangeDays?: number;
|
|
916
|
+
};
|
|
917
|
+
export type SubjectInsightResponse = {
|
|
918
|
+
data: RenderedWidgetData;
|
|
919
|
+
};
|
|
920
|
+
export type RenderedWidgetData = {
|
|
921
|
+
buckets: RenderedWidgetBucket[];
|
|
922
|
+
value: RenderedMetricValue;
|
|
923
|
+
metadata?: ReportingQueryMetadata;
|
|
924
|
+
sources?: ReportingSourceSummary[];
|
|
925
|
+
warnings?: string[];
|
|
926
|
+
queryDurationMs: number;
|
|
927
|
+
parquetUriCount?: number;
|
|
928
|
+
snapshotAgeMs: number;
|
|
929
|
+
eventLagP95Ms: number;
|
|
930
|
+
delta?: RenderedMetricValue;
|
|
931
|
+
deltaPercent?: number;
|
|
932
|
+
deltaLabel?: string;
|
|
933
|
+
secondaryLabel?: string;
|
|
934
|
+
trust?: RenderedReportingTrust;
|
|
935
|
+
visual?: unknown;
|
|
936
|
+
};
|
|
937
|
+
export type RenderedReportingTrust = {
|
|
938
|
+
status: string;
|
|
939
|
+
dataFreshness: string;
|
|
940
|
+
retryability: "none" | "bounded" | string;
|
|
941
|
+
nextAction: ReportingNextActionHint;
|
|
942
|
+
lastExport?: string;
|
|
943
|
+
schemaVersion?: string;
|
|
944
|
+
contractVersion?: string;
|
|
945
|
+
rollupState: string;
|
|
946
|
+
queryWarnings?: string[];
|
|
947
|
+
coverage: string;
|
|
948
|
+
permissionClass?: string;
|
|
949
|
+
captureState: string;
|
|
950
|
+
consentState: string;
|
|
951
|
+
exportState: string;
|
|
952
|
+
partialReason?: string;
|
|
953
|
+
unavailableReason?: string;
|
|
954
|
+
};
|
|
955
|
+
export type ReportingNextAction = "none" | "poll" | "retry" | "rotate" | "escalate" | string;
|
|
956
|
+
export type ReportingNextActionHint = {
|
|
957
|
+
action: ReportingNextAction;
|
|
958
|
+
pollAfterSeconds?: number;
|
|
959
|
+
maxRetries?: number;
|
|
960
|
+
};
|
|
961
|
+
export type RenderedWidgetBucket = {
|
|
962
|
+
date: string;
|
|
963
|
+
value: RenderedMetricValue;
|
|
964
|
+
source: string;
|
|
965
|
+
queryDurationMs: number;
|
|
966
|
+
parquetUriCount?: number;
|
|
967
|
+
message?: string;
|
|
968
|
+
secondary?: RenderedMetricValue;
|
|
969
|
+
};
|
|
970
|
+
export type RenderedMetricValue = {
|
|
971
|
+
value: number;
|
|
972
|
+
unit: string;
|
|
973
|
+
sampleCount: number;
|
|
974
|
+
dataSufficiency: string;
|
|
975
|
+
complete: boolean;
|
|
976
|
+
truncated?: boolean;
|
|
977
|
+
};
|
|
978
|
+
export type ReportingQueryMetadata = {
|
|
979
|
+
resolvedTemplate: string;
|
|
980
|
+
rangeStart?: string;
|
|
981
|
+
rangeEnd?: string;
|
|
982
|
+
effectiveMaxRows: number;
|
|
983
|
+
returnedRows: number;
|
|
984
|
+
returnedBuckets: number;
|
|
985
|
+
coveredWindows: number;
|
|
986
|
+
};
|
|
987
|
+
export type ReportingSourceSummary = {
|
|
988
|
+
kind: string;
|
|
989
|
+
count: number;
|
|
990
|
+
coverageStart?: string;
|
|
991
|
+
coverageEnd?: string;
|
|
992
|
+
completeness: string;
|
|
993
|
+
};
|
|
994
|
+
export type ReportingWidgetData = RenderedWidgetData;
|
|
995
|
+
export type ReportingTrust = RenderedReportingTrust;
|
|
996
|
+
export declare class MemoryQueueStorage implements QueueStorage {
|
|
997
|
+
private events;
|
|
998
|
+
load(): EventEnvelope[];
|
|
999
|
+
save(events: EventEnvelope[]): void;
|
|
1000
|
+
clear(): void;
|
|
1001
|
+
}
|
|
1002
|
+
export declare class LocalStorageQueueStorage implements QueueStorage {
|
|
1003
|
+
private key;
|
|
1004
|
+
constructor(key?: string);
|
|
1005
|
+
load(): EventEnvelope[];
|
|
1006
|
+
save(events: EventEnvelope[]): void;
|
|
1007
|
+
clear(): void;
|
|
1008
|
+
}
|
|
1009
|
+
export declare class CustdClient {
|
|
1010
|
+
readonly admin: AdminNamespace;
|
|
1011
|
+
readonly provisioning: ProvisioningNamespace;
|
|
1012
|
+
readonly reporting: ReportingNamespace;
|
|
1013
|
+
readonly schemas: SchemaNamespace;
|
|
1014
|
+
readonly analytics: AnalyticsEventClient;
|
|
1015
|
+
private baseUrl;
|
|
1016
|
+
private getToken;
|
|
1017
|
+
private fetchImpl;
|
|
1018
|
+
private defaultHeaders;
|
|
1019
|
+
private retry;
|
|
1020
|
+
private batch;
|
|
1021
|
+
private queueEnabled;
|
|
1022
|
+
private queueStorage;
|
|
1023
|
+
private queue;
|
|
1024
|
+
private maxQueueSize;
|
|
1025
|
+
private flushOnOnline;
|
|
1026
|
+
private onlineHandler;
|
|
1027
|
+
private compressionEnabled;
|
|
1028
|
+
private compressionThresholdBytes;
|
|
1029
|
+
private batchTimer;
|
|
1030
|
+
private removeFlushTriggers;
|
|
1031
|
+
private oauthToken;
|
|
1032
|
+
private readonly config;
|
|
1033
|
+
constructor(config: ClientConfig);
|
|
1034
|
+
static fromProvisionedProducer(credentials: ProvisionedProducerCredentials): CustdClient;
|
|
1035
|
+
static fromBrokerEnv(env: BrokerEnv, options?: BrokerEnvClientOptions): CustdClient;
|
|
1036
|
+
private fetchOAuthToken;
|
|
1037
|
+
ingestEvent(event: EventEnvelope): Promise<Response>;
|
|
1038
|
+
track(event: EventEnvelope): Promise<void | Response>;
|
|
1039
|
+
enqueue(event: EventEnvelope): void;
|
|
1040
|
+
flush(): Promise<void>;
|
|
1041
|
+
close(): void;
|
|
1042
|
+
private sendWithRetry;
|
|
1043
|
+
private sendBatchWithRetry;
|
|
1044
|
+
private encodeBatchBody;
|
|
1045
|
+
private assertBatchResponse;
|
|
1046
|
+
private batchRejectionMessage;
|
|
1047
|
+
private adminRequest;
|
|
1048
|
+
private offboardingDownload;
|
|
1049
|
+
private auditExportDownload;
|
|
1050
|
+
private apiRequest;
|
|
1051
|
+
private apiDownload;
|
|
1052
|
+
}
|
|
1053
|
+
type AdminRequester = <T>(method: string, path: string, body?: unknown, options?: RequestOptions) => Promise<T>;
|
|
1054
|
+
type AdminAuditDownloader = (path: string, options?: RequestOptions) => Promise<AdminAuditExportResponse>;
|
|
1055
|
+
type NonAdminRequester = <T>(method: string, path: string, body?: unknown, options?: RequestOptions) => Promise<T>;
|
|
1056
|
+
type SchemaRequester = <T>(method: string, path: string, body?: unknown) => Promise<T>;
|
|
1057
|
+
type APIRequester = <T>(method: string, path: string, body?: unknown, options?: RequestOptions) => Promise<T>;
|
|
1058
|
+
type APIDownloader = (path: string, options?: RequestOptions) => Promise<Uint8Array>;
|
|
1059
|
+
export interface ReportExportCreateRequest {
|
|
1060
|
+
dashboardKey: string;
|
|
1061
|
+
formats: string[];
|
|
1062
|
+
parameters: Record<string, unknown>;
|
|
1063
|
+
idempotencyKey?: string;
|
|
1064
|
+
}
|
|
1065
|
+
export interface ReportExportArtifact {
|
|
1066
|
+
id: string;
|
|
1067
|
+
artifactKey: string;
|
|
1068
|
+
format: string;
|
|
1069
|
+
filename: string;
|
|
1070
|
+
mediaType: string;
|
|
1071
|
+
objectBytes: number;
|
|
1072
|
+
objectSha256: string;
|
|
1073
|
+
warnings?: string[];
|
|
1074
|
+
fallbackForFormat?: string;
|
|
1075
|
+
rendererVersion?: string;
|
|
1076
|
+
}
|
|
1077
|
+
export interface ReportExportJob {
|
|
1078
|
+
id: string;
|
|
1079
|
+
packKey: string;
|
|
1080
|
+
packGeneration: number;
|
|
1081
|
+
dashboardKey: string;
|
|
1082
|
+
formats: string[];
|
|
1083
|
+
parametersDigest: string;
|
|
1084
|
+
snapshotSha256?: string;
|
|
1085
|
+
state: string;
|
|
1086
|
+
progressStage: string;
|
|
1087
|
+
progressCounters?: Record<string, number>;
|
|
1088
|
+
queuedAt: string;
|
|
1089
|
+
startedAt?: string;
|
|
1090
|
+
finishedAt?: string;
|
|
1091
|
+
expiresAt?: string;
|
|
1092
|
+
failureCategory?: string;
|
|
1093
|
+
failureMessage?: string;
|
|
1094
|
+
cancellationReason?: string;
|
|
1095
|
+
attemptCount: number;
|
|
1096
|
+
nextAttemptAt?: string;
|
|
1097
|
+
cleanupState: string;
|
|
1098
|
+
cleanupAttempts: number;
|
|
1099
|
+
nextCleanupAt?: string;
|
|
1100
|
+
artifacts?: ReportExportArtifact[];
|
|
1101
|
+
}
|
|
1102
|
+
declare class ReportingNamespace {
|
|
1103
|
+
private readonly request;
|
|
1104
|
+
private readonly download;
|
|
1105
|
+
constructor(request: APIRequester, download: APIDownloader);
|
|
1106
|
+
createExport(input: ReportExportCreateRequest, options?: RequestOptions): Promise<ReportExportJob>;
|
|
1107
|
+
listExports(limit?: number, options?: RequestOptions): Promise<ReportExportJob[]>;
|
|
1108
|
+
getExport(exportId: string, options?: RequestOptions): Promise<ReportExportJob>;
|
|
1109
|
+
cancelExport(exportId: string, reason?: string, options?: RequestOptions): Promise<ReportExportJob>;
|
|
1110
|
+
downloadExport(exportId: string, artifactId: string, options?: RequestOptions): Promise<Uint8Array>;
|
|
1111
|
+
dashboard(key: string, options?: RequestOptions): Promise<ReportingDashboard>;
|
|
1112
|
+
receipt(receiptUuid: string, options?: RequestOptions): Promise<PreparedDataReceiptStatus>;
|
|
1113
|
+
outputs(options?: RequestOptions): Promise<PreparedDataOutputList>;
|
|
1114
|
+
output(outputUuid: string, options?: RequestOptions): Promise<PreparedDataOutputStatus>;
|
|
1115
|
+
queryOutput(outputUuid: string, request: ReportingQueryRequest, options?: RequestOptions): Promise<PreparedDataQueryEnvelope>;
|
|
1116
|
+
query(request: ReportingQueryRequest, options?: RequestOptions): Promise<RenderedWidgetData>;
|
|
1117
|
+
subjectInsight(request: SubjectInsightRequest, options?: RequestOptions): Promise<SubjectInsightResponse>;
|
|
1118
|
+
}
|
|
1119
|
+
declare class SchemaNamespace {
|
|
1120
|
+
private readonly request;
|
|
1121
|
+
constructor(request: SchemaRequester);
|
|
1122
|
+
validate(input: SchemaValidationRequest): Promise<SchemaValidationResponse>;
|
|
1123
|
+
dryRun(input: SchemaValidationRequest): Promise<SchemaValidationResponse>;
|
|
1124
|
+
infer(input: SchemaInferenceRequest): Promise<SchemaInferenceResponse>;
|
|
1125
|
+
sendTestEvent(event: EventEnvelope): Promise<SendTestEventResponse>;
|
|
1126
|
+
}
|
|
1127
|
+
declare class AdminNamespace {
|
|
1128
|
+
readonly dataLabels: DataLabelAdminClient;
|
|
1129
|
+
readonly tenants: AdminTenantNamespace;
|
|
1130
|
+
readonly lifecycle: BackendLifecycleClient;
|
|
1131
|
+
readonly clientSetup: ClientSetupClient;
|
|
1132
|
+
readonly oauthClients: AdminOAuthClientNamespace;
|
|
1133
|
+
readonly sites: AdminSiteNamespace;
|
|
1134
|
+
readonly schemas: AdminSchemaNamespace;
|
|
1135
|
+
readonly measurement: AdminMeasurementNamespace;
|
|
1136
|
+
readonly predictions: PredictionAdminClient;
|
|
1137
|
+
readonly privacy: AdminPrivacyNamespace;
|
|
1138
|
+
readonly retention: RetentionClient;
|
|
1139
|
+
readonly storageAlerts: AdminStorageAlertsNamespace;
|
|
1140
|
+
readonly audit: AdminAuditNamespace;
|
|
1141
|
+
readonly offboarding: OffboardingClient;
|
|
1142
|
+
readonly reportingPacks: AdminReportingPacksNamespace;
|
|
1143
|
+
readonly tenantStorage: TenantStorageClient;
|
|
1144
|
+
readonly subjectExports: SubjectExportClient;
|
|
1145
|
+
readonly privacyErasures: PrivacyErasureClient;
|
|
1146
|
+
readonly timePlans: TimePlanAdminClient;
|
|
1147
|
+
constructor(request: AdminRequester, nonAdminRequest: NonAdminRequester, offboardingDownload: (path: string, options?: RequestOptions) => Promise<OffboardingDownloadResponse>, auditExportDownload: AdminAuditDownloader);
|
|
1148
|
+
}
|
|
1149
|
+
declare class ProvisioningNamespace {
|
|
1150
|
+
readonly dataSpaces: ProvisioningDataSpaceNamespace;
|
|
1151
|
+
readonly producers: ProvisioningProducerNamespace;
|
|
1152
|
+
readonly reservations: ProvisioningReservationsNamespace;
|
|
1153
|
+
constructor(request: APIRequester);
|
|
1154
|
+
}
|
|
1155
|
+
declare class ProvisioningReservationsNamespace {
|
|
1156
|
+
private readonly request;
|
|
1157
|
+
constructor(request: APIRequester);
|
|
1158
|
+
reserve(dataSpaceSlug: string, body: ProducerReservationCreateRequest): Promise<ProducerReservation>;
|
|
1159
|
+
list(dataSpaceSlug: string): Promise<ProducerReservationListResponse>;
|
|
1160
|
+
claim(dataSpaceSlug: string, producerSlug: string, body: ProducerReservationClaimRequest): Promise<ProducerReservation>;
|
|
1161
|
+
release(dataSpaceSlug: string, producerSlug: string): Promise<void>;
|
|
1162
|
+
}
|
|
1163
|
+
declare class ProvisioningDataSpaceNamespace {
|
|
1164
|
+
private readonly request;
|
|
1165
|
+
constructor(request: APIRequester);
|
|
1166
|
+
create(dataSpace: DataSpaceCreate): Promise<DataSpace>;
|
|
1167
|
+
list(): Promise<DataSpaceListResponse>;
|
|
1168
|
+
revoke(slug: string): Promise<void>;
|
|
1169
|
+
}
|
|
1170
|
+
declare class ProvisioningProducerNamespace {
|
|
1171
|
+
private readonly request;
|
|
1172
|
+
constructor(request: APIRequester);
|
|
1173
|
+
provision(request: ProducerProvisionCreate): Promise<ProvisionedProducerCredentials>;
|
|
1174
|
+
list(companySlug?: string): Promise<ProducerProvisionPublicClient[]>;
|
|
1175
|
+
rotateSecret(clientId: string): Promise<ProvisionedProducerCredentials>;
|
|
1176
|
+
/**
|
|
1177
|
+
* Sets the environment recorded for this producer. It is the authenticated
|
|
1178
|
+
* default for events that do not declare their own, not a per-environment
|
|
1179
|
+
* credential: one producer is expected to carry every environment unless an
|
|
1180
|
+
* operator deliberately restricts it.
|
|
1181
|
+
*/
|
|
1182
|
+
updateEnvironment(clientId: string, environment: string): Promise<ProducerProvisionPublicClient>;
|
|
1183
|
+
revoke(clientId: string): Promise<void>;
|
|
1184
|
+
}
|
|
1185
|
+
declare class AdminTenantNamespace {
|
|
1186
|
+
private readonly request;
|
|
1187
|
+
constructor(request: AdminRequester);
|
|
1188
|
+
create(tenant: AdminTenantCreate): Promise<AdminTenant>;
|
|
1189
|
+
list(): Promise<AdminTenantListResponse>;
|
|
1190
|
+
get(slug: string): Promise<AdminTenant>;
|
|
1191
|
+
delete(slug: string): Promise<void>;
|
|
1192
|
+
}
|
|
1193
|
+
declare class AdminOAuthClientNamespace {
|
|
1194
|
+
private readonly request;
|
|
1195
|
+
constructor(request: AdminRequester);
|
|
1196
|
+
create(client: AdminOAuthClientCreate, options?: RequestOptions): Promise<AdminOAuthClientCreateResponse>;
|
|
1197
|
+
list(): Promise<AdminOAuthClientListResponse>;
|
|
1198
|
+
get(clientId: string): Promise<AdminOAuthClient>;
|
|
1199
|
+
delete(clientId: string, options?: RequestOptions): Promise<void>;
|
|
1200
|
+
rotateSecret(clientId: string, options?: RequestOptions): Promise<AdminOAuthClientSecretResponse>;
|
|
1201
|
+
updateScopes(clientId: string, body: AdminOAuthClientUpdateScopesRequest, options?: RequestOptions): Promise<AdminOAuthClient>;
|
|
1202
|
+
}
|
|
1203
|
+
declare class AdminSiteNamespace {
|
|
1204
|
+
private readonly request;
|
|
1205
|
+
constructor(request: AdminRequester);
|
|
1206
|
+
create(site: AdminSiteCreate): Promise<AdminSiteCreateResponse>;
|
|
1207
|
+
list(): Promise<AdminSiteListResponse>;
|
|
1208
|
+
get(siteUuid: string): Promise<AdminSite>;
|
|
1209
|
+
delete(siteUuid: string): Promise<void>;
|
|
1210
|
+
rotateWriteKey(siteUuid: string): Promise<AdminSiteWriteKeyResponse>;
|
|
1211
|
+
}
|
|
1212
|
+
declare class AdminSchemaNamespace {
|
|
1213
|
+
private readonly request;
|
|
1214
|
+
constructor(request: AdminRequester);
|
|
1215
|
+
list(): Promise<AdminSchemaListResponse>;
|
|
1216
|
+
get(eventTypeSlug: string): Promise<AdminSchema>;
|
|
1217
|
+
register(schema: AdminSchemaRegister): Promise<AdminSchema>;
|
|
1218
|
+
createVersion(eventTypeSlug: string, schema: AdminSchemaVersionCreate): Promise<AdminSchema>;
|
|
1219
|
+
validate(body: AdminSchemaValidateRequest): Promise<AdminSchemaValidateResult>;
|
|
1220
|
+
enableVersion(tenantSlug: string, eventTypeSlug: string, body: AdminSchemaEnableRequest): Promise<void>;
|
|
1221
|
+
dryRun(tenantSlug: string, eventTypeSlug: string, body: AdminSchemaDryRunRequest): Promise<AdminSchemaDryRunResult>;
|
|
1222
|
+
audit(): Promise<AdminSchemaAuditListResponse>;
|
|
1223
|
+
}
|
|
1224
|
+
declare class AdminPrivacyNamespace {
|
|
1225
|
+
private readonly request;
|
|
1226
|
+
constructor(request: AdminRequester);
|
|
1227
|
+
getRules(): Promise<AdminPrivacyRulesResponse>;
|
|
1228
|
+
setRules(body: AdminPrivacyRuleUpdate): Promise<AdminPrivacyRulesResponse>;
|
|
1229
|
+
mapIdentifier(companySlug: string, body: AdminPrivacyIdentifierMapRequest): Promise<AdminPrivacyIdentifierMapping>;
|
|
1230
|
+
listIdentifierMappings(companySlug: string): Promise<AdminPrivacyIdentifierMapping[]>;
|
|
1231
|
+
}
|
|
1232
|
+
declare class AdminStorageAlertsNamespace {
|
|
1233
|
+
private readonly request;
|
|
1234
|
+
constructor(request: AdminRequester);
|
|
1235
|
+
listRules(tenantSlug: string): Promise<AdminStorageAlertRuleListResponse>;
|
|
1236
|
+
createRule(tenantSlug: string, body: AdminStorageAlertRuleCreateRequest): Promise<AdminStorageAlertRule>;
|
|
1237
|
+
deleteRule(tenantSlug: string, ruleId: string): Promise<void>;
|
|
1238
|
+
}
|
|
1239
|
+
declare class AdminAuditNamespace {
|
|
1240
|
+
private readonly request;
|
|
1241
|
+
private readonly download;
|
|
1242
|
+
constructor(request: AdminRequester, download: AdminAuditDownloader);
|
|
1243
|
+
private auditQuery;
|
|
1244
|
+
private auditLookupQuery;
|
|
1245
|
+
listEvents(options?: AdminAuditListOptions): Promise<AdminAuditListResponse>;
|
|
1246
|
+
getEvent(eventId: string, options?: AdminAuditListOptions): Promise<AdminAuditEvent>;
|
|
1247
|
+
exportEvents(options?: AdminAuditListOptions, format?: "csv" | "json"): Promise<AdminAuditExportResponse>;
|
|
1248
|
+
listReportingPackEvents(packKey: string): Promise<AdminReportingPackAuditListResponse>;
|
|
1249
|
+
}
|
|
1250
|
+
declare class AdminReportingPacksNamespace {
|
|
1251
|
+
private readonly request;
|
|
1252
|
+
constructor(request: AdminRequester);
|
|
1253
|
+
listDrafts(): Promise<ReportingPackDraftListResponse>;
|
|
1254
|
+
getDraft(draftId: string): Promise<ReportingPackDraft>;
|
|
1255
|
+
createDraft(body: ReportingPackDraftCreateRequest): Promise<ReportingPackDraft>;
|
|
1256
|
+
updateDraft(draftId: string, body: ReportingPackDraftUpdateRequest): Promise<ReportingPackDraft>;
|
|
1257
|
+
validate(body: ReportingPackDraftCreateRequest): Promise<ReportingPackValidateResponse>;
|
|
1258
|
+
preview(body: ReportingPackPreviewRequest): Promise<ReportingPackPreviewResponse>;
|
|
1259
|
+
publish(draftId: string): Promise<ReportingPackGeneration>;
|
|
1260
|
+
restart(draftId: string): Promise<ReportingPackGeneration>;
|
|
1261
|
+
getGeneration(generationId: string): Promise<ReportingPackGeneration>;
|
|
1262
|
+
getGenerationStatus(generationId: string): Promise<ReportingPackGenerationStatusResponse>;
|
|
1263
|
+
rollbackGeneration(generationId: string): Promise<void>;
|
|
1264
|
+
getRollupProvenance(generationId: string): Promise<ReportingPackRollupProvenance>;
|
|
1265
|
+
}
|
|
1266
|
+
declare class AdminMeasurementNamespace {
|
|
1267
|
+
readonly projects: AdminMeasurementProjectNamespace;
|
|
1268
|
+
constructor(request: AdminRequester);
|
|
1269
|
+
}
|
|
1270
|
+
declare class AdminMeasurementProjectNamespace {
|
|
1271
|
+
private readonly request;
|
|
1272
|
+
constructor(request: AdminRequester);
|
|
1273
|
+
create(project: MeasurementProjectCreate): Promise<MeasurementProject>;
|
|
1274
|
+
list(): Promise<MeasurementProjectListResponse>;
|
|
1275
|
+
get(projectUuid: string): Promise<MeasurementProject>;
|
|
1276
|
+
submitObservation(projectUuid: string, observation: MeasurementObservationInput): Promise<MeasurementObservationBulkResponse>;
|
|
1277
|
+
submitObservations(projectUuid: string, request: MeasurementObservationBulkRequest): Promise<MeasurementObservationBulkResponse>;
|
|
1278
|
+
importCSVString(projectUuid: string, csv: string, expectedRows: number): Promise<MeasurementCSVImportResponse>;
|
|
1279
|
+
}
|
|
1280
|
+
export type PrepareEventMode = "producer" | "browser-cookieless";
|
|
1281
|
+
export type PrepareEventOptions = {
|
|
1282
|
+
mode?: PrepareEventMode;
|
|
1283
|
+
};
|
|
1284
|
+
export declare function redactedProvisionedProducer(credentials: ProvisionedProducerCredentials): RedactedProvisionedProducerCredentials;
|
|
1285
|
+
export declare function validateEvent(event: EventEnvelope): void;
|
|
1286
|
+
/** Reserved envelope label carrying a declared environment. */
|
|
1287
|
+
export declare const environmentLabelKey = "custd.environment";
|
|
1288
|
+
/**
|
|
1289
|
+
* Checks a declared environment against the contract ingest applies, so a
|
|
1290
|
+
* rejected declaration fails locally instead of failing the event at the API.
|
|
1291
|
+
*/
|
|
1292
|
+
export declare function validateEnvironmentValue(value: string): void;
|
|
1293
|
+
/**
|
|
1294
|
+
* Stamps the effective environment onto the envelope labels. An event-level
|
|
1295
|
+
* declaration wins over the client default, and a label the caller set is never
|
|
1296
|
+
* overwritten.
|
|
1297
|
+
*/
|
|
1298
|
+
export declare function applyEnvironmentLabel(event: EventEnvelope, clientEnvironment?: string): void;
|
|
1299
|
+
export declare function validateBrowserEvent(event: EventEnvelope): void;
|
|
1300
|
+
export declare function createDogfoodEvent(input: DogfoodEventInput): EventEnvelope;
|
|
1301
|
+
export declare function prepareEvent(event: EventEnvelope, options?: PrepareEventOptions): EventEnvelope;
|
|
1302
|
+
export declare class RetryableError extends Error {
|
|
1303
|
+
}
|
|
1304
|
+
export declare class CustdProblemError extends Error {
|
|
1305
|
+
readonly problem?: ProblemDetails;
|
|
1306
|
+
readonly failures: EventResult[];
|
|
1307
|
+
constructor(message: string, problem?: ProblemDetails, failures?: EventResult[]);
|
|
1308
|
+
}
|
|
1309
|
+
export declare function normalizeRetryOptions(options?: RetryOptions): Required<RetryOptions>;
|
|
1310
|
+
export declare function withRetry<T>(options: Required<RetryOptions>, op: () => Promise<T>): Promise<T>;
|