@saritasa/renewaire-frontend-sdk 0.1.2 → 0.1.4

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,854 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Optional, Inject, Injectable, SkipSelf, NgModule, makeEnvironmentProviders } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HttpHeaders, HttpContext, HttpParams } from '@angular/common/http';
5
+
6
+ const BASE_PATH = new InjectionToken("basePath");
7
+ const COLLECTION_FORMATS = {
8
+ csv: ",",
9
+ tsv: " ",
10
+ ssv: " ",
11
+ pipes: "|",
12
+ };
13
+
14
+ /**
15
+ * Custom HttpParameterCodec
16
+ * Workaround for https://github.com/angular/angular/issues/18261
17
+ */
18
+ class CustomHttpParameterCodec {
19
+ encodeKey(k) {
20
+ return encodeURIComponent(k);
21
+ }
22
+ encodeValue(v) {
23
+ return encodeURIComponent(v);
24
+ }
25
+ decodeKey(k) {
26
+ return decodeURIComponent(k);
27
+ }
28
+ decodeValue(v) {
29
+ return decodeURIComponent(v);
30
+ }
31
+ }
32
+
33
+ class Configuration {
34
+ /**
35
+ * @deprecated Since 5.0. Use credentials instead
36
+ */
37
+ apiKeys;
38
+ username;
39
+ password;
40
+ /**
41
+ * @deprecated Since 5.0. Use credentials instead
42
+ */
43
+ accessToken;
44
+ basePath;
45
+ withCredentials;
46
+ /**
47
+ * Takes care of encoding query- and form-parameters.
48
+ */
49
+ encoder;
50
+ /**
51
+ * Encoding of various path parameter
52
+ * <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
53
+ * <p>
54
+ * See {@link README.md} for more details
55
+ * </p>
56
+ */
57
+ encodeParam;
58
+ /**
59
+ * The keys are the names in the securitySchemes section of the OpenAPI
60
+ * document. They should map to the value used for authentication
61
+ * minus any standard prefixes such as 'Basic' or 'Bearer'.
62
+ */
63
+ credentials;
64
+ constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials, } = {}) {
65
+ if (apiKeys) {
66
+ this.apiKeys = apiKeys;
67
+ }
68
+ if (username !== undefined) {
69
+ this.username = username;
70
+ }
71
+ if (password !== undefined) {
72
+ this.password = password;
73
+ }
74
+ if (accessToken !== undefined) {
75
+ this.accessToken = accessToken;
76
+ }
77
+ if (basePath !== undefined) {
78
+ this.basePath = basePath;
79
+ }
80
+ if (withCredentials !== undefined) {
81
+ this.withCredentials = withCredentials;
82
+ }
83
+ if (encoder) {
84
+ this.encoder = encoder;
85
+ }
86
+ this.encodeParam =
87
+ encodeParam ?? ((param) => this.defaultEncodeParam(param));
88
+ this.credentials = credentials ?? {};
89
+ // init default Bearer credential
90
+ if (!this.credentials["Bearer"]) {
91
+ this.credentials["Bearer"] = () => {
92
+ return typeof this.accessToken === "function"
93
+ ? this.accessToken()
94
+ : this.accessToken;
95
+ };
96
+ }
97
+ }
98
+ /**
99
+ * Select the correct content-type to use for a request.
100
+ * Uses {@link Configuration#isJsonMime} to determine the correct content-type.
101
+ * If no content type is found return the first found type if the contentTypes is not empty
102
+ * @param contentTypes - the array of content types that are available for selection
103
+ * @returns the selected content-type or <code>undefined</code> if no selection could be made.
104
+ */
105
+ selectHeaderContentType(contentTypes) {
106
+ if (contentTypes.length === 0) {
107
+ return undefined;
108
+ }
109
+ const type = contentTypes.find((x) => this.isJsonMime(x));
110
+ if (type === undefined) {
111
+ return contentTypes[0];
112
+ }
113
+ return type;
114
+ }
115
+ /**
116
+ * Select the correct accept content-type to use for a request.
117
+ * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
118
+ * If no content type is found return the first found type if the contentTypes is not empty
119
+ * @param accepts - the array of content types that are available for selection.
120
+ * @returns the selected content-type or <code>undefined</code> if no selection could be made.
121
+ */
122
+ selectHeaderAccept(accepts) {
123
+ if (accepts.length === 0) {
124
+ return undefined;
125
+ }
126
+ const type = accepts.find((x) => this.isJsonMime(x));
127
+ if (type === undefined) {
128
+ return accepts[0];
129
+ }
130
+ return type;
131
+ }
132
+ /**
133
+ * Check if the given MIME is a JSON MIME.
134
+ * JSON MIME examples:
135
+ * application/json
136
+ * application/json; charset=UTF8
137
+ * APPLICATION/JSON
138
+ * application/vnd.company+json
139
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
140
+ * @return True if the given MIME is JSON, false otherwise.
141
+ */
142
+ isJsonMime(mime) {
143
+ const jsonMime = new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$", "i");
144
+ return (mime !== null &&
145
+ (jsonMime.test(mime) ||
146
+ mime.toLowerCase() === "application/json-patch+json"));
147
+ }
148
+ lookupCredential(key) {
149
+ const value = this.credentials[key];
150
+ return typeof value === "function" ? value() : value;
151
+ }
152
+ addCredentialToHeaders(credentialKey, headerName, headers, prefix) {
153
+ const value = this.lookupCredential(credentialKey);
154
+ return value ? headers.set(headerName, (prefix ?? "") + value) : headers;
155
+ }
156
+ addCredentialToQuery(credentialKey, paramName, query) {
157
+ const value = this.lookupCredential(credentialKey);
158
+ return value ? query.set(paramName, value) : query;
159
+ }
160
+ defaultEncodeParam(param) {
161
+ // This implementation exists as fallback for missing configuration
162
+ // and for backwards compatibility to older typescript-angular generator versions.
163
+ // It only works for the 'simple' parameter style.
164
+ // Date-handling only works for the 'date-time' format.
165
+ // All other styles and Date-formats are probably handled incorrectly.
166
+ //
167
+ // But: if that's all you need (i.e.: the most common use-case): no need for customization!
168
+ const value = param.dataFormat === "date-time" && param.value instanceof Date
169
+ ? param.value.toISOString()
170
+ : param.value;
171
+ return encodeURIComponent(String(value));
172
+ }
173
+ }
174
+
175
+ /**
176
+ * RenewAire CORES API
177
+ *
178
+ * Contact: renewaire@saritasa.com
179
+ *
180
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
181
+ * https://openapi-generator.tech
182
+ * Do not edit the class manually.
183
+ */
184
+ class BaseService {
185
+ basePath = "http://localhost";
186
+ defaultHeaders = new HttpHeaders();
187
+ configuration;
188
+ encoder;
189
+ constructor(basePath, configuration) {
190
+ this.configuration = configuration || new Configuration();
191
+ if (typeof this.configuration.basePath !== "string") {
192
+ const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
193
+ if (firstBasePath != undefined) {
194
+ basePath = firstBasePath;
195
+ }
196
+ if (typeof basePath !== "string") {
197
+ basePath = this.basePath;
198
+ }
199
+ this.configuration.basePath = basePath;
200
+ }
201
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
202
+ }
203
+ canConsumeForm(consumes) {
204
+ return consumes.indexOf("multipart/form-data") !== -1;
205
+ }
206
+ addToHttpParams(httpParams, value, key, isDeep = false) {
207
+ // If the value is an object (but not a Date), recursively add its keys.
208
+ if (typeof value === "object" && !(value instanceof Date)) {
209
+ return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
210
+ }
211
+ return this.addToHttpParamsRecursive(httpParams, value, key);
212
+ }
213
+ addToHttpParamsRecursive(httpParams, value, key, isDeep = false) {
214
+ if (value === null || value === undefined) {
215
+ return httpParams;
216
+ }
217
+ if (typeof value === "object") {
218
+ // If JSON format is preferred, key must be provided.
219
+ if (key != null) {
220
+ return isDeep
221
+ ? Object.keys(value).reduce((hp, k) => hp.append(`${key}[${k}]`, value[k]), httpParams)
222
+ : httpParams.append(key, JSON.stringify(value));
223
+ }
224
+ // Otherwise, if it's an array, add each element.
225
+ if (Array.isArray(value)) {
226
+ value.forEach((elem) => (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)));
227
+ }
228
+ else if (value instanceof Date) {
229
+ if (key != null) {
230
+ httpParams = httpParams.append(key, value.toISOString());
231
+ }
232
+ else {
233
+ throw Error("key may not be null if value is Date");
234
+ }
235
+ }
236
+ else {
237
+ Object.keys(value).forEach((k) => {
238
+ const paramKey = key ? `${key}.${k}` : k;
239
+ httpParams = this.addToHttpParamsRecursive(httpParams, value[k], paramKey);
240
+ });
241
+ }
242
+ return httpParams;
243
+ }
244
+ else if (key != null) {
245
+ return httpParams.append(key, value);
246
+ }
247
+ throw Error("key may not be null if value is not object or array");
248
+ }
249
+ }
250
+
251
+ /**
252
+ * RenewAire CORES API
253
+ *
254
+ * Contact: renewaire@saritasa.com
255
+ *
256
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
257
+ * https://openapi-generator.tech
258
+ * Do not edit the class manually.
259
+ */
260
+ /* tslint:disable:no-unused-variable member-ordering */
261
+ class AuthApiService extends BaseService {
262
+ httpClient;
263
+ constructor(httpClient, basePath, configuration) {
264
+ super(basePath, configuration);
265
+ this.httpClient = httpClient;
266
+ }
267
+ authAuthenticate(requestParameters, observe = "body", reportProgress = false, options) {
268
+ const loginUserCommand = requestParameters?.loginUserCommand;
269
+ if (loginUserCommand === null || loginUserCommand === undefined) {
270
+ throw new Error("Required parameter loginUserCommand was null or undefined when calling authAuthenticate.");
271
+ }
272
+ let localVarHeaders = this.defaultHeaders;
273
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ??
274
+ this.configuration.selectHeaderAccept([
275
+ "text/plain",
276
+ "application/json",
277
+ "text/json",
278
+ ]);
279
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
280
+ localVarHeaders = localVarHeaders.set("Accept", localVarHttpHeaderAcceptSelected);
281
+ }
282
+ const localVarHttpContext = options?.context ?? new HttpContext();
283
+ const localVarTransferCache = options?.transferCache ?? true;
284
+ // to determine the Content-Type header
285
+ const consumes = [
286
+ "application/json",
287
+ "text/json",
288
+ "application/*+json",
289
+ ];
290
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
291
+ if (httpContentTypeSelected !== undefined) {
292
+ localVarHeaders = localVarHeaders.set("Content-Type", httpContentTypeSelected);
293
+ }
294
+ let responseType_ = "json";
295
+ if (localVarHttpHeaderAcceptSelected) {
296
+ if (localVarHttpHeaderAcceptSelected.startsWith("text")) {
297
+ responseType_ = "text";
298
+ }
299
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
300
+ responseType_ = "json";
301
+ }
302
+ else {
303
+ responseType_ = "blob";
304
+ }
305
+ }
306
+ let localVarPath = `/api/auth`;
307
+ const { basePath, withCredentials } = this.configuration;
308
+ return this.httpClient.request("post", `${basePath}${localVarPath}`, {
309
+ context: localVarHttpContext,
310
+ body: loginUserCommand,
311
+ responseType: responseType_,
312
+ ...(withCredentials ? { withCredentials } : {}),
313
+ headers: localVarHeaders,
314
+ observe: observe,
315
+ transferCache: localVarTransferCache,
316
+ reportProgress: reportProgress,
317
+ });
318
+ }
319
+ authRefreshToken(requestParameters, observe = "body", reportProgress = false, options) {
320
+ const refreshTokenCommand = requestParameters?.refreshTokenCommand;
321
+ if (refreshTokenCommand === null || refreshTokenCommand === undefined) {
322
+ throw new Error("Required parameter refreshTokenCommand was null or undefined when calling authRefreshToken.");
323
+ }
324
+ let localVarHeaders = this.defaultHeaders;
325
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ??
326
+ this.configuration.selectHeaderAccept([
327
+ "text/plain",
328
+ "application/json",
329
+ "text/json",
330
+ ]);
331
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
332
+ localVarHeaders = localVarHeaders.set("Accept", localVarHttpHeaderAcceptSelected);
333
+ }
334
+ const localVarHttpContext = options?.context ?? new HttpContext();
335
+ const localVarTransferCache = options?.transferCache ?? true;
336
+ // to determine the Content-Type header
337
+ const consumes = [
338
+ "application/json",
339
+ "text/json",
340
+ "application/*+json",
341
+ ];
342
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
343
+ if (httpContentTypeSelected !== undefined) {
344
+ localVarHeaders = localVarHeaders.set("Content-Type", httpContentTypeSelected);
345
+ }
346
+ let responseType_ = "json";
347
+ if (localVarHttpHeaderAcceptSelected) {
348
+ if (localVarHttpHeaderAcceptSelected.startsWith("text")) {
349
+ responseType_ = "text";
350
+ }
351
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
352
+ responseType_ = "json";
353
+ }
354
+ else {
355
+ responseType_ = "blob";
356
+ }
357
+ }
358
+ let localVarPath = `/api/auth`;
359
+ const { basePath, withCredentials } = this.configuration;
360
+ return this.httpClient.request("put", `${basePath}${localVarPath}`, {
361
+ context: localVarHttpContext,
362
+ body: refreshTokenCommand,
363
+ responseType: responseType_,
364
+ ...(withCredentials ? { withCredentials } : {}),
365
+ headers: localVarHeaders,
366
+ observe: observe,
367
+ transferCache: localVarTransferCache,
368
+ reportProgress: reportProgress,
369
+ });
370
+ }
371
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: AuthApiService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
372
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: AuthApiService, providedIn: "root" });
373
+ }
374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: AuthApiService, decorators: [{
375
+ type: Injectable,
376
+ args: [{
377
+ providedIn: "root",
378
+ }]
379
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
380
+ type: Optional
381
+ }, {
382
+ type: Inject,
383
+ args: [BASE_PATH]
384
+ }] }, { type: Configuration, decorators: [{
385
+ type: Optional
386
+ }] }] });
387
+
388
+ /**
389
+ * RenewAire CORES API
390
+ *
391
+ * Contact: renewaire@saritasa.com
392
+ *
393
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
394
+ * https://openapi-generator.tech
395
+ * Do not edit the class manually.
396
+ */
397
+ /* tslint:disable:no-unused-variable member-ordering */
398
+ class RegionsApiService extends BaseService {
399
+ httpClient;
400
+ constructor(httpClient, basePath, configuration) {
401
+ super(basePath, configuration);
402
+ this.httpClient = httpClient;
403
+ }
404
+ regionsSearchRegions(requestParameters, observe = "body", reportProgress = false, options) {
405
+ const name = requestParameters?.name;
406
+ const code = requestParameters?.code;
407
+ const level = requestParameters?.level;
408
+ const orderBy = requestParameters?.orderBy;
409
+ const page = requestParameters?.page;
410
+ const pageSize = requestParameters?.pageSize;
411
+ let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
412
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, name, "Name");
413
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, code, "Code");
414
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, level, "Level");
415
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, orderBy, "OrderBy");
416
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, "Page");
417
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, pageSize, "PageSize");
418
+ let localVarHeaders = this.defaultHeaders;
419
+ // authentication (Bearer) required
420
+ localVarHeaders = this.configuration.addCredentialToHeaders("Bearer", "Authorization", localVarHeaders, "Bearer ");
421
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ??
422
+ this.configuration.selectHeaderAccept([
423
+ "text/plain",
424
+ "application/json",
425
+ "text/json",
426
+ ]);
427
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
428
+ localVarHeaders = localVarHeaders.set("Accept", localVarHttpHeaderAcceptSelected);
429
+ }
430
+ const localVarHttpContext = options?.context ?? new HttpContext();
431
+ const localVarTransferCache = options?.transferCache ?? true;
432
+ let responseType_ = "json";
433
+ if (localVarHttpHeaderAcceptSelected) {
434
+ if (localVarHttpHeaderAcceptSelected.startsWith("text")) {
435
+ responseType_ = "text";
436
+ }
437
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
438
+ responseType_ = "json";
439
+ }
440
+ else {
441
+ responseType_ = "blob";
442
+ }
443
+ }
444
+ let localVarPath = `/api/regions`;
445
+ const { basePath, withCredentials } = this.configuration;
446
+ return this.httpClient.request("get", `${basePath}${localVarPath}`, {
447
+ context: localVarHttpContext,
448
+ params: localVarQueryParameters,
449
+ responseType: responseType_,
450
+ ...(withCredentials ? { withCredentials } : {}),
451
+ headers: localVarHeaders,
452
+ observe: observe,
453
+ transferCache: localVarTransferCache,
454
+ reportProgress: reportProgress,
455
+ });
456
+ }
457
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: RegionsApiService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
458
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: RegionsApiService, providedIn: "root" });
459
+ }
460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: RegionsApiService, decorators: [{
461
+ type: Injectable,
462
+ args: [{
463
+ providedIn: "root",
464
+ }]
465
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
466
+ type: Optional
467
+ }, {
468
+ type: Inject,
469
+ args: [BASE_PATH]
470
+ }] }, { type: Configuration, decorators: [{
471
+ type: Optional
472
+ }] }] });
473
+
474
+ /**
475
+ * RenewAire CORES API
476
+ *
477
+ * Contact: renewaire@saritasa.com
478
+ *
479
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
480
+ * https://openapi-generator.tech
481
+ * Do not edit the class manually.
482
+ */
483
+ /* tslint:disable:no-unused-variable member-ordering */
484
+ class UsersApiService extends BaseService {
485
+ httpClient;
486
+ constructor(httpClient, basePath, configuration) {
487
+ super(basePath, configuration);
488
+ this.httpClient = httpClient;
489
+ }
490
+ usersConfirmEmail(requestParameters, observe = "body", reportProgress = false, options) {
491
+ const emailConfirmationTokenDto = requestParameters?.emailConfirmationTokenDto;
492
+ let localVarHeaders = this.defaultHeaders;
493
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]);
494
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
495
+ localVarHeaders = localVarHeaders.set("Accept", localVarHttpHeaderAcceptSelected);
496
+ }
497
+ const localVarHttpContext = options?.context ?? new HttpContext();
498
+ const localVarTransferCache = options?.transferCache ?? true;
499
+ // to determine the Content-Type header
500
+ const consumes = [
501
+ "application/json",
502
+ "text/json",
503
+ "application/*+json",
504
+ ];
505
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
506
+ if (httpContentTypeSelected !== undefined) {
507
+ localVarHeaders = localVarHeaders.set("Content-Type", httpContentTypeSelected);
508
+ }
509
+ let responseType_ = "json";
510
+ if (localVarHttpHeaderAcceptSelected) {
511
+ if (localVarHttpHeaderAcceptSelected.startsWith("text")) {
512
+ responseType_ = "text";
513
+ }
514
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
515
+ responseType_ = "json";
516
+ }
517
+ else {
518
+ responseType_ = "blob";
519
+ }
520
+ }
521
+ let localVarPath = `/api/users/confirm-email`;
522
+ const { basePath, withCredentials } = this.configuration;
523
+ return this.httpClient.request("post", `${basePath}${localVarPath}`, {
524
+ context: localVarHttpContext,
525
+ body: emailConfirmationTokenDto,
526
+ responseType: responseType_,
527
+ ...(withCredentials ? { withCredentials } : {}),
528
+ headers: localVarHeaders,
529
+ observe: observe,
530
+ transferCache: localVarTransferCache,
531
+ reportProgress: reportProgress,
532
+ });
533
+ }
534
+ usersRegisterUser(requestParameters, observe = "body", reportProgress = false, options) {
535
+ const userRegistrationDto = requestParameters?.userRegistrationDto;
536
+ let localVarHeaders = this.defaultHeaders;
537
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ??
538
+ this.configuration.selectHeaderAccept([
539
+ "text/plain",
540
+ "application/json",
541
+ "text/json",
542
+ ]);
543
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
544
+ localVarHeaders = localVarHeaders.set("Accept", localVarHttpHeaderAcceptSelected);
545
+ }
546
+ const localVarHttpContext = options?.context ?? new HttpContext();
547
+ const localVarTransferCache = options?.transferCache ?? true;
548
+ // to determine the Content-Type header
549
+ const consumes = [
550
+ "application/json",
551
+ "text/json",
552
+ "application/*+json",
553
+ ];
554
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
555
+ if (httpContentTypeSelected !== undefined) {
556
+ localVarHeaders = localVarHeaders.set("Content-Type", httpContentTypeSelected);
557
+ }
558
+ let responseType_ = "json";
559
+ if (localVarHttpHeaderAcceptSelected) {
560
+ if (localVarHttpHeaderAcceptSelected.startsWith("text")) {
561
+ responseType_ = "text";
562
+ }
563
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
564
+ responseType_ = "json";
565
+ }
566
+ else {
567
+ responseType_ = "blob";
568
+ }
569
+ }
570
+ let localVarPath = `/api/users`;
571
+ const { basePath, withCredentials } = this.configuration;
572
+ return this.httpClient.request("post", `${basePath}${localVarPath}`, {
573
+ context: localVarHttpContext,
574
+ body: userRegistrationDto,
575
+ responseType: responseType_,
576
+ ...(withCredentials ? { withCredentials } : {}),
577
+ headers: localVarHeaders,
578
+ observe: observe,
579
+ transferCache: localVarTransferCache,
580
+ reportProgress: reportProgress,
581
+ });
582
+ }
583
+ usersRequestConfirmEmail(requestParameters, observe = "body", reportProgress = false, options) {
584
+ const userEmailDto = requestParameters?.userEmailDto;
585
+ let localVarHeaders = this.defaultHeaders;
586
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]);
587
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
588
+ localVarHeaders = localVarHeaders.set("Accept", localVarHttpHeaderAcceptSelected);
589
+ }
590
+ const localVarHttpContext = options?.context ?? new HttpContext();
591
+ const localVarTransferCache = options?.transferCache ?? true;
592
+ // to determine the Content-Type header
593
+ const consumes = [
594
+ "application/json",
595
+ "text/json",
596
+ "application/*+json",
597
+ ];
598
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
599
+ if (httpContentTypeSelected !== undefined) {
600
+ localVarHeaders = localVarHeaders.set("Content-Type", httpContentTypeSelected);
601
+ }
602
+ let responseType_ = "json";
603
+ if (localVarHttpHeaderAcceptSelected) {
604
+ if (localVarHttpHeaderAcceptSelected.startsWith("text")) {
605
+ responseType_ = "text";
606
+ }
607
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
608
+ responseType_ = "json";
609
+ }
610
+ else {
611
+ responseType_ = "blob";
612
+ }
613
+ }
614
+ let localVarPath = `/api/users/request-email`;
615
+ const { basePath, withCredentials } = this.configuration;
616
+ return this.httpClient.request("put", `${basePath}${localVarPath}`, {
617
+ context: localVarHttpContext,
618
+ body: userEmailDto,
619
+ responseType: responseType_,
620
+ ...(withCredentials ? { withCredentials } : {}),
621
+ headers: localVarHeaders,
622
+ observe: observe,
623
+ transferCache: localVarTransferCache,
624
+ reportProgress: reportProgress,
625
+ });
626
+ }
627
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: UsersApiService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
628
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: UsersApiService, providedIn: "root" });
629
+ }
630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: UsersApiService, decorators: [{
631
+ type: Injectable,
632
+ args: [{
633
+ providedIn: "root",
634
+ }]
635
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
636
+ type: Optional
637
+ }, {
638
+ type: Inject,
639
+ args: [BASE_PATH]
640
+ }] }, { type: Configuration, decorators: [{
641
+ type: Optional
642
+ }] }] });
643
+
644
+ const APIS = [AuthApiService, RegionsApiService, UsersApiService];
645
+
646
+ /**
647
+ * RenewAire CORES API
648
+ *
649
+ * Contact: renewaire@saritasa.com
650
+ *
651
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
652
+ * https://openapi-generator.tech
653
+ * Do not edit the class manually.
654
+ */
655
+
656
+ /**
657
+ * RenewAire CORES API
658
+ *
659
+ * Contact: renewaire@saritasa.com
660
+ *
661
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
662
+ * https://openapi-generator.tech
663
+ * Do not edit the class manually.
664
+ */
665
+
666
+ /**
667
+ * RenewAire CORES API
668
+ *
669
+ * Contact: renewaire@saritasa.com
670
+ *
671
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
672
+ * https://openapi-generator.tech
673
+ * Do not edit the class manually.
674
+ */
675
+
676
+ /**
677
+ * RenewAire CORES API
678
+ *
679
+ * Contact: renewaire@saritasa.com
680
+ *
681
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
682
+ * https://openapi-generator.tech
683
+ * Do not edit the class manually.
684
+ */
685
+
686
+ /**
687
+ * RenewAire CORES API
688
+ *
689
+ * Contact: renewaire@saritasa.com
690
+ *
691
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
692
+ * https://openapi-generator.tech
693
+ * Do not edit the class manually.
694
+ */
695
+
696
+ /**
697
+ * RenewAire CORES API
698
+ *
699
+ * Contact: renewaire@saritasa.com
700
+ *
701
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
702
+ * https://openapi-generator.tech
703
+ * Do not edit the class manually.
704
+ */
705
+
706
+ /**
707
+ * RenewAire CORES API
708
+ *
709
+ * Contact: renewaire@saritasa.com
710
+ *
711
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
712
+ * https://openapi-generator.tech
713
+ * Do not edit the class manually.
714
+ */
715
+
716
+ /**
717
+ * RenewAire CORES API
718
+ *
719
+ * Contact: renewaire@saritasa.com
720
+ *
721
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
722
+ * https://openapi-generator.tech
723
+ * Do not edit the class manually.
724
+ */
725
+ /**
726
+ * RegionLevel<br />0 = Country<br />1 = State<br />2 = County
727
+ */
728
+ var RegionLevel;
729
+ (function (RegionLevel) {
730
+ RegionLevel["Country"] = "Country";
731
+ RegionLevel["State"] = "State";
732
+ RegionLevel["County"] = "County";
733
+ })(RegionLevel || (RegionLevel = {}));
734
+
735
+ /**
736
+ * RenewAire CORES API
737
+ *
738
+ * Contact: renewaire@saritasa.com
739
+ *
740
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
741
+ * https://openapi-generator.tech
742
+ * Do not edit the class manually.
743
+ */
744
+ var SearchRegionDtoLevelEnum;
745
+ (function (SearchRegionDtoLevelEnum) {
746
+ SearchRegionDtoLevelEnum["Country"] = "Country";
747
+ SearchRegionDtoLevelEnum["State"] = "State";
748
+ SearchRegionDtoLevelEnum["County"] = "County";
749
+ })(SearchRegionDtoLevelEnum || (SearchRegionDtoLevelEnum = {}));
750
+
751
+ /**
752
+ * RenewAire CORES API
753
+ *
754
+ * Contact: renewaire@saritasa.com
755
+ *
756
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
757
+ * https://openapi-generator.tech
758
+ * Do not edit the class manually.
759
+ */
760
+
761
+ /**
762
+ * RenewAire CORES API
763
+ *
764
+ * Contact: renewaire@saritasa.com
765
+ *
766
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
767
+ * https://openapi-generator.tech
768
+ * Do not edit the class manually.
769
+ */
770
+
771
+ /**
772
+ * RenewAire CORES API
773
+ *
774
+ * Contact: renewaire@saritasa.com
775
+ *
776
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
777
+ * https://openapi-generator.tech
778
+ * Do not edit the class manually.
779
+ */
780
+
781
+ /**
782
+ * RenewAire CORES API
783
+ *
784
+ * Contact: renewaire@saritasa.com
785
+ *
786
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
787
+ * https://openapi-generator.tech
788
+ * Do not edit the class manually.
789
+ */
790
+
791
+ /**
792
+ * RenewAire CORES API
793
+ *
794
+ * Contact: renewaire@saritasa.com
795
+ *
796
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
797
+ * https://openapi-generator.tech
798
+ * Do not edit the class manually.
799
+ */
800
+
801
+ class ApiModule {
802
+ static forRoot(configurationFactory) {
803
+ return {
804
+ ngModule: ApiModule,
805
+ providers: [{ provide: Configuration, useFactory: configurationFactory }],
806
+ };
807
+ }
808
+ constructor(parentModule, http) {
809
+ if (parentModule) {
810
+ throw new Error("ApiModule is already loaded. Import in your base AppModule only.");
811
+ }
812
+ if (!http) {
813
+ throw new Error("You need to import the HttpClientModule in your AppModule! \n" +
814
+ "See also https://github.com/angular/angular/issues/20575");
815
+ }
816
+ }
817
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ApiModule, deps: [{ token: ApiModule, optional: true, skipSelf: true }, { token: i1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
818
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.2", ngImport: i0, type: ApiModule });
819
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ApiModule });
820
+ }
821
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ApiModule, decorators: [{
822
+ type: NgModule,
823
+ args: [{
824
+ imports: [],
825
+ declarations: [],
826
+ exports: [],
827
+ providers: [],
828
+ }]
829
+ }], ctorParameters: () => [{ type: ApiModule, decorators: [{
830
+ type: Optional
831
+ }, {
832
+ type: SkipSelf
833
+ }] }, { type: i1.HttpClient, decorators: [{
834
+ type: Optional
835
+ }] }] });
836
+
837
+ // Returns the service class providers, to be used in the [ApplicationConfig](https://angular.dev/api/core/ApplicationConfig).
838
+ function provideApi(configOrBasePath) {
839
+ return makeEnvironmentProviders([
840
+ typeof configOrBasePath === "string"
841
+ ? { provide: BASE_PATH, useValue: configOrBasePath }
842
+ : {
843
+ provide: Configuration,
844
+ useValue: new Configuration({ ...configOrBasePath }),
845
+ },
846
+ ]);
847
+ }
848
+
849
+ /**
850
+ * Generated bundle index. Do not edit.
851
+ */
852
+
853
+ export { APIS, ApiModule, AuthApiService, BASE_PATH, COLLECTION_FORMATS, Configuration, RegionLevel, RegionsApiService, SearchRegionDtoLevelEnum, UsersApiService, provideApi };
854
+ //# sourceMappingURL=saritasa-renewaire-frontend-sdk.mjs.map