@drttix/drt-sdk 1.3.5 → 1.4.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/README.md +29 -4
- package/azure-pipelines.yml +2 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/src/definitions/shopper.d.ts +2 -0
- package/dist/cjs/src/definitions/shopper.js +2 -0
- package/dist/cjs/src/functions/sdkConfig.d.ts +47 -16
- package/dist/cjs/src/functions/sdkConfig.js +63 -43
- package/dist/cjs/src/generated/portal/core/OpenAPI.js +1 -1
- package/dist/cjs/src/generated/portal/core/request.js +41 -7
- package/dist/cjs/src/generated/scanner/core/OpenAPI.js +1 -1
- package/dist/cjs/src/generated/scanner/core/request.js +41 -7
- package/dist/cjs/src/generated/scanner/index.d.ts +1 -0
- package/dist/cjs/src/generated/scanner/models/OrderScan.d.ts +9 -0
- package/dist/cjs/src/generated/scanner/models/OrderScan.js +2 -0
- package/dist/cjs/src/generated/scanner/models/TicketScan.d.ts +1 -0
- package/dist/cjs/src/generated/scanner/services/ScanningService.d.ts +16 -0
- package/dist/cjs/src/generated/scanner/services/ScanningService.js +28 -0
- package/dist/cjs/src/generated/scanner/types.d.ts +1 -0
- package/dist/cjs/src/generated/shopper/core/OpenAPI.js +1 -1
- package/dist/cjs/src/generated/shopper/core/request.js +41 -7
- package/dist/cjs/src/generated/shopper/index.d.ts +33 -1
- package/dist/cjs/src/generated/shopper/index.js +3 -1
- package/dist/cjs/src/generated/shopper/models/AnswerInput.d.ts +6 -0
- package/dist/cjs/src/generated/shopper/models/AnswerInput.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CartAmounts.d.ts +38 -0
- package/dist/cjs/src/generated/shopper/models/CartAmounts.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CartClearResult.d.ts +14 -0
- package/dist/cjs/src/generated/shopper/models/CartClearResult.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CartCountsLite.d.ts +14 -0
- package/dist/cjs/src/generated/shopper/models/CartCountsLite.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CartTotals.d.ts +22 -0
- package/dist/cjs/src/generated/shopper/models/CartTotals.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CheckoutStep.d.ts +10 -0
- package/dist/cjs/src/generated/shopper/models/CheckoutStep.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CheckoutStepsResponse.d.ts +7 -0
- package/dist/cjs/src/generated/shopper/models/CheckoutStepsResponse.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CheckoutSubmitBody.d.ts +3 -13
- package/dist/cjs/src/generated/shopper/models/CompletePaymentBody.d.ts +30 -0
- package/dist/cjs/src/generated/shopper/models/CompletePaymentBody.js +2 -0
- package/dist/cjs/src/generated/shopper/models/ConnectedAccountResponse.d.ts +18 -0
- package/dist/cjs/src/generated/shopper/models/ConnectedAccountResponse.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CorrelatedCode.d.ts +14 -0
- package/dist/cjs/src/generated/shopper/models/CorrelatedCode.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CreatePaymentIntentBody.d.ts +22 -0
- package/dist/cjs/src/generated/shopper/models/CreatePaymentIntentBody.js +2 -0
- package/dist/cjs/src/generated/shopper/models/CreatePaymentIntentResponse.d.ts +47 -0
- package/dist/cjs/src/generated/shopper/models/CreatePaymentIntentResponse.js +2 -0
- package/dist/cjs/src/generated/shopper/models/EventLegend.d.ts +12 -0
- package/dist/cjs/src/generated/shopper/models/EventLegend.js +2 -0
- package/dist/cjs/src/generated/shopper/models/EventLegendItem.d.ts +9 -0
- package/dist/cjs/src/generated/shopper/models/EventLegendItem.js +2 -0
- package/dist/cjs/src/generated/shopper/models/ExchangeAnswersBody.d.ts +4 -0
- package/dist/cjs/src/generated/shopper/models/ExchangeAnswersBody.js +2 -0
- package/dist/cjs/src/generated/shopper/models/ExchangeCancelSeatResponse.d.ts +7 -0
- package/dist/cjs/src/generated/shopper/models/ExchangeCancelSeatResponse.js +2 -0
- package/dist/cjs/src/generated/shopper/models/ExchangeShow.d.ts +12 -0
- package/dist/cjs/src/generated/shopper/models/ExchangeShow.js +2 -0
- package/dist/cjs/src/generated/shopper/models/ExchangeShowsResponse.d.ts +8 -0
- package/dist/cjs/src/generated/shopper/models/ExchangeShowsResponse.js +2 -0
- package/dist/cjs/src/generated/shopper/models/ExtendTimerDto.d.ts +6 -0
- package/dist/cjs/src/generated/shopper/models/ExtendTimerDto.js +2 -0
- package/dist/cjs/src/generated/shopper/models/ExtendTimerResponseDto.d.ts +10 -0
- package/dist/cjs/src/generated/shopper/models/ExtendTimerResponseDto.js +2 -0
- package/dist/cjs/src/generated/shopper/models/FullEventDetails.d.ts +2 -0
- package/dist/cjs/src/generated/shopper/models/GaSelection.d.ts +24 -0
- package/dist/cjs/src/generated/shopper/models/GaSelection.js +2 -0
- package/dist/cjs/src/generated/shopper/models/GaTier.d.ts +27 -0
- package/dist/cjs/src/generated/shopper/models/GaTier.js +2 -0
- package/dist/cjs/src/generated/shopper/models/LandingPageResponse.d.ts +10 -0
- package/dist/cjs/src/generated/shopper/models/LandingProduct.d.ts +11 -0
- package/dist/cjs/src/generated/shopper/models/LandingProduct.js +2 -0
- package/dist/cjs/src/generated/shopper/models/LandingShow.d.ts +16 -0
- package/dist/cjs/src/generated/shopper/models/LandingShow.js +2 -0
- package/dist/cjs/src/generated/shopper/models/LandingVenue.d.ts +10 -0
- package/dist/cjs/src/generated/shopper/models/LandingVenue.js +2 -0
- package/dist/cjs/src/generated/shopper/models/NextStepResponse.d.ts +7 -0
- package/dist/cjs/src/generated/shopper/models/NextStepResponse.js +2 -0
- package/dist/cjs/src/generated/shopper/models/OrderBalance.d.ts +26 -0
- package/dist/cjs/src/generated/shopper/models/OrderBalance.js +2 -0
- package/dist/cjs/src/generated/shopper/models/OrderPaymentStatus.d.ts +14 -0
- package/dist/cjs/src/generated/shopper/models/OrderPaymentStatus.js +2 -0
- package/dist/cjs/src/generated/shopper/models/PosDefaultInfoResponse.d.ts +7 -0
- package/dist/cjs/src/generated/shopper/models/PosDefaultInfoResponse.js +2 -0
- package/dist/cjs/src/generated/shopper/models/ProductAddResponse.d.ts +4 -0
- package/dist/cjs/src/generated/shopper/models/SeatInCart.d.ts +8 -0
- package/dist/cjs/src/generated/shopper/models/SetLanguageDto.d.ts +6 -0
- package/dist/cjs/src/generated/shopper/models/SetLanguageDto.js +2 -0
- package/dist/cjs/src/generated/shopper/models/ShowExtras.d.ts +14 -0
- package/dist/cjs/src/generated/shopper/models/ShowExtras.js +2 -0
- package/dist/cjs/src/generated/shopper/models/StreamDetails.d.ts +25 -0
- package/dist/cjs/src/generated/shopper/models/StreamDetails.js +2 -0
- package/dist/cjs/src/generated/shopper/models/StreamDownloadLink.d.ts +4 -0
- package/dist/cjs/src/generated/shopper/models/StreamDownloadLink.js +2 -0
- package/dist/cjs/src/generated/shopper/services/AccountService.d.ts +20 -4
- package/dist/cjs/src/generated/shopper/services/AccountService.js +13 -4
- package/dist/cjs/src/generated/shopper/services/CartService.d.ts +76 -7
- package/dist/cjs/src/generated/shopper/services/CartService.js +98 -7
- package/dist/cjs/src/generated/shopper/services/CheckoutService.d.ts +47 -14
- package/dist/cjs/src/generated/shopper/services/CheckoutService.js +50 -19
- package/dist/cjs/src/generated/shopper/services/CodeService.d.ts +38 -5
- package/dist/cjs/src/generated/shopper/services/CodeService.js +39 -5
- package/dist/cjs/src/generated/shopper/services/DonationService.d.ts +23 -2
- package/dist/cjs/src/generated/shopper/services/DonationService.js +29 -2
- package/dist/cjs/src/generated/shopper/services/EventService.d.ts +46 -4
- package/dist/cjs/src/generated/shopper/services/EventService.js +59 -4
- package/dist/cjs/src/generated/shopper/services/GiftCardService.d.ts +25 -5
- package/dist/cjs/src/generated/shopper/services/GiftCardService.js +16 -5
- package/dist/cjs/src/generated/shopper/services/OrderService.d.ts +209 -16
- package/dist/cjs/src/generated/shopper/services/OrderService.js +276 -16
- package/dist/cjs/src/generated/shopper/services/PaymentService.d.ts +15 -3
- package/dist/cjs/src/generated/shopper/services/PaymentService.js +10 -3
- package/dist/cjs/src/generated/shopper/services/ProductService.d.ts +15 -3
- package/dist/cjs/src/generated/shopper/services/ProductService.js +10 -3
- package/dist/cjs/src/generated/shopper/services/SeatService.d.ts +30 -6
- package/dist/cjs/src/generated/shopper/services/SeatService.js +19 -6
- package/dist/cjs/src/generated/shopper/services/SessionService.d.ts +37 -2
- package/dist/cjs/src/generated/shopper/services/SessionService.js +51 -2
- package/dist/cjs/src/generated/shopper/services/StripeService.d.ts +28 -0
- package/dist/cjs/src/generated/shopper/services/StripeService.js +54 -0
- package/dist/cjs/src/generated/shopper/types.d.ts +32 -1
- package/dist/cjs/src/scripts/build-all.js +160 -19
- package/dist/cjs/src/staging/index.d.ts +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/src/definitions/shopper.d.ts +2 -0
- package/dist/esm/src/definitions/shopper.js +2 -0
- package/dist/esm/src/functions/sdkConfig.d.ts +47 -16
- package/dist/esm/src/functions/sdkConfig.js +61 -41
- package/dist/esm/src/generated/portal/core/OpenAPI.js +1 -1
- package/dist/esm/src/generated/portal/core/request.js +41 -7
- package/dist/esm/src/generated/scanner/core/OpenAPI.js +1 -1
- package/dist/esm/src/generated/scanner/core/request.js +41 -7
- package/dist/esm/src/generated/scanner/index.d.ts +1 -0
- package/dist/esm/src/generated/scanner/models/OrderScan.d.ts +9 -0
- package/dist/esm/src/generated/scanner/models/OrderScan.js +1 -0
- package/dist/esm/src/generated/scanner/models/TicketScan.d.ts +1 -0
- package/dist/esm/src/generated/scanner/services/ScanningService.d.ts +16 -0
- package/dist/esm/src/generated/scanner/services/ScanningService.js +28 -0
- package/dist/esm/src/generated/scanner/types.d.ts +1 -0
- package/dist/esm/src/generated/shopper/core/OpenAPI.js +1 -1
- package/dist/esm/src/generated/shopper/core/request.js +41 -7
- package/dist/esm/src/generated/shopper/index.d.ts +33 -1
- package/dist/esm/src/generated/shopper/index.js +1 -0
- package/dist/esm/src/generated/shopper/models/AnswerInput.d.ts +6 -0
- package/dist/esm/src/generated/shopper/models/AnswerInput.js +1 -0
- package/dist/esm/src/generated/shopper/models/CartAmounts.d.ts +38 -0
- package/dist/esm/src/generated/shopper/models/CartAmounts.js +1 -0
- package/dist/esm/src/generated/shopper/models/CartClearResult.d.ts +14 -0
- package/dist/esm/src/generated/shopper/models/CartClearResult.js +1 -0
- package/dist/esm/src/generated/shopper/models/CartCountsLite.d.ts +14 -0
- package/dist/esm/src/generated/shopper/models/CartCountsLite.js +1 -0
- package/dist/esm/src/generated/shopper/models/CartTotals.d.ts +22 -0
- package/dist/esm/src/generated/shopper/models/CartTotals.js +1 -0
- package/dist/esm/src/generated/shopper/models/CheckoutStep.d.ts +10 -0
- package/dist/esm/src/generated/shopper/models/CheckoutStep.js +1 -0
- package/dist/esm/src/generated/shopper/models/CheckoutStepsResponse.d.ts +7 -0
- package/dist/esm/src/generated/shopper/models/CheckoutStepsResponse.js +1 -0
- package/dist/esm/src/generated/shopper/models/CheckoutSubmitBody.d.ts +3 -13
- package/dist/esm/src/generated/shopper/models/CompletePaymentBody.d.ts +30 -0
- package/dist/esm/src/generated/shopper/models/CompletePaymentBody.js +1 -0
- package/dist/esm/src/generated/shopper/models/ConnectedAccountResponse.d.ts +18 -0
- package/dist/esm/src/generated/shopper/models/ConnectedAccountResponse.js +1 -0
- package/dist/esm/src/generated/shopper/models/CorrelatedCode.d.ts +14 -0
- package/dist/esm/src/generated/shopper/models/CorrelatedCode.js +1 -0
- package/dist/esm/src/generated/shopper/models/CreatePaymentIntentBody.d.ts +22 -0
- package/dist/esm/src/generated/shopper/models/CreatePaymentIntentBody.js +1 -0
- package/dist/esm/src/generated/shopper/models/CreatePaymentIntentResponse.d.ts +47 -0
- package/dist/esm/src/generated/shopper/models/CreatePaymentIntentResponse.js +1 -0
- package/dist/esm/src/generated/shopper/models/EventLegend.d.ts +12 -0
- package/dist/esm/src/generated/shopper/models/EventLegend.js +1 -0
- package/dist/esm/src/generated/shopper/models/EventLegendItem.d.ts +9 -0
- package/dist/esm/src/generated/shopper/models/EventLegendItem.js +1 -0
- package/dist/esm/src/generated/shopper/models/ExchangeAnswersBody.d.ts +4 -0
- package/dist/esm/src/generated/shopper/models/ExchangeAnswersBody.js +1 -0
- package/dist/esm/src/generated/shopper/models/ExchangeCancelSeatResponse.d.ts +7 -0
- package/dist/esm/src/generated/shopper/models/ExchangeCancelSeatResponse.js +1 -0
- package/dist/esm/src/generated/shopper/models/ExchangeShow.d.ts +12 -0
- package/dist/esm/src/generated/shopper/models/ExchangeShow.js +1 -0
- package/dist/esm/src/generated/shopper/models/ExchangeShowsResponse.d.ts +8 -0
- package/dist/esm/src/generated/shopper/models/ExchangeShowsResponse.js +1 -0
- package/dist/esm/src/generated/shopper/models/ExtendTimerDto.d.ts +6 -0
- package/dist/esm/src/generated/shopper/models/ExtendTimerDto.js +1 -0
- package/dist/esm/src/generated/shopper/models/ExtendTimerResponseDto.d.ts +10 -0
- package/dist/esm/src/generated/shopper/models/ExtendTimerResponseDto.js +1 -0
- package/dist/esm/src/generated/shopper/models/FullEventDetails.d.ts +2 -0
- package/dist/esm/src/generated/shopper/models/GaSelection.d.ts +24 -0
- package/dist/esm/src/generated/shopper/models/GaSelection.js +1 -0
- package/dist/esm/src/generated/shopper/models/GaTier.d.ts +27 -0
- package/dist/esm/src/generated/shopper/models/GaTier.js +1 -0
- package/dist/esm/src/generated/shopper/models/LandingPageResponse.d.ts +10 -0
- package/dist/esm/src/generated/shopper/models/LandingProduct.d.ts +11 -0
- package/dist/esm/src/generated/shopper/models/LandingProduct.js +1 -0
- package/dist/esm/src/generated/shopper/models/LandingShow.d.ts +16 -0
- package/dist/esm/src/generated/shopper/models/LandingShow.js +1 -0
- package/dist/esm/src/generated/shopper/models/LandingVenue.d.ts +10 -0
- package/dist/esm/src/generated/shopper/models/LandingVenue.js +1 -0
- package/dist/esm/src/generated/shopper/models/NextStepResponse.d.ts +7 -0
- package/dist/esm/src/generated/shopper/models/NextStepResponse.js +1 -0
- package/dist/esm/src/generated/shopper/models/OrderBalance.d.ts +26 -0
- package/dist/esm/src/generated/shopper/models/OrderBalance.js +1 -0
- package/dist/esm/src/generated/shopper/models/OrderPaymentStatus.d.ts +14 -0
- package/dist/esm/src/generated/shopper/models/OrderPaymentStatus.js +1 -0
- package/dist/esm/src/generated/shopper/models/PosDefaultInfoResponse.d.ts +7 -0
- package/dist/esm/src/generated/shopper/models/PosDefaultInfoResponse.js +1 -0
- package/dist/esm/src/generated/shopper/models/ProductAddResponse.d.ts +4 -0
- package/dist/esm/src/generated/shopper/models/SeatInCart.d.ts +8 -0
- package/dist/esm/src/generated/shopper/models/SetLanguageDto.d.ts +6 -0
- package/dist/esm/src/generated/shopper/models/SetLanguageDto.js +1 -0
- package/dist/esm/src/generated/shopper/models/ShowExtras.d.ts +14 -0
- package/dist/esm/src/generated/shopper/models/ShowExtras.js +1 -0
- package/dist/esm/src/generated/shopper/models/StreamDetails.d.ts +25 -0
- package/dist/esm/src/generated/shopper/models/StreamDetails.js +1 -0
- package/dist/esm/src/generated/shopper/models/StreamDownloadLink.d.ts +4 -0
- package/dist/esm/src/generated/shopper/models/StreamDownloadLink.js +1 -0
- package/dist/esm/src/generated/shopper/services/AccountService.d.ts +20 -4
- package/dist/esm/src/generated/shopper/services/AccountService.js +13 -4
- package/dist/esm/src/generated/shopper/services/CartService.d.ts +76 -7
- package/dist/esm/src/generated/shopper/services/CartService.js +98 -7
- package/dist/esm/src/generated/shopper/services/CheckoutService.d.ts +47 -14
- package/dist/esm/src/generated/shopper/services/CheckoutService.js +50 -19
- package/dist/esm/src/generated/shopper/services/CodeService.d.ts +38 -5
- package/dist/esm/src/generated/shopper/services/CodeService.js +39 -5
- package/dist/esm/src/generated/shopper/services/DonationService.d.ts +23 -2
- package/dist/esm/src/generated/shopper/services/DonationService.js +29 -2
- package/dist/esm/src/generated/shopper/services/EventService.d.ts +46 -4
- package/dist/esm/src/generated/shopper/services/EventService.js +59 -4
- package/dist/esm/src/generated/shopper/services/GiftCardService.d.ts +25 -5
- package/dist/esm/src/generated/shopper/services/GiftCardService.js +16 -5
- package/dist/esm/src/generated/shopper/services/OrderService.d.ts +209 -16
- package/dist/esm/src/generated/shopper/services/OrderService.js +276 -16
- package/dist/esm/src/generated/shopper/services/PaymentService.d.ts +15 -3
- package/dist/esm/src/generated/shopper/services/PaymentService.js +10 -3
- package/dist/esm/src/generated/shopper/services/ProductService.d.ts +15 -3
- package/dist/esm/src/generated/shopper/services/ProductService.js +10 -3
- package/dist/esm/src/generated/shopper/services/SeatService.d.ts +30 -6
- package/dist/esm/src/generated/shopper/services/SeatService.js +19 -6
- package/dist/esm/src/generated/shopper/services/SessionService.d.ts +37 -2
- package/dist/esm/src/generated/shopper/services/SessionService.js +51 -2
- package/dist/esm/src/generated/shopper/services/StripeService.d.ts +28 -0
- package/dist/esm/src/generated/shopper/services/StripeService.js +50 -0
- package/dist/esm/src/generated/shopper/types.d.ts +32 -1
- package/dist/esm/src/scripts/build-all.js +160 -19
- package/dist/esm/src/staging/index.d.ts +1 -0
- package/package.json +3 -2
- package/pnpm-workspace.yaml +2 -0
- package/src/custom/custom-request.txt +43 -9
- package/src/definitions/shopper.ts +2 -0
- package/src/functions/sdkConfig.ts +91 -54
- package/src/generated/portal/core/OpenAPI.ts +1 -1
- package/src/generated/portal/core/request.ts +43 -9
- package/src/generated/scanner/core/OpenAPI.ts +1 -1
- package/src/generated/scanner/core/request.ts +43 -9
- package/src/generated/scanner/index.ts +1 -0
- package/src/generated/scanner/models/OrderScan.ts +14 -0
- package/src/generated/scanner/models/TicketScan.ts +1 -0
- package/src/generated/scanner/services/ScanningService.ts +38 -0
- package/src/generated/scanner/types.ts +1 -0
- package/src/generated/shopper/core/OpenAPI.ts +1 -1
- package/src/generated/shopper/core/request.ts +43 -9
- package/src/generated/shopper/index.ts +33 -1
- package/src/generated/shopper/models/AnswerInput.ts +11 -0
- package/src/generated/shopper/models/CartAmounts.ts +43 -0
- package/src/generated/shopper/models/CartClearResult.ts +19 -0
- package/src/generated/shopper/models/CartCountsLite.ts +19 -0
- package/src/generated/shopper/models/CartTotals.ts +27 -0
- package/src/generated/shopper/models/CheckoutStep.ts +15 -0
- package/src/generated/shopper/models/CheckoutStepsResponse.ts +12 -0
- package/src/generated/shopper/models/CheckoutSubmitBody.ts +3 -13
- package/src/generated/shopper/models/ConnectedAccountResponse.ts +23 -0
- package/src/generated/shopper/models/CorrelatedCode.ts +19 -0
- package/src/generated/shopper/models/CreatePaymentIntentBody.ts +27 -0
- package/src/generated/shopper/models/CreatePaymentIntentResponse.ts +52 -0
- package/src/generated/shopper/models/EventLegend.ts +17 -0
- package/src/generated/shopper/models/EventLegendItem.ts +14 -0
- package/src/generated/shopper/models/ExchangeAnswersBody.ts +9 -0
- package/src/generated/shopper/models/ExchangeCancelSeatResponse.ts +12 -0
- package/src/generated/shopper/models/ExchangeShow.ts +17 -0
- package/src/generated/shopper/models/ExchangeShowsResponse.ts +13 -0
- package/src/generated/shopper/models/ExtendTimerDto.ts +11 -0
- package/src/generated/shopper/models/ExtendTimerResponseDto.ts +15 -0
- package/src/generated/shopper/models/FullEventDetails.ts +2 -0
- package/src/generated/shopper/models/GaSelection.ts +29 -0
- package/src/generated/shopper/models/GaTier.ts +32 -0
- package/src/generated/shopper/models/LandingPageResponse.ts +10 -0
- package/src/generated/shopper/models/LandingProduct.ts +16 -0
- package/src/generated/shopper/models/LandingShow.ts +21 -0
- package/src/generated/shopper/models/LandingVenue.ts +15 -0
- package/src/generated/shopper/models/NextStepResponse.ts +12 -0
- package/src/generated/shopper/models/OrderBalance.ts +31 -0
- package/src/generated/shopper/models/OrderPaymentStatus.ts +19 -0
- package/src/generated/shopper/models/PosDefaultInfoResponse.ts +12 -0
- package/src/generated/shopper/models/ProductAddResponse.ts +4 -0
- package/src/generated/shopper/models/SeatInCart.ts +8 -0
- package/src/generated/shopper/models/SetLanguageDto.ts +11 -0
- package/src/generated/shopper/models/ShowExtras.ts +19 -0
- package/src/generated/shopper/models/StreamDetails.ts +30 -0
- package/src/generated/shopper/models/StreamDownloadLink.ts +9 -0
- package/src/generated/shopper/services/AccountService.ts +22 -9
- package/src/generated/shopper/services/CartService.ts +123 -14
- package/src/generated/shopper/services/CheckoutService.ts +69 -29
- package/src/generated/shopper/services/CodeService.ts +58 -15
- package/src/generated/shopper/services/DonationService.ts +38 -5
- package/src/generated/shopper/services/EventService.ts +77 -10
- package/src/generated/shopper/services/GiftCardService.ts +28 -12
- package/src/generated/shopper/services/OrderService.ts +356 -41
- package/src/generated/shopper/services/PaymentService.ts +19 -9
- package/src/generated/shopper/services/ProductService.ts +19 -9
- package/src/generated/shopper/services/SeatService.ts +38 -19
- package/src/generated/shopper/services/SessionService.ts +65 -5
- package/src/generated/shopper/services/StripeService.ts +64 -0
- package/src/generated/shopper/types.ts +32 -1
- package/src/scripts/build-all.ts +211 -26
- package/src/generated/shopper/models/SaveNonceBody.ts +0 -15
|
@@ -2,25 +2,33 @@
|
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
|
+
import type { CartAmounts } from '../models/CartAmounts';
|
|
6
|
+
import type { CartClearResult } from '../models/CartClearResult';
|
|
7
|
+
import type { CartCountsLite } from '../models/CartCountsLite';
|
|
5
8
|
import type { CartHashResponse } from '../models/CartHashResponse';
|
|
6
9
|
import type { CartSummary } from '../models/CartSummary';
|
|
10
|
+
import type { CartTotals } from '../models/CartTotals';
|
|
7
11
|
import type { CartWithTime } from '../models/CartWithTime';
|
|
8
12
|
import type { CashPaymentDetail } from '../models/CashPaymentDetail';
|
|
9
13
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
10
14
|
import { OpenAPI } from '../core/OpenAPI';
|
|
11
|
-
import { request as __request } from '../core/request';
|
|
15
|
+
import { request as __request } from '../core/request';
|
|
16
|
+
import { resolveShopperHeaders } from '../../../functions/sdkConfig';
|
|
12
17
|
export class CartService {
|
|
13
18
|
/**
|
|
14
19
|
* Get Cart
|
|
15
20
|
* Retrieves the cart along with its associated time.
|
|
21
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
16
22
|
* @returns CartWithTime Cart retrieved successfully with time.
|
|
17
23
|
* @throws ApiError
|
|
18
24
|
*/
|
|
19
|
-
public static getCart(
|
|
25
|
+
public static getCart(
|
|
26
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
20
27
|
): CancelablePromise<CartWithTime> {
|
|
21
28
|
return __request(OpenAPI, {
|
|
22
29
|
method: 'GET',
|
|
23
|
-
url: '/cart',
|
|
30
|
+
url: '/cart',
|
|
31
|
+
headers: resolveShopperHeaders(context),
|
|
24
32
|
errors: {
|
|
25
33
|
400: `Bad Request error with error details.`,
|
|
26
34
|
404: `Not found error with error details.`,
|
|
@@ -30,15 +38,18 @@ export class CartService {
|
|
|
30
38
|
}
|
|
31
39
|
/**
|
|
32
40
|
* Delete Cart
|
|
33
|
-
*
|
|
34
|
-
* @
|
|
41
|
+
* Clears the entire cart (seats, products, donations) for the shopper. Respects the session lock: if the session is locked (e.g. an in-flight payment) the cart is left intact and { cleared: false, locked: true } is returned.
|
|
42
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
43
|
+
* @returns CartClearResult Cart clear result.
|
|
35
44
|
* @throws ApiError
|
|
36
45
|
*/
|
|
37
|
-
public static deleteCart(
|
|
38
|
-
|
|
46
|
+
public static deleteCart(
|
|
47
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
48
|
+
): CancelablePromise<CartClearResult> {
|
|
39
49
|
return __request(OpenAPI, {
|
|
40
50
|
method: 'DELETE',
|
|
41
|
-
url: '/cart',
|
|
51
|
+
url: '/cart',
|
|
52
|
+
headers: resolveShopperHeaders(context),
|
|
42
53
|
errors: {
|
|
43
54
|
400: `Bad Request error with error details.`,
|
|
44
55
|
404: `Not found error with error details.`,
|
|
@@ -49,14 +60,17 @@ export class CartService {
|
|
|
49
60
|
/**
|
|
50
61
|
* Get Cart Summary
|
|
51
62
|
* Returns a consolidated summary of the shopper's current cart, including: products in session, donations in session, held seats grouped by show, the count of available shows, and the count of available products and donation funds for the account based on the session date.
|
|
63
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
52
64
|
* @returns CartSummary Cart summary retrieved successfully.
|
|
53
65
|
* @throws ApiError
|
|
54
66
|
*/
|
|
55
|
-
public static getCartSummary(
|
|
67
|
+
public static getCartSummary(
|
|
68
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
56
69
|
): CancelablePromise<CartSummary> {
|
|
57
70
|
return __request(OpenAPI, {
|
|
58
71
|
method: 'GET',
|
|
59
|
-
url: '/cart/summary',
|
|
72
|
+
url: '/cart/summary',
|
|
73
|
+
headers: resolveShopperHeaders(context),
|
|
60
74
|
errors: {
|
|
61
75
|
400: `Bad Request error with error details.`,
|
|
62
76
|
404: `Not found error with error details.`,
|
|
@@ -67,14 +81,17 @@ export class CartService {
|
|
|
67
81
|
/**
|
|
68
82
|
* Get Cart Hash
|
|
69
83
|
* Returns the computed cart hash for the current shopper session.
|
|
84
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
70
85
|
* @returns CartHashResponse Cart hash retrieved successfully.
|
|
71
86
|
* @throws ApiError
|
|
72
87
|
*/
|
|
73
|
-
public static getCartHash(
|
|
88
|
+
public static getCartHash(
|
|
89
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
74
90
|
): CancelablePromise<CartHashResponse> {
|
|
75
91
|
return __request(OpenAPI, {
|
|
76
92
|
method: 'GET',
|
|
77
|
-
url: '/cart/hash',
|
|
93
|
+
url: '/cart/hash',
|
|
94
|
+
headers: resolveShopperHeaders(context),
|
|
78
95
|
errors: {
|
|
79
96
|
400: `Bad Request error with error details.`,
|
|
80
97
|
404: `Not found error with error details.`,
|
|
@@ -85,14 +102,106 @@ export class CartService {
|
|
|
85
102
|
/**
|
|
86
103
|
* Get Cash Payment Detail
|
|
87
104
|
* Returns cash payment details for the current shopper session, including order total, payments total, and house card credentials.
|
|
105
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
88
106
|
* @returns CashPaymentDetail Cash payment detail retrieved successfully.
|
|
89
107
|
* @throws ApiError
|
|
90
108
|
*/
|
|
91
|
-
public static getCashPaymentDetail(
|
|
109
|
+
public static getCashPaymentDetail(
|
|
110
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
92
111
|
): CancelablePromise<CashPaymentDetail> {
|
|
93
112
|
return __request(OpenAPI, {
|
|
94
113
|
method: 'GET',
|
|
95
|
-
url: '/cart/cash-payment-detail',
|
|
114
|
+
url: '/cart/cash-payment-detail',
|
|
115
|
+
headers: resolveShopperHeaders(context),
|
|
116
|
+
errors: {
|
|
117
|
+
400: `Bad Request error with error details.`,
|
|
118
|
+
404: `Not found error with error details.`,
|
|
119
|
+
500: `Internal Server Error, please contact developers.`,
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Get lightweight cart counts
|
|
125
|
+
* Returns a cheap cart summary for header/badge polling: seat count, product count, and seconds remaining on the cart timer.
|
|
126
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
127
|
+
* @returns CartCountsLite Cart counts retrieved successfully.
|
|
128
|
+
* @throws ApiError
|
|
129
|
+
*/
|
|
130
|
+
public static getCartCounts(
|
|
131
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
132
|
+
): CancelablePromise<CartCountsLite> {
|
|
133
|
+
return __request(OpenAPI, {
|
|
134
|
+
method: 'GET',
|
|
135
|
+
url: '/cart/counts',
|
|
136
|
+
headers: resolveShopperHeaders(context),
|
|
137
|
+
errors: {
|
|
138
|
+
400: `Bad Request error with error details.`,
|
|
139
|
+
404: `Not found error with error details.`,
|
|
140
|
+
500: `Internal Server Error, please contact developers.`,
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Get cart totals
|
|
146
|
+
* Recomputes the cart (custom logic, coupon, sales tax) and returns the current totals ledger. Call after any cart mutation.
|
|
147
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
148
|
+
* @returns CartTotals Cart totals retrieved successfully.
|
|
149
|
+
* @throws ApiError
|
|
150
|
+
*/
|
|
151
|
+
public static getCartTotals(
|
|
152
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
153
|
+
): CancelablePromise<CartTotals> {
|
|
154
|
+
return __request(OpenAPI, {
|
|
155
|
+
method: 'GET',
|
|
156
|
+
url: '/cart/totals',
|
|
157
|
+
headers: resolveShopperHeaders(context),
|
|
158
|
+
errors: {
|
|
159
|
+
400: `Bad Request error with error details.`,
|
|
160
|
+
404: `Not found error with error details.`,
|
|
161
|
+
500: `Internal Server Error, please contact developers.`,
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Get cart amounts ledger
|
|
167
|
+
* Returns the full amounts ledger (item/product/donation/order/tax totals, coupon, discount, payments, and gift cards + adjustments).
|
|
168
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
169
|
+
* @returns CartAmounts Cart amounts retrieved successfully.
|
|
170
|
+
* @throws ApiError
|
|
171
|
+
*/
|
|
172
|
+
public static getCartAmounts(
|
|
173
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
174
|
+
): CancelablePromise<CartAmounts> {
|
|
175
|
+
return __request(OpenAPI, {
|
|
176
|
+
method: 'GET',
|
|
177
|
+
url: '/cart/amounts',
|
|
178
|
+
headers: resolveShopperHeaders(context),
|
|
179
|
+
errors: {
|
|
180
|
+
400: `Bad Request error with error details.`,
|
|
181
|
+
404: `Not found error with error details.`,
|
|
182
|
+
500: `Internal Server Error, please contact developers.`,
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Clear a single show from the cart
|
|
188
|
+
* Removes only the given show's seats from the cart, leaving merchandise and donations intact, then re-runs the recompute chain. Respects the session lock like DELETE /cart.
|
|
189
|
+
* @param showId
|
|
190
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
191
|
+
* @returns CartClearResult Show clear result.
|
|
192
|
+
* @throws ApiError
|
|
193
|
+
*/
|
|
194
|
+
public static clearCartShow(
|
|
195
|
+
showId: number,
|
|
196
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
197
|
+
): CancelablePromise<CartClearResult> {
|
|
198
|
+
return __request(OpenAPI, {
|
|
199
|
+
method: 'DELETE',
|
|
200
|
+
url: '/cart/show/{showId}',
|
|
201
|
+
path: {
|
|
202
|
+
'showId': showId,
|
|
203
|
+
},
|
|
204
|
+
headers: resolveShopperHeaders(context),
|
|
96
205
|
errors: {
|
|
97
206
|
400: `Bad Request error with error details.`,
|
|
98
207
|
404: `Not found error with error details.`,
|
|
@@ -3,25 +3,31 @@
|
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
import type { CheckoutPageData } from '../models/CheckoutPageData';
|
|
6
|
+
import type { CheckoutStepsResponse } from '../models/CheckoutStepsResponse';
|
|
6
7
|
import type { CheckoutSubmitBody } from '../models/CheckoutSubmitBody';
|
|
7
8
|
import type { CheckoutSuccessResponse } from '../models/CheckoutSuccessResponse';
|
|
9
|
+
import type { NextStepResponse } from '../models/NextStepResponse';
|
|
10
|
+
import type { PosDefaultInfoResponse } from '../models/PosDefaultInfoResponse';
|
|
8
11
|
import type { SaveDetailsBody } from '../models/SaveDetailsBody';
|
|
9
|
-
import type { SaveNonceBody } from '../models/SaveNonceBody';
|
|
10
12
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
11
13
|
import { OpenAPI } from '../core/OpenAPI';
|
|
12
|
-
import { request as __request } from '../core/request';
|
|
14
|
+
import { request as __request } from '../core/request';
|
|
15
|
+
import { resolveShopperHeaders } from '../../../functions/sdkConfig';
|
|
13
16
|
export class CheckoutService {
|
|
14
17
|
/**
|
|
15
18
|
* Get checkout page data
|
|
16
19
|
* Returns all data needed to render the checkout page including session, studio settings, questions, products, donations, gift cards, and shipping info.
|
|
20
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
17
21
|
* @returns CheckoutPageData Returns checkout page data.
|
|
18
22
|
* @throws ApiError
|
|
19
23
|
*/
|
|
20
|
-
public static getCheckout(
|
|
24
|
+
public static getCheckout(
|
|
25
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
21
26
|
): CancelablePromise<CheckoutPageData> {
|
|
22
27
|
return __request(OpenAPI, {
|
|
23
28
|
method: 'GET',
|
|
24
|
-
url: '/checkout',
|
|
29
|
+
url: '/checkout',
|
|
30
|
+
headers: resolveShopperHeaders(context),
|
|
25
31
|
errors: {
|
|
26
32
|
400: `Bad Request error with error details.`,
|
|
27
33
|
404: `Not found error with error details.`,
|
|
@@ -31,17 +37,20 @@ export class CheckoutService {
|
|
|
31
37
|
}
|
|
32
38
|
/**
|
|
33
39
|
* Submit checkout
|
|
34
|
-
* Validates and saves checkout form data
|
|
40
|
+
* Validates and saves checkout form data, enforcing studio custom validation and priority-code minimum-seats before payment. Stripe-only payment flow.
|
|
41
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
35
42
|
* @param requestBody Checkout form data.
|
|
36
43
|
* @returns CheckoutSuccessResponse Returns success response.
|
|
37
44
|
* @throws ApiError
|
|
38
45
|
*/
|
|
39
|
-
public static submitCheckout(
|
|
40
|
-
requestBody: CheckoutSubmitBody,
|
|
46
|
+
public static submitCheckout(
|
|
47
|
+
requestBody: CheckoutSubmitBody,
|
|
48
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
41
49
|
): CancelablePromise<CheckoutSuccessResponse> {
|
|
42
50
|
return __request(OpenAPI, {
|
|
43
51
|
method: 'POST',
|
|
44
|
-
url: '/checkout',
|
|
52
|
+
url: '/checkout',
|
|
53
|
+
headers: resolveShopperHeaders(context),
|
|
45
54
|
body: requestBody,
|
|
46
55
|
mediaType: 'application/json',
|
|
47
56
|
errors: {
|
|
@@ -52,20 +61,24 @@ export class CheckoutService {
|
|
|
52
61
|
});
|
|
53
62
|
}
|
|
54
63
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* @param
|
|
58
|
-
* @
|
|
64
|
+
* Get the next checkout step
|
|
65
|
+
* Server-side checkout wizard driver. Given the current step, returns the next applicable one (expiry → ADA → tiers → merchandise → donations → checkout → confirm → receipt). JSON only.
|
|
66
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
67
|
+
* @param curr The current step. Defaults to 'seats'.
|
|
68
|
+
* @returns NextStepResponse Returns the next step.
|
|
59
69
|
* @throws ApiError
|
|
60
70
|
*/
|
|
61
|
-
public static
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
public static getNextStep(
|
|
72
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
73
|
+
curr?: string,
|
|
74
|
+
): CancelablePromise<NextStepResponse> {
|
|
64
75
|
return __request(OpenAPI, {
|
|
65
|
-
method: '
|
|
66
|
-
url: '/checkout/
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
method: 'GET',
|
|
77
|
+
url: '/checkout/next-step',
|
|
78
|
+
headers: resolveShopperHeaders(context),
|
|
79
|
+
query: {
|
|
80
|
+
'curr': curr,
|
|
81
|
+
},
|
|
69
82
|
errors: {
|
|
70
83
|
400: `Bad Request error with error details.`,
|
|
71
84
|
404: `Not found error with error details.`,
|
|
@@ -74,16 +87,19 @@ export class CheckoutService {
|
|
|
74
87
|
});
|
|
75
88
|
}
|
|
76
89
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* @
|
|
90
|
+
* Get applicable checkout steps
|
|
91
|
+
* Returns the wizard steps that apply to this session, in order, with required flags. Merchandise and donations appear only when items or funds are available. JSON only (replaces the legacy HTML step bar).
|
|
92
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
93
|
+
* @returns CheckoutStepsResponse Returns the applicable steps.
|
|
80
94
|
* @throws ApiError
|
|
81
95
|
*/
|
|
82
|
-
public static
|
|
83
|
-
|
|
96
|
+
public static getSteps(
|
|
97
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
98
|
+
): CancelablePromise<CheckoutStepsResponse> {
|
|
84
99
|
return __request(OpenAPI, {
|
|
85
|
-
method: '
|
|
86
|
-
url: '/checkout/
|
|
100
|
+
method: 'GET',
|
|
101
|
+
url: '/checkout/steps',
|
|
102
|
+
headers: resolveShopperHeaders(context),
|
|
87
103
|
errors: {
|
|
88
104
|
400: `Bad Request error with error details.`,
|
|
89
105
|
404: `Not found error with error details.`,
|
|
@@ -94,16 +110,19 @@ export class CheckoutService {
|
|
|
94
110
|
/**
|
|
95
111
|
* Auto-save checkout details
|
|
96
112
|
* Auto-saves checkout form fields without full validation. Used for partial saves as the user fills out the form.
|
|
113
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
97
114
|
* @param requestBody Partial checkout data to auto-save.
|
|
98
115
|
* @returns CheckoutSuccessResponse Returns success response.
|
|
99
116
|
* @throws ApiError
|
|
100
117
|
*/
|
|
101
|
-
public static saveDetails(
|
|
102
|
-
requestBody: SaveDetailsBody,
|
|
118
|
+
public static saveDetails(
|
|
119
|
+
requestBody: SaveDetailsBody,
|
|
120
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
103
121
|
): CancelablePromise<CheckoutSuccessResponse> {
|
|
104
122
|
return __request(OpenAPI, {
|
|
105
123
|
method: 'POST',
|
|
106
|
-
url: '/checkout/details',
|
|
124
|
+
url: '/checkout/details',
|
|
125
|
+
headers: resolveShopperHeaders(context),
|
|
107
126
|
body: requestBody,
|
|
108
127
|
mediaType: 'application/json',
|
|
109
128
|
errors: {
|
|
@@ -113,4 +132,25 @@ export class CheckoutService {
|
|
|
113
132
|
},
|
|
114
133
|
});
|
|
115
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Fill contact fields from POS defaults
|
|
137
|
+
* Fills empty session contact fields (name/email/phone) from the account POS defaults and returns the resulting contact. Logged-in shoppers only (legacy default-shopper-set-info).
|
|
138
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
139
|
+
* @returns PosDefaultInfoResponse Returns the filled-in contact info.
|
|
140
|
+
* @throws ApiError
|
|
141
|
+
*/
|
|
142
|
+
public static fillDefaultInfo(
|
|
143
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
144
|
+
): CancelablePromise<PosDefaultInfoResponse> {
|
|
145
|
+
return __request(OpenAPI, {
|
|
146
|
+
method: 'POST',
|
|
147
|
+
url: '/checkout/default-info',
|
|
148
|
+
headers: resolveShopperHeaders(context),
|
|
149
|
+
errors: {
|
|
150
|
+
400: `Bad Request error with error details.`,
|
|
151
|
+
404: `Not found error with error details.`,
|
|
152
|
+
500: `Internal Server Error, please contact developers.`,
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
}
|
|
116
156
|
}
|
|
@@ -3,27 +3,32 @@
|
|
|
3
3
|
/* tslint:disable */
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
import type { CodeDto } from '../models/CodeDto';
|
|
6
|
+
import type { CorrelatedCode } from '../models/CorrelatedCode';
|
|
6
7
|
import type { HasAccessResponse } from '../models/HasAccessResponse';
|
|
7
8
|
import type { PriorityCode } from '../models/PriorityCode';
|
|
8
9
|
import type { SuccessWithTime } from '../models/SuccessWithTime';
|
|
9
10
|
import type { UniversalCodeResponse } from '../models/UniversalCodeResponse';
|
|
10
11
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
11
12
|
import { OpenAPI } from '../core/OpenAPI';
|
|
12
|
-
import { request as __request } from '../core/request';
|
|
13
|
+
import { request as __request } from '../core/request';
|
|
14
|
+
import { resolveShopperHeaders } from '../../../functions/sdkConfig';
|
|
13
15
|
export class CodeService {
|
|
14
16
|
/**
|
|
15
17
|
* Request access to an event
|
|
16
18
|
* Allows a shopper to request access to an event using their shopper GUID and account ID.
|
|
17
19
|
* @param eventId ID of the event for which access is requested
|
|
20
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
18
21
|
* @returns HasAccessResponse Access request submitted successfully.
|
|
19
22
|
* @throws ApiError
|
|
20
23
|
*/
|
|
21
24
|
public static requestEventAccess(
|
|
22
|
-
eventId: number,
|
|
25
|
+
eventId: number,
|
|
26
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
23
27
|
): CancelablePromise<HasAccessResponse> {
|
|
24
28
|
return __request(OpenAPI, {
|
|
25
29
|
method: 'GET',
|
|
26
|
-
url: '/code/access',
|
|
30
|
+
url: '/code/access',
|
|
31
|
+
headers: resolveShopperHeaders(context),
|
|
27
32
|
query: {
|
|
28
33
|
'eventId': eventId,
|
|
29
34
|
},
|
|
@@ -34,19 +39,48 @@ export class CodeService {
|
|
|
34
39
|
},
|
|
35
40
|
});
|
|
36
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* List the codes correlated to a patron code
|
|
44
|
+
* Given a patron code, returns the priority/coupon codes tied to that patron's email so the shopper can choose which to apply (CODE-3).
|
|
45
|
+
* @param code The patron code to look up.
|
|
46
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
47
|
+
* @returns CorrelatedCode Returns the correlated codes.
|
|
48
|
+
* @throws ApiError
|
|
49
|
+
*/
|
|
50
|
+
public static getPatronCodes(
|
|
51
|
+
code: string,
|
|
52
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
53
|
+
): CancelablePromise<Array<CorrelatedCode>> {
|
|
54
|
+
return __request(OpenAPI, {
|
|
55
|
+
method: 'GET',
|
|
56
|
+
url: '/code/patron',
|
|
57
|
+
headers: resolveShopperHeaders(context),
|
|
58
|
+
query: {
|
|
59
|
+
'code': code,
|
|
60
|
+
},
|
|
61
|
+
errors: {
|
|
62
|
+
400: `Bad Request error with error details.`,
|
|
63
|
+
404: `Not found error with error details.`,
|
|
64
|
+
500: `Internal Server Error, please contact developers.`,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
}
|
|
37
68
|
/**
|
|
38
69
|
* Apply a code to the current shopper session
|
|
39
70
|
* Applies a code to the current shopper session.
|
|
71
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
40
72
|
* @param requestBody Code to be applied
|
|
41
73
|
* @returns SuccessWithTime Code applied successfully.
|
|
42
74
|
* @throws ApiError
|
|
43
75
|
*/
|
|
44
|
-
public static applyCode(
|
|
45
|
-
requestBody: CodeDto,
|
|
76
|
+
public static applyCode(
|
|
77
|
+
requestBody: CodeDto,
|
|
78
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
46
79
|
): CancelablePromise<SuccessWithTime> {
|
|
47
80
|
return __request(OpenAPI, {
|
|
48
81
|
method: 'POST',
|
|
49
|
-
url: '/code',
|
|
82
|
+
url: '/code',
|
|
83
|
+
headers: resolveShopperHeaders(context),
|
|
50
84
|
body: requestBody,
|
|
51
85
|
mediaType: 'application/json',
|
|
52
86
|
errors: {
|
|
@@ -59,16 +93,19 @@ export class CodeService {
|
|
|
59
93
|
/**
|
|
60
94
|
* Apply a coupon to the current shopper session
|
|
61
95
|
* Applies a coupon to the current shopper session.
|
|
96
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
62
97
|
* @param requestBody Coupon code to be applied
|
|
63
98
|
* @returns UniversalCodeResponse Coupon applied successfully.
|
|
64
99
|
* @throws ApiError
|
|
65
100
|
*/
|
|
66
|
-
public static applyCoupon(
|
|
67
|
-
requestBody: CodeDto,
|
|
101
|
+
public static applyCoupon(
|
|
102
|
+
requestBody: CodeDto,
|
|
103
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
68
104
|
): CancelablePromise<UniversalCodeResponse> {
|
|
69
105
|
return __request(OpenAPI, {
|
|
70
106
|
method: 'POST',
|
|
71
|
-
url: '/code/discount',
|
|
107
|
+
url: '/code/discount',
|
|
108
|
+
headers: resolveShopperHeaders(context),
|
|
72
109
|
body: requestBody,
|
|
73
110
|
mediaType: 'application/json',
|
|
74
111
|
errors: {
|
|
@@ -81,16 +118,19 @@ export class CodeService {
|
|
|
81
118
|
/**
|
|
82
119
|
* Remove a coupon from the current shopper session
|
|
83
120
|
* Removes a coupon from the current shopper session.
|
|
121
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
84
122
|
* @param requestBody Coupon code to be removed
|
|
85
123
|
* @returns UniversalCodeResponse Coupon removed successfully.
|
|
86
124
|
* @throws ApiError
|
|
87
125
|
*/
|
|
88
|
-
public static removeCoupon(
|
|
89
|
-
requestBody: CodeDto,
|
|
126
|
+
public static removeCoupon(
|
|
127
|
+
requestBody: CodeDto,
|
|
128
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
90
129
|
): CancelablePromise<UniversalCodeResponse> {
|
|
91
130
|
return __request(OpenAPI, {
|
|
92
131
|
method: 'DELETE',
|
|
93
|
-
url: '/code/discount',
|
|
132
|
+
url: '/code/discount',
|
|
133
|
+
headers: resolveShopperHeaders(context),
|
|
94
134
|
body: requestBody,
|
|
95
135
|
mediaType: 'application/json',
|
|
96
136
|
errors: {
|
|
@@ -103,16 +143,19 @@ export class CodeService {
|
|
|
103
143
|
/**
|
|
104
144
|
* Apply Priority Code
|
|
105
145
|
* Applies a priority code to the cart.
|
|
146
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
106
147
|
* @param requestBody Priority code data to be applied
|
|
107
148
|
* @returns SuccessWithTime Priority code applied successfully.
|
|
108
149
|
* @throws ApiError
|
|
109
150
|
*/
|
|
110
|
-
public static applyPriorityCode(
|
|
111
|
-
requestBody: PriorityCode,
|
|
151
|
+
public static applyPriorityCode(
|
|
152
|
+
requestBody: PriorityCode,
|
|
153
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
112
154
|
): CancelablePromise<SuccessWithTime> {
|
|
113
155
|
return __request(OpenAPI, {
|
|
114
156
|
method: 'POST',
|
|
115
|
-
url: '/code/priority',
|
|
157
|
+
url: '/code/priority',
|
|
158
|
+
headers: resolveShopperHeaders(context),
|
|
116
159
|
body: requestBody,
|
|
117
160
|
mediaType: 'application/json',
|
|
118
161
|
errors: {
|
|
@@ -5,21 +5,26 @@
|
|
|
5
5
|
import type { DonationContribution } from '../models/DonationContribution';
|
|
6
6
|
import type { DonationResult } from '../models/DonationResult';
|
|
7
7
|
import type { DonationsandContributions } from '../models/DonationsandContributions';
|
|
8
|
+
import type { SuccessResponse } from '../models/SuccessResponse';
|
|
8
9
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
9
10
|
import { OpenAPI } from '../core/OpenAPI';
|
|
10
|
-
import { request as __request } from '../core/request';
|
|
11
|
+
import { request as __request } from '../core/request';
|
|
12
|
+
import { resolveShopperHeaders } from '../../../functions/sdkConfig';
|
|
11
13
|
export class DonationService {
|
|
12
14
|
/**
|
|
13
15
|
* Get all donations for a shopper
|
|
14
16
|
* Retrieves all donations and contributions associated with the specified shopper and account.
|
|
17
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
15
18
|
* @returns DonationsandContributions Returns a list of donations and contributions for the shopper.
|
|
16
19
|
* @throws ApiError
|
|
17
20
|
*/
|
|
18
|
-
public static getDonations(
|
|
21
|
+
public static getDonations(
|
|
22
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
19
23
|
): CancelablePromise<DonationsandContributions> {
|
|
20
24
|
return __request(OpenAPI, {
|
|
21
25
|
method: 'GET',
|
|
22
|
-
url: '/donation',
|
|
26
|
+
url: '/donation',
|
|
27
|
+
headers: resolveShopperHeaders(context),
|
|
23
28
|
errors: {
|
|
24
29
|
400: `Bad Request error with error details.`,
|
|
25
30
|
404: `Not found error with error details.`,
|
|
@@ -31,13 +36,15 @@ export class DonationService {
|
|
|
31
36
|
* Add a donation or contribution
|
|
32
37
|
* Adds a new donation or contribution for the specified shopper and account.
|
|
33
38
|
* @param ipAddress API key for authentication.
|
|
39
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
34
40
|
* @param requestBody Donation or contribution details to add.
|
|
35
41
|
* @returns DonationResult Returns the result of the donation addition.
|
|
36
42
|
* @throws ApiError
|
|
37
43
|
*/
|
|
38
44
|
public static postDonation(
|
|
39
|
-
ipAddress: string,
|
|
40
|
-
requestBody: DonationContribution,
|
|
45
|
+
ipAddress: string,
|
|
46
|
+
requestBody: DonationContribution,
|
|
47
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
41
48
|
): CancelablePromise<DonationResult> {
|
|
42
49
|
return __request(OpenAPI, {
|
|
43
50
|
method: 'POST',
|
|
@@ -54,4 +61,30 @@ export class DonationService {
|
|
|
54
61
|
},
|
|
55
62
|
});
|
|
56
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Remove a donation from the cart
|
|
66
|
+
* Removes the shopper's donation to the given fund and re-runs the payment/tax recompute chain (legacy donation-delete).
|
|
67
|
+
* @param fundId The donation fund id to remove.
|
|
68
|
+
* @param context Optional per-call { shopperGuid, accountId } override. Falls back to the values passed to DRT.init().
|
|
69
|
+
* @returns SuccessResponse Returns success after removing the donation.
|
|
70
|
+
* @throws ApiError
|
|
71
|
+
*/
|
|
72
|
+
public static deleteDonation(
|
|
73
|
+
fundId: number,
|
|
74
|
+
context?: { shopperGuid?: string; accountId?: string },
|
|
75
|
+
): CancelablePromise<SuccessResponse> {
|
|
76
|
+
return __request(OpenAPI, {
|
|
77
|
+
method: 'DELETE',
|
|
78
|
+
url: '/donation',
|
|
79
|
+
headers: resolveShopperHeaders(context),
|
|
80
|
+
query: {
|
|
81
|
+
'fundId': fundId,
|
|
82
|
+
},
|
|
83
|
+
errors: {
|
|
84
|
+
400: `Bad Request error with error details.`,
|
|
85
|
+
404: `Not found error with error details.`,
|
|
86
|
+
500: `Internal Server Error, please contact developers.`,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
}
|
|
57
90
|
}
|