@paddle/paddle-node-sdk 2.6.0 → 2.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/README.md +4 -1
- package/dist/cjs/internal/api/client.js +1 -6
- package/dist/cjs/version.js +1 -1
- package/dist/esm/internal/api/client.js +1 -6
- package/dist/esm/version.js +1 -1
- package/dist/types/internal/types/config.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,7 +51,10 @@ You can also pass an environment to work with the sandbox:
|
|
|
51
51
|
```typescript
|
|
52
52
|
const paddle = new Paddle('API_KEY', {
|
|
53
53
|
environment: Environment.production, // or Environment.sandbox for accessing sandbox API
|
|
54
|
-
logLevel: LogLevel.verbose // or LogLevel.error for less verbose logging
|
|
54
|
+
logLevel: LogLevel.verbose, // or LogLevel.error for less verbose logging
|
|
55
|
+
customHeaders: {
|
|
56
|
+
'X-Custom-Header': 'value' // Optional custom headers
|
|
57
|
+
}
|
|
55
58
|
})
|
|
56
59
|
```
|
|
57
60
|
|
|
@@ -39,12 +39,7 @@ class Client {
|
|
|
39
39
|
else {
|
|
40
40
|
logger_js_1.Logger.error('Unknown runtime. Cannot generate uuid');
|
|
41
41
|
}
|
|
42
|
-
return {
|
|
43
|
-
Authorization: `bearer ${this.apiKey}`,
|
|
44
|
-
'Content-Type': 'application/json',
|
|
45
|
-
'user-agent': `PaddleSDK/node ${version_js_1.SDK_VERSION}`,
|
|
46
|
-
'X-Transaction-ID': uuid !== null && uuid !== void 0 ? uuid : '',
|
|
47
|
-
};
|
|
42
|
+
return Object.assign({ Authorization: `bearer ${this.apiKey}`, 'Content-Type': 'application/json', 'user-agent': `PaddleSDK/node ${version_js_1.SDK_VERSION}`, 'X-Transaction-ID': uuid !== null && uuid !== void 0 ? uuid : '' }, this.options.customHeaders);
|
|
48
43
|
}
|
|
49
44
|
get(url, queryParams) {
|
|
50
45
|
return __awaiter(this, void 0, void 0, function* () {
|
package/dist/cjs/version.js
CHANGED
|
@@ -36,12 +36,7 @@ export class Client {
|
|
|
36
36
|
else {
|
|
37
37
|
Logger.error('Unknown runtime. Cannot generate uuid');
|
|
38
38
|
}
|
|
39
|
-
return {
|
|
40
|
-
Authorization: `bearer ${this.apiKey}`,
|
|
41
|
-
'Content-Type': 'application/json',
|
|
42
|
-
'user-agent': `PaddleSDK/node ${SDK_VERSION}`,
|
|
43
|
-
'X-Transaction-ID': uuid !== null && uuid !== void 0 ? uuid : '',
|
|
44
|
-
};
|
|
39
|
+
return Object.assign({ Authorization: `bearer ${this.apiKey}`, 'Content-Type': 'application/json', 'user-agent': `PaddleSDK/node ${SDK_VERSION}`, 'X-Transaction-ID': uuid !== null && uuid !== void 0 ? uuid : '' }, this.options.customHeaders);
|
|
45
40
|
}
|
|
46
41
|
get(url, queryParams) {
|
|
47
42
|
return __awaiter(this, void 0, void 0, function* () {
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = '2.
|
|
1
|
+
export const SDK_VERSION = '2.7.0';
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.7.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paddle/paddle-node-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
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.cjs.node.js",
|
|
6
6
|
"module": "dist/esm/index.esm.node.js",
|