@paddle/paddle-node-sdk 1.5.0 → 1.5.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/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,15 @@ When we make [non-breaking changes](https://developer.paddle.com/api-reference/a
|
|
|
12
12
|
|
|
13
13
|
This means when upgrading minor versions of the SDK, you may notice type errors. You can safely ignore these or fix by adding additional type guards.
|
|
14
14
|
|
|
15
|
+
## 1.5.1 - 2024-09-10
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Fixed a bug where query parameters with special characters were not passed correctly to the API.
|
|
20
|
+
- Dependabot security updates.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
15
24
|
## 1.5.0 - 2024-08-16
|
|
16
25
|
|
|
17
26
|
### Added
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.QueryParameters = void 0;
|
|
7
|
-
|
|
4
|
+
function convertCamelCaseToSnakeCase(input) {
|
|
5
|
+
return input.replace(/\b(\w+)([A-Z][a-z])/g, (_match, p1, p2) => {
|
|
6
|
+
return p1.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase() + '_' + p2.toLowerCase();
|
|
7
|
+
});
|
|
8
|
+
}
|
|
8
9
|
class QueryParameters {
|
|
9
10
|
constructor(queryParameters) {
|
|
10
11
|
this.queryParameters = queryParameters;
|
|
@@ -14,7 +15,7 @@ class QueryParameters {
|
|
|
14
15
|
for (const key in this.queryParameters) {
|
|
15
16
|
const value = this.queryParameters[key];
|
|
16
17
|
if (key && value) {
|
|
17
|
-
urlSearchParam.append((
|
|
18
|
+
urlSearchParam.append(convertCamelCaseToSnakeCase(key), `${value}`);
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
return '?' + urlSearchParam.toString();
|
package/dist/cjs/version.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
function convertCamelCaseToSnakeCase(input) {
|
|
2
|
+
return input.replace(/\b(\w+)([A-Z][a-z])/g, (_match, p1, p2) => {
|
|
3
|
+
return p1.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase() + '_' + p2.toLowerCase();
|
|
4
|
+
});
|
|
5
|
+
}
|
|
2
6
|
export class QueryParameters {
|
|
3
7
|
constructor(queryParameters) {
|
|
4
8
|
this.queryParameters = queryParameters;
|
|
@@ -8,7 +12,7 @@ export class QueryParameters {
|
|
|
8
12
|
for (const key in this.queryParameters) {
|
|
9
13
|
const value = this.queryParameters[key];
|
|
10
14
|
if (key && value) {
|
|
11
|
-
urlSearchParam.append(
|
|
15
|
+
urlSearchParam.append(convertCamelCaseToSnakeCase(key), `${value}`);
|
|
12
16
|
}
|
|
13
17
|
}
|
|
14
18
|
return '?' + urlSearchParam.toString();
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = '1.5.
|
|
1
|
+
export const SDK_VERSION = '1.5.1';
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.5.
|
|
1
|
+
export declare const SDK_VERSION = "1.5.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paddle/paddle-node-sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "A Node.js SDK that you can use to integrate Paddle Billing with applications written in server-side JavaScript.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|