@shipengine/js-api 3.13.1 → 3.14.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,5 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { CreateSessionRequest, CreateSessionResponse } from "./types";
2
+ import { ConfigResponse, CreateSessionRequest, CreateSessionResponse } from "./types";
3
3
  /**
4
4
  * # Auctane Pay API module - /internal/auctane_pay
5
5
  *
@@ -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
@@ -252,6 +252,14 @@ class AuctanePayAPI {
252
252
  this.createSession = (request) => {
253
253
  return this.client.post("/internal/auctane_pay/sessions", request);
254
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("/internal/auctane_pay/config");
262
+ };
255
263
  this.client = client;
256
264
  }
257
265
  }
package/index.mjs CHANGED
@@ -248,6 +248,14 @@ class AuctanePayAPI {
248
248
  this.createSession = (request) => {
249
249
  return this.client.post("/internal/auctane_pay/sessions", request);
250
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("/internal/auctane_pay/config");
258
+ };
251
259
  this.client = client;
252
260
  }
253
261
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "3.13.1",
3
+ "version": "3.14.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {