@devizovaburza/payments-api-sdk 1.1.0 → 1.2.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/README.md +2 -2
- package/dist/v1/index.cjs +16 -2
- package/dist/v1/index.d.cts +637 -416
- package/dist/v1/index.d.mts +637 -416
- package/dist/v1/index.d.ts +637 -416
- package/dist/v1/index.mjs +15 -2
- package/package.json +2 -3
package/dist/v1/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { WebhookEventType } from '@apps/gateway/src/types/webhook';
|
|
2
|
+
|
|
1
3
|
// src/utils/cookie.ts
|
|
2
4
|
var _serialize = (name, value, opt = {}) => {
|
|
3
5
|
let cookie = `${name}=${value}`;
|
|
@@ -15,6 +17,11 @@ var _serialize = (name, value, opt = {}) => {
|
|
|
15
17
|
throw new Error("__Host- Cookie must not have Domain attributes");
|
|
16
18
|
}
|
|
17
19
|
}
|
|
20
|
+
for (const key of ["domain", "path"]) {
|
|
21
|
+
if (opt[key] && /[;\r\n]/.test(opt[key])) {
|
|
22
|
+
throw new Error(`${key} must not contain ";", "\\r", or "\\n"`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
18
25
|
if (opt && typeof opt.maxAge === "number" && opt.maxAge >= 0) {
|
|
19
26
|
if (opt.maxAge > 3456e4) {
|
|
20
27
|
throw new Error(
|
|
@@ -165,6 +172,9 @@ var ClientRequestImpl = class {
|
|
|
165
172
|
if (args.form) {
|
|
166
173
|
const form = new FormData();
|
|
167
174
|
for (const [k, v] of Object.entries(args.form)) {
|
|
175
|
+
if (v === void 0) {
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
168
178
|
if (Array.isArray(v)) {
|
|
169
179
|
for (const v2 of v) {
|
|
170
180
|
form.append(k, v2);
|
|
@@ -240,7 +250,7 @@ var hc = (baseUrl, options) => createProxy(function proxyCallback(opts) {
|
|
|
240
250
|
}
|
|
241
251
|
const path = parts.join("/");
|
|
242
252
|
const url = mergePath(baseUrl, path);
|
|
243
|
-
if (method === "url") {
|
|
253
|
+
if (method === "url" || method === "path") {
|
|
244
254
|
let result = url;
|
|
245
255
|
if (opts.args[0]) {
|
|
246
256
|
if (opts.args[0].param) {
|
|
@@ -251,7 +261,10 @@ var hc = (baseUrl, options) => createProxy(function proxyCallback(opts) {
|
|
|
251
261
|
}
|
|
252
262
|
}
|
|
253
263
|
result = removeIndexString(result);
|
|
254
|
-
|
|
264
|
+
if (method === "url") {
|
|
265
|
+
return new URL(result);
|
|
266
|
+
}
|
|
267
|
+
return result.slice(baseUrl.replace(/\/+$/, "").length).replace(/^\/?/, "/");
|
|
255
268
|
}
|
|
256
269
|
if (method === "ws") {
|
|
257
270
|
const webSocketUrl = replaceUrlProtocol(
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devizovaburza/payments-api-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"author": "Devizová burza a.s.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "unbuild"
|
|
9
|
-
"release": "nx release --projects=@devizovaburza/payments-api-sdk --skip-publish && git push --follow-tags"
|
|
8
|
+
"build": "unbuild"
|
|
10
9
|
},
|
|
11
10
|
"exports": {
|
|
12
11
|
"./v1": {
|