vayu-ts 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/openapi/apis/AuthApi.js +1 -1
- package/dist/openapi/apis/ContractsApi.js +4 -4
- package/dist/openapi/apis/CreditsApi.js +3 -3
- package/dist/openapi/apis/CustomersApi.js +7 -7
- package/dist/openapi/apis/EventsApi.js +5 -5
- package/dist/openapi/apis/IntegrationsApi.js +2 -2
- package/dist/openapi/apis/InvoicesApi.js +2 -2
- package/dist/openapi/apis/MetersApi.js +4 -4
- package/dist/openapi/apis/PlansApi.js +3 -3
- package/dist/openapi/apis/ProductConsumptionsApi.js +1 -1
- package/dist/openapi/apis/ReportsApi.js +2 -2
- package/dist/openapi/apis/WebhooksApi.js +1 -1
- package/dist/openapi/configuration.d.ts +2 -8
- package/dist/openapi/index.d.ts +2 -3
- package/dist/openapi/index.js +1 -3
- package/dist/openapi/types/ObservableAPI.d.ts +71 -71
- package/dist/openapi/types/ObservableAPI.js +105 -1085
- package/dist/openapi/types/PromiseAPI.d.ts +71 -71
- package/dist/openapi/types/PromiseAPI.js +70 -771
- package/dist/openapi-v2/apis/AuthenticationApi.js +1 -1
- package/dist/openapi-v2/apis/CustomersApi.js +6 -6
- package/dist/openapi-v2/apis/EntitlementsApi.js +3 -3
- package/dist/openapi-v2/apis/EventsApi.js +4 -4
- package/dist/openapi-v2/apis/InvoicesApi.js +6 -6
- package/dist/openapi-v2/apis/ProductsApi.js +5 -5
- package/dist/openapi-v2/configuration.d.ts +2 -8
- package/dist/openapi-v2/index.d.ts +2 -3
- package/dist/openapi-v2/index.js +1 -3
- package/dist/openapi-v2/types/ObservableAPI.d.ts +51 -51
- package/dist/openapi-v2/types/ObservableAPI.js +75 -775
- package/dist/openapi-v2/types/PromiseAPI.d.ts +51 -51
- package/dist/openapi-v2/types/PromiseAPI.js +50 -551
- package/dist/sdk/clients/CustomersClient.d.ts +1 -0
- package/dist/sdk/clients/CustomersClient.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -170,6 +170,15 @@ console.log(response.hasMore);
|
|
|
170
170
|
console.log(response.nextCursor);
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
+
#### Subscribing to Vayu events
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
vayu.webhooks.subscribe({
|
|
177
|
+
callbackUrl: 'https://webhook.site/1234567890',
|
|
178
|
+
eventType: NotificationEventType.Overage,
|
|
179
|
+
})
|
|
180
|
+
```
|
|
181
|
+
|
|
173
182
|
## Features
|
|
174
183
|
|
|
175
184
|
The Vayu API client library provides access to the following features:
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ class AuthApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
34
34
|
requestContext.setHeaderParam("Content-Type", contentType);
|
|
35
35
|
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(loginRequest, "LoginRequest", ""), contentType);
|
|
36
36
|
requestContext.setBody(serializedBody);
|
|
37
|
-
const defaultAuth =
|
|
37
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
38
38
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
39
39
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
40
40
|
}
|
|
@@ -40,7 +40,7 @@ class ContractsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
40
40
|
if (authMethod?.applySecurityAuthentication) {
|
|
41
41
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
42
42
|
}
|
|
43
|
-
const defaultAuth =
|
|
43
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
44
44
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
45
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
46
46
|
}
|
|
@@ -69,7 +69,7 @@ class ContractsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
69
69
|
if (authMethod?.applySecurityAuthentication) {
|
|
70
70
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
71
71
|
}
|
|
72
|
-
const defaultAuth =
|
|
72
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
73
73
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
74
74
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
75
75
|
}
|
|
@@ -98,7 +98,7 @@ class ContractsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
98
98
|
if (authMethod?.applySecurityAuthentication) {
|
|
99
99
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
100
100
|
}
|
|
101
|
-
const defaultAuth =
|
|
101
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
102
102
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
103
103
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
104
104
|
}
|
|
@@ -131,7 +131,7 @@ class ContractsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
131
131
|
if (authMethod?.applySecurityAuthentication) {
|
|
132
132
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
133
133
|
}
|
|
134
|
-
const defaultAuth =
|
|
134
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
135
135
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
136
136
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
137
137
|
}
|
|
@@ -40,7 +40,7 @@ class CreditsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
40
40
|
if (authMethod?.applySecurityAuthentication) {
|
|
41
41
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
42
42
|
}
|
|
43
|
-
const defaultAuth =
|
|
43
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
44
44
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
45
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
46
46
|
}
|
|
@@ -75,7 +75,7 @@ class CreditsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
75
75
|
if (authMethod?.applySecurityAuthentication) {
|
|
76
76
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
77
77
|
}
|
|
78
|
-
const defaultAuth =
|
|
78
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
79
79
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
80
80
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
81
81
|
}
|
|
@@ -117,7 +117,7 @@ class CreditsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
117
117
|
if (authMethod?.applySecurityAuthentication) {
|
|
118
118
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
119
119
|
}
|
|
120
|
-
const defaultAuth =
|
|
120
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
121
121
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
122
122
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
123
123
|
}
|
|
@@ -40,7 +40,7 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
40
40
|
if (authMethod?.applySecurityAuthentication) {
|
|
41
41
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
42
42
|
}
|
|
43
|
-
const defaultAuth =
|
|
43
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
44
44
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
45
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
46
46
|
}
|
|
@@ -69,7 +69,7 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
69
69
|
if (authMethod?.applySecurityAuthentication) {
|
|
70
70
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
71
71
|
}
|
|
72
|
-
const defaultAuth =
|
|
72
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
73
73
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
74
74
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
75
75
|
}
|
|
@@ -98,7 +98,7 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
98
98
|
if (authMethod?.applySecurityAuthentication) {
|
|
99
99
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
100
100
|
}
|
|
101
|
-
const defaultAuth =
|
|
101
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
102
102
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
103
103
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
104
104
|
}
|
|
@@ -127,7 +127,7 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
127
127
|
if (authMethod?.applySecurityAuthentication) {
|
|
128
128
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
129
129
|
}
|
|
130
|
-
const defaultAuth =
|
|
130
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
131
131
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
132
132
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
133
133
|
}
|
|
@@ -156,7 +156,7 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
156
156
|
if (authMethod?.applySecurityAuthentication) {
|
|
157
157
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
158
158
|
}
|
|
159
|
-
const defaultAuth =
|
|
159
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
160
160
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
161
161
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
162
162
|
}
|
|
@@ -189,7 +189,7 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
189
189
|
if (authMethod?.applySecurityAuthentication) {
|
|
190
190
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
191
191
|
}
|
|
192
|
-
const defaultAuth =
|
|
192
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
193
193
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
194
194
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
195
195
|
}
|
|
@@ -230,7 +230,7 @@ class CustomersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
230
230
|
if (authMethod?.applySecurityAuthentication) {
|
|
231
231
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
232
232
|
}
|
|
233
|
-
const defaultAuth =
|
|
233
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
234
234
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
235
235
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
236
236
|
}
|
|
@@ -34,7 +34,7 @@ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
34
34
|
if (authMethod?.applySecurityAuthentication) {
|
|
35
35
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
36
36
|
}
|
|
37
|
-
const defaultAuth =
|
|
37
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
38
38
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
39
39
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
40
40
|
}
|
|
@@ -63,7 +63,7 @@ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
63
63
|
if (authMethod?.applySecurityAuthentication) {
|
|
64
64
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
65
65
|
}
|
|
66
|
-
const defaultAuth =
|
|
66
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
67
67
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
68
68
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
69
69
|
}
|
|
@@ -119,7 +119,7 @@ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
119
119
|
if (authMethod?.applySecurityAuthentication) {
|
|
120
120
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
121
121
|
}
|
|
122
|
-
const defaultAuth =
|
|
122
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
123
123
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
124
124
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
125
125
|
}
|
|
@@ -154,7 +154,7 @@ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
154
154
|
if (authMethod?.applySecurityAuthentication) {
|
|
155
155
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
156
156
|
}
|
|
157
|
-
const defaultAuth =
|
|
157
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
158
158
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
159
159
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
160
160
|
}
|
|
@@ -189,7 +189,7 @@ class EventsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
189
189
|
if (authMethod?.applySecurityAuthentication) {
|
|
190
190
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
191
191
|
}
|
|
192
|
-
const defaultAuth =
|
|
192
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
193
193
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
194
194
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
195
195
|
}
|
|
@@ -40,7 +40,7 @@ class IntegrationsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
40
40
|
if (authMethod?.applySecurityAuthentication) {
|
|
41
41
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
42
42
|
}
|
|
43
|
-
const defaultAuth =
|
|
43
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
44
44
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
45
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
46
46
|
}
|
|
@@ -75,7 +75,7 @@ class IntegrationsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
75
75
|
if (authMethod?.applySecurityAuthentication) {
|
|
76
76
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
77
77
|
}
|
|
78
|
-
const defaultAuth =
|
|
78
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
79
79
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
80
80
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
81
81
|
}
|
|
@@ -34,7 +34,7 @@ class InvoicesApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
34
34
|
if (authMethod?.applySecurityAuthentication) {
|
|
35
35
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
36
36
|
}
|
|
37
|
-
const defaultAuth =
|
|
37
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
38
38
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
39
39
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
40
40
|
}
|
|
@@ -67,7 +67,7 @@ class InvoicesApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
67
67
|
if (authMethod?.applySecurityAuthentication) {
|
|
68
68
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
69
69
|
}
|
|
70
|
-
const defaultAuth =
|
|
70
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
71
71
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
72
72
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
73
73
|
}
|
|
@@ -34,7 +34,7 @@ class MetersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
34
34
|
if (authMethod?.applySecurityAuthentication) {
|
|
35
35
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
36
36
|
}
|
|
37
|
-
const defaultAuth =
|
|
37
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
38
38
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
39
39
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
40
40
|
}
|
|
@@ -63,7 +63,7 @@ class MetersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
63
63
|
if (authMethod?.applySecurityAuthentication) {
|
|
64
64
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
65
65
|
}
|
|
66
|
-
const defaultAuth =
|
|
66
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
67
67
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
68
68
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
69
69
|
}
|
|
@@ -96,7 +96,7 @@ class MetersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
96
96
|
if (authMethod?.applySecurityAuthentication) {
|
|
97
97
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
98
98
|
}
|
|
99
|
-
const defaultAuth =
|
|
99
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
100
100
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
101
101
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
102
102
|
}
|
|
@@ -137,7 +137,7 @@ class MetersApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
137
137
|
if (authMethod?.applySecurityAuthentication) {
|
|
138
138
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
139
139
|
}
|
|
140
|
-
const defaultAuth =
|
|
140
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
141
141
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
142
142
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
143
143
|
}
|
|
@@ -34,7 +34,7 @@ class PlansApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
34
34
|
if (authMethod?.applySecurityAuthentication) {
|
|
35
35
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
36
36
|
}
|
|
37
|
-
const defaultAuth =
|
|
37
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
38
38
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
39
39
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
40
40
|
}
|
|
@@ -63,7 +63,7 @@ class PlansApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
63
63
|
if (authMethod?.applySecurityAuthentication) {
|
|
64
64
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
65
65
|
}
|
|
66
|
-
const defaultAuth =
|
|
66
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
67
67
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
68
68
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
69
69
|
}
|
|
@@ -96,7 +96,7 @@ class PlansApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
96
96
|
if (authMethod?.applySecurityAuthentication) {
|
|
97
97
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
98
98
|
}
|
|
99
|
-
const defaultAuth =
|
|
99
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
100
100
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
101
101
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
102
102
|
}
|
|
@@ -34,7 +34,7 @@ class ProductConsumptionsApiRequestFactory extends baseapi_1.BaseAPIRequestFacto
|
|
|
34
34
|
if (authMethod?.applySecurityAuthentication) {
|
|
35
35
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
36
36
|
}
|
|
37
|
-
const defaultAuth =
|
|
37
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
38
38
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
39
39
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
40
40
|
}
|
|
@@ -32,7 +32,7 @@ class ReportsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
32
32
|
if (authMethod?.applySecurityAuthentication) {
|
|
33
33
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
34
34
|
}
|
|
35
|
-
const defaultAuth =
|
|
35
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
36
36
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
37
37
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
38
38
|
}
|
|
@@ -70,7 +70,7 @@ class ReportsApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
70
70
|
if (authMethod?.applySecurityAuthentication) {
|
|
71
71
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
72
72
|
}
|
|
73
|
-
const defaultAuth =
|
|
73
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
74
74
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
75
75
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
76
76
|
}
|
|
@@ -40,7 +40,7 @@ class WebhooksApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
|
40
40
|
if (authMethod?.applySecurityAuthentication) {
|
|
41
41
|
await authMethod?.applySecurityAuthentication(requestContext);
|
|
42
42
|
}
|
|
43
|
-
const defaultAuth =
|
|
43
|
+
const defaultAuth = _options?.authMethods?.default || this.configuration?.authMethods?.default;
|
|
44
44
|
if (defaultAuth?.applySecurityAuthentication) {
|
|
45
45
|
await defaultAuth?.applySecurityAuthentication(requestContext);
|
|
46
46
|
}
|
|
@@ -2,18 +2,12 @@ import { HttpLibrary } from "./http/http";
|
|
|
2
2
|
import { Middleware, PromiseMiddleware } from "./middleware";
|
|
3
3
|
import { BaseServerConfiguration } from "./servers";
|
|
4
4
|
import { AuthMethods, AuthMethodsConfiguration } from "./auth/auth";
|
|
5
|
-
export interface Configuration
|
|
5
|
+
export interface Configuration {
|
|
6
6
|
readonly baseServer: BaseServerConfiguration;
|
|
7
7
|
readonly httpApi: HttpLibrary;
|
|
8
|
-
readonly middleware:
|
|
8
|
+
readonly middleware: Middleware[];
|
|
9
9
|
readonly authMethods: AuthMethods;
|
|
10
10
|
}
|
|
11
|
-
export interface MiddlewareMergeOptions {
|
|
12
|
-
middlewareMergeStrategy?: 'replace' | 'append' | 'prepend';
|
|
13
|
-
}
|
|
14
|
-
export type ConfigurationOptions<M = Middleware> = Partial<Configuration<M>> & MiddlewareMergeOptions;
|
|
15
|
-
export type StandardConfigurationOptions = ConfigurationOptions<Middleware>;
|
|
16
|
-
export type PromiseConfigurationOptions = ConfigurationOptions<PromiseMiddleware>;
|
|
17
11
|
/**
|
|
18
12
|
* Interface with which a configuration object can be configured.
|
|
19
13
|
*/
|
package/dist/openapi/index.d.ts
CHANGED
|
@@ -2,10 +2,9 @@ export * from "./http/http";
|
|
|
2
2
|
export * from "./auth/auth";
|
|
3
3
|
export * from "./models/all";
|
|
4
4
|
export { createConfiguration } from "./configuration";
|
|
5
|
-
export type { Configuration
|
|
5
|
+
export type { Configuration } from "./configuration";
|
|
6
6
|
export * from "./apis/exception";
|
|
7
7
|
export * from "./servers";
|
|
8
8
|
export { RequiredError } from "./apis/baseapi";
|
|
9
|
-
export type { PromiseMiddleware as Middleware
|
|
10
|
-
export { Observable } from './rxjsStub';
|
|
9
|
+
export type { PromiseMiddleware as Middleware } from './middleware';
|
|
11
10
|
export { PromiseAuthApi as AuthApi, PromiseContractsApi as ContractsApi, PromiseCreditsApi as CreditsApi, PromiseCustomersApi as CustomersApi, PromiseEventsApi as EventsApi, PromiseIntegrationsApi as IntegrationsApi, PromiseInvoicesApi as InvoicesApi, PromiseMetersApi as MetersApi, PromisePlansApi as PlansApi, PromiseProductConsumptionsApi as ProductConsumptionsApi, PromiseReportsApi as ReportsApi, PromiseWebhooksApi as WebhooksApi } from './types/PromiseAPI';
|
package/dist/openapi/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.WebhooksApi = exports.ReportsApi = exports.ProductConsumptionsApi = exports.PlansApi = exports.MetersApi = exports.InvoicesApi = exports.IntegrationsApi = exports.EventsApi = exports.CustomersApi = exports.CreditsApi = exports.ContractsApi = exports.AuthApi = exports.
|
|
17
|
+
exports.WebhooksApi = exports.ReportsApi = exports.ProductConsumptionsApi = exports.PlansApi = exports.MetersApi = exports.InvoicesApi = exports.IntegrationsApi = exports.EventsApi = exports.CustomersApi = exports.CreditsApi = exports.ContractsApi = exports.AuthApi = exports.RequiredError = exports.createConfiguration = void 0;
|
|
18
18
|
__exportStar(require("./http/http"), exports);
|
|
19
19
|
__exportStar(require("./auth/auth"), exports);
|
|
20
20
|
__exportStar(require("./models/all"), exports);
|
|
@@ -24,8 +24,6 @@ __exportStar(require("./apis/exception"), exports);
|
|
|
24
24
|
__exportStar(require("./servers"), exports);
|
|
25
25
|
var baseapi_1 = require("./apis/baseapi");
|
|
26
26
|
Object.defineProperty(exports, "RequiredError", { enumerable: true, get: function () { return baseapi_1.RequiredError; } });
|
|
27
|
-
var rxjsStub_1 = require("./rxjsStub");
|
|
28
|
-
Object.defineProperty(exports, "Observable", { enumerable: true, get: function () { return rxjsStub_1.Observable; } });
|
|
29
27
|
var PromiseAPI_1 = require("./types/PromiseAPI");
|
|
30
28
|
Object.defineProperty(exports, "AuthApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseAuthApi; } });
|
|
31
29
|
Object.defineProperty(exports, "ContractsApi", { enumerable: true, get: function () { return PromiseAPI_1.PromiseContractsApi; } });
|