mollie-api-typescript 1.6.9 → 1.7.0
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/dist/commonjs/hooks/mollie-auth-utils.js +1 -1
- package/dist/commonjs/hooks/mollie-auth-utils.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/entitypaymentroute.d.ts +0 -27
- package/dist/commonjs/models/entitypaymentroute.d.ts.map +1 -1
- package/dist/commonjs/models/entitypaymentroute.js +1 -17
- package/dist/commonjs/models/entitypaymentroute.js.map +1 -1
- package/dist/commonjs/models/url.d.ts +0 -8
- package/dist/commonjs/models/url.d.ts.map +1 -1
- package/dist/commonjs/models/url.js +1 -11
- package/dist/commonjs/models/url.js.map +1 -1
- package/dist/esm/hooks/mollie-auth-utils.js +1 -1
- package/dist/esm/hooks/mollie-auth-utils.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/entitypaymentroute.d.ts +0 -27
- package/dist/esm/models/entitypaymentroute.d.ts.map +1 -1
- package/dist/esm/models/entitypaymentroute.js +0 -15
- package/dist/esm/models/entitypaymentroute.js.map +1 -1
- package/dist/esm/models/url.d.ts +0 -8
- package/dist/esm/models/url.d.ts.map +1 -1
- package/dist/esm/models/url.js +0 -9
- package/dist/esm/models/url.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/hooks/mollie-auth-utils.ts +3 -3
- package/src/lib/config.ts +2 -2
- package/src/models/entitypaymentroute.ts +0 -50
- package/src/models/url.ts +0 -15
|
@@ -10,7 +10,7 @@ function clientCanHaveGlobalFields(options) {
|
|
|
10
10
|
if (securityObj instanceof Promise)
|
|
11
11
|
return false;
|
|
12
12
|
const token = securityObj.apiKey
|
|
13
|
-
|| securityObj.
|
|
13
|
+
|| securityObj.advancedAccessToken
|
|
14
14
|
|| securityObj.oAuth;
|
|
15
15
|
return !!token && token.startsWith("access_");
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mollie-auth-utils.js","sourceRoot":"","sources":["../../../src/hooks/mollie-auth-utils.ts"],"names":[],"mappings":";;AAEA,8DAWC;AAED,sDAEC;AAfD,SAAgB,yBAAyB,CAAC,OAAmB;IACzD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClC,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5B,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC3E,IAAI,WAAW,YAAY,OAAO;QAAE,OAAO,KAAK,CAAC;IAEjD,MAAM,KAAK,GAAI,
|
|
1
|
+
{"version":3,"file":"mollie-auth-utils.js","sourceRoot":"","sources":["../../../src/hooks/mollie-auth-utils.ts"],"names":[],"mappings":";;AAEA,8DAWC;AAED,sDAEC;AAfD,SAAgB,yBAAyB,CAAC,OAAmB;IACzD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClC,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5B,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC3E,IAAI,WAAW,YAAY,OAAO;QAAE,OAAO,KAAK,CAAC;IAEjD,MAAM,KAAK,GAAI,WAAiF,CAAC,MAAM;WAC/F,WAAiF,CAAC,mBAAmB;WACrG,WAAiF,CAAC,KAAK,CAAC;IAChG,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC;AAED,SAAgB,qBAAqB,CAAC,OAAmB;IACrD,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACrD,CAAC"}
|
|
@@ -47,8 +47,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
47
47
|
export declare const SDK_METADATA: {
|
|
48
48
|
readonly language: "typescript";
|
|
49
49
|
readonly openapiDocVersion: "1.0.0";
|
|
50
|
-
readonly sdkVersion: "1.
|
|
50
|
+
readonly sdkVersion: "1.7.0";
|
|
51
51
|
readonly genVersion: "2.882.0";
|
|
52
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.
|
|
52
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.7.0 2.882.0 1.0.0 mollie-api-typescript";
|
|
53
53
|
};
|
|
54
54
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -29,8 +29,8 @@ function serverURLFromOptions(options) {
|
|
|
29
29
|
exports.SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.
|
|
32
|
+
sdkVersion: "1.7.0",
|
|
33
33
|
genVersion: "2.882.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.7.0 2.882.0 1.0.0 mollie-api-typescript",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
import { Amount, Amount$Outbound } from "./amount.js";
|
|
3
3
|
import { RouteDestinationType } from "./routedestinationtype.js";
|
|
4
|
-
import { Url, Url$Outbound } from "./url.js";
|
|
5
4
|
/**
|
|
6
5
|
* The destination of this portion of the payment.
|
|
7
6
|
*/
|
|
@@ -12,19 +11,6 @@ export type EntityPaymentRouteDestination = {
|
|
|
12
11
|
type: RouteDestinationType;
|
|
13
12
|
organizationId: string;
|
|
14
13
|
};
|
|
15
|
-
/**
|
|
16
|
-
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
17
|
-
*/
|
|
18
|
-
export type EntityPaymentRouteLinks = {
|
|
19
|
-
/**
|
|
20
|
-
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
21
|
-
*/
|
|
22
|
-
self: Url;
|
|
23
|
-
/**
|
|
24
|
-
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
25
|
-
*/
|
|
26
|
-
payment: Url;
|
|
27
|
-
};
|
|
28
14
|
export type EntityPaymentRoute = {
|
|
29
15
|
/**
|
|
30
16
|
* In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
|
|
@@ -43,10 +29,6 @@ export type EntityPaymentRoute = {
|
|
|
43
29
|
* If no date is given, the funds become available to the connected merchant as soon as the payment succeeds.
|
|
44
30
|
*/
|
|
45
31
|
releaseDate?: string | null | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
48
|
-
*/
|
|
49
|
-
links: EntityPaymentRouteLinks;
|
|
50
32
|
};
|
|
51
33
|
/** @internal */
|
|
52
34
|
export type EntityPaymentRouteDestination$Outbound = {
|
|
@@ -57,19 +39,10 @@ export type EntityPaymentRouteDestination$Outbound = {
|
|
|
57
39
|
export declare const EntityPaymentRouteDestination$outboundSchema: z.ZodType<EntityPaymentRouteDestination$Outbound, z.ZodTypeDef, EntityPaymentRouteDestination>;
|
|
58
40
|
export declare function entityPaymentRouteDestinationToJSON(entityPaymentRouteDestination: EntityPaymentRouteDestination): string;
|
|
59
41
|
/** @internal */
|
|
60
|
-
export type EntityPaymentRouteLinks$Outbound = {
|
|
61
|
-
self: Url$Outbound;
|
|
62
|
-
payment: Url$Outbound;
|
|
63
|
-
};
|
|
64
|
-
/** @internal */
|
|
65
|
-
export declare const EntityPaymentRouteLinks$outboundSchema: z.ZodType<EntityPaymentRouteLinks$Outbound, z.ZodTypeDef, EntityPaymentRouteLinks>;
|
|
66
|
-
export declare function entityPaymentRouteLinksToJSON(entityPaymentRouteLinks: EntityPaymentRouteLinks): string;
|
|
67
|
-
/** @internal */
|
|
68
42
|
export type EntityPaymentRoute$Outbound = {
|
|
69
43
|
amount: Amount$Outbound;
|
|
70
44
|
destination: EntityPaymentRouteDestination$Outbound;
|
|
71
45
|
releaseDate?: string | null | undefined;
|
|
72
|
-
_links: EntityPaymentRouteLinks$Outbound;
|
|
73
46
|
};
|
|
74
47
|
/** @internal */
|
|
75
48
|
export declare const EntityPaymentRoute$outboundSchema: z.ZodType<EntityPaymentRoute$Outbound, z.ZodTypeDef, EntityPaymentRoute>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entitypaymentroute.d.ts","sourceRoot":"","sources":["../../../src/models/entitypaymentroute.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"entitypaymentroute.d.ts","sourceRoot":"","sources":["../../../src/models/entitypaymentroute.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,eAAe,EAAyB,MAAM,aAAa,CAAC;AAC7E,OAAO,EACL,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,IAAI,EAAE,oBAAoB,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,EAAE,6BAA6B,CAAC;IAC3C;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,sCAAsC,GAAG;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,sCAAsC,EACtC,CAAC,CAAC,UAAU,EACZ,6BAA6B,CAI7B,CAAC;AAEH,wBAAgB,mCAAmC,CACjD,6BAA6B,EAAE,6BAA6B,GAC3D,MAAM,CAMR;AAED,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,EAAE,sCAAsC,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAKlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
|
|
@@ -37,15 +37,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
};
|
|
38
38
|
})();
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.EntityPaymentRoute$outboundSchema = exports.
|
|
40
|
+
exports.EntityPaymentRoute$outboundSchema = exports.EntityPaymentRouteDestination$outboundSchema = void 0;
|
|
41
41
|
exports.entityPaymentRouteDestinationToJSON = entityPaymentRouteDestinationToJSON;
|
|
42
|
-
exports.entityPaymentRouteLinksToJSON = entityPaymentRouteLinksToJSON;
|
|
43
42
|
exports.entityPaymentRouteToJSON = entityPaymentRouteToJSON;
|
|
44
43
|
const z = __importStar(require("zod/v3"));
|
|
45
|
-
const primitives_js_1 = require("../lib/primitives.js");
|
|
46
44
|
const amount_js_1 = require("./amount.js");
|
|
47
45
|
const routedestinationtype_js_1 = require("./routedestinationtype.js");
|
|
48
|
-
const url_js_1 = require("./url.js");
|
|
49
46
|
/** @internal */
|
|
50
47
|
exports.EntityPaymentRouteDestination$outboundSchema = z.object({
|
|
51
48
|
type: routedestinationtype_js_1.RouteDestinationType$outboundSchema,
|
|
@@ -55,23 +52,10 @@ function entityPaymentRouteDestinationToJSON(entityPaymentRouteDestination) {
|
|
|
55
52
|
return JSON.stringify(exports.EntityPaymentRouteDestination$outboundSchema.parse(entityPaymentRouteDestination));
|
|
56
53
|
}
|
|
57
54
|
/** @internal */
|
|
58
|
-
exports.EntityPaymentRouteLinks$outboundSchema = z.object({
|
|
59
|
-
self: url_js_1.Url$outboundSchema,
|
|
60
|
-
payment: url_js_1.Url$outboundSchema,
|
|
61
|
-
});
|
|
62
|
-
function entityPaymentRouteLinksToJSON(entityPaymentRouteLinks) {
|
|
63
|
-
return JSON.stringify(exports.EntityPaymentRouteLinks$outboundSchema.parse(entityPaymentRouteLinks));
|
|
64
|
-
}
|
|
65
|
-
/** @internal */
|
|
66
55
|
exports.EntityPaymentRoute$outboundSchema = z.object({
|
|
67
56
|
amount: amount_js_1.Amount$outboundSchema,
|
|
68
57
|
destination: z.lazy(() => exports.EntityPaymentRouteDestination$outboundSchema),
|
|
69
58
|
releaseDate: z.nullable(z.string()).optional(),
|
|
70
|
-
links: z.lazy(() => exports.EntityPaymentRouteLinks$outboundSchema),
|
|
71
|
-
}).transform((v) => {
|
|
72
|
-
return (0, primitives_js_1.remap)(v, {
|
|
73
|
-
links: "_links",
|
|
74
|
-
});
|
|
75
59
|
});
|
|
76
60
|
function entityPaymentRouteToJSON(entityPaymentRoute) {
|
|
77
61
|
return JSON.stringify(exports.EntityPaymentRoute$outboundSchema.parse(entityPaymentRoute));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entitypaymentroute.js","sourceRoot":"","sources":["../../../src/models/entitypaymentroute.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"entitypaymentroute.js","sourceRoot":"","sources":["../../../src/models/entitypaymentroute.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDH,kFAQC;AAoBD,4DAMC;AAxFD,0CAA4B;AAC5B,2CAA6E;AAC7E,uEAGmC;AAuCnC,gBAAgB;AACH,QAAA,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,6DAAmC;IACzC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAEH,SAAgB,mCAAmC,CACjD,6BAA4D;IAE5D,OAAO,IAAI,CAAC,SAAS,CACnB,oDAA4C,CAAC,KAAK,CAChD,6BAA6B,CAC9B,CACF,CAAC;AACJ,CAAC;AASD,gBAAgB;AACH,QAAA,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,iCAAqB;IAC7B,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,oDAA4C,CAAC;IACvE,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAEH,SAAgB,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,yCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC"}
|
|
@@ -16,13 +16,5 @@ export type Url = {
|
|
|
16
16
|
};
|
|
17
17
|
/** @internal */
|
|
18
18
|
export declare const Url$inboundSchema: z.ZodType<Url, z.ZodTypeDef, unknown>;
|
|
19
|
-
/** @internal */
|
|
20
|
-
export type Url$Outbound = {
|
|
21
|
-
href: string;
|
|
22
|
-
type: string;
|
|
23
|
-
};
|
|
24
|
-
/** @internal */
|
|
25
|
-
export declare const Url$outboundSchema: z.ZodType<Url$Outbound, z.ZodTypeDef, Url>;
|
|
26
|
-
export declare function urlToJSON(url: Url): string;
|
|
27
19
|
export declare function urlFromJSON(jsonString: string): SafeParseResult<Url, SDKValidationError>;
|
|
28
20
|
//# sourceMappingURL=url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/models/url.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAIhE,CAAC;
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/models/url.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAIhE,CAAC;AAEL,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAM1C"}
|
|
@@ -37,8 +37,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
};
|
|
38
38
|
})();
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.Url$
|
|
41
|
-
exports.urlToJSON = urlToJSON;
|
|
40
|
+
exports.Url$inboundSchema = void 0;
|
|
42
41
|
exports.urlFromJSON = urlFromJSON;
|
|
43
42
|
const z = __importStar(require("zod/v3"));
|
|
44
43
|
const schemas_js_1 = require("../lib/schemas.js");
|
|
@@ -48,15 +47,6 @@ exports.Url$inboundSchema = z
|
|
|
48
47
|
href: z.string(),
|
|
49
48
|
type: z.string(),
|
|
50
49
|
});
|
|
51
|
-
/** @internal */
|
|
52
|
-
exports.Url$outboundSchema = z
|
|
53
|
-
.object({
|
|
54
|
-
href: z.string(),
|
|
55
|
-
type: z.string(),
|
|
56
|
-
});
|
|
57
|
-
function urlToJSON(url) {
|
|
58
|
-
return JSON.stringify(exports.Url$outboundSchema.parse(url));
|
|
59
|
-
}
|
|
60
50
|
function urlFromJSON(jsonString) {
|
|
61
51
|
return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Url$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Url' from JSON`);
|
|
62
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../src/models/url.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../src/models/url.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,kCAQC;AAlCD,0CAA4B;AAC5B,kDAA8C;AAkB9C,gBAAgB;AACH,QAAA,iBAAiB,GAA0C,CAAC;KACtE,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEL,SAAgB,WAAW,CACzB,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7C,iCAAiC,CAClC,CAAC;AACJ,CAAC"}
|
|
@@ -6,7 +6,7 @@ export function clientCanHaveGlobalFields(options) {
|
|
|
6
6
|
if (securityObj instanceof Promise)
|
|
7
7
|
return false;
|
|
8
8
|
const token = securityObj.apiKey
|
|
9
|
-
|| securityObj.
|
|
9
|
+
|| securityObj.advancedAccessToken
|
|
10
10
|
|| securityObj.oAuth;
|
|
11
11
|
return !!token && token.startsWith("access_");
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mollie-auth-utils.js","sourceRoot":"","sources":["../../../src/hooks/mollie-auth-utils.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,yBAAyB,CAAC,OAAmB;IACzD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClC,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5B,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC3E,IAAI,WAAW,YAAY,OAAO;QAAE,OAAO,KAAK,CAAC;IAEjD,MAAM,KAAK,GAAI,
|
|
1
|
+
{"version":3,"file":"mollie-auth-utils.js","sourceRoot":"","sources":["../../../src/hooks/mollie-auth-utils.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,yBAAyB,CAAC,OAAmB;IACzD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClC,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5B,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC3E,IAAI,WAAW,YAAY,OAAO;QAAE,OAAO,KAAK,CAAC;IAEjD,MAAM,KAAK,GAAI,WAAiF,CAAC,MAAM;WAC/F,WAAiF,CAAC,mBAAmB;WACrG,WAAiF,CAAC,KAAK,CAAC;IAChG,OAAO,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAmB;IACrD,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACrD,CAAC"}
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -47,8 +47,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
47
47
|
export declare const SDK_METADATA: {
|
|
48
48
|
readonly language: "typescript";
|
|
49
49
|
readonly openapiDocVersion: "1.0.0";
|
|
50
|
-
readonly sdkVersion: "1.
|
|
50
|
+
readonly sdkVersion: "1.7.0";
|
|
51
51
|
readonly genVersion: "2.882.0";
|
|
52
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.
|
|
52
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.7.0 2.882.0 1.0.0 mollie-api-typescript";
|
|
53
53
|
};
|
|
54
54
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
|
|
|
25
25
|
export const SDK_METADATA = {
|
|
26
26
|
language: "typescript",
|
|
27
27
|
openapiDocVersion: "1.0.0",
|
|
28
|
-
sdkVersion: "1.
|
|
28
|
+
sdkVersion: "1.7.0",
|
|
29
29
|
genVersion: "2.882.0",
|
|
30
|
-
userAgent: "speakeasy-sdk/typescript 1.
|
|
30
|
+
userAgent: "speakeasy-sdk/typescript 1.7.0 2.882.0 1.0.0 mollie-api-typescript",
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
2
|
import { Amount, Amount$Outbound } from "./amount.js";
|
|
3
3
|
import { RouteDestinationType } from "./routedestinationtype.js";
|
|
4
|
-
import { Url, Url$Outbound } from "./url.js";
|
|
5
4
|
/**
|
|
6
5
|
* The destination of this portion of the payment.
|
|
7
6
|
*/
|
|
@@ -12,19 +11,6 @@ export type EntityPaymentRouteDestination = {
|
|
|
12
11
|
type: RouteDestinationType;
|
|
13
12
|
organizationId: string;
|
|
14
13
|
};
|
|
15
|
-
/**
|
|
16
|
-
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
17
|
-
*/
|
|
18
|
-
export type EntityPaymentRouteLinks = {
|
|
19
|
-
/**
|
|
20
|
-
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
21
|
-
*/
|
|
22
|
-
self: Url;
|
|
23
|
-
/**
|
|
24
|
-
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
25
|
-
*/
|
|
26
|
-
payment: Url;
|
|
27
|
-
};
|
|
28
14
|
export type EntityPaymentRoute = {
|
|
29
15
|
/**
|
|
30
16
|
* In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
|
|
@@ -43,10 +29,6 @@ export type EntityPaymentRoute = {
|
|
|
43
29
|
* If no date is given, the funds become available to the connected merchant as soon as the payment succeeds.
|
|
44
30
|
*/
|
|
45
31
|
releaseDate?: string | null | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
48
|
-
*/
|
|
49
|
-
links: EntityPaymentRouteLinks;
|
|
50
32
|
};
|
|
51
33
|
/** @internal */
|
|
52
34
|
export type EntityPaymentRouteDestination$Outbound = {
|
|
@@ -57,19 +39,10 @@ export type EntityPaymentRouteDestination$Outbound = {
|
|
|
57
39
|
export declare const EntityPaymentRouteDestination$outboundSchema: z.ZodType<EntityPaymentRouteDestination$Outbound, z.ZodTypeDef, EntityPaymentRouteDestination>;
|
|
58
40
|
export declare function entityPaymentRouteDestinationToJSON(entityPaymentRouteDestination: EntityPaymentRouteDestination): string;
|
|
59
41
|
/** @internal */
|
|
60
|
-
export type EntityPaymentRouteLinks$Outbound = {
|
|
61
|
-
self: Url$Outbound;
|
|
62
|
-
payment: Url$Outbound;
|
|
63
|
-
};
|
|
64
|
-
/** @internal */
|
|
65
|
-
export declare const EntityPaymentRouteLinks$outboundSchema: z.ZodType<EntityPaymentRouteLinks$Outbound, z.ZodTypeDef, EntityPaymentRouteLinks>;
|
|
66
|
-
export declare function entityPaymentRouteLinksToJSON(entityPaymentRouteLinks: EntityPaymentRouteLinks): string;
|
|
67
|
-
/** @internal */
|
|
68
42
|
export type EntityPaymentRoute$Outbound = {
|
|
69
43
|
amount: Amount$Outbound;
|
|
70
44
|
destination: EntityPaymentRouteDestination$Outbound;
|
|
71
45
|
releaseDate?: string | null | undefined;
|
|
72
|
-
_links: EntityPaymentRouteLinks$Outbound;
|
|
73
46
|
};
|
|
74
47
|
/** @internal */
|
|
75
48
|
export declare const EntityPaymentRoute$outboundSchema: z.ZodType<EntityPaymentRoute$Outbound, z.ZodTypeDef, EntityPaymentRoute>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entitypaymentroute.d.ts","sourceRoot":"","sources":["../../../src/models/entitypaymentroute.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"entitypaymentroute.d.ts","sourceRoot":"","sources":["../../../src/models/entitypaymentroute.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,eAAe,EAAyB,MAAM,aAAa,CAAC;AAC7E,OAAO,EACL,oBAAoB,EAErB,MAAM,2BAA2B,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,IAAI,EAAE,oBAAoB,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,EAAE,6BAA6B,CAAC;IAC3C;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,sCAAsC,GAAG;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,sCAAsC,EACtC,CAAC,CAAC,UAAU,EACZ,6BAA6B,CAI7B,CAAC;AAEH,wBAAgB,mCAAmC,CACjD,6BAA6B,EAAE,6BAA6B,GAC3D,MAAM,CAMR;AAED,gBAAgB;AAChB,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,eAAe,CAAC;IACxB,WAAW,EAAE,sCAAsC,CAAC;IACpD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,2BAA2B,EAC3B,CAAC,CAAC,UAAU,EACZ,kBAAkB,CAKlB,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,kBAAkB,GACrC,MAAM,CAIR"}
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
* @generated-id: 1f0948651961
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
6
|
import { Amount$outboundSchema } from "./amount.js";
|
|
8
7
|
import { RouteDestinationType$outboundSchema, } from "./routedestinationtype.js";
|
|
9
|
-
import { Url$outboundSchema } from "./url.js";
|
|
10
8
|
/** @internal */
|
|
11
9
|
export const EntityPaymentRouteDestination$outboundSchema = z.object({
|
|
12
10
|
type: RouteDestinationType$outboundSchema,
|
|
@@ -16,23 +14,10 @@ export function entityPaymentRouteDestinationToJSON(entityPaymentRouteDestinatio
|
|
|
16
14
|
return JSON.stringify(EntityPaymentRouteDestination$outboundSchema.parse(entityPaymentRouteDestination));
|
|
17
15
|
}
|
|
18
16
|
/** @internal */
|
|
19
|
-
export const EntityPaymentRouteLinks$outboundSchema = z.object({
|
|
20
|
-
self: Url$outboundSchema,
|
|
21
|
-
payment: Url$outboundSchema,
|
|
22
|
-
});
|
|
23
|
-
export function entityPaymentRouteLinksToJSON(entityPaymentRouteLinks) {
|
|
24
|
-
return JSON.stringify(EntityPaymentRouteLinks$outboundSchema.parse(entityPaymentRouteLinks));
|
|
25
|
-
}
|
|
26
|
-
/** @internal */
|
|
27
17
|
export const EntityPaymentRoute$outboundSchema = z.object({
|
|
28
18
|
amount: Amount$outboundSchema,
|
|
29
19
|
destination: z.lazy(() => EntityPaymentRouteDestination$outboundSchema),
|
|
30
20
|
releaseDate: z.nullable(z.string()).optional(),
|
|
31
|
-
links: z.lazy(() => EntityPaymentRouteLinks$outboundSchema),
|
|
32
|
-
}).transform((v) => {
|
|
33
|
-
return remap$(v, {
|
|
34
|
-
links: "_links",
|
|
35
|
-
});
|
|
36
21
|
});
|
|
37
22
|
export function entityPaymentRouteToJSON(entityPaymentRoute) {
|
|
38
23
|
return JSON.stringify(EntityPaymentRoute$outboundSchema.parse(entityPaymentRoute));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entitypaymentroute.js","sourceRoot":"","sources":["../../../src/models/entitypaymentroute.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"entitypaymentroute.js","sourceRoot":"","sources":["../../../src/models/entitypaymentroute.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAA2B,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAEL,mCAAmC,GACpC,MAAM,2BAA2B,CAAC;AAuCnC,gBAAgB;AAChB,MAAM,CAAC,MAAM,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,mCAAmC;IACzC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAEH,MAAM,UAAU,mCAAmC,CACjD,6BAA4D;IAE5D,OAAO,IAAI,CAAC,SAAS,CACnB,4CAA4C,CAAC,KAAK,CAChD,6BAA6B,CAC9B,CACF,CAAC;AACJ,CAAC;AASD,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,qBAAqB;IAC7B,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,4CAA4C,CAAC;IACvE,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,kBAAsC;IAEtC,OAAO,IAAI,CAAC,SAAS,CACnB,iCAAiC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAC5D,CAAC;AACJ,CAAC"}
|
package/dist/esm/models/url.d.ts
CHANGED
|
@@ -16,13 +16,5 @@ export type Url = {
|
|
|
16
16
|
};
|
|
17
17
|
/** @internal */
|
|
18
18
|
export declare const Url$inboundSchema: z.ZodType<Url, z.ZodTypeDef, unknown>;
|
|
19
|
-
/** @internal */
|
|
20
|
-
export type Url$Outbound = {
|
|
21
|
-
href: string;
|
|
22
|
-
type: string;
|
|
23
|
-
};
|
|
24
|
-
/** @internal */
|
|
25
|
-
export declare const Url$outboundSchema: z.ZodType<Url$Outbound, z.ZodTypeDef, Url>;
|
|
26
|
-
export declare function urlToJSON(url: Url): string;
|
|
27
19
|
export declare function urlFromJSON(jsonString: string): SafeParseResult<Url, SDKValidationError>;
|
|
28
20
|
//# sourceMappingURL=url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/models/url.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAIhE,CAAC;
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/models/url.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAIhE,CAAC;AAEL,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAM1C"}
|
package/dist/esm/models/url.js
CHANGED
|
@@ -10,15 +10,6 @@ export const Url$inboundSchema = z
|
|
|
10
10
|
href: z.string(),
|
|
11
11
|
type: z.string(),
|
|
12
12
|
});
|
|
13
|
-
/** @internal */
|
|
14
|
-
export const Url$outboundSchema = z
|
|
15
|
-
.object({
|
|
16
|
-
href: z.string(),
|
|
17
|
-
type: z.string(),
|
|
18
|
-
});
|
|
19
|
-
export function urlToJSON(url) {
|
|
20
|
-
return JSON.stringify(Url$outboundSchema.parse(url));
|
|
21
|
-
}
|
|
22
13
|
export function urlFromJSON(jsonString) {
|
|
23
14
|
return safeParse(jsonString, (x) => Url$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Url' from JSON`);
|
|
24
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../src/models/url.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAkB9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,iBAAiB,GAA0C,CAAC;KACtE,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../../src/models/url.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAkB9C,gBAAgB;AAChB,MAAM,CAAC,MAAM,iBAAiB,GAA0C,CAAC;KACtE,MAAM,CAAC;IACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEL,MAAM,UAAU,WAAW,CACzB,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7C,iCAAiC,CAClC,CAAC;AACJ,CAAC"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -7,9 +7,9 @@ export function clientCanHaveGlobalFields(options: SDKOptions): boolean {
|
|
|
7
7
|
const securityObj = typeof security === "function" ? security() : security;
|
|
8
8
|
if (securityObj instanceof Promise) return false;
|
|
9
9
|
|
|
10
|
-
const token = (securityObj as { apiKey?: string;
|
|
11
|
-
|| (securityObj as { apiKey?: string;
|
|
12
|
-
|| (securityObj as { apiKey?: string;
|
|
10
|
+
const token = (securityObj as { apiKey?: string; advancedAccessToken?: string; oAuth?: string }).apiKey
|
|
11
|
+
|| (securityObj as { apiKey?: string; advancedAccessToken?: string; oAuth?: string }).advancedAccessToken
|
|
12
|
+
|| (securityObj as { apiKey?: string; advancedAccessToken?: string; oAuth?: string }).oAuth;
|
|
13
13
|
return !!token && token.startsWith("access_");
|
|
14
14
|
}
|
|
15
15
|
|
package/src/lib/config.ts
CHANGED
|
@@ -78,8 +78,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
78
78
|
export const SDK_METADATA = {
|
|
79
79
|
language: "typescript",
|
|
80
80
|
openapiDocVersion: "1.0.0",
|
|
81
|
-
sdkVersion: "1.
|
|
81
|
+
sdkVersion: "1.7.0",
|
|
82
82
|
genVersion: "2.882.0",
|
|
83
83
|
userAgent:
|
|
84
|
-
"speakeasy-sdk/typescript 1.
|
|
84
|
+
"speakeasy-sdk/typescript 1.7.0 2.882.0 1.0.0 mollie-api-typescript",
|
|
85
85
|
} as const;
|
|
@@ -4,13 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import * as z from "zod/v3";
|
|
7
|
-
import { remap as remap$ } from "../lib/primitives.js";
|
|
8
7
|
import { Amount, Amount$Outbound, Amount$outboundSchema } from "./amount.js";
|
|
9
8
|
import {
|
|
10
9
|
RouteDestinationType,
|
|
11
10
|
RouteDestinationType$outboundSchema,
|
|
12
11
|
} from "./routedestinationtype.js";
|
|
13
|
-
import { Url, Url$Outbound, Url$outboundSchema } from "./url.js";
|
|
14
12
|
|
|
15
13
|
/**
|
|
16
14
|
* The destination of this portion of the payment.
|
|
@@ -23,20 +21,6 @@ export type EntityPaymentRouteDestination = {
|
|
|
23
21
|
organizationId: string;
|
|
24
22
|
};
|
|
25
23
|
|
|
26
|
-
/**
|
|
27
|
-
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
28
|
-
*/
|
|
29
|
-
export type EntityPaymentRouteLinks = {
|
|
30
|
-
/**
|
|
31
|
-
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
32
|
-
*/
|
|
33
|
-
self: Url;
|
|
34
|
-
/**
|
|
35
|
-
* In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
|
|
36
|
-
*/
|
|
37
|
-
payment: Url;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
24
|
export type EntityPaymentRoute = {
|
|
41
25
|
/**
|
|
42
26
|
* In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
|
|
@@ -55,10 +39,6 @@ export type EntityPaymentRoute = {
|
|
|
55
39
|
* If no date is given, the funds become available to the connected merchant as soon as the payment succeeds.
|
|
56
40
|
*/
|
|
57
41
|
releaseDate?: string | null | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
|
|
60
|
-
*/
|
|
61
|
-
links: EntityPaymentRouteLinks;
|
|
62
42
|
};
|
|
63
43
|
|
|
64
44
|
/** @internal */
|
|
@@ -87,36 +67,11 @@ export function entityPaymentRouteDestinationToJSON(
|
|
|
87
67
|
);
|
|
88
68
|
}
|
|
89
69
|
|
|
90
|
-
/** @internal */
|
|
91
|
-
export type EntityPaymentRouteLinks$Outbound = {
|
|
92
|
-
self: Url$Outbound;
|
|
93
|
-
payment: Url$Outbound;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/** @internal */
|
|
97
|
-
export const EntityPaymentRouteLinks$outboundSchema: z.ZodType<
|
|
98
|
-
EntityPaymentRouteLinks$Outbound,
|
|
99
|
-
z.ZodTypeDef,
|
|
100
|
-
EntityPaymentRouteLinks
|
|
101
|
-
> = z.object({
|
|
102
|
-
self: Url$outboundSchema,
|
|
103
|
-
payment: Url$outboundSchema,
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
export function entityPaymentRouteLinksToJSON(
|
|
107
|
-
entityPaymentRouteLinks: EntityPaymentRouteLinks,
|
|
108
|
-
): string {
|
|
109
|
-
return JSON.stringify(
|
|
110
|
-
EntityPaymentRouteLinks$outboundSchema.parse(entityPaymentRouteLinks),
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
70
|
/** @internal */
|
|
115
71
|
export type EntityPaymentRoute$Outbound = {
|
|
116
72
|
amount: Amount$Outbound;
|
|
117
73
|
destination: EntityPaymentRouteDestination$Outbound;
|
|
118
74
|
releaseDate?: string | null | undefined;
|
|
119
|
-
_links: EntityPaymentRouteLinks$Outbound;
|
|
120
75
|
};
|
|
121
76
|
|
|
122
77
|
/** @internal */
|
|
@@ -128,11 +83,6 @@ export const EntityPaymentRoute$outboundSchema: z.ZodType<
|
|
|
128
83
|
amount: Amount$outboundSchema,
|
|
129
84
|
destination: z.lazy(() => EntityPaymentRouteDestination$outboundSchema),
|
|
130
85
|
releaseDate: z.nullable(z.string()).optional(),
|
|
131
|
-
links: z.lazy(() => EntityPaymentRouteLinks$outboundSchema),
|
|
132
|
-
}).transform((v) => {
|
|
133
|
-
return remap$(v, {
|
|
134
|
-
links: "_links",
|
|
135
|
-
});
|
|
136
86
|
});
|
|
137
87
|
|
|
138
88
|
export function entityPaymentRouteToJSON(
|
package/src/models/url.ts
CHANGED
|
@@ -28,22 +28,7 @@ export const Url$inboundSchema: z.ZodType<Url, z.ZodTypeDef, unknown> = z
|
|
|
28
28
|
href: z.string(),
|
|
29
29
|
type: z.string(),
|
|
30
30
|
});
|
|
31
|
-
/** @internal */
|
|
32
|
-
export type Url$Outbound = {
|
|
33
|
-
href: string;
|
|
34
|
-
type: string;
|
|
35
|
-
};
|
|
36
31
|
|
|
37
|
-
/** @internal */
|
|
38
|
-
export const Url$outboundSchema: z.ZodType<Url$Outbound, z.ZodTypeDef, Url> = z
|
|
39
|
-
.object({
|
|
40
|
-
href: z.string(),
|
|
41
|
-
type: z.string(),
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export function urlToJSON(url: Url): string {
|
|
45
|
-
return JSON.stringify(Url$outboundSchema.parse(url));
|
|
46
|
-
}
|
|
47
32
|
export function urlFromJSON(
|
|
48
33
|
jsonString: string,
|
|
49
34
|
): SafeParseResult<Url, SDKValidationError> {
|