@juhuu/sdk-ts 1.0.1 → 1.0.3
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/index.d.mts +269 -2
- package/dist/index.d.ts +269 -2
- package/dist/index.js +238 -3
- package/dist/index.mjs +228 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -7,6 +7,9 @@ type PushToken = {
|
|
7
7
|
platform: Platform;
|
8
8
|
token: string;
|
9
9
|
};
|
10
|
+
type ExtractType<T> = T extends {
|
11
|
+
type: infer U;
|
12
|
+
} ? U : never;
|
10
13
|
interface Offer {
|
11
14
|
tariffId: string;
|
12
15
|
licenseTemplateIdArray: string[];
|
@@ -43,12 +46,46 @@ type OfferTime = {
|
|
43
46
|
}[];
|
44
47
|
};
|
45
48
|
type FuelType = "battery" | "diesel" | "gasoline" | "hydrogen" | "fossil";
|
49
|
+
type Viewport = {
|
50
|
+
longitudeTopLeft: number;
|
51
|
+
latitudeTopLeft: number;
|
52
|
+
longitudeBottomRight: number;
|
53
|
+
latitudeBottomRight: number;
|
54
|
+
};
|
55
|
+
type ViewportPolygon = [
|
56
|
+
[
|
57
|
+
number,
|
58
|
+
number
|
59
|
+
],
|
60
|
+
[
|
61
|
+
number,
|
62
|
+
number
|
63
|
+
],
|
64
|
+
[
|
65
|
+
number,
|
66
|
+
number
|
67
|
+
],
|
68
|
+
[
|
69
|
+
number,
|
70
|
+
number
|
71
|
+
],
|
72
|
+
[
|
73
|
+
number,
|
74
|
+
number
|
75
|
+
]
|
76
|
+
];
|
46
77
|
declare const LanguageCodeArray: readonly ["en", "de", "fr", "nl", "it", "cs", "da", "es", "et", "gsw", "hr", "hu", "no", "pl", "sv"];
|
47
78
|
type LanguageCode = (typeof LanguageCodeArray)[number];
|
48
79
|
declare const CountryCodeArray: readonly ["DE", "AT", "CH", "LI", "IT", "FR", "NL", "BE", "LU", "DK", "SE", "NO", "FI", "IS", "GB", "IE", "ES", "PT", "GR", "PL", "CZ", "SK", "HU", "SI", "HR", "BA", "RS", "US", "CA"];
|
49
80
|
type CountryCode = (typeof CountryCodeArray)[number];
|
50
81
|
declare const CurrencyCodeArray: readonly ["eur", "usd", "gbp", "nok", "sek", "chf", "dkk", "pln", "czk", "huf", "hrk", "bam", "rsd", "isk", "cad"];
|
51
82
|
type CurrencyCode = (typeof CurrencyCodeArray)[number];
|
83
|
+
interface Settings {
|
84
|
+
general: GeneralSettings;
|
85
|
+
payouts: PayoutSettings;
|
86
|
+
sessions: SessionSettings;
|
87
|
+
environment: EnvironmentSettings;
|
88
|
+
}
|
52
89
|
interface ColorScheme {
|
53
90
|
light: Color;
|
54
91
|
dark: Color;
|
@@ -68,10 +105,45 @@ interface Color {
|
|
68
105
|
error: hexColor;
|
69
106
|
warning: hexColor;
|
70
107
|
}
|
108
|
+
interface GeneralSettings {
|
109
|
+
frontendVersion: number;
|
110
|
+
termsVersion: number;
|
111
|
+
globalKill: boolean;
|
112
|
+
maintenance: boolean;
|
113
|
+
maintenanceMessage: string;
|
114
|
+
}
|
115
|
+
interface PayoutSettings {
|
116
|
+
enabled: boolean;
|
117
|
+
}
|
118
|
+
interface SessionSettings {
|
119
|
+
enabled: boolean;
|
120
|
+
autoRenewEnabled: boolean;
|
121
|
+
}
|
122
|
+
interface EnvironmentSettings {
|
123
|
+
isDev: boolean;
|
124
|
+
}
|
71
125
|
type PaymentMethod = "card" | "stripe_account" | "klarna" | "bancontact" | "eps" | "giropay" | "ideal" | "p24" | "sofort" | "unknown";
|
72
126
|
type PaymentReason = "session";
|
127
|
+
type RefundReason = "requestdByUser";
|
128
|
+
type SessionStatus = "waitingForPayment" | "ready" | "completed";
|
73
129
|
type AutoRenewMode = "off" | "optIn" | "optOut" | "on";
|
130
|
+
type RefundStatus = "inTransitToUser" | "succeeded";
|
131
|
+
type SessionTerminatedByType = "user" | "cloudTask" | "cloudFunction" | "mqttCommand";
|
74
132
|
type ServiceMonth = "jan" | "feb" | "mar" | "apr" | "may" | "jun" | "jul" | "aug" | "sep" | "oct" | "nov" | "dec";
|
133
|
+
type PermissionTypes = "UserManagement" | "PropertyManagement" | "PayoutManagement" | "InvoiceManagement" | "TarifManagement" | "SessionManagement" | "PaymentManagement" | "LocationManagement" | "LinkManagement" | "TermsManagement" | "LicenseManagement";
|
134
|
+
interface CustomClaims {
|
135
|
+
UserManagement: boolean;
|
136
|
+
PropertyManagement: boolean;
|
137
|
+
PayoutManagement: boolean;
|
138
|
+
InvoiceManagement: boolean;
|
139
|
+
TarifManagement: boolean;
|
140
|
+
SessionManagement: boolean;
|
141
|
+
PaymentManagement: boolean;
|
142
|
+
LocationManagement: boolean;
|
143
|
+
LinkManagement: boolean;
|
144
|
+
LicenseManagement: boolean;
|
145
|
+
TermsManagement: boolean;
|
146
|
+
}
|
75
147
|
interface Address {
|
76
148
|
line1: string;
|
77
149
|
line2: string | null;
|
@@ -79,6 +151,10 @@ interface Address {
|
|
79
151
|
country: CountryCode;
|
80
152
|
city: string;
|
81
153
|
}
|
154
|
+
interface LicenseTariffIdMap {
|
155
|
+
tarifId: string;
|
156
|
+
licenseId: string;
|
157
|
+
}
|
82
158
|
interface PostingRow {
|
83
159
|
description: string;
|
84
160
|
quantity: number;
|
@@ -97,9 +173,11 @@ interface Party extends Person {
|
|
97
173
|
iban?: string;
|
98
174
|
bic?: string;
|
99
175
|
}
|
176
|
+
type VeloBrushDeviceDocumentUserManualStep = "prepareBike1" | "prepareBike2" | "chooseCycleType" | "openDoors1" | "extendBikeDrawer1" | "unfoldRamp1" | "placeBike1" | "fixBike1" | "fixBike2" | "retractBikeDrawer1" | "closeDoors1" | "selectWashProgram" | "waitForWashProgram" | "openDoors2" | "extendBikeDrawer2" | "dryBike1" | "dryBike2" | "releaseBike" | "unloadBike" | "retractBikeDrawer2" | "closeDoors2" | "lockDoors" | "error" | "emergencyStop" | "waitingForSession";
|
100
177
|
type PaymentStatus = "waitingForConfirmation" | "waitingForAmountFinalization" | "waitingForCapture" | "waitingForTransitConfirmation" | "inTransitToProvider" | "captured" | "inTransitToProperty" | "payedOut";
|
101
178
|
type PaymentServiceProvider = "stripe";
|
102
179
|
type PayoutStatus = "awaitingApproval" | "inTransitToProperty" | "payedOut";
|
180
|
+
type BusinessType = "individual" | "company" | "non_profit" | "government_entity";
|
103
181
|
declare const ReadonlySectorArray: readonly ["tourism", "mobility", "sport"];
|
104
182
|
type Sector = (typeof ReadonlySectorArray)[number];
|
105
183
|
declare const ReadonlyCategoryArray: readonly ["bike", "car", "scooter", "boat", "moped"];
|
@@ -111,13 +189,32 @@ type Purpose = {
|
|
111
189
|
category: Category;
|
112
190
|
modality: Modality;
|
113
191
|
};
|
192
|
+
declare const ReadonlyIntegrationStateArray: readonly ["full", "partial"];
|
193
|
+
type IntegrationState = (typeof ReadonlyIntegrationStateArray)[number];
|
114
194
|
type GeoPoint = {
|
115
195
|
type: "Point";
|
116
196
|
coordinates: [number, number];
|
117
197
|
};
|
198
|
+
type PlatformUrl = {
|
199
|
+
ios: string;
|
200
|
+
android: string;
|
201
|
+
web: string;
|
202
|
+
};
|
203
|
+
interface MapFilter {
|
204
|
+
integrationStateArray: IntegrationState[];
|
205
|
+
categoryArray: Category[];
|
206
|
+
modalityArray: Modality[];
|
207
|
+
sectorArray: Sector[];
|
208
|
+
}
|
209
|
+
type SessionType = "rent" | "reservation";
|
210
|
+
type DeviceType = "BikeBox" | "VeloCleanPro" | "SlidingDoor" | "BikeRack" | "BikeEnergy" | "BikeLoop" | "VeloBrush" | "SharingBike" | "Trb145BikeBox";
|
211
|
+
type LinkType = "standard" | "group" | "url";
|
212
|
+
type UserType = "management" | "standard";
|
213
|
+
type TarifType = "reservation" | "payNow" | "payLater";
|
118
214
|
type DeepNullable<T> = {
|
119
215
|
[K in keyof T]: DeepNullable<T[K]> | null;
|
120
216
|
};
|
217
|
+
type SessionCannotTerminateReason = "retractBikeDrawer" | "closeDoor";
|
121
218
|
type Circumstance = {
|
122
219
|
type: "wheelchairAccessible";
|
123
220
|
isWheelchairAccessible: boolean;
|
@@ -267,6 +364,98 @@ declare namespace Layout {
|
|
267
364
|
export { };
|
268
365
|
}
|
269
366
|
type LayoutBlock = Layout.Text.Plain | Layout.Text.Heading | Layout.Text.Subtitle | Layout.Image | Layout.Button.Small | Layout.Button.Large | Layout.Form.General;
|
367
|
+
type Node$1 = {
|
368
|
+
id: string;
|
369
|
+
type: "flow.start";
|
370
|
+
trigger: "session.terminate";
|
371
|
+
nodeIdArray: string[];
|
372
|
+
} | {
|
373
|
+
id: string;
|
374
|
+
type: "flow.start";
|
375
|
+
trigger: "command.executed";
|
376
|
+
commandName: string;
|
377
|
+
nodeIdArray: string[];
|
378
|
+
} | {
|
379
|
+
id: string;
|
380
|
+
type: "flow.start";
|
381
|
+
trigger: "button.pressed";
|
382
|
+
buttonName: string;
|
383
|
+
nodeIdArray: string[];
|
384
|
+
} | {
|
385
|
+
id: string;
|
386
|
+
type: "flow.start";
|
387
|
+
trigger: "session.create";
|
388
|
+
nodeIdArray: string[];
|
389
|
+
} | {
|
390
|
+
id: string;
|
391
|
+
type: "flow.start";
|
392
|
+
trigger: "device.startUse";
|
393
|
+
nodeIdArray: string[];
|
394
|
+
} | {
|
395
|
+
id: string;
|
396
|
+
type: "flow.start";
|
397
|
+
trigger: "device.endUse";
|
398
|
+
nodeIdArray: string[];
|
399
|
+
} | {
|
400
|
+
id: string;
|
401
|
+
type: "open.browser";
|
402
|
+
nodeIdArray: string[];
|
403
|
+
url: PlatformUrl;
|
404
|
+
} | {
|
405
|
+
id: string;
|
406
|
+
type: "open.phone";
|
407
|
+
nodeIdArray: string[];
|
408
|
+
phone: string;
|
409
|
+
} | {
|
410
|
+
id: string;
|
411
|
+
type: "device.message";
|
412
|
+
nodeIdArray: string[];
|
413
|
+
message: string;
|
414
|
+
} | {
|
415
|
+
id: string;
|
416
|
+
type: "property.notify";
|
417
|
+
nodeIdArray: string[];
|
418
|
+
subject: string;
|
419
|
+
message: string;
|
420
|
+
} | {
|
421
|
+
id: string;
|
422
|
+
type: "user.notify";
|
423
|
+
nodeIdArray: string[];
|
424
|
+
subject: string;
|
425
|
+
message: string;
|
426
|
+
} | {
|
427
|
+
id: string;
|
428
|
+
type: "parameter.set";
|
429
|
+
nodeIdArray: string[];
|
430
|
+
parameterName: string;
|
431
|
+
value: number | string | boolean;
|
432
|
+
} | {
|
433
|
+
id: string;
|
434
|
+
type: "command.execute";
|
435
|
+
nodeIdArray: string[];
|
436
|
+
commandName: string;
|
437
|
+
} | {
|
438
|
+
id: string;
|
439
|
+
type: "flow.exception";
|
440
|
+
error: LocaleString;
|
441
|
+
} | {
|
442
|
+
id: string;
|
443
|
+
type: "flow.if";
|
444
|
+
condition: Condition;
|
445
|
+
trueNodeIdArray: string[];
|
446
|
+
falseNodeIdArray: string[];
|
447
|
+
} | {
|
448
|
+
id: string;
|
449
|
+
type: "flow.end";
|
450
|
+
};
|
451
|
+
declare enum ConditionType {
|
452
|
+
Equal = "==",
|
453
|
+
NotEqual = "!=",
|
454
|
+
LessThan = "<",
|
455
|
+
GreaterThan = ">",
|
456
|
+
LessThanOrEqual = "<=",
|
457
|
+
GreaterThanOrEqual = ">="
|
458
|
+
}
|
270
459
|
type Utilization = {
|
271
460
|
type: "percentage";
|
272
461
|
percentage: number;
|
@@ -460,6 +649,12 @@ declare class TariffsService extends Service {
|
|
460
649
|
calculateMaximumAmount(tariff: JUHUU.Tariff.Object): number;
|
461
650
|
}
|
462
651
|
|
652
|
+
declare class ProductService extends Service {
|
653
|
+
constructor(config: JUHUU.SetupConfig);
|
654
|
+
list(ProductListParams: JUHUU.Product.List.Params, ProductListOptions?: JUHUU.Product.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Product.List.Response>>;
|
655
|
+
retrieve(params: JUHUU.Product.Retrieve.Params, options?: JUHUU.Product.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Product.Retrieve.Response>>;
|
656
|
+
}
|
657
|
+
|
463
658
|
declare class Juhuu {
|
464
659
|
constructor(config: JUHUU.SetupConfig);
|
465
660
|
/**
|
@@ -476,6 +671,7 @@ declare class Juhuu {
|
|
476
671
|
readonly locations: LocationsService;
|
477
672
|
readonly terms: TermsService;
|
478
673
|
readonly tariffs: TariffsService;
|
674
|
+
readonly products: ProductService;
|
479
675
|
}
|
480
676
|
declare namespace JUHUU {
|
481
677
|
interface SetupConfig {
|
@@ -506,7 +702,22 @@ declare namespace JUHUU {
|
|
506
702
|
* If this is true, a new accessToken will be requested if the current one is expired.
|
507
703
|
*/
|
508
704
|
refreshTokensIfNecessary?: boolean;
|
705
|
+
expand?: Array<"property" | "tariffArray">;
|
706
|
+
};
|
707
|
+
type LocaleString = {
|
708
|
+
[locale: string]: string;
|
509
709
|
};
|
710
|
+
type DeepNullable<T> = {
|
711
|
+
[P in keyof T]?: DeepNullable<T[P]> | null;
|
712
|
+
};
|
713
|
+
enum Purpose {
|
714
|
+
Purpose1 = "Purpose 1",
|
715
|
+
Purpose2 = "Purpose 2"
|
716
|
+
}
|
717
|
+
enum Technology {
|
718
|
+
Tech1 = "Technology 1",
|
719
|
+
Tech2 = "Technology 2"
|
720
|
+
}
|
510
721
|
namespace Session {
|
511
722
|
type Base = {
|
512
723
|
id: string;
|
@@ -556,7 +767,6 @@ declare namespace JUHUU {
|
|
556
767
|
autoRenew: boolean;
|
557
768
|
sessionType: Object["type"];
|
558
769
|
isOffSession: boolean;
|
559
|
-
idempotencyKey: string;
|
560
770
|
userId: string;
|
561
771
|
};
|
562
772
|
type Options = JUHUU.RequestOptions;
|
@@ -1106,6 +1316,63 @@ declare namespace JUHUU {
|
|
1106
1316
|
}
|
1107
1317
|
export { };
|
1108
1318
|
}
|
1319
|
+
namespace Product {
|
1320
|
+
type Base = {
|
1321
|
+
id: string;
|
1322
|
+
readonly object: "product";
|
1323
|
+
name: string;
|
1324
|
+
propertyId: string;
|
1325
|
+
version: number;
|
1326
|
+
previewText: JUHUU.LocaleString;
|
1327
|
+
description: JUHUU.LocaleString;
|
1328
|
+
bannerImageDark: string[];
|
1329
|
+
bannerImageLight: string[];
|
1330
|
+
model3d: string | null;
|
1331
|
+
datasheet: JUHUU.DeepNullable<JUHUU.LocaleString>;
|
1332
|
+
highlightArray: JUHUU.LocaleString[];
|
1333
|
+
purposeArray: JUHUU.Purpose[];
|
1334
|
+
technologyArray: JUHUU.Technology[];
|
1335
|
+
invalidAt: Date;
|
1336
|
+
source: "fluctuo" | null;
|
1337
|
+
};
|
1338
|
+
interface PhysicalProduct extends Base {
|
1339
|
+
type: "physicalProduct";
|
1340
|
+
weight: number;
|
1341
|
+
dimensions: {
|
1342
|
+
length: number;
|
1343
|
+
width: number;
|
1344
|
+
height: number;
|
1345
|
+
};
|
1346
|
+
material: string;
|
1347
|
+
color: string;
|
1348
|
+
}
|
1349
|
+
interface DigitalProduct extends Base {
|
1350
|
+
type: "digitalProduct";
|
1351
|
+
fileSize: number;
|
1352
|
+
downloadUrl: string;
|
1353
|
+
}
|
1354
|
+
type Object = PhysicalProduct | DigitalProduct;
|
1355
|
+
namespace Retrieve {
|
1356
|
+
type Params = {
|
1357
|
+
productId: string;
|
1358
|
+
};
|
1359
|
+
type Options = JUHUU.RequestOptions;
|
1360
|
+
type Response = {
|
1361
|
+
product: Product.Object;
|
1362
|
+
};
|
1363
|
+
}
|
1364
|
+
namespace List {
|
1365
|
+
type Params = {
|
1366
|
+
propertyId?: string;
|
1367
|
+
categoryArray?: Category[];
|
1368
|
+
modalityArray?: Modality[];
|
1369
|
+
sectorArray?: Sector[];
|
1370
|
+
technologyArray?: Technology[];
|
1371
|
+
};
|
1372
|
+
type Options = JUHUU.RequestOptions;
|
1373
|
+
type Response = Product.Object[];
|
1374
|
+
}
|
1375
|
+
}
|
1109
1376
|
namespace Link {
|
1110
1377
|
type Base = {
|
1111
1378
|
id: string;
|
@@ -1303,4 +1570,4 @@ declare namespace JUHUU {
|
|
1303
1570
|
}
|
1304
1571
|
}
|
1305
1572
|
|
1306
|
-
export { JUHUU, Juhuu };
|
1573
|
+
export { type Address, type AutoRenewMode, type BusinessType, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type FuelType, type GeneralSettings, type GeoPoint, type IntegrationState, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Node$1 as Node, type Offer, type OfferTime, type Parameter, type Party, type PaymentMethod, type PaymentReason, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformUrl, type PostingRow, Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyIntegrationStateArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundReason, type RefundStatus, type Sector, type ServiceMonth, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, type Settings, type StarRating, type TarifType, type TimeZone, type Unit, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type hexColor };
|
package/dist/index.d.ts
CHANGED
@@ -7,6 +7,9 @@ type PushToken = {
|
|
7
7
|
platform: Platform;
|
8
8
|
token: string;
|
9
9
|
};
|
10
|
+
type ExtractType<T> = T extends {
|
11
|
+
type: infer U;
|
12
|
+
} ? U : never;
|
10
13
|
interface Offer {
|
11
14
|
tariffId: string;
|
12
15
|
licenseTemplateIdArray: string[];
|
@@ -43,12 +46,46 @@ type OfferTime = {
|
|
43
46
|
}[];
|
44
47
|
};
|
45
48
|
type FuelType = "battery" | "diesel" | "gasoline" | "hydrogen" | "fossil";
|
49
|
+
type Viewport = {
|
50
|
+
longitudeTopLeft: number;
|
51
|
+
latitudeTopLeft: number;
|
52
|
+
longitudeBottomRight: number;
|
53
|
+
latitudeBottomRight: number;
|
54
|
+
};
|
55
|
+
type ViewportPolygon = [
|
56
|
+
[
|
57
|
+
number,
|
58
|
+
number
|
59
|
+
],
|
60
|
+
[
|
61
|
+
number,
|
62
|
+
number
|
63
|
+
],
|
64
|
+
[
|
65
|
+
number,
|
66
|
+
number
|
67
|
+
],
|
68
|
+
[
|
69
|
+
number,
|
70
|
+
number
|
71
|
+
],
|
72
|
+
[
|
73
|
+
number,
|
74
|
+
number
|
75
|
+
]
|
76
|
+
];
|
46
77
|
declare const LanguageCodeArray: readonly ["en", "de", "fr", "nl", "it", "cs", "da", "es", "et", "gsw", "hr", "hu", "no", "pl", "sv"];
|
47
78
|
type LanguageCode = (typeof LanguageCodeArray)[number];
|
48
79
|
declare const CountryCodeArray: readonly ["DE", "AT", "CH", "LI", "IT", "FR", "NL", "BE", "LU", "DK", "SE", "NO", "FI", "IS", "GB", "IE", "ES", "PT", "GR", "PL", "CZ", "SK", "HU", "SI", "HR", "BA", "RS", "US", "CA"];
|
49
80
|
type CountryCode = (typeof CountryCodeArray)[number];
|
50
81
|
declare const CurrencyCodeArray: readonly ["eur", "usd", "gbp", "nok", "sek", "chf", "dkk", "pln", "czk", "huf", "hrk", "bam", "rsd", "isk", "cad"];
|
51
82
|
type CurrencyCode = (typeof CurrencyCodeArray)[number];
|
83
|
+
interface Settings {
|
84
|
+
general: GeneralSettings;
|
85
|
+
payouts: PayoutSettings;
|
86
|
+
sessions: SessionSettings;
|
87
|
+
environment: EnvironmentSettings;
|
88
|
+
}
|
52
89
|
interface ColorScheme {
|
53
90
|
light: Color;
|
54
91
|
dark: Color;
|
@@ -68,10 +105,45 @@ interface Color {
|
|
68
105
|
error: hexColor;
|
69
106
|
warning: hexColor;
|
70
107
|
}
|
108
|
+
interface GeneralSettings {
|
109
|
+
frontendVersion: number;
|
110
|
+
termsVersion: number;
|
111
|
+
globalKill: boolean;
|
112
|
+
maintenance: boolean;
|
113
|
+
maintenanceMessage: string;
|
114
|
+
}
|
115
|
+
interface PayoutSettings {
|
116
|
+
enabled: boolean;
|
117
|
+
}
|
118
|
+
interface SessionSettings {
|
119
|
+
enabled: boolean;
|
120
|
+
autoRenewEnabled: boolean;
|
121
|
+
}
|
122
|
+
interface EnvironmentSettings {
|
123
|
+
isDev: boolean;
|
124
|
+
}
|
71
125
|
type PaymentMethod = "card" | "stripe_account" | "klarna" | "bancontact" | "eps" | "giropay" | "ideal" | "p24" | "sofort" | "unknown";
|
72
126
|
type PaymentReason = "session";
|
127
|
+
type RefundReason = "requestdByUser";
|
128
|
+
type SessionStatus = "waitingForPayment" | "ready" | "completed";
|
73
129
|
type AutoRenewMode = "off" | "optIn" | "optOut" | "on";
|
130
|
+
type RefundStatus = "inTransitToUser" | "succeeded";
|
131
|
+
type SessionTerminatedByType = "user" | "cloudTask" | "cloudFunction" | "mqttCommand";
|
74
132
|
type ServiceMonth = "jan" | "feb" | "mar" | "apr" | "may" | "jun" | "jul" | "aug" | "sep" | "oct" | "nov" | "dec";
|
133
|
+
type PermissionTypes = "UserManagement" | "PropertyManagement" | "PayoutManagement" | "InvoiceManagement" | "TarifManagement" | "SessionManagement" | "PaymentManagement" | "LocationManagement" | "LinkManagement" | "TermsManagement" | "LicenseManagement";
|
134
|
+
interface CustomClaims {
|
135
|
+
UserManagement: boolean;
|
136
|
+
PropertyManagement: boolean;
|
137
|
+
PayoutManagement: boolean;
|
138
|
+
InvoiceManagement: boolean;
|
139
|
+
TarifManagement: boolean;
|
140
|
+
SessionManagement: boolean;
|
141
|
+
PaymentManagement: boolean;
|
142
|
+
LocationManagement: boolean;
|
143
|
+
LinkManagement: boolean;
|
144
|
+
LicenseManagement: boolean;
|
145
|
+
TermsManagement: boolean;
|
146
|
+
}
|
75
147
|
interface Address {
|
76
148
|
line1: string;
|
77
149
|
line2: string | null;
|
@@ -79,6 +151,10 @@ interface Address {
|
|
79
151
|
country: CountryCode;
|
80
152
|
city: string;
|
81
153
|
}
|
154
|
+
interface LicenseTariffIdMap {
|
155
|
+
tarifId: string;
|
156
|
+
licenseId: string;
|
157
|
+
}
|
82
158
|
interface PostingRow {
|
83
159
|
description: string;
|
84
160
|
quantity: number;
|
@@ -97,9 +173,11 @@ interface Party extends Person {
|
|
97
173
|
iban?: string;
|
98
174
|
bic?: string;
|
99
175
|
}
|
176
|
+
type VeloBrushDeviceDocumentUserManualStep = "prepareBike1" | "prepareBike2" | "chooseCycleType" | "openDoors1" | "extendBikeDrawer1" | "unfoldRamp1" | "placeBike1" | "fixBike1" | "fixBike2" | "retractBikeDrawer1" | "closeDoors1" | "selectWashProgram" | "waitForWashProgram" | "openDoors2" | "extendBikeDrawer2" | "dryBike1" | "dryBike2" | "releaseBike" | "unloadBike" | "retractBikeDrawer2" | "closeDoors2" | "lockDoors" | "error" | "emergencyStop" | "waitingForSession";
|
100
177
|
type PaymentStatus = "waitingForConfirmation" | "waitingForAmountFinalization" | "waitingForCapture" | "waitingForTransitConfirmation" | "inTransitToProvider" | "captured" | "inTransitToProperty" | "payedOut";
|
101
178
|
type PaymentServiceProvider = "stripe";
|
102
179
|
type PayoutStatus = "awaitingApproval" | "inTransitToProperty" | "payedOut";
|
180
|
+
type BusinessType = "individual" | "company" | "non_profit" | "government_entity";
|
103
181
|
declare const ReadonlySectorArray: readonly ["tourism", "mobility", "sport"];
|
104
182
|
type Sector = (typeof ReadonlySectorArray)[number];
|
105
183
|
declare const ReadonlyCategoryArray: readonly ["bike", "car", "scooter", "boat", "moped"];
|
@@ -111,13 +189,32 @@ type Purpose = {
|
|
111
189
|
category: Category;
|
112
190
|
modality: Modality;
|
113
191
|
};
|
192
|
+
declare const ReadonlyIntegrationStateArray: readonly ["full", "partial"];
|
193
|
+
type IntegrationState = (typeof ReadonlyIntegrationStateArray)[number];
|
114
194
|
type GeoPoint = {
|
115
195
|
type: "Point";
|
116
196
|
coordinates: [number, number];
|
117
197
|
};
|
198
|
+
type PlatformUrl = {
|
199
|
+
ios: string;
|
200
|
+
android: string;
|
201
|
+
web: string;
|
202
|
+
};
|
203
|
+
interface MapFilter {
|
204
|
+
integrationStateArray: IntegrationState[];
|
205
|
+
categoryArray: Category[];
|
206
|
+
modalityArray: Modality[];
|
207
|
+
sectorArray: Sector[];
|
208
|
+
}
|
209
|
+
type SessionType = "rent" | "reservation";
|
210
|
+
type DeviceType = "BikeBox" | "VeloCleanPro" | "SlidingDoor" | "BikeRack" | "BikeEnergy" | "BikeLoop" | "VeloBrush" | "SharingBike" | "Trb145BikeBox";
|
211
|
+
type LinkType = "standard" | "group" | "url";
|
212
|
+
type UserType = "management" | "standard";
|
213
|
+
type TarifType = "reservation" | "payNow" | "payLater";
|
118
214
|
type DeepNullable<T> = {
|
119
215
|
[K in keyof T]: DeepNullable<T[K]> | null;
|
120
216
|
};
|
217
|
+
type SessionCannotTerminateReason = "retractBikeDrawer" | "closeDoor";
|
121
218
|
type Circumstance = {
|
122
219
|
type: "wheelchairAccessible";
|
123
220
|
isWheelchairAccessible: boolean;
|
@@ -267,6 +364,98 @@ declare namespace Layout {
|
|
267
364
|
export { };
|
268
365
|
}
|
269
366
|
type LayoutBlock = Layout.Text.Plain | Layout.Text.Heading | Layout.Text.Subtitle | Layout.Image | Layout.Button.Small | Layout.Button.Large | Layout.Form.General;
|
367
|
+
type Node$1 = {
|
368
|
+
id: string;
|
369
|
+
type: "flow.start";
|
370
|
+
trigger: "session.terminate";
|
371
|
+
nodeIdArray: string[];
|
372
|
+
} | {
|
373
|
+
id: string;
|
374
|
+
type: "flow.start";
|
375
|
+
trigger: "command.executed";
|
376
|
+
commandName: string;
|
377
|
+
nodeIdArray: string[];
|
378
|
+
} | {
|
379
|
+
id: string;
|
380
|
+
type: "flow.start";
|
381
|
+
trigger: "button.pressed";
|
382
|
+
buttonName: string;
|
383
|
+
nodeIdArray: string[];
|
384
|
+
} | {
|
385
|
+
id: string;
|
386
|
+
type: "flow.start";
|
387
|
+
trigger: "session.create";
|
388
|
+
nodeIdArray: string[];
|
389
|
+
} | {
|
390
|
+
id: string;
|
391
|
+
type: "flow.start";
|
392
|
+
trigger: "device.startUse";
|
393
|
+
nodeIdArray: string[];
|
394
|
+
} | {
|
395
|
+
id: string;
|
396
|
+
type: "flow.start";
|
397
|
+
trigger: "device.endUse";
|
398
|
+
nodeIdArray: string[];
|
399
|
+
} | {
|
400
|
+
id: string;
|
401
|
+
type: "open.browser";
|
402
|
+
nodeIdArray: string[];
|
403
|
+
url: PlatformUrl;
|
404
|
+
} | {
|
405
|
+
id: string;
|
406
|
+
type: "open.phone";
|
407
|
+
nodeIdArray: string[];
|
408
|
+
phone: string;
|
409
|
+
} | {
|
410
|
+
id: string;
|
411
|
+
type: "device.message";
|
412
|
+
nodeIdArray: string[];
|
413
|
+
message: string;
|
414
|
+
} | {
|
415
|
+
id: string;
|
416
|
+
type: "property.notify";
|
417
|
+
nodeIdArray: string[];
|
418
|
+
subject: string;
|
419
|
+
message: string;
|
420
|
+
} | {
|
421
|
+
id: string;
|
422
|
+
type: "user.notify";
|
423
|
+
nodeIdArray: string[];
|
424
|
+
subject: string;
|
425
|
+
message: string;
|
426
|
+
} | {
|
427
|
+
id: string;
|
428
|
+
type: "parameter.set";
|
429
|
+
nodeIdArray: string[];
|
430
|
+
parameterName: string;
|
431
|
+
value: number | string | boolean;
|
432
|
+
} | {
|
433
|
+
id: string;
|
434
|
+
type: "command.execute";
|
435
|
+
nodeIdArray: string[];
|
436
|
+
commandName: string;
|
437
|
+
} | {
|
438
|
+
id: string;
|
439
|
+
type: "flow.exception";
|
440
|
+
error: LocaleString;
|
441
|
+
} | {
|
442
|
+
id: string;
|
443
|
+
type: "flow.if";
|
444
|
+
condition: Condition;
|
445
|
+
trueNodeIdArray: string[];
|
446
|
+
falseNodeIdArray: string[];
|
447
|
+
} | {
|
448
|
+
id: string;
|
449
|
+
type: "flow.end";
|
450
|
+
};
|
451
|
+
declare enum ConditionType {
|
452
|
+
Equal = "==",
|
453
|
+
NotEqual = "!=",
|
454
|
+
LessThan = "<",
|
455
|
+
GreaterThan = ">",
|
456
|
+
LessThanOrEqual = "<=",
|
457
|
+
GreaterThanOrEqual = ">="
|
458
|
+
}
|
270
459
|
type Utilization = {
|
271
460
|
type: "percentage";
|
272
461
|
percentage: number;
|
@@ -460,6 +649,12 @@ declare class TariffsService extends Service {
|
|
460
649
|
calculateMaximumAmount(tariff: JUHUU.Tariff.Object): number;
|
461
650
|
}
|
462
651
|
|
652
|
+
declare class ProductService extends Service {
|
653
|
+
constructor(config: JUHUU.SetupConfig);
|
654
|
+
list(ProductListParams: JUHUU.Product.List.Params, ProductListOptions?: JUHUU.Product.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Product.List.Response>>;
|
655
|
+
retrieve(params: JUHUU.Product.Retrieve.Params, options?: JUHUU.Product.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Product.Retrieve.Response>>;
|
656
|
+
}
|
657
|
+
|
463
658
|
declare class Juhuu {
|
464
659
|
constructor(config: JUHUU.SetupConfig);
|
465
660
|
/**
|
@@ -476,6 +671,7 @@ declare class Juhuu {
|
|
476
671
|
readonly locations: LocationsService;
|
477
672
|
readonly terms: TermsService;
|
478
673
|
readonly tariffs: TariffsService;
|
674
|
+
readonly products: ProductService;
|
479
675
|
}
|
480
676
|
declare namespace JUHUU {
|
481
677
|
interface SetupConfig {
|
@@ -506,7 +702,22 @@ declare namespace JUHUU {
|
|
506
702
|
* If this is true, a new accessToken will be requested if the current one is expired.
|
507
703
|
*/
|
508
704
|
refreshTokensIfNecessary?: boolean;
|
705
|
+
expand?: Array<"property" | "tariffArray">;
|
706
|
+
};
|
707
|
+
type LocaleString = {
|
708
|
+
[locale: string]: string;
|
509
709
|
};
|
710
|
+
type DeepNullable<T> = {
|
711
|
+
[P in keyof T]?: DeepNullable<T[P]> | null;
|
712
|
+
};
|
713
|
+
enum Purpose {
|
714
|
+
Purpose1 = "Purpose 1",
|
715
|
+
Purpose2 = "Purpose 2"
|
716
|
+
}
|
717
|
+
enum Technology {
|
718
|
+
Tech1 = "Technology 1",
|
719
|
+
Tech2 = "Technology 2"
|
720
|
+
}
|
510
721
|
namespace Session {
|
511
722
|
type Base = {
|
512
723
|
id: string;
|
@@ -556,7 +767,6 @@ declare namespace JUHUU {
|
|
556
767
|
autoRenew: boolean;
|
557
768
|
sessionType: Object["type"];
|
558
769
|
isOffSession: boolean;
|
559
|
-
idempotencyKey: string;
|
560
770
|
userId: string;
|
561
771
|
};
|
562
772
|
type Options = JUHUU.RequestOptions;
|
@@ -1106,6 +1316,63 @@ declare namespace JUHUU {
|
|
1106
1316
|
}
|
1107
1317
|
export { };
|
1108
1318
|
}
|
1319
|
+
namespace Product {
|
1320
|
+
type Base = {
|
1321
|
+
id: string;
|
1322
|
+
readonly object: "product";
|
1323
|
+
name: string;
|
1324
|
+
propertyId: string;
|
1325
|
+
version: number;
|
1326
|
+
previewText: JUHUU.LocaleString;
|
1327
|
+
description: JUHUU.LocaleString;
|
1328
|
+
bannerImageDark: string[];
|
1329
|
+
bannerImageLight: string[];
|
1330
|
+
model3d: string | null;
|
1331
|
+
datasheet: JUHUU.DeepNullable<JUHUU.LocaleString>;
|
1332
|
+
highlightArray: JUHUU.LocaleString[];
|
1333
|
+
purposeArray: JUHUU.Purpose[];
|
1334
|
+
technologyArray: JUHUU.Technology[];
|
1335
|
+
invalidAt: Date;
|
1336
|
+
source: "fluctuo" | null;
|
1337
|
+
};
|
1338
|
+
interface PhysicalProduct extends Base {
|
1339
|
+
type: "physicalProduct";
|
1340
|
+
weight: number;
|
1341
|
+
dimensions: {
|
1342
|
+
length: number;
|
1343
|
+
width: number;
|
1344
|
+
height: number;
|
1345
|
+
};
|
1346
|
+
material: string;
|
1347
|
+
color: string;
|
1348
|
+
}
|
1349
|
+
interface DigitalProduct extends Base {
|
1350
|
+
type: "digitalProduct";
|
1351
|
+
fileSize: number;
|
1352
|
+
downloadUrl: string;
|
1353
|
+
}
|
1354
|
+
type Object = PhysicalProduct | DigitalProduct;
|
1355
|
+
namespace Retrieve {
|
1356
|
+
type Params = {
|
1357
|
+
productId: string;
|
1358
|
+
};
|
1359
|
+
type Options = JUHUU.RequestOptions;
|
1360
|
+
type Response = {
|
1361
|
+
product: Product.Object;
|
1362
|
+
};
|
1363
|
+
}
|
1364
|
+
namespace List {
|
1365
|
+
type Params = {
|
1366
|
+
propertyId?: string;
|
1367
|
+
categoryArray?: Category[];
|
1368
|
+
modalityArray?: Modality[];
|
1369
|
+
sectorArray?: Sector[];
|
1370
|
+
technologyArray?: Technology[];
|
1371
|
+
};
|
1372
|
+
type Options = JUHUU.RequestOptions;
|
1373
|
+
type Response = Product.Object[];
|
1374
|
+
}
|
1375
|
+
}
|
1109
1376
|
namespace Link {
|
1110
1377
|
type Base = {
|
1111
1378
|
id: string;
|
@@ -1303,4 +1570,4 @@ declare namespace JUHUU {
|
|
1303
1570
|
}
|
1304
1571
|
}
|
1305
1572
|
|
1306
|
-
export { JUHUU, Juhuu };
|
1573
|
+
export { type Address, type AutoRenewMode, type BusinessType, type Category, type Circumstance, type Color, type ColorScheme, type Command, type Condition, ConditionType, type CountryCode, CountryCodeArray, type CurrencyCode, CurrencyCodeArray, type CustomClaims, type DeepNullable, type DeviceStatus, type DeviceType, type Environment, type EnvironmentSettings, type ExtractType, type FuelType, type GeneralSettings, type GeoPoint, type IntegrationState, JUHUU, Juhuu, type LanguageCode, LanguageCodeArray, Layout, type LayoutBlock, type LicenseTariffIdMap, type LinkType, type LocaleString, type MapFilter, type Modality, type Node$1 as Node, type Offer, type OfferTime, type Parameter, type Party, type PaymentMethod, type PaymentReason, type PaymentServiceProvider, type PaymentStatus, type PayoutSettings, type PayoutStatus, type PermissionTypes, type Person, type Platform, type PlatformUrl, type PostingRow, Purpose, type PushToken, ReadonlyCategoryArray, ReadonlyIntegrationStateArray, ReadonlyModalityArray, ReadonlySectorArray, type RefundReason, type RefundStatus, type Sector, type ServiceMonth, type SessionCannotTerminateReason, type SessionSettings, type SessionStatus, type SessionTerminatedByType, type SessionType, type Settings, type StarRating, type TarifType, type TimeZone, type Unit, type UserType, type Utilization, type VeloBrushDeviceDocumentUserManualStep, type Viewport, type ViewportPolygon, type hexColor };
|
package/dist/index.js
CHANGED
@@ -30,7 +30,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
30
30
|
// src/index.ts
|
31
31
|
var src_exports = {};
|
32
32
|
__export(src_exports, {
|
33
|
-
|
33
|
+
ConditionType: () => ConditionType,
|
34
|
+
CountryCodeArray: () => CountryCodeArray,
|
35
|
+
CurrencyCodeArray: () => CurrencyCodeArray,
|
36
|
+
JUHUU: () => JUHUU,
|
37
|
+
Juhuu: () => Juhuu,
|
38
|
+
LanguageCodeArray: () => LanguageCodeArray,
|
39
|
+
ReadonlyCategoryArray: () => ReadonlyCategoryArray,
|
40
|
+
ReadonlyIntegrationStateArray: () => ReadonlyIntegrationStateArray,
|
41
|
+
ReadonlyModalityArray: () => ReadonlyModalityArray,
|
42
|
+
ReadonlySectorArray: () => ReadonlySectorArray
|
34
43
|
});
|
35
44
|
module.exports = __toCommonJS(src_exports);
|
36
45
|
|
@@ -257,7 +266,6 @@ var SessionService = class extends Service {
|
|
257
266
|
autoRenew: SessionCreateParams.autoRenew,
|
258
267
|
type: SessionCreateParams.sessionType,
|
259
268
|
isOffSession: SessionCreateParams.isOffSession,
|
260
|
-
idempotencyKey: SessionCreateParams.idempotencyKey,
|
261
269
|
userId: SessionCreateParams.userId
|
262
270
|
},
|
263
271
|
useAuthentication: true
|
@@ -990,6 +998,209 @@ var TariffsService = class extends Service {
|
|
990
998
|
}
|
991
999
|
};
|
992
1000
|
|
1001
|
+
// src/products/products.service.ts
|
1002
|
+
var ProductService = class extends Service {
|
1003
|
+
constructor(config) {
|
1004
|
+
super(config);
|
1005
|
+
}
|
1006
|
+
async list(ProductListParams, ProductListOptions) {
|
1007
|
+
const queryArray = [];
|
1008
|
+
if (ProductListParams.categoryArray !== void 0) {
|
1009
|
+
queryArray.push(
|
1010
|
+
"categoryArray=" + ProductListParams.categoryArray.join(",")
|
1011
|
+
);
|
1012
|
+
}
|
1013
|
+
if (ProductListParams.modalityArray !== void 0) {
|
1014
|
+
queryArray.push(
|
1015
|
+
"modalityArray=" + ProductListParams.modalityArray.join(",")
|
1016
|
+
);
|
1017
|
+
}
|
1018
|
+
if (ProductListParams.sectorArray !== void 0) {
|
1019
|
+
queryArray.push("sectorArray=" + ProductListParams.sectorArray.join(","));
|
1020
|
+
}
|
1021
|
+
if (ProductListParams.technologyArray !== void 0) {
|
1022
|
+
queryArray.push(
|
1023
|
+
"technologyArray=" + ProductListParams.technologyArray.join(",")
|
1024
|
+
);
|
1025
|
+
}
|
1026
|
+
return await super.sendRequest(
|
1027
|
+
{
|
1028
|
+
method: "GET",
|
1029
|
+
url: "products?" + queryArray.join("&"),
|
1030
|
+
body: void 0,
|
1031
|
+
useAuthentication: false
|
1032
|
+
},
|
1033
|
+
ProductListOptions
|
1034
|
+
);
|
1035
|
+
}
|
1036
|
+
async retrieve(params, options) {
|
1037
|
+
const queryArray = [];
|
1038
|
+
if (options?.expand !== void 0) {
|
1039
|
+
queryArray.push("expand=" + options.expand.join(","));
|
1040
|
+
}
|
1041
|
+
return await super.sendRequest(
|
1042
|
+
{
|
1043
|
+
method: "GET",
|
1044
|
+
url: "products/" + params.productId + "?" + queryArray.join("&"),
|
1045
|
+
body: void 0,
|
1046
|
+
useAuthentication: false
|
1047
|
+
},
|
1048
|
+
options
|
1049
|
+
);
|
1050
|
+
}
|
1051
|
+
};
|
1052
|
+
|
1053
|
+
// src/types/types.ts
|
1054
|
+
var LanguageCodeArray = [
|
1055
|
+
"en",
|
1056
|
+
// english
|
1057
|
+
"de",
|
1058
|
+
// german
|
1059
|
+
"fr",
|
1060
|
+
// french
|
1061
|
+
"nl",
|
1062
|
+
// dutch
|
1063
|
+
"it",
|
1064
|
+
// italian
|
1065
|
+
"cs",
|
1066
|
+
// czech
|
1067
|
+
"da",
|
1068
|
+
// danish
|
1069
|
+
"es",
|
1070
|
+
// spanish
|
1071
|
+
"et",
|
1072
|
+
// estonian
|
1073
|
+
"gsw",
|
1074
|
+
// swiss german
|
1075
|
+
"hr",
|
1076
|
+
// croatian
|
1077
|
+
"hu",
|
1078
|
+
// hungarian
|
1079
|
+
"no",
|
1080
|
+
// norwegian
|
1081
|
+
"pl",
|
1082
|
+
// polish
|
1083
|
+
"sv"
|
1084
|
+
// swedish
|
1085
|
+
];
|
1086
|
+
var CountryCodeArray = [
|
1087
|
+
"DE",
|
1088
|
+
// germany
|
1089
|
+
"AT",
|
1090
|
+
// austria
|
1091
|
+
"CH",
|
1092
|
+
// switzerland
|
1093
|
+
"LI",
|
1094
|
+
// liechtenstein
|
1095
|
+
"IT",
|
1096
|
+
// italy
|
1097
|
+
"FR",
|
1098
|
+
// france
|
1099
|
+
"NL",
|
1100
|
+
// netherlands
|
1101
|
+
"BE",
|
1102
|
+
// belgium
|
1103
|
+
"LU",
|
1104
|
+
// luxembourg
|
1105
|
+
"DK",
|
1106
|
+
// denmark
|
1107
|
+
"SE",
|
1108
|
+
// sweden
|
1109
|
+
"NO",
|
1110
|
+
// norway
|
1111
|
+
"FI",
|
1112
|
+
// finland
|
1113
|
+
"IS",
|
1114
|
+
// iceland
|
1115
|
+
"GB",
|
1116
|
+
// great britain
|
1117
|
+
"IE",
|
1118
|
+
// ireland
|
1119
|
+
"ES",
|
1120
|
+
// spain
|
1121
|
+
"PT",
|
1122
|
+
// portugal
|
1123
|
+
"GR",
|
1124
|
+
// greece
|
1125
|
+
"PL",
|
1126
|
+
// poland
|
1127
|
+
"CZ",
|
1128
|
+
// czech republic
|
1129
|
+
"SK",
|
1130
|
+
// slovakia
|
1131
|
+
"HU",
|
1132
|
+
// hungary
|
1133
|
+
"SI",
|
1134
|
+
// slovenia
|
1135
|
+
"HR",
|
1136
|
+
// croatia
|
1137
|
+
"BA",
|
1138
|
+
// bosnia and herzegovina
|
1139
|
+
"RS",
|
1140
|
+
// serbia
|
1141
|
+
"US",
|
1142
|
+
// united states
|
1143
|
+
"CA"
|
1144
|
+
// canada
|
1145
|
+
];
|
1146
|
+
var CurrencyCodeArray = [
|
1147
|
+
"eur",
|
1148
|
+
// euro
|
1149
|
+
"usd",
|
1150
|
+
// united states
|
1151
|
+
"gbp",
|
1152
|
+
// great britain
|
1153
|
+
"nok",
|
1154
|
+
// norway
|
1155
|
+
"sek",
|
1156
|
+
// sweden
|
1157
|
+
"chf",
|
1158
|
+
// switzerland
|
1159
|
+
"dkk",
|
1160
|
+
// denmark
|
1161
|
+
"pln",
|
1162
|
+
// poland
|
1163
|
+
"czk",
|
1164
|
+
// czech republic
|
1165
|
+
"huf",
|
1166
|
+
// hungary
|
1167
|
+
"hrk",
|
1168
|
+
// croatia
|
1169
|
+
"bam",
|
1170
|
+
// bosnia and herzegovina
|
1171
|
+
"rsd",
|
1172
|
+
// serbia
|
1173
|
+
"isk",
|
1174
|
+
// iceland
|
1175
|
+
"cad"
|
1176
|
+
// canada
|
1177
|
+
];
|
1178
|
+
var ReadonlySectorArray = ["tourism", "mobility", "sport"];
|
1179
|
+
var ReadonlyCategoryArray = [
|
1180
|
+
"bike",
|
1181
|
+
"car",
|
1182
|
+
"scooter",
|
1183
|
+
"boat",
|
1184
|
+
"moped"
|
1185
|
+
];
|
1186
|
+
var ReadonlyModalityArray = [
|
1187
|
+
"charge",
|
1188
|
+
"store",
|
1189
|
+
"share",
|
1190
|
+
"wash",
|
1191
|
+
"repair"
|
1192
|
+
];
|
1193
|
+
var ReadonlyIntegrationStateArray = ["full", "partial"];
|
1194
|
+
var ConditionType = /* @__PURE__ */ ((ConditionType2) => {
|
1195
|
+
ConditionType2["Equal"] = "==";
|
1196
|
+
ConditionType2["NotEqual"] = "!=";
|
1197
|
+
ConditionType2["LessThan"] = "<";
|
1198
|
+
ConditionType2["GreaterThan"] = ">";
|
1199
|
+
ConditionType2["LessThanOrEqual"] = "<=";
|
1200
|
+
ConditionType2["GreaterThanOrEqual"] = ">=";
|
1201
|
+
return ConditionType2;
|
1202
|
+
})(ConditionType || {});
|
1203
|
+
|
993
1204
|
// src/index.ts
|
994
1205
|
var Juhuu = class {
|
995
1206
|
constructor(config) {
|
@@ -1004,6 +1215,7 @@ var Juhuu = class {
|
|
1004
1215
|
this.locations = new LocationsService(config);
|
1005
1216
|
this.terms = new TermsService(config);
|
1006
1217
|
this.tariffs = new TariffsService(config);
|
1218
|
+
this.products = new ProductService(config);
|
1007
1219
|
}
|
1008
1220
|
/**
|
1009
1221
|
* Top Level Resources
|
@@ -1019,8 +1231,31 @@ var Juhuu = class {
|
|
1019
1231
|
locations;
|
1020
1232
|
terms;
|
1021
1233
|
tariffs;
|
1234
|
+
products;
|
1022
1235
|
};
|
1236
|
+
var JUHUU;
|
1237
|
+
((JUHUU2) => {
|
1238
|
+
let Purpose;
|
1239
|
+
((Purpose3) => {
|
1240
|
+
Purpose3["Purpose1"] = "Purpose 1";
|
1241
|
+
Purpose3["Purpose2"] = "Purpose 2";
|
1242
|
+
})(Purpose = JUHUU2.Purpose || (JUHUU2.Purpose = {}));
|
1243
|
+
let Technology;
|
1244
|
+
((Technology2) => {
|
1245
|
+
Technology2["Tech1"] = "Technology 1";
|
1246
|
+
Technology2["Tech2"] = "Technology 2";
|
1247
|
+
})(Technology = JUHUU2.Technology || (JUHUU2.Technology = {}));
|
1248
|
+
})(JUHUU || (JUHUU = {}));
|
1023
1249
|
// Annotate the CommonJS export names for ESM import in node:
|
1024
1250
|
0 && (module.exports = {
|
1025
|
-
|
1251
|
+
ConditionType,
|
1252
|
+
CountryCodeArray,
|
1253
|
+
CurrencyCodeArray,
|
1254
|
+
JUHUU,
|
1255
|
+
Juhuu,
|
1256
|
+
LanguageCodeArray,
|
1257
|
+
ReadonlyCategoryArray,
|
1258
|
+
ReadonlyIntegrationStateArray,
|
1259
|
+
ReadonlyModalityArray,
|
1260
|
+
ReadonlySectorArray
|
1026
1261
|
});
|
package/dist/index.mjs
CHANGED
@@ -221,7 +221,6 @@ var SessionService = class extends Service {
|
|
221
221
|
autoRenew: SessionCreateParams.autoRenew,
|
222
222
|
type: SessionCreateParams.sessionType,
|
223
223
|
isOffSession: SessionCreateParams.isOffSession,
|
224
|
-
idempotencyKey: SessionCreateParams.idempotencyKey,
|
225
224
|
userId: SessionCreateParams.userId
|
226
225
|
},
|
227
226
|
useAuthentication: true
|
@@ -954,6 +953,209 @@ var TariffsService = class extends Service {
|
|
954
953
|
}
|
955
954
|
};
|
956
955
|
|
956
|
+
// src/products/products.service.ts
|
957
|
+
var ProductService = class extends Service {
|
958
|
+
constructor(config) {
|
959
|
+
super(config);
|
960
|
+
}
|
961
|
+
async list(ProductListParams, ProductListOptions) {
|
962
|
+
const queryArray = [];
|
963
|
+
if (ProductListParams.categoryArray !== void 0) {
|
964
|
+
queryArray.push(
|
965
|
+
"categoryArray=" + ProductListParams.categoryArray.join(",")
|
966
|
+
);
|
967
|
+
}
|
968
|
+
if (ProductListParams.modalityArray !== void 0) {
|
969
|
+
queryArray.push(
|
970
|
+
"modalityArray=" + ProductListParams.modalityArray.join(",")
|
971
|
+
);
|
972
|
+
}
|
973
|
+
if (ProductListParams.sectorArray !== void 0) {
|
974
|
+
queryArray.push("sectorArray=" + ProductListParams.sectorArray.join(","));
|
975
|
+
}
|
976
|
+
if (ProductListParams.technologyArray !== void 0) {
|
977
|
+
queryArray.push(
|
978
|
+
"technologyArray=" + ProductListParams.technologyArray.join(",")
|
979
|
+
);
|
980
|
+
}
|
981
|
+
return await super.sendRequest(
|
982
|
+
{
|
983
|
+
method: "GET",
|
984
|
+
url: "products?" + queryArray.join("&"),
|
985
|
+
body: void 0,
|
986
|
+
useAuthentication: false
|
987
|
+
},
|
988
|
+
ProductListOptions
|
989
|
+
);
|
990
|
+
}
|
991
|
+
async retrieve(params, options) {
|
992
|
+
const queryArray = [];
|
993
|
+
if (options?.expand !== void 0) {
|
994
|
+
queryArray.push("expand=" + options.expand.join(","));
|
995
|
+
}
|
996
|
+
return await super.sendRequest(
|
997
|
+
{
|
998
|
+
method: "GET",
|
999
|
+
url: "products/" + params.productId + "?" + queryArray.join("&"),
|
1000
|
+
body: void 0,
|
1001
|
+
useAuthentication: false
|
1002
|
+
},
|
1003
|
+
options
|
1004
|
+
);
|
1005
|
+
}
|
1006
|
+
};
|
1007
|
+
|
1008
|
+
// src/types/types.ts
|
1009
|
+
var LanguageCodeArray = [
|
1010
|
+
"en",
|
1011
|
+
// english
|
1012
|
+
"de",
|
1013
|
+
// german
|
1014
|
+
"fr",
|
1015
|
+
// french
|
1016
|
+
"nl",
|
1017
|
+
// dutch
|
1018
|
+
"it",
|
1019
|
+
// italian
|
1020
|
+
"cs",
|
1021
|
+
// czech
|
1022
|
+
"da",
|
1023
|
+
// danish
|
1024
|
+
"es",
|
1025
|
+
// spanish
|
1026
|
+
"et",
|
1027
|
+
// estonian
|
1028
|
+
"gsw",
|
1029
|
+
// swiss german
|
1030
|
+
"hr",
|
1031
|
+
// croatian
|
1032
|
+
"hu",
|
1033
|
+
// hungarian
|
1034
|
+
"no",
|
1035
|
+
// norwegian
|
1036
|
+
"pl",
|
1037
|
+
// polish
|
1038
|
+
"sv"
|
1039
|
+
// swedish
|
1040
|
+
];
|
1041
|
+
var CountryCodeArray = [
|
1042
|
+
"DE",
|
1043
|
+
// germany
|
1044
|
+
"AT",
|
1045
|
+
// austria
|
1046
|
+
"CH",
|
1047
|
+
// switzerland
|
1048
|
+
"LI",
|
1049
|
+
// liechtenstein
|
1050
|
+
"IT",
|
1051
|
+
// italy
|
1052
|
+
"FR",
|
1053
|
+
// france
|
1054
|
+
"NL",
|
1055
|
+
// netherlands
|
1056
|
+
"BE",
|
1057
|
+
// belgium
|
1058
|
+
"LU",
|
1059
|
+
// luxembourg
|
1060
|
+
"DK",
|
1061
|
+
// denmark
|
1062
|
+
"SE",
|
1063
|
+
// sweden
|
1064
|
+
"NO",
|
1065
|
+
// norway
|
1066
|
+
"FI",
|
1067
|
+
// finland
|
1068
|
+
"IS",
|
1069
|
+
// iceland
|
1070
|
+
"GB",
|
1071
|
+
// great britain
|
1072
|
+
"IE",
|
1073
|
+
// ireland
|
1074
|
+
"ES",
|
1075
|
+
// spain
|
1076
|
+
"PT",
|
1077
|
+
// portugal
|
1078
|
+
"GR",
|
1079
|
+
// greece
|
1080
|
+
"PL",
|
1081
|
+
// poland
|
1082
|
+
"CZ",
|
1083
|
+
// czech republic
|
1084
|
+
"SK",
|
1085
|
+
// slovakia
|
1086
|
+
"HU",
|
1087
|
+
// hungary
|
1088
|
+
"SI",
|
1089
|
+
// slovenia
|
1090
|
+
"HR",
|
1091
|
+
// croatia
|
1092
|
+
"BA",
|
1093
|
+
// bosnia and herzegovina
|
1094
|
+
"RS",
|
1095
|
+
// serbia
|
1096
|
+
"US",
|
1097
|
+
// united states
|
1098
|
+
"CA"
|
1099
|
+
// canada
|
1100
|
+
];
|
1101
|
+
var CurrencyCodeArray = [
|
1102
|
+
"eur",
|
1103
|
+
// euro
|
1104
|
+
"usd",
|
1105
|
+
// united states
|
1106
|
+
"gbp",
|
1107
|
+
// great britain
|
1108
|
+
"nok",
|
1109
|
+
// norway
|
1110
|
+
"sek",
|
1111
|
+
// sweden
|
1112
|
+
"chf",
|
1113
|
+
// switzerland
|
1114
|
+
"dkk",
|
1115
|
+
// denmark
|
1116
|
+
"pln",
|
1117
|
+
// poland
|
1118
|
+
"czk",
|
1119
|
+
// czech republic
|
1120
|
+
"huf",
|
1121
|
+
// hungary
|
1122
|
+
"hrk",
|
1123
|
+
// croatia
|
1124
|
+
"bam",
|
1125
|
+
// bosnia and herzegovina
|
1126
|
+
"rsd",
|
1127
|
+
// serbia
|
1128
|
+
"isk",
|
1129
|
+
// iceland
|
1130
|
+
"cad"
|
1131
|
+
// canada
|
1132
|
+
];
|
1133
|
+
var ReadonlySectorArray = ["tourism", "mobility", "sport"];
|
1134
|
+
var ReadonlyCategoryArray = [
|
1135
|
+
"bike",
|
1136
|
+
"car",
|
1137
|
+
"scooter",
|
1138
|
+
"boat",
|
1139
|
+
"moped"
|
1140
|
+
];
|
1141
|
+
var ReadonlyModalityArray = [
|
1142
|
+
"charge",
|
1143
|
+
"store",
|
1144
|
+
"share",
|
1145
|
+
"wash",
|
1146
|
+
"repair"
|
1147
|
+
];
|
1148
|
+
var ReadonlyIntegrationStateArray = ["full", "partial"];
|
1149
|
+
var ConditionType = /* @__PURE__ */ ((ConditionType2) => {
|
1150
|
+
ConditionType2["Equal"] = "==";
|
1151
|
+
ConditionType2["NotEqual"] = "!=";
|
1152
|
+
ConditionType2["LessThan"] = "<";
|
1153
|
+
ConditionType2["GreaterThan"] = ">";
|
1154
|
+
ConditionType2["LessThanOrEqual"] = "<=";
|
1155
|
+
ConditionType2["GreaterThanOrEqual"] = ">=";
|
1156
|
+
return ConditionType2;
|
1157
|
+
})(ConditionType || {});
|
1158
|
+
|
957
1159
|
// src/index.ts
|
958
1160
|
var Juhuu = class {
|
959
1161
|
constructor(config) {
|
@@ -968,6 +1170,7 @@ var Juhuu = class {
|
|
968
1170
|
this.locations = new LocationsService(config);
|
969
1171
|
this.terms = new TermsService(config);
|
970
1172
|
this.tariffs = new TariffsService(config);
|
1173
|
+
this.products = new ProductService(config);
|
971
1174
|
}
|
972
1175
|
/**
|
973
1176
|
* Top Level Resources
|
@@ -983,7 +1186,30 @@ var Juhuu = class {
|
|
983
1186
|
locations;
|
984
1187
|
terms;
|
985
1188
|
tariffs;
|
1189
|
+
products;
|
986
1190
|
};
|
1191
|
+
var JUHUU;
|
1192
|
+
((JUHUU2) => {
|
1193
|
+
let Purpose;
|
1194
|
+
((Purpose3) => {
|
1195
|
+
Purpose3["Purpose1"] = "Purpose 1";
|
1196
|
+
Purpose3["Purpose2"] = "Purpose 2";
|
1197
|
+
})(Purpose = JUHUU2.Purpose || (JUHUU2.Purpose = {}));
|
1198
|
+
let Technology;
|
1199
|
+
((Technology2) => {
|
1200
|
+
Technology2["Tech1"] = "Technology 1";
|
1201
|
+
Technology2["Tech2"] = "Technology 2";
|
1202
|
+
})(Technology = JUHUU2.Technology || (JUHUU2.Technology = {}));
|
1203
|
+
})(JUHUU || (JUHUU = {}));
|
987
1204
|
export {
|
988
|
-
|
1205
|
+
ConditionType,
|
1206
|
+
CountryCodeArray,
|
1207
|
+
CurrencyCodeArray,
|
1208
|
+
JUHUU,
|
1209
|
+
Juhuu,
|
1210
|
+
LanguageCodeArray,
|
1211
|
+
ReadonlyCategoryArray,
|
1212
|
+
ReadonlyIntegrationStateArray,
|
1213
|
+
ReadonlyModalityArray,
|
1214
|
+
ReadonlySectorArray
|
989
1215
|
};
|