@driveflux/api-functions 0.0.5 → 0.0.7-next.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/auth/tokens.d.ts +3 -3
- package/dist/auth/verifications.d.ts.map +1 -1
- package/dist/auth/verifications.js +109 -26
- package/dist/auth/verifications.js.map +1 -1
- package/dist/mailjet/calls/request-service.d.ts +1 -1
- package/dist/mailjet/calls/request-service.d.ts.map +1 -1
- package/dist/reservation/display-vehicle.d.ts +37 -37
- package/dist/reservation/display-vehicle.d.ts.map +1 -1
- package/dist/slack.d.ts +2 -2
- package/dist/slack.d.ts.map +1 -1
- package/package.json +15 -15
package/dist/auth/tokens.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ type VerifyTokenOptions = {
|
|
|
8
8
|
includeUser?: boolean;
|
|
9
9
|
};
|
|
10
10
|
export declare const createToken: (userId: string | null, type: "email" | "phoneNumber", value: string, providedExpiresAt?: Date) => Promise<{
|
|
11
|
-
object: import("@driveflux/db
|
|
11
|
+
object: import("@driveflux/db").TokenObject;
|
|
12
12
|
id: string;
|
|
13
13
|
metadata: PrismaJson.AnyMetadata | null;
|
|
14
14
|
createdAt: Date;
|
|
@@ -24,7 +24,7 @@ export declare const createToken: (userId: string | null, type: "email" | "phone
|
|
|
24
24
|
lastUsed: Date | null;
|
|
25
25
|
} | undefined>;
|
|
26
26
|
export declare const createEmailToken: (userId: string, email: string) => Promise<{
|
|
27
|
-
object: import("@driveflux/db
|
|
27
|
+
object: import("@driveflux/db").TokenObject;
|
|
28
28
|
id: string;
|
|
29
29
|
metadata: PrismaJson.AnyMetadata | null;
|
|
30
30
|
createdAt: Date;
|
|
@@ -40,7 +40,7 @@ export declare const createEmailToken: (userId: string, email: string) => Promis
|
|
|
40
40
|
lastUsed: Date | null;
|
|
41
41
|
} | undefined>;
|
|
42
42
|
export declare const createSMSToken: (userId: string | null, phoneNumber: string) => Promise<{
|
|
43
|
-
object: import("@driveflux/db
|
|
43
|
+
object: import("@driveflux/db").TokenObject;
|
|
44
44
|
id: string;
|
|
45
45
|
metadata: PrismaJson.AnyMetadata | null;
|
|
46
46
|
createdAt: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifications.d.ts","sourceRoot":"","sources":["../../src/auth/verifications.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAezC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"verifications.d.ts","sourceRoot":"","sources":["../../src/auth/verifications.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAezC,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAChE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE1E,QAAA,MAAM,oBAAoB;;;iBAGxB,CAAA;AAEF,eAAO,MAAM,qBAAqB,GACjC,QAAQ,MAAM,GAAG,IAAI,EACrB,iBAAiB,MAAM,EACvB,OAAO,MAAM,KACX,cAAc,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAwGnD,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAU,UAAU,MAAM,kFAwBtD,CAAA;AAED,eAAO,MAAM,mBAAmB,GAC/B,QAAQ,MAAM,GAAG,IAAI,EACrB,aAAa,MAAM,KACjB,cAAc,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAQnD,CAAA;AA8CD,eAAO,MAAM,sBAAsB,GAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;YAmCtE,CAAA"}
|
|
@@ -127,7 +127,6 @@ import { makeProblem, PROBLEM_CONFLICT, PROBLEM_EXTERNAL, PROBLEM_INTERNAL, PROB
|
|
|
127
127
|
import { reportProblem } from '@driveflux/reporter';
|
|
128
128
|
import { Err, Ok } from '@driveflux/result';
|
|
129
129
|
import { z } from 'zod';
|
|
130
|
-
import { cleanupPhoneNumber } from './formatter.js';
|
|
131
130
|
import { clearToken, createEmailToken, createSMSToken } from './tokens.js';
|
|
132
131
|
var CheckDuplicationBody = z.object({
|
|
133
132
|
phoneNumber: z.string(),
|
|
@@ -391,37 +390,51 @@ export var sendVerificationSMS = function(userId, phoneNumber) {
|
|
|
391
390
|
});
|
|
392
391
|
})();
|
|
393
392
|
};
|
|
393
|
+
var formatPhoneNumber = function(phoneNumber) {
|
|
394
|
+
return phoneNumber.replace(/[^0-9]/g, '');
|
|
395
|
+
};
|
|
394
396
|
var sendSms = function(phoneNumber, code) {
|
|
395
397
|
return _async_to_generator(function() {
|
|
396
|
-
var
|
|
398
|
+
var isInternational, sendSmsResult, _tmp, _, e, _1;
|
|
397
399
|
return _ts_generator(this, function(_state) {
|
|
398
400
|
switch(_state.label){
|
|
399
401
|
case 0:
|
|
402
|
+
isInternational = !formatPhoneNumber(phoneNumber).startsWith('60');
|
|
403
|
+
_state.label = 1;
|
|
404
|
+
case 1:
|
|
400
405
|
_state.trys.push([
|
|
401
|
-
|
|
402
|
-
|
|
406
|
+
1,
|
|
407
|
+
8,
|
|
403
408
|
,
|
|
404
|
-
|
|
409
|
+
10
|
|
405
410
|
]);
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
msg: "RM0.00 FLUX verification code: ".concat(code),
|
|
411
|
-
sender: 'FLUX'
|
|
412
|
-
};
|
|
411
|
+
if (!isInternational) return [
|
|
412
|
+
3,
|
|
413
|
+
3
|
|
414
|
+
];
|
|
413
415
|
return [
|
|
414
416
|
4,
|
|
415
|
-
|
|
416
|
-
method: 'POST',
|
|
417
|
-
body: JSON.stringify(body)
|
|
418
|
-
})
|
|
417
|
+
sendVonageSms(phoneNumber, code)
|
|
419
418
|
];
|
|
420
|
-
case
|
|
421
|
-
|
|
422
|
-
|
|
419
|
+
case 2:
|
|
420
|
+
_tmp = _state.sent();
|
|
421
|
+
return [
|
|
423
422
|
3,
|
|
424
|
-
|
|
423
|
+
5
|
|
424
|
+
];
|
|
425
|
+
case 3:
|
|
426
|
+
return [
|
|
427
|
+
4,
|
|
428
|
+
sendEsmsSms(phoneNumber, code)
|
|
429
|
+
];
|
|
430
|
+
case 4:
|
|
431
|
+
_tmp = _state.sent();
|
|
432
|
+
_state.label = 5;
|
|
433
|
+
case 5:
|
|
434
|
+
sendSmsResult = _tmp;
|
|
435
|
+
if (!sendSmsResult.err) return [
|
|
436
|
+
3,
|
|
437
|
+
7
|
|
425
438
|
];
|
|
426
439
|
_ = Err.bind;
|
|
427
440
|
return [
|
|
@@ -431,11 +444,11 @@ var sendSms = function(phoneNumber, code) {
|
|
|
431
444
|
code: PROBLEM_EXTERNAL,
|
|
432
445
|
message: 'Unable to send sms verification',
|
|
433
446
|
privateMetadata: {
|
|
434
|
-
error:
|
|
447
|
+
error: sendSmsResult.val
|
|
435
448
|
}
|
|
436
449
|
}))
|
|
437
450
|
];
|
|
438
|
-
case
|
|
451
|
+
case 6:
|
|
439
452
|
return [
|
|
440
453
|
2,
|
|
441
454
|
new (_.apply(Err, [
|
|
@@ -443,7 +456,7 @@ var sendSms = function(phoneNumber, code) {
|
|
|
443
456
|
_state.sent()
|
|
444
457
|
]))
|
|
445
458
|
];
|
|
446
|
-
case
|
|
459
|
+
case 7:
|
|
447
460
|
return [
|
|
448
461
|
2,
|
|
449
462
|
new Ok({
|
|
@@ -451,7 +464,7 @@ var sendSms = function(phoneNumber, code) {
|
|
|
451
464
|
code: code
|
|
452
465
|
})
|
|
453
466
|
];
|
|
454
|
-
case
|
|
467
|
+
case 8:
|
|
455
468
|
e = _state.sent();
|
|
456
469
|
_1 = Err.bind;
|
|
457
470
|
return [
|
|
@@ -465,7 +478,7 @@ var sendSms = function(phoneNumber, code) {
|
|
|
465
478
|
}
|
|
466
479
|
}))
|
|
467
480
|
];
|
|
468
|
-
case
|
|
481
|
+
case 9:
|
|
469
482
|
return [
|
|
470
483
|
2,
|
|
471
484
|
new (_1.apply(Err, [
|
|
@@ -473,7 +486,7 @@ var sendSms = function(phoneNumber, code) {
|
|
|
473
486
|
_state.sent()
|
|
474
487
|
]))
|
|
475
488
|
];
|
|
476
|
-
case
|
|
489
|
+
case 10:
|
|
477
490
|
return [
|
|
478
491
|
2
|
|
479
492
|
];
|
|
@@ -530,3 +543,73 @@ export var handleCheckDuplication = function(b) {
|
|
|
530
543
|
});
|
|
531
544
|
})();
|
|
532
545
|
};
|
|
546
|
+
/**
|
|
547
|
+
* This function runs only for foreign numbers and sends an SMS containing the OTP code to the foreign number
|
|
548
|
+
* @param phoneNumber user's phone number
|
|
549
|
+
* @param code OTP code
|
|
550
|
+
* @returns result of sending SMS to user
|
|
551
|
+
*/ var sendVonageSms = function(phoneNumber, code) {
|
|
552
|
+
return _async_to_generator(function() {
|
|
553
|
+
var body, result;
|
|
554
|
+
return _ts_generator(this, function(_state) {
|
|
555
|
+
switch(_state.label){
|
|
556
|
+
case 0:
|
|
557
|
+
body = {
|
|
558
|
+
from: 'FLUX',
|
|
559
|
+
to: formatPhoneNumber(phoneNumber),
|
|
560
|
+
text: "FLUX verification code: ".concat(code),
|
|
561
|
+
api_key: config.vonage.apiKey,
|
|
562
|
+
api_secret: config.vonage.apiSecret
|
|
563
|
+
};
|
|
564
|
+
return [
|
|
565
|
+
4,
|
|
566
|
+
enhancedFetch('https://rest.nexmo.com/sms/json', {
|
|
567
|
+
method: 'POST',
|
|
568
|
+
body: JSON.stringify(body)
|
|
569
|
+
})
|
|
570
|
+
];
|
|
571
|
+
case 1:
|
|
572
|
+
result = _state.sent();
|
|
573
|
+
return [
|
|
574
|
+
2,
|
|
575
|
+
result
|
|
576
|
+
];
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
})();
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
* This function runs only for local numbers (MY) and sends an SMS containing the OTP code to the foreign number
|
|
583
|
+
* @param phoneNumber user's phone number
|
|
584
|
+
* @param code OTP code
|
|
585
|
+
* @returns result of sending SMS to user
|
|
586
|
+
*/ var sendEsmsSms = function(phoneNumber, code) {
|
|
587
|
+
return _async_to_generator(function() {
|
|
588
|
+
var body, result;
|
|
589
|
+
return _ts_generator(this, function(_state) {
|
|
590
|
+
switch(_state.label){
|
|
591
|
+
case 0:
|
|
592
|
+
body = {
|
|
593
|
+
user: config.esms.apiKey,
|
|
594
|
+
pass: config.esms.apiSecret,
|
|
595
|
+
to: formatPhoneNumber(phoneNumber),
|
|
596
|
+
msg: "RM0.00 FLUX verification code: ".concat(code),
|
|
597
|
+
sender: 'FLUX'
|
|
598
|
+
};
|
|
599
|
+
return [
|
|
600
|
+
4,
|
|
601
|
+
enhancedFetch('https://api.esms.com.my/sms/send', {
|
|
602
|
+
method: 'POST',
|
|
603
|
+
body: JSON.stringify(body)
|
|
604
|
+
})
|
|
605
|
+
];
|
|
606
|
+
case 1:
|
|
607
|
+
result = _state.sent();
|
|
608
|
+
return [
|
|
609
|
+
2,
|
|
610
|
+
result
|
|
611
|
+
];
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
})();
|
|
615
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifications.js","sourceRoot":"","sources":["../../src/auth/verifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAElD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,iBAA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AI,EAAE;QACvC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM;QAC7B,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS;KACnC,CAAA;IAED,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,iCAAiC,EAAE;QACrE,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC1B,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACd,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,WAAW,GAAG,KAAK,EAAE,WAAmB,EAAE,IAAY,EAAE,EAAE;IAC/D,MAAM,IAAI,GAAG;QACZ,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM;QACxB,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS;QAC3B,EAAE,EAAE,iBAAiB,CAAC,WAAW,CAAC;QAClC,GAAG,EAAE,kCAAkC,IAAI,EAAE;QAC7C,MAAM,EAAE,MAAM;KACd,CAAA;IAED,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,kCAAkC,EAAE;QACtE,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC1B,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACd,CAAC,CAAA"}
|
|
@@ -3,5 +3,5 @@ export type ResponseBase<T> = {
|
|
|
3
3
|
Data?: T[];
|
|
4
4
|
Total?: number;
|
|
5
5
|
};
|
|
6
|
-
export declare const callMailjet: <T>(path: string, data: any, method?: string) => Promise<import("@driveflux/fetch").EnhandedFetchResult<T, import("
|
|
6
|
+
export declare const callMailjet: <T>(path: string, data: any, method?: string) => Promise<import("@driveflux/fetch").EnhandedFetchResult<T, import("../../../../../packages/problem/dist").Problem>>;
|
|
7
7
|
//# sourceMappingURL=request-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-service.d.ts","sourceRoot":"","sources":["../../../src/mailjet/calls/request-service.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,CAAC,EAAE,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAgBD,eAAO,MAAM,WAAW,GAAU,CAAC,EAClC,MAAM,MAAM,EACZ,MAAM,GAAG,EACT,eAAe,
|
|
1
|
+
{"version":3,"file":"request-service.d.ts","sourceRoot":"","sources":["../../../src/mailjet/calls/request-service.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,CAAC,EAAE,CAAA;IACV,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAgBD,eAAO,MAAM,WAAW,GAAU,CAAC,EAClC,MAAM,MAAM,EACZ,MAAM,GAAG,EACT,eAAe,uHAaf,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type DisplayVehicle, type Vehicle } from '@driveflux/db';
|
|
1
|
+
import { type DisplayVehicle, type MileagePackage, type PlanType, type UltraTier, type Vehicle, type VehicleType } from '@driveflux/db';
|
|
2
2
|
export declare const fetchDisplayVehicle: (displayVehicle: DisplayVehicle | string) => Promise<{
|
|
3
|
-
object: import("@driveflux/db
|
|
4
|
-
type:
|
|
3
|
+
object: import("@driveflux/db").DisplayVehicleObject;
|
|
4
|
+
type: VehicleType;
|
|
5
5
|
id: string;
|
|
6
6
|
createdAt: Date;
|
|
7
7
|
updatedAt: Date;
|
|
@@ -30,7 +30,7 @@ export declare const fetchDisplayVehicle: (displayVehicle: DisplayVehicle | stri
|
|
|
30
30
|
engineCapacityText: string | null;
|
|
31
31
|
batteryCapacity: number | null;
|
|
32
32
|
chargingFrom30To80: number | null;
|
|
33
|
-
condition: import("@driveflux/db
|
|
33
|
+
condition: import("@driveflux/db").VehicleCondition | null;
|
|
34
34
|
numberOfSeats: number | null;
|
|
35
35
|
doors: number | null;
|
|
36
36
|
} & {
|
|
@@ -170,11 +170,11 @@ export declare const fetchDisplayVehicle: (displayVehicle: DisplayVehicle | stri
|
|
|
170
170
|
appliedCoupon: {
|
|
171
171
|
applicationName: string;
|
|
172
172
|
code: string;
|
|
173
|
-
discountType: import("@driveflux/db
|
|
173
|
+
discountType: import("@driveflux/db").DiscountType;
|
|
174
174
|
discountValue: number;
|
|
175
175
|
maxCycles: number | null;
|
|
176
176
|
texts: PrismaJson.StringMetadata | null;
|
|
177
|
-
plans:
|
|
177
|
+
plans: PlanType[];
|
|
178
178
|
redeemBefore: Date | null;
|
|
179
179
|
} | null;
|
|
180
180
|
faqsList: {
|
|
@@ -190,16 +190,16 @@ export declare const fetchDisplayVehicle: (displayVehicle: DisplayVehicle | stri
|
|
|
190
190
|
} | null>;
|
|
191
191
|
export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVehicle | string, selectedColor?: string) => Promise<({
|
|
192
192
|
host: {
|
|
193
|
-
object: import("@driveflux/db
|
|
193
|
+
object: import("@driveflux/db").HostObject;
|
|
194
194
|
phoneNumber: string | null;
|
|
195
|
-
type: import("@driveflux/db
|
|
195
|
+
type: import("@driveflux/db").HostType | null;
|
|
196
196
|
id: string;
|
|
197
197
|
metadata: PrismaJson.AnyMetadata | null;
|
|
198
198
|
name: string;
|
|
199
199
|
createdAt: Date;
|
|
200
200
|
updatedAt: Date;
|
|
201
201
|
email: string | null;
|
|
202
|
-
race: import("@driveflux/db
|
|
202
|
+
race: import("@driveflux/db").Race | null;
|
|
203
203
|
emergencyContactName: string | null;
|
|
204
204
|
emergencyPhoneNumber: string | null;
|
|
205
205
|
active: boolean;
|
|
@@ -239,7 +239,7 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
239
239
|
access_token: string | null;
|
|
240
240
|
scope: string | null;
|
|
241
241
|
livemode: boolean | null;
|
|
242
|
-
token_type: import("@driveflux/db
|
|
242
|
+
token_type: import("@driveflux/db").StripeBearerValue;
|
|
243
243
|
refresh_token: string | null;
|
|
244
244
|
stripe_user_id: string | null;
|
|
245
245
|
stripe_publishable_key: string | null;
|
|
@@ -261,13 +261,13 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
261
261
|
} | null;
|
|
262
262
|
};
|
|
263
263
|
} & {
|
|
264
|
-
object: import("@driveflux/db
|
|
265
|
-
type:
|
|
264
|
+
object: import("@driveflux/db").VehicleObject;
|
|
265
|
+
type: VehicleType;
|
|
266
266
|
id: string;
|
|
267
267
|
metadata: PrismaJson.AnyMetadata | null;
|
|
268
268
|
createdAt: Date;
|
|
269
269
|
updatedAt: Date;
|
|
270
|
-
status: import("@driveflux/db
|
|
270
|
+
status: import("@driveflux/db").VehicleStatus;
|
|
271
271
|
temporary: boolean;
|
|
272
272
|
registrationNumber: string | null;
|
|
273
273
|
hostId: string;
|
|
@@ -282,7 +282,7 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
282
282
|
mileage: number | null;
|
|
283
283
|
vin: string | null;
|
|
284
284
|
engineNumber: string | null;
|
|
285
|
-
availability: import("@driveflux/db
|
|
285
|
+
availability: import("@driveflux/db").VehicleAvailablity | null;
|
|
286
286
|
sumInsuredAmount: number | null;
|
|
287
287
|
basePrice: number;
|
|
288
288
|
basePricePlan1: number;
|
|
@@ -300,7 +300,7 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
300
300
|
niceName: string;
|
|
301
301
|
niceNameShort: string;
|
|
302
302
|
region: string | null;
|
|
303
|
-
flagType: import("@driveflux/db
|
|
303
|
+
flagType: import("@driveflux/db").VehicleFlag | null;
|
|
304
304
|
hasImages: boolean;
|
|
305
305
|
mileageTrackingOff: boolean;
|
|
306
306
|
featureOnLandingPage: boolean;
|
|
@@ -379,9 +379,9 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
379
379
|
tmv: number | null;
|
|
380
380
|
bought: boolean | null;
|
|
381
381
|
gfvNotApplicable: boolean;
|
|
382
|
-
ultraTier:
|
|
383
|
-
availablePlans:
|
|
384
|
-
availableMileagePackages:
|
|
382
|
+
ultraTier: UltraTier;
|
|
383
|
+
availablePlans: PlanType[];
|
|
384
|
+
availableMileagePackages: MileagePackage[];
|
|
385
385
|
recommendedDeposit: number | null;
|
|
386
386
|
} & {
|
|
387
387
|
gfv: {
|
|
@@ -649,7 +649,7 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
649
649
|
large: string | null;
|
|
650
650
|
description: string | null;
|
|
651
651
|
inspection: boolean | null;
|
|
652
|
-
inspectionType: import("@driveflux/db
|
|
652
|
+
inspectionType: import("@driveflux/db").InspectionType | null;
|
|
653
653
|
notActualPhoto: boolean | null;
|
|
654
654
|
}[];
|
|
655
655
|
details: {
|
|
@@ -664,7 +664,7 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
664
664
|
fuelConsumptionLitersPer100Km: number | null;
|
|
665
665
|
color: string | null;
|
|
666
666
|
features: string[];
|
|
667
|
-
condition: import("@driveflux/db
|
|
667
|
+
condition: import("@driveflux/db").VehicleCondition | null;
|
|
668
668
|
} | null;
|
|
669
669
|
inspection: {
|
|
670
670
|
exterior: number | null;
|
|
@@ -679,22 +679,22 @@ export declare const createVehicleFromDisplayVehicle: (displayVehicle: DisplayVe
|
|
|
679
679
|
appliedCoupon: {
|
|
680
680
|
applicationName: string;
|
|
681
681
|
code: string;
|
|
682
|
-
discountType: import("@driveflux/db
|
|
682
|
+
discountType: import("@driveflux/db").DiscountType;
|
|
683
683
|
discountValue: number;
|
|
684
684
|
maxCycles: number | null;
|
|
685
685
|
texts: PrismaJson.StringMetadata | null;
|
|
686
|
-
plans:
|
|
686
|
+
plans: PlanType[];
|
|
687
687
|
redeemBefore: Date | null;
|
|
688
688
|
} | null;
|
|
689
689
|
}) | undefined>;
|
|
690
690
|
export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayVehicle | string, selectedColor: string) => Promise<({
|
|
691
|
-
object: import("@driveflux/db
|
|
692
|
-
type:
|
|
691
|
+
object: import("@driveflux/db").VehicleObject;
|
|
692
|
+
type: VehicleType;
|
|
693
693
|
id: string;
|
|
694
694
|
metadata: PrismaJson.AnyMetadata | null;
|
|
695
695
|
createdAt: Date;
|
|
696
696
|
updatedAt: Date;
|
|
697
|
-
status: import("@driveflux/db
|
|
697
|
+
status: import("@driveflux/db").VehicleStatus;
|
|
698
698
|
temporary: boolean;
|
|
699
699
|
registrationNumber: string | null;
|
|
700
700
|
hostId: string;
|
|
@@ -709,7 +709,7 @@ export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayV
|
|
|
709
709
|
mileage: number | null;
|
|
710
710
|
vin: string | null;
|
|
711
711
|
engineNumber: string | null;
|
|
712
|
-
availability: import("@driveflux/db
|
|
712
|
+
availability: import("@driveflux/db").VehicleAvailablity | null;
|
|
713
713
|
sumInsuredAmount: number | null;
|
|
714
714
|
basePrice: number;
|
|
715
715
|
basePricePlan1: number;
|
|
@@ -727,7 +727,7 @@ export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayV
|
|
|
727
727
|
niceName: string;
|
|
728
728
|
niceNameShort: string;
|
|
729
729
|
region: string | null;
|
|
730
|
-
flagType: import("@driveflux/db
|
|
730
|
+
flagType: import("@driveflux/db").VehicleFlag | null;
|
|
731
731
|
hasImages: boolean;
|
|
732
732
|
mileageTrackingOff: boolean;
|
|
733
733
|
featureOnLandingPage: boolean;
|
|
@@ -806,9 +806,9 @@ export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayV
|
|
|
806
806
|
tmv: number | null;
|
|
807
807
|
bought: boolean | null;
|
|
808
808
|
gfvNotApplicable: boolean;
|
|
809
|
-
ultraTier:
|
|
810
|
-
availablePlans:
|
|
811
|
-
availableMileagePackages:
|
|
809
|
+
ultraTier: UltraTier;
|
|
810
|
+
availablePlans: PlanType[];
|
|
811
|
+
availableMileagePackages: MileagePackage[];
|
|
812
812
|
recommendedDeposit: number | null;
|
|
813
813
|
} & {
|
|
814
814
|
gfv: {
|
|
@@ -1076,7 +1076,7 @@ export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayV
|
|
|
1076
1076
|
large: string | null;
|
|
1077
1077
|
description: string | null;
|
|
1078
1078
|
inspection: boolean | null;
|
|
1079
|
-
inspectionType: import("@driveflux/db
|
|
1079
|
+
inspectionType: import("@driveflux/db").InspectionType | null;
|
|
1080
1080
|
notActualPhoto: boolean | null;
|
|
1081
1081
|
}[];
|
|
1082
1082
|
details: {
|
|
@@ -1091,7 +1091,7 @@ export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayV
|
|
|
1091
1091
|
fuelConsumptionLitersPer100Km: number | null;
|
|
1092
1092
|
color: string | null;
|
|
1093
1093
|
features: string[];
|
|
1094
|
-
condition: import("@driveflux/db
|
|
1094
|
+
condition: import("@driveflux/db").VehicleCondition | null;
|
|
1095
1095
|
} | null;
|
|
1096
1096
|
inspection: {
|
|
1097
1097
|
exterior: number | null;
|
|
@@ -1106,11 +1106,11 @@ export declare const transfromVehicleDisplayToVehicle: (displayVehicle: DisplayV
|
|
|
1106
1106
|
appliedCoupon: {
|
|
1107
1107
|
applicationName: string;
|
|
1108
1108
|
code: string;
|
|
1109
|
-
discountType: import("@driveflux/db
|
|
1109
|
+
discountType: import("@driveflux/db").DiscountType;
|
|
1110
1110
|
discountValue: number;
|
|
1111
1111
|
maxCycles: number | null;
|
|
1112
1112
|
texts: PrismaJson.StringMetadata | null;
|
|
1113
|
-
plans:
|
|
1113
|
+
plans: PlanType[];
|
|
1114
1114
|
redeemBefore: Date | null;
|
|
1115
1115
|
} | null;
|
|
1116
1116
|
} & {
|
|
@@ -1134,17 +1134,17 @@ export declare const transformBasicVehicleData: (dv: DisplayVehicle) => {
|
|
|
1134
1134
|
readonly vehicleModel: string;
|
|
1135
1135
|
readonly variant: string;
|
|
1136
1136
|
readonly year: number;
|
|
1137
|
-
readonly type:
|
|
1137
|
+
readonly type: VehicleType;
|
|
1138
1138
|
readonly niceName: `${string} ${string} ${string} ${number}`;
|
|
1139
1139
|
readonly niceNameShort: `${string} ${string}`;
|
|
1140
1140
|
readonly appliedCoupon: {
|
|
1141
1141
|
applicationName: string;
|
|
1142
1142
|
code: string;
|
|
1143
|
-
discountType: import("@driveflux/db
|
|
1143
|
+
discountType: import("@driveflux/db").DiscountType;
|
|
1144
1144
|
discountValue: number;
|
|
1145
1145
|
maxCycles: number | null;
|
|
1146
1146
|
texts: PrismaJson.StringMetadata | null;
|
|
1147
|
-
plans:
|
|
1147
|
+
plans: PlanType[];
|
|
1148
1148
|
redeemBefore: Date | null;
|
|
1149
1149
|
} | null;
|
|
1150
1150
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-vehicle.d.ts","sourceRoot":"","sources":["../../src/reservation/display-vehicle.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"display-vehicle.d.ts","sourceRoot":"","sources":["../../src/reservation/display-vehicle.ts"],"names":[],"mappings":"AACA,OAAO,EACN,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,QAAQ,EAGb,KAAK,SAAS,EACd,KAAK,OAAO,EAGZ,KAAK,WAAW,EAChB,MAAM,eAAe,CAAA;AAYtB,eAAO,MAAM,mBAAmB,GAC/B,gBAAgB,cAAc,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAKvC,CAAA;AAED,eAAO,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA0BE;QAAE,OAAO,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE;eACrD,CAAA;AAED,eAAO,MAAM,yBAAyB,GAAI,IAAI,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB3D,CAAA;AAED,eAAO,MAAM,eAAe,GAC3B,QAAQ,cAAc,CAAC,QAAQ,CAAC,KAC9B,OAAO,CAAC,QAAQ,CAMlB,CAAA"}
|
package/dist/slack.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare global {
|
|
|
6
6
|
*
|
|
7
7
|
* @deprecated Use slackLater instead and commitSlack to commit
|
|
8
8
|
*/
|
|
9
|
-
export declare const slack: (message: string, channel?: string | undefined) => Promise<import("@driveflux/fetch").EnhandedFetchResult<object, import("
|
|
9
|
+
export declare const slack: (message: string, channel?: string | undefined) => Promise<import("@driveflux/fetch").EnhandedFetchResult<object, import("../../../packages/problem/dist/index.js").Problem>>;
|
|
10
10
|
export declare const getSlackBlocks: (channel?: string) => Set<KnownBlock> | Map<string, Set<KnownBlock>> | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Naive implementation, however, for now (uncrowded serverless env), this works
|
|
@@ -14,6 +14,6 @@ export declare const getSlackBlocks: (channel?: string) => Set<KnownBlock> | Map
|
|
|
14
14
|
* @param channel
|
|
15
15
|
*/
|
|
16
16
|
export declare function slackLater(blocks: string | KnownBlock | KnownBlock[], channel?: string): void;
|
|
17
|
-
export declare function sendSlackMessages(channel: string, blocks: KnownBlock[]): Promise<import("@driveflux/fetch").EnhandedFetchResult<object, import("
|
|
17
|
+
export declare function sendSlackMessages(channel: string, blocks: KnownBlock[]): Promise<import("@driveflux/fetch").EnhandedFetchResult<object, import("../../../packages/problem/dist/index.js").Problem>>;
|
|
18
18
|
export declare const commitSlack: () => void;
|
|
19
19
|
//# sourceMappingURL=slack.d.ts.map
|
package/dist/slack.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../src/slack.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAI9C,OAAO,CAAC,MAAM,CAAC;IAEd,IAAI,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAA;CAC/C;AAOD;;;GAGG;AACH,eAAO,MAAM,KAAK,GACjB,SAAS,MAAM,EACf,4BAAuC,
|
|
1
|
+
{"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../src/slack.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAI9C,OAAO,CAAC,MAAM,CAAC;IAEd,IAAI,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAA;CAC/C;AAOD;;;GAGG;AACH,eAAO,MAAM,KAAK,GACjB,SAAS,MAAM,EACf,4BAAuC,+HAoBvC,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,+DACE,CAAA;AAEjD;;;;GAIG;AAEH,wBAAgB,UAAU,CACzB,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,EAAE,EAC1C,OAAO,CAAC,EAAE,MAAM,GACd,IAAI,CA4BN;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,8HAc5E;AAED,eAAO,MAAM,WAAW,YA0BvB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driveflux/api-functions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7-next.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./notion": {
|
|
@@ -73,22 +73,22 @@
|
|
|
73
73
|
],
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@casl/ability": "^6.7.3",
|
|
76
|
-
"@driveflux/auth": "
|
|
77
|
-
"@driveflux/billing": "7.0.0-develop.
|
|
78
|
-
"@driveflux/config": "2.0.
|
|
79
|
-
"@driveflux/coupon": "8.0.0-develop.
|
|
80
|
-
"@driveflux/db": "3.0.0-develop.
|
|
81
|
-
"@driveflux/email": "6.0.0-develop.
|
|
82
|
-
"@driveflux/email-templates": "0.0.2-develop.
|
|
83
|
-
"@driveflux/engine": "0.1.2-develop.
|
|
84
|
-
"@driveflux/fetch": "7.0.
|
|
76
|
+
"@driveflux/auth": "3.0.0-next.1",
|
|
77
|
+
"@driveflux/billing": "7.0.0-develop.26",
|
|
78
|
+
"@driveflux/config": "2.1.0-next.0",
|
|
79
|
+
"@driveflux/coupon": "8.0.0-develop.28",
|
|
80
|
+
"@driveflux/db": "3.0.0-develop.47",
|
|
81
|
+
"@driveflux/email": "6.0.0-develop.28",
|
|
82
|
+
"@driveflux/email-templates": "0.0.2-develop.29",
|
|
83
|
+
"@driveflux/engine": "0.1.2-develop.49",
|
|
84
|
+
"@driveflux/fetch": "7.0.3",
|
|
85
85
|
"@driveflux/format-money": "6.0.2",
|
|
86
|
-
"@driveflux/problem": "5.0.
|
|
87
|
-
"@driveflux/reporter": "6.0.
|
|
88
|
-
"@driveflux/result": "5.0.
|
|
89
|
-
"@driveflux/scheduler": "7.0.0-develop.
|
|
86
|
+
"@driveflux/problem": "5.0.3",
|
|
87
|
+
"@driveflux/reporter": "6.0.4-next.0",
|
|
88
|
+
"@driveflux/result": "5.0.3",
|
|
89
|
+
"@driveflux/scheduler": "7.0.0-develop.28",
|
|
90
90
|
"@driveflux/singleton": "2.0.2",
|
|
91
|
-
"@driveflux/subscription": "8.0.0-develop.
|
|
91
|
+
"@driveflux/subscription": "8.0.0-develop.21",
|
|
92
92
|
"@driveflux/time": "5.0.2",
|
|
93
93
|
"@driveflux/utils": "5.0.2",
|
|
94
94
|
"@notionhq/client": "^4.0.2",
|