@oway/sdk 0.1.1 → 0.1.2
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 +3 -3
- package/dist/index.d.mts +158 -91
- package/dist/index.d.ts +158 -91
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60,8 +60,8 @@ var HttpClient = class {
|
|
|
60
60
|
throw new OwayError("clientId and clientSecret are required. Contact Oway Sales Engineering to obtain M2M credentials.");
|
|
61
61
|
}
|
|
62
62
|
this.config = {
|
|
63
|
-
baseUrl: config.baseUrl || process.env.OWAY_BASE_URL || "https://
|
|
64
|
-
tokenUrl: config.tokenUrl || (config.baseUrl || process.env.OWAY_BASE_URL || "https://
|
|
63
|
+
baseUrl: config.baseUrl || process.env.OWAY_BASE_URL || "https://api.sandbox.oway.io",
|
|
64
|
+
tokenUrl: config.tokenUrl || (config.baseUrl || process.env.OWAY_BASE_URL || "https://api.sandbox.oway.io") + "/v1/auth/token",
|
|
65
65
|
maxRetries: config.maxRetries ?? 3,
|
|
66
66
|
timeout: config.timeout ?? 3e4,
|
|
67
67
|
debug: config.debug ?? false,
|
|
@@ -362,12 +362,12 @@ var OwayEnvironments = {
|
|
|
362
362
|
* Sandbox environment for development and testing
|
|
363
363
|
* Safe to use - no real shipments created
|
|
364
364
|
*/
|
|
365
|
-
SANDBOX: "https://
|
|
365
|
+
SANDBOX: "https://api.sandbox.oway.io",
|
|
366
366
|
/**
|
|
367
367
|
* Production environment for live traffic
|
|
368
368
|
* Real shipments will be created and billed
|
|
369
369
|
*/
|
|
370
|
-
PRODUCTION: "https://
|
|
370
|
+
PRODUCTION: "https://api.oway.io"
|
|
371
371
|
};
|
|
372
372
|
|
|
373
373
|
// src/index.ts
|
package/dist/index.mjs
CHANGED
|
@@ -31,8 +31,8 @@ var HttpClient = class {
|
|
|
31
31
|
throw new OwayError("clientId and clientSecret are required. Contact Oway Sales Engineering to obtain M2M credentials.");
|
|
32
32
|
}
|
|
33
33
|
this.config = {
|
|
34
|
-
baseUrl: config.baseUrl || process.env.OWAY_BASE_URL || "https://
|
|
35
|
-
tokenUrl: config.tokenUrl || (config.baseUrl || process.env.OWAY_BASE_URL || "https://
|
|
34
|
+
baseUrl: config.baseUrl || process.env.OWAY_BASE_URL || "https://api.sandbox.oway.io",
|
|
35
|
+
tokenUrl: config.tokenUrl || (config.baseUrl || process.env.OWAY_BASE_URL || "https://api.sandbox.oway.io") + "/v1/auth/token",
|
|
36
36
|
maxRetries: config.maxRetries ?? 3,
|
|
37
37
|
timeout: config.timeout ?? 3e4,
|
|
38
38
|
debug: config.debug ?? false,
|
|
@@ -333,12 +333,12 @@ var OwayEnvironments = {
|
|
|
333
333
|
* Sandbox environment for development and testing
|
|
334
334
|
* Safe to use - no real shipments created
|
|
335
335
|
*/
|
|
336
|
-
SANDBOX: "https://
|
|
336
|
+
SANDBOX: "https://api.sandbox.oway.io",
|
|
337
337
|
/**
|
|
338
338
|
* Production environment for live traffic
|
|
339
339
|
* Real shipments will be created and billed
|
|
340
340
|
*/
|
|
341
|
-
PRODUCTION: "https://
|
|
341
|
+
PRODUCTION: "https://api.oway.io"
|
|
342
342
|
};
|
|
343
343
|
|
|
344
344
|
// src/index.ts
|