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.
Files changed (31) hide show
  1. package/lib/cjs/modules/alif-shop-api/core/auth/api.js +1 -1
  2. package/lib/cjs/modules/alif-shop-api/core/auth/index.js +1 -1
  3. package/lib/cjs/modules/alif-shop-api/core/index.js +1 -1
  4. package/lib/cjs/modules/alif-shop-api/index.js +1 -1
  5. package/lib/cjs/modules/index.js +1 -1
  6. package/lib/cjs/modules/uzum-market-api/core/auth/api.js +1 -1
  7. package/lib/cjs/modules/uzum-market-api/core/auth/index.js +1 -1
  8. package/lib/cjs/modules/uzum-market-api/core/index.js +1 -1
  9. package/lib/cjs/modules/uzum-market-api/index.js +1 -1
  10. package/lib/esm/modules/alif-shop-api/core/auth/api.js +1 -1
  11. package/lib/esm/modules/alif-shop-api/core/auth/index.js +1 -1
  12. package/lib/esm/modules/alif-shop-api/core/index.js +1 -1
  13. package/lib/esm/modules/alif-shop-api/index.js +1 -1
  14. package/lib/esm/modules/index.js +1 -1
  15. package/lib/esm/modules/uzum-market-api/core/auth/api.js +1 -1
  16. package/lib/esm/modules/uzum-market-api/core/auth/index.js +1 -1
  17. package/lib/esm/modules/uzum-market-api/core/index.js +1 -1
  18. package/lib/esm/modules/uzum-market-api/index.js +1 -1
  19. package/lib/types/src/modules/alif-shop-api/core/auth/api.d.ts +3 -2
  20. package/lib/types/src/modules/alif-shop-api/core/auth/index.d.ts +1 -1
  21. package/lib/types/src/modules/alif-shop-api/core/auth/types.d.ts +14 -9
  22. package/lib/types/src/modules/alif-shop-api/core/index.d.ts +1 -1
  23. package/lib/types/src/modules/alif-shop-api/index.d.ts +1 -1
  24. package/lib/types/src/modules/index.d.ts +2 -2
  25. package/lib/types/src/modules/uzum-market-api/core/auth/api.d.ts +4 -3
  26. package/lib/types/src/modules/uzum-market-api/core/auth/index.d.ts +2 -2
  27. package/lib/types/src/modules/uzum-market-api/core/auth/params.d.ts +4 -4
  28. package/lib/types/src/modules/uzum-market-api/core/auth/types.d.ts +11 -7
  29. package/lib/types/src/modules/uzum-market-api/core/index.d.ts +2 -2
  30. package/lib/types/src/modules/uzum-market-api/index.d.ts +2 -2
  31. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";exports.GetToken=async(e,o)=>e.post("/merchants/protocol/openid-connect/token",o,{headers:{"content-type":"application/x-www-form-urlencoded"}});
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 i=require("./auth/api.js"),t=require("./applications/api.js");exports.GetToken=i.GetToken,exports.ApplicationsList=t.ApplicationsList;
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"),i=require("./core/applications/api.js");exports.GetToken=e.GetToken,exports.ApplicationsList=i.ApplicationsList;
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;
@@ -1 +1 @@
1
- "use strict";var t=require("./uzum-market-api/core/auth/api.js"),e=require("./uzum-market-api/core/products/api.js");exports.CheckToken=t.CheckToken,exports.GetToken=t.GetToken,exports.AddPromotion=e.AddPromotion,exports.ArchiveProduct=e.ArchiveProduct,exports.CheckSkuExists=e.CheckSkuExists,exports.CreateProduct=e.CreateProduct,exports.GetProduct=e.GetProduct,exports.InvolvedProductsList=e.InvolvedProductsList,exports.ProductDescription=e.ProductDescription,exports.ProductsList=e.ProductsList,exports.RemovePromotion=e.RemovePromotion,exports.SendSkuData=e.SendSkuData,exports.UnarchiveProduct=e.UnarchiveProduct;
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(t,s)=>t.post("/auth/seller/check_token",{token:s},{headers:e}),exports.GetToken=async(t,s)=>t.post("/oauth/token",{grant_type:s.grant_type||"password",refresh_token:s.refresh_token,username:s.username,password:s.password,referer:""},{headers:e});
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 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
+ "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 o=require("./core/auth/api.js"),t=require("./core/products/api.js");exports.CheckToken=o.CheckToken,exports.GetToken=o.GetToken,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 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 o=async(o,e)=>o.post("/merchants/protocol/openid-connect/token",e,{headers:{"content-type":"application/x-www-form-urlencoded"}});export{o as GetToken};
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";
@@ -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:t.grant_type||"password",refresh_token:t.refresh_token,username:t.username,password:t.password,referer:""},{headers:e}),t=async(r,t)=>r.post("/auth/seller/check_token",{token:t},{headers:e});export{t as CheckToken,r as GetToken};
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.GetToken.Response>;
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,4 +1,4 @@
1
- export { GetToken } from './api.js';
1
+ export { GetToken, RefreshToken } from './api.js';
2
2
  export { IAuth } from './types.js';
3
3
  import '../../../../common/types.js';
4
4
  import 'axios';
@@ -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
- interface Response {
10
- access_token: string;
11
- expires_in: number;
12
- refresh_expires_in: number;
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 { TokenParams } from './uzum-market-api/core/auth/params.js';
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 { TokenParams } from './params.js';
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<TokenParams, AuthApi.GetToken.Response>;
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 { TokenParams } from './params.js';
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
- interface TokenParams extends UsernamePasswordParams {
4
- grant_type?: "password" | "refresh_token";
5
- refresh_token?: string;
3
+ type GetTokenParams = UsernamePasswordParams;
4
+ interface RefreshTokenParams {
5
+ refresh_token: string;
6
6
  }
7
7
 
8
- export type { TokenParams };
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
- interface Response {
33
- access_token: string;
34
- token_type: "bearer";
35
- refresh_token: string;
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 { TokenParams } from './auth/params.js';
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 { TokenParams } from './core/auth/params.js';
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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plaza-sdk",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "outputDir": "./lib",
5
5
  "exports": {
6
6
  ".": {