plaza-sdk 1.3.2 → 1.3.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/alif-shop-api/core/applications/api.js +1 -1
- package/lib/cjs/modules/alif-shop-api/core/applications/index.js +1 -1
- package/lib/cjs/modules/alif-shop-api/core/index.js +1 -1
- package/lib/cjs/modules/alif-shop-api/core/management/api.js +1 -0
- package/lib/cjs/modules/alif-shop-api/core/management/params.js +1 -0
- package/lib/cjs/modules/alif-shop-api/core/management/types.js +1 -0
- package/lib/cjs/modules/alif-shop-api/index.js +1 -1
- package/lib/esm/modules/alif-shop-api/core/applications/api.js +1 -1
- package/lib/esm/modules/alif-shop-api/core/applications/index.js +1 -1
- package/lib/esm/modules/alif-shop-api/core/index.js +1 -1
- package/lib/esm/modules/alif-shop-api/core/management/api.js +1 -0
- package/lib/esm/modules/alif-shop-api/core/management/params.js +1 -0
- package/lib/esm/modules/alif-shop-api/core/management/types.js +1 -0
- package/lib/esm/modules/alif-shop-api/index.js +1 -1
- package/lib/types/src/modules/alif-shop-api/core/applications/api.d.ts +4 -2
- package/lib/types/src/modules/alif-shop-api/core/applications/index.d.ts +2 -2
- package/lib/types/src/modules/alif-shop-api/core/applications/params.d.ts +4 -1
- package/lib/types/src/modules/alif-shop-api/core/applications/types.d.ts +114 -2
- package/lib/types/src/modules/alif-shop-api/core/index.d.ts +2 -2
- package/lib/types/src/modules/alif-shop-api/core/management/api.d.ts +10 -0
- package/lib/types/src/modules/alif-shop-api/core/management/params.d.ts +12 -0
- package/lib/types/src/modules/alif-shop-api/core/management/types.d.ts +33 -0
- package/lib/types/src/modules/alif-shop-api/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
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 +1 @@
|
|
|
1
|
-
"use strict";var i=require("./api.js");exports.ApplicationsList=i.ApplicationsList;
|
|
1
|
+
"use strict";var i=require("./api.js");exports.ApplicationsList=i.ApplicationsList,exports.DeliverableWithType=i.DeliverableWithType,exports.SingleApplication=i.SingleApplication;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./auth/api.js"),r=require("./products/api.js"),
|
|
1
|
+
"use strict";var e=require("./auth/api.js"),r=require("./products/api.js"),t=require("./applications/api.js");exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,exports.SingleWarehouseProduct=r.SingleWarehouseProduct,exports.UpdateWarehouseProduct=r.UpdateWarehouseProduct,exports.WarehouseList=r.WarehouseList,exports.ApplicationsList=t.ApplicationsList,exports.DeliverableWithType=t.DeliverableWithType,exports.SingleApplication=t.SingleApplication;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("../../../../common/utils.js");exports.CheckReport=(r,t)=>r.get("/excel/excel/v1/reports/check",{params:{report_id:t.report_id},headers:e.pasteAuthHeaderAndApikey(t?.token)}),exports.GenerateReport=(r,t,p)=>r.post("/excel/excel/v1/reports/generate",p,{headers:e.pasteAuthHeaderAndApikey(t?.token)});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./core/auth/api.js"),r=require("./core/products/api.js"),o=require("./core/applications/api.js");exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,exports.SingleWarehouseProduct=r.SingleWarehouseProduct,exports.UpdateWarehouseProduct=r.UpdateWarehouseProduct,exports.WarehouseList=r.WarehouseList,exports.ApplicationsList=o.ApplicationsList;
|
|
1
|
+
"use strict";var e=require("./core/auth/api.js"),r=require("./core/products/api.js"),o=require("./core/applications/api.js");exports.GetToken=e.GetToken,exports.RefreshToken=e.RefreshToken,exports.SingleWarehouseProduct=r.SingleWarehouseProduct,exports.UpdateWarehouseProduct=r.UpdateWarehouseProduct,exports.WarehouseList=r.WarehouseList,exports.ApplicationsList=o.ApplicationsList,exports.DeliverableWithType=o.DeliverableWithType,exports.SingleApplication=o.SingleApplication;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{pasteAuthHeaderAndApikey as a}from"../../../../common/utils.js";const
|
|
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 +1 @@
|
|
|
1
|
-
export{ApplicationsList}from"./api.js";
|
|
1
|
+
export{ApplicationsList,DeliverableWithType,SingleApplication}from"./api.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{GetToken,RefreshToken}from"./auth/api.js";export{SingleWarehouseProduct,UpdateWarehouseProduct,WarehouseList}from"./products/api.js";export{ApplicationsList}from"./applications/api.js";
|
|
1
|
+
export{GetToken,RefreshToken}from"./auth/api.js";export{SingleWarehouseProduct,UpdateWarehouseProduct,WarehouseList}from"./products/api.js";export{ApplicationsList,DeliverableWithType,SingleApplication}from"./applications/api.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{pasteAuthHeaderAndApikey as e}from"../../../../common/utils.js";const r=(r,o,t)=>r.post("/excel/excel/v1/reports/generate",t,{headers:e(o?.token)}),o=(r,o)=>r.get("/excel/excel/v1/reports/check",{params:{report_id:o.report_id},headers:e(o?.token)});export{o as CheckReport,r as GenerateReport};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{GetToken,RefreshToken}from"./core/auth/api.js";export{SingleWarehouseProduct,UpdateWarehouseProduct,WarehouseList}from"./core/products/api.js";export{ApplicationsList}from"./core/applications/api.js";
|
|
1
|
+
export{GetToken,RefreshToken}from"./core/auth/api.js";export{SingleWarehouseProduct,UpdateWarehouseProduct,WarehouseList}from"./core/products/api.js";export{ApplicationsList,DeliverableWithType,SingleApplication}from"./core/applications/api.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { CallerParam } from '../../../../common/types.js';
|
|
2
2
|
import { ApplicationsApi } from './types.js';
|
|
3
|
-
import { ApplicationsParams } from './params.js';
|
|
3
|
+
import { ApplicationsParams, ApplicationIdBasedParams } from './params.js';
|
|
4
4
|
import 'axios';
|
|
5
5
|
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 SingleApplication: CallerParam<ApplicationIdBasedParams, ApplicationsApi.Single.Response>;
|
|
10
|
+
declare const DeliverableWithType: CallerParam<ApplicationIdBasedParams, ApplicationsApi.DeliverableList.Response>;
|
|
9
11
|
|
|
10
|
-
export { ApplicationsList };
|
|
12
|
+
export { ApplicationsList, DeliverableWithType, SingleApplication };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ApplicationsList } from './api.js';
|
|
1
|
+
export { ApplicationsList, DeliverableWithType, SingleApplication } from './api.js';
|
|
2
2
|
export { ApplicationsApi, ApplicationsEntity } from './types.js';
|
|
3
|
-
export { ApplicationsParams } from './params.js';
|
|
3
|
+
export { ApplicationIdBasedParams, ApplicationsParams } from './params.js';
|
|
4
4
|
import '../../../../common/types.js';
|
|
5
5
|
import 'axios';
|
|
6
6
|
import '../../common/interfaces.js';
|
|
@@ -17,5 +17,8 @@ interface ApplicationsParams extends TokenParams {
|
|
|
17
17
|
search_param: "phone" | "fio" | "passport" | "pinfl" | "application_id" | (string & {});
|
|
18
18
|
status_key: ApplicationsEntity.Statuses | (string & {});
|
|
19
19
|
}
|
|
20
|
+
interface ApplicationIdBasedParams extends TokenParams {
|
|
21
|
+
applicationId: string;
|
|
22
|
+
}
|
|
20
23
|
|
|
21
|
-
export type { ApplicationsParams };
|
|
24
|
+
export type { ApplicationIdBasedParams, ApplicationsParams };
|
|
@@ -3,9 +3,77 @@ import { IPaginatedResponse } from '../../common/interfaces.js';
|
|
|
3
3
|
declare namespace ApplicationsEntity {
|
|
4
4
|
type Sources = "MERCHANT" | "MERCHANT_MOBILE" | "ALIFSHOP" | "ALIFSHOP_MOBILE" | "ALIFMOBI" | "ALIFSHOP_MINI_APP" | "ONLINE" | "E-COMMERCE" | "COMPLIANCE";
|
|
5
5
|
type Statuses = "NEW" | "REVIEWING" | "APPROVED" | "REJECTED" | "COMPLETED" | "CANCELLED" | "DELETED" | "TO_DELIVERY";
|
|
6
|
+
interface Deliverable {
|
|
7
|
+
id: number;
|
|
8
|
+
deliverable_type: string;
|
|
9
|
+
deliverable_id: number;
|
|
10
|
+
type: string;
|
|
11
|
+
type_service: string;
|
|
12
|
+
created_at: string;
|
|
13
|
+
sender: {
|
|
14
|
+
location: {
|
|
15
|
+
city: string;
|
|
16
|
+
region: string;
|
|
17
|
+
street: string;
|
|
18
|
+
district: string;
|
|
19
|
+
index_id: unknown | null;
|
|
20
|
+
point_id: unknown | null;
|
|
21
|
+
};
|
|
22
|
+
sender_info: {
|
|
23
|
+
name: string;
|
|
24
|
+
contact_phone: string;
|
|
25
|
+
contact_person: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
receiver: {
|
|
29
|
+
location: {
|
|
30
|
+
city: string;
|
|
31
|
+
region: string;
|
|
32
|
+
street: string;
|
|
33
|
+
district: string;
|
|
34
|
+
index_id: unknown | null;
|
|
35
|
+
latitude: unknown | null;
|
|
36
|
+
point_id: unknown | null;
|
|
37
|
+
longitude: unknown | null;
|
|
38
|
+
};
|
|
39
|
+
receiver_info: {
|
|
40
|
+
contact_phone: string;
|
|
41
|
+
contact_person: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
status: {
|
|
45
|
+
id: number;
|
|
46
|
+
key: string;
|
|
47
|
+
name_ru: string;
|
|
48
|
+
name_uz: string;
|
|
49
|
+
};
|
|
50
|
+
status_tag: {
|
|
51
|
+
key: string;
|
|
52
|
+
value: string;
|
|
53
|
+
body_ru: string;
|
|
54
|
+
body_uz: string;
|
|
55
|
+
};
|
|
56
|
+
products_info: [
|
|
57
|
+
{
|
|
58
|
+
name: string;
|
|
59
|
+
price: number;
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
alif_delivery: {
|
|
63
|
+
application_id_from_alif_delivery: string;
|
|
64
|
+
alif_delivery_status_key: string;
|
|
65
|
+
driver_id: number;
|
|
66
|
+
};
|
|
67
|
+
delivery_status_id: number;
|
|
68
|
+
alif_delivery_order_id: string;
|
|
69
|
+
date_pickup: string;
|
|
70
|
+
weight: number;
|
|
71
|
+
volume: number;
|
|
72
|
+
entity_created_at: string;
|
|
73
|
+
}
|
|
6
74
|
interface ApplicationStatus {
|
|
7
75
|
id: number;
|
|
8
|
-
key:
|
|
76
|
+
key: Statuses;
|
|
9
77
|
title_ru: string;
|
|
10
78
|
body: string;
|
|
11
79
|
class: string;
|
|
@@ -19,7 +87,38 @@ declare namespace ApplicationsEntity {
|
|
|
19
87
|
phone: string;
|
|
20
88
|
client_status_key: "IDENTIFIED";
|
|
21
89
|
}
|
|
90
|
+
interface ApplicationPurchaseStatus {
|
|
91
|
+
id: number;
|
|
92
|
+
application_id: number;
|
|
93
|
+
status: string;
|
|
94
|
+
created_at: string;
|
|
95
|
+
updated_at: string;
|
|
96
|
+
}
|
|
22
97
|
interface Application {
|
|
98
|
+
id: number;
|
|
99
|
+
application_id: number;
|
|
100
|
+
good_name: string;
|
|
101
|
+
good: {
|
|
102
|
+
name: string;
|
|
103
|
+
};
|
|
104
|
+
good_type: {
|
|
105
|
+
id: number;
|
|
106
|
+
name: string;
|
|
107
|
+
is_markable: boolean;
|
|
108
|
+
};
|
|
109
|
+
good_type_id: number;
|
|
110
|
+
price: number;
|
|
111
|
+
quantity: number;
|
|
112
|
+
sku: string;
|
|
113
|
+
ikpu: string;
|
|
114
|
+
warehouse_item_id: number;
|
|
115
|
+
marking: unknown | null;
|
|
116
|
+
imeis: unknown[];
|
|
117
|
+
created_at: string;
|
|
118
|
+
updated_at: string;
|
|
119
|
+
deleted_at: string | null;
|
|
120
|
+
}
|
|
121
|
+
interface ApplicationProduct {
|
|
23
122
|
amount: number;
|
|
24
123
|
application_condition_id: number;
|
|
25
124
|
application_status: ApplicationsEntity.ApplicationStatus;
|
|
@@ -60,10 +159,23 @@ declare namespace ApplicationsEntity {
|
|
|
60
159
|
updated_from_str: "CRM" | "CREDITS" | (string & {});
|
|
61
160
|
confirmed_by_merchant: false;
|
|
62
161
|
}
|
|
162
|
+
interface SingleApplicationProduct extends ApplicationProduct {
|
|
163
|
+
contract: unknown | null;
|
|
164
|
+
application_items: Application[];
|
|
165
|
+
alif_purchase_status: ApplicationPurchaseStatus;
|
|
166
|
+
}
|
|
63
167
|
}
|
|
64
168
|
declare namespace ApplicationsApi {
|
|
65
169
|
namespace List {
|
|
66
|
-
type Response = IPaginatedResponse<ApplicationsEntity.
|
|
170
|
+
type Response = IPaginatedResponse<ApplicationsEntity.ApplicationProduct[]>;
|
|
171
|
+
}
|
|
172
|
+
namespace Single {
|
|
173
|
+
type Response = ApplicationsEntity.SingleApplicationProduct;
|
|
174
|
+
}
|
|
175
|
+
namespace DeliverableList {
|
|
176
|
+
interface Response {
|
|
177
|
+
data: ApplicationsEntity.Deliverable[];
|
|
178
|
+
}
|
|
67
179
|
}
|
|
68
180
|
}
|
|
69
181
|
|
|
@@ -3,9 +3,9 @@ export { AuthApi } from './auth/types.js';
|
|
|
3
3
|
export { SingleWarehouseProduct, UpdateWarehouseProduct, WarehouseList } from './products/api.js';
|
|
4
4
|
export { ProductsApi, ProductsEntity } from './products/types.js';
|
|
5
5
|
export { ProductIdBasedParams, WarehouseProductsListParams } from './products/params.js';
|
|
6
|
-
export { ApplicationsList } from './applications/api.js';
|
|
6
|
+
export { ApplicationsList, DeliverableWithType, SingleApplication } from './applications/api.js';
|
|
7
7
|
export { ApplicationsApi, ApplicationsEntity } from './applications/types.js';
|
|
8
|
-
export { ApplicationsParams } from './applications/params.js';
|
|
8
|
+
export { ApplicationIdBasedParams, ApplicationsParams } from './applications/params.js';
|
|
9
9
|
export { AlifShopEntity } from './types.js';
|
|
10
10
|
import '../../../common/types.js';
|
|
11
11
|
import 'axios';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CallerParamPayload, CallerParam } from '../../../../common/types.js';
|
|
2
|
+
import { TokenParams } from '../../../../common/params.js';
|
|
3
|
+
import { AlifManagementApi } from './types.js';
|
|
4
|
+
import { GenerateReportParams, CheckReportParams } from './params.js';
|
|
5
|
+
import 'axios';
|
|
6
|
+
|
|
7
|
+
declare const GenerateReport: CallerParamPayload<TokenParams, GenerateReportParams, AlifManagementApi.GenerateReport.Response>;
|
|
8
|
+
declare const CheckReport: CallerParam<CheckReportParams, AlifManagementApi.CheckReport.Response>;
|
|
9
|
+
|
|
10
|
+
export { CheckReport, GenerateReport };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TokenParams } from '../../../../common/params.js';
|
|
2
|
+
|
|
3
|
+
interface GenerateReportParams {
|
|
4
|
+
type_id: number;
|
|
5
|
+
datetime_from: string;
|
|
6
|
+
datetime_to: string;
|
|
7
|
+
}
|
|
8
|
+
interface CheckReportParams extends TokenParams {
|
|
9
|
+
report_id: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type { CheckReportParams, GenerateReportParams };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare namespace AlifManagementEntity {
|
|
2
|
+
interface Report {
|
|
3
|
+
report_id: string;
|
|
4
|
+
data: {
|
|
5
|
+
type_id: number;
|
|
6
|
+
datetime_from: string;
|
|
7
|
+
datetime_to: string;
|
|
8
|
+
app_id: number;
|
|
9
|
+
};
|
|
10
|
+
user: {
|
|
11
|
+
name: string;
|
|
12
|
+
id: number;
|
|
13
|
+
};
|
|
14
|
+
metadata: {
|
|
15
|
+
created_at: string;
|
|
16
|
+
message_id: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
declare namespace AlifManagementApi {
|
|
21
|
+
namespace GenerateReport {
|
|
22
|
+
type Response = AlifManagementEntity.Report;
|
|
23
|
+
}
|
|
24
|
+
namespace CheckReport {
|
|
25
|
+
interface Response {
|
|
26
|
+
report_id: string;
|
|
27
|
+
type_id: number;
|
|
28
|
+
status: "IN_PROGRESS" | "SUCCESS";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { AlifManagementApi, AlifManagementEntity };
|
|
@@ -3,9 +3,9 @@ export { AuthApi } from './core/auth/types.js';
|
|
|
3
3
|
export { SingleWarehouseProduct, UpdateWarehouseProduct, WarehouseList } from './core/products/api.js';
|
|
4
4
|
export { ProductsApi, ProductsEntity } from './core/products/types.js';
|
|
5
5
|
export { ProductIdBasedParams, WarehouseProductsListParams } from './core/products/params.js';
|
|
6
|
-
export { ApplicationsList } from './core/applications/api.js';
|
|
6
|
+
export { ApplicationsList, DeliverableWithType, SingleApplication } from './core/applications/api.js';
|
|
7
7
|
export { ApplicationsApi, ApplicationsEntity } from './core/applications/types.js';
|
|
8
|
-
export { ApplicationsParams } from './core/applications/params.js';
|
|
8
|
+
export { ApplicationIdBasedParams, ApplicationsParams } from './core/applications/params.js';
|
|
9
9
|
export { AlifShopEntity } from './core/types.js';
|
|
10
10
|
import '../../common/types.js';
|
|
11
11
|
import 'axios';
|