@51eat/sdk 0.0.47 → 0.0.49

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 (134) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +13 -8
  4. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.ts +1 -0
  5. package/dist/cjs/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.ts +2 -1
  6. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.d.ts +15 -23
  7. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js +46 -63
  8. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest.d.ts +2 -3
  9. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/StoreTicketOrderRequest.d.ts +1 -3
  10. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.ts +14 -8
  11. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.ts +1 -1
  12. package/dist/cjs/api/resources/customer/resources/me/client/Client.d.ts +3 -0
  13. package/dist/cjs/api/resources/customer/resources/me/client/Client.js +9 -4
  14. package/dist/cjs/api/resources/customer/resources/me/resources/index.d.ts +3 -0
  15. package/dist/cjs/api/resources/customer/resources/me/resources/index.js +4 -1
  16. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/Client.d.ts +88 -0
  17. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/Client.js +329 -0
  18. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/index.js +17 -0
  20. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.d.ts +9 -0
  21. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.js +3 -0
  22. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.d.ts +9 -0
  23. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.js +3 -0
  24. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.d.ts +10 -0
  25. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.js +3 -0
  26. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.d.ts +3 -0
  27. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.js +2 -0
  28. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/exports.d.ts +2 -0
  29. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/exports.js +21 -0
  30. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/index.d.ts +2 -0
  31. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/index.js +18 -0
  32. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.d.ts +4 -0
  33. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.js +3 -0
  34. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.d.ts +4 -0
  35. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.js +3 -0
  36. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.d.ts +3 -0
  37. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.js +3 -0
  38. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/index.d.ts +3 -0
  39. package/dist/cjs/api/resources/customer/resources/me/resources/paymentMethods/types/index.js +19 -0
  40. package/dist/cjs/api/resources/customerEvents/client/Client.d.ts +29 -0
  41. package/dist/cjs/api/resources/customerEvents/client/Client.js +111 -0
  42. package/dist/cjs/api/resources/customerEvents/client/index.d.ts +1 -0
  43. package/dist/cjs/api/resources/customerEvents/client/index.js +17 -0
  44. package/dist/cjs/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.d.ts +11 -0
  45. package/dist/cjs/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.js +3 -0
  46. package/dist/cjs/api/resources/customerEvents/client/requests/index.d.ts +1 -0
  47. package/dist/cjs/api/resources/customerEvents/client/requests/index.js +2 -0
  48. package/dist/cjs/api/resources/customerEvents/exports.d.ts +2 -0
  49. package/dist/cjs/api/resources/customerEvents/exports.js +21 -0
  50. package/dist/cjs/api/resources/customerEvents/index.d.ts +1 -0
  51. package/dist/cjs/api/resources/customerEvents/index.js +17 -0
  52. package/dist/cjs/api/resources/index.d.ts +2 -0
  53. package/dist/cjs/api/resources/index.js +3 -1
  54. package/dist/cjs/api/types/BusinessEventOrder.d.ts +2 -10
  55. package/dist/cjs/api/types/BusinessEventOrderDetail.d.ts +2 -12
  56. package/dist/cjs/api/types/BusinessProductOrder.d.ts +1 -9
  57. package/dist/cjs/api/types/CustomerProductOrder.d.ts +1 -5
  58. package/dist/cjs/api/types/PaymentMethod.d.ts +8 -0
  59. package/dist/cjs/api/types/PaymentMethod.js +3 -0
  60. package/dist/cjs/api/types/TicketOrder.d.ts +1 -7
  61. package/dist/cjs/api/types/Transaction.d.ts +16 -0
  62. package/dist/cjs/api/types/Transaction.js +3 -0
  63. package/dist/cjs/api/types/index.d.ts +2 -0
  64. package/dist/cjs/api/types/index.js +2 -0
  65. package/dist/cjs/version.d.ts +1 -1
  66. package/dist/cjs/version.js +1 -1
  67. package/dist/esm/BaseClient.mjs +2 -2
  68. package/dist/esm/Client.d.mts +3 -0
  69. package/dist/esm/Client.mjs +5 -0
  70. package/dist/esm/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.mts +1 -0
  71. package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts +2 -1
  72. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.d.mts +15 -23
  73. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.mjs +46 -63
  74. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest.d.mts +2 -3
  75. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/StoreTicketOrderRequest.d.mts +1 -3
  76. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.mts +14 -8
  77. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.mts +1 -1
  78. package/dist/esm/api/resources/customer/resources/me/client/Client.d.mts +3 -0
  79. package/dist/esm/api/resources/customer/resources/me/client/Client.mjs +5 -0
  80. package/dist/esm/api/resources/customer/resources/me/resources/index.d.mts +3 -0
  81. package/dist/esm/api/resources/customer/resources/me/resources/index.mjs +3 -0
  82. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/Client.d.mts +88 -0
  83. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/Client.mjs +292 -0
  84. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/index.d.mts +1 -0
  85. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/index.mjs +1 -0
  86. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.d.mts +9 -0
  87. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/DeletePaymentMethodsRequest.mjs +2 -0
  88. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.d.mts +9 -0
  89. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/SetDefaultPaymentMethodsRequest.mjs +2 -0
  90. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.d.mts +10 -0
  91. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/StorePaymentMethodRequest.mjs +2 -0
  92. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.d.mts +3 -0
  93. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/client/requests/index.mjs +1 -0
  94. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/exports.d.mts +2 -0
  95. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/exports.mjs +3 -0
  96. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/index.d.mts +2 -0
  97. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/index.mjs +2 -0
  98. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.d.mts +4 -0
  99. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/AddPaymentMethodsResponse.mjs +2 -0
  100. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.d.mts +4 -0
  101. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetDefaultPaymentMethodsResponse.mjs +2 -0
  102. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.d.mts +3 -0
  103. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/SetupIntentPaymentMethodsResponse.mjs +2 -0
  104. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/index.d.mts +3 -0
  105. package/dist/esm/api/resources/customer/resources/me/resources/paymentMethods/types/index.mjs +3 -0
  106. package/dist/esm/api/resources/customerEvents/client/Client.d.mts +29 -0
  107. package/dist/esm/api/resources/customerEvents/client/Client.mjs +74 -0
  108. package/dist/esm/api/resources/customerEvents/client/index.d.mts +1 -0
  109. package/dist/esm/api/resources/customerEvents/client/index.mjs +1 -0
  110. package/dist/esm/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.d.mts +11 -0
  111. package/dist/esm/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.mjs +2 -0
  112. package/dist/esm/api/resources/customerEvents/client/requests/index.d.mts +1 -0
  113. package/dist/esm/api/resources/customerEvents/client/requests/index.mjs +1 -0
  114. package/dist/esm/api/resources/customerEvents/exports.d.mts +2 -0
  115. package/dist/esm/api/resources/customerEvents/exports.mjs +3 -0
  116. package/dist/esm/api/resources/customerEvents/index.d.mts +1 -0
  117. package/dist/esm/api/resources/customerEvents/index.mjs +1 -0
  118. package/dist/esm/api/resources/index.d.mts +2 -0
  119. package/dist/esm/api/resources/index.mjs +2 -0
  120. package/dist/esm/api/types/BusinessEventOrder.d.mts +2 -10
  121. package/dist/esm/api/types/BusinessEventOrderDetail.d.mts +2 -12
  122. package/dist/esm/api/types/BusinessProductOrder.d.mts +1 -9
  123. package/dist/esm/api/types/CustomerProductOrder.d.mts +1 -5
  124. package/dist/esm/api/types/PaymentMethod.d.mts +8 -0
  125. package/dist/esm/api/types/PaymentMethod.mjs +2 -0
  126. package/dist/esm/api/types/TicketOrder.d.mts +1 -7
  127. package/dist/esm/api/types/Transaction.d.mts +16 -0
  128. package/dist/esm/api/types/Transaction.mjs +2 -0
  129. package/dist/esm/api/types/index.d.mts +2 -0
  130. package/dist/esm/api/types/index.mjs +2 -0
  131. package/dist/esm/version.d.mts +1 -1
  132. package/dist/esm/version.mjs +1 -1
  133. package/package.json +23 -1
  134. package/reference.md +400 -40
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.CustomerEventsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../errors/index.js"));
53
+ const FiveOneEat = __importStar(require("../../../index.js"));
54
+ class CustomerEventsClient {
55
+ constructor(options = {}) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Release the TicketCart holds for the authenticated user and event.
60
+ *
61
+ * @param {FiveOneEat.ReleaseTicketHoldRequest} request
62
+ * @param {CustomerEventsClient.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link FiveOneEat.UnauthorizedError}
65
+ *
66
+ * @example
67
+ * await client.customerEvents.releaseTicketHold({
68
+ * eventId: "eventId",
69
+ * cartId: "cartId"
70
+ * })
71
+ */
72
+ releaseTicketHold(request, requestOptions) {
73
+ return core.HttpResponsePromise.fromPromise(this.__releaseTicketHold(request, requestOptions));
74
+ }
75
+ __releaseTicketHold(request, requestOptions) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
78
+ const { eventId, cartId } = request;
79
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
80
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
81
+ const _response = yield core.fetcher({
82
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/events/${core.url.encodePathParam(eventId)}/ticket-holds/${core.url.encodePathParam(cartId)}`),
83
+ method: "DELETE",
84
+ headers: _headers,
85
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
86
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
87
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
88
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
89
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
90
+ logging: this._options.logging,
91
+ });
92
+ if (_response.ok) {
93
+ return { data: undefined, rawResponse: _response.rawResponse };
94
+ }
95
+ if (_response.error.reason === "status-code") {
96
+ switch (_response.error.statusCode) {
97
+ case 401:
98
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
99
+ default:
100
+ throw new errors.FiveOneEatError({
101
+ statusCode: _response.error.statusCode,
102
+ body: _response.error.body,
103
+ rawResponse: _response.rawResponse,
104
+ });
105
+ }
106
+ }
107
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/customer/events/{eventId}/ticket-holds/{cartId}");
108
+ });
109
+ }
110
+ }
111
+ exports.CustomerEventsClient = CustomerEventsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * eventId: "eventId",
5
+ * cartId: "cartId"
6
+ * }
7
+ */
8
+ export interface ReleaseTicketHoldRequest {
9
+ eventId: string;
10
+ cartId: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { ReleaseTicketHoldRequest } from "./ReleaseTicketHoldRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { CustomerEventsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.CustomerEventsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "CustomerEventsClient", { enumerable: true, get: function () { return Client_js_1.CustomerEventsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -8,6 +8,8 @@ export * from "./businessProducts/types/index.js";
8
8
  export * from "./customer/client/requests/index.js";
9
9
  export * as customer from "./customer/index.js";
10
10
  export * from "./customer/types/index.js";
11
+ export * from "./customerEvents/client/requests/index.js";
12
+ export * as customerEvents from "./customerEvents/index.js";
11
13
  export * from "./customerMessaging/client/requests/index.js";
12
14
  export * as customerMessaging from "./customerMessaging/index.js";
13
15
  export * from "./customerMessaging/types/index.js";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.serveAd = exports.recordClick = exports.customerMyAccount = exports.customerMessaging = exports.customer = exports.businessProducts = exports.businessMessaging = exports.business = void 0;
39
+ exports.serveAd = exports.recordClick = exports.customerMyAccount = exports.customerMessaging = exports.customerEvents = exports.customer = exports.businessProducts = exports.businessMessaging = exports.business = void 0;
40
40
  exports.business = __importStar(require("./business/index.js"));
41
41
  __exportStar(require("./businessMessaging/client/requests/index.js"), exports);
42
42
  exports.businessMessaging = __importStar(require("./businessMessaging/index.js"));
@@ -47,6 +47,8 @@ __exportStar(require("./businessProducts/types/index.js"), exports);
47
47
  __exportStar(require("./customer/client/requests/index.js"), exports);
48
48
  exports.customer = __importStar(require("./customer/index.js"));
49
49
  __exportStar(require("./customer/types/index.js"), exports);
50
+ __exportStar(require("./customerEvents/client/requests/index.js"), exports);
51
+ exports.customerEvents = __importStar(require("./customerEvents/index.js"));
50
52
  __exportStar(require("./customerMessaging/client/requests/index.js"), exports);
51
53
  exports.customerMessaging = __importStar(require("./customerMessaging/index.js"));
52
54
  __exportStar(require("./customerMessaging/types/index.js"), exports);
@@ -1,17 +1,9 @@
1
+ import type * as FiveOneEat from "../index.js";
1
2
  export interface BusinessEventOrder {
2
3
  id: string;
3
4
  event_id: string;
4
5
  order_number: string;
5
- status: string;
6
- subtotal: string;
7
- fees: string;
8
- total_amount: string;
9
- refunded_amount: string;
10
- remaining_refundable_amount: string;
11
- customer_name: string;
12
- customer_email: string;
13
- payment_completed_at: string;
14
- refunded_at: string;
6
+ transaction?: FiveOneEat.Transaction | undefined;
15
7
  tickets_count?: number | undefined;
16
8
  user?: BusinessEventOrder.User | undefined;
17
9
  created_at: string;
@@ -1,19 +1,9 @@
1
+ import type * as FiveOneEat from "../index.js";
1
2
  export interface BusinessEventOrderDetail {
2
3
  id: string;
3
4
  event_id: string;
4
5
  order_number: string;
5
- status: string;
6
- subtotal: string;
7
- fees: string;
8
- total_amount: string;
9
- refunded_amount: string;
10
- remaining_refundable_amount: string;
11
- customer_name: string;
12
- customer_email: string;
13
- stripe_payment_intent_id: string;
14
- payment_completed_at: string;
15
- refunded_at: string;
16
- refund_reason: string;
6
+ transaction?: FiveOneEat.Transaction | undefined;
17
7
  user?: BusinessEventOrderDetail.User | undefined;
18
8
  tickets?: string | undefined;
19
9
  created_at: string;
@@ -6,14 +6,8 @@ export interface BusinessProductOrder {
6
6
  fulfillment_status: string;
7
7
  fulfillment_method: string | null;
8
8
  fulfillment_type: string | null;
9
- subtotal: number;
10
- tax_amount: number;
11
- shipping_amount: number;
12
9
  discount_amount: number;
13
- total_amount: number;
14
- refunded_amount: number;
15
- customer_email: string;
16
- customer_name: string;
10
+ transaction?: FiveOneEat.Transaction | undefined;
17
11
  customer_phone: string | null;
18
12
  shipping_address: Record<string, unknown> | null;
19
13
  billing_address: Record<string, unknown> | null;
@@ -24,10 +18,8 @@ export interface BusinessProductOrder {
24
18
  user?: BusinessProductOrder.User | undefined;
25
19
  items?: FiveOneEat.BusinessProductOrderItem[] | undefined;
26
20
  shipment?: (BusinessProductOrder.Shipment | null) | undefined;
27
- payment_completed_at: string | null;
28
21
  fulfilled_at: string | null;
29
22
  picked_up_at: string | null;
30
- refunded_at: string | null;
31
23
  created_at: string | null;
32
24
  updated_at: string | null;
33
25
  }
@@ -5,18 +5,14 @@ export interface CustomerProductOrder {
5
5
  status: string;
6
6
  fulfillment_status: string;
7
7
  fulfillment_method: string;
8
- subtotal: string;
9
- tax_amount: string;
10
- shipping_amount: string;
11
8
  discount_amount: string;
12
- total_amount: string;
9
+ transaction?: FiveOneEat.Transaction | undefined;
13
10
  tracking_number: string | null;
14
11
  tracking_url: string | null;
15
12
  shipping_address: unknown[] | null;
16
13
  billing_address: unknown[] | null;
17
14
  business?: CustomerProductOrder.Business | undefined;
18
15
  items?: FiveOneEat.CustomerProductOrderItem[] | undefined;
19
- payment_completed_at: string | null;
20
16
  fulfilled_at: string | null;
21
17
  created_at: string | null;
22
18
  }
@@ -0,0 +1,8 @@
1
+ export interface PaymentMethod {
2
+ id: string;
3
+ brand: string;
4
+ last4: string;
5
+ exp_month: number;
6
+ exp_year: number;
7
+ is_default: boolean;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,12 +2,6 @@ import type * as FiveOneEat from "../index.js";
2
2
  export interface TicketOrder {
3
3
  id: string;
4
4
  order_number: string;
5
- status: string;
6
- subtotal: string;
7
- fees: string;
8
- total_amount: string;
9
- customer_name: string;
10
- customer_email: string;
11
- payment_completed_at: string;
5
+ transaction?: FiveOneEat.Transaction | undefined;
12
6
  tickets?: FiveOneEat.Ticket[] | undefined;
13
7
  }
@@ -0,0 +1,16 @@
1
+ export interface Transaction {
2
+ ulid: string;
3
+ status: string;
4
+ subtotal: string;
5
+ tax_amount: string;
6
+ shipping_amount: string;
7
+ platform_fee: string;
8
+ total_amount: string;
9
+ refunded_amount: string;
10
+ customer_name: string | null;
11
+ customer_email: string;
12
+ stripe_payment_intent_id: string | null;
13
+ payment_completed_at: string | null;
14
+ refunded_at: string | null;
15
+ refund_reason: string | null;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -124,6 +124,7 @@ export * from "./MenuItemSearchResult.js";
124
124
  export * from "./Message.js";
125
125
  export * from "./NotFoundErrorBody.js";
126
126
  export * from "./PaginationResource.js";
127
+ export * from "./PaymentMethod.js";
127
128
  export * from "./ProductSearchResult.js";
128
129
  export * from "./ReorderProductImagesRequest.js";
129
130
  export * from "./RsvpEvent.js";
@@ -137,5 +138,6 @@ export * from "./Ticket.js";
137
138
  export * from "./TicketOrder.js";
138
139
  export * from "./TicketOrderResponse.js";
139
140
  export * from "./TicketResponse.js";
141
+ export * from "./Transaction.js";
140
142
  export * from "./UnauthorizedErrorBody.js";
141
143
  export * from "./UnprocessableEntityErrorBody.js";
@@ -140,6 +140,7 @@ __exportStar(require("./MenuItemSearchResult.js"), exports);
140
140
  __exportStar(require("./Message.js"), exports);
141
141
  __exportStar(require("./NotFoundErrorBody.js"), exports);
142
142
  __exportStar(require("./PaginationResource.js"), exports);
143
+ __exportStar(require("./PaymentMethod.js"), exports);
143
144
  __exportStar(require("./ProductSearchResult.js"), exports);
144
145
  __exportStar(require("./ReorderProductImagesRequest.js"), exports);
145
146
  __exportStar(require("./RsvpEvent.js"), exports);
@@ -153,5 +154,6 @@ __exportStar(require("./Ticket.js"), exports);
153
154
  __exportStar(require("./TicketOrder.js"), exports);
154
155
  __exportStar(require("./TicketOrderResponse.js"), exports);
155
156
  __exportStar(require("./TicketResponse.js"), exports);
157
+ __exportStar(require("./Transaction.js"), exports);
156
158
  __exportStar(require("./UnauthorizedErrorBody.js"), exports);
157
159
  __exportStar(require("./UnprocessableEntityErrorBody.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.47";
1
+ export declare const SDK_VERSION = "0.0.49";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.47";
4
+ exports.SDK_VERSION = "0.0.49";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@51eat/sdk",
9
- "X-Fern-SDK-Version": "0.0.47",
10
- "User-Agent": "@51eat/sdk/0.0.47",
9
+ "X-Fern-SDK-Version": "0.0.49",
10
+ "User-Agent": "@51eat/sdk/0.0.49",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -2,6 +2,7 @@ import { BusinessClient } from "./api/resources/business/client/Client.mjs";
2
2
  import { BusinessMessagingClient } from "./api/resources/businessMessaging/client/Client.mjs";
3
3
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.mjs";
4
4
  import { CustomerClient } from "./api/resources/customer/client/Client.mjs";
5
+ import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.mjs";
5
6
  import { CustomerMessagingClient } from "./api/resources/customerMessaging/client/Client.mjs";
6
7
  import { CustomerMyAccountClient } from "./api/resources/customerMyAccount/client/Client.mjs";
7
8
  import { RecordClickClient } from "./api/resources/recordClick/client/Client.mjs";
@@ -18,6 +19,7 @@ export declare class FiveOneEatClient {
18
19
  protected readonly _options: NormalizedClientOptionsWithAuth<FiveOneEatClient.Options>;
19
20
  protected _businessMessaging: BusinessMessagingClient | undefined;
20
21
  protected _businessProducts: BusinessProductsClient | undefined;
22
+ protected _customerEvents: CustomerEventsClient | undefined;
21
23
  protected _customerMessaging: CustomerMessagingClient | undefined;
22
24
  protected _customerMyAccount: CustomerMyAccountClient | undefined;
23
25
  protected _customer: CustomerClient | undefined;
@@ -27,6 +29,7 @@ export declare class FiveOneEatClient {
27
29
  constructor(options?: FiveOneEatClient.Options);
28
30
  get businessMessaging(): BusinessMessagingClient;
29
31
  get businessProducts(): BusinessProductsClient;
32
+ get customerEvents(): CustomerEventsClient;
30
33
  get customerMessaging(): CustomerMessagingClient;
31
34
  get customerMyAccount(): CustomerMyAccountClient;
32
35
  get customer(): CustomerClient;
@@ -12,6 +12,7 @@ import { BusinessClient } from "./api/resources/business/client/Client.mjs";
12
12
  import { BusinessMessagingClient } from "./api/resources/businessMessaging/client/Client.mjs";
13
13
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.mjs";
14
14
  import { CustomerClient } from "./api/resources/customer/client/Client.mjs";
15
+ import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.mjs";
15
16
  import { CustomerMessagingClient } from "./api/resources/customerMessaging/client/Client.mjs";
16
17
  import { CustomerMyAccountClient } from "./api/resources/customerMyAccount/client/Client.mjs";
17
18
  import { RecordClickClient } from "./api/resources/recordClick/client/Client.mjs";
@@ -30,6 +31,10 @@ export class FiveOneEatClient {
30
31
  var _a;
31
32
  return ((_a = this._businessProducts) !== null && _a !== void 0 ? _a : (this._businessProducts = new BusinessProductsClient(this._options)));
32
33
  }
34
+ get customerEvents() {
35
+ var _a;
36
+ return ((_a = this._customerEvents) !== null && _a !== void 0 ? _a : (this._customerEvents = new CustomerEventsClient(this._options)));
37
+ }
33
38
  get customerMessaging() {
34
39
  var _a;
35
40
  return ((_a = this._customerMessaging) !== null && _a !== void 0 ? _a : (this._customerMessaging = new CustomerMessagingClient(this._options)));
@@ -17,6 +17,7 @@ export interface CreatePaymentIntentRequest {
17
17
  fulfillment_method?: CreatePaymentIntentRequest.FulfillmentMethod | null;
18
18
  pickup_date?: CreatePaymentIntentRequest.PickupDate | null;
19
19
  pickup_time?: string | null;
20
+ payment_method_id?: string | null;
20
21
  billing_address: CreatePaymentIntentRequest.BillingAddress;
21
22
  shipping_address?: CreatePaymentIntentRequest.ShippingAddress;
22
23
  }
@@ -1,11 +1,12 @@
1
1
  export interface CreatePaymentIntentCartResponse {
2
+ status: string;
2
3
  client_secret: string;
3
4
  payment_intent_id: string;
4
5
  subtotal: string;
5
6
  tax_amount: string;
6
7
  tax_calculation: CreatePaymentIntentCartResponse.TaxCalculation | null;
7
8
  shipping_amount: string;
8
- shipping_method: string;
9
+ shipping_method: unknown | null;
9
10
  platform_fee: string;
10
11
  total_amount: string;
11
12
  }
@@ -31,23 +31,6 @@ export declare class TicketingClient {
31
31
  */
32
32
  holdTickets(request: FiveOneEat.customer.events.StoreTicketHoldRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.HoldTicketsTicketingResponse>;
33
33
  private __holdTickets;
34
- /**
35
- * Release all active holds for the given session, freeing the tickets for others.
36
- *
37
- * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
38
- * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
39
- *
40
- * @throws {@link FiveOneEat.UnauthorizedError}
41
- * @throws {@link FiveOneEat.NotFoundError}
42
- *
43
- * @example
44
- * await client.customer.events.ticketing.releaseHold({
45
- * eventId: "eventId",
46
- * sessionId: "sessionId"
47
- * })
48
- */
49
- releaseHold(request: FiveOneEat.customer.events.ReleaseHoldTicketingRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<void>;
50
- private __releaseHold;
51
34
  /**
52
35
  * Preview the subtotal, platform fee, and total for a given ticket selection.
53
36
  *
@@ -70,20 +53,18 @@ export declare class TicketingClient {
70
53
  calculatePrice(request: FiveOneEat.customer.events.CalculatePriceRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.CalculatePriceTicketingResponse>;
71
54
  private __calculatePrice;
72
55
  /**
73
- * Create a Stripe payment intent for the tickets held in the given session.
56
+ * Create a Stripe payment intent for the tickets held in the cart for the given event.
74
57
  * Returns a client_secret for the mobile app to confirm payment with Stripe.
75
58
  *
76
59
  * @param {FiveOneEat.customer.events.AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest} request
77
60
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
78
61
  *
79
62
  * @throws {@link FiveOneEat.UnauthorizedError}
80
- * @throws {@link FiveOneEat.NotFoundError}
81
63
  * @throws {@link FiveOneEat.UnprocessableEntityError}
82
64
  *
83
65
  * @example
84
66
  * await client.customer.events.ticketing.createPaymentIntent({
85
- * eventId: "eventId",
86
- * session_id: "session_id"
67
+ * eventId: "eventId"
87
68
  * })
88
69
  */
89
70
  createPaymentIntent(request: FiveOneEat.customer.events.AppHttpRequestsApiV1CustomerEventsCreatePaymentIntentRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.CreatePaymentIntentTicketingResponse>;
@@ -101,10 +82,21 @@ export declare class TicketingClient {
101
82
  * @example
102
83
  * await client.customer.events.ticketing.confirmOrder({
103
84
  * eventId: "eventId",
104
- * payment_intent_id: "payment_intent_id",
105
- * session_id: "session_id"
85
+ * payment_intent_id: "payment_intent_id"
106
86
  * })
107
87
  */
108
88
  confirmOrder(request: FiveOneEat.customer.events.StoreTicketOrderRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.events.ConfirmOrderTicketingResponse>;
109
89
  private __confirmOrder;
90
+ /**
91
+ * @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
92
+ * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
93
+ *
94
+ * @example
95
+ * await client.customer.events.ticketing.releaseHold({
96
+ * eventId: "eventId",
97
+ * sessionId: "sessionId"
98
+ * })
99
+ */
100
+ releaseHold(request: FiveOneEat.customer.events.ReleaseHoldTicketingRequest, requestOptions?: TicketingClient.RequestOptions): core.HttpResponsePromise<void>;
101
+ private __releaseHold;
110
102
  }