@truvity/sdk 0.28.3 → 0.28.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/resources/apiKeys/client/Client.d.ts +1 -0
- package/api/resources/apiKeys/client/Client.d.ts.map +1 -1
- package/api/resources/apiKeys/client/Client.js +16 -8
- package/api/resources/apiKeys/client/Client.js.map +1 -1
- package/api/resources/apiKeys/client/requests/ApiKeyCreateRequest.d.ts +8 -8
- package/api/resources/apiKeys/client/requests/ApiKeyCreateRequest.js.map +1 -1
- package/api/resources/apiKeys/client/requests/ApiKeyDeleteRequest.d.ts +8 -8
- package/api/resources/apiKeys/client/requests/ApiKeyDeleteRequest.js.map +1 -1
- package/api/resources/apiKeys/client/requests/ApiKeyRestoreRequest.d.ts +8 -8
- package/api/resources/apiKeys/client/requests/ApiKeyRestoreRequest.js.map +1 -1
- package/api/resources/apiKeys/client/requests/ApiKeyUpdateRequest.d.ts +8 -8
- package/api/resources/apiKeys/client/requests/ApiKeyUpdateRequest.js.map +1 -1
- package/api/resources/credentials/client/Client.d.ts +2 -0
- package/api/resources/credentials/client/Client.d.ts.map +1 -1
- package/api/resources/credentials/client/Client.js +26 -10
- package/api/resources/credentials/client/Client.js.map +1 -1
- package/api/resources/credentials/client/requests/CredentialDeleteRequest.d.ts +8 -8
- package/api/resources/credentials/client/requests/CredentialDeleteRequest.js.map +1 -1
- package/api/resources/credentials/client/requests/CredentialInput.d.ts +8 -8
- package/api/resources/credentials/client/requests/CredentialInput.js.map +1 -1
- package/api/resources/credentials/client/requests/CredentialRestoreRequest.d.ts +8 -8
- package/api/resources/credentials/client/requests/CredentialRestoreRequest.js.map +1 -1
- package/api/resources/credentials/client/requests/CredentialUploadRequest.d.ts +8 -8
- package/api/resources/credentials/client/requests/CredentialUploadRequest.js.map +1 -1
- package/api/resources/desk/client/Client.js +2 -2
- package/api/resources/desk/client/Client.js.map +1 -1
- package/api/resources/didcommMessages/client/Client.d.ts +3 -0
- package/api/resources/didcommMessages/client/Client.d.ts.map +1 -1
- package/api/resources/didcommMessages/client/Client.js +31 -7
- package/api/resources/didcommMessages/client/Client.js.map +1 -1
- package/api/resources/didcommMessages/client/requests/DidCommMessageSendInput.d.ts +8 -8
- package/api/resources/didcommMessages/client/requests/DidCommMessageSendInput.js.map +1 -1
- package/api/resources/didcommMessages/client/requests/DidcommMessageDeleteRequest.d.ts +8 -8
- package/api/resources/didcommMessages/client/requests/DidcommMessageDeleteRequest.js.map +1 -1
- package/api/resources/didcommMessages/client/requests/DidcommMessageRestoreRequest.d.ts +8 -8
- package/api/resources/didcommMessages/client/requests/DidcommMessageRestoreRequest.js.map +1 -1
- package/api/resources/dids/client/Client.js +1 -1
- package/api/resources/dids/client/Client.js.map +1 -1
- package/api/resources/drafts/client/Client.d.ts +2 -0
- package/api/resources/drafts/client/Client.d.ts.map +1 -1
- package/api/resources/drafts/client/Client.js +26 -10
- package/api/resources/drafts/client/Client.js.map +1 -1
- package/api/resources/drafts/client/requests/DraftCreateRequest.d.ts +8 -8
- package/api/resources/drafts/client/requests/DraftCreateRequest.js.map +1 -1
- package/api/resources/drafts/client/requests/DraftDeleteRequest.d.ts +8 -8
- package/api/resources/drafts/client/requests/DraftDeleteRequest.js.map +1 -1
- package/api/resources/drafts/client/requests/DraftRestoreRequest.d.ts +8 -8
- package/api/resources/drafts/client/requests/DraftRestoreRequest.js.map +1 -1
- package/api/resources/drafts/client/requests/DraftUpdateRequest.d.ts +8 -8
- package/api/resources/drafts/client/requests/DraftUpdateRequest.js.map +1 -1
- package/api/resources/files/client/Client.d.ts +2 -0
- package/api/resources/files/client/Client.d.ts.map +1 -1
- package/api/resources/files/client/Client.js +26 -10
- package/api/resources/files/client/Client.js.map +1 -1
- package/api/resources/files/client/requests/FileCreateRequest.d.ts +8 -8
- package/api/resources/files/client/requests/FileCreateRequest.js.map +1 -1
- package/api/resources/files/client/requests/FileDeleteRequest.d.ts +8 -8
- package/api/resources/files/client/requests/FileDeleteRequest.js.map +1 -1
- package/api/resources/files/client/requests/FileRestoreRequest.d.ts +8 -8
- package/api/resources/files/client/requests/FileRestoreRequest.js.map +1 -1
- package/api/resources/files/client/requests/FileUpdateRequest.d.ts +8 -8
- package/api/resources/files/client/requests/FileUpdateRequest.js.map +1 -1
- package/api/resources/files/client/requests/FileUploadRequest.d.ts +8 -8
- package/api/resources/files/client/requests/FileUploadRequest.js.map +1 -1
- package/api/resources/gdpr/client/Client.js +1 -1
- package/api/resources/gdpr/client/Client.js.map +1 -1
- package/api/resources/keys/client/Client.d.ts +4 -4
- package/api/resources/keys/client/Client.d.ts.map +1 -1
- package/api/resources/keys/client/Client.js +44 -16
- package/api/resources/keys/client/Client.js.map +1 -1
- package/api/resources/keys/client/requests/KeyDeleteRequest.d.ts +8 -8
- package/api/resources/keys/client/requests/KeyDeleteRequest.js.map +1 -1
- package/api/resources/keys/client/requests/KeyGenerateInput.d.ts +8 -8
- package/api/resources/keys/client/requests/KeyGenerateInput.js.map +1 -1
- package/api/resources/keys/client/requests/KeyImportSecretInput.d.ts +8 -8
- package/api/resources/keys/client/requests/KeyImportSecretInput.js.map +1 -1
- package/api/resources/keys/client/requests/KeyInput.d.ts +8 -8
- package/api/resources/keys/client/requests/KeyInput.js.map +1 -1
- package/api/resources/keys/client/requests/KeyRestoreRequest.d.ts +8 -8
- package/api/resources/keys/client/requests/KeyRestoreRequest.js.map +1 -1
- package/api/resources/presentations/client/Client.d.ts +3 -0
- package/api/resources/presentations/client/Client.d.ts.map +1 -1
- package/api/resources/presentations/client/Client.js +36 -12
- package/api/resources/presentations/client/Client.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationDeleteRequest.d.ts +8 -8
- package/api/resources/presentations/client/requests/PresentationDeleteRequest.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationInput.d.ts +8 -8
- package/api/resources/presentations/client/requests/PresentationInput.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationRestoreRequest.d.ts +8 -8
- package/api/resources/presentations/client/requests/PresentationRestoreRequest.js.map +1 -1
- package/api/resources/presentations/client/requests/PresentationUploadRequest.d.ts +8 -8
- package/api/resources/presentations/client/requests/PresentationUploadRequest.js.map +1 -1
- package/api/types/DraftSchema.d.ts +17 -16
- package/api/types/DraftSchema.d.ts.map +1 -1
- package/api/types/DraftSchema.js.map +1 -1
- package/api/types/EqualKeyTypeValue.d.ts +1 -2
- package/api/types/EqualKeyTypeValue.d.ts.map +1 -1
- package/api/types/EqualKeyTypeValue.js +0 -1
- package/api/types/EqualKeyTypeValue.js.map +1 -1
- package/api/types/InKeyTypeValuesItem.d.ts +6 -8
- package/api/types/InKeyTypeValuesItem.d.ts.map +1 -1
- package/api/types/InKeyTypeValuesItem.js +0 -1
- package/api/types/InKeyTypeValuesItem.js.map +1 -1
- package/api/types/KeyGenerate.d.ts +5 -6
- package/api/types/KeyGenerate.d.ts.map +1 -1
- package/api/types/KeyGenerate.js.map +1 -1
- package/api/types/KeyGenerateType.d.ts +6 -8
- package/api/types/KeyGenerateType.d.ts.map +1 -1
- package/api/types/KeyGenerateType.js +0 -1
- package/api/types/KeyGenerateType.js.map +1 -1
- package/api/types/KeyPublic.d.ts +5 -6
- package/api/types/KeyPublic.d.ts.map +1 -1
- package/api/types/KeyPublic.js.map +1 -1
- package/api/types/KeyPublicType.d.ts +6 -8
- package/api/types/KeyPublicType.d.ts.map +1 -1
- package/api/types/KeyPublicType.js +0 -1
- package/api/types/KeyPublicType.js.map +1 -1
- package/api/types/NotEqualKeyTypeValue.d.ts +1 -2
- package/api/types/NotEqualKeyTypeValue.d.ts.map +1 -1
- package/api/types/NotEqualKeyTypeValue.js +0 -1
- package/api/types/NotEqualKeyTypeValue.js.map +1 -1
- package/api/types/NotInKeyTypeValuesItem.d.ts +6 -8
- package/api/types/NotInKeyTypeValuesItem.d.ts.map +1 -1
- package/api/types/NotInKeyTypeValuesItem.js +0 -1
- package/api/types/NotInKeyTypeValuesItem.js.map +1 -1
- package/api/types/ProblemMethodNotAllowedAlive.d.ts +1 -1
- package/api/types/ProblemMethodNotAllowedAlive.js.map +1 -1
- package/api/types/ProblemMethodNotAllowedDeleted.d.ts +1 -1
- package/api/types/ProblemMethodNotAllowedDeleted.js.map +1 -1
- package/api/types/ProblemPreconditionFailedBlob.d.ts +1 -1
- package/api/types/ProblemPreconditionFailedBlob.js.map +1 -1
- package/api/types/ProblemResourceNotFound.d.ts +1 -1
- package/api/types/ProblemResourceNotFound.js.map +1 -1
- package/documents/credential/flavor.d.ts.map +1 -1
- package/documents/credential/flavor.js +1 -0
- package/documents/credential/flavor.js.map +1 -1
- package/documents/credential/flavor.spec.js +2 -0
- package/documents/credential/flavor.spec.js.map +1 -1
- package/documents/credential/unknown.d.ts +4 -0
- package/documents/credential/unknown.d.ts.map +1 -1
- package/documents/credential/unknown.js +8 -0
- package/documents/credential/unknown.js.map +1 -1
- package/documents/credential.d.ts +4 -0
- package/documents/credential.d.ts.map +1 -1
- package/documents/credential.js +8 -0
- package/documents/credential.js.map +1 -1
- package/documents/presentation.d.ts +4 -0
- package/documents/presentation.d.ts.map +1 -1
- package/documents/presentation.js +8 -0
- package/documents/presentation.js.map +1 -1
- package/documents/types.d.ts +1 -0
- package/documents/types.d.ts.map +1 -1
- package/documents/types.js.map +1 -1
- package/package.json +1 -1
- package/reference.md +0 -4
- package/serialization/types/EqualKeyTypeValue.d.ts +1 -1
- package/serialization/types/EqualKeyTypeValue.d.ts.map +1 -1
- package/serialization/types/EqualKeyTypeValue.js +1 -1
- package/serialization/types/EqualKeyTypeValue.js.map +1 -1
- package/serialization/types/InKeyTypeValuesItem.d.ts +1 -1
- package/serialization/types/InKeyTypeValuesItem.d.ts.map +1 -1
- package/serialization/types/InKeyTypeValuesItem.js +1 -1
- package/serialization/types/InKeyTypeValuesItem.js.map +1 -1
- package/serialization/types/KeyGenerateType.d.ts +1 -1
- package/serialization/types/KeyGenerateType.d.ts.map +1 -1
- package/serialization/types/KeyGenerateType.js +1 -1
- package/serialization/types/KeyGenerateType.js.map +1 -1
- package/serialization/types/KeyPublicType.d.ts +1 -1
- package/serialization/types/KeyPublicType.d.ts.map +1 -1
- package/serialization/types/KeyPublicType.js +1 -1
- package/serialization/types/KeyPublicType.js.map +1 -1
- package/serialization/types/NotEqualKeyTypeValue.d.ts +1 -1
- package/serialization/types/NotEqualKeyTypeValue.d.ts.map +1 -1
- package/serialization/types/NotEqualKeyTypeValue.js +1 -1
- package/serialization/types/NotEqualKeyTypeValue.js.map +1 -1
- package/serialization/types/NotInKeyTypeValuesItem.d.ts +1 -1
- package/serialization/types/NotInKeyTypeValuesItem.d.ts.map +1 -1
- package/serialization/types/NotInKeyTypeValuesItem.js +1 -1
- package/serialization/types/NotInKeyTypeValuesItem.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CredentialRestoreRequest.js","sourceRoot":"","sources":["../../../../../../src/api/resources/credentials/client/requests/CredentialRestoreRequest.ts"],"names":[],"mappings":";AAAA;;GAEG","sourcesContent":["/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\n/**\n * @example\n * {\n * idempotencyKey: \"string\",\n * ifMatch: \"string\"\n * }\n */\nexport interface CredentialRestoreRequest {\n /**\n * From [Zalando RESTful API Guidelines - models/headers-1.0.0.yaml](https://opensource.zalando.com/restful-api-guidelines/models/headers-1.0.0.yaml).\n * The **Idempotency-Key** is a free identifier created by the client to\n * identify a request. It is used by the service to identify repeated request\n * to ensure idempotent behavior by sending the same (or a similar) response\n * without executing the request a second time.\n *\n *
|
|
1
|
+
{"version":3,"file":"CredentialRestoreRequest.js","sourceRoot":"","sources":["../../../../../../src/api/resources/credentials/client/requests/CredentialRestoreRequest.ts"],"names":[],"mappings":";AAAA;;GAEG","sourcesContent":["/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\n/**\n * @example\n * {\n * idempotencyKey: \"string\",\n * ifMatch: \"string\"\n * }\n */\nexport interface CredentialRestoreRequest {\n /**\n * From [Zalando RESTful API Guidelines - models/headers-1.0.0.yaml](https://opensource.zalando.com/restful-api-guidelines/models/headers-1.0.0.yaml).\n * The **Idempotency-Key** is a free identifier created by the client to\n * identify a request. It is used by the service to identify repeated request\n * to ensure idempotent behavior by sending the same (or a similar) response\n * without executing the request a second time.\n *\n * Clients should be careful as any subsequent requests with the same key may\n * return the same response without further check. Thus, it is recommended to\n * use a UUID version 4 (random) or any other random string with enough\n * entropy to avoid collisions.\n *\n * Keys expire after 24 hours. Clients are responsible to stay within this\n * limit, if they require idempotent behavior.\n *\n * See [API Guideline Rule #181][api-230] for further details.\n *\n * [api-230]: <https://opensource.zalando.com/restful-api-guidelines/#230>.\n */\n idempotencyKey?: string;\n /**\n * From [Zalando RESTful API Guidelines - models/headers-1.0.0.yaml](https://opensource.zalando.com/restful-api-guidelines/models/headers-1.0.0.yaml).\n * The **If-Match** header field is used to declare a list of identifiers that\n * are required to match the current resource version identifier in at least\n * one position as a pre-condition for executing the request on the server\n * side. This behavior is used to validate and reject optimistic updates, by\n * checking if the resource version a consumer has based his changes on is\n * outdated on arrival of the change request to prevent lost updates.\n *\n * If the pre-condition fails the server will respond with status code **412**\n * (Precondition Failed). See [RFC 9110 Section 13.1.1][rfc-9110-13.1.1] as\n * well as [API Guideline Rule #182][api-182] for further details.\n *\n * [rfc-9110-13.1.1]: https://tools.ietf.org/html/rfc9110#section-13.1.1\n *\n * [api-182]: <https://opensource.zalando.com/restful-api-guidelines/#182>.\n */\n ifMatch: string;\n}\n"]}
|
|
@@ -13,17 +13,17 @@ export interface CredentialUploadRequest {
|
|
|
13
13
|
* to ensure idempotent behavior by sending the same (or a similar) response
|
|
14
14
|
* without executing the request a second time.
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* Clients should be careful as any subsequent requests with the same key may
|
|
17
|
+
* return the same response without further check. Thus, it is recommended to
|
|
18
|
+
* use a UUID version 4 (random) or any other random string with enough
|
|
19
|
+
* entropy to avoid collisions.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* Keys expire after 24 hours. Clients are responsible to stay within this
|
|
22
|
+
* limit, if they require idempotent behavior.
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* See [API Guideline Rule #181][api-230] for further details.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
26
|
+
* [api-230]: <https://opensource.zalando.com/restful-api-guidelines/#230>.
|
|
27
27
|
*/
|
|
28
28
|
idempotencyKey?: string;
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CredentialUploadRequest.js","sourceRoot":"","sources":["../../../../../../src/api/resources/credentials/client/requests/CredentialUploadRequest.ts"],"names":[],"mappings":";AAAA;;GAEG","sourcesContent":["/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\n/**\n * @example\n * {}\n */\nexport interface CredentialUploadRequest {\n /**\n * From [Zalando RESTful API Guidelines - models/headers-1.0.0.yaml](https://opensource.zalando.com/restful-api-guidelines/models/headers-1.0.0.yaml).\n * The **Idempotency-Key** is a free identifier created by the client to\n * identify a request. It is used by the service to identify repeated request\n * to ensure idempotent behavior by sending the same (or a similar) response\n * without executing the request a second time.\n *\n *
|
|
1
|
+
{"version":3,"file":"CredentialUploadRequest.js","sourceRoot":"","sources":["../../../../../../src/api/resources/credentials/client/requests/CredentialUploadRequest.ts"],"names":[],"mappings":";AAAA;;GAEG","sourcesContent":["/**\n * This file was auto-generated by Fern from our API Definition.\n */\n\n/**\n * @example\n * {}\n */\nexport interface CredentialUploadRequest {\n /**\n * From [Zalando RESTful API Guidelines - models/headers-1.0.0.yaml](https://opensource.zalando.com/restful-api-guidelines/models/headers-1.0.0.yaml).\n * The **Idempotency-Key** is a free identifier created by the client to\n * identify a request. It is used by the service to identify repeated request\n * to ensure idempotent behavior by sending the same (or a similar) response\n * without executing the request a second time.\n *\n * Clients should be careful as any subsequent requests with the same key may\n * return the same response without further check. Thus, it is recommended to\n * use a UUID version 4 (random) or any other random string with enough\n * entropy to avoid collisions.\n *\n * Keys expire after 24 hours. Clients are responsible to stay within this\n * limit, if they require idempotent behavior.\n *\n * See [API Guideline Rule #181][api-230] for further details.\n *\n * [api-230]: <https://opensource.zalando.com/restful-api-guidelines/#230>.\n */\n idempotencyKey?: string;\n}\n"]}
|
|
@@ -73,7 +73,7 @@ class Desk {
|
|
|
73
73
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
74
74
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TruvityEnvironment.Default, `${encodeURIComponent(tenantId)}/did.json`),
|
|
75
75
|
method: 'GET',
|
|
76
|
-
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.
|
|
76
|
+
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
|
77
77
|
contentType: 'application/json',
|
|
78
78
|
requestType: 'json',
|
|
79
79
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -153,7 +153,7 @@ class Desk {
|
|
|
153
153
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
154
154
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TruvityEnvironment.Default, `${encodeURIComponent(tenantId)}/didcomm-messages/recv`),
|
|
155
155
|
method: 'POST',
|
|
156
|
-
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.
|
|
156
|
+
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
157
157
|
contentType: 'application/json',
|
|
158
158
|
requestType: 'json',
|
|
159
159
|
body: serializers.desk.didCommMessageRecv.Request.jsonOrThrow(request, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../../../src/api/resources/desk/client/Client.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uEAAyD;AACzD,uDAAyC;AACzC,wDAA0C;AAC1C,wDAA+B;AAC/B,6EAA+D;AAC/D,iEAAmD;AAmBnD;;GAEG;AACH,MAAa,IAAI;IACb,YAA+B,WAAyB,EAAE;QAA3B,aAAQ,GAAR,QAAQ,CAAmB;IAAG,CAAC;IAE9D;;;;;;;;;;;;;OAaG;IACU,cAAc,CACvB,QAAgB,EAChB,UAAyC,EAAE,EAC3C,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,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,mCAAI,YAAY,CAAC,kBAAkB,CAAC,OAAO,EAC/F,GAAG,kBAAkB,CAAC,QAAQ,CAAC,WAAW,CAC7C;gBACD,MAAM,EAAE,KAAK;gBACb,OA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AAC;iBACV;aACJ;YAED,QAAQ,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE;gBAC5B,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;qBAChC,CAAC,CAAC;gBACP,KAAK,SAAS;oBACV,MAAM,IAAI,MAAM,CAAC,mBAAmB,EAAE,CAAC;gBAC3C,KAAK,SAAS;oBACV,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC;wBAC1B,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,YAAY;qBACxC,CAAC,CAAC;aACV;;KACJ;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;AAhND,oBAgNC","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 Desk {\n interface Options {\n environment?: core.Supplier<environments.TruvityEnvironment | string>;\n apiKey?: core.Supplier<string | undefined>;\n fetcher?: core.FetchFunction;\n }\n\n 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 }\n}\n\n/**\n * The API to manage DID Documents and to receive DIDComm messages.\n */\nexport class Desk {\n constructor(protected readonly _options: Desk.Options = {}) {}\n\n /**\n * Get DID-Document for [did:web Method Specification](https://w3c-ccg.github.io/did-method-web/).\n *\n * @param {string} tenantId - The ID of the tenant.\n * @param {Truvity.DidDocumentGetRequest} request\n * @param {Desk.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link Truvity.BadRequestError}\n * @throws {@link Truvity.TooManyRequestsError}\n * @throws {@link Truvity.InternalServerError}\n *\n * @example\n * await client.desk.didDocumentGet(\"tenant_id\")\n */\n public async didDocumentGet(\n tenantId: string,\n request: Truvity.DidDocumentGetRequest = {},\n requestOptions?: Desk.RequestOptions,\n ): Promise<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.environment)) ?? environments.TruvityEnvironment.Default,\n `${encodeURIComponent(tenantId)}/did.json`,\n ),\n method: 'GET',\n headers: {\n 'X-Fern-Language': 'JavaScript',\n 'X-Fern-SDK-Name': '@truvity/sdk',\n 'X-Fern-SDK-Version': 'v0.28.3',\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 },\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 serializers.DidDocument.parseOrThrow(_response.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\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 );\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 );\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 );\n default:\n throw new errors.TruvityError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\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 });\n case 'timeout':\n throw new errors.TruvityTimeoutError();\n case 'unknown':\n throw new errors.TruvityError({\n message: _response.error.errorMessage,\n });\n }\n }\n\n /**\n * Receive DIDComm Message.\n *\n * @param {string} tenantId - The ID of the tenant.\n * @param {string} request\n * @param {Desk.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link Truvity.BadRequestError}\n * @throws {@link Truvity.UnsupportedMediaTypeError}\n * @throws {@link Truvity.InternalServerError}\n *\n * @example\n * await client.desk.didCommMessageRecv(\"tenant_id\", \"string\")\n */\n public async didCommMessageRecv(\n tenantId: string,\n request: string,\n requestOptions?: Desk.RequestOptions,\n ): Promise<void> {\n const _response = await (this._options.fetcher ?? core.fetcher)({\n url: urlJoin(\n (await core.Supplier.get(this._options.environment)) ?? environments.TruvityEnvironment.Default,\n `${encodeURIComponent(tenantId)}/didcomm-messages/recv`,\n ),\n method: 'POST',\n headers: {\n 'X-Fern-Language': 'JavaScript',\n 'X-Fern-SDK-Name': '@truvity/sdk',\n 'X-Fern-SDK-Version': 'v0.28.3',\n 'X-Fern-Runtime': core.RUNTIME.type,\n 'X-Fern-Runtime-Version': core.RUNTIME.version,\n ...(await this._getCustomAuthorizationHeaders()),\n },\n contentType: 'application/json',\n requestType: 'json',\n body: serializers.desk.didCommMessageRecv.Request.jsonOrThrow(request, {\n unrecognizedObjectKeys: 'strip',\n omitUndefined: true,\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 }\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 );\n case 415:\n throw new Truvity.UnsupportedMediaTypeError(\n serializers.UnsupportedMediaTypeProblems.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\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 );\n default:\n throw new errors.TruvityError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\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 });\n case 'timeout':\n throw new errors.TruvityTimeoutError();\n case 'unknown':\n throw new errors.TruvityError({\n message: _response.error.errorMessage,\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","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KAAK,CAAC,YAAY;qBACxC,CAAC,CAAC;aACV;;KACJ;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;AAhND,oBAgNC","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 Desk {\n interface Options {\n environment?: core.Supplier<environments.TruvityEnvironment | string>;\n apiKey?: core.Supplier<string | undefined>;\n fetcher?: core.FetchFunction;\n }\n\n 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 }\n}\n\n/**\n * The API to manage DID Documents and to receive DIDComm messages.\n */\nexport class Desk {\n constructor(protected readonly _options: Desk.Options = {}) {}\n\n /**\n * Get DID-Document for [did:web Method Specification](https://w3c-ccg.github.io/did-method-web/).\n *\n * @param {string} tenantId - The ID of the tenant.\n * @param {Truvity.DidDocumentGetRequest} request\n * @param {Desk.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link Truvity.BadRequestError}\n * @throws {@link Truvity.TooManyRequestsError}\n * @throws {@link Truvity.InternalServerError}\n *\n * @example\n * await client.desk.didDocumentGet(\"tenant_id\")\n */\n public async didDocumentGet(\n tenantId: string,\n request: Truvity.DidDocumentGetRequest = {},\n requestOptions?: Desk.RequestOptions,\n ): Promise<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.environment)) ?? environments.TruvityEnvironment.Default,\n `${encodeURIComponent(tenantId)}/did.json`,\n ),\n method: 'GET',\n headers: {\n 'X-Fern-Language': 'JavaScript',\n 'X-Fern-SDK-Name': '@truvity/sdk',\n 'X-Fern-SDK-Version': 'v0.28.4',\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 },\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 serializers.DidDocument.parseOrThrow(_response.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\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 );\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 );\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 );\n default:\n throw new errors.TruvityError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\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 });\n case 'timeout':\n throw new errors.TruvityTimeoutError();\n case 'unknown':\n throw new errors.TruvityError({\n message: _response.error.errorMessage,\n });\n }\n }\n\n /**\n * Receive DIDComm Message.\n *\n * @param {string} tenantId - The ID of the tenant.\n * @param {string} request\n * @param {Desk.RequestOptions} requestOptions - Request-specific configuration.\n *\n * @throws {@link Truvity.BadRequestError}\n * @throws {@link Truvity.UnsupportedMediaTypeError}\n * @throws {@link Truvity.InternalServerError}\n *\n * @example\n * await client.desk.didCommMessageRecv(\"tenant_id\", \"string\")\n */\n public async didCommMessageRecv(\n tenantId: string,\n request: string,\n requestOptions?: Desk.RequestOptions,\n ): Promise<void> {\n const _response = await (this._options.fetcher ?? core.fetcher)({\n url: urlJoin(\n (await core.Supplier.get(this._options.environment)) ?? environments.TruvityEnvironment.Default,\n `${encodeURIComponent(tenantId)}/didcomm-messages/recv`,\n ),\n method: 'POST',\n headers: {\n 'X-Fern-Language': 'JavaScript',\n 'X-Fern-SDK-Name': '@truvity/sdk',\n 'X-Fern-SDK-Version': 'v0.28.4',\n 'X-Fern-Runtime': core.RUNTIME.type,\n 'X-Fern-Runtime-Version': core.RUNTIME.version,\n ...(await this._getCustomAuthorizationHeaders()),\n },\n contentType: 'application/json',\n requestType: 'json',\n body: serializers.desk.didCommMessageRecv.Request.jsonOrThrow(request, {\n unrecognizedObjectKeys: 'strip',\n omitUndefined: true,\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 }\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 );\n case 415:\n throw new Truvity.UnsupportedMediaTypeError(\n serializers.UnsupportedMediaTypeProblems.parseOrThrow(_response.error.body, {\n unrecognizedObjectKeys: 'passthrough',\n allowUnrecognizedUnionMembers: true,\n allowUnrecognizedEnumValues: true,\n breadcrumbsPrefix: ['response'],\n }),\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 );\n default:\n throw new errors.TruvityError({\n statusCode: _response.error.statusCode,\n body: _response.error.body,\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 });\n case 'timeout':\n throw new errors.TruvityTimeoutError();\n case 'unknown':\n throw new errors.TruvityError({\n message: _response.error.errorMessage,\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"]}
|
|
@@ -51,6 +51,8 @@ export declare class DidcommMessages {
|
|
|
51
51
|
* @throws {@link Truvity.BadRequestError}
|
|
52
52
|
* @throws {@link Truvity.UnauthorizedError}
|
|
53
53
|
* @throws {@link Truvity.ForbiddenError}
|
|
54
|
+
* @throws {@link Truvity.NotFoundError}
|
|
55
|
+
* @throws {@link Truvity.MethodNotAllowedError}
|
|
54
56
|
* @throws {@link Truvity.TooManyRequestsError}
|
|
55
57
|
* @throws {@link Truvity.InternalServerError}
|
|
56
58
|
*
|
|
@@ -115,6 +117,7 @@ export declare class DidcommMessages {
|
|
|
115
117
|
* @throws {@link Truvity.BadRequestError}
|
|
116
118
|
* @throws {@link Truvity.UnauthorizedError}
|
|
117
119
|
* @throws {@link Truvity.ForbiddenError}
|
|
120
|
+
* @throws {@link Truvity.NotFoundError}
|
|
118
121
|
* @throws {@link Truvity.MethodNotAllowedError}
|
|
119
122
|
* @throws {@link Truvity.PreconditionFailedError}
|
|
120
123
|
* @throws {@link Truvity.TooManyRequestsError}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/didcommMessages/client/Client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAK1C,MAAM,CAAC,OAAO,WAAW,eAAe,CAAC;IACrC,UAAU,OAAO;QACb,WAAW,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,kBAAkB,GAAG,MAAM,CAAC,CAAC;QACtE,MAAM,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;QAC3C,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC;KAChC;IAED,UAAU,cAAc;QACpB,0DAA0D;QAC1D,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,+DAA+D;QAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,mCAAmC;QACnC,WAAW,CAAC,EAAE,WAAW,CAAC;KAC7B;CACJ;AAED;;GAEG;AACH,qBAAa,eAAe;IACZ,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,OAAO;gBAAjC,QAAQ,GAAE,eAAe,CAAC,OAAY;IAErE;;;;;;;;;;;;;;;OAeG;IACU,oBAAoB,CAC7B,OAAO,GAAE,OAAO,CAAC,2BAAgC,EACjD,cAAc,CAAC,EAAE,eAAe,CAAC,cAAc,GAChD,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC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;;;OAgBG;IACU,oBAAoB,CAC7B,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,OAAO,CAAC,2BAAgC,EACjD,cAAc,CAAC,EAAE,eAAe,CAAC,cAAc,GAChD,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC;IA+G1C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACU,oBAAoB,CAC7B,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,2BAA2B,EAC5C,cAAc,CAAC,EAAE,eAAe,CAAC,cAAc,GAChD,OAAO,CAAC,IAAI,CAAC;IA6HhB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACU,qBAAqB,CAC9B,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,4BAA4B,EAC7C,cAAc,CAAC,EAAE,eAAe,CAAC,cAAc,GAChD,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC;IAkI1C;;;;;;;;;;;;;;;;OAgBG;IACU,qBAAqB,CAC9B,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,OAAO,CAAC,4BAAiC,EAClD,cAAc,CAAC,EAAE,eAAe,CAAC,cAAc,GAChD,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC;IA+GtC;;;;;;;;;;;;;;;;;OAiBG;IACU,sBAAsB,CAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,OAAO,CAAC,6BAAkC,EACnD,cAAc,CAAC,EAAE,eAAe,CAAC,cAAc,GAChD,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC;cA+G1B,8BAA8B;;;CAIjD"}
|
|
@@ -85,7 +85,7 @@ class DidcommMessages {
|
|
|
85
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
86
86
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TruvityEnvironment.Default, 'didcomm-messages/search'),
|
|
87
87
|
method: 'POST',
|
|
88
|
-
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.
|
|
88
|
+
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
89
89
|
contentType: 'application/json',
|
|
90
90
|
requestType: 'json',
|
|
91
91
|
body: serializers.DidcommMessageSearchRequest.jsonOrThrow(request, {
|
|
@@ -179,6 +179,8 @@ class DidcommMessages {
|
|
|
179
179
|
* @throws {@link Truvity.BadRequestError}
|
|
180
180
|
* @throws {@link Truvity.UnauthorizedError}
|
|
181
181
|
* @throws {@link Truvity.ForbiddenError}
|
|
182
|
+
* @throws {@link Truvity.NotFoundError}
|
|
183
|
+
* @throws {@link Truvity.MethodNotAllowedError}
|
|
182
184
|
* @throws {@link Truvity.TooManyRequestsError}
|
|
183
185
|
* @throws {@link Truvity.InternalServerError}
|
|
184
186
|
*
|
|
@@ -197,7 +199,7 @@ class DidcommMessages {
|
|
|
197
199
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
198
200
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TruvityEnvironment.Default, 'didcomm-messages/send'),
|
|
199
201
|
method: 'POST',
|
|
200
|
-
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.
|
|
202
|
+
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
|
201
203
|
contentType: 'application/json',
|
|
202
204
|
requestType: 'json',
|
|
203
205
|
body: serializers.DidCommMessageSendInput.jsonOrThrow(_body, {
|
|
@@ -239,6 +241,20 @@ class DidcommMessages {
|
|
|
239
241
|
allowUnrecognizedEnumValues: true,
|
|
240
242
|
breadcrumbsPrefix: ['response'],
|
|
241
243
|
}));
|
|
244
|
+
case 404:
|
|
245
|
+
throw new Truvity.NotFoundError(serializers.NotFoundProblems.parseOrThrow(_response.error.body, {
|
|
246
|
+
unrecognizedObjectKeys: 'passthrough',
|
|
247
|
+
allowUnrecognizedUnionMembers: true,
|
|
248
|
+
allowUnrecognizedEnumValues: true,
|
|
249
|
+
breadcrumbsPrefix: ['response'],
|
|
250
|
+
}));
|
|
251
|
+
case 405:
|
|
252
|
+
throw new Truvity.MethodNotAllowedError(serializers.MethodNotAllowedProblems.parseOrThrow(_response.error.body, {
|
|
253
|
+
unrecognizedObjectKeys: 'passthrough',
|
|
254
|
+
allowUnrecognizedUnionMembers: true,
|
|
255
|
+
allowUnrecognizedEnumValues: true,
|
|
256
|
+
breadcrumbsPrefix: ['response'],
|
|
257
|
+
}));
|
|
242
258
|
case 429:
|
|
243
259
|
throw new Truvity.TooManyRequestsError(serializers.TooManyRequestsProblems.parseOrThrow(_response.error.body, {
|
|
244
260
|
unrecognizedObjectKeys: 'passthrough',
|
|
@@ -299,7 +315,7 @@ class DidcommMessages {
|
|
|
299
315
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
300
316
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TruvityEnvironment.Default, `didcomm-messages/${encodeURIComponent(id)}`),
|
|
301
317
|
method: 'GET',
|
|
302
|
-
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.
|
|
318
|
+
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
|
303
319
|
contentType: 'application/json',
|
|
304
320
|
requestType: 'json',
|
|
305
321
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -409,7 +425,7 @@ class DidcommMessages {
|
|
|
409
425
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
410
426
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TruvityEnvironment.Default, `didcomm-messages/${encodeURIComponent(id)}`),
|
|
411
427
|
method: 'DELETE',
|
|
412
|
-
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.
|
|
428
|
+
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.4', '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())),
|
|
413
429
|
contentType: 'application/json',
|
|
414
430
|
requestType: 'json',
|
|
415
431
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -510,6 +526,7 @@ class DidcommMessages {
|
|
|
510
526
|
* @throws {@link Truvity.BadRequestError}
|
|
511
527
|
* @throws {@link Truvity.UnauthorizedError}
|
|
512
528
|
* @throws {@link Truvity.ForbiddenError}
|
|
529
|
+
* @throws {@link Truvity.NotFoundError}
|
|
513
530
|
* @throws {@link Truvity.MethodNotAllowedError}
|
|
514
531
|
* @throws {@link Truvity.PreconditionFailedError}
|
|
515
532
|
* @throws {@link Truvity.TooManyRequestsError}
|
|
@@ -527,7 +544,7 @@ class DidcommMessages {
|
|
|
527
544
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
528
545
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TruvityEnvironment.Default, `didcomm-messages/${encodeURIComponent(id)}/restore`),
|
|
529
546
|
method: 'POST',
|
|
530
|
-
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.
|
|
547
|
+
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.4', '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())),
|
|
531
548
|
contentType: 'application/json',
|
|
532
549
|
requestType: 'json',
|
|
533
550
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -565,6 +582,13 @@ class DidcommMessages {
|
|
|
565
582
|
allowUnrecognizedEnumValues: true,
|
|
566
583
|
breadcrumbsPrefix: ['response'],
|
|
567
584
|
}));
|
|
585
|
+
case 404:
|
|
586
|
+
throw new Truvity.NotFoundError(serializers.NotFoundProblems.parseOrThrow(_response.error.body, {
|
|
587
|
+
unrecognizedObjectKeys: 'passthrough',
|
|
588
|
+
allowUnrecognizedUnionMembers: true,
|
|
589
|
+
allowUnrecognizedEnumValues: true,
|
|
590
|
+
breadcrumbsPrefix: ['response'],
|
|
591
|
+
}));
|
|
568
592
|
case 405:
|
|
569
593
|
throw new Truvity.MethodNotAllowedError(serializers.MethodNotAllowedProblems.parseOrThrow(_response.error.body, {
|
|
570
594
|
unrecognizedObjectKeys: 'passthrough',
|
|
@@ -639,7 +663,7 @@ class DidcommMessages {
|
|
|
639
663
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
640
664
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TruvityEnvironment.Default, `didcomm-messages/${encodeURIComponent(id)}/revisions`),
|
|
641
665
|
method: 'GET',
|
|
642
|
-
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.
|
|
666
|
+
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
|
643
667
|
contentType: 'application/json',
|
|
644
668
|
requestType: 'json',
|
|
645
669
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -745,7 +769,7 @@ class DidcommMessages {
|
|
|
745
769
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
746
770
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.TruvityEnvironment.Default, `didcomm-messages/${encodeURIComponent(id)}/revisions/${encodeURIComponent(revision)}`),
|
|
747
771
|
method: 'GET',
|
|
748
|
-
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.
|
|
772
|
+
headers: Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': 'v0.28.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())),
|
|
749
773
|
contentType: 'application/json',
|
|
750
774
|
requestType: 'json',
|
|
751
775
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|