plaza-sdk 1.5.2 → 1.6.1

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.
Files changed (33) hide show
  1. package/lib/browser/bundle.iife.js +1 -1
  2. package/lib/browser/bundle.umd.js +1 -1
  3. package/lib/cjs/common/index.js +1 -1
  4. package/lib/cjs/common/utils.js +1 -1
  5. package/lib/cjs/index.js +1 -1
  6. package/lib/cjs/modules/uzum-market-openapi/common/types.js +1 -0
  7. package/lib/cjs/modules/uzum-market-openapi/core/fbs/api.js +1 -0
  8. package/lib/cjs/modules/uzum-market-openapi/core/fbs/index.js +1 -0
  9. package/lib/cjs/modules/uzum-market-openapi/core/fbs/params.js +1 -0
  10. package/lib/cjs/modules/uzum-market-openapi/core/fbs/types.js +1 -0
  11. package/lib/cjs/modules/uzum-market-openapi/core/index.js +1 -0
  12. package/lib/cjs/modules/uzum-market-openapi/index.js +1 -0
  13. package/lib/esm/common/index.js +1 -1
  14. package/lib/esm/common/utils.js +1 -1
  15. package/lib/esm/index.js +1 -1
  16. package/lib/esm/modules/uzum-market-openapi/common/types.js +1 -0
  17. package/lib/esm/modules/uzum-market-openapi/core/fbs/api.js +1 -0
  18. package/lib/esm/modules/uzum-market-openapi/core/fbs/index.js +1 -0
  19. package/lib/esm/modules/uzum-market-openapi/core/fbs/params.js +1 -0
  20. package/lib/esm/modules/uzum-market-openapi/core/fbs/types.js +1 -0
  21. package/lib/esm/modules/uzum-market-openapi/core/index.js +1 -0
  22. package/lib/esm/modules/uzum-market-openapi/index.js +1 -0
  23. package/lib/types/src/common/index.d.ts +1 -1
  24. package/lib/types/src/common/utils.d.ts +4 -1
  25. package/lib/types/src/index.d.ts +1 -1
  26. package/lib/types/src/modules/uzum-market-openapi/common/types.d.ts +2 -0
  27. package/lib/types/src/modules/uzum-market-openapi/core/fbs/api.d.ts +9 -0
  28. package/lib/types/src/modules/uzum-market-openapi/core/fbs/index.d.ts +5 -0
  29. package/lib/types/src/modules/uzum-market-openapi/core/fbs/params.d.ts +2 -0
  30. package/lib/types/src/modules/uzum-market-openapi/core/fbs/types.d.ts +37 -0
  31. package/lib/types/src/modules/uzum-market-openapi/core/index.d.ts +5 -0
  32. package/lib/types/src/modules/uzum-market-openapi/index.d.ts +5 -0
  33. package/package.json +6 -1
@@ -1 +1 @@
1
- var plazaSdk=function(t){"use strict";return t.bindHttp=function(t,r){return(...e)=>t(r,...e)},t.getNumber=(t,r=0)=>{if("number"==typeof t)return t;if("string"==typeof t){const e=parseFloat(t);return isNaN(e)?r:e}return r},t.pasteAuthHeader=t=>({...t?{Authorization:`Bearer ${t}`}:{}}),t.pasteAuthHeaderAndApikey=(t,r="2qHIakuLe5",e="apikey")=>({...t?{Authorization:`Bearer ${t}`}:{},[e]:r,locale:"ru"}),t.withHttp=function(t,r){return(...e)=>t(r,...e)},t.wrapWithHttp=t=>r=>(...e)=>r(t,...e),t}({});
1
+ var plazaSdk=function(t){"use strict";return t.bindHttp=function(t,e){return(...r)=>t(e,...r)},t.getNumber=(t,e=0)=>{if("number"==typeof t)return t;if("string"==typeof t){const r=parseFloat(t);return isNaN(r)?e:r}return e},t.pasteAuthHeader=t=>({...t?{Authorization:`Bearer ${t}`}:{}}),t.pasteAuthHeaderAndApikey=(t,e="2qHIakuLe5",r="apikey")=>({...t?{Authorization:`Bearer ${t}`}:{},[r]:e,locale:"ru"}),t.pasteAuthHeaderWithoutAccessKey=t=>({...t?{Authorization:t}:{}}),t.withHttp=function(t,e){return(...r)=>t(e,...r)},t.wrapWithHttp=t=>e=>(...r)=>e(t,...r),t}({});
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).plazaSdk={})}(this,function(e){"use strict";e.bindHttp=function(e,t){return(...n)=>e(t,...n)},e.getNumber=(e,t=0)=>{if("number"==typeof e)return e;if("string"==typeof e){const n=parseFloat(e);return isNaN(n)?t:n}return t},e.pasteAuthHeader=e=>({...e?{Authorization:`Bearer ${e}`}:{}}),e.pasteAuthHeaderAndApikey=(e,t="2qHIakuLe5",n="apikey")=>({...e?{Authorization:`Bearer ${e}`}:{},[n]:t,locale:"ru"}),e.withHttp=function(e,t){return(...n)=>e(t,...n)},e.wrapWithHttp=e=>t=>(...n)=>t(e,...n)});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).plazaSdk={})}(this,function(e){"use strict";e.bindHttp=function(e,t){return(...i)=>e(t,...i)},e.getNumber=(e,t=0)=>{if("number"==typeof e)return e;if("string"==typeof e){const i=parseFloat(e);return isNaN(i)?t:i}return t},e.pasteAuthHeader=e=>({...e?{Authorization:`Bearer ${e}`}:{}}),e.pasteAuthHeaderAndApikey=(e,t="2qHIakuLe5",i="apikey")=>({...e?{Authorization:`Bearer ${e}`}:{},[i]:t,locale:"ru"}),e.pasteAuthHeaderWithoutAccessKey=e=>({...e?{Authorization:e}:{}}),e.withHttp=function(e,t){return(...i)=>e(t,...i)},e.wrapWithHttp=e=>t=>(...i)=>t(e,...i)});
@@ -1 +1 @@
1
- "use strict";var t=require("./utils.js");exports.bindHttp=t.bindHttp,exports.getNumber=t.getNumber,exports.pasteAuthHeader=t.pasteAuthHeader,exports.pasteAuthHeaderAndApikey=t.pasteAuthHeaderAndApikey,exports.withHttp=t.withHttp,exports.wrapWithHttp=t.wrapWithHttp;
1
+ "use strict";var t=require("./utils.js");exports.bindHttp=t.bindHttp,exports.getNumber=t.getNumber,exports.pasteAuthHeader=t.pasteAuthHeader,exports.pasteAuthHeaderAndApikey=t.pasteAuthHeaderAndApikey,exports.pasteAuthHeaderWithoutAccessKey=t.pasteAuthHeaderWithoutAccessKey,exports.withHttp=t.withHttp,exports.wrapWithHttp=t.wrapWithHttp;
@@ -1 +1 @@
1
- "use strict";exports.bindHttp=function(t,e){return(...r)=>t(e,...r)},exports.getNumber=(t,e=0)=>{if("number"==typeof t)return t;if("string"==typeof t){const r=parseFloat(t);return isNaN(r)?e:r}return e},exports.pasteAuthHeader=t=>({...t?{Authorization:`Bearer ${t}`}:{}}),exports.pasteAuthHeaderAndApikey=(t,e="2qHIakuLe5",r="apikey")=>({...t?{Authorization:`Bearer ${t}`}:{},[r]:e,locale:"ru"}),exports.withHttp=function(t,e){return(...r)=>t(e,...r)},exports.wrapWithHttp=t=>e=>(...r)=>e(t,...r);
1
+ "use strict";exports.bindHttp=function(t,e){return(...r)=>t(e,...r)},exports.getNumber=(t,e=0)=>{if("number"==typeof t)return t;if("string"==typeof t){const r=parseFloat(t);return isNaN(r)?e:r}return e},exports.pasteAuthHeader=t=>({...t?{Authorization:`Bearer ${t}`}:{}}),exports.pasteAuthHeaderAndApikey=(t,e="2qHIakuLe5",r="apikey")=>({...t?{Authorization:`Bearer ${t}`}:{},[r]:e,locale:"ru"}),exports.pasteAuthHeaderWithoutAccessKey=t=>({...t?{Authorization:t}:{}}),exports.withHttp=function(t,e){return(...r)=>t(e,...r)},exports.wrapWithHttp=t=>e=>(...r)=>e(t,...r);
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var t=require("./common/utils.js");exports.bindHttp=t.bindHttp,exports.getNumber=t.getNumber,exports.pasteAuthHeader=t.pasteAuthHeader,exports.pasteAuthHeaderAndApikey=t.pasteAuthHeaderAndApikey,exports.withHttp=t.withHttp,exports.wrapWithHttp=t.wrapWithHttp;
1
+ "use strict";var t=require("./common/utils.js");exports.bindHttp=t.bindHttp,exports.getNumber=t.getNumber,exports.pasteAuthHeader=t.pasteAuthHeader,exports.pasteAuthHeaderAndApikey=t.pasteAuthHeaderAndApikey,exports.pasteAuthHeaderWithoutAccessKey=t.pasteAuthHeaderWithoutAccessKey,exports.withHttp=t.withHttp,exports.wrapWithHttp=t.wrapWithHttp;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";var s=require("../../../../common/utils.js");exports.EditFbsStocks=(e,t,o)=>e.post("/seller-openapi/v2/fbs/sku/stocks",{...o},{headers:s.pasteAuthHeaderWithoutAccessKey(t?.token)}),exports.FbsStocksList=(e,t)=>e.get("/seller-openapi/v2/fbs/sku/stocks",{headers:s.pasteAuthHeaderWithoutAccessKey(t?.token)});
@@ -0,0 +1 @@
1
+ "use strict";var s=require("./api.js");exports.EditFbsStocks=s.EditFbsStocks,exports.FbsStocksList=s.FbsStocksList;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";var s=require("./fbs/api.js");exports.EditFbsStocks=s.EditFbsStocks,exports.FbsStocksList=s.FbsStocksList;
@@ -0,0 +1 @@
1
+ "use strict";var s=require("./core/fbs/api.js");exports.EditFbsStocks=s.EditFbsStocks,exports.FbsStocksList=s.FbsStocksList;
@@ -1 +1 @@
1
- export{bindHttp,getNumber,pasteAuthHeader,pasteAuthHeaderAndApikey,withHttp,wrapWithHttp}from"./utils.js";
1
+ export{bindHttp,getNumber,pasteAuthHeader,pasteAuthHeaderAndApikey,pasteAuthHeaderWithoutAccessKey,withHttp,wrapWithHttp}from"./utils.js";
@@ -1 +1 @@
1
- const r=(r,t=0)=>{if("number"==typeof r)return r;if("string"==typeof r){const e=parseFloat(r);return isNaN(e)?t:e}return t},t=r=>({...r?{Authorization:`Bearer ${r}`}:{}}),e=(r,t="2qHIakuLe5",e="apikey")=>({...r?{Authorization:`Bearer ${r}`}:{},[e]:t,locale:"ru"});function n(r,t){return(...e)=>r(t,...e)}const o=r=>t=>(...e)=>t(r,...e);function u(r,t){return(...e)=>r(t,...e)}export{n as bindHttp,r as getNumber,t as pasteAuthHeader,e as pasteAuthHeaderAndApikey,u as withHttp,o as wrapWithHttp};
1
+ const r=(r,t=0)=>{if("number"==typeof r)return r;if("string"==typeof r){const e=parseFloat(r);return isNaN(e)?t:e}return t},t=r=>({...r?{Authorization:`Bearer ${r}`}:{}}),e=r=>({...r?{Authorization:r}:{}}),n=(r,t="2qHIakuLe5",e="apikey")=>({...r?{Authorization:`Bearer ${r}`}:{},[e]:t,locale:"ru"});function o(r,t){return(...e)=>r(t,...e)}const i=r=>t=>(...e)=>t(r,...e);function u(r,t){return(...e)=>r(t,...e)}export{o as bindHttp,r as getNumber,t as pasteAuthHeader,n as pasteAuthHeaderAndApikey,e as pasteAuthHeaderWithoutAccessKey,u as withHttp,i as wrapWithHttp};
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- export{bindHttp,getNumber,pasteAuthHeader,pasteAuthHeaderAndApikey,withHttp,wrapWithHttp}from"./common/utils.js";
1
+ export{bindHttp,getNumber,pasteAuthHeader,pasteAuthHeaderAndApikey,pasteAuthHeaderWithoutAccessKey,withHttp,wrapWithHttp}from"./common/utils.js";
@@ -0,0 +1 @@
1
+ import{pasteAuthHeaderWithoutAccessKey as s}from"../../../../common/utils.js";const e=(e,o)=>e.get("/seller-openapi/v2/fbs/sku/stocks",{headers:s(o?.token)}),o=(e,o,t)=>e.post("/seller-openapi/v2/fbs/sku/stocks",{...t},{headers:s(o?.token)});export{o as EditFbsStocks,e as FbsStocksList};
@@ -0,0 +1 @@
1
+ export{EditFbsStocks,FbsStocksList}from"./api.js";
@@ -0,0 +1 @@
1
+ export{EditFbsStocks,FbsStocksList}from"./fbs/api.js";
@@ -0,0 +1 @@
1
+ export{EditFbsStocks,FbsStocksList}from"./core/fbs/api.js";
@@ -1,5 +1,5 @@
1
1
  export { BooleanNullable, BoundFunction, CallerNoParam, CallerParam, CallerParamPayload, CallerPayload, NumberNullable, NumberRange, StringNullable, TailParameters } from './types.js';
2
- export { bindHttp, getNumber, pasteAuthHeader, pasteAuthHeaderAndApikey, withHttp, wrapWithHttp } from './utils.js';
2
+ export { bindHttp, getNumber, pasteAuthHeader, pasteAuthHeaderAndApikey, pasteAuthHeaderWithoutAccessKey, withHttp, wrapWithHttp } from './utils.js';
3
3
  export { SlugParams, TokenParams, UsernamePasswordParams } from './params.js';
4
4
  export { IMultiLang, IMultiLangArray } from './interfaces.js';
5
5
  import 'axios';
@@ -5,6 +5,9 @@ declare const getNumber: (value: unknown, defaultValue?: number) => number;
5
5
  declare const pasteAuthHeader: (token?: string) => {
6
6
  Authorization?: string | undefined;
7
7
  };
8
+ declare const pasteAuthHeaderWithoutAccessKey: (token?: string) => {
9
+ Authorization?: string | undefined;
10
+ };
8
11
  declare const pasteAuthHeaderAndApikey: (token?: string, apikey?: string, apikeyFieldName?: string) => {
9
12
  locale: string;
10
13
  Authorization?: string | undefined;
@@ -13,4 +16,4 @@ declare function bindHttp<F extends (http: AxiosInstance, ...args: any[]) => any
13
16
  declare const wrapWithHttp: (http: AxiosInstance) => <F extends (http: AxiosInstance, ...args: any[]) => any>(fn: F) => (...args: TailParameters<F>) => ReturnType<F>;
14
17
  declare function withHttp<H extends AxiosInstance, A extends any[], R>(fn: (http: H, ...args: A) => R, http: H): (...args: A) => R;
15
18
 
16
- export { bindHttp, getNumber, pasteAuthHeader, pasteAuthHeaderAndApikey, withHttp, wrapWithHttp };
19
+ export { bindHttp, getNumber, pasteAuthHeader, pasteAuthHeaderAndApikey, pasteAuthHeaderWithoutAccessKey, withHttp, wrapWithHttp };
@@ -1,5 +1,5 @@
1
1
  export { BooleanNullable, BoundFunction, CallerNoParam, CallerParam, CallerParamPayload, CallerPayload, NumberNullable, NumberRange, StringNullable, TailParameters } from './common/types.js';
2
- export { bindHttp, getNumber, pasteAuthHeader, pasteAuthHeaderAndApikey, withHttp, wrapWithHttp } from './common/utils.js';
2
+ export { bindHttp, getNumber, pasteAuthHeader, pasteAuthHeaderAndApikey, pasteAuthHeaderWithoutAccessKey, withHttp, wrapWithHttp } from './common/utils.js';
3
3
  export { SlugParams, TokenParams, UsernamePasswordParams } from './common/params.js';
4
4
  export { IMultiLang, IMultiLangArray } from './common/interfaces.js';
5
5
  import 'axios';
@@ -0,0 +1,9 @@
1
+ import { FbsApi } from './types.js';
2
+ import { CallerParam, CallerParamPayload } from '../../../../common/types.js';
3
+ import { TokenParams } from '../../../../common/params.js';
4
+ import 'axios';
5
+
6
+ declare const FbsStocksList: CallerParam<TokenParams, FbsApi.FbsStocksList.Response>;
7
+ declare const EditFbsStocks: CallerParamPayload<TokenParams, FbsApi.EditFbsStocks.Request, FbsApi.EditFbsStocks.Response>;
8
+
9
+ export { EditFbsStocks, FbsStocksList };
@@ -0,0 +1,5 @@
1
+ export { EditFbsStocks, FbsStocksList } from './api.js';
2
+ export { FbsApi, FbsEntity } from './types.js';
3
+ import '../../../../common/types.js';
4
+ import 'axios';
5
+ import '../../../../common/params.js';
@@ -0,0 +1,37 @@
1
+ declare namespace FbsEntity {
2
+ interface SkuAmountItem {
3
+ skuId: number;
4
+ skuTitle: string;
5
+ productTitle: string;
6
+ barcode: string;
7
+ amount: number;
8
+ fbsAllowed: boolean;
9
+ dbsAllowed: boolean;
10
+ fbsLinked: boolean;
11
+ dbsLinked: boolean;
12
+ }
13
+ }
14
+ declare namespace FbsApi {
15
+ namespace FbsStocksList {
16
+ interface Response {
17
+ payload: {
18
+ skuAmountList: FbsEntity.SkuAmountItem[];
19
+ };
20
+ timestamp: string;
21
+ }
22
+ }
23
+ namespace EditFbsStocks {
24
+ interface Request {
25
+ skuAmountList: Partial<Omit<FbsEntity.SkuAmountItem, "fbsAllowed" | "dbsAllowed">>[];
26
+ }
27
+ interface Response {
28
+ payload: {
29
+ totalRecords: number;
30
+ updatedRecords: number;
31
+ };
32
+ timestamp: string;
33
+ }
34
+ }
35
+ }
36
+
37
+ export { FbsApi, FbsEntity };
@@ -0,0 +1,5 @@
1
+ export { EditFbsStocks, FbsStocksList } from './fbs/api.js';
2
+ export { FbsApi, FbsEntity } from './fbs/types.js';
3
+ import '../../../common/types.js';
4
+ import 'axios';
5
+ import '../../../common/params.js';
@@ -0,0 +1,5 @@
1
+ export { EditFbsStocks, FbsStocksList } from './core/fbs/api.js';
2
+ export { FbsApi, FbsEntity } from './core/fbs/types.js';
3
+ import '../../common/types.js';
4
+ import 'axios';
5
+ import '../../common/params.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plaza-sdk",
3
- "version": "1.5.2",
3
+ "version": "1.6.1",
4
4
  "outputDir": "./lib",
5
5
  "exports": {
6
6
  ".": {
@@ -13,6 +13,11 @@
13
13
  "import": "./lib/esm/modules/uzum-market-api/index.js",
14
14
  "require": "./lib/cjs/modules/uzum-market-api/index.js"
15
15
  },
16
+ "./uzum-market-openapi": {
17
+ "types": "./lib/types/src/modules/uzum-market-openapi/index.d.ts",
18
+ "import": "./lib/esm/modules/uzum-market-openapi/index.js",
19
+ "require": "./lib/cjs/modules/uzum-market-openapi/index.js"
20
+ },
16
21
  "./alif-shop": {
17
22
  "types": "./lib/types/src/modules/alif-shop-api/index.d.ts",
18
23
  "import": "./lib/esm/modules/alif-shop-api/index.js",