@truvity/sdk 0.37.0 → 0.37.2

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 (67) hide show
  1. package/api/resources/apiKeys/client/Client.d.ts.map +1 -1
  2. package/api/resources/apiKeys/client/Client.js +9 -19
  3. package/api/resources/apiKeys/client/Client.js.map +1 -1
  4. package/api/resources/credentials/client/Client.d.ts.map +1 -1
  5. package/api/resources/credentials/client/Client.js +12 -28
  6. package/api/resources/credentials/client/Client.js.map +1 -1
  7. package/api/resources/desk/client/Client.d.ts.map +1 -1
  8. package/api/resources/desk/client/Client.js +2 -4
  9. package/api/resources/desk/client/Client.js.map +1 -1
  10. package/api/resources/didcommMessages/client/Client.d.ts.map +1 -1
  11. package/api/resources/didcommMessages/client/Client.js +9 -19
  12. package/api/resources/didcommMessages/client/Client.js.map +1 -1
  13. package/api/resources/dids/client/Client.d.ts.map +1 -1
  14. package/api/resources/dids/client/Client.js +1 -3
  15. package/api/resources/dids/client/Client.js.map +1 -1
  16. package/api/resources/drafts/client/Client.d.ts +0 -49
  17. package/api/resources/drafts/client/Client.d.ts.map +1 -1
  18. package/api/resources/drafts/client/Client.js +12 -191
  19. package/api/resources/drafts/client/Client.js.map +1 -1
  20. package/api/resources/drafts/client/requests/index.d.ts +0 -1
  21. package/api/resources/drafts/client/requests/index.d.ts.map +1 -1
  22. package/api/resources/drafts/client/requests/index.js.map +1 -1
  23. package/api/resources/drafts/types/index.d.ts +0 -1
  24. package/api/resources/drafts/types/index.d.ts.map +1 -1
  25. package/api/resources/drafts/types/index.js +0 -1
  26. package/api/resources/drafts/types/index.js.map +1 -1
  27. package/api/resources/files/client/Client.d.ts.map +1 -1
  28. package/api/resources/files/client/Client.js +11 -25
  29. package/api/resources/files/client/Client.js.map +1 -1
  30. package/api/resources/gdpr/client/Client.js +1 -1
  31. package/api/resources/gdpr/client/Client.js.map +1 -1
  32. package/api/resources/keys/client/Client.d.ts.map +1 -1
  33. package/api/resources/keys/client/Client.js +13 -23
  34. package/api/resources/keys/client/Client.js.map +1 -1
  35. package/api/resources/presentations/client/Client.d.ts.map +1 -1
  36. package/api/resources/presentations/client/Client.js +14 -30
  37. package/api/resources/presentations/client/Client.js.map +1 -1
  38. package/documents/credential/draft/draft.d.ts.map +1 -1
  39. package/documents/credential/draft/draft.js +1 -1
  40. package/documents/credential/draft/draft.js.map +1 -1
  41. package/package.json +4 -3
  42. package/reference.md +0 -105
  43. package/scripts/rename-to-esm-files.js +10 -2
  44. package/serialization/resources/drafts/client/requests/index.d.ts +0 -1
  45. package/serialization/resources/drafts/client/requests/index.d.ts.map +1 -1
  46. package/serialization/resources/drafts/client/requests/index.js +1 -3
  47. package/serialization/resources/drafts/client/requests/index.js.map +1 -1
  48. package/serialization/resources/drafts/types/index.d.ts +0 -1
  49. package/serialization/resources/drafts/types/index.d.ts.map +1 -1
  50. package/serialization/resources/drafts/types/index.js +0 -1
  51. package/serialization/resources/drafts/types/index.js.map +1 -1
  52. package/api/resources/drafts/client/requests/DraftIssueRequest.d.ts +0 -44
  53. package/api/resources/drafts/client/requests/DraftIssueRequest.d.ts.map +0 -1
  54. package/api/resources/drafts/client/requests/DraftIssueRequest.js +0 -6
  55. package/api/resources/drafts/client/requests/DraftIssueRequest.js.map +0 -1
  56. package/api/resources/drafts/types/DraftIssueRequestDidMethod.d.ts +0 -12
  57. package/api/resources/drafts/types/DraftIssueRequestDidMethod.d.ts.map +0 -1
  58. package/api/resources/drafts/types/DraftIssueRequestDidMethod.js +0 -11
  59. package/api/resources/drafts/types/DraftIssueRequestDidMethod.js.map +0 -1
  60. package/serialization/resources/drafts/client/requests/DraftIssueRequest.d.ts +0 -20
  61. package/serialization/resources/drafts/client/requests/DraftIssueRequest.d.ts.map +0 -1
  62. package/serialization/resources/drafts/client/requests/DraftIssueRequest.js +0 -51
  63. package/serialization/resources/drafts/client/requests/DraftIssueRequest.js.map +0 -1
  64. package/serialization/resources/drafts/types/DraftIssueRequestDidMethod.d.ts +0 -11
  65. package/serialization/resources/drafts/types/DraftIssueRequestDidMethod.d.ts.map +0 -1
  66. package/serialization/resources/drafts/types/DraftIssueRequestDidMethod.js +0 -42
  67. package/serialization/resources/drafts/types/DraftIssueRequestDidMethod.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../../../src/api/resources/dids/client/Client.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uEAAyD;AACzD,uDAAyC;AACzC,wDAA0C;AAC1C,wDAA+B;AAC/B,6EAA+D;AAC/D,iEAAmD;AAuBnD;;GAEG;AACH,MAAa,IAAI;IACb,YAA+B,WAAyB,EAAE;QAA3B,aAAQ,GAAR,QAAQ,CAAmB;IAAG,CAAC;IAE9D;;;;;;;;;;;;;;;OAeG;IACI,kBAAkB,CACrB,UAA6C,EAAE,EAC/C,cAAoC;QAEpC,OAAO,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;IACpG,CAAC;IAEa,oBAAoB;6DAC9B,UAA6C,EAAE,EAC/C,cAAoC;;YAEpC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;YAChC,MAAM,SAAS,GAAG,MAAM,CAAC,MAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,mCAAI,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC5D,GAAG,EAAE,IAAA,kBAAO,EACR,MAAA,MAAA,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,mCAC5C,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,mCACpD,YAAY,CAAC,kBAAkB,CAAC,OAAO,EAC3C,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C,MAAM,CAAC,CAAC;YAClE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;QACxC,CAAC;KAAA;CACJ;AAtJD,oBAsJC","sourcesContent":["/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as environments from '../../../../environments';\nimport * as core from '../../../../core';\nimport * as Truvity from '../../../index';\nimport urlJoin from 'url-join';\nimport * as serializers from '../../../../serialization/index';\nimport * as errors from '../../../../errors/index';\n\nexport declare namespace Dids {\n export interface Options {\n environment?: core.Supplier<environments.TruvityEnvironment | string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n apiKey?: core.Supplier<string | undefined>;\n fetcher?: core.FetchFunction;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Additional headers to include in the request. */\n headers?: Record<string, string>;\n }\n}\n\n/**\n * The API to manage DID Documents.\n */\nexport class Dids {\n constructor(protected readonly _options: Dids.Options = {}) {}\n\n /**\n * Return the tenant's DID(did:web) document.\n * Comparing to [DIDDocumentGet](#tag/desk/operation/DIDDocumentGet) endpoint, this one returns the tenant's DID(did:web) document for the authenticated tenant only.\n *\n * @param {Truvity.DidDocumentSelfGetRequest} request\n * @param {Dids.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link Truvity.BadRequestError}\n * @throws {@link Truvity.UnauthorizedError}\n * @throws {@link Truvity.ForbiddenError}\n * @throws {@link Truvity.TooManyRequestsError}\n * @throws {@link Truvity.InternalServerError}\n *\n * @example\n * await client.dids.didDocumentSelfGet()\n */\n public didDocumentSelfGet(\n request: Truvity.DidDocumentSelfGetRequest = {},\n requestOptions?: Dids.RequestOptions,\n ): core.HttpResponsePromise<Truvity.DidDocument> {\n return core.HttpResponsePromise.fromPromise(this.__didDocumentSelfGet(request, requestOptions));\n }\n\n private async __didDocumentSelfGet(\n request: Truvity.DidDocumentSelfGetRequest = {},\n requestOptions?: Dids.RequestOptions,\n ): Promise<core.WithRawResponse<Truvity.DidDocument>> {\n const { ifNoneMatch } = request;\n const _response = await (this._options.fetcher ?? core.fetcher)({\n url: urlJoin(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.TruvityEnvironment.Default,\n 'dids/self',\n ),\n method: 'GET',\n headers: {\n 'X-Fern-Language': 'JavaScript',\n 'X-Fern-SDK-Name': '@truvity/sdk',\n 'X-Fern-SDK-Version': '0.37.0',\n 'User-Agent': '@truvity/sdk/0.37.0',\n 'X-Fern-Runtime': core.RUNTIME.type,\n 'X-Fern-Runtime-Version': core.RUNTIME.version,\n 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined,\n ...(await this._getCustomAuthorizationHeaders()),\n ...requestOptions?.headers,\n },\n contentType: 'application/json',\n requestType: 'json',\n timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: serializers.DidDocument.parseOrThrow(_response.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === 'status-code') {\n switch (_response.error.statusCode) {\n case 400:\n throw new Truvity.BadRequestError(\n serializers.BadRequestProblems.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n _response.rawResponse,\n );\n case 401:\n throw new Truvity.UnauthorizedError(\n serializers.UnauthorizedProblems.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n _response.rawResponse,\n );\n case 403:\n throw new Truvity.ForbiddenError(\n serializers.ForbiddenProblems.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n _response.rawResponse,\n );\n case 429:\n throw new Truvity.TooManyRequestsError(\n serializers.TooManyRequestsProblems.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n _response.rawResponse,\n );\n case 500:\n throw new Truvity.InternalServerError(\n serializers.ProblemInternalServerError.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n _response.rawResponse,\n );\n default:\n throw new errors.TruvityError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case 'non-json':\n throw new errors.TruvityError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case 'timeout':\n throw new errors.TruvityTimeoutError('Timeout exceeded when calling GET /dids/self.');\n case 'unknown':\n throw new errors.TruvityError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getCustomAuthorizationHeaders() {\n const apiKeyValue = await core.Supplier.get(this._options.apiKey);\n return { 'X-API-KEY': apiKeyValue };\n }\n}\n"]}
1
+ {"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../../../src/api/resources/dids/client/Client.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uEAAyD;AACzD,uD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E,SAAS,CAAC,KAAK,CAAC,UAAU;4BACtC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,IAAI;4BAC1B,WAAW,EAAE,SAAS,CAAC,WAAW;yBACrC,CAAC,CAAC;gBACX,CAAC;YACL,CAAC;YAED,QAAQ,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC7B,KAAK,UAAU;oBACX,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC;wBAC1B,UAAU,EAAE,SAAS,CAAC,KAAK,CAAC,UAAU;wBACtC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;wBAC7B,WAAW,EAAE,SAAS,CAAC,WAAW;qBACrC,CAAC,CAAC;gBACP,KAAK,SAAS;oBACV,MAAM,IAAI,MAAM,CAAC,mBAAmB,CAAC,+CAA+C,CAAC,CAAC;gBAC1F,KAAK,SAAS;oBACV,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC;wBAC1B,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,YAAY;wBACrC,WAAW,EAAE,SAAS,CAAC,WAAW;qBACrC,CAAC,CAAC;YACX,CAAC;QACL,CAAC;KAAA;IAEe,8BAA8B;;YAC1C,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAClE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;QACxC,CAAC;KAAA;CACJ;AApJD,oBAoJC","sourcesContent":["/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\nimport * as environments from '../../../../environments';\nimport * as core from '../../../../core';\nimport * as Truvity from '../../../index';\nimport urlJoin from 'url-join';\nimport * as serializers from '../../../../serialization/index';\nimport * as errors from '../../../../errors/index';\n\nexport declare namespace Dids {\n export interface Options {\n environment?: core.Supplier<environments.TruvityEnvironment | string>;\n /** Specify a custom URL to connect the client to. */\n baseUrl?: core.Supplier<string>;\n apiKey?: core.Supplier<string | undefined>;\n fetcher?: core.FetchFunction;\n }\n\n export interface RequestOptions {\n /** The maximum time to wait for a response in seconds. */\n timeoutInSeconds?: number;\n /** The number of times to retry the request. Defaults to 2. */\n maxRetries?: number;\n /** A hook to abort the request. */\n abortSignal?: AbortSignal;\n /** Additional headers to include in the request. */\n headers?: Record<string, string>;\n }\n}\n\n/**\n * The API to manage DID Documents.\n */\nexport class Dids {\n constructor(protected readonly _options: Dids.Options = {}) {}\n\n /**\n * Return the tenant's DID(did:web) document.\n * Comparing to [DIDDocumentGet](#tag/desk/operation/DIDDocumentGet) endpoint, this one returns the tenant's DID(did:web) document for the authenticated tenant only.\n *\n * @param {Truvity.DidDocumentSelfGetRequest} request\n * @param {Dids.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link Truvity.BadRequestError}\n * @throws {@link Truvity.UnauthorizedError}\n * @throws {@link Truvity.ForbiddenError}\n * @throws {@link Truvity.TooManyRequestsError}\n * @throws {@link Truvity.InternalServerError}\n *\n * @example\n * await client.dids.didDocumentSelfGet()\n */\n public didDocumentSelfGet(\n request: Truvity.DidDocumentSelfGetRequest = {},\n requestOptions?: Dids.RequestOptions,\n ): core.HttpResponsePromise<Truvity.DidDocument> {\n return core.HttpResponsePromise.fromPromise(this.__didDocumentSelfGet(request, requestOptions));\n }\n\n private async __didDocumentSelfGet(\n request: Truvity.DidDocumentSelfGetRequest = {},\n requestOptions?: Dids.RequestOptions,\n ): Promise<core.WithRawResponse<Truvity.DidDocument>> {\n const { ifNoneMatch } = request;\n const _response = await (this._options.fetcher ?? core.fetcher)({\n url: urlJoin(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.TruvityEnvironment.Default,\n 'dids/self',\n ),\n method: 'GET',\n headers: {\n 'X-Fern-Language': 'JavaScript',\n 'X-Fern-SDK-Name': '@truvity/sdk',\n 'X-Fern-SDK-Version': '0.37.2',\n 'User-Agent': '@truvity/sdk/0.37.2',\n 'X-Fern-Runtime': core.RUNTIME.type,\n 'X-Fern-Runtime-Version': core.RUNTIME.version,\n 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined,\n ...(await this._getCustomAuthorizationHeaders()),\n ...requestOptions?.headers,\n },\n timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,\n maxRetries: requestOptions?.maxRetries,\n abortSignal: requestOptions?.abortSignal,\n });\n if (_response.ok) {\n return {\n data: serializers.DidDocument.parseOrThrow(_response.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n rawResponse: _response.rawResponse,\n };\n }\n\n if (_response.error.reason === 'status-code') {\n switch (_response.error.statusCode) {\n case 400:\n throw new Truvity.BadRequestError(\n serializers.BadRequestProblems.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n _response.rawResponse,\n );\n case 401:\n throw new Truvity.UnauthorizedError(\n serializers.UnauthorizedProblems.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n _response.rawResponse,\n );\n case 403:\n throw new Truvity.ForbiddenError(\n serializers.ForbiddenProblems.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n _response.rawResponse,\n );\n case 429:\n throw new Truvity.TooManyRequestsError(\n serializers.TooManyRequestsProblems.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n _response.rawResponse,\n );\n case 500:\n throw new Truvity.InternalServerError(\n serializers.ProblemInternalServerError.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\n _response.rawResponse,\n );\n default:\n throw new errors.TruvityError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n switch (_response.error.reason) {\n case 'non-json':\n throw new errors.TruvityError({\n statusCode: _response.error.statusCode,\n body: _response.error.rawBody,\n rawResponse: _response.rawResponse,\n });\n case 'timeout':\n throw new errors.TruvityTimeoutError('Timeout exceeded when calling GET /dids/self.');\n case 'unknown':\n throw new errors.TruvityError({\n message: _response.error.errorMessage,\n rawResponse: _response.rawResponse,\n });\n }\n }\n\n protected async _getCustomAuthorizationHeaders() {\n const apiKeyValue = await core.Supplier.get(this._options.apiKey);\n return { 'X-API-KEY': apiKeyValue };\n }\n}\n"]}
@@ -324,55 +324,6 @@ export declare class Drafts {
324
324
  */
325
325
  draftExport(id: string, revision: number, request: Truvity.DraftExportRequest, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<stream.Readable>;
326
326
  private __draftExport;
327
- /**
328
- * Deprecated: please use new endpoint [DraftIssue](#tag/drafts/operation/DraftIssueWithoutRevision).This operation issues a Verifiable Credential from a Draft resource. Operational Lifecycle:
329
- * 1) [Exporting](#tag/drafts/operation/DraftExport) Draft.
330
- * 2) [Signing](#tag/keys/operation/CredentialSign) the exported Draft.
331
- * 3) [Importing](#tag/credentials/operation/CredentialImport) the signed Credential.
332
- *
333
- * Cascade Issuance: If the Draft references other drafts the system automatically builds a dependency graph and issues all required drafts in the correct order.
334
- * The correct order is a topological order of the dependency graph, where each draft is issued only after all its prerequisite drafts have been issued.
335
- *
336
- * Strict Mode:
337
- * - The `strict_mode` option allows clients to control how prerequisite drafts are handled during cascade issuance.
338
- * - Use `strict_mode` to enforce that only the explicitly specified drafts in `prerequisite_drafts` (with matching ETags) are accepted as prerequisites.
339
- * - When disabled (default), the system will automatically discover and include all linked drafts as prerequisites, building the full dependency graph for cascade issuance.
340
- *
341
- * Performance Considerations:
342
- * - The process may take longer than typical API calls due to:
343
- * - Building and traversing the dependency graph for cascade issuance, which determines the correct issuance order for all linked drafts.
344
- * - Fetching and resolving external resources required for generating cryptographic proofs, which may involve network requests.
345
- * - Generating cryptographic proofs for each credential in the dependency graph.
346
- *
347
- * Concurrency and Consistency:
348
- * - If the `If-Match` header is provided, strict version control is enforced. The operation will fail if the ETag does not match the current Draft version.
349
- * - The endpoint is idempotent with respect to the Draft resource and ETag.
350
- *
351
- * Recovery:
352
- * - If the issuance process fails at any stage, the operation can be safely retried. The endpoint is idempotent with respect to the Draft resource and ETag, so repeated calls will not result in duplicate credentials or inconsistent state.
353
- *
354
- * @param {string} id - The ID of the resource.
355
- * @param {number} revision - The revision of the resource.
356
- * @param {Truvity.DraftIssueRequest} request
357
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
358
- *
359
- * @throws {@link Truvity.BadRequestError}
360
- * @throws {@link Truvity.UnauthorizedError}
361
- * @throws {@link Truvity.ForbiddenError}
362
- * @throws {@link Truvity.NotFoundError}
363
- * @throws {@link Truvity.MethodNotAllowedError}
364
- * @throws {@link Truvity.PreconditionFailedError}
365
- * @throws {@link Truvity.TooManyRequestsError}
366
- * @throws {@link Truvity.InternalServerError}
367
- * @throws {@link Truvity.ServiceUnavailableError}
368
- *
369
- * @example
370
- * await client.drafts.draftIssue("id", 1, {
371
- * keyId: "key_id"
372
- * })
373
- */
374
- draftIssue(id: string, revision: number, request: Truvity.DraftIssueRequest, requestOptions?: Drafts.RequestOptions): core.HttpResponsePromise<Truvity.ResourceCredential>;
375
- private __draftIssue;
376
327
  protected _getCustomAuthorizationHeaders(): Promise<{
377
328
  'X-API-KEY': string | undefined;
378
329
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"Client.d.ts","sourceRoot":"","s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AE,OAAO,CAAC,oBAAyB,EAC1C,cAAc,CAAC,EAAE,MAAM,CAAC,cAAc,GACvC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,aAAa,CAAC;YAIpC,eAAe;IAoI7B;;;;;;;;OAQG;IACI,WAAW,CACd,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,CAAC,kBAAkB,EACnC,cAAc,CAAC,EAAE,MAAM,CAAC,cAAc,GACvC,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC;YAI9B,aAAa;cAiIX,8BAA8B;;;CAIjD"}
@@ -110,7 +110,7 @@ class Drafts {
110
110
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
111
111
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, 'drafts'),
112
112
  method: 'POST',
113
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
113
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
114
114
  contentType: 'application/json',
115
115
  requestType: 'json',
116
116
  body: serializers.DraftCreateRequest.jsonOrThrow(_body, {
@@ -226,7 +226,7 @@ class Drafts {
226
226
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
227
227
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, 'drafts/search'),
228
228
  method: 'POST',
229
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
229
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
230
230
  contentType: 'application/json',
231
231
  requestType: 'json',
232
232
  body: serializers.DraftSearchRequest.jsonOrThrow(request, {
@@ -344,9 +344,7 @@ class Drafts {
344
344
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
345
345
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}`),
346
346
  method: 'GET',
347
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
348
- contentType: 'application/json',
349
- requestType: 'json',
347
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
350
348
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
351
349
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
352
350
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -463,9 +461,7 @@ class Drafts {
463
461
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
464
462
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}`),
465
463
  method: 'DELETE',
466
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
467
- contentType: 'application/json',
468
- requestType: 'json',
464
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
469
465
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
470
466
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
471
467
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -590,7 +586,7 @@ class Drafts {
590
586
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
591
587
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}`),
592
588
  method: 'PATCH',
593
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
589
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
594
590
  contentType: 'application/json',
595
591
  requestType: 'json',
596
592
  body: serializers.DraftUpdateRequest.jsonOrThrow(_body, {
@@ -738,7 +734,7 @@ class Drafts {
738
734
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
739
735
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}/annotations`),
740
736
  method: 'PATCH',
741
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
737
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
742
738
  contentType: 'application/json',
743
739
  requestType: 'json',
744
740
  body: serializers.DraftUpdateAnnotationsRequest.jsonOrThrow(_body, {
@@ -906,7 +902,7 @@ class Drafts {
906
902
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
907
903
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}/issue`),
908
904
  method: 'PATCH',
909
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-Match': ifMatch != null ? ifMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
905
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-Match': ifMatch != null ? ifMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
910
906
  contentType: 'application/json',
911
907
  requestType: 'json',
912
908
  body: serializers.DraftLatestIssueRequest.jsonOrThrow(_body, {
@@ -1054,7 +1050,7 @@ class Drafts {
1054
1050
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1055
1051
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}/labels`),
1056
1052
  method: 'PATCH',
1057
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1053
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1058
1054
  contentType: 'application/json',
1059
1055
  requestType: 'json',
1060
1056
  body: serializers.DraftUpdateLabelsRequest.jsonOrThrow(_body, {
@@ -1198,9 +1194,7 @@ class Drafts {
1198
1194
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1199
1195
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}/restore`),
1200
1196
  method: 'POST',
1201
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1202
- contentType: 'application/json',
1203
- requestType: 'json',
1197
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1204
1198
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1205
1199
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1206
1200
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1326,9 +1320,7 @@ class Drafts {
1326
1320
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1327
1321
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}/revisions`),
1328
1322
  method: 'GET',
1329
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1330
- contentType: 'application/json',
1331
- requestType: 'json',
1323
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1332
1324
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1333
1325
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1334
1326
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1441,9 +1433,7 @@ class Drafts {
1441
1433
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1442
1434
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}/revisions/${encodeURIComponent(revision)}`),
1443
1435
  method: 'GET',
1444
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1445
- contentType: 'application/json',
1446
- requestType: 'json',
1436
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1447
1437
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1448
1438
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1449
1439
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1546,7 +1536,7 @@ class Drafts {
1546
1536
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1547
1537
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}/revisions/${encodeURIComponent(revision)}/export`),
1548
1538
  method: 'POST',
1549
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1539
+ headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.2', 'User-Agent': '@truvity/sdk/0.37.2', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1550
1540
  contentType: 'application/json',
1551
1541
  requestType: 'json',
1552
1542
  body: serializers.DraftExportRequest.jsonOrThrow(request, {
@@ -1630,175 +1620,6 @@ class Drafts {
1630
1620
  }
1631
1621
  });
1632
1622
  }
1633
- /**
1634
- * Deprecated: please use new endpoint [DraftIssue](#tag/drafts/operation/DraftIssueWithoutRevision).This operation issues a Verifiable Credential from a Draft resource. Operational Lifecycle:
1635
- * 1) [Exporting](#tag/drafts/operation/DraftExport) Draft.
1636
- * 2) [Signing](#tag/keys/operation/CredentialSign) the exported Draft.
1637
- * 3) [Importing](#tag/credentials/operation/CredentialImport) the signed Credential.
1638
- *
1639
- * Cascade Issuance: If the Draft references other drafts the system automatically builds a dependency graph and issues all required drafts in the correct order.
1640
- * The correct order is a topological order of the dependency graph, where each draft is issued only after all its prerequisite drafts have been issued.
1641
- *
1642
- * Strict Mode:
1643
- * - The `strict_mode` option allows clients to control how prerequisite drafts are handled during cascade issuance.
1644
- * - Use `strict_mode` to enforce that only the explicitly specified drafts in `prerequisite_drafts` (with matching ETags) are accepted as prerequisites.
1645
- * - When disabled (default), the system will automatically discover and include all linked drafts as prerequisites, building the full dependency graph for cascade issuance.
1646
- *
1647
- * Performance Considerations:
1648
- * - The process may take longer than typical API calls due to:
1649
- * - Building and traversing the dependency graph for cascade issuance, which determines the correct issuance order for all linked drafts.
1650
- * - Fetching and resolving external resources required for generating cryptographic proofs, which may involve network requests.
1651
- * - Generating cryptographic proofs for each credential in the dependency graph.
1652
- *
1653
- * Concurrency and Consistency:
1654
- * - If the `If-Match` header is provided, strict version control is enforced. The operation will fail if the ETag does not match the current Draft version.
1655
- * - The endpoint is idempotent with respect to the Draft resource and ETag.
1656
- *
1657
- * Recovery:
1658
- * - If the issuance process fails at any stage, the operation can be safely retried. The endpoint is idempotent with respect to the Draft resource and ETag, so repeated calls will not result in duplicate credentials or inconsistent state.
1659
- *
1660
- * @param {string} id - The ID of the resource.
1661
- * @param {number} revision - The revision of the resource.
1662
- * @param {Truvity.DraftIssueRequest} request
1663
- * @param {Drafts.RequestOptions} requestOptions - Request-specific configuration.
1664
- *
1665
- * @throws {@link Truvity.BadRequestError}
1666
- * @throws {@link Truvity.UnauthorizedError}
1667
- * @throws {@link Truvity.ForbiddenError}
1668
- * @throws {@link Truvity.NotFoundError}
1669
- * @throws {@link Truvity.MethodNotAllowedError}
1670
- * @throws {@link Truvity.PreconditionFailedError}
1671
- * @throws {@link Truvity.TooManyRequestsError}
1672
- * @throws {@link Truvity.InternalServerError}
1673
- * @throws {@link Truvity.ServiceUnavailableError}
1674
- *
1675
- * @example
1676
- * await client.drafts.draftIssue("id", 1, {
1677
- * keyId: "key_id"
1678
- * })
1679
- */
1680
- draftIssue(id, revision, request, requestOptions) {
1681
- return core.HttpResponsePromise.fromPromise(this.__draftIssue(id, revision, request, requestOptions));
1682
- }
1683
- __draftIssue(id, revision, request, requestOptions) {
1684
- return __awaiter(this, void 0, void 0, function* () {
1685
- var _a, _b, _c;
1686
- const { ifMatch } = request, _body = __rest(request, ["ifMatch"]);
1687
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1688
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `drafts/${encodeURIComponent(id)}/revisions/${encodeURIComponent(revision)}/issue`),
1689
- method: 'PATCH',
1690
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.0', 'User-Agent': '@truvity/sdk/0.37.0', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-Match': ifMatch != null ? ifMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1691
- contentType: 'application/json',
1692
- requestType: 'json',
1693
- body: serializers.DraftIssueRequest.jsonOrThrow(_body, {
1694
- unrecognizedObjectKeys: 'strip',
1695
- omitUndefined: true,
1696
- }),
1697
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1698
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1699
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1700
- });
1701
- if (_response.ok) {
1702
- return {
1703
- data: serializers.ResourceCredential.parseOrThrow(_response.body, {
1704
- unrecognizedObjectKeys: 'passthrough',
1705
- allowUnrecognizedUnionMembers: true,
1706
- allowUnrecognizedEnumValues: true,
1707
- breadcrumbsPrefix: ['response'],
1708
- }),
1709
- rawResponse: _response.rawResponse,
1710
- };
1711
- }
1712
- if (_response.error.reason === 'status-code') {
1713
- switch (_response.error.statusCode) {
1714
- case 400:
1715
- throw new Truvity.BadRequestError(serializers.BadRequestProblems.parseOrThrow(_response.error.body, {
1716
- unrecognizedObjectKeys: 'passthrough',
1717
- allowUnrecognizedUnionMembers: true,
1718
- allowUnrecognizedEnumValues: true,
1719
- breadcrumbsPrefix: ['response'],
1720
- }), _response.rawResponse);
1721
- case 401:
1722
- throw new Truvity.UnauthorizedError(serializers.UnauthorizedProblems.parseOrThrow(_response.error.body, {
1723
- unrecognizedObjectKeys: 'passthrough',
1724
- allowUnrecognizedUnionMembers: true,
1725
- allowUnrecognizedEnumValues: true,
1726
- breadcrumbsPrefix: ['response'],
1727
- }), _response.rawResponse);
1728
- case 403:
1729
- throw new Truvity.ForbiddenError(serializers.ForbiddenProblems.parseOrThrow(_response.error.body, {
1730
- unrecognizedObjectKeys: 'passthrough',
1731
- allowUnrecognizedUnionMembers: true,
1732
- allowUnrecognizedEnumValues: true,
1733
- breadcrumbsPrefix: ['response'],
1734
- }), _response.rawResponse);
1735
- case 404:
1736
- throw new Truvity.NotFoundError(serializers.NotFoundProblems.parseOrThrow(_response.error.body, {
1737
- unrecognizedObjectKeys: 'passthrough',
1738
- allowUnrecognizedUnionMembers: true,
1739
- allowUnrecognizedEnumValues: true,
1740
- breadcrumbsPrefix: ['response'],
1741
- }), _response.rawResponse);
1742
- case 405:
1743
- throw new Truvity.MethodNotAllowedError(serializers.MethodNotAllowedProblems.parseOrThrow(_response.error.body, {
1744
- unrecognizedObjectKeys: 'passthrough',
1745
- allowUnrecognizedUnionMembers: true,
1746
- allowUnrecognizedEnumValues: true,
1747
- breadcrumbsPrefix: ['response'],
1748
- }), _response.rawResponse);
1749
- case 412:
1750
- throw new Truvity.PreconditionFailedError(serializers.PreconditionFailedProblems.parseOrThrow(_response.error.body, {
1751
- unrecognizedObjectKeys: 'passthrough',
1752
- allowUnrecognizedUnionMembers: true,
1753
- allowUnrecognizedEnumValues: true,
1754
- breadcrumbsPrefix: ['response'],
1755
- }), _response.rawResponse);
1756
- case 429:
1757
- throw new Truvity.TooManyRequestsError(serializers.TooManyRequestsProblems.parseOrThrow(_response.error.body, {
1758
- unrecognizedObjectKeys: 'passthrough',
1759
- allowUnrecognizedUnionMembers: true,
1760
- allowUnrecognizedEnumValues: true,
1761
- breadcrumbsPrefix: ['response'],
1762
- }), _response.rawResponse);
1763
- case 500:
1764
- throw new Truvity.InternalServerError(serializers.ProblemInternalServerError.parseOrThrow(_response.error.body, {
1765
- unrecognizedObjectKeys: 'passthrough',
1766
- allowUnrecognizedUnionMembers: true,
1767
- allowUnrecognizedEnumValues: true,
1768
- breadcrumbsPrefix: ['response'],
1769
- }), _response.rawResponse);
1770
- case 503:
1771
- throw new Truvity.ServiceUnavailableError(serializers.ServiceUnavailableProblems.parseOrThrow(_response.error.body, {
1772
- unrecognizedObjectKeys: 'passthrough',
1773
- allowUnrecognizedUnionMembers: true,
1774
- allowUnrecognizedEnumValues: true,
1775
- breadcrumbsPrefix: ['response'],
1776
- }), _response.rawResponse);
1777
- default:
1778
- throw new errors.TruvityError({
1779
- statusCode: _response.error.statusCode,
1780
- body: _response.error.body,
1781
- rawResponse: _response.rawResponse,
1782
- });
1783
- }
1784
- }
1785
- switch (_response.error.reason) {
1786
- case 'non-json':
1787
- throw new errors.TruvityError({
1788
- statusCode: _response.error.statusCode,
1789
- body: _response.error.rawBody,
1790
- rawResponse: _response.rawResponse,
1791
- });
1792
- case 'timeout':
1793
- throw new errors.TruvityTimeoutError('Timeout exceeded when calling PATCH /drafts/{id}/revisions/{revision}/issue.');
1794
- case 'unknown':
1795
- throw new errors.TruvityError({
1796
- message: _response.error.errorMessage,
1797
- rawResponse: _response.rawResponse,
1798
- });
1799
- }
1800
- });
1801
- }
1802
1623
  _getCustomAuthorizationHeaders() {
1803
1624
  return __awaiter(this, void 0, void 0, function* () {
1804
1625
  const apiKeyValue = yield core.Supplier.get(this._options.apiKey);