@bringg/dashboard-sdk 9.3.1 → 9.4.1
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/Chat/Chat.d.ts +4 -1
- package/dist/Chat/Chat.js +44 -0
- package/dist/Chat/Chat.js.map +1 -1
- package/dist/Chat/Service/Chat.service.d.ts +4 -1
- package/dist/Chat/Service/Chat.service.js +24 -1
- package/dist/Chat/Service/Chat.service.js.map +1 -1
- package/dist/DeliveryBlocks/DeliveryBlocksApi.d.ts +1 -1
- package/dist/DeliveryBlocks/DeliveryBlocksApi.js +2 -2
- package/dist/DeliveryBlocks/DeliveryBlocksApi.js.map +1 -1
- package/dist/DeliveryBlocks/Entity/DeliveryBlocksEntity.d.ts +1 -1
- package/dist/DeliveryBlocks/Entity/DeliveryBlocksEntity.js +2 -2
- package/dist/DeliveryBlocks/Entity/DeliveryBlocksEntity.js.map +1 -1
- package/dist/Services/ServiceRequest.js +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +142 -15
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +34 -12
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +2 -2
package/dist/Chat/Chat.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatMerchantAppDto, ChatUserDto, GetOrCreateChatMembersResultDto, User } from '@bringg/types';
|
|
1
|
+
import { BringgUserShortDto, ChatMerchantAppDto, ChatUserDto, GetOrCreateChatMembersResultDto, User } from '@bringg/types';
|
|
2
2
|
import Session from '../Services/Identity/Session';
|
|
3
3
|
import { ChatResponse } from './Chat.types';
|
|
4
4
|
export default class Chat {
|
|
@@ -9,4 +9,7 @@ export default class Chat {
|
|
|
9
9
|
getChatMerchantAppExists(): Promise<ChatResponse<boolean>>;
|
|
10
10
|
getOrCreateChatUser(): Promise<ChatResponse<ChatUserDto>>;
|
|
11
11
|
getOrCreateChatMembers(bringgUsersIds: Array<User['id']>): Promise<ChatResponse<GetOrCreateChatMembersResultDto>>;
|
|
12
|
+
getUsersAvailableToChat({ bringUserIds }?: {
|
|
13
|
+
bringUserIds?: Array<User['id']>;
|
|
14
|
+
}): Promise<ChatResponse<BringgUserShortDto[]>>;
|
|
12
15
|
}
|
package/dist/Chat/Chat.js
CHANGED
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
2
38
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
40
|
};
|
|
@@ -23,6 +59,14 @@ var Chat = /** @class */ (function () {
|
|
|
23
59
|
Chat.prototype.getOrCreateChatMembers = function (bringgUsersIds) {
|
|
24
60
|
return this.chatService.getOrCreateChatMembers(bringgUsersIds);
|
|
25
61
|
};
|
|
62
|
+
Chat.prototype.getUsersAvailableToChat = function (_a) {
|
|
63
|
+
var _b = _a === void 0 ? {} : _a, bringUserIds = _b.bringUserIds;
|
|
64
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
+
return __generator(this, function (_c) {
|
|
66
|
+
return [2 /*return*/, this.chatService.getUsersAvailableToChat({ bringUserIds: bringUserIds })];
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
};
|
|
26
70
|
return Chat;
|
|
27
71
|
}());
|
|
28
72
|
exports.default = Chat;
|
package/dist/Chat/Chat.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.js","sourceRoot":"","sources":["../../src/Chat/Chat.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Chat.js","sourceRoot":"","sources":["../../src/Chat/Chat.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,wEAAiD;AAEjD;IAGC,cAAmB,OAAgB;QAClC,IAAI,CAAC,WAAW,GAAG,IAAI,sBAAW,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED,iCAAkB,GAAlB;QACC,OAAO,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAAE,CAAC;IAC9C,CAAC;IAED,yCAA0B,GAA1B;QACC,OAAO,IAAI,CAAC,WAAW,CAAC,0BAA0B,EAAE,CAAC;IACtD,CAAC;IAED,uCAAwB,GAAxB;QACC,OAAO,IAAI,CAAC,WAAW,CAAC,wBAAwB,EAAE,CAAC;IACpD,CAAC;IAED,kCAAmB,GAAnB;QACC,OAAO,IAAI,CAAC,WAAW,CAAC,mBAAmB,EAAE,CAAC;IAC/C,CAAC;IAED,qCAAsB,GAAtB,UAAuB,cAAiC;QACvD,OAAO,IAAI,CAAC,WAAW,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAC;IAChE,CAAC;IAEK,sCAAuB,GAA7B,UAA8B,EAIxB;YAJwB,qBAI1B,EAAE,KAAA,EAHL,YAAY,kBAAA;;;gBAIZ,sBAAO,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,EAAE,YAAY,cAAA,EAAE,CAAC,EAAC;;;KAClE;IACF,WAAC;AAAD,CAAC,AAlCD,IAkCC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChatMerchantAppDto, ChatUserDto, GetOrCreateChatMembersResultDto, User } from '@bringg/types';
|
|
1
|
+
import { BringgUserShortDto, ChatMerchantAppDto, ChatUserDto, GetOrCreateChatMembersResultDto, User } from '@bringg/types';
|
|
2
2
|
import RouteGenerator from '../../Core/RouteGenerator';
|
|
3
3
|
import Session from '../../Services/Identity/Session';
|
|
4
4
|
import { SessionBasedService } from '../../Services/SessionBasedService';
|
|
@@ -12,4 +12,7 @@ export default class ChatService extends SessionBasedService {
|
|
|
12
12
|
getChatMerchantAppExists(): Promise<ChatResponse<boolean>>;
|
|
13
13
|
getOrCreateChatUser(): Promise<ChatResponse<ChatUserDto>>;
|
|
14
14
|
getOrCreateChatMembers(bringgUsersIds: Array<User['id']>): Promise<ChatResponse<GetOrCreateChatMembersResultDto>>;
|
|
15
|
+
getUsersAvailableToChat({ bringUserIds }?: {
|
|
16
|
+
bringUserIds?: Array<User['id']>;
|
|
17
|
+
}): Promise<ChatResponse<BringgUserShortDto[]>>;
|
|
15
18
|
}
|
|
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
14
14
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
17
28
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
29
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
30
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -62,7 +73,8 @@ var Routes = {
|
|
|
62
73
|
CHAT_MERCHANT_APP_EXISTS: "".concat(SERVICE_PREFIX, "/merchant-apps/exists"),
|
|
63
74
|
GET_OR_CREATE_CHAT_MERCHANT_APP: "".concat(SERVICE_PREFIX, "/merchant-apps/get-or-create"),
|
|
64
75
|
GET_OR_CREATE_CHAT_USER: "".concat(SERVICE_PREFIX, "/chat-users/get-or-create"),
|
|
65
|
-
GET_OR_CREATE_CHAT_MEMBERS: "".concat(SERVICE_PREFIX, "/chat-members/get-or-bulk-create")
|
|
76
|
+
GET_OR_CREATE_CHAT_MEMBERS: "".concat(SERVICE_PREFIX, "/chat-members/get-or-bulk-create"),
|
|
77
|
+
GET_USERS_AVAILABLE_TO_CHAT: "".concat(SERVICE_PREFIX, "/bringg-users/available-to-chat")
|
|
66
78
|
};
|
|
67
79
|
var ChatService = /** @class */ (function (_super) {
|
|
68
80
|
__extends(ChatService, _super);
|
|
@@ -107,6 +119,17 @@ var ChatService = /** @class */ (function (_super) {
|
|
|
107
119
|
});
|
|
108
120
|
});
|
|
109
121
|
};
|
|
122
|
+
ChatService.prototype.getUsersAvailableToChat = function (_a) {
|
|
123
|
+
var _b = _a === void 0 ? {} : _a, bringUserIds = _b.bringUserIds;
|
|
124
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
125
|
+
return __generator(this, function (_c) {
|
|
126
|
+
return [2 /*return*/, this.routeGenerator
|
|
127
|
+
.post(Routes.GET_USERS_AVAILABLE_TO_CHAT)
|
|
128
|
+
.withPayload(__assign({}, (bringUserIds ? { bringUserIds: bringUserIds } : null)))
|
|
129
|
+
.invoke()];
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
};
|
|
110
133
|
return ChatService;
|
|
111
134
|
}(SessionBasedService_1.SessionBasedService));
|
|
112
135
|
exports.default = ChatService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.service.js","sourceRoot":"","sources":["../../../src/Chat/Service/Chat.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,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,uBAAuB,CAAC,CAAC,MAAM,EAAE,EAAC;;;KACzE;IAEK,4CAAsB,GAA5B,UACC,cAAiC;;;gBAEjC,sBAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC,WAAW,CAAC,EAAE,cAAc,gBAAA,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC;;;KAC5G;IAEK,6CAAuB,GAA7B,UAA8B,EAIxB;YAJwB,qBAI1B,EAAE,KAAA,EAHL,YAAY,kBAAA;;;gBAIZ,sBAAO,IAAI,CAAC,cAAc;yBACxB,IAAI,CAAC,MAAM,CAAC,2BAA2B,CAAC;yBACxC,WAAW,cAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,cAAA,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAG;yBAC5D,MAAM,EAAE,EAAC;;;KACX;IACF,kBAAC;AAAD,CAAC,AA3CD,CAAyC,yCAAmB,GA2C3D"}
|
|
@@ -8,7 +8,7 @@ export declare class DeliveryBlocksApi {
|
|
|
8
8
|
create(options: DeliveryBlockOptionsWithUsers | DeliveryBlockOptionsWithResources): Promise<DeliveryBlock>;
|
|
9
9
|
update(options: DeliveryBlockOptionsWithUsers | DeliveryBlockOptionsWithResources): Promise<DeliveryBlock>;
|
|
10
10
|
delete(id: number, recurring?: RecurringTypes): Promise<boolean>;
|
|
11
|
-
getByDriverId(driverId: number, startTime: number, endTime: number): Promise<DeliveryBlock[]>;
|
|
11
|
+
getByDriverId(driverId: number, startTime: number, endTime: number, teamId?: number): Promise<DeliveryBlock[]>;
|
|
12
12
|
getTemplates(): Promise<DeliveryBlockTemplate[]>;
|
|
13
13
|
getTemplateById(templateId: number): Promise<DeliveryBlockTemplate>;
|
|
14
14
|
createTemplate(template: DeliveryBlockTemplate): Promise<CreateDeliveryBlockTemplateResponse>;
|
|
@@ -80,10 +80,10 @@ var DeliveryBlocksApi = /** @class */ (function () {
|
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
|
-
DeliveryBlocksApi.prototype.getByDriverId = function (driverId, startTime, endTime) {
|
|
83
|
+
DeliveryBlocksApi.prototype.getByDriverId = function (driverId, startTime, endTime, teamId) {
|
|
84
84
|
return __awaiter(this, void 0, void 0, function () {
|
|
85
85
|
return __generator(this, function (_a) {
|
|
86
|
-
return [2 /*return*/, this.deliveryBlocksEntity.getByDriverId(driverId, startTime, endTime)];
|
|
86
|
+
return [2 /*return*/, this.deliveryBlocksEntity.getByDriverId(driverId, startTime, endTime, teamId)];
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliveryBlocksApi.js","sourceRoot":"","sources":["../../src/DeliveryBlocks/DeliveryBlocksApi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2DAAyD;AAUzD,uFAAiE;AAEjE;IAGC,2BAAY,OAAgB;QAC3B,IAAI,CAAC,oBAAoB,GAAG,IAAI,8BAAoB,CAAC,OAAO,CAAC,CAAC;IAC/D,CAAC;IAGY,+BAAG,GAAH,UACZ,MAAc,EACd,SAAiB,EACjB,OAAe,EACf,aAA6B;;;gBAE7B,sBAAO,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,CAAC,EAAC;;;KAChF;IAGY,kCAAM,GAAN,UACZ,OAA0E;;;gBAE1E,sBAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAC;;;KACjD;IAGY,kCAAM,GAAN,UACZ,OAA0E;;;gBAE1E,sBAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAC;;;KACjD;IAGY,kCAAM,GAAN,UAAO,EAAU,EAAE,SAA0B;;;gBACzD,sBAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,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AAkB;;;gBAC9C,sBAAO,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC,UAAU,CAAC,EAAC;;;KAC7D;IAGY,0CAAc,GAAd,UAAe,QAA+B;;;gBAC1D,sBAAO,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAC;;;KAC1D;IAGY,0CAAc,GAAd,UACZ,UAAkB,EAClB,OAA2C;;;gBAE3C,sBAAO,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,EAAC;;;KACrE;IAGY,0CAAc,GAAd,UAAe,UAAkB;;;gBAC7C,sBAAO,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,UAAU,CAAC,EAAC;;;KAC5D;IAhEY;QADZ,gCAAc;gDAQd;IAGY;QADZ,gCAAc;mDAKd;IAGY;QADZ,gCAAc;mDAKd;IAGY;QADZ,gCAAc;mDAGd;IAGY;QADZ,gCAAc;0DAQd;IAGY;QADZ,gCAAc;yDAGd;IAGY;QADZ,gCAAc;4DAGd;IAGY;QADZ,gCAAc;2DAGd;IAGY;QADZ,gCAAc;2DAMd;IAGY;QADZ,gCAAc;2DAGd;IACF,wBAAC;CAAA,AAzED,IAyEC;AAzEY,8CAAiB"}
|
|
@@ -8,7 +8,7 @@ export default class DeliveryBlocksEntity extends Entity<Bringg.DeliveryBlock> {
|
|
|
8
8
|
create(options: DeliveryBlockOptionsWithUsers | DeliveryBlockOptionsWithResources): Promise<DeliveryBlock>;
|
|
9
9
|
update(options: DeliveryBlockOptionsWithUsers | DeliveryBlockOptionsWithResources): Promise<DeliveryBlock>;
|
|
10
10
|
delete(id: number, recurring?: RecurringTypes): Promise<boolean>;
|
|
11
|
-
getByDriverId(driverId: number, startTime: number, endTime: number): Promise<DeliveryBlock[]>;
|
|
11
|
+
getByDriverId(driverId: number, startTime: number, endTime: number, teamId?: number): Promise<DeliveryBlock[]>;
|
|
12
12
|
getTemplates(): Promise<DeliveryBlockTemplate[]>;
|
|
13
13
|
getTemplateById(templateId: number): Promise<DeliveryBlockTemplate>;
|
|
14
14
|
createTemplate(payload: DeliveryBlockTemplate): Promise<CreateDeliveryBlockTemplateResponse>;
|
|
@@ -153,7 +153,7 @@ var DeliveryBlocksEntity = /** @class */ (function (_super) {
|
|
|
153
153
|
});
|
|
154
154
|
});
|
|
155
155
|
};
|
|
156
|
-
DeliveryBlocksEntity.prototype.getByDriverId = function (driverId, startTime, endTime) {
|
|
156
|
+
DeliveryBlocksEntity.prototype.getByDriverId = function (driverId, startTime, endTime, teamId) {
|
|
157
157
|
return __awaiter(this, void 0, void 0, function () {
|
|
158
158
|
return __generator(this, function (_a) {
|
|
159
159
|
return [2 /*return*/, this.service.routeGenerator
|
|
@@ -161,7 +161,7 @@ var DeliveryBlocksEntity = /** @class */ (function (_super) {
|
|
|
161
161
|
.withExtractor(function (result) { return result.delivery_blocks; })
|
|
162
162
|
.withRouteParams({ id: driverId })
|
|
163
163
|
.setException("Could not fetch delivery block for user with id #".concat(driverId))
|
|
164
|
-
.withQueryString({ start_time: startTime, end_time: endTime })
|
|
164
|
+
.withQueryString({ start_time: startTime, end_time: endTime, team_id: teamId })
|
|
165
165
|
.invoke()];
|
|
166
166
|
});
|
|
167
167
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliveryBlocksEntity.js","sourceRoot":"","sources":["../../../src/DeliveryBlocks/Entity/DeliveryBlocksEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,6DAAuC;AAWvC,IAAM,MAAM,GAAG;IACd,GAAG,EAAE,kBAAkB;IACvB,MAAM,EAAE,kBAAkB;IAC1B,MAAM,EAAE,wBAAwB;IAChC,MAAM,EAAE,wBAAwB;IAChC,gBAAgB,EAAE,8BAA8B;IAChD,aAAa,EAAE,4BAA4B;IAC3C,kBAAkB,EAAE,kCAAkC;IACtD,eAAe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,CAAC;yBAC9B,eAAe,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC;yBACnC,YAAY,CAAC,6DAAsD,UAAU,CAAE,CAAC;yBAChF,MAAM,EAAE,EAAC;;;KACX;IACF,2BAAC;AAAD,CAAC,AAtHD,CAAkD,gBAAM,GAsHvD"}
|
|
@@ -56,7 +56,7 @@ var lodash_1 = require("lodash");
|
|
|
56
56
|
var BringgException_1 = require("../Core/BringgException");
|
|
57
57
|
var Logger_1 = __importDefault(require("../Core/Logger"));
|
|
58
58
|
var abort_1 = require("../utils/abort");
|
|
59
|
-
var version = '9.
|
|
59
|
+
var version = '9.4.1';
|
|
60
60
|
function logErrorResponse(response) {
|
|
61
61
|
var data = response.data, status = response.status;
|
|
62
62
|
try {
|
|
@@ -3208,6 +3208,42 @@ exports.newConfigurationProvider = newConfigurationProvider;
|
|
|
3208
3208
|
|
|
3209
3209
|
"use strict";
|
|
3210
3210
|
|
|
3211
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3212
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3213
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
3214
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
3215
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
3216
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
3217
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
3218
|
+
});
|
|
3219
|
+
};
|
|
3220
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
3221
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
3222
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
3223
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
3224
|
+
function step(op) {
|
|
3225
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
3226
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
3227
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
3228
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
3229
|
+
switch (op[0]) {
|
|
3230
|
+
case 0: case 1: t = op; break;
|
|
3231
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
3232
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
3233
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
3234
|
+
default:
|
|
3235
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
3236
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
3237
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
3238
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
3239
|
+
if (t[2]) _.ops.pop();
|
|
3240
|
+
_.trys.pop(); continue;
|
|
3241
|
+
}
|
|
3242
|
+
op = body.call(thisArg, _);
|
|
3243
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
3244
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
3245
|
+
}
|
|
3246
|
+
};
|
|
3211
3247
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3212
3248
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3213
3249
|
};
|
|
@@ -3232,6 +3268,14 @@ var Chat = /** @class */ (function () {
|
|
|
3232
3268
|
Chat.prototype.getOrCreateChatMembers = function (bringgUsersIds) {
|
|
3233
3269
|
return this.chatService.getOrCreateChatMembers(bringgUsersIds);
|
|
3234
3270
|
};
|
|
3271
|
+
Chat.prototype.getUsersAvailableToChat = function (_a) {
|
|
3272
|
+
var _b = _a === void 0 ? {} : _a, bringUserIds = _b.bringUserIds;
|
|
3273
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3274
|
+
return __generator(this, function (_c) {
|
|
3275
|
+
return [2 /*return*/, this.chatService.getUsersAvailableToChat({ bringUserIds: bringUserIds })];
|
|
3276
|
+
});
|
|
3277
|
+
});
|
|
3278
|
+
};
|
|
3235
3279
|
return Chat;
|
|
3236
3280
|
}());
|
|
3237
3281
|
exports["default"] = Chat;
|
|
@@ -3259,6 +3303,17 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
3259
3303
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3260
3304
|
};
|
|
3261
3305
|
})();
|
|
3306
|
+
var __assign = (this && this.__assign) || function () {
|
|
3307
|
+
__assign = Object.assign || function(t) {
|
|
3308
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3309
|
+
s = arguments[i];
|
|
3310
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
3311
|
+
t[p] = s[p];
|
|
3312
|
+
}
|
|
3313
|
+
return t;
|
|
3314
|
+
};
|
|
3315
|
+
return __assign.apply(this, arguments);
|
|
3316
|
+
};
|
|
3262
3317
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3263
3318
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3264
3319
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -3307,7 +3362,8 @@ var Routes = {
|
|
|
3307
3362
|
CHAT_MERCHANT_APP_EXISTS: "".concat(SERVICE_PREFIX, "/merchant-apps/exists"),
|
|
3308
3363
|
GET_OR_CREATE_CHAT_MERCHANT_APP: "".concat(SERVICE_PREFIX, "/merchant-apps/get-or-create"),
|
|
3309
3364
|
GET_OR_CREATE_CHAT_USER: "".concat(SERVICE_PREFIX, "/chat-users/get-or-create"),
|
|
3310
|
-
GET_OR_CREATE_CHAT_MEMBERS: "".concat(SERVICE_PREFIX, "/chat-members/get-or-bulk-create")
|
|
3365
|
+
GET_OR_CREATE_CHAT_MEMBERS: "".concat(SERVICE_PREFIX, "/chat-members/get-or-bulk-create"),
|
|
3366
|
+
GET_USERS_AVAILABLE_TO_CHAT: "".concat(SERVICE_PREFIX, "/bringg-users/available-to-chat")
|
|
3311
3367
|
};
|
|
3312
3368
|
var ChatService = /** @class */ (function (_super) {
|
|
3313
3369
|
__extends(ChatService, _super);
|
|
@@ -3352,6 +3408,17 @@ var ChatService = /** @class */ (function (_super) {
|
|
|
3352
3408
|
});
|
|
3353
3409
|
});
|
|
3354
3410
|
};
|
|
3411
|
+
ChatService.prototype.getUsersAvailableToChat = function (_a) {
|
|
3412
|
+
var _b = _a === void 0 ? {} : _a, bringUserIds = _b.bringUserIds;
|
|
3413
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3414
|
+
return __generator(this, function (_c) {
|
|
3415
|
+
return [2 /*return*/, this.routeGenerator
|
|
3416
|
+
.post(Routes.GET_USERS_AVAILABLE_TO_CHAT)
|
|
3417
|
+
.withPayload(__assign({}, (bringUserIds ? { bringUserIds: bringUserIds } : null)))
|
|
3418
|
+
.invoke()];
|
|
3419
|
+
});
|
|
3420
|
+
});
|
|
3421
|
+
};
|
|
3355
3422
|
return ChatService;
|
|
3356
3423
|
}(SessionBasedService_1.SessionBasedService));
|
|
3357
3424
|
exports["default"] = ChatService;
|
|
@@ -7958,10 +8025,10 @@ var DeliveryBlocksApi = /** @class */ (function () {
|
|
|
7958
8025
|
});
|
|
7959
8026
|
});
|
|
7960
8027
|
};
|
|
7961
|
-
DeliveryBlocksApi.prototype.getByDriverId = function (driverId, startTime, endTime) {
|
|
8028
|
+
DeliveryBlocksApi.prototype.getByDriverId = function (driverId, startTime, endTime, teamId) {
|
|
7962
8029
|
return __awaiter(this, void 0, void 0, function () {
|
|
7963
8030
|
return __generator(this, function (_a) {
|
|
7964
|
-
return [2 /*return*/, this.deliveryBlocksEntity.getByDriverId(driverId, startTime, endTime)];
|
|
8031
|
+
return [2 /*return*/, this.deliveryBlocksEntity.getByDriverId(driverId, startTime, endTime, teamId)];
|
|
7965
8032
|
});
|
|
7966
8033
|
});
|
|
7967
8034
|
};
|
|
@@ -8196,7 +8263,7 @@ var DeliveryBlocksEntity = /** @class */ (function (_super) {
|
|
|
8196
8263
|
});
|
|
8197
8264
|
});
|
|
8198
8265
|
};
|
|
8199
|
-
DeliveryBlocksEntity.prototype.getByDriverId = function (driverId, startTime, endTime) {
|
|
8266
|
+
DeliveryBlocksEntity.prototype.getByDriverId = function (driverId, startTime, endTime, teamId) {
|
|
8200
8267
|
return __awaiter(this, void 0, void 0, function () {
|
|
8201
8268
|
return __generator(this, function (_a) {
|
|
8202
8269
|
return [2 /*return*/, this.service.routeGenerator
|
|
@@ -8204,7 +8271,7 @@ var DeliveryBlocksEntity = /** @class */ (function (_super) {
|
|
|
8204
8271
|
.withExtractor(function (result) { return result.delivery_blocks; })
|
|
8205
8272
|
.withRouteParams({ id: driverId })
|
|
8206
8273
|
.setException("Could not fetch delivery block for user with id #".concat(driverId))
|
|
8207
|
-
.withQueryString({ start_time: startTime, end_time: endTime })
|
|
8274
|
+
.withQueryString({ start_time: startTime, end_time: endTime, team_id: teamId })
|
|
8208
8275
|
.invoke()];
|
|
8209
8276
|
});
|
|
8210
8277
|
});
|
|
@@ -22080,7 +22147,7 @@ var lodash_1 = __webpack_require__(96486);
|
|
|
22080
22147
|
var BringgException_1 = __webpack_require__(43605);
|
|
22081
22148
|
var Logger_1 = __importDefault(__webpack_require__(55860));
|
|
22082
22149
|
var abort_1 = __webpack_require__(34179);
|
|
22083
|
-
var version = '9.
|
|
22150
|
+
var version = '9.4.1';
|
|
22084
22151
|
function logErrorResponse(response) {
|
|
22085
22152
|
var data = response.data, status = response.status;
|
|
22086
22153
|
try {
|
|
@@ -33668,6 +33735,7 @@ __exportStar(__webpack_require__(55166), exports);
|
|
|
33668
33735
|
__exportStar(__webpack_require__(56628), exports);
|
|
33669
33736
|
__exportStar(__webpack_require__(69424), exports);
|
|
33670
33737
|
__exportStar(__webpack_require__(70879), exports);
|
|
33738
|
+
__exportStar(__webpack_require__(84746), exports);
|
|
33671
33739
|
__exportStar(__webpack_require__(24079), exports);
|
|
33672
33740
|
__exportStar(__webpack_require__(53569), exports);
|
|
33673
33741
|
__exportStar(__webpack_require__(78623), exports);
|
|
@@ -34485,6 +34553,7 @@ var ApplicationUuid;
|
|
|
34485
34553
|
ApplicationUuid["TaskService"] = "5ca4a73e-5298-4b8a-a36f-d1cc76e20f49";
|
|
34486
34554
|
ApplicationUuid["ExclusionWindowTasksLimitApp"] = "376233f1-8be5-4366-9218-6d66e7a8d2de";
|
|
34487
34555
|
ApplicationUuid["Availability"] = "2c6bf985-414b-4411-888a-c0840e660411";
|
|
34556
|
+
ApplicationUuid["TaskManagedAttributes"] = "d50d31d3-282e-4fb1-a17b-050e5b531650";
|
|
34488
34557
|
})(ApplicationUuid || (exports.ApplicationUuid = ApplicationUuid = {}));
|
|
34489
34558
|
//# sourceMappingURL=application.js.map
|
|
34490
34559
|
|
|
@@ -34522,6 +34591,16 @@ var LOGIN_ERRORS;
|
|
|
34522
34591
|
|
|
34523
34592
|
/***/ }),
|
|
34524
34593
|
|
|
34594
|
+
/***/ 53888:
|
|
34595
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
34596
|
+
|
|
34597
|
+
"use strict";
|
|
34598
|
+
|
|
34599
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
34600
|
+
//# sourceMappingURL=bringg_user_types.js.map
|
|
34601
|
+
|
|
34602
|
+
/***/ }),
|
|
34603
|
+
|
|
34525
34604
|
/***/ 52311:
|
|
34526
34605
|
/***/ ((__unused_webpack_module, exports) => {
|
|
34527
34606
|
|
|
@@ -34571,6 +34650,10 @@ var ChatErrorCodes;
|
|
|
34571
34650
|
ChatErrorCodes[ChatErrorCodes["MERCHANT_CONFIGURATION_NOT_FOUND"] = 107] = "MERCHANT_CONFIGURATION_NOT_FOUND";
|
|
34572
34651
|
ChatErrorCodes[ChatErrorCodes["MAX_SENDBIRD_APPS_LIMIT_EXCEEDED"] = 108] = "MAX_SENDBIRD_APPS_LIMIT_EXCEEDED";
|
|
34573
34652
|
ChatErrorCodes[ChatErrorCodes["UNKNOWN_SENDBIRD_ERROR"] = 109] = "UNKNOWN_SENDBIRD_ERROR";
|
|
34653
|
+
ChatErrorCodes[ChatErrorCodes["SENDBIRD_REQUESTS_RATE_LIMIT_EXCEEDED"] = 110] = "SENDBIRD_REQUESTS_RATE_LIMIT_EXCEEDED";
|
|
34654
|
+
ChatErrorCodes[ChatErrorCodes["MERCHANT_NOT_FOUND"] = 111] = "MERCHANT_NOT_FOUND";
|
|
34655
|
+
ChatErrorCodes[ChatErrorCodes["NO_MERCHANT_PRIVILEGE"] = 112] = "NO_MERCHANT_PRIVILEGE";
|
|
34656
|
+
ChatErrorCodes[ChatErrorCodes["NO_USER_PRIVILEGE"] = 113] = "NO_USER_PRIVILEGE";
|
|
34574
34657
|
})(ChatErrorCodes || (exports.ChatErrorCodes = ChatErrorCodes = {}));
|
|
34575
34658
|
//# sourceMappingURL=error_codes.js.map
|
|
34576
34659
|
|
|
@@ -34596,6 +34679,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
34596
34679
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
34597
34680
|
};
|
|
34598
34681
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
34682
|
+
__exportStar(__webpack_require__(53888), exports);
|
|
34599
34683
|
__exportStar(__webpack_require__(52311), exports);
|
|
34600
34684
|
__exportStar(__webpack_require__(43720), exports);
|
|
34601
34685
|
__exportStar(__webpack_require__(89572), exports);
|
|
@@ -35675,6 +35759,7 @@ var FleetType;
|
|
|
35675
35759
|
FleetType[FleetType["Zenkraft"] = 31] = "Zenkraft";
|
|
35676
35760
|
FleetType[FleetType["DriveYello"] = 32] = "DriveYello";
|
|
35677
35761
|
FleetType[FleetType["Internal"] = 33] = "Internal";
|
|
35762
|
+
FleetType[FleetType["Faction"] = 34] = "Faction";
|
|
35678
35763
|
FleetType[FleetType["EmulatedDeliveryProvider"] = 999] = "EmulatedDeliveryProvider";
|
|
35679
35764
|
})(FleetType || (exports.FleetType = FleetType = {}));
|
|
35680
35765
|
exports.FleetTypeToCapabilities = (_a = {},
|
|
@@ -35715,6 +35800,7 @@ exports.FleetTypeToCapabilities = (_a = {},
|
|
|
35715
35800
|
is_green: false
|
|
35716
35801
|
},
|
|
35717
35802
|
_a[FleetType.Internal] = { create_delivery: true, get_quote: true, update_delivery: true, is_green: false },
|
|
35803
|
+
_a[FleetType.Faction] = { create_delivery: true, get_quote: true, update_delivery: true, is_green: true },
|
|
35718
35804
|
_a);
|
|
35719
35805
|
//# sourceMappingURL=fleet.js.map
|
|
35720
35806
|
|
|
@@ -36178,6 +36264,16 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
36178
36264
|
|
|
36179
36265
|
/***/ }),
|
|
36180
36266
|
|
|
36267
|
+
/***/ 84746:
|
|
36268
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
36269
|
+
|
|
36270
|
+
"use strict";
|
|
36271
|
+
|
|
36272
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
36273
|
+
//# sourceMappingURL=optimization_configurations_teams.js.map
|
|
36274
|
+
|
|
36275
|
+
/***/ }),
|
|
36276
|
+
|
|
36181
36277
|
/***/ 24079:
|
|
36182
36278
|
/***/ ((__unused_webpack_module, exports) => {
|
|
36183
36279
|
|
|
@@ -36212,8 +36308,9 @@ var OptimizationEntityType;
|
|
|
36212
36308
|
|
|
36213
36309
|
"use strict";
|
|
36214
36310
|
|
|
36311
|
+
var _a;
|
|
36215
36312
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
36216
|
-
exports.
|
|
36313
|
+
exports.OptimizationErrors = exports.OptimizationRequestErrorCodes = exports.OptimizeFor = exports.RouteItemType = exports.OptimizationOrigin = exports.OptimizationResponseType = exports.OPTIMIZATION_TYPE = void 0;
|
|
36217
36314
|
var OPTIMIZATION_TYPE;
|
|
36218
36315
|
(function (OPTIMIZATION_TYPE) {
|
|
36219
36316
|
OPTIMIZATION_TYPE[OPTIMIZATION_TYPE["ANONYMOUS"] = 1] = "ANONYMOUS";
|
|
@@ -36253,14 +36350,43 @@ var OptimizeFor;
|
|
|
36253
36350
|
OptimizeFor["CUSTOM"] = "custom";
|
|
36254
36351
|
OptimizeFor["NEXT_SHIFT"] = "next_shift";
|
|
36255
36352
|
})(OptimizeFor || (exports.OptimizeFor = OptimizeFor = {}));
|
|
36256
|
-
var
|
|
36257
|
-
(function (
|
|
36258
|
-
|
|
36259
|
-
|
|
36260
|
-
|
|
36261
|
-
|
|
36262
|
-
|
|
36263
|
-
|
|
36353
|
+
var OptimizationRequestErrorCodes;
|
|
36354
|
+
(function (OptimizationRequestErrorCodes) {
|
|
36355
|
+
OptimizationRequestErrorCodes[OptimizationRequestErrorCodes["NoTasksFound"] = 400] = "NoTasksFound";
|
|
36356
|
+
OptimizationRequestErrorCodes[OptimizationRequestErrorCodes["NoDriversFound"] = 401] = "NoDriversFound";
|
|
36357
|
+
OptimizationRequestErrorCodes[OptimizationRequestErrorCodes["NoDriversFoundAnonymous"] = 402] = "NoDriversFoundAnonymous";
|
|
36358
|
+
OptimizationRequestErrorCodes[OptimizationRequestErrorCodes["NoDriversFoundForUserTypes"] = 403] = "NoDriversFoundForUserTypes";
|
|
36359
|
+
OptimizationRequestErrorCodes[OptimizationRequestErrorCodes["NoResourcesWorkingDuringTimeWindow"] = 404] = "NoResourcesWorkingDuringTimeWindow";
|
|
36360
|
+
OptimizationRequestErrorCodes[OptimizationRequestErrorCodes["MissingSchedules"] = 405] = "MissingSchedules";
|
|
36361
|
+
OptimizationRequestErrorCodes[OptimizationRequestErrorCodes["TasksOutsideTimeWindow"] = 406] = "TasksOutsideTimeWindow";
|
|
36362
|
+
})(OptimizationRequestErrorCodes || (exports.OptimizationRequestErrorCodes = OptimizationRequestErrorCodes = {}));
|
|
36363
|
+
exports.OptimizationErrors = (_a = {},
|
|
36364
|
+
_a[OptimizationRequestErrorCodes.NoTasksFound] = {
|
|
36365
|
+
message: 'No tasks found for optimization',
|
|
36366
|
+
key: 'NO_TASKS_FOUND_ERROR'
|
|
36367
|
+
},
|
|
36368
|
+
_a[OptimizationRequestErrorCodes.NoDriversFound] = { message: 'No drivers found', key: 'NO_DRIVERS_FOUND_ERROR' },
|
|
36369
|
+
_a[OptimizationRequestErrorCodes.NoDriversFoundAnonymous] = {
|
|
36370
|
+
message: 'No drivers for specified user types found',
|
|
36371
|
+
key: 'NO_DRIVERS_FOUND_ANONYMOUS_ERROR'
|
|
36372
|
+
},
|
|
36373
|
+
_a[OptimizationRequestErrorCodes.NoDriversFoundForUserTypes] = {
|
|
36374
|
+
message: 'No drivers found for all selected user types',
|
|
36375
|
+
key: 'NO_DRIVERS_FOUND_FOR_USER_TYPES_ERROR'
|
|
36376
|
+
},
|
|
36377
|
+
_a[OptimizationRequestErrorCodes.NoResourcesWorkingDuringTimeWindow] = {
|
|
36378
|
+
message: "Couldn't find drivers that are working during the optimization time window",
|
|
36379
|
+
key: 'NO_RESOURCES_WORKING_DURING_TIME_WINDOW_ERROR'
|
|
36380
|
+
},
|
|
36381
|
+
_a[OptimizationRequestErrorCodes.MissingSchedules] = {
|
|
36382
|
+
message: 'Could not find any schedule for some of the runs',
|
|
36383
|
+
key: 'MISSING_SCHEDULES_ERROR'
|
|
36384
|
+
},
|
|
36385
|
+
_a[OptimizationRequestErrorCodes.TasksOutsideTimeWindow] = {
|
|
36386
|
+
message: 'Tasks outside the optimization or resources time window',
|
|
36387
|
+
key: 'TASKS_OUTSIDE_TIME_WINDOW_ERROR'
|
|
36388
|
+
},
|
|
36389
|
+
_a);
|
|
36264
36390
|
//# sourceMappingURL=optimization_type.js.map
|
|
36265
36391
|
|
|
36266
36392
|
/***/ }),
|
|
@@ -37259,6 +37385,7 @@ var TaskHistoryEvent;
|
|
|
37259
37385
|
TaskHistoryEvent[TaskHistoryEvent["task_schedule_ready_time_window_updated"] = 47] = "task_schedule_ready_time_window_updated";
|
|
37260
37386
|
TaskHistoryEvent[TaskHistoryEvent["task_ready_to_execute_changed"] = 48] = "task_ready_to_execute_changed";
|
|
37261
37387
|
TaskHistoryEvent[TaskHistoryEvent["way_point_sla_changed"] = 49] = "way_point_sla_changed";
|
|
37388
|
+
TaskHistoryEvent[TaskHistoryEvent["way_point_time_window_changed"] = 50] = "way_point_time_window_changed";
|
|
37262
37389
|
})(TaskHistoryEvent || (exports.TaskHistoryEvent = TaskHistoryEvent = {}));
|
|
37263
37390
|
var TaskHistoryOrigin;
|
|
37264
37391
|
(function (TaskHistoryOrigin) {
|