@drttix/drt-sdk 1.0.2 → 1.0.4
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 +59 -59
- package/azure-pipelines.yml +80 -80
- package/demo/README.md +28 -28
- package/demo/default.html +35 -35
- package/demo/test.html +2306 -2306
- package/demo/with-base.html +39 -39
- package/dist/bundle/drt-sdk.js +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/src/definitions/portal.d.ts +2 -0
- package/dist/cjs/src/definitions/portal.js +30 -28
- package/dist/cjs/src/generated/portal/core/OpenAPI.js +1 -1
- package/dist/cjs/src/generated/portal/index.d.ts +10 -0
- package/dist/cjs/src/generated/portal/index.js +7 -1
- package/dist/cjs/src/generated/portal/models/CreateRefundRequestDto.d.ts +7 -0
- package/dist/cjs/src/generated/portal/models/CreateRefundRequestDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/InterviewDetailDto.d.ts +51 -0
- package/dist/cjs/src/generated/portal/models/InterviewDetailDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/InterviewFollowupDto.d.ts +5 -0
- package/dist/cjs/src/generated/portal/models/InterviewFollowupDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/InterviewUpdateResponseDto.d.ts +11 -0
- package/dist/cjs/src/generated/portal/models/InterviewUpdateResponseDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/InterviewUpdateSubmitRequestDto.d.ts +51 -0
- package/dist/cjs/src/generated/portal/models/InterviewUpdateSubmitRequestDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/LeadDto.d.ts +6 -0
- package/dist/cjs/src/generated/portal/models/LeadDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/PhoneHoursDto.d.ts +4 -0
- package/dist/cjs/src/generated/portal/models/PhoneHoursDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/StudentCreditBuyerResponseDto.d.ts +12 -0
- package/dist/cjs/src/generated/portal/models/StudentCreditBuyerResponseDto.js +2 -0
- package/dist/cjs/src/generated/portal/models/UpdateStripeUsageRequestDto.d.ts +9 -0
- package/dist/cjs/src/generated/portal/models/UpdateStripeUsageRequestDto.js +11 -0
- package/dist/cjs/src/generated/portal/models/UpdateTaxRegistrationRequestDto.d.ts +9 -0
- package/dist/cjs/src/generated/portal/models/UpdateTaxRegistrationRequestDto.js +11 -0
- package/dist/cjs/src/generated/portal/services/AccountingService.d.ts +10 -0
- package/dist/cjs/src/generated/portal/services/AccountingService.js +19 -0
- package/dist/cjs/src/generated/portal/services/ClientToolsInterviewUpdateService.d.ts +24 -0
- package/dist/cjs/src/generated/portal/services/ClientToolsInterviewUpdateService.js +47 -0
- package/dist/cjs/src/generated/portal/services/ClientToolsStripeOnboardingService.d.ts +21 -0
- package/dist/cjs/src/generated/portal/services/ClientToolsStripeOnboardingService.js +38 -0
- package/dist/cjs/src/generated/portal/types.d.ts +7 -0
- package/dist/cjs/src/scripts/generate-definition.js +20 -19
- package/dist/cjs/src/staging/index.d.ts +1 -0
- package/dist/cjs/src/staging/portal.d.ts +2 -0
- package/dist/cjs/src/staging/portal.js +31 -28
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/src/definitions/portal.d.ts +2 -0
- package/dist/esm/src/definitions/portal.js +2 -0
- package/dist/esm/src/generated/portal/core/OpenAPI.js +1 -1
- package/dist/esm/src/generated/portal/index.d.ts +10 -0
- package/dist/esm/src/generated/portal/index.js +3 -0
- package/dist/esm/src/generated/portal/models/CreateRefundRequestDto.d.ts +7 -0
- package/dist/esm/src/generated/portal/models/CreateRefundRequestDto.js +1 -0
- package/dist/esm/src/generated/portal/models/InterviewDetailDto.d.ts +51 -0
- package/dist/esm/src/generated/portal/models/InterviewDetailDto.js +1 -0
- package/dist/esm/src/generated/portal/models/InterviewFollowupDto.d.ts +5 -0
- package/dist/esm/src/generated/portal/models/InterviewFollowupDto.js +1 -0
- package/dist/esm/src/generated/portal/models/InterviewUpdateResponseDto.d.ts +11 -0
- package/dist/esm/src/generated/portal/models/InterviewUpdateResponseDto.js +1 -0
- package/dist/esm/src/generated/portal/models/InterviewUpdateSubmitRequestDto.d.ts +51 -0
- package/dist/esm/src/generated/portal/models/InterviewUpdateSubmitRequestDto.js +1 -0
- package/dist/esm/src/generated/portal/models/LeadDto.d.ts +6 -0
- package/dist/esm/src/generated/portal/models/LeadDto.js +1 -0
- package/dist/esm/src/generated/portal/models/PhoneHoursDto.d.ts +4 -0
- package/dist/esm/src/generated/portal/models/PhoneHoursDto.js +1 -0
- package/dist/esm/src/generated/portal/models/StudentCreditBuyerResponseDto.d.ts +12 -0
- package/dist/esm/src/generated/portal/models/StudentCreditBuyerResponseDto.js +1 -0
- package/dist/esm/src/generated/portal/models/UpdateStripeUsageRequestDto.d.ts +9 -0
- package/dist/esm/src/generated/portal/models/UpdateStripeUsageRequestDto.js +8 -0
- package/dist/esm/src/generated/portal/models/UpdateTaxRegistrationRequestDto.d.ts +9 -0
- package/dist/esm/src/generated/portal/models/UpdateTaxRegistrationRequestDto.js +8 -0
- package/dist/esm/src/generated/portal/services/AccountingService.d.ts +10 -0
- package/dist/esm/src/generated/portal/services/AccountingService.js +19 -0
- package/dist/esm/src/generated/portal/services/ClientToolsInterviewUpdateService.d.ts +24 -0
- package/dist/esm/src/generated/portal/services/ClientToolsInterviewUpdateService.js +43 -0
- package/dist/esm/src/generated/portal/services/ClientToolsStripeOnboardingService.d.ts +21 -0
- package/dist/esm/src/generated/portal/services/ClientToolsStripeOnboardingService.js +38 -0
- package/dist/esm/src/generated/portal/types.d.ts +7 -0
- package/dist/esm/src/scripts/generate-definition.js +20 -19
- package/dist/esm/src/staging/index.d.ts +1 -0
- package/dist/esm/src/staging/portal.d.ts +2 -0
- package/dist/esm/src/staging/portal.js +3 -0
- package/drt-api-specs-staging.json +14 -14
- package/drt-api-specs.json +14 -14
- package/package.json +40 -40
- package/public/sdk/latest/drt-sdk.js +1 -1
- package/scripts/fix-import-extensions.mjs +88 -88
- package/src/custom/custom-request.txt +387 -387
- package/src/definitions/portal.ts +2 -0
- package/src/functions/sdkConfig.ts +132 -132
- package/src/functions/setBaseURL.ts +47 -47
- package/src/generated/portal/core/ApiError.ts +1 -1
- package/src/generated/portal/core/ApiRequestOptions.ts +1 -1
- package/src/generated/portal/core/ApiResult.ts +1 -1
- package/src/generated/portal/core/CancelablePromise.ts +1 -1
- package/src/generated/portal/core/OpenAPI.ts +2 -2
- package/src/generated/portal/core/request.ts +387 -387
- package/src/generated/portal/index.ts +10 -0
- package/src/generated/portal/models/AbandonedCartResponseDto.ts +13 -13
- package/src/generated/portal/models/AccountDetailResponseDto.ts +10 -10
- package/src/generated/portal/models/AddSessionSeatRequestDto.ts +9 -9
- package/src/generated/portal/models/AdminUserLevelResponseDto.ts +9 -9
- package/src/generated/portal/models/AdminUserResponseDto.ts +13 -13
- package/src/generated/portal/models/AdvancedPricing.ts +14 -14
- package/src/generated/portal/models/AlbumImageResponseDto.ts +9 -9
- package/src/generated/portal/models/AnswerOrder.ts +10 -10
- package/src/generated/portal/models/ApproveOrderRequestDto.ts +9 -9
- package/src/generated/portal/models/ApproveRefundRequestDto.ts +10 -10
- package/src/generated/portal/models/ApproveShowRequestDto.ts +8 -8
- package/src/generated/portal/models/AssignSeatsRequestDto.ts +13 -13
- package/src/generated/portal/models/AssignWaitlistRequestDto.ts +11 -11
- package/src/generated/portal/models/AutoDiscounts.ts +8 -8
- package/src/generated/portal/models/AvaliableSeats.ts +12 -12
- package/src/generated/portal/models/BankDetails.ts +24 -24
- package/src/generated/portal/models/BlacklistedBuyerResponseDto.ts +7 -7
- package/src/generated/portal/models/BlockChartSeatRequestDto.ts +12 -12
- package/src/generated/portal/models/BlockGeneralSeatResponseDto.ts +11 -11
- package/src/generated/portal/models/BlockGeneralSeatsRequestDto.ts +9 -9
- package/src/generated/portal/models/BlockSeatsRequestDto.ts +8 -8
- package/src/generated/portal/models/BlockedSeatDetailResponseDto.ts +15 -15
- package/src/generated/portal/models/BookmarkResponseDto.ts +12 -12
- package/src/generated/portal/models/BugReportRequestDto.ts +9 -9
- package/src/generated/portal/models/BulkCreateGiftCardRequestDto.ts +20 -20
- package/src/generated/portal/models/BulkEditRequestDto.ts +18 -18
- package/src/generated/portal/models/BuyerResponseDto.ts +17 -17
- package/src/generated/portal/models/CancelExchangeTicketRequestDto.ts +9 -9
- package/src/generated/portal/models/CartCountResponseDto.ts +8 -8
- package/src/generated/portal/models/CartToggleTickerResponseDto.ts +8 -8
- package/src/generated/portal/models/ChangePasswordRequestDto.ts +10 -10
- package/src/generated/portal/models/ChartReviewRequestDto.ts +9 -9
- package/src/generated/portal/models/ChartReviewValidationResponseDto.ts +9 -9
- package/src/generated/portal/models/CheckBookmarkResponseDto.ts +10 -10
- package/src/generated/portal/models/CheckSelectedSeatResponseDto.ts +10 -10
- package/src/generated/portal/models/CheckoutAnswerOrderRequestDto.ts +9 -9
- package/src/generated/portal/models/CheckoutAnswerOrderResponseDto.ts +19 -19
- package/src/generated/portal/models/CheckoutAnswerQuestionResponseDto.ts +11 -11
- package/src/generated/portal/models/CheckoutQuestionResponseDto.ts +29 -29
- package/src/generated/portal/models/CheckoutResponseShowResponseDto.ts +10 -10
- package/src/generated/portal/models/CodeDetailResponseDto.ts +29 -29
- package/src/generated/portal/models/CodeDetailsResponseDto.ts +11 -11
- package/src/generated/portal/models/CodeShopperDetail.ts +10 -10
- package/src/generated/portal/models/CodeUsageDetail.ts +16 -16
- package/src/generated/portal/models/CodeUsageResponseDto.ts +12 -12
- package/src/generated/portal/models/CollectionDetailsRequestDto.ts +8 -8
- package/src/generated/portal/models/CollectionDetailsResponseDto.ts +14 -14
- package/src/generated/portal/models/CouponCodeResponseDto.ts +14 -14
- package/src/generated/portal/models/CouponDataResponseDto.ts +17 -17
- package/src/generated/portal/models/CouponDetailResponseDto.ts +35 -35
- package/src/generated/portal/models/CouponFilterResponseDto.ts +11 -11
- package/src/generated/portal/models/CouponType.ts +10 -10
- package/src/generated/portal/models/CreateAccountRequestDto.ts +11 -11
- package/src/generated/portal/models/CreateAccountResponseDto.ts +8 -8
- package/src/generated/portal/models/CreatePatronCodeRequestDto.ts +9 -9
- package/src/generated/portal/models/CreatePatronTagsRequestDto.ts +9 -9
- package/src/generated/portal/models/CreatePerformersRequestDto.ts +10 -10
- package/src/generated/portal/models/CreatePriorityCodeRequestDto.ts +26 -26
- package/src/generated/portal/models/CreateProductResponseDto.ts +8 -8
- package/src/generated/portal/models/CreateProductVariantRequestDto.ts +9 -9
- package/src/generated/portal/models/CreateRefundRequestDto.ts +12 -0
- package/src/generated/portal/models/CreateUpdateAdminUserRequestDto.ts +12 -12
- package/src/generated/portal/models/CreateUpdateAlbumRequestDto.ts +8 -8
- package/src/generated/portal/models/CreateUpdateFundRequestDto.ts +24 -24
- package/src/generated/portal/models/CreateUpdateGiftCardRequestDto.ts +15 -15
- package/src/generated/portal/models/CreateUpdateGoldenTicketRequestDto.ts +12 -12
- package/src/generated/portal/models/CreateUpdateProductRequestDto.ts +35 -35
- package/src/generated/portal/models/CreateUpdateQuestionRequestDto.ts +23 -23
- package/src/generated/portal/models/CreateUpdateWaitlistRequestDto.ts +15 -15
- package/src/generated/portal/models/CreateYoutubeVideoRequestDto.ts +11 -11
- package/src/generated/portal/models/CustomLogicResponseDto.ts +9 -9
- package/src/generated/portal/models/DashboardResponseDto.ts +11 -11
- package/src/generated/portal/models/DeleteAbandonedCartsRequestDto.ts +11 -11
- package/src/generated/portal/models/DeleteAlbumImageRequestDto.ts +8 -8
- package/src/generated/portal/models/DeleteCodesRequestDto.ts +9 -9
- package/src/generated/portal/models/DeleteCouponCodeRequestDto.ts +8 -8
- package/src/generated/portal/models/DeleteMailRequestDto.ts +8 -8
- package/src/generated/portal/models/DeletePatronCodeRequestDto.ts +8 -8
- package/src/generated/portal/models/DeletePriorityCodeRequestDto.ts +8 -8
- package/src/generated/portal/models/DeleteProductVariantRequestDto.ts +9 -9
- package/src/generated/portal/models/DigitalAssetLogResponseDto.ts +10 -10
- package/src/generated/portal/models/DigitalAssetsListResponseDto.ts +16 -16
- package/src/generated/portal/models/DiscountAccessRequestDto.ts +33 -33
- package/src/generated/portal/models/DisputeResponseDTO.ts +21 -21
- package/src/generated/portal/models/DonationFundsResponseDto.ts +9 -9
- package/src/generated/portal/models/DonationReportResponseDto.ts +18 -18
- package/src/generated/portal/models/DonationRequestDto.ts +9 -9
- package/src/generated/portal/models/DonationResponseDto.ts +14 -14
- package/src/generated/portal/models/DownloadLog.ts +10 -10
- package/src/generated/portal/models/DuplicateFundRequestDto.ts +8 -8
- package/src/generated/portal/models/DuplicateProductRequestDto.ts +8 -8
- package/src/generated/portal/models/EditMailRequestDto.ts +10 -10
- package/src/generated/portal/models/EditShowRequestDto.ts +23 -23
- package/src/generated/portal/models/EmailBuyersListResponseDto.ts +11 -11
- package/src/generated/portal/models/EmailBuyersRequestDto.ts +13 -13
- package/src/generated/portal/models/EmailDetailResponseDto.ts +9 -9
- package/src/generated/portal/models/ExchangeShowDetailResponseDto.ts +30 -30
- package/src/generated/portal/models/ExchangeTierDetailResponseDto.ts +14 -14
- package/src/generated/portal/models/ExecuteReleaseSeatRequestDto.ts +16 -16
- package/src/generated/portal/models/ExecuteSeatExchangeRequestDto.ts +11 -11
- package/src/generated/portal/models/ExpireHiddenCodesRequestDto.ts +8 -8
- package/src/generated/portal/models/FilterShowsResponseDto.ts +14 -14
- package/src/generated/portal/models/ForgotPasswordRequestDto.ts +9 -9
- package/src/generated/portal/models/FundListResponseDto.ts +13 -13
- package/src/generated/portal/models/FundResponseDto.ts +34 -34
- package/src/generated/portal/models/FutureMailResponseDto.ts +13 -13
- package/src/generated/portal/models/GatewayStatus.ts +16 -16
- package/src/generated/portal/models/GenerateCodeRequestDto.ts +23 -23
- package/src/generated/portal/models/GenerateGroupCodeRequestDto.ts +12 -12
- package/src/generated/portal/models/GetSettingsResponseDto.ts +14 -14
- package/src/generated/portal/models/GiftCardResponseDto.ts +19 -19
- package/src/generated/portal/models/GiftCardTransactionsResponseDto.ts +13 -13
- package/src/generated/portal/models/GoldenTicketDetailResponseDto.ts +10 -10
- package/src/generated/portal/models/GoldenTicketShowsResponseDto.ts +10 -10
- package/src/generated/portal/models/GroupCodeResponseDto.ts +17 -17
- package/src/generated/portal/models/HashLoginResponseDto.ts +20 -20
- package/src/generated/portal/models/HashTicketingLinkResponseDto.ts +15 -15
- package/src/generated/portal/models/HiddenCodeResponseDto.ts +8 -8
- package/src/generated/portal/models/HoldChartSeatResponseDto.ts +14 -14
- package/src/generated/portal/models/HoldSeatDetailsResponseDto.ts +7 -7
- package/src/generated/portal/models/IconShowGroupResponseDto.ts +11 -11
- package/src/generated/portal/models/InsertUpdateBlacklistBuyerRequestDto.ts +17 -17
- package/src/generated/portal/models/InterviewDetailDto.ts +56 -0
- package/src/generated/portal/models/InterviewDetailResponseDto.ts +12 -12
- package/src/generated/portal/models/InterviewFollowupDto.ts +10 -0
- package/src/generated/portal/models/InterviewResponseDto.ts +16 -16
- package/src/generated/portal/models/InterviewUpdateResponseDto.ts +16 -0
- package/src/generated/portal/models/InterviewUpdateSubmitRequestDto.ts +56 -0
- package/src/generated/portal/models/LandingPageAlbumResponseDto.ts +12 -12
- package/src/generated/portal/models/LandingPageResponseDto.ts +28 -28
- package/src/generated/portal/models/LeadDto.ts +11 -0
- package/src/generated/portal/models/LoginRequestDto.ts +9 -9
- package/src/generated/portal/models/MailDetailResponseDto.ts +12 -12
- package/src/generated/portal/models/MailResponseDto.ts +11 -11
- package/src/generated/portal/models/ManagedShowResponseDto.ts +13 -13
- package/src/generated/portal/models/MappedPortalObjectPermission.ts +13 -13
- package/src/generated/portal/models/MappedPortalObjectSimple.ts +10 -10
- package/src/generated/portal/models/MessageSettingResponseDto.ts +10 -10
- package/src/generated/portal/models/MigrateTicketDetails.ts +13 -13
- package/src/generated/portal/models/MigrateTicketRequestDto.ts +10 -10
- package/src/generated/portal/models/MigrationPossibleShow.ts +13 -13
- package/src/generated/portal/models/ModifyTicketRequestDto.ts +11 -11
- package/src/generated/portal/models/NotificationDto.ts +10 -10
- package/src/generated/portal/models/NotificationResponseDto.ts +13 -13
- package/src/generated/portal/models/NotificationSettingRequestDto.ts +9 -9
- package/src/generated/portal/models/NotificationSettingsResponseDto.ts +13 -13
- package/src/generated/portal/models/OTPResponseDto.ts +9 -9
- package/src/generated/portal/models/OrderActionsResponseDto.ts +13 -13
- package/src/generated/portal/models/OrderDetails.ts +13 -13
- package/src/generated/portal/models/OrderEmailBuyersRequestDto.ts +16 -16
- package/src/generated/portal/models/OrderFiltersResponseDto.ts +10 -10
- package/src/generated/portal/models/OrderLedgerDetailsResponseDto.ts +20 -20
- package/src/generated/portal/models/OrderListRequestDto.ts +10 -10
- package/src/generated/portal/models/OrderListResponseDto.ts +24 -24
- package/src/generated/portal/models/OrderRecalculateRequestDto.ts +15 -15
- package/src/generated/portal/models/OrderSeatDetailsResponseDto.ts +15 -15
- package/src/generated/portal/models/OrderTicketDetailResponseDto.ts +21 -21
- package/src/generated/portal/models/OtherResponseDto.ts +14 -14
- package/src/generated/portal/models/PartialShowDetail.ts +12 -12
- package/src/generated/portal/models/PartialTicketResponseDto.ts +20 -20
- package/src/generated/portal/models/PatronAccessRequestDto.ts +26 -26
- package/src/generated/portal/models/PatronCodeSendMailRequestDto.ts +14 -14
- package/src/generated/portal/models/PatronCodesResponseDto.ts +18 -18
- package/src/generated/portal/models/PatronManifestDetailResponseDto.ts +28 -28
- package/src/generated/portal/models/PatronShowGroupResponseDto.ts +21 -21
- package/src/generated/portal/models/PatronStatsResponseDto.ts +21 -21
- package/src/generated/portal/models/PaymentGatewayResponseDto.ts +17 -17
- package/src/generated/portal/models/PerformerCreditOrderRequestDto.ts +9 -9
- package/src/generated/portal/models/Performers.ts +9 -9
- package/src/generated/portal/models/PerformersListRequestDto.ts +9 -9
- package/src/generated/portal/models/PerformersListResponseDto.ts +11 -11
- package/src/generated/portal/models/PhoneHoursDto.ts +9 -0
- package/src/generated/portal/models/PolicyDetailResponseDto.ts +15 -15
- package/src/generated/portal/models/PolicyDto.ts +9 -9
- package/src/generated/portal/models/PolicyRequestDto.ts +9 -9
- package/src/generated/portal/models/PolicyResponseDto.ts +12 -12
- package/src/generated/portal/models/PortalObjectRequestDto.ts +13 -13
- package/src/generated/portal/models/PosSettingsRequestDto.ts +13 -13
- package/src/generated/portal/models/PosSettingsResponseDto.ts +13 -13
- package/src/generated/portal/models/PriorityCode.ts +10 -10
- package/src/generated/portal/models/PriorityCodeResponseDto.ts +13 -13
- package/src/generated/portal/models/PriorityWaveDetail.ts +12 -12
- package/src/generated/portal/models/ProductDetailResponseDto.ts +35 -35
- package/src/generated/portal/models/ProductIconResponseDto.ts +11 -11
- package/src/generated/portal/models/ProductListResponseDto.ts +17 -17
- package/src/generated/portal/models/ProductRecipientResponseDto.ts +11 -11
- package/src/generated/portal/models/ProductResponseDto.ts +14 -14
- package/src/generated/portal/models/ProductSalesRequestDto.ts +11 -11
- package/src/generated/portal/models/ProductSalesResponseDto.ts +11 -11
- package/src/generated/portal/models/ProductSendMailRequestDto.ts +18 -18
- package/src/generated/portal/models/ProductVariantResponseDto.ts +18 -18
- package/src/generated/portal/models/QuestionDetailsResponseDto.ts +16 -16
- package/src/generated/portal/models/QuestionResponseDto.ts +9 -9
- package/src/generated/portal/models/QuestionShowGroupAndProductResponse.ts +9 -9
- package/src/generated/portal/models/QuestionShowResponse.ts +13 -13
- package/src/generated/portal/models/QuestionTypeResponse.ts +10 -10
- package/src/generated/portal/models/RecalculateOrderResponseDto.ts +35 -35
- package/src/generated/portal/models/RefundDetailResponseDto.ts +33 -33
- package/src/generated/portal/models/RefundOrderDetail.ts +17 -17
- package/src/generated/portal/models/RefundResponseDto.ts +24 -24
- package/src/generated/portal/models/RefundSetting.ts +9 -9
- package/src/generated/portal/models/RefundSettingsResponseDto.ts +7 -7
- package/src/generated/portal/models/ReleaseSeatDetailResponseDto.ts +29 -29
- package/src/generated/portal/models/ReleasedTicketResponseDto.ts +12 -12
- package/src/generated/portal/models/RemoveReservationCodeRequestDto.ts +10 -10
- package/src/generated/portal/models/RemoveSeatsRequestDto.ts +11 -11
- package/src/generated/portal/models/ReorderBookmarkRequestDto.ts +11 -11
- package/src/generated/portal/models/ReorderImageRequestDto.ts +8 -8
- package/src/generated/portal/models/ReportProductSalesResponseDto.ts +30 -30
- package/src/generated/portal/models/ResendMailRequestDto.ts +9 -9
- package/src/generated/portal/models/ReservationCodeResponseDto.ts +20 -20
- package/src/generated/portal/models/ReservationDetailResponseDto.ts +18 -18
- package/src/generated/portal/models/ResetTaxPaymentRequestDto.ts +9 -9
- package/src/generated/portal/models/RevenueByShowRequestDto.ts +10 -10
- package/src/generated/portal/models/RevenueShowCalculationsResponseDto.ts +19 -19
- package/src/generated/portal/models/SaleDetail.ts +14 -14
- package/src/generated/portal/models/SalesByTierReponseDto.ts +17 -17
- package/src/generated/portal/models/SalesProductResponseDto.ts +11 -11
- package/src/generated/portal/models/SaveAdministrativeNoteRequestDto.ts +9 -9
- package/src/generated/portal/models/ScannedTicketOrderResponseDto.ts +22 -22
- package/src/generated/portal/models/ScannedTicketResponseDto.ts +10 -10
- package/src/generated/portal/models/SearchCodeResponseDto.ts +9 -9
- package/src/generated/portal/models/SearchFeatureResponseDto.ts +18 -18
- package/src/generated/portal/models/SearchOrderResponseDto.ts +15 -15
- package/src/generated/portal/models/SearchResponseDto.ts +15 -15
- package/src/generated/portal/models/SeatDetails.ts +22 -22
- package/src/generated/portal/models/SeatDetailsResponseDto.ts +10 -10
- package/src/generated/portal/models/SeatResponseDto.ts +17 -17
- package/src/generated/portal/models/SectionDetail.ts +10 -10
- package/src/generated/portal/models/SectionRule.ts +12 -12
- package/src/generated/portal/models/SelectedSeatExchangeResponseDto.ts +11 -11
- package/src/generated/portal/models/SendBlockedSeatsMailRequestDto.ts +12 -12
- package/src/generated/portal/models/SendMailRequestDto.ts +10 -10
- package/src/generated/portal/models/SendReservationCodeMailRequestDto.ts +12 -12
- package/src/generated/portal/models/SentMailResponseDto.ts +14 -14
- package/src/generated/portal/models/SettingsAndWavesResponseDto.ts +13 -13
- package/src/generated/portal/models/SettingsDetailsResponseDto.ts +57 -57
- package/src/generated/portal/models/Show.ts +11 -11
- package/src/generated/portal/models/ShowAndGroupResponseDto.ts +14 -14
- package/src/generated/portal/models/ShowBlockedSeatResponseDto.ts +26 -26
- package/src/generated/portal/models/ShowChartPreviewResponseDto.ts +10 -10
- package/src/generated/portal/models/ShowDetailDto.ts +71 -71
- package/src/generated/portal/models/ShowDetails.ts +12 -12
- package/src/generated/portal/models/ShowDetailsResponseDto.ts +16 -16
- package/src/generated/portal/models/ShowGroupResponseDto.ts +9 -9
- package/src/generated/portal/models/ShowGroups.ts +9 -9
- package/src/generated/portal/models/ShowListResponseDto.ts +15 -15
- package/src/generated/portal/models/ShowOrders.ts +11 -11
- package/src/generated/portal/models/ShowPricing.ts +17 -17
- package/src/generated/portal/models/ShowPricingDetail.ts +11 -11
- package/src/generated/portal/models/ShowReportListResponseDto.ts +14 -14
- package/src/generated/portal/models/ShowSeatDetailResponseDto.ts +11 -11
- package/src/generated/portal/models/ShowSeatPair.ts +9 -9
- package/src/generated/portal/models/ShowSeatTierPair.ts +10 -10
- package/src/generated/portal/models/ShowSectionDetail.ts +14 -14
- package/src/generated/portal/models/ShowSnapshotResponseDto.ts +22 -22
- package/src/generated/portal/models/ShowStatDetail.ts +34 -34
- package/src/generated/portal/models/ShowTicketSectionListResponseDto.ts +11 -11
- package/src/generated/portal/models/ShowTierRequestDto.ts +8 -8
- package/src/generated/portal/models/ShowTierResponseDto.ts +30 -30
- package/src/generated/portal/models/ShowTiers.ts +32 -32
- package/src/generated/portal/models/ShowTypeResponseDto.ts +10 -10
- package/src/generated/portal/models/ShowTypes.ts +10 -10
- package/src/generated/portal/models/Shows.ts +13 -13
- package/src/generated/portal/models/ShowsList.ts +32 -32
- package/src/generated/portal/models/ShowsResponseDto.ts +17 -17
- package/src/generated/portal/models/SingleFundDetailResponseDto.ts +11 -11
- package/src/generated/portal/models/SingleOrderDetailResponseDto.ts +21 -21
- package/src/generated/portal/models/SinglePatronCodeResponseDto.ts +23 -23
- package/src/generated/portal/models/SinglePerformerRequestDto.ts +9 -9
- package/src/generated/portal/models/SoldTicketsResponseDto.ts +32 -32
- package/src/generated/portal/models/StartImageUploadRequestDto.ts +8 -8
- package/src/generated/portal/models/StartImageUploadResponseDto.ts +9 -9
- package/src/generated/portal/models/StopShowRequestDto.ts +11 -11
- package/src/generated/portal/models/StringValidation.ts +13 -13
- package/src/generated/portal/models/StripeResponseDto.ts +13 -13
- package/src/generated/portal/models/StripeSettingsResponseDto.ts +13 -13
- package/src/generated/portal/models/StudentCreditOrdersResponseDto.ts +13 -13
- package/src/generated/portal/models/StudentCreditResponseDto.ts +10 -10
- package/src/generated/portal/models/StudioIntegratorDetailResponseDto.ts +11 -11
- package/src/generated/portal/models/SuccessResponse.ts +8 -8
- package/src/generated/portal/models/SupportTicketResponseDto.ts +31 -31
- package/src/generated/portal/models/SupportTicketStatusResponseDto.ts +9 -9
- package/src/generated/portal/models/TaxAndBankDetailsResponseDto.ts +11 -11
- package/src/generated/portal/models/TaxByMonthRequestDto.ts +9 -9
- package/src/generated/portal/models/TaxByMonthResponseDto.ts +19 -19
- package/src/generated/portal/models/TaxDocuments.ts +9 -9
- package/src/generated/portal/models/TaxResponseDto.ts +14 -14
- package/src/generated/portal/models/TemplateResponseDto.ts +9 -9
- package/src/generated/portal/models/TheatreList.ts +8 -8
- package/src/generated/portal/models/ThemeBannerImageResponseDto.ts +11 -11
- package/src/generated/portal/models/ThemeCategoryResponseDto.ts +10 -10
- package/src/generated/portal/models/ThemeDesignResponseDto.ts +37 -37
- package/src/generated/portal/models/ThemeDetailResponseDto.ts +10 -10
- package/src/generated/portal/models/ThemeLinkResponseDto.ts +11 -11
- package/src/generated/portal/models/ThemeResponseDto.ts +11 -11
- package/src/generated/portal/models/TicketDetail.ts +24 -24
- package/src/generated/portal/models/TicketDetails.ts +18 -18
- package/src/generated/portal/models/TicketRequestDto.ts +9 -9
- package/src/generated/portal/models/TicketResponseDto.ts +19 -19
- package/src/generated/portal/models/TicketScanningShowResponseDto.ts +18 -18
- package/src/generated/portal/models/TicketSeatDetailResponseDto.ts +27 -27
- package/src/generated/portal/models/TicketingShowResponseDto.ts +13 -13
- package/src/generated/portal/models/TierDetail.ts +14 -14
- package/src/generated/portal/models/TierRequestDto.ts +10 -10
- package/src/generated/portal/models/TieredPrice.ts +17 -17
- package/src/generated/portal/models/TimeZoneResponse.ts +9 -9
- package/src/generated/portal/models/ToggleModifyTierRequestDto.ts +10 -10
- package/src/generated/portal/models/ToggleModifyTierResponseDto.ts +10 -10
- package/src/generated/portal/models/ToggleTierRequestDto.ts +9 -9
- package/src/generated/portal/models/ToggleTierResponseDto.ts +12 -12
- package/src/generated/portal/models/TransactionDetail.ts +14 -14
- package/src/generated/portal/models/UnApprovedOrderSeatDetailResponseDto.ts +12 -12
- package/src/generated/portal/models/UnAvailableSeating.ts +14 -14
- package/src/generated/portal/models/UnapprovedOrderDetailResponseDto.ts +10 -10
- package/src/generated/portal/models/UnapprovedOrderResponseDto.ts +17 -17
- package/src/generated/portal/models/UnblockSeatsRequestDto.ts +9 -9
- package/src/generated/portal/models/UnsoldTicketsResponseDto.ts +21 -21
- package/src/generated/portal/models/UpdateBankingRequestDto.ts +21 -21
- package/src/generated/portal/models/UpdateDiscountCodeRequestDto.ts +21 -21
- package/src/generated/portal/models/UpdateEmailRequestDto.ts +8 -8
- package/src/generated/portal/models/UpdateImageUploadRequestDto.ts +10 -10
- package/src/generated/portal/models/UpdateLandingPageConfigSettingRequestDto.ts +23 -23
- package/src/generated/portal/models/UpdateLandingPageRequestDto.ts +13 -13
- package/src/generated/portal/models/UpdateMessageRequestDto.ts +10 -10
- package/src/generated/portal/models/UpdatePatronCodeRequestDto.ts +15 -15
- package/src/generated/portal/models/UpdatePatronSettingsRequestDto.ts +11 -11
- package/src/generated/portal/models/UpdatePatronTagsRequestDto.ts +10 -10
- package/src/generated/portal/models/UpdatePriorityCodeRequestDto.ts +19 -19
- package/src/generated/portal/models/UpdateProductVariantRequestDto.ts +15 -15
- package/src/generated/portal/models/UpdateSearchLogRequestDto.ts +9 -9
- package/src/generated/portal/models/UpdateStripeUsageRequestDto.ts +14 -0
- package/src/generated/portal/models/UpdateStudioSettingsRequestDto.ts +16 -16
- package/src/generated/portal/models/UpdateTaxRegistrationRequestDto.ts +14 -0
- package/src/generated/portal/models/UpdateTaxRequestDto.ts +12 -12
- package/src/generated/portal/models/UpdateThemeDesignRequestDto.ts +32 -32
- package/src/generated/portal/models/ValidateEmailRequestDto.ts +8 -8
- package/src/generated/portal/models/ValidateEmailResponseDto.ts +9 -9
- package/src/generated/portal/models/VerifyOtpRequestDto.ts +9 -9
- package/src/generated/portal/models/VideoStreamResponseDto.ts +19 -19
- package/src/generated/portal/models/VirtualStreamResponseDto.ts +15 -15
- package/src/generated/portal/models/WaitlistDetailResponseDto.ts +18 -18
- package/src/generated/portal/models/WaitlistShowFilterResponseDto.ts +9 -9
- package/src/generated/portal/models/WaitlistShowResponseDto.ts +22 -22
- package/src/generated/portal/models/WavesResponseDto.ts +9 -9
- package/src/generated/portal/models/WeeklyResponseDto.ts +15 -15
- package/src/generated/portal/models/createServiceAgreementRequestDto.ts +9 -9
- package/src/generated/portal/models/seatShowIdPair.ts +9 -9
- package/src/generated/portal/models/tierIdQuantityPair.ts +9 -9
- package/src/generated/portal/services/AccountService.ts +140 -140
- package/src/generated/portal/services/AccountingService.ts +516 -493
- package/src/generated/portal/services/AppService.ts +33 -33
- package/src/generated/portal/services/AuthService.ts +183 -183
- package/src/generated/portal/services/BookmarkService.ts +127 -127
- package/src/generated/portal/services/ClientToolsGeneratedEmailsService.ts +109 -109
- package/src/generated/portal/services/ClientToolsInterviewUpdateService.ts +57 -0
- package/src/generated/portal/services/ClientToolsParentLetterService.ts +28 -28
- package/src/generated/portal/services/ClientToolsPatronDatabaseService.ts +441 -441
- package/src/generated/portal/services/ClientToolsSeatAssignmentToolService.ts +28 -28
- package/src/generated/portal/services/ClientToolsStripeOnboardingService.ts +75 -28
- package/src/generated/portal/services/ClientToolsThemeBuilderService.ts +149 -149
- package/src/generated/portal/services/ClientToolsThemesLibraryService.ts +63 -63
- package/src/generated/portal/services/ClientToolsTicketScanningService.ts +71 -71
- package/src/generated/portal/services/ClientToolsTicketingLinkService.ts +58 -58
- package/src/generated/portal/services/ClientToolsUnapprovedOrdersService.ts +81 -81
- package/src/generated/portal/services/ClientToolsWaitlistService.ts +204 -204
- package/src/generated/portal/services/DashboardService.ts +71 -71
- package/src/generated/portal/services/FeaturesBlockedSeatsService.ts +548 -548
- package/src/generated/portal/services/FeaturesCheckoutQuestionsService.ts +144 -144
- package/src/generated/portal/services/FeaturesDiscountsService.ts +319 -319
- package/src/generated/portal/services/FeaturesDonationsService.ts +247 -247
- package/src/generated/portal/services/FeaturesGiftCardsService.ts +177 -177
- package/src/generated/portal/services/FeaturesGoldenTicketsService.ts +208 -208
- package/src/generated/portal/services/FeaturesLandingPageService.ts +299 -299
- package/src/generated/portal/services/FeaturesPriorityService.ts +255 -255
- package/src/generated/portal/services/FeaturesProductsService.ts +441 -441
- package/src/generated/portal/services/OrderLookupService.ts +615 -615
- package/src/generated/portal/services/ReportsService.ts +488 -488
- package/src/generated/portal/services/SettingsService.ts +377 -377
- package/src/generated/portal/services/ShowsService.ts +658 -658
- package/src/generated/portal/services/SuperUserAbandonedCartsService.ts +52 -52
- package/src/generated/portal/services/SuperUserBuyerBlacklistService.ts +125 -125
- package/src/generated/portal/services/SuperUserReleasedTicketsService.ts +28 -28
- package/src/generated/portal/services/SuperUserSupportTicketsService.ts +46 -46
- package/src/generated/portal/types.ts +7 -0
- package/src/generated/scanner/core/ApiError.ts +1 -1
- package/src/generated/scanner/core/ApiRequestOptions.ts +1 -1
- package/src/generated/scanner/core/ApiResult.ts +1 -1
- package/src/generated/scanner/core/CancelablePromise.ts +1 -1
- package/src/generated/scanner/core/OpenAPI.ts +1 -1
- package/src/generated/scanner/core/request.ts +387 -387
- package/src/generated/scanner/models/DatabaseUpload.ts +10 -10
- package/src/generated/scanner/models/DatabaseUploadData.ts +10 -10
- package/src/generated/scanner/models/DisplayMessage.ts +10 -10
- package/src/generated/scanner/models/EventResponse.ts +16 -16
- package/src/generated/scanner/models/EventResponseStats.ts +11 -11
- package/src/generated/scanner/models/EventSkin.ts +23 -23
- package/src/generated/scanner/models/MobileReceiptResponse.ts +21 -21
- package/src/generated/scanner/models/OrderDetails.ts +15 -15
- package/src/generated/scanner/models/OrderProduct.ts +15 -15
- package/src/generated/scanner/models/OrderSeat.ts +19 -19
- package/src/generated/scanner/models/OrderSummary.ts +11 -11
- package/src/generated/scanner/models/Product.ts +15 -15
- package/src/generated/scanner/models/ProductQR.ts +8 -8
- package/src/generated/scanner/models/ProductScan.ts +16 -16
- package/src/generated/scanner/models/QueryDatabaseUnionResult.ts +13 -13
- package/src/generated/scanner/models/ReceiptBuyerDetails.ts +11 -11
- package/src/generated/scanner/models/ReceiptEventDetails.ts +12 -12
- package/src/generated/scanner/models/ReceiptProductDetails.ts +19 -19
- package/src/generated/scanner/models/ReceiptResponse.ts +21 -21
- package/src/generated/scanner/models/ReceiptSeatDetails.ts +15 -15
- package/src/generated/scanner/models/ResultMessage.ts +9 -9
- package/src/generated/scanner/models/RowResult.ts +8 -8
- package/src/generated/scanner/models/SeatQR.ts +8 -8
- package/src/generated/scanner/models/SeatResponse.ts +12 -12
- package/src/generated/scanner/models/SeatResult.ts +8 -8
- package/src/generated/scanner/models/SectionResult.ts +8 -8
- package/src/generated/scanner/models/TicketDatabase.ts +19 -19
- package/src/generated/scanner/models/TicketScan.ts +24 -24
- package/src/generated/scanner/models/TicketScanStats.ts +10 -10
- package/src/generated/scanner/models/TicketSeats.ts +14 -14
- package/src/generated/scanner/models/UploadDatabaseResponse.ts +10 -10
- package/src/generated/scanner/services/DatabaseService.ts +110 -110
- package/src/generated/scanner/services/OrdersService.ts +114 -114
- package/src/generated/scanner/services/ScanningService.ts +331 -331
- package/src/generated/shopper/core/ApiError.ts +1 -1
- package/src/generated/shopper/core/ApiRequestOptions.ts +1 -1
- package/src/generated/shopper/core/ApiResult.ts +1 -1
- package/src/generated/shopper/core/CancelablePromise.ts +1 -1
- package/src/generated/shopper/core/OpenAPI.ts +1 -1
- package/src/generated/shopper/core/request.ts +387 -387
- package/src/generated/shopper/models/Account.ts +57 -57
- package/src/generated/shopper/models/Album.ts +13 -13
- package/src/generated/shopper/models/AlbumImage.ts +13 -13
- package/src/generated/shopper/models/AlbumWithImages.ts +11 -11
- package/src/generated/shopper/models/AssignNamesReturn.ts +9 -9
- package/src/generated/shopper/models/BAHold.ts +10 -10
- package/src/generated/shopper/models/BlockOfTickets.ts +18 -18
- package/src/generated/shopper/models/Cart.ts +13 -13
- package/src/generated/shopper/models/CartCounts.ts +11 -11
- package/src/generated/shopper/models/CartWithTime.ts +10 -10
- package/src/generated/shopper/models/Chart.ts +13 -13
- package/src/generated/shopper/models/CheckoutDonation.ts +9 -9
- package/src/generated/shopper/models/CheckoutFailResponse.ts +10 -10
- package/src/generated/shopper/models/CheckoutGiftCard.ts +9 -9
- package/src/generated/shopper/models/CheckoutPageData.ts +23 -23
- package/src/generated/shopper/models/CheckoutProduct.ts +14 -14
- package/src/generated/shopper/models/CheckoutQuestion.ts +20 -20
- package/src/generated/shopper/models/CheckoutSessionData.ts +35 -35
- package/src/generated/shopper/models/CheckoutSubmitBody.ts +35 -35
- package/src/generated/shopper/models/CheckoutSuccessResponse.ts +8 -8
- package/src/generated/shopper/models/CodeDto.ts +11 -11
- package/src/generated/shopper/models/CompleteBody.ts +9 -9
- package/src/generated/shopper/models/CreateCustomerResponse.ts +9 -9
- package/src/generated/shopper/models/CreateSessionDto.ts +15 -15
- package/src/generated/shopper/models/DigitalAsset.ts +21 -21
- package/src/generated/shopper/models/DonationContribution.ts +10 -10
- package/src/generated/shopper/models/DonationFund.ts +34 -34
- package/src/generated/shopper/models/DonationInCart.ts +19 -19
- package/src/generated/shopper/models/DonationResult.ts +23 -23
- package/src/generated/shopper/models/DonationText.ts +9 -9
- package/src/generated/shopper/models/DonationsandContributions.ts +17 -17
- package/src/generated/shopper/models/EmailUpdate.ts +12 -12
- package/src/generated/shopper/models/EngineSeat.ts +7 -7
- package/src/generated/shopper/models/EventDetails.ts +51 -51
- package/src/generated/shopper/models/EventGroup.ts +16 -16
- package/src/generated/shopper/models/ExistingRefundDetails.ts +9 -9
- package/src/generated/shopper/models/FullEventDetails.ts +17 -17
- package/src/generated/shopper/models/GAHold.ts +11 -11
- package/src/generated/shopper/models/GAResponse.ts +19 -19
- package/src/generated/shopper/models/GASeatRelease.ts +10 -10
- package/src/generated/shopper/models/GetEventsResponse.ts +11 -11
- package/src/generated/shopper/models/GiftCardApplyDto.ts +23 -23
- package/src/generated/shopper/models/GiftCardApplyResponse.ts +35 -35
- package/src/generated/shopper/models/GiftCardCheckoutInfo.ts +35 -35
- package/src/generated/shopper/models/GiftCardEditFormResponse.ts +15 -15
- package/src/generated/shopper/models/GiftCardLookupResponse.ts +23 -23
- package/src/generated/shopper/models/GiftCardRemoveResponse.ts +19 -19
- package/src/generated/shopper/models/GuidReturn.ts +8 -8
- package/src/generated/shopper/models/HasAccessResponse.ts +8 -8
- package/src/generated/shopper/models/LandingConfig.ts +27 -27
- package/src/generated/shopper/models/LandingPageResponse.ts +17 -17
- package/src/generated/shopper/models/LinkWithSuccess.ts +9 -9
- package/src/generated/shopper/models/NameUpdate.ts +9 -9
- package/src/generated/shopper/models/OrderDetails.ts +42 -42
- package/src/generated/shopper/models/OrderRecalc.ts +11 -11
- package/src/generated/shopper/models/OrderRefundDetails.ts +10 -10
- package/src/generated/shopper/models/OrderSeat.ts +30 -30
- package/src/generated/shopper/models/OrderStream.ts +16 -16
- package/src/generated/shopper/models/OrderTicketReceipt.ts +30 -30
- package/src/generated/shopper/models/PatronName.ts +10 -10
- package/src/generated/shopper/models/PaymentDetail.ts +40 -40
- package/src/generated/shopper/models/PaymentFail.ts +23 -23
- package/src/generated/shopper/models/PaymentSuccess.ts +23 -23
- package/src/generated/shopper/models/PerformerEventList.ts +9 -9
- package/src/generated/shopper/models/PickupReturn.ts +11 -11
- package/src/generated/shopper/models/PriorityCode.ts +10 -10
- package/src/generated/shopper/models/Product.ts +28 -28
- package/src/generated/shopper/models/ProductAddResponse.ts +12 -12
- package/src/generated/shopper/models/ProductBody.ts +12 -12
- package/src/generated/shopper/models/ProductData.ts +11 -11
- package/src/generated/shopper/models/ProductDeleteBody.ts +11 -11
- package/src/generated/shopper/models/ProductDetails.ts +16 -16
- package/src/generated/shopper/models/ProductInCart.ts +17 -17
- package/src/generated/shopper/models/ProductUpdateResponse.ts +10 -10
- package/src/generated/shopper/models/ProductVariant.ts +18 -18
- package/src/generated/shopper/models/RecalcResponse.ts +10 -10
- package/src/generated/shopper/models/RecalcReturn.ts +31 -31
- package/src/generated/shopper/models/Receipt.ts +38 -38
- package/src/generated/shopper/models/ReceiptMessages.ts +8 -8
- package/src/generated/shopper/models/ReceiptQuestions.ts +12 -12
- package/src/generated/shopper/models/Refund.ts +12 -12
- package/src/generated/shopper/models/RefundPolicy.ts +8 -8
- package/src/generated/shopper/models/RefundReason.ts +12 -12
- package/src/generated/shopper/models/RefundRequest.ts +13 -13
- package/src/generated/shopper/models/RefundRequestInfo.ts +15 -15
- package/src/generated/shopper/models/RegisterStreamRequest.ts +9 -9
- package/src/generated/shopper/models/RegisterStreamResponse.ts +10 -10
- package/src/generated/shopper/models/RootConfigResponse.ts +22 -22
- package/src/generated/shopper/models/SaveDetailsBody.ts +26 -26
- package/src/generated/shopper/models/SaveNonceBody.ts +15 -15
- package/src/generated/shopper/models/SeatData.ts +9 -9
- package/src/generated/shopper/models/SeatHoldReturn.ts +11 -11
- package/src/generated/shopper/models/SeatInCart.ts +26 -26
- package/src/generated/shopper/models/SeatingTier.ts +27 -27
- package/src/generated/shopper/models/Section.ts +20 -20
- package/src/generated/shopper/models/SectionRule.ts +15 -15
- package/src/generated/shopper/models/SessionHeartbeatDto.ts +9 -9
- package/src/generated/shopper/models/SessionInfoDto.ts +20 -20
- package/src/generated/shopper/models/SiteDisposition.ts +10 -10
- package/src/generated/shopper/models/SiteTheme.ts +40 -40
- package/src/generated/shopper/models/StudioOrderSettings.ts +14 -14
- package/src/generated/shopper/models/StudioSettings.ts +12 -12
- package/src/generated/shopper/models/SuccessResponse.ts +8 -8
- package/src/generated/shopper/models/SuccessWithTime.ts +15 -15
- package/src/generated/shopper/models/SummaryBody.ts +8 -8
- package/src/generated/shopper/models/TheatreAddresses.ts +15 -15
- package/src/generated/shopper/models/Ticket.ts +9 -9
- package/src/generated/shopper/models/TicketBlock.ts +18 -18
- package/src/generated/shopper/models/TicketInstructions.ts +8 -8
- package/src/generated/shopper/models/UniversalCodeResponse.ts +27 -27
- package/src/generated/shopper/models/UpdateTierData.ts +10 -10
- package/src/generated/shopper/models/UpdateTierFail.ts +10 -10
- package/src/generated/shopper/models/WaitlistResponse.ts +9 -9
- package/src/generated/shopper/models/WaitlistUpdate.ts +14 -14
- package/src/generated/shopper/services/AccountService.ts +85 -85
- package/src/generated/shopper/services/CartService.ts +46 -46
- package/src/generated/shopper/services/CheckoutService.ts +116 -116
- package/src/generated/shopper/services/CodeService.ts +125 -125
- package/src/generated/shopper/services/DonationService.ts +57 -57
- package/src/generated/shopper/services/EventService.ts +100 -100
- package/src/generated/shopper/services/GiftCardService.ts +117 -117
- package/src/generated/shopper/services/OrderService.ts +359 -359
- package/src/generated/shopper/services/PaymentService.ts +76 -76
- package/src/generated/shopper/services/ProductService.ts +76 -76
- package/src/generated/shopper/services/SeatService.ts +165 -165
- package/src/generated/shopper/services/SessionService.ts +70 -70
- package/src/scripts/build-all.ts +186 -186
- package/src/scripts/check-version-not-published.ts +28 -28
- package/src/scripts/generate-definition.ts +124 -118
- package/src/staging/index.ts +39 -39
- package/src/staging/portal.ts +3 -0
- package/src/staging/wrapService.ts +51 -51
- package/staging.ts +2 -2
- package/test.ts +31 -31
- package/tsconfig.cjs.json +11 -11
- package/tsconfig.esm.json +11 -11
- package/tsconfig.json +16 -16
- package/.claude/admin-auth/auth.middleware.ts.txt +0 -149
- package/.claude/admin-auth/superuser.middleware.ts.txt +0 -41
package/demo/test.html
CHANGED
|
@@ -1,2306 +1,2306 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
-
<title>DRT SDK — Test Console</title>
|
|
7
|
-
<link rel="icon" href="data:," />
|
|
8
|
-
<style>
|
|
9
|
-
:root {
|
|
10
|
-
--primary: #4f46e5;
|
|
11
|
-
--primary-hover: #4338ca;
|
|
12
|
-
--primary-light: #eef2ff;
|
|
13
|
-
--danger: #dc2626;
|
|
14
|
-
--danger-hover: #b91c1c;
|
|
15
|
-
--success: #059669;
|
|
16
|
-
--success-light: #d1fae5;
|
|
17
|
-
--warning: #d97706;
|
|
18
|
-
--warning-light: #fef3c7;
|
|
19
|
-
--info: #0284c7;
|
|
20
|
-
--info-light: #e0f2fe;
|
|
21
|
-
--text: #111827;
|
|
22
|
-
--text-muted: #6b7280;
|
|
23
|
-
--border: #e5e7eb;
|
|
24
|
-
--surface: #ffffff;
|
|
25
|
-
--surface-alt: #f9fafb;
|
|
26
|
-
--code-bg: #1e1e2e;
|
|
27
|
-
--code-text: #e4e4e7;
|
|
28
|
-
}
|
|
29
|
-
* {
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
}
|
|
32
|
-
html,
|
|
33
|
-
body {
|
|
34
|
-
margin: 0;
|
|
35
|
-
padding: 0;
|
|
36
|
-
height: 100%;
|
|
37
|
-
font-family:
|
|
38
|
-
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
39
|
-
'Helvetica Neue', sans-serif;
|
|
40
|
-
color: var(--text);
|
|
41
|
-
background: var(--surface-alt);
|
|
42
|
-
font-size: 14px;
|
|
43
|
-
line-height: 1.5;
|
|
44
|
-
}
|
|
45
|
-
.app {
|
|
46
|
-
display: flex;
|
|
47
|
-
height: 100vh;
|
|
48
|
-
overflow: hidden;
|
|
49
|
-
}
|
|
50
|
-
.left-panel {
|
|
51
|
-
width: 50%;
|
|
52
|
-
min-width: 50%;
|
|
53
|
-
max-width: 50%;
|
|
54
|
-
overflow-y: auto;
|
|
55
|
-
padding: 1.25rem 1.5rem 2rem;
|
|
56
|
-
background: var(--surface-alt);
|
|
57
|
-
}
|
|
58
|
-
.right-panel {
|
|
59
|
-
width: 50%;
|
|
60
|
-
min-width: 50%;
|
|
61
|
-
max-width: 50%;
|
|
62
|
-
background: var(--code-bg);
|
|
63
|
-
color: var(--code-text);
|
|
64
|
-
display: flex;
|
|
65
|
-
flex-direction: column;
|
|
66
|
-
border-left: 1px solid var(--border);
|
|
67
|
-
height: 100vh;
|
|
68
|
-
}
|
|
69
|
-
h1 {
|
|
70
|
-
font-size: 1.5rem;
|
|
71
|
-
font-weight: 700;
|
|
72
|
-
margin: 0 0 0.25rem;
|
|
73
|
-
color: var(--text);
|
|
74
|
-
display: flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
gap: 0.5rem;
|
|
77
|
-
}
|
|
78
|
-
h1 .badge-version {
|
|
79
|
-
font-size: 0.7rem;
|
|
80
|
-
background: var(--primary-light);
|
|
81
|
-
color: var(--primary);
|
|
82
|
-
padding: 0.15rem 0.5rem;
|
|
83
|
-
border-radius: 999px;
|
|
84
|
-
font-weight: 600;
|
|
85
|
-
}
|
|
86
|
-
.subtitle {
|
|
87
|
-
color: var(--text-muted);
|
|
88
|
-
margin: 0 0 1.25rem;
|
|
89
|
-
font-size: 0.875rem;
|
|
90
|
-
}
|
|
91
|
-
h2.section-title {
|
|
92
|
-
font-size: 0.75rem;
|
|
93
|
-
font-weight: 700;
|
|
94
|
-
text-transform: uppercase;
|
|
95
|
-
letter-spacing: 0.05em;
|
|
96
|
-
color: var(--text-muted);
|
|
97
|
-
margin: 1.5rem 0 0.5rem;
|
|
98
|
-
padding: 0;
|
|
99
|
-
border: none;
|
|
100
|
-
}
|
|
101
|
-
button {
|
|
102
|
-
padding: 0.4rem 0.85rem;
|
|
103
|
-
font-size: 0.85rem;
|
|
104
|
-
font-weight: 500;
|
|
105
|
-
cursor: pointer;
|
|
106
|
-
border: 1px solid var(--border);
|
|
107
|
-
border-radius: 6px;
|
|
108
|
-
background: var(--surface);
|
|
109
|
-
color: var(--text);
|
|
110
|
-
transition: all 0.15s;
|
|
111
|
-
}
|
|
112
|
-
button:hover:not(:disabled) {
|
|
113
|
-
background: var(--surface-alt);
|
|
114
|
-
border-color: #d1d5db;
|
|
115
|
-
}
|
|
116
|
-
button:disabled {
|
|
117
|
-
opacity: 0.5;
|
|
118
|
-
cursor: not-allowed;
|
|
119
|
-
}
|
|
120
|
-
button.primary {
|
|
121
|
-
background: var(--primary);
|
|
122
|
-
color: white;
|
|
123
|
-
border-color: var(--primary);
|
|
124
|
-
}
|
|
125
|
-
button.primary:hover:not(:disabled) {
|
|
126
|
-
background: var(--primary-hover);
|
|
127
|
-
border-color: var(--primary-hover);
|
|
128
|
-
}
|
|
129
|
-
button.danger {
|
|
130
|
-
background: var(--surface);
|
|
131
|
-
color: var(--danger);
|
|
132
|
-
border-color: #fecaca;
|
|
133
|
-
}
|
|
134
|
-
button.danger:hover:not(:disabled) {
|
|
135
|
-
background: #fef2f2;
|
|
136
|
-
}
|
|
137
|
-
button.small {
|
|
138
|
-
padding: 0.25rem 0.6rem;
|
|
139
|
-
font-size: 0.75rem;
|
|
140
|
-
}
|
|
141
|
-
input,
|
|
142
|
-
select {
|
|
143
|
-
padding: 0.4rem 0.6rem;
|
|
144
|
-
font-size: 0.85rem;
|
|
145
|
-
border: 1px solid var(--border);
|
|
146
|
-
border-radius: 6px;
|
|
147
|
-
background: var(--surface);
|
|
148
|
-
color: var(--text);
|
|
149
|
-
font-family: inherit;
|
|
150
|
-
}
|
|
151
|
-
input:focus,
|
|
152
|
-
select:focus {
|
|
153
|
-
outline: none;
|
|
154
|
-
border-color: var(--primary);
|
|
155
|
-
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
|
|
156
|
-
}
|
|
157
|
-
code {
|
|
158
|
-
background: #eef1f5;
|
|
159
|
-
color: #374151;
|
|
160
|
-
padding: 0.1rem 0.35rem;
|
|
161
|
-
border-radius: 4px;
|
|
162
|
-
font-size: 0.78rem;
|
|
163
|
-
font-family:
|
|
164
|
-
ui-monospace, 'SF Mono', Monaco, 'Cascadia Code', monospace;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/* Config card */
|
|
168
|
-
.card {
|
|
169
|
-
background: var(--surface);
|
|
170
|
-
border: 1px solid var(--border);
|
|
171
|
-
border-radius: 10px;
|
|
172
|
-
padding: 1rem;
|
|
173
|
-
margin-bottom: 1rem;
|
|
174
|
-
}
|
|
175
|
-
.card-title {
|
|
176
|
-
font-size: 0.9rem;
|
|
177
|
-
font-weight: 600;
|
|
178
|
-
margin: 0 0 0.5rem;
|
|
179
|
-
display: flex;
|
|
180
|
-
align-items: center;
|
|
181
|
-
gap: 0.5rem;
|
|
182
|
-
}
|
|
183
|
-
.card-title .step {
|
|
184
|
-
display: inline-flex;
|
|
185
|
-
align-items: center;
|
|
186
|
-
justify-content: center;
|
|
187
|
-
width: 1.5rem;
|
|
188
|
-
height: 1.5rem;
|
|
189
|
-
background: var(--primary);
|
|
190
|
-
color: white;
|
|
191
|
-
border-radius: 50%;
|
|
192
|
-
font-size: 0.75rem;
|
|
193
|
-
font-weight: 700;
|
|
194
|
-
}
|
|
195
|
-
.quick-start {
|
|
196
|
-
background: var(--primary-light);
|
|
197
|
-
border: 1px solid #c7d2fe;
|
|
198
|
-
padding: 0.75rem;
|
|
199
|
-
border-radius: 8px;
|
|
200
|
-
margin-bottom: 0.75rem;
|
|
201
|
-
}
|
|
202
|
-
.field {
|
|
203
|
-
display: block;
|
|
204
|
-
font-size: 0.8rem;
|
|
205
|
-
font-weight: 500;
|
|
206
|
-
color: var(--text-muted);
|
|
207
|
-
margin: 0.6rem 0 0.25rem;
|
|
208
|
-
}
|
|
209
|
-
.field + input {
|
|
210
|
-
width: 100%;
|
|
211
|
-
}
|
|
212
|
-
.inline-row {
|
|
213
|
-
display: flex;
|
|
214
|
-
gap: 0.5rem;
|
|
215
|
-
align-items: center;
|
|
216
|
-
flex-wrap: wrap;
|
|
217
|
-
}
|
|
218
|
-
.inline-row label {
|
|
219
|
-
font-size: 0.8rem;
|
|
220
|
-
font-weight: 500;
|
|
221
|
-
color: var(--text-muted);
|
|
222
|
-
}
|
|
223
|
-
.inline-row input,
|
|
224
|
-
.inline-row select {
|
|
225
|
-
flex: 1;
|
|
226
|
-
min-width: 0;
|
|
227
|
-
}
|
|
228
|
-
.btn-row {
|
|
229
|
-
display: flex;
|
|
230
|
-
gap: 0.5rem;
|
|
231
|
-
flex-wrap: wrap;
|
|
232
|
-
margin-top: 0.5rem;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/* Tabs for API */
|
|
236
|
-
.api-tabs {
|
|
237
|
-
display: flex;
|
|
238
|
-
gap: 0.25rem;
|
|
239
|
-
border-bottom: 1px solid var(--border);
|
|
240
|
-
margin-bottom: 1rem;
|
|
241
|
-
}
|
|
242
|
-
.api-tab {
|
|
243
|
-
padding: 0.5rem 0.9rem;
|
|
244
|
-
border: none;
|
|
245
|
-
background: none;
|
|
246
|
-
cursor: pointer;
|
|
247
|
-
font-size: 0.875rem;
|
|
248
|
-
font-weight: 500;
|
|
249
|
-
color: var(--text-muted);
|
|
250
|
-
border-bottom: 2px solid transparent;
|
|
251
|
-
margin-bottom: -1px;
|
|
252
|
-
border-radius: 0;
|
|
253
|
-
}
|
|
254
|
-
.api-tab:hover {
|
|
255
|
-
color: var(--text);
|
|
256
|
-
background: none;
|
|
257
|
-
}
|
|
258
|
-
.api-tab.active {
|
|
259
|
-
color: var(--primary);
|
|
260
|
-
border-bottom-color: var(--primary);
|
|
261
|
-
}
|
|
262
|
-
.api-content {
|
|
263
|
-
display: none;
|
|
264
|
-
}
|
|
265
|
-
.api-content.active {
|
|
266
|
-
display: block;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/* Collapsible sections */
|
|
270
|
-
details.api-section {
|
|
271
|
-
border: 1px solid var(--border);
|
|
272
|
-
border-radius: 8px;
|
|
273
|
-
margin-bottom: 0.5rem;
|
|
274
|
-
background: var(--surface);
|
|
275
|
-
overflow: hidden;
|
|
276
|
-
}
|
|
277
|
-
details.api-section > summary {
|
|
278
|
-
padding: 0.65rem 0.9rem;
|
|
279
|
-
font-weight: 600;
|
|
280
|
-
font-size: 0.9rem;
|
|
281
|
-
cursor: pointer;
|
|
282
|
-
user-select: none;
|
|
283
|
-
list-style: none;
|
|
284
|
-
display: flex;
|
|
285
|
-
align-items: center;
|
|
286
|
-
gap: 0.5rem;
|
|
287
|
-
transition: background 0.15s;
|
|
288
|
-
}
|
|
289
|
-
details.api-section > summary:hover {
|
|
290
|
-
background: var(--surface-alt);
|
|
291
|
-
}
|
|
292
|
-
details.api-section > summary::-webkit-details-marker {
|
|
293
|
-
display: none;
|
|
294
|
-
}
|
|
295
|
-
details.api-section > summary::before {
|
|
296
|
-
content: '\25B8';
|
|
297
|
-
font-size: 0.7rem;
|
|
298
|
-
color: #9ca3af;
|
|
299
|
-
transition: transform 0.15s;
|
|
300
|
-
flex-shrink: 0;
|
|
301
|
-
}
|
|
302
|
-
details.api-section[open] > summary::before {
|
|
303
|
-
transform: rotate(90deg);
|
|
304
|
-
}
|
|
305
|
-
details.api-section > .section-body {
|
|
306
|
-
padding: 0.75rem 0.9rem 0.9rem;
|
|
307
|
-
border-top: 1px solid var(--border);
|
|
308
|
-
background: var(--surface-alt);
|
|
309
|
-
}
|
|
310
|
-
details.api-section.hidden-section {
|
|
311
|
-
display: none;
|
|
312
|
-
}
|
|
313
|
-
.section-badge {
|
|
314
|
-
font-size: 0.7rem;
|
|
315
|
-
padding: 0.1rem 0.45rem;
|
|
316
|
-
border-radius: 999px;
|
|
317
|
-
font-weight: 600;
|
|
318
|
-
margin-left: auto;
|
|
319
|
-
background: #f3f4f6;
|
|
320
|
-
color: var(--text-muted);
|
|
321
|
-
}
|
|
322
|
-
.badge-ga {
|
|
323
|
-
background: var(--success-light);
|
|
324
|
-
color: var(--success);
|
|
325
|
-
}
|
|
326
|
-
.badge-reserved {
|
|
327
|
-
background: var(--info-light);
|
|
328
|
-
color: var(--info);
|
|
329
|
-
}
|
|
330
|
-
.badge-ready {
|
|
331
|
-
background: var(--success-light);
|
|
332
|
-
color: var(--success);
|
|
333
|
-
}
|
|
334
|
-
.badge-count {
|
|
335
|
-
background: var(--primary-light);
|
|
336
|
-
color: var(--primary);
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
/* Info banners */
|
|
340
|
-
.info-banner {
|
|
341
|
-
padding: 0.5rem 0.75rem;
|
|
342
|
-
border-radius: 6px;
|
|
343
|
-
font-size: 0.825rem;
|
|
344
|
-
margin-bottom: 0.5rem;
|
|
345
|
-
display: flex;
|
|
346
|
-
align-items: center;
|
|
347
|
-
gap: 0.5rem;
|
|
348
|
-
}
|
|
349
|
-
.info-banner.ga {
|
|
350
|
-
background: var(--success-light);
|
|
351
|
-
color: var(--success);
|
|
352
|
-
}
|
|
353
|
-
.info-banner.reserved {
|
|
354
|
-
background: var(--info-light);
|
|
355
|
-
color: var(--info);
|
|
356
|
-
}
|
|
357
|
-
.info-banner.warn {
|
|
358
|
-
background: var(--warning-light);
|
|
359
|
-
color: var(--warning);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/* Cart items */
|
|
363
|
-
.cart-items {
|
|
364
|
-
display: flex;
|
|
365
|
-
flex-direction: column;
|
|
366
|
-
gap: 0.4rem;
|
|
367
|
-
margin-top: 0.5rem;
|
|
368
|
-
}
|
|
369
|
-
.cart-item {
|
|
370
|
-
display: flex;
|
|
371
|
-
align-items: center;
|
|
372
|
-
gap: 0.75rem;
|
|
373
|
-
padding: 0.6rem 0.75rem;
|
|
374
|
-
background: var(--surface);
|
|
375
|
-
border: 1px solid var(--border);
|
|
376
|
-
border-radius: 6px;
|
|
377
|
-
}
|
|
378
|
-
.cart-item-icon {
|
|
379
|
-
width: 2rem;
|
|
380
|
-
height: 2rem;
|
|
381
|
-
border-radius: 6px;
|
|
382
|
-
display: flex;
|
|
383
|
-
align-items: center;
|
|
384
|
-
justify-content: center;
|
|
385
|
-
font-size: 1rem;
|
|
386
|
-
flex-shrink: 0;
|
|
387
|
-
}
|
|
388
|
-
.cart-item-icon.seat {
|
|
389
|
-
background: var(--info-light);
|
|
390
|
-
color: var(--info);
|
|
391
|
-
}
|
|
392
|
-
.cart-item-icon.product {
|
|
393
|
-
background: var(--warning-light);
|
|
394
|
-
color: var(--warning);
|
|
395
|
-
}
|
|
396
|
-
.cart-item-icon.donation {
|
|
397
|
-
background: var(--success-light);
|
|
398
|
-
color: var(--success);
|
|
399
|
-
}
|
|
400
|
-
.cart-item-body {
|
|
401
|
-
flex: 1;
|
|
402
|
-
min-width: 0;
|
|
403
|
-
}
|
|
404
|
-
.cart-item-title {
|
|
405
|
-
font-weight: 600;
|
|
406
|
-
font-size: 0.875rem;
|
|
407
|
-
color: var(--text);
|
|
408
|
-
}
|
|
409
|
-
.cart-item-subtitle {
|
|
410
|
-
font-size: 0.75rem;
|
|
411
|
-
color: var(--text-muted);
|
|
412
|
-
margin-top: 0.1rem;
|
|
413
|
-
}
|
|
414
|
-
.cart-item-price {
|
|
415
|
-
font-weight: 600;
|
|
416
|
-
font-size: 0.875rem;
|
|
417
|
-
color: var(--text);
|
|
418
|
-
margin-right: 0.5rem;
|
|
419
|
-
white-space: nowrap;
|
|
420
|
-
}
|
|
421
|
-
.cart-summary {
|
|
422
|
-
background: var(--primary-light);
|
|
423
|
-
border: 1px solid #c7d2fe;
|
|
424
|
-
border-radius: 6px;
|
|
425
|
-
padding: 0.6rem 0.75rem;
|
|
426
|
-
margin-top: 0.75rem;
|
|
427
|
-
display: flex;
|
|
428
|
-
justify-content: space-between;
|
|
429
|
-
align-items: center;
|
|
430
|
-
font-weight: 600;
|
|
431
|
-
font-size: 0.9rem;
|
|
432
|
-
}
|
|
433
|
-
.empty-cart {
|
|
434
|
-
text-align: center;
|
|
435
|
-
padding: 1.5rem 0.5rem;
|
|
436
|
-
color: var(--text-muted);
|
|
437
|
-
font-size: 0.875rem;
|
|
438
|
-
font-style: italic;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
/* Right panel output */
|
|
442
|
-
.panel-tabs {
|
|
443
|
-
display: flex;
|
|
444
|
-
background: #181825;
|
|
445
|
-
border-bottom: 1px solid #313244;
|
|
446
|
-
padding: 0 0.5rem;
|
|
447
|
-
}
|
|
448
|
-
.panel-tab {
|
|
449
|
-
padding: 0.75rem 1rem;
|
|
450
|
-
border: none;
|
|
451
|
-
background: none;
|
|
452
|
-
cursor: pointer;
|
|
453
|
-
font-size: 0.85rem;
|
|
454
|
-
font-weight: 500;
|
|
455
|
-
color: #a1a1aa;
|
|
456
|
-
border-bottom: 2px solid transparent;
|
|
457
|
-
margin-bottom: -1px;
|
|
458
|
-
border-radius: 0;
|
|
459
|
-
font-family: inherit;
|
|
460
|
-
}
|
|
461
|
-
.panel-tab:hover {
|
|
462
|
-
background: none;
|
|
463
|
-
color: var(--code-text);
|
|
464
|
-
}
|
|
465
|
-
.panel-tab.active {
|
|
466
|
-
color: #a5b4fc;
|
|
467
|
-
border-bottom-color: #a5b4fc;
|
|
468
|
-
}
|
|
469
|
-
.panel-content {
|
|
470
|
-
flex: 1;
|
|
471
|
-
display: none;
|
|
472
|
-
flex-direction: column;
|
|
473
|
-
min-height: 0;
|
|
474
|
-
}
|
|
475
|
-
.panel-content.active {
|
|
476
|
-
display: flex;
|
|
477
|
-
}
|
|
478
|
-
#status {
|
|
479
|
-
padding: 0.5rem 1rem;
|
|
480
|
-
font-weight: 600;
|
|
481
|
-
background: #181825;
|
|
482
|
-
border-bottom: 1px solid #313244;
|
|
483
|
-
font-size: 0.8rem;
|
|
484
|
-
display: flex;
|
|
485
|
-
align-items: center;
|
|
486
|
-
gap: 0.5rem;
|
|
487
|
-
}
|
|
488
|
-
#status.success {
|
|
489
|
-
color: #a6e3a1;
|
|
490
|
-
}
|
|
491
|
-
#status.error {
|
|
492
|
-
color: #f38ba8;
|
|
493
|
-
}
|
|
494
|
-
#status::before {
|
|
495
|
-
content: '';
|
|
496
|
-
width: 8px;
|
|
497
|
-
height: 8px;
|
|
498
|
-
border-radius: 50%;
|
|
499
|
-
background: currentColor;
|
|
500
|
-
flex-shrink: 0;
|
|
501
|
-
}
|
|
502
|
-
#output-container {
|
|
503
|
-
flex: 1;
|
|
504
|
-
overflow: auto;
|
|
505
|
-
padding: 1rem;
|
|
506
|
-
min-width: 0;
|
|
507
|
-
}
|
|
508
|
-
pre {
|
|
509
|
-
background: transparent;
|
|
510
|
-
margin: 0;
|
|
511
|
-
white-space: pre-wrap;
|
|
512
|
-
word-wrap: break-word;
|
|
513
|
-
overflow-wrap: break-word;
|
|
514
|
-
font-size: 0.8rem;
|
|
515
|
-
font-family:
|
|
516
|
-
ui-monospace, 'SF Mono', Monaco, 'Cascadia Code', monospace;
|
|
517
|
-
color: var(--code-text);
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
/* Implementation panel */
|
|
521
|
-
#impl-panel {
|
|
522
|
-
padding: 1.25rem;
|
|
523
|
-
overflow-y: auto;
|
|
524
|
-
flex: 1;
|
|
525
|
-
background: #181825;
|
|
526
|
-
}
|
|
527
|
-
#impl-panel h3 {
|
|
528
|
-
color: #cdd6f4;
|
|
529
|
-
margin: 1.25rem 0 0.5rem;
|
|
530
|
-
font-size: 0.95rem;
|
|
531
|
-
font-weight: 600;
|
|
532
|
-
}
|
|
533
|
-
#impl-panel h3:first-child {
|
|
534
|
-
margin-top: 0;
|
|
535
|
-
}
|
|
536
|
-
#impl-panel p {
|
|
537
|
-
color: #bac2de;
|
|
538
|
-
font-size: 0.85rem;
|
|
539
|
-
margin: 0.25rem 0 0.5rem;
|
|
540
|
-
}
|
|
541
|
-
.code-block {
|
|
542
|
-
position: relative;
|
|
543
|
-
background: #11111b;
|
|
544
|
-
border: 1px solid #313244;
|
|
545
|
-
border-radius: 8px;
|
|
546
|
-
padding: 0.8rem 0.9rem;
|
|
547
|
-
margin: 0.5rem 0;
|
|
548
|
-
}
|
|
549
|
-
.code-block pre {
|
|
550
|
-
font-size: 0.78rem;
|
|
551
|
-
line-height: 1.55;
|
|
552
|
-
color: #cdd6f4;
|
|
553
|
-
}
|
|
554
|
-
.code-block .copy-btn {
|
|
555
|
-
position: absolute;
|
|
556
|
-
top: 0.5rem;
|
|
557
|
-
right: 0.5rem;
|
|
558
|
-
padding: 0.2rem 0.5rem;
|
|
559
|
-
font-size: 0.7rem;
|
|
560
|
-
background: #313244;
|
|
561
|
-
color: #cdd6f4;
|
|
562
|
-
border: 1px solid #45475a;
|
|
563
|
-
border-radius: 4px;
|
|
564
|
-
cursor: pointer;
|
|
565
|
-
opacity: 0;
|
|
566
|
-
transition: opacity 0.15s;
|
|
567
|
-
}
|
|
568
|
-
.code-block:hover .copy-btn {
|
|
569
|
-
opacity: 1;
|
|
570
|
-
}
|
|
571
|
-
.code-block .copy-btn:hover {
|
|
572
|
-
background: #45475a;
|
|
573
|
-
}
|
|
574
|
-
.code-block .copy-btn.copied {
|
|
575
|
-
background: #a6e3a1;
|
|
576
|
-
color: #11111b;
|
|
577
|
-
}
|
|
578
|
-
.impl-note {
|
|
579
|
-
background: #181e2e;
|
|
580
|
-
border-left: 3px solid #89b4fa;
|
|
581
|
-
padding: 0.6rem 0.85rem;
|
|
582
|
-
margin: 0.75rem 0;
|
|
583
|
-
border-radius: 0 6px 6px 0;
|
|
584
|
-
font-size: 0.82rem;
|
|
585
|
-
color: #bac2de;
|
|
586
|
-
}
|
|
587
|
-
.kw {
|
|
588
|
-
color: #cba6f7;
|
|
589
|
-
}
|
|
590
|
-
.str {
|
|
591
|
-
color: #a6e3a1;
|
|
592
|
-
}
|
|
593
|
-
.com {
|
|
594
|
-
color: #6c7086;
|
|
595
|
-
font-style: italic;
|
|
596
|
-
}
|
|
597
|
-
.fn {
|
|
598
|
-
color: #89b4fa;
|
|
599
|
-
}
|
|
600
|
-
.num {
|
|
601
|
-
color: #fab387;
|
|
602
|
-
}
|
|
603
|
-
</style>
|
|
604
|
-
</head>
|
|
605
|
-
<body>
|
|
606
|
-
<div class="app">
|
|
607
|
-
<!-- LEFT PANEL: Controls -->
|
|
608
|
-
<div class="left-panel">
|
|
609
|
-
<h1>
|
|
610
|
-
DRT SDK Test Console
|
|
611
|
-
<span id="sdkVersionBadge" class="badge-version"
|
|
612
|
-
>v0.9.7</span
|
|
613
|
-
>
|
|
614
|
-
</h1>
|
|
615
|
-
<p class="subtitle">
|
|
616
|
-
Interactive playground for the
|
|
617
|
-
<code>@drttix/drt-sdk</code> shopper & scanner APIs.
|
|
618
|
-
</p>
|
|
619
|
-
|
|
620
|
-
<!-- Step 1 -->
|
|
621
|
-
<div class="card">
|
|
622
|
-
<div class="card-title">
|
|
623
|
-
<span class="step">1</span> Connect SDK
|
|
624
|
-
</div>
|
|
625
|
-
|
|
626
|
-
<div class="quick-start">
|
|
627
|
-
<strong style="font-size: 0.85rem"
|
|
628
|
-
>Quick Start — Create a new shopper
|
|
629
|
-
session</strong
|
|
630
|
-
>
|
|
631
|
-
<div
|
|
632
|
-
class="inline-row"
|
|
633
|
-
style="margin-top: 0.5rem; gap: 0.4rem"
|
|
634
|
-
>
|
|
635
|
-
<input
|
|
636
|
-
type="number"
|
|
637
|
-
id="createStudioId"
|
|
638
|
-
placeholder="Studio ID"
|
|
639
|
-
style="max-width: 110px"
|
|
640
|
-
/>
|
|
641
|
-
<input
|
|
642
|
-
type="text"
|
|
643
|
-
id="createApiKey"
|
|
644
|
-
placeholder="API Key"
|
|
645
|
-
/>
|
|
646
|
-
<button id="btn-create-shopper" class="primary">
|
|
647
|
-
Create
|
|
648
|
-
</button>
|
|
649
|
-
</div>
|
|
650
|
-
</div>
|
|
651
|
-
|
|
652
|
-
<label class="field" for="shopperGuid">Shopper GUID</label>
|
|
653
|
-
<input
|
|
654
|
-
type="text"
|
|
655
|
-
id="shopperGuid"
|
|
656
|
-
placeholder="e.g., F1199DCD-BB45-4BD0-..."
|
|
657
|
-
/>
|
|
658
|
-
|
|
659
|
-
<label class="field" for="accountId">Account ID</label>
|
|
660
|
-
<input type="text" id="accountId" placeholder="e.g., 508" />
|
|
661
|
-
|
|
662
|
-
<label class="field" for="apiKey">API Key</label>
|
|
663
|
-
<input type="text" id="apiKey" placeholder="your-api-key" />
|
|
664
|
-
|
|
665
|
-
<div class="btn-row">
|
|
666
|
-
<button id="btn-init" class="primary">
|
|
667
|
-
Initialize SDK
|
|
668
|
-
</button>
|
|
669
|
-
<button id="btn-check-sdk">Check Status</button>
|
|
670
|
-
<button id="btn-reset" class="danger">Reset</button>
|
|
671
|
-
</div>
|
|
672
|
-
</div>
|
|
673
|
-
|
|
674
|
-
<!-- Step 2 -->
|
|
675
|
-
<div class="card">
|
|
676
|
-
<div class="card-title">
|
|
677
|
-
<span class="step">2</span> Explore APIs
|
|
678
|
-
</div>
|
|
679
|
-
|
|
680
|
-
<div class="api-tabs">
|
|
681
|
-
<button class="api-tab active" data-tab="shopper">
|
|
682
|
-
Shopper
|
|
683
|
-
</button>
|
|
684
|
-
<button class="api-tab" data-tab="scanner">
|
|
685
|
-
Scanner
|
|
686
|
-
</button>
|
|
687
|
-
</div>
|
|
688
|
-
|
|
689
|
-
<!-- SHOPPER -->
|
|
690
|
-
<div id="tab-shopper" class="api-content active">
|
|
691
|
-
<details class="api-section" open>
|
|
692
|
-
<summary>
|
|
693
|
-
Account <code>DRT.shopper.account</code>
|
|
694
|
-
</summary>
|
|
695
|
-
<div class="section-body">
|
|
696
|
-
<div class="btn-row">
|
|
697
|
-
<button id="btn-theme">Theme</button>
|
|
698
|
-
<button id="btn-disposition">
|
|
699
|
-
Disposition
|
|
700
|
-
</button>
|
|
701
|
-
<button id="btn-root">Root Config</button>
|
|
702
|
-
<button id="btn-landing">
|
|
703
|
-
Landing Page
|
|
704
|
-
</button>
|
|
705
|
-
</div>
|
|
706
|
-
</div>
|
|
707
|
-
</details>
|
|
708
|
-
|
|
709
|
-
<details class="api-section" open>
|
|
710
|
-
<summary>
|
|
711
|
-
Events <code>DRT.shopper.event</code>
|
|
712
|
-
</summary>
|
|
713
|
-
<div class="section-body">
|
|
714
|
-
<div class="btn-row">
|
|
715
|
-
<button id="btn-events" class="primary">
|
|
716
|
-
Get All Events
|
|
717
|
-
</button>
|
|
718
|
-
</div>
|
|
719
|
-
<div
|
|
720
|
-
class="inline-row"
|
|
721
|
-
style="margin-top: 0.5rem"
|
|
722
|
-
>
|
|
723
|
-
<select id="eventSelect" style="flex: 1">
|
|
724
|
-
<option value="">
|
|
725
|
-
— Click "Get All Events" first
|
|
726
|
-
—
|
|
727
|
-
</option>
|
|
728
|
-
</select>
|
|
729
|
-
<button id="btn-event-details">
|
|
730
|
-
Get Details
|
|
731
|
-
</button>
|
|
732
|
-
</div>
|
|
733
|
-
</div>
|
|
734
|
-
</details>
|
|
735
|
-
|
|
736
|
-
<details
|
|
737
|
-
id="section-seats"
|
|
738
|
-
class="api-section hidden-section"
|
|
739
|
-
>
|
|
740
|
-
<summary>
|
|
741
|
-
Seats
|
|
742
|
-
<code>DRT.shopper.seat</code>
|
|
743
|
-
<span
|
|
744
|
-
id="seat-badge"
|
|
745
|
-
class="section-badge"
|
|
746
|
-
></span>
|
|
747
|
-
</summary>
|
|
748
|
-
<div class="section-body">
|
|
749
|
-
<div id="seat-type-info" class="info-banner">
|
|
750
|
-
Loading…
|
|
751
|
-
</div>
|
|
752
|
-
<div
|
|
753
|
-
id="seat-ga-controls"
|
|
754
|
-
style="display: none"
|
|
755
|
-
>
|
|
756
|
-
<div class="inline-row">
|
|
757
|
-
<label>Tier</label>
|
|
758
|
-
<select
|
|
759
|
-
id="tierSelect"
|
|
760
|
-
style="flex: 2"
|
|
761
|
-
></select>
|
|
762
|
-
<label>Qty</label>
|
|
763
|
-
<input
|
|
764
|
-
type="number"
|
|
765
|
-
id="gaQty"
|
|
766
|
-
value="1"
|
|
767
|
-
style="max-width: 70px"
|
|
768
|
-
/>
|
|
769
|
-
<button
|
|
770
|
-
id="btn-hold-ga"
|
|
771
|
-
class="primary"
|
|
772
|
-
>
|
|
773
|
-
Hold
|
|
774
|
-
</button>
|
|
775
|
-
</div>
|
|
776
|
-
</div>
|
|
777
|
-
<div
|
|
778
|
-
id="seat-ba-controls"
|
|
779
|
-
style="display: none"
|
|
780
|
-
>
|
|
781
|
-
<div class="inline-row">
|
|
782
|
-
<label>Seat #</label>
|
|
783
|
-
<input
|
|
784
|
-
type="number"
|
|
785
|
-
id="reservedSeatNum"
|
|
786
|
-
placeholder="e.g., 1"
|
|
787
|
-
style="flex: 1"
|
|
788
|
-
/>
|
|
789
|
-
<button
|
|
790
|
-
id="btn-hold-reserved"
|
|
791
|
-
class="primary"
|
|
792
|
-
>
|
|
793
|
-
Hold Reserved Seat
|
|
794
|
-
</button>
|
|
795
|
-
</div>
|
|
796
|
-
<p
|
|
797
|
-
style="
|
|
798
|
-
margin: 0.35rem 0 0;
|
|
799
|
-
font-size: 0.75rem;
|
|
800
|
-
color: var(--text-muted);
|
|
801
|
-
"
|
|
802
|
-
>
|
|
803
|
-
Use section rules from event details to
|
|
804
|
-
find valid seat numbers.
|
|
805
|
-
</p>
|
|
806
|
-
</div>
|
|
807
|
-
</div>
|
|
808
|
-
</details>
|
|
809
|
-
|
|
810
|
-
<details
|
|
811
|
-
id="section-update-tier"
|
|
812
|
-
class="api-section hidden-section"
|
|
813
|
-
>
|
|
814
|
-
<summary>
|
|
815
|
-
Update Tier
|
|
816
|
-
<code>DRT.shopper.seat.updateTier</code>
|
|
817
|
-
<span
|
|
818
|
-
id="tier-badge"
|
|
819
|
-
class="section-badge"
|
|
820
|
-
></span>
|
|
821
|
-
</summary>
|
|
822
|
-
<div class="section-body">
|
|
823
|
-
<p
|
|
824
|
-
style="
|
|
825
|
-
margin: 0 0 0.5rem;
|
|
826
|
-
color: var(--text-muted);
|
|
827
|
-
font-size: 0.8rem;
|
|
828
|
-
"
|
|
829
|
-
>
|
|
830
|
-
Change the pricing tier for a held seat.
|
|
831
|
-
</p>
|
|
832
|
-
<div class="inline-row">
|
|
833
|
-
<label>Seat #</label>
|
|
834
|
-
<input
|
|
835
|
-
type="number"
|
|
836
|
-
id="updateTierSeatNum"
|
|
837
|
-
placeholder="seat"
|
|
838
|
-
style="max-width: 90px"
|
|
839
|
-
/>
|
|
840
|
-
<label>Tier</label>
|
|
841
|
-
<select
|
|
842
|
-
id="updateTierSelect"
|
|
843
|
-
style="flex: 2"
|
|
844
|
-
></select>
|
|
845
|
-
<button id="btn-update-tier">Update</button>
|
|
846
|
-
</div>
|
|
847
|
-
</div>
|
|
848
|
-
</details>
|
|
849
|
-
|
|
850
|
-
<details
|
|
851
|
-
id="section-products"
|
|
852
|
-
class="api-section hidden-section"
|
|
853
|
-
>
|
|
854
|
-
<summary>
|
|
855
|
-
Products
|
|
856
|
-
<code>DRT.shopper.product</code>
|
|
857
|
-
<span
|
|
858
|
-
id="product-badge"
|
|
859
|
-
class="section-badge"
|
|
860
|
-
></span>
|
|
861
|
-
</summary>
|
|
862
|
-
<div class="section-body">
|
|
863
|
-
<div class="btn-row">
|
|
864
|
-
<button id="btn-get-products">
|
|
865
|
-
Get Products
|
|
866
|
-
</button>
|
|
867
|
-
</div>
|
|
868
|
-
<div
|
|
869
|
-
class="inline-row"
|
|
870
|
-
style="margin-top: 0.5rem; gap: 0.4rem"
|
|
871
|
-
>
|
|
872
|
-
<input
|
|
873
|
-
type="number"
|
|
874
|
-
id="productId"
|
|
875
|
-
placeholder="ID"
|
|
876
|
-
style="max-width: 70px"
|
|
877
|
-
/>
|
|
878
|
-
<input
|
|
879
|
-
type="text"
|
|
880
|
-
id="productHash"
|
|
881
|
-
placeholder="hash"
|
|
882
|
-
style="max-width: 120px"
|
|
883
|
-
/>
|
|
884
|
-
<input
|
|
885
|
-
type="number"
|
|
886
|
-
id="productVariant"
|
|
887
|
-
placeholder="Variant"
|
|
888
|
-
value="0"
|
|
889
|
-
style="max-width: 75px"
|
|
890
|
-
/>
|
|
891
|
-
<input
|
|
892
|
-
type="number"
|
|
893
|
-
id="productQty"
|
|
894
|
-
placeholder="Qty"
|
|
895
|
-
value="1"
|
|
896
|
-
style="max-width: 60px"
|
|
897
|
-
/>
|
|
898
|
-
<button
|
|
899
|
-
id="btn-add-product"
|
|
900
|
-
class="primary"
|
|
901
|
-
>
|
|
902
|
-
Add
|
|
903
|
-
</button>
|
|
904
|
-
</div>
|
|
905
|
-
</div>
|
|
906
|
-
</details>
|
|
907
|
-
|
|
908
|
-
<details class="api-section" open>
|
|
909
|
-
<summary>
|
|
910
|
-
Cart
|
|
911
|
-
<code>DRT.shopper.cart</code>
|
|
912
|
-
<span
|
|
913
|
-
id="cart-badge"
|
|
914
|
-
class="section-badge"
|
|
915
|
-
></span>
|
|
916
|
-
</summary>
|
|
917
|
-
<div class="section-body">
|
|
918
|
-
<div class="btn-row">
|
|
919
|
-
<button id="btn-cart" class="primary">
|
|
920
|
-
Get Cart
|
|
921
|
-
</button>
|
|
922
|
-
<button id="btn-delete-cart" class="danger">
|
|
923
|
-
Delete Cart
|
|
924
|
-
</button>
|
|
925
|
-
</div>
|
|
926
|
-
<div id="cart-display" class="cart-items"></div>
|
|
927
|
-
</div>
|
|
928
|
-
</details>
|
|
929
|
-
|
|
930
|
-
<details class="api-section">
|
|
931
|
-
<summary>
|
|
932
|
-
Orders <code>DRT.shopper.order</code>
|
|
933
|
-
</summary>
|
|
934
|
-
<div class="section-body">
|
|
935
|
-
<div class="inline-row">
|
|
936
|
-
<label>Order GUID</label>
|
|
937
|
-
<input
|
|
938
|
-
type="text"
|
|
939
|
-
id="orderGuid"
|
|
940
|
-
placeholder="ABC123-..."
|
|
941
|
-
/>
|
|
942
|
-
<button id="btn-receipt">Receipt</button>
|
|
943
|
-
</div>
|
|
944
|
-
</div>
|
|
945
|
-
</details>
|
|
946
|
-
|
|
947
|
-
<details class="api-section">
|
|
948
|
-
<summary>
|
|
949
|
-
Codes / Discounts
|
|
950
|
-
<code>DRT.shopper.code</code>
|
|
951
|
-
</summary>
|
|
952
|
-
<div class="section-body">
|
|
953
|
-
<div class="inline-row">
|
|
954
|
-
<label>Code</label>
|
|
955
|
-
<input
|
|
956
|
-
type="text"
|
|
957
|
-
id="promoCode"
|
|
958
|
-
placeholder="SAVE10"
|
|
959
|
-
/>
|
|
960
|
-
<button id="btn-validate-code">
|
|
961
|
-
Validate
|
|
962
|
-
</button>
|
|
963
|
-
</div>
|
|
964
|
-
</div>
|
|
965
|
-
</details>
|
|
966
|
-
|
|
967
|
-
<details class="api-section">
|
|
968
|
-
<summary>
|
|
969
|
-
Gift Cards
|
|
970
|
-
<code>DRT.shopper.giftCard</code>
|
|
971
|
-
</summary>
|
|
972
|
-
<div class="section-body">
|
|
973
|
-
<div class="inline-row">
|
|
974
|
-
<label>Card #</label>
|
|
975
|
-
<input
|
|
976
|
-
type="text"
|
|
977
|
-
id="giftCardNumber"
|
|
978
|
-
placeholder="Gift card number"
|
|
979
|
-
/>
|
|
980
|
-
<button id="btn-gift-balance">
|
|
981
|
-
Check Balance
|
|
982
|
-
</button>
|
|
983
|
-
</div>
|
|
984
|
-
</div>
|
|
985
|
-
</details>
|
|
986
|
-
</div>
|
|
987
|
-
|
|
988
|
-
<!-- SCANNER -->
|
|
989
|
-
<div id="tab-scanner" class="api-content">
|
|
990
|
-
<details class="api-section" open>
|
|
991
|
-
<summary>
|
|
992
|
-
Scanning
|
|
993
|
-
<code>DRT.scanner.scanning</code>
|
|
994
|
-
</summary>
|
|
995
|
-
<div class="section-body">
|
|
996
|
-
<div class="btn-row">
|
|
997
|
-
<button id="btn-strings">
|
|
998
|
-
Get App Strings
|
|
999
|
-
<span
|
|
1000
|
-
class="section-badge"
|
|
1001
|
-
style="margin-left: 0.35rem"
|
|
1002
|
-
>no auth</span
|
|
1003
|
-
>
|
|
1004
|
-
</button>
|
|
1005
|
-
</div>
|
|
1006
|
-
</div>
|
|
1007
|
-
</details>
|
|
1008
|
-
|
|
1009
|
-
<details class="api-section" open>
|
|
1010
|
-
<summary>
|
|
1011
|
-
Database
|
|
1012
|
-
<code>DRT.scanner.database</code>
|
|
1013
|
-
</summary>
|
|
1014
|
-
<div class="section-body">
|
|
1015
|
-
<div class="inline-row">
|
|
1016
|
-
<label>Show Code</label>
|
|
1017
|
-
<input
|
|
1018
|
-
type="text"
|
|
1019
|
-
id="scannerShowCode"
|
|
1020
|
-
placeholder="e.g., ABC123"
|
|
1021
|
-
/>
|
|
1022
|
-
</div>
|
|
1023
|
-
<div
|
|
1024
|
-
class="inline-row"
|
|
1025
|
-
style="margin-top: 0.4rem"
|
|
1026
|
-
>
|
|
1027
|
-
<label>Device</label>
|
|
1028
|
-
<input
|
|
1029
|
-
type="text"
|
|
1030
|
-
id="scannerDevice"
|
|
1031
|
-
value="test-device"
|
|
1032
|
-
/>
|
|
1033
|
-
<label>User</label>
|
|
1034
|
-
<input
|
|
1035
|
-
type="text"
|
|
1036
|
-
id="scannerUser"
|
|
1037
|
-
value="test-user"
|
|
1038
|
-
/>
|
|
1039
|
-
</div>
|
|
1040
|
-
<div class="btn-row">
|
|
1041
|
-
<button id="btn-scanner-db">
|
|
1042
|
-
Download Database
|
|
1043
|
-
</button>
|
|
1044
|
-
<button id="btn-scanner-query">
|
|
1045
|
-
Query Sections
|
|
1046
|
-
</button>
|
|
1047
|
-
</div>
|
|
1048
|
-
</div>
|
|
1049
|
-
</details>
|
|
1050
|
-
|
|
1051
|
-
<details class="api-section">
|
|
1052
|
-
<summary>
|
|
1053
|
-
Orders
|
|
1054
|
-
<code>DRT.scanner.orders</code>
|
|
1055
|
-
</summary>
|
|
1056
|
-
<div class="section-body">
|
|
1057
|
-
<div class="inline-row">
|
|
1058
|
-
<label>Phone</label>
|
|
1059
|
-
<input
|
|
1060
|
-
type="text"
|
|
1061
|
-
id="scannerPhone"
|
|
1062
|
-
placeholder="Phone number"
|
|
1063
|
-
/>
|
|
1064
|
-
<button id="btn-scanner-by-phone">
|
|
1065
|
-
Search
|
|
1066
|
-
</button>
|
|
1067
|
-
</div>
|
|
1068
|
-
<div
|
|
1069
|
-
class="inline-row"
|
|
1070
|
-
style="margin-top: 0.4rem"
|
|
1071
|
-
>
|
|
1072
|
-
<label>Name</label>
|
|
1073
|
-
<input
|
|
1074
|
-
type="text"
|
|
1075
|
-
id="scannerName"
|
|
1076
|
-
placeholder="Buyer name"
|
|
1077
|
-
/>
|
|
1078
|
-
<button id="btn-scanner-by-name">
|
|
1079
|
-
Search
|
|
1080
|
-
</button>
|
|
1081
|
-
</div>
|
|
1082
|
-
</div>
|
|
1083
|
-
</details>
|
|
1084
|
-
</div>
|
|
1085
|
-
</div>
|
|
1086
|
-
</div>
|
|
1087
|
-
|
|
1088
|
-
<!-- RIGHT PANEL: Output + Implementation tabs -->
|
|
1089
|
-
<div class="right-panel">
|
|
1090
|
-
<div class="panel-tabs">
|
|
1091
|
-
<button class="panel-tab active" data-panel="output">
|
|
1092
|
-
Output
|
|
1093
|
-
</button>
|
|
1094
|
-
<button class="panel-tab" data-panel="impl">
|
|
1095
|
-
Implementation
|
|
1096
|
-
</button>
|
|
1097
|
-
</div>
|
|
1098
|
-
|
|
1099
|
-
<div id="panel-output" class="panel-content active">
|
|
1100
|
-
<div id="status" class="success">
|
|
1101
|
-
SDK loaded — initialize with your credentials
|
|
1102
|
-
</div>
|
|
1103
|
-
<div id="output-container">
|
|
1104
|
-
<pre id="output">
|
|
1105
|
-
// Initialize the SDK, then click a button to test...
|
|
1106
|
-
|
|
1107
|
-
// Tip: window.DRT is available in the browser console.</pre
|
|
1108
|
-
>
|
|
1109
|
-
</div>
|
|
1110
|
-
</div>
|
|
1111
|
-
|
|
1112
|
-
<div id="panel-impl" class="panel-content">
|
|
1113
|
-
<div id="impl-panel">
|
|
1114
|
-
<h3>Install</h3>
|
|
1115
|
-
<p>
|
|
1116
|
-
The SDK is distributed on npm and works in browsers,
|
|
1117
|
-
Node, and bundlers.
|
|
1118
|
-
</p>
|
|
1119
|
-
<div class="code-block">
|
|
1120
|
-
<button class="copy-btn" data-copy="npm-install">
|
|
1121
|
-
Copy
|
|
1122
|
-
</button>
|
|
1123
|
-
<pre
|
|
1124
|
-
id="npm-install"
|
|
1125
|
-
><span class="com"># With npm</span>
|
|
1126
|
-
npm install @drttix/drt-sdk
|
|
1127
|
-
|
|
1128
|
-
<span class="com"># With yarn</span>
|
|
1129
|
-
yarn add @drttix/drt-sdk
|
|
1130
|
-
|
|
1131
|
-
<span class="com"># With pnpm</span>
|
|
1132
|
-
pnpm add @drttix/drt-sdk</pre>
|
|
1133
|
-
</div>
|
|
1134
|
-
|
|
1135
|
-
<h3>Browser (ES Modules)</h3>
|
|
1136
|
-
<p>
|
|
1137
|
-
Use the prebuilt bundle directly from a CDN or
|
|
1138
|
-
static host:
|
|
1139
|
-
</p>
|
|
1140
|
-
<div class="code-block">
|
|
1141
|
-
<button class="copy-btn" data-copy="browser-script">
|
|
1142
|
-
Copy
|
|
1143
|
-
</button>
|
|
1144
|
-
<pre
|
|
1145
|
-
id="browser-script"
|
|
1146
|
-
><span class="kw"><script</span> <span class="fn">type</span>=<span class="str">"module"</span><span class="kw">></span>
|
|
1147
|
-
<span class="kw">import</span> { DRT } <span class="kw">from</span> <span class="str">'https://cdn.drttix.com/public/sdk/latest/drt-sdk.js'</span>;
|
|
1148
|
-
|
|
1149
|
-
DRT.<span class="fn">init</span>({
|
|
1150
|
-
shopperGuid: <span class="str">'YOUR_SHOPPER_GUID'</span>,
|
|
1151
|
-
accountId: <span class="str">'YOUR_ACCOUNT_ID'</span>,
|
|
1152
|
-
apiKey: <span class="str">'YOUR_API_KEY'</span>,
|
|
1153
|
-
});
|
|
1154
|
-
|
|
1155
|
-
<span class="kw">const</span> events = <span class="kw">await</span> DRT.shopper.event.<span class="fn">getEvents</span>();
|
|
1156
|
-
<span class="fn">console</span>.log(events);
|
|
1157
|
-
<span class="kw"></script></span></pre>
|
|
1158
|
-
</div>
|
|
1159
|
-
|
|
1160
|
-
<h3>JavaScript / TypeScript</h3>
|
|
1161
|
-
<div class="code-block">
|
|
1162
|
-
<button class="copy-btn" data-copy="js-usage">
|
|
1163
|
-
Copy
|
|
1164
|
-
</button>
|
|
1165
|
-
<pre
|
|
1166
|
-
id="js-usage"
|
|
1167
|
-
><span class="kw">import</span> { DRT } <span class="kw">from</span> <span class="str">'@drttix/drt-sdk'</span>;
|
|
1168
|
-
|
|
1169
|
-
<span class="com">// 1. Initialize once at app startup</span>
|
|
1170
|
-
DRT.<span class="fn">init</span>({
|
|
1171
|
-
shopperGuid: <span class="str">'F1199DCD-BB45-4BD0-...'</span>,
|
|
1172
|
-
accountId: <span class="str">'508'</span>,
|
|
1173
|
-
apiKey: <span class="str">'your-api-key'</span>,
|
|
1174
|
-
});
|
|
1175
|
-
|
|
1176
|
-
<span class="com">// 2. Call any service — credentials are injected automatically</span>
|
|
1177
|
-
<span class="kw">const</span> events = <span class="kw">await</span> DRT.shopper.event.<span class="fn">getEvents</span>();
|
|
1178
|
-
<span class="kw">const</span> details = <span class="kw">await</span> DRT.shopper.event.<span class="fn">getEventById</span>(<span class="num">42075</span>);
|
|
1179
|
-
<span class="kw">const</span> cart = <span class="kw">await</span> DRT.shopper.cart.<span class="fn">getCart</span>();</pre>
|
|
1180
|
-
</div>
|
|
1181
|
-
|
|
1182
|
-
<h3>Creating a Shopper Session</h3>
|
|
1183
|
-
<p>
|
|
1184
|
-
If you don't have a shopperGuid yet, create one
|
|
1185
|
-
first:
|
|
1186
|
-
</p>
|
|
1187
|
-
<div class="code-block">
|
|
1188
|
-
<button class="copy-btn" data-copy="create-session">
|
|
1189
|
-
Copy
|
|
1190
|
-
</button>
|
|
1191
|
-
<pre
|
|
1192
|
-
id="create-session"
|
|
1193
|
-
><span class="kw">const</span> session = <span class="kw">await</span> DRT.shopper.session.<span class="fn">createSession</span>({
|
|
1194
|
-
studioId: <span class="num">508</span>,
|
|
1195
|
-
});
|
|
1196
|
-
|
|
1197
|
-
DRT.<span class="fn">init</span>({
|
|
1198
|
-
shopperGuid: session.shopperGuid,
|
|
1199
|
-
accountId: <span class="fn">String</span>(session.studioId),
|
|
1200
|
-
apiKey: <span class="str">'your-api-key'</span>,
|
|
1201
|
-
});</pre>
|
|
1202
|
-
</div>
|
|
1203
|
-
|
|
1204
|
-
<h3>Holding Seats</h3>
|
|
1205
|
-
<div class="code-block">
|
|
1206
|
-
<button class="copy-btn" data-copy="hold-seats">
|
|
1207
|
-
Copy
|
|
1208
|
-
</button>
|
|
1209
|
-
<pre
|
|
1210
|
-
id="hold-seats"
|
|
1211
|
-
><span class="com">// Reserved seat</span>
|
|
1212
|
-
<span class="kw">await</span> DRT.shopper.seat.<span class="fn">holdReservedSeat</span>({
|
|
1213
|
-
eventId: <span class="num">42075</span>,
|
|
1214
|
-
seatNum: <span class="num">101</span>,
|
|
1215
|
-
});
|
|
1216
|
-
|
|
1217
|
-
<span class="com">// General admission</span>
|
|
1218
|
-
<span class="kw">await</span> DRT.shopper.seat.<span class="fn">holdGaSeat</span>({
|
|
1219
|
-
eventId: <span class="num">42075</span>,
|
|
1220
|
-
tierId: <span class="num">1</span>,
|
|
1221
|
-
qty: <span class="num">2</span>,
|
|
1222
|
-
allOrNone: <span class="kw">true</span>,
|
|
1223
|
-
});
|
|
1224
|
-
|
|
1225
|
-
<span class="com">// Release a reserved seat</span>
|
|
1226
|
-
<span class="kw">await</span> DRT.shopper.seat.<span class="fn">releaseReservedSeat</span>({
|
|
1227
|
-
eventId: <span class="num">42075</span>,
|
|
1228
|
-
seatNum: <span class="num">101</span>,
|
|
1229
|
-
});
|
|
1230
|
-
|
|
1231
|
-
<span class="com">// Release GA seat</span>
|
|
1232
|
-
<span class="kw">await</span> DRT.shopper.seat.<span class="fn">releaseGaSeat</span>({
|
|
1233
|
-
eventId: <span class="num">42075</span>,
|
|
1234
|
-
tierId: <span class="num">1</span>,
|
|
1235
|
-
qty: <span class="num">1</span>,
|
|
1236
|
-
});</pre>
|
|
1237
|
-
</div>
|
|
1238
|
-
|
|
1239
|
-
<h3>Cart Management</h3>
|
|
1240
|
-
<div class="code-block">
|
|
1241
|
-
<button class="copy-btn" data-copy="cart-ex">
|
|
1242
|
-
Copy
|
|
1243
|
-
</button>
|
|
1244
|
-
<pre
|
|
1245
|
-
id="cart-ex"
|
|
1246
|
-
><span class="kw">const</span> { cart } = <span class="kw">await</span> DRT.shopper.cart.<span class="fn">getCart</span>();
|
|
1247
|
-
|
|
1248
|
-
<span class="com">// cart.seats, cart.products, cart.donations</span>
|
|
1249
|
-
<span class="kw">for</span> (<span class="kw">const</span> seat <span class="kw">of</span> cart.seats) {
|
|
1250
|
-
<span class="fn">console</span>.log(seat.tierName, seat.displayPrice);
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
<span class="com">// Clear entire cart</span>
|
|
1254
|
-
<span class="kw">await</span> DRT.shopper.cart.<span class="fn">deleteCart</span>();</pre>
|
|
1255
|
-
</div>
|
|
1256
|
-
|
|
1257
|
-
<h3>Error Handling</h3>
|
|
1258
|
-
<div class="code-block">
|
|
1259
|
-
<button class="copy-btn" data-copy="err-handling">
|
|
1260
|
-
Copy
|
|
1261
|
-
</button>
|
|
1262
|
-
<pre id="err-handling"><span class="kw">try</span> {
|
|
1263
|
-
<span class="kw">const</span> events = <span class="kw">await</span> DRT.shopper.event.<span class="fn">getEvents</span>();
|
|
1264
|
-
} <span class="kw">catch</span> (err) {
|
|
1265
|
-
<span class="com">// err.status = HTTP status (400, 404, 500, ...)</span>
|
|
1266
|
-
<span class="com">// err.body = API error payload (errorCode, message)</span>
|
|
1267
|
-
<span class="fn">console</span>.error(err.status, err.body);
|
|
1268
|
-
}</pre>
|
|
1269
|
-
</div>
|
|
1270
|
-
|
|
1271
|
-
<h3>Available Services</h3>
|
|
1272
|
-
<div class="code-block">
|
|
1273
|
-
<pre><span class="kw">DRT</span>.shopper.{ account, event, seat, cart, product,
|
|
1274
|
-
order, code, giftCard, session, ... }
|
|
1275
|
-
|
|
1276
|
-
<span class="kw">DRT</span>.scanner.{ scanning, database, orders }
|
|
1277
|
-
|
|
1278
|
-
<span class="kw">DRT</span>.portal .{ ... admin-only services }</pre>
|
|
1279
|
-
</div>
|
|
1280
|
-
|
|
1281
|
-
<h3>API Documentation (Swagger)</h3>
|
|
1282
|
-
<p>
|
|
1283
|
-
Interactive API docs for each service — open
|
|
1284
|
-
directly in the browser:
|
|
1285
|
-
</p>
|
|
1286
|
-
<div
|
|
1287
|
-
style="
|
|
1288
|
-
display: flex;
|
|
1289
|
-
flex-direction: column;
|
|
1290
|
-
gap: 0.4rem;
|
|
1291
|
-
margin: 0.5rem 0;
|
|
1292
|
-
"
|
|
1293
|
-
>
|
|
1294
|
-
<a
|
|
1295
|
-
href="https://api.drttix.com/shopper/docs"
|
|
1296
|
-
target="_blank"
|
|
1297
|
-
rel="noopener"
|
|
1298
|
-
style="
|
|
1299
|
-
display: flex;
|
|
1300
|
-
align-items: center;
|
|
1301
|
-
gap: 0.6rem;
|
|
1302
|
-
padding: 0.55rem 0.8rem;
|
|
1303
|
-
background: #11111b;
|
|
1304
|
-
border: 1px solid #313244;
|
|
1305
|
-
border-radius: 6px;
|
|
1306
|
-
color: #89b4fa;
|
|
1307
|
-
text-decoration: none;
|
|
1308
|
-
font-size: 0.85rem;
|
|
1309
|
-
font-family: inherit;
|
|
1310
|
-
"
|
|
1311
|
-
>
|
|
1312
|
-
<span style="font-size: 1rem">🛒</span>
|
|
1313
|
-
<span
|
|
1314
|
-
><strong>Shopper API</strong> —
|
|
1315
|
-
events, seats, cart, products,
|
|
1316
|
-
checkout</span
|
|
1317
|
-
>
|
|
1318
|
-
<span
|
|
1319
|
-
style="
|
|
1320
|
-
margin-left: auto;
|
|
1321
|
-
font-size: 0.7rem;
|
|
1322
|
-
color: #6c7086;
|
|
1323
|
-
"
|
|
1324
|
-
>api.drttix.com/shopper/docs</span
|
|
1325
|
-
>
|
|
1326
|
-
</a>
|
|
1327
|
-
<a
|
|
1328
|
-
href="https://api.drttix.com/scanner-v3/docs"
|
|
1329
|
-
target="_blank"
|
|
1330
|
-
rel="noopener"
|
|
1331
|
-
style="
|
|
1332
|
-
display: flex;
|
|
1333
|
-
align-items: center;
|
|
1334
|
-
gap: 0.6rem;
|
|
1335
|
-
padding: 0.55rem 0.8rem;
|
|
1336
|
-
background: #11111b;
|
|
1337
|
-
border: 1px solid #313244;
|
|
1338
|
-
border-radius: 6px;
|
|
1339
|
-
color: #89b4fa;
|
|
1340
|
-
text-decoration: none;
|
|
1341
|
-
font-size: 0.85rem;
|
|
1342
|
-
font-family: inherit;
|
|
1343
|
-
"
|
|
1344
|
-
>
|
|
1345
|
-
<span style="font-size: 1rem">📷</span>
|
|
1346
|
-
<span
|
|
1347
|
-
><strong>Scanner API</strong> —
|
|
1348
|
-
scanning, database, orders</span
|
|
1349
|
-
>
|
|
1350
|
-
<span
|
|
1351
|
-
style="
|
|
1352
|
-
margin-left: auto;
|
|
1353
|
-
font-size: 0.7rem;
|
|
1354
|
-
color: #6c7086;
|
|
1355
|
-
"
|
|
1356
|
-
>api.drttix.com/scanner-v3/docs</span
|
|
1357
|
-
>
|
|
1358
|
-
</a>
|
|
1359
|
-
<a
|
|
1360
|
-
href="https://api.drttix.com/admin-portal/docs"
|
|
1361
|
-
target="_blank"
|
|
1362
|
-
rel="noopener"
|
|
1363
|
-
style="
|
|
1364
|
-
display: flex;
|
|
1365
|
-
align-items: center;
|
|
1366
|
-
gap: 0.6rem;
|
|
1367
|
-
padding: 0.55rem 0.8rem;
|
|
1368
|
-
background: #11111b;
|
|
1369
|
-
border: 1px solid #313244;
|
|
1370
|
-
border-radius: 6px;
|
|
1371
|
-
color: #89b4fa;
|
|
1372
|
-
text-decoration: none;
|
|
1373
|
-
font-size: 0.85rem;
|
|
1374
|
-
font-family: inherit;
|
|
1375
|
-
"
|
|
1376
|
-
>
|
|
1377
|
-
<span style="font-size: 1rem"
|
|
1378
|
-
>⚙️</span
|
|
1379
|
-
>
|
|
1380
|
-
<span
|
|
1381
|
-
><strong>Portal API</strong> —
|
|
1382
|
-
admin-only services</span
|
|
1383
|
-
>
|
|
1384
|
-
<span
|
|
1385
|
-
style="
|
|
1386
|
-
margin-left: auto;
|
|
1387
|
-
font-size: 0.7rem;
|
|
1388
|
-
color: #6c7086;
|
|
1389
|
-
"
|
|
1390
|
-
>api.drttix.com/admin-portal/docs</span
|
|
1391
|
-
>
|
|
1392
|
-
</a>
|
|
1393
|
-
</div>
|
|
1394
|
-
|
|
1395
|
-
<div class="impl-note">
|
|
1396
|
-
<strong>Note:</strong> Once
|
|
1397
|
-
<code>DRT.init()</code> is called, the
|
|
1398
|
-
<code>shopperguid</code>, <code>accountid</code>,
|
|
1399
|
-
and <code>apikey</code> headers are automatically
|
|
1400
|
-
attached to every request — you don't need to
|
|
1401
|
-
pass them as function arguments.
|
|
1402
|
-
</div>
|
|
1403
|
-
</div>
|
|
1404
|
-
</div>
|
|
1405
|
-
</div>
|
|
1406
|
-
</div>
|
|
1407
|
-
|
|
1408
|
-
<script type="module">
|
|
1409
|
-
import { DRT } from '/public/sdk/latest/drt-sdk.js';
|
|
1410
|
-
|
|
1411
|
-
const out = document.getElementById('output');
|
|
1412
|
-
const status = document.getElementById('status');
|
|
1413
|
-
|
|
1414
|
-
// Expose DRT globally for console testing
|
|
1415
|
-
window.DRT = DRT;
|
|
1416
|
-
|
|
1417
|
-
// Display the real SDK version if available
|
|
1418
|
-
if (DRT.version) {
|
|
1419
|
-
document.getElementById('sdkVersionBadge').textContent =
|
|
1420
|
-
'v' + DRT.version;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
function setStatus(msg, isError = false) {
|
|
1424
|
-
status.textContent = msg;
|
|
1425
|
-
status.className = isError ? 'error' : 'success';
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
function setOutput(data) {
|
|
1429
|
-
out.textContent =
|
|
1430
|
-
typeof data === 'string'
|
|
1431
|
-
? data
|
|
1432
|
-
: JSON.stringify(data, null, 2);
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
function requireInit() {
|
|
1436
|
-
if (!DRT.isReady()) {
|
|
1437
|
-
setStatus(
|
|
1438
|
-
'SDK not initialized! Fill credentials and click Initialize.',
|
|
1439
|
-
true,
|
|
1440
|
-
);
|
|
1441
|
-
return false;
|
|
1442
|
-
}
|
|
1443
|
-
return true;
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
|
-
async function callApi(fn, description) {
|
|
1447
|
-
setStatus(`Fetching ${description}...`, false);
|
|
1448
|
-
try {
|
|
1449
|
-
const result = await fn();
|
|
1450
|
-
setStatus(`Success - ${description}`, false);
|
|
1451
|
-
setOutput(result);
|
|
1452
|
-
return result;
|
|
1453
|
-
} catch (err) {
|
|
1454
|
-
setStatus(`Error: ${err.message}`, true);
|
|
1455
|
-
setOutput({
|
|
1456
|
-
error: err.message,
|
|
1457
|
-
status: err.status,
|
|
1458
|
-
details: err.body || err.toString(),
|
|
1459
|
-
});
|
|
1460
|
-
console.error(err);
|
|
1461
|
-
return null;
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
/* ============ Right-panel tabs (Output / Implementation) ============ */
|
|
1466
|
-
document.querySelectorAll('.panel-tab').forEach((tab) => {
|
|
1467
|
-
tab.addEventListener('click', () => {
|
|
1468
|
-
document
|
|
1469
|
-
.querySelectorAll('.panel-tab')
|
|
1470
|
-
.forEach((t) => t.classList.remove('active'));
|
|
1471
|
-
document
|
|
1472
|
-
.querySelectorAll('.panel-content')
|
|
1473
|
-
.forEach((c) => c.classList.remove('active'));
|
|
1474
|
-
tab.classList.add('active');
|
|
1475
|
-
document
|
|
1476
|
-
.getElementById(`panel-${tab.dataset.panel}`)
|
|
1477
|
-
.classList.add('active');
|
|
1478
|
-
});
|
|
1479
|
-
});
|
|
1480
|
-
|
|
1481
|
-
/* ============ Copy-to-clipboard for impl code blocks ============ */
|
|
1482
|
-
document.querySelectorAll('.copy-btn').forEach((btn) => {
|
|
1483
|
-
btn.addEventListener('click', async () => {
|
|
1484
|
-
const id = btn.dataset.copy;
|
|
1485
|
-
const el = document.getElementById(id);
|
|
1486
|
-
if (!el) return;
|
|
1487
|
-
try {
|
|
1488
|
-
await navigator.clipboard.writeText(el.innerText);
|
|
1489
|
-
btn.textContent = 'Copied!';
|
|
1490
|
-
btn.classList.add('copied');
|
|
1491
|
-
setTimeout(() => {
|
|
1492
|
-
btn.textContent = 'Copy';
|
|
1493
|
-
btn.classList.remove('copied');
|
|
1494
|
-
}, 1500);
|
|
1495
|
-
} catch (e) {
|
|
1496
|
-
console.error(e);
|
|
1497
|
-
}
|
|
1498
|
-
});
|
|
1499
|
-
});
|
|
1500
|
-
|
|
1501
|
-
/* ============ API left-panel tabs (Shopper / Scanner) ============ */
|
|
1502
|
-
document.querySelectorAll('.api-tab').forEach((tab) => {
|
|
1503
|
-
tab.addEventListener('click', () => {
|
|
1504
|
-
document
|
|
1505
|
-
.querySelectorAll('.api-tab')
|
|
1506
|
-
.forEach((t) => t.classList.remove('active'));
|
|
1507
|
-
document
|
|
1508
|
-
.querySelectorAll('.api-content')
|
|
1509
|
-
.forEach((c) => c.classList.remove('active'));
|
|
1510
|
-
tab.classList.add('active');
|
|
1511
|
-
document
|
|
1512
|
-
.getElementById(`tab-${tab.dataset.tab}`)
|
|
1513
|
-
.classList.add('active');
|
|
1514
|
-
});
|
|
1515
|
-
});
|
|
1516
|
-
|
|
1517
|
-
/* ============ SDK Init / Reset ============ */
|
|
1518
|
-
document
|
|
1519
|
-
.getElementById('btn-init')
|
|
1520
|
-
.addEventListener('click', () => {
|
|
1521
|
-
const shopperGuid = document
|
|
1522
|
-
.getElementById('shopperGuid')
|
|
1523
|
-
.value.trim();
|
|
1524
|
-
const accountId = document
|
|
1525
|
-
.getElementById('accountId')
|
|
1526
|
-
.value.trim();
|
|
1527
|
-
const apiKey = document
|
|
1528
|
-
.getElementById('apiKey')
|
|
1529
|
-
.value.trim();
|
|
1530
|
-
|
|
1531
|
-
if (!shopperGuid || !accountId || !apiKey) {
|
|
1532
|
-
setStatus('Please fill in all fields', true);
|
|
1533
|
-
return;
|
|
1534
|
-
}
|
|
1535
|
-
|
|
1536
|
-
try {
|
|
1537
|
-
DRT.init({ shopperGuid, accountId, apiKey });
|
|
1538
|
-
setStatus('SDK initialized successfully', false);
|
|
1539
|
-
setOutput({
|
|
1540
|
-
message: 'SDK initialized',
|
|
1541
|
-
config: { shopperGuid, accountId, apiKey: '***' },
|
|
1542
|
-
});
|
|
1543
|
-
} catch (err) {
|
|
1544
|
-
setStatus('Init failed: ' + err.message, true);
|
|
1545
|
-
setOutput({ error: err.message });
|
|
1546
|
-
}
|
|
1547
|
-
});
|
|
1548
|
-
|
|
1549
|
-
document
|
|
1550
|
-
.getElementById('btn-check-sdk')
|
|
1551
|
-
.addEventListener('click', () => {
|
|
1552
|
-
setStatus('SDK Status', false);
|
|
1553
|
-
const config = DRT.getConfig();
|
|
1554
|
-
setOutput({
|
|
1555
|
-
isReady: DRT.isReady(),
|
|
1556
|
-
config: config
|
|
1557
|
-
? {
|
|
1558
|
-
shopperGuid: config.shopperGuid,
|
|
1559
|
-
accountId: config.accountId,
|
|
1560
|
-
apiKey: '***',
|
|
1561
|
-
}
|
|
1562
|
-
: null,
|
|
1563
|
-
availableServices: {
|
|
1564
|
-
shopper: Object.keys(DRT.shopper),
|
|
1565
|
-
scanner: Object.keys(DRT.scanner),
|
|
1566
|
-
portal: Object.keys(DRT.portal || {}),
|
|
1567
|
-
},
|
|
1568
|
-
});
|
|
1569
|
-
});
|
|
1570
|
-
|
|
1571
|
-
document
|
|
1572
|
-
.getElementById('btn-reset')
|
|
1573
|
-
.addEventListener('click', () => {
|
|
1574
|
-
DRT.reset();
|
|
1575
|
-
setStatus('SDK has been reset', false);
|
|
1576
|
-
setOutput({
|
|
1577
|
-
message: 'SDK has been reset. Initialize again to use.',
|
|
1578
|
-
});
|
|
1579
|
-
});
|
|
1580
|
-
|
|
1581
|
-
/* ============ Create Shopper Session ============ */
|
|
1582
|
-
document
|
|
1583
|
-
.getElementById('btn-create-shopper')
|
|
1584
|
-
.addEventListener('click', async () => {
|
|
1585
|
-
const studioId = parseInt(
|
|
1586
|
-
document.getElementById('createStudioId').value,
|
|
1587
|
-
);
|
|
1588
|
-
const apiKey = document
|
|
1589
|
-
.getElementById('createApiKey')
|
|
1590
|
-
.value.trim();
|
|
1591
|
-
if (!studioId || !apiKey) {
|
|
1592
|
-
setStatus(
|
|
1593
|
-
'Please enter both Studio ID and API Key',
|
|
1594
|
-
true,
|
|
1595
|
-
);
|
|
1596
|
-
return;
|
|
1597
|
-
}
|
|
1598
|
-
setStatus('Creating shopper session...', false);
|
|
1599
|
-
try {
|
|
1600
|
-
const result = await DRT.shopper.session.createSession({
|
|
1601
|
-
studioId,
|
|
1602
|
-
});
|
|
1603
|
-
setOutput(result);
|
|
1604
|
-
|
|
1605
|
-
// Populate credential fields and auto-init
|
|
1606
|
-
document.getElementById('shopperGuid').value =
|
|
1607
|
-
result.shopperGuid;
|
|
1608
|
-
document.getElementById('accountId').value =
|
|
1609
|
-
result.studioId;
|
|
1610
|
-
document.getElementById('apiKey').value = apiKey;
|
|
1611
|
-
DRT.init({
|
|
1612
|
-
shopperGuid: result.shopperGuid,
|
|
1613
|
-
accountId: String(result.studioId),
|
|
1614
|
-
apiKey,
|
|
1615
|
-
});
|
|
1616
|
-
setStatus(
|
|
1617
|
-
'Shopper created and SDK initialized!',
|
|
1618
|
-
false,
|
|
1619
|
-
);
|
|
1620
|
-
} catch (err) {
|
|
1621
|
-
setStatus(`Error: ${err.message}`, true);
|
|
1622
|
-
setOutput({
|
|
1623
|
-
error: err.message,
|
|
1624
|
-
details: err.body || err.toString(),
|
|
1625
|
-
});
|
|
1626
|
-
}
|
|
1627
|
-
});
|
|
1628
|
-
|
|
1629
|
-
/* ============ SHOPPER - Account ============ */
|
|
1630
|
-
document
|
|
1631
|
-
.getElementById('btn-theme')
|
|
1632
|
-
.addEventListener('click', () => {
|
|
1633
|
-
if (!requireInit()) return;
|
|
1634
|
-
callApi(() => DRT.shopper.account.getTheme(), 'theme');
|
|
1635
|
-
});
|
|
1636
|
-
document
|
|
1637
|
-
.getElementById('btn-disposition')
|
|
1638
|
-
.addEventListener('click', () => {
|
|
1639
|
-
if (!requireInit()) return;
|
|
1640
|
-
callApi(
|
|
1641
|
-
() => DRT.shopper.account.getDisposition(),
|
|
1642
|
-
'disposition',
|
|
1643
|
-
);
|
|
1644
|
-
});
|
|
1645
|
-
document
|
|
1646
|
-
.getElementById('btn-root')
|
|
1647
|
-
.addEventListener('click', () => {
|
|
1648
|
-
if (!requireInit()) return;
|
|
1649
|
-
callApi(() => DRT.shopper.account.getRoot(), 'root config');
|
|
1650
|
-
});
|
|
1651
|
-
document
|
|
1652
|
-
.getElementById('btn-landing')
|
|
1653
|
-
.addEventListener('click', () => {
|
|
1654
|
-
if (!requireInit()) return;
|
|
1655
|
-
callApi(
|
|
1656
|
-
() => DRT.shopper.account.getLandingPage(),
|
|
1657
|
-
'landing page',
|
|
1658
|
-
);
|
|
1659
|
-
});
|
|
1660
|
-
|
|
1661
|
-
/* ============ SHOPPER - Events ============ */
|
|
1662
|
-
document
|
|
1663
|
-
.getElementById('btn-events')
|
|
1664
|
-
.addEventListener('click', async () => {
|
|
1665
|
-
if (!requireInit()) return;
|
|
1666
|
-
setStatus('Fetching events...', false);
|
|
1667
|
-
try {
|
|
1668
|
-
const result = await DRT.shopper.event.getEvents();
|
|
1669
|
-
const select = document.getElementById('eventSelect');
|
|
1670
|
-
select.innerHTML =
|
|
1671
|
-
'<option value="">-- Select an event --</option>';
|
|
1672
|
-
const events = result.events || result || [];
|
|
1673
|
-
events.forEach((ev) => {
|
|
1674
|
-
const opt = document.createElement('option');
|
|
1675
|
-
opt.value = ev.eventId || ev.id;
|
|
1676
|
-
opt.textContent = `${ev.eventId || ev.id}: ${ev.eventName || ev.name || 'Unnamed'}`;
|
|
1677
|
-
select.appendChild(opt);
|
|
1678
|
-
});
|
|
1679
|
-
const summary = events.map((e) => ({
|
|
1680
|
-
id: e.eventId || e.id,
|
|
1681
|
-
name: e.eventName || e.name || 'Unnamed',
|
|
1682
|
-
date: e.eventDate || e.date || '',
|
|
1683
|
-
venue: e.venueName || e.venue || '',
|
|
1684
|
-
}));
|
|
1685
|
-
setStatus(`Loaded ${events.length} events`, false);
|
|
1686
|
-
setOutput({
|
|
1687
|
-
eventCount: events.length,
|
|
1688
|
-
events: summary,
|
|
1689
|
-
});
|
|
1690
|
-
} catch (err) {
|
|
1691
|
-
setStatus(`Error: ${err.message}`, true);
|
|
1692
|
-
setOutput({
|
|
1693
|
-
error: err.message,
|
|
1694
|
-
details: err.body || err.toString(),
|
|
1695
|
-
});
|
|
1696
|
-
}
|
|
1697
|
-
});
|
|
1698
|
-
|
|
1699
|
-
document
|
|
1700
|
-
.getElementById('btn-event-details')
|
|
1701
|
-
.addEventListener('click', async () => {
|
|
1702
|
-
if (!requireInit()) return;
|
|
1703
|
-
const id = parseInt(
|
|
1704
|
-
document.getElementById('eventSelect').value,
|
|
1705
|
-
);
|
|
1706
|
-
if (!id) {
|
|
1707
|
-
setStatus('Please select an event', true);
|
|
1708
|
-
return;
|
|
1709
|
-
}
|
|
1710
|
-
setStatus(`Fetching event ${id} details...`, false);
|
|
1711
|
-
try {
|
|
1712
|
-
const result = await DRT.shopper.event.getEventById(id);
|
|
1713
|
-
const sections = result.sections || [];
|
|
1714
|
-
const tiers = result.tiers || [];
|
|
1715
|
-
const isGA =
|
|
1716
|
-
result.event && result.event.isGeneralSeating === 1;
|
|
1717
|
-
|
|
1718
|
-
const seatSection =
|
|
1719
|
-
document.getElementById('section-seats');
|
|
1720
|
-
seatSection.classList.remove('hidden-section');
|
|
1721
|
-
seatSection.open = true;
|
|
1722
|
-
|
|
1723
|
-
const infoEl =
|
|
1724
|
-
document.getElementById('seat-type-info');
|
|
1725
|
-
const gaControls =
|
|
1726
|
-
document.getElementById('seat-ga-controls');
|
|
1727
|
-
const baControls =
|
|
1728
|
-
document.getElementById('seat-ba-controls');
|
|
1729
|
-
const seatBadge = document.getElementById('seat-badge');
|
|
1730
|
-
|
|
1731
|
-
if (isGA) {
|
|
1732
|
-
infoEl.textContent = `General Admission - ${tiers.length} tier(s), ${sections.length} section(s)`;
|
|
1733
|
-
infoEl.className = 'info-banner ga';
|
|
1734
|
-
gaControls.style.display = 'block';
|
|
1735
|
-
baControls.style.display = 'none';
|
|
1736
|
-
seatBadge.textContent = 'GA';
|
|
1737
|
-
seatBadge.className = 'section-badge badge-ga';
|
|
1738
|
-
const tierSel =
|
|
1739
|
-
document.getElementById('tierSelect');
|
|
1740
|
-
tierSel.innerHTML = '';
|
|
1741
|
-
tiers.forEach((t) => {
|
|
1742
|
-
const opt = document.createElement('option');
|
|
1743
|
-
opt.value = t.id;
|
|
1744
|
-
opt.textContent = `${t.name} - $${t.price} (id: ${t.id})`;
|
|
1745
|
-
tierSel.appendChild(opt);
|
|
1746
|
-
});
|
|
1747
|
-
} else {
|
|
1748
|
-
infoEl.textContent = `Reserved Seating - ${sections.length} section(s), ${tiers.length} tier(s)`;
|
|
1749
|
-
infoEl.className = 'info-banner reserved';
|
|
1750
|
-
gaControls.style.display = 'none';
|
|
1751
|
-
baControls.style.display = 'block';
|
|
1752
|
-
seatBadge.textContent = 'Reserved';
|
|
1753
|
-
seatBadge.className =
|
|
1754
|
-
'section-badge badge-reserved';
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
const tierSection = document.getElementById(
|
|
1758
|
-
'section-update-tier',
|
|
1759
|
-
);
|
|
1760
|
-
if (tiers.length > 0) {
|
|
1761
|
-
tierSection.classList.remove('hidden-section');
|
|
1762
|
-
const tb = document.getElementById('tier-badge');
|
|
1763
|
-
tb.textContent = `${tiers.length} tier(s)`;
|
|
1764
|
-
tb.className = 'section-badge badge-count';
|
|
1765
|
-
const sel =
|
|
1766
|
-
document.getElementById('updateTierSelect');
|
|
1767
|
-
sel.innerHTML = '';
|
|
1768
|
-
tiers.forEach((t) => {
|
|
1769
|
-
const opt = document.createElement('option');
|
|
1770
|
-
opt.value = t.id;
|
|
1771
|
-
opt.textContent = `${t.name} - $${t.price} (id: ${t.id})`;
|
|
1772
|
-
sel.appendChild(opt);
|
|
1773
|
-
});
|
|
1774
|
-
} else {
|
|
1775
|
-
tierSection.classList.add('hidden-section');
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1778
|
-
document
|
|
1779
|
-
.getElementById('section-products')
|
|
1780
|
-
.classList.remove('hidden-section');
|
|
1781
|
-
document.getElementById('product-badge').textContent =
|
|
1782
|
-
'Ready';
|
|
1783
|
-
document.getElementById('product-badge').className =
|
|
1784
|
-
'section-badge badge-ready';
|
|
1785
|
-
|
|
1786
|
-
const sectionRules = result.sectionRules || [];
|
|
1787
|
-
setStatus('Success', false);
|
|
1788
|
-
setOutput({
|
|
1789
|
-
event: {
|
|
1790
|
-
id: result.event?.id,
|
|
1791
|
-
name: result.event?.name,
|
|
1792
|
-
title: result.event?.title,
|
|
1793
|
-
isGeneralSeating:
|
|
1794
|
-
result.event?.isGeneralSeating,
|
|
1795
|
-
statusId: result.event?.statusId,
|
|
1796
|
-
},
|
|
1797
|
-
sections: sections.map((s) => ({
|
|
1798
|
-
id: s.id,
|
|
1799
|
-
name: s.name,
|
|
1800
|
-
isGA: s.is_general_seating,
|
|
1801
|
-
gaCapacity: s.ga_capacity,
|
|
1802
|
-
})),
|
|
1803
|
-
sectionRules: sectionRules.map((r) => ({
|
|
1804
|
-
section: r.section,
|
|
1805
|
-
sectionId: r.section_id,
|
|
1806
|
-
rowLow: r.row_low,
|
|
1807
|
-
rowHigh: r.row_high,
|
|
1808
|
-
seatLow: r.seat_low,
|
|
1809
|
-
seatHigh: r.seat_high,
|
|
1810
|
-
})),
|
|
1811
|
-
tiers: tiers.map((t) => ({
|
|
1812
|
-
id: t.id,
|
|
1813
|
-
name: t.name,
|
|
1814
|
-
price: t.price,
|
|
1815
|
-
sectionId: t.section_id,
|
|
1816
|
-
})),
|
|
1817
|
-
});
|
|
1818
|
-
} catch (err) {
|
|
1819
|
-
setStatus(`Error: ${err.message}`, true);
|
|
1820
|
-
setOutput({
|
|
1821
|
-
error: err.message,
|
|
1822
|
-
details: err.body || err.toString(),
|
|
1823
|
-
});
|
|
1824
|
-
}
|
|
1825
|
-
});
|
|
1826
|
-
|
|
1827
|
-
/* ============ SHOPPER - Seats ============ */
|
|
1828
|
-
document
|
|
1829
|
-
.getElementById('btn-hold-ga')
|
|
1830
|
-
.addEventListener('click', async () => {
|
|
1831
|
-
if (!requireInit()) return;
|
|
1832
|
-
const eventId = parseInt(
|
|
1833
|
-
document.getElementById('eventSelect').value,
|
|
1834
|
-
);
|
|
1835
|
-
const tierId = parseInt(
|
|
1836
|
-
document.getElementById('tierSelect').value,
|
|
1837
|
-
);
|
|
1838
|
-
const qty =
|
|
1839
|
-
parseInt(document.getElementById('gaQty').value) || 1;
|
|
1840
|
-
if (!eventId || !tierId) {
|
|
1841
|
-
setStatus('Select event + tier first', true);
|
|
1842
|
-
return;
|
|
1843
|
-
}
|
|
1844
|
-
const result = await callApi(
|
|
1845
|
-
() =>
|
|
1846
|
-
DRT.shopper.seat.holdGaSeat({
|
|
1847
|
-
eventId,
|
|
1848
|
-
allOrNone: true,
|
|
1849
|
-
tierId,
|
|
1850
|
-
qty,
|
|
1851
|
-
}),
|
|
1852
|
-
`hold ${qty} GA seat(s) for event ${eventId}`,
|
|
1853
|
-
);
|
|
1854
|
-
if (result) silentRefreshCart();
|
|
1855
|
-
});
|
|
1856
|
-
|
|
1857
|
-
document
|
|
1858
|
-
.getElementById('btn-hold-reserved')
|
|
1859
|
-
.addEventListener('click', async () => {
|
|
1860
|
-
if (!requireInit()) return;
|
|
1861
|
-
const eventId = parseInt(
|
|
1862
|
-
document.getElementById('eventSelect').value,
|
|
1863
|
-
);
|
|
1864
|
-
const seatNum = parseInt(
|
|
1865
|
-
document.getElementById('reservedSeatNum').value,
|
|
1866
|
-
);
|
|
1867
|
-
if (!eventId || !seatNum) {
|
|
1868
|
-
setStatus('Select event + enter seat number', true);
|
|
1869
|
-
return;
|
|
1870
|
-
}
|
|
1871
|
-
const result = await callApi(
|
|
1872
|
-
() =>
|
|
1873
|
-
DRT.shopper.seat.holdReservedSeat({
|
|
1874
|
-
eventId,
|
|
1875
|
-
seatNum,
|
|
1876
|
-
}),
|
|
1877
|
-
`hold reserved seat #${seatNum}`,
|
|
1878
|
-
);
|
|
1879
|
-
if (result) silentRefreshCart();
|
|
1880
|
-
});
|
|
1881
|
-
|
|
1882
|
-
document
|
|
1883
|
-
.getElementById('btn-update-tier')
|
|
1884
|
-
.addEventListener('click', () => {
|
|
1885
|
-
if (!requireInit()) return;
|
|
1886
|
-
const eventId = parseInt(
|
|
1887
|
-
document.getElementById('eventSelect').value,
|
|
1888
|
-
);
|
|
1889
|
-
const seatNum = parseInt(
|
|
1890
|
-
document.getElementById('updateTierSeatNum').value,
|
|
1891
|
-
);
|
|
1892
|
-
const tierId = parseInt(
|
|
1893
|
-
document.getElementById('updateTierSelect').value,
|
|
1894
|
-
);
|
|
1895
|
-
if (!eventId || !seatNum || !tierId) {
|
|
1896
|
-
setStatus('Missing fields for tier update', true);
|
|
1897
|
-
return;
|
|
1898
|
-
}
|
|
1899
|
-
callApi(
|
|
1900
|
-
() =>
|
|
1901
|
-
DRT.shopper.seat.updateTier({
|
|
1902
|
-
eventId,
|
|
1903
|
-
seatNum,
|
|
1904
|
-
tierId,
|
|
1905
|
-
}),
|
|
1906
|
-
`update seat #${seatNum} to tier ${tierId}`,
|
|
1907
|
-
).then((r) => r && silentRefreshCart());
|
|
1908
|
-
});
|
|
1909
|
-
|
|
1910
|
-
/* ============ SHOPPER - Products ============ */
|
|
1911
|
-
document
|
|
1912
|
-
.getElementById('btn-get-products')
|
|
1913
|
-
.addEventListener('click', () => {
|
|
1914
|
-
if (!requireInit()) return;
|
|
1915
|
-
callApi(
|
|
1916
|
-
() => DRT.shopper.product.getProducts(),
|
|
1917
|
-
'products',
|
|
1918
|
-
);
|
|
1919
|
-
});
|
|
1920
|
-
|
|
1921
|
-
document
|
|
1922
|
-
.getElementById('btn-add-product')
|
|
1923
|
-
.addEventListener('click', async () => {
|
|
1924
|
-
if (!requireInit()) return;
|
|
1925
|
-
const id = parseInt(
|
|
1926
|
-
document.getElementById('productId').value,
|
|
1927
|
-
);
|
|
1928
|
-
const hash = document
|
|
1929
|
-
.getElementById('productHash')
|
|
1930
|
-
.value.trim();
|
|
1931
|
-
const variantId =
|
|
1932
|
-
parseInt(
|
|
1933
|
-
document.getElementById('productVariant').value,
|
|
1934
|
-
) || 0;
|
|
1935
|
-
const quantity =
|
|
1936
|
-
parseInt(document.getElementById('productQty').value) ||
|
|
1937
|
-
1;
|
|
1938
|
-
if (!id || !hash) {
|
|
1939
|
-
setStatus(
|
|
1940
|
-
'Enter Product ID and Hash (from Get Products)',
|
|
1941
|
-
true,
|
|
1942
|
-
);
|
|
1943
|
-
return;
|
|
1944
|
-
}
|
|
1945
|
-
const result = await callApi(
|
|
1946
|
-
() =>
|
|
1947
|
-
DRT.shopper.product.addProduct({
|
|
1948
|
-
id,
|
|
1949
|
-
hash,
|
|
1950
|
-
text: '',
|
|
1951
|
-
quantity,
|
|
1952
|
-
variantId,
|
|
1953
|
-
}),
|
|
1954
|
-
`add product ${id}`,
|
|
1955
|
-
);
|
|
1956
|
-
if (result) silentRefreshCart();
|
|
1957
|
-
});
|
|
1958
|
-
|
|
1959
|
-
/* ============ SHOPPER - Cart (with per-item remove) ============ */
|
|
1960
|
-
async function refreshCart() {
|
|
1961
|
-
if (!DRT.isReady()) return;
|
|
1962
|
-
try {
|
|
1963
|
-
const result = await DRT.shopper.cart.getCart();
|
|
1964
|
-
renderCart(result);
|
|
1965
|
-
setOutput(result);
|
|
1966
|
-
setStatus('Cart refreshed', false);
|
|
1967
|
-
} catch (err) {
|
|
1968
|
-
setStatus(`Error: ${err.message}`, true);
|
|
1969
|
-
setOutput({
|
|
1970
|
-
error: err.message,
|
|
1971
|
-
details: err.body || err.toString(),
|
|
1972
|
-
});
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
// Silently update only the cart widget without touching the output panel.
|
|
1977
|
-
// Used after hold/add/remove so the action result stays visible.
|
|
1978
|
-
async function silentRefreshCart(delayMs = 300) {
|
|
1979
|
-
if (!DRT.isReady()) return;
|
|
1980
|
-
await new Promise((r) => setTimeout(r, delayMs));
|
|
1981
|
-
try {
|
|
1982
|
-
const result = await DRT.shopper.cart.getCart();
|
|
1983
|
-
renderCart(result);
|
|
1984
|
-
} catch (_) {
|
|
1985
|
-
// silent — don't overwrite current output on background refresh failure
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
function renderCart(cartResponse) {
|
|
1990
|
-
const container = document.getElementById('cart-display');
|
|
1991
|
-
const cart = cartResponse?.cart || cartResponse || {};
|
|
1992
|
-
const seats = cart.seats || [];
|
|
1993
|
-
const products = cart.products || [];
|
|
1994
|
-
const donations = cart.donations || [];
|
|
1995
|
-
container.innerHTML = '';
|
|
1996
|
-
|
|
1997
|
-
const totalItems =
|
|
1998
|
-
seats.length + products.length + donations.length;
|
|
1999
|
-
const cartBadge = document.getElementById('cart-badge');
|
|
2000
|
-
if (totalItems === 0) {
|
|
2001
|
-
cartBadge.textContent = 'empty';
|
|
2002
|
-
cartBadge.className = 'section-badge';
|
|
2003
|
-
container.innerHTML =
|
|
2004
|
-
'<div class="empty-cart">Cart is empty</div>';
|
|
2005
|
-
return;
|
|
2006
|
-
}
|
|
2007
|
-
cartBadge.textContent = `${totalItems} item${totalItems !== 1 ? 's' : ''}`;
|
|
2008
|
-
cartBadge.className = 'section-badge badge-count';
|
|
2009
|
-
|
|
2010
|
-
let total = 0;
|
|
2011
|
-
|
|
2012
|
-
seats.forEach((s, idx) => {
|
|
2013
|
-
total += s.displayPrice || s.price || 0;
|
|
2014
|
-
const row = document.createElement('div');
|
|
2015
|
-
row.className = 'cart-item';
|
|
2016
|
-
const seatLabel = s.isGeneralSeating
|
|
2017
|
-
? `GA - ${s.tierName || 'General'}`
|
|
2018
|
-
: `${s.section || ''} ${s.row ? 'Row ' + s.row : ''} Seat ${s.seat || s.num}`;
|
|
2019
|
-
row.innerHTML = `
|
|
2020
|
-
<div class="cart-item-icon seat">${s.isGeneralSeating ? 'GA' : 'S'}</div>
|
|
2021
|
-
<div class="cart-item-body">
|
|
2022
|
-
<div class="cart-item-title">${escapeHtml(s.shortName || 'Event')}</div>
|
|
2023
|
-
<div class="cart-item-subtitle">${escapeHtml(seatLabel)}${s.tierName ? ' - ' + escapeHtml(s.tierName) : ''}</div>
|
|
2024
|
-
</div>
|
|
2025
|
-
<div class="cart-item-price">$${(s.displayPrice ?? s.price ?? 0).toFixed(2)}</div>
|
|
2026
|
-
<button class="small danger" data-remove-seat="${idx}">Remove</button>
|
|
2027
|
-
`;
|
|
2028
|
-
row.querySelector('[data-remove-seat]').addEventListener(
|
|
2029
|
-
'click',
|
|
2030
|
-
() => removeSeatFromCart(s),
|
|
2031
|
-
);
|
|
2032
|
-
container.appendChild(row);
|
|
2033
|
-
});
|
|
2034
|
-
|
|
2035
|
-
products.forEach((p) => {
|
|
2036
|
-
total += (p.price || 0) * (p.qty || 1);
|
|
2037
|
-
const row = document.createElement('div');
|
|
2038
|
-
row.className = 'cart-item';
|
|
2039
|
-
row.innerHTML = `
|
|
2040
|
-
<div class="cart-item-icon product">P</div>
|
|
2041
|
-
<div class="cart-item-body">
|
|
2042
|
-
<div class="cart-item-title">${escapeHtml(p.name || 'Product')}${p.variantName ? ' - ' + escapeHtml(p.variantName) : ''}</div>
|
|
2043
|
-
<div class="cart-item-subtitle">Qty: ${p.qty} - id: ${p.productId}</div>
|
|
2044
|
-
</div>
|
|
2045
|
-
<div class="cart-item-price">$${((p.price || 0) * (p.qty || 1)).toFixed(2)}</div>
|
|
2046
|
-
<button class="small danger" data-remove-product>Remove</button>
|
|
2047
|
-
`;
|
|
2048
|
-
row.querySelector('[data-remove-product]').addEventListener(
|
|
2049
|
-
'click',
|
|
2050
|
-
() => removeProductFromCart(p),
|
|
2051
|
-
);
|
|
2052
|
-
container.appendChild(row);
|
|
2053
|
-
});
|
|
2054
|
-
|
|
2055
|
-
donations.forEach((d) => {
|
|
2056
|
-
total += d.amount || 0;
|
|
2057
|
-
const row = document.createElement('div');
|
|
2058
|
-
row.className = 'cart-item';
|
|
2059
|
-
row.innerHTML = `
|
|
2060
|
-
<div class="cart-item-icon donation">D</div>
|
|
2061
|
-
<div class="cart-item-body">
|
|
2062
|
-
<div class="cart-item-title">${escapeHtml(d.name || 'Donation')}</div>
|
|
2063
|
-
<div class="cart-item-subtitle">Fund id: ${d.id}</div>
|
|
2064
|
-
</div>
|
|
2065
|
-
<div class="cart-item-price">$${(d.amount || 0).toFixed(2)}</div>
|
|
2066
|
-
`;
|
|
2067
|
-
container.appendChild(row);
|
|
2068
|
-
});
|
|
2069
|
-
|
|
2070
|
-
const sum = document.createElement('div');
|
|
2071
|
-
sum.className = 'cart-summary';
|
|
2072
|
-
sum.innerHTML = `<span>Subtotal</span><span>$${total.toFixed(2)}</span>`;
|
|
2073
|
-
container.appendChild(sum);
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
function escapeHtml(s) {
|
|
2077
|
-
return String(s ?? '').replace(
|
|
2078
|
-
/[&<>"']/g,
|
|
2079
|
-
(c) =>
|
|
2080
|
-
({
|
|
2081
|
-
'&': '&',
|
|
2082
|
-
'<': '<',
|
|
2083
|
-
'>': '>',
|
|
2084
|
-
'"': '"',
|
|
2085
|
-
"'": ''',
|
|
2086
|
-
})[c],
|
|
2087
|
-
);
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
async function removeSeatFromCart(seat) {
|
|
2091
|
-
if (!requireInit()) return;
|
|
2092
|
-
const eventId = seat.showId;
|
|
2093
|
-
if (seat.isGeneralSeating) {
|
|
2094
|
-
const qty = 1;
|
|
2095
|
-
const tierId = seat.tierId;
|
|
2096
|
-
const ok = await callApi(
|
|
2097
|
-
() =>
|
|
2098
|
-
DRT.shopper.seat.releaseGaSeat({
|
|
2099
|
-
eventId,
|
|
2100
|
-
tierId,
|
|
2101
|
-
qty,
|
|
2102
|
-
}),
|
|
2103
|
-
`release GA seat (tier ${tierId})`,
|
|
2104
|
-
);
|
|
2105
|
-
if (ok !== null) silentRefreshCart();
|
|
2106
|
-
} else {
|
|
2107
|
-
const seatNum = seat.num;
|
|
2108
|
-
const ok = await callApi(
|
|
2109
|
-
() =>
|
|
2110
|
-
DRT.shopper.seat.releaseReservedSeat({
|
|
2111
|
-
eventId,
|
|
2112
|
-
seatNum,
|
|
2113
|
-
}),
|
|
2114
|
-
`release reserved seat #${seatNum}`,
|
|
2115
|
-
);
|
|
2116
|
-
if (ok !== null) silentRefreshCart();
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
async function removeProductFromCart(product) {
|
|
2121
|
-
if (!requireInit()) return;
|
|
2122
|
-
const ok = await callApi(
|
|
2123
|
-
() =>
|
|
2124
|
-
DRT.shopper.product.deleteProduct({
|
|
2125
|
-
id: product.productId,
|
|
2126
|
-
hash: product.guid || '',
|
|
2127
|
-
text: product.text || '',
|
|
2128
|
-
variantId: product.variantId || 0,
|
|
2129
|
-
}),
|
|
2130
|
-
`remove product ${product.productId}`,
|
|
2131
|
-
);
|
|
2132
|
-
if (ok !== null) silentRefreshCart();
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
document
|
|
2136
|
-
.getElementById('btn-cart')
|
|
2137
|
-
.addEventListener('click', refreshCart);
|
|
2138
|
-
|
|
2139
|
-
document
|
|
2140
|
-
.getElementById('btn-delete-cart')
|
|
2141
|
-
.addEventListener('click', async () => {
|
|
2142
|
-
if (!requireInit()) return;
|
|
2143
|
-
if (!confirm('Delete the entire cart?')) return;
|
|
2144
|
-
await callApi(
|
|
2145
|
-
() => DRT.shopper.cart.deleteCart(),
|
|
2146
|
-
'delete cart',
|
|
2147
|
-
);
|
|
2148
|
-
refreshCart();
|
|
2149
|
-
});
|
|
2150
|
-
|
|
2151
|
-
/* ============ SHOPPER - Orders / Codes / Gift Cards ============ */
|
|
2152
|
-
document
|
|
2153
|
-
.getElementById('btn-receipt')
|
|
2154
|
-
.addEventListener('click', () => {
|
|
2155
|
-
if (!requireInit()) return;
|
|
2156
|
-
const guid = document
|
|
2157
|
-
.getElementById('orderGuid')
|
|
2158
|
-
.value.trim();
|
|
2159
|
-
if (!guid) {
|
|
2160
|
-
setStatus('Enter an Order GUID', true);
|
|
2161
|
-
return;
|
|
2162
|
-
}
|
|
2163
|
-
callApi(
|
|
2164
|
-
() => DRT.shopper.order.getReceipt(guid),
|
|
2165
|
-
'receipt',
|
|
2166
|
-
);
|
|
2167
|
-
});
|
|
2168
|
-
|
|
2169
|
-
document
|
|
2170
|
-
.getElementById('btn-validate-code')
|
|
2171
|
-
.addEventListener('click', () => {
|
|
2172
|
-
if (!requireInit()) return;
|
|
2173
|
-
const code = document
|
|
2174
|
-
.getElementById('promoCode')
|
|
2175
|
-
.value.trim();
|
|
2176
|
-
if (!code) {
|
|
2177
|
-
setStatus('Enter a code', true);
|
|
2178
|
-
return;
|
|
2179
|
-
}
|
|
2180
|
-
callApi(
|
|
2181
|
-
() => DRT.shopper.code.validateCode(code),
|
|
2182
|
-
`code validation`,
|
|
2183
|
-
);
|
|
2184
|
-
});
|
|
2185
|
-
|
|
2186
|
-
document
|
|
2187
|
-
.getElementById('btn-gift-balance')
|
|
2188
|
-
.addEventListener('click', () => {
|
|
2189
|
-
if (!requireInit()) return;
|
|
2190
|
-
const num = document
|
|
2191
|
-
.getElementById('giftCardNumber')
|
|
2192
|
-
.value.trim();
|
|
2193
|
-
if (!num) {
|
|
2194
|
-
setStatus('Enter a gift card number', true);
|
|
2195
|
-
return;
|
|
2196
|
-
}
|
|
2197
|
-
callApi(
|
|
2198
|
-
() => DRT.shopper.giftCard.getBalance(num),
|
|
2199
|
-
'gift card balance',
|
|
2200
|
-
);
|
|
2201
|
-
});
|
|
2202
|
-
|
|
2203
|
-
/* ============ SCANNER API ============ */
|
|
2204
|
-
document
|
|
2205
|
-
.getElementById('btn-strings')
|
|
2206
|
-
.addEventListener('click', () => {
|
|
2207
|
-
callApi(
|
|
2208
|
-
() => DRT.scanner.scanning.appControllerGetStrings(),
|
|
2209
|
-
'scanner strings',
|
|
2210
|
-
);
|
|
2211
|
-
});
|
|
2212
|
-
|
|
2213
|
-
document
|
|
2214
|
-
.getElementById('btn-scanner-db')
|
|
2215
|
-
.addEventListener('click', () => {
|
|
2216
|
-
const showCode = document
|
|
2217
|
-
.getElementById('scannerShowCode')
|
|
2218
|
-
.value.trim();
|
|
2219
|
-
const device = document
|
|
2220
|
-
.getElementById('scannerDevice')
|
|
2221
|
-
.value.trim();
|
|
2222
|
-
const user = document
|
|
2223
|
-
.getElementById('scannerUser')
|
|
2224
|
-
.value.trim();
|
|
2225
|
-
if (!showCode) {
|
|
2226
|
-
setStatus('Enter a Show Code', true);
|
|
2227
|
-
return;
|
|
2228
|
-
}
|
|
2229
|
-
callApi(
|
|
2230
|
-
() =>
|
|
2231
|
-
DRT.scanner.database.download(
|
|
2232
|
-
showCode,
|
|
2233
|
-
device,
|
|
2234
|
-
user,
|
|
2235
|
-
'en',
|
|
2236
|
-
),
|
|
2237
|
-
'scanner database',
|
|
2238
|
-
);
|
|
2239
|
-
});
|
|
2240
|
-
|
|
2241
|
-
document
|
|
2242
|
-
.getElementById('btn-scanner-query')
|
|
2243
|
-
.addEventListener('click', () => {
|
|
2244
|
-
const showCode = document
|
|
2245
|
-
.getElementById('scannerShowCode')
|
|
2246
|
-
.value.trim();
|
|
2247
|
-
if (!showCode) {
|
|
2248
|
-
setStatus('Enter a Show Code', true);
|
|
2249
|
-
return;
|
|
2250
|
-
}
|
|
2251
|
-
callApi(
|
|
2252
|
-
() => DRT.scanner.database.query(showCode, 'sections'),
|
|
2253
|
-
'sections query',
|
|
2254
|
-
);
|
|
2255
|
-
});
|
|
2256
|
-
|
|
2257
|
-
document
|
|
2258
|
-
.getElementById('btn-scanner-by-phone')
|
|
2259
|
-
.addEventListener('click', () => {
|
|
2260
|
-
const showCode = document
|
|
2261
|
-
.getElementById('scannerShowCode')
|
|
2262
|
-
.value.trim();
|
|
2263
|
-
const phone = document
|
|
2264
|
-
.getElementById('scannerPhone')
|
|
2265
|
-
.value.trim();
|
|
2266
|
-
if (!showCode || !phone) {
|
|
2267
|
-
setStatus('Enter Show Code and Phone', true);
|
|
2268
|
-
return;
|
|
2269
|
-
}
|
|
2270
|
-
callApi(
|
|
2271
|
-
() =>
|
|
2272
|
-
DRT.scanner.orders.ordersControllerGetOrdersByPhone(
|
|
2273
|
-
showCode,
|
|
2274
|
-
phone,
|
|
2275
|
-
),
|
|
2276
|
-
'orders by phone',
|
|
2277
|
-
);
|
|
2278
|
-
});
|
|
2279
|
-
|
|
2280
|
-
document
|
|
2281
|
-
.getElementById('btn-scanner-by-name')
|
|
2282
|
-
.addEventListener('click', () => {
|
|
2283
|
-
const showCode = document
|
|
2284
|
-
.getElementById('scannerShowCode')
|
|
2285
|
-
.value.trim();
|
|
2286
|
-
const name = document
|
|
2287
|
-
.getElementById('scannerName')
|
|
2288
|
-
.value.trim();
|
|
2289
|
-
if (!showCode || !name) {
|
|
2290
|
-
setStatus('Enter Show Code and Name', true);
|
|
2291
|
-
return;
|
|
2292
|
-
}
|
|
2293
|
-
callApi(
|
|
2294
|
-
() =>
|
|
2295
|
-
DRT.scanner.orders.ordersControllerGetOrdersByName(
|
|
2296
|
-
showCode,
|
|
2297
|
-
name,
|
|
2298
|
-
),
|
|
2299
|
-
'orders by name',
|
|
2300
|
-
);
|
|
2301
|
-
});
|
|
2302
|
-
|
|
2303
|
-
console.log('DRT SDK available at window.DRT for console testing');
|
|
2304
|
-
</script>
|
|
2305
|
-
</body>
|
|
2306
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>DRT SDK — Test Console</title>
|
|
7
|
+
<link rel="icon" href="data:," />
|
|
8
|
+
<style>
|
|
9
|
+
:root {
|
|
10
|
+
--primary: #4f46e5;
|
|
11
|
+
--primary-hover: #4338ca;
|
|
12
|
+
--primary-light: #eef2ff;
|
|
13
|
+
--danger: #dc2626;
|
|
14
|
+
--danger-hover: #b91c1c;
|
|
15
|
+
--success: #059669;
|
|
16
|
+
--success-light: #d1fae5;
|
|
17
|
+
--warning: #d97706;
|
|
18
|
+
--warning-light: #fef3c7;
|
|
19
|
+
--info: #0284c7;
|
|
20
|
+
--info-light: #e0f2fe;
|
|
21
|
+
--text: #111827;
|
|
22
|
+
--text-muted: #6b7280;
|
|
23
|
+
--border: #e5e7eb;
|
|
24
|
+
--surface: #ffffff;
|
|
25
|
+
--surface-alt: #f9fafb;
|
|
26
|
+
--code-bg: #1e1e2e;
|
|
27
|
+
--code-text: #e4e4e7;
|
|
28
|
+
}
|
|
29
|
+
* {
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
}
|
|
32
|
+
html,
|
|
33
|
+
body {
|
|
34
|
+
margin: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
height: 100%;
|
|
37
|
+
font-family:
|
|
38
|
+
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
|
39
|
+
'Helvetica Neue', sans-serif;
|
|
40
|
+
color: var(--text);
|
|
41
|
+
background: var(--surface-alt);
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
line-height: 1.5;
|
|
44
|
+
}
|
|
45
|
+
.app {
|
|
46
|
+
display: flex;
|
|
47
|
+
height: 100vh;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
}
|
|
50
|
+
.left-panel {
|
|
51
|
+
width: 50%;
|
|
52
|
+
min-width: 50%;
|
|
53
|
+
max-width: 50%;
|
|
54
|
+
overflow-y: auto;
|
|
55
|
+
padding: 1.25rem 1.5rem 2rem;
|
|
56
|
+
background: var(--surface-alt);
|
|
57
|
+
}
|
|
58
|
+
.right-panel {
|
|
59
|
+
width: 50%;
|
|
60
|
+
min-width: 50%;
|
|
61
|
+
max-width: 50%;
|
|
62
|
+
background: var(--code-bg);
|
|
63
|
+
color: var(--code-text);
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
border-left: 1px solid var(--border);
|
|
67
|
+
height: 100vh;
|
|
68
|
+
}
|
|
69
|
+
h1 {
|
|
70
|
+
font-size: 1.5rem;
|
|
71
|
+
font-weight: 700;
|
|
72
|
+
margin: 0 0 0.25rem;
|
|
73
|
+
color: var(--text);
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: 0.5rem;
|
|
77
|
+
}
|
|
78
|
+
h1 .badge-version {
|
|
79
|
+
font-size: 0.7rem;
|
|
80
|
+
background: var(--primary-light);
|
|
81
|
+
color: var(--primary);
|
|
82
|
+
padding: 0.15rem 0.5rem;
|
|
83
|
+
border-radius: 999px;
|
|
84
|
+
font-weight: 600;
|
|
85
|
+
}
|
|
86
|
+
.subtitle {
|
|
87
|
+
color: var(--text-muted);
|
|
88
|
+
margin: 0 0 1.25rem;
|
|
89
|
+
font-size: 0.875rem;
|
|
90
|
+
}
|
|
91
|
+
h2.section-title {
|
|
92
|
+
font-size: 0.75rem;
|
|
93
|
+
font-weight: 700;
|
|
94
|
+
text-transform: uppercase;
|
|
95
|
+
letter-spacing: 0.05em;
|
|
96
|
+
color: var(--text-muted);
|
|
97
|
+
margin: 1.5rem 0 0.5rem;
|
|
98
|
+
padding: 0;
|
|
99
|
+
border: none;
|
|
100
|
+
}
|
|
101
|
+
button {
|
|
102
|
+
padding: 0.4rem 0.85rem;
|
|
103
|
+
font-size: 0.85rem;
|
|
104
|
+
font-weight: 500;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
border: 1px solid var(--border);
|
|
107
|
+
border-radius: 6px;
|
|
108
|
+
background: var(--surface);
|
|
109
|
+
color: var(--text);
|
|
110
|
+
transition: all 0.15s;
|
|
111
|
+
}
|
|
112
|
+
button:hover:not(:disabled) {
|
|
113
|
+
background: var(--surface-alt);
|
|
114
|
+
border-color: #d1d5db;
|
|
115
|
+
}
|
|
116
|
+
button:disabled {
|
|
117
|
+
opacity: 0.5;
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
}
|
|
120
|
+
button.primary {
|
|
121
|
+
background: var(--primary);
|
|
122
|
+
color: white;
|
|
123
|
+
border-color: var(--primary);
|
|
124
|
+
}
|
|
125
|
+
button.primary:hover:not(:disabled) {
|
|
126
|
+
background: var(--primary-hover);
|
|
127
|
+
border-color: var(--primary-hover);
|
|
128
|
+
}
|
|
129
|
+
button.danger {
|
|
130
|
+
background: var(--surface);
|
|
131
|
+
color: var(--danger);
|
|
132
|
+
border-color: #fecaca;
|
|
133
|
+
}
|
|
134
|
+
button.danger:hover:not(:disabled) {
|
|
135
|
+
background: #fef2f2;
|
|
136
|
+
}
|
|
137
|
+
button.small {
|
|
138
|
+
padding: 0.25rem 0.6rem;
|
|
139
|
+
font-size: 0.75rem;
|
|
140
|
+
}
|
|
141
|
+
input,
|
|
142
|
+
select {
|
|
143
|
+
padding: 0.4rem 0.6rem;
|
|
144
|
+
font-size: 0.85rem;
|
|
145
|
+
border: 1px solid var(--border);
|
|
146
|
+
border-radius: 6px;
|
|
147
|
+
background: var(--surface);
|
|
148
|
+
color: var(--text);
|
|
149
|
+
font-family: inherit;
|
|
150
|
+
}
|
|
151
|
+
input:focus,
|
|
152
|
+
select:focus {
|
|
153
|
+
outline: none;
|
|
154
|
+
border-color: var(--primary);
|
|
155
|
+
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
|
|
156
|
+
}
|
|
157
|
+
code {
|
|
158
|
+
background: #eef1f5;
|
|
159
|
+
color: #374151;
|
|
160
|
+
padding: 0.1rem 0.35rem;
|
|
161
|
+
border-radius: 4px;
|
|
162
|
+
font-size: 0.78rem;
|
|
163
|
+
font-family:
|
|
164
|
+
ui-monospace, 'SF Mono', Monaco, 'Cascadia Code', monospace;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Config card */
|
|
168
|
+
.card {
|
|
169
|
+
background: var(--surface);
|
|
170
|
+
border: 1px solid var(--border);
|
|
171
|
+
border-radius: 10px;
|
|
172
|
+
padding: 1rem;
|
|
173
|
+
margin-bottom: 1rem;
|
|
174
|
+
}
|
|
175
|
+
.card-title {
|
|
176
|
+
font-size: 0.9rem;
|
|
177
|
+
font-weight: 600;
|
|
178
|
+
margin: 0 0 0.5rem;
|
|
179
|
+
display: flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
gap: 0.5rem;
|
|
182
|
+
}
|
|
183
|
+
.card-title .step {
|
|
184
|
+
display: inline-flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
justify-content: center;
|
|
187
|
+
width: 1.5rem;
|
|
188
|
+
height: 1.5rem;
|
|
189
|
+
background: var(--primary);
|
|
190
|
+
color: white;
|
|
191
|
+
border-radius: 50%;
|
|
192
|
+
font-size: 0.75rem;
|
|
193
|
+
font-weight: 700;
|
|
194
|
+
}
|
|
195
|
+
.quick-start {
|
|
196
|
+
background: var(--primary-light);
|
|
197
|
+
border: 1px solid #c7d2fe;
|
|
198
|
+
padding: 0.75rem;
|
|
199
|
+
border-radius: 8px;
|
|
200
|
+
margin-bottom: 0.75rem;
|
|
201
|
+
}
|
|
202
|
+
.field {
|
|
203
|
+
display: block;
|
|
204
|
+
font-size: 0.8rem;
|
|
205
|
+
font-weight: 500;
|
|
206
|
+
color: var(--text-muted);
|
|
207
|
+
margin: 0.6rem 0 0.25rem;
|
|
208
|
+
}
|
|
209
|
+
.field + input {
|
|
210
|
+
width: 100%;
|
|
211
|
+
}
|
|
212
|
+
.inline-row {
|
|
213
|
+
display: flex;
|
|
214
|
+
gap: 0.5rem;
|
|
215
|
+
align-items: center;
|
|
216
|
+
flex-wrap: wrap;
|
|
217
|
+
}
|
|
218
|
+
.inline-row label {
|
|
219
|
+
font-size: 0.8rem;
|
|
220
|
+
font-weight: 500;
|
|
221
|
+
color: var(--text-muted);
|
|
222
|
+
}
|
|
223
|
+
.inline-row input,
|
|
224
|
+
.inline-row select {
|
|
225
|
+
flex: 1;
|
|
226
|
+
min-width: 0;
|
|
227
|
+
}
|
|
228
|
+
.btn-row {
|
|
229
|
+
display: flex;
|
|
230
|
+
gap: 0.5rem;
|
|
231
|
+
flex-wrap: wrap;
|
|
232
|
+
margin-top: 0.5rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* Tabs for API */
|
|
236
|
+
.api-tabs {
|
|
237
|
+
display: flex;
|
|
238
|
+
gap: 0.25rem;
|
|
239
|
+
border-bottom: 1px solid var(--border);
|
|
240
|
+
margin-bottom: 1rem;
|
|
241
|
+
}
|
|
242
|
+
.api-tab {
|
|
243
|
+
padding: 0.5rem 0.9rem;
|
|
244
|
+
border: none;
|
|
245
|
+
background: none;
|
|
246
|
+
cursor: pointer;
|
|
247
|
+
font-size: 0.875rem;
|
|
248
|
+
font-weight: 500;
|
|
249
|
+
color: var(--text-muted);
|
|
250
|
+
border-bottom: 2px solid transparent;
|
|
251
|
+
margin-bottom: -1px;
|
|
252
|
+
border-radius: 0;
|
|
253
|
+
}
|
|
254
|
+
.api-tab:hover {
|
|
255
|
+
color: var(--text);
|
|
256
|
+
background: none;
|
|
257
|
+
}
|
|
258
|
+
.api-tab.active {
|
|
259
|
+
color: var(--primary);
|
|
260
|
+
border-bottom-color: var(--primary);
|
|
261
|
+
}
|
|
262
|
+
.api-content {
|
|
263
|
+
display: none;
|
|
264
|
+
}
|
|
265
|
+
.api-content.active {
|
|
266
|
+
display: block;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* Collapsible sections */
|
|
270
|
+
details.api-section {
|
|
271
|
+
border: 1px solid var(--border);
|
|
272
|
+
border-radius: 8px;
|
|
273
|
+
margin-bottom: 0.5rem;
|
|
274
|
+
background: var(--surface);
|
|
275
|
+
overflow: hidden;
|
|
276
|
+
}
|
|
277
|
+
details.api-section > summary {
|
|
278
|
+
padding: 0.65rem 0.9rem;
|
|
279
|
+
font-weight: 600;
|
|
280
|
+
font-size: 0.9rem;
|
|
281
|
+
cursor: pointer;
|
|
282
|
+
user-select: none;
|
|
283
|
+
list-style: none;
|
|
284
|
+
display: flex;
|
|
285
|
+
align-items: center;
|
|
286
|
+
gap: 0.5rem;
|
|
287
|
+
transition: background 0.15s;
|
|
288
|
+
}
|
|
289
|
+
details.api-section > summary:hover {
|
|
290
|
+
background: var(--surface-alt);
|
|
291
|
+
}
|
|
292
|
+
details.api-section > summary::-webkit-details-marker {
|
|
293
|
+
display: none;
|
|
294
|
+
}
|
|
295
|
+
details.api-section > summary::before {
|
|
296
|
+
content: '\25B8';
|
|
297
|
+
font-size: 0.7rem;
|
|
298
|
+
color: #9ca3af;
|
|
299
|
+
transition: transform 0.15s;
|
|
300
|
+
flex-shrink: 0;
|
|
301
|
+
}
|
|
302
|
+
details.api-section[open] > summary::before {
|
|
303
|
+
transform: rotate(90deg);
|
|
304
|
+
}
|
|
305
|
+
details.api-section > .section-body {
|
|
306
|
+
padding: 0.75rem 0.9rem 0.9rem;
|
|
307
|
+
border-top: 1px solid var(--border);
|
|
308
|
+
background: var(--surface-alt);
|
|
309
|
+
}
|
|
310
|
+
details.api-section.hidden-section {
|
|
311
|
+
display: none;
|
|
312
|
+
}
|
|
313
|
+
.section-badge {
|
|
314
|
+
font-size: 0.7rem;
|
|
315
|
+
padding: 0.1rem 0.45rem;
|
|
316
|
+
border-radius: 999px;
|
|
317
|
+
font-weight: 600;
|
|
318
|
+
margin-left: auto;
|
|
319
|
+
background: #f3f4f6;
|
|
320
|
+
color: var(--text-muted);
|
|
321
|
+
}
|
|
322
|
+
.badge-ga {
|
|
323
|
+
background: var(--success-light);
|
|
324
|
+
color: var(--success);
|
|
325
|
+
}
|
|
326
|
+
.badge-reserved {
|
|
327
|
+
background: var(--info-light);
|
|
328
|
+
color: var(--info);
|
|
329
|
+
}
|
|
330
|
+
.badge-ready {
|
|
331
|
+
background: var(--success-light);
|
|
332
|
+
color: var(--success);
|
|
333
|
+
}
|
|
334
|
+
.badge-count {
|
|
335
|
+
background: var(--primary-light);
|
|
336
|
+
color: var(--primary);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/* Info banners */
|
|
340
|
+
.info-banner {
|
|
341
|
+
padding: 0.5rem 0.75rem;
|
|
342
|
+
border-radius: 6px;
|
|
343
|
+
font-size: 0.825rem;
|
|
344
|
+
margin-bottom: 0.5rem;
|
|
345
|
+
display: flex;
|
|
346
|
+
align-items: center;
|
|
347
|
+
gap: 0.5rem;
|
|
348
|
+
}
|
|
349
|
+
.info-banner.ga {
|
|
350
|
+
background: var(--success-light);
|
|
351
|
+
color: var(--success);
|
|
352
|
+
}
|
|
353
|
+
.info-banner.reserved {
|
|
354
|
+
background: var(--info-light);
|
|
355
|
+
color: var(--info);
|
|
356
|
+
}
|
|
357
|
+
.info-banner.warn {
|
|
358
|
+
background: var(--warning-light);
|
|
359
|
+
color: var(--warning);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* Cart items */
|
|
363
|
+
.cart-items {
|
|
364
|
+
display: flex;
|
|
365
|
+
flex-direction: column;
|
|
366
|
+
gap: 0.4rem;
|
|
367
|
+
margin-top: 0.5rem;
|
|
368
|
+
}
|
|
369
|
+
.cart-item {
|
|
370
|
+
display: flex;
|
|
371
|
+
align-items: center;
|
|
372
|
+
gap: 0.75rem;
|
|
373
|
+
padding: 0.6rem 0.75rem;
|
|
374
|
+
background: var(--surface);
|
|
375
|
+
border: 1px solid var(--border);
|
|
376
|
+
border-radius: 6px;
|
|
377
|
+
}
|
|
378
|
+
.cart-item-icon {
|
|
379
|
+
width: 2rem;
|
|
380
|
+
height: 2rem;
|
|
381
|
+
border-radius: 6px;
|
|
382
|
+
display: flex;
|
|
383
|
+
align-items: center;
|
|
384
|
+
justify-content: center;
|
|
385
|
+
font-size: 1rem;
|
|
386
|
+
flex-shrink: 0;
|
|
387
|
+
}
|
|
388
|
+
.cart-item-icon.seat {
|
|
389
|
+
background: var(--info-light);
|
|
390
|
+
color: var(--info);
|
|
391
|
+
}
|
|
392
|
+
.cart-item-icon.product {
|
|
393
|
+
background: var(--warning-light);
|
|
394
|
+
color: var(--warning);
|
|
395
|
+
}
|
|
396
|
+
.cart-item-icon.donation {
|
|
397
|
+
background: var(--success-light);
|
|
398
|
+
color: var(--success);
|
|
399
|
+
}
|
|
400
|
+
.cart-item-body {
|
|
401
|
+
flex: 1;
|
|
402
|
+
min-width: 0;
|
|
403
|
+
}
|
|
404
|
+
.cart-item-title {
|
|
405
|
+
font-weight: 600;
|
|
406
|
+
font-size: 0.875rem;
|
|
407
|
+
color: var(--text);
|
|
408
|
+
}
|
|
409
|
+
.cart-item-subtitle {
|
|
410
|
+
font-size: 0.75rem;
|
|
411
|
+
color: var(--text-muted);
|
|
412
|
+
margin-top: 0.1rem;
|
|
413
|
+
}
|
|
414
|
+
.cart-item-price {
|
|
415
|
+
font-weight: 600;
|
|
416
|
+
font-size: 0.875rem;
|
|
417
|
+
color: var(--text);
|
|
418
|
+
margin-right: 0.5rem;
|
|
419
|
+
white-space: nowrap;
|
|
420
|
+
}
|
|
421
|
+
.cart-summary {
|
|
422
|
+
background: var(--primary-light);
|
|
423
|
+
border: 1px solid #c7d2fe;
|
|
424
|
+
border-radius: 6px;
|
|
425
|
+
padding: 0.6rem 0.75rem;
|
|
426
|
+
margin-top: 0.75rem;
|
|
427
|
+
display: flex;
|
|
428
|
+
justify-content: space-between;
|
|
429
|
+
align-items: center;
|
|
430
|
+
font-weight: 600;
|
|
431
|
+
font-size: 0.9rem;
|
|
432
|
+
}
|
|
433
|
+
.empty-cart {
|
|
434
|
+
text-align: center;
|
|
435
|
+
padding: 1.5rem 0.5rem;
|
|
436
|
+
color: var(--text-muted);
|
|
437
|
+
font-size: 0.875rem;
|
|
438
|
+
font-style: italic;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/* Right panel output */
|
|
442
|
+
.panel-tabs {
|
|
443
|
+
display: flex;
|
|
444
|
+
background: #181825;
|
|
445
|
+
border-bottom: 1px solid #313244;
|
|
446
|
+
padding: 0 0.5rem;
|
|
447
|
+
}
|
|
448
|
+
.panel-tab {
|
|
449
|
+
padding: 0.75rem 1rem;
|
|
450
|
+
border: none;
|
|
451
|
+
background: none;
|
|
452
|
+
cursor: pointer;
|
|
453
|
+
font-size: 0.85rem;
|
|
454
|
+
font-weight: 500;
|
|
455
|
+
color: #a1a1aa;
|
|
456
|
+
border-bottom: 2px solid transparent;
|
|
457
|
+
margin-bottom: -1px;
|
|
458
|
+
border-radius: 0;
|
|
459
|
+
font-family: inherit;
|
|
460
|
+
}
|
|
461
|
+
.panel-tab:hover {
|
|
462
|
+
background: none;
|
|
463
|
+
color: var(--code-text);
|
|
464
|
+
}
|
|
465
|
+
.panel-tab.active {
|
|
466
|
+
color: #a5b4fc;
|
|
467
|
+
border-bottom-color: #a5b4fc;
|
|
468
|
+
}
|
|
469
|
+
.panel-content {
|
|
470
|
+
flex: 1;
|
|
471
|
+
display: none;
|
|
472
|
+
flex-direction: column;
|
|
473
|
+
min-height: 0;
|
|
474
|
+
}
|
|
475
|
+
.panel-content.active {
|
|
476
|
+
display: flex;
|
|
477
|
+
}
|
|
478
|
+
#status {
|
|
479
|
+
padding: 0.5rem 1rem;
|
|
480
|
+
font-weight: 600;
|
|
481
|
+
background: #181825;
|
|
482
|
+
border-bottom: 1px solid #313244;
|
|
483
|
+
font-size: 0.8rem;
|
|
484
|
+
display: flex;
|
|
485
|
+
align-items: center;
|
|
486
|
+
gap: 0.5rem;
|
|
487
|
+
}
|
|
488
|
+
#status.success {
|
|
489
|
+
color: #a6e3a1;
|
|
490
|
+
}
|
|
491
|
+
#status.error {
|
|
492
|
+
color: #f38ba8;
|
|
493
|
+
}
|
|
494
|
+
#status::before {
|
|
495
|
+
content: '';
|
|
496
|
+
width: 8px;
|
|
497
|
+
height: 8px;
|
|
498
|
+
border-radius: 50%;
|
|
499
|
+
background: currentColor;
|
|
500
|
+
flex-shrink: 0;
|
|
501
|
+
}
|
|
502
|
+
#output-container {
|
|
503
|
+
flex: 1;
|
|
504
|
+
overflow: auto;
|
|
505
|
+
padding: 1rem;
|
|
506
|
+
min-width: 0;
|
|
507
|
+
}
|
|
508
|
+
pre {
|
|
509
|
+
background: transparent;
|
|
510
|
+
margin: 0;
|
|
511
|
+
white-space: pre-wrap;
|
|
512
|
+
word-wrap: break-word;
|
|
513
|
+
overflow-wrap: break-word;
|
|
514
|
+
font-size: 0.8rem;
|
|
515
|
+
font-family:
|
|
516
|
+
ui-monospace, 'SF Mono', Monaco, 'Cascadia Code', monospace;
|
|
517
|
+
color: var(--code-text);
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
/* Implementation panel */
|
|
521
|
+
#impl-panel {
|
|
522
|
+
padding: 1.25rem;
|
|
523
|
+
overflow-y: auto;
|
|
524
|
+
flex: 1;
|
|
525
|
+
background: #181825;
|
|
526
|
+
}
|
|
527
|
+
#impl-panel h3 {
|
|
528
|
+
color: #cdd6f4;
|
|
529
|
+
margin: 1.25rem 0 0.5rem;
|
|
530
|
+
font-size: 0.95rem;
|
|
531
|
+
font-weight: 600;
|
|
532
|
+
}
|
|
533
|
+
#impl-panel h3:first-child {
|
|
534
|
+
margin-top: 0;
|
|
535
|
+
}
|
|
536
|
+
#impl-panel p {
|
|
537
|
+
color: #bac2de;
|
|
538
|
+
font-size: 0.85rem;
|
|
539
|
+
margin: 0.25rem 0 0.5rem;
|
|
540
|
+
}
|
|
541
|
+
.code-block {
|
|
542
|
+
position: relative;
|
|
543
|
+
background: #11111b;
|
|
544
|
+
border: 1px solid #313244;
|
|
545
|
+
border-radius: 8px;
|
|
546
|
+
padding: 0.8rem 0.9rem;
|
|
547
|
+
margin: 0.5rem 0;
|
|
548
|
+
}
|
|
549
|
+
.code-block pre {
|
|
550
|
+
font-size: 0.78rem;
|
|
551
|
+
line-height: 1.55;
|
|
552
|
+
color: #cdd6f4;
|
|
553
|
+
}
|
|
554
|
+
.code-block .copy-btn {
|
|
555
|
+
position: absolute;
|
|
556
|
+
top: 0.5rem;
|
|
557
|
+
right: 0.5rem;
|
|
558
|
+
padding: 0.2rem 0.5rem;
|
|
559
|
+
font-size: 0.7rem;
|
|
560
|
+
background: #313244;
|
|
561
|
+
color: #cdd6f4;
|
|
562
|
+
border: 1px solid #45475a;
|
|
563
|
+
border-radius: 4px;
|
|
564
|
+
cursor: pointer;
|
|
565
|
+
opacity: 0;
|
|
566
|
+
transition: opacity 0.15s;
|
|
567
|
+
}
|
|
568
|
+
.code-block:hover .copy-btn {
|
|
569
|
+
opacity: 1;
|
|
570
|
+
}
|
|
571
|
+
.code-block .copy-btn:hover {
|
|
572
|
+
background: #45475a;
|
|
573
|
+
}
|
|
574
|
+
.code-block .copy-btn.copied {
|
|
575
|
+
background: #a6e3a1;
|
|
576
|
+
color: #11111b;
|
|
577
|
+
}
|
|
578
|
+
.impl-note {
|
|
579
|
+
background: #181e2e;
|
|
580
|
+
border-left: 3px solid #89b4fa;
|
|
581
|
+
padding: 0.6rem 0.85rem;
|
|
582
|
+
margin: 0.75rem 0;
|
|
583
|
+
border-radius: 0 6px 6px 0;
|
|
584
|
+
font-size: 0.82rem;
|
|
585
|
+
color: #bac2de;
|
|
586
|
+
}
|
|
587
|
+
.kw {
|
|
588
|
+
color: #cba6f7;
|
|
589
|
+
}
|
|
590
|
+
.str {
|
|
591
|
+
color: #a6e3a1;
|
|
592
|
+
}
|
|
593
|
+
.com {
|
|
594
|
+
color: #6c7086;
|
|
595
|
+
font-style: italic;
|
|
596
|
+
}
|
|
597
|
+
.fn {
|
|
598
|
+
color: #89b4fa;
|
|
599
|
+
}
|
|
600
|
+
.num {
|
|
601
|
+
color: #fab387;
|
|
602
|
+
}
|
|
603
|
+
</style>
|
|
604
|
+
</head>
|
|
605
|
+
<body>
|
|
606
|
+
<div class="app">
|
|
607
|
+
<!-- LEFT PANEL: Controls -->
|
|
608
|
+
<div class="left-panel">
|
|
609
|
+
<h1>
|
|
610
|
+
DRT SDK Test Console
|
|
611
|
+
<span id="sdkVersionBadge" class="badge-version"
|
|
612
|
+
>v0.9.7</span
|
|
613
|
+
>
|
|
614
|
+
</h1>
|
|
615
|
+
<p class="subtitle">
|
|
616
|
+
Interactive playground for the
|
|
617
|
+
<code>@drttix/drt-sdk</code> shopper & scanner APIs.
|
|
618
|
+
</p>
|
|
619
|
+
|
|
620
|
+
<!-- Step 1 -->
|
|
621
|
+
<div class="card">
|
|
622
|
+
<div class="card-title">
|
|
623
|
+
<span class="step">1</span> Connect SDK
|
|
624
|
+
</div>
|
|
625
|
+
|
|
626
|
+
<div class="quick-start">
|
|
627
|
+
<strong style="font-size: 0.85rem"
|
|
628
|
+
>Quick Start — Create a new shopper
|
|
629
|
+
session</strong
|
|
630
|
+
>
|
|
631
|
+
<div
|
|
632
|
+
class="inline-row"
|
|
633
|
+
style="margin-top: 0.5rem; gap: 0.4rem"
|
|
634
|
+
>
|
|
635
|
+
<input
|
|
636
|
+
type="number"
|
|
637
|
+
id="createStudioId"
|
|
638
|
+
placeholder="Studio ID"
|
|
639
|
+
style="max-width: 110px"
|
|
640
|
+
/>
|
|
641
|
+
<input
|
|
642
|
+
type="text"
|
|
643
|
+
id="createApiKey"
|
|
644
|
+
placeholder="API Key"
|
|
645
|
+
/>
|
|
646
|
+
<button id="btn-create-shopper" class="primary">
|
|
647
|
+
Create
|
|
648
|
+
</button>
|
|
649
|
+
</div>
|
|
650
|
+
</div>
|
|
651
|
+
|
|
652
|
+
<label class="field" for="shopperGuid">Shopper GUID</label>
|
|
653
|
+
<input
|
|
654
|
+
type="text"
|
|
655
|
+
id="shopperGuid"
|
|
656
|
+
placeholder="e.g., F1199DCD-BB45-4BD0-..."
|
|
657
|
+
/>
|
|
658
|
+
|
|
659
|
+
<label class="field" for="accountId">Account ID</label>
|
|
660
|
+
<input type="text" id="accountId" placeholder="e.g., 508" />
|
|
661
|
+
|
|
662
|
+
<label class="field" for="apiKey">API Key</label>
|
|
663
|
+
<input type="text" id="apiKey" placeholder="your-api-key" />
|
|
664
|
+
|
|
665
|
+
<div class="btn-row">
|
|
666
|
+
<button id="btn-init" class="primary">
|
|
667
|
+
Initialize SDK
|
|
668
|
+
</button>
|
|
669
|
+
<button id="btn-check-sdk">Check Status</button>
|
|
670
|
+
<button id="btn-reset" class="danger">Reset</button>
|
|
671
|
+
</div>
|
|
672
|
+
</div>
|
|
673
|
+
|
|
674
|
+
<!-- Step 2 -->
|
|
675
|
+
<div class="card">
|
|
676
|
+
<div class="card-title">
|
|
677
|
+
<span class="step">2</span> Explore APIs
|
|
678
|
+
</div>
|
|
679
|
+
|
|
680
|
+
<div class="api-tabs">
|
|
681
|
+
<button class="api-tab active" data-tab="shopper">
|
|
682
|
+
Shopper
|
|
683
|
+
</button>
|
|
684
|
+
<button class="api-tab" data-tab="scanner">
|
|
685
|
+
Scanner
|
|
686
|
+
</button>
|
|
687
|
+
</div>
|
|
688
|
+
|
|
689
|
+
<!-- SHOPPER -->
|
|
690
|
+
<div id="tab-shopper" class="api-content active">
|
|
691
|
+
<details class="api-section" open>
|
|
692
|
+
<summary>
|
|
693
|
+
Account <code>DRT.shopper.account</code>
|
|
694
|
+
</summary>
|
|
695
|
+
<div class="section-body">
|
|
696
|
+
<div class="btn-row">
|
|
697
|
+
<button id="btn-theme">Theme</button>
|
|
698
|
+
<button id="btn-disposition">
|
|
699
|
+
Disposition
|
|
700
|
+
</button>
|
|
701
|
+
<button id="btn-root">Root Config</button>
|
|
702
|
+
<button id="btn-landing">
|
|
703
|
+
Landing Page
|
|
704
|
+
</button>
|
|
705
|
+
</div>
|
|
706
|
+
</div>
|
|
707
|
+
</details>
|
|
708
|
+
|
|
709
|
+
<details class="api-section" open>
|
|
710
|
+
<summary>
|
|
711
|
+
Events <code>DRT.shopper.event</code>
|
|
712
|
+
</summary>
|
|
713
|
+
<div class="section-body">
|
|
714
|
+
<div class="btn-row">
|
|
715
|
+
<button id="btn-events" class="primary">
|
|
716
|
+
Get All Events
|
|
717
|
+
</button>
|
|
718
|
+
</div>
|
|
719
|
+
<div
|
|
720
|
+
class="inline-row"
|
|
721
|
+
style="margin-top: 0.5rem"
|
|
722
|
+
>
|
|
723
|
+
<select id="eventSelect" style="flex: 1">
|
|
724
|
+
<option value="">
|
|
725
|
+
— Click "Get All Events" first
|
|
726
|
+
—
|
|
727
|
+
</option>
|
|
728
|
+
</select>
|
|
729
|
+
<button id="btn-event-details">
|
|
730
|
+
Get Details
|
|
731
|
+
</button>
|
|
732
|
+
</div>
|
|
733
|
+
</div>
|
|
734
|
+
</details>
|
|
735
|
+
|
|
736
|
+
<details
|
|
737
|
+
id="section-seats"
|
|
738
|
+
class="api-section hidden-section"
|
|
739
|
+
>
|
|
740
|
+
<summary>
|
|
741
|
+
Seats
|
|
742
|
+
<code>DRT.shopper.seat</code>
|
|
743
|
+
<span
|
|
744
|
+
id="seat-badge"
|
|
745
|
+
class="section-badge"
|
|
746
|
+
></span>
|
|
747
|
+
</summary>
|
|
748
|
+
<div class="section-body">
|
|
749
|
+
<div id="seat-type-info" class="info-banner">
|
|
750
|
+
Loading…
|
|
751
|
+
</div>
|
|
752
|
+
<div
|
|
753
|
+
id="seat-ga-controls"
|
|
754
|
+
style="display: none"
|
|
755
|
+
>
|
|
756
|
+
<div class="inline-row">
|
|
757
|
+
<label>Tier</label>
|
|
758
|
+
<select
|
|
759
|
+
id="tierSelect"
|
|
760
|
+
style="flex: 2"
|
|
761
|
+
></select>
|
|
762
|
+
<label>Qty</label>
|
|
763
|
+
<input
|
|
764
|
+
type="number"
|
|
765
|
+
id="gaQty"
|
|
766
|
+
value="1"
|
|
767
|
+
style="max-width: 70px"
|
|
768
|
+
/>
|
|
769
|
+
<button
|
|
770
|
+
id="btn-hold-ga"
|
|
771
|
+
class="primary"
|
|
772
|
+
>
|
|
773
|
+
Hold
|
|
774
|
+
</button>
|
|
775
|
+
</div>
|
|
776
|
+
</div>
|
|
777
|
+
<div
|
|
778
|
+
id="seat-ba-controls"
|
|
779
|
+
style="display: none"
|
|
780
|
+
>
|
|
781
|
+
<div class="inline-row">
|
|
782
|
+
<label>Seat #</label>
|
|
783
|
+
<input
|
|
784
|
+
type="number"
|
|
785
|
+
id="reservedSeatNum"
|
|
786
|
+
placeholder="e.g., 1"
|
|
787
|
+
style="flex: 1"
|
|
788
|
+
/>
|
|
789
|
+
<button
|
|
790
|
+
id="btn-hold-reserved"
|
|
791
|
+
class="primary"
|
|
792
|
+
>
|
|
793
|
+
Hold Reserved Seat
|
|
794
|
+
</button>
|
|
795
|
+
</div>
|
|
796
|
+
<p
|
|
797
|
+
style="
|
|
798
|
+
margin: 0.35rem 0 0;
|
|
799
|
+
font-size: 0.75rem;
|
|
800
|
+
color: var(--text-muted);
|
|
801
|
+
"
|
|
802
|
+
>
|
|
803
|
+
Use section rules from event details to
|
|
804
|
+
find valid seat numbers.
|
|
805
|
+
</p>
|
|
806
|
+
</div>
|
|
807
|
+
</div>
|
|
808
|
+
</details>
|
|
809
|
+
|
|
810
|
+
<details
|
|
811
|
+
id="section-update-tier"
|
|
812
|
+
class="api-section hidden-section"
|
|
813
|
+
>
|
|
814
|
+
<summary>
|
|
815
|
+
Update Tier
|
|
816
|
+
<code>DRT.shopper.seat.updateTier</code>
|
|
817
|
+
<span
|
|
818
|
+
id="tier-badge"
|
|
819
|
+
class="section-badge"
|
|
820
|
+
></span>
|
|
821
|
+
</summary>
|
|
822
|
+
<div class="section-body">
|
|
823
|
+
<p
|
|
824
|
+
style="
|
|
825
|
+
margin: 0 0 0.5rem;
|
|
826
|
+
color: var(--text-muted);
|
|
827
|
+
font-size: 0.8rem;
|
|
828
|
+
"
|
|
829
|
+
>
|
|
830
|
+
Change the pricing tier for a held seat.
|
|
831
|
+
</p>
|
|
832
|
+
<div class="inline-row">
|
|
833
|
+
<label>Seat #</label>
|
|
834
|
+
<input
|
|
835
|
+
type="number"
|
|
836
|
+
id="updateTierSeatNum"
|
|
837
|
+
placeholder="seat"
|
|
838
|
+
style="max-width: 90px"
|
|
839
|
+
/>
|
|
840
|
+
<label>Tier</label>
|
|
841
|
+
<select
|
|
842
|
+
id="updateTierSelect"
|
|
843
|
+
style="flex: 2"
|
|
844
|
+
></select>
|
|
845
|
+
<button id="btn-update-tier">Update</button>
|
|
846
|
+
</div>
|
|
847
|
+
</div>
|
|
848
|
+
</details>
|
|
849
|
+
|
|
850
|
+
<details
|
|
851
|
+
id="section-products"
|
|
852
|
+
class="api-section hidden-section"
|
|
853
|
+
>
|
|
854
|
+
<summary>
|
|
855
|
+
Products
|
|
856
|
+
<code>DRT.shopper.product</code>
|
|
857
|
+
<span
|
|
858
|
+
id="product-badge"
|
|
859
|
+
class="section-badge"
|
|
860
|
+
></span>
|
|
861
|
+
</summary>
|
|
862
|
+
<div class="section-body">
|
|
863
|
+
<div class="btn-row">
|
|
864
|
+
<button id="btn-get-products">
|
|
865
|
+
Get Products
|
|
866
|
+
</button>
|
|
867
|
+
</div>
|
|
868
|
+
<div
|
|
869
|
+
class="inline-row"
|
|
870
|
+
style="margin-top: 0.5rem; gap: 0.4rem"
|
|
871
|
+
>
|
|
872
|
+
<input
|
|
873
|
+
type="number"
|
|
874
|
+
id="productId"
|
|
875
|
+
placeholder="ID"
|
|
876
|
+
style="max-width: 70px"
|
|
877
|
+
/>
|
|
878
|
+
<input
|
|
879
|
+
type="text"
|
|
880
|
+
id="productHash"
|
|
881
|
+
placeholder="hash"
|
|
882
|
+
style="max-width: 120px"
|
|
883
|
+
/>
|
|
884
|
+
<input
|
|
885
|
+
type="number"
|
|
886
|
+
id="productVariant"
|
|
887
|
+
placeholder="Variant"
|
|
888
|
+
value="0"
|
|
889
|
+
style="max-width: 75px"
|
|
890
|
+
/>
|
|
891
|
+
<input
|
|
892
|
+
type="number"
|
|
893
|
+
id="productQty"
|
|
894
|
+
placeholder="Qty"
|
|
895
|
+
value="1"
|
|
896
|
+
style="max-width: 60px"
|
|
897
|
+
/>
|
|
898
|
+
<button
|
|
899
|
+
id="btn-add-product"
|
|
900
|
+
class="primary"
|
|
901
|
+
>
|
|
902
|
+
Add
|
|
903
|
+
</button>
|
|
904
|
+
</div>
|
|
905
|
+
</div>
|
|
906
|
+
</details>
|
|
907
|
+
|
|
908
|
+
<details class="api-section" open>
|
|
909
|
+
<summary>
|
|
910
|
+
Cart
|
|
911
|
+
<code>DRT.shopper.cart</code>
|
|
912
|
+
<span
|
|
913
|
+
id="cart-badge"
|
|
914
|
+
class="section-badge"
|
|
915
|
+
></span>
|
|
916
|
+
</summary>
|
|
917
|
+
<div class="section-body">
|
|
918
|
+
<div class="btn-row">
|
|
919
|
+
<button id="btn-cart" class="primary">
|
|
920
|
+
Get Cart
|
|
921
|
+
</button>
|
|
922
|
+
<button id="btn-delete-cart" class="danger">
|
|
923
|
+
Delete Cart
|
|
924
|
+
</button>
|
|
925
|
+
</div>
|
|
926
|
+
<div id="cart-display" class="cart-items"></div>
|
|
927
|
+
</div>
|
|
928
|
+
</details>
|
|
929
|
+
|
|
930
|
+
<details class="api-section">
|
|
931
|
+
<summary>
|
|
932
|
+
Orders <code>DRT.shopper.order</code>
|
|
933
|
+
</summary>
|
|
934
|
+
<div class="section-body">
|
|
935
|
+
<div class="inline-row">
|
|
936
|
+
<label>Order GUID</label>
|
|
937
|
+
<input
|
|
938
|
+
type="text"
|
|
939
|
+
id="orderGuid"
|
|
940
|
+
placeholder="ABC123-..."
|
|
941
|
+
/>
|
|
942
|
+
<button id="btn-receipt">Receipt</button>
|
|
943
|
+
</div>
|
|
944
|
+
</div>
|
|
945
|
+
</details>
|
|
946
|
+
|
|
947
|
+
<details class="api-section">
|
|
948
|
+
<summary>
|
|
949
|
+
Codes / Discounts
|
|
950
|
+
<code>DRT.shopper.code</code>
|
|
951
|
+
</summary>
|
|
952
|
+
<div class="section-body">
|
|
953
|
+
<div class="inline-row">
|
|
954
|
+
<label>Code</label>
|
|
955
|
+
<input
|
|
956
|
+
type="text"
|
|
957
|
+
id="promoCode"
|
|
958
|
+
placeholder="SAVE10"
|
|
959
|
+
/>
|
|
960
|
+
<button id="btn-validate-code">
|
|
961
|
+
Validate
|
|
962
|
+
</button>
|
|
963
|
+
</div>
|
|
964
|
+
</div>
|
|
965
|
+
</details>
|
|
966
|
+
|
|
967
|
+
<details class="api-section">
|
|
968
|
+
<summary>
|
|
969
|
+
Gift Cards
|
|
970
|
+
<code>DRT.shopper.giftCard</code>
|
|
971
|
+
</summary>
|
|
972
|
+
<div class="section-body">
|
|
973
|
+
<div class="inline-row">
|
|
974
|
+
<label>Card #</label>
|
|
975
|
+
<input
|
|
976
|
+
type="text"
|
|
977
|
+
id="giftCardNumber"
|
|
978
|
+
placeholder="Gift card number"
|
|
979
|
+
/>
|
|
980
|
+
<button id="btn-gift-balance">
|
|
981
|
+
Check Balance
|
|
982
|
+
</button>
|
|
983
|
+
</div>
|
|
984
|
+
</div>
|
|
985
|
+
</details>
|
|
986
|
+
</div>
|
|
987
|
+
|
|
988
|
+
<!-- SCANNER -->
|
|
989
|
+
<div id="tab-scanner" class="api-content">
|
|
990
|
+
<details class="api-section" open>
|
|
991
|
+
<summary>
|
|
992
|
+
Scanning
|
|
993
|
+
<code>DRT.scanner.scanning</code>
|
|
994
|
+
</summary>
|
|
995
|
+
<div class="section-body">
|
|
996
|
+
<div class="btn-row">
|
|
997
|
+
<button id="btn-strings">
|
|
998
|
+
Get App Strings
|
|
999
|
+
<span
|
|
1000
|
+
class="section-badge"
|
|
1001
|
+
style="margin-left: 0.35rem"
|
|
1002
|
+
>no auth</span
|
|
1003
|
+
>
|
|
1004
|
+
</button>
|
|
1005
|
+
</div>
|
|
1006
|
+
</div>
|
|
1007
|
+
</details>
|
|
1008
|
+
|
|
1009
|
+
<details class="api-section" open>
|
|
1010
|
+
<summary>
|
|
1011
|
+
Database
|
|
1012
|
+
<code>DRT.scanner.database</code>
|
|
1013
|
+
</summary>
|
|
1014
|
+
<div class="section-body">
|
|
1015
|
+
<div class="inline-row">
|
|
1016
|
+
<label>Show Code</label>
|
|
1017
|
+
<input
|
|
1018
|
+
type="text"
|
|
1019
|
+
id="scannerShowCode"
|
|
1020
|
+
placeholder="e.g., ABC123"
|
|
1021
|
+
/>
|
|
1022
|
+
</div>
|
|
1023
|
+
<div
|
|
1024
|
+
class="inline-row"
|
|
1025
|
+
style="margin-top: 0.4rem"
|
|
1026
|
+
>
|
|
1027
|
+
<label>Device</label>
|
|
1028
|
+
<input
|
|
1029
|
+
type="text"
|
|
1030
|
+
id="scannerDevice"
|
|
1031
|
+
value="test-device"
|
|
1032
|
+
/>
|
|
1033
|
+
<label>User</label>
|
|
1034
|
+
<input
|
|
1035
|
+
type="text"
|
|
1036
|
+
id="scannerUser"
|
|
1037
|
+
value="test-user"
|
|
1038
|
+
/>
|
|
1039
|
+
</div>
|
|
1040
|
+
<div class="btn-row">
|
|
1041
|
+
<button id="btn-scanner-db">
|
|
1042
|
+
Download Database
|
|
1043
|
+
</button>
|
|
1044
|
+
<button id="btn-scanner-query">
|
|
1045
|
+
Query Sections
|
|
1046
|
+
</button>
|
|
1047
|
+
</div>
|
|
1048
|
+
</div>
|
|
1049
|
+
</details>
|
|
1050
|
+
|
|
1051
|
+
<details class="api-section">
|
|
1052
|
+
<summary>
|
|
1053
|
+
Orders
|
|
1054
|
+
<code>DRT.scanner.orders</code>
|
|
1055
|
+
</summary>
|
|
1056
|
+
<div class="section-body">
|
|
1057
|
+
<div class="inline-row">
|
|
1058
|
+
<label>Phone</label>
|
|
1059
|
+
<input
|
|
1060
|
+
type="text"
|
|
1061
|
+
id="scannerPhone"
|
|
1062
|
+
placeholder="Phone number"
|
|
1063
|
+
/>
|
|
1064
|
+
<button id="btn-scanner-by-phone">
|
|
1065
|
+
Search
|
|
1066
|
+
</button>
|
|
1067
|
+
</div>
|
|
1068
|
+
<div
|
|
1069
|
+
class="inline-row"
|
|
1070
|
+
style="margin-top: 0.4rem"
|
|
1071
|
+
>
|
|
1072
|
+
<label>Name</label>
|
|
1073
|
+
<input
|
|
1074
|
+
type="text"
|
|
1075
|
+
id="scannerName"
|
|
1076
|
+
placeholder="Buyer name"
|
|
1077
|
+
/>
|
|
1078
|
+
<button id="btn-scanner-by-name">
|
|
1079
|
+
Search
|
|
1080
|
+
</button>
|
|
1081
|
+
</div>
|
|
1082
|
+
</div>
|
|
1083
|
+
</details>
|
|
1084
|
+
</div>
|
|
1085
|
+
</div>
|
|
1086
|
+
</div>
|
|
1087
|
+
|
|
1088
|
+
<!-- RIGHT PANEL: Output + Implementation tabs -->
|
|
1089
|
+
<div class="right-panel">
|
|
1090
|
+
<div class="panel-tabs">
|
|
1091
|
+
<button class="panel-tab active" data-panel="output">
|
|
1092
|
+
Output
|
|
1093
|
+
</button>
|
|
1094
|
+
<button class="panel-tab" data-panel="impl">
|
|
1095
|
+
Implementation
|
|
1096
|
+
</button>
|
|
1097
|
+
</div>
|
|
1098
|
+
|
|
1099
|
+
<div id="panel-output" class="panel-content active">
|
|
1100
|
+
<div id="status" class="success">
|
|
1101
|
+
SDK loaded — initialize with your credentials
|
|
1102
|
+
</div>
|
|
1103
|
+
<div id="output-container">
|
|
1104
|
+
<pre id="output">
|
|
1105
|
+
// Initialize the SDK, then click a button to test...
|
|
1106
|
+
|
|
1107
|
+
// Tip: window.DRT is available in the browser console.</pre
|
|
1108
|
+
>
|
|
1109
|
+
</div>
|
|
1110
|
+
</div>
|
|
1111
|
+
|
|
1112
|
+
<div id="panel-impl" class="panel-content">
|
|
1113
|
+
<div id="impl-panel">
|
|
1114
|
+
<h3>Install</h3>
|
|
1115
|
+
<p>
|
|
1116
|
+
The SDK is distributed on npm and works in browsers,
|
|
1117
|
+
Node, and bundlers.
|
|
1118
|
+
</p>
|
|
1119
|
+
<div class="code-block">
|
|
1120
|
+
<button class="copy-btn" data-copy="npm-install">
|
|
1121
|
+
Copy
|
|
1122
|
+
</button>
|
|
1123
|
+
<pre
|
|
1124
|
+
id="npm-install"
|
|
1125
|
+
><span class="com"># With npm</span>
|
|
1126
|
+
npm install @drttix/drt-sdk
|
|
1127
|
+
|
|
1128
|
+
<span class="com"># With yarn</span>
|
|
1129
|
+
yarn add @drttix/drt-sdk
|
|
1130
|
+
|
|
1131
|
+
<span class="com"># With pnpm</span>
|
|
1132
|
+
pnpm add @drttix/drt-sdk</pre>
|
|
1133
|
+
</div>
|
|
1134
|
+
|
|
1135
|
+
<h3>Browser (ES Modules)</h3>
|
|
1136
|
+
<p>
|
|
1137
|
+
Use the prebuilt bundle directly from a CDN or
|
|
1138
|
+
static host:
|
|
1139
|
+
</p>
|
|
1140
|
+
<div class="code-block">
|
|
1141
|
+
<button class="copy-btn" data-copy="browser-script">
|
|
1142
|
+
Copy
|
|
1143
|
+
</button>
|
|
1144
|
+
<pre
|
|
1145
|
+
id="browser-script"
|
|
1146
|
+
><span class="kw"><script</span> <span class="fn">type</span>=<span class="str">"module"</span><span class="kw">></span>
|
|
1147
|
+
<span class="kw">import</span> { DRT } <span class="kw">from</span> <span class="str">'https://cdn.drttix.com/public/sdk/latest/drt-sdk.js'</span>;
|
|
1148
|
+
|
|
1149
|
+
DRT.<span class="fn">init</span>({
|
|
1150
|
+
shopperGuid: <span class="str">'YOUR_SHOPPER_GUID'</span>,
|
|
1151
|
+
accountId: <span class="str">'YOUR_ACCOUNT_ID'</span>,
|
|
1152
|
+
apiKey: <span class="str">'YOUR_API_KEY'</span>,
|
|
1153
|
+
});
|
|
1154
|
+
|
|
1155
|
+
<span class="kw">const</span> events = <span class="kw">await</span> DRT.shopper.event.<span class="fn">getEvents</span>();
|
|
1156
|
+
<span class="fn">console</span>.log(events);
|
|
1157
|
+
<span class="kw"></script></span></pre>
|
|
1158
|
+
</div>
|
|
1159
|
+
|
|
1160
|
+
<h3>JavaScript / TypeScript</h3>
|
|
1161
|
+
<div class="code-block">
|
|
1162
|
+
<button class="copy-btn" data-copy="js-usage">
|
|
1163
|
+
Copy
|
|
1164
|
+
</button>
|
|
1165
|
+
<pre
|
|
1166
|
+
id="js-usage"
|
|
1167
|
+
><span class="kw">import</span> { DRT } <span class="kw">from</span> <span class="str">'@drttix/drt-sdk'</span>;
|
|
1168
|
+
|
|
1169
|
+
<span class="com">// 1. Initialize once at app startup</span>
|
|
1170
|
+
DRT.<span class="fn">init</span>({
|
|
1171
|
+
shopperGuid: <span class="str">'F1199DCD-BB45-4BD0-...'</span>,
|
|
1172
|
+
accountId: <span class="str">'508'</span>,
|
|
1173
|
+
apiKey: <span class="str">'your-api-key'</span>,
|
|
1174
|
+
});
|
|
1175
|
+
|
|
1176
|
+
<span class="com">// 2. Call any service — credentials are injected automatically</span>
|
|
1177
|
+
<span class="kw">const</span> events = <span class="kw">await</span> DRT.shopper.event.<span class="fn">getEvents</span>();
|
|
1178
|
+
<span class="kw">const</span> details = <span class="kw">await</span> DRT.shopper.event.<span class="fn">getEventById</span>(<span class="num">42075</span>);
|
|
1179
|
+
<span class="kw">const</span> cart = <span class="kw">await</span> DRT.shopper.cart.<span class="fn">getCart</span>();</pre>
|
|
1180
|
+
</div>
|
|
1181
|
+
|
|
1182
|
+
<h3>Creating a Shopper Session</h3>
|
|
1183
|
+
<p>
|
|
1184
|
+
If you don't have a shopperGuid yet, create one
|
|
1185
|
+
first:
|
|
1186
|
+
</p>
|
|
1187
|
+
<div class="code-block">
|
|
1188
|
+
<button class="copy-btn" data-copy="create-session">
|
|
1189
|
+
Copy
|
|
1190
|
+
</button>
|
|
1191
|
+
<pre
|
|
1192
|
+
id="create-session"
|
|
1193
|
+
><span class="kw">const</span> session = <span class="kw">await</span> DRT.shopper.session.<span class="fn">createSession</span>({
|
|
1194
|
+
studioId: <span class="num">508</span>,
|
|
1195
|
+
});
|
|
1196
|
+
|
|
1197
|
+
DRT.<span class="fn">init</span>({
|
|
1198
|
+
shopperGuid: session.shopperGuid,
|
|
1199
|
+
accountId: <span class="fn">String</span>(session.studioId),
|
|
1200
|
+
apiKey: <span class="str">'your-api-key'</span>,
|
|
1201
|
+
});</pre>
|
|
1202
|
+
</div>
|
|
1203
|
+
|
|
1204
|
+
<h3>Holding Seats</h3>
|
|
1205
|
+
<div class="code-block">
|
|
1206
|
+
<button class="copy-btn" data-copy="hold-seats">
|
|
1207
|
+
Copy
|
|
1208
|
+
</button>
|
|
1209
|
+
<pre
|
|
1210
|
+
id="hold-seats"
|
|
1211
|
+
><span class="com">// Reserved seat</span>
|
|
1212
|
+
<span class="kw">await</span> DRT.shopper.seat.<span class="fn">holdReservedSeat</span>({
|
|
1213
|
+
eventId: <span class="num">42075</span>,
|
|
1214
|
+
seatNum: <span class="num">101</span>,
|
|
1215
|
+
});
|
|
1216
|
+
|
|
1217
|
+
<span class="com">// General admission</span>
|
|
1218
|
+
<span class="kw">await</span> DRT.shopper.seat.<span class="fn">holdGaSeat</span>({
|
|
1219
|
+
eventId: <span class="num">42075</span>,
|
|
1220
|
+
tierId: <span class="num">1</span>,
|
|
1221
|
+
qty: <span class="num">2</span>,
|
|
1222
|
+
allOrNone: <span class="kw">true</span>,
|
|
1223
|
+
});
|
|
1224
|
+
|
|
1225
|
+
<span class="com">// Release a reserved seat</span>
|
|
1226
|
+
<span class="kw">await</span> DRT.shopper.seat.<span class="fn">releaseReservedSeat</span>({
|
|
1227
|
+
eventId: <span class="num">42075</span>,
|
|
1228
|
+
seatNum: <span class="num">101</span>,
|
|
1229
|
+
});
|
|
1230
|
+
|
|
1231
|
+
<span class="com">// Release GA seat</span>
|
|
1232
|
+
<span class="kw">await</span> DRT.shopper.seat.<span class="fn">releaseGaSeat</span>({
|
|
1233
|
+
eventId: <span class="num">42075</span>,
|
|
1234
|
+
tierId: <span class="num">1</span>,
|
|
1235
|
+
qty: <span class="num">1</span>,
|
|
1236
|
+
});</pre>
|
|
1237
|
+
</div>
|
|
1238
|
+
|
|
1239
|
+
<h3>Cart Management</h3>
|
|
1240
|
+
<div class="code-block">
|
|
1241
|
+
<button class="copy-btn" data-copy="cart-ex">
|
|
1242
|
+
Copy
|
|
1243
|
+
</button>
|
|
1244
|
+
<pre
|
|
1245
|
+
id="cart-ex"
|
|
1246
|
+
><span class="kw">const</span> { cart } = <span class="kw">await</span> DRT.shopper.cart.<span class="fn">getCart</span>();
|
|
1247
|
+
|
|
1248
|
+
<span class="com">// cart.seats, cart.products, cart.donations</span>
|
|
1249
|
+
<span class="kw">for</span> (<span class="kw">const</span> seat <span class="kw">of</span> cart.seats) {
|
|
1250
|
+
<span class="fn">console</span>.log(seat.tierName, seat.displayPrice);
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
<span class="com">// Clear entire cart</span>
|
|
1254
|
+
<span class="kw">await</span> DRT.shopper.cart.<span class="fn">deleteCart</span>();</pre>
|
|
1255
|
+
</div>
|
|
1256
|
+
|
|
1257
|
+
<h3>Error Handling</h3>
|
|
1258
|
+
<div class="code-block">
|
|
1259
|
+
<button class="copy-btn" data-copy="err-handling">
|
|
1260
|
+
Copy
|
|
1261
|
+
</button>
|
|
1262
|
+
<pre id="err-handling"><span class="kw">try</span> {
|
|
1263
|
+
<span class="kw">const</span> events = <span class="kw">await</span> DRT.shopper.event.<span class="fn">getEvents</span>();
|
|
1264
|
+
} <span class="kw">catch</span> (err) {
|
|
1265
|
+
<span class="com">// err.status = HTTP status (400, 404, 500, ...)</span>
|
|
1266
|
+
<span class="com">// err.body = API error payload (errorCode, message)</span>
|
|
1267
|
+
<span class="fn">console</span>.error(err.status, err.body);
|
|
1268
|
+
}</pre>
|
|
1269
|
+
</div>
|
|
1270
|
+
|
|
1271
|
+
<h3>Available Services</h3>
|
|
1272
|
+
<div class="code-block">
|
|
1273
|
+
<pre><span class="kw">DRT</span>.shopper.{ account, event, seat, cart, product,
|
|
1274
|
+
order, code, giftCard, session, ... }
|
|
1275
|
+
|
|
1276
|
+
<span class="kw">DRT</span>.scanner.{ scanning, database, orders }
|
|
1277
|
+
|
|
1278
|
+
<span class="kw">DRT</span>.portal .{ ... admin-only services }</pre>
|
|
1279
|
+
</div>
|
|
1280
|
+
|
|
1281
|
+
<h3>API Documentation (Swagger)</h3>
|
|
1282
|
+
<p>
|
|
1283
|
+
Interactive API docs for each service — open
|
|
1284
|
+
directly in the browser:
|
|
1285
|
+
</p>
|
|
1286
|
+
<div
|
|
1287
|
+
style="
|
|
1288
|
+
display: flex;
|
|
1289
|
+
flex-direction: column;
|
|
1290
|
+
gap: 0.4rem;
|
|
1291
|
+
margin: 0.5rem 0;
|
|
1292
|
+
"
|
|
1293
|
+
>
|
|
1294
|
+
<a
|
|
1295
|
+
href="https://api.drttix.com/shopper/docs"
|
|
1296
|
+
target="_blank"
|
|
1297
|
+
rel="noopener"
|
|
1298
|
+
style="
|
|
1299
|
+
display: flex;
|
|
1300
|
+
align-items: center;
|
|
1301
|
+
gap: 0.6rem;
|
|
1302
|
+
padding: 0.55rem 0.8rem;
|
|
1303
|
+
background: #11111b;
|
|
1304
|
+
border: 1px solid #313244;
|
|
1305
|
+
border-radius: 6px;
|
|
1306
|
+
color: #89b4fa;
|
|
1307
|
+
text-decoration: none;
|
|
1308
|
+
font-size: 0.85rem;
|
|
1309
|
+
font-family: inherit;
|
|
1310
|
+
"
|
|
1311
|
+
>
|
|
1312
|
+
<span style="font-size: 1rem">🛒</span>
|
|
1313
|
+
<span
|
|
1314
|
+
><strong>Shopper API</strong> —
|
|
1315
|
+
events, seats, cart, products,
|
|
1316
|
+
checkout</span
|
|
1317
|
+
>
|
|
1318
|
+
<span
|
|
1319
|
+
style="
|
|
1320
|
+
margin-left: auto;
|
|
1321
|
+
font-size: 0.7rem;
|
|
1322
|
+
color: #6c7086;
|
|
1323
|
+
"
|
|
1324
|
+
>api.drttix.com/shopper/docs</span
|
|
1325
|
+
>
|
|
1326
|
+
</a>
|
|
1327
|
+
<a
|
|
1328
|
+
href="https://api.drttix.com/scanner-v3/docs"
|
|
1329
|
+
target="_blank"
|
|
1330
|
+
rel="noopener"
|
|
1331
|
+
style="
|
|
1332
|
+
display: flex;
|
|
1333
|
+
align-items: center;
|
|
1334
|
+
gap: 0.6rem;
|
|
1335
|
+
padding: 0.55rem 0.8rem;
|
|
1336
|
+
background: #11111b;
|
|
1337
|
+
border: 1px solid #313244;
|
|
1338
|
+
border-radius: 6px;
|
|
1339
|
+
color: #89b4fa;
|
|
1340
|
+
text-decoration: none;
|
|
1341
|
+
font-size: 0.85rem;
|
|
1342
|
+
font-family: inherit;
|
|
1343
|
+
"
|
|
1344
|
+
>
|
|
1345
|
+
<span style="font-size: 1rem">📷</span>
|
|
1346
|
+
<span
|
|
1347
|
+
><strong>Scanner API</strong> —
|
|
1348
|
+
scanning, database, orders</span
|
|
1349
|
+
>
|
|
1350
|
+
<span
|
|
1351
|
+
style="
|
|
1352
|
+
margin-left: auto;
|
|
1353
|
+
font-size: 0.7rem;
|
|
1354
|
+
color: #6c7086;
|
|
1355
|
+
"
|
|
1356
|
+
>api.drttix.com/scanner-v3/docs</span
|
|
1357
|
+
>
|
|
1358
|
+
</a>
|
|
1359
|
+
<a
|
|
1360
|
+
href="https://api.drttix.com/admin-portal/docs"
|
|
1361
|
+
target="_blank"
|
|
1362
|
+
rel="noopener"
|
|
1363
|
+
style="
|
|
1364
|
+
display: flex;
|
|
1365
|
+
align-items: center;
|
|
1366
|
+
gap: 0.6rem;
|
|
1367
|
+
padding: 0.55rem 0.8rem;
|
|
1368
|
+
background: #11111b;
|
|
1369
|
+
border: 1px solid #313244;
|
|
1370
|
+
border-radius: 6px;
|
|
1371
|
+
color: #89b4fa;
|
|
1372
|
+
text-decoration: none;
|
|
1373
|
+
font-size: 0.85rem;
|
|
1374
|
+
font-family: inherit;
|
|
1375
|
+
"
|
|
1376
|
+
>
|
|
1377
|
+
<span style="font-size: 1rem"
|
|
1378
|
+
>⚙️</span
|
|
1379
|
+
>
|
|
1380
|
+
<span
|
|
1381
|
+
><strong>Portal API</strong> —
|
|
1382
|
+
admin-only services</span
|
|
1383
|
+
>
|
|
1384
|
+
<span
|
|
1385
|
+
style="
|
|
1386
|
+
margin-left: auto;
|
|
1387
|
+
font-size: 0.7rem;
|
|
1388
|
+
color: #6c7086;
|
|
1389
|
+
"
|
|
1390
|
+
>api.drttix.com/admin-portal/docs</span
|
|
1391
|
+
>
|
|
1392
|
+
</a>
|
|
1393
|
+
</div>
|
|
1394
|
+
|
|
1395
|
+
<div class="impl-note">
|
|
1396
|
+
<strong>Note:</strong> Once
|
|
1397
|
+
<code>DRT.init()</code> is called, the
|
|
1398
|
+
<code>shopperguid</code>, <code>accountid</code>,
|
|
1399
|
+
and <code>apikey</code> headers are automatically
|
|
1400
|
+
attached to every request — you don't need to
|
|
1401
|
+
pass them as function arguments.
|
|
1402
|
+
</div>
|
|
1403
|
+
</div>
|
|
1404
|
+
</div>
|
|
1405
|
+
</div>
|
|
1406
|
+
</div>
|
|
1407
|
+
|
|
1408
|
+
<script type="module">
|
|
1409
|
+
import { DRT } from '/public/sdk/latest/drt-sdk.js';
|
|
1410
|
+
|
|
1411
|
+
const out = document.getElementById('output');
|
|
1412
|
+
const status = document.getElementById('status');
|
|
1413
|
+
|
|
1414
|
+
// Expose DRT globally for console testing
|
|
1415
|
+
window.DRT = DRT;
|
|
1416
|
+
|
|
1417
|
+
// Display the real SDK version if available
|
|
1418
|
+
if (DRT.version) {
|
|
1419
|
+
document.getElementById('sdkVersionBadge').textContent =
|
|
1420
|
+
'v' + DRT.version;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
function setStatus(msg, isError = false) {
|
|
1424
|
+
status.textContent = msg;
|
|
1425
|
+
status.className = isError ? 'error' : 'success';
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
function setOutput(data) {
|
|
1429
|
+
out.textContent =
|
|
1430
|
+
typeof data === 'string'
|
|
1431
|
+
? data
|
|
1432
|
+
: JSON.stringify(data, null, 2);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
function requireInit() {
|
|
1436
|
+
if (!DRT.isReady()) {
|
|
1437
|
+
setStatus(
|
|
1438
|
+
'SDK not initialized! Fill credentials and click Initialize.',
|
|
1439
|
+
true,
|
|
1440
|
+
);
|
|
1441
|
+
return false;
|
|
1442
|
+
}
|
|
1443
|
+
return true;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
async function callApi(fn, description) {
|
|
1447
|
+
setStatus(`Fetching ${description}...`, false);
|
|
1448
|
+
try {
|
|
1449
|
+
const result = await fn();
|
|
1450
|
+
setStatus(`Success - ${description}`, false);
|
|
1451
|
+
setOutput(result);
|
|
1452
|
+
return result;
|
|
1453
|
+
} catch (err) {
|
|
1454
|
+
setStatus(`Error: ${err.message}`, true);
|
|
1455
|
+
setOutput({
|
|
1456
|
+
error: err.message,
|
|
1457
|
+
status: err.status,
|
|
1458
|
+
details: err.body || err.toString(),
|
|
1459
|
+
});
|
|
1460
|
+
console.error(err);
|
|
1461
|
+
return null;
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
/* ============ Right-panel tabs (Output / Implementation) ============ */
|
|
1466
|
+
document.querySelectorAll('.panel-tab').forEach((tab) => {
|
|
1467
|
+
tab.addEventListener('click', () => {
|
|
1468
|
+
document
|
|
1469
|
+
.querySelectorAll('.panel-tab')
|
|
1470
|
+
.forEach((t) => t.classList.remove('active'));
|
|
1471
|
+
document
|
|
1472
|
+
.querySelectorAll('.panel-content')
|
|
1473
|
+
.forEach((c) => c.classList.remove('active'));
|
|
1474
|
+
tab.classList.add('active');
|
|
1475
|
+
document
|
|
1476
|
+
.getElementById(`panel-${tab.dataset.panel}`)
|
|
1477
|
+
.classList.add('active');
|
|
1478
|
+
});
|
|
1479
|
+
});
|
|
1480
|
+
|
|
1481
|
+
/* ============ Copy-to-clipboard for impl code blocks ============ */
|
|
1482
|
+
document.querySelectorAll('.copy-btn').forEach((btn) => {
|
|
1483
|
+
btn.addEventListener('click', async () => {
|
|
1484
|
+
const id = btn.dataset.copy;
|
|
1485
|
+
const el = document.getElementById(id);
|
|
1486
|
+
if (!el) return;
|
|
1487
|
+
try {
|
|
1488
|
+
await navigator.clipboard.writeText(el.innerText);
|
|
1489
|
+
btn.textContent = 'Copied!';
|
|
1490
|
+
btn.classList.add('copied');
|
|
1491
|
+
setTimeout(() => {
|
|
1492
|
+
btn.textContent = 'Copy';
|
|
1493
|
+
btn.classList.remove('copied');
|
|
1494
|
+
}, 1500);
|
|
1495
|
+
} catch (e) {
|
|
1496
|
+
console.error(e);
|
|
1497
|
+
}
|
|
1498
|
+
});
|
|
1499
|
+
});
|
|
1500
|
+
|
|
1501
|
+
/* ============ API left-panel tabs (Shopper / Scanner) ============ */
|
|
1502
|
+
document.querySelectorAll('.api-tab').forEach((tab) => {
|
|
1503
|
+
tab.addEventListener('click', () => {
|
|
1504
|
+
document
|
|
1505
|
+
.querySelectorAll('.api-tab')
|
|
1506
|
+
.forEach((t) => t.classList.remove('active'));
|
|
1507
|
+
document
|
|
1508
|
+
.querySelectorAll('.api-content')
|
|
1509
|
+
.forEach((c) => c.classList.remove('active'));
|
|
1510
|
+
tab.classList.add('active');
|
|
1511
|
+
document
|
|
1512
|
+
.getElementById(`tab-${tab.dataset.tab}`)
|
|
1513
|
+
.classList.add('active');
|
|
1514
|
+
});
|
|
1515
|
+
});
|
|
1516
|
+
|
|
1517
|
+
/* ============ SDK Init / Reset ============ */
|
|
1518
|
+
document
|
|
1519
|
+
.getElementById('btn-init')
|
|
1520
|
+
.addEventListener('click', () => {
|
|
1521
|
+
const shopperGuid = document
|
|
1522
|
+
.getElementById('shopperGuid')
|
|
1523
|
+
.value.trim();
|
|
1524
|
+
const accountId = document
|
|
1525
|
+
.getElementById('accountId')
|
|
1526
|
+
.value.trim();
|
|
1527
|
+
const apiKey = document
|
|
1528
|
+
.getElementById('apiKey')
|
|
1529
|
+
.value.trim();
|
|
1530
|
+
|
|
1531
|
+
if (!shopperGuid || !accountId || !apiKey) {
|
|
1532
|
+
setStatus('Please fill in all fields', true);
|
|
1533
|
+
return;
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
try {
|
|
1537
|
+
DRT.init({ shopperGuid, accountId, apiKey });
|
|
1538
|
+
setStatus('SDK initialized successfully', false);
|
|
1539
|
+
setOutput({
|
|
1540
|
+
message: 'SDK initialized',
|
|
1541
|
+
config: { shopperGuid, accountId, apiKey: '***' },
|
|
1542
|
+
});
|
|
1543
|
+
} catch (err) {
|
|
1544
|
+
setStatus('Init failed: ' + err.message, true);
|
|
1545
|
+
setOutput({ error: err.message });
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
|
|
1549
|
+
document
|
|
1550
|
+
.getElementById('btn-check-sdk')
|
|
1551
|
+
.addEventListener('click', () => {
|
|
1552
|
+
setStatus('SDK Status', false);
|
|
1553
|
+
const config = DRT.getConfig();
|
|
1554
|
+
setOutput({
|
|
1555
|
+
isReady: DRT.isReady(),
|
|
1556
|
+
config: config
|
|
1557
|
+
? {
|
|
1558
|
+
shopperGuid: config.shopperGuid,
|
|
1559
|
+
accountId: config.accountId,
|
|
1560
|
+
apiKey: '***',
|
|
1561
|
+
}
|
|
1562
|
+
: null,
|
|
1563
|
+
availableServices: {
|
|
1564
|
+
shopper: Object.keys(DRT.shopper),
|
|
1565
|
+
scanner: Object.keys(DRT.scanner),
|
|
1566
|
+
portal: Object.keys(DRT.portal || {}),
|
|
1567
|
+
},
|
|
1568
|
+
});
|
|
1569
|
+
});
|
|
1570
|
+
|
|
1571
|
+
document
|
|
1572
|
+
.getElementById('btn-reset')
|
|
1573
|
+
.addEventListener('click', () => {
|
|
1574
|
+
DRT.reset();
|
|
1575
|
+
setStatus('SDK has been reset', false);
|
|
1576
|
+
setOutput({
|
|
1577
|
+
message: 'SDK has been reset. Initialize again to use.',
|
|
1578
|
+
});
|
|
1579
|
+
});
|
|
1580
|
+
|
|
1581
|
+
/* ============ Create Shopper Session ============ */
|
|
1582
|
+
document
|
|
1583
|
+
.getElementById('btn-create-shopper')
|
|
1584
|
+
.addEventListener('click', async () => {
|
|
1585
|
+
const studioId = parseInt(
|
|
1586
|
+
document.getElementById('createStudioId').value,
|
|
1587
|
+
);
|
|
1588
|
+
const apiKey = document
|
|
1589
|
+
.getElementById('createApiKey')
|
|
1590
|
+
.value.trim();
|
|
1591
|
+
if (!studioId || !apiKey) {
|
|
1592
|
+
setStatus(
|
|
1593
|
+
'Please enter both Studio ID and API Key',
|
|
1594
|
+
true,
|
|
1595
|
+
);
|
|
1596
|
+
return;
|
|
1597
|
+
}
|
|
1598
|
+
setStatus('Creating shopper session...', false);
|
|
1599
|
+
try {
|
|
1600
|
+
const result = await DRT.shopper.session.createSession({
|
|
1601
|
+
studioId,
|
|
1602
|
+
});
|
|
1603
|
+
setOutput(result);
|
|
1604
|
+
|
|
1605
|
+
// Populate credential fields and auto-init
|
|
1606
|
+
document.getElementById('shopperGuid').value =
|
|
1607
|
+
result.shopperGuid;
|
|
1608
|
+
document.getElementById('accountId').value =
|
|
1609
|
+
result.studioId;
|
|
1610
|
+
document.getElementById('apiKey').value = apiKey;
|
|
1611
|
+
DRT.init({
|
|
1612
|
+
shopperGuid: result.shopperGuid,
|
|
1613
|
+
accountId: String(result.studioId),
|
|
1614
|
+
apiKey,
|
|
1615
|
+
});
|
|
1616
|
+
setStatus(
|
|
1617
|
+
'Shopper created and SDK initialized!',
|
|
1618
|
+
false,
|
|
1619
|
+
);
|
|
1620
|
+
} catch (err) {
|
|
1621
|
+
setStatus(`Error: ${err.message}`, true);
|
|
1622
|
+
setOutput({
|
|
1623
|
+
error: err.message,
|
|
1624
|
+
details: err.body || err.toString(),
|
|
1625
|
+
});
|
|
1626
|
+
}
|
|
1627
|
+
});
|
|
1628
|
+
|
|
1629
|
+
/* ============ SHOPPER - Account ============ */
|
|
1630
|
+
document
|
|
1631
|
+
.getElementById('btn-theme')
|
|
1632
|
+
.addEventListener('click', () => {
|
|
1633
|
+
if (!requireInit()) return;
|
|
1634
|
+
callApi(() => DRT.shopper.account.getTheme(), 'theme');
|
|
1635
|
+
});
|
|
1636
|
+
document
|
|
1637
|
+
.getElementById('btn-disposition')
|
|
1638
|
+
.addEventListener('click', () => {
|
|
1639
|
+
if (!requireInit()) return;
|
|
1640
|
+
callApi(
|
|
1641
|
+
() => DRT.shopper.account.getDisposition(),
|
|
1642
|
+
'disposition',
|
|
1643
|
+
);
|
|
1644
|
+
});
|
|
1645
|
+
document
|
|
1646
|
+
.getElementById('btn-root')
|
|
1647
|
+
.addEventListener('click', () => {
|
|
1648
|
+
if (!requireInit()) return;
|
|
1649
|
+
callApi(() => DRT.shopper.account.getRoot(), 'root config');
|
|
1650
|
+
});
|
|
1651
|
+
document
|
|
1652
|
+
.getElementById('btn-landing')
|
|
1653
|
+
.addEventListener('click', () => {
|
|
1654
|
+
if (!requireInit()) return;
|
|
1655
|
+
callApi(
|
|
1656
|
+
() => DRT.shopper.account.getLandingPage(),
|
|
1657
|
+
'landing page',
|
|
1658
|
+
);
|
|
1659
|
+
});
|
|
1660
|
+
|
|
1661
|
+
/* ============ SHOPPER - Events ============ */
|
|
1662
|
+
document
|
|
1663
|
+
.getElementById('btn-events')
|
|
1664
|
+
.addEventListener('click', async () => {
|
|
1665
|
+
if (!requireInit()) return;
|
|
1666
|
+
setStatus('Fetching events...', false);
|
|
1667
|
+
try {
|
|
1668
|
+
const result = await DRT.shopper.event.getEvents();
|
|
1669
|
+
const select = document.getElementById('eventSelect');
|
|
1670
|
+
select.innerHTML =
|
|
1671
|
+
'<option value="">-- Select an event --</option>';
|
|
1672
|
+
const events = result.events || result || [];
|
|
1673
|
+
events.forEach((ev) => {
|
|
1674
|
+
const opt = document.createElement('option');
|
|
1675
|
+
opt.value = ev.eventId || ev.id;
|
|
1676
|
+
opt.textContent = `${ev.eventId || ev.id}: ${ev.eventName || ev.name || 'Unnamed'}`;
|
|
1677
|
+
select.appendChild(opt);
|
|
1678
|
+
});
|
|
1679
|
+
const summary = events.map((e) => ({
|
|
1680
|
+
id: e.eventId || e.id,
|
|
1681
|
+
name: e.eventName || e.name || 'Unnamed',
|
|
1682
|
+
date: e.eventDate || e.date || '',
|
|
1683
|
+
venue: e.venueName || e.venue || '',
|
|
1684
|
+
}));
|
|
1685
|
+
setStatus(`Loaded ${events.length} events`, false);
|
|
1686
|
+
setOutput({
|
|
1687
|
+
eventCount: events.length,
|
|
1688
|
+
events: summary,
|
|
1689
|
+
});
|
|
1690
|
+
} catch (err) {
|
|
1691
|
+
setStatus(`Error: ${err.message}`, true);
|
|
1692
|
+
setOutput({
|
|
1693
|
+
error: err.message,
|
|
1694
|
+
details: err.body || err.toString(),
|
|
1695
|
+
});
|
|
1696
|
+
}
|
|
1697
|
+
});
|
|
1698
|
+
|
|
1699
|
+
document
|
|
1700
|
+
.getElementById('btn-event-details')
|
|
1701
|
+
.addEventListener('click', async () => {
|
|
1702
|
+
if (!requireInit()) return;
|
|
1703
|
+
const id = parseInt(
|
|
1704
|
+
document.getElementById('eventSelect').value,
|
|
1705
|
+
);
|
|
1706
|
+
if (!id) {
|
|
1707
|
+
setStatus('Please select an event', true);
|
|
1708
|
+
return;
|
|
1709
|
+
}
|
|
1710
|
+
setStatus(`Fetching event ${id} details...`, false);
|
|
1711
|
+
try {
|
|
1712
|
+
const result = await DRT.shopper.event.getEventById(id);
|
|
1713
|
+
const sections = result.sections || [];
|
|
1714
|
+
const tiers = result.tiers || [];
|
|
1715
|
+
const isGA =
|
|
1716
|
+
result.event && result.event.isGeneralSeating === 1;
|
|
1717
|
+
|
|
1718
|
+
const seatSection =
|
|
1719
|
+
document.getElementById('section-seats');
|
|
1720
|
+
seatSection.classList.remove('hidden-section');
|
|
1721
|
+
seatSection.open = true;
|
|
1722
|
+
|
|
1723
|
+
const infoEl =
|
|
1724
|
+
document.getElementById('seat-type-info');
|
|
1725
|
+
const gaControls =
|
|
1726
|
+
document.getElementById('seat-ga-controls');
|
|
1727
|
+
const baControls =
|
|
1728
|
+
document.getElementById('seat-ba-controls');
|
|
1729
|
+
const seatBadge = document.getElementById('seat-badge');
|
|
1730
|
+
|
|
1731
|
+
if (isGA) {
|
|
1732
|
+
infoEl.textContent = `General Admission - ${tiers.length} tier(s), ${sections.length} section(s)`;
|
|
1733
|
+
infoEl.className = 'info-banner ga';
|
|
1734
|
+
gaControls.style.display = 'block';
|
|
1735
|
+
baControls.style.display = 'none';
|
|
1736
|
+
seatBadge.textContent = 'GA';
|
|
1737
|
+
seatBadge.className = 'section-badge badge-ga';
|
|
1738
|
+
const tierSel =
|
|
1739
|
+
document.getElementById('tierSelect');
|
|
1740
|
+
tierSel.innerHTML = '';
|
|
1741
|
+
tiers.forEach((t) => {
|
|
1742
|
+
const opt = document.createElement('option');
|
|
1743
|
+
opt.value = t.id;
|
|
1744
|
+
opt.textContent = `${t.name} - $${t.price} (id: ${t.id})`;
|
|
1745
|
+
tierSel.appendChild(opt);
|
|
1746
|
+
});
|
|
1747
|
+
} else {
|
|
1748
|
+
infoEl.textContent = `Reserved Seating - ${sections.length} section(s), ${tiers.length} tier(s)`;
|
|
1749
|
+
infoEl.className = 'info-banner reserved';
|
|
1750
|
+
gaControls.style.display = 'none';
|
|
1751
|
+
baControls.style.display = 'block';
|
|
1752
|
+
seatBadge.textContent = 'Reserved';
|
|
1753
|
+
seatBadge.className =
|
|
1754
|
+
'section-badge badge-reserved';
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
const tierSection = document.getElementById(
|
|
1758
|
+
'section-update-tier',
|
|
1759
|
+
);
|
|
1760
|
+
if (tiers.length > 0) {
|
|
1761
|
+
tierSection.classList.remove('hidden-section');
|
|
1762
|
+
const tb = document.getElementById('tier-badge');
|
|
1763
|
+
tb.textContent = `${tiers.length} tier(s)`;
|
|
1764
|
+
tb.className = 'section-badge badge-count';
|
|
1765
|
+
const sel =
|
|
1766
|
+
document.getElementById('updateTierSelect');
|
|
1767
|
+
sel.innerHTML = '';
|
|
1768
|
+
tiers.forEach((t) => {
|
|
1769
|
+
const opt = document.createElement('option');
|
|
1770
|
+
opt.value = t.id;
|
|
1771
|
+
opt.textContent = `${t.name} - $${t.price} (id: ${t.id})`;
|
|
1772
|
+
sel.appendChild(opt);
|
|
1773
|
+
});
|
|
1774
|
+
} else {
|
|
1775
|
+
tierSection.classList.add('hidden-section');
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
document
|
|
1779
|
+
.getElementById('section-products')
|
|
1780
|
+
.classList.remove('hidden-section');
|
|
1781
|
+
document.getElementById('product-badge').textContent =
|
|
1782
|
+
'Ready';
|
|
1783
|
+
document.getElementById('product-badge').className =
|
|
1784
|
+
'section-badge badge-ready';
|
|
1785
|
+
|
|
1786
|
+
const sectionRules = result.sectionRules || [];
|
|
1787
|
+
setStatus('Success', false);
|
|
1788
|
+
setOutput({
|
|
1789
|
+
event: {
|
|
1790
|
+
id: result.event?.id,
|
|
1791
|
+
name: result.event?.name,
|
|
1792
|
+
title: result.event?.title,
|
|
1793
|
+
isGeneralSeating:
|
|
1794
|
+
result.event?.isGeneralSeating,
|
|
1795
|
+
statusId: result.event?.statusId,
|
|
1796
|
+
},
|
|
1797
|
+
sections: sections.map((s) => ({
|
|
1798
|
+
id: s.id,
|
|
1799
|
+
name: s.name,
|
|
1800
|
+
isGA: s.is_general_seating,
|
|
1801
|
+
gaCapacity: s.ga_capacity,
|
|
1802
|
+
})),
|
|
1803
|
+
sectionRules: sectionRules.map((r) => ({
|
|
1804
|
+
section: r.section,
|
|
1805
|
+
sectionId: r.section_id,
|
|
1806
|
+
rowLow: r.row_low,
|
|
1807
|
+
rowHigh: r.row_high,
|
|
1808
|
+
seatLow: r.seat_low,
|
|
1809
|
+
seatHigh: r.seat_high,
|
|
1810
|
+
})),
|
|
1811
|
+
tiers: tiers.map((t) => ({
|
|
1812
|
+
id: t.id,
|
|
1813
|
+
name: t.name,
|
|
1814
|
+
price: t.price,
|
|
1815
|
+
sectionId: t.section_id,
|
|
1816
|
+
})),
|
|
1817
|
+
});
|
|
1818
|
+
} catch (err) {
|
|
1819
|
+
setStatus(`Error: ${err.message}`, true);
|
|
1820
|
+
setOutput({
|
|
1821
|
+
error: err.message,
|
|
1822
|
+
details: err.body || err.toString(),
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1825
|
+
});
|
|
1826
|
+
|
|
1827
|
+
/* ============ SHOPPER - Seats ============ */
|
|
1828
|
+
document
|
|
1829
|
+
.getElementById('btn-hold-ga')
|
|
1830
|
+
.addEventListener('click', async () => {
|
|
1831
|
+
if (!requireInit()) return;
|
|
1832
|
+
const eventId = parseInt(
|
|
1833
|
+
document.getElementById('eventSelect').value,
|
|
1834
|
+
);
|
|
1835
|
+
const tierId = parseInt(
|
|
1836
|
+
document.getElementById('tierSelect').value,
|
|
1837
|
+
);
|
|
1838
|
+
const qty =
|
|
1839
|
+
parseInt(document.getElementById('gaQty').value) || 1;
|
|
1840
|
+
if (!eventId || !tierId) {
|
|
1841
|
+
setStatus('Select event + tier first', true);
|
|
1842
|
+
return;
|
|
1843
|
+
}
|
|
1844
|
+
const result = await callApi(
|
|
1845
|
+
() =>
|
|
1846
|
+
DRT.shopper.seat.holdGaSeat({
|
|
1847
|
+
eventId,
|
|
1848
|
+
allOrNone: true,
|
|
1849
|
+
tierId,
|
|
1850
|
+
qty,
|
|
1851
|
+
}),
|
|
1852
|
+
`hold ${qty} GA seat(s) for event ${eventId}`,
|
|
1853
|
+
);
|
|
1854
|
+
if (result) silentRefreshCart();
|
|
1855
|
+
});
|
|
1856
|
+
|
|
1857
|
+
document
|
|
1858
|
+
.getElementById('btn-hold-reserved')
|
|
1859
|
+
.addEventListener('click', async () => {
|
|
1860
|
+
if (!requireInit()) return;
|
|
1861
|
+
const eventId = parseInt(
|
|
1862
|
+
document.getElementById('eventSelect').value,
|
|
1863
|
+
);
|
|
1864
|
+
const seatNum = parseInt(
|
|
1865
|
+
document.getElementById('reservedSeatNum').value,
|
|
1866
|
+
);
|
|
1867
|
+
if (!eventId || !seatNum) {
|
|
1868
|
+
setStatus('Select event + enter seat number', true);
|
|
1869
|
+
return;
|
|
1870
|
+
}
|
|
1871
|
+
const result = await callApi(
|
|
1872
|
+
() =>
|
|
1873
|
+
DRT.shopper.seat.holdReservedSeat({
|
|
1874
|
+
eventId,
|
|
1875
|
+
seatNum,
|
|
1876
|
+
}),
|
|
1877
|
+
`hold reserved seat #${seatNum}`,
|
|
1878
|
+
);
|
|
1879
|
+
if (result) silentRefreshCart();
|
|
1880
|
+
});
|
|
1881
|
+
|
|
1882
|
+
document
|
|
1883
|
+
.getElementById('btn-update-tier')
|
|
1884
|
+
.addEventListener('click', () => {
|
|
1885
|
+
if (!requireInit()) return;
|
|
1886
|
+
const eventId = parseInt(
|
|
1887
|
+
document.getElementById('eventSelect').value,
|
|
1888
|
+
);
|
|
1889
|
+
const seatNum = parseInt(
|
|
1890
|
+
document.getElementById('updateTierSeatNum').value,
|
|
1891
|
+
);
|
|
1892
|
+
const tierId = parseInt(
|
|
1893
|
+
document.getElementById('updateTierSelect').value,
|
|
1894
|
+
);
|
|
1895
|
+
if (!eventId || !seatNum || !tierId) {
|
|
1896
|
+
setStatus('Missing fields for tier update', true);
|
|
1897
|
+
return;
|
|
1898
|
+
}
|
|
1899
|
+
callApi(
|
|
1900
|
+
() =>
|
|
1901
|
+
DRT.shopper.seat.updateTier({
|
|
1902
|
+
eventId,
|
|
1903
|
+
seatNum,
|
|
1904
|
+
tierId,
|
|
1905
|
+
}),
|
|
1906
|
+
`update seat #${seatNum} to tier ${tierId}`,
|
|
1907
|
+
).then((r) => r && silentRefreshCart());
|
|
1908
|
+
});
|
|
1909
|
+
|
|
1910
|
+
/* ============ SHOPPER - Products ============ */
|
|
1911
|
+
document
|
|
1912
|
+
.getElementById('btn-get-products')
|
|
1913
|
+
.addEventListener('click', () => {
|
|
1914
|
+
if (!requireInit()) return;
|
|
1915
|
+
callApi(
|
|
1916
|
+
() => DRT.shopper.product.getProducts(),
|
|
1917
|
+
'products',
|
|
1918
|
+
);
|
|
1919
|
+
});
|
|
1920
|
+
|
|
1921
|
+
document
|
|
1922
|
+
.getElementById('btn-add-product')
|
|
1923
|
+
.addEventListener('click', async () => {
|
|
1924
|
+
if (!requireInit()) return;
|
|
1925
|
+
const id = parseInt(
|
|
1926
|
+
document.getElementById('productId').value,
|
|
1927
|
+
);
|
|
1928
|
+
const hash = document
|
|
1929
|
+
.getElementById('productHash')
|
|
1930
|
+
.value.trim();
|
|
1931
|
+
const variantId =
|
|
1932
|
+
parseInt(
|
|
1933
|
+
document.getElementById('productVariant').value,
|
|
1934
|
+
) || 0;
|
|
1935
|
+
const quantity =
|
|
1936
|
+
parseInt(document.getElementById('productQty').value) ||
|
|
1937
|
+
1;
|
|
1938
|
+
if (!id || !hash) {
|
|
1939
|
+
setStatus(
|
|
1940
|
+
'Enter Product ID and Hash (from Get Products)',
|
|
1941
|
+
true,
|
|
1942
|
+
);
|
|
1943
|
+
return;
|
|
1944
|
+
}
|
|
1945
|
+
const result = await callApi(
|
|
1946
|
+
() =>
|
|
1947
|
+
DRT.shopper.product.addProduct({
|
|
1948
|
+
id,
|
|
1949
|
+
hash,
|
|
1950
|
+
text: '',
|
|
1951
|
+
quantity,
|
|
1952
|
+
variantId,
|
|
1953
|
+
}),
|
|
1954
|
+
`add product ${id}`,
|
|
1955
|
+
);
|
|
1956
|
+
if (result) silentRefreshCart();
|
|
1957
|
+
});
|
|
1958
|
+
|
|
1959
|
+
/* ============ SHOPPER - Cart (with per-item remove) ============ */
|
|
1960
|
+
async function refreshCart() {
|
|
1961
|
+
if (!DRT.isReady()) return;
|
|
1962
|
+
try {
|
|
1963
|
+
const result = await DRT.shopper.cart.getCart();
|
|
1964
|
+
renderCart(result);
|
|
1965
|
+
setOutput(result);
|
|
1966
|
+
setStatus('Cart refreshed', false);
|
|
1967
|
+
} catch (err) {
|
|
1968
|
+
setStatus(`Error: ${err.message}`, true);
|
|
1969
|
+
setOutput({
|
|
1970
|
+
error: err.message,
|
|
1971
|
+
details: err.body || err.toString(),
|
|
1972
|
+
});
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
// Silently update only the cart widget without touching the output panel.
|
|
1977
|
+
// Used after hold/add/remove so the action result stays visible.
|
|
1978
|
+
async function silentRefreshCart(delayMs = 300) {
|
|
1979
|
+
if (!DRT.isReady()) return;
|
|
1980
|
+
await new Promise((r) => setTimeout(r, delayMs));
|
|
1981
|
+
try {
|
|
1982
|
+
const result = await DRT.shopper.cart.getCart();
|
|
1983
|
+
renderCart(result);
|
|
1984
|
+
} catch (_) {
|
|
1985
|
+
// silent — don't overwrite current output on background refresh failure
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
function renderCart(cartResponse) {
|
|
1990
|
+
const container = document.getElementById('cart-display');
|
|
1991
|
+
const cart = cartResponse?.cart || cartResponse || {};
|
|
1992
|
+
const seats = cart.seats || [];
|
|
1993
|
+
const products = cart.products || [];
|
|
1994
|
+
const donations = cart.donations || [];
|
|
1995
|
+
container.innerHTML = '';
|
|
1996
|
+
|
|
1997
|
+
const totalItems =
|
|
1998
|
+
seats.length + products.length + donations.length;
|
|
1999
|
+
const cartBadge = document.getElementById('cart-badge');
|
|
2000
|
+
if (totalItems === 0) {
|
|
2001
|
+
cartBadge.textContent = 'empty';
|
|
2002
|
+
cartBadge.className = 'section-badge';
|
|
2003
|
+
container.innerHTML =
|
|
2004
|
+
'<div class="empty-cart">Cart is empty</div>';
|
|
2005
|
+
return;
|
|
2006
|
+
}
|
|
2007
|
+
cartBadge.textContent = `${totalItems} item${totalItems !== 1 ? 's' : ''}`;
|
|
2008
|
+
cartBadge.className = 'section-badge badge-count';
|
|
2009
|
+
|
|
2010
|
+
let total = 0;
|
|
2011
|
+
|
|
2012
|
+
seats.forEach((s, idx) => {
|
|
2013
|
+
total += s.displayPrice || s.price || 0;
|
|
2014
|
+
const row = document.createElement('div');
|
|
2015
|
+
row.className = 'cart-item';
|
|
2016
|
+
const seatLabel = s.isGeneralSeating
|
|
2017
|
+
? `GA - ${s.tierName || 'General'}`
|
|
2018
|
+
: `${s.section || ''} ${s.row ? 'Row ' + s.row : ''} Seat ${s.seat || s.num}`;
|
|
2019
|
+
row.innerHTML = `
|
|
2020
|
+
<div class="cart-item-icon seat">${s.isGeneralSeating ? 'GA' : 'S'}</div>
|
|
2021
|
+
<div class="cart-item-body">
|
|
2022
|
+
<div class="cart-item-title">${escapeHtml(s.shortName || 'Event')}</div>
|
|
2023
|
+
<div class="cart-item-subtitle">${escapeHtml(seatLabel)}${s.tierName ? ' - ' + escapeHtml(s.tierName) : ''}</div>
|
|
2024
|
+
</div>
|
|
2025
|
+
<div class="cart-item-price">$${(s.displayPrice ?? s.price ?? 0).toFixed(2)}</div>
|
|
2026
|
+
<button class="small danger" data-remove-seat="${idx}">Remove</button>
|
|
2027
|
+
`;
|
|
2028
|
+
row.querySelector('[data-remove-seat]').addEventListener(
|
|
2029
|
+
'click',
|
|
2030
|
+
() => removeSeatFromCart(s),
|
|
2031
|
+
);
|
|
2032
|
+
container.appendChild(row);
|
|
2033
|
+
});
|
|
2034
|
+
|
|
2035
|
+
products.forEach((p) => {
|
|
2036
|
+
total += (p.price || 0) * (p.qty || 1);
|
|
2037
|
+
const row = document.createElement('div');
|
|
2038
|
+
row.className = 'cart-item';
|
|
2039
|
+
row.innerHTML = `
|
|
2040
|
+
<div class="cart-item-icon product">P</div>
|
|
2041
|
+
<div class="cart-item-body">
|
|
2042
|
+
<div class="cart-item-title">${escapeHtml(p.name || 'Product')}${p.variantName ? ' - ' + escapeHtml(p.variantName) : ''}</div>
|
|
2043
|
+
<div class="cart-item-subtitle">Qty: ${p.qty} - id: ${p.productId}</div>
|
|
2044
|
+
</div>
|
|
2045
|
+
<div class="cart-item-price">$${((p.price || 0) * (p.qty || 1)).toFixed(2)}</div>
|
|
2046
|
+
<button class="small danger" data-remove-product>Remove</button>
|
|
2047
|
+
`;
|
|
2048
|
+
row.querySelector('[data-remove-product]').addEventListener(
|
|
2049
|
+
'click',
|
|
2050
|
+
() => removeProductFromCart(p),
|
|
2051
|
+
);
|
|
2052
|
+
container.appendChild(row);
|
|
2053
|
+
});
|
|
2054
|
+
|
|
2055
|
+
donations.forEach((d) => {
|
|
2056
|
+
total += d.amount || 0;
|
|
2057
|
+
const row = document.createElement('div');
|
|
2058
|
+
row.className = 'cart-item';
|
|
2059
|
+
row.innerHTML = `
|
|
2060
|
+
<div class="cart-item-icon donation">D</div>
|
|
2061
|
+
<div class="cart-item-body">
|
|
2062
|
+
<div class="cart-item-title">${escapeHtml(d.name || 'Donation')}</div>
|
|
2063
|
+
<div class="cart-item-subtitle">Fund id: ${d.id}</div>
|
|
2064
|
+
</div>
|
|
2065
|
+
<div class="cart-item-price">$${(d.amount || 0).toFixed(2)}</div>
|
|
2066
|
+
`;
|
|
2067
|
+
container.appendChild(row);
|
|
2068
|
+
});
|
|
2069
|
+
|
|
2070
|
+
const sum = document.createElement('div');
|
|
2071
|
+
sum.className = 'cart-summary';
|
|
2072
|
+
sum.innerHTML = `<span>Subtotal</span><span>$${total.toFixed(2)}</span>`;
|
|
2073
|
+
container.appendChild(sum);
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
function escapeHtml(s) {
|
|
2077
|
+
return String(s ?? '').replace(
|
|
2078
|
+
/[&<>"']/g,
|
|
2079
|
+
(c) =>
|
|
2080
|
+
({
|
|
2081
|
+
'&': '&',
|
|
2082
|
+
'<': '<',
|
|
2083
|
+
'>': '>',
|
|
2084
|
+
'"': '"',
|
|
2085
|
+
"'": ''',
|
|
2086
|
+
})[c],
|
|
2087
|
+
);
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
async function removeSeatFromCart(seat) {
|
|
2091
|
+
if (!requireInit()) return;
|
|
2092
|
+
const eventId = seat.showId;
|
|
2093
|
+
if (seat.isGeneralSeating) {
|
|
2094
|
+
const qty = 1;
|
|
2095
|
+
const tierId = seat.tierId;
|
|
2096
|
+
const ok = await callApi(
|
|
2097
|
+
() =>
|
|
2098
|
+
DRT.shopper.seat.releaseGaSeat({
|
|
2099
|
+
eventId,
|
|
2100
|
+
tierId,
|
|
2101
|
+
qty,
|
|
2102
|
+
}),
|
|
2103
|
+
`release GA seat (tier ${tierId})`,
|
|
2104
|
+
);
|
|
2105
|
+
if (ok !== null) silentRefreshCart();
|
|
2106
|
+
} else {
|
|
2107
|
+
const seatNum = seat.num;
|
|
2108
|
+
const ok = await callApi(
|
|
2109
|
+
() =>
|
|
2110
|
+
DRT.shopper.seat.releaseReservedSeat({
|
|
2111
|
+
eventId,
|
|
2112
|
+
seatNum,
|
|
2113
|
+
}),
|
|
2114
|
+
`release reserved seat #${seatNum}`,
|
|
2115
|
+
);
|
|
2116
|
+
if (ok !== null) silentRefreshCart();
|
|
2117
|
+
}
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
async function removeProductFromCart(product) {
|
|
2121
|
+
if (!requireInit()) return;
|
|
2122
|
+
const ok = await callApi(
|
|
2123
|
+
() =>
|
|
2124
|
+
DRT.shopper.product.deleteProduct({
|
|
2125
|
+
id: product.productId,
|
|
2126
|
+
hash: product.guid || '',
|
|
2127
|
+
text: product.text || '',
|
|
2128
|
+
variantId: product.variantId || 0,
|
|
2129
|
+
}),
|
|
2130
|
+
`remove product ${product.productId}`,
|
|
2131
|
+
);
|
|
2132
|
+
if (ok !== null) silentRefreshCart();
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
document
|
|
2136
|
+
.getElementById('btn-cart')
|
|
2137
|
+
.addEventListener('click', refreshCart);
|
|
2138
|
+
|
|
2139
|
+
document
|
|
2140
|
+
.getElementById('btn-delete-cart')
|
|
2141
|
+
.addEventListener('click', async () => {
|
|
2142
|
+
if (!requireInit()) return;
|
|
2143
|
+
if (!confirm('Delete the entire cart?')) return;
|
|
2144
|
+
await callApi(
|
|
2145
|
+
() => DRT.shopper.cart.deleteCart(),
|
|
2146
|
+
'delete cart',
|
|
2147
|
+
);
|
|
2148
|
+
refreshCart();
|
|
2149
|
+
});
|
|
2150
|
+
|
|
2151
|
+
/* ============ SHOPPER - Orders / Codes / Gift Cards ============ */
|
|
2152
|
+
document
|
|
2153
|
+
.getElementById('btn-receipt')
|
|
2154
|
+
.addEventListener('click', () => {
|
|
2155
|
+
if (!requireInit()) return;
|
|
2156
|
+
const guid = document
|
|
2157
|
+
.getElementById('orderGuid')
|
|
2158
|
+
.value.trim();
|
|
2159
|
+
if (!guid) {
|
|
2160
|
+
setStatus('Enter an Order GUID', true);
|
|
2161
|
+
return;
|
|
2162
|
+
}
|
|
2163
|
+
callApi(
|
|
2164
|
+
() => DRT.shopper.order.getReceipt(guid),
|
|
2165
|
+
'receipt',
|
|
2166
|
+
);
|
|
2167
|
+
});
|
|
2168
|
+
|
|
2169
|
+
document
|
|
2170
|
+
.getElementById('btn-validate-code')
|
|
2171
|
+
.addEventListener('click', () => {
|
|
2172
|
+
if (!requireInit()) return;
|
|
2173
|
+
const code = document
|
|
2174
|
+
.getElementById('promoCode')
|
|
2175
|
+
.value.trim();
|
|
2176
|
+
if (!code) {
|
|
2177
|
+
setStatus('Enter a code', true);
|
|
2178
|
+
return;
|
|
2179
|
+
}
|
|
2180
|
+
callApi(
|
|
2181
|
+
() => DRT.shopper.code.validateCode(code),
|
|
2182
|
+
`code validation`,
|
|
2183
|
+
);
|
|
2184
|
+
});
|
|
2185
|
+
|
|
2186
|
+
document
|
|
2187
|
+
.getElementById('btn-gift-balance')
|
|
2188
|
+
.addEventListener('click', () => {
|
|
2189
|
+
if (!requireInit()) return;
|
|
2190
|
+
const num = document
|
|
2191
|
+
.getElementById('giftCardNumber')
|
|
2192
|
+
.value.trim();
|
|
2193
|
+
if (!num) {
|
|
2194
|
+
setStatus('Enter a gift card number', true);
|
|
2195
|
+
return;
|
|
2196
|
+
}
|
|
2197
|
+
callApi(
|
|
2198
|
+
() => DRT.shopper.giftCard.getBalance(num),
|
|
2199
|
+
'gift card balance',
|
|
2200
|
+
);
|
|
2201
|
+
});
|
|
2202
|
+
|
|
2203
|
+
/* ============ SCANNER API ============ */
|
|
2204
|
+
document
|
|
2205
|
+
.getElementById('btn-strings')
|
|
2206
|
+
.addEventListener('click', () => {
|
|
2207
|
+
callApi(
|
|
2208
|
+
() => DRT.scanner.scanning.appControllerGetStrings(),
|
|
2209
|
+
'scanner strings',
|
|
2210
|
+
);
|
|
2211
|
+
});
|
|
2212
|
+
|
|
2213
|
+
document
|
|
2214
|
+
.getElementById('btn-scanner-db')
|
|
2215
|
+
.addEventListener('click', () => {
|
|
2216
|
+
const showCode = document
|
|
2217
|
+
.getElementById('scannerShowCode')
|
|
2218
|
+
.value.trim();
|
|
2219
|
+
const device = document
|
|
2220
|
+
.getElementById('scannerDevice')
|
|
2221
|
+
.value.trim();
|
|
2222
|
+
const user = document
|
|
2223
|
+
.getElementById('scannerUser')
|
|
2224
|
+
.value.trim();
|
|
2225
|
+
if (!showCode) {
|
|
2226
|
+
setStatus('Enter a Show Code', true);
|
|
2227
|
+
return;
|
|
2228
|
+
}
|
|
2229
|
+
callApi(
|
|
2230
|
+
() =>
|
|
2231
|
+
DRT.scanner.database.download(
|
|
2232
|
+
showCode,
|
|
2233
|
+
device,
|
|
2234
|
+
user,
|
|
2235
|
+
'en',
|
|
2236
|
+
),
|
|
2237
|
+
'scanner database',
|
|
2238
|
+
);
|
|
2239
|
+
});
|
|
2240
|
+
|
|
2241
|
+
document
|
|
2242
|
+
.getElementById('btn-scanner-query')
|
|
2243
|
+
.addEventListener('click', () => {
|
|
2244
|
+
const showCode = document
|
|
2245
|
+
.getElementById('scannerShowCode')
|
|
2246
|
+
.value.trim();
|
|
2247
|
+
if (!showCode) {
|
|
2248
|
+
setStatus('Enter a Show Code', true);
|
|
2249
|
+
return;
|
|
2250
|
+
}
|
|
2251
|
+
callApi(
|
|
2252
|
+
() => DRT.scanner.database.query(showCode, 'sections'),
|
|
2253
|
+
'sections query',
|
|
2254
|
+
);
|
|
2255
|
+
});
|
|
2256
|
+
|
|
2257
|
+
document
|
|
2258
|
+
.getElementById('btn-scanner-by-phone')
|
|
2259
|
+
.addEventListener('click', () => {
|
|
2260
|
+
const showCode = document
|
|
2261
|
+
.getElementById('scannerShowCode')
|
|
2262
|
+
.value.trim();
|
|
2263
|
+
const phone = document
|
|
2264
|
+
.getElementById('scannerPhone')
|
|
2265
|
+
.value.trim();
|
|
2266
|
+
if (!showCode || !phone) {
|
|
2267
|
+
setStatus('Enter Show Code and Phone', true);
|
|
2268
|
+
return;
|
|
2269
|
+
}
|
|
2270
|
+
callApi(
|
|
2271
|
+
() =>
|
|
2272
|
+
DRT.scanner.orders.ordersControllerGetOrdersByPhone(
|
|
2273
|
+
showCode,
|
|
2274
|
+
phone,
|
|
2275
|
+
),
|
|
2276
|
+
'orders by phone',
|
|
2277
|
+
);
|
|
2278
|
+
});
|
|
2279
|
+
|
|
2280
|
+
document
|
|
2281
|
+
.getElementById('btn-scanner-by-name')
|
|
2282
|
+
.addEventListener('click', () => {
|
|
2283
|
+
const showCode = document
|
|
2284
|
+
.getElementById('scannerShowCode')
|
|
2285
|
+
.value.trim();
|
|
2286
|
+
const name = document
|
|
2287
|
+
.getElementById('scannerName')
|
|
2288
|
+
.value.trim();
|
|
2289
|
+
if (!showCode || !name) {
|
|
2290
|
+
setStatus('Enter Show Code and Name', true);
|
|
2291
|
+
return;
|
|
2292
|
+
}
|
|
2293
|
+
callApi(
|
|
2294
|
+
() =>
|
|
2295
|
+
DRT.scanner.orders.ordersControllerGetOrdersByName(
|
|
2296
|
+
showCode,
|
|
2297
|
+
name,
|
|
2298
|
+
),
|
|
2299
|
+
'orders by name',
|
|
2300
|
+
);
|
|
2301
|
+
});
|
|
2302
|
+
|
|
2303
|
+
console.log('DRT SDK available at window.DRT for console testing');
|
|
2304
|
+
</script>
|
|
2305
|
+
</body>
|
|
2306
|
+
</html>
|