@apideck/unify 0.37.1 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -3
- package/examples/package-lock.json +3 -3
- package/funcs/proxyDelete.d.ts +30 -0
- package/funcs/proxyDelete.d.ts.map +1 -0
- package/funcs/proxyDelete.js +175 -0
- package/funcs/proxyDelete.js.map +1 -0
- package/funcs/proxyGet.d.ts +30 -0
- package/funcs/proxyGet.d.ts.map +1 -0
- package/funcs/proxyGet.js +175 -0
- package/funcs/proxyGet.js.map +1 -0
- package/funcs/proxyOptions.d.ts +30 -0
- package/funcs/proxyOptions.d.ts.map +1 -0
- package/funcs/proxyOptions.js +175 -0
- package/funcs/proxyOptions.js.map +1 -0
- package/funcs/proxyPatch.d.ts +30 -0
- package/funcs/proxyPatch.d.ts.map +1 -0
- package/funcs/proxyPatch.js +176 -0
- package/funcs/proxyPatch.js.map +1 -0
- package/funcs/proxyPost.d.ts +30 -0
- package/funcs/proxyPost.d.ts.map +1 -0
- package/funcs/proxyPost.js +176 -0
- package/funcs/proxyPost.js.map +1 -0
- package/funcs/proxyPut.d.ts +30 -0
- package/funcs/proxyPut.d.ts.map +1 -0
- package/funcs/proxyPut.js +176 -0
- package/funcs/proxyPut.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/ecommercecustomersfilter.d.ts +15 -0
- package/models/components/ecommercecustomersfilter.d.ts.map +1 -1
- package/models/components/ecommercecustomersfilter.js +6 -0
- package/models/components/ecommercecustomersfilter.js.map +1 -1
- package/models/components/project.d.ts +11 -2
- package/models/components/project.d.ts.map +1 -1
- package/models/components/project.js +4 -0
- package/models/components/project.js.map +1 -1
- package/models/components/projectsfilter.d.ts +3 -0
- package/models/components/projectsfilter.d.ts.map +1 -1
- package/models/components/projectsfilter.js +3 -0
- package/models/components/projectsfilter.js.map +1 -1
- package/models/errors/badrequestresponse.d.ts +25 -0
- package/models/errors/badrequestresponse.d.ts.map +1 -1
- package/models/errors/badrequestresponse.js +16 -1
- package/models/errors/badrequestresponse.js.map +1 -1
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/unauthorized.d.ts +142 -0
- package/models/errors/unauthorized.d.ts.map +1 -0
- package/models/errors/unauthorized.js +139 -0
- package/models/errors/unauthorized.js.map +1 -0
- package/models/operations/index.d.ts +6 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +6 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/proxydeleteproxy.d.ts +103 -0
- package/models/operations/proxydeleteproxy.d.ts.map +1 -0
- package/models/operations/proxydeleteproxy.js +80 -0
- package/models/operations/proxydeleteproxy.js.map +1 -0
- package/models/operations/proxygetproxy.d.ts +103 -0
- package/models/operations/proxygetproxy.d.ts.map +1 -0
- package/models/operations/proxygetproxy.js +80 -0
- package/models/operations/proxygetproxy.js.map +1 -0
- package/models/operations/proxyoptionsproxy.d.ts +103 -0
- package/models/operations/proxyoptionsproxy.d.ts.map +1 -0
- package/models/operations/proxyoptionsproxy.js +80 -0
- package/models/operations/proxyoptionsproxy.js.map +1 -0
- package/models/operations/proxypatchproxy.d.ts +120 -0
- package/models/operations/proxypatchproxy.d.ts.map +1 -0
- package/models/operations/proxypatchproxy.js +102 -0
- package/models/operations/proxypatchproxy.js.map +1 -0
- package/models/operations/proxypostproxy.d.ts +120 -0
- package/models/operations/proxypostproxy.d.ts.map +1 -0
- package/models/operations/proxypostproxy.js +103 -0
- package/models/operations/proxypostproxy.js.map +1 -0
- package/models/operations/proxyputproxy.d.ts +120 -0
- package/models/operations/proxyputproxy.d.ts.map +1 -0
- package/models/operations/proxyputproxy.js +102 -0
- package/models/operations/proxyputproxy.js.map +1 -0
- package/package.json +3 -3
- package/sdk/proxy.d.ts +77 -0
- package/sdk/proxy.d.ts.map +1 -0
- package/sdk/proxy.js +90 -0
- package/sdk/proxy.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/__tests__/projects.test.ts +3 -0
- package/src/__tests__/proxy.test.ts +41 -0
- package/src/funcs/proxyDelete.ts +258 -0
- package/src/funcs/proxyGet.ts +258 -0
- package/src/funcs/proxyOptions.ts +258 -0
- package/src/funcs/proxyPatch.ts +259 -0
- package/src/funcs/proxyPost.ts +259 -0
- package/src/funcs/proxyPut.ts +259 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/ecommercecustomersfilter.ts +21 -0
- package/src/models/components/project.ts +17 -2
- package/src/models/components/projectsfilter.ts +3 -0
- package/src/models/errors/badrequestresponse.ts +51 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/unauthorized.ts +282 -0
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/proxydeleteproxy.ts +158 -0
- package/src/models/operations/proxygetproxy.ts +158 -0
- package/src/models/operations/proxyoptionsproxy.ts +158 -0
- package/src/models/operations/proxypatchproxy.ts +227 -0
- package/src/models/operations/proxypostproxy.ts +212 -0
- package/src/models/operations/proxyputproxy.ts +215 -0
- package/src/sdk/proxy.ts +135 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/types/smartUnion.ts +8 -0
- package/types/smartUnion.js +7 -0
- package/types/smartUnion.js.map +1 -1
package/sdk/proxy.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { DeleteAcceptEnum } from "../funcs/proxyDelete.js";
|
|
2
|
+
import { GetAcceptEnum } from "../funcs/proxyGet.js";
|
|
3
|
+
import { OptionsAcceptEnum } from "../funcs/proxyOptions.js";
|
|
4
|
+
import { PatchAcceptEnum } from "../funcs/proxyPatch.js";
|
|
5
|
+
import { PostAcceptEnum } from "../funcs/proxyPost.js";
|
|
6
|
+
import { PutAcceptEnum } from "../funcs/proxyPut.js";
|
|
7
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
export { GetAcceptEnum } from "../funcs/proxyGet.js";
|
|
10
|
+
export { OptionsAcceptEnum } from "../funcs/proxyOptions.js";
|
|
11
|
+
export { PostAcceptEnum } from "../funcs/proxyPost.js";
|
|
12
|
+
export { PutAcceptEnum } from "../funcs/proxyPut.js";
|
|
13
|
+
export { PatchAcceptEnum } from "../funcs/proxyPatch.js";
|
|
14
|
+
export { DeleteAcceptEnum } from "../funcs/proxyDelete.js";
|
|
15
|
+
export declare class Proxy extends ClientSDK {
|
|
16
|
+
/**
|
|
17
|
+
* GET
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Proxies a downstream GET request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
21
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
22
|
+
*/
|
|
23
|
+
get(request: operations.ProxyGetProxyRequest, options?: RequestOptions & {
|
|
24
|
+
acceptHeaderOverride?: GetAcceptEnum;
|
|
25
|
+
}): Promise<operations.ProxyGetProxyResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* OPTIONS
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Proxies a downstream OPTION request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
31
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
32
|
+
*/
|
|
33
|
+
options(request: operations.ProxyOptionsProxyRequest, options?: RequestOptions & {
|
|
34
|
+
acceptHeaderOverride?: OptionsAcceptEnum;
|
|
35
|
+
}): Promise<operations.ProxyOptionsProxyResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* POST
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Proxies a downstream POST request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
41
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
42
|
+
*/
|
|
43
|
+
post(request: operations.ProxyPostProxyRequest, options?: RequestOptions & {
|
|
44
|
+
acceptHeaderOverride?: PostAcceptEnum;
|
|
45
|
+
}): Promise<operations.ProxyPostProxyResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* PUT
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* Proxies a downstream PUT request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
51
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
52
|
+
*/
|
|
53
|
+
put(request: operations.ProxyPutProxyRequest, options?: RequestOptions & {
|
|
54
|
+
acceptHeaderOverride?: PutAcceptEnum;
|
|
55
|
+
}): Promise<operations.ProxyPutProxyResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* PATCH
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* Proxies a downstream PATCH request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
61
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
62
|
+
*/
|
|
63
|
+
patch(request: operations.ProxyPatchProxyRequest, options?: RequestOptions & {
|
|
64
|
+
acceptHeaderOverride?: PatchAcceptEnum;
|
|
65
|
+
}): Promise<operations.ProxyPatchProxyResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* DELETE
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* Proxies a downstream DELETE request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
71
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
72
|
+
*/
|
|
73
|
+
delete(request: operations.ProxyDeleteProxyRequest, options?: RequestOptions & {
|
|
74
|
+
acceptHeaderOverride?: DeleteAcceptEnum;
|
|
75
|
+
}): Promise<operations.ProxyDeleteProxyResponse>;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../src/sdk/proxy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAe,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,aAAa,EAAY,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAgB,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAc,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAa,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAY,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,qBAAa,KAAM,SAAQ,SAAS;IAClC;;;;;;OAMG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GAAG;QAAE,oBAAoB,CAAC,EAAE,aAAa,CAAA;KAAE,GAClE,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;OAMG;IACG,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GAAG;QAAE,oBAAoB,CAAC,EAAE,iBAAiB,CAAA;KAAE,GACtE,OAAO,CAAC,UAAU,CAAC,yBAAyB,CAAC;IAQhD;;;;;;OAMG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GAAG;QAAE,oBAAoB,CAAC,EAAE,cAAc,CAAA;KAAE,GACnE,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAQ7C;;;;;;OAMG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GAAG;QAAE,oBAAoB,CAAC,EAAE,aAAa,CAAA;KAAE,GAClE,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;OAMG;IACG,KAAK,CACT,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GAAG;QAAE,oBAAoB,CAAC,EAAE,eAAe,CAAA;KAAE,GACpE,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;IAQ9C;;;;;;OAMG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GAAG;QAAE,oBAAoB,CAAC,EAAE,gBAAgB,CAAA;KAAE,GACrE,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC;CAOhD"}
|
package/sdk/proxy.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Proxy = exports.DeleteAcceptEnum = exports.PatchAcceptEnum = exports.PutAcceptEnum = exports.PostAcceptEnum = exports.OptionsAcceptEnum = exports.GetAcceptEnum = void 0;
|
|
7
|
+
const proxyDelete_js_1 = require("../funcs/proxyDelete.js");
|
|
8
|
+
const proxyGet_js_1 = require("../funcs/proxyGet.js");
|
|
9
|
+
const proxyOptions_js_1 = require("../funcs/proxyOptions.js");
|
|
10
|
+
const proxyPatch_js_1 = require("../funcs/proxyPatch.js");
|
|
11
|
+
const proxyPost_js_1 = require("../funcs/proxyPost.js");
|
|
12
|
+
const proxyPut_js_1 = require("../funcs/proxyPut.js");
|
|
13
|
+
const sdks_js_1 = require("../lib/sdks.js");
|
|
14
|
+
const fp_js_1 = require("../types/fp.js");
|
|
15
|
+
var proxyGet_js_2 = require("../funcs/proxyGet.js");
|
|
16
|
+
Object.defineProperty(exports, "GetAcceptEnum", { enumerable: true, get: function () { return proxyGet_js_2.GetAcceptEnum; } });
|
|
17
|
+
var proxyOptions_js_2 = require("../funcs/proxyOptions.js");
|
|
18
|
+
Object.defineProperty(exports, "OptionsAcceptEnum", { enumerable: true, get: function () { return proxyOptions_js_2.OptionsAcceptEnum; } });
|
|
19
|
+
var proxyPost_js_2 = require("../funcs/proxyPost.js");
|
|
20
|
+
Object.defineProperty(exports, "PostAcceptEnum", { enumerable: true, get: function () { return proxyPost_js_2.PostAcceptEnum; } });
|
|
21
|
+
var proxyPut_js_2 = require("../funcs/proxyPut.js");
|
|
22
|
+
Object.defineProperty(exports, "PutAcceptEnum", { enumerable: true, get: function () { return proxyPut_js_2.PutAcceptEnum; } });
|
|
23
|
+
var proxyPatch_js_2 = require("../funcs/proxyPatch.js");
|
|
24
|
+
Object.defineProperty(exports, "PatchAcceptEnum", { enumerable: true, get: function () { return proxyPatch_js_2.PatchAcceptEnum; } });
|
|
25
|
+
var proxyDelete_js_2 = require("../funcs/proxyDelete.js");
|
|
26
|
+
Object.defineProperty(exports, "DeleteAcceptEnum", { enumerable: true, get: function () { return proxyDelete_js_2.DeleteAcceptEnum; } });
|
|
27
|
+
class Proxy extends sdks_js_1.ClientSDK {
|
|
28
|
+
/**
|
|
29
|
+
* GET
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Proxies a downstream GET request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
33
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
34
|
+
*/
|
|
35
|
+
async get(request, options) {
|
|
36
|
+
return (0, fp_js_1.unwrapAsync)((0, proxyGet_js_1.proxyGet)(this, request, options));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* OPTIONS
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Proxies a downstream OPTION request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
43
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
44
|
+
*/
|
|
45
|
+
async options(request, options) {
|
|
46
|
+
return (0, fp_js_1.unwrapAsync)((0, proxyOptions_js_1.proxyOptions)(this, request, options));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* POST
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* Proxies a downstream POST request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
53
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
54
|
+
*/
|
|
55
|
+
async post(request, options) {
|
|
56
|
+
return (0, fp_js_1.unwrapAsync)((0, proxyPost_js_1.proxyPost)(this, request, options));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* PUT
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Proxies a downstream PUT request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
63
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
64
|
+
*/
|
|
65
|
+
async put(request, options) {
|
|
66
|
+
return (0, fp_js_1.unwrapAsync)((0, proxyPut_js_1.proxyPut)(this, request, options));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* PATCH
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* Proxies a downstream PATCH request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
73
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
74
|
+
*/
|
|
75
|
+
async patch(request, options) {
|
|
76
|
+
return (0, fp_js_1.unwrapAsync)((0, proxyPatch_js_1.proxyPatch)(this, request, options));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* DELETE
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* Proxies a downstream DELETE request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
83
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
84
|
+
*/
|
|
85
|
+
async delete(request, options) {
|
|
86
|
+
return (0, fp_js_1.unwrapAsync)((0, proxyDelete_js_1.proxyDelete)(this, request, options));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.Proxy = Proxy;
|
|
90
|
+
//# sourceMappingURL=proxy.js.map
|
package/sdk/proxy.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../src/sdk/proxy.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4DAAwE;AACxE,sDAA+D;AAC/D,8DAA2E;AAC3E,0DAAqE;AACrE,wDAAkE;AAClE,sDAA+D;AAC/D,4CAA2D;AAE3D,0CAA6C;AAE7C,oDAAqD;AAA5C,4GAAA,aAAa,OAAA;AAEtB,4DAA6D;AAApD,oHAAA,iBAAiB,O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ACR,CAAC,CAAC;IACL,CAAC;CACF;AA5GD,sBA4GC"}
|
package/sdk/sdk.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { Ecommerce } from "./ecommerce.js";
|
|
|
7
7
|
import { FileStorage } from "./filestorage.js";
|
|
8
8
|
import { Hris } from "./hris.js";
|
|
9
9
|
import { IssueTracking } from "./issuetracking.js";
|
|
10
|
+
import { Proxy } from "./proxy.js";
|
|
10
11
|
import { Sms } from "./sms.js";
|
|
11
12
|
import { Vault } from "./vault.js";
|
|
12
13
|
import { Webhook } from "./webhook.js";
|
|
@@ -29,6 +30,8 @@ export declare class Apideck extends ClientSDK {
|
|
|
29
30
|
get issueTracking(): IssueTracking;
|
|
30
31
|
private _connector?;
|
|
31
32
|
get connector(): Connector;
|
|
33
|
+
private _proxy?;
|
|
34
|
+
get proxy(): Proxy;
|
|
32
35
|
private _vault?;
|
|
33
36
|
get vault(): Vault;
|
|
34
37
|
private _webhook?;
|
package/sdk/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/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AAI,KAAK,IAAI,KAAK,CAEjB;IAED,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,IAAI,OAAO,IAAI,OAAO,CAErB;CACF"}
|
package/sdk/sdk.js
CHANGED
|
@@ -13,6 +13,7 @@ const ecommerce_js_1 = require("./ecommerce.js");
|
|
|
13
13
|
const filestorage_js_1 = require("./filestorage.js");
|
|
14
14
|
const hris_js_1 = require("./hris.js");
|
|
15
15
|
const issuetracking_js_1 = require("./issuetracking.js");
|
|
16
|
+
const proxy_js_1 = require("./proxy.js");
|
|
16
17
|
const sms_js_1 = require("./sms.js");
|
|
17
18
|
const vault_js_1 = require("./vault.js");
|
|
18
19
|
const webhook_js_1 = require("./webhook.js");
|
|
@@ -44,6 +45,9 @@ class Apideck extends sdks_js_1.ClientSDK {
|
|
|
44
45
|
get connector() {
|
|
45
46
|
return (this._connector ?? (this._connector = new connector_js_1.Connector(this._options)));
|
|
46
47
|
}
|
|
48
|
+
get proxy() {
|
|
49
|
+
return (this._proxy ?? (this._proxy = new proxy_js_1.Proxy(this._options)));
|
|
50
|
+
}
|
|
47
51
|
get vault() {
|
|
48
52
|
return (this._vault ?? (this._vault = new vault_js_1.Vault(this._options)));
|
|
49
53
|
}
|
package/sdk/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,mDAA6C;AAC7C,qCAA+B;AAC/B,iDAA2C;AAC3C,qCAA+B;AAC/B,iDAA2C;AAC3C,qDAA+C;AAC/C,uCAAiC;AACjC,yDAAmD;AACnD,qCAA+B;AAC/B,yCAAmC;AACnC,6CAAuC;AAEvC,MAAa,OAAQ,SAAQ,mBAAS;IAEpC,IAAI,UAAU;QACZ,OAAO,CAAC,IAAI,CAAC,WAAW,KAAhB,IAAI,CAAC,WAAW,GAAK,IAAI,0BAAU,CAAC,IAAI,CAAC,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,CAAC;IACxD,CAAC;CACF;AA5DD,0BA4DC"}
|
|
@@ -86,6 +86,7 @@ test("Projects Accounting Projects Add", async () => {
|
|
|
86
86
|
completionPercentage: 75.5,
|
|
87
87
|
startDate: new Date("2024-01-15"),
|
|
88
88
|
endDate: new Date("2024-06-30"),
|
|
89
|
+
completionDate: new Date("2024-08-06"),
|
|
89
90
|
customer: {
|
|
90
91
|
id: "12345",
|
|
91
92
|
displayName: "Windsurf Shop",
|
|
@@ -223,6 +224,7 @@ test("Projects Accounting Projects One", async () => {
|
|
|
223
224
|
completionPercentage: 75.5,
|
|
224
225
|
startDate: new Date("2024-01-15"),
|
|
225
226
|
endDate: new Date("2024-06-30"),
|
|
227
|
+
completionDate: new Date("2024-08-06"),
|
|
226
228
|
customer: {
|
|
227
229
|
id: "12345",
|
|
228
230
|
displayId: "CUST00101",
|
|
@@ -347,6 +349,7 @@ test("Projects Accounting Projects Update", async () => {
|
|
|
347
349
|
completionPercentage: 75.5,
|
|
348
350
|
startDate: new Date("2024-01-15"),
|
|
349
351
|
endDate: new Date("2024-06-30"),
|
|
352
|
+
completionDate: new Date("2024-08-06"),
|
|
350
353
|
customer: null,
|
|
351
354
|
department: {
|
|
352
355
|
id: "DEPT-001",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { assert, it } from "vitest";
|
|
6
|
+
|
|
7
|
+
it.skip("Proxy Proxy Get Proxy", async () => {
|
|
8
|
+
assert.fail(
|
|
9
|
+
"incomplete test found please make sure to address the following errors: [`workflow step proxy.getProxy.test referencing operation proxy.getProxy missing required header parameter serviceId`, `workflow step proxy.getProxy.test referencing operation proxy.getProxy missing required header parameter downstreamUrl`]",
|
|
10
|
+
);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it.skip("Proxy Proxy Options Proxy", async () => {
|
|
14
|
+
assert.fail(
|
|
15
|
+
"incomplete test found please make sure to address the following errors: [`workflow step proxy.optionsProxy.test referencing operation proxy.optionsProxy missing required header parameter serviceId`, `workflow step proxy.optionsProxy.test referencing operation proxy.optionsProxy missing required header parameter downstreamUrl`]",
|
|
16
|
+
);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it.skip("Proxy Proxy Post Proxy", async () => {
|
|
20
|
+
assert.fail(
|
|
21
|
+
"incomplete test found please make sure to address the following errors: [`workflow step proxy.postProxy.test referencing operation proxy.postProxy missing required header parameter serviceId`, `workflow step proxy.postProxy.test referencing operation proxy.postProxy missing required header parameter downstreamUrl`]",
|
|
22
|
+
);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it.skip("Proxy Proxy Put Proxy", async () => {
|
|
26
|
+
assert.fail(
|
|
27
|
+
"incomplete test found please make sure to address the following errors: [`workflow step proxy.putProxy.test referencing operation proxy.putProxy missing required header parameter serviceId`, `workflow step proxy.putProxy.test referencing operation proxy.putProxy missing required header parameter downstreamUrl`]",
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it.skip("Proxy Proxy Patch Proxy", async () => {
|
|
32
|
+
assert.fail(
|
|
33
|
+
"incomplete test found please make sure to address the following errors: [`workflow step proxy.patchProxy.test referencing operation proxy.patchProxy missing required header parameter serviceId`, `workflow step proxy.patchProxy.test referencing operation proxy.patchProxy missing required header parameter downstreamUrl`]",
|
|
34
|
+
);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it.skip("Proxy Proxy Delete Proxy", async () => {
|
|
38
|
+
assert.fail(
|
|
39
|
+
"incomplete test found please make sure to address the following errors: [`workflow step proxy.deleteProxy.test referencing operation proxy.deleteProxy missing required header parameter serviceId`, `workflow step proxy.deleteProxy.test referencing operation proxy.deleteProxy missing required header parameter downstreamUrl`]",
|
|
40
|
+
);
|
|
41
|
+
});
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { ApideckCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import { ApideckError } from "../models/errors/apideckerror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
export enum DeleteAcceptEnum {
|
|
29
|
+
applicationJson = "application/json",
|
|
30
|
+
textCsv = "text/csv",
|
|
31
|
+
textPlain = "text/plain",
|
|
32
|
+
applicationOctetStream = "application/octet-stream",
|
|
33
|
+
applicationPdf = "application/pdf",
|
|
34
|
+
applicationXml = "application/xml",
|
|
35
|
+
textHtml = "text/html",
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* DELETE
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Proxies a downstream DELETE request to a service and injects the necessary credentials into a request stored in Vault. This allows you to have an additional security layer and logging without needing to rely on Unify for normalization.
|
|
43
|
+
* **Note**: Vault will proxy all data to the downstream URL and method/verb in the headers.
|
|
44
|
+
*/
|
|
45
|
+
export function proxyDelete(
|
|
46
|
+
client: ApideckCore,
|
|
47
|
+
request: operations.ProxyDeleteProxyRequest,
|
|
48
|
+
options?: RequestOptions & { acceptHeaderOverride?: DeleteAcceptEnum },
|
|
49
|
+
): APIPromise<
|
|
50
|
+
Result<
|
|
51
|
+
operations.ProxyDeleteProxyResponse,
|
|
52
|
+
| errors.Unauthorized
|
|
53
|
+
| ApideckError
|
|
54
|
+
| ResponseValidationError
|
|
55
|
+
| ConnectionError
|
|
56
|
+
| RequestAbortedError
|
|
57
|
+
| RequestTimeoutError
|
|
58
|
+
| InvalidRequestError
|
|
59
|
+
| UnexpectedClientError
|
|
60
|
+
| SDKValidationError
|
|
61
|
+
>
|
|
62
|
+
> {
|
|
63
|
+
return new APIPromise($do(
|
|
64
|
+
client,
|
|
65
|
+
request,
|
|
66
|
+
options,
|
|
67
|
+
));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function $do(
|
|
71
|
+
client: ApideckCore,
|
|
72
|
+
request: operations.ProxyDeleteProxyRequest,
|
|
73
|
+
options?: RequestOptions & { acceptHeaderOverride?: DeleteAcceptEnum },
|
|
74
|
+
): Promise<
|
|
75
|
+
[
|
|
76
|
+
Result<
|
|
77
|
+
operations.ProxyDeleteProxyResponse,
|
|
78
|
+
| errors.Unauthorized
|
|
79
|
+
| ApideckError
|
|
80
|
+
| ResponseValidationError
|
|
81
|
+
| ConnectionError
|
|
82
|
+
| RequestAbortedError
|
|
83
|
+
| RequestTimeoutError
|
|
84
|
+
| InvalidRequestError
|
|
85
|
+
| UnexpectedClientError
|
|
86
|
+
| SDKValidationError
|
|
87
|
+
>,
|
|
88
|
+
APICall,
|
|
89
|
+
]
|
|
90
|
+
> {
|
|
91
|
+
const parsed = safeParse(
|
|
92
|
+
request,
|
|
93
|
+
(value) => operations.ProxyDeleteProxyRequest$outboundSchema.parse(value),
|
|
94
|
+
"Input validation failed",
|
|
95
|
+
);
|
|
96
|
+
if (!parsed.ok) {
|
|
97
|
+
return [parsed, { status: "invalid" }];
|
|
98
|
+
}
|
|
99
|
+
const payload = parsed.value;
|
|
100
|
+
const body = null;
|
|
101
|
+
|
|
102
|
+
const path = pathToFunc("/proxy")();
|
|
103
|
+
|
|
104
|
+
const headers = new Headers(compactMap({
|
|
105
|
+
Accept: options?.acceptHeaderOverride
|
|
106
|
+
|| "application/json;q=1, text/csv;q=0.9, text/plain;q=0.7, application/octet-stream;q=0.6, application/pdf;q=0.4, application/xml;q=0.3, text/html;q=0",
|
|
107
|
+
"x-apideck-app-id": encodeSimple(
|
|
108
|
+
"x-apideck-app-id",
|
|
109
|
+
payload.appId ?? client._options.appId,
|
|
110
|
+
{ explode: false, charEncoding: "none" },
|
|
111
|
+
),
|
|
112
|
+
"x-apideck-consumer-id": encodeSimple(
|
|
113
|
+
"x-apideck-consumer-id",
|
|
114
|
+
payload.consumerId ?? client._options.consumerId,
|
|
115
|
+
{ explode: false, charEncoding: "none" },
|
|
116
|
+
),
|
|
117
|
+
"x-apideck-downstream-authorization": encodeSimple(
|
|
118
|
+
"x-apideck-downstream-authorization",
|
|
119
|
+
payload.downstreamAuthorization,
|
|
120
|
+
{ explode: false, charEncoding: "none" },
|
|
121
|
+
),
|
|
122
|
+
"x-apideck-downstream-url": encodeSimple(
|
|
123
|
+
"x-apideck-downstream-url",
|
|
124
|
+
payload.downstreamUrl,
|
|
125
|
+
{ explode: false, charEncoding: "none" },
|
|
126
|
+
),
|
|
127
|
+
"x-apideck-service-id": encodeSimple(
|
|
128
|
+
"x-apideck-service-id",
|
|
129
|
+
payload.serviceId,
|
|
130
|
+
{ explode: false, charEncoding: "none" },
|
|
131
|
+
),
|
|
132
|
+
"x-apideck-unified-api": encodeSimple(
|
|
133
|
+
"x-apideck-unified-api",
|
|
134
|
+
payload.unifiedApi,
|
|
135
|
+
{ explode: false, charEncoding: "none" },
|
|
136
|
+
),
|
|
137
|
+
}));
|
|
138
|
+
|
|
139
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
140
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
141
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
142
|
+
|
|
143
|
+
const context = {
|
|
144
|
+
options: client._options,
|
|
145
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
146
|
+
operationID: "proxy.deleteProxy",
|
|
147
|
+
oAuth2Scopes: null,
|
|
148
|
+
|
|
149
|
+
resolvedSecurity: requestSecurity,
|
|
150
|
+
|
|
151
|
+
securitySource: client._options.apiKey,
|
|
152
|
+
retryConfig: options?.retries
|
|
153
|
+
|| client._options.retryConfig
|
|
154
|
+
|| {
|
|
155
|
+
strategy: "backoff",
|
|
156
|
+
backoff: {
|
|
157
|
+
initialInterval: 500,
|
|
158
|
+
maxInterval: 60000,
|
|
159
|
+
exponent: 1.5,
|
|
160
|
+
maxElapsedTime: 900000,
|
|
161
|
+
},
|
|
162
|
+
retryConnectionErrors: true,
|
|
163
|
+
}
|
|
164
|
+
|| { strategy: "none" },
|
|
165
|
+
retryCodes: options?.retryCodes || ["408", "500", "502", "503", "504"],
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
const requestRes = client._createRequest(context, {
|
|
169
|
+
security: requestSecurity,
|
|
170
|
+
method: "DELETE",
|
|
171
|
+
baseURL: options?.serverURL,
|
|
172
|
+
path: path,
|
|
173
|
+
headers: headers,
|
|
174
|
+
body: body,
|
|
175
|
+
userAgent: client._options.userAgent,
|
|
176
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
177
|
+
}, options);
|
|
178
|
+
if (!requestRes.ok) {
|
|
179
|
+
return [requestRes, { status: "invalid" }];
|
|
180
|
+
}
|
|
181
|
+
const req = requestRes.value;
|
|
182
|
+
|
|
183
|
+
const doResult = await client._do(req, {
|
|
184
|
+
context,
|
|
185
|
+
errorCodes: ["401", "4XX", "5XX"],
|
|
186
|
+
retryConfig: context.retryConfig,
|
|
187
|
+
retryCodes: context.retryCodes,
|
|
188
|
+
});
|
|
189
|
+
if (!doResult.ok) {
|
|
190
|
+
return [doResult, { status: "request-error", request: req }];
|
|
191
|
+
}
|
|
192
|
+
const response = doResult.value;
|
|
193
|
+
|
|
194
|
+
const responseFields = {
|
|
195
|
+
HttpMeta: { Response: response, Request: req },
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const [result] = await M.match<
|
|
199
|
+
operations.ProxyDeleteProxyResponse,
|
|
200
|
+
| errors.Unauthorized
|
|
201
|
+
| ApideckError
|
|
202
|
+
| ResponseValidationError
|
|
203
|
+
| ConnectionError
|
|
204
|
+
| RequestAbortedError
|
|
205
|
+
| RequestTimeoutError
|
|
206
|
+
| InvalidRequestError
|
|
207
|
+
| UnexpectedClientError
|
|
208
|
+
| SDKValidationError
|
|
209
|
+
>(
|
|
210
|
+
M.json(200, operations.ProxyDeleteProxyResponse$inboundSchema, {
|
|
211
|
+
key: "responseJson",
|
|
212
|
+
}),
|
|
213
|
+
M.stream(200, operations.ProxyDeleteProxyResponse$inboundSchema, {
|
|
214
|
+
key: "responseBinary",
|
|
215
|
+
}),
|
|
216
|
+
M.stream(200, operations.ProxyDeleteProxyResponse$inboundSchema, {
|
|
217
|
+
ctype: "application/pdf",
|
|
218
|
+
key: "responsePdf",
|
|
219
|
+
}),
|
|
220
|
+
M.text(200, operations.ProxyDeleteProxyResponse$inboundSchema, {
|
|
221
|
+
ctype: "application/xml",
|
|
222
|
+
key: "responseXml",
|
|
223
|
+
}),
|
|
224
|
+
M.text(200, operations.ProxyDeleteProxyResponse$inboundSchema, {
|
|
225
|
+
ctype: "text/csv",
|
|
226
|
+
key: "responseCsv",
|
|
227
|
+
}),
|
|
228
|
+
M.text(200, operations.ProxyDeleteProxyResponse$inboundSchema, {
|
|
229
|
+
key: "responseText",
|
|
230
|
+
}),
|
|
231
|
+
M.jsonErr(401, errors.Unauthorized$inboundSchema),
|
|
232
|
+
M.fail("4XX"),
|
|
233
|
+
M.fail("5XX"),
|
|
234
|
+
M.json("default", operations.ProxyDeleteProxyResponse$inboundSchema, {
|
|
235
|
+
hdrs: true,
|
|
236
|
+
key: "errorJson",
|
|
237
|
+
}),
|
|
238
|
+
M.text("default", operations.ProxyDeleteProxyResponse$inboundSchema, {
|
|
239
|
+
ctype: "application/xml",
|
|
240
|
+
hdrs: true,
|
|
241
|
+
key: "errorXml",
|
|
242
|
+
}),
|
|
243
|
+
M.text("default", operations.ProxyDeleteProxyResponse$inboundSchema, {
|
|
244
|
+
ctype: "text/html",
|
|
245
|
+
hdrs: true,
|
|
246
|
+
key: "errorHtml",
|
|
247
|
+
}),
|
|
248
|
+
M.text("default", operations.ProxyDeleteProxyResponse$inboundSchema, {
|
|
249
|
+
hdrs: true,
|
|
250
|
+
key: "errorText",
|
|
251
|
+
}),
|
|
252
|
+
)(response, req, { extraFields: responseFields });
|
|
253
|
+
if (!result.ok) {
|
|
254
|
+
return [result, { status: "complete", request: req, response }];
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
return [result, { status: "complete", request: req, response }];
|
|
258
|
+
}
|