@v-office/website-sdk 2.16.2 → 2.16.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/cli.mjs CHANGED
@@ -16,7 +16,7 @@ var CLICheckFailed = class extends Error {
16
16
  const toCLIError = (message, cause) => cause instanceof Error ? new CLICheckFailed(`${message}: ${cause.message}`, { cause }) : new CLICheckFailed(message, { cause });
17
17
  //#endregion
18
18
  //#region package.json
19
- var version = "2.16.2";
19
+ var version = "2.16.3";
20
20
  //#endregion
21
21
  //#region src/cli/output.ts
22
22
  const toJson = (value) => Effect.try({
@@ -4,6 +4,7 @@ This file is the versioned changelog index for the website SDK instructions.
4
4
 
5
5
  ## Versions
6
6
 
7
+ - `versions/2.16.3/CHANGELOG.md`: `@v-office/website-sdk` 2.16.3 release notes.
7
8
  - `versions/2.16.2/CHANGELOG.md`: `@v-office/website-sdk` 2.16.2 documentation release notes.
8
9
  - `versions/2.16.1/CHANGELOG.md`: `@v-office/website-sdk` 2.16.1 release notes.
9
10
  - `versions/2.16.0/CHANGELOG.md`: `@v-office/website-sdk` 2.16.0 release notes.
@@ -4,6 +4,7 @@ This file is the versioned migration index for the website SDK instructions.
4
4
 
5
5
  ## Available Guides
6
6
 
7
+ - `versions/2.16.3/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.2 to 2.16.3.
7
8
  - `versions/2.16.2/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.1 to 2.16.2.
8
9
  - `versions/2.16.1/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.0 to 2.16.1.
9
10
  - `versions/2.16.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.15.0 to 2.16.0.
@@ -1,7 +1,7 @@
1
1
  # Website SDK Instructions
2
2
 
3
3
  These instructions describe the current source targeted for
4
- `@v-office/website-sdk` 2.16.2. Package versions remain unchanged until the release
4
+ `@v-office/website-sdk` 2.16.3. Package versions remain unchanged until the release
5
5
  workflow performs the coordinated core and website bumps.
6
6
 
7
7
  Use this directory as the consumer-facing reference for the package:
@@ -18,6 +18,8 @@ Use this directory as the consumer-facing reference for the package:
18
18
  - `document-structured-json.md`: `sdk.static.documents.getTermsAndPrivacyPolicy` and structured document JSON rendering rules.
19
19
  - `CHANGELOG.md`: versioned changelog index.
20
20
  - `MIGRATION.md`: versioned migration index.
21
+ - `versions/2.16.3/`: 2.16.3 browser-origin resolution for relative payment
22
+ return URLs and the 2.16.2-to-2.16.3 migration guide.
21
23
  - `versions/2.16.2/`: 2.16.2 documentation release notes and migration guide.
22
24
  - `versions/2.16.1/`: 2.16.1 v10 multi-rate resolution restricted to rent rates,
23
25
  restored additional-service availability, and the 2.16.0-to-2.16.1 migration
@@ -68,6 +68,10 @@ const booking = await sdk.live.booking.book({
68
68
  `kind: "OPTION"` creates an option booking on v10 and legacy v9. Omitting `kind`,
69
69
  or passing `"CONFIRMED"`, retains the existing confirmed-booking behavior.
70
70
  `relativeRedirectUrl` is used for online payment redirects after booking creation.
71
+ In a browser, the SDK resolves a relative value against `window.location.origin`
72
+ before initializing a v10 Adyen payment. An absolute HTTP or HTTPS URL is passed
73
+ through unchanged. Server-side callers must provide an absolute HTTP or HTTPS URL
74
+ because no browser origin is available.
71
75
 
72
76
  ## Output
73
77
 
@@ -167,7 +171,13 @@ try {
167
171
 
168
172
  ## Payment Return
169
173
 
170
- Online payment providers return the guest to a URL derived from `relativeRedirectUrl`. Stripe returns to that path with `payment=stripe&success=true` after payment and `payment=stripe&cancel=true` after cancellation, so the path must exist in your site and should read those query parameters.
174
+ Online payment providers return the guest to a URL derived from
175
+ `relativeRedirectUrl`. A relative value such as `/booking/payment-return` uses
176
+ the active browser origin, including `http://localhost:<port>` during local
177
+ development and the deployed website origin in production. Stripe returns to
178
+ that path with `payment=stripe&success=true` after payment and
179
+ `payment=stripe&cancel=true` after cancellation, so the path must exist in your
180
+ site and should read those query parameters.
171
181
 
172
182
  `relativeRedirectUrl` is supplied before the reservation exists, so the return URL cannot carry the booking number. Persist whatever the return page needs, for example in `sessionStorage`, before submitting a payment option.
173
183
 
@@ -0,0 +1,31 @@
1
+ # Changelog: 2.16.3
2
+
3
+ This release fixes v10 Adyen payment return URLs when booking is initiated with
4
+ a relative `relativeRedirectUrl`.
5
+
6
+ ## Fixed
7
+
8
+ - Relative payment return URLs are resolved against `window.location.origin`
9
+ before the SDK initializes an Adyen payment.
10
+ - Adyen receives the website's complete return URL instead of an unresolved
11
+ path that could be interpreted relative to the payment provider's origin.
12
+ - Local development can initialize test payments with return URLs such as
13
+ `http://localhost:4321/booking/payment-return`.
14
+
15
+ ## Unchanged
16
+
17
+ - `sdk.live.booking.book`, its input, and its output keep the same public types.
18
+ - Existing relative values such as `/booking/payment-return` require no code
19
+ changes.
20
+ - Absolute HTTP and HTTPS return URLs continue to be passed through unchanged.
21
+ - Legacy v9 booking and payment behavior is unchanged.
22
+
23
+ ## Compatibility
24
+
25
+ - No consumer code change is required. Upgrade the website SDK and refresh the
26
+ lockfile.
27
+ - Browser callers can keep supplying a site-relative return path. Server-side
28
+ callers must supply an absolute HTTP or HTTPS URL because no browser origin is
29
+ available.
30
+
31
+ See `versions/2.16.3/MIGRATION.md` and `../../booking.md`.
@@ -0,0 +1,51 @@
1
+ # Migration: 2.16.2 to 2.16.3
2
+
3
+ 2.16.3 fixes relative v10 Adyen payment return URLs through
4
+ `@v-office/sdk-core` 1.16.2. No public type, service call, input, or result shape
5
+ changes.
6
+
7
+ ## 1. Upgrade
8
+
9
+ ```sh
10
+ pnpm add @v-office/website-sdk@2.16.3
11
+ ```
12
+
13
+ Refresh the lockfile so the website SDK resolves `@v-office/sdk-core` 1.16.2.
14
+
15
+ ## 2. Keep the Existing Return Path
16
+
17
+ No application code change is required. Existing relative return paths continue
18
+ to work:
19
+
20
+ ```ts
21
+ const booking = await sdk.live.booking.book({
22
+ quote,
23
+ contact,
24
+ relativeRedirectUrl: "/booking/payment-return",
25
+ });
26
+ ```
27
+
28
+ In a browser, the SDK now resolves that path against `window.location.origin`.
29
+ For example:
30
+
31
+ ```text
32
+ http://localhost:4321 + /booking/payment-return
33
+ → http://localhost:4321/booking/payment-return
34
+ ```
35
+
36
+ Absolute HTTP and HTTPS return URLs remain unchanged. Server-side callers must
37
+ provide an absolute URL because `window.location.origin` is unavailable.
38
+
39
+ ## Required Consumer Work
40
+
41
+ None beyond upgrading the dependency and refreshing the lockfile.
42
+
43
+ ## Recommended Verification
44
+
45
+ 1. Start the website locally and create a deliberate v10 test booking.
46
+ 2. Confirm the Adyen initiation request contains the local website origin in its
47
+ `redirectUrl`.
48
+ 3. Complete or cancel the hosted test payment and confirm the browser returns to
49
+ the local payment-return page.
50
+ 4. Confirm a deployed website uses its own active origin for the same relative
51
+ return path.
@@ -4,6 +4,7 @@ This file is the versioned changelog index for the website SDK instructions.
4
4
 
5
5
  ## Versions
6
6
 
7
+ - `versions/2.16.3/CHANGELOG.md`: `@v-office/website-sdk` 2.16.3 release notes.
7
8
  - `versions/2.16.2/CHANGELOG.md`: `@v-office/website-sdk` 2.16.2 documentation release notes.
8
9
  - `versions/2.16.1/CHANGELOG.md`: `@v-office/website-sdk` 2.16.1 release notes.
9
10
  - `versions/2.16.0/CHANGELOG.md`: `@v-office/website-sdk` 2.16.0 release notes.
@@ -4,6 +4,7 @@ This file is the versioned migration index for the website SDK instructions.
4
4
 
5
5
  ## Available Guides
6
6
 
7
+ - `versions/2.16.3/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.2 to 2.16.3.
7
8
  - `versions/2.16.2/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.1 to 2.16.2.
8
9
  - `versions/2.16.1/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.16.0 to 2.16.1.
9
10
  - `versions/2.16.0/MIGRATION.md`: migrate from `@v-office/website-sdk` 2.15.0 to 2.16.0.
@@ -1,7 +1,7 @@
1
1
  # Website SDK Instructions
2
2
 
3
3
  These instructions describe the current source targeted for
4
- `@v-office/website-sdk` 2.16.2. Package versions remain unchanged until the release
4
+ `@v-office/website-sdk` 2.16.3. Package versions remain unchanged until the release
5
5
  workflow performs the coordinated core and website bumps.
6
6
 
7
7
  Use this directory as the consumer-facing reference for the package:
@@ -18,6 +18,8 @@ Use this directory as the consumer-facing reference for the package:
18
18
  - `document-structured-json.md`: `sdk.static.documents.getTermsAndPrivacyPolicy` and structured document JSON rendering rules.
19
19
  - `CHANGELOG.md`: versioned changelog index.
20
20
  - `MIGRATION.md`: versioned migration index.
21
+ - `versions/2.16.3/`: 2.16.3 browser-origin resolution for relative payment
22
+ return URLs and the 2.16.2-to-2.16.3 migration guide.
21
23
  - `versions/2.16.2/`: 2.16.2 documentation release notes and migration guide.
22
24
  - `versions/2.16.1/`: 2.16.1 v10 multi-rate resolution restricted to rent rates,
23
25
  restored additional-service availability, and the 2.16.0-to-2.16.1 migration
@@ -68,6 +68,10 @@ const booking = await sdk.live.booking.book({
68
68
  `kind: "OPTION"` creates an option booking on v10 and legacy v9. Omitting `kind`,
69
69
  or passing `"CONFIRMED"`, retains the existing confirmed-booking behavior.
70
70
  `relativeRedirectUrl` is used for online payment redirects after booking creation.
71
+ In a browser, the SDK resolves a relative value against `window.location.origin`
72
+ before initializing a v10 Adyen payment. An absolute HTTP or HTTPS URL is passed
73
+ through unchanged. Server-side callers must provide an absolute HTTP or HTTPS URL
74
+ because no browser origin is available.
71
75
 
72
76
  ## Output
73
77
 
@@ -167,7 +171,13 @@ try {
167
171
 
168
172
  ## Payment Return
169
173
 
170
- Online payment providers return the guest to a URL derived from `relativeRedirectUrl`. Stripe returns to that path with `payment=stripe&success=true` after payment and `payment=stripe&cancel=true` after cancellation, so the path must exist in your site and should read those query parameters.
174
+ Online payment providers return the guest to a URL derived from
175
+ `relativeRedirectUrl`. A relative value such as `/booking/payment-return` uses
176
+ the active browser origin, including `http://localhost:<port>` during local
177
+ development and the deployed website origin in production. Stripe returns to
178
+ that path with `payment=stripe&success=true` after payment and
179
+ `payment=stripe&cancel=true` after cancellation, so the path must exist in your
180
+ site and should read those query parameters.
171
181
 
172
182
  `relativeRedirectUrl` is supplied before the reservation exists, so the return URL cannot carry the booking number. Persist whatever the return page needs, for example in `sessionStorage`, before submitting a payment option.
173
183
 
@@ -0,0 +1,31 @@
1
+ # Changelog: 2.16.3
2
+
3
+ This release fixes v10 Adyen payment return URLs when booking is initiated with
4
+ a relative `relativeRedirectUrl`.
5
+
6
+ ## Fixed
7
+
8
+ - Relative payment return URLs are resolved against `window.location.origin`
9
+ before the SDK initializes an Adyen payment.
10
+ - Adyen receives the website's complete return URL instead of an unresolved
11
+ path that could be interpreted relative to the payment provider's origin.
12
+ - Local development can initialize test payments with return URLs such as
13
+ `http://localhost:4321/booking/payment-return`.
14
+
15
+ ## Unchanged
16
+
17
+ - `sdk.live.booking.book`, its input, and its output keep the same public types.
18
+ - Existing relative values such as `/booking/payment-return` require no code
19
+ changes.
20
+ - Absolute HTTP and HTTPS return URLs continue to be passed through unchanged.
21
+ - Legacy v9 booking and payment behavior is unchanged.
22
+
23
+ ## Compatibility
24
+
25
+ - No consumer code change is required. Upgrade the website SDK and refresh the
26
+ lockfile.
27
+ - Browser callers can keep supplying a site-relative return path. Server-side
28
+ callers must supply an absolute HTTP or HTTPS URL because no browser origin is
29
+ available.
30
+
31
+ See `versions/2.16.3/MIGRATION.md` and `../../booking.md`.
@@ -0,0 +1,51 @@
1
+ # Migration: 2.16.2 to 2.16.3
2
+
3
+ 2.16.3 fixes relative v10 Adyen payment return URLs through
4
+ `@v-office/sdk-core` 1.16.2. No public type, service call, input, or result shape
5
+ changes.
6
+
7
+ ## 1. Upgrade
8
+
9
+ ```sh
10
+ pnpm add @v-office/website-sdk@2.16.3
11
+ ```
12
+
13
+ Refresh the lockfile so the website SDK resolves `@v-office/sdk-core` 1.16.2.
14
+
15
+ ## 2. Keep the Existing Return Path
16
+
17
+ No application code change is required. Existing relative return paths continue
18
+ to work:
19
+
20
+ ```ts
21
+ const booking = await sdk.live.booking.book({
22
+ quote,
23
+ contact,
24
+ relativeRedirectUrl: "/booking/payment-return",
25
+ });
26
+ ```
27
+
28
+ In a browser, the SDK now resolves that path against `window.location.origin`.
29
+ For example:
30
+
31
+ ```text
32
+ http://localhost:4321 + /booking/payment-return
33
+ → http://localhost:4321/booking/payment-return
34
+ ```
35
+
36
+ Absolute HTTP and HTTPS return URLs remain unchanged. Server-side callers must
37
+ provide an absolute URL because `window.location.origin` is unavailable.
38
+
39
+ ## Required Consumer Work
40
+
41
+ None beyond upgrading the dependency and refreshing the lockfile.
42
+
43
+ ## Recommended Verification
44
+
45
+ 1. Start the website locally and create a deliberate v10 test booking.
46
+ 2. Confirm the Adyen initiation request contains the local website origin in its
47
+ `redirectUrl`.
48
+ 3. Complete or cancel the hosted test payment and confirm the browser returns to
49
+ the local payment-return page.
50
+ 4. Confirm a deployed website uses its own active origin for the same relative
51
+ return path.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v-office/website-sdk",
3
- "version": "2.16.2",
3
+ "version": "2.16.3",
4
4
  "description": "Website-facing SDK facade backed by @v-office/sdk-core",
5
5
  "bin": {
6
6
  "website-sdk": "./dist/cli.mjs"
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@graphql-typed-document-node/core": "3.2.0",
45
- "@v-office/sdk-core": "^1.16.1",
45
+ "@v-office/sdk-core": "^1.16.2",
46
46
  "effect": "4.0.0-beta.85",
47
47
  "graphql": "17.0.2",
48
48
  "yaml": "^2.9.0"