@acm-uiuc/core-client 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/.openapi-generator/FILES +127 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +277 -0
  5. package/dist/apis/APIKeysApi.d.ts +54 -0
  6. package/dist/apis/APIKeysApi.js +143 -0
  7. package/dist/apis/EventsApi.d.ts +86 -0
  8. package/dist/apis/EventsApi.js +250 -0
  9. package/dist/apis/GenericApi.d.ts +88 -0
  10. package/dist/apis/GenericApi.js +249 -0
  11. package/dist/apis/IAMApi.d.ts +108 -0
  12. package/dist/apis/IAMApi.js +327 -0
  13. package/dist/apis/ICalendarIntegrationApi.d.ts +29 -0
  14. package/dist/apis/ICalendarIntegrationApi.js +61 -0
  15. package/dist/apis/LinkryApi.d.ts +100 -0
  16. package/dist/apis/LinkryApi.js +330 -0
  17. package/dist/apis/LoggingApi.d.ts +51 -0
  18. package/dist/apis/LoggingApi.js +103 -0
  19. package/dist/apis/MembershipApi.d.ts +107 -0
  20. package/dist/apis/MembershipApi.js +330 -0
  21. package/dist/apis/MobileWalletApi.d.ts +28 -0
  22. package/dist/apis/MobileWalletApi.js +64 -0
  23. package/dist/apis/OrganizationsApi.d.ts +65 -0
  24. package/dist/apis/OrganizationsApi.js +192 -0
  25. package/dist/apis/RSVPApi.d.ts +109 -0
  26. package/dist/apis/RSVPApi.js +345 -0
  27. package/dist/apis/RoomRequestsApi.d.ts +102 -0
  28. package/dist/apis/RoomRequestsApi.js +279 -0
  29. package/dist/apis/StoreApi.d.ts +141 -0
  30. package/dist/apis/StoreApi.js +449 -0
  31. package/dist/apis/StripeApi.d.ts +54 -0
  32. package/dist/apis/StripeApi.js +152 -0
  33. package/dist/apis/VendingApi.d.ts +33 -0
  34. package/dist/apis/VendingApi.js +83 -0
  35. package/dist/apis/index.d.ts +15 -0
  36. package/dist/apis/index.js +33 -0
  37. package/dist/esm/apis/APIKeysApi.d.ts +54 -0
  38. package/dist/esm/apis/APIKeysApi.js +139 -0
  39. package/dist/esm/apis/EventsApi.d.ts +86 -0
  40. package/dist/esm/apis/EventsApi.js +246 -0
  41. package/dist/esm/apis/GenericApi.d.ts +88 -0
  42. package/dist/esm/apis/GenericApi.js +245 -0
  43. package/dist/esm/apis/IAMApi.d.ts +108 -0
  44. package/dist/esm/apis/IAMApi.js +323 -0
  45. package/dist/esm/apis/ICalendarIntegrationApi.d.ts +29 -0
  46. package/dist/esm/apis/ICalendarIntegrationApi.js +57 -0
  47. package/dist/esm/apis/LinkryApi.d.ts +100 -0
  48. package/dist/esm/apis/LinkryApi.js +326 -0
  49. package/dist/esm/apis/LoggingApi.d.ts +51 -0
  50. package/dist/esm/apis/LoggingApi.js +99 -0
  51. package/dist/esm/apis/MembershipApi.d.ts +107 -0
  52. package/dist/esm/apis/MembershipApi.js +326 -0
  53. package/dist/esm/apis/MobileWalletApi.d.ts +28 -0
  54. package/dist/esm/apis/MobileWalletApi.js +60 -0
  55. package/dist/esm/apis/OrganizationsApi.d.ts +65 -0
  56. package/dist/esm/apis/OrganizationsApi.js +188 -0
  57. package/dist/esm/apis/RSVPApi.d.ts +109 -0
  58. package/dist/esm/apis/RSVPApi.js +341 -0
  59. package/dist/esm/apis/RoomRequestsApi.d.ts +102 -0
  60. package/dist/esm/apis/RoomRequestsApi.js +275 -0
  61. package/dist/esm/apis/StoreApi.d.ts +141 -0
  62. package/dist/esm/apis/StoreApi.js +445 -0
  63. package/dist/esm/apis/StripeApi.d.ts +54 -0
  64. package/dist/esm/apis/StripeApi.js +148 -0
  65. package/dist/esm/apis/VendingApi.d.ts +33 -0
  66. package/dist/esm/apis/VendingApi.js +79 -0
  67. package/dist/esm/apis/index.d.ts +15 -0
  68. package/dist/esm/apis/index.js +17 -0
  69. package/dist/esm/index.d.ts +3 -0
  70. package/dist/esm/index.js +5 -0
  71. package/dist/esm/models/index.d.ts +3567 -0
  72. package/dist/esm/models/index.js +539 -0
  73. package/dist/esm/runtime.d.ts +181 -0
  74. package/dist/esm/runtime.js +327 -0
  75. package/dist/index.d.ts +3 -0
  76. package/dist/index.js +21 -0
  77. package/dist/models/index.d.ts +3567 -0
  78. package/dist/models/index.js +543 -0
  79. package/dist/runtime.d.ts +181 -0
  80. package/dist/runtime.js +342 -0
  81. package/package.json +23 -0
  82. package/tsconfig.esm.json +7 -0
  83. package/tsconfig.json +16 -0
@@ -0,0 +1,445 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * ACM @ UIUC Core API
5
+ * The ACM @ UIUC Core API provides services for managing chapter operations. ## Usage The primary consumer of the Core API is the Management Portal, which allows members to manage the chapter. Others may call the API with an API key; please contact us to obtain one. This API also integrates into the ACM website and other suborganization to provide calendar services. Calendar clients call the iCal endpoints (available through [ical.acm.illinois.edu](https://ical.acm.illinois.edu)) for calendar services. ## Contact <hr /> If you are an ACM @ UIUC member, please join the Infra Committee Discord for support. Otherwise, email [infra@acm.illinois.edu](mailto:infra@acm.illinois.edu) for support. **For all security concerns, please email [infra@acm.illinois.edu](mailto:infra@acm.illinois.edu) with the subject \"Security Concern\".**
6
+ *
7
+ * The version of the OpenAPI document: 2.0.1
8
+ * Contact: infra@acm.illinois.edu
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime.js';
24
+ /**
25
+ *
26
+ */
27
+ export class StoreApi extends runtime.BaseAPI {
28
+ /**
29
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>) * Store Fulfillment (<code>fulfill:store</code>)
30
+ * Get order details for management.
31
+ */
32
+ apiV1StoreAdminOrderOrderIdGetRaw(requestParameters, initOverrides) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['orderId'] == null) {
35
+ throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling apiV1StoreAdminOrderOrderIdGet().');
36
+ }
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ if (this.configuration && this.configuration.accessToken) {
40
+ const token = this.configuration.accessToken;
41
+ const tokenString = yield token("httpBearer", []);
42
+ if (tokenString) {
43
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
44
+ }
45
+ }
46
+ if (this.configuration && this.configuration.apiKey) {
47
+ headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // apiKeyHeader authentication
48
+ }
49
+ let urlPath = `/api/v1/store/admin/order/{orderId}`;
50
+ urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
51
+ const response = yield this.request({
52
+ path: urlPath,
53
+ method: 'GET',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ }, initOverrides);
57
+ return new runtime.JSONApiResponse(response);
58
+ });
59
+ }
60
+ /**
61
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>) * Store Fulfillment (<code>fulfill:store</code>)
62
+ * Get order details for management.
63
+ */
64
+ apiV1StoreAdminOrderOrderIdGet(requestParameters, initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const response = yield this.apiV1StoreAdminOrderOrderIdGetRaw(requestParameters, initOverrides);
67
+ return yield response.value();
68
+ });
69
+ }
70
+ /**
71
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>) * Store Fulfillment (<code>fulfill:store</code>)
72
+ * Fulfill an order\'s line items.
73
+ */
74
+ apiV1StoreAdminOrdersOrderIdFulfillPostRaw(requestParameters, initOverrides) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ if (requestParameters['orderId'] == null) {
77
+ throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling apiV1StoreAdminOrdersOrderIdFulfillPost().');
78
+ }
79
+ if (requestParameters['apiV1StoreAdminOrdersOrderIdFulfillPostRequest'] == null) {
80
+ throw new runtime.RequiredError('apiV1StoreAdminOrdersOrderIdFulfillPostRequest', 'Required parameter "apiV1StoreAdminOrdersOrderIdFulfillPostRequest" was null or undefined when calling apiV1StoreAdminOrdersOrderIdFulfillPost().');
81
+ }
82
+ const queryParameters = {};
83
+ const headerParameters = {};
84
+ headerParameters['Content-Type'] = 'application/json';
85
+ if (this.configuration && this.configuration.accessToken) {
86
+ const token = this.configuration.accessToken;
87
+ const tokenString = yield token("httpBearer", []);
88
+ if (tokenString) {
89
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
90
+ }
91
+ }
92
+ if (this.configuration && this.configuration.apiKey) {
93
+ headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // apiKeyHeader authentication
94
+ }
95
+ let urlPath = `/api/v1/store/admin/orders/{orderId}/fulfill`;
96
+ urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
97
+ const response = yield this.request({
98
+ path: urlPath,
99
+ method: 'POST',
100
+ headers: headerParameters,
101
+ query: queryParameters,
102
+ body: requestParameters['apiV1StoreAdminOrdersOrderIdFulfillPostRequest'],
103
+ }, initOverrides);
104
+ if (this.isJsonMime(response.headers.get('content-type'))) {
105
+ return new runtime.JSONApiResponse(response);
106
+ }
107
+ else {
108
+ return new runtime.TextApiResponse(response);
109
+ }
110
+ });
111
+ }
112
+ /**
113
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>) * Store Fulfillment (<code>fulfill:store</code>)
114
+ * Fulfill an order\'s line items.
115
+ */
116
+ apiV1StoreAdminOrdersOrderIdFulfillPost(requestParameters, initOverrides) {
117
+ return __awaiter(this, void 0, void 0, function* () {
118
+ const response = yield this.apiV1StoreAdminOrdersOrderIdFulfillPostRaw(requestParameters, initOverrides);
119
+ return yield response.value();
120
+ });
121
+ }
122
+ /**
123
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>)
124
+ * Refund an order.
125
+ */
126
+ apiV1StoreAdminOrdersOrderIdRefundPostRaw(requestParameters, initOverrides) {
127
+ return __awaiter(this, void 0, void 0, function* () {
128
+ if (requestParameters['orderId'] == null) {
129
+ throw new runtime.RequiredError('orderId', 'Required parameter "orderId" was null or undefined when calling apiV1StoreAdminOrdersOrderIdRefundPost().');
130
+ }
131
+ if (requestParameters['apiV1StoreAdminOrdersOrderIdRefundPostRequest'] == null) {
132
+ throw new runtime.RequiredError('apiV1StoreAdminOrdersOrderIdRefundPostRequest', 'Required parameter "apiV1StoreAdminOrdersOrderIdRefundPostRequest" was null or undefined when calling apiV1StoreAdminOrdersOrderIdRefundPost().');
133
+ }
134
+ const queryParameters = {};
135
+ const headerParameters = {};
136
+ headerParameters['Content-Type'] = 'application/json';
137
+ if (this.configuration && this.configuration.accessToken) {
138
+ const token = this.configuration.accessToken;
139
+ const tokenString = yield token("httpBearer", []);
140
+ if (tokenString) {
141
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
142
+ }
143
+ }
144
+ if (this.configuration && this.configuration.apiKey) {
145
+ headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // apiKeyHeader authentication
146
+ }
147
+ let urlPath = `/api/v1/store/admin/orders/{orderId}/refund`;
148
+ urlPath = urlPath.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters['orderId'])));
149
+ const response = yield this.request({
150
+ path: urlPath,
151
+ method: 'POST',
152
+ headers: headerParameters,
153
+ query: queryParameters,
154
+ body: requestParameters['apiV1StoreAdminOrdersOrderIdRefundPostRequest'],
155
+ }, initOverrides);
156
+ if (this.isJsonMime(response.headers.get('content-type'))) {
157
+ return new runtime.JSONApiResponse(response);
158
+ }
159
+ else {
160
+ return new runtime.TextApiResponse(response);
161
+ }
162
+ });
163
+ }
164
+ /**
165
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>)
166
+ * Refund an order.
167
+ */
168
+ apiV1StoreAdminOrdersOrderIdRefundPost(requestParameters, initOverrides) {
169
+ return __awaiter(this, void 0, void 0, function* () {
170
+ const response = yield this.apiV1StoreAdminOrdersOrderIdRefundPostRaw(requestParameters, initOverrides);
171
+ return yield response.value();
172
+ });
173
+ }
174
+ /**
175
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>) * Store Fulfillment (<code>fulfill:store</code>)
176
+ * List all orders/line items for a given product.
177
+ */
178
+ apiV1StoreAdminOrdersProductIdGetRaw(requestParameters, initOverrides) {
179
+ return __awaiter(this, void 0, void 0, function* () {
180
+ if (requestParameters['productId'] == null) {
181
+ throw new runtime.RequiredError('productId', 'Required parameter "productId" was null or undefined when calling apiV1StoreAdminOrdersProductIdGet().');
182
+ }
183
+ const queryParameters = {};
184
+ const headerParameters = {};
185
+ if (this.configuration && this.configuration.accessToken) {
186
+ const token = this.configuration.accessToken;
187
+ const tokenString = yield token("httpBearer", []);
188
+ if (tokenString) {
189
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
190
+ }
191
+ }
192
+ if (this.configuration && this.configuration.apiKey) {
193
+ headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // apiKeyHeader authentication
194
+ }
195
+ let urlPath = `/api/v1/store/admin/orders/{productId}`;
196
+ urlPath = urlPath.replace(`{${"productId"}}`, encodeURIComponent(String(requestParameters['productId'])));
197
+ const response = yield this.request({
198
+ path: urlPath,
199
+ method: 'GET',
200
+ headers: headerParameters,
201
+ query: queryParameters,
202
+ }, initOverrides);
203
+ return new runtime.JSONApiResponse(response);
204
+ });
205
+ }
206
+ /**
207
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>) * Store Fulfillment (<code>fulfill:store</code>)
208
+ * List all orders/line items for a given product.
209
+ */
210
+ apiV1StoreAdminOrdersProductIdGet(requestParameters, initOverrides) {
211
+ return __awaiter(this, void 0, void 0, function* () {
212
+ const response = yield this.apiV1StoreAdminOrdersProductIdGetRaw(requestParameters, initOverrides);
213
+ return yield response.value();
214
+ });
215
+ }
216
+ /**
217
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>)
218
+ * List all products (including inactive) for management.
219
+ */
220
+ apiV1StoreAdminProductsGetRaw(initOverrides) {
221
+ return __awaiter(this, void 0, void 0, function* () {
222
+ const queryParameters = {};
223
+ const headerParameters = {};
224
+ if (this.configuration && this.configuration.accessToken) {
225
+ const token = this.configuration.accessToken;
226
+ const tokenString = yield token("httpBearer", []);
227
+ if (tokenString) {
228
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
229
+ }
230
+ }
231
+ if (this.configuration && this.configuration.apiKey) {
232
+ headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // apiKeyHeader authentication
233
+ }
234
+ let urlPath = `/api/v1/store/admin/products`;
235
+ const response = yield this.request({
236
+ path: urlPath,
237
+ method: 'GET',
238
+ headers: headerParameters,
239
+ query: queryParameters,
240
+ }, initOverrides);
241
+ return new runtime.JSONApiResponse(response);
242
+ });
243
+ }
244
+ /**
245
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>)
246
+ * List all products (including inactive) for management.
247
+ */
248
+ apiV1StoreAdminProductsGet(initOverrides) {
249
+ return __awaiter(this, void 0, void 0, function* () {
250
+ const response = yield this.apiV1StoreAdminProductsGetRaw(initOverrides);
251
+ return yield response.value();
252
+ });
253
+ }
254
+ /**
255
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>)
256
+ * Create a new product with variants.
257
+ */
258
+ apiV1StoreAdminProductsPostRaw(requestParameters, initOverrides) {
259
+ return __awaiter(this, void 0, void 0, function* () {
260
+ if (requestParameters['apiV1StoreAdminProductsPostRequest'] == null) {
261
+ throw new runtime.RequiredError('apiV1StoreAdminProductsPostRequest', 'Required parameter "apiV1StoreAdminProductsPostRequest" was null or undefined when calling apiV1StoreAdminProductsPost().');
262
+ }
263
+ const queryParameters = {};
264
+ const headerParameters = {};
265
+ headerParameters['Content-Type'] = 'application/json';
266
+ if (this.configuration && this.configuration.accessToken) {
267
+ const token = this.configuration.accessToken;
268
+ const tokenString = yield token("httpBearer", []);
269
+ if (tokenString) {
270
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
271
+ }
272
+ }
273
+ if (this.configuration && this.configuration.apiKey) {
274
+ headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // apiKeyHeader authentication
275
+ }
276
+ let urlPath = `/api/v1/store/admin/products`;
277
+ const response = yield this.request({
278
+ path: urlPath,
279
+ method: 'POST',
280
+ headers: headerParameters,
281
+ query: queryParameters,
282
+ body: requestParameters['apiV1StoreAdminProductsPostRequest'],
283
+ }, initOverrides);
284
+ return new runtime.JSONApiResponse(response);
285
+ });
286
+ }
287
+ /**
288
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>)
289
+ * Create a new product with variants.
290
+ */
291
+ apiV1StoreAdminProductsPost(requestParameters, initOverrides) {
292
+ return __awaiter(this, void 0, void 0, function* () {
293
+ const response = yield this.apiV1StoreAdminProductsPostRaw(requestParameters, initOverrides);
294
+ return yield response.value();
295
+ });
296
+ }
297
+ /**
298
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>)
299
+ * Modify the metadata for a given product.
300
+ */
301
+ apiV1StoreAdminProductsProductIdPatchRaw(requestParameters, initOverrides) {
302
+ return __awaiter(this, void 0, void 0, function* () {
303
+ if (requestParameters['productId'] == null) {
304
+ throw new runtime.RequiredError('productId', 'Required parameter "productId" was null or undefined when calling apiV1StoreAdminProductsProductIdPatch().');
305
+ }
306
+ if (requestParameters['apiV1StoreAdminProductsProductIdPatchRequest'] == null) {
307
+ throw new runtime.RequiredError('apiV1StoreAdminProductsProductIdPatchRequest', 'Required parameter "apiV1StoreAdminProductsProductIdPatchRequest" was null or undefined when calling apiV1StoreAdminProductsProductIdPatch().');
308
+ }
309
+ const queryParameters = {};
310
+ const headerParameters = {};
311
+ headerParameters['Content-Type'] = 'application/json';
312
+ if (this.configuration && this.configuration.accessToken) {
313
+ const token = this.configuration.accessToken;
314
+ const tokenString = yield token("httpBearer", []);
315
+ if (tokenString) {
316
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
317
+ }
318
+ }
319
+ if (this.configuration && this.configuration.apiKey) {
320
+ headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // apiKeyHeader authentication
321
+ }
322
+ let urlPath = `/api/v1/store/admin/products/{productId}`;
323
+ urlPath = urlPath.replace(`{${"productId"}}`, encodeURIComponent(String(requestParameters['productId'])));
324
+ const response = yield this.request({
325
+ path: urlPath,
326
+ method: 'PATCH',
327
+ headers: headerParameters,
328
+ query: queryParameters,
329
+ body: requestParameters['apiV1StoreAdminProductsProductIdPatchRequest'],
330
+ }, initOverrides);
331
+ if (this.isJsonMime(response.headers.get('content-type'))) {
332
+ return new runtime.JSONApiResponse(response);
333
+ }
334
+ else {
335
+ return new runtime.TextApiResponse(response);
336
+ }
337
+ });
338
+ }
339
+ /**
340
+ * #### Authorization <hr /> Requires any of the following roles: * Store Manager (<code>manage:store</code>)
341
+ * Modify the metadata for a given product.
342
+ */
343
+ apiV1StoreAdminProductsProductIdPatch(requestParameters, initOverrides) {
344
+ return __awaiter(this, void 0, void 0, function* () {
345
+ const response = yield this.apiV1StoreAdminProductsProductIdPatchRaw(requestParameters, initOverrides);
346
+ return yield response.value();
347
+ });
348
+ }
349
+ /**
350
+ * Create a checkout session for purchasing items.
351
+ */
352
+ apiV1StoreCheckoutPostRaw(requestParameters, initOverrides) {
353
+ return __awaiter(this, void 0, void 0, function* () {
354
+ if (requestParameters['xTurnstileResponse'] == null) {
355
+ throw new runtime.RequiredError('xTurnstileResponse', 'Required parameter "xTurnstileResponse" was null or undefined when calling apiV1StoreCheckoutPost().');
356
+ }
357
+ if (requestParameters['apiV1StoreCheckoutPostRequest'] == null) {
358
+ throw new runtime.RequiredError('apiV1StoreCheckoutPostRequest', 'Required parameter "apiV1StoreCheckoutPostRequest" was null or undefined when calling apiV1StoreCheckoutPost().');
359
+ }
360
+ const queryParameters = {};
361
+ const headerParameters = {};
362
+ headerParameters['Content-Type'] = 'application/json';
363
+ if (requestParameters['xUiucToken'] != null) {
364
+ headerParameters['x-uiuc-token'] = String(requestParameters['xUiucToken']);
365
+ }
366
+ if (requestParameters['xTurnstileResponse'] != null) {
367
+ headerParameters['x-turnstile-response'] = String(requestParameters['xTurnstileResponse']);
368
+ }
369
+ let urlPath = `/api/v1/store/checkout`;
370
+ const response = yield this.request({
371
+ path: urlPath,
372
+ method: 'POST',
373
+ headers: headerParameters,
374
+ query: queryParameters,
375
+ body: requestParameters['apiV1StoreCheckoutPostRequest'],
376
+ }, initOverrides);
377
+ return new runtime.JSONApiResponse(response);
378
+ });
379
+ }
380
+ /**
381
+ * Create a checkout session for purchasing items.
382
+ */
383
+ apiV1StoreCheckoutPost(requestParameters, initOverrides) {
384
+ return __awaiter(this, void 0, void 0, function* () {
385
+ const response = yield this.apiV1StoreCheckoutPostRaw(requestParameters, initOverrides);
386
+ return yield response.value();
387
+ });
388
+ }
389
+ /**
390
+ * List all available products in the store.
391
+ */
392
+ apiV1StoreProductsGetRaw(initOverrides) {
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ const queryParameters = {};
395
+ const headerParameters = {};
396
+ let urlPath = `/api/v1/store/products`;
397
+ const response = yield this.request({
398
+ path: urlPath,
399
+ method: 'GET',
400
+ headers: headerParameters,
401
+ query: queryParameters,
402
+ }, initOverrides);
403
+ return new runtime.JSONApiResponse(response);
404
+ });
405
+ }
406
+ /**
407
+ * List all available products in the store.
408
+ */
409
+ apiV1StoreProductsGet(initOverrides) {
410
+ return __awaiter(this, void 0, void 0, function* () {
411
+ const response = yield this.apiV1StoreProductsGetRaw(initOverrides);
412
+ return yield response.value();
413
+ });
414
+ }
415
+ /**
416
+ * Get details of a specific product.
417
+ */
418
+ apiV1StoreProductsProductIdGetRaw(requestParameters, initOverrides) {
419
+ return __awaiter(this, void 0, void 0, function* () {
420
+ if (requestParameters['productId'] == null) {
421
+ throw new runtime.RequiredError('productId', 'Required parameter "productId" was null or undefined when calling apiV1StoreProductsProductIdGet().');
422
+ }
423
+ const queryParameters = {};
424
+ const headerParameters = {};
425
+ let urlPath = `/api/v1/store/products/{productId}`;
426
+ urlPath = urlPath.replace(`{${"productId"}}`, encodeURIComponent(String(requestParameters['productId'])));
427
+ const response = yield this.request({
428
+ path: urlPath,
429
+ method: 'GET',
430
+ headers: headerParameters,
431
+ query: queryParameters,
432
+ }, initOverrides);
433
+ return new runtime.JSONApiResponse(response);
434
+ });
435
+ }
436
+ /**
437
+ * Get details of a specific product.
438
+ */
439
+ apiV1StoreProductsProductIdGet(requestParameters, initOverrides) {
440
+ return __awaiter(this, void 0, void 0, function* () {
441
+ const response = yield this.apiV1StoreProductsProductIdGetRaw(requestParameters, initOverrides);
442
+ return yield response.value();
443
+ });
444
+ }
445
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * ACM @ UIUC Core API
3
+ * The ACM @ UIUC Core API provides services for managing chapter operations. ## Usage The primary consumer of the Core API is the Management Portal, which allows members to manage the chapter. Others may call the API with an API key; please contact us to obtain one. This API also integrates into the ACM website and other suborganization to provide calendar services. Calendar clients call the iCal endpoints (available through [ical.acm.illinois.edu](https://ical.acm.illinois.edu)) for calendar services. ## Contact <hr /> If you are an ACM @ UIUC member, please join the Infra Committee Discord for support. Otherwise, email [infra@acm.illinois.edu](mailto:infra@acm.illinois.edu) for support. **For all security concerns, please email [infra@acm.illinois.edu](mailto:infra@acm.illinois.edu) with the subject \"Security Concern\".**
4
+ *
5
+ * The version of the OpenAPI document: 2.0.1
6
+ * Contact: infra@acm.illinois.edu
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime.js';
13
+ import type { ApiV1StripePaymentLinksPostRequest } from '../models/index.js';
14
+ export interface ApiV1StripePaymentLinksLinkIdDeleteRequest {
15
+ linkId: string;
16
+ }
17
+ export interface ApiV1StripePaymentLinksPostOperationRequest {
18
+ apiV1StripePaymentLinksPostRequest: ApiV1StripePaymentLinksPostRequest;
19
+ }
20
+ /**
21
+ *
22
+ */
23
+ export declare class StripeApi extends runtime.BaseAPI {
24
+ /**
25
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
26
+ * Get available Stripe payment links.
27
+ */
28
+ apiV1StripePaymentLinksGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
29
+ /**
30
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
31
+ * Get available Stripe payment links.
32
+ */
33
+ apiV1StripePaymentLinksGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
34
+ /**
35
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
36
+ * Deactivate a Stripe payment link.
37
+ */
38
+ apiV1StripePaymentLinksLinkIdDeleteRaw(requestParameters: ApiV1StripePaymentLinksLinkIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
39
+ /**
40
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
41
+ * Deactivate a Stripe payment link.
42
+ */
43
+ apiV1StripePaymentLinksLinkIdDelete(requestParameters: ApiV1StripePaymentLinksLinkIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
44
+ /**
45
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
46
+ * Create a Stripe payment link.
47
+ */
48
+ apiV1StripePaymentLinksPostRaw(requestParameters: ApiV1StripePaymentLinksPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
49
+ /**
50
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
51
+ * Create a Stripe payment link.
52
+ */
53
+ apiV1StripePaymentLinksPost(requestParameters: ApiV1StripePaymentLinksPostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
54
+ }
@@ -0,0 +1,148 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * ACM @ UIUC Core API
5
+ * The ACM @ UIUC Core API provides services for managing chapter operations. ## Usage The primary consumer of the Core API is the Management Portal, which allows members to manage the chapter. Others may call the API with an API key; please contact us to obtain one. This API also integrates into the ACM website and other suborganization to provide calendar services. Calendar clients call the iCal endpoints (available through [ical.acm.illinois.edu](https://ical.acm.illinois.edu)) for calendar services. ## Contact <hr /> If you are an ACM @ UIUC member, please join the Infra Committee Discord for support. Otherwise, email [infra@acm.illinois.edu](mailto:infra@acm.illinois.edu) for support. **For all security concerns, please email [infra@acm.illinois.edu](mailto:infra@acm.illinois.edu) with the subject \"Security Concern\".**
6
+ *
7
+ * The version of the OpenAPI document: 2.0.1
8
+ * Contact: infra@acm.illinois.edu
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime.js';
24
+ /**
25
+ *
26
+ */
27
+ export class StripeApi extends runtime.BaseAPI {
28
+ /**
29
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
30
+ * Get available Stripe payment links.
31
+ */
32
+ apiV1StripePaymentLinksGetRaw(initOverrides) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const queryParameters = {};
35
+ const headerParameters = {};
36
+ if (this.configuration && this.configuration.accessToken) {
37
+ const token = this.configuration.accessToken;
38
+ const tokenString = yield token("httpBearer", []);
39
+ if (tokenString) {
40
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
41
+ }
42
+ }
43
+ if (this.configuration && this.configuration.apiKey) {
44
+ headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // apiKeyHeader authentication
45
+ }
46
+ let urlPath = `/api/v1/stripe/paymentLinks`;
47
+ const response = yield this.request({
48
+ path: urlPath,
49
+ method: 'GET',
50
+ headers: headerParameters,
51
+ query: queryParameters,
52
+ }, initOverrides);
53
+ return new runtime.VoidApiResponse(response);
54
+ });
55
+ }
56
+ /**
57
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
58
+ * Get available Stripe payment links.
59
+ */
60
+ apiV1StripePaymentLinksGet(initOverrides) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ yield this.apiV1StripePaymentLinksGetRaw(initOverrides);
63
+ });
64
+ }
65
+ /**
66
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
67
+ * Deactivate a Stripe payment link.
68
+ */
69
+ apiV1StripePaymentLinksLinkIdDeleteRaw(requestParameters, initOverrides) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ if (requestParameters['linkId'] == null) {
72
+ throw new runtime.RequiredError('linkId', 'Required parameter "linkId" was null or undefined when calling apiV1StripePaymentLinksLinkIdDelete().');
73
+ }
74
+ const queryParameters = {};
75
+ const headerParameters = {};
76
+ if (this.configuration && this.configuration.accessToken) {
77
+ const token = this.configuration.accessToken;
78
+ const tokenString = yield token("httpBearer", []);
79
+ if (tokenString) {
80
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
81
+ }
82
+ }
83
+ if (this.configuration && this.configuration.apiKey) {
84
+ headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // apiKeyHeader authentication
85
+ }
86
+ let urlPath = `/api/v1/stripe/paymentLinks/{linkId}`;
87
+ urlPath = urlPath.replace(`{${"linkId"}}`, encodeURIComponent(String(requestParameters['linkId'])));
88
+ const response = yield this.request({
89
+ path: urlPath,
90
+ method: 'DELETE',
91
+ headers: headerParameters,
92
+ query: queryParameters,
93
+ }, initOverrides);
94
+ return new runtime.VoidApiResponse(response);
95
+ });
96
+ }
97
+ /**
98
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
99
+ * Deactivate a Stripe payment link.
100
+ */
101
+ apiV1StripePaymentLinksLinkIdDelete(requestParameters, initOverrides) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ yield this.apiV1StripePaymentLinksLinkIdDeleteRaw(requestParameters, initOverrides);
104
+ });
105
+ }
106
+ /**
107
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
108
+ * Create a Stripe payment link.
109
+ */
110
+ apiV1StripePaymentLinksPostRaw(requestParameters, initOverrides) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ if (requestParameters['apiV1StripePaymentLinksPostRequest'] == null) {
113
+ throw new runtime.RequiredError('apiV1StripePaymentLinksPostRequest', 'Required parameter "apiV1StripePaymentLinksPostRequest" was null or undefined when calling apiV1StripePaymentLinksPost().');
114
+ }
115
+ const queryParameters = {};
116
+ const headerParameters = {};
117
+ headerParameters['Content-Type'] = 'application/json';
118
+ if (this.configuration && this.configuration.accessToken) {
119
+ const token = this.configuration.accessToken;
120
+ const tokenString = yield token("httpBearer", []);
121
+ if (tokenString) {
122
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
123
+ }
124
+ }
125
+ if (this.configuration && this.configuration.apiKey) {
126
+ headerParameters["X-Api-Key"] = yield this.configuration.apiKey("X-Api-Key"); // apiKeyHeader authentication
127
+ }
128
+ let urlPath = `/api/v1/stripe/paymentLinks`;
129
+ const response = yield this.request({
130
+ path: urlPath,
131
+ method: 'POST',
132
+ headers: headerParameters,
133
+ query: queryParameters,
134
+ body: requestParameters['apiV1StripePaymentLinksPostRequest'],
135
+ }, initOverrides);
136
+ return new runtime.VoidApiResponse(response);
137
+ });
138
+ }
139
+ /**
140
+ * #### Authorization <hr /> Requires any of the following roles: * Stripe Link Creator (<code>create:stripeLink</code>)
141
+ * Create a Stripe payment link.
142
+ */
143
+ apiV1StripePaymentLinksPost(requestParameters, initOverrides) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ yield this.apiV1StripePaymentLinksPostRaw(requestParameters, initOverrides);
146
+ });
147
+ }
148
+ }