@vendit-dev/thirdparty-adapters 0.7.6 → 0.7.8

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.
Files changed (43) hide show
  1. package/.idea/codeStyles/Project.xml +50 -0
  2. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  3. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/thirdparty-adapters.iml +12 -0
  6. package/.idea/vcs.xml +6 -0
  7. package/lib/adapters/externalChannelManagers/externalChannelManager.type.d.ts +130 -0
  8. package/lib/adapters/externalChannelManagers/externalChannelManager.type.js +40 -0
  9. package/lib/adapters/externalChannelManagers/externalChannelManagerCaller.d.ts +10 -0
  10. package/lib/adapters/externalChannelManagers/externalChannelManagerCaller.js +79 -0
  11. package/lib/adapters/externalChannelManagers/externalChannelManagerCaller.type.d.ts +4 -0
  12. package/lib/adapters/externalChannelManagers/externalChannelManagerCaller.type.js +27 -0
  13. package/lib/adapters/externalChannelManagers/tl-lincoln.d.ts +25 -0
  14. package/lib/adapters/externalChannelManagers/tl-lincoln.helper.d.ts +23 -0
  15. package/lib/adapters/externalChannelManagers/tl-lincoln.helper.js +313 -0
  16. package/lib/adapters/externalChannelManagers/tl-lincoln.js +321 -0
  17. package/lib/adapters/externalChannelManagers/tl-lincoln.types.d.ts +583 -0
  18. package/lib/adapters/externalChannelManagers/tl-lincoln.types.js +32 -0
  19. package/lib/adapters/externalChannelManagers/tl-sample.d.ts +1218 -0
  20. package/lib/adapters/externalChannelManagers/tl-sample.js +3974 -0
  21. package/lib/adapters/parking/amano.d.ts +1 -0
  22. package/lib/adapters/parking/amano.js +3 -0
  23. package/lib/adapters/parking/nicePark.d.ts +2 -1
  24. package/lib/adapters/parking/nicePark.js +37 -2
  25. package/lib/adapters/parking/parkingThirdParty.type.d.ts +11 -0
  26. package/lib/adapters/parking/parkingThridPartyCaller.d.ts +1 -0
  27. package/lib/adapters/parking/parkingThridPartyCaller.js +20 -0
  28. package/lib/adapters/smartAccess.d.ts +7 -2
  29. package/lib/adapters/smartAccess.js +26 -25
  30. package/lib/index.d.ts +4 -2
  31. package/lib/index.js +7 -3
  32. package/lib/types/common.d.ts +385 -0
  33. package/lib/types/common.js +2 -0
  34. package/lib/types/index.d.ts +2 -0
  35. package/lib/types/index.js +18 -0
  36. package/lib/types/tl-lincoln.ota.d.ts +1 -0
  37. package/lib/types/tl-lincoln.ota.js +119 -0
  38. package/lib/utils/function.d.ts +2 -0
  39. package/lib/utils/function.js +15 -0
  40. package/package.json +48 -49
  41. package/lib/utils/number.util.d.ts +0 -1
  42. package/lib/utils/number.util.js +0 -26
  43. package/yarn-error.log +0 -4583
@@ -0,0 +1,385 @@
1
+ /// <reference types="node" />
2
+ /**
3
+ * Checks whether the type is any
4
+ * See {@link https://stackoverflow.com/a/49928360/3406963}
5
+ * @typeParam T - type which may be any
6
+ * ```
7
+ * IsAny<any> = true
8
+ * IsAny<string> = false
9
+ * ```
10
+ */
11
+ export type IsAny<T> = 0 extends 1 & T ? true : false;
12
+ /**
13
+ * Checks whether the type is never
14
+ * @typeParam T - type which may be never
15
+ * ```
16
+ * IsAny<never> = true
17
+ * IsAny<string> = false
18
+ * ```
19
+ */
20
+ export type IsNever<T> = [T] extends [never] ? true : false;
21
+ export type IsEqual<T1, T2> = T1 extends T2 ? (<G>() => G extends T1 ? 1 : 2) extends <G>() => G extends T2 ? 1 : 2 ? true : false : false;
22
+ export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
23
+ interface File extends Blob {
24
+ readonly lastModified: number;
25
+ readonly name: string;
26
+ }
27
+ interface FileList {
28
+ readonly length: number;
29
+ item(index: number): File | null;
30
+ [index: number]: File;
31
+ }
32
+ export type BrowserNativeObject = Date | FileList | File;
33
+ /**
34
+ * Type alias to `string` which describes a lodash-like path through an object.
35
+ * E.g. `'foo.bar.0.baz'`
36
+ */
37
+ export type PathString = string;
38
+ /**
39
+ * Type which can be traversed through with a {@link PathString}.
40
+ * I.e. objects, arrays, and tuples
41
+ */
42
+ export type Traversable = object;
43
+ /**
44
+ * Type to query whether an array type T is a tuple type.
45
+ * @typeParam T - type which may be an array or tuple
46
+ * @example
47
+ * ```
48
+ * IsTuple<[number]> = true
49
+ * IsTuple<number[]> = false
50
+ * ```
51
+ */
52
+ export type IsTuple<T extends ReadonlyArray<any>> = number extends T['length'] ? false : true;
53
+ /**
54
+ * Type which can be used to index an array or tuple type.
55
+ */
56
+ export type ArrayKey = number;
57
+ /**
58
+ * Type which can be used to index an object.
59
+ */
60
+ export type Key = string;
61
+ /**
62
+ * Type to assert that a type is a {@link Key}.
63
+ * @typeParam T - type which may be a {@link Key}
64
+ */
65
+ export type AsKey<T> = Extract<T, Key>;
66
+ /**
67
+ * Type to convert a type to a {@link Key}.
68
+ * @typeParam T - type which may be converted to a {@link Key}
69
+ */
70
+ export type ToKey<T> = T extends ArrayKey ? `${T}` : AsKey<T>;
71
+ /**
72
+ * Type which describes a path through an object
73
+ * as a list of individual {@link Key}s.
74
+ */
75
+ export type PathTuple = Key[];
76
+ /**
77
+ * Type to assert that a type is a {@link PathTuple}.
78
+ * @typeParam T - type which may be a {@link PathTuple}
79
+ */
80
+ export type AsPathTuple<T> = Extract<T, PathTuple>;
81
+ /**
82
+ * Type to intersect a union type.
83
+ * See https://fettblog.eu/typescript-union-to-intersection/
84
+ * @typeParam U - union
85
+ * @example
86
+ * ```
87
+ * UnionToIntersection<{ foo: string } | { bar: number }>
88
+ * = { foo: string; bar: number }
89
+ * ```
90
+ */
91
+ export type UnionToIntersection<U> = (U extends any ? (_: U) => any : never) extends (_: infer I) => any ? I : never;
92
+ /**
93
+ * Type which appends a {@link Key} to the {@link PathTuple} only if it is not
94
+ * blank, i.e. not the empty string.
95
+ * @typeParam PT - path
96
+ * @typeParam K - key
97
+ * @example
98
+ * ```
99
+ * AppendNonBlankKey<['foo'], 'bar'> = ['foo', 'bar']
100
+ * AppendNonBlankKey<['foo'], ''> = ['foo']
101
+ * ```
102
+ */
103
+ type AppendNonBlankKey<PT extends PathTuple, K extends Key> = K extends '' ? PT : [...PT, K];
104
+ /**
105
+ * Type to implement {@link SplitPathString} tail recursively.
106
+ * @typeParam PS - remaining {@link PathString} which should be split into its
107
+ * individual {@link Key}s
108
+ * @typeParam PT - accumulator of the {@link Key}s which have been split from
109
+ * the original {@link PathString} already
110
+ */
111
+ type SplitPathStringImpl<PS extends PathString, PT extends PathTuple> = PS extends `${infer K}.${infer R}` ? SplitPathStringImpl<R, AppendNonBlankKey<PT, K>> : AppendNonBlankKey<PT, PS>;
112
+ /**
113
+ * Type to split a {@link PathString} into a {@link PathTuple}.
114
+ * The individual {@link Key}s may be empty strings.
115
+ * @typeParam PS - {@link PathString} which should be split into its
116
+ * individual {@link Key}s
117
+ * @example
118
+ * ```
119
+ * SplitPathString<'foo'> = ['foo']
120
+ * SplitPathString<'foo.bar.0.baz'> = ['foo', 'bar', '0', 'baz']
121
+ * SplitPathString<'.'> = []
122
+ * ```
123
+ */
124
+ export type SplitPathString<PS extends PathString> = SplitPathStringImpl<PS, [
125
+ ]>;
126
+ /**
127
+ * Type to implement {@link JoinPathTuple} tail-recursively.
128
+ * @typeParam PT - remaining {@link Key}s which needs to be joined
129
+ * @typeParam PS - accumulator of the already joined {@link Key}s
130
+ */
131
+ type JoinPathTupleImpl<PT extends PathTuple, PS extends PathString> = PT extends [infer K, ...infer R] ? JoinPathTupleImpl<AsPathTuple<R>, `${PS}.${AsKey<K>}`> : PS;
132
+ /**
133
+ * Type to join a {@link PathTuple} to a {@link PathString}.
134
+ * @typeParam PT - {@link PathTuple} which should be joined.
135
+ * @example
136
+ * ```
137
+ * JoinPathTuple<['foo']> = 'foo'
138
+ * JoinPathTuple<['foo', 'bar', '0', 'baz']> = 'foo.bar.0.baz'
139
+ * JoinPathTuple<[]> = never
140
+ * ```
141
+ */
142
+ export type JoinPathTuple<PT extends PathTuple> = PT extends [
143
+ infer K,
144
+ ...infer R
145
+ ] ? JoinPathTupleImpl<AsPathTuple<R>, AsKey<K>> : never;
146
+ /**
147
+ * Type which converts all keys of an object to {@link Key}s.
148
+ * @typeParam T - object type
149
+ * @example
150
+ * ```
151
+ * MapKeys<{0: string}> = {'0': string}
152
+ * ```
153
+ */
154
+ type MapKeys<T> = {
155
+ [K in keyof T as ToKey<K>]: T[K];
156
+ };
157
+ /**
158
+ * Type to access a type by a key.
159
+ * - Returns undefined if it can't be indexed by that key.
160
+ * - Returns null if the type is null.
161
+ * - Returns undefined if the type is not traversable.
162
+ * @typeParam T - type which is indexed by the key
163
+ * @typeParam K - key into the type
164
+ * ```
165
+ * TryAccess<{foo: string}, 'foo'> = string
166
+ * TryAccess<{foo: string}, 'bar'> = undefined
167
+ * TryAccess<null, 'foo'> = null
168
+ * TryAccess<string, 'foo'> = undefined
169
+ * ```
170
+ */
171
+ type TryAccess<T, K> = K extends keyof T ? T[K] : T extends null ? null : undefined;
172
+ /**
173
+ * Type to access an array type by a key.
174
+ * Returns undefined if the key is non-numeric.
175
+ * @typeParam T - type which is indexed by the key
176
+ * @typeParam K - key into the type
177
+ * ```
178
+ * TryAccessArray<string[], '0'> = string
179
+ * TryAccessArray<string[], 'foo'> = undefined
180
+ * ```
181
+ */
182
+ type TryAccessArray<T extends ReadonlyArray<any>, K extends Key> = K extends `${ArrayKey}` ? T[number] : TryAccess<T, K>;
183
+ /**
184
+ * Type to evaluate the type which the given key points to.
185
+ * @typeParam T - type which is indexed by the key
186
+ * @typeParam K - key into the type
187
+ * @example
188
+ * ```
189
+ * EvaluateKey<{foo: string}, 'foo'> = string
190
+ * EvaluateKey<[number, string], '1'> = string
191
+ * EvaluateKey<string[], '1'> = string
192
+ * ```
193
+ */
194
+ export type EvaluateKey<T, K extends Key> = T extends ReadonlyArray<any> ? IsTuple<T> extends true ? TryAccess<T, K> : TryAccessArray<T, K> : TryAccess<MapKeys<T>, K>;
195
+ /**
196
+ * Type to evaluate the type which the given path points to.
197
+ * @typeParam T - deeply nested type which is indexed by the path
198
+ * @typeParam PT - path into the deeply nested type
199
+ * @example
200
+ * ```
201
+ * EvaluatePath<{foo: {bar: string}}, ['foo', 'bar']> = string
202
+ * EvaluatePath<[number, string], ['1']> = string
203
+ * EvaluatePath<number, []> = number
204
+ * EvaluatePath<number, ['foo']> = undefined
205
+ * ```
206
+ */
207
+ export type EvaluatePath<T, PT extends PathTuple> = PT extends [
208
+ infer K,
209
+ ...infer R
210
+ ] ? EvaluatePath<EvaluateKey<T, AsKey<K>>, AsPathTuple<R>> : T;
211
+ /**
212
+ * Type which given a tuple type returns its own keys, i.e. only its indices.
213
+ * @typeParam T - tuple type
214
+ * @example
215
+ * ```
216
+ * TupleKeys<[number, string]> = '0' | '1'
217
+ * ```
218
+ */
219
+ export type TupleKeys<T extends ReadonlyArray<any>> = Exclude<keyof T, keyof any[]>;
220
+ /**
221
+ * Type which extracts all numeric keys from an object.
222
+ * @typeParam T - type
223
+ * @example
224
+ * ```
225
+ * NumericObjectKeys<{0: string, '1': string, foo: string}> = '0' | '1'
226
+ * ```
227
+ */
228
+ type NumericObjectKeys<T extends Traversable> = ToKey<Extract<keyof T, ArrayKey | `${ArrayKey}`>>;
229
+ /**
230
+ * Type which extracts all numeric keys from an object, tuple, or array.
231
+ * If a union is passed, it evaluates to the overlapping numeric keys.
232
+ * @typeParam T - type
233
+ * @example
234
+ * ```
235
+ * NumericKeys<{0: string, '1': string, foo: string}> = '0' | '1'
236
+ * NumericKeys<number[]> = `${number}`
237
+ * NumericKeys<[string, number]> = '0' | '1'
238
+ * NumericKeys<{0: string, '1': string} | [number] | number[]> = '0'
239
+ * ```
240
+ */
241
+ export type NumericKeys<T extends Traversable> = UnionToIntersection<T extends ReadonlyArray<any> ? IsTuple<T> extends true ? [TupleKeys<T>] : [ToKey<ArrayKey>] : [NumericObjectKeys<T>]>[never];
242
+ /**
243
+ * Type which extracts all keys from an object.
244
+ * If a union is passed, it evaluates to the overlapping keys.
245
+ * @typeParam T - object type
246
+ * @example
247
+ * ```
248
+ * ObjectKeys<{foo: string, bar: string}, string> = 'foo' | 'bar'
249
+ * ObjectKeys<{foo: string, bar: number}, string> = 'foo'
250
+ * ```
251
+ */
252
+ export type ObjectKeys<T extends Traversable> = Exclude<ToKey<keyof T>, `${string}.${string}` | ''>;
253
+ /**
254
+ * Type to check whether a type's property matches the constraint type
255
+ * and return its key. Converts the key to a {@link Key}.
256
+ * @typeParam T - type whose property should be checked
257
+ * @typeParam K - key of the property
258
+ * @typeParam U - constraint type
259
+ * @example
260
+ * ```
261
+ * CheckKeyConstraint<{foo: string}, 'foo', string> = 'foo'
262
+ * CheckKeyConstraint<{foo: string}, 'foo', number> = never
263
+ * CheckKeyConstraint<string[], number, string> = `${number}`
264
+ * ```
265
+ */
266
+ export type CheckKeyConstraint<T, K extends Key, U> = K extends any ? EvaluateKey<T, K> extends U ? K : never : never;
267
+ /**
268
+ * Type which evaluates to true when the type is an array or tuple or is a union
269
+ * which contains an array or tuple.
270
+ * @typeParam T - type
271
+ * @example
272
+ * ```
273
+ * ContainsIndexable<{foo: string}> = false
274
+ * ContainsIndexable<{foo: string} | number[]> = true
275
+ * ```
276
+ */
277
+ export type ContainsIndexable<T> = IsNever<Extract<T, ReadonlyArray<any>>> extends true ? false : true;
278
+ /**
279
+ * Type to implement {@link Keys} for non-nullable values.
280
+ * @typeParam T - non-nullable type whose property should be checked
281
+ */
282
+ type KeysImpl<T> = [T] extends [Traversable] ? ContainsIndexable<T> extends true ? NumericKeys<T> : ObjectKeys<T> : never;
283
+ /**
284
+ * Type to find all properties of a type that match the constraint type
285
+ * and return their keys.
286
+ * If a union is passed, it evaluates to the overlapping keys.
287
+ * @typeParam T - type whose property should be checked
288
+ * @typeParam U - constraint type
289
+ * @example
290
+ * ```
291
+ * Keys<{foo: string, bar: string}, string> = 'foo' | 'bar'
292
+ * Keys<{foo?: string, bar?: string}> = 'foo' | 'bar'
293
+ * Keys<{foo: string, bar: number}, string> = 'foo'
294
+ * Keys<[string, number], string> = '0'
295
+ * Keys<string[], string> = `${number}`
296
+ * Keys<{0: string, '1': string} | [number] | number[]> = '0'
297
+ * ```
298
+ */
299
+ export type Keys<T, U = unknown> = IsAny<T> extends true ? Key : IsNever<T> extends true ? Key : IsNever<NonNullable<T>> extends true ? never : CheckKeyConstraint<T, KeysImpl<NonNullable<T>>, U>;
300
+ /**
301
+ * Type to check whether a {@link Key} is present in a type.
302
+ * If a union of {@link Key}s is passed, all {@link Key}s have to be present
303
+ * in the type.
304
+ * @typeParam T - type which is introspected
305
+ * @typeParam K - key
306
+ * @example
307
+ * ```
308
+ * HasKey<{foo: string}, 'foo'> = true
309
+ * HasKey<{foo: string}, 'bar'> = false
310
+ * HasKey<{foo: string}, 'foo' | 'bar'> = false
311
+ * ```
312
+ */
313
+ export type HasKey<T, K extends Key> = IsNever<Exclude<K, Keys<T>>>;
314
+ /**
315
+ * Type to implement {@link ValidPathPrefix} tail recursively.
316
+ * @typeParam T - type which the path should be checked against
317
+ * @typeParam PT - path which should exist within the given type
318
+ * @typeParam VPT - accumulates the prefix of {@link Key}s which have been
319
+ * confirmed to exist already
320
+ */
321
+ type ValidPathPrefixImpl<T, PT extends PathTuple, VPT extends PathTuple> = PT extends [infer K, ...infer R] ? HasKey<T, AsKey<K>> extends true ? ValidPathPrefixImpl<EvaluateKey<T, AsKey<K>>, AsPathTuple<R>, AsPathTuple<[...VPT, K]>> : VPT : VPT;
322
+ /**
323
+ * Type to find the longest path prefix which is still valid,
324
+ * i.e. exists within the given type.
325
+ * @typeParam T - type which the path should be checked against
326
+ * @typeParam PT - path which should exist within the given type
327
+ * @example
328
+ * ```
329
+ * ValidPathPrefix<{foo: {bar: string}}, ['foo', 'bar']> = ['foo', 'bar']
330
+ * ValidPathPrefix<{foo: {bar: string}}, ['foo', 'ba']> = ['foo']
331
+ * ```
332
+ */
333
+ export type ValidPathPrefix<T, PT extends PathTuple> = ValidPathPrefixImpl<T, PT, [
334
+ ]>;
335
+ /**
336
+ * Type to check whether a path through a type exists.
337
+ * @typeParam T - type which the path should be checked against
338
+ * @typeParam PT - path which should exist within the given type
339
+ * @example
340
+ * ```
341
+ * HasPath<{foo: {bar: string}}, ['foo', 'bar']> = true
342
+ * HasPath<{foo: {bar: string}}, ['foo', 'ba']> = false
343
+ * ```
344
+ */
345
+ export type HasPath<T, PT extends PathTuple> = ValidPathPrefix<T, PT> extends PT ? true : false;
346
+ export type FieldValues = Record<string, any>;
347
+ /**
348
+ * Helper function to break apart T1 and check if any are equal to T2
349
+ *
350
+ * See {@link IsEqual}
351
+ */
352
+ type AnyIsEqual<T1, T2> = T1 extends T2 ? IsEqual<T1, T2> extends true ? true : never : never;
353
+ /**
354
+ * Helper type for recursively constructing paths through a type.
355
+ * This actually constructs the strings and recurses into nested
356
+ * object types.
357
+ *
358
+ * See {@link Path}
359
+ */
360
+ type PathImpl<K extends string | number, V, TraversedTypes> = V extends Primitive | BrowserNativeObject ? `${K}` : true extends AnyIsEqual<TraversedTypes, V> ? `${K}` : `${K}` | `${K}.${PathInternal<V, TraversedTypes | V>}`;
361
+ /**
362
+ * Helper type for recursively constructing paths through a type.
363
+ * This obscures the internal type param TraversedTypes from exported contract.
364
+ *
365
+ * See {@link Path}
366
+ */
367
+ type PathInternal<T, TraversedTypes = T> = T extends ReadonlyArray<infer V> ? IsTuple<T> extends true ? {
368
+ [K in TupleKeys<T>]-?: PathImpl<K & string, T[K], TraversedTypes>;
369
+ }[TupleKeys<T>] : PathImpl<ArrayKey, V, TraversedTypes> : {
370
+ [K in keyof T]-?: PathImpl<K & string, T[K], TraversedTypes>;
371
+ }[keyof T];
372
+ /**
373
+ * Type which eagerly collects all paths through a type
374
+ * @typeParam T - type which should be introspected
375
+ * @example
376
+ * ```
377
+ * Path<{foo: {bar: string}}> = 'foo' | 'foo.bar'
378
+ * ```
379
+ */
380
+ export type Path<T> = T extends any ? PathInternal<T> : never;
381
+ /**
382
+ * See {@link Path}
383
+ */
384
+ export type FieldPath<TFieldValues extends FieldValues> = Path<TFieldValues>;
385
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './common';
2
+ export * from './amanoKorea';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./common"), exports);
18
+ __exportStar(require("./amanoKorea"), exports);
@@ -0,0 +1 @@
1
+ export declare const TL_LINCOLN_TO_VENDIT_OTA_MAP: Record<string, string>;
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TL_LINCOLN_TO_VENDIT_OTA_MAP = void 0;
5
+ var TlLincolnOta;
6
+ (function (TlLincolnOta) {
7
+ TlLincolnOta["JEJU_COM"] = "Jeju.com";
8
+ TlLincolnOta["M12"] = "M12";
9
+ TlLincolnOta["NEW_MY_REAL_TRIP"] = "(New)MyRealTrip";
10
+ TlLincolnOta["GAGOPATOUR"] = "Gagopatour";
11
+ TlLincolnOta["BOOKING_DOT_COM"] = "Booking.com";
12
+ TlLincolnOta["AGODA"] = "Agoda";
13
+ TlLincolnOta["EXPEDIA"] = "Expedia";
14
+ TlLincolnOta["DOTW"] = "DOTW";
15
+ TlLincolnOta["HOTUSA"] = "HOTUSA";
16
+ TlLincolnOta["DIDA_TRAVEL"] = "DIDA TRAVEL";
17
+ TlLincolnOta["TIDESQUARE"] = "TIDESQUARE";
18
+ TlLincolnOta["OH_MY_HOTEL"] = "Ohmyhotel";
19
+ TlLincolnOta["AIRBNB"] = "Airbnb";
20
+ TlLincolnOta["FLIGGY"] = "Fliggy";
21
+ TlLincolnOta["HAFH"] = "Hafh";
22
+ TlLincolnOta["SHIJI"] = "Shiji";
23
+ TlLincolnOta["TRIPLA"] = "Tripla";
24
+ TlLincolnOta["D_EDGE"] = "D-EDGE";
25
+ TlLincolnOta["RAKUTEN_TRAVEL_OVERSEAS"] = "Rakuten Travel(overseas)";
26
+ TlLincolnOta["DYNATECH"] = "Dynatech";
27
+ TlLincolnOta["CTRIP"] = "Ctrip";
28
+ TlLincolnOta["HPDS"] = "HPDS";
29
+ TlLincolnOta["SUITE_SMART"] = "SUITE Smart";
30
+ TlLincolnOta["ORBITZ"] = "Orbitz";
31
+ TlLincolnOta["HOTELBEDS"] = "Hotelbeds";
32
+ TlLincolnOta["GTA"] = "GTA";
33
+ TlLincolnOta["KONEST"] = "Konest";
34
+ TlLincolnOta["SYN_XIS"] = "SynXis";
35
+ TlLincolnOta["HIKARI_GLOBAL"] = "Hikari Global";
36
+ TlLincolnOta["HOTELS_COMBINED"] = "HotelsCombined";
37
+ TlLincolnOta["AHN"] = "AHN";
38
+ TlLincolnOta["HOTEL_N_JOY"] = "HotelNJoy";
39
+ TlLincolnOta["INTERPARK"] = "Interpark";
40
+ TlLincolnOta["ZYX_JQ_TRAVEL"] = "ZYX-JQTravel";
41
+ TlLincolnOta["CODY"] = "Cody";
42
+ TlLincolnOta["COUPANG"] = "Coupang";
43
+ TlLincolnOta["JTB_JHS"] = "JTB-JHS";
44
+ TlLincolnOta["HOTEL_PASS"] = "HotelPass";
45
+ TlLincolnOta["HIS_VACATION"] = "HIS VACATION";
46
+ TlLincolnOta["WEBTOUR"] = "Webtour";
47
+ TlLincolnOta["TRIPBTOZ"] = "Tripbtoz";
48
+ TlLincolnOta["BAROJABA"] = "Barojaba";
49
+ TlLincolnOta["DRTRIP"] = "Drtrip";
50
+ TlLincolnOta["NANUGO"] = "Nanugo";
51
+ TlLincolnOta["ONDA"] = "Onda";
52
+ TlLincolnOta["GC_COMPANY"] = "GC Company";
53
+ TlLincolnOta["TRIPTOPAZ"] = "Triptopaz";
54
+ TlLincolnOta["TAMNAO"] = "Tamnao";
55
+ TlLincolnOta["STAYNMORE"] = "STAYNMORE";
56
+ TlLincolnOta["ALLSTAY"] = "Allstay";
57
+ TlLincolnOta["ROOMIO"] = "Roomio";
58
+ TlLincolnOta["ALLMYTOUR"] = "Allmytour";
59
+ TlLincolnOta["MYREALTRIP"] = "Myrealtrip";
60
+ TlLincolnOta["YANOLJA"] = "Yanolja";
61
+ TlLincolnOta["T_MON"] = "T-mon";
62
+ })(TlLincolnOta || (TlLincolnOta = {}));
63
+ exports.TL_LINCOLN_TO_VENDIT_OTA_MAP = (_a = {},
64
+ _a[TlLincolnOta.JEJU_COM] = 'Jeju.com',
65
+ _a[TlLincolnOta.M12] = 'M12',
66
+ _a[TlLincolnOta.NEW_MY_REAL_TRIP] = '(New)MyRealTrip',
67
+ _a[TlLincolnOta.GAGOPATOUR] = 'Gagopatour',
68
+ _a[TlLincolnOta.BOOKING_DOT_COM] = 'BOOKINGDOTCOM',
69
+ _a[TlLincolnOta.AGODA] = 'AGODA',
70
+ _a[TlLincolnOta.EXPEDIA] = 'EXPEDIA',
71
+ _a[TlLincolnOta.DOTW] = 'DOTW',
72
+ _a[TlLincolnOta.HOTUSA] = 'HOTUSA',
73
+ _a[TlLincolnOta.DIDA_TRAVEL] = 'DIDA TRAVEL',
74
+ _a[TlLincolnOta.TIDESQUARE] = 'TIDESQUARE',
75
+ _a[TlLincolnOta.OH_MY_HOTEL] = 'Ohmyhotel',
76
+ _a[TlLincolnOta.AIRBNB] = 'AIRBNB',
77
+ _a[TlLincolnOta.FLIGGY] = 'FLIGGY',
78
+ _a[TlLincolnOta.HAFH] = 'HAFH',
79
+ _a[TlLincolnOta.SHIJI] = 'SHIJI',
80
+ _a[TlLincolnOta.TRIPLA] = 'TRIPLA',
81
+ _a[TlLincolnOta.D_EDGE] = 'D-EDGE',
82
+ _a[TlLincolnOta.RAKUTEN_TRAVEL_OVERSEAS] = 'RAKUTEN TRAVEL',
83
+ _a[TlLincolnOta.DYNATECH] = 'DYNATECH',
84
+ _a[TlLincolnOta.CTRIP] = 'CTRIP',
85
+ _a[TlLincolnOta.HPDS] = 'HPDS',
86
+ _a[TlLincolnOta.SUITE_SMART] = 'SUITE SMART',
87
+ _a[TlLincolnOta.ORBITZ] = 'ORBITZ',
88
+ _a[TlLincolnOta.HOTELBEDS] = 'HOTELBEDS',
89
+ _a[TlLincolnOta.GTA] = 'GTA',
90
+ _a[TlLincolnOta.KONEST] = 'KONEST',
91
+ _a[TlLincolnOta.SYN_XIS] = 'SynXis',
92
+ _a[TlLincolnOta.HIKARI_GLOBAL] = 'HIKARI GLOBAL',
93
+ _a[TlLincolnOta.HOTELS_COMBINED] = 'HOTELSCOMBINE',
94
+ _a[TlLincolnOta.AHN] = 'AHN',
95
+ _a[TlLincolnOta.HOTEL_N_JOY] = 'HOTELNJOY',
96
+ _a[TlLincolnOta.INTERPARK] = 'INTERPARK',
97
+ _a[TlLincolnOta.ZYX_JQ_TRAVEL] = 'ZYX-JQTravel',
98
+ _a[TlLincolnOta.CODY] = 'Cody',
99
+ _a[TlLincolnOta.COUPANG] = 'COUPANG',
100
+ _a[TlLincolnOta.JTB_JHS] = 'JTB-JHS',
101
+ _a[TlLincolnOta.HOTEL_PASS] = TlLincolnOta.HOTEL_PASS,
102
+ _a[TlLincolnOta.HIS_VACATION] = TlLincolnOta.HIS_VACATION,
103
+ _a[TlLincolnOta.WEBTOUR] = 'WEBTOUR',
104
+ _a[TlLincolnOta.TRIPBTOZ] = 'TRIPBTOZ',
105
+ _a[TlLincolnOta.BAROJABA] = 'BAROJABA',
106
+ _a[TlLincolnOta.DRTRIP] = 'DRTRIP',
107
+ _a[TlLincolnOta.NANUGO] = 'NANUGO',
108
+ _a[TlLincolnOta.ONDA] = 'ONDA',
109
+ _a[TlLincolnOta.GC_COMPANY] = 'YEOGIEOTTAE',
110
+ _a[TlLincolnOta.TRIPTOPAZ] = 'TRIPTOPAZ',
111
+ _a[TlLincolnOta.TAMNAO] = 'TAMNAO',
112
+ _a[TlLincolnOta.STAYNMORE] = 'STAYNMORE',
113
+ _a[TlLincolnOta.ALLSTAY] = 'ALLSTAY',
114
+ _a[TlLincolnOta.ROOMIO] = 'ROOMIO',
115
+ _a[TlLincolnOta.ALLMYTOUR] = 'ALLMYTOUR',
116
+ _a[TlLincolnOta.MYREALTRIP] = 'MYREALTRIP',
117
+ _a[TlLincolnOta.YANOLJA] = 'YANOLJA',
118
+ _a[TlLincolnOta.T_MON] = 'TMON',
119
+ _a);
@@ -0,0 +1,2 @@
1
+ import { FieldValues } from '../types';
2
+ export declare const groupBy: <T extends FieldValues, K extends import("../types").Path<T>>(array: T[], key: K) => Record<string, T[]>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.groupBy = void 0;
4
+ var groupBy = function (array, key) { return array.reduce(function (acc, cur) {
5
+ var keys = key.split('.');
6
+ var lastKey = keys.pop();
7
+ var target = keys.reduce(function (a, k) { return a[k]; }, cur);
8
+ var value = target[lastKey];
9
+ if (!acc[value]) {
10
+ acc[value] = [];
11
+ }
12
+ acc[value].push(cur);
13
+ return acc;
14
+ }, {}); };
15
+ exports.groupBy = groupBy;
package/package.json CHANGED
@@ -1,51 +1,50 @@
1
1
  {
2
- "name": "@vendit-dev/thirdparty-adapters",
3
- "version": "0.7.6",
4
- "description": "Third party adapters between v-cloud and other PMS/CMS providers.",
5
- "main": "lib/index.js",
6
- "scripts": {
7
- "build": "tsc",
8
- "dev": "node ./test/index.js",
9
- "npm-login": "npm login",
10
- "publish": "npm publish"
11
- },
12
- "keywords": [
13
- "vendit"
14
- ],
15
- "author": "Vendit <dev@vendit.co.kr> (https://vendit.co.kr)",
16
- "license": "MIT",
17
- "devDependencies": {
18
- "@babel/cli": "^7.10.5",
19
- "@babel/core": "^7.10.5",
20
- "@babel/node": "^7.10.5",
21
- "@babel/plugin-proposal-class-properties": "^7.10.4",
22
- "@babel/plugin-proposal-optional-chaining": "^7.10.4",
23
- "@babel/preset-env": "^7.10.4",
24
- "@babel/preset-flow": "^7.10.4",
25
- "@types/ioredis": "^5.0.0",
26
- "@types/node": "^20.4.5",
27
- "@types/node-fetch": "^2.6.1",
28
- "@types/npm": "^7.19.1",
29
- "@types/sequelize": "^4.28.15",
30
- "@types/tedious": "^4.0.9",
31
- "@types/validator": "^13.7.17",
32
- "@typescript-eslint/eslint-plugin": "^3.6.1",
33
- "@typescript-eslint/parser": "^3.6.1",
34
- "@vendit-dev/utility-modules": "^0.20.1",
35
- "babel-eslint": "^10.1.0",
36
- "babel-plugin-module-resolver": "^4.0.0",
37
- "cross-env": "^7.0.2",
38
- "eslint": "^7.4.0",
39
- "eslint-config-airbnb-base": "^13.1.0",
40
- "eslint-plugin-import": "^2.16.0",
41
- "typescript": "4.9.3"
42
- },
43
- "dependencies": {
44
- "moment": "^2.29.2",
45
- "node-fetch": "2",
46
- "npm": "6",
47
- "sequelize": "^6.32.1",
48
- "tedious": "6.2.1",
49
- "uuid": "^8.3.2"
50
- }
2
+ "name": "@vendit-dev/thirdparty-adapters",
3
+ "version": "0.7.8",
4
+ "description": "Third party adapters between v-cloud and other PMS/CMS providers.",
5
+ "main": "lib/index.js",
6
+ "scripts": {
7
+ "build": "tsc",
8
+ "dev": "node ./test/tl-lincoln.test.js",
9
+ "npm-login": "npm login",
10
+ "publish": "npm publish"
11
+ },
12
+ "keywords": ["vendit"],
13
+ "author": "Vendit <dev@vendit.co.kr> (https://vendit.co.kr)",
14
+ "license": "MIT",
15
+ "devDependencies": {
16
+ "@babel/cli": "^7.10.5",
17
+ "@babel/core": "^7.10.5",
18
+ "@babel/node": "^7.10.5",
19
+ "@babel/plugin-proposal-class-properties": "^7.10.4",
20
+ "@babel/plugin-proposal-optional-chaining": "^7.10.4",
21
+ "@babel/preset-env": "^7.10.4",
22
+ "@babel/preset-flow": "^7.10.4",
23
+ "@types/ioredis": "^5.0.0",
24
+ "@types/node": "^20.4.5",
25
+ "@types/node-fetch": "^2.6.1",
26
+ "@types/npm": "^7.19.1",
27
+ "@types/sequelize": "^4.28.15",
28
+ "@types/tedious": "^4.0.9",
29
+ "@types/validator": "^13.7.17",
30
+ "@typescript-eslint/eslint-plugin": "^3.6.1",
31
+ "@typescript-eslint/parser": "^3.6.1",
32
+ "@vendit-dev/utility-modules": "^0.20.1",
33
+ "babel-eslint": "^10.1.0",
34
+ "babel-plugin-module-resolver": "^4.0.0",
35
+ "cross-env": "^7.0.2",
36
+ "eslint": "^7.4.0",
37
+ "eslint-config-airbnb-base": "^13.1.0",
38
+ "eslint-plugin-import": "^2.16.0",
39
+ "typescript": "4.9.3"
40
+ },
41
+ "dependencies": {
42
+ "fast-xml-parser": "^4.4.0",
43
+ "moment": "^2.29.2",
44
+ "node-fetch": "2",
45
+ "npm": "6",
46
+ "sequelize": "^6.32.1",
47
+ "tedious": "6.2.1",
48
+ "uuid": "^8.3.2"
49
+ }
51
50
  }
@@ -1 +0,0 @@
1
- export declare function findMinimumNumbersForSum(target: number, numbers: number[]): number[];