@vrplatform/api 1.2.31 → 1.2.33

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 (38) hide show
  1. package/build/main/fetcher.d.ts +18 -0
  2. package/build/main/fetcher.js +68 -0
  3. package/build/main/fetcher.js.map +1 -0
  4. package/build/main/generated/v1.d.ts +12334 -11416
  5. package/build/main/generated/v1.js.map +1 -1
  6. package/build/main/headers.d.ts +18 -0
  7. package/build/main/headers.js +25 -0
  8. package/build/main/headers.js.map +1 -0
  9. package/build/main/ingest-compat/index.d.ts +1 -2
  10. package/build/main/ingest-compat/index.js.map +1 -1
  11. package/build/main/ingest-compat/map.js.map +1 -1
  12. package/build/main/ingest-compat/types.d.ts +4 -12
  13. package/build/main/ingest-compat/types.js.map +1 -1
  14. package/build/main/retryable-errors.d.ts +9 -0
  15. package/build/main/retryable-errors.js +38 -0
  16. package/build/main/retryable-errors.js.map +1 -0
  17. package/build/module/fetcher.d.ts +18 -0
  18. package/build/module/fetcher.js +63 -0
  19. package/build/module/fetcher.js.map +1 -0
  20. package/build/module/generated/v1.d.ts +12334 -11416
  21. package/build/module/generated/v1.js.map +1 -1
  22. package/build/module/headers.d.ts +18 -0
  23. package/build/module/headers.js +23 -0
  24. package/build/module/headers.js.map +1 -0
  25. package/build/module/ingest-compat/index.d.ts +1 -2
  26. package/build/module/ingest-compat/index.js +1 -1
  27. package/build/module/ingest-compat/index.js.map +1 -1
  28. package/build/module/ingest-compat/map.js.map +1 -1
  29. package/build/module/ingest-compat/types.d.ts +4 -12
  30. package/build/module/ingest-compat/types.js.map +1 -1
  31. package/build/module/retryable-errors.d.ts +9 -0
  32. package/build/module/retryable-errors.js +34 -0
  33. package/build/module/retryable-errors.js.map +1 -0
  34. package/package.json +1 -5
  35. package/src/generated/v1.ts +12334 -11416
  36. package/src/ingest-compat/index.ts +7 -2
  37. package/src/ingest-compat/map.ts +10 -10
  38. package/src/ingest-compat/types.ts +4 -66
@@ -1,5 +1,10 @@
1
- import { type PartialBy, usePostSources } from '../ingest';
2
- import type { IngestArg, IngestFnArg, Source } from '../ingest/types';
1
+ import {
2
+ type IngestArg,
3
+ type IngestFnArg,
4
+ type PartialBy,
5
+ type Source,
6
+ usePostSources,
7
+ } from '../ingest';
3
8
  import type { ApiClient } from '../types';
4
9
  import { mapTransform } from './map';
5
10
  import type { ListingInput, PaymentInput, ReservationInput } from './types';
@@ -50,7 +50,7 @@ export const mapTransform = {
50
50
  guests,
51
51
  confirmationCode,
52
52
  lines:
53
- paymentLines?.map<
53
+ (paymentLines as any[])?.map<
54
54
  RequestBody<'post:/reservations/batch'>['data'][0]['lines'][0]
55
55
  >((line) => ({
56
56
  type: line.type2!,
@@ -76,15 +76,15 @@ export const mapTransform = {
76
76
  etaAt,
77
77
  description: description ?? 'Payment',
78
78
  lines:
79
- lines?.map<RequestBody<'post:/payments/batch'>['data'][0]['lines'][0]>(
80
- (line) => ({
81
- type: line.type2!,
82
- amount: line.centTotal || 0,
83
- uniqueRef: line.uniqueRef,
84
- description: line.description,
85
- metadata: line.metadata,
86
- })
87
- ) || [],
79
+ (lines as any[])?.map<
80
+ RequestBody<'post:/payments/batch'>['data'][0]['lines'][0]
81
+ >((line) => ({
82
+ type: line.type2!,
83
+ amount: line.centTotal || 0,
84
+ uniqueRef: line.uniqueRef,
85
+ description: line.description,
86
+ metadata: line.metadata,
87
+ })) || [],
88
88
  }),
89
89
  listing: (item: ListingInput): ListingOutput => {
90
90
  let status =
@@ -1,73 +1,11 @@
1
- import type {
2
- currency_enum,
3
- listing_insert_input,
4
- payment_insert_input,
5
- payment_line_insert_input,
6
- reservation_insert_input,
7
- } from '@finalytic/graphql';
8
1
  import type { RequestBody } from '../types';
9
2
 
10
- export type PaymentLine = Pick<
11
- payment_line_insert_input,
12
- | 'description'
13
- | 'type'
14
- | 'type2'
15
- | 'uniqueRef'
16
- | 'uniqueRef2'
17
- | 'metadata'
18
- | 'centTotal'
19
- | 'originCentTotal'
20
- | 'originCurrency'
21
- | 'originExchangeRate'
22
- | 'reservationId'
23
- >;
3
+ export type PaymentLine = Record<string, any>;
24
4
 
25
- export type ReservationInput = Pick<
26
- reservation_insert_input,
27
- | 'id'
28
- | 'uniqueRef'
29
- | 'status'
30
- | 'nights'
31
- | 'guests'
32
- | 'bookedAt'
33
- | 'checkIn'
34
- | 'cancelledAt'
35
- | 'checkOut'
36
- | 'currency'
37
- | 'bookingPlatform'
38
- | 'bookerName'
39
- | 'guestName'
40
- | 'centTotal'
41
- | 'metadata'
42
- | 'sourceId'
43
- | 'pmsReferenceCode'
44
- | 'listingConnectionId'
45
- > & {
46
- confirmationCode: string;
47
- listingConnectionRef?: string | number;
48
- paymentLines?: PaymentLine[];
49
- };
5
+ export type ReservationInput = Record<string, any>;
50
6
  export type ReservationOutput =
51
7
  RequestBody<'post:/reservations/batch'>['data'][0];
52
- export type PaymentInput = Pick<
53
- payment_insert_input,
54
- | 'id'
55
- | 'centTotal'
56
- | 'etaAt'
57
- | 'payedAt'
58
- | 'tenantId'
59
- | 'status'
60
- | 'description'
61
- | 'metadata'
62
- | 'uniqueRef'
63
- | 'bankAccountDigits'
64
- > & {
65
- currency: currency_enum;
66
- lines?: PaymentLine[];
67
- };
8
+ export type PaymentInput = Record<string, any>;
68
9
  export type PaymentOutput = RequestBody<'post:/payments/batch'>['data'][0];
69
- export type ListingInput = Omit<
70
- listing_insert_input,
71
- 'source' | 'addressRelation'
72
- >;
10
+ export type ListingInput = Record<string, any>;
73
11
  export type ListingOutput = RequestBody<'post:/listings/batch'>['data'][0];