plaza-sdk 1.0.3 → 1.0.4
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.
- package/lib/cjs/modules/index.js +1 -1
- package/lib/cjs/modules/uzum-market-api/core/auth/api.d.ts +5 -0
- package/lib/cjs/modules/uzum-market-api/core/auth/api.js +1 -0
- package/lib/cjs/modules/uzum-market-api/core/auth/enums.d.ts +6 -0
- package/lib/cjs/modules/uzum-market-api/core/auth/enums.js +1 -0
- package/lib/cjs/modules/uzum-market-api/core/auth/index.d.ts +1 -0
- package/lib/cjs/modules/uzum-market-api/core/auth/index.js +1 -0
- package/lib/cjs/modules/uzum-market-api/core/auth/params.d.ts +4 -0
- package/lib/cjs/modules/uzum-market-api/core/auth/params.js +1 -0
- package/lib/cjs/modules/uzum-market-api/core/auth/types.d.ts +42 -0
- package/lib/cjs/modules/uzum-market-api/core/auth/types.js +1 -0
- package/lib/cjs/modules/uzum-market-api/index.d.ts +1 -0
- package/lib/cjs/modules/uzum-market-api/index.js +1 -1
- package/lib/esm/modules/index.js +1 -1
- package/lib/esm/modules/uzum-market-api/core/auth/api.d.ts +5 -0
- package/lib/esm/modules/uzum-market-api/core/auth/api.js +1 -0
- package/lib/esm/modules/uzum-market-api/core/auth/enums.d.ts +6 -0
- package/lib/esm/modules/uzum-market-api/core/auth/enums.js +1 -0
- package/lib/esm/modules/uzum-market-api/core/auth/index.d.ts +1 -0
- package/lib/esm/modules/uzum-market-api/core/auth/index.js +1 -0
- package/lib/esm/modules/uzum-market-api/core/auth/params.d.ts +4 -0
- package/lib/esm/modules/uzum-market-api/core/auth/params.js +1 -0
- package/lib/esm/modules/uzum-market-api/core/auth/types.d.ts +42 -0
- package/lib/esm/modules/uzum-market-api/core/auth/types.js +1 -0
- package/lib/esm/modules/uzum-market-api/index.d.ts +1 -0
- package/lib/esm/modules/uzum-market-api/index.js +1 -1
- package/package.json +1 -1
package/lib/cjs/modules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("./uzum-market-api/common/utils.js"),t=require("./uzum-market-api/core/auth/api.js"),r=require("./uzum-market-api/core/products/api.js");exports.pasteAuthHeader=e.pasteAuthHeader,exports.CheckToken=t.CheckToken,exports.GetToken=t.GetToken,exports.AddPromotion=r.AddPromotion,exports.ArchiveProduct=r.ArchiveProduct,exports.CheckSkuExists=r.CheckSkuExists,exports.CreateProduct=r.CreateProduct,exports.GetProduct=r.GetProduct,exports.InvolvedProductsList=r.InvolvedProductsList,exports.ProductDescription=r.ProductDescription,exports.ProductsList=r.ProductsList,exports.RemovePromotion=r.RemovePromotion,exports.SendSkuData=r.SendSkuData,exports.UnarchiveProduct=r.UnarchiveProduct;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CallerParam } from "@/common";
|
|
2
|
+
import * as Types from "./types";
|
|
3
|
+
import * as Params from "./params";
|
|
4
|
+
export declare const GetToken: CallerParam<Params.UsernamePassword, Types.AuthApi.GetToken.Response>;
|
|
5
|
+
export declare const CheckToken: CallerParam<string, Types.AuthApi.CheckToken.Response>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e={"content-type":"application/x-www-form-urlencoded",authorization:"Basic YjJiLWZyb250OmNsaWVudFNlY3JldA=="};exports.CheckToken=async(s,t)=>s.post("/auth/seller/check_token",{token:t},{headers:e}),exports.GetToken=async(s,t)=>s.post("/oauth/token",{grant_type:"password",username:t.username,password:t.password,referer:""},{headers:e});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var E;exports.AUTHORITIES=void 0,(E=exports.AUTHORITIES||(exports.AUTHORITIES={})).ROLE_CUSTOMER="ROLE_CUSTOMER",E.PHONE_VERIFIED="PHONE_VERIFIED",E.VERIFIED="VERIFIED",E.ROLE_SELLER="ROLE_SELLER";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./api";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./api.js");exports.CheckToken=e.CheckToken,exports.GetToken=e.GetToken;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AUTHORITIES } from "./enums";
|
|
2
|
+
export declare namespace AuthEntity {
|
|
3
|
+
type Authority = keyof typeof AUTHORITIES;
|
|
4
|
+
interface User {
|
|
5
|
+
user_name: string;
|
|
6
|
+
uzumCustomerId: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
locale: string;
|
|
9
|
+
authorities: AuthEntity.Authority[];
|
|
10
|
+
client_id: string;
|
|
11
|
+
segments: string[];
|
|
12
|
+
firstName: string;
|
|
13
|
+
accountId: number;
|
|
14
|
+
phoneNumber: string;
|
|
15
|
+
sellerId: number;
|
|
16
|
+
permissions: Record<string, number[]>;
|
|
17
|
+
scope: string[];
|
|
18
|
+
customerId: number;
|
|
19
|
+
registrationDate: string;
|
|
20
|
+
organizations: Record<string, {
|
|
21
|
+
role: string;
|
|
22
|
+
permissions: string[];
|
|
23
|
+
}>;
|
|
24
|
+
banned: boolean;
|
|
25
|
+
exp: number;
|
|
26
|
+
email: string;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export declare namespace AuthApi {
|
|
30
|
+
namespace GetToken {
|
|
31
|
+
interface Response {
|
|
32
|
+
access_token: string;
|
|
33
|
+
token_type: "bearer";
|
|
34
|
+
refresh_token: string;
|
|
35
|
+
expires_in: number;
|
|
36
|
+
scope: string;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
namespace CheckToken {
|
|
40
|
+
type Response = AuthEntity.User;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("./common/utils.js"),t=require("./core/auth/api.js"),o=require("./core/products/api.js");exports.pasteAuthHeader=e.pasteAuthHeader,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;
|
package/lib/esm/modules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{pasteAuthHeader}from"./uzum-market-api/common/utils.js";export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./uzum-market-api/core/products/api.js";
|
|
1
|
+
export{pasteAuthHeader}from"./uzum-market-api/common/utils.js";export{CheckToken,GetToken}from"./uzum-market-api/core/auth/api.js";export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./uzum-market-api/core/products/api.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CallerParam } from "@/common";
|
|
2
|
+
import * as Types from "./types";
|
|
3
|
+
import * as Params from "./params";
|
|
4
|
+
export declare const GetToken: CallerParam<Params.UsernamePassword, Types.AuthApi.GetToken.Response>;
|
|
5
|
+
export declare const CheckToken: CallerParam<string, Types.AuthApi.CheckToken.Response>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={"content-type":"application/x-www-form-urlencoded",authorization:"Basic YjJiLWZyb250OmNsaWVudFNlY3JldA=="},a=async(a,s)=>a.post("/oauth/token",{grant_type:"password",username:s.username,password:s.password,referer:""},{headers:e}),s=async(a,s)=>a.post("/auth/seller/check_token",{token:s},{headers:e});export{s as CheckToken,a as GetToken};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var E;!function(E){E.ROLE_CUSTOMER="ROLE_CUSTOMER",E.PHONE_VERIFIED="PHONE_VERIFIED",E.VERIFIED="VERIFIED",E.ROLE_SELLER="ROLE_SELLER"}(E||(E={}));export{E as AUTHORITIES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./api";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{CheckToken,GetToken}from"./api.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { AUTHORITIES } from "./enums";
|
|
2
|
+
export declare namespace AuthEntity {
|
|
3
|
+
type Authority = keyof typeof AUTHORITIES;
|
|
4
|
+
interface User {
|
|
5
|
+
user_name: string;
|
|
6
|
+
uzumCustomerId: string;
|
|
7
|
+
active: boolean;
|
|
8
|
+
locale: string;
|
|
9
|
+
authorities: AuthEntity.Authority[];
|
|
10
|
+
client_id: string;
|
|
11
|
+
segments: string[];
|
|
12
|
+
firstName: string;
|
|
13
|
+
accountId: number;
|
|
14
|
+
phoneNumber: string;
|
|
15
|
+
sellerId: number;
|
|
16
|
+
permissions: Record<string, number[]>;
|
|
17
|
+
scope: string[];
|
|
18
|
+
customerId: number;
|
|
19
|
+
registrationDate: string;
|
|
20
|
+
organizations: Record<string, {
|
|
21
|
+
role: string;
|
|
22
|
+
permissions: string[];
|
|
23
|
+
}>;
|
|
24
|
+
banned: boolean;
|
|
25
|
+
exp: number;
|
|
26
|
+
email: string;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export declare namespace AuthApi {
|
|
30
|
+
namespace GetToken {
|
|
31
|
+
interface Response {
|
|
32
|
+
access_token: string;
|
|
33
|
+
token_type: "bearer";
|
|
34
|
+
refresh_token: string;
|
|
35
|
+
expires_in: number;
|
|
36
|
+
scope: string;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
namespace CheckToken {
|
|
40
|
+
type Response = AuthEntity.User;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{pasteAuthHeader}from"./common/utils.js";export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./core/products/api.js";
|
|
1
|
+
export{pasteAuthHeader}from"./common/utils.js";export{CheckToken,GetToken}from"./core/auth/api.js";export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./core/products/api.js";
|