@teemill/website 0.1.0

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.
@@ -0,0 +1,12 @@
1
+ .gitignore
2
+ .npmignore
3
+ README.md
4
+ api.ts
5
+ base.ts
6
+ common.ts
7
+ configuration.ts
8
+ git_push.sh
9
+ index.ts
10
+ package.json
11
+ tsconfig.esm.json
12
+ tsconfig.json
@@ -0,0 +1 @@
1
+ 7.6.0
@@ -0,0 +1,23 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ ## @teemill/website@0.1.0
2
+
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
+
5
+ Environment
6
+ * Node.js
7
+ * Webpack
8
+ * Browserify
9
+
10
+ Language level
11
+ * ES5 - you must have a Promises/A+ library installed
12
+ * ES6
13
+
14
+ Module system
15
+ * CommonJS
16
+ * ES6 module system
17
+
18
+ It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
19
+
20
+ ### Building
21
+
22
+ To build and compile the typescript sources to javascript use:
23
+ ```
24
+ npm install
25
+ npm run build
26
+ ```
27
+
28
+ ### Publishing
29
+
30
+ First build the package then run `npm publish`
31
+
32
+ ### Consuming
33
+
34
+ navigate to the folder of your consuming project and run one of the following commands.
35
+
36
+ _published:_
37
+
38
+ ```
39
+ npm install @teemill/website@0.1.0 --save
40
+ ```
41
+
42
+ _unPublished (not recommended):_
43
+
44
+ ```
45
+ npm install PATH_TO_GENERATED_PACKAGE --save
46
+ ```
package/api.ts ADDED
@@ -0,0 +1,522 @@
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.0
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 ConnectStripeRequest
49
+ */
50
+ export interface ConnectStripeRequest {
51
+ /**
52
+ * The code returned from the Stripe connect flow
53
+ * @type {string}
54
+ * @memberof ConnectStripeRequest
55
+ */
56
+ 'code': string;
57
+ /**
58
+ * The state returned from the Stripe connect flow
59
+ * @type {string}
60
+ * @memberof ConnectStripeRequest
61
+ */
62
+ 'state': string;
63
+ }
64
+ /**
65
+ *
66
+ * @export
67
+ * @interface PaymentAccount
68
+ */
69
+ export interface PaymentAccount {
70
+ /**
71
+ * The name of the payment account
72
+ * @type {string}
73
+ * @memberof PaymentAccount
74
+ */
75
+ 'name': string;
76
+ /**
77
+ * The payment method
78
+ * @type {string}
79
+ * @memberof PaymentAccount
80
+ */
81
+ 'method': PaymentAccountMethodEnum;
82
+ /**
83
+ * The configuration for the payment account
84
+ * @type {{ [key: string]: string; }}
85
+ * @memberof PaymentAccount
86
+ */
87
+ 'config': { [key: string]: string; };
88
+ }
89
+
90
+ export const PaymentAccountMethodEnum = {
91
+ Stripe: 'stripe',
92
+ Paypal: 'paypal'
93
+ } as const;
94
+
95
+ export type PaymentAccountMethodEnum = typeof PaymentAccountMethodEnum[keyof typeof PaymentAccountMethodEnum];
96
+
97
+
98
+ /**
99
+ * PaymentApi - axios parameter creator
100
+ * @export
101
+ */
102
+ export const PaymentApiAxiosParamCreator = function (configuration?: Configuration) {
103
+ return {
104
+ /**
105
+ * Authorize a Stripe payment account
106
+ * @summary Authorize Stripe
107
+ * @param {string} project What project it is
108
+ * @param {*} [options] Override http request option.
109
+ * @throws {RequiredError}
110
+ */
111
+ authorizeStripe: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
112
+ // verify required parameter 'project' is not null or undefined
113
+ assertParamExists('authorizeStripe', 'project', project)
114
+ const localVarPath = `/v1/website/payment/stripe/authorize`;
115
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
116
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
117
+ let baseOptions;
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ }
121
+
122
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
123
+ const localVarHeaderParameter = {} as any;
124
+ const localVarQueryParameter = {} as any;
125
+
126
+ // authentication session-oauth required
127
+ // oauth required
128
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
129
+
130
+ // authentication api-key required
131
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
132
+
133
+ if (project !== undefined) {
134
+ localVarQueryParameter['project'] = project;
135
+ }
136
+
137
+
138
+
139
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
140
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
141
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
142
+
143
+ return {
144
+ url: toPathString(localVarUrlObj),
145
+ options: localVarRequestOptions,
146
+ };
147
+ },
148
+ /**
149
+ * Connect a Stripe payment account
150
+ * @summary Connect Stripe
151
+ * @param {string} project What project it is
152
+ * @param {ConnectStripeRequest} connectStripeRequest Connect a Stripe payment account
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ connectStripe: async (project: string, connectStripeRequest: ConnectStripeRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
157
+ // verify required parameter 'project' is not null or undefined
158
+ assertParamExists('connectStripe', 'project', project)
159
+ // verify required parameter 'connectStripeRequest' is not null or undefined
160
+ assertParamExists('connectStripe', 'connectStripeRequest', connectStripeRequest)
161
+ const localVarPath = `/v1/website/payment/stripe/connect`;
162
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
163
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
164
+ let baseOptions;
165
+ if (configuration) {
166
+ baseOptions = configuration.baseOptions;
167
+ }
168
+
169
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
170
+ const localVarHeaderParameter = {} as any;
171
+ const localVarQueryParameter = {} as any;
172
+
173
+ // authentication session-oauth required
174
+ // oauth required
175
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
176
+
177
+ // authentication api-key required
178
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
179
+
180
+ if (project !== undefined) {
181
+ localVarQueryParameter['project'] = project;
182
+ }
183
+
184
+
185
+
186
+ localVarHeaderParameter['Content-Type'] = 'application/json';
187
+
188
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
189
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
190
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
191
+ localVarRequestOptions.data = serializeDataIfNeeded(connectStripeRequest, localVarRequestOptions, configuration)
192
+
193
+ return {
194
+ url: toPathString(localVarUrlObj),
195
+ options: localVarRequestOptions,
196
+ };
197
+ },
198
+ /**
199
+ * Deauthorize a Stripe payment account
200
+ * @summary Deauthorize Stripe
201
+ * @param {string} project What project it is
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ deauthorizeStripe: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
206
+ // verify required parameter 'project' is not null or undefined
207
+ assertParamExists('deauthorizeStripe', 'project', project)
208
+ const localVarPath = `/v1/website/payment/stripe/deauthorize`;
209
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
210
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
211
+ let baseOptions;
212
+ if (configuration) {
213
+ baseOptions = configuration.baseOptions;
214
+ }
215
+
216
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
217
+ const localVarHeaderParameter = {} as any;
218
+ const localVarQueryParameter = {} as any;
219
+
220
+ // authentication session-oauth required
221
+ // oauth required
222
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
223
+
224
+ // authentication api-key required
225
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
226
+
227
+ if (project !== undefined) {
228
+ localVarQueryParameter['project'] = project;
229
+ }
230
+
231
+
232
+
233
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
234
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
235
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
236
+
237
+ return {
238
+ url: toPathString(localVarUrlObj),
239
+ options: localVarRequestOptions,
240
+ };
241
+ },
242
+ /**
243
+ * Get the Stripe payment account for the project
244
+ * @summary Get Stripe Payment Account
245
+ * @param {string} project What project it is
246
+ * @param {*} [options] Override http request option.
247
+ * @throws {RequiredError}
248
+ */
249
+ getStripePaymentAccount: async (project: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
250
+ // verify required parameter 'project' is not null or undefined
251
+ assertParamExists('getStripePaymentAccount', 'project', project)
252
+ const localVarPath = `/v1/website/payment/stripe`;
253
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
254
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
255
+ let baseOptions;
256
+ if (configuration) {
257
+ baseOptions = configuration.baseOptions;
258
+ }
259
+
260
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
261
+ const localVarHeaderParameter = {} as any;
262
+ const localVarQueryParameter = {} as any;
263
+
264
+ // authentication session-oauth required
265
+ // oauth required
266
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
267
+
268
+ // authentication api-key required
269
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
270
+
271
+ if (project !== undefined) {
272
+ localVarQueryParameter['project'] = project;
273
+ }
274
+
275
+
276
+
277
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
278
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
279
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
280
+
281
+ return {
282
+ url: toPathString(localVarUrlObj),
283
+ options: localVarRequestOptions,
284
+ };
285
+ },
286
+ }
287
+ };
288
+
289
+ /**
290
+ * PaymentApi - functional programming interface
291
+ * @export
292
+ */
293
+ export const PaymentApiFp = function(configuration?: Configuration) {
294
+ const localVarAxiosParamCreator = PaymentApiAxiosParamCreator(configuration)
295
+ return {
296
+ /**
297
+ * Authorize a Stripe payment account
298
+ * @summary Authorize Stripe
299
+ * @param {string} project What project it is
300
+ * @param {*} [options] Override http request option.
301
+ * @throws {RequiredError}
302
+ */
303
+ async authorizeStripe(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
304
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authorizeStripe(project, options);
305
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
306
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.authorizeStripe']?.[localVarOperationServerIndex]?.url;
307
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
308
+ },
309
+ /**
310
+ * Connect a Stripe payment account
311
+ * @summary Connect Stripe
312
+ * @param {string} project What project it is
313
+ * @param {ConnectStripeRequest} connectStripeRequest Connect a Stripe payment account
314
+ * @param {*} [options] Override http request option.
315
+ * @throws {RequiredError}
316
+ */
317
+ async connectStripe(project: string, connectStripeRequest: ConnectStripeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentAccount>> {
318
+ const localVarAxiosArgs = await localVarAxiosParamCreator.connectStripe(project, connectStripeRequest, options);
319
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
320
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.connectStripe']?.[localVarOperationServerIndex]?.url;
321
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
322
+ },
323
+ /**
324
+ * Deauthorize a Stripe payment account
325
+ * @summary Deauthorize Stripe
326
+ * @param {string} project What project it is
327
+ * @param {*} [options] Override http request option.
328
+ * @throws {RequiredError}
329
+ */
330
+ async deauthorizeStripe(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
331
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deauthorizeStripe(project, options);
332
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
333
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.deauthorizeStripe']?.[localVarOperationServerIndex]?.url;
334
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
335
+ },
336
+ /**
337
+ * Get the Stripe payment account for the project
338
+ * @summary Get Stripe Payment Account
339
+ * @param {string} project What project it is
340
+ * @param {*} [options] Override http request option.
341
+ * @throws {RequiredError}
342
+ */
343
+ async getStripePaymentAccount(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentAccount>> {
344
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getStripePaymentAccount(project, options);
345
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
346
+ const localVarOperationServerBasePath = operationServerMap['PaymentApi.getStripePaymentAccount']?.[localVarOperationServerIndex]?.url;
347
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
348
+ },
349
+ }
350
+ };
351
+
352
+ /**
353
+ * PaymentApi - factory interface
354
+ * @export
355
+ */
356
+ export const PaymentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
357
+ const localVarFp = PaymentApiFp(configuration)
358
+ return {
359
+ /**
360
+ * Authorize a Stripe payment account
361
+ * @summary Authorize Stripe
362
+ * @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
363
+ * @param {*} [options] Override http request option.
364
+ * @throws {RequiredError}
365
+ */
366
+ authorizeStripe(requestParameters: PaymentApiAuthorizeStripeRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
367
+ return localVarFp.authorizeStripe(requestParameters.project, options).then((request) => request(axios, basePath));
368
+ },
369
+ /**
370
+ * Connect a Stripe payment account
371
+ * @summary Connect Stripe
372
+ * @param {PaymentApiConnectStripeRequest} requestParameters Request parameters.
373
+ * @param {*} [options] Override http request option.
374
+ * @throws {RequiredError}
375
+ */
376
+ connectStripe(requestParameters: PaymentApiConnectStripeRequest, options?: RawAxiosRequestConfig): AxiosPromise<PaymentAccount> {
377
+ return localVarFp.connectStripe(requestParameters.project, requestParameters.connectStripeRequest, options).then((request) => request(axios, basePath));
378
+ },
379
+ /**
380
+ * Deauthorize a Stripe payment account
381
+ * @summary Deauthorize Stripe
382
+ * @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ */
386
+ deauthorizeStripe(requestParameters: PaymentApiDeauthorizeStripeRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
387
+ return localVarFp.deauthorizeStripe(requestParameters.project, options).then((request) => request(axios, basePath));
388
+ },
389
+ /**
390
+ * Get the Stripe payment account for the project
391
+ * @summary Get Stripe Payment Account
392
+ * @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
393
+ * @param {*} [options] Override http request option.
394
+ * @throws {RequiredError}
395
+ */
396
+ getStripePaymentAccount(requestParameters: PaymentApiGetStripePaymentAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise<PaymentAccount> {
397
+ return localVarFp.getStripePaymentAccount(requestParameters.project, options).then((request) => request(axios, basePath));
398
+ },
399
+ };
400
+ };
401
+
402
+ /**
403
+ * Request parameters for authorizeStripe operation in PaymentApi.
404
+ * @export
405
+ * @interface PaymentApiAuthorizeStripeRequest
406
+ */
407
+ export interface PaymentApiAuthorizeStripeRequest {
408
+ /**
409
+ * What project it is
410
+ * @type {string}
411
+ * @memberof PaymentApiAuthorizeStripe
412
+ */
413
+ readonly project: string
414
+ }
415
+
416
+ /**
417
+ * Request parameters for connectStripe operation in PaymentApi.
418
+ * @export
419
+ * @interface PaymentApiConnectStripeRequest
420
+ */
421
+ export interface PaymentApiConnectStripeRequest {
422
+ /**
423
+ * What project it is
424
+ * @type {string}
425
+ * @memberof PaymentApiConnectStripe
426
+ */
427
+ readonly project: string
428
+
429
+ /**
430
+ * Connect a Stripe payment account
431
+ * @type {ConnectStripeRequest}
432
+ * @memberof PaymentApiConnectStripe
433
+ */
434
+ readonly connectStripeRequest: ConnectStripeRequest
435
+ }
436
+
437
+ /**
438
+ * Request parameters for deauthorizeStripe operation in PaymentApi.
439
+ * @export
440
+ * @interface PaymentApiDeauthorizeStripeRequest
441
+ */
442
+ export interface PaymentApiDeauthorizeStripeRequest {
443
+ /**
444
+ * What project it is
445
+ * @type {string}
446
+ * @memberof PaymentApiDeauthorizeStripe
447
+ */
448
+ readonly project: string
449
+ }
450
+
451
+ /**
452
+ * Request parameters for getStripePaymentAccount operation in PaymentApi.
453
+ * @export
454
+ * @interface PaymentApiGetStripePaymentAccountRequest
455
+ */
456
+ export interface PaymentApiGetStripePaymentAccountRequest {
457
+ /**
458
+ * What project it is
459
+ * @type {string}
460
+ * @memberof PaymentApiGetStripePaymentAccount
461
+ */
462
+ readonly project: string
463
+ }
464
+
465
+ /**
466
+ * PaymentApi - object-oriented interface
467
+ * @export
468
+ * @class PaymentApi
469
+ * @extends {BaseAPI}
470
+ */
471
+ export class PaymentApi extends BaseAPI {
472
+ /**
473
+ * Authorize a Stripe payment account
474
+ * @summary Authorize Stripe
475
+ * @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ * @memberof PaymentApi
479
+ */
480
+ public authorizeStripe(requestParameters: PaymentApiAuthorizeStripeRequest, options?: RawAxiosRequestConfig) {
481
+ return PaymentApiFp(this.configuration).authorizeStripe(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
482
+ }
483
+
484
+ /**
485
+ * Connect a Stripe payment account
486
+ * @summary Connect Stripe
487
+ * @param {PaymentApiConnectStripeRequest} requestParameters Request parameters.
488
+ * @param {*} [options] Override http request option.
489
+ * @throws {RequiredError}
490
+ * @memberof PaymentApi
491
+ */
492
+ public connectStripe(requestParameters: PaymentApiConnectStripeRequest, options?: RawAxiosRequestConfig) {
493
+ return PaymentApiFp(this.configuration).connectStripe(requestParameters.project, requestParameters.connectStripeRequest, options).then((request) => request(this.axios, this.basePath));
494
+ }
495
+
496
+ /**
497
+ * Deauthorize a Stripe payment account
498
+ * @summary Deauthorize Stripe
499
+ * @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
500
+ * @param {*} [options] Override http request option.
501
+ * @throws {RequiredError}
502
+ * @memberof PaymentApi
503
+ */
504
+ public deauthorizeStripe(requestParameters: PaymentApiDeauthorizeStripeRequest, options?: RawAxiosRequestConfig) {
505
+ return PaymentApiFp(this.configuration).deauthorizeStripe(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
506
+ }
507
+
508
+ /**
509
+ * Get the Stripe payment account for the project
510
+ * @summary Get Stripe Payment Account
511
+ * @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
512
+ * @param {*} [options] Override http request option.
513
+ * @throws {RequiredError}
514
+ * @memberof PaymentApi
515
+ */
516
+ public getStripePaymentAccount(requestParameters: PaymentApiGetStripePaymentAccountRequest, options?: RawAxiosRequestConfig) {
517
+ return PaymentApiFp(this.configuration).getStripePaymentAccount(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
518
+ }
519
+ }
520
+
521
+
522
+
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.0
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
+ }