@penkov/swagger-code-gen 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/accounts.ts DELETED
@@ -1,2117 +0,0 @@
1
- /*********************************************************
2
- *********************************************************
3
- *********************************************************
4
- *********************************************************
5
- *********************************************************
6
- *********************************************************
7
- ************ GENERATED! DO NOT EDIT! ********************
8
- *********************************************************
9
- *********************************************************
10
- *********************************************************
11
- *********************************************************
12
- *********************************************************/
13
- import fetch from 'node-fetch';
14
-
15
-
16
- export interface Access {
17
- readonly filtering: FilteringAndLockingAccessLevel;
18
- readonly locking: FilteringAndLockingAccessLevel;
19
- }
20
-
21
-
22
- export interface AccessRequestsSettingsModel {
23
- readonly delegateToAccountId?: string;
24
- readonly isApprovalFlowEnabled: boolean;
25
- readonly approversEmails?: readonly string[];
26
- }
27
-
28
-
29
- export interface AccountCollectionItem {
30
- readonly uniqueId: string;
31
- readonly id?: string;
32
- readonly number?: string;
33
- readonly name?: string;
34
- readonly contactName?: string;
35
- readonly email?: string;
36
- readonly phone: Phone;
37
- readonly accountType: AccountType;
38
- readonly createdOn: string;
39
- readonly serviceProviderDisplayId?: string;
40
- }
41
-
42
-
43
- export interface AccountCollectionItemCollectionResult {
44
- readonly collection?: readonly AccountCollectionItem[];
45
- readonly total: number;
46
- }
47
-
48
-
49
- export interface AccountContactInfo {
50
- readonly id: string;
51
- readonly displayId?: string;
52
- readonly number?: string;
53
- readonly name?: string;
54
- readonly contactPerson: Person;
55
- }
56
-
57
-
58
- export interface AccountContactInfoCollectionResult {
59
- readonly collection?: readonly AccountContactInfo[];
60
- readonly total: number;
61
- }
62
-
63
-
64
- export interface AccountDetailsResult {
65
- readonly serviceProviderId: string;
66
- readonly serviceProviderName?: string;
67
- readonly number?: string;
68
- readonly name?: string;
69
- readonly accountType: AccountType;
70
- readonly invitationStatus: AccountInvitationStatus;
71
- readonly filteringAdminInvitationStatus: AccountInvitationStatus;
72
- }
73
-
74
-
75
- export interface AccountIdName {
76
- readonly id: string;
77
- readonly displayId?: string;
78
- readonly name?: string;
79
- }
80
-
81
-
82
- export interface AccountIdNameCollectionResult {
83
- readonly collection?: readonly AccountIdName[];
84
- readonly total: number;
85
- }
86
-
87
-
88
- export interface AccountIdNameType {
89
- readonly accountType: AccountType;
90
- readonly id: string;
91
- readonly displayId?: string;
92
- readonly name?: string;
93
- }
94
-
95
-
96
- export interface AccountIdNameTypeCollectionResult {
97
- readonly collection?: readonly AccountIdNameType[];
98
- readonly total: number;
99
- }
100
-
101
-
102
- export interface AccountInfoResult {
103
- readonly id: string;
104
- readonly displayId?: string;
105
- readonly updatedOn?: string;
106
- readonly accountDetails: AccountDetailsResult;
107
- readonly contactPerson: Person;
108
- readonly accountSettings: AccountSettingsResult;
109
- readonly blockPageContactPerson: Person;
110
- readonly isCategoryAccessRequestAllowed: boolean;
111
- readonly notes?: string;
112
- readonly requestSettings: RequestSettingsResult;
113
- readonly filteringAndLockingAccess: FilteringAndLockingAccess;
114
- readonly notCompletedStates?: readonly number[];
115
- }
116
-
117
-
118
- export enum AccountInvitationStatus {
119
- NotSent = 'NotSent',
120
- Sent = 'Sent',
121
- Used = 'Used',
122
- }
123
-
124
-
125
- export interface AccountSettingsResult {
126
- readonly emailForNotifications?: string;
127
- readonly currencyId: number;
128
- readonly timeZoneId?: string;
129
- }
130
-
131
-
132
- export enum AccountType {
133
- None = 'None',
134
- Reseller = 'Reseller',
135
- Company = 'Company',
136
- Home = 'Home',
137
- Division = 'Division',
138
- RootDivision = 'RootDivision',
139
- }
140
-
141
-
142
- export interface AccountsCollectionResult {
143
- readonly collection?: readonly AccountCollectionItem[];
144
- readonly total: number;
145
- readonly requiresStrictSearch: boolean;
146
- }
147
-
148
-
149
- export interface AddCustomerAccountModel {
150
- readonly name?: string;
151
- readonly accountType: AccountType;
152
- readonly contactPerson: Person;
153
- readonly serviceProviderDisplayId?: string;
154
- readonly currencyId: number;
155
- readonly timeZoneId?: string;
156
- readonly isMarketingEmailsAllowed: boolean;
157
- readonly isPersonalDataDiscloseAllowed: boolean;
158
- readonly defaultEndUserAuthenticationCode?: string;
159
- readonly id: string;
160
- readonly operationDate: string;
161
- readonly correlationId: string;
162
- }
163
-
164
-
165
- export interface CountryModel {
166
- readonly countryName?: string;
167
- readonly countryCode?: string;
168
- readonly countryPhoneCode?: string;
169
- readonly isDefault: boolean;
170
- }
171
-
172
-
173
- export interface CountryModelCollectionResult {
174
- readonly collection?: readonly CountryModel[];
175
- readonly total: number;
176
- }
177
-
178
-
179
- export interface CreateAccountModel {
180
- readonly name?: string;
181
- readonly contactPerson: Person;
182
- readonly blockPageContactPerson: Person;
183
- readonly accessRequestsSettings: AccessRequestsSettingsModel;
184
- readonly defaultEndUserSettings: DefaultEndUserSettingsModel;
185
- readonly serviceProviderDisplayId?: string;
186
- readonly accountType: AccountType;
187
- readonly currencyId: number;
188
- readonly timeZoneId?: string;
189
- readonly id: string;
190
- readonly operationDate: string;
191
- readonly correlationId: string;
192
- }
193
-
194
-
195
- export interface Currency {
196
- readonly id: number;
197
- readonly code?: string;
198
- readonly symbol?: string;
199
- }
200
-
201
-
202
- export interface CurrencyCollectionResult {
203
- readonly collection?: readonly Currency[];
204
- readonly total: number;
205
- }
206
-
207
-
208
- export interface CustomerAccountVerificationModel {
209
- readonly fullName?: string;
210
- readonly email?: string;
211
- }
212
-
213
-
214
- export interface CustomerWfaAccountModel {
215
- readonly displayId?: string;
216
- readonly accountType: AccountType;
217
- readonly name?: string;
218
- readonly number?: string;
219
- readonly serviceProviderDisplayId?: string;
220
- readonly serviceProviderName?: string;
221
- readonly contactPerson: Person;
222
- readonly currencyId: number;
223
- }
224
-
225
-
226
- export interface DefaultEndUserSettingsModel {
227
- readonly authenticationCode?: string;
228
- }
229
-
230
-
231
- export interface DownloadableItem {
232
- readonly name?: string;
233
- readonly description?: string;
234
- readonly link?: string;
235
- readonly uploadDate: string;
236
- }
237
-
238
-
239
- export interface DownloadableItemCollectionResult {
240
- readonly collection?: readonly DownloadableItem[];
241
- readonly total: number;
242
- }
243
-
244
-
245
- export enum EmailBelonging {
246
- None = 'None',
247
- SameUser = 'SameUser',
248
- AnotherUser = 'AnotherUser',
249
- }
250
-
251
-
252
- export interface FilteringAndLockingAccess {
253
- readonly allowRequestsWithUserLock: boolean;
254
- readonly filteringAdminAccess: Access;
255
- readonly accountOwnerAccess: Access;
256
- }
257
-
258
-
259
- export enum FilteringAndLockingAccessLevel {
260
- None = 'None',
261
- View = 'View',
262
- Edit = 'Edit',
263
- }
264
-
265
-
266
- export interface Person {
267
- readonly fullName?: string;
268
- readonly email?: string;
269
- readonly phone: Phone;
270
- }
271
-
272
-
273
- export interface Phone {
274
- readonly countryCode?: string;
275
- readonly countryPhoneCode?: string;
276
- readonly phoneNumber?: string;
277
- }
278
-
279
-
280
- export interface PostPurchaseInstructionResult {
281
- readonly notCompletedStates?: readonly number[];
282
- readonly title?: string;
283
- readonly message?: string;
284
- readonly linkUrl?: string;
285
- readonly linkTitle?: string;
286
- }
287
-
288
-
289
- export interface PrivacyPolicySettingsModel {
290
- readonly isMarketingEmailsAllowed: boolean;
291
- readonly isPersonalDataDiscloseAllowed: boolean;
292
- readonly accountId?: string;
293
- }
294
-
295
-
296
- export interface RequestSettingsResult {
297
- readonly delegateToAccountName?: string;
298
- readonly delegateToAccountId?: string;
299
- readonly isApprovalFlowEnabled: boolean;
300
- readonly approversEmailsJson?: string;
301
- readonly approversEmails?: readonly string[];
302
- readonly isFilteringManagedByResellerOnly: boolean;
303
- }
304
-
305
-
306
- export interface ResellerAccountIdName {
307
- readonly id: string;
308
- readonly displayId?: string;
309
- readonly name?: string;
310
- readonly isFilteringManagedByResellerOnly: boolean;
311
- }
312
-
313
-
314
- export interface ResellerAccountIdNameCollectionResult {
315
- readonly collection?: readonly ResellerAccountIdName[];
316
- readonly total: number;
317
- }
318
-
319
-
320
- export interface SendCustomerInvitation {
321
- readonly serviceProviderId: string;
322
- readonly customerEmail?: string;
323
- readonly invitationId: string;
324
- }
325
-
326
-
327
- export interface ServiceProviderDetails {
328
- readonly id: string;
329
- readonly name?: string;
330
- readonly contactPerson: Person;
331
- }
332
-
333
-
334
- export interface ServiceProviderResult {
335
- readonly currencyId: number;
336
- readonly timeZoneId?: string;
337
- readonly isSelected: boolean;
338
- readonly id: string;
339
- readonly displayId?: string;
340
- readonly name?: string;
341
- }
342
-
343
-
344
- export interface ServiceProviderResultCollectionResult {
345
- readonly collection?: readonly ServiceProviderResult[];
346
- readonly total: number;
347
- }
348
-
349
-
350
- export interface StringSuccess {
351
- readonly value?: string;
352
- }
353
-
354
-
355
- export interface Timezone {
356
- readonly id?: string;
357
- readonly name?: string;
358
- readonly offset: string;
359
- }
360
-
361
-
362
- export interface TimezoneCollectionResult {
363
- readonly collection?: readonly Timezone[];
364
- readonly total: number;
365
- }
366
-
367
-
368
- export interface TrackInvitationOpened {
369
- readonly invitationId: string;
370
- readonly operationDate: string;
371
- readonly correlationId: string;
372
- }
373
-
374
-
375
- export interface TrackInvitationRegistered {
376
- readonly invitationId: string;
377
- readonly operationDate: string;
378
- readonly correlationId: string;
379
- readonly email?: string;
380
- }
381
-
382
-
383
- export interface UpdateAccountBlockPageSettings {
384
- readonly contactPerson: Person;
385
- readonly isCategoryAccessRequestAllowed: boolean;
386
- readonly id: string;
387
- readonly operationDate: string;
388
- readonly correlationId: string;
389
- }
390
-
391
-
392
- export interface UpdateAccountContactPerson {
393
- readonly contactPerson: Person;
394
- readonly id: string;
395
- readonly operationDate: string;
396
- readonly correlationId: string;
397
- }
398
-
399
-
400
- export interface UpdateAccountDetails {
401
- readonly name?: string;
402
- readonly serviceProviderId?: string;
403
- readonly importNewResellerLockingSettings: boolean;
404
- readonly displayId?: string;
405
- readonly accountType: AccountType;
406
- readonly id: string;
407
- readonly operationDate: string;
408
- readonly correlationId: string;
409
- }
410
-
411
-
412
- export interface UpdateAccountFilteringAndLockingAccess {
413
- readonly name?: string;
414
- readonly allowRequestsWithUserLock: boolean;
415
- readonly filteringAdminAccess: Access;
416
- readonly accountOwnerAccess: Access;
417
- readonly id: string;
418
- readonly operationDate: string;
419
- readonly correlationId: string;
420
- }
421
-
422
-
423
- export interface UpdateAccountNotes {
424
- readonly name?: string;
425
- readonly notes?: string;
426
- readonly id: string;
427
- readonly operationDate: string;
428
- readonly correlationId: string;
429
- }
430
-
431
-
432
- export interface UpdateAccountSettings {
433
- readonly timeZoneId?: string;
434
- readonly emailForNotifications?: string;
435
- readonly id: string;
436
- readonly operationDate: string;
437
- readonly correlationId: string;
438
- }
439
-
440
-
441
- export interface UpdateCompanyName {
442
- readonly name?: string;
443
- readonly id: string;
444
- readonly operationDate: string;
445
- readonly correlationId: string;
446
- }
447
-
448
-
449
- export interface UpdatePostPurchaseInstructions {
450
- readonly title?: string;
451
- readonly message?: string;
452
- readonly linkUrl?: string;
453
- readonly linkTitle?: string;
454
- readonly id: string;
455
- readonly operationDate: string;
456
- readonly correlationId: string;
457
- }
458
-
459
-
460
- export interface UpdatePrivacyPolicy {
461
- readonly isMarketingEmailsAllowed: boolean;
462
- readonly isPersonalDataDiscloseAllowed: boolean;
463
- readonly id: string;
464
- readonly operationDate: string;
465
- readonly correlationId: string;
466
- }
467
-
468
-
469
- export interface UpdateRequestSettings {
470
- readonly delegateToAccountId?: string;
471
- readonly isApprovalFlowEnabled: boolean;
472
- readonly approversEmails?: readonly string[];
473
- readonly isFilteringManagedByResellerOnly: boolean;
474
- readonly id: string;
475
- readonly operationDate: string;
476
- readonly correlationId: string;
477
- }
478
-
479
-
480
-
481
- export interface RequestOptions {
482
- headers: Record<string, string>;
483
- }
484
-
485
- const defaultRequestOptions = {
486
- headers: {
487
- 'Accept': 'application/json',
488
- 'Content-Type': 'application/json'
489
- }
490
- }
491
-
492
-
493
- /**
494
- * GET /accounts/{id}/direct/customers
495
- * @param {Object} params
496
- * @param {string} params.pathId This account id
497
- * @param {string} params.requireVersion
498
- * @param {string} params.queryId
499
- * @param {boolean} params.isAscending
500
- * @param {string} params.orderBy
501
- * @param {number} params.page
502
- * @param {number} params.pageSize
503
- * @param {string} params.search
504
- * @param {RequestOptions} requestOptions Additional request params
505
- * @summary Gets direct accounts of this account of type Home or Company
506
- * @return {AccountsCollectionResult} Success
507
- */
508
- export async function getAccountsByIdDirectCustomers(
509
- params: {
510
- pathId: string,
511
- requireVersion: string,
512
- queryId?: string,
513
- isAscending?: boolean,
514
- orderBy?: string,
515
- page?: number,
516
- pageSize?: number,
517
- search?: string,
518
- },
519
- requestOptions: RequestOptions = defaultRequestOptions
520
- ): Promise<AccountsCollectionResult> {
521
- let query = '';
522
- const queryParams = [];
523
- if (!!params.queryId) {
524
- queryParams.push(`id=${encodeURIComponent(params.queryId)}`);
525
- }
526
- if (!!params.isAscending) {
527
- queryParams.push(`isAscending=${params.isAscending}`);
528
- }
529
- if (!!params.orderBy) {
530
- queryParams.push(`orderBy=${encodeURIComponent(params.orderBy)}`);
531
- }
532
- if (!!params.page) {
533
- queryParams.push(`page=${params.page}`);
534
- }
535
- if (!!params.pageSize) {
536
- queryParams.push(`pageSize=${params.pageSize}`);
537
- }
538
- if (!!params.search) {
539
- queryParams.push(`search=${encodeURIComponent(params.search)}`);
540
- }
541
- if (queryParams.length > 0) {
542
- query = '?' + queryParams.join('&');
543
- }
544
- const resp = await fetch(`/accounts/${params.pathId}/direct/customers${query}`, {
545
- method: 'get',
546
- body: undefined,
547
- headers: {
548
- ...requestOptions.headers,
549
- requireVersion: params.requireVersion
550
- }
551
- });
552
- const json = await resp.json();
553
- if (resp.ok) {
554
- return json as AccountsCollectionResult;
555
- } else {
556
- throw json;
557
- }
558
-
559
- }
560
-
561
-
562
- /**
563
- * GET /accounts/{id}/direct/partners
564
- * @param {Object} params
565
- * @param {string} params.pathId This account id
566
- * @param {string} params.requireVersion
567
- * @param {string} params.queryId
568
- * @param {boolean} params.isAscending
569
- * @param {string} params.orderBy
570
- * @param {number} params.page
571
- * @param {number} params.pageSize
572
- * @param {string} params.search
573
- * @param {RequestOptions} requestOptions Additional request params
574
- * @summary Gets direct accounts of this account of type Reseller or Division
575
- * @return {AccountsCollectionResult} Success
576
- */
577
- export async function getAccountsByIdDirectPartners(
578
- params: {
579
- pathId: string,
580
- requireVersion: string,
581
- queryId?: string,
582
- isAscending?: boolean,
583
- orderBy?: string,
584
- page?: number,
585
- pageSize?: number,
586
- search?: string,
587
- },
588
- requestOptions: RequestOptions = defaultRequestOptions
589
- ): Promise<AccountsCollectionResult> {
590
- let query = '';
591
- const queryParams = [];
592
- if (!!params.queryId) {
593
- queryParams.push(`id=${encodeURIComponent(params.queryId)}`);
594
- }
595
- if (!!params.isAscending) {
596
- queryParams.push(`isAscending=${params.isAscending}`);
597
- }
598
- if (!!params.orderBy) {
599
- queryParams.push(`orderBy=${encodeURIComponent(params.orderBy)}`);
600
- }
601
- if (!!params.page) {
602
- queryParams.push(`page=${params.page}`);
603
- }
604
- if (!!params.pageSize) {
605
- queryParams.push(`pageSize=${params.pageSize}`);
606
- }
607
- if (!!params.search) {
608
- queryParams.push(`search=${encodeURIComponent(params.search)}`);
609
- }
610
- if (queryParams.length > 0) {
611
- query = '?' + queryParams.join('&');
612
- }
613
- const resp = await fetch(`/accounts/${params.pathId}/direct/partners${query}`, {
614
- method: 'get',
615
- body: undefined,
616
- headers: {
617
- ...requestOptions.headers,
618
- requireVersion: params.requireVersion
619
- }
620
- });
621
- const json = await resp.json();
622
- if (resp.ok) {
623
- return json as AccountsCollectionResult;
624
- } else {
625
- throw json;
626
- }
627
-
628
- }
629
-
630
-
631
- /**
632
- * GET /accounts/{id}/direct/children
633
- * @param {Object} params
634
- * @param {string} params.pathId This account id
635
- * @param {string} params.requireVersion
636
- * @param {string} params.queryId
637
- * @param {boolean} params.isAscending
638
- * @param {string} params.orderBy
639
- * @param {number} params.page
640
- * @param {number} params.pageSize
641
- * @param {RequestOptions} requestOptions Additional request params
642
- * @summary Gets direct accounts of this account to show as a hierarchy tree
643
- * @return {AccountCollectionItemCollectionResult} Success
644
- */
645
- export async function getAccountsByIdDirectChildren(
646
- params: {
647
- pathId: string,
648
- requireVersion: string,
649
- queryId?: string,
650
- isAscending?: boolean,
651
- orderBy?: string,
652
- page?: number,
653
- pageSize?: number,
654
- },
655
- requestOptions: RequestOptions = defaultRequestOptions
656
- ): Promise<AccountCollectionItemCollectionResult> {
657
- let query = '';
658
- const queryParams = [];
659
- if (!!params.queryId) {
660
- queryParams.push(`id=${encodeURIComponent(params.queryId)}`);
661
- }
662
- if (!!params.isAscending) {
663
- queryParams.push(`isAscending=${params.isAscending}`);
664
- }
665
- if (!!params.orderBy) {
666
- queryParams.push(`orderBy=${encodeURIComponent(params.orderBy)}`);
667
- }
668
- if (!!params.page) {
669
- queryParams.push(`page=${params.page}`);
670
- }
671
- if (!!params.pageSize) {
672
- queryParams.push(`pageSize=${params.pageSize}`);
673
- }
674
- if (queryParams.length > 0) {
675
- query = '?' + queryParams.join('&');
676
- }
677
- const resp = await fetch(`/accounts/${params.pathId}/direct/children${query}`, {
678
- method: 'get',
679
- body: undefined,
680
- headers: {
681
- ...requestOptions.headers,
682
- requireVersion: params.requireVersion
683
- }
684
- });
685
- const json = await resp.json();
686
- if (resp.ok) {
687
- return json as AccountCollectionItemCollectionResult;
688
- } else {
689
- throw json;
690
- }
691
-
692
- }
693
-
694
-
695
- /**
696
- * GET /accounts/{id}/timezone
697
- * @param {string} id
698
- * @param {string} requireVersion
699
- * @param {RequestOptions} requestOptions Additional request params
700
- * @summary GetAccountTimeZone
701
- * @return {StringSuccess} Success
702
- */
703
- export async function getAccountsByIdTimezone(
704
- id: string,
705
- requireVersion: string,
706
- requestOptions: RequestOptions = defaultRequestOptions
707
- ): Promise<StringSuccess> {
708
- let query = '';
709
- const resp = await fetch(`/accounts/${id}/timezone${query}`, {
710
- method: 'get',
711
- body: undefined,
712
- headers: {
713
- ...requestOptions.headers,
714
- requireVersion: requireVersion
715
- }
716
- });
717
- const json = await resp.json();
718
- if (resp.ok) {
719
- return json as StringSuccess;
720
- } else {
721
- throw json;
722
- }
723
-
724
- }
725
-
726
-
727
- /**
728
- * GET /accounts/by-display-id/{id}/with-service-provider
729
- * @param {string} id account&#39;s Id
730
- * @param {string} requireVersion
731
- * @param {RequestOptions} requestOptions Additional request params
732
- * @summary Gets an account by DisplayId
733
- * @return {AccountInfoResult} Success
734
- */
735
- export async function getAccountsByDisplayIdByIdWithServiceProvider(
736
- id: string,
737
- requireVersion: string,
738
- requestOptions: RequestOptions = defaultRequestOptions
739
- ): Promise<AccountInfoResult> {
740
- let query = '';
741
- const resp = await fetch(`/accounts/by-display-id/${id}/with-service-provider${query}`, {
742
- method: 'get',
743
- body: undefined,
744
- headers: {
745
- ...requestOptions.headers,
746
- requireVersion: requireVersion
747
- }
748
- });
749
- const json = await resp.json();
750
- if (resp.ok) {
751
- return json as AccountInfoResult;
752
- } else {
753
- throw json;
754
- }
755
-
756
- }
757
-
758
-
759
- /**
760
- * GET /accounts/all/available
761
- * @param {string} requireVersion
762
- * @param {readonly AccountType[]} types
763
- * @param {RequestOptions} requestOptions Additional request params
764
- * @summary GetAllAvailableAccounts
765
- * @return {AccountIdNameCollectionResult} Success
766
- */
767
- export async function getAccountsAllAvailable(
768
- requireVersion: string,
769
- types?: readonly AccountType[],
770
- requestOptions: RequestOptions = defaultRequestOptions
771
- ): Promise<AccountIdNameCollectionResult> {
772
- let query = '';
773
- const queryParams = [];
774
- if (!!types) {
775
- queryParams.push(`types=${types}`);
776
- }
777
- if (queryParams.length > 0) {
778
- query = '?' + queryParams.join('&');
779
- }
780
- const resp = await fetch(`/accounts/all/available${query}`, {
781
- method: 'get',
782
- body: undefined,
783
- headers: {
784
- ...requestOptions.headers,
785
- requireVersion: requireVersion
786
- }
787
- });
788
- const json = await resp.json();
789
- if (resp.ok) {
790
- return json as AccountIdNameCollectionResult;
791
- } else {
792
- throw json;
793
- }
794
-
795
- }
796
-
797
-
798
- /**
799
- * POST /accounts
800
- * @param {string} requireVersion
801
- * @param {CreateAccountModel} body
802
- * @param {RequestOptions} requestOptions Additional request params
803
- * @summary CreateAccount
804
- * @return {any}
805
- */
806
- export async function postAccounts(
807
- requireVersion: string,
808
- body: CreateAccountModel,
809
- requestOptions: RequestOptions = defaultRequestOptions
810
- ): Promise<any> {
811
- let query = '';
812
- const resp = await fetch(`/accounts${query}`, {
813
- method: 'post',
814
- body: JSON.stringify(body),
815
- headers: {
816
- ...requestOptions.headers,
817
- requireVersion: requireVersion
818
- }
819
- });
820
- const json = await resp.json();
821
- if (resp.ok) {
822
- return json as any;
823
- } else {
824
- throw json;
825
- }
826
-
827
- }
828
-
829
-
830
- /**
831
- * PUT /accounts/details
832
- * @param {string} requireVersion
833
- * @param {UpdateAccountDetails} body
834
- * @param {RequestOptions} requestOptions Additional request params
835
- * @summary UpdateAccountDetails
836
- * @return {any}
837
- */
838
- export async function putAccountsDetails(
839
- requireVersion: string,
840
- body: UpdateAccountDetails,
841
- requestOptions: RequestOptions = defaultRequestOptions
842
- ): Promise<any> {
843
- let query = '';
844
- const resp = await fetch(`/accounts/details${query}`, {
845
- method: 'put',
846
- body: JSON.stringify(body),
847
- headers: {
848
- ...requestOptions.headers,
849
- requireVersion: requireVersion
850
- }
851
- });
852
- const json = await resp.json();
853
- if (resp.ok) {
854
- return json as any;
855
- } else {
856
- throw json;
857
- }
858
-
859
- }
860
-
861
-
862
- /**
863
- * PUT /accounts/block-page-settings
864
- * @param {string} requireVersion
865
- * @param {UpdateAccountBlockPageSettings} body
866
- * @param {RequestOptions} requestOptions Additional request params
867
- * @summary UpdateAccountBlockPageSettings
868
- * @return {any}
869
- */
870
- export async function putAccountsBlockPageSettings(
871
- requireVersion: string,
872
- body: UpdateAccountBlockPageSettings,
873
- requestOptions: RequestOptions = defaultRequestOptions
874
- ): Promise<any> {
875
- let query = '';
876
- const resp = await fetch(`/accounts/block-page-settings${query}`, {
877
- method: 'put',
878
- body: JSON.stringify(body),
879
- headers: {
880
- ...requestOptions.headers,
881
- requireVersion: requireVersion
882
- }
883
- });
884
- const json = await resp.json();
885
- if (resp.ok) {
886
- return json as any;
887
- } else {
888
- throw json;
889
- }
890
-
891
- }
892
-
893
-
894
- /**
895
- * PUT /accounts/settings
896
- * @param {string} requireVersion
897
- * @param {UpdateAccountSettings} body
898
- * @param {RequestOptions} requestOptions Additional request params
899
- * @summary UpdateAccountSettings
900
- * @return {any}
901
- */
902
- export async function putAccountsSettings(
903
- requireVersion: string,
904
- body: UpdateAccountSettings,
905
- requestOptions: RequestOptions = defaultRequestOptions
906
- ): Promise<any> {
907
- let query = '';
908
- const resp = await fetch(`/accounts/settings${query}`, {
909
- method: 'put',
910
- body: JSON.stringify(body),
911
- headers: {
912
- ...requestOptions.headers,
913
- requireVersion: requireVersion
914
- }
915
- });
916
- const json = await resp.json();
917
- if (resp.ok) {
918
- return json as any;
919
- } else {
920
- throw json;
921
- }
922
-
923
- }
924
-
925
-
926
- /**
927
- * PUT /accounts/contact-person
928
- * @param {string} requireVersion
929
- * @param {UpdateAccountContactPerson} body
930
- * @param {RequestOptions} requestOptions Additional request params
931
- * @summary UpdateAccountContactPerson
932
- * @return {any}
933
- */
934
- export async function putAccountsContactPerson(
935
- requireVersion: string,
936
- body: UpdateAccountContactPerson,
937
- requestOptions: RequestOptions = defaultRequestOptions
938
- ): Promise<any> {
939
- let query = '';
940
- const resp = await fetch(`/accounts/contact-person${query}`, {
941
- method: 'put',
942
- body: JSON.stringify(body),
943
- headers: {
944
- ...requestOptions.headers,
945
- requireVersion: requireVersion
946
- }
947
- });
948
- const json = await resp.json();
949
- if (resp.ok) {
950
- return json as any;
951
- } else {
952
- throw json;
953
- }
954
-
955
- }
956
-
957
-
958
- /**
959
- * GET /accounts/{id}/notes
960
- * @param {string} id
961
- * @param {string} requireVersion
962
- * @param {RequestOptions} requestOptions Additional request params
963
- * @summary GetAccountNotes
964
- * @return {StringSuccess} Success
965
- */
966
- export async function getAccountsByIdNotes(
967
- id: string,
968
- requireVersion: string,
969
- requestOptions: RequestOptions = defaultRequestOptions
970
- ): Promise<StringSuccess> {
971
- let query = '';
972
- const resp = await fetch(`/accounts/${id}/notes${query}`, {
973
- method: 'get',
974
- body: undefined,
975
- headers: {
976
- ...requestOptions.headers,
977
- requireVersion: requireVersion
978
- }
979
- });
980
- const json = await resp.json();
981
- if (resp.ok) {
982
- return json as StringSuccess;
983
- } else {
984
- throw json;
985
- }
986
-
987
- }
988
-
989
-
990
- /**
991
- * PUT /accounts/notes
992
- * @param {string} requireVersion
993
- * @param {UpdateAccountNotes} body
994
- * @param {RequestOptions} requestOptions Additional request params
995
- * @summary UpdateAccountNotes
996
- * @return {any}
997
- */
998
- export async function putAccountsNotes(
999
- requireVersion: string,
1000
- body: UpdateAccountNotes,
1001
- requestOptions: RequestOptions = defaultRequestOptions
1002
- ): Promise<any> {
1003
- let query = '';
1004
- const resp = await fetch(`/accounts/notes${query}`, {
1005
- method: 'put',
1006
- body: JSON.stringify(body),
1007
- headers: {
1008
- ...requestOptions.headers,
1009
- requireVersion: requireVersion
1010
- }
1011
- });
1012
- const json = await resp.json();
1013
- if (resp.ok) {
1014
- return json as any;
1015
- } else {
1016
- throw json;
1017
- }
1018
-
1019
- }
1020
-
1021
-
1022
- /**
1023
- * GET /accounts/email-belonging
1024
- * @param {Object} params
1025
- * @param {string} params.requireVersion
1026
- * @param {string} params.id
1027
- * @param {string} params.email
1028
- * @param {RequestOptions} requestOptions Additional request params
1029
- * @summary FindEmail
1030
- * @return {EmailBelonging} Success
1031
- */
1032
- export async function getAccountsEmailBelonging(
1033
- params: {
1034
- requireVersion: string,
1035
- id?: string,
1036
- email?: string,
1037
- },
1038
- requestOptions: RequestOptions = defaultRequestOptions
1039
- ): Promise<EmailBelonging> {
1040
- let query = '';
1041
- const queryParams = [];
1042
- if (!!params.id) {
1043
- queryParams.push(`id=${encodeURIComponent(params.id)}`);
1044
- }
1045
- if (!!params.email) {
1046
- queryParams.push(`email=${encodeURIComponent(params.email)}`);
1047
- }
1048
- if (queryParams.length > 0) {
1049
- query = '?' + queryParams.join('&');
1050
- }
1051
- const resp = await fetch(`/accounts/email-belonging${query}`, {
1052
- method: 'get',
1053
- body: undefined,
1054
- headers: {
1055
- ...requestOptions.headers,
1056
- requireVersion: params.requireVersion
1057
- }
1058
- });
1059
- const json = await resp.json();
1060
- if (resp.ok) {
1061
- return json as EmailBelonging;
1062
- } else {
1063
- throw json;
1064
- }
1065
-
1066
- }
1067
-
1068
-
1069
- /**
1070
- * GET /accounts/service-providers/available-for-changing-current
1071
- * @param {Object} params
1072
- * @param {string} params.requireVersion
1073
- * @param {number} params.page
1074
- * @param {number} params.pageSize
1075
- * @param {RequestOptions} requestOptions Additional request params
1076
- * @summary GetServiceProvidersToChangeCurrent
1077
- * @return {ResellerAccountIdNameCollectionResult} Success
1078
- */
1079
- export async function getAccountsServiceProvidersAvailableForChangingCurrent(
1080
- params: {
1081
- requireVersion: string,
1082
- page?: number,
1083
- pageSize?: number,
1084
- },
1085
- requestOptions: RequestOptions = defaultRequestOptions
1086
- ): Promise<ResellerAccountIdNameCollectionResult> {
1087
- let query = '';
1088
- const queryParams = [];
1089
- if (!!params.page) {
1090
- queryParams.push(`page=${params.page}`);
1091
- }
1092
- if (!!params.pageSize) {
1093
- queryParams.push(`pageSize=${params.pageSize}`);
1094
- }
1095
- if (queryParams.length > 0) {
1096
- query = '?' + queryParams.join('&');
1097
- }
1098
- const resp = await fetch(`/accounts/service-providers/available-for-changing-current${query}`, {
1099
- method: 'get',
1100
- body: undefined,
1101
- headers: {
1102
- ...requestOptions.headers,
1103
- requireVersion: params.requireVersion
1104
- }
1105
- });
1106
- const json = await resp.json();
1107
- if (resp.ok) {
1108
- return json as ResellerAccountIdNameCollectionResult;
1109
- } else {
1110
- throw json;
1111
- }
1112
-
1113
- }
1114
-
1115
-
1116
- /**
1117
- * GET /accounts/{id}/service-providers/available-for-delegation
1118
- * @param {Object} params
1119
- * @param {string} params.id
1120
- * @param {string} params.requireVersion
1121
- * @param {boolean} params.isForNewAccount
1122
- * @param {RequestOptions} requestOptions Additional request params
1123
- * @summary GetServiceProvidersForDelegation
1124
- * @return {AccountIdNameCollectionResult} Success
1125
- */
1126
- export async function getAccountsByIdServiceProvidersAvailableForDelegation(
1127
- params: {
1128
- id: string,
1129
- requireVersion: string,
1130
- isForNewAccount?: boolean,
1131
- },
1132
- requestOptions: RequestOptions = defaultRequestOptions
1133
- ): Promise<AccountIdNameCollectionResult> {
1134
- let query = '';
1135
- const queryParams = [];
1136
- if (!!params.isForNewAccount) {
1137
- queryParams.push(`isForNewAccount=${params.isForNewAccount}`);
1138
- }
1139
- if (queryParams.length > 0) {
1140
- query = '?' + queryParams.join('&');
1141
- }
1142
- const resp = await fetch(`/accounts/${params.id}/service-providers/available-for-delegation${query}`, {
1143
- method: 'get',
1144
- body: undefined,
1145
- headers: {
1146
- ...requestOptions.headers,
1147
- requireVersion: params.requireVersion
1148
- }
1149
- });
1150
- const json = await resp.json();
1151
- if (resp.ok) {
1152
- return json as AccountIdNameCollectionResult;
1153
- } else {
1154
- throw json;
1155
- }
1156
-
1157
- }
1158
-
1159
-
1160
- /**
1161
- * DELETE /accounts/{id}
1162
- * @param {Object} params
1163
- * @param {string} params.id
1164
- * @param {string} params.requireVersion
1165
- * @param {string} params.operationDate
1166
- * @param {string} params.correlationId
1167
- * @param {string} params.name
1168
- * @param {RequestOptions} requestOptions Additional request params
1169
- * @summary DeleteAccount
1170
- * @return {any}
1171
- */
1172
- export async function deleteAccountsById(
1173
- params: {
1174
- id: string,
1175
- requireVersion: string,
1176
- operationDate?: string,
1177
- correlationId?: string,
1178
- name?: string,
1179
- },
1180
- requestOptions: RequestOptions = defaultRequestOptions
1181
- ): Promise<any> {
1182
- let query = '';
1183
- const queryParams = [];
1184
- if (!!params.operationDate) {
1185
- queryParams.push(`operationDate=${encodeURIComponent(params.operationDate)}`);
1186
- }
1187
- if (!!params.correlationId) {
1188
- queryParams.push(`correlationId=${encodeURIComponent(params.correlationId)}`);
1189
- }
1190
- if (!!params.name) {
1191
- queryParams.push(`name=${encodeURIComponent(params.name)}`);
1192
- }
1193
- if (queryParams.length > 0) {
1194
- query = '?' + queryParams.join('&');
1195
- }
1196
- const resp = await fetch(`/accounts/${params.id}${query}`, {
1197
- method: 'delete',
1198
- body: undefined,
1199
- headers: {
1200
- ...requestOptions.headers,
1201
- requireVersion: params.requireVersion
1202
- }
1203
- });
1204
- const json = await resp.json();
1205
- if (resp.ok) {
1206
- return json as any;
1207
- } else {
1208
- throw json;
1209
- }
1210
-
1211
- }
1212
-
1213
-
1214
- /**
1215
- * GET /accounts/by-token
1216
- * @param {string} requireVersion
1217
- * @param {string} token
1218
- * @param {RequestOptions} requestOptions Additional request params
1219
- * @summary GetInvitationToken
1220
- * @return {AccountCollectionItem} Success
1221
- */
1222
- export async function getAccountsByToken(
1223
- requireVersion: string,
1224
- token?: string,
1225
- requestOptions: RequestOptions = defaultRequestOptions
1226
- ): Promise<AccountCollectionItem> {
1227
- let query = '';
1228
- const queryParams = [];
1229
- if (!!token) {
1230
- queryParams.push(`token=${encodeURIComponent(token)}`);
1231
- }
1232
- if (queryParams.length > 0) {
1233
- query = '?' + queryParams.join('&');
1234
- }
1235
- const resp = await fetch(`/accounts/by-token${query}`, {
1236
- method: 'get',
1237
- body: undefined,
1238
- headers: {
1239
- ...requestOptions.headers,
1240
- requireVersion: requireVersion
1241
- }
1242
- });
1243
- const json = await resp.json();
1244
- if (resp.ok) {
1245
- return json as AccountCollectionItem;
1246
- } else {
1247
- throw json;
1248
- }
1249
-
1250
- }
1251
-
1252
-
1253
- /**
1254
- * GET /accounts/{id}/service-providers/resellers
1255
- * @param {string} id
1256
- * @param {string} requireVersion
1257
- * @param {RequestOptions} requestOptions Additional request params
1258
- * @summary GetChildServiceProviders
1259
- * @return {AccountIdNameCollectionResult} Success
1260
- */
1261
- export async function getAccountsByIdServiceProvidersResellers(
1262
- id: string,
1263
- requireVersion: string,
1264
- requestOptions: RequestOptions = defaultRequestOptions
1265
- ): Promise<AccountIdNameCollectionResult> {
1266
- let query = '';
1267
- const resp = await fetch(`/accounts/${id}/service-providers/resellers${query}`, {
1268
- method: 'get',
1269
- body: undefined,
1270
- headers: {
1271
- ...requestOptions.headers,
1272
- requireVersion: requireVersion
1273
- }
1274
- });
1275
- const json = await resp.json();
1276
- if (resp.ok) {
1277
- return json as AccountIdNameCollectionResult;
1278
- } else {
1279
- throw json;
1280
- }
1281
-
1282
- }
1283
-
1284
-
1285
- /**
1286
- * GET /accounts/{id}/service-providers/available-to-create-children/any
1287
- * @param {string} id
1288
- * @param {string} requireVersion
1289
- * @param {RequestOptions} requestOptions Additional request params
1290
- * @summary GetIsAnyServiceProvidersToCreateChild
1291
- * @return {boolean} Success
1292
- */
1293
- export async function getAccountsByIdServiceProvidersAvailableToCreateChildrenAny(
1294
- id: string,
1295
- requireVersion: string,
1296
- requestOptions: RequestOptions = defaultRequestOptions
1297
- ): Promise<boolean> {
1298
- let query = '';
1299
- const resp = await fetch(`/accounts/${id}/service-providers/available-to-create-children/any${query}`, {
1300
- method: 'get',
1301
- body: undefined,
1302
- headers: {
1303
- ...requestOptions.headers,
1304
- requireVersion: requireVersion
1305
- }
1306
- });
1307
- const json = await resp.json();
1308
- if (resp.ok) {
1309
- return json as boolean;
1310
- } else {
1311
- throw json;
1312
- }
1313
-
1314
- }
1315
-
1316
-
1317
- /**
1318
- * GET /accounts/{id}/service-providers/available-to-create-children
1319
- * @param {string} id
1320
- * @param {string} requireVersion
1321
- * @param {RequestOptions} requestOptions Additional request params
1322
- * @summary GetServiceProvidersToCreateChild
1323
- * @return {AccountIdNameTypeCollectionResult} Success
1324
- */
1325
- export async function getAccountsByIdServiceProvidersAvailableToCreateChildren(
1326
- id: string,
1327
- requireVersion: string,
1328
- requestOptions: RequestOptions = defaultRequestOptions
1329
- ): Promise<AccountIdNameTypeCollectionResult> {
1330
- let query = '';
1331
- const resp = await fetch(`/accounts/${id}/service-providers/available-to-create-children${query}`, {
1332
- method: 'get',
1333
- body: undefined,
1334
- headers: {
1335
- ...requestOptions.headers,
1336
- requireVersion: requireVersion
1337
- }
1338
- });
1339
- const json = await resp.json();
1340
- if (resp.ok) {
1341
- return json as AccountIdNameTypeCollectionResult;
1342
- } else {
1343
- throw json;
1344
- }
1345
-
1346
- }
1347
-
1348
-
1349
- /**
1350
- * POST /accounts/customer-invitation
1351
- * @param {string} requireVersion
1352
- * @param {SendCustomerInvitation} body
1353
- * @param {RequestOptions} requestOptions Additional request params
1354
- * @summary SendCustomerInvitation
1355
- * @return {any}
1356
- */
1357
- export async function postAccountsCustomerInvitation(
1358
- requireVersion: string,
1359
- body: SendCustomerInvitation,
1360
- requestOptions: RequestOptions = defaultRequestOptions
1361
- ): Promise<any> {
1362
- let query = '';
1363
- const resp = await fetch(`/accounts/customer-invitation${query}`, {
1364
- method: 'post',
1365
- body: JSON.stringify(body),
1366
- headers: {
1367
- ...requestOptions.headers,
1368
- requireVersion: requireVersion
1369
- }
1370
- });
1371
- const json = await resp.json();
1372
- if (resp.ok) {
1373
- return json as any;
1374
- } else {
1375
- throw json;
1376
- }
1377
-
1378
- }
1379
-
1380
-
1381
- /**
1382
- * GET /accounts/{id}/post-purchase-instructions
1383
- * @param {string} id
1384
- * @param {string} requireVersion
1385
- * @param {RequestOptions} requestOptions Additional request params
1386
- * @summary UpdatePostPurchaseInstructions
1387
- * @return {PostPurchaseInstructionResult} Success
1388
- */
1389
- export async function getAccountsByIdPostPurchaseInstructions(
1390
- id: string,
1391
- requireVersion: string,
1392
- requestOptions: RequestOptions = defaultRequestOptions
1393
- ): Promise<PostPurchaseInstructionResult> {
1394
- let query = '';
1395
- const resp = await fetch(`/accounts/${id}/post-purchase-instructions${query}`, {
1396
- method: 'get',
1397
- body: undefined,
1398
- headers: {
1399
- ...requestOptions.headers,
1400
- requireVersion: requireVersion
1401
- }
1402
- });
1403
- const json = await resp.json();
1404
- if (resp.ok) {
1405
- return json as PostPurchaseInstructionResult;
1406
- } else {
1407
- throw json;
1408
- }
1409
-
1410
- }
1411
-
1412
-
1413
- /**
1414
- * PUT /accounts/{id}/post-purchase-instructions
1415
- * @param {string} id
1416
- * @param {string} requireVersion
1417
- * @param {UpdatePostPurchaseInstructions} body
1418
- * @param {RequestOptions} requestOptions Additional request params
1419
- * @summary UpdatePostPurchaseInstructions
1420
- * @return {any}
1421
- */
1422
- export async function putAccountsByIdPostPurchaseInstructions(
1423
- id: string,
1424
- requireVersion: string,
1425
- body: UpdatePostPurchaseInstructions,
1426
- requestOptions: RequestOptions = defaultRequestOptions
1427
- ): Promise<any> {
1428
- let query = '';
1429
- const resp = await fetch(`/accounts/${id}/post-purchase-instructions${query}`, {
1430
- method: 'put',
1431
- body: JSON.stringify(body),
1432
- headers: {
1433
- ...requestOptions.headers,
1434
- requireVersion: requireVersion
1435
- }
1436
- });
1437
- const json = await resp.json();
1438
- if (resp.ok) {
1439
- return json as any;
1440
- } else {
1441
- throw json;
1442
- }
1443
-
1444
- }
1445
-
1446
-
1447
- /**
1448
- * PUT /accounts/request-settings
1449
- * @param {string} requireVersion
1450
- * @param {UpdateRequestSettings} body
1451
- * @param {RequestOptions} requestOptions Additional request params
1452
- * @summary UpdateAccountAccessRequestSettings
1453
- * @return {any}
1454
- */
1455
- export async function putAccountsRequestSettings(
1456
- requireVersion: string,
1457
- body: UpdateRequestSettings,
1458
- requestOptions: RequestOptions = defaultRequestOptions
1459
- ): Promise<any> {
1460
- let query = '';
1461
- const resp = await fetch(`/accounts/request-settings${query}`, {
1462
- method: 'put',
1463
- body: JSON.stringify(body),
1464
- headers: {
1465
- ...requestOptions.headers,
1466
- requireVersion: requireVersion
1467
- }
1468
- });
1469
- const json = await resp.json();
1470
- if (resp.ok) {
1471
- return json as any;
1472
- } else {
1473
- throw json;
1474
- }
1475
-
1476
- }
1477
-
1478
-
1479
- /**
1480
- * PUT /accounts/filtering-and-locking-access
1481
- * @param {string} requireVersion
1482
- * @param {UpdateAccountFilteringAndLockingAccess} body
1483
- * @param {RequestOptions} requestOptions Additional request params
1484
- * @summary UpdateAccountFilteringAndLockingAccess
1485
- * @return {any}
1486
- */
1487
- export async function putAccountsFilteringAndLockingAccess(
1488
- requireVersion: string,
1489
- body: UpdateAccountFilteringAndLockingAccess,
1490
- requestOptions: RequestOptions = defaultRequestOptions
1491
- ): Promise<any> {
1492
- let query = '';
1493
- const resp = await fetch(`/accounts/filtering-and-locking-access${query}`, {
1494
- method: 'put',
1495
- body: JSON.stringify(body),
1496
- headers: {
1497
- ...requestOptions.headers,
1498
- requireVersion: requireVersion
1499
- }
1500
- });
1501
- const json = await resp.json();
1502
- if (resp.ok) {
1503
- return json as any;
1504
- } else {
1505
- throw json;
1506
- }
1507
-
1508
- }
1509
-
1510
-
1511
- /**
1512
- * GET /accounts/list/for-user
1513
- * @param {string} requireVersion
1514
- * @param {RequestOptions} requestOptions Additional request params
1515
- * @summary GetAccountListForUser
1516
- * @return {AccountContactInfoCollectionResult} Success
1517
- */
1518
- export async function getAccountsListForUser(
1519
- requireVersion: string,
1520
- requestOptions: RequestOptions = defaultRequestOptions
1521
- ): Promise<AccountContactInfoCollectionResult> {
1522
- let query = '';
1523
- const resp = await fetch(`/accounts/list/for-user${query}`, {
1524
- method: 'get',
1525
- body: undefined,
1526
- headers: {
1527
- ...requestOptions.headers,
1528
- requireVersion: requireVersion
1529
- }
1530
- });
1531
- const json = await resp.json();
1532
- if (resp.ok) {
1533
- return json as AccountContactInfoCollectionResult;
1534
- } else {
1535
- throw json;
1536
- }
1537
-
1538
- }
1539
-
1540
-
1541
- /**
1542
- * GET /currencies
1543
- * @param {string} requireVersion
1544
- * @param {RequestOptions} requestOptions Additional request params
1545
- * @summary GetCurrencies
1546
- * @return {CurrencyCollectionResult} Success
1547
- */
1548
- export async function getCurrencies(
1549
- requireVersion: string,
1550
- requestOptions: RequestOptions = defaultRequestOptions
1551
- ): Promise<CurrencyCollectionResult> {
1552
- let query = '';
1553
- const resp = await fetch(`/currencies${query}`, {
1554
- method: 'get',
1555
- body: undefined,
1556
- headers: {
1557
- ...requestOptions.headers,
1558
- requireVersion: requireVersion
1559
- }
1560
- });
1561
- const json = await resp.json();
1562
- if (resp.ok) {
1563
- return json as CurrencyCollectionResult;
1564
- } else {
1565
- throw json;
1566
- }
1567
-
1568
- }
1569
-
1570
-
1571
- /**
1572
- * GET /accounts/of-customers
1573
- * @param {string} requireVersion
1574
- * @param {RequestOptions} requestOptions Additional request params
1575
- * @summary GetAccount
1576
- * @return {CustomerWfaAccountModel} Success
1577
- */
1578
- export async function getAccountsOfCustomers(
1579
- requireVersion: string,
1580
- requestOptions: RequestOptions = defaultRequestOptions
1581
- ): Promise<CustomerWfaAccountModel> {
1582
- let query = '';
1583
- const resp = await fetch(`/accounts/of-customers${query}`, {
1584
- method: 'get',
1585
- body: undefined,
1586
- headers: {
1587
- ...requestOptions.headers,
1588
- requireVersion: requireVersion
1589
- }
1590
- });
1591
- const json = await resp.json();
1592
- if (resp.ok) {
1593
- return json as CustomerWfaAccountModel;
1594
- } else {
1595
- throw json;
1596
- }
1597
-
1598
- }
1599
-
1600
-
1601
- /**
1602
- * POST /accounts/of-customers
1603
- * @param {string} requireVersion
1604
- * @param {AddCustomerAccountModel} body
1605
- * @param {RequestOptions} requestOptions Additional request params
1606
- * @summary This endpoint is called from Customer Portal UI
1607
- After the account creation we need to create a customer with credentials to login into the account
1608
- * @return {any}
1609
- */
1610
- export async function postAccountsOfCustomers(
1611
- requireVersion: string,
1612
- body: AddCustomerAccountModel,
1613
- requestOptions: RequestOptions = defaultRequestOptions
1614
- ): Promise<any> {
1615
- let query = '';
1616
- const resp = await fetch(`/accounts/of-customers${query}`, {
1617
- method: 'post',
1618
- body: JSON.stringify(body),
1619
- headers: {
1620
- ...requestOptions.headers,
1621
- requireVersion: requireVersion
1622
- }
1623
- });
1624
- const json = await resp.json();
1625
- if (resp.ok) {
1626
- return json as any;
1627
- } else {
1628
- throw json;
1629
- }
1630
-
1631
- }
1632
-
1633
-
1634
- /**
1635
- * GET /accounts/of-customers/service-provider/details
1636
- * @param {string} requireVersion
1637
- * @param {RequestOptions} requestOptions Additional request params
1638
- * @summary GetServiceProviderDetails
1639
- * @return {ServiceProviderDetails} Success
1640
- */
1641
- export async function getAccountsOfCustomersServiceProviderDetails(
1642
- requireVersion: string,
1643
- requestOptions: RequestOptions = defaultRequestOptions
1644
- ): Promise<ServiceProviderDetails> {
1645
- let query = '';
1646
- const resp = await fetch(`/accounts/of-customers/service-provider/details${query}`, {
1647
- method: 'get',
1648
- body: undefined,
1649
- headers: {
1650
- ...requestOptions.headers,
1651
- requireVersion: requireVersion
1652
- }
1653
- });
1654
- const json = await resp.json();
1655
- if (resp.ok) {
1656
- return json as ServiceProviderDetails;
1657
- } else {
1658
- throw json;
1659
- }
1660
-
1661
- }
1662
-
1663
-
1664
- /**
1665
- * PUT /accounts/of-customers/name
1666
- * @param {string} requireVersion
1667
- * @param {UpdateCompanyName} body
1668
- * @param {RequestOptions} requestOptions Additional request params
1669
- * @summary UpdateCompanyName
1670
- * @return {any}
1671
- */
1672
- export async function putAccountsOfCustomersName(
1673
- requireVersion: string,
1674
- body: UpdateCompanyName,
1675
- requestOptions: RequestOptions = defaultRequestOptions
1676
- ): Promise<any> {
1677
- let query = '';
1678
- const resp = await fetch(`/accounts/of-customers/name${query}`, {
1679
- method: 'put',
1680
- body: JSON.stringify(body),
1681
- headers: {
1682
- ...requestOptions.headers,
1683
- requireVersion: requireVersion
1684
- }
1685
- });
1686
- const json = await resp.json();
1687
- if (resp.ok) {
1688
- return json as any;
1689
- } else {
1690
- throw json;
1691
- }
1692
-
1693
- }
1694
-
1695
-
1696
- /**
1697
- * PUT /accounts/of-customers/contact-person
1698
- * @param {string} requireVersion
1699
- * @param {UpdateAccountContactPerson} body
1700
- * @param {RequestOptions} requestOptions Additional request params
1701
- * @summary UpdateContactPerson
1702
- * @return {any}
1703
- */
1704
- export async function putAccountsOfCustomersContactPerson(
1705
- requireVersion: string,
1706
- body: UpdateAccountContactPerson,
1707
- requestOptions: RequestOptions = defaultRequestOptions
1708
- ): Promise<any> {
1709
- let query = '';
1710
- const resp = await fetch(`/accounts/of-customers/contact-person${query}`, {
1711
- method: 'put',
1712
- body: JSON.stringify(body),
1713
- headers: {
1714
- ...requestOptions.headers,
1715
- requireVersion: requireVersion
1716
- }
1717
- });
1718
- const json = await resp.json();
1719
- if (resp.ok) {
1720
- return json as any;
1721
- } else {
1722
- throw json;
1723
- }
1724
-
1725
- }
1726
-
1727
-
1728
- /**
1729
- * GET /accounts/of-customers/service-providers
1730
- * @param {string} requireVersion
1731
- * @param {RequestOptions} requestOptions Additional request params
1732
- * @summary GetServiceProviders
1733
- * @return {ServiceProviderResultCollectionResult} Success
1734
- */
1735
- export async function getAccountsOfCustomersServiceProviders(
1736
- requireVersion: string,
1737
- requestOptions: RequestOptions = defaultRequestOptions
1738
- ): Promise<ServiceProviderResultCollectionResult> {
1739
- let query = '';
1740
- const resp = await fetch(`/accounts/of-customers/service-providers${query}`, {
1741
- method: 'get',
1742
- body: undefined,
1743
- headers: {
1744
- ...requestOptions.headers,
1745
- requireVersion: requireVersion
1746
- }
1747
- });
1748
- const json = await resp.json();
1749
- if (resp.ok) {
1750
- return json as ServiceProviderResultCollectionResult;
1751
- } else {
1752
- throw json;
1753
- }
1754
-
1755
- }
1756
-
1757
-
1758
- /**
1759
- * GET /accounts/of-customers/what-is-my-remote-address
1760
- * @param {string} requireVersion
1761
- * @param {RequestOptions} requestOptions Additional request params
1762
- * @summary WhatIsMyRemoteAddress
1763
- * @return {string} Success
1764
- */
1765
- export async function getAccountsOfCustomersWhatIsMyRemoteAddress(
1766
- requireVersion: string,
1767
- requestOptions: RequestOptions = defaultRequestOptions
1768
- ): Promise<string> {
1769
- let query = '';
1770
- const resp = await fetch(`/accounts/of-customers/what-is-my-remote-address${query}`, {
1771
- method: 'get',
1772
- body: undefined,
1773
- headers: {
1774
- ...requestOptions.headers,
1775
- requireVersion: requireVersion
1776
- }
1777
- });
1778
- const json = await resp.json();
1779
- if (resp.ok) {
1780
- return json as string;
1781
- } else {
1782
- throw json;
1783
- }
1784
-
1785
- }
1786
-
1787
-
1788
- /**
1789
- * GET /accounts/of-customers/privacy
1790
- * @param {string} requireVersion
1791
- * @param {RequestOptions} requestOptions Additional request params
1792
- * @summary GetPrivacyPolicySettings
1793
- * @return {PrivacyPolicySettingsModel} Success
1794
- */
1795
- export async function getAccountsOfCustomersPrivacy(
1796
- requireVersion: string,
1797
- requestOptions: RequestOptions = defaultRequestOptions
1798
- ): Promise<PrivacyPolicySettingsModel> {
1799
- let query = '';
1800
- const resp = await fetch(`/accounts/of-customers/privacy${query}`, {
1801
- method: 'get',
1802
- body: undefined,
1803
- headers: {
1804
- ...requestOptions.headers,
1805
- requireVersion: requireVersion
1806
- }
1807
- });
1808
- const json = await resp.json();
1809
- if (resp.ok) {
1810
- return json as PrivacyPolicySettingsModel;
1811
- } else {
1812
- throw json;
1813
- }
1814
-
1815
- }
1816
-
1817
-
1818
- /**
1819
- * PUT /accounts/of-customers/privacy
1820
- * @param {string} requireVersion
1821
- * @param {UpdatePrivacyPolicy} body
1822
- * @param {RequestOptions} requestOptions Additional request params
1823
- * @summary SetPrivacyPolicySettings
1824
- * @return {any}
1825
- */
1826
- export async function putAccountsOfCustomersPrivacy(
1827
- requireVersion: string,
1828
- body: UpdatePrivacyPolicy,
1829
- requestOptions: RequestOptions = defaultRequestOptions
1830
- ): Promise<any> {
1831
- let query = '';
1832
- const resp = await fetch(`/accounts/of-customers/privacy${query}`, {
1833
- method: 'put',
1834
- body: JSON.stringify(body),
1835
- headers: {
1836
- ...requestOptions.headers,
1837
- requireVersion: requireVersion
1838
- }
1839
- });
1840
- const json = await resp.json();
1841
- if (resp.ok) {
1842
- return json as any;
1843
- } else {
1844
- throw json;
1845
- }
1846
-
1847
- }
1848
-
1849
-
1850
- /**
1851
- * POST /accounts/of-customers/verification
1852
- * @param {string} requireVersion
1853
- * @param {CustomerAccountVerificationModel} body
1854
- * @param {RequestOptions} requestOptions Additional request params
1855
- * @summary StoreCustomerAccountVerification
1856
- * @return {any}
1857
- */
1858
- export async function postAccountsOfCustomersVerification(
1859
- requireVersion: string,
1860
- body: CustomerAccountVerificationModel,
1861
- requestOptions: RequestOptions = defaultRequestOptions
1862
- ): Promise<any> {
1863
- let query = '';
1864
- const resp = await fetch(`/accounts/of-customers/verification${query}`, {
1865
- method: 'post',
1866
- body: JSON.stringify(body),
1867
- headers: {
1868
- ...requestOptions.headers,
1869
- requireVersion: requireVersion
1870
- }
1871
- });
1872
- const json = await resp.json();
1873
- if (resp.ok) {
1874
- return json as any;
1875
- } else {
1876
- throw json;
1877
- }
1878
-
1879
- }
1880
-
1881
-
1882
- /**
1883
- * GET /accounts/of-customers/verification
1884
- * @param {string} requireVersion
1885
- * @param {string} token
1886
- * @param {RequestOptions} requestOptions Additional request params
1887
- * @summary GetCustomerAccountVerification
1888
- * @return {CustomerAccountVerificationModel} Success
1889
- */
1890
- export async function getAccountsOfCustomersVerification(
1891
- requireVersion: string,
1892
- token?: string,
1893
- requestOptions: RequestOptions = defaultRequestOptions
1894
- ): Promise<CustomerAccountVerificationModel> {
1895
- let query = '';
1896
- const queryParams = [];
1897
- if (!!token) {
1898
- queryParams.push(`token=${encodeURIComponent(token)}`);
1899
- }
1900
- if (queryParams.length > 0) {
1901
- query = '?' + queryParams.join('&');
1902
- }
1903
- const resp = await fetch(`/accounts/of-customers/verification${query}`, {
1904
- method: 'get',
1905
- body: undefined,
1906
- headers: {
1907
- ...requestOptions.headers,
1908
- requireVersion: requireVersion
1909
- }
1910
- });
1911
- const json = await resp.json();
1912
- if (resp.ok) {
1913
- return json as CustomerAccountVerificationModel;
1914
- } else {
1915
- throw json;
1916
- }
1917
-
1918
- }
1919
-
1920
-
1921
- /**
1922
- * GET /geo
1923
- * @param {string} requireVersion
1924
- * @param {RequestOptions} requestOptions Additional request params
1925
- * @summary GetCountries
1926
- * @return {CountryModelCollectionResult} Success
1927
- */
1928
- export async function getGeo(
1929
- requireVersion: string,
1930
- requestOptions: RequestOptions = defaultRequestOptions
1931
- ): Promise<CountryModelCollectionResult> {
1932
- let query = '';
1933
- const resp = await fetch(`/geo${query}`, {
1934
- method: 'get',
1935
- body: undefined,
1936
- headers: {
1937
- ...requestOptions.headers,
1938
- requireVersion: requireVersion
1939
- }
1940
- });
1941
- const json = await resp.json();
1942
- if (resp.ok) {
1943
- return json as CountryModelCollectionResult;
1944
- } else {
1945
- throw json;
1946
- }
1947
-
1948
- }
1949
-
1950
-
1951
- /**
1952
- * POST /invitations/{invitationId}/links/opened
1953
- * @param {string} invitationId
1954
- * @param {string} requireVersion
1955
- * @param {TrackInvitationOpened} body
1956
- * @param {RequestOptions} requestOptions Additional request params
1957
- * @summary TrackInvitationOpened
1958
- * @return {any}
1959
- */
1960
- export async function postInvitationsByInvitationIdLinksOpened(
1961
- invitationId: string,
1962
- requireVersion: string,
1963
- body: TrackInvitationOpened,
1964
- requestOptions: RequestOptions = defaultRequestOptions
1965
- ): Promise<any> {
1966
- let query = '';
1967
- const resp = await fetch(`/invitations/${invitationId}/links/opened${query}`, {
1968
- method: 'post',
1969
- body: JSON.stringify(body),
1970
- headers: {
1971
- ...requestOptions.headers,
1972
- requireVersion: requireVersion
1973
- }
1974
- });
1975
- const json = await resp.json();
1976
- if (resp.ok) {
1977
- return json as any;
1978
- } else {
1979
- throw json;
1980
- }
1981
-
1982
- }
1983
-
1984
-
1985
- /**
1986
- * POST /invitations/{invitationId}/links/registered
1987
- * @param {string} invitationId
1988
- * @param {string} requireVersion
1989
- * @param {TrackInvitationRegistered} body
1990
- * @param {RequestOptions} requestOptions Additional request params
1991
- * @summary TrackInvitationRegistered
1992
- * @return {any}
1993
- */
1994
- export async function postInvitationsByInvitationIdLinksRegistered(
1995
- invitationId: string,
1996
- requireVersion: string,
1997
- body: TrackInvitationRegistered,
1998
- requestOptions: RequestOptions = defaultRequestOptions
1999
- ): Promise<any> {
2000
- let query = '';
2001
- const resp = await fetch(`/invitations/${invitationId}/links/registered${query}`, {
2002
- method: 'post',
2003
- body: JSON.stringify(body),
2004
- headers: {
2005
- ...requestOptions.headers,
2006
- requireVersion: requireVersion
2007
- }
2008
- });
2009
- const json = await resp.json();
2010
- if (resp.ok) {
2011
- return json as any;
2012
- } else {
2013
- throw json;
2014
- }
2015
-
2016
- }
2017
-
2018
-
2019
- /**
2020
- * GET /support
2021
- * @param {string} requireVersion
2022
- * @param {RequestOptions} requestOptions Additional request params
2023
- * @summary GetDownloads
2024
- * @return {DownloadableItemCollectionResult} Success
2025
- */
2026
- export async function getSupport(
2027
- requireVersion: string,
2028
- requestOptions: RequestOptions = defaultRequestOptions
2029
- ): Promise<DownloadableItemCollectionResult> {
2030
- let query = '';
2031
- const resp = await fetch(`/support${query}`, {
2032
- method: 'get',
2033
- body: undefined,
2034
- headers: {
2035
- ...requestOptions.headers,
2036
- requireVersion: requireVersion
2037
- }
2038
- });
2039
- const json = await resp.json();
2040
- if (resp.ok) {
2041
- return json as DownloadableItemCollectionResult;
2042
- } else {
2043
- throw json;
2044
- }
2045
-
2046
- }
2047
-
2048
-
2049
- /**
2050
- * GET /timezones
2051
- * @param {string} requireVersion
2052
- * @param {RequestOptions} requestOptions Additional request params
2053
- * @summary GetTimezones
2054
- * @return {TimezoneCollectionResult} Success
2055
- */
2056
- export async function getTimezones(
2057
- requireVersion: string,
2058
- requestOptions: RequestOptions = defaultRequestOptions
2059
- ): Promise<TimezoneCollectionResult> {
2060
- let query = '';
2061
- const resp = await fetch(`/timezones${query}`, {
2062
- method: 'get',
2063
- body: undefined,
2064
- headers: {
2065
- ...requestOptions.headers,
2066
- requireVersion: requireVersion
2067
- }
2068
- });
2069
- const json = await resp.json();
2070
- if (resp.ok) {
2071
- return json as TimezoneCollectionResult;
2072
- } else {
2073
- throw json;
2074
- }
2075
-
2076
- }
2077
-
2078
-
2079
- /**
2080
- * GET /validation/emails
2081
- * @param {string} requireVersion
2082
- * @param {string} email
2083
- * @param {RequestOptions} requestOptions Additional request params
2084
- * @summary ValidateDisposableEmail
2085
- * @return {boolean} Success
2086
- */
2087
- export async function getValidationEmails(
2088
- requireVersion: string,
2089
- email?: string,
2090
- requestOptions: RequestOptions = defaultRequestOptions
2091
- ): Promise<boolean> {
2092
- let query = '';
2093
- const queryParams = [];
2094
- if (!!email) {
2095
- queryParams.push(`email=${encodeURIComponent(email)}`);
2096
- }
2097
- if (queryParams.length > 0) {
2098
- query = '?' + queryParams.join('&');
2099
- }
2100
- const resp = await fetch(`/validation/emails${query}`, {
2101
- method: 'get',
2102
- body: undefined,
2103
- headers: {
2104
- ...requestOptions.headers,
2105
- requireVersion: requireVersion
2106
- }
2107
- });
2108
- const json = await resp.json();
2109
- if (resp.ok) {
2110
- return json as boolean;
2111
- } else {
2112
- throw json;
2113
- }
2114
-
2115
- }
2116
-
2117
-