plaza-sdk 1.6.3 → 2.0.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 (75) 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/alif-shop-api/core/applications/api.js +1 -1
  7. package/lib/cjs/modules/alif-shop-api/core/applications/index.js +1 -1
  8. package/lib/cjs/modules/alif-shop-api/core/index.js +1 -1
  9. package/lib/cjs/modules/alif-shop-api/index.js +1 -1
  10. package/lib/cjs/modules/yandex-market-api/common/interfaces.js +1 -0
  11. package/lib/cjs/modules/yandex-market-api/common/params.js +1 -0
  12. package/lib/cjs/modules/yandex-market-api/common/types.js +1 -0
  13. package/lib/cjs/modules/yandex-market-api/core/index.js +1 -0
  14. package/lib/cjs/modules/yandex-market-api/core/products/api.js +1 -0
  15. package/lib/cjs/modules/yandex-market-api/core/products/index.js +1 -0
  16. package/lib/cjs/modules/yandex-market-api/core/products/params.js +1 -0
  17. package/lib/cjs/modules/yandex-market-api/core/products/types.js +1 -0
  18. package/lib/cjs/modules/yandex-market-api/core/stores/api.js +1 -0
  19. package/lib/cjs/modules/yandex-market-api/core/stores/index.js +1 -0
  20. package/lib/cjs/modules/yandex-market-api/core/stores/params.js +1 -0
  21. package/lib/cjs/modules/yandex-market-api/core/stores/types.js +1 -0
  22. package/lib/cjs/modules/yandex-market-api/core/types.js +1 -0
  23. package/lib/cjs/modules/yandex-market-api/index.js +1 -0
  24. package/lib/esm/common/index.js +1 -1
  25. package/lib/esm/common/utils.js +1 -1
  26. package/lib/esm/index.js +1 -1
  27. package/lib/esm/modules/alif-shop-api/core/applications/api.js +1 -1
  28. package/lib/esm/modules/alif-shop-api/core/applications/index.js +1 -1
  29. package/lib/esm/modules/alif-shop-api/core/index.js +1 -1
  30. package/lib/esm/modules/alif-shop-api/index.js +1 -1
  31. package/lib/esm/modules/yandex-market-api/common/interfaces.js +1 -0
  32. package/lib/esm/modules/yandex-market-api/common/params.js +1 -0
  33. package/lib/esm/modules/yandex-market-api/common/types.js +1 -0
  34. package/lib/esm/modules/yandex-market-api/core/index.js +1 -0
  35. package/lib/esm/modules/yandex-market-api/core/products/api.js +1 -0
  36. package/lib/esm/modules/yandex-market-api/core/products/index.js +1 -0
  37. package/lib/esm/modules/yandex-market-api/core/products/params.js +1 -0
  38. package/lib/esm/modules/yandex-market-api/core/products/types.js +1 -0
  39. package/lib/esm/modules/yandex-market-api/core/stores/api.js +1 -0
  40. package/lib/esm/modules/yandex-market-api/core/stores/index.js +1 -0
  41. package/lib/esm/modules/yandex-market-api/core/stores/params.js +1 -0
  42. package/lib/esm/modules/yandex-market-api/core/stores/types.js +1 -0
  43. package/lib/esm/modules/yandex-market-api/core/types.js +1 -0
  44. package/lib/esm/modules/yandex-market-api/index.js +1 -0
  45. package/lib/types/src/common/index.d.ts +2 -2
  46. package/lib/types/src/common/params.d.ts +4 -1
  47. package/lib/types/src/common/utils.d.ts +4 -1
  48. package/lib/types/src/index.d.ts +2 -2
  49. package/lib/types/src/modules/alif-shop-api/core/applications/api.d.ts +2 -1
  50. package/lib/types/src/modules/alif-shop-api/core/applications/index.d.ts +1 -1
  51. package/lib/types/src/modules/alif-shop-api/core/index.d.ts +1 -1
  52. package/lib/types/src/modules/alif-shop-api/index.d.ts +1 -1
  53. package/lib/types/src/modules/alif-shop-client-api/common/interfaces.d.ts +41 -1
  54. package/lib/types/src/modules/alif-shop-client-api/common/types.d.ts +1 -41
  55. package/lib/types/src/modules/alif-shop-client-api/core/index.d.ts +1 -1
  56. package/lib/types/src/modules/alif-shop-client-api/core/products/api.d.ts +1 -1
  57. package/lib/types/src/modules/alif-shop-client-api/core/products/index.d.ts +1 -1
  58. package/lib/types/src/modules/alif-shop-client-api/core/products/types.d.ts +1 -1
  59. package/lib/types/src/modules/alif-shop-client-api/core/types.d.ts +1 -1
  60. package/lib/types/src/modules/alif-shop-client-api/index.d.ts +1 -1
  61. package/lib/types/src/modules/yandex-market-api/common/interfaces.d.ts +35 -0
  62. package/lib/types/src/modules/yandex-market-api/common/params.d.ts +12 -0
  63. package/lib/types/src/modules/yandex-market-api/common/types.d.ts +8 -0
  64. package/lib/types/src/modules/yandex-market-api/core/index.d.ts +13 -0
  65. package/lib/types/src/modules/yandex-market-api/core/products/api.d.ts +14 -0
  66. package/lib/types/src/modules/yandex-market-api/core/products/index.d.ts +10 -0
  67. package/lib/types/src/modules/yandex-market-api/core/products/params.d.ts +13 -0
  68. package/lib/types/src/modules/yandex-market-api/core/products/types.d.ts +42 -0
  69. package/lib/types/src/modules/yandex-market-api/core/stores/api.d.ts +14 -0
  70. package/lib/types/src/modules/yandex-market-api/core/stores/index.d.ts +10 -0
  71. package/lib/types/src/modules/yandex-market-api/core/stores/params.d.ts +7 -0
  72. package/lib/types/src/modules/yandex-market-api/core/stores/types.d.ts +19 -0
  73. package/lib/types/src/modules/yandex-market-api/core/types.d.ts +87 -0
  74. package/lib/types/src/modules/yandex-market-api/index.d.ts +13 -0
  75. package/package.json +6 -1
@@ -1 +1 @@
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
+ 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.pasteApiKeyHeader=(t,e="Api-Key")=>({...t?{[e]:t}:{}}),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(...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
+ !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.pasteApiKeyHeader=(e,t="Api-Key")=>({...e?{[t]:e}:{}}),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.pasteAuthHeaderWithoutAccessKey=t.pasteAuthHeaderWithoutAccessKey,exports.withHttp=t.withHttp,exports.wrapWithHttp=t.wrapWithHttp;
1
+ "use strict";var e=require("./utils.js");exports.bindHttp=e.bindHttp,exports.getNumber=e.getNumber,exports.pasteApiKeyHeader=e.pasteApiKeyHeader,exports.pasteAuthHeader=e.pasteAuthHeader,exports.pasteAuthHeaderAndApikey=e.pasteAuthHeaderAndApikey,exports.pasteAuthHeaderWithoutAccessKey=e.pasteAuthHeaderWithoutAccessKey,exports.withHttp=e.withHttp,exports.wrapWithHttp=e.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.pasteAuthHeaderWithoutAccessKey=t=>({...t?{Authorization:t}:{}}),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.pasteApiKeyHeader=(t,e="Api-Key")=>({...t?{[e]:t}:{}}),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.pasteAuthHeaderWithoutAccessKey=t.pasteAuthHeaderWithoutAccessKey,exports.withHttp=t.withHttp,exports.wrapWithHttp=t.wrapWithHttp;
1
+ "use strict";var e=require("./common/utils.js");exports.bindHttp=e.bindHttp,exports.getNumber=e.getNumber,exports.pasteApiKeyHeader=e.pasteApiKeyHeader,exports.pasteAuthHeader=e.pasteAuthHeader,exports.pasteAuthHeaderAndApikey=e.pasteAuthHeaderAndApikey,exports.pasteAuthHeaderWithoutAccessKey=e.pasteAuthHeaderWithoutAccessKey,exports.withHttp=e.withHttp,exports.wrapWithHttp=e.wrapWithHttp;
@@ -1 +1 @@
1
- "use strict";var e=require("../../../../common/utils.js");exports.ApplicationsList=(i,{token:a,...p})=>i.get("/application/applications/applications",{params:p,headers:e.pasteAuthHeaderAndApikey(a)}),exports.DeliverableWithType=(i,a)=>i.get(`/delivery/deliveries/deliverable/${a.applicationId}/with-type`,{params:{deliverable_type:"application"},headers:e.pasteAuthHeaderAndApikey(a?.token)}),exports.SingleApplication=(i,a)=>i.get(`/application/applications/applications/${a.applicationId}`,{headers:e.pasteAuthHeaderAndApikey(a?.token)});
1
+ "use strict";var e=require("../../../../common/utils.js");exports.ApplicationsList=(a,{token:p,...i})=>a.get("/application/applications/applications",{params:i,headers:e.pasteAuthHeaderAndApikey(p)}),exports.ApplicationsListAllShops=(a,{token:p,...i})=>a.get("/application/manager/applications",{params:i,headers:e.pasteAuthHeaderAndApikey(p)}),exports.DeliverableWithType=(a,p)=>a.get(`/delivery/deliveries/deliverable/${p.applicationId}/with-type`,{params:{deliverable_type:"application"},headers:e.pasteAuthHeaderAndApikey(p?.token)}),exports.SingleApplication=(a,p)=>a.get(`/application/applications/applications/${p.applicationId}`,{headers:e.pasteAuthHeaderAndApikey(p?.token)});
@@ -1 +1 @@
1
- "use strict";var i=require("./api.js");exports.ApplicationsList=i.ApplicationsList,exports.DeliverableWithType=i.DeliverableWithType,exports.SingleApplication=i.SingleApplication;
1
+ "use strict";var i=require("./api.js");exports.ApplicationsList=i.ApplicationsList,exports.ApplicationsListAllShops=i.ApplicationsListAllShops,exports.DeliverableWithType=i.DeliverableWithType,exports.SingleApplication=i.SingleApplication;
@@ -1 +1 @@
1
- "use strict";var e=require("./auth/api.js"),t=require("./products/api.js"),r=require("./management/api.js"),o=require("./applications/api.js");exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,exports.SingleWarehouseProduct=t.SingleWarehouseProduct,exports.UpdateWarehouseProduct=t.UpdateWarehouseProduct,exports.WarehouseCategoriesList=t.WarehouseCategoriesList,exports.WarehouseList=t.WarehouseList,exports.CheckReport=r.CheckReport,exports.DownloadReport=r.DownloadReport,exports.GenerateReport=r.GenerateReport,exports.ReportsList=r.ReportsList,exports.ApplicationsList=o.ApplicationsList,exports.DeliverableWithType=o.DeliverableWithType,exports.SingleApplication=o.SingleApplication;
1
+ "use strict";var e=require("./auth/api.js"),t=require("./products/api.js"),o=require("./management/api.js"),r=require("./applications/api.js");exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,exports.SingleWarehouseProduct=t.SingleWarehouseProduct,exports.UpdateWarehouseProduct=t.UpdateWarehouseProduct,exports.WarehouseCategoriesList=t.WarehouseCategoriesList,exports.WarehouseList=t.WarehouseList,exports.CheckReport=o.CheckReport,exports.DownloadReport=o.DownloadReport,exports.GenerateReport=o.GenerateReport,exports.ReportsList=o.ReportsList,exports.ApplicationsList=r.ApplicationsList,exports.ApplicationsListAllShops=r.ApplicationsListAllShops,exports.DeliverableWithType=r.DeliverableWithType,exports.SingleApplication=r.SingleApplication;
@@ -1 +1 @@
1
- "use strict";var e=require("./core/auth/api.js"),r=require("./core/products/api.js"),o=require("./core/management/api.js"),t=require("./core/applications/api.js");exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,exports.SingleWarehouseProduct=r.SingleWarehouseProduct,exports.UpdateWarehouseProduct=r.UpdateWarehouseProduct,exports.WarehouseCategoriesList=r.WarehouseCategoriesList,exports.WarehouseList=r.WarehouseList,exports.CheckReport=o.CheckReport,exports.DownloadReport=o.DownloadReport,exports.GenerateReport=o.GenerateReport,exports.ReportsList=o.ReportsList,exports.ApplicationsList=t.ApplicationsList,exports.DeliverableWithType=t.DeliverableWithType,exports.SingleApplication=t.SingleApplication;
1
+ "use strict";var e=require("./core/auth/api.js"),o=require("./core/products/api.js"),t=require("./core/management/api.js"),r=require("./core/applications/api.js");exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,exports.SingleWarehouseProduct=o.SingleWarehouseProduct,exports.UpdateWarehouseProduct=o.UpdateWarehouseProduct,exports.WarehouseCategoriesList=o.WarehouseCategoriesList,exports.WarehouseList=o.WarehouseList,exports.CheckReport=t.CheckReport,exports.DownloadReport=t.DownloadReport,exports.GenerateReport=t.GenerateReport,exports.ReportsList=t.ReportsList,exports.ApplicationsList=r.ApplicationsList,exports.ApplicationsListAllShops=r.ApplicationsListAllShops,exports.DeliverableWithType=r.DeliverableWithType,exports.SingleApplication=r.SingleApplication;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";var s=require("./stores/api.js"),a=require("./products/api.js");exports.Campaign=s.Campaign,exports.Campaigns=s.Campaigns,exports.BusinessOfferMappings=a.BusinessOfferMappings,exports.CampaignStocks=a.CampaignStocks;
@@ -0,0 +1 @@
1
+ "use strict";var s=require("../../../../common/utils.js");exports.BusinessOfferMappings=(e,a)=>{const{businessId:p,apiKey:r,...i}=a;return e.post(`/v2/businesses/${p}/offer-mappings`,null,{params:i,headers:s.pasteApiKeyHeader(r)})},exports.CampaignStocks=(e,a,p)=>{const{campaignId:r,apiKey:i,...t}=a;return e.post(`/v2/campaigns/${r}/offers/stocks`,p,{params:t,headers:s.pasteApiKeyHeader(i)})};
@@ -0,0 +1 @@
1
+ "use strict";var s=require("./api.js");exports.BusinessOfferMappings=s.BusinessOfferMappings,exports.CampaignStocks=s.CampaignStocks;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../../../../common/utils.js");exports.Campaign=(a,p)=>a.get(`/v2/campaigns/${p.campaignId}`,{headers:e.pasteApiKeyHeader(p.apiKey)}),exports.Campaigns=(a,p)=>a.get("/v2/campaigns",{headers:e.pasteApiKeyHeader(p.apiKey)});
@@ -0,0 +1 @@
1
+ "use strict";var a=require("./api.js");exports.Campaign=a.Campaign,exports.Campaigns=a.Campaigns;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ "use strict";var s=require("./core/stores/api.js"),a=require("./core/products/api.js");exports.Campaign=s.Campaign,exports.Campaigns=s.Campaigns,exports.BusinessOfferMappings=a.BusinessOfferMappings,exports.CampaignStocks=a.CampaignStocks;
@@ -1 +1 @@
1
- export{bindHttp,getNumber,pasteAuthHeader,pasteAuthHeaderAndApikey,pasteAuthHeaderWithoutAccessKey,withHttp,wrapWithHttp}from"./utils.js";
1
+ export{bindHttp,getNumber,pasteApiKeyHeader,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=>({...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};
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="Api-Key")=>({...r?{[t]:r}:{}}),n=r=>({...r?{Authorization:r}:{}}),o=(r,t="2qHIakuLe5",e="apikey")=>({...r?{Authorization:`Bearer ${r}`}:{},[e]:t,locale:"ru"});function i(r,t){return(...e)=>r(t,...e)}const u=r=>t=>(...e)=>t(r,...e);function a(r,t){return(...e)=>r(t,...e)}export{i as bindHttp,r as getNumber,e as pasteApiKeyHeader,t as pasteAuthHeader,o as pasteAuthHeaderAndApikey,n as pasteAuthHeaderWithoutAccessKey,a as withHttp,u as wrapWithHttp};
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- export{bindHttp,getNumber,pasteAuthHeader,pasteAuthHeaderAndApikey,pasteAuthHeaderWithoutAccessKey,withHttp,wrapWithHttp}from"./common/utils.js";
1
+ export{bindHttp,getNumber,pasteApiKeyHeader,pasteAuthHeader,pasteAuthHeaderAndApikey,pasteAuthHeaderWithoutAccessKey,withHttp,wrapWithHttp}from"./common/utils.js";
@@ -1 +1 @@
1
- import{pasteAuthHeaderAndApikey as a}from"../../../../common/utils.js";const e=(e,{token:i,...p})=>e.get("/application/applications/applications",{params:p,headers:a(i)}),i=(e,i)=>e.get(`/application/applications/applications/${i.applicationId}`,{headers:a(i?.token)}),p=(e,i)=>e.get(`/delivery/deliveries/deliverable/${i.applicationId}/with-type`,{params:{deliverable_type:"application"},headers:a(i?.token)});export{e as ApplicationsList,p as DeliverableWithType,i as SingleApplication};
1
+ import{pasteAuthHeaderAndApikey as a}from"../../../../common/utils.js";const e=(e,{token:i,...p})=>e.get("/application/applications/applications",{params:p,headers:a(i)}),i=(e,{token:i,...p})=>e.get("/application/manager/applications",{params:p,headers:a(i)}),p=(e,i)=>e.get(`/application/applications/applications/${i.applicationId}`,{headers:a(i?.token)}),t=(e,i)=>e.get(`/delivery/deliveries/deliverable/${i.applicationId}/with-type`,{params:{deliverable_type:"application"},headers:a(i?.token)});export{e as ApplicationsList,i as ApplicationsListAllShops,t as DeliverableWithType,p as SingleApplication};
@@ -1 +1 @@
1
- export{ApplicationsList,DeliverableWithType,SingleApplication}from"./api.js";
1
+ export{ApplicationsList,ApplicationsListAllShops,DeliverableWithType,SingleApplication}from"./api.js";
@@ -1 +1 @@
1
- export{GetToken,RefreshToken}from"./auth/api.js";export{SingleWarehouseProduct,UpdateWarehouseProduct,WarehouseCategoriesList,WarehouseList}from"./products/api.js";export{CheckReport,DownloadReport,GenerateReport,ReportsList}from"./management/api.js";export{ApplicationsList,DeliverableWithType,SingleApplication}from"./applications/api.js";
1
+ export{GetToken,RefreshToken}from"./auth/api.js";export{SingleWarehouseProduct,UpdateWarehouseProduct,WarehouseCategoriesList,WarehouseList}from"./products/api.js";export{CheckReport,DownloadReport,GenerateReport,ReportsList}from"./management/api.js";export{ApplicationsList,ApplicationsListAllShops,DeliverableWithType,SingleApplication}from"./applications/api.js";
@@ -1 +1 @@
1
- export{GetToken,RefreshToken}from"./core/auth/api.js";export{SingleWarehouseProduct,UpdateWarehouseProduct,WarehouseCategoriesList,WarehouseList}from"./core/products/api.js";export{CheckReport,DownloadReport,GenerateReport,ReportsList}from"./core/management/api.js";export{ApplicationsList,DeliverableWithType,SingleApplication}from"./core/applications/api.js";
1
+ export{GetToken,RefreshToken}from"./core/auth/api.js";export{SingleWarehouseProduct,UpdateWarehouseProduct,WarehouseCategoriesList,WarehouseList}from"./core/products/api.js";export{CheckReport,DownloadReport,GenerateReport,ReportsList}from"./core/management/api.js";export{ApplicationsList,ApplicationsListAllShops,DeliverableWithType,SingleApplication}from"./core/applications/api.js";
@@ -0,0 +1 @@
1
+ export{Campaign,Campaigns}from"./stores/api.js";export{BusinessOfferMappings,CampaignStocks}from"./products/api.js";
@@ -0,0 +1 @@
1
+ import{pasteApiKeyHeader as s}from"../../../../common/utils.js";const e=(e,a,o)=>{const{campaignId:r,apiKey:n,...p}=a;return e.post(`/v2/campaigns/${r}/offers/stocks`,o,{params:p,headers:s(n)})},a=(e,a)=>{const{businessId:o,apiKey:r,...n}=a;return e.post(`/v2/businesses/${o}/offer-mappings`,null,{params:n,headers:s(r)})};export{a as BusinessOfferMappings,e as CampaignStocks};
@@ -0,0 +1 @@
1
+ export{BusinessOfferMappings,CampaignStocks}from"./api.js";
@@ -0,0 +1 @@
1
+ import{pasteApiKeyHeader as a}from"../../../../common/utils.js";const e=(e,i)=>e.get("/v2/campaigns",{headers:a(i.apiKey)}),i=(e,i)=>e.get(`/v2/campaigns/${i.campaignId}`,{headers:a(i.apiKey)});export{i as Campaign,e as Campaigns};
@@ -0,0 +1 @@
1
+ export{Campaign,Campaigns}from"./api.js";
@@ -0,0 +1 @@
1
+ export{Campaign,Campaigns}from"./core/stores/api.js";export{BusinessOfferMappings,CampaignStocks}from"./core/products/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, pasteAuthHeaderWithoutAccessKey, withHttp, wrapWithHttp } from './utils.js';
3
- export { SlugParams, TokenParams, UsernamePasswordParams } from './params.js';
2
+ export { bindHttp, getNumber, pasteApiKeyHeader, pasteAuthHeader, pasteAuthHeaderAndApikey, pasteAuthHeaderWithoutAccessKey, withHttp, wrapWithHttp } from './utils.js';
3
+ export { ApiKeyParams, SlugParams, TokenParams, UsernamePasswordParams } from './params.js';
4
4
  export { IMultiLang, IMultiLangArray } from './interfaces.js';
5
5
  import 'axios';
@@ -1,6 +1,9 @@
1
1
  interface TokenParams {
2
2
  token?: string;
3
3
  }
4
+ interface ApiKeyParams {
5
+ apiKey?: string;
6
+ }
4
7
  interface UsernamePasswordParams {
5
8
  username: string;
6
9
  password: string;
@@ -9,4 +12,4 @@ interface SlugParams {
9
12
  slug: string;
10
13
  }
11
14
 
12
- export type { SlugParams, TokenParams, UsernamePasswordParams };
15
+ export type { ApiKeyParams, SlugParams, TokenParams, UsernamePasswordParams };
@@ -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 pasteApiKeyHeader: (apiKey?: string, apiKeyFieldName?: string) => {
9
+ [x: string]: string;
10
+ };
8
11
  declare const pasteAuthHeaderWithoutAccessKey: (token?: string) => {
9
12
  Authorization?: string | undefined;
10
13
  };
@@ -16,4 +19,4 @@ declare function bindHttp<F extends (http: AxiosInstance, ...args: any[]) => any
16
19
  declare const wrapWithHttp: (http: AxiosInstance) => <F extends (http: AxiosInstance, ...args: any[]) => any>(fn: F) => (...args: TailParameters<F>) => ReturnType<F>;
17
20
  declare function withHttp<H extends AxiosInstance, A extends any[], R>(fn: (http: H, ...args: A) => R, http: H): (...args: A) => R;
18
21
 
19
- export { bindHttp, getNumber, pasteAuthHeader, pasteAuthHeaderAndApikey, pasteAuthHeaderWithoutAccessKey, withHttp, wrapWithHttp };
22
+ export { bindHttp, getNumber, pasteApiKeyHeader, 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, pasteAuthHeaderWithoutAccessKey, withHttp, wrapWithHttp } from './common/utils.js';
3
- export { SlugParams, TokenParams, UsernamePasswordParams } from './common/params.js';
2
+ export { bindHttp, getNumber, pasteApiKeyHeader, pasteAuthHeader, pasteAuthHeaderAndApikey, pasteAuthHeaderWithoutAccessKey, withHttp, wrapWithHttp } from './common/utils.js';
3
+ export { ApiKeyParams, SlugParams, TokenParams, UsernamePasswordParams } from './common/params.js';
4
4
  export { IMultiLang, IMultiLangArray } from './common/interfaces.js';
5
5
  import 'axios';
@@ -6,7 +6,8 @@ import '../../common/interfaces.js';
6
6
  import '../../../../common/params.js';
7
7
 
8
8
  declare const ApplicationsList: CallerParam<ApplicationsParams, ApplicationsApi.List.Response>;
9
+ declare const ApplicationsListAllShops: CallerParam<ApplicationsParams, ApplicationsApi.List.Response>;
9
10
  declare const SingleApplication: CallerParam<ApplicationIdBasedParams, ApplicationsApi.Single.Response>;
10
11
  declare const DeliverableWithType: CallerParam<ApplicationIdBasedParams, ApplicationsApi.DeliverableList.Response>;
11
12
 
12
- export { ApplicationsList, DeliverableWithType, SingleApplication };
13
+ export { ApplicationsList, ApplicationsListAllShops, DeliverableWithType, SingleApplication };
@@ -1,4 +1,4 @@
1
- export { ApplicationsList, DeliverableWithType, SingleApplication } from './api.js';
1
+ export { ApplicationsList, ApplicationsListAllShops, DeliverableWithType, SingleApplication } from './api.js';
2
2
  export { ApplicationsApi, ApplicationsEntity } from './types.js';
3
3
  export { ApplicationIdBasedParams, ApplicationsParams } from './params.js';
4
4
  import '../../../../common/types.js';
@@ -6,7 +6,7 @@ export { ProductIdBasedParams, WarehouseProductsListParams } from './products/pa
6
6
  export { CheckReport, DownloadReport, GenerateReport, ReportsList } from './management/api.js';
7
7
  export { AlifManagementApi, AlifManagementEntity } from './management/types.js';
8
8
  export { ReportIdBasedParams, ReportsListParams } from './management/params.js';
9
- export { ApplicationsList, DeliverableWithType, SingleApplication } from './applications/api.js';
9
+ export { ApplicationsList, ApplicationsListAllShops, DeliverableWithType, SingleApplication } from './applications/api.js';
10
10
  export { ApplicationsApi, ApplicationsEntity } from './applications/types.js';
11
11
  export { ApplicationIdBasedParams, ApplicationsParams } from './applications/params.js';
12
12
  export { AlifShopEntity } from './types.js';
@@ -6,7 +6,7 @@ export { ProductIdBasedParams, WarehouseProductsListParams } from './core/produc
6
6
  export { CheckReport, DownloadReport, GenerateReport, ReportsList } from './core/management/api.js';
7
7
  export { AlifManagementApi, AlifManagementEntity } from './core/management/types.js';
8
8
  export { ReportIdBasedParams, ReportsListParams } from './core/management/params.js';
9
- export { ApplicationsList, DeliverableWithType, SingleApplication } from './core/applications/api.js';
9
+ export { ApplicationsList, ApplicationsListAllShops, DeliverableWithType, SingleApplication } from './core/applications/api.js';
10
10
  export { ApplicationsApi, ApplicationsEntity } from './core/applications/types.js';
11
11
  export { ApplicationIdBasedParams, ApplicationsParams } from './core/applications/params.js';
12
12
  export { AlifShopEntity } from './core/types.js';
@@ -1,2 +1,42 @@
1
+ import { IMultiLang } from '../../../common/interfaces.js';
1
2
 
2
- export { };
3
+ interface PartnerBySlug {
4
+ id: number;
5
+ slug: string;
6
+ }
7
+ interface PartnerByName {
8
+ id: number;
9
+ name: string;
10
+ }
11
+ interface MediaItem {
12
+ order: number;
13
+ sm_path: string;
14
+ }
15
+ interface AlifBrand {
16
+ id: number;
17
+ name: string;
18
+ slug: string;
19
+ }
20
+ interface TitleMedia {
21
+ sm_path: string;
22
+ }
23
+ interface ModereatedCardGroupItem {
24
+ id: number;
25
+ name: string;
26
+ names: IMultiLang;
27
+ attributes: ModeratedAttributeItem[];
28
+ }
29
+ interface TermItem {
30
+ doc_count: number;
31
+ key: string;
32
+ }
33
+ interface AttributeItem {
34
+ doc_count: number;
35
+ key: string;
36
+ values: TermItem[];
37
+ }
38
+ interface ModeratedAttributeItem extends AttributeItem {
39
+ names: IMultiLang;
40
+ }
41
+
42
+ export type { AlifBrand, AttributeItem, MediaItem, ModeratedAttributeItem, ModereatedCardGroupItem, PartnerByName, PartnerBySlug, TermItem, TitleMedia };
@@ -1,42 +1,2 @@
1
- import { IMultiLang } from '../../../common/interfaces.js';
2
1
 
3
- interface PartnerBySlug {
4
- id: number;
5
- slug: string;
6
- }
7
- interface PartnerByName {
8
- id: number;
9
- name: string;
10
- }
11
- interface MediaItem {
12
- order: number;
13
- sm_path: string;
14
- }
15
- interface AlifBrand {
16
- id: number;
17
- name: string;
18
- slug: string;
19
- }
20
- interface TitleMedia {
21
- sm_path: string;
22
- }
23
- interface ModereatedCardGroupItem {
24
- id: number;
25
- name: string;
26
- names: IMultiLang;
27
- attributes: ModeratedAttributeItem[];
28
- }
29
- interface TermItem {
30
- doc_count: number;
31
- key: string;
32
- }
33
- interface AttributeItem {
34
- doc_count: number;
35
- key: string;
36
- values: TermItem[];
37
- }
38
- interface ModeratedAttributeItem extends AttributeItem {
39
- names: IMultiLang;
40
- }
41
-
42
- export type { AlifBrand, AttributeItem, MediaItem, ModeratedAttributeItem, ModereatedCardGroupItem, PartnerByName, PartnerBySlug, TermItem, TitleMedia };
2
+ export { };
@@ -6,6 +6,6 @@ export { AlifShopClientApiEntity } from './types.js';
6
6
  import '../../../common/types.js';
7
7
  import 'axios';
8
8
  import '../../../common/params.js';
9
- import '../common/types.js';
9
+ import '../common/interfaces.js';
10
10
  import '../../../common/interfaces.js';
11
11
  import '../../alif-shop-api/common/interfaces.js';
@@ -5,7 +5,7 @@ import { SearchOffersListParams, CategoryOffersListParams } from './params.js';
5
5
  import 'axios';
6
6
  import '../types.js';
7
7
  import '../../../../common/interfaces.js';
8
- import '../../common/types.js';
8
+ import '../../common/interfaces.js';
9
9
  import '../../../alif-shop-api/common/interfaces.js';
10
10
 
11
11
  declare const SearchOffersList: CallerPayload<SearchOffersListParams, AlifClientApi.SearchOffersList.Response>;
@@ -6,5 +6,5 @@ import 'axios';
6
6
  import '../../../../common/params.js';
7
7
  import '../types.js';
8
8
  import '../../../../common/interfaces.js';
9
- import '../../common/types.js';
9
+ import '../../common/interfaces.js';
10
10
  import '../../../alif-shop-api/common/interfaces.js';
@@ -1,5 +1,5 @@
1
1
  import { AlifShopClientApiEntity } from '../types.js';
2
- import { TermItem, AttributeItem } from '../../common/types.js';
2
+ import { TermItem, AttributeItem } from '../../common/interfaces.js';
3
3
  import { IMetaWithTotalLast } from '../../../alif-shop-api/common/interfaces.js';
4
4
  import '../../../../common/types.js';
5
5
  import 'axios';
@@ -1,6 +1,6 @@
1
1
  import { StringNullable, NumberNullable } from '../../../common/types.js';
2
2
  import { IMultiLang } from '../../../common/interfaces.js';
3
- import { PartnerBySlug, AlifBrand, TitleMedia, ModereatedCardGroupItem, MediaItem, PartnerByName } from '../common/types.js';
3
+ import { PartnerBySlug, AlifBrand, TitleMedia, ModereatedCardGroupItem, MediaItem, PartnerByName } from '../common/interfaces.js';
4
4
  import 'axios';
5
5
 
6
6
  declare namespace AlifShopClientApiEntity {
@@ -7,5 +7,5 @@ import '../../common/types.js';
7
7
  import 'axios';
8
8
  import '../../common/params.js';
9
9
  import '../../common/interfaces.js';
10
- import './common/types.js';
10
+ import './common/interfaces.js';
11
11
  import '../alif-shop-api/common/interfaces.js';
@@ -0,0 +1,35 @@
1
+ import { ResultStatus } from './types.js';
2
+
3
+ interface Paging {
4
+ prevPageToken?: string;
5
+ nextPageToken?: string;
6
+ }
7
+ interface Pager {
8
+ total: number;
9
+ from: number;
10
+ to: number;
11
+ currentPage: number;
12
+ pagesCount: number;
13
+ pageSize: number;
14
+ }
15
+ interface ResultResponse<T> {
16
+ status: ResultStatus;
17
+ result: T;
18
+ }
19
+ interface CommodityCode {
20
+ code: string;
21
+ type: string;
22
+ }
23
+ interface TimePeriod {
24
+ timePeriod: number;
25
+ timeUnit: "HOUR" | "DAY" | "WEEK" | "MONTH" | "YEAR";
26
+ comment?: string;
27
+ }
28
+ interface Dimensions {
29
+ length: number;
30
+ width: number;
31
+ height: number;
32
+ weight: number;
33
+ }
34
+
35
+ export type { CommodityCode, Dimensions, Pager, Paging, ResultResponse, TimePeriod };
@@ -0,0 +1,12 @@
1
+ import { ApiKeyParams } from '../../../common/params.js';
2
+
3
+ interface PagedParams extends ApiKeyParams {
4
+ page?: number;
5
+ pageSize?: number;
6
+ }
7
+ interface TokenPagedParams extends ApiKeyParams {
8
+ limit?: number;
9
+ page_token?: string;
10
+ }
11
+
12
+ export type { PagedParams, TokenPagedParams };
@@ -0,0 +1,8 @@
1
+ type ResultStatus = "OK" | "ERROR";
2
+ type PlacementType = "FBY" | "FBS" | "DBS" | "EXPRESS";
3
+ type Turnover = "LOW" | "ALMOST_LOW" | "HIGH" | "VERY_HIGH" | "NO_SALES" | "FREE_STORE";
4
+ type CampaignStockType = "FIT" | "FREEZE" | "AVAILABLE" | "QUARANTINE" | "UTILIZATION" | "DEFECT" | "EXPIRED";
5
+ type Language = "RU" | "UZ";
6
+ type CurrencyType = "UZS" | "USD" | "RUB";
7
+
8
+ export type { CampaignStockType, CurrencyType, Language, PlacementType, ResultStatus, Turnover };
@@ -0,0 +1,13 @@
1
+ export { Campaign, Campaigns } from './stores/api.js';
2
+ export { StoresApi } from './stores/types.js';
3
+ export { CampaignParams } from './stores/params.js';
4
+ export { BusinessOfferMappings, CampaignStocks } from './products/api.js';
5
+ export { ProductsApi, ProductsEntity } from './products/types.js';
6
+ export { BusinessOfferMappingsParams, CampaignStocksParams } from './products/params.js';
7
+ export { YandexMarketEntity } from './types.js';
8
+ import '../../../common/types.js';
9
+ import 'axios';
10
+ import '../common/params.js';
11
+ import '../../../common/params.js';
12
+ import '../common/interfaces.js';
13
+ import '../common/types.js';
@@ -0,0 +1,14 @@
1
+ import { CallerParamPayload } from '../../../../common/types.js';
2
+ import { ProductsApi } from './types.js';
3
+ import { CampaignStocksParams, BusinessOfferMappingsParams } from './params.js';
4
+ import 'axios';
5
+ import '../../common/interfaces.js';
6
+ import '../../common/types.js';
7
+ import '../types.js';
8
+ import '../../common/params.js';
9
+ import '../../../../common/params.js';
10
+
11
+ declare const CampaignStocks: CallerParamPayload<CampaignStocksParams, ProductsApi.CampaignStocks.Request, ProductsApi.CampaignStocks.Response>;
12
+ declare const BusinessOfferMappings: CallerParamPayload<BusinessOfferMappingsParams, ProductsApi.BusinessOfferMappings.Request, ProductsApi.BusinessOfferMappings.Response>;
13
+
14
+ export { BusinessOfferMappings, CampaignStocks };
@@ -0,0 +1,10 @@
1
+ export { BusinessOfferMappings, CampaignStocks } from './api.js';
2
+ export { ProductsApi, ProductsEntity } from './types.js';
3
+ export { BusinessOfferMappingsParams, CampaignStocksParams } from './params.js';
4
+ import '../../../../common/types.js';
5
+ import 'axios';
6
+ import '../../common/interfaces.js';
7
+ import '../../common/types.js';
8
+ import '../types.js';
9
+ import '../../common/params.js';
10
+ import '../../../../common/params.js';
@@ -0,0 +1,13 @@
1
+ import { Language } from '../../common/types.js';
2
+ import { TokenPagedParams } from '../../common/params.js';
3
+ import '../../../../common/params.js';
4
+
5
+ interface CampaignStocksParams extends TokenPagedParams {
6
+ campaignId: number;
7
+ }
8
+ interface BusinessOfferMappingsParams extends TokenPagedParams {
9
+ businessId: number;
10
+ language?: Language;
11
+ }
12
+
13
+ export type { BusinessOfferMappingsParams, CampaignStocksParams };
@@ -0,0 +1,42 @@
1
+ import { ResultResponse, Paging } from '../../common/interfaces.js';
2
+ import { YandexMarketEntity } from '../types.js';
3
+ import '../../common/types.js';
4
+
5
+ declare namespace ProductsEntity {
6
+ interface BusinessOfferMapping {
7
+ offer: YandexMarketEntity.BusinessOffer;
8
+ mapping: YandexMarketEntity.BusinessMapping;
9
+ showcaseUrls: YandexMarketEntity.MappingShowcaseUrl[];
10
+ }
11
+ }
12
+ declare namespace ProductsApi {
13
+ namespace CampaignStocks {
14
+ interface Request {
15
+ archived?: boolean;
16
+ hasStock?: boolean;
17
+ offerIds?: string[];
18
+ stocksWarehouseId?: number;
19
+ withTurnover?: boolean;
20
+ }
21
+ type Response = ResultResponse<{
22
+ paging: Paging;
23
+ warehouses: YandexMarketEntity.OfferWarehouse[];
24
+ }>;
25
+ }
26
+ namespace BusinessOfferMappings {
27
+ interface Request {
28
+ archived?: boolean;
29
+ cardStatuses?: string[];
30
+ categoryIds?: number[];
31
+ offerIds?: string[];
32
+ tags?: string[];
33
+ vendorNames?: string[];
34
+ }
35
+ type Response = ResultResponse<{
36
+ paging: Paging;
37
+ offerMappings: ProductsEntity.BusinessOfferMapping[];
38
+ }>;
39
+ }
40
+ }
41
+
42
+ export { ProductsApi, ProductsEntity };
@@ -0,0 +1,14 @@
1
+ import { CallerParam } from '../../../../common/types.js';
2
+ import { PagedParams } from '../../common/params.js';
3
+ import { StoresApi } from './types.js';
4
+ import { CampaignParams } from './params.js';
5
+ import 'axios';
6
+ import '../../../../common/params.js';
7
+ import '../../common/interfaces.js';
8
+ import '../../common/types.js';
9
+ import '../types.js';
10
+
11
+ declare const Campaigns: CallerParam<PagedParams, StoresApi.Campaigns.Response>;
12
+ declare const Campaign: CallerParam<CampaignParams, StoresApi.Campaign.Response>;
13
+
14
+ export { Campaign, Campaigns };
@@ -0,0 +1,10 @@
1
+ export { Campaign, Campaigns } from './api.js';
2
+ export { StoresApi } from './types.js';
3
+ export { CampaignParams } from './params.js';
4
+ import '../../../../common/types.js';
5
+ import 'axios';
6
+ import '../../common/params.js';
7
+ import '../../../../common/params.js';
8
+ import '../../common/interfaces.js';
9
+ import '../../common/types.js';
10
+ import '../types.js';
@@ -0,0 +1,7 @@
1
+ import { ApiKeyParams } from '../../../../common/params.js';
2
+
3
+ interface CampaignParams extends ApiKeyParams {
4
+ campaignId: number;
5
+ }
6
+
7
+ export type { CampaignParams };
@@ -0,0 +1,19 @@
1
+ import { Pager } from '../../common/interfaces.js';
2
+ import { YandexMarketEntity } from '../types.js';
3
+ import '../../common/types.js';
4
+
5
+ declare namespace StoresApi {
6
+ namespace Campaigns {
7
+ interface Response {
8
+ campaigns: YandexMarketEntity.Campaign[];
9
+ pager: Pager;
10
+ }
11
+ }
12
+ namespace Campaign {
13
+ interface Response {
14
+ campaign: YandexMarketEntity.Campaign;
15
+ }
16
+ }
17
+ }
18
+
19
+ export { StoresApi };
@@ -0,0 +1,87 @@
1
+ import { Dimensions, TimePeriod, CommodityCode } from '../common/interfaces.js';
2
+ import { PlacementType, CampaignStockType, Turnover, CurrencyType } from '../common/types.js';
3
+
4
+ declare namespace YandexMarketEntity {
5
+ interface Business {
6
+ id: number;
7
+ name: string;
8
+ }
9
+ interface CampaignMinimal {
10
+ campaignId: number;
11
+ status: string;
12
+ }
13
+ interface Campaign {
14
+ id: number;
15
+ domain: string;
16
+ clientId: number;
17
+ business: Business;
18
+ placementType: PlacementType;
19
+ apiAvailability: "AVAILABLE" | "DISABLED_BY_INACTIVITY";
20
+ }
21
+ interface CampaignStock {
22
+ type: CampaignStockType;
23
+ count: number;
24
+ }
25
+ interface CampaignOffer {
26
+ offerId: string;
27
+ stocks: CampaignStock[];
28
+ turnoverSummary?: {
29
+ turnover: Turnover;
30
+ turnoverDays: number;
31
+ };
32
+ updatedAt?: string;
33
+ }
34
+ interface OfferWarehouse {
35
+ warehouseId: number;
36
+ offers: CampaignOffer[];
37
+ }
38
+ interface MediaFileOffer {
39
+ title?: string;
40
+ url: string;
41
+ uploadState: "UPLOADING" | "UPLOADED" | "FAILED";
42
+ }
43
+ interface BusinessOffer {
44
+ offerId: string;
45
+ name: string;
46
+ pictures: string[];
47
+ vendor: string;
48
+ barcodes: string[];
49
+ description: string;
50
+ weightDimensions: Dimensions;
51
+ guaranteePeriod: TimePeriod;
52
+ commodityCodes: CommodityCode[];
53
+ basicPrice: {
54
+ value: number;
55
+ currencyId: CurrencyType;
56
+ discountBase: number;
57
+ updatedAt: string;
58
+ };
59
+ cardStatus: string;
60
+ campaigns: CampaignMinimal[];
61
+ sellingPrograms: Array<{
62
+ sellingProgram: PlacementType;
63
+ status: "FINE" | "REJECT";
64
+ }>;
65
+ mediaFiles: {
66
+ firstVideoAsCover?: boolean;
67
+ pictures: MediaFileOffer[];
68
+ videos: MediaFileOffer[];
69
+ manuals: MediaFileOffer[];
70
+ };
71
+ groupId: string;
72
+ }
73
+ interface BusinessMapping {
74
+ marketSku: number;
75
+ marketSkuName: string;
76
+ marketModelId: number;
77
+ marketModelName: string;
78
+ marketCategoryId: number;
79
+ marketCategoryName: string;
80
+ }
81
+ interface MappingShowcaseUrl {
82
+ showcaseType: "B2B" | "B2C";
83
+ showcaseUrl: string;
84
+ }
85
+ }
86
+
87
+ export { YandexMarketEntity };
@@ -0,0 +1,13 @@
1
+ export { Campaign, Campaigns } from './core/stores/api.js';
2
+ export { StoresApi } from './core/stores/types.js';
3
+ export { CampaignParams } from './core/stores/params.js';
4
+ export { BusinessOfferMappings, CampaignStocks } from './core/products/api.js';
5
+ export { ProductsApi, ProductsEntity } from './core/products/types.js';
6
+ export { BusinessOfferMappingsParams, CampaignStocksParams } from './core/products/params.js';
7
+ export { YandexMarketEntity } from './core/types.js';
8
+ import '../../common/types.js';
9
+ import 'axios';
10
+ import './common/params.js';
11
+ import '../../common/params.js';
12
+ import './common/interfaces.js';
13
+ import './common/types.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plaza-sdk",
3
- "version": "1.6.3",
3
+ "version": "2.0.0",
4
4
  "outputDir": "./lib",
5
5
  "exports": {
6
6
  ".": {
@@ -8,6 +8,11 @@
8
8
  "import": "./lib/esm/index.js",
9
9
  "require": "./lib/cjs/index.js"
10
10
  },
11
+ "./yandex-market": {
12
+ "types": "./lib/types/src/modules/yandex-market-api/index.d.ts",
13
+ "import": "./lib/esm/modules/yandex-market-api/index.js",
14
+ "require": "./lib/cjs/modules/yandex-market-api/index.js"
15
+ },
11
16
  "./uzum-market": {
12
17
  "types": "./lib/types/src/modules/uzum-market-api/index.d.ts",
13
18
  "import": "./lib/esm/modules/uzum-market-api/index.js",