@bringg/dashboard-sdk 0.5.14 → 0.5.15
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/dist/DeliveryCatalog/DeliveryCatalog.consts.d.ts +93 -0
- package/dist/DeliveryCatalog/DeliveryCatalogApi.d.ts +11 -1
- package/dist/DeliveryCatalog/DeliveryCatalogApi.js +60 -0
- package/dist/DeliveryCatalog/DeliveryCatalogApi.js.map +1 -1
- package/dist/DeliveryCatalog/Entity/DeliveryCatalogEntity.d.ts +11 -1
- package/dist/DeliveryCatalog/Entity/DeliveryCatalogEntity.js +70 -1
- package/dist/DeliveryCatalog/Entity/DeliveryCatalogEntity.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +131 -2
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +3 -3
- package/dist/bringg-dashboard-sdk.min.js +2 -2
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -87,6 +87,63 @@ export declare type SendNotificationPayload = {
|
|
|
87
87
|
export declare type SendNotificationResponse = {
|
|
88
88
|
success: boolean;
|
|
89
89
|
};
|
|
90
|
+
export interface MerchantConnectionsListResponse {
|
|
91
|
+
records: Array<FleetSwagger & {
|
|
92
|
+
delivery_provider: {
|
|
93
|
+
setup_configuration: Bringg.DeliveryProvider['setup_configuration'];
|
|
94
|
+
absolute_logo_path: string | null;
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
}
|
|
98
|
+
export interface MerchantConnectionsCreateControllerRequest {
|
|
99
|
+
delivery_provider_id: number;
|
|
100
|
+
name: string;
|
|
101
|
+
type?: FleetKind;
|
|
102
|
+
env_type: FleetEnvType;
|
|
103
|
+
capabilities?: Record<string, any>;
|
|
104
|
+
rules?: Record<string, unknown>;
|
|
105
|
+
data?: Record<string, unknown>;
|
|
106
|
+
fleet_template_id?: number;
|
|
107
|
+
external_id?: string;
|
|
108
|
+
}
|
|
109
|
+
export interface MerchantConnectionsCreateControllerResponse extends MerchantConnectionsUpdateControllerResponse {
|
|
110
|
+
}
|
|
111
|
+
export interface MerchantConnectionsUpdateControllerResponse extends MerchantConnectionsUpdateControllerRequest {
|
|
112
|
+
merchant_id: number;
|
|
113
|
+
fleet_type: FleetType;
|
|
114
|
+
type: FleetKind;
|
|
115
|
+
name: string;
|
|
116
|
+
status: FleetStatus;
|
|
117
|
+
delivery_provider_id?: number;
|
|
118
|
+
delivery_provider: {
|
|
119
|
+
setup_configuration: Bringg.DeliveryProvider['setup_configuration'];
|
|
120
|
+
absolute_logo_path: string | null;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
export interface MerchantConnectionsUpdateControllerRequest {
|
|
124
|
+
id: number;
|
|
125
|
+
name?: string;
|
|
126
|
+
type?: FleetKind;
|
|
127
|
+
env_type?: FleetEnvType;
|
|
128
|
+
capabilities?: Record<string, any>;
|
|
129
|
+
rules?: Record<string, unknown>;
|
|
130
|
+
data?: Record<string, unknown>;
|
|
131
|
+
fleet_template_id?: number;
|
|
132
|
+
external_id?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface MerchantConnectionsVerifyRequest extends MerchantConnectionsUpdateControllerRequest {
|
|
135
|
+
data: Record<string, unknown>;
|
|
136
|
+
}
|
|
137
|
+
export interface MerchantConnectionsVerifyResponse extends MerchantConnectionsUpdateControllerResponse {
|
|
138
|
+
data: Record<string, unknown>;
|
|
139
|
+
}
|
|
140
|
+
export interface MerchantsConnectionsPauseControllerRequest {
|
|
141
|
+
ids: number[];
|
|
142
|
+
}
|
|
143
|
+
export interface MerchantsConnectionsPauseControllerResponse {
|
|
144
|
+
paused: number[];
|
|
145
|
+
}
|
|
146
|
+
export declare type FleetKind = 'ExternalFleet' | 'BringgFleet' | 'SelfFleet';
|
|
90
147
|
export declare type FleetInterface = {
|
|
91
148
|
id: number;
|
|
92
149
|
delivery_provider_id?: number;
|
|
@@ -166,5 +223,41 @@ export declare enum FleetType {
|
|
|
166
223
|
FiveString = 26,
|
|
167
224
|
PointPickup = 27,
|
|
168
225
|
GLS = 28,
|
|
226
|
+
TNT = 29,
|
|
227
|
+
IFood2 = 30,
|
|
169
228
|
EmulatedDeliveryProvider = 999
|
|
170
229
|
}
|
|
230
|
+
export interface FleetSwagger {
|
|
231
|
+
id: number;
|
|
232
|
+
merchant_id: number;
|
|
233
|
+
fleet_type: FleetType;
|
|
234
|
+
status: FleetStatus;
|
|
235
|
+
env_type: FleetEnvType;
|
|
236
|
+
type?: string;
|
|
237
|
+
capabilities?: Record<string, any>;
|
|
238
|
+
rules?: Record<string, unknown>;
|
|
239
|
+
name?: string;
|
|
240
|
+
data?: Record<string, unknown>;
|
|
241
|
+
fleet_template_id?: number;
|
|
242
|
+
external_id?: string;
|
|
243
|
+
billing_data?: {
|
|
244
|
+
bringg_fleet_fee_currency: string;
|
|
245
|
+
bringg_fleet_fee_cents: number;
|
|
246
|
+
};
|
|
247
|
+
delivery_provider_id?: number;
|
|
248
|
+
created_at?: string;
|
|
249
|
+
updated_at?: string;
|
|
250
|
+
delete_at?: string;
|
|
251
|
+
absolute_logo_path?: string;
|
|
252
|
+
}
|
|
253
|
+
export declare enum FleetStatus {
|
|
254
|
+
Active = 0,
|
|
255
|
+
Paused = 1,
|
|
256
|
+
Pending = 2,
|
|
257
|
+
Draft = 3,
|
|
258
|
+
Failed = 4
|
|
259
|
+
}
|
|
260
|
+
export declare enum FleetEnvType {
|
|
261
|
+
Production = 0,
|
|
262
|
+
Staging = 1
|
|
263
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Session from '../Services/Identity/Session';
|
|
2
|
-
import { GetDeliveryCatalogPayload, GetDeliveryCatalogResponse, GetFilterDetailsResponse, GetFavouritesPayload, SendNotificationPayload, SendNotificationResponse, FleetInterface, DeliveryProviderResponse } from './DeliveryCatalog.consts';
|
|
2
|
+
import { GetDeliveryCatalogPayload, GetDeliveryCatalogResponse, GetFilterDetailsResponse, GetFavouritesPayload, SendNotificationPayload, SendNotificationResponse, FleetInterface, DeliveryProviderResponse, MerchantConnectionsListResponse, MerchantConnectionsCreateControllerRequest, MerchantConnectionsCreateControllerResponse, MerchantConnectionsUpdateControllerRequest, MerchantConnectionsUpdateControllerResponse, MerchantConnectionsVerifyRequest, MerchantConnectionsVerifyResponse, MerchantsConnectionsPauseControllerRequest, MerchantsConnectionsPauseControllerResponse } from './DeliveryCatalog.consts';
|
|
3
3
|
export default class DeliveryCatalogApi {
|
|
4
4
|
private deliveryCatalogEntity;
|
|
5
5
|
constructor(session: Session);
|
|
@@ -16,4 +16,14 @@ export default class DeliveryCatalogApi {
|
|
|
16
16
|
getDeliveryById(payload: {
|
|
17
17
|
id: number;
|
|
18
18
|
}): Promise<DeliveryProviderResponse>;
|
|
19
|
+
getMerchantConnectionsList(): Promise<MerchantConnectionsListResponse>;
|
|
20
|
+
createMerchantConnection(payload: MerchantConnectionsCreateControllerRequest): Promise<MerchantConnectionsCreateControllerResponse>;
|
|
21
|
+
updateMerchantConnection(payload: MerchantConnectionsUpdateControllerRequest): Promise<MerchantConnectionsUpdateControllerResponse>;
|
|
22
|
+
deleteMerchantConnection(payload: {
|
|
23
|
+
ids: number[];
|
|
24
|
+
}): Promise<{
|
|
25
|
+
deleted: number[];
|
|
26
|
+
}>;
|
|
27
|
+
verifyMerchantConnectionCredentials(payload: MerchantConnectionsVerifyRequest): Promise<MerchantConnectionsVerifyResponse>;
|
|
28
|
+
pauseMerchantConnection(payload: MerchantsConnectionsPauseControllerRequest): Promise<MerchantsConnectionsPauseControllerResponse>;
|
|
19
29
|
}
|
|
@@ -111,6 +111,66 @@ var DeliveryCatalogApi = /** @class */ (function () {
|
|
|
111
111
|
});
|
|
112
112
|
});
|
|
113
113
|
};
|
|
114
|
+
DeliveryCatalogApi.prototype.getMerchantConnectionsList = function () {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
116
|
+
return __generator(this, function (_a) {
|
|
117
|
+
switch (_a.label) {
|
|
118
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.getMerchantConnectionsList()];
|
|
119
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
DeliveryCatalogApi.prototype.createMerchantConnection = function (payload) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
126
|
+
return __generator(this, function (_a) {
|
|
127
|
+
switch (_a.label) {
|
|
128
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.createMerchantConnection(payload)];
|
|
129
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
DeliveryCatalogApi.prototype.updateMerchantConnection = function (payload) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
136
|
+
return __generator(this, function (_a) {
|
|
137
|
+
switch (_a.label) {
|
|
138
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.updateMerchantConnection(payload)];
|
|
139
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
DeliveryCatalogApi.prototype.deleteMerchantConnection = function (payload) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
146
|
+
return __generator(this, function (_a) {
|
|
147
|
+
switch (_a.label) {
|
|
148
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.deleteMerchantConnection(payload)];
|
|
149
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
DeliveryCatalogApi.prototype.verifyMerchantConnectionCredentials = function (payload) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
156
|
+
return __generator(this, function (_a) {
|
|
157
|
+
switch (_a.label) {
|
|
158
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.verifyMerchantConnectionCredentials(payload)];
|
|
159
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
DeliveryCatalogApi.prototype.pauseMerchantConnection = function (payload) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
166
|
+
return __generator(this, function (_a) {
|
|
167
|
+
switch (_a.label) {
|
|
168
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.pauseMerchantConnection(payload)];
|
|
169
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
};
|
|
114
174
|
return DeliveryCatalogApi;
|
|
115
175
|
}());
|
|
116
176
|
exports.default = DeliveryCatalogApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliveryCatalogApi.js","sourceRoot":"","sources":["../../src/DeliveryCatalog/DeliveryCatalogApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wEAAmE;
|
|
1
|
+
{"version":3,"file":"DeliveryCatalogApi.js","sourceRoot":"","sources":["../../src/DeliveryCatalog/DeliveryCatalogApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wEAAmE;AAqBnE;IAGC,4BAAY,OAAgB;QAC3B,IAAI,CAAC,qBAAqB,GAAG,IAAI,+BAAqB,CAAC,OAAO,CAAC,CAAC;IACjE,CAAC;IAEK,yCAAY,GAAlB,UAAmB,OAAkC;;;;4BAC7C,qBAAM,IAAI,CAAC,qBAAqB,CAAC,YAAY,CAAC,OAAO,CAAC,EAAA;4BAA7D,sBAAO,SAAsD,EAAC;;;;KAC9D;IAEK,uCAAU,GAAhB;;;;4BACQ,qBAAM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,SAAkE,EAAC;;;;KAC1E;IAEK,qDAAwB,GAA9B,UAA+B,OAA0B;;;;4BACjD,qBAAM,IAAI,CAAC,qBAAqB,CAAC,wBAAwB,CAAC,OAAO,CAAC,EAAA;4BAAzE,sBAAO,SAAkE,EAAC;;;;KAC1E;IAEK,gEAAmC,GAAzC,UACC,OAAyC;;;;4BAElC,qBAAM,IAAI,CAAC,qBAAqB,CAAC,mCAAmC,CAAC,OAAO,CAAC,EAAA;4BAApF,sBAAO,SAA6E,EAAC;;;;KACrF;IAEK,oDAAuB,GAA7B,UACC,OAAmD;;;;4BAE5C,qBAAM,IAAI,CAAC,qBAAqB,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAA;4BAAxE,sBAAO,SAAiE,EAAC;;;;KACzE;IACF,yBAAC;AAAD,CAAC,AAlED,IAkEC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Entity from '../../Core/Entity';
|
|
2
2
|
import Session from './../../Services/Identity/Session';
|
|
3
|
-
import { GetDeliveryCatalogPayload, GetDeliveryCatalogResponse, GetFilterDetailsResponse, GetFavouritesPayload, SendNotificationPayload, SendNotificationResponse, FleetInterface, DeliveryProviderResponse } from '../DeliveryCatalog.consts';
|
|
3
|
+
import { GetDeliveryCatalogPayload, GetDeliveryCatalogResponse, GetFilterDetailsResponse, GetFavouritesPayload, SendNotificationPayload, SendNotificationResponse, FleetInterface, DeliveryProviderResponse, MerchantConnectionsListResponse, MerchantConnectionsCreateControllerRequest, MerchantConnectionsCreateControllerResponse, MerchantConnectionsUpdateControllerRequest, MerchantConnectionsUpdateControllerResponse, MerchantConnectionsVerifyRequest, MerchantConnectionsVerifyResponse, MerchantsConnectionsPauseControllerRequest, MerchantsConnectionsPauseControllerResponse } from '../DeliveryCatalog.consts';
|
|
4
4
|
export default class DeliveryCatalogEntity extends Entity<DeliveryCatalogEntity> {
|
|
5
5
|
constructor(session: Session);
|
|
6
6
|
getProviders(payload: GetDeliveryCatalogPayload): Promise<GetDeliveryCatalogResponse[]>;
|
|
@@ -16,4 +16,14 @@ export default class DeliveryCatalogEntity extends Entity<DeliveryCatalogEntity>
|
|
|
16
16
|
getDeliveryById(payload: {
|
|
17
17
|
id: number;
|
|
18
18
|
}): Promise<DeliveryProviderResponse>;
|
|
19
|
+
getMerchantConnectionsList(): Promise<MerchantConnectionsListResponse>;
|
|
20
|
+
createMerchantConnection(payload: MerchantConnectionsCreateControllerRequest): Promise<MerchantConnectionsCreateControllerResponse>;
|
|
21
|
+
updateMerchantConnection(payload: MerchantConnectionsUpdateControllerRequest): Promise<MerchantConnectionsUpdateControllerResponse>;
|
|
22
|
+
deleteMerchantConnection(payload: {
|
|
23
|
+
ids: number[];
|
|
24
|
+
}): Promise<{
|
|
25
|
+
deleted: number[];
|
|
26
|
+
}>;
|
|
27
|
+
verifyMerchantConnectionCredentials(payload: MerchantConnectionsVerifyRequest): Promise<MerchantConnectionsVerifyResponse>;
|
|
28
|
+
pauseMerchantConnection(payload: MerchantsConnectionsPauseControllerRequest): Promise<MerchantsConnectionsPauseControllerResponse>;
|
|
19
29
|
}
|
|
@@ -56,6 +56,7 @@ var servicePrefix = '/fleet-service';
|
|
|
56
56
|
var servicePrefixDeliveryProvider = '/delivery-provider-service';
|
|
57
57
|
var baseRouteProviders = servicePrefixDeliveryProvider + "/v1/delivery-providers";
|
|
58
58
|
var baseRouteMerchant = servicePrefixDeliveryProvider + "/v1/merchant/delivery-providers";
|
|
59
|
+
var baseMerchantConnections = servicePrefixDeliveryProvider + "/v1/merchant-connections";
|
|
59
60
|
var baseRouteFleets = servicePrefix + "/v1/fleets";
|
|
60
61
|
var ROUTES = {
|
|
61
62
|
PROVIDERS: "" + baseRouteProviders,
|
|
@@ -64,7 +65,15 @@ var ROUTES = {
|
|
|
64
65
|
FAVOURITES: baseRouteProviders + "/favorites",
|
|
65
66
|
NOTIFICATION: baseRouteMerchant + "/notify",
|
|
66
67
|
FLEETS: baseRouteFleets + "/fleet",
|
|
67
|
-
GET_DELIVERY_PROVIDER: baseRouteProviders + "/delivery-provider"
|
|
68
|
+
GET_DELIVERY_PROVIDER: baseRouteProviders + "/delivery-provider",
|
|
69
|
+
MERCHANT_CONNECTIONS: {
|
|
70
|
+
LIST: baseMerchantConnections + "/list",
|
|
71
|
+
CREATE: baseMerchantConnections + "/create",
|
|
72
|
+
UPDATE: baseMerchantConnections + "/update",
|
|
73
|
+
DELETE: baseMerchantConnections + "/delete",
|
|
74
|
+
VERIFY: baseMerchantConnections + "/verify",
|
|
75
|
+
PAUSE: baseMerchantConnections + "/pause"
|
|
76
|
+
}
|
|
68
77
|
};
|
|
69
78
|
var DeliveryCatalogEntity = /** @class */ (function (_super) {
|
|
70
79
|
__extends(DeliveryCatalogEntity, _super);
|
|
@@ -144,6 +153,66 @@ var DeliveryCatalogEntity = /** @class */ (function (_super) {
|
|
|
144
153
|
});
|
|
145
154
|
});
|
|
146
155
|
};
|
|
156
|
+
DeliveryCatalogEntity.prototype.getMerchantConnectionsList = function () {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
158
|
+
return __generator(this, function (_a) {
|
|
159
|
+
switch (_a.label) {
|
|
160
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.LIST).invoke()];
|
|
161
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
DeliveryCatalogEntity.prototype.createMerchantConnection = function (payload) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
168
|
+
return __generator(this, function (_a) {
|
|
169
|
+
switch (_a.label) {
|
|
170
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.CREATE).withPayload(payload).invoke()];
|
|
171
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
DeliveryCatalogEntity.prototype.updateMerchantConnection = function (payload) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
178
|
+
return __generator(this, function (_a) {
|
|
179
|
+
switch (_a.label) {
|
|
180
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.UPDATE).withPayload(payload).invoke()];
|
|
181
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
};
|
|
186
|
+
DeliveryCatalogEntity.prototype.deleteMerchantConnection = function (payload) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
188
|
+
return __generator(this, function (_a) {
|
|
189
|
+
switch (_a.label) {
|
|
190
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.DELETE).withPayload(payload).invoke()];
|
|
191
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
DeliveryCatalogEntity.prototype.verifyMerchantConnectionCredentials = function (payload) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
198
|
+
return __generator(this, function (_a) {
|
|
199
|
+
switch (_a.label) {
|
|
200
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.VERIFY).withPayload(payload).invoke()];
|
|
201
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
};
|
|
206
|
+
DeliveryCatalogEntity.prototype.pauseMerchantConnection = function (payload) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
208
|
+
return __generator(this, function (_a) {
|
|
209
|
+
switch (_a.label) {
|
|
210
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.PAUSE).withPayload(payload).invoke()];
|
|
211
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
};
|
|
147
216
|
return DeliveryCatalogEntity;
|
|
148
217
|
}(Entity_1.default));
|
|
149
218
|
exports.default = DeliveryCatalogEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliveryCatalogEntity.js","sourceRoot":"","sources":["../../../src/DeliveryCatalog/Entity/DeliveryCatalogEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAuC;
|
|
1
|
+
{"version":3,"file":"DeliveryCatalogEntity.js","sourceRoot":"","sources":["../../../src/DeliveryCatalog/Entity/DeliveryCatalogEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAuC;AAsBvC,IAAM,aAAa,GAAG,gBAAgB,CAAC;AACvC,IAAM,6BAA6B,GAAG,4BAA4B,CAAC;AACnE,IAAM,kBAAkB,GAAM,6BAA6B,2BAAwB,CAAC;AACpF,IAAM,iBAAiB,GAAM,6BAA6B,oCAAiC,CAAC;AAC5F,IAAM,uBAAuB,GAAM,6BAA6B,6BAA0B,CAAC;AAC3F,IAAM,eAAe,GAAM,aAAa,eAAY,CAAC;AACrD,IAAM,MAAM,GAAG;IACd,SAAS,EAAE,KAAG,kBAAoB;IAClC,OAAO,EAAK,kBAAkB,aAAU;IACxC,eAAe,EAAK,kBAAkB,qBAAkB;IACxD,UAAU,EAAK,kBAAkB,eAAY;IAC7C,YAAY,EAAK,iBAAiB,YAAS;IAC3C,MAAM,EAAK,eAAe,WAAQ;IAClC,qBAAqB,EAAK,kBAAkB,uBAAoB;IAChE,oBAAoB,EAAE;QACrB,IAAI,EAAK,uBAAuB,UAAO;QACvC,MAAM,EAAK,uBAAuB,YAAS;QAC3C,MAAM,E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AAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAA;4BAA/G,sBAAO,SAAwG,EAAC;;;;KAChH;IAEK,mEAAmC,GAAzC,UACC,OAAyC;;;;4BAElC,qBAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAA;4BAA/G,sBAAO,SAAwG,EAAC;;;;KAChH;IAEK,uDAAuB,GAA7B,UACC,OAAmD;;;;4BAE5C,qBAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAA;4BAA9G,sBAAO,SAAuG,EAAC;;;;KAC/G;IACF,4BAAC;AAAD,CAAC,AAnED,CAAmD,gBAAM,GAmExD"}
|
|
@@ -52,7 +52,7 @@ var axios_1 = require("axios");
|
|
|
52
52
|
var Logger_1 = require("../Core/Logger");
|
|
53
53
|
var lodash_1 = require("lodash");
|
|
54
54
|
var BringgException_1 = require("../Core/BringgException");
|
|
55
|
-
var version = '0.5.
|
|
55
|
+
var version = '0.5.15';
|
|
56
56
|
function logErrorResponse(response) {
|
|
57
57
|
var data = response.data, status = response.status;
|
|
58
58
|
try {
|
|
@@ -30502,7 +30502,7 @@ var axios_1 = __webpack_require__(146);
|
|
|
30502
30502
|
var Logger_1 = __webpack_require__(39);
|
|
30503
30503
|
var lodash_1 = __webpack_require__(11);
|
|
30504
30504
|
var BringgException_1 = __webpack_require__(15);
|
|
30505
|
-
var version = '0.5.
|
|
30505
|
+
var version = '0.5.15';
|
|
30506
30506
|
function logErrorResponse(response) {
|
|
30507
30507
|
var data = response.data, status = response.status;
|
|
30508
30508
|
try {
|
|
@@ -60720,6 +60720,66 @@ var DeliveryCatalogApi = /** @class */ (function () {
|
|
|
60720
60720
|
});
|
|
60721
60721
|
});
|
|
60722
60722
|
};
|
|
60723
|
+
DeliveryCatalogApi.prototype.getMerchantConnectionsList = function () {
|
|
60724
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60725
|
+
return __generator(this, function (_a) {
|
|
60726
|
+
switch (_a.label) {
|
|
60727
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.getMerchantConnectionsList()];
|
|
60728
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60729
|
+
}
|
|
60730
|
+
});
|
|
60731
|
+
});
|
|
60732
|
+
};
|
|
60733
|
+
DeliveryCatalogApi.prototype.createMerchantConnection = function (payload) {
|
|
60734
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60735
|
+
return __generator(this, function (_a) {
|
|
60736
|
+
switch (_a.label) {
|
|
60737
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.createMerchantConnection(payload)];
|
|
60738
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60739
|
+
}
|
|
60740
|
+
});
|
|
60741
|
+
});
|
|
60742
|
+
};
|
|
60743
|
+
DeliveryCatalogApi.prototype.updateMerchantConnection = function (payload) {
|
|
60744
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60745
|
+
return __generator(this, function (_a) {
|
|
60746
|
+
switch (_a.label) {
|
|
60747
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.updateMerchantConnection(payload)];
|
|
60748
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60749
|
+
}
|
|
60750
|
+
});
|
|
60751
|
+
});
|
|
60752
|
+
};
|
|
60753
|
+
DeliveryCatalogApi.prototype.deleteMerchantConnection = function (payload) {
|
|
60754
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60755
|
+
return __generator(this, function (_a) {
|
|
60756
|
+
switch (_a.label) {
|
|
60757
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.deleteMerchantConnection(payload)];
|
|
60758
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60759
|
+
}
|
|
60760
|
+
});
|
|
60761
|
+
});
|
|
60762
|
+
};
|
|
60763
|
+
DeliveryCatalogApi.prototype.verifyMerchantConnectionCredentials = function (payload) {
|
|
60764
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60765
|
+
return __generator(this, function (_a) {
|
|
60766
|
+
switch (_a.label) {
|
|
60767
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.verifyMerchantConnectionCredentials(payload)];
|
|
60768
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60769
|
+
}
|
|
60770
|
+
});
|
|
60771
|
+
});
|
|
60772
|
+
};
|
|
60773
|
+
DeliveryCatalogApi.prototype.pauseMerchantConnection = function (payload) {
|
|
60774
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60775
|
+
return __generator(this, function (_a) {
|
|
60776
|
+
switch (_a.label) {
|
|
60777
|
+
case 0: return [4 /*yield*/, this.deliveryCatalogEntity.pauseMerchantConnection(payload)];
|
|
60778
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60779
|
+
}
|
|
60780
|
+
});
|
|
60781
|
+
});
|
|
60782
|
+
};
|
|
60723
60783
|
return DeliveryCatalogApi;
|
|
60724
60784
|
}());
|
|
60725
60785
|
exports.default = DeliveryCatalogApi;
|
|
@@ -60788,6 +60848,7 @@ var servicePrefix = '/fleet-service';
|
|
|
60788
60848
|
var servicePrefixDeliveryProvider = '/delivery-provider-service';
|
|
60789
60849
|
var baseRouteProviders = servicePrefixDeliveryProvider + "/v1/delivery-providers";
|
|
60790
60850
|
var baseRouteMerchant = servicePrefixDeliveryProvider + "/v1/merchant/delivery-providers";
|
|
60851
|
+
var baseMerchantConnections = servicePrefixDeliveryProvider + "/v1/merchant-connections";
|
|
60791
60852
|
var baseRouteFleets = servicePrefix + "/v1/fleets";
|
|
60792
60853
|
var ROUTES = {
|
|
60793
60854
|
PROVIDERS: "" + baseRouteProviders,
|
|
@@ -60796,7 +60857,15 @@ var ROUTES = {
|
|
|
60796
60857
|
FAVOURITES: baseRouteProviders + "/favorites",
|
|
60797
60858
|
NOTIFICATION: baseRouteMerchant + "/notify",
|
|
60798
60859
|
FLEETS: baseRouteFleets + "/fleet",
|
|
60799
|
-
GET_DELIVERY_PROVIDER: baseRouteProviders + "/delivery-provider"
|
|
60860
|
+
GET_DELIVERY_PROVIDER: baseRouteProviders + "/delivery-provider",
|
|
60861
|
+
MERCHANT_CONNECTIONS: {
|
|
60862
|
+
LIST: baseMerchantConnections + "/list",
|
|
60863
|
+
CREATE: baseMerchantConnections + "/create",
|
|
60864
|
+
UPDATE: baseMerchantConnections + "/update",
|
|
60865
|
+
DELETE: baseMerchantConnections + "/delete",
|
|
60866
|
+
VERIFY: baseMerchantConnections + "/verify",
|
|
60867
|
+
PAUSE: baseMerchantConnections + "/pause"
|
|
60868
|
+
}
|
|
60800
60869
|
};
|
|
60801
60870
|
var DeliveryCatalogEntity = /** @class */ (function (_super) {
|
|
60802
60871
|
__extends(DeliveryCatalogEntity, _super);
|
|
@@ -60876,6 +60945,66 @@ var DeliveryCatalogEntity = /** @class */ (function (_super) {
|
|
|
60876
60945
|
});
|
|
60877
60946
|
});
|
|
60878
60947
|
};
|
|
60948
|
+
DeliveryCatalogEntity.prototype.getMerchantConnectionsList = function () {
|
|
60949
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60950
|
+
return __generator(this, function (_a) {
|
|
60951
|
+
switch (_a.label) {
|
|
60952
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.LIST).invoke()];
|
|
60953
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60954
|
+
}
|
|
60955
|
+
});
|
|
60956
|
+
});
|
|
60957
|
+
};
|
|
60958
|
+
DeliveryCatalogEntity.prototype.createMerchantConnection = function (payload) {
|
|
60959
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60960
|
+
return __generator(this, function (_a) {
|
|
60961
|
+
switch (_a.label) {
|
|
60962
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.CREATE).withPayload(payload).invoke()];
|
|
60963
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60964
|
+
}
|
|
60965
|
+
});
|
|
60966
|
+
});
|
|
60967
|
+
};
|
|
60968
|
+
DeliveryCatalogEntity.prototype.updateMerchantConnection = function (payload) {
|
|
60969
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60970
|
+
return __generator(this, function (_a) {
|
|
60971
|
+
switch (_a.label) {
|
|
60972
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.UPDATE).withPayload(payload).invoke()];
|
|
60973
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60974
|
+
}
|
|
60975
|
+
});
|
|
60976
|
+
});
|
|
60977
|
+
};
|
|
60978
|
+
DeliveryCatalogEntity.prototype.deleteMerchantConnection = function (payload) {
|
|
60979
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60980
|
+
return __generator(this, function (_a) {
|
|
60981
|
+
switch (_a.label) {
|
|
60982
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.DELETE).withPayload(payload).invoke()];
|
|
60983
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60984
|
+
}
|
|
60985
|
+
});
|
|
60986
|
+
});
|
|
60987
|
+
};
|
|
60988
|
+
DeliveryCatalogEntity.prototype.verifyMerchantConnectionCredentials = function (payload) {
|
|
60989
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
60990
|
+
return __generator(this, function (_a) {
|
|
60991
|
+
switch (_a.label) {
|
|
60992
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.VERIFY).withPayload(payload).invoke()];
|
|
60993
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
60994
|
+
}
|
|
60995
|
+
});
|
|
60996
|
+
});
|
|
60997
|
+
};
|
|
60998
|
+
DeliveryCatalogEntity.prototype.pauseMerchantConnection = function (payload) {
|
|
60999
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
61000
|
+
return __generator(this, function (_a) {
|
|
61001
|
+
switch (_a.label) {
|
|
61002
|
+
case 0: return [4 /*yield*/, this.service.routeGenerator.post(ROUTES.MERCHANT_CONNECTIONS.PAUSE).withPayload(payload).invoke()];
|
|
61003
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
61004
|
+
}
|
|
61005
|
+
});
|
|
61006
|
+
});
|
|
61007
|
+
};
|
|
60879
61008
|
return DeliveryCatalogEntity;
|
|
60880
61009
|
}(Entity_1.default));
|
|
60881
61010
|
exports.default = DeliveryCatalogEntity;
|