@sp-api-sdk/vendor-invoices-api-v1 4.0.15 → 4.0.17

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.
@@ -90,6 +90,7 @@ exports.setSearchParams = setSearchParams;
90
90
  * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
91
91
  * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
92
92
  */
93
+ // @ts-ignore
93
94
  const replaceWithSerializableTypeIfNeeded = function (key, value) {
94
95
  if (value instanceof Set) {
95
96
  return Array.from(value);
@@ -91,8 +91,8 @@ class Configuration {
91
91
  * @return True if the given MIME is JSON, false otherwise.
92
92
  */
93
93
  isJsonMime(mime) {
94
- const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
95
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
94
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
95
+ return mime !== null && jsonMime.test(mime);
96
96
  }
97
97
  }
98
98
  exports.Configuration = Configuration;
@@ -17,5 +17,5 @@ exports.AdditionalDetailsTypeEnum = void 0;
17
17
  exports.AdditionalDetailsTypeEnum = {
18
18
  Sur: 'SUR',
19
19
  Ocr: 'OCR',
20
- CartonCount: 'CartonCount'
20
+ CartonCount: 'CartonCount',
21
21
  };
@@ -20,5 +20,5 @@ exports.AllowanceDetailsTypeEnum = {
20
20
  Defective: 'Defective',
21
21
  Promotional: 'Promotional',
22
22
  UnsaleableMerchandise: 'UnsaleableMerchandise',
23
- Special: 'Special'
23
+ Special: 'Special',
24
24
  };
@@ -25,5 +25,5 @@ exports.ChargeDetailsTypeEnum = {
25
25
  SpecialHandlingService: 'SpecialHandlingService',
26
26
  CollectionAndRecyclingService: 'CollectionAndRecyclingService',
27
27
  EnvironmentalProtectionService: 'EnvironmentalProtectionService',
28
- TaxCollectedAtSource: 'TaxCollectedAtSource'
28
+ TaxCollectedAtSource: 'TaxCollectedAtSource',
29
29
  };
@@ -16,5 +16,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.InvoiceInvoiceTypeEnum = void 0;
17
17
  exports.InvoiceInvoiceTypeEnum = {
18
18
  Invoice: 'Invoice',
19
- CreditNote: 'CreditNote'
19
+ CreditNote: 'CreditNote',
20
20
  };
@@ -16,5 +16,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ItemQuantityUnitOfMeasureEnum = void 0;
17
17
  exports.ItemQuantityUnitOfMeasureEnum = {
18
18
  Cases: 'Cases',
19
- Eaches: 'Eaches'
19
+ Eaches: 'Eaches',
20
20
  };
@@ -21,5 +21,5 @@ exports.NetCostUnitOfMeasure = {
21
21
  Pounds: 'POUNDS',
22
22
  Ounces: 'OUNCES',
23
23
  Grams: 'GRAMS',
24
- Kilograms: 'KILOGRAMS'
24
+ Kilograms: 'KILOGRAMS',
25
25
  };
@@ -20,5 +20,5 @@ exports.PaymentTermsTypeEnum = {
20
20
  FixedDate: 'FixedDate',
21
21
  Proximo: 'Proximo',
22
22
  PaymentDueUponReceiptOfInvoice: 'PaymentDueUponReceiptOfInvoice',
23
- LetterofCredit: 'LetterofCredit'
23
+ LetterofCredit: 'LetterofCredit',
24
24
  };
@@ -28,5 +28,5 @@ exports.TaxDetailsTaxTypeEnum = {
28
28
  St: 'ST',
29
29
  Consumption: 'Consumption',
30
30
  MutuallyDefined: 'MutuallyDefined',
31
- DomesticVat: 'DomesticVAT'
31
+ DomesticVat: 'DomesticVAT',
32
32
  };
@@ -16,5 +16,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.TaxRegistrationDetailsTaxRegistrationTypeEnum = void 0;
17
17
  exports.TaxRegistrationDetailsTaxRegistrationTypeEnum = {
18
18
  Vat: 'VAT',
19
- Gst: 'GST'
19
+ Gst: 'GST',
20
20
  };
@@ -18,5 +18,5 @@ exports.TotalWeightUnitOfMeasureEnum = {
18
18
  Pounds: 'POUNDS',
19
19
  Ounces: 'OUNCES',
20
20
  Grams: 'GRAMS',
21
- Kilograms: 'KILOGRAMS'
21
+ Kilograms: 'KILOGRAMS',
22
22
  };
@@ -81,6 +81,7 @@ export const setSearchParams = function (url, ...objects) {
81
81
  * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
82
82
  * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
83
83
  */
84
+ // @ts-ignore
84
85
  export const replaceWithSerializableTypeIfNeeded = function (key, value) {
85
86
  if (value instanceof Set) {
86
87
  return Array.from(value);
@@ -88,7 +88,7 @@ export class Configuration {
88
88
  * @return True if the given MIME is JSON, false otherwise.
89
89
  */
90
90
  isJsonMime(mime) {
91
- const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
92
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
91
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
92
+ return mime !== null && jsonMime.test(mime);
93
93
  }
94
94
  }
@@ -14,5 +14,5 @@
14
14
  export const AdditionalDetailsTypeEnum = {
15
15
  Sur: 'SUR',
16
16
  Ocr: 'OCR',
17
- CartonCount: 'CartonCount'
17
+ CartonCount: 'CartonCount',
18
18
  };
@@ -17,5 +17,5 @@ export const AllowanceDetailsTypeEnum = {
17
17
  Defective: 'Defective',
18
18
  Promotional: 'Promotional',
19
19
  UnsaleableMerchandise: 'UnsaleableMerchandise',
20
- Special: 'Special'
20
+ Special: 'Special',
21
21
  };
@@ -22,5 +22,5 @@ export const ChargeDetailsTypeEnum = {
22
22
  SpecialHandlingService: 'SpecialHandlingService',
23
23
  CollectionAndRecyclingService: 'CollectionAndRecyclingService',
24
24
  EnvironmentalProtectionService: 'EnvironmentalProtectionService',
25
- TaxCollectedAtSource: 'TaxCollectedAtSource'
25
+ TaxCollectedAtSource: 'TaxCollectedAtSource',
26
26
  };
@@ -13,5 +13,5 @@
13
13
  */
14
14
  export const InvoiceInvoiceTypeEnum = {
15
15
  Invoice: 'Invoice',
16
- CreditNote: 'CreditNote'
16
+ CreditNote: 'CreditNote',
17
17
  };
@@ -13,5 +13,5 @@
13
13
  */
14
14
  export const ItemQuantityUnitOfMeasureEnum = {
15
15
  Cases: 'Cases',
16
- Eaches: 'Eaches'
16
+ Eaches: 'Eaches',
17
17
  };
@@ -18,5 +18,5 @@ export const NetCostUnitOfMeasure = {
18
18
  Pounds: 'POUNDS',
19
19
  Ounces: 'OUNCES',
20
20
  Grams: 'GRAMS',
21
- Kilograms: 'KILOGRAMS'
21
+ Kilograms: 'KILOGRAMS',
22
22
  };
@@ -17,5 +17,5 @@ export const PaymentTermsTypeEnum = {
17
17
  FixedDate: 'FixedDate',
18
18
  Proximo: 'Proximo',
19
19
  PaymentDueUponReceiptOfInvoice: 'PaymentDueUponReceiptOfInvoice',
20
- LetterofCredit: 'LetterofCredit'
20
+ LetterofCredit: 'LetterofCredit',
21
21
  };
@@ -25,5 +25,5 @@ export const TaxDetailsTaxTypeEnum = {
25
25
  St: 'ST',
26
26
  Consumption: 'Consumption',
27
27
  MutuallyDefined: 'MutuallyDefined',
28
- DomesticVat: 'DomesticVAT'
28
+ DomesticVat: 'DomesticVAT',
29
29
  };
@@ -13,5 +13,5 @@
13
13
  */
14
14
  export const TaxRegistrationDetailsTaxRegistrationTypeEnum = {
15
15
  Vat: 'VAT',
16
- Gst: 'GST'
16
+ Gst: 'GST',
17
17
  };
@@ -15,5 +15,5 @@ export const TotalWeightUnitOfMeasureEnum = {
15
15
  Pounds: 'POUNDS',
16
16
  Ounces: 'OUNCES',
17
17
  Grams: 'GRAMS',
18
- Kilograms: 'KILOGRAMS'
18
+ Kilograms: 'KILOGRAMS',
19
19
  };
@@ -28,7 +28,7 @@ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
28
28
  * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
29
29
  * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
30
30
  */
31
- export declare const replaceWithSerializableTypeIfNeeded: (key: any, value: any) => any;
31
+ export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
32
32
  export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
33
33
  export declare const toPathString: (url: URL) => string;
34
34
  export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@sp-api-sdk/vendor-invoices-api-v1",
3
3
  "author": "Bertrand Marron <bertrand@bizon.solutions>",
4
4
  "description": "The Selling Partner API for Retail Procurement Payments provides programmatic access to vendors payments data.",
5
- "version": "4.0.15",
5
+ "version": "4.0.17",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/es/index.js",
8
8
  "types": "dist/types/index.d.ts",
@@ -18,8 +18,8 @@
18
18
  "dist/**/*.d.ts"
19
19
  ],
20
20
  "dependencies": {
21
- "@sp-api-sdk/common": "2.1.29",
22
- "axios": "^1.13.5"
21
+ "@sp-api-sdk/common": "2.1.31",
22
+ "axios": "^1.15.2"
23
23
  },
24
24
  "repository": {
25
25
  "type": "git",
@@ -40,5 +40,5 @@
40
40
  "sp sdk",
41
41
  "vendor invoices api"
42
42
  ],
43
- "gitHead": "2c1fe783fb7c2204e7e19d4f85fa2bdf822e4593"
43
+ "gitHead": "cc3ed7e58346bf7a4110ed8f1353aae840f294e2"
44
44
  }