@tier0/sdk-v2 0.9.8 → 0.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +16 -4
  2. package/README.md +18 -6
  3. package/dist/cjs/connection-diagnostics.d.ts +2 -0
  4. package/dist/cjs/connection-diagnostics.js +20 -0
  5. package/dist/cjs/connection-diagnostics.js.map +1 -0
  6. package/dist/cjs/data/error.d.ts +1 -1
  7. package/dist/cjs/data/error.js +2 -2
  8. package/dist/cjs/data/error.js.map +1 -1
  9. package/dist/cjs/openapi/client.js +3 -2
  10. package/dist/cjs/openapi/client.js.map +1 -1
  11. package/dist/cjs/openapi/types.generated.d.ts +1 -1
  12. package/dist/cjs/openapi/types.generated.js.map +1 -1
  13. package/dist/cjs/uns-v2/client.js +3 -2
  14. package/dist/cjs/uns-v2/client.js.map +1 -1
  15. package/dist/cjs/uns-v2/generated.d.ts +65 -19
  16. package/dist/cjs/uns-v2/generated.js +21 -20
  17. package/dist/cjs/uns-v2/generated.js.map +1 -1
  18. package/dist/esm/connection-diagnostics.d.ts +2 -0
  19. package/dist/esm/connection-diagnostics.js +17 -0
  20. package/dist/esm/connection-diagnostics.js.map +1 -0
  21. package/dist/esm/data/error.d.ts +1 -1
  22. package/dist/esm/data/error.js +2 -2
  23. package/dist/esm/data/error.js.map +1 -1
  24. package/dist/esm/openapi/client.js +3 -2
  25. package/dist/esm/openapi/client.js.map +1 -1
  26. package/dist/esm/openapi/types.generated.d.ts +1 -1
  27. package/dist/esm/openapi/types.generated.js.map +1 -1
  28. package/dist/esm/uns-v2/client.js +3 -2
  29. package/dist/esm/uns-v2/client.js.map +1 -1
  30. package/dist/esm/uns-v2/generated.d.ts +65 -19
  31. package/dist/esm/uns-v2/generated.js +21 -20
  32. package/dist/esm/uns-v2/generated.js.map +1 -1
  33. package/package.json +1 -1
  34. package/skills/tier0-sdk-v2/SKILL.md +2 -0
  35. package/skills/tier0-sdk-v2/references/local-connection.md +61 -0
  36. package/skills/tier0-sdk-v2/tier0-sdk-v2-data/references/consistency.md +2 -2
  37. package/skills/tier0-sdk-v2/tier0-sdk-v2-data/references/errors.md +4 -2
  38. package/skills/tier0-sdk-v2/tier0-sdk-v2-data/references/modeling.md +3 -1
  39. package/skills/tier0-sdk-v2/tier0-sdk-v2-data/references/schema-evolution.md +2 -0
  40. package/skills/tier0-sdk-v2/tier0-sdk-v2-uns/SKILL.md +5 -2
  41. package/skills/tier0-sdk-v2/tier0-sdk-v2-uns/references/delete.md +51 -19
  42. package/skills/tier0-sdk-v2/tier0-sdk-v2-uns/references/namespace.md +17 -1
  43. package/skills/tier0-sdk-v2/tier0-sdk-v2-uns/references/read.md +28 -0
  44. package/skills/tier0-sdk-v2/tier0-sdk-v2-uns/references/restore.md +12 -13
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/uns-v2/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,wBAAwB,GAEzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAwC,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GAOzB,MAAM,gBAAgB,CAAC;AASxB,MAAM,CAAC,MAAM,iBAAiB,GAA8B,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AA4BjH;;;;;GAKG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IAC1B,MAAM,CAAU;IAChB,SAAS,CAAsB;IAC/B,IAAI,CAAS;IACb,SAAS,CAAU;IACnB,SAAS,CAAiB;IAC1B,KAAK,CAAa;IAClB,IAAI,CAAU;IACd,IAAI,CAAU;IACd,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AAI,CAAC,IAA0B,EAAE,OAA2C,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACjG,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAA2B,CAAC;AAChE,CAAC;AAED,2FAA2F;AAC3F,MAAM,CAAC,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC","sourcesContent":["import {\n CloudTransport,\n CloudTransportError,\n UNS_V2_MAX_REQUEST_BYTES,\n type CloudTransportConfig,\n} from '../cloud-transport.js';\nimport { getClient, type HttpClient, type RequestOptions } from '../openapi/client.js';\nimport { decodeUnsV2JSON, encodeUnsV2JSON } from './codec.js';\nimport { parseServerSentEvents, ServerSentEventsError } from './sse.js';\nimport {\n UNS_V2_OPERATIONS,\n UNS_V2_STREAM_OPERATIONS,\n type CloudRecordSubscribeReq,\n type UnsV2OperationName,\n type UnsV2StreamOperationName,\n type UnsV2Operations,\n type UnsV2Request,\n type UnsV2Response,\n} from './generated.js';\n\ntype RecordValue = Record<string, unknown>;\n\n/**\n * How far a failed request got. `unknown` only for a mutation whose commit\n * cannot be confirmed; a read is never `unknown`.\n */\nexport type UnsV2Execution = 'notStarted' | 'rolledBack' | 'committed' | 'unknown';\nexport const UNS_V2_EXECUTIONS: readonly UnsV2Execution[] = ['notStarted', 'rolledBack', 'committed', 'unknown'];\n\n/** Whether the identical request (same idempotency key) may be sent again, and after how long. */\nexport interface UnsV2Retry {\n safe: boolean;\n afterMs?: number;\n}\n\n/** Generated POST operations, or a GET event stream such as `recordSubscribe`. */\nexport type UnsV2ErrorOperation = UnsV2OperationName | UnsV2StreamOperationName;\n\nexport interface UnsV2ErrorInfo {\n status?: number;\n operation: UnsV2ErrorOperation;\n code: string;\n requestId?: string;\n execution: UnsV2Execution;\n retry: UnsV2Retry;\n opId?: string;\n path?: string;\n details?: RecordValue[];\n repair?: string;\n reason?: string;\n queryId?: string;\n /** The error envelope's `data`, verbatim; stable access codes such as `data.reason` live here. */\n data?: unknown;\n}\n\n/**\n * A failed UNS v2 call. `execution` and `retry` come from the error body; for\n * failures without one (timeout, network, invalid response) the SDK fills them\n * like the gateway does: a read `rolledBack` and safe to resend, a mutation\n * `unknown` and not safe. This client never retries; it exposes the advice.\n */\nexport class UnsV2Error extends Error implements UnsV2ErrorInfo {\n readonly status?: number;\n readonly operation: UnsV2ErrorOperation;\n readonly code: string;\n readonly requestId?: string;\n readonly execution: UnsV2Execution;\n readonly retry: UnsV2Retry;\n readonly opId?: string;\n readonly path?: string;\n readonly details?: RecordValue[];\n readonly repair?: string;\n readonly reason?: string;\n readonly queryId?: string;\n readonly data?: unknown;\n\n constructor(message: string, info: UnsV2ErrorInfo) {\n super(message);\n this.name = 'UnsV2Error';\n Object.assign(this, info);\n this.status = info.status;\n this.operation = info.operation;\n this.code = info.code;\n this.execution = info.execution;\n this.retry = info.retry;\n }\n\n get outcomeUnknown(): boolean {\n return this.execution === 'unknown';\n }\n}\n\n/**\n * `execution: \"unknown\"`: a mutation may have committed. Reconcile (read back,\n * or replay with the same idempotency key when `retry.safe`) before acting again.\n */\nexport class UnsV2OutcomeUnknownError extends UnsV2Error {\n constructor(message: string, info: UnsV2ErrorInfo) {\n super(message, info);\n this.name = 'UnsV2OutcomeUnknownError';\n }\n}\n\nfunction record(value: unknown): value is RecordValue {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n\nfunction resourcePath(operation: { path: string; readonly pathParams: readonly string[] }, request: unknown): string {\n let path = operation.path;\n for (const key of operation.pathParams) {\n const value = record(request) && Object.prototype.hasOwnProperty.call(request, key) ? request[key] : undefined;\n if (typeof value !== 'string' || value.length < 1 || value.length > 128 ||\n value === '.' || value === '..' || /[/\\\\\\u0000-\\u001f\\u007f]/.test(value)) {\n throw new TypeError(`Tier0 SDK: invalid UNS v2 path identity ${key}.`);\n }\n path = path.replace(`:${key}`, encodeURIComponent(value));\n }\n return path;\n}\n\nfunction afterMs(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isSafeInteger(value) && value >= 0 ? value : undefined;\n}\n\n/** The wire error object (an envelope's `error`, a batch item's `error`); undefined when it is not one. */\nexport function parseUnsV2Fault(value: unknown): Omit<UnsV2ErrorInfo, 'status' | 'operation' | 'requestId' | 'data'> | undefined {\n if (!record(value) || typeof value.code !== 'string' || !Array.isArray(value.details) ||\n !UNS_V2_EXECUTIONS.includes(value.execution as UnsV2Execution) ||\n !record(value.retry) || typeof value.retry.safe !== 'boolean') return undefined;\n const wait = afterMs(value.retry.afterMs);\n return {\n code: value.code,\n execution: value.execution as UnsV2Execution,\n retry: { safe: value.retry.safe, ...(wait === undefined ? {} : { afterMs: wait }) },\n opId: typeof value.opId === 'string' ? value.opId : undefined,\n path: typeof value.path === 'string' ? value.path : undefined,\n details: value.details.every(record) ? value.details : undefined,\n repair: typeof value.repair === 'string' ? value.repair : undefined,\n reason: typeof value.reason === 'string' ? value.reason : undefined,\n queryId: typeof value.queryId === 'string' ? value.queryId : undefined,\n };\n}\n\nfunction errorInfo(value: unknown, status: number, operation: UnsV2ErrorOperation): UnsV2ErrorInfo | undefined {\n if (!record(value)) return undefined;\n const fault = parseUnsV2Fault(value.error);\n if (!fault) return undefined;\n return {\n ...fault,\n status,\n operation,\n requestId: typeof value.requestId === 'string' ? value.requestId : undefined,\n data: value.data ?? undefined,\n };\n}\n\n/**\n * Builds the error for a failure without a UNS error body. The gateway's rule\n * applies: a read is `rolledBack` (safe to resend when `safeRead`), a mutation\n * `unknown` and not safe. `notStarted` overrides both for answers that prove\n * the request never reached UNS.\n */\nfunction localError(\n message: string,\n operation: UnsV2ErrorOperation,\n mutation: boolean,\n code: string,\n status?: number,\n safeRead = true,\n extra: { notStarted?: boolean; afterMs?: number } = {},\n): UnsV2Error {\n const info: UnsV2ErrorInfo = {\n status,\n operation,\n code,\n execution: extra.notStarted ? 'notStarted' : mutation ? 'unknown' : 'rolledBack',\n retry: { safe: !mutation && safeRead, ...(extra.afterMs === undefined || mutation ? {} : { afterMs: extra.afterMs }) },\n };\n return info.execution === 'unknown' ? new UnsV2OutcomeUnknownError(message, info) : new UnsV2Error(message, info);\n}\n\n/** `Retry-After` as delay-seconds or an HTTP date, in milliseconds from now. */\nfunction retryAfterMs(value: string | undefined): number | undefined {\n if (value === undefined) return undefined;\n if (/^\\d+$/.test(value.trim())) return Number(value.trim()) * 1000;\n const at = Date.parse(value);\n return Number.isNaN(at) ? undefined : Math.max(0, at - Date.now());\n}\n\n/**\n * UNS v2 routes answer every error with the envelope, so a 4xx whose body is\n * no envelope at all comes from an intermediary (edge 401 / 413 page) that\n * never forwarded the request; 408 is the exception, the request may have\n * been forwarded.\n */\nconst rejectedBeforeUns = (status: number) => status >= 400 && status < 500 && status !== 408;\n\n/** Contract limits of one `records:subscribe` stream. */\nexport const UNS_V2_SUBSCRIBE_MAX_COLLECTIONS = 64;\nexport const UNS_V2_SUBSCRIBE_MAX_RECORD_IDS = 100;\nconst EVENT_ID_MAX_LENGTH = 8192;\n\n/**\n * Rejects a resume position that cannot be an event id (1–8192 visible ASCII\n * characters), such as a `Last-Event-ID` with CR/LF taken from a browser:\n * sent as a header it would fail every connection.\n */\nexport function assertEventId(value: string): void {\n if (typeof value !== 'string' || value.length < 1 || value.length > EVENT_ID_MAX_LENGTH || !/^[\\x21-\\x7e]+$/.test(value)) {\n throw new TypeError(`Tier0 SDK: lastEventId must be 1–${EVENT_ID_MAX_LENGTH} visible ASCII characters.`);\n }\n}\n\n/**\n * Query of `records:subscribe`; the resume position travels as `lastEventId`\n * (the `Last-Event-ID` header). Without `collectionIds` the stream covers every\n * collection the caller may read (an App key: every collection granted to the App).\n */\nexport type UnsV2RecordSubscribeRequest = Pick<CloudRecordSubscribeReq, 'collectionIds' | 'recordIds'>;\n\n/**\n * A committed record change. Events carry identities only: read the record to\n * see its data. `restricted`: the collection has employee data rules, so who\n * may see this record depends on the employee (see `data.subscribe`).\n */\nexport interface UnsV2RecordChangeEvent {\n type: 'change';\n /** Stream position (also the frame id); resume after it with `lastEventId`. */\n eventId: string;\n collectionId: string;\n recordId: string;\n revision: number;\n change: 'record' | 'delete';\n occurredAt: number;\n restricted: boolean;\n}\n\nexport type UnsV2SubscriptionEvent =\n | UnsV2RecordChangeEvent\n /** Sent on connect and every 15 s; `eventId` is the current position, resumable like a change's. */\n | { type: 'heartbeat'; eventId?: string }\n /**\n * The server closes the stream after it. `CURSOR_EXPIRED`: the position is\n * outside the 24 h retention; `SCOPE_CHANGED`: access narrowed. Reload, then\n * subscribe again without `lastEventId`.\n */\n | { type: 'reset'; reason: string; message?: string };\n\nfunction changeEvent(value: unknown): UnsV2RecordChangeEvent | undefined {\n if (!record(value) || typeof value.eventId !== 'string' || typeof value.collectionId !== 'string' ||\n typeof value.recordId !== 'string' || typeof value.revision !== 'number' || !Number.isSafeInteger(value.revision) ||\n (value.change !== 'record' && value.change !== 'delete') || typeof value.occurredAt !== 'number' ||\n typeof value.restricted !== 'boolean') return undefined;\n return {\n type: 'change',\n eventId: value.eventId,\n collectionId: value.collectionId,\n recordId: value.recordId,\n revision: value.revision,\n change: value.change,\n occurredAt: value.occurredAt,\n restricted: value.restricted,\n };\n}\n\nexport class UnsV2ClientCore {\n private readonly transport: CloudTransport;\n\n constructor(resolveClient: () => HttpClient = getClient, config: CloudTransportConfig = {}) {\n this.transport = new CloudTransport(resolveClient, config);\n }\n\n async call<Name extends UnsV2OperationName>(name: Name, request: UnsV2Request<Name>, options: RequestOptions = {}): Promise<UnsV2Response<Name>> {\n options.signal?.throwIfAborted();\n if (typeof name !== 'string' || !Object.prototype.hasOwnProperty.call(UNS_V2_OPERATIONS, name)) {\n throw new TypeError('Tier0 SDK: unknown UNS v2 operation.');\n }\n const operation = UNS_V2_OPERATIONS[name];\n const mutation = operation.mutation;\n const path = resourcePath(operation, request);\n const body = encodeUnsV2JSON(request, operation.request);\n if (new TextEncoder().encode(body).byteLength > UNS_V2_MAX_REQUEST_BYTES) {\n throw new TypeError('Tier0 SDK: UNS v2 request body exceeds the 16777216-byte contract limit.');\n }\n let response: Awaited<ReturnType<CloudTransport['postText']>>;\n try {\n response = await this.transport.postText(path, body, options, name);\n } catch (error) {\n if (!(error instanceof CloudTransportError)) throw error;\n const message = error.kind === 'TRANSPORT_TIMEOUT'\n ? 'UNS v2 HTTP transport deadline exceeded.'\n : error.kind === 'PROTOCOL_ERROR' ? 'Invalid UNS v2 HTTP response.'\n : error.kind === 'TRANSPORT_ABORTED' ? 'UNS v2 request aborted.' : 'UNS v2 transport failed.';\n const resendable = error.kind === 'TRANSPORT_TIMEOUT' || error.kind === 'TRANSPORT_ERROR';\n throw localError(message, name, mutation, `UNS_V2_${error.kind}`, error.status, resendable);\n }\n\n // An ingress answers 502/503/504 without the UNS envelope during rollouts and restarts.\n const unavailable = response.status === 502 || response.status === 503 || response.status === 504;\n // `enveloped`: the body looks like a UNS envelope, so UNS may have answered it.\n const invalid = (message: string, enveloped: boolean) => localError(message, name, mutation, 'UNS_V2_PROTOCOL_ERROR', response.status, unavailable, {\n notStarted: !enveloped && rejectedBeforeUns(response.status),\n afterMs: unavailable ? retryAfterMs(response.retryAfter) : undefined,\n });\n let value: unknown;\n try {\n value = decodeUnsV2JSON(response.text, response.status === 200 ? operation.response : 'UnsV2ErrorResponse');\n } catch {\n throw invalid('Invalid UNS v2 response.', false);\n }\n\n if (response.status !== 200) {\n const info = errorInfo(value, response.status, name);\n if (!info || !record(value) || value.code !== response.status) {\n throw invalid('Invalid UNS v2 error response.', record(value) && typeof value.code === 'number');\n }\n // A read never has an unknown outcome; hold UNS to the rule it states for itself.\n if (!mutation && info.execution === 'unknown') info.execution = 'rolledBack';\n const message = typeof value.msg === 'string' ? value.msg : info.code;\n throw info.execution === 'unknown' ? new UnsV2OutcomeUnknownError(message, info) : new UnsV2Error(message, info);\n }\n\n if (!record(value) || value.code !== 200 || typeof value.msg !== 'string' ||\n typeof value.requestId !== 'string' || !Object.prototype.hasOwnProperty.call(value, 'data')) {\n throw localError('Invalid UNS v2 success envelope.', name, mutation, 'UNS_V2_PROTOCOL_ERROR', response.status, false);\n }\n return value as UnsV2Response<Name>;\n }\n\n /**\n * Opens one `records:subscribe` event stream and yields its events until\n * the server ends it or `signal` aborts (the generator then returns). It\n * neither reconnects nor watches heartbeats; `data.subscribe` does. A\n * refused or broken connection throws UnsV2Error (operation\n * `recordSubscribe`, a read: `retry.safe` says whether to reconnect).\n */\n async *subscribeRecords(request: UnsV2RecordSubscribeRequest, options: RequestOptions & { lastEventId?: string } = {}): AsyncGenerator<UnsV2SubscriptionEvent> {\n const name = 'recordSubscribe';\n const { collectionIds, recordIds } = request;\n if (collectionIds !== undefined && (!Array.isArray(collectionIds) || collectionIds.length < 1 || collectionIds.length > UNS_V2_SUBSCRIBE_MAX_COLLECTIONS)) {\n throw new TypeError(`Tier0 SDK: records:subscribe lists 1–${UNS_V2_SUBSCRIBE_MAX_COLLECTIONS} collections, or none for all.`);\n }\n if (recordIds !== undefined && (recordIds.length < 1 || recordIds.length > UNS_V2_SUBSCRIBE_MAX_RECORD_IDS || collectionIds?.length !== 1)) {\n throw new TypeError(`Tier0 SDK: records:subscribe takes 1–${UNS_V2_SUBSCRIBE_MAX_RECORD_IDS} recordIds of exactly one collection.`);\n }\n if (options.lastEventId !== undefined) assertEventId(options.lastEventId);\n // Repeated query parameters, as the contract specifies.\n const query = new URLSearchParams();\n for (const id of collectionIds ?? []) query.append('collectionIds', id);\n for (const id of recordIds ?? []) query.append('recordIds', id);\n const path = UNS_V2_STREAM_OPERATIONS.recordSubscribe.path + (query.size ? `?${query}` : '');\n let opened: Awaited<ReturnType<CloudTransport['getEventStream']>>;\n try {\n opened = await this.transport.getEventStream(path, options, name);\n } catch (error) {\n if (!(error instanceof CloudTransportError)) throw error;\n if (error.kind === 'TRANSPORT_ABORTED') return;\n const resendable = error.kind === 'TRANSPORT_TIMEOUT' || error.kind === 'TRANSPORT_ERROR';\n throw localError('UNS v2 event stream could not be opened.', name, false, `UNS_V2_${error.kind}`, error.status, resendable);\n }\n if ('text' in opened) {\n const unavailable = opened.status === 502 || opened.status === 503 || opened.status === 504;\n const invalid = (enveloped: boolean) => localError('Invalid UNS v2 event stream response.', name, false, 'UNS_V2_PROTOCOL_ERROR', opened.status, unavailable, {\n notStarted: !enveloped && rejectedBeforeUns(opened.status),\n });\n let value: unknown;\n try {\n value = decodeUnsV2JSON(opened.text, 'UnsV2ErrorResponse');\n } catch {\n throw invalid(false);\n }\n const info = opened.status === 200 ? undefined : errorInfo(value, opened.status, name);\n if (!info || !record(value) || value.code !== opened.status) throw invalid(record(value) && typeof value.code === 'number');\n // A subscription is a read: never an unknown outcome.\n if (info.execution === 'unknown') info.execution = 'rolledBack';\n throw new UnsV2Error(typeof value.msg === 'string' ? value.msg : info.code, info);\n }\n try {\n for await (const event of parseServerSentEvents(opened.stream)) {\n // A keep-alive comment counts as a heartbeat too.\n if ('comment' in event) {\n yield { type: 'heartbeat' };\n } else if (event.event === 'heartbeat') {\n yield event.id === undefined ? { type: 'heartbeat' } : { type: 'heartbeat', eventId: event.id };\n } else if (event.event === 'reset') {\n let body: unknown;\n try { body = JSON.parse(event.data); } catch { body = undefined; }\n if (!record(body) || typeof body.reason !== 'string') {\n throw localError('Invalid UNS v2 reset event.', name, false, 'UNS_V2_PROTOCOL_ERROR', 200, true);\n }\n yield typeof body.message === 'string'\n ? { type: 'reset', reason: body.reason, message: body.message }\n : { type: 'reset', reason: body.reason };\n } else if (event.event === 'change') {\n let parsed: UnsV2RecordChangeEvent | undefined;\n try { parsed = changeEvent(JSON.parse(event.data)); } catch { parsed = undefined; }\n if (!parsed) throw localError('Invalid UNS v2 change event.', name, false, 'UNS_V2_PROTOCOL_ERROR', 200, true);\n yield parsed;\n }\n }\n } catch (error) {\n if (options.signal?.aborted) return;\n if (error instanceof UnsV2Error) throw error;\n if (error instanceof ServerSentEventsError) throw localError(error.message, name, false, 'UNS_V2_PROTOCOL_ERROR', 200, true);\n throw localError('UNS v2 event stream broke.', name, false, 'UNS_V2_TRANSPORT_ERROR', 200, true);\n } finally {\n opened.close();\n }\n }\n}\n\nexport type UnsV2Client = UnsV2ClientCore & UnsV2Operations;\n\nexport function createUnsV2Client(resolveClient: () => HttpClient = getClient, config: CloudTransportConfig = {}): UnsV2Client {\n const core = new UnsV2ClientCore(resolveClient, config);\n const methods = Object.fromEntries(Object.keys(UNS_V2_OPERATIONS).map(name => [name, (request: unknown, options?: RequestOptions) =>\n core.call(name as UnsV2OperationName, request as UnsV2Request<UnsV2OperationName>, options)]));\n return Object.assign(core, methods) as unknown as UnsV2Client;\n}\n\n/** Uses configureClient()/TIER0_API_HOST/TIER0_API_KEY and does not imply v2 readiness. */\nexport const unsV2 = createUnsV2Client();\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/uns-v2/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,wBAAwB,GAEzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAwC,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GAOzB,MAAM,gBAAgB,CAAC;AASxB,MAAM,CAAC,MAAM,iBAAiB,GAA8B,CAAC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AA4BjH;;;;;GAKG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IAC1B,MAAM,CAAU;IAChB,SAAS,CAAsB;IAC/B,IAAI,CAAS;IACb,SAAS,CAAU;IACnB,SAAS,CAAiB;IAC1B,KAAK,CAAa;IAClB,IAAI,CAAU;IACd,IAAI,CAAU;IACd,OAAO,CAAiB;IACxB,MAAM,CAAU;IAChB,MAAM,CAAU;IAChB,OAAO,CAAU;IACjB,IAAI,CAAW;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AC,IAAI,CAAC,IAA0B,EAAE,OAA2C,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACjG,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAA2B,CAAC;AAChE,CAAC;AAED,2FAA2F;AAC3F,MAAM,CAAC,MAAM,KAAK,GAAG,iBAAiB,EAAE,CAAC","sourcesContent":["import {\n CloudTransport,\n CloudTransportError,\n UNS_V2_MAX_REQUEST_BYTES,\n type CloudTransportConfig,\n} from '../cloud-transport.js';\nimport { getClient, type HttpClient, type RequestOptions } from '../openapi/client.js';\nimport { invalidResponseHint } from '../connection-diagnostics.js';\nimport { decodeUnsV2JSON, encodeUnsV2JSON } from './codec.js';\nimport { parseServerSentEvents, ServerSentEventsError } from './sse.js';\nimport {\n UNS_V2_OPERATIONS,\n UNS_V2_STREAM_OPERATIONS,\n type CloudRecordSubscribeReq,\n type UnsV2OperationName,\n type UnsV2StreamOperationName,\n type UnsV2Operations,\n type UnsV2Request,\n type UnsV2Response,\n} from './generated.js';\n\ntype RecordValue = Record<string, unknown>;\n\n/**\n * How far a failed request got. `unknown` only for a mutation whose commit\n * cannot be confirmed; a read is never `unknown`.\n */\nexport type UnsV2Execution = 'notStarted' | 'rolledBack' | 'committed' | 'unknown';\nexport const UNS_V2_EXECUTIONS: readonly UnsV2Execution[] = ['notStarted', 'rolledBack', 'committed', 'unknown'];\n\n/** Whether the identical request (same idempotency key) may be sent again, and after how long. */\nexport interface UnsV2Retry {\n safe: boolean;\n afterMs?: number;\n}\n\n/** Generated POST operations, or a GET event stream such as `recordSubscribe`. */\nexport type UnsV2ErrorOperation = UnsV2OperationName | UnsV2StreamOperationName;\n\nexport interface UnsV2ErrorInfo {\n status?: number;\n operation: UnsV2ErrorOperation;\n code: string;\n requestId?: string;\n execution: UnsV2Execution;\n retry: UnsV2Retry;\n opId?: string;\n path?: string;\n details?: RecordValue[];\n repair?: string;\n reason?: string;\n queryId?: string;\n /** The error envelope's `data`, verbatim; stable access codes such as `data.reason` live here. */\n data?: unknown;\n}\n\n/**\n * A failed UNS v2 call. `execution` and `retry` come from the error body; for\n * failures without one (timeout, network, invalid response) the SDK fills them\n * like the gateway does: a read `rolledBack` and safe to resend, a mutation\n * `unknown` and not safe. This client never retries; it exposes the advice.\n */\nexport class UnsV2Error extends Error implements UnsV2ErrorInfo {\n readonly status?: number;\n readonly operation: UnsV2ErrorOperation;\n readonly code: string;\n readonly requestId?: string;\n readonly execution: UnsV2Execution;\n readonly retry: UnsV2Retry;\n readonly opId?: string;\n readonly path?: string;\n readonly details?: RecordValue[];\n readonly repair?: string;\n readonly reason?: string;\n readonly queryId?: string;\n readonly data?: unknown;\n\n constructor(message: string, info: UnsV2ErrorInfo) {\n super(message);\n this.name = 'UnsV2Error';\n Object.assign(this, info);\n this.status = info.status;\n this.operation = info.operation;\n this.code = info.code;\n this.execution = info.execution;\n this.retry = info.retry;\n }\n\n get outcomeUnknown(): boolean {\n return this.execution === 'unknown';\n }\n}\n\n/**\n * `execution: \"unknown\"`: a mutation may have committed. Reconcile (read back,\n * or replay with the same idempotency key when `retry.safe`) before acting again.\n */\nexport class UnsV2OutcomeUnknownError extends UnsV2Error {\n constructor(message: string, info: UnsV2ErrorInfo) {\n super(message, info);\n this.name = 'UnsV2OutcomeUnknownError';\n }\n}\n\nfunction record(value: unknown): value is RecordValue {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n\nfunction resourcePath(operation: { path: string; readonly pathParams: readonly string[] }, request: unknown): string {\n let path = operation.path;\n for (const key of operation.pathParams) {\n const value = record(request) && Object.prototype.hasOwnProperty.call(request, key) ? request[key] : undefined;\n if (typeof value !== 'string' || value.length < 1 || value.length > 128 ||\n value === '.' || value === '..' || /[/\\\\\\u0000-\\u001f\\u007f]/.test(value)) {\n throw new TypeError(`Tier0 SDK: invalid UNS v2 path identity ${key}.`);\n }\n path = path.replace(`:${key}`, encodeURIComponent(value));\n }\n return path;\n}\n\nfunction afterMs(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isSafeInteger(value) && value >= 0 ? value : undefined;\n}\n\n/** The wire error object (an envelope's `error`, a batch item's `error`); undefined when it is not one. */\nexport function parseUnsV2Fault(value: unknown): Omit<UnsV2ErrorInfo, 'status' | 'operation' | 'requestId' | 'data'> | undefined {\n if (!record(value) || typeof value.code !== 'string' || !Array.isArray(value.details) ||\n !UNS_V2_EXECUTIONS.includes(value.execution as UnsV2Execution) ||\n !record(value.retry) || typeof value.retry.safe !== 'boolean') return undefined;\n const wait = afterMs(value.retry.afterMs);\n return {\n code: value.code,\n execution: value.execution as UnsV2Execution,\n retry: { safe: value.retry.safe, ...(wait === undefined ? {} : { afterMs: wait }) },\n opId: typeof value.opId === 'string' ? value.opId : undefined,\n path: typeof value.path === 'string' ? value.path : undefined,\n details: value.details.every(record) ? value.details : undefined,\n repair: typeof value.repair === 'string' ? value.repair : undefined,\n reason: typeof value.reason === 'string' ? value.reason : undefined,\n queryId: typeof value.queryId === 'string' ? value.queryId : undefined,\n };\n}\n\nfunction errorInfo(value: unknown, status: number, operation: UnsV2ErrorOperation): UnsV2ErrorInfo | undefined {\n if (!record(value)) return undefined;\n const fault = parseUnsV2Fault(value.error);\n if (!fault) return undefined;\n return {\n ...fault,\n status,\n operation,\n requestId: typeof value.requestId === 'string' ? value.requestId : undefined,\n data: value.data ?? undefined,\n };\n}\n\n/**\n * Builds the error for a failure without a UNS error body. The gateway's rule\n * applies: a read is `rolledBack` (safe to resend when `safeRead`), a mutation\n * `unknown` and not safe. `notStarted` overrides both for answers that prove\n * the request never reached UNS.\n */\nfunction localError(\n message: string,\n operation: UnsV2ErrorOperation,\n mutation: boolean,\n code: string,\n status?: number,\n safeRead = true,\n extra: { notStarted?: boolean; afterMs?: number } = {},\n): UnsV2Error {\n const info: UnsV2ErrorInfo = {\n status,\n operation,\n code,\n execution: extra.notStarted ? 'notStarted' : mutation ? 'unknown' : 'rolledBack',\n retry: { safe: !mutation && safeRead, ...(extra.afterMs === undefined || mutation ? {} : { afterMs: extra.afterMs }) },\n };\n return info.execution === 'unknown' ? new UnsV2OutcomeUnknownError(message, info) : new UnsV2Error(message, info);\n}\n\n/** `Retry-After` as delay-seconds or an HTTP date, in milliseconds from now. */\nfunction retryAfterMs(value: string | undefined): number | undefined {\n if (value === undefined) return undefined;\n if (/^\\d+$/.test(value.trim())) return Number(value.trim()) * 1000;\n const at = Date.parse(value);\n return Number.isNaN(at) ? undefined : Math.max(0, at - Date.now());\n}\n\n/**\n * UNS v2 routes answer every error with the envelope, so a 4xx whose body is\n * no envelope at all comes from an intermediary (edge 401 / 413 page) that\n * never forwarded the request; 408 is the exception, the request may have\n * been forwarded.\n */\nconst rejectedBeforeUns = (status: number) => status >= 400 && status < 500 && status !== 408;\n\n/** Contract limits of one `records:subscribe` stream. */\nexport const UNS_V2_SUBSCRIBE_MAX_COLLECTIONS = 64;\nexport const UNS_V2_SUBSCRIBE_MAX_RECORD_IDS = 100;\nconst EVENT_ID_MAX_LENGTH = 8192;\n\n/**\n * Rejects a resume position that cannot be an event id (1–8192 visible ASCII\n * characters), such as a `Last-Event-ID` with CR/LF taken from a browser:\n * sent as a header it would fail every connection.\n */\nexport function assertEventId(value: string): void {\n if (typeof value !== 'string' || value.length < 1 || value.length > EVENT_ID_MAX_LENGTH || !/^[\\x21-\\x7e]+$/.test(value)) {\n throw new TypeError(`Tier0 SDK: lastEventId must be 1–${EVENT_ID_MAX_LENGTH} visible ASCII characters.`);\n }\n}\n\n/**\n * Query of `records:subscribe`; the resume position travels as `lastEventId`\n * (the `Last-Event-ID` header). Without `collectionIds` the stream covers every\n * collection the caller may read (an App key: every collection granted to the App).\n */\nexport type UnsV2RecordSubscribeRequest = Pick<CloudRecordSubscribeReq, 'collectionIds' | 'recordIds'>;\n\n/**\n * A committed record change. Events carry identities only: read the record to\n * see its data. `restricted`: the collection has employee data rules, so who\n * may see this record depends on the employee (see `data.subscribe`).\n */\nexport interface UnsV2RecordChangeEvent {\n type: 'change';\n /** Stream position (also the frame id); resume after it with `lastEventId`. */\n eventId: string;\n collectionId: string;\n recordId: string;\n revision: number;\n change: 'record' | 'delete';\n occurredAt: number;\n restricted: boolean;\n}\n\nexport type UnsV2SubscriptionEvent =\n | UnsV2RecordChangeEvent\n /** Sent on connect and every 15 s; `eventId` is the current position, resumable like a change's. */\n | { type: 'heartbeat'; eventId?: string }\n /**\n * The server closes the stream after it. `CURSOR_EXPIRED`: the position is\n * outside the 24 h retention; `SCOPE_CHANGED`: access narrowed. Reload, then\n * subscribe again without `lastEventId`.\n */\n | { type: 'reset'; reason: string; message?: string };\n\nfunction changeEvent(value: unknown): UnsV2RecordChangeEvent | undefined {\n if (!record(value) || typeof value.eventId !== 'string' || typeof value.collectionId !== 'string' ||\n typeof value.recordId !== 'string' || typeof value.revision !== 'number' || !Number.isSafeInteger(value.revision) ||\n (value.change !== 'record' && value.change !== 'delete') || typeof value.occurredAt !== 'number' ||\n typeof value.restricted !== 'boolean') return undefined;\n return {\n type: 'change',\n eventId: value.eventId,\n collectionId: value.collectionId,\n recordId: value.recordId,\n revision: value.revision,\n change: value.change,\n occurredAt: value.occurredAt,\n restricted: value.restricted,\n };\n}\n\nexport class UnsV2ClientCore {\n private readonly transport: CloudTransport;\n\n constructor(resolveClient: () => HttpClient = getClient, config: CloudTransportConfig = {}) {\n this.transport = new CloudTransport(resolveClient, config);\n }\n\n async call<Name extends UnsV2OperationName>(name: Name, request: UnsV2Request<Name>, options: RequestOptions = {}): Promise<UnsV2Response<Name>> {\n options.signal?.throwIfAborted();\n if (typeof name !== 'string' || !Object.prototype.hasOwnProperty.call(UNS_V2_OPERATIONS, name)) {\n throw new TypeError('Tier0 SDK: unknown UNS v2 operation.');\n }\n const operation = UNS_V2_OPERATIONS[name];\n const mutation = operation.mutation;\n const path = resourcePath(operation, request);\n const body = encodeUnsV2JSON(request, operation.request);\n if (new TextEncoder().encode(body).byteLength > UNS_V2_MAX_REQUEST_BYTES) {\n throw new TypeError('Tier0 SDK: UNS v2 request body exceeds the 16777216-byte contract limit.');\n }\n let response: Awaited<ReturnType<CloudTransport['postText']>>;\n try {\n response = await this.transport.postText(path, body, options, name);\n } catch (error) {\n if (!(error instanceof CloudTransportError)) throw error;\n const message = error.kind === 'TRANSPORT_TIMEOUT'\n ? 'UNS v2 HTTP transport deadline exceeded.'\n : error.kind === 'PROTOCOL_ERROR' ? 'Invalid UNS v2 HTTP response.'\n : error.kind === 'TRANSPORT_ABORTED' ? 'UNS v2 request aborted.' : 'UNS v2 transport failed.';\n const resendable = error.kind === 'TRANSPORT_TIMEOUT' || error.kind === 'TRANSPORT_ERROR';\n throw localError(message, name, mutation, `UNS_V2_${error.kind}`, error.status, resendable);\n }\n\n // An ingress answers 502/503/504 without the UNS envelope during rollouts and restarts.\n const unavailable = response.status === 502 || response.status === 503 || response.status === 504;\n // `enveloped`: the body looks like a UNS envelope, so UNS may have answered it.\n const invalid = (message: string, enveloped: boolean) => localError(message, name, mutation, 'UNS_V2_PROTOCOL_ERROR', response.status, unavailable, {\n notStarted: !enveloped && rejectedBeforeUns(response.status),\n afterMs: unavailable ? retryAfterMs(response.retryAfter) : undefined,\n });\n let value: unknown;\n try {\n value = decodeUnsV2JSON(response.text, response.status === 200 ? operation.response : 'UnsV2ErrorResponse');\n } catch {\n throw invalid(`Invalid UNS v2 response. ${invalidResponseHint(response.status)}`, false);\n }\n\n if (response.status !== 200) {\n const info = errorInfo(value, response.status, name);\n if (!info || !record(value) || value.code !== response.status) {\n throw invalid('Invalid UNS v2 error response.', record(value) && typeof value.code === 'number');\n }\n // A read never has an unknown outcome; hold UNS to the rule it states for itself.\n if (!mutation && info.execution === 'unknown') info.execution = 'rolledBack';\n const message = typeof value.msg === 'string' ? value.msg : info.code;\n throw info.execution === 'unknown' ? new UnsV2OutcomeUnknownError(message, info) : new UnsV2Error(message, info);\n }\n\n if (!record(value) || value.code !== 200 || typeof value.msg !== 'string' ||\n typeof value.requestId !== 'string' || !Object.prototype.hasOwnProperty.call(value, 'data')) {\n throw localError('Invalid UNS v2 success envelope.', name, mutation, 'UNS_V2_PROTOCOL_ERROR', response.status, false);\n }\n return value as UnsV2Response<Name>;\n }\n\n /**\n * Opens one `records:subscribe` event stream and yields its events until\n * the server ends it or `signal` aborts (the generator then returns). It\n * neither reconnects nor watches heartbeats; `data.subscribe` does. A\n * refused or broken connection throws UnsV2Error (operation\n * `recordSubscribe`, a read: `retry.safe` says whether to reconnect).\n */\n async *subscribeRecords(request: UnsV2RecordSubscribeRequest, options: RequestOptions & { lastEventId?: string } = {}): AsyncGenerator<UnsV2SubscriptionEvent> {\n const name = 'recordSubscribe';\n const { collectionIds, recordIds } = request;\n if (collectionIds !== undefined && (!Array.isArray(collectionIds) || collectionIds.length < 1 || collectionIds.length > UNS_V2_SUBSCRIBE_MAX_COLLECTIONS)) {\n throw new TypeError(`Tier0 SDK: records:subscribe lists 1–${UNS_V2_SUBSCRIBE_MAX_COLLECTIONS} collections, or none for all.`);\n }\n if (recordIds !== undefined && (recordIds.length < 1 || recordIds.length > UNS_V2_SUBSCRIBE_MAX_RECORD_IDS || collectionIds?.length !== 1)) {\n throw new TypeError(`Tier0 SDK: records:subscribe takes 1–${UNS_V2_SUBSCRIBE_MAX_RECORD_IDS} recordIds of exactly one collection.`);\n }\n if (options.lastEventId !== undefined) assertEventId(options.lastEventId);\n // Repeated query parameters, as the contract specifies.\n const query = new URLSearchParams();\n for (const id of collectionIds ?? []) query.append('collectionIds', id);\n for (const id of recordIds ?? []) query.append('recordIds', id);\n const path = UNS_V2_STREAM_OPERATIONS.recordSubscribe.path + (query.size ? `?${query}` : '');\n let opened: Awaited<ReturnType<CloudTransport['getEventStream']>>;\n try {\n opened = await this.transport.getEventStream(path, options, name);\n } catch (error) {\n if (!(error instanceof CloudTransportError)) throw error;\n if (error.kind === 'TRANSPORT_ABORTED') return;\n const resendable = error.kind === 'TRANSPORT_TIMEOUT' || error.kind === 'TRANSPORT_ERROR';\n throw localError('UNS v2 event stream could not be opened.', name, false, `UNS_V2_${error.kind}`, error.status, resendable);\n }\n if ('text' in opened) {\n const unavailable = opened.status === 502 || opened.status === 503 || opened.status === 504;\n const invalid = (enveloped: boolean) => localError(`Invalid UNS v2 event stream response. ${invalidResponseHint(opened.status)}`, name, false, 'UNS_V2_PROTOCOL_ERROR', opened.status, unavailable, {\n notStarted: !enveloped && rejectedBeforeUns(opened.status),\n });\n let value: unknown;\n try {\n value = decodeUnsV2JSON(opened.text, 'UnsV2ErrorResponse');\n } catch {\n throw invalid(false);\n }\n const info = opened.status === 200 ? undefined : errorInfo(value, opened.status, name);\n if (!info || !record(value) || value.code !== opened.status) throw invalid(record(value) && typeof value.code === 'number');\n // A subscription is a read: never an unknown outcome.\n if (info.execution === 'unknown') info.execution = 'rolledBack';\n throw new UnsV2Error(typeof value.msg === 'string' ? value.msg : info.code, info);\n }\n try {\n for await (const event of parseServerSentEvents(opened.stream)) {\n // A keep-alive comment counts as a heartbeat too.\n if ('comment' in event) {\n yield { type: 'heartbeat' };\n } else if (event.event === 'heartbeat') {\n yield event.id === undefined ? { type: 'heartbeat' } : { type: 'heartbeat', eventId: event.id };\n } else if (event.event === 'reset') {\n let body: unknown;\n try { body = JSON.parse(event.data); } catch { body = undefined; }\n if (!record(body) || typeof body.reason !== 'string') {\n throw localError('Invalid UNS v2 reset event.', name, false, 'UNS_V2_PROTOCOL_ERROR', 200, true);\n }\n yield typeof body.message === 'string'\n ? { type: 'reset', reason: body.reason, message: body.message }\n : { type: 'reset', reason: body.reason };\n } else if (event.event === 'change') {\n let parsed: UnsV2RecordChangeEvent | undefined;\n try { parsed = changeEvent(JSON.parse(event.data)); } catch { parsed = undefined; }\n if (!parsed) throw localError('Invalid UNS v2 change event.', name, false, 'UNS_V2_PROTOCOL_ERROR', 200, true);\n yield parsed;\n }\n }\n } catch (error) {\n if (options.signal?.aborted) return;\n if (error instanceof UnsV2Error) throw error;\n if (error instanceof ServerSentEventsError) throw localError(error.message, name, false, 'UNS_V2_PROTOCOL_ERROR', 200, true);\n throw localError('UNS v2 event stream broke.', name, false, 'UNS_V2_TRANSPORT_ERROR', 200, true);\n } finally {\n opened.close();\n }\n }\n}\n\nexport type UnsV2Client = UnsV2ClientCore & UnsV2Operations;\n\nexport function createUnsV2Client(resolveClient: () => HttpClient = getClient, config: CloudTransportConfig = {}): UnsV2Client {\n const core = new UnsV2ClientCore(resolveClient, config);\n const methods = Object.fromEntries(Object.keys(UNS_V2_OPERATIONS).map(name => [name, (request: unknown, options?: RequestOptions) =>\n core.call(name as UnsV2OperationName, request as UnsV2Request<UnsV2OperationName>, options)]));\n return Object.assign(core, methods) as unknown as UnsV2Client;\n}\n\n/** Uses configureClient()/TIER0_API_HOST/TIER0_API_KEY and does not imply v2 readiness. */\nexport const unsV2 = createUnsV2Client();\n"]}
@@ -2921,6 +2921,18 @@ export type UnsV2MetadataRestoreResponse = {
2921
2921
  "replayed": boolean;
2922
2922
  });
2923
2923
  };
2924
+ export type UnsV2MetadataPurgeReq = {
2925
+ "kind": "collection";
2926
+ "ids": Array<string>;
2927
+ "dryRun"?: boolean;
2928
+ "idempotencyKey"?: string;
2929
+ };
2930
+ export type UnsV2MetadataPurgeResponse = {
2931
+ "code": UnsV2Integer;
2932
+ "msg": string;
2933
+ "requestId": string;
2934
+ "data": Outcome;
2935
+ };
2924
2936
  export type UnsV2MetadataBulkWriteReq = {
2925
2937
  "kind": "directory" | "topic" | "collection";
2926
2938
  "operations": (Array<((({
@@ -3904,6 +3916,15 @@ export declare const UNS_V2_OPERATIONS: {
3904
3916
  readonly idempotencyKey: true;
3905
3917
  readonly scope: "uns:update";
3906
3918
  };
3919
+ readonly metadataPurge: {
3920
+ readonly path: "/openapi/v2/uns/metadata:purge";
3921
+ readonly pathParams: readonly [];
3922
+ readonly request: "UnsV2MetadataPurgeReq";
3923
+ readonly response: "UnsV2MetadataPurgeResponse";
3924
+ readonly mutation: true;
3925
+ readonly idempotencyKey: true;
3926
+ readonly scope: "uns:update";
3927
+ };
3907
3928
  readonly metadataBulkWrite: {
3908
3929
  readonly path: "/openapi/v2/uns/metadata:bulkWrite";
3909
3930
  readonly pathParams: readonly [];
@@ -4249,6 +4270,10 @@ export interface UnsV2OperationMap {
4249
4270
  request: UnsV2MetadataRestoreReq;
4250
4271
  response: UnsV2MetadataRestoreResponse;
4251
4272
  };
4273
+ "metadataPurge": {
4274
+ request: UnsV2MetadataPurgeReq;
4275
+ response: UnsV2MetadataPurgeResponse;
4276
+ };
4252
4277
  "metadataBulkWrite": {
4253
4278
  request: UnsV2MetadataBulkWriteReq;
4254
4279
  response: UnsV2MetadataBulkWriteResponse;
@@ -4338,6 +4363,7 @@ export interface UnsV2Operations {
4338
4363
  metadataUpdateMany(request: UnsV2MetadataUpdateManyReq, options?: RequestOptions): Promise<UnsV2MetadataUpdateManyResponse>;
4339
4364
  metadataDeleteMany(request: UnsV2MetadataDeleteManyReq, options?: RequestOptions): Promise<UnsV2MetadataDeleteManyResponse>;
4340
4365
  metadataRestore(request: UnsV2MetadataRestoreReq, options?: RequestOptions): Promise<UnsV2MetadataRestoreResponse>;
4366
+ metadataPurge(request: UnsV2MetadataPurgeReq, options?: RequestOptions): Promise<UnsV2MetadataPurgeResponse>;
4341
4367
  metadataBulkWrite(request: UnsV2MetadataBulkWriteReq, options?: RequestOptions): Promise<UnsV2MetadataBulkWriteResponse>;
4342
4368
  metadataTransact(request: UnsV2MetadataTransactReq, options?: RequestOptions): Promise<UnsV2MetadataTransactResponse>;
4343
4369
  }
@@ -9192,6 +9218,26 @@ export declare const UNS_V2_CODEC_SCHEMAS: {
9192
9218
  };
9193
9219
  };
9194
9220
  };
9221
+ readonly UnsV2MetadataPurgeReq: {
9222
+ readonly k: "o";
9223
+ readonly p: {
9224
+ readonly ids: {
9225
+ readonly k: "a";
9226
+ readonly i: {};
9227
+ };
9228
+ };
9229
+ };
9230
+ readonly UnsV2MetadataPurgeResponse: {
9231
+ readonly k: "o";
9232
+ readonly p: {
9233
+ readonly code: {
9234
+ readonly k: "j";
9235
+ };
9236
+ readonly data: {
9237
+ readonly r: "Outcome";
9238
+ };
9239
+ };
9240
+ };
9195
9241
  readonly UnsV2MetadataBulkWriteReq: {
9196
9242
  readonly k: "o";
9197
9243
  readonly p: {
@@ -9765,11 +9811,11 @@ export declare const UNS_V2_CODEC_SCHEMAS: {
9765
9811
  };
9766
9812
  export declare const UNS_V2_CONTRACT_PROVENANCE: {
9767
9813
  readonly repository: "FREEZONEX/Tier0-Backend";
9768
- readonly revision: "5c77d6f21e6332cb09e3212df9203eb01bf7f129";
9814
+ readonly revision: "064cdcdb688b18fb73295ac986380d84daa08188";
9769
9815
  readonly version: "5.0.0";
9770
9816
  readonly source: "service/unssvr/internal/domain/unsv2/contract_generated.go#ContractJSON";
9771
- readonly cloudRevision: "5c77d6f21e6332cb09e3212df9203eb01bf7f129";
9772
- readonly cloudContractRevision: "cloud-source-impact/2+source-vendor/2+app-create-capability/1+data/3+record-reads/1+stream-receipt/1+stream-run-error/1+stream-deploy-guard/1+collection-namespace/1+business-name/1+http-acquisition/2+http-source-role/1+http-source-request/1+sql-inline-credentials/1+app-collection/2+collection-ownership/1+metadata/1+app-context/3+collection-ttl/1+error-model/1+crud-consolidation/1+record-insert-return/1+lifecycle-consolidation/1+mutation-defaults/1+api-surface/2+source-stream-single-model+source-lifecycle/2+app-data/3+hosted-control/1+source-bindings/1+record-notifications/1+record-delete-samples/1+stream-history/1+app-collections/2+http-in/1+app-resource-access/2+stream-control-probe-retirement/1+http-push-retirement/1";
9817
+ readonly cloudRevision: "064cdcdb688b18fb73295ac986380d84daa08188";
9818
+ readonly cloudContractRevision: "cloud-source-impact/2+source-vendor/2+app-create-capability/1+data/3+record-reads/1+stream-receipt/1+stream-run-error/1+stream-deploy-guard/1+collection-namespace/1+business-name/1+http-acquisition/2+http-source-role/1+http-source-request/1+sql-inline-credentials/1+app-collection/2+collection-ownership/1+metadata/1+collection-purge/1+app-context/3+collection-ttl/1+error-model/1+crud-consolidation/1+record-insert-return/1+lifecycle-consolidation/1+mutation-defaults/1+api-surface/2+source-stream-single-model+source-lifecycle/2+app-data/3+hosted-control/1+source-bindings/1+record-notifications/1+record-delete-samples/1+stream-history/1+app-collections/2+http-in/1+app-resource-access/2+stream-control-probe-retirement/1+http-push-retirement/1";
9773
9819
  readonly resolvedCloudContract: true;
9774
9820
  readonly enterpriseBase: {
9775
9821
  readonly repository: "FREEZONEX/Tier0-Enterprise-New";
@@ -9785,40 +9831,40 @@ export declare const UNS_V2_CONTRACT_PROVENANCE: {
9785
9831
  readonly capability: "x-tier0-opcua-server: static available=false; online availability is workspace/registry authoritative";
9786
9832
  };
9787
9833
  };
9788
- readonly sourceDerivedContractSHA256: "a3231e8d29e0ed763eaee513c9f37b009956af189ab4edb2bc7b744fa80143c2";
9834
+ readonly sourceDerivedContractSHA256: "8ca167f398715d051d9c797f0b35908b9f68cfaca819c4f56f6a7ef82f97acc0";
9789
9835
  readonly schemaUpdates: readonly [{
9790
9836
  readonly scope: "source-stream-acquisition";
9791
9837
  readonly repository: "FREEZONEX/Tier0-Backend";
9792
- readonly revision: "5c77d6f21e6332cb09e3212df9203eb01bf7f129";
9838
+ readonly revision: "064cdcdb688b18fb73295ac986380d84daa08188";
9793
9839
  readonly sourceKind: "committed";
9794
9840
  readonly source: "share/unscontract/manifest.json";
9795
- readonly sourceSHA256: "b2fd35000b73ed4ada29abdc073b736e4731662883b402a8b8a776f90a47179b";
9796
- readonly sourceContractRevision: "cloud-source-impact/2+source-vendor/2+app-create-capability/1+data/3+record-reads/1+stream-receipt/1+stream-run-error/1+stream-deploy-guard/1+collection-namespace/1+business-name/1+http-acquisition/2+http-source-role/1+http-source-request/1+sql-inline-credentials/1+app-collection/2+collection-ownership/1+metadata/1+app-context/3+collection-ttl/1+error-model/1+crud-consolidation/1+record-insert-return/1+lifecycle-consolidation/1+mutation-defaults/1+api-surface/2+source-stream-single-model+source-lifecycle/2+app-data/3+hosted-control/1+source-bindings/1+record-notifications/1+record-delete-samples/1+stream-history/1+app-collections/2+http-in/1+app-resource-access/2+stream-control-probe-retirement/1+http-push-retirement/1";
9841
+ readonly sourceSHA256: "4737cf897b544d6e2a1088a87087f8e1ac447a5b89858cf471a100775d0945aa";
9842
+ readonly sourceContractRevision: "cloud-source-impact/2+source-vendor/2+app-create-capability/1+data/3+record-reads/1+stream-receipt/1+stream-run-error/1+stream-deploy-guard/1+collection-namespace/1+business-name/1+http-acquisition/2+http-source-role/1+http-source-request/1+sql-inline-credentials/1+app-collection/2+collection-ownership/1+metadata/1+collection-purge/1+app-context/3+collection-ttl/1+error-model/1+crud-consolidation/1+record-insert-return/1+lifecycle-consolidation/1+mutation-defaults/1+api-surface/2+source-stream-single-model+source-lifecycle/2+app-data/3+hosted-control/1+source-bindings/1+record-notifications/1+record-delete-samples/1+stream-history/1+app-collections/2+http-in/1+app-resource-access/2+stream-control-probe-retirement/1+http-push-retirement/1";
9797
9843
  readonly schemas: readonly ["CloudSourceCreateCredentials", "CloudSourceDocumentCreateReq", "CloudSourceDocumentUpdateReq", "CloudStreamDocumentCreateReq", "CloudStreamDocumentUpdateReq", "UnsV2StreamProgramDeployReq"];
9798
9844
  readonly inputs: {
9799
9845
  readonly "contracts/uns-v2/manifest.json": {
9800
9846
  readonly path: "share/unscontract/manifest.json";
9801
- readonly sourceSHA256: "b2fd35000b73ed4ada29abdc073b736e4731662883b402a8b8a776f90a47179b";
9802
- readonly baseSHA256: "b2fd35000b73ed4ada29abdc073b736e4731662883b402a8b8a776f90a47179b";
9803
- readonly resultSHA256: "b2fd35000b73ed4ada29abdc073b736e4731662883b402a8b8a776f90a47179b";
9847
+ readonly sourceSHA256: "4737cf897b544d6e2a1088a87087f8e1ac447a5b89858cf471a100775d0945aa";
9848
+ readonly baseSHA256: "4737cf897b544d6e2a1088a87087f8e1ac447a5b89858cf471a100775d0945aa";
9849
+ readonly resultSHA256: "4737cf897b544d6e2a1088a87087f8e1ac447a5b89858cf471a100775d0945aa";
9804
9850
  };
9805
9851
  readonly "contracts/uns-v2/contract.json": {
9806
9852
  readonly path: "share/unscontract/manifest.json";
9807
- readonly sourceSHA256: "b2fd35000b73ed4ada29abdc073b736e4731662883b402a8b8a776f90a47179b";
9808
- readonly baseSHA256: "a3231e8d29e0ed763eaee513c9f37b009956af189ab4edb2bc7b744fa80143c2";
9809
- readonly resultSHA256: "a3231e8d29e0ed763eaee513c9f37b009956af189ab4edb2bc7b744fa80143c2";
9853
+ readonly sourceSHA256: "4737cf897b544d6e2a1088a87087f8e1ac447a5b89858cf471a100775d0945aa";
9854
+ readonly baseSHA256: "8ca167f398715d051d9c797f0b35908b9f68cfaca819c4f56f6a7ef82f97acc0";
9855
+ readonly resultSHA256: "8ca167f398715d051d9c797f0b35908b9f68cfaca819c4f56f6a7ef82f97acc0";
9810
9856
  };
9811
9857
  };
9812
9858
  }];
9813
9859
  readonly note: "Pinned base with reviewed acquisition schema updates; schemaUpdates records the exact source revision and hashes. Other data-model inputs remain pinned.";
9814
9860
  readonly hashes: {
9815
- readonly contract: "a3231e8d29e0ed763eaee513c9f37b009956af189ab4edb2bc7b744fa80143c2";
9861
+ readonly contract: "8ca167f398715d051d9c797f0b35908b9f68cfaca819c4f56f6a7ef82f97acc0";
9816
9862
  readonly cloudSupport: "be5abb42f3b5410d6bea564e7280b22af221b3987f8773f7ddba228e5685e0b4";
9817
- readonly manifest: "b2fd35000b73ed4ada29abdc073b736e4731662883b402a8b8a776f90a47179b";
9818
- readonly provenance: "babc61a74ce29da6f5da9f2c85c3bff84b434433884f5977f6b3883901d18ce2";
9819
- readonly registry: "9aa8aade9f60f26215674d57a5ff8557cece4404f1b71de95b70e74200572b5e";
9863
+ readonly manifest: "4737cf897b544d6e2a1088a87087f8e1ac447a5b89858cf471a100775d0945aa";
9864
+ readonly provenance: "0afdc97241a144008bff72bf387813c684f002ce527416146d1d103edc65c75c";
9865
+ readonly registry: "7594e33e4ae8bf381d36bc5066d57e00d5dbfbb9a2b2369d9f432ecaf64247bf";
9820
9866
  };
9821
- readonly publicOperationCount: 81;
9867
+ readonly publicOperationCount: 82;
9822
9868
  readonly streamOperationCount: 1;
9823
- readonly manifestOperationCount: 94;
9869
+ readonly manifestOperationCount: 95;
9824
9870
  };