@51eat/sdk 0.0.33 → 0.0.34
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 +12 -16
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +0 -3
- package/dist/cjs/Client.js +6 -11
- package/dist/cjs/api/resources/customer/resources/events/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/events/resources/index.js +1 -0
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.d.ts +55 -14
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js +171 -53
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/ReleaseHoldTicketingRequest.d.ts +2 -2
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/index.d.ts +4 -4
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/index.d.ts +1 -0
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/index.js +1 -0
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.ts +11 -0
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.ts +4 -0
- package/dist/cjs/api/resources/{customerEvents/types/CreatePaymentIntentResponse.d.ts → customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.ts} +3 -3
- package/dist/{esm/api/resources/customerEvents/types/HoldTicketsResponse.d.mts → cjs/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.ts} +3 -3
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/types/index.js +4 -4
- package/dist/cjs/api/resources/index.d.ts +0 -3
- package/dist/cjs/api/resources/index.js +1 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +0 -3
- package/dist/esm/Client.mjs +0 -5
- package/dist/esm/api/resources/customer/resources/events/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/events/resources/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.d.mts +55 -14
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.mjs +171 -53
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/ReleaseHoldTicketingRequest.d.mts +2 -2
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/index.d.mts +4 -4
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/index.d.mts +1 -0
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/index.mjs +1 -0
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.mts +11 -0
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.mts +4 -0
- package/dist/esm/api/resources/{customerEvents/types/CreatePaymentIntentResponse.d.mts → customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.mts} +3 -3
- package/dist/{cjs/api/resources/customerEvents/types/HoldTicketsResponse.d.ts → esm/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.mts} +3 -3
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/index.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/index.mjs +4 -0
- package/dist/esm/api/resources/index.d.mts +0 -3
- package/dist/esm/api/resources/index.mjs +0 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -12
- package/reference.md +96 -353
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/CalculatePriceTicketingRequest.d.ts +0 -9
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/ConfirmOrderTicketingRequest.d.ts +0 -9
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/CreatePaymentIntentTicketingRequest.d.ts +0 -9
- package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/HoldTicketsTicketingRequest.d.ts +0 -9
- package/dist/cjs/api/resources/customerEvents/client/Client.d.ts +0 -110
- package/dist/cjs/api/resources/customerEvents/client/Client.js +0 -384
- package/dist/cjs/api/resources/customerEvents/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/customerEvents/client/index.js +0 -17
- package/dist/cjs/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.d.ts +0 -11
- package/dist/cjs/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.js +0 -3
- package/dist/cjs/api/resources/customerEvents/client/requests/index.d.ts +0 -5
- package/dist/cjs/api/resources/customerEvents/client/requests/index.js +0 -2
- package/dist/cjs/api/resources/customerEvents/exports.d.ts +0 -2
- package/dist/cjs/api/resources/customerEvents/exports.js +0 -21
- package/dist/cjs/api/resources/customerEvents/index.d.ts +0 -2
- package/dist/cjs/api/resources/customerEvents/index.js +0 -18
- package/dist/cjs/api/resources/customerEvents/types/CalculateTicketPriceResponse.d.ts +0 -11
- package/dist/cjs/api/resources/customerEvents/types/CalculateTicketPriceResponse.js +0 -3
- package/dist/cjs/api/resources/customerEvents/types/ConfirmTicketOrderResponse.d.ts +0 -4
- package/dist/cjs/api/resources/customerEvents/types/ConfirmTicketOrderResponse.js +0 -3
- package/dist/cjs/api/resources/customerEvents/types/CreatePaymentIntentResponse.js +0 -3
- package/dist/cjs/api/resources/customerEvents/types/HoldTicketsResponse.js +0 -3
- package/dist/cjs/api/resources/customerEvents/types/index.d.ts +0 -4
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/CalculatePriceTicketingRequest.d.mts +0 -9
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/ConfirmOrderTicketingRequest.d.mts +0 -9
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/CreatePaymentIntentTicketingRequest.d.mts +0 -9
- package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/HoldTicketsTicketingRequest.d.mts +0 -9
- package/dist/esm/api/resources/customerEvents/client/Client.d.mts +0 -110
- package/dist/esm/api/resources/customerEvents/client/Client.mjs +0 -347
- package/dist/esm/api/resources/customerEvents/client/index.d.mts +0 -1
- package/dist/esm/api/resources/customerEvents/client/index.mjs +0 -1
- package/dist/esm/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.d.mts +0 -11
- package/dist/esm/api/resources/customerEvents/client/requests/ReleaseTicketHoldRequest.mjs +0 -2
- package/dist/esm/api/resources/customerEvents/client/requests/index.d.mts +0 -5
- package/dist/esm/api/resources/customerEvents/client/requests/index.mjs +0 -1
- package/dist/esm/api/resources/customerEvents/exports.d.mts +0 -2
- package/dist/esm/api/resources/customerEvents/exports.mjs +0 -3
- package/dist/esm/api/resources/customerEvents/index.d.mts +0 -2
- package/dist/esm/api/resources/customerEvents/index.mjs +0 -2
- package/dist/esm/api/resources/customerEvents/types/CalculateTicketPriceResponse.d.mts +0 -11
- package/dist/esm/api/resources/customerEvents/types/CalculateTicketPriceResponse.mjs +0 -2
- package/dist/esm/api/resources/customerEvents/types/ConfirmTicketOrderResponse.d.mts +0 -4
- package/dist/esm/api/resources/customerEvents/types/ConfirmTicketOrderResponse.mjs +0 -2
- package/dist/esm/api/resources/customerEvents/types/CreatePaymentIntentResponse.mjs +0 -2
- package/dist/esm/api/resources/customerEvents/types/HoldTicketsResponse.mjs +0 -2
- package/dist/esm/api/resources/customerEvents/types/index.d.mts +0 -4
- package/dist/esm/api/resources/customerEvents/types/index.mjs +0 -4
- /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CalculatePriceRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CalculatePriceRequest.js +0 -0
- /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CreatePaymentIntentRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CreatePaymentIntentRequest.js +0 -0
- /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketHoldRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketHoldRequest.js +0 -0
- /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketOrderRequest.d.ts +0 -0
- /package/dist/cjs/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketOrderRequest.js +0 -0
- /package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/{client/requests/CalculatePriceTicketingRequest.js → types/CalculatePriceTicketingResponse.js} +0 -0
- /package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/{client/requests/ConfirmOrderTicketingRequest.js → types/ConfirmOrderTicketingResponse.js} +0 -0
- /package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/{client/requests/CreatePaymentIntentTicketingRequest.js → types/CreatePaymentIntentTicketingResponse.js} +0 -0
- /package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/{client/requests/HoldTicketsTicketingRequest.js → types/HoldTicketsTicketingResponse.js} +0 -0
- /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CalculatePriceRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CalculatePriceRequest.mjs +0 -0
- /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CreatePaymentIntentRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/CreatePaymentIntentRequest.mjs +0 -0
- /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketHoldRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketHoldRequest.mjs +0 -0
- /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketOrderRequest.d.mts +0 -0
- /package/dist/esm/api/resources/{customerEvents → customer/resources/events/resources/ticketing}/client/requests/StoreTicketOrderRequest.mjs +0 -0
- /package/dist/esm/api/resources/customer/resources/events/resources/ticketing/{client/requests/CalculatePriceTicketingRequest.mjs → types/CalculatePriceTicketingResponse.mjs} +0 -0
- /package/dist/esm/api/resources/customer/resources/events/resources/ticketing/{client/requests/ConfirmOrderTicketingRequest.mjs → types/ConfirmOrderTicketingResponse.mjs} +0 -0
- /package/dist/esm/api/resources/customer/resources/events/resources/ticketing/{client/requests/CreatePaymentIntentTicketingRequest.mjs → types/CreatePaymentIntentTicketingResponse.mjs} +0 -0
- /package/dist/esm/api/resources/customer/resources/events/resources/ticketing/{client/requests/HoldTicketsTicketingRequest.mjs → types/HoldTicketsTicketingResponse.mjs} +0 -0
package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js
CHANGED
|
@@ -42,6 +42,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
46
|
+
var t = {};
|
|
47
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
48
|
+
t[p] = s[p];
|
|
49
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
50
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
51
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
52
|
+
t[p[i]] = s[p[i]];
|
|
53
|
+
}
|
|
54
|
+
return t;
|
|
55
|
+
};
|
|
45
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
57
|
exports.TicketingClient = void 0;
|
|
47
58
|
const BaseClient_js_1 = require("../../../../../../../../BaseClient.js");
|
|
@@ -50,17 +61,28 @@ const core = __importStar(require("../../../../../../../../core/index.js"));
|
|
|
50
61
|
const environments = __importStar(require("../../../../../../../../environments.js"));
|
|
51
62
|
const handleNonStatusCodeError_js_1 = require("../../../../../../../../errors/handleNonStatusCodeError.js");
|
|
52
63
|
const errors = __importStar(require("../../../../../../../../errors/index.js"));
|
|
64
|
+
const FiveOneEat = __importStar(require("../../../../../../../index.js"));
|
|
53
65
|
class TicketingClient {
|
|
54
66
|
constructor(options = {}) {
|
|
55
67
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
56
68
|
}
|
|
57
69
|
/**
|
|
58
|
-
*
|
|
70
|
+
* Place a temporary hold on tickets for the specified event. Holds expire after 10 minutes.
|
|
71
|
+
*
|
|
72
|
+
* @param {FiveOneEat.customer.events.StoreTicketHoldRequest} request
|
|
59
73
|
* @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
74
|
*
|
|
75
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
76
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
77
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
78
|
+
*
|
|
61
79
|
* @example
|
|
62
80
|
* await client.customer.events.ticketing.holdTickets({
|
|
63
|
-
*
|
|
81
|
+
* eventId: "eventId",
|
|
82
|
+
* tickets: [{
|
|
83
|
+
* ticket_type_id: "ticket_type_id",
|
|
84
|
+
* quantity: 1
|
|
85
|
+
* }]
|
|
64
86
|
* })
|
|
65
87
|
*/
|
|
66
88
|
holdTickets(request, requestOptions) {
|
|
@@ -69,14 +91,17 @@ class TicketingClient {
|
|
|
69
91
|
__holdTickets(request, requestOptions) {
|
|
70
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
93
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
72
|
-
const {
|
|
94
|
+
const { eventId } = request, _body = __rest(request, ["eventId"]);
|
|
73
95
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
74
96
|
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);
|
|
75
97
|
const _response = yield core.fetcher({
|
|
76
|
-
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(
|
|
98
|
+
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`),
|
|
77
99
|
method: "POST",
|
|
78
100
|
headers: _headers,
|
|
101
|
+
contentType: "application/json",
|
|
79
102
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
103
|
+
requestType: "json",
|
|
104
|
+
body: _body,
|
|
80
105
|
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,
|
|
81
106
|
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,
|
|
82
107
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -84,25 +109,42 @@ class TicketingClient {
|
|
|
84
109
|
logging: this._options.logging,
|
|
85
110
|
});
|
|
86
111
|
if (_response.ok) {
|
|
87
|
-
return {
|
|
112
|
+
return {
|
|
113
|
+
data: _response.body,
|
|
114
|
+
rawResponse: _response.rawResponse,
|
|
115
|
+
};
|
|
88
116
|
}
|
|
89
117
|
if (_response.error.reason === "status-code") {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
118
|
+
switch (_response.error.statusCode) {
|
|
119
|
+
case 401:
|
|
120
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
121
|
+
case 404:
|
|
122
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
123
|
+
case 422:
|
|
124
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
125
|
+
default:
|
|
126
|
+
throw new errors.FiveOneEatError({
|
|
127
|
+
statusCode: _response.error.statusCode,
|
|
128
|
+
body: _response.error.body,
|
|
129
|
+
rawResponse: _response.rawResponse,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
95
132
|
}
|
|
96
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/events/{
|
|
133
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/events/{eventId}/ticket-holds");
|
|
97
134
|
});
|
|
98
135
|
}
|
|
99
136
|
/**
|
|
137
|
+
* Release all active holds for the given session, freeing the tickets for others.
|
|
138
|
+
*
|
|
100
139
|
* @param {FiveOneEat.customer.events.ReleaseHoldTicketingRequest} request
|
|
101
140
|
* @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
102
141
|
*
|
|
142
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
143
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
144
|
+
*
|
|
103
145
|
* @example
|
|
104
146
|
* await client.customer.events.ticketing.releaseHold({
|
|
105
|
-
*
|
|
147
|
+
* eventId: "eventId",
|
|
106
148
|
* sessionId: "sessionId"
|
|
107
149
|
* })
|
|
108
150
|
*/
|
|
@@ -112,11 +154,11 @@ class TicketingClient {
|
|
|
112
154
|
__releaseHold(request, requestOptions) {
|
|
113
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
114
156
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
115
|
-
const {
|
|
157
|
+
const { eventId, sessionId } = request;
|
|
116
158
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
117
159
|
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);
|
|
118
160
|
const _response = yield core.fetcher({
|
|
119
|
-
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(
|
|
161
|
+
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(sessionId)}`),
|
|
120
162
|
method: "DELETE",
|
|
121
163
|
headers: _headers,
|
|
122
164
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -130,22 +172,39 @@ class TicketingClient {
|
|
|
130
172
|
return { data: undefined, rawResponse: _response.rawResponse };
|
|
131
173
|
}
|
|
132
174
|
if (_response.error.reason === "status-code") {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
175
|
+
switch (_response.error.statusCode) {
|
|
176
|
+
case 401:
|
|
177
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
178
|
+
case 404:
|
|
179
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
180
|
+
default:
|
|
181
|
+
throw new errors.FiveOneEatError({
|
|
182
|
+
statusCode: _response.error.statusCode,
|
|
183
|
+
body: _response.error.body,
|
|
184
|
+
rawResponse: _response.rawResponse,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
138
187
|
}
|
|
139
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/customer/events/{
|
|
188
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/customer/events/{eventId}/ticket-holds/{sessionId}");
|
|
140
189
|
});
|
|
141
190
|
}
|
|
142
191
|
/**
|
|
143
|
-
*
|
|
192
|
+
* Preview the subtotal, platform fee, and total for a given ticket selection.
|
|
193
|
+
*
|
|
194
|
+
* @param {FiveOneEat.customer.events.CalculatePriceRequest} request
|
|
144
195
|
* @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
145
196
|
*
|
|
197
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
198
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
199
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
200
|
+
*
|
|
146
201
|
* @example
|
|
147
202
|
* await client.customer.events.ticketing.calculatePrice({
|
|
148
|
-
*
|
|
203
|
+
* eventId: "eventId",
|
|
204
|
+
* tickets: [{
|
|
205
|
+
* ticket_type_id: "ticket_type_id",
|
|
206
|
+
* quantity: 1
|
|
207
|
+
* }]
|
|
149
208
|
* })
|
|
150
209
|
*/
|
|
151
210
|
calculatePrice(request, requestOptions) {
|
|
@@ -154,14 +213,17 @@ class TicketingClient {
|
|
|
154
213
|
__calculatePrice(request, requestOptions) {
|
|
155
214
|
return __awaiter(this, void 0, void 0, function* () {
|
|
156
215
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
157
|
-
const {
|
|
216
|
+
const { eventId } = request, _body = __rest(request, ["eventId"]);
|
|
158
217
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
159
218
|
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);
|
|
160
219
|
const _response = yield core.fetcher({
|
|
161
|
-
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(
|
|
220
|
+
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)}/calculate-price`),
|
|
162
221
|
method: "POST",
|
|
163
222
|
headers: _headers,
|
|
223
|
+
contentType: "application/json",
|
|
164
224
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
225
|
+
requestType: "json",
|
|
226
|
+
body: _body,
|
|
165
227
|
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,
|
|
166
228
|
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,
|
|
167
229
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -169,25 +231,45 @@ class TicketingClient {
|
|
|
169
231
|
logging: this._options.logging,
|
|
170
232
|
});
|
|
171
233
|
if (_response.ok) {
|
|
172
|
-
return {
|
|
234
|
+
return {
|
|
235
|
+
data: _response.body,
|
|
236
|
+
rawResponse: _response.rawResponse,
|
|
237
|
+
};
|
|
173
238
|
}
|
|
174
239
|
if (_response.error.reason === "status-code") {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
240
|
+
switch (_response.error.statusCode) {
|
|
241
|
+
case 401:
|
|
242
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
243
|
+
case 404:
|
|
244
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
245
|
+
case 422:
|
|
246
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
247
|
+
default:
|
|
248
|
+
throw new errors.FiveOneEatError({
|
|
249
|
+
statusCode: _response.error.statusCode,
|
|
250
|
+
body: _response.error.body,
|
|
251
|
+
rawResponse: _response.rawResponse,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
180
254
|
}
|
|
181
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/events/{
|
|
255
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/events/{eventId}/calculate-price");
|
|
182
256
|
});
|
|
183
257
|
}
|
|
184
258
|
/**
|
|
185
|
-
*
|
|
259
|
+
* Create a Stripe payment intent for the tickets held in the given session.
|
|
260
|
+
* Returns a client_secret for the mobile app to confirm payment with Stripe.
|
|
261
|
+
*
|
|
262
|
+
* @param {FiveOneEat.customer.events.CreatePaymentIntentRequest} request
|
|
186
263
|
* @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
187
264
|
*
|
|
265
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
266
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
267
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
268
|
+
*
|
|
188
269
|
* @example
|
|
189
270
|
* await client.customer.events.ticketing.createPaymentIntent({
|
|
190
|
-
*
|
|
271
|
+
* eventId: "eventId",
|
|
272
|
+
* session_id: "session_id"
|
|
191
273
|
* })
|
|
192
274
|
*/
|
|
193
275
|
createPaymentIntent(request, requestOptions) {
|
|
@@ -196,14 +278,17 @@ class TicketingClient {
|
|
|
196
278
|
__createPaymentIntent(request, requestOptions) {
|
|
197
279
|
return __awaiter(this, void 0, void 0, function* () {
|
|
198
280
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
199
|
-
const {
|
|
281
|
+
const { eventId } = request, _body = __rest(request, ["eventId"]);
|
|
200
282
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
201
283
|
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);
|
|
202
284
|
const _response = yield core.fetcher({
|
|
203
|
-
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(
|
|
285
|
+
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)}/payment-intent`),
|
|
204
286
|
method: "POST",
|
|
205
287
|
headers: _headers,
|
|
288
|
+
contentType: "application/json",
|
|
206
289
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
290
|
+
requestType: "json",
|
|
291
|
+
body: _body,
|
|
207
292
|
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,
|
|
208
293
|
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,
|
|
209
294
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -211,25 +296,45 @@ class TicketingClient {
|
|
|
211
296
|
logging: this._options.logging,
|
|
212
297
|
});
|
|
213
298
|
if (_response.ok) {
|
|
214
|
-
return {
|
|
299
|
+
return {
|
|
300
|
+
data: _response.body,
|
|
301
|
+
rawResponse: _response.rawResponse,
|
|
302
|
+
};
|
|
215
303
|
}
|
|
216
304
|
if (_response.error.reason === "status-code") {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
305
|
+
switch (_response.error.statusCode) {
|
|
306
|
+
case 401:
|
|
307
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
308
|
+
case 404:
|
|
309
|
+
throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
|
|
310
|
+
case 422:
|
|
311
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
312
|
+
default:
|
|
313
|
+
throw new errors.FiveOneEatError({
|
|
314
|
+
statusCode: _response.error.statusCode,
|
|
315
|
+
body: _response.error.body,
|
|
316
|
+
rawResponse: _response.rawResponse,
|
|
317
|
+
});
|
|
318
|
+
}
|
|
222
319
|
}
|
|
223
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/events/{
|
|
320
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/events/{eventId}/payment-intent");
|
|
224
321
|
});
|
|
225
322
|
}
|
|
226
323
|
/**
|
|
227
|
-
*
|
|
324
|
+
* Confirm a completed Stripe payment and create the ticket order.
|
|
325
|
+
* The payment must have succeeded before calling this endpoint.
|
|
326
|
+
*
|
|
327
|
+
* @param {FiveOneEat.customer.events.StoreTicketOrderRequest} request
|
|
228
328
|
* @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
229
329
|
*
|
|
330
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
331
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
332
|
+
*
|
|
230
333
|
* @example
|
|
231
334
|
* await client.customer.events.ticketing.confirmOrder({
|
|
232
|
-
*
|
|
335
|
+
* eventId: "eventId",
|
|
336
|
+
* payment_intent_id: "payment_intent_id",
|
|
337
|
+
* session_id: "session_id"
|
|
233
338
|
* })
|
|
234
339
|
*/
|
|
235
340
|
confirmOrder(request, requestOptions) {
|
|
@@ -238,14 +343,17 @@ class TicketingClient {
|
|
|
238
343
|
__confirmOrder(request, requestOptions) {
|
|
239
344
|
return __awaiter(this, void 0, void 0, function* () {
|
|
240
345
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
241
|
-
const {
|
|
346
|
+
const { eventId } = request, _body = __rest(request, ["eventId"]);
|
|
242
347
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
243
348
|
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);
|
|
244
349
|
const _response = yield core.fetcher({
|
|
245
|
-
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(
|
|
350
|
+
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-orders`),
|
|
246
351
|
method: "POST",
|
|
247
352
|
headers: _headers,
|
|
353
|
+
contentType: "application/json",
|
|
248
354
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
355
|
+
requestType: "json",
|
|
356
|
+
body: _body,
|
|
249
357
|
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,
|
|
250
358
|
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,
|
|
251
359
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -253,16 +361,26 @@ class TicketingClient {
|
|
|
253
361
|
logging: this._options.logging,
|
|
254
362
|
});
|
|
255
363
|
if (_response.ok) {
|
|
256
|
-
return {
|
|
364
|
+
return {
|
|
365
|
+
data: _response.body,
|
|
366
|
+
rawResponse: _response.rawResponse,
|
|
367
|
+
};
|
|
257
368
|
}
|
|
258
369
|
if (_response.error.reason === "status-code") {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
370
|
+
switch (_response.error.statusCode) {
|
|
371
|
+
case 401:
|
|
372
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
373
|
+
case 422:
|
|
374
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
375
|
+
default:
|
|
376
|
+
throw new errors.FiveOneEatError({
|
|
377
|
+
statusCode: _response.error.statusCode,
|
|
378
|
+
body: _response.error.body,
|
|
379
|
+
rawResponse: _response.rawResponse,
|
|
380
|
+
});
|
|
381
|
+
}
|
|
264
382
|
}
|
|
265
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/events/{
|
|
383
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/events/{eventId}/ticket-orders");
|
|
266
384
|
});
|
|
267
385
|
}
|
|
268
386
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export type {
|
|
3
|
-
export type { CreatePaymentIntentTicketingRequest } from "./CreatePaymentIntentTicketingRequest.js";
|
|
4
|
-
export type { HoldTicketsTicketingRequest } from "./HoldTicketsTicketingRequest.js";
|
|
1
|
+
export type { CalculatePriceRequest } from "./CalculatePriceRequest.js";
|
|
2
|
+
export type { CreatePaymentIntentRequest } from "./CreatePaymentIntentRequest.js";
|
|
5
3
|
export type { ReleaseHoldTicketingRequest } from "./ReleaseHoldTicketingRequest.js";
|
|
4
|
+
export type { StoreTicketHoldRequest } from "./StoreTicketHoldRequest.js";
|
|
5
|
+
export type { StoreTicketOrderRequest } from "./StoreTicketOrderRequest.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface CalculatePriceTicketingResponse {
|
|
2
|
+
data: CalculatePriceTicketingResponse.Data;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace CalculatePriceTicketingResponse {
|
|
5
|
+
interface Data {
|
|
6
|
+
subtotal: string;
|
|
7
|
+
platform_fee: string;
|
|
8
|
+
total: string;
|
|
9
|
+
line_items: string;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface
|
|
2
|
-
data:
|
|
1
|
+
export interface CreatePaymentIntentTicketingResponse {
|
|
2
|
+
data: CreatePaymentIntentTicketingResponse.Data;
|
|
3
3
|
}
|
|
4
|
-
export declare namespace
|
|
4
|
+
export declare namespace CreatePaymentIntentTicketingResponse {
|
|
5
5
|
interface Data {
|
|
6
6
|
payment_intent_id: string;
|
|
7
7
|
client_secret: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface
|
|
2
|
-
data:
|
|
1
|
+
export interface HoldTicketsTicketingResponse {
|
|
2
|
+
data: HoldTicketsTicketingResponse.Data;
|
|
3
3
|
}
|
|
4
|
-
export declare namespace
|
|
4
|
+
export declare namespace HoldTicketsTicketingResponse {
|
|
5
5
|
interface Data {
|
|
6
6
|
session_id: string | null;
|
|
7
7
|
expires_at: string;
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./CalculatePriceTicketingResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./ConfirmOrderTicketingResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./CreatePaymentIntentTicketingResponse.js"), exports);
|
|
20
|
+
__exportStar(require("./HoldTicketsTicketingResponse.js"), exports);
|
|
@@ -2,9 +2,6 @@ export * as business from "./business/index.js";
|
|
|
2
2
|
export * from "./customer/client/requests/index.js";
|
|
3
3
|
export * as customer from "./customer/index.js";
|
|
4
4
|
export * from "./customer/types/index.js";
|
|
5
|
-
export * from "./customerEvents/client/requests/index.js";
|
|
6
|
-
export * as customerEvents from "./customerEvents/index.js";
|
|
7
|
-
export * from "./customerEvents/types/index.js";
|
|
8
5
|
export * from "./customerMyAccount/client/requests/index.js";
|
|
9
6
|
export * as customerMyAccount from "./customerMyAccount/index.js";
|
|
10
7
|
export * from "./customerMyAccount/types/index.js";
|
|
@@ -36,14 +36,11 @@ 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.
|
|
39
|
+
exports.serveAd = exports.recordClick = exports.customerMyAccount = exports.customer = exports.business = void 0;
|
|
40
40
|
exports.business = __importStar(require("./business/index.js"));
|
|
41
41
|
__exportStar(require("./customer/client/requests/index.js"), exports);
|
|
42
42
|
exports.customer = __importStar(require("./customer/index.js"));
|
|
43
43
|
__exportStar(require("./customer/types/index.js"), exports);
|
|
44
|
-
__exportStar(require("./customerEvents/client/requests/index.js"), exports);
|
|
45
|
-
exports.customerEvents = __importStar(require("./customerEvents/index.js"));
|
|
46
|
-
__exportStar(require("./customerEvents/types/index.js"), exports);
|
|
47
44
|
__exportStar(require("./customerMyAccount/client/requests/index.js"), exports);
|
|
48
45
|
exports.customerMyAccount = __importStar(require("./customerMyAccount/index.js"));
|
|
49
46
|
__exportStar(require("./customerMyAccount/types/index.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.34";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -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.
|
|
10
|
-
"User-Agent": "@51eat/sdk/0.0.
|
|
9
|
+
"X-Fern-SDK-Version": "0.0.34",
|
|
10
|
+
"User-Agent": "@51eat/sdk/0.0.34",
|
|
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);
|
package/dist/esm/Client.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BusinessClient } from "./api/resources/business/client/Client.mjs";
|
|
2
2
|
import { CustomerClient } from "./api/resources/customer/client/Client.mjs";
|
|
3
|
-
import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.mjs";
|
|
4
3
|
import { CustomerMyAccountClient } from "./api/resources/customerMyAccount/client/Client.mjs";
|
|
5
4
|
import { RecordClickClient } from "./api/resources/recordClick/client/Client.mjs";
|
|
6
5
|
import { ServeAdClient } from "./api/resources/serveAd/client/Client.mjs";
|
|
@@ -14,14 +13,12 @@ export declare namespace FiveOneEatClient {
|
|
|
14
13
|
}
|
|
15
14
|
export declare class FiveOneEatClient {
|
|
16
15
|
protected readonly _options: NormalizedClientOptionsWithAuth<FiveOneEatClient.Options>;
|
|
17
|
-
protected _customerEvents: CustomerEventsClient | undefined;
|
|
18
16
|
protected _customerMyAccount: CustomerMyAccountClient | undefined;
|
|
19
17
|
protected _customer: CustomerClient | undefined;
|
|
20
18
|
protected _recordClick: RecordClickClient | undefined;
|
|
21
19
|
protected _serveAd: ServeAdClient | undefined;
|
|
22
20
|
protected _business: BusinessClient | undefined;
|
|
23
21
|
constructor(options?: FiveOneEatClient.Options);
|
|
24
|
-
get customerEvents(): CustomerEventsClient;
|
|
25
22
|
get customerMyAccount(): CustomerMyAccountClient;
|
|
26
23
|
get customer(): CustomerClient;
|
|
27
24
|
get recordClick(): RecordClickClient;
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
import { BusinessClient } from "./api/resources/business/client/Client.mjs";
|
|
12
12
|
import { CustomerClient } from "./api/resources/customer/client/Client.mjs";
|
|
13
|
-
import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.mjs";
|
|
14
13
|
import { CustomerMyAccountClient } from "./api/resources/customerMyAccount/client/Client.mjs";
|
|
15
14
|
import { RecordClickClient } from "./api/resources/recordClick/client/Client.mjs";
|
|
16
15
|
import { ServeAdClient } from "./api/resources/serveAd/client/Client.mjs";
|
|
@@ -20,10 +19,6 @@ export class FiveOneEatClient {
|
|
|
20
19
|
constructor(options = {}) {
|
|
21
20
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
22
21
|
}
|
|
23
|
-
get customerEvents() {
|
|
24
|
-
var _a;
|
|
25
|
-
return ((_a = this._customerEvents) !== null && _a !== void 0 ? _a : (this._customerEvents = new CustomerEventsClient(this._options)));
|
|
26
|
-
}
|
|
27
22
|
get customerMyAccount() {
|
|
28
23
|
var _a;
|
|
29
24
|
return ((_a = this._customerMyAccount) !== null && _a !== void 0 ? _a : (this._customerMyAccount = new CustomerMyAccountClient(this._options)));
|