@teemill/website 0.1.3 → 0.1.6

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 +409 -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 +243 -0
  9. package/dist/api.js +292 -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 +243 -0
  17. package/dist/esm/api.js +285 -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
@@ -0,0 +1,110 @@
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.6
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
+ export interface ConfigurationParameters {
17
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
18
+ username?: string;
19
+ password?: string;
20
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
21
+ basePath?: string;
22
+ serverIndex?: number;
23
+ baseOptions?: any;
24
+ formDataCtor?: new () => any;
25
+ }
26
+
27
+ export class Configuration {
28
+ /**
29
+ * parameter for apiKey security
30
+ * @param name security name
31
+ * @memberof Configuration
32
+ */
33
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
34
+ /**
35
+ * parameter for basic security
36
+ *
37
+ * @type {string}
38
+ * @memberof Configuration
39
+ */
40
+ username?: string;
41
+ /**
42
+ * parameter for basic security
43
+ *
44
+ * @type {string}
45
+ * @memberof Configuration
46
+ */
47
+ password?: string;
48
+ /**
49
+ * parameter for oauth2 security
50
+ * @param name security name
51
+ * @param scopes oauth2 scope
52
+ * @memberof Configuration
53
+ */
54
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
55
+ /**
56
+ * override base path
57
+ *
58
+ * @type {string}
59
+ * @memberof Configuration
60
+ */
61
+ basePath?: string;
62
+ /**
63
+ * override server index
64
+ *
65
+ * @type {number}
66
+ * @memberof Configuration
67
+ */
68
+ serverIndex?: number;
69
+ /**
70
+ * base options for axios calls
71
+ *
72
+ * @type {any}
73
+ * @memberof Configuration
74
+ */
75
+ baseOptions?: any;
76
+ /**
77
+ * The FormData constructor that will be used to create multipart form data
78
+ * requests. You can inject this here so that execution environments that
79
+ * do not support the FormData class can still run the generated client.
80
+ *
81
+ * @type {new () => FormData}
82
+ */
83
+ formDataCtor?: new () => any;
84
+
85
+ constructor(param: ConfigurationParameters = {}) {
86
+ this.apiKey = param.apiKey;
87
+ this.username = param.username;
88
+ this.password = param.password;
89
+ this.accessToken = param.accessToken;
90
+ this.basePath = param.basePath;
91
+ this.serverIndex = param.serverIndex;
92
+ this.baseOptions = param.baseOptions;
93
+ this.formDataCtor = param.formDataCtor;
94
+ }
95
+
96
+ /**
97
+ * Check if the given MIME is a JSON MIME.
98
+ * JSON MIME examples:
99
+ * application/json
100
+ * application/json; charset=UTF8
101
+ * APPLICATION/JSON
102
+ * application/vnd.company+json
103
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
104
+ * @return True if the given MIME is JSON, false otherwise.
105
+ */
106
+ public isJsonMime(mime: string): boolean {
107
+ const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
108
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
109
+ }
110
+ }
package/dist/api.d.ts ADDED
@@ -0,0 +1,243 @@
1
+ /**
2
+ * Website API
3
+ * 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)
4
+ *
5
+ * The version of the OpenAPI document: 0.1.6
6
+ * Contact: hello@teemill.com
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 type { Configuration } from './configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import type { RequestArgs } from './base';
15
+ import { BaseAPI } from './base';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ApiError
20
+ */
21
+ export interface ApiError {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ApiError
26
+ */
27
+ 'code': string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ApiError
32
+ */
33
+ 'message': string;
34
+ }
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface AuthorizeStripe200Response
39
+ */
40
+ export interface AuthorizeStripe200Response {
41
+ /**
42
+ * The URL to redirect to
43
+ * @type {string}
44
+ * @memberof AuthorizeStripe200Response
45
+ */
46
+ 'redirect_url': string;
47
+ }
48
+ /**
49
+ *
50
+ * @export
51
+ * @interface PaymentAccount
52
+ */
53
+ export interface PaymentAccount {
54
+ /**
55
+ * The name of the payment account
56
+ * @type {string}
57
+ * @memberof PaymentAccount
58
+ */
59
+ 'name': string;
60
+ /**
61
+ * The payment method
62
+ * @type {string}
63
+ * @memberof PaymentAccount
64
+ */
65
+ 'method': PaymentAccountMethodEnum;
66
+ /**
67
+ * The configuration for the payment account
68
+ * @type {{ [key: string]: string; }}
69
+ * @memberof PaymentAccount
70
+ */
71
+ 'config': {
72
+ [key: string]: string;
73
+ };
74
+ }
75
+ export declare const PaymentAccountMethodEnum: {
76
+ readonly Stripe: "stripe";
77
+ readonly Paypal: "paypal";
78
+ };
79
+ export type PaymentAccountMethodEnum = typeof PaymentAccountMethodEnum[keyof typeof PaymentAccountMethodEnum];
80
+ /**
81
+ * PaymentApi - axios parameter creator
82
+ * @export
83
+ */
84
+ export declare const PaymentApiAxiosParamCreator: (configuration?: Configuration) => {
85
+ /**
86
+ * Authorize a Stripe payment account
87
+ * @summary Authorize Stripe
88
+ * @param {string} project What project it is
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ */
92
+ authorizeStripe: (project: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
93
+ /**
94
+ * Deauthorize a Stripe payment account
95
+ * @summary Deauthorize Stripe
96
+ * @param {string} project What project it is
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ deauthorizeStripe: (project: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
101
+ /**
102
+ * Get the Stripe payment account for the project
103
+ * @summary Get Stripe Payment Account
104
+ * @param {string} project What project it is
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ getStripePaymentAccount: (project: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
109
+ };
110
+ /**
111
+ * PaymentApi - functional programming interface
112
+ * @export
113
+ */
114
+ export declare const PaymentApiFp: (configuration?: Configuration) => {
115
+ /**
116
+ * Authorize a Stripe payment account
117
+ * @summary Authorize Stripe
118
+ * @param {string} project What project it is
119
+ * @param {*} [options] Override http request option.
120
+ * @throws {RequiredError}
121
+ */
122
+ authorizeStripe(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthorizeStripe200Response>>;
123
+ /**
124
+ * Deauthorize a Stripe payment account
125
+ * @summary Deauthorize Stripe
126
+ * @param {string} project What project it is
127
+ * @param {*} [options] Override http request option.
128
+ * @throws {RequiredError}
129
+ */
130
+ deauthorizeStripe(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
131
+ /**
132
+ * Get the Stripe payment account for the project
133
+ * @summary Get Stripe Payment Account
134
+ * @param {string} project What project it is
135
+ * @param {*} [options] Override http request option.
136
+ * @throws {RequiredError}
137
+ */
138
+ getStripePaymentAccount(project: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaymentAccount>>;
139
+ };
140
+ /**
141
+ * PaymentApi - factory interface
142
+ * @export
143
+ */
144
+ export declare const PaymentApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
145
+ /**
146
+ * Authorize a Stripe payment account
147
+ * @summary Authorize Stripe
148
+ * @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ authorizeStripe(requestParameters: PaymentApiAuthorizeStripeRequest, options?: RawAxiosRequestConfig): AxiosPromise<AuthorizeStripe200Response>;
153
+ /**
154
+ * Deauthorize a Stripe payment account
155
+ * @summary Deauthorize Stripe
156
+ * @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
157
+ * @param {*} [options] Override http request option.
158
+ * @throws {RequiredError}
159
+ */
160
+ deauthorizeStripe(requestParameters: PaymentApiDeauthorizeStripeRequest, options?: RawAxiosRequestConfig): AxiosPromise<void>;
161
+ /**
162
+ * Get the Stripe payment account for the project
163
+ * @summary Get Stripe Payment Account
164
+ * @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
165
+ * @param {*} [options] Override http request option.
166
+ * @throws {RequiredError}
167
+ */
168
+ getStripePaymentAccount(requestParameters: PaymentApiGetStripePaymentAccountRequest, options?: RawAxiosRequestConfig): AxiosPromise<PaymentAccount>;
169
+ };
170
+ /**
171
+ * Request parameters for authorizeStripe operation in PaymentApi.
172
+ * @export
173
+ * @interface PaymentApiAuthorizeStripeRequest
174
+ */
175
+ export interface PaymentApiAuthorizeStripeRequest {
176
+ /**
177
+ * What project it is
178
+ * @type {string}
179
+ * @memberof PaymentApiAuthorizeStripe
180
+ */
181
+ readonly project: string;
182
+ }
183
+ /**
184
+ * Request parameters for deauthorizeStripe operation in PaymentApi.
185
+ * @export
186
+ * @interface PaymentApiDeauthorizeStripeRequest
187
+ */
188
+ export interface PaymentApiDeauthorizeStripeRequest {
189
+ /**
190
+ * What project it is
191
+ * @type {string}
192
+ * @memberof PaymentApiDeauthorizeStripe
193
+ */
194
+ readonly project: string;
195
+ }
196
+ /**
197
+ * Request parameters for getStripePaymentAccount operation in PaymentApi.
198
+ * @export
199
+ * @interface PaymentApiGetStripePaymentAccountRequest
200
+ */
201
+ export interface PaymentApiGetStripePaymentAccountRequest {
202
+ /**
203
+ * What project it is
204
+ * @type {string}
205
+ * @memberof PaymentApiGetStripePaymentAccount
206
+ */
207
+ readonly project: string;
208
+ }
209
+ /**
210
+ * PaymentApi - object-oriented interface
211
+ * @export
212
+ * @class PaymentApi
213
+ * @extends {BaseAPI}
214
+ */
215
+ export declare class PaymentApi extends BaseAPI {
216
+ /**
217
+ * Authorize a Stripe payment account
218
+ * @summary Authorize Stripe
219
+ * @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
220
+ * @param {*} [options] Override http request option.
221
+ * @throws {RequiredError}
222
+ * @memberof PaymentApi
223
+ */
224
+ authorizeStripe(requestParameters: PaymentApiAuthorizeStripeRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthorizeStripe200Response, any>>;
225
+ /**
226
+ * Deauthorize a Stripe payment account
227
+ * @summary Deauthorize Stripe
228
+ * @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
229
+ * @param {*} [options] Override http request option.
230
+ * @throws {RequiredError}
231
+ * @memberof PaymentApi
232
+ */
233
+ deauthorizeStripe(requestParameters: PaymentApiDeauthorizeStripeRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
234
+ /**
235
+ * Get the Stripe payment account for the project
236
+ * @summary Get Stripe Payment Account
237
+ * @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
238
+ * @param {*} [options] Override http request option.
239
+ * @throws {RequiredError}
240
+ * @memberof PaymentApi
241
+ */
242
+ getStripePaymentAccount(requestParameters: PaymentApiGetStripePaymentAccountRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<PaymentAccount, any>>;
243
+ }
package/dist/api.js ADDED
@@ -0,0 +1,292 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Website API
6
+ * 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)
7
+ *
8
+ * The version of the OpenAPI document: 0.1.6
9
+ * Contact: hello@teemill.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.PaymentApi = exports.PaymentApiFactory = exports.PaymentApiFp = exports.PaymentApiAxiosParamCreator = exports.PaymentAccountMethodEnum = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("./common");
30
+ // @ts-ignore
31
+ const base_1 = require("./base");
32
+ exports.PaymentAccountMethodEnum = {
33
+ Stripe: 'stripe',
34
+ Paypal: 'paypal'
35
+ };
36
+ /**
37
+ * PaymentApi - axios parameter creator
38
+ * @export
39
+ */
40
+ const PaymentApiAxiosParamCreator = function (configuration) {
41
+ return {
42
+ /**
43
+ * Authorize a Stripe payment account
44
+ * @summary Authorize Stripe
45
+ * @param {string} project What project it is
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ */
49
+ authorizeStripe: (project_1, ...args_1) => __awaiter(this, [project_1, ...args_1], void 0, function* (project, options = {}) {
50
+ // verify required parameter 'project' is not null or undefined
51
+ (0, common_1.assertParamExists)('authorizeStripe', 'project', project);
52
+ const localVarPath = `/v1/website/payment/stripe/authorize`;
53
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
54
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
55
+ let baseOptions;
56
+ if (configuration) {
57
+ baseOptions = configuration.baseOptions;
58
+ }
59
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
60
+ const localVarHeaderParameter = {};
61
+ const localVarQueryParameter = {};
62
+ // authentication session-oauth required
63
+ // oauth required
64
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
65
+ // authentication api-key required
66
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
67
+ if (project !== undefined) {
68
+ localVarQueryParameter['project'] = project;
69
+ }
70
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
71
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
72
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
73
+ return {
74
+ url: (0, common_1.toPathString)(localVarUrlObj),
75
+ options: localVarRequestOptions,
76
+ };
77
+ }),
78
+ /**
79
+ * Deauthorize a Stripe payment account
80
+ * @summary Deauthorize Stripe
81
+ * @param {string} project What project it is
82
+ * @param {*} [options] Override http request option.
83
+ * @throws {RequiredError}
84
+ */
85
+ deauthorizeStripe: (project_2, ...args_2) => __awaiter(this, [project_2, ...args_2], void 0, function* (project, options = {}) {
86
+ // verify required parameter 'project' is not null or undefined
87
+ (0, common_1.assertParamExists)('deauthorizeStripe', 'project', project);
88
+ const localVarPath = `/v1/website/payment/stripe/deauthorize`;
89
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
90
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
91
+ let baseOptions;
92
+ if (configuration) {
93
+ baseOptions = configuration.baseOptions;
94
+ }
95
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
96
+ const localVarHeaderParameter = {};
97
+ const localVarQueryParameter = {};
98
+ // authentication session-oauth required
99
+ // oauth required
100
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
101
+ // authentication api-key required
102
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
103
+ if (project !== undefined) {
104
+ localVarQueryParameter['project'] = project;
105
+ }
106
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
107
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
108
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
109
+ return {
110
+ url: (0, common_1.toPathString)(localVarUrlObj),
111
+ options: localVarRequestOptions,
112
+ };
113
+ }),
114
+ /**
115
+ * Get the Stripe payment account for the project
116
+ * @summary Get Stripe Payment Account
117
+ * @param {string} project What project it is
118
+ * @param {*} [options] Override http request option.
119
+ * @throws {RequiredError}
120
+ */
121
+ getStripePaymentAccount: (project_3, ...args_3) => __awaiter(this, [project_3, ...args_3], void 0, function* (project, options = {}) {
122
+ // verify required parameter 'project' is not null or undefined
123
+ (0, common_1.assertParamExists)('getStripePaymentAccount', 'project', project);
124
+ const localVarPath = `/v1/website/payment/stripe`;
125
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
126
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
127
+ let baseOptions;
128
+ if (configuration) {
129
+ baseOptions = configuration.baseOptions;
130
+ }
131
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
132
+ const localVarHeaderParameter = {};
133
+ const localVarQueryParameter = {};
134
+ // authentication session-oauth required
135
+ // oauth required
136
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
137
+ // authentication api-key required
138
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
139
+ if (project !== undefined) {
140
+ localVarQueryParameter['project'] = project;
141
+ }
142
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
143
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
144
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
145
+ return {
146
+ url: (0, common_1.toPathString)(localVarUrlObj),
147
+ options: localVarRequestOptions,
148
+ };
149
+ }),
150
+ };
151
+ };
152
+ exports.PaymentApiAxiosParamCreator = PaymentApiAxiosParamCreator;
153
+ /**
154
+ * PaymentApi - functional programming interface
155
+ * @export
156
+ */
157
+ const PaymentApiFp = function (configuration) {
158
+ const localVarAxiosParamCreator = (0, exports.PaymentApiAxiosParamCreator)(configuration);
159
+ return {
160
+ /**
161
+ * Authorize a Stripe payment account
162
+ * @summary Authorize Stripe
163
+ * @param {string} project What project it is
164
+ * @param {*} [options] Override http request option.
165
+ * @throws {RequiredError}
166
+ */
167
+ authorizeStripe(project, options) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ var _a, _b, _c;
170
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.authorizeStripe(project, options);
171
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
172
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PaymentApi.authorizeStripe']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
173
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
174
+ });
175
+ },
176
+ /**
177
+ * Deauthorize a Stripe payment account
178
+ * @summary Deauthorize Stripe
179
+ * @param {string} project What project it is
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ */
183
+ deauthorizeStripe(project, options) {
184
+ return __awaiter(this, void 0, void 0, function* () {
185
+ var _a, _b, _c;
186
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deauthorizeStripe(project, options);
187
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
188
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PaymentApi.deauthorizeStripe']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
189
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
190
+ });
191
+ },
192
+ /**
193
+ * Get the Stripe payment account for the project
194
+ * @summary Get Stripe Payment Account
195
+ * @param {string} project What project it is
196
+ * @param {*} [options] Override http request option.
197
+ * @throws {RequiredError}
198
+ */
199
+ getStripePaymentAccount(project, options) {
200
+ return __awaiter(this, void 0, void 0, function* () {
201
+ var _a, _b, _c;
202
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getStripePaymentAccount(project, options);
203
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
204
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PaymentApi.getStripePaymentAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
205
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
206
+ });
207
+ },
208
+ };
209
+ };
210
+ exports.PaymentApiFp = PaymentApiFp;
211
+ /**
212
+ * PaymentApi - factory interface
213
+ * @export
214
+ */
215
+ const PaymentApiFactory = function (configuration, basePath, axios) {
216
+ const localVarFp = (0, exports.PaymentApiFp)(configuration);
217
+ return {
218
+ /**
219
+ * Authorize a Stripe payment account
220
+ * @summary Authorize Stripe
221
+ * @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
222
+ * @param {*} [options] Override http request option.
223
+ * @throws {RequiredError}
224
+ */
225
+ authorizeStripe(requestParameters, options) {
226
+ return localVarFp.authorizeStripe(requestParameters.project, options).then((request) => request(axios, basePath));
227
+ },
228
+ /**
229
+ * Deauthorize a Stripe payment account
230
+ * @summary Deauthorize Stripe
231
+ * @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ deauthorizeStripe(requestParameters, options) {
236
+ return localVarFp.deauthorizeStripe(requestParameters.project, options).then((request) => request(axios, basePath));
237
+ },
238
+ /**
239
+ * Get the Stripe payment account for the project
240
+ * @summary Get Stripe Payment Account
241
+ * @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ */
245
+ getStripePaymentAccount(requestParameters, options) {
246
+ return localVarFp.getStripePaymentAccount(requestParameters.project, options).then((request) => request(axios, basePath));
247
+ },
248
+ };
249
+ };
250
+ exports.PaymentApiFactory = PaymentApiFactory;
251
+ /**
252
+ * PaymentApi - object-oriented interface
253
+ * @export
254
+ * @class PaymentApi
255
+ * @extends {BaseAPI}
256
+ */
257
+ class PaymentApi extends base_1.BaseAPI {
258
+ /**
259
+ * Authorize a Stripe payment account
260
+ * @summary Authorize Stripe
261
+ * @param {PaymentApiAuthorizeStripeRequest} requestParameters Request parameters.
262
+ * @param {*} [options] Override http request option.
263
+ * @throws {RequiredError}
264
+ * @memberof PaymentApi
265
+ */
266
+ authorizeStripe(requestParameters, options) {
267
+ return (0, exports.PaymentApiFp)(this.configuration).authorizeStripe(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
268
+ }
269
+ /**
270
+ * Deauthorize a Stripe payment account
271
+ * @summary Deauthorize Stripe
272
+ * @param {PaymentApiDeauthorizeStripeRequest} requestParameters Request parameters.
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ * @memberof PaymentApi
276
+ */
277
+ deauthorizeStripe(requestParameters, options) {
278
+ return (0, exports.PaymentApiFp)(this.configuration).deauthorizeStripe(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
279
+ }
280
+ /**
281
+ * Get the Stripe payment account for the project
282
+ * @summary Get Stripe Payment Account
283
+ * @param {PaymentApiGetStripePaymentAccountRequest} requestParameters Request parameters.
284
+ * @param {*} [options] Override http request option.
285
+ * @throws {RequiredError}
286
+ * @memberof PaymentApi
287
+ */
288
+ getStripePaymentAccount(requestParameters, options) {
289
+ return (0, exports.PaymentApiFp)(this.configuration).getStripePaymentAccount(requestParameters.project, options).then((request) => request(this.axios, this.basePath));
290
+ }
291
+ }
292
+ exports.PaymentApi = PaymentApi;