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

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/ContextHolder/index.d.ts +30 -108
  2. package/ContextHolder/index.js +57 -153
  3. package/account-settings/index.d.ts +7 -19
  4. package/account-settings/index.js +13 -23
  5. package/applications/index.d.ts +44 -49
  6. package/applications/index.js +37 -51
  7. package/audits/index.d.ts +15 -27
  8. package/audits/index.js +17 -27
  9. package/auth/index.d.ts +768 -817
  10. package/auth/index.js +721 -902
  11. package/auth/secutiry-poilicy/index.d.ts +102 -58
  12. package/auth/secutiry-poilicy/index.js +90 -122
  13. package/auth/utils.d.ts +2 -2
  14. package/auth/utils.js +8 -9
  15. package/connectivity/index.d.ts +27 -126
  16. package/connectivity/index.js +114 -147
  17. package/directory/index.d.ts +22 -31
  18. package/directory/index.js +15 -27
  19. package/entitlements/index.d.ts +8 -14
  20. package/entitlements/index.js +4 -12
  21. package/feature-flags/index.d.ts +2 -8
  22. package/feature-flags/index.js +8 -16
  23. package/fetch.d.ts +24 -0
  24. package/fetch.js +265 -0
  25. package/groups/index.d.ts +49 -73
  26. package/groups/index.js +45 -64
  27. package/impersonate/index.d.ts +6 -15
  28. package/impersonate/index.js +5 -13
  29. package/index.d.ts +108 -154
  30. package/index.js +78 -109
  31. package/interfaces.d.ts +0 -10
  32. package/metadata/index.d.ts +7 -67
  33. package/metadata/index.js +32 -52
  34. package/node/ContextHolder/index.js +57 -153
  35. package/node/account-settings/index.js +16 -27
  36. package/node/applications/index.js +44 -51
  37. package/node/audits/index.js +20 -31
  38. package/node/auth/index.js +1035 -768
  39. package/node/auth/secutiry-poilicy/index.js +136 -125
  40. package/node/auth/utils.js +7 -9
  41. package/node/connectivity/index.js +187 -148
  42. package/node/directory/index.js +20 -29
  43. package/node/entitlements/index.js +5 -18
  44. package/node/feature-flags/index.js +9 -21
  45. package/node/fetch.js +306 -0
  46. package/node/groups/index.js +63 -65
  47. package/node/impersonate/index.js +5 -18
  48. package/node/index.js +71 -116
  49. package/node/metadata/index.js +52 -61
  50. package/node/notifications/index.js +27 -37
  51. package/node/reports/index.js +70 -78
  52. package/node/roles/index.js +51 -56
  53. package/node/security-center/index.js +9 -21
  54. package/node/sub-tenants/index.js +89 -90
  55. package/node/subscriptions/index.js +107 -69
  56. package/node/subscriptions/invoices.js +17 -25
  57. package/node/subscriptions/managedSubscriptions.js +27 -32
  58. package/node/subscriptions/paymentMethods.js +20 -27
  59. package/node/subscriptions/paymentProviders.js +6 -15
  60. package/node/subscriptions/plans.js +9 -17
  61. package/node/subscriptions/providers/index.js +18 -0
  62. package/node/subscriptions/providers/stripe/index.js +21 -26
  63. package/node/subscriptions/subscriptions.js +27 -32
  64. package/node/subscriptions/summaries.js +6 -15
  65. package/node/subscriptions/tenantConfiguration.js +9 -17
  66. package/node/subscriptions/vendorPublicConfigurations.js +6 -15
  67. package/node/teams/index.js +138 -130
  68. package/node/tenants/index.js +60 -65
  69. package/node/user-phone-numbers/index.js +24 -32
  70. package/node/users/index.js +53 -58
  71. package/node/vendor/index.js +6 -17
  72. package/notifications/index.d.ts +16 -22
  73. package/notifications/index.js +22 -33
  74. package/package.json +1 -1
  75. package/reports/index.d.ts +44 -50
  76. package/reports/index.js +62 -75
  77. package/roles/index.d.ts +38 -44
  78. package/roles/index.js +41 -57
  79. package/security-center/index.d.ts +2 -14
  80. package/security-center/index.js +6 -15
  81. package/sub-tenants/index.d.ts +15 -57
  82. package/sub-tenants/index.js +68 -88
  83. package/subscriptions/index.d.ts +11 -56
  84. package/subscriptions/index.js +11 -58
  85. package/subscriptions/invoices.d.ts +13 -16
  86. package/subscriptions/invoices.js +14 -24
  87. package/subscriptions/managedSubscriptions.d.ts +15 -18
  88. package/subscriptions/managedSubscriptions.js +22 -33
  89. package/subscriptions/paymentMethods.d.ts +13 -16
  90. package/subscriptions/paymentMethods.js +17 -26
  91. package/subscriptions/paymentProviders.d.ts +5 -8
  92. package/subscriptions/paymentProviders.js +4 -11
  93. package/subscriptions/plans.d.ts +8 -11
  94. package/subscriptions/plans.js +6 -14
  95. package/subscriptions/providers/index.d.ts +1 -0
  96. package/subscriptions/providers/index.js +1 -0
  97. package/subscriptions/providers/stripe/index.d.ts +21 -24
  98. package/subscriptions/providers/stripe/index.js +16 -27
  99. package/subscriptions/subscriptions.d.ts +21 -24
  100. package/subscriptions/subscriptions.js +22 -33
  101. package/subscriptions/summaries.d.ts +4 -7
  102. package/subscriptions/summaries.js +3 -10
  103. package/subscriptions/tenantConfiguration.d.ts +3 -6
  104. package/subscriptions/tenantConfiguration.js +7 -15
  105. package/subscriptions/vendorPublicConfigurations.d.ts +2 -5
  106. package/subscriptions/vendorPublicConfigurations.js +4 -11
  107. package/teams/index.d.ts +131 -35
  108. package/teams/index.js +93 -122
  109. package/tenants/index.d.ts +37 -25
  110. package/tenants/index.js +46 -62
  111. package/user-phone-numbers/index.d.ts +26 -32
  112. package/user-phone-numbers/index.js +19 -32
  113. package/users/index.d.ts +15 -21
  114. package/users/index.js +44 -60
  115. package/vendor/index.d.ts +6 -12
  116. package/vendor/index.js +4 -11
  117. package/BaseApiClient.d.ts +0 -16
  118. package/BaseApiClient.js +0 -39
  119. package/FetchClient.d.ts +0 -42
  120. package/FetchClient.js +0 -308
  121. package/node/BaseApiClient.js +0 -49
  122. package/node/FetchClient.js +0 -326
@@ -1,12 +1,5 @@
1
- import { urls } from '../constants';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export class PaymentProvidersApi extends BaseApiClient {
4
- constructor(...args) {
5
- super(...args);
6
-
7
- this.getPaymentProviders = async () => {
8
- return this.get(urls.subscriptions.paymentProviders.v1);
9
- };
10
- }
11
-
1
+ import { Get } from "../fetch";
2
+ import { urls } from "../constants";
3
+ export async function getPaymentProviders() {
4
+ return Get(urls.subscriptions.paymentProviders.v1);
12
5
  }
@@ -1,12 +1,9 @@
1
1
  import { IPlanResponse } from './interfaces';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export declare class PlansApi extends BaseApiClient {
4
- /**
5
- * Gets subscription plans
6
- */
7
- getSubscriptionPlans: () => Promise<IPlanResponse[]>;
8
- /**
9
- * Gets subscription plan singular
10
- */
11
- getSubscriptionPlan: (planId: string) => Promise<IPlanResponse[]>;
12
- }
2
+ /**
3
+ * Gets subscription plans
4
+ */
5
+ export declare function getSubscriptionPlans(): Promise<IPlanResponse[]>;
6
+ /**
7
+ * Gets subscription plan singular
8
+ */
9
+ export declare function getSubscriptionPlan(planId: string): Promise<IPlanResponse[]>;
@@ -1,16 +1,8 @@
1
+ import { Get } from '../fetch';
1
2
  import { urls } from '../constants';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export class PlansApi extends BaseApiClient {
4
- constructor(...args) {
5
- super(...args);
6
-
7
- this.getSubscriptionPlans = async () => {
8
- return this.get(urls.subscriptions.billing.plans.v1);
9
- };
10
-
11
- this.getSubscriptionPlan = async planId => {
12
- return this.get(`${urls.subscriptions.billing.plans.v1}/${planId}`);
13
- };
14
- }
15
-
3
+ export async function getSubscriptionPlans() {
4
+ return Get(urls.subscriptions.billing.plans.v1);
5
+ }
6
+ export async function getSubscriptionPlan(planId) {
7
+ return Get(`${urls.subscriptions.billing.plans.v1}/${planId}`);
16
8
  }
@@ -0,0 +1 @@
1
+ export * from './stripe';
@@ -0,0 +1 @@
1
+ export * from './stripe';
@@ -1,24 +1,21 @@
1
- import { ICreateStripeCustomerRequest, ICreateStripeCustomerResponse, ICreateStripeSubscriptionRequest, ICreateSubscriptionResponse, IStripeCustomerResponse, IStripePaymentProviderConfigurationResponse, ICreateStripePaymentMethodSetupRequest, ICreateStripePaymentMethodSetupResponse } from './interfaces';
2
- import { BaseApiClient } from '../../../BaseApiClient';
3
- export declare class StripeProviderApi extends BaseApiClient {
4
- /**
5
- * Creates new stripe subscription
6
- * @param request
7
- */
8
- createSubscription: (request: ICreateStripeSubscriptionRequest) => Promise<ICreateSubscriptionResponse>;
9
- /**
10
- * Fetch tenant mapping external stripe customer object
11
- */
12
- getStripeCustomer: (tenantId: string) => Promise<IStripeCustomerResponse>;
13
- /**
14
- * Create tenant mapping external stripe customer object
15
- * @param request
16
- */
17
- createStripeCustomer: (request: ICreateStripeCustomerRequest) => Promise<ICreateStripeCustomerResponse>;
18
- getStripePaymentProviderConfiguration: () => Promise<IStripePaymentProviderConfigurationResponse>;
19
- /**
20
- * Create payment method intent secret
21
- * @param request
22
- */
23
- createStripePaymentMethodSetupIntentSecret: (request: ICreateStripePaymentMethodSetupRequest) => Promise<ICreateStripePaymentMethodSetupResponse>;
24
- }
1
+ import { ICreateStripeCustomerRequest, ICreateStripeCustomerResponse, ICreateStripeSubscriptionRequest, ICreateSubscriptionResponse, IStripeCustomerResponse, IStripePaymentProviderConfigurationResponse, ICreateStripePaymentMethodSetupRequest, ICreateStripePaymentMethodSetupResponse } from "./interfaces";
2
+ /**
3
+ * Creates new stripe subscription
4
+ * @param request
5
+ */
6
+ export declare function createSubscription(request: ICreateStripeSubscriptionRequest): Promise<ICreateSubscriptionResponse>;
7
+ /**
8
+ * Fetch tenant mapping external stripe customer object
9
+ */
10
+ export declare function getStripeCustomer(tenantId: string): Promise<IStripeCustomerResponse>;
11
+ /**
12
+ * Create tenant mapping external stripe customer object
13
+ * @param request
14
+ */
15
+ export declare function createStripeCustomer(request: ICreateStripeCustomerRequest): Promise<ICreateStripeCustomerResponse>;
16
+ export declare function getStripePaymentProviderConfiguration(): Promise<IStripePaymentProviderConfigurationResponse>;
17
+ /**
18
+ * Create payment method intent secret
19
+ * @param request
20
+ */
21
+ export declare function createStripePaymentMethodSetupIntentSecret(request: ICreateStripePaymentMethodSetupRequest): Promise<ICreateStripePaymentMethodSetupResponse>;
@@ -1,28 +1,17 @@
1
- import { urls } from '../../../constants';
2
- import { BaseApiClient } from '../../../BaseApiClient';
3
- export class StripeProviderApi extends BaseApiClient {
4
- constructor(...args) {
5
- super(...args);
6
-
7
- this.createSubscription = async request => {
8
- return this.post(urls.subscriptions.billing.paymentProviders.stripe.subscriptions.v1, request);
9
- };
10
-
11
- this.getStripeCustomer = async tenantId => {
12
- return this.get(`${urls.subscriptions.billing.paymentProviders.stripe.customers.v1}/${tenantId}`);
13
- };
14
-
15
- this.createStripeCustomer = async request => {
16
- return this.post(urls.subscriptions.billing.paymentProviders.stripe.customers.v1, request);
17
- };
18
-
19
- this.getStripePaymentProviderConfiguration = async () => {
20
- return this.get(urls.subscriptions.billing.paymentProviders.stripe.publicConfigurations.v1);
21
- };
22
-
23
- this.createStripePaymentMethodSetupIntentSecret = async request => {
24
- return this.post(urls.subscriptions.billing.paymentProviders.stripe.setupIntents.v1, request);
25
- };
26
- }
27
-
1
+ import { Get, Post } from "../../../fetch";
2
+ import { urls } from "../../../constants";
3
+ export async function createSubscription(request) {
4
+ return Post(urls.subscriptions.billing.paymentProviders.stripe.subscriptions.v1, request);
5
+ }
6
+ export async function getStripeCustomer(tenantId) {
7
+ return Get(`${urls.subscriptions.billing.paymentProviders.stripe.customers.v1}/${tenantId}`);
8
+ }
9
+ export async function createStripeCustomer(request) {
10
+ return Post(`${urls.subscriptions.billing.paymentProviders.stripe.customers.v1}`, request);
11
+ }
12
+ export async function getStripePaymentProviderConfiguration() {
13
+ return Get(`${urls.subscriptions.billing.paymentProviders.stripe.publicConfigurations.v1}`);
14
+ }
15
+ export async function createStripePaymentMethodSetupIntentSecret(request) {
16
+ return Post(`${urls.subscriptions.billing.paymentProviders.stripe.setupIntents.v1}`, request);
28
17
  }
@@ -1,24 +1,21 @@
1
- import { ISubscriptionResponse, IUpdateSubscriptionRequest } from './interfaces';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export declare class SubscriptionApi extends BaseApiClient {
4
- /**
5
- * Get tenant subscriptions
6
- */
7
- getSubscriptions: () => Promise<ISubscriptionResponse[]>;
8
- /**
9
- * Get tenant subscription
10
- */
11
- getSubscription: (subscriptionId: string) => Promise<ISubscriptionResponse>;
12
- /**
13
- * Cancel tenant subscription
14
- */
15
- cancelSubscription: (subscriptionId: string) => Promise<void>;
16
- /**
17
- * Renew tenant subscription
18
- */
19
- renewSubscription: (subscriptionId: string) => Promise<void>;
20
- /**
21
- * Upgrade/Downgrade tenant subscription plan
22
- */
23
- updateSubscription: (subscriptionId: string, { paymentMethodId, planId }: IUpdateSubscriptionRequest) => Promise<void>;
24
- }
1
+ import { ISubscriptionResponse, IUpdateSubscriptionRequest } from "./interfaces";
2
+ /**
3
+ * Get tenant subscriptions
4
+ */
5
+ export declare function getSubscriptions(): Promise<ISubscriptionResponse[]>;
6
+ /**
7
+ * Get tenant subscription
8
+ */
9
+ export declare function getSubscription(subscriptionId: string): Promise<ISubscriptionResponse>;
10
+ /**
11
+ * Cancel tenant subscription
12
+ */
13
+ export declare function cancelSubscription(subscriptionId: string): Promise<void>;
14
+ /**
15
+ * Renew tenant subscription
16
+ */
17
+ export declare function renewSubscription(subscriptionId: string): Promise<void>;
18
+ /**
19
+ * Upgrade/Downgrade tenant subscription plan
20
+ */
21
+ export declare function updateSubscription(subscriptionId: string, { paymentMethodId, planId }: IUpdateSubscriptionRequest): Promise<void>;
@@ -1,34 +1,23 @@
1
- import { urls } from '../constants';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export class SubscriptionApi extends BaseApiClient {
4
- constructor(...args) {
5
- super(...args);
6
-
7
- this.getSubscriptions = async () => {
8
- return this.get(urls.subscriptions.billing.subscriptions.v1);
9
- };
10
-
11
- this.getSubscription = async subscriptionId => {
12
- return this.get(`${urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}`);
13
- };
14
-
15
- this.cancelSubscription = async subscriptionId => {
16
- return this.put(`${urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}/cancellations/`, {});
17
- };
18
-
19
- this.renewSubscription = async subscriptionId => {
20
- return this.put(`${urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}/renewals/`, {});
21
- };
22
-
23
- this.updateSubscription = async (subscriptionId, {
24
- paymentMethodId,
25
- planId
26
- }) => {
27
- return this.put(`${urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}`, {
28
- paymentMethodId,
29
- planId
30
- });
31
- };
32
- }
33
-
1
+ import { Get, Put } from "../fetch";
2
+ import { urls } from "../constants";
3
+ export async function getSubscriptions() {
4
+ return Get(urls.subscriptions.billing.subscriptions.v1);
5
+ }
6
+ export async function getSubscription(subscriptionId) {
7
+ return Get(`${urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}`);
8
+ }
9
+ export async function cancelSubscription(subscriptionId) {
10
+ return Put(`${urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}/cancellations/`, {});
11
+ }
12
+ export async function renewSubscription(subscriptionId) {
13
+ return Put(`${urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}/renewals/`, {});
14
+ }
15
+ export async function updateSubscription(subscriptionId, {
16
+ paymentMethodId,
17
+ planId
18
+ }) {
19
+ return Put(`${urls.subscriptions.billing.subscriptions.v1}/${subscriptionId}`, {
20
+ paymentMethodId,
21
+ planId
22
+ });
34
23
  }
@@ -1,8 +1,5 @@
1
1
  import { ISubscriptionSummariesResponse } from './interfaces';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export declare class SummariesApi extends BaseApiClient {
4
- /**
5
- * Gets subscription summaries
6
- */
7
- getSubscriptionSummaries: (tenantId: string) => Promise<ISubscriptionSummariesResponse>;
8
- }
2
+ /**
3
+ * Gets subscription summaries
4
+ */
5
+ export declare function getSubscriptionSummaries(tenantId: string): Promise<ISubscriptionSummariesResponse>;
@@ -1,12 +1,5 @@
1
+ import { Get } from '../fetch';
1
2
  import { urls } from '../constants';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export class SummariesApi extends BaseApiClient {
4
- constructor(...args) {
5
- super(...args);
6
-
7
- this.getSubscriptionSummaries = async tenantId => {
8
- return this.get(`${urls.subscriptions.billing.summaries.v1}/${tenantId}`);
9
- };
10
- }
11
-
3
+ export async function getSubscriptionSummaries(tenantId) {
4
+ return Get(`${urls.subscriptions.billing.summaries.v1}/${tenantId}`);
12
5
  }
@@ -1,6 +1,3 @@
1
- import { ICreateTenantConfigurationRequest, ICreateTenantConfigurationResponse, ITenantConfigurationResponse } from './interfaces';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export declare class SubscriptionTenantConfigApi extends BaseApiClient {
4
- getTenantConfiguration: (tenantId: string) => Promise<ITenantConfigurationResponse>;
5
- createTenantConfiguration: (request: ICreateTenantConfigurationRequest) => Promise<ICreateTenantConfigurationResponse>;
6
- }
1
+ import { ICreateTenantConfigurationRequest, ICreateTenantConfigurationResponse, ITenantConfigurationResponse } from "./interfaces";
2
+ export declare function getTenantConfiguration(tenantId: string): Promise<ITenantConfigurationResponse>;
3
+ export declare function createTenantConfiguration(request: ICreateTenantConfigurationRequest): Promise<ICreateTenantConfigurationResponse>;
@@ -1,16 +1,8 @@
1
- import { urls } from '../constants';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export class SubscriptionTenantConfigApi extends BaseApiClient {
4
- constructor(...args) {
5
- super(...args);
6
-
7
- this.getTenantConfiguration = async tenantId => {
8
- return this.get(`${urls.subscriptions.billing.tenantConfiguration.v1}/${tenantId}`);
9
- };
10
-
11
- this.createTenantConfiguration = async request => {
12
- return this.post(urls.subscriptions.billing.tenantConfiguration.v1, request);
13
- };
14
- }
15
-
1
+ import { Get, Post } from "../fetch";
2
+ import { urls } from "../constants";
3
+ export async function getTenantConfiguration(tenantId) {
4
+ return Get(`${urls.subscriptions.billing.tenantConfiguration.v1}/${tenantId}`);
5
+ }
6
+ export async function createTenantConfiguration(request) {
7
+ return Post(`${urls.subscriptions.billing.tenantConfiguration.v1}`, request);
16
8
  }
@@ -1,5 +1,2 @@
1
- import { IVendorPublicConfigurationResponse } from './interfaces';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export declare class VendorPublicConfigApi extends BaseApiClient {
4
- getVendorPublicConfigurations: () => Promise<IVendorPublicConfigurationResponse[]>;
5
- }
1
+ import { IVendorPublicConfigurationResponse } from "./interfaces";
2
+ export declare function getVendorPublicConfigurations(): Promise<IVendorPublicConfigurationResponse[]>;
@@ -1,12 +1,5 @@
1
- import { urls } from '../constants';
2
- import { BaseApiClient } from '../BaseApiClient';
3
- export class VendorPublicConfigApi extends BaseApiClient {
4
- constructor(...args) {
5
- super(...args);
6
-
7
- this.getVendorPublicConfigurations = async () => {
8
- return this.get(urls.subscriptions.billing.configurations.vendorPublicConfigurations.v1);
9
- };
10
- }
11
-
1
+ import { Get } from "../fetch";
2
+ import { urls } from "../constants";
3
+ export async function getVendorPublicConfigurations() {
4
+ return Get(`${urls.subscriptions.billing.configurations.vendorPublicConfigurations.v1}`);
12
5
  }
package/teams/index.d.ts CHANGED
@@ -1,37 +1,133 @@
1
1
  import { IAddUser, IChangePassword, ILoadUsers, IResendActivationLink, ITeamUserRole, ITeamStats, ITeamUser, IUpdateProfile, IUpdateUser, IDeleteUser, ITeamUserPermission, IResendInvitationLink, IInviteUserLinkResponse, ICreateOrUpdateInviteUserLink, IInviteLinkConfiguration, IUpdateUserExpiration, ITemporaryUserConfiguration } from './interfaces';
2
2
  import { PaginationResult } from '../interfaces';
3
- import { IUserProfile } from '../users/interfaces';
4
- import { BaseApiClient } from '../BaseApiClient';
5
- export declare class TeamsApi extends BaseApiClient {
6
- constructor(appName: string);
7
- getProfile: (params?: object | undefined) => Promise<IUserProfile>;
8
- updateProfile: (body: Partial<IUpdateProfile>) => Promise<IUserProfile>;
9
- updateProfileImage: (body: FormData) => Promise<string>;
10
- /**
11
- * change user password by providing current password and the new password.
12
- *
13
- * @throws exception if the current password incorrect or new password validation failed.
14
- * ``authorized user``
15
- */
16
- changePassword: (body: IChangePassword) => Promise<void>;
17
- loadUsers: (params: ILoadUsers) => Promise<PaginationResult<ITeamUser>>;
18
- addUser: (body: IAddUser) => Promise<ITeamUser>;
19
- deleteUser: (body: IDeleteUser) => Promise<ITeamUser>;
20
- updateUser: (body: IUpdateUser) => Promise<ITeamUser>;
21
- updateUserExpirationTime: (body: IUpdateUserExpiration) => Promise<void>;
22
- setPermanentUser: (userId: string) => Promise<void>;
23
- getTemporaryUserConfiguration: () => Promise<ITemporaryUserConfiguration>;
24
- createInviteUserLink: (body: ICreateOrUpdateInviteUserLink) => Promise<IInviteUserLinkResponse>;
25
- updateInviteUserLink: (body: ICreateOrUpdateInviteUserLink) => Promise<IInviteUserLinkResponse>;
26
- deleteInviteUserLink: () => Promise<void>;
27
- getInviteUserLink: () => Promise<IInviteUserLinkResponse>;
28
- getInviteLinkConfiguration: () => Promise<IInviteLinkConfiguration>;
29
- loadAvailableRoles: () => Promise<ITeamUserRole[]>;
30
- loadAvailablePermissions: () => Promise<ITeamUserPermission[]>;
31
- loadStats: () => Promise<ITeamStats>;
32
- resendActivationLink: (body: IResendActivationLink) => Promise<void>;
33
- resendInvitationLink: (body: IResendInvitationLink) => Promise<void>;
34
- resendInvitationLinkToAllTenants: (body: IResendInvitationLink) => Promise<void>;
35
- }
36
- declare const _default: TeamsApi;
37
- export default _default;
3
+ import { IUserProfile } from "../users/interfaces";
4
+ /****************************************s*
5
+ * Profile Api
6
+ *****************************************/
7
+ /**
8
+ * change user password by providing current password and the new password.
9
+ *
10
+ * @throws exception if the current password incorrect or new password validation failed.
11
+ * ``authorized user``
12
+ */
13
+ export declare function getProfile(params?: object): Promise<IUserProfile>;
14
+ /**
15
+ * update user profile by providing updated fields.
16
+ * ``authorized user``
17
+ * @deprecated
18
+ * use updateUserProfileV2 from users
19
+ */
20
+ export declare function updateProfile(body: Partial<IUpdateProfile>): Promise<IUserProfile>;
21
+ /**
22
+ * update user profile image
23
+ * ``authorized user``
24
+ */
25
+ export declare function updateProfileImage(body: FormData): Promise<string>;
26
+ /**
27
+ * change user password by providing current password and the new password.
28
+ *
29
+ * @throws exception if the current password incorrect or new password validation failed.
30
+ * ``authorized user``
31
+ */
32
+ export declare function changePassword(body: IChangePassword): Promise<void>;
33
+ /*****************************************
34
+ * Team Api
35
+ *****************************************/
36
+ /**
37
+ * load users from team-management-service
38
+ *
39
+ * ``authorized user``
40
+ */
41
+ export declare function loadUsers(params: ILoadUsers): Promise<PaginationResult<ITeamUser>>;
42
+ /**
43
+ * add user to team, invitation link will be sent to the added user.
44
+ *
45
+ * ``authorized user``
46
+ */
47
+ export declare function addUser(body: IAddUser): Promise<ITeamUser>;
48
+ /**
49
+ * delete user from team, user will be deleted.
50
+ *
51
+ * ``authorized user``
52
+ */
53
+ export declare function deleteUser(body: IDeleteUser): Promise<ITeamUser>;
54
+ /**
55
+ * edit user roles in team
56
+ *
57
+ * ``authorized user``
58
+ */
59
+ export declare function updateUser(body: IUpdateUser): Promise<ITeamUser>;
60
+ /**
61
+ * update user expiration time
62
+ *
63
+ * ``authorized user``
64
+ */
65
+ export declare function updateUserExpirationTime(body: IUpdateUserExpiration): Promise<void>;
66
+ /**
67
+ * set user as permanent
68
+ */
69
+ export declare function setPermanentUser(userId: string): Promise<void>;
70
+ /**
71
+ * get temporary user configuration
72
+ */
73
+ export declare function getTemporaryUserConfiguration(): Promise<ITemporaryUserConfiguration>;
74
+ /**
75
+ * create link to invite user
76
+ *
77
+ * ``authorized user``
78
+ */
79
+ export declare function createInviteUserLink(body: ICreateOrUpdateInviteUserLink): Promise<IInviteUserLinkResponse>;
80
+ /**
81
+ * update link to invite user
82
+ *
83
+ * ``authorized user``
84
+ */
85
+ export declare function updateInviteUserLink(body: ICreateOrUpdateInviteUserLink): Promise<IInviteUserLinkResponse>;
86
+ /**
87
+ * delete link to invite user
88
+ *
89
+ * ``authorized user``
90
+ */
91
+ export declare function deleteInviteUserLink(): Promise<void>;
92
+ /**
93
+ * get link to invite user
94
+ *
95
+ * ``authorized user``
96
+ */
97
+ export declare function getInviteUserLink(): Promise<IInviteUserLinkResponse>;
98
+ /**
99
+ * get invite link configuration
100
+ *
101
+ */
102
+ export declare function getInviteLinkConfiguration(): Promise<IInviteLinkConfiguration>;
103
+ /**
104
+ * load available roles that can be assigned to team users from team-management-service
105
+ *
106
+ * ``authorized user``
107
+ */
108
+ export declare function loadAvailableRoles(): Promise<ITeamUserRole[]>;
109
+ export declare function loadAvailablePermissions(): Promise<ITeamUserPermission[]>;
110
+ /**
111
+ * load users stats from team-management-service
112
+ *
113
+ * ``authorized user``
114
+ */
115
+ export declare function loadStats(): Promise<ITeamStats>;
116
+ /**
117
+ * resend activation link to specific user
118
+ *
119
+ * ``authorized user``
120
+ */
121
+ export declare function resendActivationLink(body: IResendActivationLink): Promise<void>;
122
+ /**
123
+ * resend accept join tenant invitation link to specific user
124
+ *
125
+ * ``authorized user``
126
+ */
127
+ export declare function resendInvitationLink(body: IResendInvitationLink): Promise<void>;
128
+ /**
129
+ * resend accept join all pending tenant for current hierarchy invitation link to specific user
130
+ *
131
+ * ``authorized user``
132
+ */
133
+ export declare function resendInvitationLinkToAllTenants(body: IResendInvitationLink): Promise<void>;