@abyss-project/main 2.1.0 → 2.3.0

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 (202) hide show
  1. package/dist/api/billing-account.admin.api.d.ts +11 -3
  2. package/dist/api/billing-account.admin.api.js +21 -5
  3. package/dist/api/billing-account.admin.api.js.map +1 -1
  4. package/dist/api/organization-billing.api.d.ts +11 -0
  5. package/dist/api/organization-billing.api.js +17 -1
  6. package/dist/api/organization-billing.api.js.map +1 -1
  7. package/dist/api/organization-external-identity.api.d.ts +7 -0
  8. package/dist/api/organization-external-identity.api.js +25 -0
  9. package/dist/api/organization-external-identity.api.js.map +1 -0
  10. package/dist/api/organization-member.admin.api.d.ts +2 -1
  11. package/dist/api/organization-member.admin.api.js +5 -1
  12. package/dist/api/organization-member.admin.api.js.map +1 -1
  13. package/dist/api/user-billing.api.d.ts +9 -0
  14. package/dist/api/user-billing.api.js +17 -1
  15. package/dist/api/user-billing.api.js.map +1 -1
  16. package/dist/constants/catalog-plan-quotas.constants.d.ts +2 -0
  17. package/dist/constants/catalog-plan-quotas.constants.js +70 -1
  18. package/dist/constants/catalog-plan-quotas.constants.js.map +1 -1
  19. package/dist/constants/index.d.ts +1 -0
  20. package/dist/constants/index.js +1 -0
  21. package/dist/constants/index.js.map +1 -1
  22. package/dist/constants/metric-price-scale.constants.d.ts +1 -0
  23. package/dist/constants/metric-price-scale.constants.js +12 -1
  24. package/dist/constants/metric-price-scale.constants.js.map +1 -1
  25. package/dist/constants/module-catalog.constants.d.ts +65 -0
  26. package/dist/constants/module-catalog.constants.js +336 -0
  27. package/dist/constants/module-catalog.constants.js.map +1 -0
  28. package/dist/constants/quota-metric-kind.constants.d.ts +2 -0
  29. package/dist/constants/quota-metric-kind.constants.js +12 -1
  30. package/dist/constants/quota-metric-kind.constants.js.map +1 -1
  31. package/dist/constants/tests/billing-catalog.constants.spec.d.ts +1 -0
  32. package/dist/constants/tests/billing-catalog.constants.spec.js +334 -0
  33. package/dist/constants/tests/billing-catalog.constants.spec.js.map +1 -0
  34. package/dist/constants/tests/catalog-plan-quotas.coherence.spec.d.ts +1 -0
  35. package/dist/constants/tests/catalog-plan-quotas.coherence.spec.js +101 -0
  36. package/dist/constants/tests/catalog-plan-quotas.coherence.spec.js.map +1 -0
  37. package/dist/constants/tests/metric-price-scale.constants.spec.d.ts +1 -0
  38. package/dist/constants/tests/metric-price-scale.constants.spec.js +83 -0
  39. package/dist/constants/tests/metric-price-scale.constants.spec.js.map +1 -0
  40. package/dist/constants/tests/module-calibration.constants.spec.d.ts +1 -0
  41. package/dist/constants/tests/module-calibration.constants.spec.js +75 -0
  42. package/dist/constants/tests/module-calibration.constants.spec.js.map +1 -0
  43. package/dist/constants/tests/module-catalog.constants.spec.d.ts +1 -0
  44. package/dist/constants/tests/module-catalog.constants.spec.js +196 -0
  45. package/dist/constants/tests/module-catalog.constants.spec.js.map +1 -0
  46. package/dist/constants/tests/overage-pricing-single-source.spec.d.ts +1 -0
  47. package/dist/constants/tests/overage-pricing-single-source.spec.js +23 -0
  48. package/dist/constants/tests/overage-pricing-single-source.spec.js.map +1 -0
  49. package/dist/constants/tests/password-policy.constants.spec.d.ts +1 -0
  50. package/dist/constants/tests/password-policy.constants.spec.js +67 -0
  51. package/dist/constants/tests/password-policy.constants.spec.js.map +1 -0
  52. package/dist/index.d.ts +22 -0
  53. package/dist/index.js +22 -0
  54. package/dist/index.js.map +1 -1
  55. package/dist/server/tests/after-commit-emit.util.spec.d.ts +1 -0
  56. package/dist/server/tests/after-commit-emit.util.spec.js +99 -0
  57. package/dist/server/tests/after-commit-emit.util.spec.js.map +1 -0
  58. package/dist/server/tests/encrypt-secret.util.spec.d.ts +6 -0
  59. package/dist/server/tests/encrypt-secret.util.spec.js +148 -0
  60. package/dist/server/tests/encrypt-secret.util.spec.js.map +1 -0
  61. package/dist/types/enum/abyss-application-event.enum.d.ts +5 -1
  62. package/dist/types/enum/abyss-application-event.enum.js +5 -1
  63. package/dist/types/enum/abyss-application-event.enum.js.map +1 -1
  64. package/dist/types/enum/external-delivery.enum.d.ts +6 -0
  65. package/dist/types/enum/external-delivery.enum.js +11 -0
  66. package/dist/types/enum/external-delivery.enum.js.map +1 -0
  67. package/dist/types/enum/index.d.ts +2 -0
  68. package/dist/types/enum/index.js +2 -0
  69. package/dist/types/enum/index.js.map +1 -1
  70. package/dist/types/enum/organization-billing.enum.d.ts +15 -2
  71. package/dist/types/enum/organization-billing.enum.js +29 -2
  72. package/dist/types/enum/organization-billing.enum.js.map +1 -1
  73. package/dist/types/enum/organization-external-identity.enum.d.ts +17 -0
  74. package/dist/types/enum/organization-external-identity.enum.js +24 -0
  75. package/dist/types/enum/organization-external-identity.enum.js.map +1 -0
  76. package/dist/types/enum/slack-webhook.enum.d.ts +3 -1
  77. package/dist/types/enum/slack-webhook.enum.js +2 -0
  78. package/dist/types/enum/slack-webhook.enum.js.map +1 -1
  79. package/dist/types/enum/tests/billing-addon-status.enum.spec.d.ts +1 -0
  80. package/dist/types/enum/tests/billing-addon-status.enum.spec.js +66 -0
  81. package/dist/types/enum/tests/billing-addon-status.enum.spec.js.map +1 -0
  82. package/dist/types/enum/tests/report-notification-type.enum.spec.d.ts +1 -0
  83. package/dist/types/enum/tests/report-notification-type.enum.spec.js +18 -0
  84. package/dist/types/enum/tests/report-notification-type.enum.spec.js.map +1 -0
  85. package/dist/types/enum/tests/user-notification-content-type.enum.spec.d.ts +1 -0
  86. package/dist/types/enum/tests/user-notification-content-type.enum.spec.js +13 -0
  87. package/dist/types/enum/tests/user-notification-content-type.enum.spec.js.map +1 -0
  88. package/dist/types/enum/token-type.enum.d.ts +2 -1
  89. package/dist/types/enum/token-type.enum.js +1 -0
  90. package/dist/types/enum/token-type.enum.js.map +1 -1
  91. package/dist/types/enum/user-notification-category.enum.d.ts +7 -1
  92. package/dist/types/enum/user-notification-category.enum.js +19 -1
  93. package/dist/types/enum/user-notification-category.enum.js.map +1 -1
  94. package/dist/types/enum/user-notification-content-type.enum.d.ts +2 -0
  95. package/dist/types/enum/user-notification-content-type.enum.js.map +1 -1
  96. package/dist/types/interface/api/index.d.ts +9 -0
  97. package/dist/types/interface/api/index.js +9 -0
  98. package/dist/types/interface/api/index.js.map +1 -1
  99. package/dist/types/interface/api/requests/billing-account.admin.request.d.ts +23 -6
  100. package/dist/types/interface/api/requests/billing-module.request.d.ts +25 -0
  101. package/dist/types/interface/api/requests/billing-module.request.js +3 -0
  102. package/dist/types/interface/api/requests/billing-module.request.js.map +1 -0
  103. package/dist/types/interface/api/requests/billing-snapshot-admin.request.d.ts +7 -0
  104. package/dist/types/interface/api/requests/billing-snapshot-admin.request.js +3 -0
  105. package/dist/types/interface/api/requests/billing-snapshot-admin.request.js.map +1 -0
  106. package/dist/types/interface/api/requests/organization-external-identity.request.d.ts +28 -0
  107. package/dist/types/interface/api/requests/organization-external-identity.request.js +3 -0
  108. package/dist/types/interface/api/requests/organization-external-identity.request.js.map +1 -0
  109. package/dist/types/interface/api/requests/organization-integration-webhook.request.d.ts +17 -1
  110. package/dist/types/interface/api/requests/organization-member.request.d.ts +3 -0
  111. package/dist/types/interface/api/requests/quota-offer.request.d.ts +10 -0
  112. package/dist/types/interface/api/requests/quota-offer.request.js +3 -0
  113. package/dist/types/interface/api/requests/quota-offer.request.js.map +1 -0
  114. package/dist/types/interface/api/responses/billing-account.admin.response.d.ts +15 -13
  115. package/dist/types/interface/api/responses/billing-estimate.response.d.ts +18 -0
  116. package/dist/types/interface/api/responses/billing-estimate.response.js +3 -0
  117. package/dist/types/interface/api/responses/billing-estimate.response.js.map +1 -0
  118. package/dist/types/interface/api/responses/billing-module.response.d.ts +21 -0
  119. package/dist/types/interface/api/responses/billing-module.response.js +3 -0
  120. package/dist/types/interface/api/responses/billing-module.response.js.map +1 -0
  121. package/dist/types/interface/api/responses/billing-snapshot-admin.response.d.ts +9 -0
  122. package/dist/types/interface/api/responses/billing-snapshot-admin.response.js +3 -0
  123. package/dist/types/interface/api/responses/billing-snapshot-admin.response.js.map +1 -0
  124. package/dist/types/interface/api/responses/organization-external-identity.response.d.ts +22 -0
  125. package/dist/types/interface/api/responses/organization-external-identity.response.js +3 -0
  126. package/dist/types/interface/api/responses/organization-external-identity.response.js.map +1 -0
  127. package/dist/types/interface/api/responses/organization-member.response.d.ts +8 -0
  128. package/dist/types/interface/api/responses/quota-offer.response.d.ts +27 -0
  129. package/dist/types/interface/api/responses/quota-offer.response.js +3 -0
  130. package/dist/types/interface/api/responses/quota-offer.response.js.map +1 -0
  131. package/dist/types/interface/index.d.ts +3 -0
  132. package/dist/types/interface/index.js +3 -0
  133. package/dist/types/interface/index.js.map +1 -1
  134. package/dist/types/interface/models/billing-account-addon.model.d.ts +16 -0
  135. package/dist/types/interface/models/billing-account-addon.model.js +3 -0
  136. package/dist/types/interface/models/billing-account-addon.model.js.map +1 -0
  137. package/dist/types/interface/models/external-delivery.model.d.ts +22 -0
  138. package/dist/types/interface/models/external-delivery.model.js +3 -0
  139. package/dist/types/interface/models/external-delivery.model.js.map +1 -0
  140. package/dist/types/interface/models/index.d.ts +1 -0
  141. package/dist/types/interface/models/index.js +1 -0
  142. package/dist/types/interface/models/index.js.map +1 -1
  143. package/dist/types/interface/models/organization-external-identity.model.d.ts +20 -0
  144. package/dist/types/interface/models/organization-external-identity.model.js +3 -0
  145. package/dist/types/interface/models/organization-external-identity.model.js.map +1 -0
  146. package/dist/types/interface/models/organization-member.model.d.ts +1 -0
  147. package/dist/types/interface/models/organization-service-quota.model.d.ts +1 -0
  148. package/dist/types/session.d.ts +8 -1
  149. package/dist/utils/billing-deep-link.utils.d.ts +15 -0
  150. package/dist/utils/billing-deep-link.utils.js +23 -0
  151. package/dist/utils/billing-deep-link.utils.js.map +1 -0
  152. package/dist/utils/billing.utils.d.ts +0 -2
  153. package/dist/utils/billing.utils.js +1 -6
  154. package/dist/utils/billing.utils.js.map +1 -1
  155. package/dist/utils/index.d.ts +2 -0
  156. package/dist/utils/index.js +2 -0
  157. package/dist/utils/index.js.map +1 -1
  158. package/dist/utils/plan-capacity.utils.d.ts +21 -0
  159. package/dist/utils/plan-capacity.utils.js +43 -0
  160. package/dist/utils/plan-capacity.utils.js.map +1 -0
  161. package/dist/utils/pricing.utils.d.ts +22 -1
  162. package/dist/utils/pricing.utils.js +125 -4
  163. package/dist/utils/pricing.utils.js.map +1 -1
  164. package/dist/utils/tests/billing-deep-link.utils.spec.d.ts +1 -0
  165. package/dist/utils/tests/billing-deep-link.utils.spec.js +91 -0
  166. package/dist/utils/tests/billing-deep-link.utils.spec.js.map +1 -0
  167. package/dist/utils/tests/billing.utils.spec.d.ts +1 -0
  168. package/dist/utils/tests/billing.utils.spec.js +81 -0
  169. package/dist/utils/tests/billing.utils.spec.js.map +1 -0
  170. package/dist/utils/tests/invoice-amounts.utils.spec.d.ts +1 -0
  171. package/dist/utils/tests/invoice-amounts.utils.spec.js +97 -0
  172. package/dist/utils/tests/invoice-amounts.utils.spec.js.map +1 -0
  173. package/dist/utils/tests/module-lot-price.utils.spec.d.ts +1 -0
  174. package/dist/utils/tests/module-lot-price.utils.spec.js +56 -0
  175. package/dist/utils/tests/module-lot-price.utils.spec.js.map +1 -0
  176. package/dist/utils/tests/module-price.utils.spec.d.ts +1 -0
  177. package/dist/utils/tests/module-price.utils.spec.js +79 -0
  178. package/dist/utils/tests/module-price.utils.spec.js.map +1 -0
  179. package/dist/utils/tests/overage-negotiated-rate.utils.spec.d.ts +1 -0
  180. package/dist/utils/tests/overage-negotiated-rate.utils.spec.js +59 -0
  181. package/dist/utils/tests/overage-negotiated-rate.utils.spec.js.map +1 -0
  182. package/dist/utils/tests/plan-capacity.utils.spec.d.ts +1 -0
  183. package/dist/utils/tests/plan-capacity.utils.spec.js +81 -0
  184. package/dist/utils/tests/plan-capacity.utils.spec.js.map +1 -0
  185. package/dist/utils/tests/pricing.utils.spec.d.ts +1 -0
  186. package/dist/utils/tests/pricing.utils.spec.js +219 -0
  187. package/dist/utils/tests/pricing.utils.spec.js.map +1 -0
  188. package/dist/utils/tests/quota-ceiling.utils.spec.d.ts +1 -0
  189. package/dist/utils/tests/quota-ceiling.utils.spec.js +119 -0
  190. package/dist/utils/tests/quota-ceiling.utils.spec.js.map +1 -0
  191. package/dist/utils/tests/quote-overage-rate.spec.d.ts +1 -0
  192. package/dist/utils/tests/quote-overage-rate.spec.js +39 -0
  193. package/dist/utils/tests/quote-overage-rate.spec.js.map +1 -0
  194. package/dist/utils/tests/resolve-user.utils.spec.d.ts +1 -0
  195. package/dist/utils/tests/resolve-user.utils.spec.js +98 -0
  196. package/dist/utils/tests/resolve-user.utils.spec.js.map +1 -0
  197. package/dist/utils/tests/shifted-tiers.utils.spec.d.ts +1 -0
  198. package/dist/utils/tests/shifted-tiers.utils.spec.js +176 -0
  199. package/dist/utils/tests/shifted-tiers.utils.spec.js.map +1 -0
  200. package/package.json +2 -2
  201. package/tsconfig.build.json +4 -0
  202. package/tsconfig.json +35 -36
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=organization-external-identity.request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-external-identity.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/organization-external-identity.request.ts"],"names":[],"mappings":""}
@@ -14,7 +14,23 @@ export interface ISlackTokensRevokedEvent {
14
14
  bot: string[];
15
15
  };
16
16
  }
17
- export type ISlackWebhookEvent = ISlackAppUninstalledEvent | ISlackTokensRevokedEvent;
17
+ export interface ISlackWebhookUser {
18
+ id: string;
19
+ team_id?: string;
20
+ deleted?: boolean;
21
+ profile?: {
22
+ email?: string;
23
+ };
24
+ }
25
+ export interface ISlackTeamJoinEvent {
26
+ type: SlackWebhookEventType.TEAM_JOIN;
27
+ user: ISlackWebhookUser;
28
+ }
29
+ export interface ISlackUserChangeEvent {
30
+ type: SlackWebhookEventType.USER_CHANGE;
31
+ user: ISlackWebhookUser;
32
+ }
33
+ export type ISlackWebhookEvent = ISlackAppUninstalledEvent | ISlackTokensRevokedEvent | ISlackTeamJoinEvent | ISlackUserChangeEvent;
18
34
  export interface ISlackWebhookEventCallbackBody {
19
35
  type: SlackWebhookType.EVENT_CALLBACK;
20
36
  token: string;
@@ -46,3 +46,6 @@ export interface IListUserIdsByPermissionOrganizationMemberAdminParams {
46
46
  export interface IListUserIdsByPermissionOrganizationMemberAdminBody {
47
47
  permission: OrganizationPermission;
48
48
  }
49
+ export interface IListMembersOrganizationMemberAdminParams {
50
+ organizationId: string;
51
+ }
@@ -0,0 +1,10 @@
1
+ import { BillingMetric, BillingService } from '../../../enum/organization-billing.enum';
2
+ export interface IGetQuotaOfferOrganizationParams {
3
+ organizationId: string;
4
+ service: BillingService;
5
+ metric: BillingMetric;
6
+ }
7
+ export interface IGetQuotaOfferUserParams {
8
+ service: BillingService;
9
+ metric: BillingMetric;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=quota-offer.request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quota-offer.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/quota-offer.request.ts"],"names":[],"mappings":""}
@@ -1,5 +1,7 @@
1
+ import { OverageRateSource } from '../../../../utils/pricing.utils';
1
2
  import { BillingMetric, BillingService, PlanTier, QuotaCeilingMode } from '../../../enum';
2
3
  import { IBillingAccount } from '../../models/billing-account.model';
4
+ import { IBillingQuotaCap } from '../../models/billing-quota-cap.model';
3
5
  import { ICreditTransaction } from '../../models/credit-transaction.model';
4
6
  import { IEurTransaction } from '../../models/eur-transaction.model';
5
7
  import { IInvoice } from '../../models/invoice.model';
@@ -25,6 +27,16 @@ export interface ISetQuotaCeilingAdminBillingData {
25
27
  billingAccount: IBillingAccount;
26
28
  }
27
29
  export type ISetQuotaCeilingAdminBillingResponse = IResponse<ISetQuotaCeilingAdminBillingData>;
30
+ export interface ISetOverageRateAdminBillingData {
31
+ service: BillingService;
32
+ metric: BillingMetric;
33
+ overageNanocentsPerUnit: number | null;
34
+ }
35
+ export type ISetOverageRateAdminBillingResponse = IResponse<ISetOverageRateAdminBillingData>;
36
+ export interface ISetAlertThresholdsAdminBillingData {
37
+ quotaCaps: IBillingQuotaCap[];
38
+ }
39
+ export type ISetAlertThresholdsAdminBillingResponse = IResponse<ISetAlertThresholdsAdminBillingData>;
28
40
  export interface IQuotaStateItemAdminBilling {
29
41
  service: BillingService;
30
42
  metric: BillingMetric;
@@ -36,6 +48,9 @@ export interface IQuotaStateItemAdminBilling {
36
48
  overageAllowed: boolean;
37
49
  overageNanocentsPerUnit: number | null;
38
50
  unit: string;
51
+ overageRateSource: OverageRateSource;
52
+ alertThresholds: number[];
53
+ hasThresholdOverride: boolean;
39
54
  }
40
55
  export interface IGetQuotaStateAdminBillingData {
41
56
  planTier: PlanTier;
@@ -84,16 +99,3 @@ export interface IMigrateSubscriptionsAdminBillingData {
84
99
  failed: number;
85
100
  }
86
101
  export type IMigrateSubscriptionsAdminBillingResponse = IResponse<IMigrateSubscriptionsAdminBillingData>;
87
- export interface IBackfillSubscriptionItemRolesAdminBillingData {
88
- scanned: number;
89
- stamped: number;
90
- alreadyTagged: number;
91
- skipped: number;
92
- failed: number;
93
- remaining: number;
94
- nextCursor: {
95
- createdAt: string;
96
- id: string;
97
- } | null;
98
- }
99
- export type IBackfillSubscriptionItemRolesAdminBillingResponse = IResponse<IBackfillSubscriptionItemRolesAdminBillingData>;
@@ -0,0 +1,18 @@
1
+ import { BillingMetric } from '../../../enum/organization-billing.enum';
2
+ import { IResponse } from '../type-message/response';
3
+ export interface IBillingEstimateLine {
4
+ kind: 'plan' | 'module' | 'overage';
5
+ label: string;
6
+ amountCents: number;
7
+ quantity?: number;
8
+ metric?: BillingMetric;
9
+ }
10
+ export interface IBillingEstimate {
11
+ lines: IBillingEstimateLine[];
12
+ totalCents: number;
13
+ isEstimate: true;
14
+ }
15
+ export interface IGetBillingEstimateData {
16
+ estimate: IBillingEstimate;
17
+ }
18
+ export type IGetBillingEstimateResponse = IResponse<IGetBillingEstimateData>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=billing-estimate.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-estimate.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/billing-estimate.response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { BillingAddonStatus } from '../../../enum/organization-billing.enum';
2
+ import { BillingModuleId } from '../../../../constants/module-catalog.constants';
3
+ import { IResponse } from '../type-message/response';
4
+ export interface IOwnedBillingModule {
5
+ moduleId: BillingModuleId;
6
+ label: string;
7
+ unit: string;
8
+ quantity: number;
9
+ status: BillingAddonStatus;
10
+ monthlyPriceCents: number;
11
+ pendingQuantity: number | null;
12
+ pendingEffectiveAt: string | null;
13
+ }
14
+ export interface IListBillingModulesData {
15
+ modules: IOwnedBillingModule[];
16
+ }
17
+ export type IListBillingModulesResponse = IResponse<IListBillingModulesData>;
18
+ export interface ISetBillingModuleQuantityData {
19
+ module: IOwnedBillingModule | null;
20
+ }
21
+ export type ISetBillingModuleQuantityResponse = IResponse<ISetBillingModuleQuantityData>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=billing-module.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-module.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/billing-module.response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { IBillingDailySnapshot } from '../../models/billing-daily-snapshot.model';
2
+ import { IQuotaStateItemAdminBilling } from './billing-account.admin.response';
3
+ import { IResponse } from '../type-message/response';
4
+ export interface IListSnapshotsAdminBillingData {
5
+ snapshots: IBillingDailySnapshot[];
6
+ live: IQuotaStateItemAdminBilling[];
7
+ snapshotAsOf: string | null;
8
+ }
9
+ export type IListSnapshotsAdminBillingResponse = IResponse<IListSnapshotsAdminBillingData>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=billing-snapshot-admin.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-snapshot-admin.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/billing-snapshot-admin.response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ import { IOrganizationExternalIdentity } from '../../models/organization-external-identity.model';
2
+ import { IResponse } from '../type-message/response';
3
+ export interface IGetConnectUrlOrganizationExternalIdentityData {
4
+ connectUrl: string;
5
+ }
6
+ export type IGetConnectUrlOrganizationExternalIdentityResponse = IResponse<IGetConnectUrlOrganizationExternalIdentityData>;
7
+ export interface IBindOrganizationExternalIdentityData {
8
+ organizationExternalIdentity: IOrganizationExternalIdentity;
9
+ }
10
+ export type IBindOrganizationExternalIdentityResponse = IResponse<IBindOrganizationExternalIdentityData>;
11
+ export interface IListPendingOrganizationExternalIdentityData {
12
+ organizationExternalIdentities: IOrganizationExternalIdentity[];
13
+ }
14
+ export type IListPendingOrganizationExternalIdentityResponse = IResponse<IListPendingOrganizationExternalIdentityData>;
15
+ export interface INameCandidateOrganizationExternalIdentityData {
16
+ organizationExternalIdentity: IOrganizationExternalIdentity;
17
+ }
18
+ export type INameCandidateOrganizationExternalIdentityResponse = IResponse<INameCandidateOrganizationExternalIdentityData>;
19
+ export interface IDismissCandidateOrganizationExternalIdentityData {
20
+ organizationExternalIdentity: IOrganizationExternalIdentity;
21
+ }
22
+ export type IDismissCandidateOrganizationExternalIdentityResponse = IResponse<IDismissCandidateOrganizationExternalIdentityData>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=organization-external-identity.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-external-identity.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/organization-external-identity.response.ts"],"names":[],"mappings":""}
@@ -43,3 +43,11 @@ export interface IListUserIdsByPermissionOrganizationMemberAdminData {
43
43
  userIds: string[];
44
44
  }
45
45
  export type IListUserIdsByPermissionOrganizationMemberAdminResponse = IResponse<IListUserIdsByPermissionOrganizationMemberAdminData>;
46
+ export interface IOrganizationMemberAdminSummary {
47
+ userId: string;
48
+ displayName: string;
49
+ }
50
+ export interface IListMembersOrganizationMemberAdminData {
51
+ members: IOrganizationMemberAdminSummary[];
52
+ }
53
+ export type IListMembersOrganizationMemberAdminResponse = IResponse<IListMembersOrganizationMemberAdminData>;
@@ -0,0 +1,27 @@
1
+ import { BillingMetric, BillingService } from '../../../enum/organization-billing.enum';
2
+ import { BillingModuleId } from '../../../../constants/module-catalog.constants';
3
+ import { IResponse } from '../type-message/response';
4
+ export interface IQuotaOfferBranch {
5
+ kind: 'extension' | 'overage';
6
+ priceCents: number | null;
7
+ lot?: number;
8
+ moduleId?: BillingModuleId;
9
+ }
10
+ export interface IQuotaOffer {
11
+ service: BillingService;
12
+ metric: BillingMetric;
13
+ unit: string;
14
+ current: number;
15
+ includedLimit: number;
16
+ ceiling: number | null;
17
+ alertThreshold: number;
18
+ isSetting: boolean;
19
+ moduleSuspendedByPlan: boolean;
20
+ lotSize: number | null;
21
+ branches: IQuotaOfferBranch[];
22
+ asOf: 'live' | 'snapshot';
23
+ }
24
+ export interface IGetQuotaOfferData {
25
+ offer: IQuotaOffer;
26
+ }
27
+ export type IGetQuotaOfferResponse = IResponse<IGetQuotaOfferData>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=quota-offer.response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quota-offer.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/quota-offer.response.ts"],"names":[],"mappings":""}
@@ -23,8 +23,11 @@ export * from './models/report-notification-subscription.model';
23
23
  export * from './models/organization.model';
24
24
  export * from './models/organization-integration.model';
25
25
  export * from './models/organization-member.model';
26
+ export * from './models/organization-external-identity.model';
27
+ export * from './models/external-delivery.model';
26
28
  export * from './models/plan-template.model';
27
29
  export * from './models/billing-account.model';
30
+ export * from './models/billing-account-addon.model';
28
31
  export * from './models/organization-service-quota.model';
29
32
  export * from './models/organization-project-quota.model';
30
33
  export * from './models/usage-record.model';
@@ -39,8 +39,11 @@ __exportStar(require("./models/report-notification-subscription.model"), exports
39
39
  __exportStar(require("./models/organization.model"), exports);
40
40
  __exportStar(require("./models/organization-integration.model"), exports);
41
41
  __exportStar(require("./models/organization-member.model"), exports);
42
+ __exportStar(require("./models/organization-external-identity.model"), exports);
43
+ __exportStar(require("./models/external-delivery.model"), exports);
42
44
  __exportStar(require("./models/plan-template.model"), exports);
43
45
  __exportStar(require("./models/billing-account.model"), exports);
46
+ __exportStar(require("./models/billing-account-addon.model"), exports);
44
47
  __exportStar(require("./models/organization-service-quota.model"), exports);
45
48
  __exportStar(require("./models/organization-project-quota.model"), exports);
46
49
  __exportStar(require("./models/usage-record.model"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,yDAAuC;AACvC,gEAA8C;AAC9C,4EAA0D;AAC1D,6DAA2C;AAC3C,mEAAiD;AACjD,yEAAuD;AACvD,+DAA6C;AAC7C,+DAA6C;AAC7C,8DAA4C;AAC5C,mEAAiD;AACjD,oEAAkD;AAGlD,2DAAyC;AACzC,sEAAoD;AAGpD,wCAAsB;AAGtB,uDAAqC;AAGrC,wDAAsC;AACtC,gEAA8C;AAC9C,8DAA4C;AAC5C,oEAAkD;AAClD,8EAA4D;AAC5D,kFAAgE;AAGhE,8DAA4C;AAC5C,0EAAwD;AACxD,qEAAmD;AAGnD,+DAA6C;AAC7C,iEAA+C;AAC/C,4EAA0D;AAC1D,4EAA0D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3C,sEAAoD;AACpD,mEAAiD;AACjD,mEAAiD;AACjD,kEAAgD;AAChD,qEAAmD;AACnD,wEAAsD;AACtD,+DAA6C;AAC7C,8DAA4C;AAC5C,qEAAmD;AACnD,sDAAoC;AACpC,6DAA2C;AAC3C,qEAAmD;AACnD,iFAA+D;AAC/D,iEAA+C;AAC/C,oFAAkE;AAGlE,kEAAgD;AAGhD,mEAAiD;AAGjD,+DAA6C;AAO7C,gEAA8C;AAG9C,gEAA8C;AAC9C,wEAAsD;AACtD,2EAAyD;AACzD,oEAAkD;AAClD,yEAAuD;AAGvD,4DAA0C;AAG1C,4DAA0C;AAG1C,qEAAmD;AAGnD,qEAAmD;AAGnD,kEAAgD;AAGhD,iEAA+C;AAC/C,4DAA0C"}
@@ -0,0 +1,16 @@
1
+ import { BillingAddonStatus } from '../../enum';
2
+ import { BillingModuleId } from '../../../constants/module-catalog.constants';
3
+ import { IBillingAccount } from './billing-account.model';
4
+ export interface IBillingAccountAddon {
5
+ id?: string;
6
+ billingAccountId: string;
7
+ moduleId: BillingModuleId;
8
+ quantity: number;
9
+ stripeSubscriptionItemId: string | null;
10
+ status: BillingAddonStatus;
11
+ pendingEffectiveAt: Date | null;
12
+ pendingQuantity: number | null;
13
+ updatedAt?: Date;
14
+ createdAt?: Date;
15
+ billingAccount?: IBillingAccount;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=billing-account-addon.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-account-addon.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/billing-account-addon.model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ import { ExternalDeliveryStatus, ExternalMessagingPlatform } from '../../enum';
2
+ import { IOrganization } from './organization.model';
3
+ import { IUser } from './user.model';
4
+ import { IUserNotification } from './user-notification.model';
5
+ export interface IExternalDelivery {
6
+ id?: string;
7
+ userNotificationId?: string | null;
8
+ organizationId: string;
9
+ userId: string;
10
+ platform: ExternalMessagingPlatform;
11
+ organizationExternalIdentityId?: string | null;
12
+ status: ExternalDeliveryStatus;
13
+ attemptCount: number;
14
+ nextAttemptAt?: Date | null;
15
+ externalMessageId?: string | null;
16
+ lastError?: string | null;
17
+ updatedAt?: Date;
18
+ createdAt?: Date;
19
+ organization?: IOrganization;
20
+ user?: IUser;
21
+ userNotification?: IUserNotification;
22
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=external-delivery.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"external-delivery.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/external-delivery.model.ts"],"names":[],"mappings":""}
@@ -18,6 +18,7 @@ export * from './organization-integration.model';
18
18
  export * from './organization-member.model';
19
19
  export * from './plan-template.model';
20
20
  export * from './billing-account.model';
21
+ export * from './billing-account-addon.model';
21
22
  export * from './organization-service-quota.model';
22
23
  export * from './organization-project-quota.model';
23
24
  export * from './usage-record.model';
@@ -34,6 +34,7 @@ __exportStar(require("./organization-integration.model"), exports);
34
34
  __exportStar(require("./organization-member.model"), exports);
35
35
  __exportStar(require("./plan-template.model"), exports);
36
36
  __exportStar(require("./billing-account.model"), exports);
37
+ __exportStar(require("./billing-account-addon.model"), exports);
37
38
  __exportStar(require("./organization-service-quota.model"), exports);
38
39
  __exportStar(require("./organization-project-quota.model"), exports);
39
40
  __exportStar(require("./usage-record.model"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,kDAAgC;AAChC,yDAAuC;AACvC,qEAAmD;AACnD,sDAAoC;AACpC,4DAA0C;AAC1C,wDAAsC;AACtC,wDAAsC;AACtC,uDAAqC;AACrC,4DAA0C;AAC1C,6DAA2C;AAG3C,oDAAkC;AAClC,+DAA6C;AAG7C,gDAA8B;AAG9B,iDAA+B;AAG/B,uDAAqC;AACrC,mEAAiD;AACjD,8DAA4C;AAG5C,wDAAsC;AACtC,0DAAwC;AACxC,qEAAmD;AACnD,qEAAmD;AACnD,uDAAqC;AACrC,kDAAgC;AAChC,6DAA2C;AAC3C,0DAAwC;AACxC,mEAAiD;AACjD,sDAAoC;AACpC,+DAA6C;AAC7C,4DAA0C;AAC1C,4DAA0C;AAC1C,2DAAyC;AACzC,8DAA4C;AAC5C,iEAA+C;AAC/C,wDAAsC;AACtC,uDAAqC;AACrC,8DAA4C;AAC5C,+CAA6B;AAC7B,sDAAoC;AACpC,8DAA4C;AAC5C,0EAAwD;AACxD,0DAAwC;AACxC,6EAA2D;AAG3D,2DAAyC;AAGzC,4DAA0C;AAG1C,wDAAsC;AAGtC,yDAAuC;AACvC,iEAA+C;AAC/C,oEAAkD;AAClD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAGhD,qDAAmC;AAGnC,qDAAmC;AAGnC,8DAA4C;AAG5C,8DAA4C;AAG5C,2DAAyC;AAGzC,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,kDAAgC;AAChC,yDAAuC;AACvC,qEAAmD;AACnD,sDAAoC;AACpC,4DAA0C;AAC1C,wDAAsC;AACtC,wDAAsC;AACtC,uDAAqC;AACrC,4DAA0C;AAC1C,6DAA2C;AAG3C,oDAAkC;AAClC,+DAA6C;AAG7C,gDAA8B;AAG9B,iDAA+B;AAG/B,uDAAqC;AACrC,mEAAiD;AACjD,8DAA4C;AAG5C,wDAAsC;AACtC,0DAAwC;AACxC,gEAA8C;AAC9C,qEAAmD;AACnD,qEAAmD;AACnD,uDAAqC;AACrC,kDAAgC;AAChC,6DAA2C;AAC3C,0DAAwC;AACxC,mEAAiD;AACjD,sDAAoC;AACpC,+DAA6C;AAC7C,4DAA0C;AAC1C,4DAA0C;AAC1C,2DAAyC;AACzC,8DAA4C;AAC5C,iEAA+C;AAC/C,wDAAsC;AACtC,uDAAqC;AACrC,8DAA4C;AAC5C,+CAA6B;AAC7B,sDAAoC;AACpC,8DAA4C;AAC5C,0EAAwD;AACxD,0DAAwC;AACxC,6EAA2D;AAG3D,2DAAyC;AAGzC,4DAA0C;AAG1C,wDAAsC;AAGtC,yDAAuC;AACvC,iEAA+C;AAC/C,oEAAkD;AAClD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAGhD,qDAAmC;AAGnC,qDAAmC;AAGnC,8DAA4C;AAG5C,8DAA4C;AAG5C,2DAAyC;AAGzC,0DAAwC"}
@@ -0,0 +1,20 @@
1
+ import { ExternalIdentitySource, ExternalIdentityStatus, ExternalMessagingPlatform } from '../../enum';
2
+ import { IOrganization } from './organization.model';
3
+ import { IUser } from './user.model';
4
+ export interface IOrganizationExternalIdentity {
5
+ id?: string;
6
+ organizationId: string;
7
+ userId?: string | null;
8
+ platform: ExternalMessagingPlatform;
9
+ externalUserId: string;
10
+ externalWorkspaceId: string;
11
+ externalEnterpriseId?: string | null;
12
+ externalEmail?: string | null;
13
+ source: ExternalIdentitySource;
14
+ status: ExternalIdentityStatus;
15
+ lastVerifiedAt?: Date | null;
16
+ updatedAt?: Date;
17
+ createdAt?: Date;
18
+ organization?: IOrganization;
19
+ user?: IUser;
20
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=organization-external-identity.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-external-identity.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/organization-external-identity.model.ts"],"names":[],"mappings":""}
@@ -8,6 +8,7 @@ export interface IOrganizationMember {
8
8
  organizationId: string;
9
9
  userId: string;
10
10
  permissions: OrganizationPermission[];
11
+ workEmail?: string | null;
11
12
  adultStatus?: boolean;
12
13
  updatedAt?: Date;
13
14
  createdAt?: Date;
@@ -9,6 +9,7 @@ export interface IServiceQuota {
9
9
  isOverridden: boolean;
10
10
  ceilingMode: QuotaCeilingMode;
11
11
  ceilingValue: number | null;
12
+ overageNanocentsPerUnit?: number | null;
12
13
  updatedAt?: Date;
13
14
  createdAt?: Date;
14
15
  billingAccount?: IBillingAccount;
@@ -1,4 +1,4 @@
1
- import { AbyssService, TokenType } from './enum';
1
+ import { AbyssService, ExternalMessagingPlatform, TokenType } from './enum';
2
2
  export type SessionToken = {
3
3
  emitter: AbyssService;
4
4
  expiration: string;
@@ -33,3 +33,10 @@ export type InvitationTokenPayload = {
33
33
  invitationId: string;
34
34
  email: string;
35
35
  };
36
+ export type ExternalIdentityBindingTokenPayload = {
37
+ tokenHistoryId: string;
38
+ type: TokenType.EXTERNAL_IDENTITY_BINDING;
39
+ userId: string;
40
+ organizationId: string;
41
+ platform: ExternalMessagingPlatform;
42
+ };
@@ -0,0 +1,15 @@
1
+ export declare enum BillingDeepLinkAction {
2
+ THRESHOLD = "threshold",
3
+ EXTENSION = "extension",
4
+ CEILING = "ceiling",
5
+ OVERAGE = "overage"
6
+ }
7
+ export interface BillingDeepLinkParams {
8
+ billingBaseUrl: string;
9
+ service: string;
10
+ metric: string;
11
+ action: BillingDeepLinkAction;
12
+ organizationId?: string;
13
+ returnUrl?: string;
14
+ }
15
+ export declare const buildBillingDeepLink: ({ billingBaseUrl, service, metric, action, organizationId, returnUrl, }: BillingDeepLinkParams) => string;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildBillingDeepLink = exports.BillingDeepLinkAction = void 0;
4
+ var BillingDeepLinkAction;
5
+ (function (BillingDeepLinkAction) {
6
+ BillingDeepLinkAction["THRESHOLD"] = "threshold";
7
+ BillingDeepLinkAction["EXTENSION"] = "extension";
8
+ BillingDeepLinkAction["CEILING"] = "ceiling";
9
+ BillingDeepLinkAction["OVERAGE"] = "overage";
10
+ })(BillingDeepLinkAction || (exports.BillingDeepLinkAction = BillingDeepLinkAction = {}));
11
+ const buildBillingDeepLink = ({ billingBaseUrl, service, metric, action, organizationId, returnUrl, }) => {
12
+ const params = new URLSearchParams({ service, metric, action });
13
+ if (returnUrl) {
14
+ params.set('return', returnUrl);
15
+ }
16
+ const base = billingBaseUrl.replace(/\/+$/, '');
17
+ const chemin = organizationId
18
+ ? `/org/${encodeURIComponent(organizationId)}/billing/consumption`
19
+ : '/dashboard/account/billing/consumption';
20
+ return `${base}${chemin}?${params.toString()}`;
21
+ };
22
+ exports.buildBillingDeepLink = buildBillingDeepLink;
23
+ //# sourceMappingURL=billing-deep-link.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-deep-link.utils.js","sourceRoot":"","sources":["../../src/utils/billing-deep-link.utils.ts"],"names":[],"mappings":";;;AAuBA,IAAY,qBASX;AATD,WAAY,qBAAqB;IAE/B,gDAAuB,CAAA;IAEvB,gDAAuB,CAAA;IAEvB,4CAAmB,CAAA;IAEnB,4CAAmB,CAAA;AACrB,CAAC,EATW,qBAAqB,qCAArB,qBAAqB,QAShC;AAyDM,MAAM,oBAAoB,GAAG,CAAC,EACnC,cAAc,EACd,OAAO,EACP,MAAM,EACN,MAAM,EACN,cAAc,EACd,SAAS,GACa,EAAU,EAAE;IAClC,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAChE,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAClC,CAAC;IAID,MAAM,IAAI,GAAG,cAAc,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAGhD,MAAM,MAAM,GAAG,cAAc;QAC3B,CAAC,CAAC,QAAQ,kBAAkB,CAAC,cAAc,CAAC,sBAAsB;QAClE,CAAC,CAAC,wCAAwC,CAAC;IAC7C,OAAO,GAAG,IAAI,GAAG,MAAM,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;AACjD,CAAC,CAAC;AAtBW,QAAA,oBAAoB,wBAsB/B"}
@@ -1,5 +1,3 @@
1
- import { BillingAccountStatus } from '../types/enum';
2
- export declare const isSubscriptionExpired: (status: BillingAccountStatus) => boolean;
3
1
  export interface ParsedQuotaUnit {
4
2
  multiplier: number;
5
3
  baseUnit: string;
@@ -1,11 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveQuotaAmount = exports.parseQuotaUnit = exports.isSubscriptionExpired = void 0;
4
- const enum_1 = require("../types/enum");
5
- const isSubscriptionExpired = (status) => {
6
- return status === enum_1.BillingAccountStatus.CANCELLED;
7
- };
8
- exports.isSubscriptionExpired = isSubscriptionExpired;
3
+ exports.resolveQuotaAmount = exports.parseQuotaUnit = void 0;
9
4
  const parseQuotaUnit = (unit) => {
10
5
  const raw = (unit ?? '').trim();
11
6
  if (!raw) {
@@ -1 +1 @@
1
- {"version":3,"file":"billing.utils.js","sourceRoot":"","sources":["../../src/utils/billing.utils.ts"],"names":[],"mappings":";;;AAAA,wCAAqD;AAK9C,MAAM,qBAAqB,GAAG,CAAC,MAA4B,EAAW,EAAE;IAC7E,OAAO,MAAM,KAAK,2BAAoB,CAAC,SAAS,CAAC;AACnD,CAAC,CAAC;AAFW,QAAA,qBAAqB,yBAEhC;AA8BK,MAAM,cAAc,GAAG,CAAC,IAA+B,EAAmB,EAAE;IACjF,MAAM,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAChC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IACzC,CAAC;IAGD,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAChD,IAAI,MAAM,EAAE,C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G,GAAG,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;IAChE,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO;YACL,UAAU,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3D,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;SAChC,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;AAC1C,CAAC,CAAC;AAnCW,QAAA,cAAc,kBAmCzB;AAmBK,MAAM,kBAAkB,GAAG,CAChC,KAAa,EACb,IAA+B,EACV,EAAE;IACvB,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,IAAA,sBAAc,EAAC,IAAI,CAAC,CAAC;IACtD,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;QACjB,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IACnD,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,KAAK,GAAG,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AACpE,CAAC,CAAC;AATW,QAAA,kBAAkB,sBAS7B"}
@@ -23,3 +23,5 @@ export * from './invitation.utils';
23
23
  export * from './invoice-amounts.utils';
24
24
  export * from './resolve-user.utils';
25
25
  export * from './pricing.utils';
26
+ export * from './plan-capacity.utils';
27
+ export * from './billing-deep-link.utils';
@@ -39,4 +39,6 @@ __exportStar(require("./invitation.utils"), exports);
39
39
  __exportStar(require("./invoice-amounts.utils"), exports);
40
40
  __exportStar(require("./resolve-user.utils"), exports);
41
41
  __exportStar(require("./pricing.utils"), exports);
42
+ __exportStar(require("./plan-capacity.utils"), exports);
43
+ __exportStar(require("./billing-deep-link.utils"), exports);
42
44
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,gDAA8B;AAC9B,0DAAwC;AACxC,+CAA6B;AAC7B,iDAA+B;AAC/B,uDAAqC;AACrC,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,+CAA6B;AAC7B,sDAAoC;AACpC,iDAA+B;AAC/B,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,wDAAsC;AACtC,wDAAsC;AACtC,6DAA2C;AAC3C,8DAA4C;AAC5C,qDAAmC;AACnC,0DAAwC;AACxC,uDAAqC;AAIrC,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,gDAA8B;AAC9B,0DAAwC;AACxC,+CAA6B;AAC7B,iDAA+B;AAC/B,uDAAqC;AACrC,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,+CAA6B;AAC7B,sDAAoC;AACpC,iDAA+B;AAC/B,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,wDAAsC;AACtC,wDAAsC;AACtC,6DAA2C;AAC3C,8DAA4C;AAC5C,qDAAmC;AACnC,0DAAwC;AACxC,uDAAqC;AAIrC,kDAAgC;AAChC,wDAAsC;AACtC,4DAA0C"}
@@ -0,0 +1,21 @@
1
+ import { PlanAccountType } from '../types/enum/organization-billing.enum';
2
+ import { PlanCapacityItem } from './pricing.utils';
3
+ export declare enum PlanCapacityVerdict {
4
+ IN_RANGE = "IN_RANGE",
5
+ ABOVE = "ABOVE",
6
+ BELOW = "BELOW",
7
+ NO_BENCHMARK = "NO_BENCHMARK"
8
+ }
9
+ export interface PlanCapacityRange {
10
+ min: number;
11
+ max: number;
12
+ count: number;
13
+ }
14
+ export declare const catalogCapacityRange: (accountType: PlanAccountType) => PlanCapacityRange | null;
15
+ export interface PlanCapacityAssessment {
16
+ valueCents: number;
17
+ share: number;
18
+ range: PlanCapacityRange | null;
19
+ verdict: PlanCapacityVerdict;
20
+ }
21
+ export declare const assessPlanCapacity: (accountType: PlanAccountType, monthlyPriceEur: number, items: PlanCapacityItem[]) => PlanCapacityAssessment;