@truvity/sdk 0.37.6 → 0.37.7
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/Client.d.ts +3 -1
- package/Client.d.ts.map +1 -1
- package/Client.js +43 -1
- package/Client.js.map +1 -1
- package/ExtendedClient.d.ts +1 -2
- package/ExtendedClient.d.ts.map +1 -1
- package/ExtendedClient.js +1 -5
- package/ExtendedClient.js.map +1 -1
- package/api/resources/apiKeys/client/Client.d.ts +3 -1
- package/api/resources/apiKeys/client/Client.d.ts.map +1 -1
- package/api/resources/apiKeys/client/Client.js +28 -31
- package/api/resources/apiKeys/client/Client.js.map +1 -1
- package/api/resources/apiKeys/client/index.d.ts +1 -0
- package/api/resources/apiKeys/client/index.d.ts.map +1 -1
- package/api/resources/apiKeys/client/index.js.map +1 -1
- package/api/resources/credentials/client/Client.d.ts +4 -3
- package/api/resources/credentials/client/Client.d.ts.map +1 -1
- package/api/resources/credentials/client/Client.js +38 -41
- package/api/resources/credentials/client/Client.js.map +1 -1
- package/api/resources/credentials/client/index.d.ts +1 -0
- package/api/resources/credentials/client/index.d.ts.map +1 -1
- package/api/resources/credentials/client/index.js.map +1 -1
- package/api/resources/desk/client/Client.d.ts +3 -1
- package/api/resources/desk/client/Client.d.ts.map +1 -1
- package/api/resources/desk/client/Client.js +7 -10
- package/api/resources/desk/client/Client.js.map +1 -1
- package/api/resources/desk/client/index.d.ts +1 -0
- package/api/resources/desk/client/index.d.ts.map +1 -1
- package/api/resources/desk/client/index.js.map +1 -1
- package/api/resources/didcommMessages/client/Client.d.ts +3 -1
- package/api/resources/didcommMessages/client/Client.d.ts.map +1 -1
- package/api/resources/didcommMessages/client/Client.js +28 -31
- package/api/resources/didcommMessages/client/Client.js.map +1 -1
- package/api/resources/didcommMessages/client/index.d.ts +1 -0
- package/api/resources/didcommMessages/client/index.d.ts.map +1 -1
- package/api/resources/didcommMessages/client/index.js.map +1 -1
- package/api/resources/dids/client/Client.d.ts +3 -1
- package/api/resources/dids/client/Client.d.ts.map +1 -1
- package/api/resources/dids/client/Client.js +4 -7
- package/api/resources/dids/client/Client.js.map +1 -1
- package/api/resources/dids/client/index.d.ts +1 -0
- package/api/resources/dids/client/index.d.ts.map +1 -1
- package/api/resources/dids/client/index.js.map +1 -1
- package/api/resources/drafts/client/Client.d.ts +4 -3
- package/api/resources/drafts/client/Client.d.ts.map +1 -1
- package/api/resources/drafts/client/Client.js +38 -41
- package/api/resources/drafts/client/Client.js.map +1 -1
- package/api/resources/drafts/client/index.d.ts +1 -0
- package/api/resources/drafts/client/index.d.ts.map +1 -1
- package/api/resources/drafts/client/index.js.map +1 -1
- package/api/resources/files/client/Client.d.ts +4 -3
- package/api/resources/files/client/Client.d.ts.map +1 -1
- package/api/resources/files/client/Client.js +35 -38
- package/api/resources/files/client/Client.js.map +1 -1
- package/api/resources/files/client/index.d.ts +1 -0
- package/api/resources/files/client/index.d.ts.map +1 -1
- package/api/resources/files/client/index.js.map +1 -1
- package/api/resources/gdpr/client/Client.d.ts +3 -1
- package/api/resources/gdpr/client/Client.d.ts.map +1 -1
- package/api/resources/gdpr/client/Client.js +4 -7
- package/api/resources/gdpr/client/Client.js.map +1 -1
- package/api/resources/gdpr/client/index.d.ts +1 -0
- package/api/resources/gdpr/client/index.d.ts.map +1 -1
- package/api/resources/gdpr/client/index.js.map +1 -1
- package/api/resources/keys/client/Client.d.ts +6 -5
- package/api/resources/keys/client/Client.d.ts.map +1 -1
- package/api/resources/keys/client/Client.js +43 -46
- package/api/resources/keys/client/Client.js.map +1 -1
- package/api/resources/keys/client/index.d.ts +1 -0
- package/api/resources/keys/client/index.d.ts.map +1 -1
- package/api/resources/keys/client/index.js.map +1 -1
- package/api/resources/presentations/client/Client.d.ts +5 -4
- package/api/resources/presentations/client/Client.d.ts.map +1 -1
- package/api/resources/presentations/client/Client.js +45 -48
- package/api/resources/presentations/client/Client.js.map +1 -1
- package/api/resources/presentations/client/index.d.ts +1 -0
- package/api/resources/presentations/client/index.d.ts.map +1 -1
- package/api/resources/presentations/client/index.js.map +1 -1
- package/core/fetcher/BinaryResponse.d.ts +21 -0
- package/core/fetcher/BinaryResponse.d.ts.map +1 -0
- package/core/fetcher/BinaryResponse.js +18 -0
- package/core/fetcher/BinaryResponse.js.map +1 -0
- package/core/fetcher/Fetcher.d.ts +3 -2
- package/core/fetcher/Fetcher.d.ts.map +1 -1
- package/core/fetcher/Fetcher.js +25 -12
- package/core/fetcher/Fetcher.js.map +1 -1
- package/core/fetcher/ResponseWithBody.d.ts +5 -0
- package/core/fetcher/ResponseWithBody.d.ts.map +1 -0
- package/core/fetcher/ResponseWithBody.js +7 -0
- package/core/fetcher/ResponseWithBody.js.map +1 -0
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts.map +1 -1
- package/core/fetcher/createRequestUrl.js +3 -7
- package/core/fetcher/createRequestUrl.js.map +1 -1
- package/core/fetcher/getErrorResponseBody.d.ts +2 -0
- package/core/fetcher/getErrorResponseBody.d.ts.map +1 -0
- package/core/fetcher/getErrorResponseBody.js +45 -0
- package/core/fetcher/getErrorResponseBody.js.map +1 -0
- package/core/fetcher/getFetchFn.d.ts +1 -4
- package/core/fetcher/getFetchFn.d.ts.map +1 -1
- package/core/fetcher/getFetchFn.js +1 -52
- package/core/fetcher/getFetchFn.js.map +1 -1
- package/core/fetcher/getResponseBody.d.ts.map +1 -1
- package/core/fetcher/getResponseBody.js +34 -33
- package/core/fetcher/getResponseBody.js.map +1 -1
- package/core/fetcher/index.d.ts +1 -0
- package/core/fetcher/index.d.ts.map +1 -1
- package/core/fetcher/index.js.map +1 -1
- package/core/headers.d.ts +4 -0
- package/core/headers.d.ts.map +1 -0
- package/core/headers.js +30 -0
- package/core/headers.js.map +1 -0
- package/core/index.d.ts +1 -0
- package/core/index.d.ts.map +1 -1
- package/core/index.js +2 -1
- package/core/index.js.map +1 -1
- package/core/runtime/runtime.d.ts.map +1 -1
- package/core/runtime/runtime.js +0 -1
- package/core/runtime/runtime.js.map +1 -1
- package/core/url/index.d.ts +3 -0
- package/core/url/index.d.ts.map +1 -0
- package/core/url/index.js +8 -0
- package/core/url/index.js.map +1 -0
- package/core/url/join.d.ts +2 -0
- package/core/url/join.d.ts.map +1 -0
- package/core/url/join.js +50 -0
- package/core/url/join.js.map +1 -0
- package/core/url/qs.d.ts +7 -0
- package/core/url/qs.d.ts.map +1 -0
- package/core/url/qs.js +65 -0
- package/core/url/qs.js.map +1 -0
- package/documents/credential/document/vcdm.d.ts +1 -1
- package/documents/credential/document/vcdm.d.ts.map +1 -1
- package/documents/credential/document/vcdm.js +12 -1
- package/documents/credential/document/vcdm.js.map +1 -1
- package/documents/credential/document.d.ts +2 -2
- package/documents/credential/document.d.ts.map +1 -1
- package/documents/credential/document.js +21 -8
- package/documents/credential/document.js.map +1 -1
- package/documents/credential/draft/draft.d.ts +2 -2
- package/documents/credential/draft/draft.d.ts.map +1 -1
- package/documents/credential/draft/draft.js.map +1 -1
- package/documents/credential/flavor/vcdm1_1.d.ts +3 -3
- package/documents/credential/flavor/vcdm1_1.d.ts.map +1 -1
- package/documents/credential/flavor/vcdm1_1.js +27 -25
- package/documents/credential/flavor/vcdm1_1.js.map +1 -1
- package/documents/credential/flavor/vcdm2_0.d.ts +2 -2
- package/documents/credential/flavor/vcdm2_0.d.ts.map +1 -1
- package/documents/credential/flavor/vcdm2_0.js +29 -16
- package/documents/credential/flavor/vcdm2_0.js.map +1 -1
- package/documents/credential/flavor.d.ts +2 -2
- package/documents/credential/flavor.d.ts.map +1 -1
- package/documents/credential/flavor.js +25 -10
- package/documents/credential/flavor.js.map +1 -1
- package/documents/credential/flavor.spec.js +3 -3
- package/documents/credential/flavor.spec.js.map +1 -1
- package/documents/credential/types.d.ts +4 -4
- package/documents/credential/types.d.ts.map +1 -1
- package/documents/credential/types.js.map +1 -1
- package/documents/credential/verifiable/verifiable.d.ts.map +1 -1
- package/documents/credential/verifiable/verifiable.js +1 -2
- package/documents/credential/verifiable/verifiable.js.map +1 -1
- package/documents/credential/verifiable/with-claims.js +1 -1
- package/documents/credential/verifiable/with-claims.js.map +1 -1
- package/documents/credential.d.ts.map +1 -1
- package/documents/credential.js +1 -5
- package/documents/credential.js.map +1 -1
- package/documents/index.d.ts +0 -1
- package/documents/index.d.ts.map +1 -1
- package/documents/index.js +0 -1
- package/documents/index.js.map +1 -1
- package/documents/models.d.ts +1 -2
- package/documents/models.d.ts.map +1 -1
- package/documents/models.js +5 -3
- package/documents/models.js.map +1 -1
- package/documents/presentation.d.ts.map +1 -1
- package/documents/presentation.js +1 -5
- package/documents/presentation.js.map +1 -1
- package/documents/types.d.ts +2 -3
- package/documents/types.d.ts.map +1 -1
- package/documents/types.js.map +1 -1
- package/middlewares/csrf/csrf.d.ts.map +1 -1
- package/middlewares/csrf/csrf.js +1 -5
- package/middlewares/csrf/csrf.js.map +1 -1
- package/package.json +9 -14
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -31
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts.map +0 -1
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -248
- package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js.map +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -22
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts.map +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -127
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js.map +0 -1
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -32
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts.map +0 -1
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -230
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js.map +0 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -19
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts.map +0 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -60
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js.map +0 -1
- package/documents/utils/stream.d.ts +0 -8
- package/documents/utils/stream.d.ts.map +0 -1
- package/documents/utils/stream.js +0 -50
- package/documents/utils/stream.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/files/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/files/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AACV,cAAc,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/resources/files/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/resources/files/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,6CAA2B","sourcesContent":["export {};\nexport * from './requests';\n"]}
|
|
@@ -10,6 +10,8 @@ export declare namespace Gdpr {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
13
15
|
fetcher?: core.FetchFunction;
|
|
14
16
|
}
|
|
15
17
|
interface RequestOptions {
|
|
@@ -20,7 +22,7 @@ export declare namespace Gdpr {
|
|
|
20
22
|
/** A hook to abort the request. */
|
|
21
23
|
abortSignal?: AbortSignal;
|
|
22
24
|
/** Additional headers to include in the request. */
|
|
23
|
-
headers?: Record<string, string>;
|
|
25
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
24
26
|
}
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/gdpr/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,IAAI,CAAC;IAC1B,UAAiB,OAAO;QACpB,WAAW,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,kBAAkB,GAAG,MAAM,CAAC,CAAC;QACtE,qDAAqD;QACrD,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAChC,MAAM,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;QAC3C,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC;KAChC;IAED,UAAiB,cAAc;QAC3B,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;QAC1B,oDAAoD;QACpD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/gdpr/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,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__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
44
44
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
-
};
|
|
50
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
48
|
exports.Gdpr = void 0;
|
|
52
49
|
const environments = __importStar(require("../../../../environments"));
|
|
53
50
|
const core = __importStar(require("../../../../core"));
|
|
54
51
|
const Truvity = __importStar(require("../../../index"));
|
|
52
|
+
const headers_1 = require("../../../../core/headers");
|
|
55
53
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
57
54
|
const errors = __importStar(require("../../../../errors/index"));
|
|
58
55
|
/**
|
|
59
56
|
* The Truvity's Admin Panel API.
|
|
@@ -84,11 +81,11 @@ class Gdpr {
|
|
|
84
81
|
}
|
|
85
82
|
__supportRequestCreate(request, requestOptions) {
|
|
86
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
-
var _a, _b, _c;
|
|
84
|
+
var _a, _b, _c, _d;
|
|
88
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
89
|
-
url:
|
|
86
|
+
url: core.url.join((_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, 'support-requests'),
|
|
90
87
|
method: 'POST',
|
|
91
|
-
headers:
|
|
88
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
92
89
|
contentType: 'application/json',
|
|
93
90
|
requestType: 'json',
|
|
94
91
|
body: serializers.SupportRequestCreateRequest.jsonOrThrow(request, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../../../src/api/resources/gdpr/client/Client.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uEAAyD;AACzD,uDAAyC;AACzC,wDAA0C;AAC1C,6EAA+D;AAC/D,wDAA+B;AAC/B,iEAAmD;AAuBnD;;GAEG;AACH,MAAa,IAAI;IACb,YAA+B,WAAyB,EAAE;QAA3B,aAAQ,GAAR,QAAQ,CAAmB;IAAG,CAAC;IAE9D;;;;;;;;;;;;;;;;OAgBG;IACI,oBAAoB,CACvB,OAA4C,EAC5C,cAAoC;QAEpC,OAAO,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;IACtG,CAAC;IAEa,sBAAsB,CAChC,OAA4C,EAC5C,cAAoC;;;YAEpC,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,kBAAkB,CACrB;gBACD,MAAM,EAAE,MAAM;gBACd,OAAO,gCACH,iBAAiB,EAAE,YAAY,EAC/B,iBAAiB,EAAE,cAAc,EACjC,oBAAoB,EAAE,Q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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,uDAAuD,CAAC,CAAC;gBAClG,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;AAvID,oBAuIC","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 * as serializers from '../../../../serialization/index';\nimport urlJoin from 'url-join';\nimport * as errors from '../../../../errors/index';\n\nexport declare namespace Gdpr {\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 Truvity's Admin Panel API.\n */\nexport class Gdpr {\n constructor(protected readonly _options: Gdpr.Options = {}) {}\n\n /**\n * Create a request to support.\n *\n * @param {Truvity.SupportRequestCreateRequest} request\n * @param {Gdpr.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.InternalServerError}\n *\n * @example\n * await client.gdpr.supportRequestCreate({\n * message: \"message\",\n * type: \"DATA_DUMP\"\n * })\n */\n public supportRequestCreate(\n request: Truvity.SupportRequestCreateRequest,\n requestOptions?: Gdpr.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(this.__supportRequestCreate(request, requestOptions));\n }\n\n private async __supportRequestCreate(\n request: Truvity.SupportRequestCreateRequest,\n requestOptions?: Gdpr.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\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 'support-requests',\n ),\n method: 'POST',\n headers: {\n 'X-Fern-Language': 'JavaScript',\n 'X-Fern-SDK-Name': '@truvity/sdk',\n 'X-Fern-SDK-Version': '0.37.6',\n 'User-Agent': '@truvity/sdk/0.37.6',\n 'X-Fern-Runtime': core.RUNTIME.type,\n 'X-Fern-Runtime-Version': core.RUNTIME.version,\n ...(await this._getCustomAuthorizationHeaders()),\n ...requestOptions?.headers,\n },\n contentType: 'application/json',\n requestType: 'json',\n body: serializers.SupportRequestCreateRequest.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 { data: undefined, rawResponse: _response.rawResponse };\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 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 POST /support-requests.');\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/gdpr/client/Client.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uEAAyD;AACzD,uDAAyC;AACzC,wDAA0C;AAC1C,sDAAiF;AACjF,6EAA+D;AAC/D,iEAAmD;AAyBnD;;GAEG;AACH,MAAa,IAAI;IAGb,YAAY,WAAyB,EAAE;QACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACI,oBAAoB,CACvB,OAA4C,EAC5C,cAAoC;QAEpC,OAAO,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC;IACtG,CAAC;IAEa,sBAAsB,CAChC,OAA4C,EAC5C,cAAoC;;;YAEpC,MAAM,SAAS,GAAG,MAAM,CAAC,MAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,mCAAI,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC5D,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CACd,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,kBAAkB,CACrB;gBACD,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,IAAA,sBAAY,EACjB,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,EACtB,IAAA,iCAAuB,oBAA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AE,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,uDAAuD,CAAC,CAAC;gBAClG,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;AAtID,oBAsIC","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 { mergeHeaders, mergeOnlyDefinedHeaders } from '../../../../core/headers';\nimport * as serializers from '../../../../serialization/index';\nimport * as errors from '../../../../errors/index';\n\nexport declare namespace Gdpr {\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 /** Additional headers to include in requests. */\n headers?: Record<string, string | core.Supplier<string | undefined> | 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 | core.Supplier<string | undefined> | undefined>;\n }\n}\n\n/**\n * The Truvity's Admin Panel API.\n */\nexport class Gdpr {\n protected readonly _options: Gdpr.Options;\n\n constructor(_options: Gdpr.Options = {}) {\n this._options = _options;\n }\n\n /**\n * Create a request to support.\n *\n * @param {Truvity.SupportRequestCreateRequest} request\n * @param {Gdpr.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.InternalServerError}\n *\n * @example\n * await client.gdpr.supportRequestCreate({\n * message: \"message\",\n * type: \"DATA_DUMP\"\n * })\n */\n public supportRequestCreate(\n request: Truvity.SupportRequestCreateRequest,\n requestOptions?: Gdpr.RequestOptions,\n ): core.HttpResponsePromise<void> {\n return core.HttpResponsePromise.fromPromise(this.__supportRequestCreate(request, requestOptions));\n }\n\n private async __supportRequestCreate(\n request: Truvity.SupportRequestCreateRequest,\n requestOptions?: Gdpr.RequestOptions,\n ): Promise<core.WithRawResponse<void>> {\n const _response = await (this._options.fetcher ?? core.fetcher)({\n url: core.url.join(\n (await core.Supplier.get(this._options.baseUrl)) ??\n (await core.Supplier.get(this._options.environment)) ??\n environments.TruvityEnvironment.Default,\n 'support-requests',\n ),\n method: 'POST',\n headers: mergeHeaders(\n this._options?.headers,\n mergeOnlyDefinedHeaders({ ...(await this._getCustomAuthorizationHeaders()) }),\n requestOptions?.headers,\n ),\n contentType: 'application/json',\n requestType: 'json',\n body: serializers.SupportRequestCreateRequest.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 { data: undefined, rawResponse: _response.rawResponse };\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 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 POST /support-requests.');\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/gdpr/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/gdpr/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AACV,cAAc,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/resources/gdpr/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/resources/gdpr/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,6CAA2B","sourcesContent":["export {};\nexport * from './requests';\n"]}
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
import * as environments from '../../../../environments';
|
|
5
5
|
import * as core from '../../../../core';
|
|
6
6
|
import * as Truvity from '../../../index';
|
|
7
|
-
import * as stream from 'stream';
|
|
8
7
|
export declare namespace Keys {
|
|
9
8
|
interface Options {
|
|
10
9
|
environment?: core.Supplier<environments.TruvityEnvironment | string>;
|
|
11
10
|
/** Specify a custom URL to connect the client to. */
|
|
12
11
|
baseUrl?: core.Supplier<string>;
|
|
13
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
15
|
fetcher?: core.FetchFunction;
|
|
15
16
|
}
|
|
16
17
|
interface RequestOptions {
|
|
@@ -21,7 +22,7 @@ export declare namespace Keys {
|
|
|
21
22
|
/** A hook to abort the request. */
|
|
22
23
|
abortSignal?: AbortSignal;
|
|
23
24
|
/** Additional headers to include in the request. */
|
|
24
|
-
headers?: Record<string, string>;
|
|
25
|
+
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
@@ -248,7 +249,7 @@ export declare class Keys {
|
|
|
248
249
|
* @throws {@link Truvity.TooManyRequestsError}
|
|
249
250
|
* @throws {@link Truvity.InternalServerError}
|
|
250
251
|
*/
|
|
251
|
-
credentialSign(id: string, request: Truvity.CredentialSignRequest, requestOptions?: Keys.RequestOptions): core.HttpResponsePromise<
|
|
252
|
+
credentialSign(id: string, request: Truvity.CredentialSignRequest, requestOptions?: Keys.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
252
253
|
private __credentialSign;
|
|
253
254
|
/**
|
|
254
255
|
* Sign DIDComm Message Plaintext.
|
|
@@ -260,7 +261,7 @@ export declare class Keys {
|
|
|
260
261
|
* @throws {@link Truvity.TooManyRequestsError}
|
|
261
262
|
* @throws {@link Truvity.InternalServerError}
|
|
262
263
|
*/
|
|
263
|
-
didCommMessageSign(id: string, request: Truvity.DidCommMessageSignRequest, requestOptions?: Keys.RequestOptions): core.HttpResponsePromise<
|
|
264
|
+
didCommMessageSign(id: string, request: Truvity.DidCommMessageSignRequest, requestOptions?: Keys.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
264
265
|
private __didCommMessageSign;
|
|
265
266
|
/**
|
|
266
267
|
* Update labels of Key's resource.
|
|
@@ -300,7 +301,7 @@ export declare class Keys {
|
|
|
300
301
|
* @throws {@link Truvity.TooManyRequestsError}
|
|
301
302
|
* @throws {@link Truvity.InternalServerError}
|
|
302
303
|
*/
|
|
303
|
-
presentationSign(id: string, request: Truvity.PresentationSignRequest, requestOptions?: Keys.RequestOptions): core.HttpResponsePromise<
|
|
304
|
+
presentationSign(id: string, request: Truvity.PresentationSignRequest, requestOptions?: Keys.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
304
305
|
private __presentationSign;
|
|
305
306
|
/**
|
|
306
307
|
* Restore Key's resource.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/keys/client/Client.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OAAO,EAAE,OAAO,CAAC,iBAAiB,EAClC,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,GACrC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,iBAAiB,CAAC;YAIxC,YAAY;IAmJ1B;;;;;;;;;;;;;;;;OAgBG;IACI,UAAU,CACb,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,OAAO,CAAC,iBAAsB,EACvC,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,GACrC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,aAAa,CAAC;YAIpC,YAAY;IA8H1B;;;;;;;;;;;;;;;;;OAiBG;IACI,WAAW,CACd,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,OAAO,CAAC,kBAAuB,EACxC,cAAc,CAAC,EAAE,IAAI,CAAC,cAAc,GACrC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,iBAAiB,CAAC;YAIxC,aAAa;cAiIX,8BAA8B;;;CAIjD"}
|
|
@@ -55,16 +55,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
55
55
|
}
|
|
56
56
|
return t;
|
|
57
57
|
};
|
|
58
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
59
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
60
|
-
};
|
|
61
58
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
59
|
exports.Keys = void 0;
|
|
63
60
|
const environments = __importStar(require("../../../../environments"));
|
|
64
61
|
const core = __importStar(require("../../../../core"));
|
|
65
62
|
const Truvity = __importStar(require("../../../index"));
|
|
63
|
+
const headers_1 = require("../../../../core/headers");
|
|
66
64
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
67
|
-
const url_join_1 = __importDefault(require("url-join"));
|
|
68
65
|
const errors = __importStar(require("../../../../errors/index"));
|
|
69
66
|
/**
|
|
70
67
|
* The API to manage cryptographical asymmetrical keys.
|
|
@@ -98,12 +95,12 @@ class Keys {
|
|
|
98
95
|
}
|
|
99
96
|
__keyGenerate(request, requestOptions) {
|
|
100
97
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
var _a, _b, _c;
|
|
98
|
+
var _a, _b, _c, _d;
|
|
102
99
|
const { idempotencyKey } = request, _body = __rest(request, ["idempotencyKey"]);
|
|
103
100
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
104
|
-
url:
|
|
101
|
+
url: core.url.join((_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, 'keys/generate'),
|
|
105
102
|
method: 'POST',
|
|
106
|
-
headers:
|
|
103
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
107
104
|
contentType: 'application/json',
|
|
108
105
|
requestType: 'json',
|
|
109
106
|
body: serializers.KeyGenerateRequest.jsonOrThrow(_body, {
|
|
@@ -294,12 +291,12 @@ class Keys {
|
|
|
294
291
|
}
|
|
295
292
|
__keyImport(request, requestOptions) {
|
|
296
293
|
return __awaiter(this, void 0, void 0, function* () {
|
|
297
|
-
var _a, _b, _c;
|
|
294
|
+
var _a, _b, _c, _d;
|
|
298
295
|
const { idempotencyKey } = request, _body = __rest(request, ["idempotencyKey"]);
|
|
299
296
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
300
|
-
url:
|
|
297
|
+
url: core.url.join((_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, 'keys/import'),
|
|
301
298
|
method: 'POST',
|
|
302
|
-
headers:
|
|
299
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
303
300
|
contentType: 'application/json',
|
|
304
301
|
requestType: 'json',
|
|
305
302
|
body: serializers.KeyImportRequest.jsonOrThrow(_body, {
|
|
@@ -411,11 +408,11 @@ class Keys {
|
|
|
411
408
|
}
|
|
412
409
|
__keySearch() {
|
|
413
410
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
414
|
-
var _a, _b, _c;
|
|
411
|
+
var _a, _b, _c, _d;
|
|
415
412
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
416
|
-
url:
|
|
413
|
+
url: core.url.join((_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, 'keys/search'),
|
|
417
414
|
method: 'POST',
|
|
418
|
-
headers:
|
|
415
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
419
416
|
contentType: 'application/json',
|
|
420
417
|
requestType: 'json',
|
|
421
418
|
body: serializers.KeySearchRequest.jsonOrThrow(request, {
|
|
@@ -528,12 +525,12 @@ class Keys {
|
|
|
528
525
|
}
|
|
529
526
|
__keyLatest(id_1) {
|
|
530
527
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
531
|
-
var _a, _b, _c;
|
|
528
|
+
var _a, _b, _c, _d;
|
|
532
529
|
const { ifNoneMatch } = request;
|
|
533
530
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
534
|
-
url:
|
|
531
|
+
url: core.url.join((_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, `keys/${encodeURIComponent(id)}`),
|
|
535
532
|
method: 'GET',
|
|
536
|
-
headers:
|
|
533
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
537
534
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
538
535
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
539
536
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -645,12 +642,12 @@ class Keys {
|
|
|
645
642
|
}
|
|
646
643
|
__keyDelete(id, request, requestOptions) {
|
|
647
644
|
return __awaiter(this, void 0, void 0, function* () {
|
|
648
|
-
var _a, _b, _c;
|
|
645
|
+
var _a, _b, _c, _d;
|
|
649
646
|
const { idempotencyKey, ifMatch } = request;
|
|
650
647
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
651
|
-
url:
|
|
648
|
+
url: core.url.join((_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, `keys/${encodeURIComponent(id)}`),
|
|
652
649
|
method: 'DELETE',
|
|
653
|
-
headers:
|
|
650
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
654
651
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
655
652
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
656
653
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -772,12 +769,12 @@ class Keys {
|
|
|
772
769
|
}
|
|
773
770
|
__keyUpdateAnnotations(id, request, requestOptions) {
|
|
774
771
|
return __awaiter(this, void 0, void 0, function* () {
|
|
775
|
-
var _a, _b, _c;
|
|
772
|
+
var _a, _b, _c, _d;
|
|
776
773
|
const { idempotencyKey, ifMatch } = request, _body = __rest(request, ["idempotencyKey", "ifMatch"]);
|
|
777
774
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
778
|
-
url:
|
|
775
|
+
url: core.url.join((_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, `keys/${encodeURIComponent(id)}/annotations`),
|
|
779
776
|
method: 'PATCH',
|
|
780
|
-
headers:
|
|
777
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
781
778
|
contentType: 'application/json',
|
|
782
779
|
requestType: 'json',
|
|
783
780
|
body: serializers.KeyUpdateAnnotationsRequest.jsonOrThrow(_body, {
|
|
@@ -904,7 +901,7 @@ class Keys {
|
|
|
904
901
|
}
|
|
905
902
|
__credentialSign(id, request, requestOptions) {
|
|
906
903
|
return __awaiter(this, void 0, void 0, function* () {
|
|
907
|
-
var _a, _b, _c;
|
|
904
|
+
var _a, _b, _c, _d;
|
|
908
905
|
const { didMethod, body: _body } = request;
|
|
909
906
|
const _queryParams = {};
|
|
910
907
|
if (didMethod != null) {
|
|
@@ -914,9 +911,9 @@ class Keys {
|
|
|
914
911
|
});
|
|
915
912
|
}
|
|
916
913
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
917
|
-
url:
|
|
914
|
+
url: core.url.join((_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, `keys/${encodeURIComponent(id)}/credentials/sign`),
|
|
918
915
|
method: 'POST',
|
|
919
|
-
headers:
|
|
916
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
920
917
|
contentType: 'application/json',
|
|
921
918
|
queryParameters: _queryParams,
|
|
922
919
|
requestType: 'json',
|
|
@@ -924,7 +921,7 @@ class Keys {
|
|
|
924
921
|
unrecognizedObjectKeys: 'strip',
|
|
925
922
|
omitUndefined: true,
|
|
926
923
|
}),
|
|
927
|
-
responseType: '
|
|
924
|
+
responseType: 'binary-response',
|
|
928
925
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
929
926
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
930
927
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1023,7 +1020,7 @@ class Keys {
|
|
|
1023
1020
|
}
|
|
1024
1021
|
__didCommMessageSign(id, request, requestOptions) {
|
|
1025
1022
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1026
|
-
var _a, _b, _c;
|
|
1023
|
+
var _a, _b, _c, _d;
|
|
1027
1024
|
const { didMethod, body: _body } = request;
|
|
1028
1025
|
const _queryParams = {};
|
|
1029
1026
|
if (didMethod != null) {
|
|
@@ -1033,9 +1030,9 @@ class Keys {
|
|
|
1033
1030
|
});
|
|
1034
1031
|
}
|
|
1035
1032
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1036
|
-
url:
|
|
1033
|
+
url: core.url.join((_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, `keys/${encodeURIComponent(id)}/didcomm-messages/sign`),
|
|
1037
1034
|
method: 'POST',
|
|
1038
|
-
headers:
|
|
1035
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1039
1036
|
contentType: 'application/json',
|
|
1040
1037
|
queryParameters: _queryParams,
|
|
1041
1038
|
requestType: 'json',
|
|
@@ -1043,7 +1040,7 @@ class Keys {
|
|
|
1043
1040
|
unrecognizedObjectKeys: 'strip',
|
|
1044
1041
|
omitUndefined: true,
|
|
1045
1042
|
}),
|
|
1046
|
-
responseType: '
|
|
1043
|
+
responseType: 'binary-response',
|
|
1047
1044
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1048
1045
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1049
1046
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1158,12 +1155,12 @@ class Keys {
|
|
|
1158
1155
|
}
|
|
1159
1156
|
__keyUpdateLabels(id, request, requestOptions) {
|
|
1160
1157
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1161
|
-
var _a, _b, _c;
|
|
1158
|
+
var _a, _b, _c, _d;
|
|
1162
1159
|
const { idempotencyKey, ifMatch } = request, _body = __rest(request, ["idempotencyKey", "ifMatch"]);
|
|
1163
1160
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1164
|
-
url:
|
|
1161
|
+
url: core.url.join((_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, `keys/${encodeURIComponent(id)}/labels`),
|
|
1165
1162
|
method: 'PATCH',
|
|
1166
|
-
headers:
|
|
1163
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1167
1164
|
contentType: 'application/json',
|
|
1168
1165
|
requestType: 'json',
|
|
1169
1166
|
body: serializers.KeyUpdateLabelsRequest.jsonOrThrow(_body, {
|
|
@@ -1290,7 +1287,7 @@ class Keys {
|
|
|
1290
1287
|
}
|
|
1291
1288
|
__presentationSign(id, request, requestOptions) {
|
|
1292
1289
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1293
|
-
var _a, _b, _c;
|
|
1290
|
+
var _a, _b, _c, _d;
|
|
1294
1291
|
const { didMethod, body: _body } = request;
|
|
1295
1292
|
const _queryParams = {};
|
|
1296
1293
|
if (didMethod != null) {
|
|
@@ -1300,9 +1297,9 @@ class Keys {
|
|
|
1300
1297
|
});
|
|
1301
1298
|
}
|
|
1302
1299
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1303
|
-
url:
|
|
1300
|
+
url: core.url.join((_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, `keys/${encodeURIComponent(id)}/presentations/sign`),
|
|
1304
1301
|
method: 'POST',
|
|
1305
|
-
headers:
|
|
1302
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1306
1303
|
contentType: 'application/json',
|
|
1307
1304
|
queryParameters: _queryParams,
|
|
1308
1305
|
requestType: 'json',
|
|
@@ -1310,7 +1307,7 @@ class Keys {
|
|
|
1310
1307
|
unrecognizedObjectKeys: 'strip',
|
|
1311
1308
|
omitUndefined: true,
|
|
1312
1309
|
}),
|
|
1313
|
-
responseType: '
|
|
1310
|
+
responseType: 'binary-response',
|
|
1314
1311
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1315
1312
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1316
1313
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1421,12 +1418,12 @@ class Keys {
|
|
|
1421
1418
|
}
|
|
1422
1419
|
__keyRestore(id, request, requestOptions) {
|
|
1423
1420
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1424
|
-
var _a, _b, _c;
|
|
1421
|
+
var _a, _b, _c, _d;
|
|
1425
1422
|
const { idempotencyKey, ifMatch } = request;
|
|
1426
1423
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1427
|
-
url:
|
|
1424
|
+
url: core.url.join((_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, `keys/${encodeURIComponent(id)}/restore`),
|
|
1428
1425
|
method: 'POST',
|
|
1429
|
-
headers:
|
|
1426
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1430
1427
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1431
1428
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1432
1429
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1547,12 +1544,12 @@ class Keys {
|
|
|
1547
1544
|
}
|
|
1548
1545
|
__keyHistory(id_1) {
|
|
1549
1546
|
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
1550
|
-
var _a, _b, _c;
|
|
1547
|
+
var _a, _b, _c, _d;
|
|
1551
1548
|
const { ifNoneMatch } = request;
|
|
1552
1549
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1553
|
-
url:
|
|
1550
|
+
url: core.url.join((_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, `keys/${encodeURIComponent(id)}/revisions`),
|
|
1554
1551
|
method: 'GET',
|
|
1555
|
-
headers:
|
|
1552
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1556
1553
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1557
1554
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1558
1555
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -1660,12 +1657,12 @@ class Keys {
|
|
|
1660
1657
|
}
|
|
1661
1658
|
__keyRevision(id_1, revision_1) {
|
|
1662
1659
|
return __awaiter(this, arguments, void 0, function* (id, revision, request = {}, requestOptions) {
|
|
1663
|
-
var _a, _b, _c;
|
|
1660
|
+
var _a, _b, _c, _d;
|
|
1664
1661
|
const { ifNoneMatch } = request;
|
|
1665
1662
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1666
|
-
url:
|
|
1663
|
+
url: core.url.join((_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, `keys/${encodeURIComponent(id)}/revisions/${encodeURIComponent(revision)}`),
|
|
1667
1664
|
method: 'GET',
|
|
1668
|
-
headers:
|
|
1665
|
+
headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1669
1666
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1670
1667
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1671
1668
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|