@financeable/aggregation 0.3.5 → 0.4.5
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/FUNCTIONS.md +119 -6
- package/README.md +972 -619
- package/docs/sdks/applications/README.md +16 -14
- package/docs/sdks/financeable/README.md +0 -84
- package/docs/sdks/oauthtoken/README.md +90 -0
- package/funcs/applicationsCreate.d.ts +1 -1
- package/funcs/applicationsCreate.d.ts.map +1 -1
- package/funcs/applicationsCreate.js +1 -1
- package/funcs/applicationsCreate.js.map +1 -1
- package/funcs/applicationsGet.d.ts +1 -1
- package/funcs/applicationsGet.d.ts.map +1 -1
- package/funcs/applicationsGet.js +1 -1
- package/funcs/applicationsGet.js.map +1 -1
- package/funcs/applicationsList.d.ts +1 -1
- package/funcs/applicationsList.d.ts.map +1 -1
- package/funcs/applicationsList.js +1 -1
- package/funcs/applicationsList.js.map +1 -1
- package/funcs/{getToken.d.ts → oauthTokenGet.d.ts} +2 -2
- package/funcs/oauthTokenGet.d.ts.map +1 -0
- package/funcs/{getToken.js → oauthTokenGet.js} +3 -3
- package/funcs/oauthTokenGet.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +7 -7
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +4 -4
- package/lib/files.js.map +1 -1
- package/lib/primitives.d.ts +3 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +7 -0
- package/lib/primitives.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +2 -8
- package/lib/sdks.js.map +1 -1
- package/models/components/assetattributes.d.ts +17 -94
- package/models/components/assetattributes.d.ts.map +1 -1
- package/models/components/assetattributes.js +27 -37
- package/models/components/assetattributes.js.map +1 -1
- package/models/components/commercialassettype.d.ts +44 -0
- package/models/components/commercialassettype.d.ts.map +1 -0
- package/models/components/commercialassettype.js +85 -0
- package/models/components/commercialassettype.js.map +1 -0
- package/models/components/consumerassettype.d.ts +32 -0
- package/models/components/consumerassettype.d.ts.map +1 -0
- package/models/components/consumerassettype.js +73 -0
- package/models/components/consumerassettype.js.map +1 -0
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/errors/index.d.ts +1 -3
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -3
- package/models/errors/index.js.map +1 -1
- package/models/errors/responsebody.d.ts +38 -0
- package/models/errors/responsebody.d.ts.map +1 -0
- package/models/errors/{getapplication.js → responsebody.js} +15 -15
- package/models/errors/responsebody.js.map +1 -0
- package/package.json +1 -1
- package/sdk/oauthtoken.d.ts +9 -0
- package/sdk/oauthtoken.d.ts.map +1 -0
- package/sdk/oauthtoken.js +19 -0
- package/sdk/oauthtoken.js.map +1 -0
- package/sdk/sdk.d.ts +4 -6
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +3 -7
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/applicationsCreate.ts +4 -4
- package/src/funcs/applicationsGet.ts +4 -4
- package/src/funcs/applicationsList.ts +4 -4
- package/src/funcs/{getToken.ts → oauthTokenGet.ts} +1 -1
- package/src/lib/config.ts +7 -7
- package/src/lib/files.ts +1 -1
- package/src/lib/primitives.ts +14 -0
- package/src/lib/sdks.ts +2 -7
- package/src/models/components/assetattributes.ts +58 -47
- package/src/models/components/commercialassettype.ts +61 -0
- package/src/models/components/consumerassettype.ts +43 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/errors/index.ts +1 -3
- package/src/models/errors/{getapplication.ts → responsebody.ts} +20 -20
- package/src/sdk/oauthtoken.ts +24 -0
- package/src/sdk/sdk.ts +5 -16
- package/funcs/getToken.d.ts.map +0 -1
- package/funcs/getToken.js.map +0 -1
- package/models/errors/createapplication.d.ts +0 -38
- package/models/errors/createapplication.d.ts.map +0 -1
- package/models/errors/createapplication.js +0 -81
- package/models/errors/createapplication.js.map +0 -1
- package/models/errors/getapplication.d.ts +0 -38
- package/models/errors/getapplication.d.ts.map +0 -1
- package/models/errors/getapplication.js.map +0 -1
- package/models/errors/getapplications.d.ts +0 -38
- package/models/errors/getapplications.d.ts.map +0 -1
- package/models/errors/getapplications.js +0 -81
- package/models/errors/getapplications.js.map +0 -1
- package/src/models/errors/createapplication.ts +0 -76
- package/src/models/errors/getapplications.ts +0 -76
|
@@ -6,6 +6,8 @@ export * from "./applicationresourcebulksubmission.js";
|
|
|
6
6
|
export * from "./applicationstatus.js";
|
|
7
7
|
export * from "./applicationtype.js";
|
|
8
8
|
export * from "./assetattributes.js";
|
|
9
|
+
export * from "./commercialassettype.js";
|
|
10
|
+
export * from "./consumerassettype.js";
|
|
9
11
|
export * from "./customerattributes.js";
|
|
10
12
|
export * from "./customeridtype.js";
|
|
11
13
|
export * from "./customertitle.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
|
@@ -25,6 +25,8 @@ __exportStar(require("./applicationresourcebulksubmission.js"), exports);
|
|
|
25
25
|
__exportStar(require("./applicationstatus.js"), exports);
|
|
26
26
|
__exportStar(require("./applicationtype.js"), exports);
|
|
27
27
|
__exportStar(require("./assetattributes.js"), exports);
|
|
28
|
+
__exportStar(require("./commercialassettype.js"), exports);
|
|
29
|
+
__exportStar(require("./consumerassettype.js"), exports);
|
|
28
30
|
__exportStar(require("./customerattributes.js"), exports);
|
|
29
31
|
__exportStar(require("./customeridtype.js"), exports);
|
|
30
32
|
__exportStar(require("./customertitle.js"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/components/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,yDAAuC;AACvC,qDAAmC;AACnC,6DAA2C;AAC3C,mEAAiD;AACjD,yEAAuD;AACvD,yDAAuC;AACvC,uDAAqC;AACrC,uDAAqC;AACrC,0DAAwC;AACxC,sDAAoC;AACpC,qDAAmC;AACnC,mDAAiC;AACjC,sDAAoC;AACpC,qDAAmC;AACnC,6CAA2B;AAC3B,6DAA2C;AAC3C,0DAAwC;AACxC,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/components/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,yDAAuC;AACvC,qDAAmC;AACnC,6DAA2C;AAC3C,mEAAiD;AACjD,yEAAuD;AACvD,yDAAuC;AACvC,uDAAqC;AACrC,uDAAqC;AACrC,2DAAyC;AACzC,yDAAuC;AACvC,0DAAwC;AACxC,sDAAoC;AACpC,qDAAmC;AACnC,mDAAiC;AACjC,sDAAoC;AACpC,qDAAmC;AACnC,6CAA2B;AAC3B,6DAA2C;AAC3C,0DAAwC;AACxC,gDAA8B;AAC9B,oDAAkC;AAClC,qDAAmC"}
|
package/models/errors/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export * from "./apierror.js";
|
|
2
|
-
export * from "./createapplication.js";
|
|
3
|
-
export * from "./getapplication.js";
|
|
4
|
-
export * from "./getapplications.js";
|
|
5
2
|
export * from "./httpclienterrors.js";
|
|
3
|
+
export * from "./responsebody.js";
|
|
6
4
|
export * from "./sdkvalidationerror.js";
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/errors/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/errors/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC"}
|
package/models/errors/index.js
CHANGED
|
@@ -18,9 +18,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
__exportStar(require("./apierror.js"), exports);
|
|
21
|
-
__exportStar(require("./createapplication.js"), exports);
|
|
22
|
-
__exportStar(require("./getapplication.js"), exports);
|
|
23
|
-
__exportStar(require("./getapplications.js"), exports);
|
|
24
21
|
__exportStar(require("./httpclienterrors.js"), exports);
|
|
22
|
+
__exportStar(require("./responsebody.js"), exports);
|
|
25
23
|
__exportStar(require("./sdkvalidationerror.js"), exports);
|
|
26
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/errors/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/errors/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,wDAAsC;AACtC,oDAAkC;AAClC,0DAAwC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import * as components from "../components/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Access is forbidden.
|
|
5
|
+
*/
|
|
6
|
+
export type ResponseBodyData = {
|
|
7
|
+
errors: Array<components.ForbiddenError>;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Access is forbidden.
|
|
11
|
+
*/
|
|
12
|
+
export declare class ResponseBody extends Error {
|
|
13
|
+
errors: Array<components.ForbiddenError>;
|
|
14
|
+
/** The original data that was passed to this error instance. */
|
|
15
|
+
data$: ResponseBodyData;
|
|
16
|
+
constructor(err: ResponseBodyData);
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const ResponseBody$inboundSchema: z.ZodType<ResponseBody, z.ZodTypeDef, unknown>;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type ResponseBody$Outbound = {
|
|
22
|
+
errors: Array<components.ForbiddenError$Outbound>;
|
|
23
|
+
};
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const ResponseBody$outboundSchema: z.ZodType<ResponseBody$Outbound, z.ZodTypeDef, ResponseBody>;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
29
|
+
*/
|
|
30
|
+
export declare namespace ResponseBody$ {
|
|
31
|
+
/** @deprecated use `ResponseBody$inboundSchema` instead. */
|
|
32
|
+
const inboundSchema: z.ZodType<ResponseBody, z.ZodTypeDef, unknown>;
|
|
33
|
+
/** @deprecated use `ResponseBody$outboundSchema` instead. */
|
|
34
|
+
const outboundSchema: z.ZodType<ResponseBody$Outbound, z.ZodTypeDef, ResponseBody>;
|
|
35
|
+
/** @deprecated use `ResponseBody$Outbound` instead. */
|
|
36
|
+
type Outbound = ResponseBody$Outbound;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=responsebody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsebody.d.ts","sourceRoot":"","sources":["../../src/models/errors/responsebody.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;CAC1C,CAAC;AAEF;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IAEzC,gEAAgE;IAChE,KAAK,EAAE,gBAAgB,CAAC;gBAEZ,GAAG,EAAE,gBAAgB;CAWlC;AAED,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,CAML,CAAC;AAEL,gBAAgB;AAChB,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;CACnD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CACjD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,YAAY,CAKT,CAAC;AAEN;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAC7B,4DAA4D;IACrD,MAAM,aAAa,gDAA6B,CAAC;IACxD,6DAA6D;IACtD,MAAM,cAAc,8DAA8B,CAAC;IAC1D,uDAAuD;IACvD,KAAY,QAAQ,GAAG,qBAAqB,CAAC;CAC9C"}
|
|
@@ -36,13 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
39
|
+
exports.ResponseBody$ = exports.ResponseBody$outboundSchema = exports.ResponseBody$inboundSchema = exports.ResponseBody = void 0;
|
|
40
40
|
const z = __importStar(require("zod"));
|
|
41
41
|
const components = __importStar(require("../components/index.js"));
|
|
42
42
|
/**
|
|
43
43
|
* Access is forbidden.
|
|
44
44
|
*/
|
|
45
|
-
class
|
|
45
|
+
class ResponseBody extends Error {
|
|
46
46
|
constructor(err) {
|
|
47
47
|
const message = "message" in err && typeof err.message === "string"
|
|
48
48
|
? err.message
|
|
@@ -50,19 +50,19 @@ class GetApplicationResponseBody extends Error {
|
|
|
50
50
|
super(message);
|
|
51
51
|
this.data$ = err;
|
|
52
52
|
this.errors = err.errors;
|
|
53
|
-
this.name = "
|
|
53
|
+
this.name = "ResponseBody";
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
exports.
|
|
56
|
+
exports.ResponseBody = ResponseBody;
|
|
57
57
|
/** @internal */
|
|
58
|
-
exports.
|
|
58
|
+
exports.ResponseBody$inboundSchema = z.object({
|
|
59
59
|
errors: z.array(components.ForbiddenError$inboundSchema),
|
|
60
60
|
})
|
|
61
61
|
.transform((v) => {
|
|
62
|
-
return new
|
|
62
|
+
return new ResponseBody(v);
|
|
63
63
|
});
|
|
64
64
|
/** @internal */
|
|
65
|
-
exports.
|
|
65
|
+
exports.ResponseBody$outboundSchema = z.instanceof(ResponseBody)
|
|
66
66
|
.transform(v => v.data$)
|
|
67
67
|
.pipe(z.object({
|
|
68
68
|
errors: z.array(components.ForbiddenError$outboundSchema),
|
|
@@ -71,11 +71,11 @@ exports.GetApplicationResponseBody$outboundSchema = z.instanceof(GetApplicationR
|
|
|
71
71
|
* @internal
|
|
72
72
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
73
|
*/
|
|
74
|
-
var
|
|
75
|
-
(function (
|
|
76
|
-
/** @deprecated use `
|
|
77
|
-
|
|
78
|
-
/** @deprecated use `
|
|
79
|
-
|
|
80
|
-
})(
|
|
81
|
-
//# sourceMappingURL=
|
|
74
|
+
var ResponseBody$;
|
|
75
|
+
(function (ResponseBody$) {
|
|
76
|
+
/** @deprecated use `ResponseBody$inboundSchema` instead. */
|
|
77
|
+
ResponseBody$.inboundSchema = exports.ResponseBody$inboundSchema;
|
|
78
|
+
/** @deprecated use `ResponseBody$outboundSchema` instead. */
|
|
79
|
+
ResponseBody$.outboundSchema = exports.ResponseBody$outboundSchema;
|
|
80
|
+
})(ResponseBody$ || (exports.ResponseBody$ = ResponseBody$ = {}));
|
|
81
|
+
//# sourceMappingURL=responsebody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsebody.js","sourceRoot":"","sources":["../../src/models/errors/responsebody.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,mEAAqD;AASrD;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK;IAMrC,YAAY,GAAqB;QAC/B,MAAM,OAAO,GAAG,SAAS,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;YACjE,CAAC,CAAC,GAAG,CAAC,OAAO;YACb,CAAC,CAAC,uBAAuB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;QACjD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QAEjB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QAEzB,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AAjBD,oCAiBC;AAED,gBAAgB;AACH,QAAA,0BAA0B,GAInC,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,4BAA4B,CAAC;CACzD,CAAC;KACC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACf,OAAO,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC;AAOL,gBAAgB;AACH,QAAA,2BAA2B,GAIpC,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC;KAC3B,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;KACvB,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACb,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,6BAA6B,CAAC;CAC1D,CAAC,CAAC,CAAC;AAEN;;;GAGG;AACH,IAAiB,aAAa,CAO7B;AAPD,WAAiB,aAAa;IAC5B,4DAA4D;IAC/C,2BAAa,GAAG,kCAA0B,CAAC;IACxD,6DAA6D;IAChD,4BAAc,GAAG,mCAA2B,CAAC;AAG5D,CAAC,EAPgB,aAAa,6BAAb,aAAa,QAO7B"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
2
|
+
import * as components from "../models/components/index.js";
|
|
3
|
+
export declare class OauthToken extends ClientSDK {
|
|
4
|
+
/**
|
|
5
|
+
* Obtain an OAuth client_credentials token
|
|
6
|
+
*/
|
|
7
|
+
get(request: components.TokenRequest, options?: RequestOptions): Promise<components.TokenResponse>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=oauthtoken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauthtoken.d.ts","sourceRoot":"","sources":["../src/sdk/oauthtoken.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,UAAW,SAAQ,SAAS;IACvC;;OAEG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,YAAY,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;CAOrC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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.OauthToken = void 0;
|
|
7
|
+
const oauthTokenGet_js_1 = require("../funcs/oauthTokenGet.js");
|
|
8
|
+
const sdks_js_1 = require("../lib/sdks.js");
|
|
9
|
+
const fp_js_1 = require("../types/fp.js");
|
|
10
|
+
class OauthToken extends sdks_js_1.ClientSDK {
|
|
11
|
+
/**
|
|
12
|
+
* Obtain an OAuth client_credentials token
|
|
13
|
+
*/
|
|
14
|
+
async get(request, options) {
|
|
15
|
+
return (0, fp_js_1.unwrapAsync)((0, oauthTokenGet_js_1.oauthTokenGet)(this, request, options));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.OauthToken = OauthToken;
|
|
19
|
+
//# sourceMappingURL=oauthtoken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauthtoken.js","sourceRoot":"","sources":["../src/sdk/oauthtoken.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gEAA0D;AAC1D,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,UAAW,SAAQ,mBAAS;IACvC;;OAEG;IACH,KAAK,CAAC,GAAG,CACP,OAAgC,EAChC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAdD,gCAcC"}
|
package/sdk/sdk.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { ClientSDK
|
|
2
|
-
import * as components from "../models/components/index.js";
|
|
1
|
+
import { ClientSDK } from "../lib/sdks.js";
|
|
3
2
|
import { Applications } from "./applications.js";
|
|
3
|
+
import { OauthToken } from "./oauthtoken.js";
|
|
4
4
|
export declare class Financeable extends ClientSDK {
|
|
5
5
|
private _applications?;
|
|
6
6
|
get applications(): Applications;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
getToken(request: components.TokenRequest, options?: RequestOptions): Promise<components.TokenResponse>;
|
|
7
|
+
private _oauthToken?;
|
|
8
|
+
get oauthToken(): OauthToken;
|
|
11
9
|
}
|
|
12
10
|
//# sourceMappingURL=sdk.d.ts.map
|
package/sdk/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":"
|
|
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,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,qBAAa,WAAY,SAAQ,SAAS;IACxC,OAAO,CAAC,aAAa,CAAC,CAAe;IACrC,IAAI,YAAY,IAAI,YAAY,CAE/B;IAED,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,IAAI,UAAU,IAAI,UAAU,CAE3B;CACF"}
|
package/sdk/sdk.js
CHANGED
|
@@ -4,19 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Financeable = void 0;
|
|
7
|
-
const getToken_js_1 = require("../funcs/getToken.js");
|
|
8
7
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
9
|
-
const fp_js_1 = require("../types/fp.js");
|
|
10
8
|
const applications_js_1 = require("./applications.js");
|
|
9
|
+
const oauthtoken_js_1 = require("./oauthtoken.js");
|
|
11
10
|
class Financeable extends sdks_js_1.ClientSDK {
|
|
12
11
|
get applications() {
|
|
13
12
|
return (this._applications ?? (this._applications = new applications_js_1.Applications(this._options)));
|
|
14
13
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*/
|
|
18
|
-
async getToken(request, options) {
|
|
19
|
-
return (0, fp_js_1.unwrapAsync)((0, getToken_js_1.getToken)(this, request, options));
|
|
14
|
+
get oauthToken() {
|
|
15
|
+
return (this._oauthToken ?? (this._oauthToken = new oauthtoken_js_1.OauthToken(this._options)));
|
|
20
16
|
}
|
|
21
17
|
}
|
|
22
18
|
exports.Financeable = Financeable;
|
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,
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,uDAAiD;AACjD,mDAA6C;AAE7C,MAAa,WAAY,SAAQ,mBAAS;IAExC,IAAI,YAAY;QACd,OAAO,CAAC,IAAI,CAAC,aAAa,KAAlB,IAAI,CAAC,aAAa,GAAK,IAAI,8BAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAClE,CAAC;IAGD,IAAI,UAAU;QACZ,OAAO,CAAC,IAAI,CAAC,WAAW,KAAhB,IAAI,CAAC,WAAW,GAAK,IAAI,0BAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC9D,CAAC;CACF;AAVD,kCAUC"}
|
|
@@ -35,7 +35,7 @@ export function applicationsCreate(
|
|
|
35
35
|
): APIPromise<
|
|
36
36
|
Result<
|
|
37
37
|
operations.CreateApplicationResponseBody,
|
|
38
|
-
| errors.
|
|
38
|
+
| errors.ResponseBody
|
|
39
39
|
| APIError
|
|
40
40
|
| SDKValidationError
|
|
41
41
|
| UnexpectedClientError
|
|
@@ -60,7 +60,7 @@ async function $do(
|
|
|
60
60
|
[
|
|
61
61
|
Result<
|
|
62
62
|
operations.CreateApplicationResponseBody,
|
|
63
|
-
| errors.
|
|
63
|
+
| errors.ResponseBody
|
|
64
64
|
| APIError
|
|
65
65
|
| SDKValidationError
|
|
66
66
|
| UnexpectedClientError
|
|
@@ -142,7 +142,7 @@ async function $do(
|
|
|
142
142
|
|
|
143
143
|
const [result] = await M.match<
|
|
144
144
|
operations.CreateApplicationResponseBody,
|
|
145
|
-
| errors.
|
|
145
|
+
| errors.ResponseBody
|
|
146
146
|
| APIError
|
|
147
147
|
| SDKValidationError
|
|
148
148
|
| UnexpectedClientError
|
|
@@ -152,7 +152,7 @@ async function $do(
|
|
|
152
152
|
| ConnectionError
|
|
153
153
|
>(
|
|
154
154
|
M.json(201, operations.CreateApplicationResponseBody$inboundSchema),
|
|
155
|
-
M.jsonErr(403, errors.
|
|
155
|
+
M.jsonErr(403, errors.ResponseBody$inboundSchema),
|
|
156
156
|
M.fail("4XX"),
|
|
157
157
|
M.fail("5XX"),
|
|
158
158
|
)(response, { extraFields: responseFields });
|
|
@@ -34,7 +34,7 @@ export function applicationsGet(
|
|
|
34
34
|
): APIPromise<
|
|
35
35
|
Result<
|
|
36
36
|
operations.GetApplicationResponseBody,
|
|
37
|
-
| errors.
|
|
37
|
+
| errors.ResponseBody
|
|
38
38
|
| APIError
|
|
39
39
|
| SDKValidationError
|
|
40
40
|
| UnexpectedClientError
|
|
@@ -59,7 +59,7 @@ async function $do(
|
|
|
59
59
|
[
|
|
60
60
|
Result<
|
|
61
61
|
operations.GetApplicationResponseBody,
|
|
62
|
-
| errors.
|
|
62
|
+
| errors.ResponseBody
|
|
63
63
|
| APIError
|
|
64
64
|
| SDKValidationError
|
|
65
65
|
| UnexpectedClientError
|
|
@@ -146,7 +146,7 @@ async function $do(
|
|
|
146
146
|
|
|
147
147
|
const [result] = await M.match<
|
|
148
148
|
operations.GetApplicationResponseBody,
|
|
149
|
-
| errors.
|
|
149
|
+
| errors.ResponseBody
|
|
150
150
|
| APIError
|
|
151
151
|
| SDKValidationError
|
|
152
152
|
| UnexpectedClientError
|
|
@@ -156,7 +156,7 @@ async function $do(
|
|
|
156
156
|
| ConnectionError
|
|
157
157
|
>(
|
|
158
158
|
M.json(200, operations.GetApplicationResponseBody$inboundSchema),
|
|
159
|
-
M.jsonErr(403, errors.
|
|
159
|
+
M.jsonErr(403, errors.ResponseBody$inboundSchema),
|
|
160
160
|
M.fail("4XX"),
|
|
161
161
|
M.fail("5XX"),
|
|
162
162
|
)(response, { extraFields: responseFields });
|
|
@@ -34,7 +34,7 @@ export function applicationsList(
|
|
|
34
34
|
): APIPromise<
|
|
35
35
|
Result<
|
|
36
36
|
operations.GetApplicationsResponseBody,
|
|
37
|
-
| errors.
|
|
37
|
+
| errors.ResponseBody
|
|
38
38
|
| APIError
|
|
39
39
|
| SDKValidationError
|
|
40
40
|
| UnexpectedClientError
|
|
@@ -59,7 +59,7 @@ async function $do(
|
|
|
59
59
|
[
|
|
60
60
|
Result<
|
|
61
61
|
operations.GetApplicationsResponseBody,
|
|
62
|
-
| errors.
|
|
62
|
+
| errors.ResponseBody
|
|
63
63
|
| APIError
|
|
64
64
|
| SDKValidationError
|
|
65
65
|
| UnexpectedClientError
|
|
@@ -144,7 +144,7 @@ async function $do(
|
|
|
144
144
|
|
|
145
145
|
const [result] = await M.match<
|
|
146
146
|
operations.GetApplicationsResponseBody,
|
|
147
|
-
| errors.
|
|
147
|
+
| errors.ResponseBody
|
|
148
148
|
| APIError
|
|
149
149
|
| SDKValidationError
|
|
150
150
|
| UnexpectedClientError
|
|
@@ -154,7 +154,7 @@ async function $do(
|
|
|
154
154
|
| ConnectionError
|
|
155
155
|
>(
|
|
156
156
|
M.json(200, operations.GetApplicationsResponseBody$inboundSchema),
|
|
157
|
-
M.jsonErr(403, errors.
|
|
157
|
+
M.jsonErr(403, errors.ResponseBody$inboundSchema),
|
|
158
158
|
M.fail("4XX"),
|
|
159
159
|
M.fail("5XX"),
|
|
160
160
|
)(response, { extraFields: responseFields });
|
package/src/lib/config.ts
CHANGED
|
@@ -18,17 +18,17 @@ export const ServerList = [
|
|
|
18
18
|
] as const;
|
|
19
19
|
|
|
20
20
|
export type SDKOptions = {
|
|
21
|
-
clientCredentials?: string | (() => Promise<string>);
|
|
21
|
+
clientCredentials?: string | (() => Promise<string>) | undefined;
|
|
22
22
|
|
|
23
23
|
httpClient?: HTTPClient;
|
|
24
24
|
/**
|
|
25
25
|
* Allows overriding the default server used by the SDK
|
|
26
26
|
*/
|
|
27
|
-
serverIdx?: number;
|
|
27
|
+
serverIdx?: number | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* Allows overriding the default server URL used by the SDK
|
|
30
30
|
*/
|
|
31
|
-
serverURL?: string;
|
|
31
|
+
serverURL?: string | undefined;
|
|
32
32
|
/**
|
|
33
33
|
* Allows overriding the default retry config used by the SDK
|
|
34
34
|
*/
|
|
@@ -56,9 +56,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
56
56
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
|
-
openapiDocVersion: "0.
|
|
60
|
-
sdkVersion: "0.
|
|
61
|
-
genVersion: "2.
|
|
59
|
+
openapiDocVersion: "0.4.0",
|
|
60
|
+
sdkVersion: "0.4.5",
|
|
61
|
+
genVersion: "2.552.1",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.
|
|
63
|
+
"speakeasy-sdk/typescript 0.4.5 2.552.1 0.4.0 @financeable/aggregation",
|
|
64
64
|
} as const;
|
package/src/lib/files.ts
CHANGED
package/src/lib/primitives.ts
CHANGED
|
@@ -134,3 +134,17 @@ export function compactMap<T>(
|
|
|
134
134
|
|
|
135
135
|
return out;
|
|
136
136
|
}
|
|
137
|
+
|
|
138
|
+
export function allRequired<V extends Record<string, unknown>>(
|
|
139
|
+
v: V,
|
|
140
|
+
):
|
|
141
|
+
| {
|
|
142
|
+
[K in keyof V]: NonNullable<V[K]>;
|
|
143
|
+
}
|
|
144
|
+
| undefined {
|
|
145
|
+
if (Object.values(v).every((x) => x == null)) {
|
|
146
|
+
return void 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return v as ReturnType<typeof allRequired<V>>;
|
|
150
|
+
}
|
package/src/lib/sdks.ts
CHANGED
|
@@ -195,14 +195,9 @@ export class ClientSDK {
|
|
|
195
195
|
|
|
196
196
|
if (conf.body instanceof ReadableStream) {
|
|
197
197
|
if (!fetchOptions) {
|
|
198
|
-
fetchOptions = {
|
|
199
|
-
// @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769
|
|
200
|
-
duplex: "half",
|
|
201
|
-
};
|
|
202
|
-
} else {
|
|
203
|
-
// @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769
|
|
204
|
-
fetchOptions.duplex = "half";
|
|
198
|
+
fetchOptions = {};
|
|
205
199
|
}
|
|
200
|
+
Object.assign(fetchOptions, { duplex: "half" });
|
|
206
201
|
}
|
|
207
202
|
|
|
208
203
|
let input;
|
|
@@ -7,6 +7,16 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
CommercialAssetType,
|
|
12
|
+
CommercialAssetType$inboundSchema,
|
|
13
|
+
CommercialAssetType$outboundSchema,
|
|
14
|
+
} from "./commercialassettype.js";
|
|
15
|
+
import {
|
|
16
|
+
ConsumerAssetType,
|
|
17
|
+
ConsumerAssetType$inboundSchema,
|
|
18
|
+
ConsumerAssetType$outboundSchema,
|
|
19
|
+
} from "./consumerassettype.js";
|
|
10
20
|
|
|
11
21
|
/**
|
|
12
22
|
* Condition of asset
|
|
@@ -22,45 +32,9 @@ export const Condition = {
|
|
|
22
32
|
export type Condition = ClosedEnum<typeof Condition>;
|
|
23
33
|
|
|
24
34
|
/**
|
|
25
|
-
* Type of asset
|
|
35
|
+
* Type of asset - must be a member of the enums ConsumerAssetType or CommercialAssetType depending on the respective Application type
|
|
26
36
|
*/
|
|
27
|
-
export
|
|
28
|
-
MOTORVEHICLELessThan45TONNES: "MOTOR_VEHICLE_(<4.5_TONNES)",
|
|
29
|
-
ELECTRICMOTORVEHICLELessThan45TONNES: "ELECTRIC_MOTOR_VEHICLE_(<4.5_TONNES)",
|
|
30
|
-
COMMERCIALSMALLTOMEDIUMVEHICLESLessThan12TONNES:
|
|
31
|
-
"COMMERCIAL_(SMALL_TO_MEDIUM)_VEHICLES_(<12_TONNES)",
|
|
32
|
-
COMMERCIALHEAVYVEHICLESGreaterThan12TONNES:
|
|
33
|
-
"COMMERCIAL_(HEAVY)_VEHICLES_(>12_TONNES)",
|
|
34
|
-
WarehouseEquipmentWheeledOrTracked:
|
|
35
|
-
"WAREHOUSE_EQUIPMENT_(WHEELED_OR_TRACKED)",
|
|
36
|
-
EARTHMOVINGAndCONSTRUCTIONWHEELEDORTRACKED:
|
|
37
|
-
"EARTH_MOVING_&_CONSTRUCTION_(WHEELED_OR_TRACKED)",
|
|
38
|
-
AGRICULTURALAndLANDSCAPINGEQUIPMENTWHEELEDORTRACKED:
|
|
39
|
-
"AGRICULTURAL_&_LANDSCAPING_EQUIPMENT_(WHEELED_OR_TRACKED)",
|
|
40
|
-
MINIBUSESAndROUTEBUSESLessThan25SEATS: "MINI_BUSES_&_ROUTE_BUSES_(<25_SEATS)",
|
|
41
|
-
TrailersAndCaravans: "TRAILERS_AND_CARAVANS",
|
|
42
|
-
INDUSTRIALPLANTAndPRINTING: "INDUSTRIAL_PLANT_&_PRINTING",
|
|
43
|
-
ManufacturingEquipment: "MANUFACTURING_EQUIPMENT",
|
|
44
|
-
MedicalEquipment: "MEDICAL_EQUIPMENT",
|
|
45
|
-
ITCOMPUTERAndAUDIOEQUIPMENT: "IT_COMPUTER_&_AUDIO_EQUIPMENT",
|
|
46
|
-
HEALTHAndBEAUTYEQUIPMENT: "HEALTH_&_BEAUTY_EQUIPMENT",
|
|
47
|
-
OfficeEquipment: "OFFICE_EQUIPMENT",
|
|
48
|
-
OfficeFitout: "OFFICE_FITOUT",
|
|
49
|
-
RESTAURANTAndCATERINGEQUIPMENT: "RESTAURANT_&_CATERING_EQUIPMENT",
|
|
50
|
-
OfficeFurniture: "OFFICE_FURNITURE",
|
|
51
|
-
Solar: "SOLAR",
|
|
52
|
-
MotorbikesAtvs: "MOTORBIKES_ATVS",
|
|
53
|
-
ClassicCar: "CLASSIC_CAR",
|
|
54
|
-
TraileredBoats: "TRAILERED_BOATS",
|
|
55
|
-
Jetskis: "JETSKIS",
|
|
56
|
-
RideOnMowers: "RIDE_ON_MOWERS",
|
|
57
|
-
GolfCarts: "GOLF_CARTS",
|
|
58
|
-
Other: "OTHER",
|
|
59
|
-
} as const;
|
|
60
|
-
/**
|
|
61
|
-
* Type of asset
|
|
62
|
-
*/
|
|
63
|
-
export type AssetType = ClosedEnum<typeof AssetType>;
|
|
37
|
+
export type AssetType = ConsumerAssetType | CommercialAssetType;
|
|
64
38
|
|
|
65
39
|
export const Purpose = {
|
|
66
40
|
Vehicle: "VEHICLE",
|
|
@@ -111,9 +85,9 @@ export type AssetAttributes = {
|
|
|
111
85
|
*/
|
|
112
86
|
condition: Condition;
|
|
113
87
|
/**
|
|
114
|
-
* Type of asset
|
|
88
|
+
* Type of asset - must be a member of the enums ConsumerAssetType or CommercialAssetType depending on the respective Application type
|
|
115
89
|
*/
|
|
116
|
-
assetType:
|
|
90
|
+
assetType: ConsumerAssetType | CommercialAssetType;
|
|
117
91
|
purpose: Purpose;
|
|
118
92
|
/**
|
|
119
93
|
* Value of asset
|
|
@@ -217,12 +191,27 @@ export namespace Condition$ {
|
|
|
217
191
|
}
|
|
218
192
|
|
|
219
193
|
/** @internal */
|
|
220
|
-
export const AssetType$inboundSchema: z.
|
|
221
|
-
|
|
194
|
+
export const AssetType$inboundSchema: z.ZodType<
|
|
195
|
+
AssetType,
|
|
196
|
+
z.ZodTypeDef,
|
|
197
|
+
unknown
|
|
198
|
+
> = z.union([
|
|
199
|
+
ConsumerAssetType$inboundSchema,
|
|
200
|
+
CommercialAssetType$inboundSchema,
|
|
201
|
+
]);
|
|
202
|
+
|
|
203
|
+
/** @internal */
|
|
204
|
+
export type AssetType$Outbound = string | string;
|
|
222
205
|
|
|
223
206
|
/** @internal */
|
|
224
|
-
export const AssetType$outboundSchema: z.
|
|
225
|
-
AssetType$
|
|
207
|
+
export const AssetType$outboundSchema: z.ZodType<
|
|
208
|
+
AssetType$Outbound,
|
|
209
|
+
z.ZodTypeDef,
|
|
210
|
+
AssetType
|
|
211
|
+
> = z.union([
|
|
212
|
+
ConsumerAssetType$outboundSchema,
|
|
213
|
+
CommercialAssetType$outboundSchema,
|
|
214
|
+
]);
|
|
226
215
|
|
|
227
216
|
/**
|
|
228
217
|
* @internal
|
|
@@ -233,6 +222,22 @@ export namespace AssetType$ {
|
|
|
233
222
|
export const inboundSchema = AssetType$inboundSchema;
|
|
234
223
|
/** @deprecated use `AssetType$outboundSchema` instead. */
|
|
235
224
|
export const outboundSchema = AssetType$outboundSchema;
|
|
225
|
+
/** @deprecated use `AssetType$Outbound` instead. */
|
|
226
|
+
export type Outbound = AssetType$Outbound;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function assetTypeToJSON(assetType: AssetType): string {
|
|
230
|
+
return JSON.stringify(AssetType$outboundSchema.parse(assetType));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export function assetTypeFromJSON(
|
|
234
|
+
jsonString: string,
|
|
235
|
+
): SafeParseResult<AssetType, SDKValidationError> {
|
|
236
|
+
return safeParse(
|
|
237
|
+
jsonString,
|
|
238
|
+
(x) => AssetType$inboundSchema.parse(JSON.parse(x)),
|
|
239
|
+
`Failed to parse 'AssetType' from JSON`,
|
|
240
|
+
);
|
|
236
241
|
}
|
|
237
242
|
|
|
238
243
|
/** @internal */
|
|
@@ -284,7 +289,10 @@ export const AssetAttributes$inboundSchema: z.ZodType<
|
|
|
284
289
|
ageOfAsset: z.number().int(),
|
|
285
290
|
ageOfAssetAtEnd: z.number().int(),
|
|
286
291
|
condition: Condition$inboundSchema,
|
|
287
|
-
assetType:
|
|
292
|
+
assetType: z.union([
|
|
293
|
+
ConsumerAssetType$inboundSchema,
|
|
294
|
+
CommercialAssetType$inboundSchema,
|
|
295
|
+
]),
|
|
288
296
|
purpose: Purpose$inboundSchema,
|
|
289
297
|
assetValue: z.string(),
|
|
290
298
|
make: z.string(),
|
|
@@ -313,7 +321,7 @@ export type AssetAttributes$Outbound = {
|
|
|
313
321
|
ageOfAsset: number;
|
|
314
322
|
ageOfAssetAtEnd: number;
|
|
315
323
|
condition: string;
|
|
316
|
-
assetType: string;
|
|
324
|
+
assetType: string | string;
|
|
317
325
|
purpose: string;
|
|
318
326
|
assetValue: string;
|
|
319
327
|
make: string;
|
|
@@ -346,7 +354,10 @@ export const AssetAttributes$outboundSchema: z.ZodType<
|
|
|
346
354
|
ageOfAsset: z.number().int(),
|
|
347
355
|
ageOfAssetAtEnd: z.number().int(),
|
|
348
356
|
condition: Condition$outboundSchema,
|
|
349
|
-
assetType:
|
|
357
|
+
assetType: z.union([
|
|
358
|
+
ConsumerAssetType$outboundSchema,
|
|
359
|
+
CommercialAssetType$outboundSchema,
|
|
360
|
+
]),
|
|
350
361
|
purpose: Purpose$outboundSchema,
|
|
351
362
|
assetValue: z.string(),
|
|
352
363
|
make: z.string(),
|