From 778ff3f3c0a4a78882ab28ecaee3e80efde83b5b Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 15 Apr 2026 14:42:33 -0400 Subject: [PATCH 1/4] Add stripe generated api calls. THIS WILL NEED TO BE REGENERATED WHEN STRIPE MAKES IT TO DEV --- web/src/__generated__/apis/PaymentsApi.ts | 171 ++++++++++++++++++ .../schemas/StripeWebhookRequest.ts | 9 + .../schemas/StripeWebhookResponse.ts | 8 + 3 files changed, 188 insertions(+) create mode 100644 web/src/__generated__/schemas/StripeWebhookRequest.ts create mode 100644 web/src/__generated__/schemas/StripeWebhookResponse.ts diff --git a/web/src/__generated__/apis/PaymentsApi.ts b/web/src/__generated__/apis/PaymentsApi.ts index 24e31dbf9f..5c997e63d0 100644 --- a/web/src/__generated__/apis/PaymentsApi.ts +++ b/web/src/__generated__/apis/PaymentsApi.ts @@ -26,6 +26,8 @@ import type { LocalizedPriceMap } from '@/__generated__/schemas/LocalizedPriceMa import type { PaymentResultResponse } from '@/__generated__/schemas/PaymentResultResponse'; import type { SteamAuthRequest } from '@/__generated__/schemas/SteamAuthRequest'; import type { SteamOrderInfoResponse } from '@/__generated__/schemas/SteamOrderInfoResponse'; +import type { StripeWebhookRequest } from '@/__generated__/schemas/StripeWebhookRequest'; +import type { StripeWebhookResponse } from '@/__generated__/schemas/StripeWebhookResponse'; import type { SubscriptionVerificationResponse } from '@/__generated__/schemas/SubscriptionVerificationResponse'; import type { TrackPurchaseRequest } from '@/__generated__/schemas/TrackPurchaseRequest'; import type { VerifyPurchaseRequest } from '@/__generated__/schemas/VerifyPurchaseRequest'; @@ -212,6 +214,30 @@ export async function paymentsPostFacebookPurchaseCompleteBasic(requester: HttpR }); } +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `CancelPurchaseRequest` instance to use for the API request + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function paymentsPostStripePurchaseCancelBasic(requester: HttpRequester, payload: CancelPurchaseRequest, gamertag?: string): Promise> { + let endpoint = "/basic/payments/stripe/purchase/cancel"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + /** * @remarks * **Authentication:** @@ -295,6 +321,25 @@ export async function paymentsPostGoogleplayPurchaseCompleteBasic(requester: Htt }); } +/** + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `CompletePurchaseRequest` instance to use for the API request + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function paymentsPostStripePurchaseCompleteBasic(requester: HttpRequester, payload: CompletePurchaseRequest, gamertag?: string): Promise> { + let endpoint = "/basic/payments/stripe/purchase/complete"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag + }); +} + /** * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `TrackPurchaseRequest` instance to use for the API request @@ -362,6 +407,25 @@ export async function paymentsPostItunesPurchaseBeginBasic(requester: HttpReques }); } +/** + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `StripeWebhookRequest` instance to use for the API request + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function paymentsPostStripeWebhookBasic(requester: HttpRequester, payload: StripeWebhookRequest, gamertag?: string): Promise> { + let endpoint = "/basic/payments/stripe/webhook"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag + }); +} + /** * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `VerifyPurchaseRequest` instance to use for the API request @@ -612,6 +676,46 @@ export async function paymentsPostTestPurchaseFailBasic(requester: HttpRequester }); } +/** + * @param requester - The `HttpRequester` type to use for the API request. + * @param sku - The `sku` parameter to include in the API request. + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function paymentsGetStripeProductBasic(requester: HttpRequester, sku: string, gamertag?: string): Promise> { + let endpoint = "/basic/payments/stripe/product"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: GET, + q: { + sku + }, + g: gamertag + }); +} + +/** + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `VerifyPurchaseRequest` instance to use for the API request + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function paymentsPostStripePurchaseVerifyBasic(requester: HttpRequester, payload: VerifyPurchaseRequest, gamertag?: string): Promise> { + let endpoint = "/basic/payments/stripe/purchase/verify"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag + }); +} + /** * @remarks * **Authentication:** @@ -850,6 +954,30 @@ export async function paymentsGetWindowsProductBasic(requester: HttpRequester, s }); } +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `FailPurchaseRequest` instance to use for the API request + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function paymentsPostStripePurchaseFailBasic(requester: HttpRequester, payload: FailPurchaseRequest, gamertag?: string): Promise> { + let endpoint = "/basic/payments/stripe/purchase/fail"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + /** * @remarks * **Authentication:** @@ -874,6 +1002,30 @@ export async function paymentsPostGoogleplayPurchaseFailBasic(requester: HttpReq }); } +/** + * @remarks + * **Authentication:** + * This method requires a valid bearer token in the `Authorization` header. + * + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `BeginPurchaseRequest` instance to use for the API request + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function paymentsPostStripePurchaseBeginBasic(requester: HttpRequester, payload: BeginPurchaseRequest, gamertag?: string): Promise> { + let endpoint = "/basic/payments/stripe/purchase/begin"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag, + w: true + }); +} + /** * @param requester - The `HttpRequester` type to use for the API request. * @param sku - The `sku` parameter to include in the API request. @@ -1161,6 +1313,25 @@ export async function paymentsPostWindowsPurchaseFailBasic(requester: HttpReques }); } +/** + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `TrackPurchaseRequest` instance to use for the API request + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function paymentsPostStripePurchaseTrackBasic(requester: HttpRequester, payload: TrackPurchaseRequest, gamertag?: string): Promise> { + let endpoint = "/basic/payments/stripe/purchase/track"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag + }); +} + /** * @remarks * **Authentication:** diff --git a/web/src/__generated__/schemas/StripeWebhookRequest.ts b/web/src/__generated__/schemas/StripeWebhookRequest.ts new file mode 100644 index 0000000000..077d0bd22e --- /dev/null +++ b/web/src/__generated__/schemas/StripeWebhookRequest.ts @@ -0,0 +1,9 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type StripeWebhookRequest = { + payload: string; + stripeSignature: string; +}; diff --git a/web/src/__generated__/schemas/StripeWebhookResponse.ts b/web/src/__generated__/schemas/StripeWebhookResponse.ts new file mode 100644 index 0000000000..fd82b853ef --- /dev/null +++ b/web/src/__generated__/schemas/StripeWebhookResponse.ts @@ -0,0 +1,8 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type StripeWebhookResponse = { + result: string; +}; From 7c22d0f0a03259ce53179e4a9f0357fe6a8c4a27 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 16 Apr 2026 14:04:13 -0400 Subject: [PATCH 2/4] add return urls --- web/src/__generated__/apis/PaymentsApi.ts | 21 +++++++++++++++++++ .../schemas/BeginPurchaseRequest.ts | 1 + .../schemas/StripeWebhookSetupRequest.ts | 7 +++++++ .../schemas/StripeWebhookSetupResponse.ts | 10 +++++++++ 4 files changed, 39 insertions(+) create mode 100644 web/src/__generated__/schemas/StripeWebhookSetupRequest.ts create mode 100644 web/src/__generated__/schemas/StripeWebhookSetupResponse.ts diff --git a/web/src/__generated__/apis/PaymentsApi.ts b/web/src/__generated__/apis/PaymentsApi.ts index 5c997e63d0..d282d7b789 100644 --- a/web/src/__generated__/apis/PaymentsApi.ts +++ b/web/src/__generated__/apis/PaymentsApi.ts @@ -28,6 +28,8 @@ import type { SteamAuthRequest } from '@/__generated__/schemas/SteamAuthRequest' import type { SteamOrderInfoResponse } from '@/__generated__/schemas/SteamOrderInfoResponse'; import type { StripeWebhookRequest } from '@/__generated__/schemas/StripeWebhookRequest'; import type { StripeWebhookResponse } from '@/__generated__/schemas/StripeWebhookResponse'; +import type { StripeWebhookSetupRequest } from '@/__generated__/schemas/StripeWebhookSetupRequest'; +import type { StripeWebhookSetupResponse } from '@/__generated__/schemas/StripeWebhookSetupResponse'; import type { SubscriptionVerificationResponse } from '@/__generated__/schemas/SubscriptionVerificationResponse'; import type { TrackPurchaseRequest } from '@/__generated__/schemas/TrackPurchaseRequest'; import type { VerifyPurchaseRequest } from '@/__generated__/schemas/VerifyPurchaseRequest'; @@ -469,6 +471,25 @@ export async function paymentsPostFacebookPurchaseCancelBasic(requester: HttpReq }); } +/** + * @param requester - The `HttpRequester` type to use for the API request. + * @param payload - The `StripeWebhookSetupRequest` instance to use for the API request + * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. + * + */ +export async function paymentsPostStripeWebhookSetupBasic(requester: HttpRequester, payload: StripeWebhookSetupRequest, gamertag?: string): Promise> { + let endpoint = "/basic/payments/stripe/webhook/setup"; + + // Make the API request + return makeApiRequest({ + r: requester, + e: endpoint, + m: POST, + p: payload, + g: gamertag + }); +} + /** * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `TrackPurchaseRequest` instance to use for the API request diff --git a/web/src/__generated__/schemas/BeginPurchaseRequest.ts b/web/src/__generated__/schemas/BeginPurchaseRequest.ts index 0fd9afd52b..897c2ffedb 100644 --- a/web/src/__generated__/schemas/BeginPurchaseRequest.ts +++ b/web/src/__generated__/schemas/BeginPurchaseRequest.ts @@ -6,5 +6,6 @@ export type BeginPurchaseRequest = { purchaseId: string; language?: string; + returnUrl?: string; time?: string; }; diff --git a/web/src/__generated__/schemas/StripeWebhookSetupRequest.ts b/web/src/__generated__/schemas/StripeWebhookSetupRequest.ts new file mode 100644 index 0000000000..a6e4016da4 --- /dev/null +++ b/web/src/__generated__/schemas/StripeWebhookSetupRequest.ts @@ -0,0 +1,7 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type StripeWebhookSetupRequest = { +}; diff --git a/web/src/__generated__/schemas/StripeWebhookSetupResponse.ts b/web/src/__generated__/schemas/StripeWebhookSetupResponse.ts new file mode 100644 index 0000000000..dc9e6423de --- /dev/null +++ b/web/src/__generated__/schemas/StripeWebhookSetupResponse.ts @@ -0,0 +1,10 @@ +/** + * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. + * All manual edits will be lost when this file is regenerated. + */ + +export type StripeWebhookSetupResponse = { + endpointId: string; + status: string; + url: string; +}; From dff794c7ef59efe5ca36af56187292465279ca77 Mon Sep 17 00:00:00 2001 From: Justin Date: Mon, 20 Apr 2026 13:10:42 -0400 Subject: [PATCH 3/4] run code-gen --- web/src/__generated__/apis/PaymentsApi.ts | 28 ++----------------- .../schemas/ClientManifestJsonResponse.ts | 1 + .../schemas/ClientManifestResponse.ts | 1 + .../schemas/ContentBasicManifest.ts | 1 + .../schemas/SaveManifestRequest.ts | 1 + .../schemas/StripeWebhookRequest.ts | 9 ------ .../schemas/StripeWebhookResponse.ts | 8 ------ .../schemas/StripeWebhookSetupRequest.ts | 7 ----- web/src/__generated__/schemas/index.ts | 1 + 9 files changed, 7 insertions(+), 50 deletions(-) delete mode 100644 web/src/__generated__/schemas/StripeWebhookRequest.ts delete mode 100644 web/src/__generated__/schemas/StripeWebhookResponse.ts delete mode 100644 web/src/__generated__/schemas/StripeWebhookSetupRequest.ts diff --git a/web/src/__generated__/apis/PaymentsApi.ts b/web/src/__generated__/apis/PaymentsApi.ts index d282d7b789..39483331c2 100644 --- a/web/src/__generated__/apis/PaymentsApi.ts +++ b/web/src/__generated__/apis/PaymentsApi.ts @@ -26,9 +26,6 @@ import type { LocalizedPriceMap } from '@/__generated__/schemas/LocalizedPriceMa import type { PaymentResultResponse } from '@/__generated__/schemas/PaymentResultResponse'; import type { SteamAuthRequest } from '@/__generated__/schemas/SteamAuthRequest'; import type { SteamOrderInfoResponse } from '@/__generated__/schemas/SteamOrderInfoResponse'; -import type { StripeWebhookRequest } from '@/__generated__/schemas/StripeWebhookRequest'; -import type { StripeWebhookResponse } from '@/__generated__/schemas/StripeWebhookResponse'; -import type { StripeWebhookSetupRequest } from '@/__generated__/schemas/StripeWebhookSetupRequest'; import type { StripeWebhookSetupResponse } from '@/__generated__/schemas/StripeWebhookSetupResponse'; import type { SubscriptionVerificationResponse } from '@/__generated__/schemas/SubscriptionVerificationResponse'; import type { TrackPurchaseRequest } from '@/__generated__/schemas/TrackPurchaseRequest'; @@ -409,25 +406,6 @@ export async function paymentsPostItunesPurchaseBeginBasic(requester: HttpReques }); } -/** - * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `StripeWebhookRequest` instance to use for the API request - * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. - * - */ -export async function paymentsPostStripeWebhookBasic(requester: HttpRequester, payload: StripeWebhookRequest, gamertag?: string): Promise> { - let endpoint = "/basic/payments/stripe/webhook"; - - // Make the API request - return makeApiRequest({ - r: requester, - e: endpoint, - m: POST, - p: payload, - g: gamertag - }); -} - /** * @param requester - The `HttpRequester` type to use for the API request. * @param payload - The `VerifyPurchaseRequest` instance to use for the API request @@ -473,19 +451,17 @@ export async function paymentsPostFacebookPurchaseCancelBasic(requester: HttpReq /** * @param requester - The `HttpRequester` type to use for the API request. - * @param payload - The `StripeWebhookSetupRequest` instance to use for the API request * @param gamertag - Override the Gamer Tag of the player. This is generally inferred by the auth token. * */ -export async function paymentsPostStripeWebhookSetupBasic(requester: HttpRequester, payload: StripeWebhookSetupRequest, gamertag?: string): Promise> { +export async function paymentsPostStripeWebhookSetupBasic(requester: HttpRequester, gamertag?: string): Promise> { let endpoint = "/basic/payments/stripe/webhook/setup"; // Make the API request - return makeApiRequest({ + return makeApiRequest({ r: requester, e: endpoint, m: POST, - p: payload, g: gamertag }); } diff --git a/web/src/__generated__/schemas/ClientManifestJsonResponse.ts b/web/src/__generated__/schemas/ClientManifestJsonResponse.ts index 4331742cf5..94f3da4690 100644 --- a/web/src/__generated__/schemas/ClientManifestJsonResponse.ts +++ b/web/src/__generated__/schemas/ClientManifestJsonResponse.ts @@ -7,6 +7,7 @@ import type { ClientContentInfoJson } from './ClientContentInfoJson'; export type ClientManifestJsonResponse = { entries: ClientContentInfoJson[]; + clientVersion?: string; createdAt?: bigint | string; publisherAccountId?: bigint | string; uid?: string; diff --git a/web/src/__generated__/schemas/ClientManifestResponse.ts b/web/src/__generated__/schemas/ClientManifestResponse.ts index d9d467b0b3..b4f0987091 100644 --- a/web/src/__generated__/schemas/ClientManifestResponse.ts +++ b/web/src/__generated__/schemas/ClientManifestResponse.ts @@ -7,6 +7,7 @@ import type { ClientContentInfo } from './ClientContentInfo'; export type ClientManifestResponse = { items: ClientContentInfo[]; + clientVersion?: string; createdAt?: bigint | string; latestUpdate?: bigint | string; }; diff --git a/web/src/__generated__/schemas/ContentBasicManifest.ts b/web/src/__generated__/schemas/ContentBasicManifest.ts index 27ff30e69c..e51a8e6f09 100644 --- a/web/src/__generated__/schemas/ContentBasicManifest.ts +++ b/web/src/__generated__/schemas/ContentBasicManifest.ts @@ -14,6 +14,7 @@ export type ContentBasicManifest = { id: string; references: (ContentReference | TextReference | BinaryReference)[]; archived?: boolean; + clientVersion?: string; diffObjectKey?: string; lastChanged?: bigint | string; publisherAccountId?: bigint | string; diff --git a/web/src/__generated__/schemas/SaveManifestRequest.ts b/web/src/__generated__/schemas/SaveManifestRequest.ts index b6a52ad0ef..b96d6eb200 100644 --- a/web/src/__generated__/schemas/SaveManifestRequest.ts +++ b/web/src/__generated__/schemas/SaveManifestRequest.ts @@ -8,4 +8,5 @@ import type { ReferenceSuperset } from './ReferenceSuperset'; export type SaveManifestRequest = { id: string; references: ReferenceSuperset[]; + clientVersion?: string; }; diff --git a/web/src/__generated__/schemas/StripeWebhookRequest.ts b/web/src/__generated__/schemas/StripeWebhookRequest.ts deleted file mode 100644 index 077d0bd22e..0000000000 --- a/web/src/__generated__/schemas/StripeWebhookRequest.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. - * All manual edits will be lost when this file is regenerated. - */ - -export type StripeWebhookRequest = { - payload: string; - stripeSignature: string; -}; diff --git a/web/src/__generated__/schemas/StripeWebhookResponse.ts b/web/src/__generated__/schemas/StripeWebhookResponse.ts deleted file mode 100644 index fd82b853ef..0000000000 --- a/web/src/__generated__/schemas/StripeWebhookResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. - * All manual edits will be lost when this file is regenerated. - */ - -export type StripeWebhookResponse = { - result: string; -}; diff --git a/web/src/__generated__/schemas/StripeWebhookSetupRequest.ts b/web/src/__generated__/schemas/StripeWebhookSetupRequest.ts deleted file mode 100644 index a6e4016da4..0000000000 --- a/web/src/__generated__/schemas/StripeWebhookSetupRequest.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * ⚠️ THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY. - * All manual edits will be lost when this file is regenerated. - */ - -export type StripeWebhookSetupRequest = { -}; diff --git a/web/src/__generated__/schemas/index.ts b/web/src/__generated__/schemas/index.ts index fc3a509bf0..c4068160a8 100644 --- a/web/src/__generated__/schemas/index.ts +++ b/web/src/__generated__/schemas/index.ts @@ -750,6 +750,7 @@ export * from './SteamOrderInfoResponse'; export * from './Store'; export * from './StringStringKeyValuePair'; export * from './StripeSubscriptionResponse'; +export * from './StripeWebhookSetupResponse'; export * from './SubscriberDetailsResponse'; export * from './SubscriptionVerificationRequest'; export * from './SubscriptionVerificationResponse'; From 990325d25d702996968db45ae831a7202adab329 Mon Sep 17 00:00:00 2001 From: Justin Date: Mon, 20 Apr 2026 13:18:00 -0400 Subject: [PATCH 4/4] update changelog --- web/CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md index 900179e368..6fa7ccdd1a 100644 --- a/web/CHANGELOG.md +++ b/web/CHANGELOG.md @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Added + +- Generated Stripe payment API calls: checkout sessions, webhook setup, and return URLs. + +### Changed + +- Updated auto-generated APIs and content manifest schemas to latest OpenAPI specs. + +### Fixed + +- Fixed useless regex escapes in `BeamJsonUtils`. + ## [1.1.1] - 2026-04-16 ### Fixed