@voyantjs/storefront-react 0.49.0 → 0.50.1
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/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/use-admin-storefront-settings.d.ts +290 -0
- package/dist/hooks/use-admin-storefront-settings.d.ts.map +1 -0
- package/dist/hooks/use-admin-storefront-settings.js +29 -0
- package/dist/hooks/use-storefront-departure-price-preview-mutation.d.ts +209 -0
- package/dist/hooks/use-storefront-departure-price-preview-mutation.d.ts.map +1 -1
- package/dist/hooks/use-storefront-offer-apply-mutation.d.ts +2 -2
- package/dist/hooks/use-storefront-offer-redeem-mutation.d.ts +2 -2
- package/dist/hooks/use-storefront-product-extensions.d.ts +2 -2
- package/dist/hooks/use-storefront-settings.d.ts +41 -2
- package/dist/hooks/use-storefront-settings.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/operations.d.ts +445 -9
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +8 -1
- package/dist/operations.test.d.ts +2 -0
- package/dist/operations.test.d.ts.map +1 -0
- package/dist/operations.test.js +77 -0
- package/dist/query-keys.d.ts +1 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +1 -0
- package/dist/query-options.d.ts +564 -16
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +7 -1
- package/dist/schemas.d.ts +330 -4
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +2 -2
- package/package.json +5 -5
|
@@ -5,17 +5,30 @@ export declare function useStorefrontSettings(options?: UseStorefrontSettingsOpt
|
|
|
5
5
|
data: {
|
|
6
6
|
branding: {
|
|
7
7
|
logoUrl: string | null;
|
|
8
|
+
faviconUrl: string | null;
|
|
9
|
+
brandMarkUrl: string | null;
|
|
10
|
+
primaryColor: string | null;
|
|
11
|
+
accentColor: string | null;
|
|
8
12
|
supportedLanguages: string[];
|
|
9
13
|
};
|
|
10
14
|
support: {
|
|
11
15
|
email: string | null;
|
|
12
16
|
phone: string | null;
|
|
17
|
+
links: {
|
|
18
|
+
label: string;
|
|
19
|
+
url: string;
|
|
20
|
+
}[];
|
|
13
21
|
};
|
|
14
22
|
legal: {
|
|
15
23
|
termsUrl: string | null;
|
|
16
24
|
privacyUrl: string | null;
|
|
25
|
+
cancellationUrl: string | null;
|
|
17
26
|
defaultContractTemplateId: string | null;
|
|
18
27
|
};
|
|
28
|
+
localization: {
|
|
29
|
+
defaultLocale: string | null;
|
|
30
|
+
currencyDisplay: "symbol" | "name" | "code";
|
|
31
|
+
};
|
|
19
32
|
forms: {
|
|
20
33
|
billing: {
|
|
21
34
|
fields: {
|
|
@@ -49,13 +62,39 @@ export declare function useStorefrontSettings(options?: UseStorefrontSettingsOpt
|
|
|
49
62
|
};
|
|
50
63
|
};
|
|
51
64
|
payment: {
|
|
52
|
-
defaultMethod: "voucher" | "bank_transfer" | "
|
|
65
|
+
defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
|
|
53
66
|
methods: {
|
|
54
|
-
code: "voucher" | "bank_transfer" | "
|
|
67
|
+
code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
|
|
55
68
|
label: string;
|
|
56
69
|
description: string | null;
|
|
57
70
|
enabled: boolean;
|
|
58
71
|
}[];
|
|
72
|
+
structure: "split" | "full";
|
|
73
|
+
schedule: {
|
|
74
|
+
percent: number;
|
|
75
|
+
dueInDays: number;
|
|
76
|
+
dueCondition: "after_booking" | "before_departure";
|
|
77
|
+
}[];
|
|
78
|
+
defaultSchedule: {
|
|
79
|
+
depositPercent: number | null;
|
|
80
|
+
balanceDueDaysBeforeDeparture: number | null;
|
|
81
|
+
} | null;
|
|
82
|
+
bankTransfer: {
|
|
83
|
+
dueDays: number | null;
|
|
84
|
+
account: {
|
|
85
|
+
provider: string | null;
|
|
86
|
+
currency: string | null;
|
|
87
|
+
iban: string;
|
|
88
|
+
beneficiary: string;
|
|
89
|
+
bank: string;
|
|
90
|
+
} | null;
|
|
91
|
+
accountHolder: string | null;
|
|
92
|
+
bankName: string | null;
|
|
93
|
+
iban: string | null;
|
|
94
|
+
bic: string | null;
|
|
95
|
+
paymentReference: string | null;
|
|
96
|
+
instructions: string | null;
|
|
97
|
+
} | null;
|
|
59
98
|
};
|
|
60
99
|
};
|
|
61
100
|
}, Error>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-storefront-settings.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-settings.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,4BAAiC
|
|
1
|
+
{"version":3,"file":"use-storefront-settings.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-settings.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,4BAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQ/E"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher, withQueryParams, } from "./client.js";
|
|
2
2
|
export * from "./hooks/index.js";
|
|
3
|
-
export { applyStorefrontOffer, getStorefrontDeparture, getStorefrontDepartureItinerary, getStorefrontOfferBySlug, getStorefrontSettings, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewStorefrontDeparturePrice, redeemStorefrontOffer, } from "./operations.js";
|
|
3
|
+
export { applyStorefrontOffer, getAdminStorefrontSettings, getStorefrontDeparture, getStorefrontDepartureItinerary, getStorefrontOfferBySlug, getStorefrontSettings, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewStorefrontDeparturePrice, redeemStorefrontOffer, updateAdminStorefrontSettings, } from "./operations.js";
|
|
4
4
|
export { useVoyantStorefrontContext, type VoyantStorefrontContextValue, VoyantStorefrontProvider, type VoyantStorefrontProviderProps, } from "./provider.js";
|
|
5
5
|
export { storefrontQueryKeys } from "./query-keys.js";
|
|
6
|
-
export { getStorefrontDepartureItineraryQueryOptions, getStorefrontDepartureQueryOptions, getStorefrontOfferQueryOptions, getStorefrontProductDeparturesQueryOptions, getStorefrontProductExtensionsQueryOptions, getStorefrontProductOffersQueryOptions, getStorefrontSettingsQueryOptions, } from "./query-options.js";
|
|
6
|
+
export { getAdminStorefrontSettingsQueryOptions, getStorefrontDepartureItineraryQueryOptions, getStorefrontDepartureQueryOptions, getStorefrontOfferQueryOptions, getStorefrontProductDeparturesQueryOptions, getStorefrontProductExtensionsQueryOptions, getStorefrontProductOffersQueryOptions, getStorefrontSettingsQueryOptions, } from "./query-options.js";
|
|
7
7
|
export * from "./schemas.js";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,+BAA+B,EAC/B,wBAAwB,EACxB,qBAAqB,EACrB,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B,EAC3B,+BAA+B,EAC/B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,+BAA+B,EAC/B,wBAAwB,EACxB,qBAAqB,EACrB,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B,EAC3B,+BAA+B,EAC/B,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,0BAA0B,EAC1B,KAAK,4BAA4B,EACjC,wBAAwB,EACxB,KAAK,6BAA6B,GACnC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EACL,sCAAsC,EACtC,2CAA2C,EAC3C,kCAAkC,EAClC,8BAA8B,EAC9B,0CAA0C,EAC1C,0CAA0C,EAC1C,sCAAsC,EACtC,iCAAiC,GAClC,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { defaultFetcher, fetchWithValidation, VoyantApiError, withQueryParams, } from "./client.js";
|
|
2
2
|
export * from "./hooks/index.js";
|
|
3
|
-
export { applyStorefrontOffer, getStorefrontDeparture, getStorefrontDepartureItinerary, getStorefrontOfferBySlug, getStorefrontSettings, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewStorefrontDeparturePrice, redeemStorefrontOffer, } from "./operations.js";
|
|
3
|
+
export { applyStorefrontOffer, getAdminStorefrontSettings, getStorefrontDeparture, getStorefrontDepartureItinerary, getStorefrontOfferBySlug, getStorefrontSettings, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewStorefrontDeparturePrice, redeemStorefrontOffer, updateAdminStorefrontSettings, } from "./operations.js";
|
|
4
4
|
export { useVoyantStorefrontContext, VoyantStorefrontProvider, } from "./provider.js";
|
|
5
5
|
export { storefrontQueryKeys } from "./query-keys.js";
|
|
6
|
-
export { getStorefrontDepartureItineraryQueryOptions, getStorefrontDepartureQueryOptions, getStorefrontOfferQueryOptions, getStorefrontProductDeparturesQueryOptions, getStorefrontProductExtensionsQueryOptions, getStorefrontProductOffersQueryOptions, getStorefrontSettingsQueryOptions, } from "./query-options.js";
|
|
6
|
+
export { getAdminStorefrontSettingsQueryOptions, getStorefrontDepartureItineraryQueryOptions, getStorefrontDepartureQueryOptions, getStorefrontOfferQueryOptions, getStorefrontProductDeparturesQueryOptions, getStorefrontProductExtensionsQueryOptions, getStorefrontProductOffersQueryOptions, getStorefrontSettingsQueryOptions, } from "./query-options.js";
|
|
7
7
|
export * from "./schemas.js";
|
package/dist/operations.d.ts
CHANGED
|
@@ -1,20 +1,227 @@
|
|
|
1
1
|
import { type FetchWithValidationOptions } from "./client.js";
|
|
2
|
-
import { type StorefrontDepartureListQuery, type StorefrontDeparturePricePreviewInput, type StorefrontOfferApplyInput, type StorefrontOfferRedeemInput, type StorefrontProductExtensionsQuery, type StorefrontPromotionalOfferListQuery } from "./schemas.js";
|
|
2
|
+
import { type StorefrontDepartureListQuery, type StorefrontDeparturePricePreviewInput, type StorefrontOfferApplyInput, type StorefrontOfferRedeemInput, type StorefrontProductExtensionsQuery, type StorefrontPromotionalOfferListQuery, type StorefrontSettingsPatchInput } from "./schemas.js";
|
|
3
3
|
export declare function getStorefrontSettings(client: FetchWithValidationOptions): Promise<{
|
|
4
4
|
data: {
|
|
5
5
|
branding: {
|
|
6
6
|
logoUrl: string | null;
|
|
7
|
+
faviconUrl: string | null;
|
|
8
|
+
brandMarkUrl: string | null;
|
|
9
|
+
primaryColor: string | null;
|
|
10
|
+
accentColor: string | null;
|
|
7
11
|
supportedLanguages: string[];
|
|
8
12
|
};
|
|
9
13
|
support: {
|
|
10
14
|
email: string | null;
|
|
11
15
|
phone: string | null;
|
|
16
|
+
links: {
|
|
17
|
+
label: string;
|
|
18
|
+
url: string;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
legal: {
|
|
22
|
+
termsUrl: string | null;
|
|
23
|
+
privacyUrl: string | null;
|
|
24
|
+
cancellationUrl: string | null;
|
|
25
|
+
defaultContractTemplateId: string | null;
|
|
26
|
+
};
|
|
27
|
+
localization: {
|
|
28
|
+
defaultLocale: string | null;
|
|
29
|
+
currencyDisplay: "symbol" | "name" | "code";
|
|
30
|
+
};
|
|
31
|
+
forms: {
|
|
32
|
+
billing: {
|
|
33
|
+
fields: {
|
|
34
|
+
key: string;
|
|
35
|
+
label: string;
|
|
36
|
+
type: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
|
|
37
|
+
required: boolean;
|
|
38
|
+
placeholder: string | null;
|
|
39
|
+
description: string | null;
|
|
40
|
+
autocomplete: string | null;
|
|
41
|
+
options: {
|
|
42
|
+
value: string;
|
|
43
|
+
label: string;
|
|
44
|
+
}[];
|
|
45
|
+
}[];
|
|
46
|
+
};
|
|
47
|
+
travelers: {
|
|
48
|
+
fields: {
|
|
49
|
+
key: string;
|
|
50
|
+
label: string;
|
|
51
|
+
type: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
|
|
52
|
+
required: boolean;
|
|
53
|
+
placeholder: string | null;
|
|
54
|
+
description: string | null;
|
|
55
|
+
autocomplete: string | null;
|
|
56
|
+
options: {
|
|
57
|
+
value: string;
|
|
58
|
+
label: string;
|
|
59
|
+
}[];
|
|
60
|
+
}[];
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
payment: {
|
|
64
|
+
defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
|
|
65
|
+
methods: {
|
|
66
|
+
code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
|
|
67
|
+
label: string;
|
|
68
|
+
description: string | null;
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
}[];
|
|
71
|
+
structure: "split" | "full";
|
|
72
|
+
schedule: {
|
|
73
|
+
percent: number;
|
|
74
|
+
dueInDays: number;
|
|
75
|
+
dueCondition: "after_booking" | "before_departure";
|
|
76
|
+
}[];
|
|
77
|
+
defaultSchedule: {
|
|
78
|
+
depositPercent: number | null;
|
|
79
|
+
balanceDueDaysBeforeDeparture: number | null;
|
|
80
|
+
} | null;
|
|
81
|
+
bankTransfer: {
|
|
82
|
+
dueDays: number | null;
|
|
83
|
+
account: {
|
|
84
|
+
provider: string | null;
|
|
85
|
+
currency: string | null;
|
|
86
|
+
iban: string;
|
|
87
|
+
beneficiary: string;
|
|
88
|
+
bank: string;
|
|
89
|
+
} | null;
|
|
90
|
+
accountHolder: string | null;
|
|
91
|
+
bankName: string | null;
|
|
92
|
+
iban: string | null;
|
|
93
|
+
bic: string | null;
|
|
94
|
+
paymentReference: string | null;
|
|
95
|
+
instructions: string | null;
|
|
96
|
+
} | null;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
}>;
|
|
100
|
+
export declare function getAdminStorefrontSettings(client: FetchWithValidationOptions): Promise<{
|
|
101
|
+
data: {
|
|
102
|
+
branding: {
|
|
103
|
+
logoUrl: string | null;
|
|
104
|
+
faviconUrl: string | null;
|
|
105
|
+
brandMarkUrl: string | null;
|
|
106
|
+
primaryColor: string | null;
|
|
107
|
+
accentColor: string | null;
|
|
108
|
+
supportedLanguages: string[];
|
|
109
|
+
};
|
|
110
|
+
support: {
|
|
111
|
+
email: string | null;
|
|
112
|
+
phone: string | null;
|
|
113
|
+
links: {
|
|
114
|
+
label: string;
|
|
115
|
+
url: string;
|
|
116
|
+
}[];
|
|
117
|
+
};
|
|
118
|
+
legal: {
|
|
119
|
+
termsUrl: string | null;
|
|
120
|
+
privacyUrl: string | null;
|
|
121
|
+
cancellationUrl: string | null;
|
|
122
|
+
defaultContractTemplateId: string | null;
|
|
123
|
+
};
|
|
124
|
+
localization: {
|
|
125
|
+
defaultLocale: string | null;
|
|
126
|
+
currencyDisplay: "symbol" | "name" | "code";
|
|
127
|
+
};
|
|
128
|
+
forms: {
|
|
129
|
+
billing: {
|
|
130
|
+
fields: {
|
|
131
|
+
key: string;
|
|
132
|
+
label: string;
|
|
133
|
+
type: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
|
|
134
|
+
required: boolean;
|
|
135
|
+
placeholder: string | null;
|
|
136
|
+
description: string | null;
|
|
137
|
+
autocomplete: string | null;
|
|
138
|
+
options: {
|
|
139
|
+
value: string;
|
|
140
|
+
label: string;
|
|
141
|
+
}[];
|
|
142
|
+
}[];
|
|
143
|
+
};
|
|
144
|
+
travelers: {
|
|
145
|
+
fields: {
|
|
146
|
+
key: string;
|
|
147
|
+
label: string;
|
|
148
|
+
type: "text" | "date" | "select" | "email" | "country" | "tel" | "textarea" | "checkbox";
|
|
149
|
+
required: boolean;
|
|
150
|
+
placeholder: string | null;
|
|
151
|
+
description: string | null;
|
|
152
|
+
autocomplete: string | null;
|
|
153
|
+
options: {
|
|
154
|
+
value: string;
|
|
155
|
+
label: string;
|
|
156
|
+
}[];
|
|
157
|
+
}[];
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
payment: {
|
|
161
|
+
defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
|
|
162
|
+
methods: {
|
|
163
|
+
code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
|
|
164
|
+
label: string;
|
|
165
|
+
description: string | null;
|
|
166
|
+
enabled: boolean;
|
|
167
|
+
}[];
|
|
168
|
+
structure: "split" | "full";
|
|
169
|
+
schedule: {
|
|
170
|
+
percent: number;
|
|
171
|
+
dueInDays: number;
|
|
172
|
+
dueCondition: "after_booking" | "before_departure";
|
|
173
|
+
}[];
|
|
174
|
+
defaultSchedule: {
|
|
175
|
+
depositPercent: number | null;
|
|
176
|
+
balanceDueDaysBeforeDeparture: number | null;
|
|
177
|
+
} | null;
|
|
178
|
+
bankTransfer: {
|
|
179
|
+
dueDays: number | null;
|
|
180
|
+
account: {
|
|
181
|
+
provider: string | null;
|
|
182
|
+
currency: string | null;
|
|
183
|
+
iban: string;
|
|
184
|
+
beneficiary: string;
|
|
185
|
+
bank: string;
|
|
186
|
+
} | null;
|
|
187
|
+
accountHolder: string | null;
|
|
188
|
+
bankName: string | null;
|
|
189
|
+
iban: string | null;
|
|
190
|
+
bic: string | null;
|
|
191
|
+
paymentReference: string | null;
|
|
192
|
+
instructions: string | null;
|
|
193
|
+
} | null;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
}>;
|
|
197
|
+
export declare function updateAdminStorefrontSettings(client: FetchWithValidationOptions, input: StorefrontSettingsPatchInput): Promise<{
|
|
198
|
+
data: {
|
|
199
|
+
branding: {
|
|
200
|
+
logoUrl: string | null;
|
|
201
|
+
faviconUrl: string | null;
|
|
202
|
+
brandMarkUrl: string | null;
|
|
203
|
+
primaryColor: string | null;
|
|
204
|
+
accentColor: string | null;
|
|
205
|
+
supportedLanguages: string[];
|
|
206
|
+
};
|
|
207
|
+
support: {
|
|
208
|
+
email: string | null;
|
|
209
|
+
phone: string | null;
|
|
210
|
+
links: {
|
|
211
|
+
label: string;
|
|
212
|
+
url: string;
|
|
213
|
+
}[];
|
|
12
214
|
};
|
|
13
215
|
legal: {
|
|
14
216
|
termsUrl: string | null;
|
|
15
217
|
privacyUrl: string | null;
|
|
218
|
+
cancellationUrl: string | null;
|
|
16
219
|
defaultContractTemplateId: string | null;
|
|
17
220
|
};
|
|
221
|
+
localization: {
|
|
222
|
+
defaultLocale: string | null;
|
|
223
|
+
currencyDisplay: "symbol" | "name" | "code";
|
|
224
|
+
};
|
|
18
225
|
forms: {
|
|
19
226
|
billing: {
|
|
20
227
|
fields: {
|
|
@@ -48,13 +255,39 @@ export declare function getStorefrontSettings(client: FetchWithValidationOptions
|
|
|
48
255
|
};
|
|
49
256
|
};
|
|
50
257
|
payment: {
|
|
51
|
-
defaultMethod: "voucher" | "bank_transfer" | "
|
|
258
|
+
defaultMethod: "voucher" | "bank_transfer" | "cash" | "invoice" | "card" | null;
|
|
52
259
|
methods: {
|
|
53
|
-
code: "voucher" | "bank_transfer" | "
|
|
260
|
+
code: "voucher" | "bank_transfer" | "cash" | "invoice" | "card";
|
|
54
261
|
label: string;
|
|
55
262
|
description: string | null;
|
|
56
263
|
enabled: boolean;
|
|
57
264
|
}[];
|
|
265
|
+
structure: "split" | "full";
|
|
266
|
+
schedule: {
|
|
267
|
+
percent: number;
|
|
268
|
+
dueInDays: number;
|
|
269
|
+
dueCondition: "after_booking" | "before_departure";
|
|
270
|
+
}[];
|
|
271
|
+
defaultSchedule: {
|
|
272
|
+
depositPercent: number | null;
|
|
273
|
+
balanceDueDaysBeforeDeparture: number | null;
|
|
274
|
+
} | null;
|
|
275
|
+
bankTransfer: {
|
|
276
|
+
dueDays: number | null;
|
|
277
|
+
account: {
|
|
278
|
+
provider: string | null;
|
|
279
|
+
currency: string | null;
|
|
280
|
+
iban: string;
|
|
281
|
+
beneficiary: string;
|
|
282
|
+
bank: string;
|
|
283
|
+
} | null;
|
|
284
|
+
accountHolder: string | null;
|
|
285
|
+
bankName: string | null;
|
|
286
|
+
iban: string | null;
|
|
287
|
+
bic: string | null;
|
|
288
|
+
paymentReference: string | null;
|
|
289
|
+
instructions: string | null;
|
|
290
|
+
} | null;
|
|
58
291
|
};
|
|
59
292
|
};
|
|
60
293
|
}>;
|
|
@@ -171,6 +404,209 @@ export declare function previewStorefrontDeparturePrice(client: FetchWithValidat
|
|
|
171
404
|
quantity: number;
|
|
172
405
|
unitPrice: number;
|
|
173
406
|
}[];
|
|
407
|
+
allocation: {
|
|
408
|
+
slot: {
|
|
409
|
+
id: string;
|
|
410
|
+
productId: string;
|
|
411
|
+
optionId: string | null;
|
|
412
|
+
dateLocal: string | null;
|
|
413
|
+
startAt: string | null;
|
|
414
|
+
endAt: string | null;
|
|
415
|
+
timezone: string;
|
|
416
|
+
status: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
|
|
417
|
+
availabilityState: "cancelled" | "closed" | "sold_out" | "past_cutoff" | "too_early" | "on_request" | "unavailable" | "available";
|
|
418
|
+
capacity: number | null;
|
|
419
|
+
remaining: number | null;
|
|
420
|
+
pastCutoff: boolean;
|
|
421
|
+
tooEarly: boolean;
|
|
422
|
+
};
|
|
423
|
+
pax: {
|
|
424
|
+
adults: number;
|
|
425
|
+
children: number;
|
|
426
|
+
infants: number;
|
|
427
|
+
total: number;
|
|
428
|
+
};
|
|
429
|
+
requestedUnits: {
|
|
430
|
+
unitId: string | null;
|
|
431
|
+
requestRef: string | null;
|
|
432
|
+
name: string;
|
|
433
|
+
unitType: string | null;
|
|
434
|
+
quantity: number;
|
|
435
|
+
pricingMode: string | null;
|
|
436
|
+
unitPrice: number;
|
|
437
|
+
total: number;
|
|
438
|
+
currencyCode: string;
|
|
439
|
+
tierId: string | null;
|
|
440
|
+
}[];
|
|
441
|
+
rooms: {
|
|
442
|
+
unitId: string;
|
|
443
|
+
name: string;
|
|
444
|
+
occupancy: number;
|
|
445
|
+
quantity: number;
|
|
446
|
+
pax: number;
|
|
447
|
+
pricingMode: string | null;
|
|
448
|
+
unitPrice: number;
|
|
449
|
+
total: number;
|
|
450
|
+
currencyCode: string;
|
|
451
|
+
tierId: string | null;
|
|
452
|
+
}[];
|
|
453
|
+
};
|
|
454
|
+
units: {
|
|
455
|
+
unitId: string | null;
|
|
456
|
+
requestRef: string | null;
|
|
457
|
+
name: string;
|
|
458
|
+
unitType: string | null;
|
|
459
|
+
quantity: number;
|
|
460
|
+
pricingMode: string | null;
|
|
461
|
+
unitPrice: number;
|
|
462
|
+
total: number;
|
|
463
|
+
currencyCode: string;
|
|
464
|
+
tierId: string | null;
|
|
465
|
+
}[];
|
|
466
|
+
rooms: {
|
|
467
|
+
unitId: string;
|
|
468
|
+
name: string;
|
|
469
|
+
occupancy: number;
|
|
470
|
+
quantity: number;
|
|
471
|
+
pax: number;
|
|
472
|
+
pricingMode: string | null;
|
|
473
|
+
unitPrice: number;
|
|
474
|
+
total: number;
|
|
475
|
+
currencyCode: string;
|
|
476
|
+
tierId: string | null;
|
|
477
|
+
}[];
|
|
478
|
+
extras: {
|
|
479
|
+
extraId: string;
|
|
480
|
+
name: string;
|
|
481
|
+
required: boolean;
|
|
482
|
+
selectable: boolean;
|
|
483
|
+
selected: boolean;
|
|
484
|
+
pricingMode: "per_booking" | "free" | "included" | "on_request" | "per_person" | "quantity_based";
|
|
485
|
+
quantity: number;
|
|
486
|
+
unitPrice: number;
|
|
487
|
+
total: number;
|
|
488
|
+
currencyCode: string;
|
|
489
|
+
}[];
|
|
490
|
+
offers: {
|
|
491
|
+
available: {
|
|
492
|
+
offer: {
|
|
493
|
+
id: string;
|
|
494
|
+
name: string;
|
|
495
|
+
slug: string | null;
|
|
496
|
+
description: string | null;
|
|
497
|
+
discountType: "percentage" | "fixed_amount";
|
|
498
|
+
discountValue: string;
|
|
499
|
+
currency: string | null;
|
|
500
|
+
applicableProductIds: string[];
|
|
501
|
+
applicableDepartureIds: string[];
|
|
502
|
+
validFrom: string | null;
|
|
503
|
+
validTo: string | null;
|
|
504
|
+
minTravelers: number | null;
|
|
505
|
+
imageMobileUrl: string | null;
|
|
506
|
+
imageDesktopUrl: string | null;
|
|
507
|
+
stackable: boolean;
|
|
508
|
+
createdAt: string;
|
|
509
|
+
updatedAt: string;
|
|
510
|
+
};
|
|
511
|
+
status: "applied" | "not_applicable" | "conflict";
|
|
512
|
+
reason: "currency" | "conflict" | "min_pax" | "no_discount" | null;
|
|
513
|
+
selected: boolean;
|
|
514
|
+
discountAppliedCents: number;
|
|
515
|
+
discountedPriceCents: number;
|
|
516
|
+
}[];
|
|
517
|
+
requested: {
|
|
518
|
+
kind: "slug" | "code";
|
|
519
|
+
value: string;
|
|
520
|
+
result: {
|
|
521
|
+
status: "applied" | "not_applicable" | "conflict" | "invalid";
|
|
522
|
+
reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "min_pax" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "session_mismatch" | null;
|
|
523
|
+
offer: {
|
|
524
|
+
id: string;
|
|
525
|
+
name: string;
|
|
526
|
+
slug: string | null;
|
|
527
|
+
description: string | null;
|
|
528
|
+
discountType: "percentage" | "fixed_amount";
|
|
529
|
+
discountValue: string;
|
|
530
|
+
currency: string | null;
|
|
531
|
+
applicableProductIds: string[];
|
|
532
|
+
applicableDepartureIds: string[];
|
|
533
|
+
validFrom: string | null;
|
|
534
|
+
validTo: string | null;
|
|
535
|
+
minTravelers: number | null;
|
|
536
|
+
imageMobileUrl: string | null;
|
|
537
|
+
imageDesktopUrl: string | null;
|
|
538
|
+
stackable: boolean;
|
|
539
|
+
createdAt: string;
|
|
540
|
+
updatedAt: string;
|
|
541
|
+
} | null;
|
|
542
|
+
target: {
|
|
543
|
+
bookingId: string | null;
|
|
544
|
+
sessionId: string | null;
|
|
545
|
+
productId: string;
|
|
546
|
+
departureId: string | null;
|
|
547
|
+
};
|
|
548
|
+
pricing: {
|
|
549
|
+
basePriceCents: number;
|
|
550
|
+
currency: string;
|
|
551
|
+
discountAppliedCents: number;
|
|
552
|
+
discountedPriceCents: number;
|
|
553
|
+
};
|
|
554
|
+
appliedOffers: {
|
|
555
|
+
offerId: string;
|
|
556
|
+
offerName: string;
|
|
557
|
+
discountAppliedCents: number;
|
|
558
|
+
discountedPriceCents: number;
|
|
559
|
+
currency: string;
|
|
560
|
+
discountKind: "percentage" | "fixed_amount";
|
|
561
|
+
discountPercent: number | null;
|
|
562
|
+
discountAmountCents: number | null;
|
|
563
|
+
appliedCode: string | null;
|
|
564
|
+
stackable: boolean;
|
|
565
|
+
}[];
|
|
566
|
+
conflict: {
|
|
567
|
+
policy: "best_discount_wins" | "stackable_compose";
|
|
568
|
+
autoAppliedOfferIds: string[];
|
|
569
|
+
manualOfferId: string | null;
|
|
570
|
+
selectedOfferIds: string[];
|
|
571
|
+
message: string;
|
|
572
|
+
} | null;
|
|
573
|
+
} | null;
|
|
574
|
+
}[];
|
|
575
|
+
applied: {
|
|
576
|
+
offerId: string;
|
|
577
|
+
offerName: string;
|
|
578
|
+
discountAppliedCents: number;
|
|
579
|
+
discountedPriceCents: number;
|
|
580
|
+
currency: string;
|
|
581
|
+
discountKind: "percentage" | "fixed_amount";
|
|
582
|
+
discountPercent: number | null;
|
|
583
|
+
discountAmountCents: number | null;
|
|
584
|
+
appliedCode: string | null;
|
|
585
|
+
stackable: boolean;
|
|
586
|
+
}[];
|
|
587
|
+
conflict: {
|
|
588
|
+
policy: "best_discount_wins" | "stackable_compose";
|
|
589
|
+
autoAppliedOfferIds: string[];
|
|
590
|
+
manualOfferId: string | null;
|
|
591
|
+
selectedOfferIds: string[];
|
|
592
|
+
message: string;
|
|
593
|
+
} | null;
|
|
594
|
+
discountTotal: number;
|
|
595
|
+
discountTotalCents: number;
|
|
596
|
+
totalAfterDiscount: number;
|
|
597
|
+
currencyCode: string;
|
|
598
|
+
};
|
|
599
|
+
totals: {
|
|
600
|
+
currencyCode: string;
|
|
601
|
+
base: number;
|
|
602
|
+
extras: number;
|
|
603
|
+
subtotal: number;
|
|
604
|
+
discount: number;
|
|
605
|
+
tax: number;
|
|
606
|
+
total: number;
|
|
607
|
+
perPerson: number;
|
|
608
|
+
perBooking: number;
|
|
609
|
+
};
|
|
174
610
|
};
|
|
175
611
|
}>;
|
|
176
612
|
export declare function listStorefrontProductExtensions(client: FetchWithValidationOptions, productId: string, query?: StorefrontProductExtensionsQuery): Promise<{
|
|
@@ -185,7 +621,7 @@ export declare function listStorefrontProductExtensions(client: FetchWithValidat
|
|
|
185
621
|
thumb: string | null;
|
|
186
622
|
pricePerPerson: number | null;
|
|
187
623
|
currencyCode: string;
|
|
188
|
-
pricingMode: "
|
|
624
|
+
pricingMode: "per_booking" | "free" | "included" | "on_request" | "per_person" | "quantity_based";
|
|
189
625
|
defaultQuantity: number | null;
|
|
190
626
|
minQuantity: number | null;
|
|
191
627
|
maxQuantity: number | null;
|
|
@@ -201,7 +637,7 @@ export declare function listStorefrontProductExtensions(client: FetchWithValidat
|
|
|
201
637
|
thumb: string | null;
|
|
202
638
|
pricePerPerson: number | null;
|
|
203
639
|
currencyCode: string;
|
|
204
|
-
pricingMode: "
|
|
640
|
+
pricingMode: "per_booking" | "free" | "included" | "on_request" | "per_person" | "quantity_based";
|
|
205
641
|
defaultQuantity: number | null;
|
|
206
642
|
minQuantity: number | null;
|
|
207
643
|
maxQuantity: number | null;
|
|
@@ -278,8 +714,8 @@ export declare function getStorefrontOfferBySlug(client: FetchWithValidationOpti
|
|
|
278
714
|
}>;
|
|
279
715
|
export declare function applyStorefrontOffer(client: FetchWithValidationOptions, slug: string, input: StorefrontOfferApplyInput): Promise<{
|
|
280
716
|
data: {
|
|
281
|
-
status: "
|
|
282
|
-
reason: "scope" | "currency" | "
|
|
717
|
+
status: "applied" | "not_applicable" | "conflict" | "invalid";
|
|
718
|
+
reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "min_pax" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "session_mismatch" | null;
|
|
283
719
|
offer: {
|
|
284
720
|
id: string;
|
|
285
721
|
name: string;
|
|
@@ -334,8 +770,8 @@ export declare function applyStorefrontOffer(client: FetchWithValidationOptions,
|
|
|
334
770
|
}>;
|
|
335
771
|
export declare function redeemStorefrontOffer(client: FetchWithValidationOptions, input: StorefrontOfferRedeemInput): Promise<{
|
|
336
772
|
data: {
|
|
337
|
-
status: "
|
|
338
|
-
reason: "scope" | "currency" | "
|
|
773
|
+
status: "applied" | "not_applicable" | "conflict" | "invalid";
|
|
774
|
+
reason: "scope" | "currency" | "booking_mismatch" | "conflict" | "min_pax" | "no_discount" | "offer_not_found" | "offer_expired" | "offer_not_yet_valid" | "code_not_found" | "code_required" | "code_expired" | "code_not_yet_valid" | "session_mismatch" | null;
|
|
339
775
|
offer: {
|
|
340
776
|
id: string;
|
|
341
777
|
name: string;
|
package/dist/operations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,0BAA0B,EAAwC,MAAM,aAAa,CAAA;AACnG,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,oCAAoC,EACzC,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,mCAAmC,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,0BAA0B,EAAwC,MAAM,aAAa,CAAA;AACnG,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,oCAAoC,EACzC,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,EAclC,MAAM,cAAc,CAAA;AAErB,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEvE;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM5E;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,0BAA0B,EAClC,KAAK,EAAE,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUpC;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM7F;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOrC;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAU5C;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOzC;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;;GAOpB;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,mCAAmC;;;;;;;;;;;;;;;;;;;;GAO5C;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,0BAA0B,EAClC,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,IAAI,CAAC,mCAAmC,EAAE,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;GAO5D;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,0BAA0B,EAClC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAUjC;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,0BAA0B,EAClC,KAAK,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAalC"}
|
package/dist/operations.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { fetchWithValidation, withQueryParams } from "./client.js";
|
|
3
|
-
import { storefrontDepartureItineraryResponseSchema, storefrontDepartureListResponseSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewResponseSchema, storefrontDepartureResponseSchema, storefrontOfferApplyInputSchema, storefrontOfferMutationResponseSchema, storefrontOfferRedeemInputSchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListResponseSchema, storefrontPromotionalOfferResponseSchema, storefrontSettingsResponseSchema, } from "./schemas.js";
|
|
3
|
+
import { storefrontDepartureItineraryResponseSchema, storefrontDepartureListResponseSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewResponseSchema, storefrontDepartureResponseSchema, storefrontOfferApplyInputSchema, storefrontOfferMutationResponseSchema, storefrontOfferRedeemInputSchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListResponseSchema, storefrontPromotionalOfferResponseSchema, storefrontSettingsPatchSchema, storefrontSettingsResponseSchema, } from "./schemas.js";
|
|
4
4
|
export function getStorefrontSettings(client) {
|
|
5
5
|
return fetchWithValidation("/v1/public/settings", storefrontSettingsResponseSchema, client);
|
|
6
6
|
}
|
|
7
|
+
export function getAdminStorefrontSettings(client) {
|
|
8
|
+
return fetchWithValidation("/v1/admin/storefront/settings", storefrontSettingsResponseSchema, client);
|
|
9
|
+
}
|
|
10
|
+
export function updateAdminStorefrontSettings(client, input) {
|
|
11
|
+
const parsed = storefrontSettingsPatchSchema.parse(input);
|
|
12
|
+
return fetchWithValidation("/v1/admin/storefront/settings", storefrontSettingsResponseSchema, client, { method: "PATCH", body: JSON.stringify(parsed) });
|
|
13
|
+
}
|
|
7
14
|
export function getStorefrontDeparture(client, departureId) {
|
|
8
15
|
return fetchWithValidation(`/v1/public/departures/${departureId}`, storefrontDepartureResponseSchema, client);
|
|
9
16
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.test.d.ts","sourceRoot":"","sources":["../src/operations.test.ts"],"names":[],"mappings":""}
|