@shipengine/js-api 3.13.1 → 3.15.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.
@@ -1,7 +1,7 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { CreateSessionRequest, CreateSessionResponse } from "./types";
2
+ import { ConfigResponse, CreateSessionRequest, CreateSessionResponse } from "./types";
3
3
  /**
4
- * # Auctane Pay API module - /internal/auctane_pay
4
+ * # Auctane Pay API module - /v1/payments
5
5
  *
6
6
  * This module provides access to the Auctane Pay endpoints in ShipEngine API.
7
7
  */
@@ -15,4 +15,10 @@ export declare class AuctanePayAPI {
15
15
  * @returns a promise that resolves to the created session
16
16
  */
17
17
  createSession: (request: CreateSessionRequest) => Promise<import("axios").AxiosResponse<CreateSessionResponse, any>>;
18
+ /**
19
+ * The `getConfig` method get the AuctanePay config, such as the "adyenClientKey"
20
+ *
21
+ * @returns a promise that returns the AuctanePay config
22
+ */
23
+ getConfig: () => Promise<import("axios").AxiosResponse<ConfigResponse, any>>;
18
24
  }
@@ -101,6 +101,12 @@ export interface PaymentMethodHolderAddress {
101
101
  */
102
102
  sourceAccountId: string;
103
103
  }
104
+ /**
105
+ * @category Entities
106
+ */
107
+ export interface ConfigResponse {
108
+ metadata: AuctanePaySessionMetadata;
109
+ }
104
110
  /**
105
111
  * @category Entities
106
112
  */
package/index.js CHANGED
@@ -250,7 +250,15 @@ class AuctanePayAPI {
250
250
  * @returns a promise that resolves to the created session
251
251
  */
252
252
  this.createSession = (request) => {
253
- return this.client.post("/internal/auctane_pay/sessions", request);
253
+ return this.client.post("/v1/payments/sessions", request);
254
+ };
255
+ /**
256
+ * The `getConfig` method get the AuctanePay config, such as the "adyenClientKey"
257
+ *
258
+ * @returns a promise that returns the AuctanePay config
259
+ */
260
+ this.getConfig = () => {
261
+ return this.client.get("/v1/payments/config");
254
262
  };
255
263
  this.client = client;
256
264
  }
package/index.mjs CHANGED
@@ -246,7 +246,15 @@ class AuctanePayAPI {
246
246
  * @returns a promise that resolves to the created session
247
247
  */
248
248
  this.createSession = (request) => {
249
- return this.client.post("/internal/auctane_pay/sessions", request);
249
+ return this.client.post("/v1/payments/sessions", request);
250
+ };
251
+ /**
252
+ * The `getConfig` method get the AuctanePay config, such as the "adyenClientKey"
253
+ *
254
+ * @returns a promise that returns the AuctanePay config
255
+ */
256
+ this.getConfig = () => {
257
+ return this.client.get("/v1/payments/config");
250
258
  };
251
259
  this.client = client;
252
260
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "3.13.1",
3
+ "version": "3.15.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {