@escapenavigator/types 1.6.60 → 1.6.62

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.
@@ -0,0 +1,8 @@
1
+ export declare type UploadFileFormat<T extends string> = Record<T, {
2
+ row: string;
3
+ value?: unknown;
4
+ required: boolean;
5
+ serialize?: (val: unknown) => unknown;
6
+ }>;
7
+ export declare type UploadCertificateRows = 'source' | 'code' | 'client' | 'nominal' | 'expireDate' | 'createdDate' | 'used';
8
+ export declare type UploadOrderRows = 'SOURCE' | 'CLIENT_NAME' | 'CLIENT_SURNAME' | 'CLIENT_PHONE' | 'CLIENT_EMAIL' | 'DATE_TIME' | 'PLAYERS' | 'QUESTROOM_ID' | 'TOTAL_AMOUNT' | 'PAYED' | 'LANGUAGE';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { UploadCertificateRows, UploadFileFormat } from './types';
2
+ export declare const uploadCertificateRows: UploadFileFormat<UploadCertificateRows>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uploadCertificateRows = void 0;
4
+ const upload_order_bookeo_rows_1 = require("./upload-order-bookeo-rows");
5
+ exports.uploadCertificateRows = {
6
+ source: {
7
+ required: true,
8
+ row: 'source',
9
+ },
10
+ client: {
11
+ required: true,
12
+ row: 'client',
13
+ },
14
+ code: {
15
+ row: 'code',
16
+ required: true,
17
+ },
18
+ nominal: {
19
+ row: 'nominal',
20
+ required: true,
21
+ serialize: (val) => +val,
22
+ },
23
+ expireDate: {
24
+ row: 'expireDate',
25
+ required: true,
26
+ serialize: (val) => (0, upload_order_bookeo_rows_1.parseDate)(val),
27
+ },
28
+ createdDate: {
29
+ row: 'createdDate',
30
+ required: true,
31
+ serialize: (val) => (0, upload_order_bookeo_rows_1.parseDate)(val),
32
+ },
33
+ used: {
34
+ row: 'used',
35
+ value: undefined,
36
+ required: false,
37
+ serialize: (val) => (0, upload_order_bookeo_rows_1.parseDate)(val),
38
+ },
39
+ };
@@ -0,0 +1,3 @@
1
+ import { UploadFileFormat, UploadOrderRows } from './types';
2
+ export declare function parseDate(serial: any): string;
3
+ export declare const uploadBookeoOrdersRows: UploadFileFormat<UploadOrderRows>;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uploadBookeoOrdersRows = exports.parseDate = void 0;
4
+ function parseDate(serial) {
5
+ const originalDate = new Date(serial);
6
+ if (!(originalDate instanceof Date))
7
+ return null;
8
+ originalDate.setHours(originalDate.getHours() + 3);
9
+ return originalDate.toISOString().slice(0, 19).split('T').join(' ');
10
+ }
11
+ exports.parseDate = parseDate;
12
+ exports.uploadBookeoOrdersRows = {
13
+ SOURCE: {
14
+ required: false,
15
+ row: 'Source',
16
+ serialize: () => 'Bookeo',
17
+ },
18
+ CLIENT_NAME: {
19
+ required: false,
20
+ row: 'First name',
21
+ },
22
+ CLIENT_SURNAME: {
23
+ required: false,
24
+ row: 'Last name',
25
+ },
26
+ CLIENT_PHONE: {
27
+ required: false,
28
+ row: 'Phone',
29
+ },
30
+ CLIENT_EMAIL: {
31
+ required: true,
32
+ row: 'Email address',
33
+ serialize: (val) => val.toLowerCase().trim(),
34
+ },
35
+ DATE_TIME: {
36
+ required: true,
37
+ row: 'Start',
38
+ serialize: (val) => parseDate(val),
39
+ },
40
+ PLAYERS: {
41
+ required: true,
42
+ row: 'Participants',
43
+ serialize: (val) => +val,
44
+ },
45
+ QUESTROOM_ID: {
46
+ required: true,
47
+ row: 'Quest',
48
+ },
49
+ TOTAL_AMOUNT: {
50
+ required: true,
51
+ row: 'Total gross',
52
+ serialize: (val) => +val,
53
+ },
54
+ PAYED: {
55
+ required: true,
56
+ row: 'Total paid',
57
+ serialize: (val) => +val,
58
+ },
59
+ LANGUAGE: {
60
+ required: false,
61
+ row: 'Language',
62
+ },
63
+ };
@@ -0,0 +1,2 @@
1
+ import { UploadFileFormat, UploadOrderRows } from './types';
2
+ export declare const uploadOrdersRows: UploadFileFormat<UploadOrderRows>;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uploadOrdersRows = void 0;
4
+ const upload_order_bookeo_rows_1 = require("./upload-order-bookeo-rows");
5
+ exports.uploadOrdersRows = {
6
+ SOURCE: {
7
+ required: true,
8
+ row: 'SOURCE',
9
+ },
10
+ CLIENT_NAME: {
11
+ required: false,
12
+ row: 'CLIENT_NAME',
13
+ },
14
+ CLIENT_SURNAME: {
15
+ required: false,
16
+ row: 'CLIENT_SURNAME',
17
+ },
18
+ CLIENT_PHONE: {
19
+ required: false,
20
+ row: 'CLIENT_PHONE',
21
+ },
22
+ CLIENT_EMAIL: {
23
+ required: true,
24
+ row: 'CLIENT_EMAIL',
25
+ serialize: (val) => val.toLowerCase().trim(),
26
+ },
27
+ DATE_TIME: {
28
+ required: true,
29
+ row: 'DATE_TIME',
30
+ serialize: (val) => (0, upload_order_bookeo_rows_1.parseDate)(val),
31
+ },
32
+ PLAYERS: {
33
+ required: true,
34
+ row: 'PLAYERS',
35
+ serialize: (val) => +val,
36
+ },
37
+ QUESTROOM_ID: {
38
+ required: true,
39
+ row: 'QUESTROOM_ID',
40
+ },
41
+ TOTAL_AMOUNT: {
42
+ required: true,
43
+ row: 'TOTAL_AMOUNT',
44
+ serialize: (val) => +val,
45
+ },
46
+ PAYED: {
47
+ required: true,
48
+ row: 'PAYED',
49
+ serialize: (val) => +val,
50
+ },
51
+ LANGUAGE: {
52
+ required: false,
53
+ row: 'LANGUAGE',
54
+ },
55
+ };
@@ -11,7 +11,7 @@ export declare class OpenapiNowEscapeOrderDto {
11
11
  players: number;
12
12
  date: string;
13
13
  time: string;
14
- your_slot_id: number;
14
+ your_slot_id: string;
15
15
  unique_id: string;
16
16
  paid_on_website: boolean;
17
17
  status: Status;
@@ -62,8 +62,8 @@ __decorate([
62
62
  ], OpenapiNowEscapeOrderDto.prototype, "time", void 0);
63
63
  __decorate([
64
64
  (0, class_transformer_1.Expose)(),
65
- (0, class_validator_1.IsPositive)(),
66
- __metadata("design:type", Number)
65
+ (0, is_not_blank_1.IsNotBlank)(),
66
+ __metadata("design:type", String)
67
67
  ], OpenapiNowEscapeOrderDto.prototype, "your_slot_id", void 0);
68
68
  __decorate([
69
69
  (0, class_transformer_1.Expose)(),