@drttix/drt-sdk 0.1.0 → 0.1.2

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.
Files changed (233) hide show
  1. package/README.md +54 -54
  2. package/dist/cjs/index.d.ts +3 -0
  3. package/dist/cjs/index.js +5 -1
  4. package/dist/cjs/src/definitions/scanner.d.ts +1 -0
  5. package/dist/cjs/src/definitions/scanner.js +36 -1
  6. package/dist/cjs/src/definitions/shopper.d.ts +3 -0
  7. package/dist/cjs/src/definitions/shopper.js +43 -6
  8. package/dist/cjs/src/generated/scanner/types.d.ts +31 -0
  9. package/dist/cjs/src/generated/scanner/types.js +4 -0
  10. package/dist/cjs/src/generated/shopper/core/OpenAPI.js +1 -1
  11. package/dist/cjs/src/generated/shopper/index.d.ts +7 -0
  12. package/dist/cjs/src/generated/shopper/index.js +3 -1
  13. package/dist/cjs/src/generated/shopper/models/GiftCardApplyDto.d.ts +18 -0
  14. package/dist/cjs/src/generated/shopper/models/GiftCardApplyDto.js +2 -0
  15. package/dist/cjs/src/generated/shopper/models/GiftCardApplyResponse.d.ts +30 -0
  16. package/dist/cjs/src/generated/shopper/models/GiftCardApplyResponse.js +2 -0
  17. package/dist/cjs/src/generated/shopper/models/GiftCardCheckoutInfo.d.ts +30 -0
  18. package/dist/cjs/src/generated/shopper/models/GiftCardCheckoutInfo.js +2 -0
  19. package/dist/cjs/src/generated/shopper/models/GiftCardEditFormResponse.d.ts +10 -0
  20. package/dist/cjs/src/generated/shopper/models/GiftCardEditFormResponse.js +2 -0
  21. package/dist/cjs/src/generated/shopper/models/GiftCardLookupResponse.d.ts +18 -0
  22. package/dist/cjs/src/generated/shopper/models/GiftCardLookupResponse.js +2 -0
  23. package/dist/cjs/src/generated/shopper/models/GiftCardRemoveResponse.d.ts +14 -0
  24. package/dist/cjs/src/generated/shopper/models/GiftCardRemoveResponse.js +2 -0
  25. package/dist/cjs/src/generated/shopper/services/GiftCardService.d.ts +62 -0
  26. package/dist/cjs/src/generated/shopper/services/GiftCardService.js +142 -0
  27. package/dist/cjs/src/generated/shopper/types.d.ts +100 -0
  28. package/dist/cjs/src/generated/shopper/types.js +4 -0
  29. package/dist/cjs/src/scripts/build-all.js +28 -21
  30. package/dist/cjs/src/scripts/generate-definition.js +34 -9
  31. package/dist/esm/index.d.ts +3 -0
  32. package/dist/esm/index.js +2 -0
  33. package/dist/esm/src/definitions/scanner.d.ts +1 -0
  34. package/dist/esm/src/definitions/scanner.js +2 -0
  35. package/dist/esm/src/definitions/shopper.d.ts +3 -0
  36. package/dist/esm/src/definitions/shopper.js +4 -0
  37. package/dist/esm/src/generated/scanner/types.d.ts +31 -0
  38. package/dist/esm/src/generated/scanner/types.js +3 -0
  39. package/dist/esm/src/generated/shopper/core/OpenAPI.js +1 -1
  40. package/dist/esm/src/generated/shopper/index.d.ts +7 -0
  41. package/dist/esm/src/generated/shopper/index.js +1 -0
  42. package/dist/esm/src/generated/shopper/models/GiftCardApplyDto.d.ts +18 -0
  43. package/dist/esm/src/generated/shopper/models/GiftCardApplyDto.js +1 -0
  44. package/dist/esm/src/generated/shopper/models/GiftCardApplyResponse.d.ts +30 -0
  45. package/dist/esm/src/generated/shopper/models/GiftCardApplyResponse.js +1 -0
  46. package/dist/esm/src/generated/shopper/models/GiftCardCheckoutInfo.d.ts +30 -0
  47. package/dist/esm/src/generated/shopper/models/GiftCardCheckoutInfo.js +1 -0
  48. package/dist/esm/src/generated/shopper/models/GiftCardEditFormResponse.d.ts +10 -0
  49. package/dist/esm/src/generated/shopper/models/GiftCardEditFormResponse.js +1 -0
  50. package/dist/esm/src/generated/shopper/models/GiftCardLookupResponse.d.ts +18 -0
  51. package/dist/esm/src/generated/shopper/models/GiftCardLookupResponse.js +1 -0
  52. package/dist/esm/src/generated/shopper/models/GiftCardRemoveResponse.d.ts +14 -0
  53. package/dist/esm/src/generated/shopper/models/GiftCardRemoveResponse.js +1 -0
  54. package/dist/esm/src/generated/shopper/services/GiftCardService.d.ts +62 -0
  55. package/dist/esm/src/generated/shopper/services/GiftCardService.js +138 -0
  56. package/dist/esm/src/generated/shopper/types.d.ts +100 -0
  57. package/dist/esm/src/generated/shopper/types.js +3 -0
  58. package/dist/esm/src/scripts/build-all.js +31 -24
  59. package/dist/esm/src/scripts/generate-definition.js +36 -11
  60. package/drt-api-specs.json +10 -10
  61. package/index.ts +3 -0
  62. package/package.json +27 -27
  63. package/src/custom/custom-request.txt +382 -382
  64. package/src/definitions/scanner.ts +3 -0
  65. package/src/definitions/shopper.ts +5 -0
  66. package/src/functions/setBaseURL.ts +34 -34
  67. package/src/generated/scanner/core/ApiError.ts +1 -1
  68. package/src/generated/scanner/core/ApiRequestOptions.ts +1 -1
  69. package/src/generated/scanner/core/ApiResult.ts +1 -1
  70. package/src/generated/scanner/core/CancelablePromise.ts +1 -1
  71. package/src/generated/scanner/core/OpenAPI.ts +1 -1
  72. package/src/generated/scanner/core/request.ts +1 -1
  73. package/src/generated/scanner/models/DatabaseUpload.ts +10 -10
  74. package/src/generated/scanner/models/DatabaseUploadData.ts +10 -10
  75. package/src/generated/scanner/models/DisplayMessage.ts +10 -10
  76. package/src/generated/scanner/models/EventResponse.ts +16 -16
  77. package/src/generated/scanner/models/EventResponseStats.ts +11 -11
  78. package/src/generated/scanner/models/EventSkin.ts +23 -23
  79. package/src/generated/scanner/models/MobileReceiptResponse.ts +21 -21
  80. package/src/generated/scanner/models/OrderDetails.ts +15 -15
  81. package/src/generated/scanner/models/OrderProduct.ts +15 -15
  82. package/src/generated/scanner/models/OrderSeat.ts +19 -19
  83. package/src/generated/scanner/models/OrderSummary.ts +11 -11
  84. package/src/generated/scanner/models/Product.ts +15 -15
  85. package/src/generated/scanner/models/ProductQR.ts +8 -8
  86. package/src/generated/scanner/models/ProductScan.ts +16 -16
  87. package/src/generated/scanner/models/QueryDatabaseUnionResult.ts +13 -13
  88. package/src/generated/scanner/models/ReceiptBuyerDetails.ts +11 -11
  89. package/src/generated/scanner/models/ReceiptEventDetails.ts +12 -12
  90. package/src/generated/scanner/models/ReceiptProductDetails.ts +19 -19
  91. package/src/generated/scanner/models/ReceiptResponse.ts +21 -21
  92. package/src/generated/scanner/models/ReceiptSeatDetails.ts +15 -15
  93. package/src/generated/scanner/models/ResultMessage.ts +9 -9
  94. package/src/generated/scanner/models/RowResult.ts +8 -8
  95. package/src/generated/scanner/models/SeatQR.ts +8 -8
  96. package/src/generated/scanner/models/SeatResponse.ts +12 -12
  97. package/src/generated/scanner/models/SeatResult.ts +8 -8
  98. package/src/generated/scanner/models/SectionResult.ts +8 -8
  99. package/src/generated/scanner/models/TicketDatabase.ts +19 -19
  100. package/src/generated/scanner/models/TicketScan.ts +24 -24
  101. package/src/generated/scanner/models/TicketScanStats.ts +10 -10
  102. package/src/generated/scanner/models/TicketSeats.ts +14 -14
  103. package/src/generated/scanner/models/UploadDatabaseResponse.ts +10 -10
  104. package/src/generated/scanner/services/DatabaseService.ts +110 -110
  105. package/src/generated/scanner/services/OrdersService.ts +114 -114
  106. package/src/generated/scanner/services/ScanningService.ts +331 -331
  107. package/src/generated/scanner/types.ts +34 -0
  108. package/src/generated/shopper/core/ApiError.ts +1 -1
  109. package/src/generated/shopper/core/ApiRequestOptions.ts +1 -1
  110. package/src/generated/shopper/core/ApiResult.ts +1 -1
  111. package/src/generated/shopper/core/CancelablePromise.ts +1 -1
  112. package/src/generated/shopper/core/OpenAPI.ts +2 -2
  113. package/src/generated/shopper/core/request.ts +382 -382
  114. package/src/generated/shopper/index.ts +7 -0
  115. package/src/generated/shopper/models/Account.ts +57 -57
  116. package/src/generated/shopper/models/Album.ts +13 -13
  117. package/src/generated/shopper/models/AlbumImage.ts +13 -13
  118. package/src/generated/shopper/models/AlbumWithImages.ts +11 -11
  119. package/src/generated/shopper/models/AssignNamesReturn.ts +9 -9
  120. package/src/generated/shopper/models/BAHold.ts +10 -10
  121. package/src/generated/shopper/models/BlockOfTickets.ts +18 -18
  122. package/src/generated/shopper/models/Cart.ts +13 -13
  123. package/src/generated/shopper/models/CartWithTime.ts +10 -10
  124. package/src/generated/shopper/models/Chart.ts +13 -13
  125. package/src/generated/shopper/models/CodeDto.ts +11 -11
  126. package/src/generated/shopper/models/CompleteBody.ts +9 -9
  127. package/src/generated/shopper/models/CreateCustomerResponse.ts +9 -9
  128. package/src/generated/shopper/models/DigitalAsset.ts +21 -21
  129. package/src/generated/shopper/models/DonationContribution.ts +10 -10
  130. package/src/generated/shopper/models/DonationFund.ts +34 -34
  131. package/src/generated/shopper/models/DonationInCart.ts +19 -19
  132. package/src/generated/shopper/models/DonationResult.ts +23 -23
  133. package/src/generated/shopper/models/DonationText.ts +9 -9
  134. package/src/generated/shopper/models/DonationsandContributions.ts +17 -17
  135. package/src/generated/shopper/models/EmailUpdate.ts +12 -12
  136. package/src/generated/shopper/models/EngineSeat.ts +7 -7
  137. package/src/generated/shopper/models/EventDetails.ts +51 -51
  138. package/src/generated/shopper/models/EventGroup.ts +16 -16
  139. package/src/generated/shopper/models/ExistingRefundDetails.ts +9 -9
  140. package/src/generated/shopper/models/FullEventDetails.ts +17 -17
  141. package/src/generated/shopper/models/GAHold.ts +11 -11
  142. package/src/generated/shopper/models/GAResponse.ts +19 -19
  143. package/src/generated/shopper/models/GASeatRelease.ts +10 -10
  144. package/src/generated/shopper/models/GetEventsResponse.ts +11 -11
  145. package/src/generated/shopper/models/GiftCardApplyDto.ts +23 -0
  146. package/src/generated/shopper/models/GiftCardApplyResponse.ts +35 -0
  147. package/src/generated/shopper/models/GiftCardCheckoutInfo.ts +35 -0
  148. package/src/generated/shopper/models/GiftCardEditFormResponse.ts +15 -0
  149. package/src/generated/shopper/models/GiftCardLookupResponse.ts +23 -0
  150. package/src/generated/shopper/models/GiftCardRemoveResponse.ts +19 -0
  151. package/src/generated/shopper/models/GuidReturn.ts +8 -8
  152. package/src/generated/shopper/models/HasAccessResponse.ts +8 -8
  153. package/src/generated/shopper/models/LandingConfig.ts +27 -27
  154. package/src/generated/shopper/models/LandingPageResponse.ts +17 -17
  155. package/src/generated/shopper/models/LinkWithSuccess.ts +9 -9
  156. package/src/generated/shopper/models/NameUpdate.ts +9 -9
  157. package/src/generated/shopper/models/OrderDetails.ts +42 -42
  158. package/src/generated/shopper/models/OrderRecalc.ts +11 -11
  159. package/src/generated/shopper/models/OrderRefundDetails.ts +10 -10
  160. package/src/generated/shopper/models/OrderSeat.ts +30 -30
  161. package/src/generated/shopper/models/OrderStream.ts +16 -16
  162. package/src/generated/shopper/models/OrderTicketReceipt.ts +30 -30
  163. package/src/generated/shopper/models/PatronName.ts +10 -10
  164. package/src/generated/shopper/models/PaymentDetail.ts +40 -40
  165. package/src/generated/shopper/models/PaymentFail.ts +23 -23
  166. package/src/generated/shopper/models/PaymentSuccess.ts +23 -23
  167. package/src/generated/shopper/models/PerformerEventList.ts +9 -9
  168. package/src/generated/shopper/models/PickupReturn.ts +11 -11
  169. package/src/generated/shopper/models/PriorityCode.ts +10 -10
  170. package/src/generated/shopper/models/Product.ts +28 -28
  171. package/src/generated/shopper/models/ProductAddResponse.ts +12 -12
  172. package/src/generated/shopper/models/ProductBody.ts +12 -12
  173. package/src/generated/shopper/models/ProductData.ts +11 -11
  174. package/src/generated/shopper/models/ProductDeleteBody.ts +11 -11
  175. package/src/generated/shopper/models/ProductDetails.ts +16 -16
  176. package/src/generated/shopper/models/ProductInCart.ts +17 -17
  177. package/src/generated/shopper/models/ProductUpdateResponse.ts +10 -10
  178. package/src/generated/shopper/models/ProductVariant.ts +18 -18
  179. package/src/generated/shopper/models/RecalcResponse.ts +10 -10
  180. package/src/generated/shopper/models/RecalcReturn.ts +31 -31
  181. package/src/generated/shopper/models/Receipt.ts +38 -38
  182. package/src/generated/shopper/models/ReceiptMessages.ts +8 -8
  183. package/src/generated/shopper/models/ReceiptQuestions.ts +12 -12
  184. package/src/generated/shopper/models/Refund.ts +12 -12
  185. package/src/generated/shopper/models/RefundPolicy.ts +8 -8
  186. package/src/generated/shopper/models/RefundReason.ts +12 -12
  187. package/src/generated/shopper/models/RefundRequest.ts +13 -13
  188. package/src/generated/shopper/models/RefundRequestInfo.ts +15 -15
  189. package/src/generated/shopper/models/RegisterStreamRequest.ts +9 -9
  190. package/src/generated/shopper/models/RegisterStreamResponse.ts +10 -10
  191. package/src/generated/shopper/models/RootConfigResponse.ts +22 -22
  192. package/src/generated/shopper/models/SeatData.ts +9 -9
  193. package/src/generated/shopper/models/SeatHoldReturn.ts +11 -11
  194. package/src/generated/shopper/models/SeatInCart.ts +26 -26
  195. package/src/generated/shopper/models/SeatingTier.ts +27 -27
  196. package/src/generated/shopper/models/Section.ts +20 -20
  197. package/src/generated/shopper/models/SectionRule.ts +15 -15
  198. package/src/generated/shopper/models/SessionHeartbeatDto.ts +9 -9
  199. package/src/generated/shopper/models/SessionInfoDto.ts +20 -20
  200. package/src/generated/shopper/models/SiteDisposition.ts +10 -10
  201. package/src/generated/shopper/models/SiteTheme.ts +40 -40
  202. package/src/generated/shopper/models/StudioOrderSettings.ts +14 -14
  203. package/src/generated/shopper/models/SuccessResponse.ts +8 -8
  204. package/src/generated/shopper/models/SuccessWithTime.ts +15 -15
  205. package/src/generated/shopper/models/SummaryBody.ts +8 -8
  206. package/src/generated/shopper/models/TheatreAddresses.ts +15 -15
  207. package/src/generated/shopper/models/Ticket.ts +9 -9
  208. package/src/generated/shopper/models/TicketBlock.ts +18 -18
  209. package/src/generated/shopper/models/TicketInstructions.ts +8 -8
  210. package/src/generated/shopper/models/UniversalCodeResponse.ts +27 -27
  211. package/src/generated/shopper/models/UpdateTierData.ts +10 -10
  212. package/src/generated/shopper/models/UpdateTierFail.ts +10 -10
  213. package/src/generated/shopper/models/WaitlistResponse.ts +9 -9
  214. package/src/generated/shopper/models/WaitlistUpdate.ts +14 -14
  215. package/src/generated/shopper/services/AccountService.ts +129 -129
  216. package/src/generated/shopper/services/CartService.ts +68 -68
  217. package/src/generated/shopper/services/CodeService.ts +180 -180
  218. package/src/generated/shopper/services/DonationService.ts +77 -77
  219. package/src/generated/shopper/services/EventService.ts +144 -144
  220. package/src/generated/shopper/services/GiftCardService.ts +172 -0
  221. package/src/generated/shopper/services/OrderService.ts +513 -513
  222. package/src/generated/shopper/services/PaymentService.ts +109 -109
  223. package/src/generated/shopper/services/ProductService.ts +109 -109
  224. package/src/generated/shopper/services/SeatService.ts +231 -231
  225. package/src/generated/shopper/services/SessionService.ts +69 -69
  226. package/src/generated/shopper/types.ts +103 -0
  227. package/src/scripts/build-all.ts +95 -83
  228. package/src/scripts/check-version-not-published.ts +28 -28
  229. package/src/scripts/generate-definition.ts +89 -55
  230. package/test.ts +28 -13
  231. package/tsconfig.cjs.json +11 -11
  232. package/tsconfig.esm.json +11 -11
  233. package/tsconfig.json +16 -16
@@ -0,0 +1,103 @@
1
+ // AUTO-GENERATED FILE – DO NOT EDIT
2
+ // Re-export all types as a namespace
3
+
4
+ export type { Account } from './models/Account';
5
+ export type { Album } from './models/Album';
6
+ export type { AlbumImage } from './models/AlbumImage';
7
+ export type { AlbumWithImages } from './models/AlbumWithImages';
8
+ export type { AssignNamesReturn } from './models/AssignNamesReturn';
9
+ export type { BAHold } from './models/BAHold';
10
+ export type { BlockOfTickets } from './models/BlockOfTickets';
11
+ export type { Cart } from './models/Cart';
12
+ export type { CartWithTime } from './models/CartWithTime';
13
+ export type { Chart } from './models/Chart';
14
+ export type { CodeDto } from './models/CodeDto';
15
+ export type { CompleteBody } from './models/CompleteBody';
16
+ export type { CreateCustomerResponse } from './models/CreateCustomerResponse';
17
+ export type { DigitalAsset } from './models/DigitalAsset';
18
+ export type { DonationContribution } from './models/DonationContribution';
19
+ export type { DonationFund } from './models/DonationFund';
20
+ export type { DonationInCart } from './models/DonationInCart';
21
+ export type { DonationResult } from './models/DonationResult';
22
+ export type { DonationsandContributions } from './models/DonationsandContributions';
23
+ export type { DonationText } from './models/DonationText';
24
+ export type { EmailUpdate } from './models/EmailUpdate';
25
+ export type { EngineSeat } from './models/EngineSeat';
26
+ export type { EventDetails } from './models/EventDetails';
27
+ export type { EventGroup } from './models/EventGroup';
28
+ export type { ExistingRefundDetails } from './models/ExistingRefundDetails';
29
+ export type { FullEventDetails } from './models/FullEventDetails';
30
+ export type { GAHold } from './models/GAHold';
31
+ export type { GAResponse } from './models/GAResponse';
32
+ export type { GASeatRelease } from './models/GASeatRelease';
33
+ export type { GetEventsResponse } from './models/GetEventsResponse';
34
+ export type { GiftCardApplyDto } from './models/GiftCardApplyDto';
35
+ export type { GiftCardApplyResponse } from './models/GiftCardApplyResponse';
36
+ export type { GiftCardCheckoutInfo } from './models/GiftCardCheckoutInfo';
37
+ export type { GiftCardEditFormResponse } from './models/GiftCardEditFormResponse';
38
+ export type { GiftCardLookupResponse } from './models/GiftCardLookupResponse';
39
+ export type { GiftCardRemoveResponse } from './models/GiftCardRemoveResponse';
40
+ export type { GuidReturn } from './models/GuidReturn';
41
+ export type { HasAccessResponse } from './models/HasAccessResponse';
42
+ export type { LandingConfig } from './models/LandingConfig';
43
+ export type { LandingPageResponse } from './models/LandingPageResponse';
44
+ export type { LinkWithSuccess } from './models/LinkWithSuccess';
45
+ export type { NameUpdate } from './models/NameUpdate';
46
+ export type { OrderDetails } from './models/OrderDetails';
47
+ export type { OrderRecalc } from './models/OrderRecalc';
48
+ export type { OrderRefundDetails } from './models/OrderRefundDetails';
49
+ export type { OrderSeat } from './models/OrderSeat';
50
+ export type { OrderStream } from './models/OrderStream';
51
+ export type { OrderTicketReceipt } from './models/OrderTicketReceipt';
52
+ export type { PatronName } from './models/PatronName';
53
+ export type { PaymentDetail } from './models/PaymentDetail';
54
+ export type { PaymentFail } from './models/PaymentFail';
55
+ export type { PaymentSuccess } from './models/PaymentSuccess';
56
+ export type { PerformerEventList } from './models/PerformerEventList';
57
+ export type { PickupReturn } from './models/PickupReturn';
58
+ export type { PriorityCode } from './models/PriorityCode';
59
+ export type { Product } from './models/Product';
60
+ export type { ProductAddResponse } from './models/ProductAddResponse';
61
+ export type { ProductBody } from './models/ProductBody';
62
+ export type { ProductData } from './models/ProductData';
63
+ export type { ProductDeleteBody } from './models/ProductDeleteBody';
64
+ export type { ProductDetails } from './models/ProductDetails';
65
+ export type { ProductInCart } from './models/ProductInCart';
66
+ export type { ProductUpdateResponse } from './models/ProductUpdateResponse';
67
+ export type { ProductVariant } from './models/ProductVariant';
68
+ export type { RecalcResponse } from './models/RecalcResponse';
69
+ export type { RecalcReturn } from './models/RecalcReturn';
70
+ export type { Receipt } from './models/Receipt';
71
+ export type { ReceiptMessages } from './models/ReceiptMessages';
72
+ export type { ReceiptQuestions } from './models/ReceiptQuestions';
73
+ export type { Refund } from './models/Refund';
74
+ export type { RefundPolicy } from './models/RefundPolicy';
75
+ export type { RefundReason } from './models/RefundReason';
76
+ export type { RefundRequest } from './models/RefundRequest';
77
+ export type { RefundRequestInfo } from './models/RefundRequestInfo';
78
+ export type { RegisterStreamRequest } from './models/RegisterStreamRequest';
79
+ export type { RegisterStreamResponse } from './models/RegisterStreamResponse';
80
+ export type { RootConfigResponse } from './models/RootConfigResponse';
81
+ export type { SeatData } from './models/SeatData';
82
+ export type { SeatHoldReturn } from './models/SeatHoldReturn';
83
+ export type { SeatInCart } from './models/SeatInCart';
84
+ export type { SeatingTier } from './models/SeatingTier';
85
+ export type { Section } from './models/Section';
86
+ export type { SectionRule } from './models/SectionRule';
87
+ export type { SessionHeartbeatDto } from './models/SessionHeartbeatDto';
88
+ export type { SessionInfoDto } from './models/SessionInfoDto';
89
+ export type { SiteDisposition } from './models/SiteDisposition';
90
+ export type { SiteTheme } from './models/SiteTheme';
91
+ export type { StudioOrderSettings } from './models/StudioOrderSettings';
92
+ export type { SuccessResponse } from './models/SuccessResponse';
93
+ export type { SuccessWithTime } from './models/SuccessWithTime';
94
+ export type { SummaryBody } from './models/SummaryBody';
95
+ export type { TheatreAddresses } from './models/TheatreAddresses';
96
+ export type { Ticket } from './models/Ticket';
97
+ export type { TicketBlock } from './models/TicketBlock';
98
+ export type { TicketInstructions } from './models/TicketInstructions';
99
+ export type { UniversalCodeResponse } from './models/UniversalCodeResponse';
100
+ export type { UpdateTierData } from './models/UpdateTierData';
101
+ export type { UpdateTierFail } from './models/UpdateTierFail';
102
+ export type { WaitlistResponse } from './models/WaitlistResponse';
103
+ export type { WaitlistUpdate } from './models/WaitlistUpdate';
@@ -1,83 +1,95 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { execSync } from "child_process";
4
-
5
- // Load the spec list
6
- const specsPath = path.resolve("drt-api-specs.json");
7
- const specs = JSON.parse(fs.readFileSync(specsPath, "utf-8")) as {
8
- name: string;
9
- url: string;
10
- }[];
11
-
12
- const GENERATED_BASE = path.resolve("src", "generated");
13
- const INDEX_FILE = path.resolve("index.ts"); // <== write to project root
14
-
15
- for (const spec of specs) {
16
- const { name, url } = spec;
17
- const outputDir = path.join(GENERATED_BASE, name);
18
-
19
- console.log(`\n🚧 Generating client for ${name}...`);
20
-
21
- // Download spec to temp file first to avoid URL parsing issues
22
- const tempSpecFile = path.join(process.cwd(), `${name}-spec.json`);
23
- try {
24
- console.log(`📥 Downloading spec from ${url}...`);
25
- execSync(`curl -s -o "${tempSpecFile}" "${url}"`, { stdio: "inherit" });
26
-
27
- execSync(
28
- `npx openapi-typescript-codegen --input ${tempSpecFile} --output ${outputDir} --client fetch`,
29
- { stdio: "inherit" }
30
- );
31
-
32
- // Clean up temp file
33
- fs.unlinkSync(tempSpecFile);
34
- } catch (error) {
35
- console.error(`❌ Failed to generate client for ${name}`);
36
- if (fs.existsSync(tempSpecFile)) {
37
- fs.unlinkSync(tempSpecFile);
38
- }
39
- throw error;
40
- }
41
-
42
- console.log(`⚙️ Generating wrapper for ${name}...`);
43
- execSync(`npx tsx src/scripts/generate-definition.ts ${name}`, {
44
- stdio: "inherit",
45
- });
46
- }
47
-
48
- // After generating all clients and definitions, replace request.ts for shopper only
49
- const customRequestPath = path.resolve("src/custom/custom-request.txt");
50
- const shopperRequestPath = path.resolve(
51
- "src/generated/shopper/core/request.ts"
52
- );
53
-
54
- const customRequestContent = fs.readFileSync(customRequestPath, "utf-8");
55
-
56
- fs.writeFileSync(shopperRequestPath, customRequestContent);
57
- console.log("✅ Replaced shopper/core/request.ts with custom-request.txt");
58
-
59
- // --- Generate index.ts
60
- console.log(`🧩 Generating DRT index...`);
61
-
62
- const lines: string[] = [];
63
- lines.push("// AUTO-GENERATED FILE – DO NOT EDIT");
64
- lines.push("");
65
-
66
- for (const spec of specs) {
67
- const name = spec.name.toLowerCase();
68
- lines.push(`import { ${name} } from "./src/definitions/${name}";`);
69
- }
70
- lines.push(`import { setBaseUrlsOnce } from "./src/functions/setBaseURL";`);
71
- lines.push("");
72
- lines.push("export const DRT = {");
73
- for (const spec of specs) {
74
- lines.push(` ${spec.name.toLowerCase()},`);
75
- }
76
- lines.push("};");
77
- lines.push("");
78
- lines.push("setBaseUrlsOnce();");
79
- lines.push("");
80
- lines.push("export type DRT = typeof DRT;");
81
-
82
- fs.writeFileSync(INDEX_FILE, lines.join("\n"));
83
- console.log(`✅ Wrote DRT entrypoint to index.ts`);
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ import { execSync } from 'child_process';
4
+
5
+ // Load the spec list
6
+ const specsPath = path.resolve('drt-api-specs.json');
7
+ const specs = JSON.parse(fs.readFileSync(specsPath, 'utf-8')) as {
8
+ name: string;
9
+ url: string;
10
+ }[];
11
+
12
+ const GENERATED_BASE = path.resolve('src', 'generated');
13
+ const INDEX_FILE = path.resolve('index.ts'); // <== write to project root
14
+
15
+ for (const spec of specs) {
16
+ const { name, url } = spec;
17
+ const outputDir = path.join(GENERATED_BASE, name);
18
+
19
+ console.log(`\n🚧 Generating client for ${name}...`);
20
+
21
+ // Download spec to temp file first to avoid URL parsing issues
22
+ const tempSpecFile = path.join(process.cwd(), `${name}-spec.json`);
23
+ try {
24
+ console.log(`📥 Downloading spec from ${url}...`);
25
+ execSync(`curl -s -o "${tempSpecFile}" "${url}"`, { stdio: 'inherit' });
26
+
27
+ execSync(
28
+ `npx openapi-typescript-codegen --input ${tempSpecFile} --output ${outputDir} --client fetch`,
29
+ { stdio: 'inherit' }
30
+ );
31
+
32
+ // Clean up temp file
33
+ fs.unlinkSync(tempSpecFile);
34
+ } catch (error) {
35
+ console.error(`❌ Failed to generate client for ${name}`);
36
+ if (fs.existsSync(tempSpecFile)) {
37
+ fs.unlinkSync(tempSpecFile);
38
+ }
39
+ throw error;
40
+ }
41
+
42
+ console.log(`⚙️ Generating wrapper for ${name}...`);
43
+ execSync(`npx tsx src/scripts/generate-definition.ts ${name}`, {
44
+ stdio: 'inherit',
45
+ });
46
+ }
47
+
48
+ // After generating all clients and definitions, replace request.ts for shopper only
49
+ const customRequestPath = path.resolve('src/custom/custom-request.txt');
50
+ const shopperRequestPath = path.resolve(
51
+ 'src/generated/shopper/core/request.ts'
52
+ );
53
+
54
+ const customRequestContent = fs.readFileSync(customRequestPath, 'utf-8');
55
+
56
+ fs.writeFileSync(shopperRequestPath, customRequestContent);
57
+ console.log('✅ Replaced shopper/core/request.ts with custom-request.txt');
58
+
59
+ // --- Generate index.ts
60
+ console.log(`🧩 Generating DRT index...`);
61
+
62
+ const lines: string[] = [];
63
+ lines.push('// AUTO-GENERATED FILE – DO NOT EDIT');
64
+ lines.push('');
65
+
66
+ for (const spec of specs) {
67
+ const name = spec.name.toLowerCase();
68
+ lines.push(`import { ${name} } from "./src/definitions/${name}";`);
69
+ }
70
+ lines.push(`import { setBaseUrlsOnce } from "./src/functions/setBaseURL";`);
71
+ lines.push('');
72
+
73
+ // Re-export type namespaces for easy access
74
+ for (const spec of specs) {
75
+ const name = spec.name.toLowerCase();
76
+ const typesNamespace =
77
+ name.charAt(0).toUpperCase() + name.slice(1) + 'Types';
78
+ lines.push(
79
+ `export { ${typesNamespace} } from "./src/definitions/${name}";`
80
+ );
81
+ }
82
+ lines.push('');
83
+
84
+ lines.push('export const DRT = {');
85
+ for (const spec of specs) {
86
+ lines.push(` ${spec.name.toLowerCase()},`);
87
+ }
88
+ lines.push('};');
89
+ lines.push('');
90
+ lines.push('setBaseUrlsOnce();');
91
+ lines.push('');
92
+ lines.push('export type DRT = typeof DRT;');
93
+
94
+ fs.writeFileSync(INDEX_FILE, lines.join('\n'));
95
+ console.log(`✅ Wrote DRT entrypoint to index.ts`);
@@ -1,28 +1,28 @@
1
- import { execSync } from 'child_process';
2
- import fs from 'fs';
3
-
4
- interface PackageJson {
5
- name: string;
6
- version: string;
7
- }
8
-
9
- const pkg: PackageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
10
- const name = pkg.name;
11
- const version = pkg.version;
12
-
13
- try {
14
- const fullName = `${name}@${version}`;
15
-
16
- console.log(`🔍 Checking if ${fullName} is already published...`);
17
-
18
- execSync(`npm view ${fullName}`, { stdio: 'ignore' });
19
-
20
- console.error(
21
- `❌ Version ${version} of ${name} is already published. Please bump the version.`
22
- );
23
- process.exit(1);
24
- } catch (e) {
25
- console.log(
26
- `✅ Version ${version} of ${name} is not published. Safe to publish.`
27
- );
28
- }
1
+ import { execSync } from 'child_process';
2
+ import fs from 'fs';
3
+
4
+ interface PackageJson {
5
+ name: string;
6
+ version: string;
7
+ }
8
+
9
+ const pkg: PackageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
10
+ const name = pkg.name;
11
+ const version = pkg.version;
12
+
13
+ try {
14
+ const fullName = `${name}@${version}`;
15
+
16
+ console.log(`🔍 Checking if ${fullName} is already published...`);
17
+
18
+ execSync(`npm view ${fullName}`, { stdio: 'ignore' });
19
+
20
+ console.error(
21
+ `❌ Version ${version} of ${name} is already published. Please bump the version.`
22
+ );
23
+ process.exit(1);
24
+ } catch (e) {
25
+ console.log(
26
+ `✅ Version ${version} of ${name} is not published. Safe to publish.`
27
+ );
28
+ }
@@ -1,55 +1,89 @@
1
- import fs from "fs";
2
- import path from "path";
3
-
4
- const [, , serviceName] = process.argv;
5
-
6
- if (!serviceName) {
7
- console.error(
8
- '❌ Please provide a service name as an argument (e.g., "shopper")'
9
- );
10
- process.exit(1);
11
- }
12
-
13
- const GENERATED_INDEX = path.resolve(`src/generated/${serviceName}/index.ts`);
14
- const OUTPUT_FILE = path.resolve(`src/definitions/${serviceName}.ts`);
15
-
16
- if (!fs.existsSync(GENERATED_INDEX)) {
17
- console.error(`❌ File not found: ${GENERATED_INDEX}`);
18
- process.exit(1);
19
- }
20
-
21
- const contents = fs.readFileSync(GENERATED_INDEX, "utf-8");
22
-
23
- const exportLines = contents
24
- .split("\n")
25
- .filter((line) => line.startsWith("export {") && line.includes("Service"));
26
-
27
- const services = exportLines
28
- .map((line) => {
29
- const match = line.match(/export { (\w+) } from/);
30
- return match?.[1];
31
- })
32
- .filter(Boolean) as string[];
33
-
34
- const imports = services.map(
35
- (service) => `import { ${service} } from "../generated/${serviceName}";`
36
- );
37
-
38
- const objectName = serviceName.toLowerCase();
39
-
40
- let output = `// AUTO-GENERATED FILE – DO NOT EDIT\n\n`;
41
-
42
- if (services.length === 1) {
43
- output += `import { ${services[0]} } from "../generated/${serviceName}";\n`;
44
- output += `export const ${objectName} = ${services[0]};\n`;
45
- } else {
46
- output += `${imports.join("\n")}\n\n`;
47
- output += `export const ${objectName} = {\n`;
48
- output += services
49
- .map((s) => ` ${s.replace("Service", "").toLowerCase()}: ${s},`)
50
- .join("\n");
51
- output += `\n};\n`;
52
- }
53
-
54
- fs.writeFileSync(OUTPUT_FILE, output);
55
- console.log(`✅ Wrote ${serviceName} definition to: ${OUTPUT_FILE}`);
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+
4
+ const [, , serviceName] = process.argv;
5
+
6
+ if (!serviceName) {
7
+ console.error(
8
+ '❌ Please provide a service name as an argument (e.g., "shopper")'
9
+ );
10
+ process.exit(1);
11
+ }
12
+
13
+ const GENERATED_INDEX = path.resolve(`src/generated/${serviceName}/index.ts`);
14
+ const GENERATED_TYPES = path.resolve(`src/generated/${serviceName}/types.ts`);
15
+ const OUTPUT_FILE = path.resolve(`src/definitions/${serviceName}.ts`);
16
+
17
+ if (!fs.existsSync(GENERATED_INDEX)) {
18
+ console.error(`❌ File not found: ${GENERATED_INDEX}`);
19
+ process.exit(1);
20
+ }
21
+
22
+ const contents = fs.readFileSync(GENERATED_INDEX, 'utf-8');
23
+
24
+ // Extract service exports
25
+ const exportLines = contents
26
+ .split('\n')
27
+ .filter((line) => line.startsWith('export {') && line.includes('Service'));
28
+
29
+ const services = exportLines
30
+ .map((line) => {
31
+ const match = line.match(/export { (\w+) } from/);
32
+ return match?.[1];
33
+ })
34
+ .filter(Boolean) as string[];
35
+
36
+ // Extract type exports for the types.ts file
37
+ const typeLines = contents
38
+ .split('\n')
39
+ .filter(
40
+ (line) => line.startsWith('export type {') && line.includes('models')
41
+ );
42
+
43
+ const typeExports = typeLines
44
+ .map((line) => {
45
+ const match = line.match(
46
+ /export type { (\w+) } from '\.\/models\/(\w+)'/
47
+ );
48
+ if (match) {
49
+ return `export type { ${match[1]} } from './models/${match[2]}';`;
50
+ }
51
+ return null;
52
+ })
53
+ .filter(Boolean) as string[];
54
+
55
+ // Generate types.ts file
56
+ let typesOutput = `// AUTO-GENERATED FILE – DO NOT EDIT\n`;
57
+ typesOutput += `// Re-export all types as a namespace\n\n`;
58
+ typesOutput += typeExports.join('\n') + '\n';
59
+ fs.writeFileSync(GENERATED_TYPES, typesOutput);
60
+ console.log(`✅ Wrote types to: ${GENERATED_TYPES}`);
61
+
62
+ const imports = services.map(
63
+ (service) => `import { ${service} } from "../generated/${serviceName}";`
64
+ );
65
+
66
+ const objectName = serviceName.toLowerCase();
67
+ const typesNamespace =
68
+ serviceName.charAt(0).toUpperCase() + serviceName.slice(1) + 'Types';
69
+
70
+ let output = `// AUTO-GENERATED FILE – DO NOT EDIT\n\n`;
71
+
72
+ if (services.length === 1) {
73
+ output += `import { ${services[0]} } from "../generated/${serviceName}";\n\n`;
74
+ output += `export const ${objectName} = ${services[0]};\n\n`;
75
+ } else {
76
+ output += `${imports.join('\n')}\n\n`;
77
+ output += `export const ${objectName} = {\n`;
78
+ output += services
79
+ .map((s) => ` ${s.replace('Service', '').toLowerCase()}: ${s},`)
80
+ .join('\n');
81
+ output += `\n};\n\n`;
82
+ }
83
+
84
+ // Add type namespace re-export
85
+ output += `// Re-export all types as a namespace\n`;
86
+ output += `export * as ${typesNamespace} from "../generated/${serviceName}/types";\n`;
87
+
88
+ fs.writeFileSync(OUTPUT_FILE, output);
89
+ console.log(`✅ Wrote ${serviceName} definition to: ${OUTPUT_FILE}`);
package/test.ts CHANGED
@@ -1,13 +1,28 @@
1
- import { DRT } from ".";
2
-
3
- (async () => {
4
- const shopperGuid = "04974680-8FB9-4909-8AE68F04940714F1";
5
- const account = "508";
6
- const apiKey = "xxx-xxx";
7
-
8
- const root = await DRT.shopper.account.getRoot(shopperGuid, account, apiKey);
9
-
10
- console.log(root);
11
-
12
- console.log("All tests completed successfully.");
13
- })();
1
+ import { DRT, ShopperTypes, ScannerTypes } from '.';
2
+
3
+ // You can now access types via the exported namespaces
4
+ type MyAccount = ShopperTypes.Account;
5
+ type MyCart = ShopperTypes.Cart;
6
+ type MyEventDetails = ShopperTypes.EventDetails;
7
+ type MyScan = ScannerTypes.TicketScan;
8
+
9
+ // Use them in function signatures
10
+ const printCart = (cart: ShopperTypes.Cart) => {
11
+ console.log(cart);
12
+ };
13
+
14
+ (async () => {
15
+ const shopperGuid = '04974680-8FB9-4909-8AE68F04940714F1';
16
+ const account = '508';
17
+ const apiKey = 'xxx-xxx';
18
+
19
+ const root = await DRT.shopper.account.getRoot(
20
+ shopperGuid,
21
+ account,
22
+ apiKey
23
+ );
24
+
25
+ console.log(root);
26
+
27
+ console.log('All tests completed successfully.');
28
+ })();
package/tsconfig.cjs.json CHANGED
@@ -1,11 +1,11 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/cjs",
5
- "module": "CommonJS",
6
- "moduleResolution": "node",
7
- "declaration": true
8
- },
9
- "include": ["index.ts", "src/**/*.ts"],
10
- "exclude": ["dist", "node_modules"]
11
- }
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist/cjs",
5
+ "module": "CommonJS",
6
+ "moduleResolution": "node",
7
+ "declaration": true
8
+ },
9
+ "include": ["index.ts", "src/**/*.ts"],
10
+ "exclude": ["dist", "node_modules"]
11
+ }
package/tsconfig.esm.json CHANGED
@@ -1,11 +1,11 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/esm",
5
- "module": "ESNext",
6
- "moduleResolution": "node",
7
- "declaration": true
8
- },
9
- "include": ["index.ts", "src/**/*.ts"],
10
- "exclude": ["dist", "node_modules"]
11
- }
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist/esm",
5
+ "module": "ESNext",
6
+ "moduleResolution": "node",
7
+ "declaration": true
8
+ },
9
+ "include": ["index.ts", "src/**/*.ts"],
10
+ "exclude": ["dist", "node_modules"]
11
+ }
package/tsconfig.json CHANGED
@@ -1,16 +1,16 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2017" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
4
- "module": "commonjs" /* Specify what module code is generated. */,
5
- "rootDir": "." /* Specify the root folder within your source files. */,
6
- "moduleResolution": "node10" /* Specify how TypeScript looks up a file from a given module specifier. */,
7
- "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
8
- "outDir": "dist" /* Specify an output folder for all emitted files. */,
9
- "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
10
- "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
11
- "strict": true /* Enable all strict type-checking options. */,
12
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
13
- },
14
- "include": ["index.ts", "src/**/*.ts"],
15
- "exclude": ["dist", "node_modules"]
16
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2017" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
4
+ "module": "commonjs" /* Specify what module code is generated. */,
5
+ "rootDir": "." /* Specify the root folder within your source files. */,
6
+ "moduleResolution": "node10" /* Specify how TypeScript looks up a file from a given module specifier. */,
7
+ "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
8
+ "outDir": "dist" /* Specify an output folder for all emitted files. */,
9
+ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
10
+ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
11
+ "strict": true /* Enable all strict type-checking options. */,
12
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
13
+ },
14
+ "include": ["index.ts", "src/**/*.ts"],
15
+ "exclude": ["dist", "node_modules"]
16
+ }