@frontegg/rest-api 3.1.75 → 3.1.76-alpha.9502349697

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/BaseApiClient.d.ts +16 -0
  2. package/BaseApiClient.js +39 -0
  3. package/ContextHolder/index.d.ts +108 -27
  4. package/ContextHolder/index.js +155 -50
  5. package/FetchClient.d.ts +42 -0
  6. package/FetchClient.js +308 -0
  7. package/account-settings/index.d.ts +19 -7
  8. package/account-settings/index.js +23 -13
  9. package/applications/index.d.ts +49 -44
  10. package/applications/index.js +51 -37
  11. package/audits/index.d.ts +27 -15
  12. package/audits/index.js +27 -17
  13. package/auth/index.d.ts +817 -768
  14. package/auth/index.js +902 -721
  15. package/auth/secutiry-poilicy/index.d.ts +58 -102
  16. package/auth/secutiry-poilicy/index.js +122 -90
  17. package/auth/utils.d.ts +2 -2
  18. package/auth/utils.js +9 -8
  19. package/connectivity/index.d.ts +126 -27
  20. package/connectivity/index.js +147 -114
  21. package/directory/index.d.ts +31 -22
  22. package/directory/index.js +27 -15
  23. package/entitlements/index.d.ts +14 -8
  24. package/entitlements/index.js +12 -4
  25. package/feature-flags/index.d.ts +8 -2
  26. package/feature-flags/index.js +16 -8
  27. package/groups/index.d.ts +73 -49
  28. package/groups/index.js +64 -45
  29. package/impersonate/index.d.ts +15 -6
  30. package/impersonate/index.js +13 -5
  31. package/index.d.ts +154 -108
  32. package/index.js +109 -78
  33. package/interfaces.d.ts +10 -0
  34. package/metadata/index.d.ts +67 -7
  35. package/metadata/index.js +52 -32
  36. package/node/BaseApiClient.js +49 -0
  37. package/node/ContextHolder/index.js +155 -50
  38. package/node/FetchClient.js +326 -0
  39. package/node/account-settings/index.js +27 -16
  40. package/node/applications/index.js +51 -44
  41. package/node/audits/index.js +31 -20
  42. package/node/auth/index.js +768 -1035
  43. package/node/auth/secutiry-poilicy/index.js +125 -136
  44. package/node/auth/utils.js +9 -7
  45. package/node/connectivity/index.js +148 -187
  46. package/node/directory/index.js +29 -20
  47. package/node/entitlements/index.js +18 -5
  48. package/node/feature-flags/index.js +21 -9
  49. package/node/groups/index.js +65 -63
  50. package/node/impersonate/index.js +18 -5
  51. package/node/index.js +116 -71
  52. package/node/metadata/index.js +61 -52
  53. package/node/notifications/index.js +37 -27
  54. package/node/reports/index.js +78 -70
  55. package/node/roles/index.js +56 -51
  56. package/node/security-center/index.js +21 -9
  57. package/node/sub-tenants/index.js +90 -89
  58. package/node/subscriptions/index.js +69 -107
  59. package/node/subscriptions/invoices.js +25 -17
  60. package/node/subscriptions/managedSubscriptions.js +32 -27
  61. package/node/subscriptions/paymentMethods.js +27 -20
  62. package/node/subscriptions/paymentProviders.js +15 -6
  63. package/node/subscriptions/plans.js +17 -9
  64. package/node/subscriptions/providers/stripe/index.js +26 -21
  65. package/node/subscriptions/subscriptions.js +32 -27
  66. package/node/subscriptions/summaries.js +15 -6
  67. package/node/subscriptions/tenantConfiguration.js +17 -9
  68. package/node/subscriptions/vendorPublicConfigurations.js +15 -6
  69. package/node/teams/index.js +130 -138
  70. package/node/tenants/index.js +65 -60
  71. package/node/user-phone-numbers/index.js +32 -24
  72. package/node/users/index.js +58 -53
  73. package/node/vendor/index.js +17 -6
  74. package/notifications/index.d.ts +22 -16
  75. package/notifications/index.js +33 -22
  76. package/package.json +1 -1
  77. package/reports/index.d.ts +50 -44
  78. package/reports/index.js +75 -62
  79. package/roles/index.d.ts +44 -38
  80. package/roles/index.js +57 -41
  81. package/security-center/index.d.ts +14 -2
  82. package/security-center/index.js +15 -6
  83. package/sub-tenants/index.d.ts +57 -15
  84. package/sub-tenants/index.js +88 -68
  85. package/subscriptions/index.d.ts +56 -11
  86. package/subscriptions/index.js +58 -11
  87. package/subscriptions/invoices.d.ts +16 -13
  88. package/subscriptions/invoices.js +24 -14
  89. package/subscriptions/managedSubscriptions.d.ts +18 -15
  90. package/subscriptions/managedSubscriptions.js +33 -22
  91. package/subscriptions/paymentMethods.d.ts +16 -13
  92. package/subscriptions/paymentMethods.js +26 -17
  93. package/subscriptions/paymentProviders.d.ts +8 -5
  94. package/subscriptions/paymentProviders.js +11 -4
  95. package/subscriptions/plans.d.ts +11 -8
  96. package/subscriptions/plans.js +14 -6
  97. package/subscriptions/providers/stripe/index.d.ts +24 -21
  98. package/subscriptions/providers/stripe/index.js +27 -16
  99. package/subscriptions/subscriptions.d.ts +24 -21
  100. package/subscriptions/subscriptions.js +33 -22
  101. package/subscriptions/summaries.d.ts +7 -4
  102. package/subscriptions/summaries.js +10 -3
  103. package/subscriptions/tenantConfiguration.d.ts +6 -3
  104. package/subscriptions/tenantConfiguration.js +15 -7
  105. package/subscriptions/vendorPublicConfigurations.d.ts +5 -2
  106. package/subscriptions/vendorPublicConfigurations.js +11 -4
  107. package/teams/index.d.ts +35 -131
  108. package/teams/index.js +122 -93
  109. package/tenants/index.d.ts +25 -37
  110. package/tenants/index.js +62 -46
  111. package/user-phone-numbers/index.d.ts +32 -26
  112. package/user-phone-numbers/index.js +32 -19
  113. package/users/index.d.ts +21 -15
  114. package/users/index.js +60 -44
  115. package/vendor/index.d.ts +12 -6
  116. package/vendor/index.js +11 -4
  117. package/fetch.d.ts +0 -24
  118. package/fetch.js +0 -265
  119. package/node/fetch.js +0 -306
  120. package/node/subscriptions/providers/index.js +0 -18
  121. package/subscriptions/providers/index.d.ts +0 -1
  122. package/subscriptions/providers/index.js +0 -1
package/index.js CHANGED
@@ -1,93 +1,124 @@
1
- /** @license Frontegg v3.1.75
1
+ /** @license Frontegg v3.1.76-alpha.9502349697
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
5
5
  */
6
- import * as auth from "./auth";
7
- import { AuthStrategyEnum, MachineToMachineAuthStrategy, SocialLoginProviders } from "./auth";
8
- import * as teams from "./teams";
9
- import * as metadata from "./metadata";
10
- import * as reports from "./reports";
11
- import * as notifications from "./notifications";
12
- import * as audits from "./audits";
13
- import * as fetch from "./fetch";
14
- import * as connectivity from "./connectivity";
15
- import * as tenants from "./tenants";
16
- import * as accountSettings from "./account-settings";
17
- import * as roles from "./roles";
18
- import * as subscriptions from "./subscriptions";
19
- import * as applications from "./applications";
20
- import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from "./subscriptions";
21
- import { FronteggApiError } from "./error";
22
- import * as vendor from "./vendor";
23
- import * as subTenants from "./sub-tenants";
24
- import * as featureFlags from "./feature-flags";
25
- import * as directory from "./directory";
26
- import * as impersonate from "./impersonate";
27
- import * as groups from "./groups";
28
- import * as users from "./users";
29
- import * as entitlements from "./entitlements";
30
- import * as securityCenter from "./security-center";
31
- import * as userPhoneNumbers from "./user-phone-numbers";
32
- import { ContextHolder, FronteggContext } from "./ContextHolder";
33
- export * from "./interfaces";
34
- export * from "./auth/interfaces";
6
+ import { AuthStrategyEnum, MachineToMachineAuthStrategy, SocialLoginProviders } from './auth';
7
+ import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from './subscriptions';
8
+ import { FronteggApiError } from './error';
9
+ import fetch, { FetchClient } from './FetchClient';
10
+ import { ContextHolder, FronteggContext } from './ContextHolder';
11
+ import DefaultAuthenticationApi, { AuthenticationApi } from './auth';
12
+ import DefaultSecurityPolicyApi, { SecurityPolicyApi } from './auth/secutiry-poilicy';
13
+ import DefaultUsersApi, { UsersApi } from './users';
14
+ import DefaultTeamsApi, { TeamsApi } from './teams';
15
+ import DefaultMetadataApi, { MetadataApi } from './metadata';
16
+ import DefaultReportsApi, { ReportsApi } from './reports';
17
+ import DefaultConnectivityApi, { ConnectivityApi } from './connectivity';
18
+ import DefaultNotificationsApi, { NotificationsApi } from './notifications';
19
+ import DefaultAuditsApi, { AuditsApi } from './audits';
20
+ import DefaultTenantsApi, { TenantsApi } from './tenants';
21
+ import DefaultAccountSettingsApi, { AccountSettingsApi } from './account-settings';
22
+ import DefaultRolesApi, { RolesApi } from './roles';
23
+ import DefaultSubscriptionsApi, { SubscriptionsApi } from './subscriptions';
24
+ import DefaultVendorApi, { VendorApi } from './vendor';
25
+ import DefaultSubTenantsApi, { SubTenantsApi } from './sub-tenants';
26
+ import DefaultFeatureFlagsApi, { FeatureFlagsApi } from './feature-flags';
27
+ import DefaultDirectoryApi, { DirectoryApi } from './directory';
28
+ import DefaultImpersonateApi, { ImpersonateApi } from './impersonate';
29
+ import DefaultGroupsApi, { GroupsApi } from './groups';
30
+ import DefaultEntitlementsApi, { EntitlementsApi } from './entitlements';
31
+ import DefaultSecurityCenterApi, { SecurityCenterApi } from './security-center';
32
+ import DefaultPhoneNumbersApi, { PhoneNumbersApi } from './user-phone-numbers';
33
+ import DefaultApplicationsApi, { ApplicationsApi } from './applications';
34
+ export * from './interfaces';
35
+ export * from './auth/interfaces';
35
36
  export { setTabTenantInSessionStorage, getTabTenantFromSessionStorage, removeTabTenantFromSessionStorage, getCurrentUserTenantsFunction, FRONTEGG_SEPARATE_TABS_BY_TENANT } from './auth';
36
- export * from "./teams/interfaces";
37
- export * from "./metadata/interfaces";
38
- export * from "./reports/interfaces";
39
- export * from "./connectivity/interfaces";
40
- export * from "./notifications/interfaces";
41
- export * from "./audits/interfaces";
42
- export * from "./tenants/interfaces";
43
- export * from "./account-settings/interfaces";
44
- export * from "./roles/interfaces";
45
- export * from "./subscriptions/interfaces";
46
- export * from "./vendor/interfaces";
47
- export * from "./sub-tenants/interfaces";
48
- export * from "./routers";
49
- export * from "./feature-flags/index";
50
- export * from "./feature-flags/interfaces";
51
- export * from "./directory/index";
52
- export * from "./directory/interfaces";
53
- export * from "./impersonate/interfaces";
54
- export * from "./groups/interfaces";
55
- export * from "./groups/enums";
56
- export * from "./users/interfaces";
57
- export * from "./entitlements/interfaces";
58
- export * from "./security-center/interfaces";
59
- export * from "./user-phone-numbers/interfaces";
60
- export * from "./applications/interfaces";
37
+ export * from './teams/interfaces';
38
+ export * from './metadata/interfaces';
39
+ export * from './reports/interfaces';
40
+ export * from './connectivity/interfaces';
41
+ export * from './notifications/interfaces';
42
+ export * from './audits/interfaces';
43
+ export * from './tenants/interfaces';
44
+ export * from './account-settings/interfaces';
45
+ export * from './roles/interfaces';
46
+ export * from './subscriptions/interfaces';
47
+ export * from './vendor/interfaces';
48
+ export * from './sub-tenants/interfaces';
49
+ export * from './routers';
50
+ export * from './feature-flags/index';
51
+ export * from './feature-flags/interfaces';
52
+ export * from './directory/index';
53
+ export * from './directory/interfaces';
54
+ export * from './impersonate/interfaces';
55
+ export * from './groups/interfaces';
56
+ export * from './groups/enums';
57
+ export * from './users/interfaces';
58
+ export * from './entitlements/interfaces';
59
+ export * from './security-center/interfaces';
60
+ export * from './user-phone-numbers/interfaces';
61
+ export * from './applications/interfaces';
61
62
  const api = {
62
- auth,
63
- teams,
64
- metadata,
65
- reports,
66
- connectivity,
67
- notifications,
68
- audits,
69
- tenants,
70
- accountSettings,
71
- roles,
72
- subscriptions,
73
- vendor,
74
- subTenants,
75
- featureFlags,
76
- directory,
77
- impersonate,
78
- groups,
79
- users,
80
- entitlements,
81
- securityCenter,
82
- userPhoneNumbers,
83
- applications
63
+ auth: DefaultAuthenticationApi,
64
+ securityPolicy: DefaultSecurityPolicyApi,
65
+ teams: DefaultTeamsApi,
66
+ metadata: DefaultMetadataApi,
67
+ reports: DefaultReportsApi,
68
+ connectivity: DefaultConnectivityApi,
69
+ notifications: DefaultNotificationsApi,
70
+ audits: DefaultAuditsApi,
71
+ tenants: DefaultTenantsApi,
72
+ accountSettings: DefaultAccountSettingsApi,
73
+ roles: DefaultRolesApi,
74
+ subscriptions: DefaultSubscriptionsApi,
75
+ vendor: DefaultVendorApi,
76
+ subTenants: DefaultSubTenantsApi,
77
+ featureFlags: DefaultFeatureFlagsApi,
78
+ directory: DefaultDirectoryApi,
79
+ impersonate: DefaultImpersonateApi,
80
+ groups: DefaultGroupsApi,
81
+ users: DefaultUsersApi,
82
+ entitlements: DefaultEntitlementsApi,
83
+ securityCenter: DefaultSecurityCenterApi,
84
+ userPhoneNumbers: DefaultPhoneNumbersApi,
85
+ applications: DefaultApplicationsApi
84
86
  };
85
- export { fetch, ContextHolder, FronteggContext, api, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy };
87
+
88
+ const createApiClient = appName => ({
89
+ auth: new AuthenticationApi(appName),
90
+ securityPolicy: new SecurityPolicyApi(appName),
91
+ teams: new TeamsApi(appName),
92
+ metadata: new MetadataApi(appName),
93
+ reports: new ReportsApi(appName),
94
+ connectivity: new ConnectivityApi(appName),
95
+ notifications: new NotificationsApi(appName),
96
+ audits: new AuditsApi(appName),
97
+ tenants: new TenantsApi(appName),
98
+ accountSettings: new AccountSettingsApi(appName),
99
+ roles: new RolesApi(appName),
100
+ subscriptions: new SubscriptionsApi(appName),
101
+ vendor: new VendorApi(appName),
102
+ subTenants: new SubTenantsApi(appName),
103
+ featureFlags: new FeatureFlagsApi(appName),
104
+ directory: new DirectoryApi(appName),
105
+ impersonate: new ImpersonateApi(appName),
106
+ groups: new GroupsApi(appName),
107
+ users: new UsersApi(appName),
108
+ entitlements: new EntitlementsApi(appName),
109
+ securityCenter: new SecurityCenterApi(appName),
110
+ userPhoneNumbers: new PhoneNumbersApi(appName),
111
+ applications: new ApplicationsApi(appName)
112
+ });
113
+
114
+ export { fetch, FetchClient, ContextHolder, FronteggContext, api, createApiClient, FronteggApiError, AuthStrategyEnum, SocialLoginProviders, ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType, MachineToMachineAuthStrategy };
86
115
  export default {
87
116
  fetch,
117
+ FetchClient,
88
118
  ContextHolder,
89
119
  FronteggContext,
90
120
  api,
121
+ createApiClient,
91
122
  FronteggApiError,
92
123
  AuthStrategyEnum,
93
124
  MachineToMachineAuthStrategy,
package/interfaces.d.ts CHANGED
@@ -102,3 +102,13 @@ export declare enum PaginationOrderEnum {
102
102
  ASC = "ASC",
103
103
  DESC = "DESC"
104
104
  }
105
+ export interface RequestOptions {
106
+ url: string;
107
+ method: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
108
+ body?: any;
109
+ params?: any;
110
+ contentType?: string;
111
+ responseType?: 'json' | 'plain' | 'blob';
112
+ headers?: Record<string, string>;
113
+ credentials?: RequestCredentials;
114
+ }
@@ -1,8 +1,68 @@
1
1
  import { CommitChangesRequest, IAuditsMetadata, IMetadataIp, INotificationMetadata, ISamlMetadata } from './interfaces';
2
- export declare function getAdminBoxMetadata(): Promise<any>;
3
- export declare function updateAdminBoxMetadata(body: CommitChangesRequest): Promise<any>;
4
- export declare function getCurrentUserIpMetadata(): Promise<IMetadataIp>;
5
- export declare const getNotificationsMetadata: () => Promise<INotificationMetadata>;
6
- export declare const getSamlMetadata: () => Promise<ISamlMetadata>;
7
- export declare const getAuditsMetadata: () => Promise<IAuditsMetadata>;
8
- export declare const getIpAdressMetadata: (ip: string) => Promise<IMetadataIp>;
2
+ import { BaseApiClient } from '../BaseApiClient';
3
+ export declare class MetadataApi extends BaseApiClient {
4
+ constructor(appName: string);
5
+ /**
6
+ * Retrieves metadata based on the given criteria.
7
+ *
8
+ * @param body - Metadata request parameters.
9
+ * @returns Metadata matching the criteria.
10
+ * @throws Will throw an error if metadata is not found.
11
+ */
12
+ private getMetadata;
13
+ /**
14
+ * Retrieves admin box metadata.
15
+ *
16
+ * @returns Admin box metadata.
17
+ */
18
+ getAdminBoxMetadata: () => Promise<unknown>;
19
+ /**
20
+ * Updates admin box metadata.
21
+ *
22
+ * @param body - Request body for committing changes.
23
+ * @returns Response from the POST request.
24
+ */
25
+ updateAdminBoxMetadata: (body: CommitChangesRequest) => Promise<unknown>;
26
+ /**
27
+ * Retrieves IP metadata for a given IP address.
28
+ *
29
+ * @param ip - IP address to get metadata for.
30
+ * @returns IP metadata.
31
+ * @throws Will throw an error if IP metadata is not found.
32
+ */
33
+ private getIpMetadata;
34
+ /**
35
+ * Retrieves current user IP metadata.
36
+ *
37
+ * @returns Current user IP metadata.
38
+ * @throws Will throw an error if IP metadata is not found.
39
+ */
40
+ getCurrentUserIpMetadata: () => Promise<IMetadataIp>;
41
+ /**
42
+ * Retrieves notifications metadata.
43
+ *
44
+ * @returns Notifications metadata.
45
+ */
46
+ getNotificationsMetadata: () => Promise<INotificationMetadata>;
47
+ /**
48
+ * Retrieves SAML metadata.
49
+ *
50
+ * @returns SAML metadata.
51
+ */
52
+ getSamlMetadata: () => Promise<ISamlMetadata>;
53
+ /**
54
+ * Retrieves audits metadata.
55
+ *
56
+ * @returns Audits metadata.
57
+ */
58
+ getAuditsMetadata: () => Promise<IAuditsMetadata>;
59
+ /**
60
+ * Retrieves IP address metadata for a given IP.
61
+ *
62
+ * @param ip - IP address to get metadata for.
63
+ * @returns IP address metadata.
64
+ */
65
+ getIpAdressMetadata: (ip: string) => Promise<IMetadataIp>;
66
+ }
67
+ declare const _default: MetadataApi;
68
+ export default _default;
package/metadata/index.js CHANGED
@@ -1,38 +1,58 @@
1
- import { Get, Post } from '../fetch';
1
+ import { BaseApiClient } from '../BaseApiClient';
2
+ export class MetadataApi extends BaseApiClient {
3
+ constructor(appName) {
4
+ super(appName);
2
5
 
3
- async function getMetadata(body) {
4
- var _data$rows, _data$rows2;
6
+ this.getMetadata = async body => {
7
+ var _data$rows, _data$rows2;
5
8
 
6
- const data = await Get('/metadata', body);
7
- if (data != null && (_data$rows = data.rows) != null && _data$rows[0]) return data == null ? void 0 : (_data$rows2 = data.rows) == null ? void 0 : _data$rows2[0];
8
- throw new Error(`metadata not found: ${body.entityName}`);
9
- }
9
+ const data = await this.get('/metadata', body);
10
+ if (data != null && (_data$rows = data.rows) != null && _data$rows[0]) return data == null ? void 0 : (_data$rows2 = data.rows) == null ? void 0 : _data$rows2[0];
11
+ throw new Error(`metadata not found: ${body.entityName}`);
12
+ };
10
13
 
11
- export async function getAdminBoxMetadata() {
12
- return Get('/metadata/admin-box');
13
- }
14
- export async function updateAdminBoxMetadata(body) {
15
- return Post('/metadata/admin-box', body);
16
- }
14
+ this.getAdminBoxMetadata = async () => {
15
+ return this.get('/metadata/admin-box');
16
+ };
17
17
 
18
- async function getIpMetadata(ip) {
19
- const data = await Get(`/metadata/ip/${ip}`);
20
- if (data) return data;
21
- throw new Error(`ip metadata not found`);
22
- }
18
+ this.updateAdminBoxMetadata = async body => {
19
+ return this.post('/metadata/admin-box', body);
20
+ };
21
+
22
+ this.getIpMetadata = async ip => {
23
+ const data = await this.get(`/metadata/ip/${ip}`);
24
+ if (data) return data;
25
+ throw new Error(`ip metadata not found`);
26
+ };
27
+
28
+ this.getCurrentUserIpMetadata = async () => {
29
+ const data = await this.get(`/metadata/ipme`);
30
+ if (data) return data;
31
+ throw new Error(`ip metadata not found`);
32
+ };
33
+
34
+ this.getNotificationsMetadata = async () => {
35
+ return this.getMetadata({
36
+ entityName: 'notifications'
37
+ });
38
+ };
39
+
40
+ this.getSamlMetadata = async () => {
41
+ return this.getMetadata({
42
+ entityName: 'saml'
43
+ });
44
+ };
45
+
46
+ this.getAuditsMetadata = async () => {
47
+ return this.getMetadata({
48
+ entityName: 'audits'
49
+ });
50
+ };
51
+
52
+ this.getIpAdressMetadata = async ip => {
53
+ return this.getIpMetadata(ip);
54
+ };
55
+ }
23
56
 
24
- export async function getCurrentUserIpMetadata() {
25
- const data = await Get(`/metadata/ipme`);
26
- if (data) return data;
27
- throw new Error(`ip metadata not found`);
28
57
  }
29
- export const getNotificationsMetadata = async () => getMetadata({
30
- entityName: 'notifications'
31
- });
32
- export const getSamlMetadata = async () => getMetadata({
33
- entityName: 'saml'
34
- });
35
- export const getAuditsMetadata = async () => getMetadata({
36
- entityName: 'audits'
37
- });
38
- export const getIpAdressMetadata = async ip => getIpMetadata(ip);
58
+ export default new MetadataApi('default');
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BaseApiClient = void 0;
7
+
8
+ var _FetchClient = require("./FetchClient");
9
+
10
+ class BaseApiClient {
11
+ constructor(appName) {
12
+ this.appName = void 0;
13
+ this.fetchClient = void 0;
14
+
15
+ this.get = async (url, params, opts) => {
16
+ return this.fetchClient.get(url, params, opts);
17
+ };
18
+
19
+ this.post = async (url, body, opts) => {
20
+ return this.fetchClient.post(url, body, opts);
21
+ };
22
+
23
+ this.patch = async (url, body, opts) => {
24
+ return this.fetchClient.patch(url, body, opts);
25
+ };
26
+
27
+ this.put = async (url, body, opts) => {
28
+ return this.fetchClient.put(url, body, opts);
29
+ };
30
+
31
+ this.delete = async (url, body, opts) => {
32
+ return this.fetchClient.delete(url, body, opts);
33
+ };
34
+
35
+ this.postDownload = async (url, body, params, opts) => {
36
+ return this.fetchClient.postDownload(url, body, params, opts);
37
+ };
38
+
39
+ this.extractHeadersFromOptions = (options = {}) => {
40
+ return this.fetchClient.extractHeadersFromOptions(options);
41
+ };
42
+
43
+ this.appName = appName;
44
+ this.fetchClient = new _FetchClient.FetchClient(appName);
45
+ }
46
+
47
+ }
48
+
49
+ exports.BaseApiClient = BaseApiClient;