plaza-sdk 1.1.6 → 1.1.7
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/alif-shop-api/core/auth/api.js +1 -1
- package/lib/cjs/modules/alif-shop-api/core/auth/index.js +1 -1
- package/lib/cjs/modules/alif-shop-api/core/index.js +1 -1
- package/lib/cjs/modules/alif-shop-api/index.js +1 -1
- package/lib/cjs/modules/index.js +1 -1
- package/lib/cjs/modules/uzum-market-api/core/auth/api.js +1 -1
- package/lib/cjs/modules/uzum-market-api/core/auth/index.js +1 -1
- package/lib/cjs/modules/uzum-market-api/core/index.js +1 -1
- package/lib/cjs/modules/uzum-market-api/index.js +1 -1
- package/lib/esm/modules/alif-shop-api/core/auth/api.js +1 -1
- package/lib/esm/modules/alif-shop-api/core/auth/index.js +1 -1
- package/lib/esm/modules/alif-shop-api/core/index.js +1 -1
- package/lib/esm/modules/alif-shop-api/index.js +1 -1
- package/lib/esm/modules/index.js +1 -1
- package/lib/esm/modules/uzum-market-api/core/auth/api.js +1 -1
- package/lib/esm/modules/uzum-market-api/core/auth/index.js +1 -1
- package/lib/esm/modules/uzum-market-api/core/index.js +1 -1
- package/lib/esm/modules/uzum-market-api/index.js +1 -1
- package/lib/types/src/modules/alif-shop-api/core/auth/api.d.ts +3 -2
- package/lib/types/src/modules/alif-shop-api/core/auth/index.d.ts +1 -1
- package/lib/types/src/modules/alif-shop-api/core/auth/types.d.ts +14 -9
- package/lib/types/src/modules/alif-shop-api/core/index.d.ts +1 -1
- package/lib/types/src/modules/alif-shop-api/index.d.ts +1 -1
- package/lib/types/src/modules/index.d.ts +2 -2
- package/lib/types/src/modules/uzum-market-api/core/auth/api.d.ts +4 -3
- package/lib/types/src/modules/uzum-market-api/core/auth/index.d.ts +2 -2
- package/lib/types/src/modules/uzum-market-api/core/auth/params.d.ts +4 -4
- package/lib/types/src/modules/uzum-market-api/core/auth/types.d.ts +11 -7
- package/lib/types/src/modules/uzum-market-api/core/index.d.ts +2 -2
- package/lib/types/src/modules/uzum-market-api/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.GetToken=async(
|
|
1
|
+
"use strict";const e={"content-type":"application/x-www-form-urlencoded"};exports.GetToken=async(t,o)=>{const n={...o,grant_type:"password"};return t.post("/merchants/protocol/openid-connect/token",n,{headers:e})},exports.RefreshToken=async(t,o)=>{const n={...o,grant_type:"refresh_token"};return t.post("/merchants/protocol/openid-connect/token",n,{headers:e})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./api.js");exports.GetToken=e.GetToken;
|
|
1
|
+
"use strict";var e=require("./api.js");exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("./auth/api.js"),s=require("./applications/api.js");exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,exports.ApplicationsList=s.ApplicationsList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./core/auth/api.js"),
|
|
1
|
+
"use strict";var e=require("./core/auth/api.js"),s=require("./core/applications/api.js");exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,exports.ApplicationsList=s.ApplicationsList;
|
package/lib/cjs/modules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("./uzum-market-api/core/auth/api.js"),o=require("./uzum-market-api/core/products/api.js");exports.CheckToken=e.CheckToken,exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,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 +1 @@
|
|
|
1
|
-
"use strict";const e={"content-type":"application/x-www-form-urlencoded",authorization:"Basic YjJiLWZyb250OmNsaWVudFNlY3JldA=="};exports.CheckToken=async(
|
|
1
|
+
"use strict";const e={"content-type":"application/x-www-form-urlencoded",authorization:"Basic YjJiLWZyb250OmNsaWVudFNlY3JldA=="};exports.CheckToken=async(r,s)=>r.post("/auth/seller/check_token",{token:s},{headers:e}),exports.GetToken=async(r,s)=>r.post("/oauth/token",{grant_type:"password",username:s.username,password:s.password,referer:""},{headers:e}),exports.RefreshToken=async(r,s)=>r.post("/oauth/token",{grant_type:"refresh_token",refresh_token:s.refresh_token,referer:""},{headers:e});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./api.js");exports.CheckToken=e.CheckToken,exports.GetToken=e.GetToken;
|
|
1
|
+
"use strict";var e=require("./api.js");exports.CheckToken=e.CheckToken,exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("./auth/api.js"),o=require("./products/api.js");exports.CheckToken=e.CheckToken,exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,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 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("./core/auth/api.js"),o=require("./core/products/api.js");exports.CheckToken=e.CheckToken,exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,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 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t={"content-type":"application/x-www-form-urlencoded"},e=async(e,n)=>{const o={...n,grant_type:"password"};return e.post("/merchants/protocol/openid-connect/token",o,{headers:t})},n=async(e,n)=>{const o={...n,grant_type:"refresh_token"};return e.post("/merchants/protocol/openid-connect/token",o,{headers:t})};export{e as GetToken,n as RefreshToken};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{GetToken}from"./api.js";
|
|
1
|
+
export{GetToken,RefreshToken}from"./api.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{GetToken}from"./auth/api.js";export{ApplicationsList}from"./applications/api.js";
|
|
1
|
+
export{GetToken,RefreshToken}from"./auth/api.js";export{ApplicationsList}from"./applications/api.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{GetToken}from"./core/auth/api.js";export{ApplicationsList}from"./core/applications/api.js";
|
|
1
|
+
export{GetToken,RefreshToken}from"./core/auth/api.js";export{ApplicationsList}from"./core/applications/api.js";
|
package/lib/esm/modules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
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";
|
|
1
|
+
export{CheckToken,GetToken,RefreshToken}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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={"content-type":"application/x-www-form-urlencoded",authorization:"Basic YjJiLWZyb250OmNsaWVudFNlY3JldA=="},r=async(r,t)=>r.post("/oauth/token",{grant_type:
|
|
1
|
+
const e={"content-type":"application/x-www-form-urlencoded",authorization:"Basic YjJiLWZyb250OmNsaWVudFNlY3JldA=="},r=async(r,t)=>r.post("/oauth/token",{grant_type:"password",username:t.username,password:t.password,referer:""},{headers:e}),t=async(r,t)=>r.post("/oauth/token",{grant_type:"refresh_token",refresh_token:t.refresh_token,referer:""},{headers:e}),s=async(r,t)=>r.post("/auth/seller/check_token",{token:t},{headers:e});export{s as CheckToken,r as GetToken,t as RefreshToken};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CheckToken,GetToken}from"./api.js";
|
|
1
|
+
export{CheckToken,GetToken,RefreshToken}from"./api.js";
|
|
@@ -1 +1 @@
|
|
|
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
|
+
export{CheckToken,GetToken,RefreshToken}from"./auth/api.js";export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./products/api.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
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";
|
|
1
|
+
export{CheckToken,GetToken,RefreshToken}from"./core/auth/api.js";export{AddPromotion,ArchiveProduct,CheckSkuExists,CreateProduct,GetProduct,InvolvedProductsList,ProductDescription,ProductsList,RemovePromotion,SendSkuData,UnarchiveProduct}from"./core/products/api.js";
|
|
@@ -3,6 +3,7 @@ import { IAuth } from './types.js';
|
|
|
3
3
|
import 'axios';
|
|
4
4
|
import '../../../../common/params.js';
|
|
5
5
|
|
|
6
|
-
declare const GetToken: CallerPayload<IAuth.GetToken.Request, IAuth.
|
|
6
|
+
declare const GetToken: CallerPayload<IAuth.GetToken.Request, IAuth.CommonResponse>;
|
|
7
|
+
declare const RefreshToken: CallerPayload<IAuth.RefreshToken.Request, IAuth.CommonResponse>;
|
|
7
8
|
|
|
8
|
-
export { GetToken };
|
|
9
|
+
export { GetToken, RefreshToken };
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { UsernamePasswordParams } from '../../../../common/params.js';
|
|
2
2
|
|
|
3
3
|
declare namespace IAuth {
|
|
4
|
+
interface CommonResponse {
|
|
5
|
+
access_token: string;
|
|
6
|
+
expires_in: number;
|
|
7
|
+
refresh_expires_in: number;
|
|
8
|
+
refresh_token: string;
|
|
9
|
+
token_type: "Bearer" | (string & {});
|
|
10
|
+
"not-before-policy": number;
|
|
11
|
+
session_state: string;
|
|
12
|
+
scope: string;
|
|
13
|
+
}
|
|
4
14
|
namespace GetToken {
|
|
5
15
|
interface Request extends UsernamePasswordParams {
|
|
6
16
|
client_id: "merchant-frontend" | (string & {});
|
|
7
|
-
grant_type: "password" | "refresh_token" | (string & {});
|
|
8
17
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
18
|
+
}
|
|
19
|
+
namespace RefreshToken {
|
|
20
|
+
interface Request {
|
|
21
|
+
client_id: "merchant-frontend" | (string & {});
|
|
13
22
|
refresh_token: string;
|
|
14
|
-
token_type: "Bearer" | (string & {});
|
|
15
|
-
"not-before-policy": number;
|
|
16
|
-
session_state: string;
|
|
17
|
-
scope: string;
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { GetToken } from './auth/api.js';
|
|
1
|
+
export { GetToken, RefreshToken } from './auth/api.js';
|
|
2
2
|
export { IAuth } from './auth/types.js';
|
|
3
3
|
export { ApplicationsList } from './applications/api.js';
|
|
4
4
|
export { ApplicationsApi, ApplicationsEntity } from './applications/types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { GetToken } from './core/auth/api.js';
|
|
1
|
+
export { GetToken, RefreshToken } from './core/auth/api.js';
|
|
2
2
|
export { IAuth } from './core/auth/types.js';
|
|
3
3
|
export { ApplicationsList } from './core/applications/api.js';
|
|
4
4
|
export { ApplicationsApi, ApplicationsEntity } from './core/applications/types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CheckToken, GetToken } from './uzum-market-api/core/auth/api.js';
|
|
1
|
+
export { CheckToken, GetToken, RefreshToken } from './uzum-market-api/core/auth/api.js';
|
|
2
2
|
export { AuthApi, AuthEntity } from './uzum-market-api/core/auth/types.js';
|
|
3
|
-
export {
|
|
3
|
+
export { GetTokenParams, RefreshTokenParams } from './uzum-market-api/core/auth/params.js';
|
|
4
4
|
export { AddPromotion, ArchiveProduct, CheckSkuExists, CreateProduct, GetProduct, InvolvedProductsList, ProductDescription, ProductsList, RemovePromotion, SendSkuData, UnarchiveProduct } from './uzum-market-api/core/products/api.js';
|
|
5
5
|
export { IApi } from './uzum-market-api/core/products/types.js';
|
|
6
6
|
export { CorePaginationParams, InvolvedProductsParams, ProductIdBasedParams, ProductListParams, SkuBasedParams, SkuIdBasedParams, TokenAndShopId } from './uzum-market-api/core/products/params.js';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CallerParam } from '../../../../common/types.js';
|
|
2
2
|
import { AuthApi } from './types.js';
|
|
3
|
-
import {
|
|
3
|
+
import { GetTokenParams, RefreshTokenParams } from './params.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
import './enums.js';
|
|
6
6
|
import '../../../../common/params.js';
|
|
7
7
|
|
|
8
|
-
declare const GetToken: CallerParam<
|
|
8
|
+
declare const GetToken: CallerParam<GetTokenParams, AuthApi.GetToken.Response>;
|
|
9
|
+
declare const RefreshToken: CallerParam<RefreshTokenParams, AuthApi.RefreshToken.Response>;
|
|
9
10
|
declare const CheckToken: CallerParam<string, AuthApi.CheckToken.Response>;
|
|
10
11
|
|
|
11
|
-
export { CheckToken, GetToken };
|
|
12
|
+
export { CheckToken, GetToken, RefreshToken };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CheckToken, GetToken } from './api.js';
|
|
1
|
+
export { CheckToken, GetToken, RefreshToken } from './api.js';
|
|
2
2
|
export { AuthApi, AuthEntity } from './types.js';
|
|
3
|
-
export {
|
|
3
|
+
export { GetTokenParams, RefreshTokenParams } from './params.js';
|
|
4
4
|
import '../../../../common/types.js';
|
|
5
5
|
import 'axios';
|
|
6
6
|
import './enums.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UsernamePasswordParams } from '../../../../common/params.js';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
refresh_token
|
|
3
|
+
type GetTokenParams = UsernamePasswordParams;
|
|
4
|
+
interface RefreshTokenParams {
|
|
5
|
+
refresh_token: string;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export type {
|
|
8
|
+
export type { GetTokenParams, RefreshTokenParams };
|
|
@@ -28,14 +28,18 @@ declare namespace AuthEntity {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
declare namespace AuthApi {
|
|
31
|
+
interface CommonResponse {
|
|
32
|
+
access_token: string;
|
|
33
|
+
token_type: "bearer";
|
|
34
|
+
refresh_token: string;
|
|
35
|
+
expires_in: number;
|
|
36
|
+
scope: string;
|
|
37
|
+
}
|
|
31
38
|
namespace GetToken {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
expires_in: number;
|
|
37
|
-
scope: string;
|
|
38
|
-
}
|
|
39
|
+
type Response = CommonResponse;
|
|
40
|
+
}
|
|
41
|
+
namespace RefreshToken {
|
|
42
|
+
type Response = CommonResponse;
|
|
39
43
|
}
|
|
40
44
|
namespace CheckToken {
|
|
41
45
|
type Response = AuthEntity.User;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CheckToken, GetToken } from './auth/api.js';
|
|
1
|
+
export { CheckToken, GetToken, RefreshToken } from './auth/api.js';
|
|
2
2
|
export { AuthApi, AuthEntity } from './auth/types.js';
|
|
3
|
-
export {
|
|
3
|
+
export { GetTokenParams, RefreshTokenParams } from './auth/params.js';
|
|
4
4
|
export { AddPromotion, ArchiveProduct, CheckSkuExists, CreateProduct, GetProduct, InvolvedProductsList, ProductDescription, ProductsList, RemovePromotion, SendSkuData, UnarchiveProduct } from './products/api.js';
|
|
5
5
|
export { IApi } from './products/types.js';
|
|
6
6
|
export { CorePaginationParams, InvolvedProductsParams, ProductIdBasedParams, ProductListParams, SkuBasedParams, SkuIdBasedParams, TokenAndShopId } from './products/params.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CheckToken, GetToken } from './core/auth/api.js';
|
|
1
|
+
export { CheckToken, GetToken, RefreshToken } from './core/auth/api.js';
|
|
2
2
|
export { AuthApi, AuthEntity } from './core/auth/types.js';
|
|
3
|
-
export {
|
|
3
|
+
export { GetTokenParams, RefreshTokenParams } from './core/auth/params.js';
|
|
4
4
|
export { AddPromotion, ArchiveProduct, CheckSkuExists, CreateProduct, GetProduct, InvolvedProductsList, ProductDescription, ProductsList, RemovePromotion, SendSkuData, UnarchiveProduct } from './core/products/api.js';
|
|
5
5
|
export { IApi } from './core/products/types.js';
|
|
6
6
|
export { CorePaginationParams, InvolvedProductsParams, ProductIdBasedParams, ProductListParams, SkuBasedParams, SkuIdBasedParams, TokenAndShopId } from './core/products/params.js';
|