plaza-sdk 1.0.4 → 1.1.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.
Files changed (41) hide show
  1. package/lib/cjs/common/index.d.ts +1 -0
  2. package/lib/cjs/{modules/uzum-market-api/core/auth → common}/params.d.ts +1 -1
  3. package/lib/cjs/common/params.js +1 -0
  4. package/lib/cjs/modules/alif-shop-api/common/interfaces.js +1 -0
  5. package/lib/cjs/modules/alif-shop-api/common/types.js +1 -0
  6. package/lib/cjs/modules/alif-shop-api/common/utils.js +1 -0
  7. package/lib/cjs/modules/alif-shop-api/core/auth/api.d.ts +3 -0
  8. package/lib/cjs/modules/alif-shop-api/core/auth/api.js +1 -0
  9. package/lib/cjs/modules/alif-shop-api/core/auth/index.d.ts +1 -0
  10. package/lib/cjs/modules/alif-shop-api/core/auth/index.js +1 -0
  11. package/lib/cjs/modules/alif-shop-api/core/auth/types.d.ts +14 -0
  12. package/lib/cjs/modules/alif-shop-api/core/auth/types.js +1 -0
  13. package/lib/cjs/modules/alif-shop-api/core/index.d.ts +1 -0
  14. package/lib/cjs/modules/alif-shop-api/core/index.js +1 -0
  15. package/lib/cjs/modules/alif-shop-api/index.d.ts +1 -0
  16. package/lib/cjs/modules/alif-shop-api/index.js +1 -0
  17. package/lib/cjs/modules/uzum-market-api/core/auth/api.d.ts +2 -3
  18. package/lib/cjs/modules/uzum-market-api/core/index.d.ts +1 -0
  19. package/lib/cjs/modules/uzum-market-api/core/index.js +1 -1
  20. package/lib/cjs/modules/uzum-market-api/index.d.ts +1 -2
  21. package/lib/esm/common/index.d.ts +1 -0
  22. package/lib/esm/{modules/uzum-market-api/core/auth → common}/params.d.ts +1 -1
  23. package/lib/esm/common/params.js +1 -0
  24. package/lib/esm/modules/alif-shop-api/common/interfaces.js +1 -0
  25. package/lib/esm/modules/alif-shop-api/common/types.js +1 -0
  26. package/lib/esm/modules/alif-shop-api/common/utils.js +1 -0
  27. package/lib/esm/modules/alif-shop-api/core/auth/api.d.ts +3 -0
  28. package/lib/esm/modules/alif-shop-api/core/auth/api.js +1 -0
  29. package/lib/esm/modules/alif-shop-api/core/auth/index.d.ts +1 -0
  30. package/lib/esm/modules/alif-shop-api/core/auth/index.js +1 -0
  31. package/lib/esm/modules/alif-shop-api/core/auth/types.d.ts +14 -0
  32. package/lib/esm/modules/alif-shop-api/core/auth/types.js +1 -0
  33. package/lib/esm/modules/alif-shop-api/core/index.d.ts +1 -0
  34. package/lib/esm/modules/alif-shop-api/core/index.js +1 -0
  35. package/lib/esm/modules/alif-shop-api/index.d.ts +1 -0
  36. package/lib/esm/modules/alif-shop-api/index.js +1 -0
  37. package/lib/esm/modules/uzum-market-api/core/auth/api.d.ts +2 -3
  38. package/lib/esm/modules/uzum-market-api/core/index.d.ts +1 -0
  39. package/lib/esm/modules/uzum-market-api/core/index.js +1 -1
  40. package/lib/esm/modules/uzum-market-api/index.d.ts +1 -2
  41. package/package.json +13 -10
@@ -1,3 +1,4 @@
1
1
  export * from "./types";
2
2
  export * from "./utils";
3
+ export * from "./params";
3
4
  export * from "./interfaces";
@@ -1,4 +1,4 @@
1
- export interface UsernamePassword {
1
+ export interface UsernamePasswordParams {
2
2
  username: string;
3
3
  password: string;
4
4
  }
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,3 @@
1
+ import { CallerPayload, UsernamePasswordParams } from "@/common";
2
+ import * as Types from "./types";
3
+ export declare const GetToken: CallerPayload<UsernamePasswordParams, Types.IAuth.GetToken.Response>;
@@ -0,0 +1 @@
1
+ "use strict";exports.GetToken=async(e,n)=>{const t={username:n.username,password:n.password,client_id:"merchant-frontend",grant_type:"password"};return e.post("/merchants/protocol/openid-connect/token",t,{headers:{"content-type":"application/x-www-form-urlencoded"}})};
@@ -0,0 +1 @@
1
+ export * from "./api";
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./api.js");exports.GetToken=e.GetToken;
@@ -0,0 +1,14 @@
1
+ export declare namespace IAuth {
2
+ namespace GetToken {
3
+ interface Response {
4
+ access_token: string;
5
+ expires_in: number;
6
+ refresh_expires_in: number;
7
+ refresh_token: string;
8
+ token_type: "Bearer" & (string & {});
9
+ "not-before-policy": number;
10
+ session_state: string;
11
+ scope: string;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ export * from "./auth";
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./auth/api.js");exports.GetToken=e.GetToken;
@@ -0,0 +1 @@
1
+ export * from "./core";
@@ -0,0 +1 @@
1
+ "use strict";var e=require("./core/auth/api.js");exports.GetToken=e.GetToken;
@@ -1,5 +1,4 @@
1
- import { CallerParam } from "@/common";
1
+ import { CallerParam, UsernamePasswordParams } from "@/common";
2
2
  import * as Types from "./types";
3
- import * as Params from "./params";
4
- export declare const GetToken: CallerParam<Params.UsernamePassword, Types.AuthApi.GetToken.Response>;
3
+ export declare const GetToken: CallerParam<UsernamePasswordParams, Types.AuthApi.GetToken.Response>;
5
4
  export declare const CheckToken: CallerParam<string, Types.AuthApi.CheckToken.Response>;
@@ -1 +1,2 @@
1
+ export * from "./auth";
1
2
  export * from "./products";
@@ -1 +1 @@
1
- "use strict";var t=require("./products/api.js");exports.AddPromotion=t.AddPromotion,exports.ArchiveProduct=t.ArchiveProduct,exports.CheckSkuExists=t.CheckSkuExists,exports.CreateProduct=t.CreateProduct,exports.GetProduct=t.GetProduct,exports.InvolvedProductsList=t.InvolvedProductsList,exports.ProductDescription=t.ProductDescription,exports.ProductsList=t.ProductsList,exports.RemovePromotion=t.RemovePromotion,exports.SendSkuData=t.SendSkuData,exports.UnarchiveProduct=t.UnarchiveProduct;
1
+ "use strict";var t=require("./auth/api.js"),o=require("./products/api.js");exports.CheckToken=t.CheckToken,exports.GetToken=t.GetToken,exports.AddPromotion=o.AddPromotion,exports.ArchiveProduct=o.ArchiveProduct,exports.CheckSkuExists=o.CheckSkuExists,exports.CreateProduct=o.CreateProduct,exports.GetProduct=o.GetProduct,exports.InvolvedProductsList=o.InvolvedProductsList,exports.ProductDescription=o.ProductDescription,exports.ProductsList=o.ProductsList,exports.RemovePromotion=o.RemovePromotion,exports.SendSkuData=o.SendSkuData,exports.UnarchiveProduct=o.UnarchiveProduct;
@@ -1,3 +1,2 @@
1
1
  export * from "./common/utils";
2
- export * from "./core/auth";
3
- export * from "./core/products";
2
+ export * from "./core";
@@ -1,3 +1,4 @@
1
1
  export * from "./types";
2
2
  export * from "./utils";
3
+ export * from "./params";
3
4
  export * from "./interfaces";
@@ -1,4 +1,4 @@
1
- export interface UsernamePassword {
1
+ export interface UsernamePasswordParams {
2
2
  username: string;
3
3
  password: string;
4
4
  }
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,3 @@
1
+ import { CallerPayload, UsernamePasswordParams } from "@/common";
2
+ import * as Types from "./types";
3
+ export declare const GetToken: CallerPayload<UsernamePasswordParams, Types.IAuth.GetToken.Response>;
@@ -0,0 +1 @@
1
+ const e=async(e,n)=>{const o={username:n.username,password:n.password,client_id:"merchant-frontend",grant_type:"password"};return e.post("/merchants/protocol/openid-connect/token",o,{headers:{"content-type":"application/x-www-form-urlencoded"}})};export{e as GetToken};
@@ -0,0 +1 @@
1
+ export * from "./api";
@@ -0,0 +1 @@
1
+ export{GetToken}from"./api.js";
@@ -0,0 +1,14 @@
1
+ export declare namespace IAuth {
2
+ namespace GetToken {
3
+ interface Response {
4
+ access_token: string;
5
+ expires_in: number;
6
+ refresh_expires_in: number;
7
+ refresh_token: string;
8
+ token_type: "Bearer" & (string & {});
9
+ "not-before-policy": number;
10
+ session_state: string;
11
+ scope: string;
12
+ }
13
+ }
14
+ }
@@ -0,0 +1 @@
1
+ export * from "./auth";
@@ -0,0 +1 @@
1
+ export{GetToken}from"./auth/api.js";
@@ -0,0 +1 @@
1
+ export * from "./core";
@@ -0,0 +1 @@
1
+ export{GetToken}from"./core/auth/api.js";
@@ -1,5 +1,4 @@
1
- import { CallerParam } from "@/common";
1
+ import { CallerParam, UsernamePasswordParams } from "@/common";
2
2
  import * as Types from "./types";
3
- import * as Params from "./params";
4
- export declare const GetToken: CallerParam<Params.UsernamePassword, Types.AuthApi.GetToken.Response>;
3
+ export declare const GetToken: CallerParam<UsernamePasswordParams, Types.AuthApi.GetToken.Response>;
5
4
  export declare const CheckToken: CallerParam<string, Types.AuthApi.CheckToken.Response>;
@@ -1 +1,2 @@
1
+ export * from "./auth";
1
2
  export * from "./products";
@@ -1 +1 @@
1
- export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./products/api.js";
1
+ export{CheckToken,GetToken}from"./auth/api.js";export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./products/api.js";
@@ -1,3 +1,2 @@
1
1
  export * from "./common/utils";
2
- export * from "./core/auth";
3
- export * from "./core/products";
2
+ export * from "./core";
package/package.json CHANGED
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "name": "plaza-sdk",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "outputDir": "./lib",
5
5
  "exports": {
6
- "import": {
7
- "types": "./lib/esm/index.d.ts",
8
- "default": "./lib/esm/index.js",
9
- "uzum-market": "./lib/esm/modules/uzum-market-api/index.js"
6
+ ".": {
7
+ "import": "./lib/esm/index.js",
8
+ "require": "./lib/cjs/index.js"
10
9
  },
11
- "require": {
12
- "types": "./lib/cjs/index.d.ts",
13
- "default": "./lib/cjs/index.js",
14
- "uzum-market": "./lib/cjs/modules/uzum-market-api/index.js"
10
+ "./uzum-market": {
11
+ "import": "./lib/esm/modules/uzum-market-api/index.js",
12
+ "require": "./lib/cjs/modules/uzum-market-api/index.js"
15
13
  },
16
- "types": "./lib/esm/index.d.ts"
14
+ "./alif-shop": {
15
+ "import": "./lib/esm/modules/alif-shop-api/index.js",
16
+ "require": "./lib/cjs/modules/alif-shop-api/index.js"
17
+ }
17
18
  },
19
+ "types": "./lib/esm/index.d.ts",
18
20
  "main": "lib/cjs/index.js",
19
21
  "module": "lib/esm/index.js",
20
22
  "files": [
@@ -32,6 +34,7 @@
32
34
  "publishConfig": {
33
35
  "access": "public"
34
36
  },
37
+ "sideEffects": false,
35
38
  "engines": {
36
39
  "npm": "please-use-yarn",
37
40
  "yarn": ">= 1",