@teemill/website 0.1.2 → 0.1.5

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 (60) hide show
  1. package/.openapi-generator/FILES +7 -10
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +3 -3
  4. package/api.ts +535 -0
  5. package/base.ts +86 -0
  6. package/common.ts +150 -0
  7. package/configuration.ts +110 -0
  8. package/dist/api.d.ts +316 -0
  9. package/dist/api.js +371 -0
  10. package/dist/base.d.ts +66 -0
  11. package/dist/base.js +65 -0
  12. package/dist/common.d.ts +65 -0
  13. package/dist/common.js +161 -0
  14. package/dist/configuration.d.ts +91 -0
  15. package/dist/configuration.js +43 -0
  16. package/dist/esm/api.d.ts +316 -0
  17. package/dist/esm/api.js +364 -0
  18. package/dist/esm/base.d.ts +66 -0
  19. package/dist/esm/base.js +60 -0
  20. package/dist/esm/common.d.ts +65 -0
  21. package/dist/esm/common.js +149 -0
  22. package/dist/esm/configuration.d.ts +91 -0
  23. package/dist/esm/configuration.js +39 -0
  24. package/dist/esm/index.d.ts +13 -0
  25. package/dist/esm/index.js +15 -0
  26. package/dist/index.d.ts +13 -3
  27. package/dist/index.js +15 -5
  28. package/git_push.sh +57 -0
  29. package/index.ts +18 -0
  30. package/package.json +18 -4
  31. package/tsconfig.esm.json +7 -0
  32. package/tsconfig.json +4 -6
  33. package/dist/apis/ShippingMethodsApi.d.ts +0 -96
  34. package/dist/apis/ShippingMethodsApi.js +0 -386
  35. package/dist/apis/index.d.ts +0 -1
  36. package/dist/apis/index.js +0 -19
  37. package/dist/models/ApiError.d.ts +0 -37
  38. package/dist/models/ApiError.js +0 -53
  39. package/dist/models/Price.d.ts +0 -37
  40. package/dist/models/Price.js +0 -52
  41. package/dist/models/ShippingMethod.d.ts +0 -56
  42. package/dist/models/ShippingMethod.js +0 -59
  43. package/dist/models/ShippingMethods.d.ts +0 -38
  44. package/dist/models/ShippingMethods.js +0 -54
  45. package/dist/models/UpdateShippingMethodRequest.d.ts +0 -44
  46. package/dist/models/UpdateShippingMethodRequest.js +0 -55
  47. package/dist/models/index.d.ts +0 -5
  48. package/dist/models/index.js +0 -23
  49. package/dist/runtime.d.ts +0 -187
  50. package/dist/runtime.js +0 -565
  51. package/src/apis/ShippingMethodsApi.ts +0 -337
  52. package/src/apis/index.ts +0 -3
  53. package/src/index.ts +0 -5
  54. package/src/models/ApiError.ts +0 -74
  55. package/src/models/Price.ts +0 -73
  56. package/src/models/ShippingMethod.ts +0 -104
  57. package/src/models/ShippingMethods.ts +0 -81
  58. package/src/models/UpdateShippingMethodRequest.ts +0 -88
  59. package/src/models/index.ts +0 -7
  60. package/src/runtime.ts +0 -441
@@ -1,15 +1,12 @@
1
1
  .gitignore
2
2
  .npmignore
3
3
  README.md
4
+ api.ts
5
+ base.ts
6
+ common.ts
7
+ configuration.ts
8
+ git_push.sh
9
+ index.ts
4
10
  package.json
5
- src/apis/ShippingMethodsApi.ts
6
- src/apis/index.ts
7
- src/index.ts
8
- src/models/ApiError.ts
9
- src/models/Price.ts
10
- src/models/ShippingMethod.ts
11
- src/models/ShippingMethods.ts
12
- src/models/UpdateShippingMethodRequest.ts
13
- src/models/index.ts
14
- src/runtime.ts
11
+ tsconfig.esm.json
15
12
  tsconfig.json
@@ -1 +1 @@
1
- 7.3.0
1
+ 7.6.0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- ## @teemill/website@0.1.2
1
+ ## @teemill/website@0.1.5
2
2
 
3
- This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
3
+ This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
5
5
  Environment
6
6
  * Node.js
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @teemill/website@0.1.2 --save
39
+ npm install @teemill/website@0.1.5 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/api.ts ADDED
@@ -0,0 +1,535 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Website API
5
+ * Manage your Teemill Website Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.5
8
+ * Contact: hello@teemill.com
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
+
15
+
16
+ import type { Configuration } from './configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
22
+ import type { RequestArgs } from './base';
23
+ // @ts-ignore
24
+ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
+
26
+ /**
27
+ *
28
+ * @export
29
+ * @interface ApiError
30
+ */
31
+ export interface ApiError {
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof ApiError
36
+ */
37
+ 'code': string;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof ApiError
42
+ */
43
+ 'message': string;
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @interface AuthorizeStripe200Response
49
+ */
50
+ export interface AuthorizeStripe200Response {
51
+ /**
52
+ * The URL to redirect to
53
+ * @type {string}
54
+ * @memberof AuthorizeStripe200Response
55
+ */
56
+ 'redirect_url': string;
57
+ }
58
+ /**
59
+ *
60
+ * @export
61
+ * @interface ConnectStripeRequest
62
+ */
63
+ export interface ConnectStripeRequest {
64
+ /**
65
+ * The code returned from the Stripe connect flow
66
+ * @type {string}
67
+ * @memberof ConnectStripeRequest
68
+ */
69
+ 'code': string;
70
+ /**
71
+ * The state returned from the Stripe connect flow
72
+ * @type {string}
73
+ * @memberof ConnectStripeRequest
74
+ */
75
+ 'state': string;
76
+ }
77
+ /**
78
+ *
79
+ * @export
80
+ * @interface PaymentAccount
81
+ */
82
+ export interface PaymentAccount {
83
+ /**
84
+ * The name of the payment account
85
+ * @type {string}
86
+ * @memberof PaymentAccount
87
+ */
88
+ 'name': string;
89
+ /**
90
+ * The payment method
91
+ * @type {string}
92
+ * @memberof PaymentAccount
93
+ */
94
+ 'method': PaymentAccountMethodEnum;
95
+ /**
96
+ * The configuration for the payment account
97
+ * @type {{ [key: string]: string; }}
98
+ * @memberof PaymentAccount
99
+ */
100
+ 'config': { [key: string]: string; };
101
+ }
102
+
103
+ export const PaymentAccountMethodEnum = {
104
+ Stripe: 'stripe',
105
+ Paypal: 'paypal'
106
+ } as const;
107
+
108
+ export type PaymentAccountMethodEnum = typeof PaymentAccountMethodEnum[keyof typeof PaymentAccountMethodEnum];
109
+
110
+
111
+ /**
112
+ * PaymentApi - axios parameter creator
113
+ * @export
114
+ */
115
+ export const PaymentApiAxiosParamCreator = function (configuration?: Configuration) {
116
+ return {
117
+ /**
118
+ * Authorize a Stripe payment account
119
+ * @summary Authorize Stripe
120
+ * @param {string} project What project it is
121
+ * @param {*} [options] Override http request option.
122
+ * @throws {RequiredError}
123
+ */
124
+ authorizeStripe: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
125
+ // verify required parameter 'project' is not null or undefined
126
+ assertParamExists('authorizeStripe', 'project', project)
127
+ const localVarPath = `/v1/website/payment/stripe/authorize`;
128
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
129
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
130
+ let baseOptions;
131
+ if (configuration) {
132
+ baseOptions = configuration.baseOptions;
133
+ }
134
+
135
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
136
+ const localVarHeaderParameter = {} as any;
137
+ const localVarQueryParameter = {} as any;
138
+
139
+ // authentication session-oauth required
140
+ // oauth required
141
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
142
+
143
+ // authentication api-key required
144
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
145
+
146
+ if (project !== undefined) {
147
+ localVarQueryParameter['project'] = project;
148
+ }
149
+
150
+
151
+
152
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
153
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
154
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
155
+
156
+ return {
157
+ url: toPathString(localVarUrlObj),
158
+ options: localVarRequestOptions,
159
+ };
160
+ },
161
+ /**
162
+ * Connect a Stripe payment account
163
+ * @summary Connect Stripe
164
+ * @param {string} project What project it is
165
+ * @param {ConnectStripeRequest} connectStripeRequest Connect a Stripe payment account
166
+ * @param {*} [options] Override http request option.
167
+ * @throws {RequiredError}
168
+ */
169
+ connectStripe: async (project: string, connectStripeRequest: ConnectStripeRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
170
+ // verify required parameter 'project' is not null or undefined
171
+ assertParamExists('connectStripe', 'project', project)
172
+ // verify required parameter 'connectStripeRequest' is not null or undefined
173
+ assertParamExists('connectStripe', 'connectStripeRequest', connectStripeRequest)
174
+ const localVarPath = `/v1/website/payment/stripe/connect`;
175
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
176
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
177
+ let baseOptions;
178
+ if (configuration) {
179
+ baseOptions = configuration.baseOptions;
180
+ }
181
+
182
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
183
+ const localVarHeaderParameter = {} as any;
184
+ const localVarQueryParameter = {} as any;
185
+
186
+ // authentication session-oauth required
187
+ // oauth required
188
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
189
+
190
+ // authentication api-key required
191
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
192
+
193
+ if (project !== undefined) {
194
+ localVarQueryParameter['project'] = project;
195
+ }
196
+
197
+
198
+
199
+ localVarHeaderParameter['Content-Type'] = 'application/json';
200
+
201
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
202
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
203
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
204
+ localVarRequestOptions.data = serializeDataIfNeeded(connectStripeRequest, localVarRequestOptions, configuration)
205
+
206
+ return {
207
+ url: toPathString(localVarUrlObj),
208
+ options: localVarRequestOptions,
209
+ };
210
+ },
211
+ /**
212
+ * Deauthorize a Stripe payment account
213
+ * @summary Deauthorize Stripe
214
+ * @param {string} project What project it is
215
+ * @param {*} [options] Override http request option.
216
+ * @throws {RequiredError}
217
+ */
218
+ deauthorizeStripe: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
219
+ // verify required parameter 'project' is not null or undefined
220
+ assertParamExists('deauthorizeStripe', 'project', project)
221
+ const localVarPath = `/v1/website/payment/stripe/deauthorize`;
222
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
223
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
224
+ let baseOptions;
225
+ if (configuration) {
226
+ baseOptions = configuration.baseOptions;
227
+ }
228
+
229
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
230
+ const localVarHeaderParameter = {} as any;
231
+ const localVarQueryParameter = {} as any;
232
+
233
+ // authentication session-oauth required
234
+ // oauth required
235
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
236
+
237
+ // authentication api-key required
238
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
239
+
240
+ if (project !== undefined) {
241
+ localVarQueryParameter['project'] = project;
242
+ }
243
+
244
+
245
+
246
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
247
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
248
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
249
+
250
+ return {
251
+ url: toPathString(localVarUrlObj),
252
+ options: localVarRequestOptions,
253
+ };
254
+ },
255
+ /**
256
+ * Get the Stripe payment account for the project
257
+ * @summary Get Stripe Payment Account
258
+ * @param {string} project What project it is
259
+ * @param {*} [options] Override http request option.
260
+ * @throws {RequiredError}
261
+ */
262
+ getStripePaymentAccount: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
263
+ // verify required parameter 'project' is not null or undefined
264
+ assertParamExists('getStripePaymentAccount', 'project', project)
265
+ const localVarPath = `/v1/website/payment/stripe`;
266
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
267
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
268
+ let baseOptions;
269
+ if (configuration) {
270
+ baseOptions = configuration.baseOptions;
271
+ }
272
+
273
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
274
+ const localVarHeaderParameter = {} as any;
275
+ const localVarQueryParameter = {} as any;
276
+
277
+ // authentication session-oauth required
278
+ // oauth required
279
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
280
+
281
+ // authentication api-key required
282
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
283
+
284
+ if (project !== undefined) {
285
+ localVarQueryParameter['project'] = project;
286
+ }
287
+
288
+
289
+
290
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
291
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
292
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
293
+
294
+ return {
295
+ url: toPathString(localVarUrlObj),
296
+ options: localVarRequestOptions,
297
+ };
298
+ },
299
+ }
300
+ };
301
+
302
+ /**
303
+ * PaymentApi - functional programming interface
304
+ * @export
305
+ */
306
+ export const PaymentApiFp = function(configuration?: Configuration) {
307
+ const localVarAxiosParamCreator = PaymentApiAxiosParamCreator(configuration)
308
+ return {
309
+ /**
310
+ * Authorize a Stripe payment account
311
+ * @summary Authorize Stripe
312
+ * @param {string} project What project it is
313
+ * @param {*} [options] Override http request option.
314
+ * @throws {RequiredError}
315
+ */
316
+ async authorizeStripe(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthorizeStripe200Response>> {
317
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authorizeStripe(project, options);
318
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
319
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.authorizeStripe']?.[localVarOperationServerIndex]?.url;
320
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
321
+ },
322
+ /**
323
+ * Connect a Stripe payment account
324
+ * @summary Connect Stripe
325
+ * @param {string} project What project it is
326
+ * @param {ConnectStripeRequest} connectStripeRequest Connect a Stripe payment account
327
+ * @param {*} [options] Override http request option.
328
+ * @throws {RequiredError}
329
+ */
330
+ async connectStripe(project: string, connectStripeRequest: ConnectStripeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentAccount>> {
331
+ const localVarAxiosArgs = await localVarAxiosParamCreator.connectStripe(project, connectStripeRequest, options);
332
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
333
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.connectStripe']?.[localVarOperationServerIndex]?.url;
334
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
335
+ },
336
+ /**
337
+ * Deauthorize a Stripe payment account
338
+ * @summary Deauthorize Stripe
339
+ * @param {string} project What project it is
340
+ * @param {*} [options] Override http request option.
341
+ * @throws {RequiredError}
342
+ */
343
+ async deauthorizeStripe(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
344
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deauthorizeStripe(project, options);
345
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
346
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.deauthorizeStripe']?.[localVarOperationServerIndex]?.url;
347
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
348
+ },
349
+ /**
350
+ * Get the Stripe payment account for the project
351
+ * @summary Get Stripe Payment Account
352
+ * @param {string} project What project it is
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ async getStripePaymentAccount(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentAccount>> {
357
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getStripePaymentAccount(project, options);
358
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
359
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.getStripePaymentAccount']?.[localVarOperationServerIndex]?.url;
360
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
361
+ },
362
+ }
363
+ };
364
+
365
+ /**
366
+ * PaymentApi - factory interface
367
+ * @export
368
+ */
369
+ export const PaymentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
370
+ const localVarFp = PaymentApiFp(configuration)
371
+ return {
372
+ /**
373
+ * Authorize a Stripe payment account
374
+ * @summary Authorize Stripe
375
+ * @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
376
+ * @param {*} [options] Override http request option.
377
+ * @throws {RequiredError}
378
+ */
379
+ authorizeStripe(requestParameters: PaymentApiAuthorizeStripeRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizeStripe200Response> {
380
+ return localVarFp.authorizeStripe(requestParameters.project, options).then((request) => request(axios, basePath));
381
+ },
382
+ /**
383
+ * Connect a Stripe payment account
384
+ * @summary Connect Stripe
385
+ * @param {PaymentApiConnectStripeRequest} requestParameters Request parameters.
386
+ * @param {*} [options] Override http request option.
387
+ * @throws {RequiredError}
388
+ */
389
+ connectStripe(requestParameters: PaymentApiConnectStripeRequest, options?: RawAxiosRequestConfig): AxiosPromise<PaymentAccount> {
390
+ return localVarFp.connectStripe(requestParameters.project, requestParameters.connectStripeRequest, options).then((request) => request(axios, basePath));
391
+ },
392
+ /**
393
+ * Deauthorize a Stripe payment account
394
+ * @summary Deauthorize Stripe
395
+ * @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
396
+ * @param {*} [options] Override http request option.
397
+ * @throws {RequiredError}
398
+ */
399
+ deauthorizeStripe(requestParameters: PaymentApiDeauthorizeStripeRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
400
+ return localVarFp.deauthorizeStripe(requestParameters.project, options).then((request) => request(axios, basePath));
401
+ },
402
+ /**
403
+ * Get the Stripe payment account for the project
404
+ * @summary Get Stripe Payment Account
405
+ * @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
406
+ * @param {*} [options] Override http request option.
407
+ * @throws {RequiredError}
408
+ */
409
+ getStripePaymentAccount(requestParameters: PaymentApiGetStripePaymentAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise<PaymentAccount> {
410
+ return localVarFp.getStripePaymentAccount(requestParameters.project, options).then((request) => request(axios, basePath));
411
+ },
412
+ };
413
+ };
414
+
415
+ /**
416
+ * Request parameters for authorizeStripe operation in PaymentApi.
417
+ * @export
418
+ * @interface PaymentApiAuthorizeStripeRequest
419
+ */
420
+ export interface PaymentApiAuthorizeStripeRequest {
421
+ /**
422
+ * What project it is
423
+ * @type {string}
424
+ * @memberof PaymentApiAuthorizeStripe
425
+ */
426
+ readonly project: string
427
+ }
428
+
429
+ /**
430
+ * Request parameters for connectStripe operation in PaymentApi.
431
+ * @export
432
+ * @interface PaymentApiConnectStripeRequest
433
+ */
434
+ export interface PaymentApiConnectStripeRequest {
435
+ /**
436
+ * What project it is
437
+ * @type {string}
438
+ * @memberof PaymentApiConnectStripe
439
+ */
440
+ readonly project: string
441
+
442
+ /**
443
+ * Connect a Stripe payment account
444
+ * @type {ConnectStripeRequest}
445
+ * @memberof PaymentApiConnectStripe
446
+ */
447
+ readonly connectStripeRequest: ConnectStripeRequest
448
+ }
449
+
450
+ /**
451
+ * Request parameters for deauthorizeStripe operation in PaymentApi.
452
+ * @export
453
+ * @interface PaymentApiDeauthorizeStripeRequest
454
+ */
455
+ export interface PaymentApiDeauthorizeStripeRequest {
456
+ /**
457
+ * What project it is
458
+ * @type {string}
459
+ * @memberof PaymentApiDeauthorizeStripe
460
+ */
461
+ readonly project: string
462
+ }
463
+
464
+ /**
465
+ * Request parameters for getStripePaymentAccount operation in PaymentApi.
466
+ * @export
467
+ * @interface PaymentApiGetStripePaymentAccountRequest
468
+ */
469
+ export interface PaymentApiGetStripePaymentAccountRequest {
470
+ /**
471
+ * What project it is
472
+ * @type {string}
473
+ * @memberof PaymentApiGetStripePaymentAccount
474
+ */
475
+ readonly project: string
476
+ }
477
+
478
+ /**
479
+ * PaymentApi - object-oriented interface
480
+ * @export
481
+ * @class PaymentApi
482
+ * @extends {BaseAPI}
483
+ */
484
+ export class PaymentApi extends BaseAPI {
485
+ /**
486
+ * Authorize a Stripe payment account
487
+ * @summary Authorize Stripe
488
+ * @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
489
+ * @param {*} [options] Override http request option.
490
+ * @throws {RequiredError}
491
+ * @memberof PaymentApi
492
+ */
493
+ public authorizeStripe(requestParameters: PaymentApiAuthorizeStripeRequest, options?: RawAxiosRequestConfig) {
494
+ return PaymentApiFp(this.configuration).authorizeStripe(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
495
+ }
496
+
497
+ /**
498
+ * Connect a Stripe payment account
499
+ * @summary Connect Stripe
500
+ * @param {PaymentApiConnectStripeRequest} requestParameters Request parameters.
501
+ * @param {*} [options] Override http request option.
502
+ * @throws {RequiredError}
503
+ * @memberof PaymentApi
504
+ */
505
+ public connectStripe(requestParameters: PaymentApiConnectStripeRequest, options?: RawAxiosRequestConfig) {
506
+ return PaymentApiFp(this.configuration).connectStripe(requestParameters.project, requestParameters.connectStripeRequest, options).then((request) => request(this.axios, this.basePath));
507
+ }
508
+
509
+ /**
510
+ * Deauthorize a Stripe payment account
511
+ * @summary Deauthorize Stripe
512
+ * @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
513
+ * @param {*} [options] Override http request option.
514
+ * @throws {RequiredError}
515
+ * @memberof PaymentApi
516
+ */
517
+ public deauthorizeStripe(requestParameters: PaymentApiDeauthorizeStripeRequest, options?: RawAxiosRequestConfig) {
518
+ return PaymentApiFp(this.configuration).deauthorizeStripe(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
519
+ }
520
+
521
+ /**
522
+ * Get the Stripe payment account for the project
523
+ * @summary Get Stripe Payment Account
524
+ * @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
525
+ * @param {*} [options] Override http request option.
526
+ * @throws {RequiredError}
527
+ * @memberof PaymentApi
528
+ */
529
+ public getStripePaymentAccount(requestParameters: PaymentApiGetStripePaymentAccountRequest, options?: RawAxiosRequestConfig) {
530
+ return PaymentApiFp(this.configuration).getStripePaymentAccount(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
531
+ }
532
+ }
533
+
534
+
535
+
package/base.ts ADDED
@@ -0,0 +1,86 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Website API
5
+ * Manage your Teemill Website Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
6
+ *
7
+ * The version of the OpenAPI document: 0.1.5
8
+ * Contact: hello@teemill.com
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
+
15
+
16
+ import type { Configuration } from './configuration';
17
+ // Some imports not used depending on template conditions
18
+ // @ts-ignore
19
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
20
+ import globalAxios from 'axios';
21
+
22
+ export const BASE_PATH = "https://api.localhost:8080".replace(/\/+$/, "");
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ */
28
+ export const COLLECTION_FORMATS = {
29
+ csv: ",",
30
+ ssv: " ",
31
+ tsv: "\t",
32
+ pipes: "|",
33
+ };
34
+
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface RequestArgs
39
+ */
40
+ export interface RequestArgs {
41
+ url: string;
42
+ options: RawAxiosRequestConfig;
43
+ }
44
+
45
+ /**
46
+ *
47
+ * @export
48
+ * @class BaseAPI
49
+ */
50
+ export class BaseAPI {
51
+ protected configuration: Configuration | undefined;
52
+
53
+ constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
54
+ if (configuration) {
55
+ this.configuration = configuration;
56
+ this.basePath = configuration.basePath ?? basePath;
57
+ }
58
+ }
59
+ };
60
+
61
+ /**
62
+ *
63
+ * @export
64
+ * @class RequiredError
65
+ * @extends {Error}
66
+ */
67
+ export class RequiredError extends Error {
68
+ constructor(public field: string, msg?: string) {
69
+ super(msg);
70
+ this.name = "RequiredError"
71
+ }
72
+ }
73
+
74
+ interface ServerMap {
75
+ [key: string]: {
76
+ url: string,
77
+ description: string,
78
+ }[];
79
+ }
80
+
81
+ /**
82
+ *
83
+ * @export
84
+ */
85
+ export const operationServerMap: ServerMap = {
86
+ }