@bringg/dashboard-sdk 10.2.0-pre.1 → 10.2.0-pre.60537
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/BringgDashboardSDK.d.ts +11 -1
- package/dist/BringgDashboardSDK.js +9 -1
- package/dist/BringgDashboardSDK.js.map +1 -1
- package/dist/CheckinDistanceReason/v2/checkin-distance-reasons-api.d.ts +27 -0
- package/dist/CheckinDistanceReason/v2/checkin-distance-reasons-api.js +118 -0
- package/dist/CheckinDistanceReason/v2/checkin-distance-reasons-api.js.map +1 -0
- package/dist/CheckinDistanceReason/v2/checkin-distance-reasons-service.d.ts +15 -0
- package/dist/CheckinDistanceReason/v2/checkin-distance-reasons-service.js +140 -0
- package/dist/CheckinDistanceReason/v2/checkin-distance-reasons-service.js.map +1 -0
- package/dist/Tag/Entity/TagEntity.d.ts +1 -10
- package/dist/Tag/Entity/TagEntity.js +0 -60
- package/dist/Tag/Entity/TagEntity.js.map +1 -1
- package/dist/Tag/Tag.consts.d.ts +0 -9
- package/dist/Tag/Tag.consts.js.map +1 -1
- package/dist/Tag/Tag.d.ts +3 -11
- package/dist/Tag/Tag.js +1 -25
- package/dist/Tag/Tag.js.map +1 -1
- package/dist/TaskConfiguration/Entity/TaskConfigurationEntity.d.ts +2 -1
- package/dist/TaskConfiguration/Entity/TaskConfigurationEntity.js +4 -1
- package/dist/TaskConfiguration/Entity/TaskConfigurationEntity.js.map +1 -1
- package/dist/TaskConfiguration/TaskConfiguration.consts.d.ts +4 -0
- package/dist/TaskConfiguration/TaskConfiguration.d.ts +6 -4
- package/dist/TaskConfiguration/TaskConfiguration.js +51 -0
- package/dist/TaskConfiguration/TaskConfiguration.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +425 -101
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +86 -20
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/Tag/Tag.js
CHANGED
|
@@ -8,7 +8,6 @@ var Tag = /** @class */ (function () {
|
|
|
8
8
|
function Tag(session) {
|
|
9
9
|
this.tagEntity = new TagEntity_1.default(session);
|
|
10
10
|
}
|
|
11
|
-
// The server answers with the array of tags itself, not `{ tags }`
|
|
12
11
|
Tag.prototype.getAll = function () {
|
|
13
12
|
return this.tagEntity.service.getAll();
|
|
14
13
|
};
|
|
@@ -16,34 +15,11 @@ var Tag = /** @class */ (function () {
|
|
|
16
15
|
return this.tagEntity.service.create(tag);
|
|
17
16
|
};
|
|
18
17
|
Tag.prototype.update = function (id, tag) {
|
|
19
|
-
|
|
20
|
-
// Sending the tag flat fails: its own `tag` name field stops Rails from wrapping the params.
|
|
21
|
-
return this.tagEntity.service.update(id, { id: id, tag: tag });
|
|
18
|
+
return this.tagEntity.service.update(id, tag);
|
|
22
19
|
};
|
|
23
20
|
Tag.prototype.delete = function (id) {
|
|
24
21
|
return this.tagEntity.service.delete(id);
|
|
25
22
|
};
|
|
26
|
-
Tag.prototype.createTagWithConfigurations = function (options) {
|
|
27
|
-
return this.tagEntity.createWithConfigurations(options);
|
|
28
|
-
};
|
|
29
|
-
Tag.prototype.createTagConfiguration = function (tagId, type) {
|
|
30
|
-
return this.tagEntity.createConfiguration(tagId, type);
|
|
31
|
-
};
|
|
32
|
-
Tag.prototype.deleteTagConfiguration = function (tagId, type) {
|
|
33
|
-
return this.tagEntity.deleteConfiguration(tagId, type);
|
|
34
|
-
};
|
|
35
|
-
Tag.prototype.createTagCancelReasonsConfiguration = function (tagId) {
|
|
36
|
-
return this.tagEntity.createCancelReasonsConfiguration(tagId);
|
|
37
|
-
};
|
|
38
|
-
Tag.prototype.deleteTagCancelReasonsConfiguration = function (tagId) {
|
|
39
|
-
return this.tagEntity.deleteCancelReasonsConfiguration(tagId);
|
|
40
|
-
};
|
|
41
|
-
Tag.prototype.updateTagCancelReasons = function (tagId, tag) {
|
|
42
|
-
return this.tagEntity.updateCancelReasons(tagId, tag);
|
|
43
|
-
};
|
|
44
|
-
Tag.prototype.uploadTagImage = function (tagId, field, imageFile) {
|
|
45
|
-
return this.tagEntity.uploadImage(tagId, field, imageFile);
|
|
46
|
-
};
|
|
47
23
|
return Tag;
|
|
48
24
|
}());
|
|
49
25
|
exports.default = Tag;
|
package/dist/Tag/Tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../src/Tag/Tag.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../src/Tag/Tag.ts"],"names":[],"mappings":";;;;;AAIA,iEAA2C;AAG3C;IAGC,aAAY,OAAgB;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAEM,oBAAM,GAAb;QACC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IACxC,CAAC;IAEM,oBAAM,GAAb,UAAc,GAAY;QACzB,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3C,CAAC;IAEM,oBAAM,GAAb,UAAc,EAAU,EAAE,GAAY;QACrC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IAC/C,CAAC;IAEM,oBAAM,GAAb,UAAc,EAAU;QACvB,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC1C,CAAC;IACF,UAAC;AAAD,CAAC,AAtBD,IAsBC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import Entity from '../../Core/Entity';
|
|
2
2
|
import Session from '../../Services/Identity/Session';
|
|
3
|
-
import { TaskConfigurationGetAllActionDataResponse } from '../TaskConfiguration.consts';
|
|
3
|
+
import { TaskConfigurationGetAllActionDataResponse, TaskConfigurationGetAllResponse } from '../TaskConfiguration.consts';
|
|
4
4
|
export default class TaskConfigurationEntity extends Entity<Bringg.TaskConfiguration> {
|
|
5
5
|
constructor(session: Session);
|
|
6
|
+
getAll(): Promise<TaskConfigurationGetAllResponse>;
|
|
6
7
|
getAllActionData(): Promise<TaskConfigurationGetAllActionDataResponse>;
|
|
7
8
|
}
|
|
@@ -46,9 +46,12 @@ var TaskConfigurationEntity = /** @class */ (function (_super) {
|
|
|
46
46
|
session: session,
|
|
47
47
|
entityName: 'task_configurations',
|
|
48
48
|
routePrefix: 'merchant',
|
|
49
|
-
routes: [Entity_1.BaseRoutes.Create, Entity_1.BaseRoutes.Update]
|
|
49
|
+
routes: [Entity_1.BaseRoutes.GetAll, Entity_1.BaseRoutes.Create, Entity_1.BaseRoutes.Update]
|
|
50
50
|
}) || this;
|
|
51
51
|
}
|
|
52
|
+
TaskConfigurationEntity.prototype.getAll = function () {
|
|
53
|
+
return this.service.getAll();
|
|
54
|
+
};
|
|
52
55
|
TaskConfigurationEntity.prototype.getAllActionData = function () {
|
|
53
56
|
return this.service.routeGenerator.get('/merchant/task_configurations/get_all_action_data').invoke();
|
|
54
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskConfigurationEntity.js","sourceRoot":"","sources":["../../../src/TaskConfiguration/Entity/TaskConfigurationEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAAuD;
|
|
1
|
+
{"version":3,"file":"TaskConfigurationEntity.js","sourceRoot":"","sources":["../../../src/TaskConfiguration/Entity/TaskConfigurationEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAAuD;AAOvD;IAAqD,2CAAgC;IACpF,iCAAY,OAAgB;eAC3B,kBAAM;YACL,OAAO,SAAA;YACP,UAAU,EAAE,qBAAqB;YACjC,WAAW,EAAE,UAAU;YACvB,MAAM,EAAE,CAAC,mBAAU,CAAC,MAAM,EAAE,mBAAU,CAAC,MAAM,EAAE,mBAAU,CAAC,MAAM,CAAC;SACjE,CAAC;IACH,CAAC;IAED,wCAAM,GAAN;QACC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IAC9B,CAAC;IAED,kDAAgB,GAAhB;QACC,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC,MAAM,EAAE,CAAC;IACtG,CAAC;IACF,8BAAC;AAAD,CAAC,AAjBD,CAAqD,gBAAM,GAiB1D"}
|
|
@@ -5,3 +5,7 @@ export type TaskConfigurationCreateResponse = BasicResponse & {
|
|
|
5
5
|
export type TaskConfigurationGetAllActionDataResponse = BasicResponse & {
|
|
6
6
|
task_configurations: Bringg.TaskConfiguration[];
|
|
7
7
|
};
|
|
8
|
+
export type TaskConfigurationListItem = Pick<Bringg.TaskConfiguration, 'id' | 'title' | 'checkin_distance_enforcement'>;
|
|
9
|
+
export type TaskConfigurationGetAllResponse = BasicResponse & {
|
|
10
|
+
task_configurations: TaskConfigurationListItem[];
|
|
11
|
+
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import Session from '../Services/Identity/Session';
|
|
2
|
-
import
|
|
3
|
-
import { TaskConfigurationCreateResponse, TaskConfigurationGetAllActionDataResponse } from './TaskConfiguration.consts';
|
|
2
|
+
import { TaskConfigurationCreateResponse, TaskConfigurationGetAllActionDataResponse, TaskConfigurationListItem } from './TaskConfiguration.consts';
|
|
4
3
|
export default class TaskConfiguration {
|
|
5
4
|
private TaskConfigurationEntity;
|
|
6
5
|
constructor(session: Session);
|
|
6
|
+
/** Every task configuration of the merchant, with or without actions (id, title, checkin_distance_enforcement). */
|
|
7
|
+
getAll(): Promise<TaskConfigurationListItem[]>;
|
|
8
|
+
/** Only the task configurations that have actions. */
|
|
7
9
|
getAllActionData(): Promise<TaskConfigurationGetAllActionDataResponse>;
|
|
8
|
-
create(taskConfiguration: Partial<
|
|
9
|
-
update(id: number, taskConfiguration: Partial<
|
|
10
|
+
create(taskConfiguration: Partial<Bringg.TaskConfiguration>): Promise<TaskConfigurationCreateResponse>;
|
|
11
|
+
update(id: number, taskConfiguration: Partial<Bringg.TaskConfiguration>): Promise<TaskConfigurationCreateResponse>;
|
|
10
12
|
}
|
|
@@ -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
|
};
|
|
@@ -8,6 +44,21 @@ var TaskConfiguration = /** @class */ (function () {
|
|
|
8
44
|
function TaskConfiguration(session) {
|
|
9
45
|
this.TaskConfigurationEntity = new TaskConfigurationEntity_1.default(session);
|
|
10
46
|
}
|
|
47
|
+
/** Every task configuration of the merchant, with or without actions (id, title, checkin_distance_enforcement). */
|
|
48
|
+
TaskConfiguration.prototype.getAll = function () {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
+
var response;
|
|
51
|
+
return __generator(this, function (_a) {
|
|
52
|
+
switch (_a.label) {
|
|
53
|
+
case 0: return [4 /*yield*/, this.TaskConfigurationEntity.getAll()];
|
|
54
|
+
case 1:
|
|
55
|
+
response = _a.sent();
|
|
56
|
+
return [2 /*return*/, response.task_configurations];
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
/** Only the task configurations that have actions. */
|
|
11
62
|
TaskConfiguration.prototype.getAllActionData = function () {
|
|
12
63
|
return this.TaskConfigurationEntity.getAllActionData();
|
|
13
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskConfiguration.js","sourceRoot":"","sources":["../../src/TaskConfiguration/TaskConfiguration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TaskConfiguration.js","sourceRoot":"","sources":["../../src/TaskConfiguration/TaskConfiguration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6FAAuE;AAOvE;IAGC,2BAAY,OAAgB;QAC3B,IAAI,CAAC,uBAAuB,GAAG,IAAI,iCAAuB,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;IAED,mHAAmH;IACtG,kCAAM,GAAnB;;;;;4BACkB,qBAAM,IAAI,CAAC,uBAAuB,CAAC,MAAM,EAAE,EAAA;;wBAAtD,QAAQ,GAAG,SAA2C;wBAE5D,sBAAO,QAAQ,CAAC,mBAAmB,EAAC;;;;KACpC;IAED,sDAAsD;IAC/C,4CAAgB,GAAvB;QACC,OAAO,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,EAAE,CAAC;IACxD,CAAC;IAEM,kCAAM,GAAb,UAAc,iBAAoD;QACjE,OAAO,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACvE,CAAC;IAEM,kCAAM,GAAb,UACC,EAAU,EACV,iBAAoD;QAEpD,OAAO,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC3E,CAAC;IACF,wBAAC;AAAD,CAAC,AA7BD,IA6BC"}
|