@bringg/dashboard-sdk 9.88.0 → 9.89.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.
- package/dist/Shifts/Entity/Shifts.d.ts +1 -5
- package/dist/Shifts/Entity/Shifts.js +0 -46
- package/dist/Shifts/Entity/Shifts.js.map +1 -1
- package/dist/Shifts/Shifts.consts.d.ts +0 -29
- package/dist/Shifts/ShiftsApi.d.ts +1 -5
- package/dist/Shifts/ShiftsApi.js +0 -12
- package/dist/Shifts/ShiftsApi.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +1 -59
- 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 +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import Entity from '../../Core/Entity';
|
|
2
2
|
import Session from '../../Services/Identity/Session';
|
|
3
|
-
import {
|
|
3
|
+
import { StartShiftResponse } from '../Shifts.consts';
|
|
4
4
|
export default class ShiftsEntity extends Entity<ShiftsEntity> {
|
|
5
5
|
constructor(session: Session);
|
|
6
|
-
getShifts(teamId: number): Promise<ShiftsResponse>;
|
|
7
|
-
updateShifts(teamId: number, configuration: ShiftsConfiguration[]): Promise<ShiftsResponse>;
|
|
8
|
-
getBreaks(teamId: number): Promise<BreaksResponse>;
|
|
9
|
-
updateBreaks(teamId: number, configuration: ShiftsConfiguration[]): Promise<BreaksResponse>;
|
|
10
6
|
startShift(userId: number, teamId?: number): Promise<StartShiftResponse>;
|
|
11
7
|
endShift(userId: number): Promise<boolean>;
|
|
12
8
|
}
|
|
@@ -60,52 +60,6 @@ var ShiftsEntity = /** @class */ (function (_super) {
|
|
|
60
60
|
function ShiftsEntity(session) {
|
|
61
61
|
return _super.call(this, { session: session, entityName: 'shifts' }) || this;
|
|
62
62
|
}
|
|
63
|
-
ShiftsEntity.prototype.getShifts = function (teamId) {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
-
return __generator(this, function (_a) {
|
|
66
|
-
return [2 /*return*/, this.service.routeGenerator
|
|
67
|
-
.get("/teams/".concat(teamId, "/shifts_schedule/"))
|
|
68
|
-
.setException('Failed to get shifts schedule')
|
|
69
|
-
.invoke()];
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
ShiftsEntity.prototype.updateShifts = function (teamId, configuration) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
75
|
-
var request;
|
|
76
|
-
return __generator(this, function (_a) {
|
|
77
|
-
request = { id: teamId, configuration: configuration };
|
|
78
|
-
return [2 /*return*/, this.service.routeGenerator
|
|
79
|
-
.put("/teams/".concat(teamId, "/shifts_schedule"))
|
|
80
|
-
.withPayload(request)
|
|
81
|
-
.setException('Failed update shifts schedule')
|
|
82
|
-
.invoke()];
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
ShiftsEntity.prototype.getBreaks = function (teamId) {
|
|
87
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
return [2 /*return*/, this.service.routeGenerator
|
|
90
|
-
.get("/teams/".concat(teamId, "/scheduled_breaks/"))
|
|
91
|
-
.setException('Failed to get shifts breaks')
|
|
92
|
-
.invoke()];
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
ShiftsEntity.prototype.updateBreaks = function (teamId, configuration) {
|
|
97
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
98
|
-
var request;
|
|
99
|
-
return __generator(this, function (_a) {
|
|
100
|
-
request = { id: teamId, configuration: configuration };
|
|
101
|
-
return [2 /*return*/, this.service.routeGenerator
|
|
102
|
-
.put("/teams/".concat(teamId, "/scheduled_breaks"))
|
|
103
|
-
.withPayload(request)
|
|
104
|
-
.setException('Failed update shift breaks')
|
|
105
|
-
.invoke()];
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
63
|
ShiftsEntity.prototype.startShift = function (userId, teamId) {
|
|
110
64
|
return __awaiter(this, void 0, void 0, function () {
|
|
111
65
|
return __generator(this, function (_a) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Shifts.js","sourceRoot":"","sources":["../../../src/Shifts/Entity/Shifts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAuC;
|
|
1
|
+
{"version":3,"file":"Shifts.js","sourceRoot":"","sources":["../../../src/Shifts/Entity/Shifts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAAuC;AAIvC;IAA0C,gCAAoB;IAC7D,sBAAY,OAAgB;eAC3B,kBAAM,EAAE,OAAO,SAAA,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IACzC,CAAC;IAEY,iCAAU,GAAvB,UAAwB,MAAc,EAAE,MAAe;;;gBACtD,sBAAO,IAAI,CAAC,OAAO,CAAC,cAAc;yBAChC,IAAI,CAAC,iBAAU,MAAM,WAAQ,CAAC;yBAC9B,WAAW,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC;yBACvC,YAAY,CAAC,yBAAyB,CAAC;yBACvC,MAAM,EAAmD,EAAC;;;KAC5D;IAED,oGAAoG;IACpG,mGAAmG;IACnG,qEAAqE;IACxD,+BAAQ,GAArB,UAAsB,MAAc;;;gBACnC,sBAAO,IAAI,CAAC,OAAO,CAAC,cAAc;yBAChC,MAAM,CAAC,iBAAU,MAAM,WAAQ,CAAC;yBAChC,aAAa,CAAC,UAAA,QAAQ,IAAI,OAAA,QAAQ,CAAC,OAAO,EAAhB,CAAgB,CAAC;yBAC3C,YAAY,CAAC,uBAAuB,CAAC;yBACrC,MAAM,EAAE,EAAC;;;KACX;IACF,mBAAC;AAAD,CAAC,AAvBD,CAA0C,gBAAM,GAuB/C"}
|
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
export interface ShiftsResponse {
|
|
2
|
-
success: boolean;
|
|
3
|
-
shift_schedules: ShiftSchedule[];
|
|
4
|
-
custom: boolean;
|
|
5
|
-
}
|
|
6
|
-
export interface BreaksResponse {
|
|
7
|
-
success: boolean;
|
|
8
|
-
scheduled_breaks: ShiftSchedule[];
|
|
9
|
-
custom: boolean;
|
|
10
|
-
}
|
|
11
|
-
interface ShiftSchedule {
|
|
12
|
-
id: number;
|
|
13
|
-
user_id: number;
|
|
14
|
-
merchant_id: number;
|
|
15
|
-
created_at: Date;
|
|
16
|
-
updated_at: Date;
|
|
17
|
-
start_hour: number;
|
|
18
|
-
end_hour: number;
|
|
19
|
-
team_id: number;
|
|
20
|
-
}
|
|
21
|
-
export interface ShiftsUpdateRequest {
|
|
22
|
-
id: number;
|
|
23
|
-
configuration: ShiftsConfiguration[];
|
|
24
|
-
}
|
|
25
|
-
export interface ShiftsConfiguration {
|
|
26
|
-
start_hour: number;
|
|
27
|
-
end_hour: number;
|
|
28
|
-
}
|
|
29
1
|
export interface StartShiftResponse {
|
|
30
2
|
active_team_id: number;
|
|
31
3
|
end_shift: Date;
|
|
@@ -33,4 +5,3 @@ export interface StartShiftResponse {
|
|
|
33
5
|
start_shift: Date;
|
|
34
6
|
unavailable_start_time: Date;
|
|
35
7
|
}
|
|
36
|
-
export {};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import Session from '../Services/Identity/Session';
|
|
2
|
-
import {
|
|
2
|
+
import { StartShiftResponse } from './Shifts.consts';
|
|
3
3
|
export default class ShiftsApi {
|
|
4
4
|
private shiftsEntity;
|
|
5
5
|
constructor(session: Session);
|
|
6
|
-
getShifts(teamId: number): Promise<ShiftsResponse>;
|
|
7
|
-
updateShifts(teamId: number, configuration: ShiftsConfiguration[]): Promise<ShiftsResponse>;
|
|
8
|
-
getBreaks(teamId: number): Promise<BreaksResponse>;
|
|
9
|
-
updateBreaks(teamId: number, configuration: ShiftsConfiguration[]): Promise<BreaksResponse>;
|
|
10
6
|
startShift(userId: number, teamId?: number): Promise<StartShiftResponse>;
|
|
11
7
|
endShift(userId: number): Promise<boolean>;
|
|
12
8
|
}
|
package/dist/Shifts/ShiftsApi.js
CHANGED
|
@@ -8,18 +8,6 @@ var ShiftsApi = /** @class */ (function () {
|
|
|
8
8
|
function ShiftsApi(session) {
|
|
9
9
|
this.shiftsEntity = new Shifts_1.default(session);
|
|
10
10
|
}
|
|
11
|
-
ShiftsApi.prototype.getShifts = function (teamId) {
|
|
12
|
-
return this.shiftsEntity.getShifts(teamId);
|
|
13
|
-
};
|
|
14
|
-
ShiftsApi.prototype.updateShifts = function (teamId, configuration) {
|
|
15
|
-
return this.shiftsEntity.updateShifts(teamId, configuration);
|
|
16
|
-
};
|
|
17
|
-
ShiftsApi.prototype.getBreaks = function (teamId) {
|
|
18
|
-
return this.shiftsEntity.getBreaks(teamId);
|
|
19
|
-
};
|
|
20
|
-
ShiftsApi.prototype.updateBreaks = function (teamId, configuration) {
|
|
21
|
-
return this.shiftsEntity.updateBreaks(teamId, configuration);
|
|
22
|
-
};
|
|
23
11
|
ShiftsApi.prototype.startShift = function (userId, teamId) {
|
|
24
12
|
return this.shiftsEntity.startShift(userId, teamId);
|
|
25
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShiftsApi.js","sourceRoot":"","sources":["../../src/Shifts/ShiftsApi.ts"],"names":[],"mappings":";;;;;AACA,2DAAqC;AAGrC;IAGC,mBAAY,OAAgB;QAC3B,IAAI,CAAC,YAAY,GAAG,IAAI,gBAAM,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAEM,
|
|
1
|
+
{"version":3,"file":"ShiftsApi.js","sourceRoot":"","sources":["../../src/Shifts/ShiftsApi.ts"],"names":[],"mappings":";;;;;AACA,2DAAqC;AAGrC;IAGC,mBAAY,OAAgB;QAC3B,IAAI,CAAC,YAAY,GAAG,IAAI,gBAAM,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAEM,8BAAU,GAAjB,UAAkB,MAAc,EAAE,MAAe;QAChD,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrD,CAAC;IAEM,4BAAQ,GAAf,UAAgB,MAAc;QAC7B,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3C,CAAC;IACF,gBAAC;AAAD,CAAC,AAdD,IAcC"}
|
|
@@ -24708,7 +24708,7 @@ var BringgException_1 = __webpack_require__(43605);
|
|
|
24708
24708
|
var client_page_1 = __webpack_require__(16573);
|
|
24709
24709
|
var Logger_1 = __importDefault(__webpack_require__(55860));
|
|
24710
24710
|
var abort_1 = __webpack_require__(34179);
|
|
24711
|
-
var version = '9.
|
|
24711
|
+
var version = '9.89.0';
|
|
24712
24712
|
function logErrorResponse(response) {
|
|
24713
24713
|
var data = response.data, status = response.status;
|
|
24714
24714
|
try {
|
|
@@ -25114,52 +25114,6 @@ var ShiftsEntity = /** @class */ (function (_super) {
|
|
|
25114
25114
|
function ShiftsEntity(session) {
|
|
25115
25115
|
return _super.call(this, { session: session, entityName: 'shifts' }) || this;
|
|
25116
25116
|
}
|
|
25117
|
-
ShiftsEntity.prototype.getShifts = function (teamId) {
|
|
25118
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
25119
|
-
return __generator(this, function (_a) {
|
|
25120
|
-
return [2 /*return*/, this.service.routeGenerator
|
|
25121
|
-
.get("/teams/".concat(teamId, "/shifts_schedule/"))
|
|
25122
|
-
.setException('Failed to get shifts schedule')
|
|
25123
|
-
.invoke()];
|
|
25124
|
-
});
|
|
25125
|
-
});
|
|
25126
|
-
};
|
|
25127
|
-
ShiftsEntity.prototype.updateShifts = function (teamId, configuration) {
|
|
25128
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
25129
|
-
var request;
|
|
25130
|
-
return __generator(this, function (_a) {
|
|
25131
|
-
request = { id: teamId, configuration: configuration };
|
|
25132
|
-
return [2 /*return*/, this.service.routeGenerator
|
|
25133
|
-
.put("/teams/".concat(teamId, "/shifts_schedule"))
|
|
25134
|
-
.withPayload(request)
|
|
25135
|
-
.setException('Failed update shifts schedule')
|
|
25136
|
-
.invoke()];
|
|
25137
|
-
});
|
|
25138
|
-
});
|
|
25139
|
-
};
|
|
25140
|
-
ShiftsEntity.prototype.getBreaks = function (teamId) {
|
|
25141
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
25142
|
-
return __generator(this, function (_a) {
|
|
25143
|
-
return [2 /*return*/, this.service.routeGenerator
|
|
25144
|
-
.get("/teams/".concat(teamId, "/scheduled_breaks/"))
|
|
25145
|
-
.setException('Failed to get shifts breaks')
|
|
25146
|
-
.invoke()];
|
|
25147
|
-
});
|
|
25148
|
-
});
|
|
25149
|
-
};
|
|
25150
|
-
ShiftsEntity.prototype.updateBreaks = function (teamId, configuration) {
|
|
25151
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
25152
|
-
var request;
|
|
25153
|
-
return __generator(this, function (_a) {
|
|
25154
|
-
request = { id: teamId, configuration: configuration };
|
|
25155
|
-
return [2 /*return*/, this.service.routeGenerator
|
|
25156
|
-
.put("/teams/".concat(teamId, "/scheduled_breaks"))
|
|
25157
|
-
.withPayload(request)
|
|
25158
|
-
.setException('Failed update shift breaks')
|
|
25159
|
-
.invoke()];
|
|
25160
|
-
});
|
|
25161
|
-
});
|
|
25162
|
-
};
|
|
25163
25117
|
ShiftsEntity.prototype.startShift = function (userId, teamId) {
|
|
25164
25118
|
return __awaiter(this, void 0, void 0, function () {
|
|
25165
25119
|
return __generator(this, function (_a) {
|
|
@@ -25206,18 +25160,6 @@ var ShiftsApi = /** @class */ (function () {
|
|
|
25206
25160
|
function ShiftsApi(session) {
|
|
25207
25161
|
this.shiftsEntity = new Shifts_1.default(session);
|
|
25208
25162
|
}
|
|
25209
|
-
ShiftsApi.prototype.getShifts = function (teamId) {
|
|
25210
|
-
return this.shiftsEntity.getShifts(teamId);
|
|
25211
|
-
};
|
|
25212
|
-
ShiftsApi.prototype.updateShifts = function (teamId, configuration) {
|
|
25213
|
-
return this.shiftsEntity.updateShifts(teamId, configuration);
|
|
25214
|
-
};
|
|
25215
|
-
ShiftsApi.prototype.getBreaks = function (teamId) {
|
|
25216
|
-
return this.shiftsEntity.getBreaks(teamId);
|
|
25217
|
-
};
|
|
25218
|
-
ShiftsApi.prototype.updateBreaks = function (teamId, configuration) {
|
|
25219
|
-
return this.shiftsEntity.updateBreaks(teamId, configuration);
|
|
25220
|
-
};
|
|
25221
25163
|
ShiftsApi.prototype.startShift = function (userId, teamId) {
|
|
25222
25164
|
return this.shiftsEntity.startShift(userId, teamId);
|
|
25223
25165
|
};
|