@abyss-project/main 2.1.0 → 2.2.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.
- package/dist/api/billing-account.admin.api.d.ts +7 -3
- package/dist/api/billing-account.admin.api.js +13 -5
- package/dist/api/billing-account.admin.api.js.map +1 -1
- package/dist/api/organization-billing.api.d.ts +11 -0
- package/dist/api/organization-billing.api.js +17 -1
- package/dist/api/organization-billing.api.js.map +1 -1
- package/dist/api/organization-external-identity.api.d.ts +7 -0
- package/dist/api/organization-external-identity.api.js +25 -0
- package/dist/api/organization-external-identity.api.js.map +1 -0
- package/dist/api/organization-member.admin.api.d.ts +2 -1
- package/dist/api/organization-member.admin.api.js +5 -1
- package/dist/api/organization-member.admin.api.js.map +1 -1
- package/dist/api/user-billing.api.d.ts +9 -0
- package/dist/api/user-billing.api.js +17 -1
- package/dist/api/user-billing.api.js.map +1 -1
- package/dist/constants/catalog-plan-quotas.constants.d.ts +2 -0
- package/dist/constants/catalog-plan-quotas.constants.js +70 -1
- package/dist/constants/catalog-plan-quotas.constants.js.map +1 -1
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/metric-price-scale.constants.d.ts +1 -0
- package/dist/constants/metric-price-scale.constants.js +12 -1
- package/dist/constants/metric-price-scale.constants.js.map +1 -1
- package/dist/constants/module-catalog.constants.d.ts +65 -0
- package/dist/constants/module-catalog.constants.js +336 -0
- package/dist/constants/module-catalog.constants.js.map +1 -0
- package/dist/constants/quota-metric-kind.constants.d.ts +2 -0
- package/dist/constants/quota-metric-kind.constants.js +12 -1
- package/dist/constants/quota-metric-kind.constants.js.map +1 -1
- package/dist/index.d.ts +20 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/types/enum/abyss-application-event.enum.d.ts +4 -1
- package/dist/types/enum/abyss-application-event.enum.js +4 -1
- package/dist/types/enum/abyss-application-event.enum.js.map +1 -1
- package/dist/types/enum/external-delivery.enum.d.ts +6 -0
- package/dist/types/enum/external-delivery.enum.js +11 -0
- package/dist/types/enum/external-delivery.enum.js.map +1 -0
- package/dist/types/enum/index.d.ts +2 -0
- package/dist/types/enum/index.js +2 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/organization-billing.enum.d.ts +15 -2
- package/dist/types/enum/organization-billing.enum.js +29 -2
- package/dist/types/enum/organization-billing.enum.js.map +1 -1
- package/dist/types/enum/organization-external-identity.enum.d.ts +17 -0
- package/dist/types/enum/organization-external-identity.enum.js +24 -0
- package/dist/types/enum/organization-external-identity.enum.js.map +1 -0
- package/dist/types/enum/slack-webhook.enum.d.ts +3 -1
- package/dist/types/enum/slack-webhook.enum.js +2 -0
- package/dist/types/enum/slack-webhook.enum.js.map +1 -1
- package/dist/types/enum/token-type.enum.d.ts +2 -1
- package/dist/types/enum/token-type.enum.js +1 -0
- package/dist/types/enum/token-type.enum.js.map +1 -1
- package/dist/types/enum/user-notification-category.enum.d.ts +7 -1
- package/dist/types/enum/user-notification-category.enum.js +19 -1
- package/dist/types/enum/user-notification-category.enum.js.map +1 -1
- package/dist/types/enum/user-notification-content-type.enum.d.ts +2 -0
- package/dist/types/enum/user-notification-content-type.enum.js.map +1 -1
- package/dist/types/interface/api/index.d.ts +9 -0
- package/dist/types/interface/api/index.js +9 -0
- package/dist/types/interface/api/index.js.map +1 -1
- package/dist/types/interface/api/requests/billing-account.admin.request.d.ts +9 -5
- package/dist/types/interface/api/requests/billing-module.request.d.ts +25 -0
- package/dist/types/interface/api/requests/billing-module.request.js +3 -0
- package/dist/types/interface/api/requests/billing-module.request.js.map +1 -0
- package/dist/types/interface/api/requests/billing-snapshot-admin.request.d.ts +7 -0
- package/dist/types/interface/api/requests/billing-snapshot-admin.request.js +3 -0
- package/dist/types/interface/api/requests/billing-snapshot-admin.request.js.map +1 -0
- package/dist/types/interface/api/requests/organization-external-identity.request.d.ts +28 -0
- package/dist/types/interface/api/requests/organization-external-identity.request.js +3 -0
- package/dist/types/interface/api/requests/organization-external-identity.request.js.map +1 -0
- package/dist/types/interface/api/requests/organization-integration-webhook.request.d.ts +17 -1
- package/dist/types/interface/api/requests/organization-member.request.d.ts +3 -0
- package/dist/types/interface/api/requests/quota-offer.request.d.ts +10 -0
- package/dist/types/interface/api/requests/quota-offer.request.js +3 -0
- package/dist/types/interface/api/requests/quota-offer.request.js.map +1 -0
- package/dist/types/interface/api/responses/billing-account.admin.response.d.ts +10 -13
- package/dist/types/interface/api/responses/billing-estimate.response.d.ts +18 -0
- package/dist/types/interface/api/responses/billing-estimate.response.js +3 -0
- package/dist/types/interface/api/responses/billing-estimate.response.js.map +1 -0
- package/dist/types/interface/api/responses/billing-module.response.d.ts +21 -0
- package/dist/types/interface/api/responses/billing-module.response.js +3 -0
- package/dist/types/interface/api/responses/billing-module.response.js.map +1 -0
- package/dist/types/interface/api/responses/billing-snapshot-admin.response.d.ts +9 -0
- package/dist/types/interface/api/responses/billing-snapshot-admin.response.js +3 -0
- package/dist/types/interface/api/responses/billing-snapshot-admin.response.js.map +1 -0
- package/dist/types/interface/api/responses/organization-external-identity.response.d.ts +22 -0
- package/dist/types/interface/api/responses/organization-external-identity.response.js +3 -0
- package/dist/types/interface/api/responses/organization-external-identity.response.js.map +1 -0
- package/dist/types/interface/api/responses/organization-member.response.d.ts +8 -0
- package/dist/types/interface/api/responses/quota-offer.response.d.ts +27 -0
- package/dist/types/interface/api/responses/quota-offer.response.js +3 -0
- package/dist/types/interface/api/responses/quota-offer.response.js.map +1 -0
- package/dist/types/interface/index.d.ts +3 -0
- package/dist/types/interface/index.js +3 -0
- package/dist/types/interface/index.js.map +1 -1
- package/dist/types/interface/models/billing-account-addon.model.d.ts +16 -0
- package/dist/types/interface/models/billing-account-addon.model.js +3 -0
- package/dist/types/interface/models/billing-account-addon.model.js.map +1 -0
- package/dist/types/interface/models/external-delivery.model.d.ts +22 -0
- package/dist/types/interface/models/external-delivery.model.js +3 -0
- package/dist/types/interface/models/external-delivery.model.js.map +1 -0
- package/dist/types/interface/models/index.d.ts +1 -0
- package/dist/types/interface/models/index.js +1 -0
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/organization-external-identity.model.d.ts +20 -0
- package/dist/types/interface/models/organization-external-identity.model.js +3 -0
- package/dist/types/interface/models/organization-external-identity.model.js.map +1 -0
- package/dist/types/interface/models/organization-member.model.d.ts +1 -0
- package/dist/types/interface/models/organization-service-quota.model.d.ts +1 -0
- package/dist/types/session.d.ts +8 -1
- package/dist/utils/billing-deep-link.utils.d.ts +15 -0
- package/dist/utils/billing-deep-link.utils.js +23 -0
- package/dist/utils/billing-deep-link.utils.js.map +1 -0
- package/dist/utils/billing.utils.d.ts +0 -2
- package/dist/utils/billing.utils.js +1 -6
- package/dist/utils/billing.utils.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/pricing.utils.d.ts +21 -1
- package/dist/utils/pricing.utils.js +111 -4
- package/dist/utils/pricing.utils.js.map +1 -1
- package/package.json +15 -11
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +35 -36
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { IListModulesAdminBillingParams, ISetModuleQuantityAdminBillingParams, ISetModuleQuantityAdminBillingBody } from '../types/interface/api/requests/billing-module.request';
|
|
2
|
+
import type { IListBillingModulesResponse, ISetBillingModuleQuantityResponse } from '../types/interface/api/responses/billing-module.response';
|
|
3
|
+
import type { IAdjustCreditAdminBillingBody, IAdjustCreditAdminBillingParams, IGetAccountAdminBillingParams, IGetQuotaStateAdminBillingParams, IEditCustomPlanAdminBillingParams, IEditCustomPlanAdminBillingBody, ICreateAccountAdminBillingBody, IListAccountsAdminBillingQuery, IListInvoicesAdminBillingParams, IListPurchasesAdminBillingQuery, IListStaleAnnounceScopesAdminBillingQuery, IListTransactionsAdminBillingQuery, IOverrideQuotaAdminBillingBody, IOverrideQuotaAdminBillingParams, IRemoveQuotaOverrideAdminBillingParams, IUpdateAccountAdminBillingBody, IUpdateAccountAdminBillingParams, ISetQuotaCeilingAdminBillingBody, ISetQuotaCeilingAdminBillingParams, ISetOverageRateAdminBillingParams, ISetOverageRateAdminBillingBody, IUpdateInvoiceAdminBillingBody, IUpdateInvoiceAdminBillingParams, IMigrateSubscriptionsAdminBillingParams, IMigrateSubscriptionsAdminBillingBody } from '../types/interface/api/requests/billing-account.admin.request';
|
|
4
|
+
import type { IAdjustCreditAdminBillingResponse, IListStaleAnnounceScopesAdminBillingResponse, ICreateAccountAdminBillingResponse, IGetAccountAdminBillingResponse, IGetQuotaStateAdminBillingResponse, ISetOverageRateAdminBillingResponse, IEditCustomPlanAdminBillingResponse, IListAccountsAdminBillingResponse, IListInvoicesAdminBillingResponse, IListPurchasesAdminBillingResponse, IListTransactionsAdminBillingResponse, IOverrideQuotaAdminBillingResponse, IRemoveQuotaOverrideAdminBillingResponse, IUpdateAccountAdminBillingResponse, ISetQuotaCeilingAdminBillingResponse, IUpdateInvoiceAdminBillingResponse, IMigrateSubscriptionsAdminBillingResponse } from '../types/interface/api/responses/billing-account.admin.response';
|
|
3
5
|
export declare const createAdminBillingAccount: (body: ICreateAccountAdminBillingBody) => Promise<ICreateAccountAdminBillingResponse>;
|
|
4
6
|
export declare const listAdminBillingAccounts: (query?: IListAccountsAdminBillingQuery) => Promise<IListAccountsAdminBillingResponse>;
|
|
5
7
|
export declare const getAdminBillingAccount: (params: IGetAccountAdminBillingParams) => Promise<IGetAccountAdminBillingResponse>;
|
|
6
8
|
export declare const updateAdminBillingAccount: (params: IUpdateAccountAdminBillingParams, body: IUpdateAccountAdminBillingBody) => Promise<IUpdateAccountAdminBillingResponse>;
|
|
7
9
|
export declare const setAdminBillingQuotaCeiling: (params: ISetQuotaCeilingAdminBillingParams, body: ISetQuotaCeilingAdminBillingBody) => Promise<ISetQuotaCeilingAdminBillingResponse>;
|
|
8
10
|
export declare const getAdminBillingQuotaState: (params: IGetQuotaStateAdminBillingParams) => Promise<IGetQuotaStateAdminBillingResponse>;
|
|
11
|
+
export declare const setAdminBillingOverageRate: (params: ISetOverageRateAdminBillingParams, body: ISetOverageRateAdminBillingBody) => Promise<ISetOverageRateAdminBillingResponse>;
|
|
12
|
+
export declare const listAdminBillingModules: (params: IListModulesAdminBillingParams) => Promise<IListBillingModulesResponse>;
|
|
13
|
+
export declare const setAdminBillingModuleQuantity: (params: ISetModuleQuantityAdminBillingParams, body: ISetModuleQuantityAdminBillingBody) => Promise<ISetBillingModuleQuantityResponse>;
|
|
9
14
|
export declare const editAdminBillingCustomPlan: (params: IEditCustomPlanAdminBillingParams, body: IEditCustomPlanAdminBillingBody) => Promise<IEditCustomPlanAdminBillingResponse>;
|
|
10
15
|
export declare const overrideAdminBillingQuota: (params: IOverrideQuotaAdminBillingParams, body: IOverrideQuotaAdminBillingBody) => Promise<IOverrideQuotaAdminBillingResponse>;
|
|
11
16
|
export declare const removeAdminBillingQuotaOverride: (params: IRemoveQuotaOverrideAdminBillingParams) => Promise<IRemoveQuotaOverrideAdminBillingResponse>;
|
|
@@ -15,5 +20,4 @@ export declare const updateAdminBillingInvoice: (params: IUpdateInvoiceAdminBill
|
|
|
15
20
|
export declare const listAdminBillingTransactions: (query?: IListTransactionsAdminBillingQuery) => Promise<IListTransactionsAdminBillingResponse>;
|
|
16
21
|
export declare const listAdminBillingStaleAnnounceScopes: (query: IListStaleAnnounceScopesAdminBillingQuery) => Promise<IListStaleAnnounceScopesAdminBillingResponse>;
|
|
17
22
|
export declare const listAdminBillingPurchases: (query?: IListPurchasesAdminBillingQuery) => Promise<IListPurchasesAdminBillingResponse>;
|
|
18
|
-
export declare const backfillAdminBillingSubscriptionItemRoles: (body?: IBackfillSubscriptionItemRolesAdminBillingBody) => Promise<IBackfillSubscriptionItemRolesAdminBillingResponse>;
|
|
19
23
|
export declare const migrateAdminBillingSubscriptions: (params: IMigrateSubscriptionsAdminBillingParams, body: IMigrateSubscriptionsAdminBillingBody) => Promise<IMigrateSubscriptionsAdminBillingResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.migrateAdminBillingSubscriptions = exports.
|
|
3
|
+
exports.migrateAdminBillingSubscriptions = exports.listAdminBillingPurchases = exports.listAdminBillingStaleAnnounceScopes = exports.listAdminBillingTransactions = exports.updateAdminBillingInvoice = exports.listAdminBillingAccountInvoices = exports.adjustAdminBillingCredit = exports.removeAdminBillingQuotaOverride = exports.overrideAdminBillingQuota = exports.editAdminBillingCustomPlan = exports.setAdminBillingModuleQuantity = exports.listAdminBillingModules = exports.setAdminBillingOverageRate = exports.getAdminBillingQuotaState = exports.setAdminBillingQuotaCeiling = exports.updateAdminBillingAccount = exports.getAdminBillingAccount = exports.listAdminBillingAccounts = exports.createAdminBillingAccount = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const createAdminBillingAccount = async (body) => {
|
|
6
6
|
return (await __1.AbyssCore.axios.post('admin/billing/account', body)).data;
|
|
@@ -28,6 +28,18 @@ const getAdminBillingQuotaState = async (params) => {
|
|
|
28
28
|
return (await __1.AbyssCore.axios.get(`admin/billing/account/${params.billingAccountId}/quota-state`)).data;
|
|
29
29
|
};
|
|
30
30
|
exports.getAdminBillingQuotaState = getAdminBillingQuotaState;
|
|
31
|
+
const setAdminBillingOverageRate = async (params, body) => {
|
|
32
|
+
return (await __1.AbyssCore.axios.put(`admin/billing/account/${params.billingAccountId}/overage-rate`, body)).data;
|
|
33
|
+
};
|
|
34
|
+
exports.setAdminBillingOverageRate = setAdminBillingOverageRate;
|
|
35
|
+
const listAdminBillingModules = async (params) => {
|
|
36
|
+
return (await __1.AbyssCore.axios.get(`admin/billing/account/${params.billingAccountId}/modules`)).data;
|
|
37
|
+
};
|
|
38
|
+
exports.listAdminBillingModules = listAdminBillingModules;
|
|
39
|
+
const setAdminBillingModuleQuantity = async (params, body) => {
|
|
40
|
+
return (await __1.AbyssCore.axios.put(`admin/billing/account/${params.billingAccountId}/modules/${params.moduleId}`, body)).data;
|
|
41
|
+
};
|
|
42
|
+
exports.setAdminBillingModuleQuantity = setAdminBillingModuleQuantity;
|
|
31
43
|
const editAdminBillingCustomPlan = async (params, body) => {
|
|
32
44
|
return (await __1.AbyssCore.axios.put(`admin/billing/account/${params.billingAccountId}/custom-plan`, body)).data;
|
|
33
45
|
};
|
|
@@ -68,10 +80,6 @@ const listAdminBillingPurchases = async (query) => {
|
|
|
68
80
|
})).data;
|
|
69
81
|
};
|
|
70
82
|
exports.listAdminBillingPurchases = listAdminBillingPurchases;
|
|
71
|
-
const backfillAdminBillingSubscriptionItemRoles = async (body = {}) => {
|
|
72
|
-
return (await __1.AbyssCore.axios.post('admin/billing/backfill-subscription-item-roles', body)).data;
|
|
73
|
-
};
|
|
74
|
-
exports.backfillAdminBillingSubscriptionItemRoles = backfillAdminBillingSubscriptionItemRoles;
|
|
75
83
|
const migrateAdminBillingSubscriptions = async (params, body) => {
|
|
76
84
|
return (await __1.AbyssCore.axios.post(`admin/billing/plan/${params.planTemplateId}/migrate-subscriptions`, body)).data;
|
|
77
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-account.admin.api.js","sourceRoot":"","sources":["../../src/api/billing-account.admin.api.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;
|
|
1
|
+
{"version":3,"file":"billing-account.admin.api.js","sourceRoot":"","sources":["../../src/api/billing-account.admin.api.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;AAyDxB,MAAM,yBAAyB,GAAG,KAAK,EAC5C,IAAoC,EACS,EAAE;IAC/C,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CAAqC,uBAAuB,EAAE,IAAI,CAAC,CAC9F,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AANW,QAAA,yBAAyB,6BAMpC;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,QAAA,4BAA4B,gCAQvC;AASK,MAAM,mCAAmC,GAAG,KAAK,EACtD,KAAgD,EACO,EAAE;IACzD,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,GAAG,CACvB,kCAAkC,EAClC,EAAE,MAAM,EAAE,KAAK,EAAE,CAClB,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AATW,QAAA,mCAAmC,uCAS9C;AAEK,MAAM,yBAAyB,GAAG,KAAK,EAC5C,KAAuC,EACM,EAAE;IAC/C,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,GAAG,CAAqC,wBAAwB,EAAE;QACtF,MAAM,EAAE,KAAK;KACd,CAAC,CACH,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,yBAAyB,6BAQpC;AAEK,MAAM,gCAAgC,GAAG,KAAK,EACnD,MAA+C,EAC/C,IAA2C,EACS,EAAE;IACtD,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CACxB,sBAAsB,MAAM,CAAC,cAAc,wBAAwB,EACnE,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,gCAAgC,oCAU3C"}
|
|
@@ -5,6 +5,11 @@ import type { IGetBillingOrganizationResponse, IGetQuotaOrganizationResponse, II
|
|
|
5
5
|
import type { ICreatePlanRequestBillingResponse } from '../types/interface/api/responses/billing.response';
|
|
6
6
|
import type { ICancelScheduledDowngradeResponse } from '../types/interface/api/responses/user-billing.response';
|
|
7
7
|
import type { IRequestTrialBillingResponse, IGetTrialRequestStateBillingResponse } from '../types/interface/api/responses/billing-trial.response';
|
|
8
|
+
import { IGetQuotaOfferOrganizationParams } from '../types/interface/api/requests/quota-offer.request';
|
|
9
|
+
import { IGetQuotaOfferResponse } from '../types/interface/api/responses/quota-offer.response';
|
|
10
|
+
import { IGetBillingEstimateResponse } from '../types/interface/api/responses/billing-estimate.response';
|
|
11
|
+
import { IListOrgBillingModulesParams, ISetBillingModuleQuantityBody, ISetOrgBillingModuleQuantityParams } from '../types/interface/api/requests/billing-module.request';
|
|
12
|
+
import { IListBillingModulesResponse, ISetBillingModuleQuantityResponse } from '../types/interface/api/responses/billing-module.response';
|
|
8
13
|
export declare const getOrganizationBilling: (params: IGetBillingOrganizationParams) => Promise<IGetBillingOrganizationResponse>;
|
|
9
14
|
export declare const getOrganizationQuota: (params: IGetQuotaOrganizationParams) => Promise<IGetQuotaOrganizationResponse>;
|
|
10
15
|
export declare const initOrganizationBilling: (params: IInitBillingOrganizationParams) => Promise<IInitBillingOrganizationResponse>;
|
|
@@ -71,6 +76,12 @@ export declare const listOrgQuotaCaps: (params: IListOrgQuotaCapsParams) => Prom
|
|
|
71
76
|
export declare const addOrgQuotaCap: (params: IAddOrgQuotaCapParams, body: IAddOrgQuotaCapBody) => Promise<IAddOrgQuotaCapResponse>;
|
|
72
77
|
export declare const removeOrgQuotaCap: (params: IRemoveOrgQuotaCapParams) => Promise<void>;
|
|
73
78
|
export declare const setOrgQuotaCeiling: (params: ISetOrgQuotaCeilingParams, body: ISetOrgQuotaCeilingBody) => Promise<ISetOrgQuotaCeilingResponse>;
|
|
79
|
+
export declare const listOrgBillingModules: (params: IListOrgBillingModulesParams) => Promise<IListBillingModulesResponse>;
|
|
80
|
+
export declare const setOrgBillingModuleQuantity: (params: ISetOrgBillingModuleQuantityParams, body: ISetBillingModuleQuantityBody) => Promise<ISetBillingModuleQuantityResponse>;
|
|
81
|
+
export declare const getOrgQuotaOffer: (params: IGetQuotaOfferOrganizationParams) => Promise<IGetQuotaOfferResponse>;
|
|
82
|
+
export declare const getOrgBillingEstimate: (params: {
|
|
83
|
+
organizationId: string;
|
|
84
|
+
}) => Promise<IGetBillingEstimateResponse>;
|
|
74
85
|
export declare const getOrgStorageBreakdown: (params: IGetOrgStorageBreakdownParams) => Promise<IGetOrgStorageBreakdownResponse>;
|
|
75
86
|
export declare const getOrgDailySnapshot: (params: IGetOrgDailySnapshotParams) => Promise<IGetOrgDailySnapshotResponse>;
|
|
76
87
|
export declare const listOrgDailySnapshots: (params: IListOrgDailySnapshotsParams, query: IListOrgDailySnapshotsQuery) => Promise<IListOrgDailySnapshotsResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cancelOrganizationScheduledDowngrade = exports.getOrganizationTrialRequestState = exports.requestOrganizationTrial = exports.createOrganizationPlanRequest = exports.importOrganizationQuotaAdmin = exports.releaseOrganizationQuotaAdmin = exports.confirmOrganizationQuotaAdmin = exports.reserveOrganizationQuotaAdmin = exports.checkOrganizationQuotaAdmin = exports.listOrgDailySnapshots = exports.getOrgDailySnapshot = exports.getOrgStorageBreakdown = exports.setOrgQuotaCeiling = exports.removeOrgQuotaCap = exports.addOrgQuotaCap = exports.listOrgQuotaCaps = exports.downloadOrgInvoicePdf = exports.createOrgPortalSession = exports.resolveOrganizationQuota = exports.deleteOrgPaymentMethod = exports.confirmOrgPaymentMethod = exports.getOrgPaymentMethod = exports.setupOrgPaymentMethod = exports.createOrgEurTopupCheckout = exports.deleteOrganizationGrant = exports.updateOrganizationGrant = exports.createOrganizationGrant = exports.listOrganizationGrants = exports.getOrganizationProjectQuota = exports.releaseOrganizationStorageBytes = exports.reserveOrganizationStorageBytes = exports.setOrganizationStorageSubtotal = exports.recordOrganizationUsage = exports.checkOrganizationQuota = exports.listOrganizationCredit = exports.listOrganizationInvoices = exports.previewOrganizationPlanChange = exports.subscribeOrganizationToPlan = exports.updateOrganizationBillingInfo = exports.initOrganizationBilling = exports.getOrganizationQuota = exports.getOrganizationBilling = void 0;
|
|
3
|
+
exports.cancelOrganizationScheduledDowngrade = exports.getOrganizationTrialRequestState = exports.requestOrganizationTrial = exports.createOrganizationPlanRequest = exports.importOrganizationQuotaAdmin = exports.releaseOrganizationQuotaAdmin = exports.confirmOrganizationQuotaAdmin = exports.reserveOrganizationQuotaAdmin = exports.checkOrganizationQuotaAdmin = exports.listOrgDailySnapshots = exports.getOrgDailySnapshot = exports.getOrgStorageBreakdown = exports.getOrgBillingEstimate = exports.getOrgQuotaOffer = exports.setOrgBillingModuleQuantity = exports.listOrgBillingModules = exports.setOrgQuotaCeiling = exports.removeOrgQuotaCap = exports.addOrgQuotaCap = exports.listOrgQuotaCaps = exports.downloadOrgInvoicePdf = exports.createOrgPortalSession = exports.resolveOrganizationQuota = exports.deleteOrgPaymentMethod = exports.confirmOrgPaymentMethod = exports.getOrgPaymentMethod = exports.setupOrgPaymentMethod = exports.createOrgEurTopupCheckout = exports.deleteOrganizationGrant = exports.updateOrganizationGrant = exports.createOrganizationGrant = exports.listOrganizationGrants = exports.getOrganizationProjectQuota = exports.releaseOrganizationStorageBytes = exports.reserveOrganizationStorageBytes = exports.setOrganizationStorageSubtotal = exports.recordOrganizationUsage = exports.checkOrganizationQuota = exports.listOrganizationCredit = exports.listOrganizationInvoices = exports.previewOrganizationPlanChange = exports.subscribeOrganizationToPlan = exports.updateOrganizationBillingInfo = exports.initOrganizationBilling = exports.getOrganizationQuota = exports.getOrganizationBilling = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const getOrganizationBilling = async (params) => {
|
|
6
6
|
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/billing`)).data;
|
|
@@ -122,6 +122,22 @@ const setOrgQuotaCeiling = async (params, body) => {
|
|
|
122
122
|
return (await __1.AbyssCore.axios.put(`organization/${params.organizationId}/billing/quota/ceiling`, body)).data;
|
|
123
123
|
};
|
|
124
124
|
exports.setOrgQuotaCeiling = setOrgQuotaCeiling;
|
|
125
|
+
const listOrgBillingModules = async (params) => {
|
|
126
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/billing/modules`)).data;
|
|
127
|
+
};
|
|
128
|
+
exports.listOrgBillingModules = listOrgBillingModules;
|
|
129
|
+
const setOrgBillingModuleQuantity = async (params, body) => {
|
|
130
|
+
return (await __1.AbyssCore.axios.put(`organization/${params.organizationId}/billing/modules/${params.moduleId}`, body)).data;
|
|
131
|
+
};
|
|
132
|
+
exports.setOrgBillingModuleQuantity = setOrgBillingModuleQuantity;
|
|
133
|
+
const getOrgQuotaOffer = async (params) => {
|
|
134
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/quota/offer/${params.service}/${params.metric}`)).data;
|
|
135
|
+
};
|
|
136
|
+
exports.getOrgQuotaOffer = getOrgQuotaOffer;
|
|
137
|
+
const getOrgBillingEstimate = async (params) => {
|
|
138
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/billing/estimate`)).data;
|
|
139
|
+
};
|
|
140
|
+
exports.getOrgBillingEstimate = getOrgBillingEstimate;
|
|
125
141
|
const getOrgStorageBreakdown = async (params) => {
|
|
126
142
|
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/billing/storage-breakdown`)).data;
|
|
127
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-billing.api.js","sourceRoot":"","sources":["../../src/api/organization-billing.api.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;
|
|
1
|
+
{"version":3,"file":"organization-billing.api.js","sourceRoot":"","sources":["../../src/api/organization-billing.api.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;AA4GxB,MAAM,sBAAsB,GAAG,KAAK,EACzC,MAAqC,EACK,EAAE;IAC5C,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,GAAG,CACvB,gBAAgB,MAAM,CAAC,cAAc,UAAU,CAChD,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,sBAAsB,0BAQjC;AAEK,MAAM,oBAAoB,GAAG,KAAK,EACvC,MAAmC,EACK,EAAE;IAC1C,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,GAAG,CACvB,gBAAgB,MAAM,CAAC,cAAc,QAAQ,CAC9C,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,oBAAoB,wBAQ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AAM,CAAC,cAAc,eAAe,EAC1D,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,4BAA4B,gCAUvC;AAEK,MAAM,6BAA6B,GAAG,KAAK,EAChD,MAA4C,EAC5C,IAAmC,EACS,EAAE;IAC9C,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CACxB,gBAAgB,MAAM,CAAC,cAAc,uBAAuB,EAC5D,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,6BAA6B,iCAUxC;AAEK,MAAM,wBAAwB,GAAG,KAAK,EAC3C,MAAuC,EACvC,IAA8B,EACS,EAAE;IACzC,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CACxB,gBAAgB,MAAM,CAAC,cAAc,wBAAwB,EAC7D,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,wBAAwB,4BAUnC;AAEK,MAAM,gCAAgC,GAAG,KAAK,EACnD,MAA+C,EACA,EAAE;IACjD,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,GAAG,CACvB,gBAAgB,MAAM,CAAC,cAAc,8BAA8B,CACpE,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,gCAAgC,oCAQ3C;AAEK,MAAM,oCAAoC,GAAG,KAAK,EACvD,MAAmD,EACP,EAAE;IAC9C,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,MAAM,CAC1B,gBAAgB,MAAM,CAAC,cAAc,8BAA8B,CACpE,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,oCAAoC,wCAQ/C"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IBindOrganizationExternalIdentityBody, IGetConnectUrlOrganizationExternalIdentityParams, IGetConnectUrlOrganizationExternalIdentityQuery, IListPendingOrganizationExternalIdentityParams, IListPendingOrganizationExternalIdentityQuery, INameCandidateOrganizationExternalIdentityBody, INameCandidateOrganizationExternalIdentityParams, IDismissCandidateOrganizationExternalIdentityParams } from '../types/interface/api/requests/organization-external-identity.request';
|
|
2
|
+
import type { IBindOrganizationExternalIdentityResponse, IGetConnectUrlOrganizationExternalIdentityResponse, IListPendingOrganizationExternalIdentityResponse, INameCandidateOrganizationExternalIdentityResponse, IDismissCandidateOrganizationExternalIdentityResponse } from '../types/interface/api/responses/organization-external-identity.response';
|
|
3
|
+
export declare const getConnectUrlOrganizationExternalIdentity: (params: IGetConnectUrlOrganizationExternalIdentityParams, query: IGetConnectUrlOrganizationExternalIdentityQuery) => Promise<IGetConnectUrlOrganizationExternalIdentityResponse>;
|
|
4
|
+
export declare const bindOrganizationExternalIdentity: (body: IBindOrganizationExternalIdentityBody) => Promise<IBindOrganizationExternalIdentityResponse>;
|
|
5
|
+
export declare const listPendingOrganizationExternalIdentity: (params: IListPendingOrganizationExternalIdentityParams, query?: IListPendingOrganizationExternalIdentityQuery) => Promise<IListPendingOrganizationExternalIdentityResponse>;
|
|
6
|
+
export declare const nameCandidateOrganizationExternalIdentity: (params: INameCandidateOrganizationExternalIdentityParams, body: INameCandidateOrganizationExternalIdentityBody) => Promise<INameCandidateOrganizationExternalIdentityResponse>;
|
|
7
|
+
export declare const dismissCandidateOrganizationExternalIdentity: (params: IDismissCandidateOrganizationExternalIdentityParams) => Promise<IDismissCandidateOrganizationExternalIdentityResponse>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dismissCandidateOrganizationExternalIdentity = exports.nameCandidateOrganizationExternalIdentity = exports.listPendingOrganizationExternalIdentity = exports.bindOrganizationExternalIdentity = exports.getConnectUrlOrganizationExternalIdentity = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getConnectUrlOrganizationExternalIdentity = async (params, query) => {
|
|
6
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/external-identity/connect-url`, { params: query })).data;
|
|
7
|
+
};
|
|
8
|
+
exports.getConnectUrlOrganizationExternalIdentity = getConnectUrlOrganizationExternalIdentity;
|
|
9
|
+
const bindOrganizationExternalIdentity = async (body) => {
|
|
10
|
+
return (await __1.AbyssCore.axios.post(`organization/external-identity/bind`, body)).data;
|
|
11
|
+
};
|
|
12
|
+
exports.bindOrganizationExternalIdentity = bindOrganizationExternalIdentity;
|
|
13
|
+
const listPendingOrganizationExternalIdentity = async (params, query) => {
|
|
14
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/external-identity/pending`, { params: query })).data;
|
|
15
|
+
};
|
|
16
|
+
exports.listPendingOrganizationExternalIdentity = listPendingOrganizationExternalIdentity;
|
|
17
|
+
const nameCandidateOrganizationExternalIdentity = async (params, body) => {
|
|
18
|
+
return (await __1.AbyssCore.axios.put(`organization/${params.organizationId}/external-identity/${params.organizationExternalIdentityId}/member`, body)).data;
|
|
19
|
+
};
|
|
20
|
+
exports.nameCandidateOrganizationExternalIdentity = nameCandidateOrganizationExternalIdentity;
|
|
21
|
+
const dismissCandidateOrganizationExternalIdentity = async (params) => {
|
|
22
|
+
return (await __1.AbyssCore.axios.delete(`organization/${params.organizationId}/external-identity/${params.organizationExternalIdentityId}`)).data;
|
|
23
|
+
};
|
|
24
|
+
exports.dismissCandidateOrganizationExternalIdentity = dismissCandidateOrganizationExternalIdentity;
|
|
25
|
+
//# sourceMappingURL=organization-external-identity.api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-external-identity.api.js","sourceRoot":"","sources":["../../src/api/organization-external-identity.api.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;AAmBxB,MAAM,yCAAyC,GAAG,KAAK,EAC5D,MAAwD,EACxD,KAAsD,EACO,EAAE;IAC/D,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,GAAG,CACvB,gBAAgB,MAAM,CAAC,cAAc,gCAAgC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ermissionsOrganizationMemberAdminResponse, IResolveOrgPermissionsAdminParams, IResolveOrgPermissionsAdminResponse, IListUserIdsByPermissionOrganizationMemberAdminParams, IListUserIdsByPermissionOrganizationMemberAdminBody, IListUserIdsByPermissionOrganizationMemberAdminResponse } from '../types';
|
|
1
|
+
import { IResolvePermissionsOrganizationMemberAdminParams, IResolvePermissionsOrganizationMemberAdminBody, IResolvePermissionsOrganizationMemberAdminResponse, IResolveOrgPermissionsAdminParams, IResolveOrgPermissionsAdminResponse, IListUserIdsByPermissionOrganizationMemberAdminParams, IListUserIdsByPermissionOrganizationMemberAdminBody, IListUserIdsByPermissionOrganizationMemberAdminResponse, IListMembersOrganizationMemberAdminParams, IListMembersOrganizationMemberAdminResponse } from '../types';
|
|
2
2
|
export declare const resolvePermissionsOrganizationMemberAdmin: (params: IResolvePermissionsOrganizationMemberAdminParams, body: IResolvePermissionsOrganizationMemberAdminBody) => Promise<IResolvePermissionsOrganizationMemberAdminResponse>;
|
|
3
3
|
export declare const resolveOrgPermissionsOrganizationMemberAdmin: (params: IResolveOrgPermissionsAdminParams) => Promise<IResolveOrgPermissionsAdminResponse>;
|
|
4
|
+
export declare const listMembersOrganizationMemberAdmin: (params: IListMembersOrganizationMemberAdminParams) => Promise<IListMembersOrganizationMemberAdminResponse>;
|
|
4
5
|
export declare const listUserIdsByPermissionOrganizationMemberAdmin: (params: IListUserIdsByPermissionOrganizationMemberAdminParams, body: IListUserIdsByPermissionOrganizationMemberAdminBody) => Promise<IListUserIdsByPermissionOrganizationMemberAdminResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listUserIdsByPermissionOrganizationMemberAdmin = exports.resolveOrgPermissionsOrganizationMemberAdmin = exports.resolvePermissionsOrganizationMemberAdmin = void 0;
|
|
3
|
+
exports.listUserIdsByPermissionOrganizationMemberAdmin = exports.listMembersOrganizationMemberAdmin = exports.resolveOrgPermissionsOrganizationMemberAdmin = exports.resolvePermissionsOrganizationMemberAdmin = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const resolvePermissionsOrganizationMemberAdmin = async (params, body) => {
|
|
6
6
|
return (await __1.AbyssCore.axios.post(`organization-member/admin/${params.organizationId}/resolve-permissions`, body)).data;
|
|
@@ -10,6 +10,10 @@ const resolveOrgPermissionsOrganizationMemberAdmin = async (params) => {
|
|
|
10
10
|
return (await __1.AbyssCore.axios.get(`organization-member/admin/${params.organizationMemberId}/resolved-permissions`)).data;
|
|
11
11
|
};
|
|
12
12
|
exports.resolveOrgPermissionsOrganizationMemberAdmin = resolveOrgPermissionsOrganizationMemberAdmin;
|
|
13
|
+
const listMembersOrganizationMemberAdmin = async (params) => {
|
|
14
|
+
return (await __1.AbyssCore.axios.get(`organization-member/admin/${params.organizationId}/members`)).data;
|
|
15
|
+
};
|
|
16
|
+
exports.listMembersOrganizationMemberAdmin = listMembersOrganizationMemberAdmin;
|
|
13
17
|
const listUserIdsByPermissionOrganizationMemberAdmin = async (params, body) => {
|
|
14
18
|
return (await __1.AbyssCore.axios.post(`organization-member/admin/${params.organizationId}/users-by-permission`, body)).data;
|
|
15
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization-member.admin.api.js","sourceRoot":"","sources":["../../src/api/organization-member.admin.api.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;
|
|
1
|
+
{"version":3,"file":"organization-member.admin.api.js","sourceRoot":"","sources":["../../src/api/organization-member.admin.api.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;AAcxB,MAAM,yCAAyC,GAAG,KAAK,EAC5D,MAAwD,EACxD,IAAoD,EACS,EAAE;IAC/D,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CACxB,6BAA6B,MAAM,CAAC,cAAc,sBAAsB,EACxE,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,yCAAyC,6CAUpD;AAEK,MAAM,4CAA4C,GAAG,KAAK,EAC/D,MAAyC,EACK,EAAE;IAChD,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,GAAG,CACvB,6BAA6B,MAAM,CAAC,oBAAoB,uBAAuB,CAChF,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,4CAA4C,gDAQvD;AAQK,MAAM,kCAAkC,GAAG,KAAK,EACrD,MAAiD,EACK,EAAE;IACxD,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,GAAG,CACvB,6BAA6B,MAAM,CAAC,cAAc,UAAU,CAC7D,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,kCAAkC,sCAQ7C;AAEK,MAAM,8CAA8C,GAAG,KAAK,EACjE,MAA6D,EAC7D,IAAyD,EACS,EAAE;IACpE,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CACxB,6BAA6B,MAAM,CAAC,cAAc,sBAAsB,EACxE,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,8CAA8C,kDAUzD"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { IUpdateUserBillingInfoBody, ISetUserQuotaCeilingBody, ISubscribeUserPlanBody, ICheckUserQuotaBody, IRecordUsageUserParams, IRecordUsageUserBody, IReserveQuotaUserParams, IReserveQuotaUserBody, IConfirmQuotaUserParams, IConfirmQuotaUserBody, IReleaseQuotaUserParams, IReleaseQuotaUserBody, IImportQuotaUserParams, IImportQuotaUserBody, ISetStorageSubtotalUserParams, ISetStorageSubtotalUserBody, IReserveStorageBytesUserBody, IReleaseStorageBytesUserBody, ICreateEurTopupUserBody, ICreatePortalSessionUserBody, IRemoveUserQuotaCapParams, IGetUserDailySnapshotParams, IListUserDailySnapshotsQuery, IDownloadUserInvoicePdfParams, IListUserCreditQuery, IListUserInvoicesQuery, IConfirmPaymentMethodUserBody, IAddUserQuotaCapBody, IPreviewUserPlanChangeQuery } from '../types/interface/api/requests/user-billing.request';
|
|
2
2
|
import type { IGetUserBillingResponse, IInitUserBillingResponse, IUpdateUserBillingInfoResponse, ISetUserQuotaCeilingResponse, ISubscribeUserPlanResponse, IPreviewUserPlanChangeResponse, IListUserInvoicesResponse, IListUserCreditResponse, IListUserEurTransactionsResponse, IGetUserQuotaResponse, ICheckUserQuotaResponse, IReserveQuotaUserResponse, IConfirmQuotaUserResponse, IReleaseQuotaUserResponse, IImportQuotaUserResponse, ICreatePortalSessionUserResponse, IListUserQuotaCapsResponse, IRecordUsageUserResponse, ICreateEurTopupUserResponse, ICancelScheduledDowngradeResponse, ISetupPaymentMethodUserResponse, IGetPaymentMethodUserResponse, IConfirmPaymentMethodUserResponse, IAddUserQuotaCapResponse, IGetUserStorageBreakdownResponse, IGetUserDailySnapshotResponse, IListUserDailySnapshotsResponse, ISetStorageSubtotalUserResponse, IReserveStorageBytesUserResponse, IGetFamilyBonusUserResponse } from '../types/interface/api/responses/user-billing.response';
|
|
3
|
+
import { IGetQuotaOfferUserParams } from '../types/interface/api/requests/quota-offer.request';
|
|
4
|
+
import { IGetQuotaOfferResponse } from '../types/interface/api/responses/quota-offer.response';
|
|
5
|
+
import { IGetBillingEstimateResponse } from '../types/interface/api/responses/billing-estimate.response';
|
|
6
|
+
import { ISetBillingModuleQuantityBody, ISetUserBillingModuleQuantityParams } from '../types/interface/api/requests/billing-module.request';
|
|
7
|
+
import { IListBillingModulesResponse, ISetBillingModuleQuantityResponse } from '../types/interface/api/responses/billing-module.response';
|
|
3
8
|
export declare const getUserBilling: () => Promise<IGetUserBillingResponse>;
|
|
4
9
|
export declare const initUserBilling: () => Promise<IInitUserBillingResponse>;
|
|
5
10
|
export declare const updateUserBillingInfo: (body: IUpdateUserBillingInfoBody) => Promise<IUpdateUserBillingInfoResponse>;
|
|
@@ -26,6 +31,10 @@ export declare const downloadUserInvoicePdf: (params: IDownloadUserInvoicePdfPar
|
|
|
26
31
|
export declare const listUserQuotaCaps: () => Promise<IListUserQuotaCapsResponse>;
|
|
27
32
|
export declare const addUserQuotaCap: (body: IAddUserQuotaCapBody) => Promise<IAddUserQuotaCapResponse>;
|
|
28
33
|
export declare const removeUserQuotaCap: (params: IRemoveUserQuotaCapParams) => Promise<void>;
|
|
34
|
+
export declare const listUserBillingModules: () => Promise<IListBillingModulesResponse>;
|
|
35
|
+
export declare const setUserBillingModuleQuantity: (params: ISetUserBillingModuleQuantityParams, body: ISetBillingModuleQuantityBody) => Promise<ISetBillingModuleQuantityResponse>;
|
|
36
|
+
export declare const getUserQuotaOffer: (params: IGetQuotaOfferUserParams) => Promise<IGetQuotaOfferResponse>;
|
|
37
|
+
export declare const getUserBillingEstimate: () => Promise<IGetBillingEstimateResponse>;
|
|
29
38
|
export declare const getUserStorageBreakdown: () => Promise<IGetUserStorageBreakdownResponse>;
|
|
30
39
|
export declare const getFamilyBonusUser: () => Promise<IGetFamilyBonusUserResponse>;
|
|
31
40
|
export declare const getUserDailySnapshot: (params: IGetUserDailySnapshotParams) => Promise<IGetUserDailySnapshotResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.importUserQuotaAdmin = exports.releaseUserQuotaAdmin = exports.confirmUserQuotaAdmin = exports.reserveUserQuotaAdmin = exports.checkUserQuotaAdmin = exports.listUserDailySnapshots = exports.getUserDailySnapshot = exports.getFamilyBonusUser = exports.getUserStorageBreakdown = exports.removeUserQuotaCap = exports.addUserQuotaCap = exports.listUserQuotaCaps = exports.downloadUserInvoicePdf = exports.createUserPortalSession = exports.releaseUserStorageBytes = exports.reserveUserStorageBytes = exports.setUserStorageSubtotal = exports.recordUserUsage = exports.confirmPaymentMethod = exports.deletePaymentMethod = exports.getPaymentMethod = exports.setupPaymentMethod = exports.cancelScheduledDowngrade = exports.createEurTopupCheckout = exports.checkUserQuota = exports.getUserQuota = exports.listUserEurTransactions = exports.listUserCredit = exports.listUserInvoices = exports.previewUserPlanChange = exports.setUserQuotaCeiling = exports.subscribeUserToPlan = exports.updateUserBillingInfo = exports.initUserBilling = exports.getUserBilling = void 0;
|
|
3
|
+
exports.importUserQuotaAdmin = exports.releaseUserQuotaAdmin = exports.confirmUserQuotaAdmin = exports.reserveUserQuotaAdmin = exports.checkUserQuotaAdmin = exports.listUserDailySnapshots = exports.getUserDailySnapshot = exports.getFamilyBonusUser = exports.getUserStorageBreakdown = exports.getUserBillingEstimate = exports.getUserQuotaOffer = exports.setUserBillingModuleQuantity = exports.listUserBillingModules = exports.removeUserQuotaCap = exports.addUserQuotaCap = exports.listUserQuotaCaps = exports.downloadUserInvoicePdf = exports.createUserPortalSession = exports.releaseUserStorageBytes = exports.reserveUserStorageBytes = exports.setUserStorageSubtotal = exports.recordUserUsage = exports.confirmPaymentMethod = exports.deletePaymentMethod = exports.getPaymentMethod = exports.setupPaymentMethod = exports.cancelScheduledDowngrade = exports.createEurTopupCheckout = exports.checkUserQuota = exports.getUserQuota = exports.listUserEurTransactions = exports.listUserCredit = exports.listUserInvoices = exports.previewUserPlanChange = exports.setUserQuotaCeiling = exports.subscribeUserToPlan = exports.updateUserBillingInfo = exports.initUserBilling = exports.getUserBilling = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const getUserBilling = async () => {
|
|
6
6
|
return (await __1.AbyssCore.axios.get(`user/billing`)).data;
|
|
@@ -113,6 +113,22 @@ const removeUserQuotaCap = async (params) => {
|
|
|
113
113
|
await __1.AbyssCore.axios.delete(`user/billing/caps/${params.capId}`);
|
|
114
114
|
};
|
|
115
115
|
exports.removeUserQuotaCap = removeUserQuotaCap;
|
|
116
|
+
const listUserBillingModules = async () => {
|
|
117
|
+
return (await __1.AbyssCore.axios.get(`user/billing/modules`)).data;
|
|
118
|
+
};
|
|
119
|
+
exports.listUserBillingModules = listUserBillingModules;
|
|
120
|
+
const setUserBillingModuleQuantity = async (params, body) => {
|
|
121
|
+
return (await __1.AbyssCore.axios.put(`user/billing/modules/${params.moduleId}`, body)).data;
|
|
122
|
+
};
|
|
123
|
+
exports.setUserBillingModuleQuantity = setUserBillingModuleQuantity;
|
|
124
|
+
const getUserQuotaOffer = async (params) => {
|
|
125
|
+
return (await __1.AbyssCore.axios.get(`user/quota/offer/${params.service}/${params.metric}`)).data;
|
|
126
|
+
};
|
|
127
|
+
exports.getUserQuotaOffer = getUserQuotaOffer;
|
|
128
|
+
const getUserBillingEstimate = async () => {
|
|
129
|
+
return (await __1.AbyssCore.axios.get(`user/billing/estimate`)).data;
|
|
130
|
+
};
|
|
131
|
+
exports.getUserBillingEstimate = getUserBillingEstimate;
|
|
116
132
|
const getUserStorageBreakdown = async () => {
|
|
117
133
|
return (await __1.AbyssCore.axios.get(`user/billing/storage-breakdown`)).data;
|
|
118
134
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-billing.api.js","sourceRoot":"","sources":["../../src/api/user-billing.api.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;
|
|
1
|
+
{"version":3,"file":"user-billing.api.js","sourceRoot":"","sources":["../../src/api/user-billing.api.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;AA4ExB,MAAM,cAAc,GAAG,KAAK,IAAsC,EAAE;IACzE,OAAO,CAAC,MAAM,aAAS,CAAC,KAAK,CAAC,GAAG,CAA0B,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;AACnF,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB;AAEK,MAAM,eAAe,GAAG,KAAK,IAAuC,EAAE;IAC3E,OAAO,CAAC,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CAA2B,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;AACrF,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEK,MAAM,qBAAqB,GAAG,KAAK,EACxC,IAAgC,EACS,EAAE;IAC3C,OAAO,CAAC,MAAM,aAAS,CAAC,KAAK,CAAC,GA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K,MAAM,qBAAqB,GAAG,KAAK,EACxC,MAA+B,EAC/B,IAA2B,EACS,EAAE;IACtC,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CACxB,QAAQ,MAAM,CAAC,MAAM,gBAAgB,EACrC,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,qBAAqB,yBAUhC;AAIK,MAAM,qBAAqB,GAAG,KAAK,EACxC,MAA+B,EAC/B,IAA2B,EACS,EAAE;IACtC,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CACxB,QAAQ,MAAM,CAAC,MAAM,gBAAgB,EACrC,IAAI,CACL,CACF,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAVW,QAAA,qBAAqB,yBAUhC;AAMK,MAAM,oBAAoB,GAAG,KAAK,EACvC,MAA8B,EAC9B,IAA0B,EACS,EAAE;IACrC,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CAA2B,QAAQ,MAAM,CAAC,MAAM,eAAe,EAAE,IAAI,CAAC,CACjG,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AAPW,QAAA,oBAAoB,wBAO/B"}
|
|
@@ -10,3 +10,5 @@ export declare const hydrateQuotasFromCatalog: (plan: {
|
|
|
10
10
|
quotas: IPlanServiceQuota[] | null | undefined;
|
|
11
11
|
isBespoke?: boolean;
|
|
12
12
|
}) => IPlanServiceQuota[];
|
|
13
|
+
export declare const PAID_TIER_ORDER: readonly string[];
|
|
14
|
+
export declare const planQuotaCoherenceIssues: (accountType: PlanAccountType, quotasByTier: Readonly<Record<string, readonly IPlanServiceQuota[]>>) => string[];
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hydrateQuotasFromCatalog = exports.catalogQuotasFor = exports.CATALOG_KEY_INHERITED_BY_BESPOKE = exports.CATALOG_PLAN_QUOTAS = void 0;
|
|
3
|
+
exports.planQuotaCoherenceIssues = exports.PAID_TIER_ORDER = exports.hydrateQuotasFromCatalog = exports.catalogQuotasFor = exports.CATALOG_KEY_INHERITED_BY_BESPOKE = exports.CATALOG_PLAN_QUOTAS = void 0;
|
|
4
4
|
const organization_billing_enum_1 = require("../types/enum/organization-billing.enum");
|
|
5
5
|
const plan_template_key_enum_1 = require("../types/enum/plan-template-key.enum");
|
|
6
|
+
const billing_catalog_constants_1 = require("./billing-catalog.constants");
|
|
6
7
|
const q = (service, metric, limit, sizePerUnit, unit) => ({ service, metric, limit, sizePerUnit, unit });
|
|
7
8
|
const USER_QUOTAS_FREEMIUM = [
|
|
8
9
|
q(organization_billing_enum_1.BillingService.ABYSS_PLATFORM, organization_billing_enum_1.BillingMetric.ACCOUNT_STORAGE_GB, 15, null, 'GB'),
|
|
@@ -396,4 +397,72 @@ const hydrateQuotasFromCatalog = (plan) => {
|
|
|
396
397
|
return inherited.length === 0 ? declared : [...declared, ...inherited];
|
|
397
398
|
};
|
|
398
399
|
exports.hydrateQuotasFromCatalog = hydrateQuotasFromCatalog;
|
|
400
|
+
exports.PAID_TIER_ORDER = ['starter', 'pro', 'enterprise'];
|
|
401
|
+
const COUPLED_METRICS = [
|
|
402
|
+
[organization_billing_enum_1.BillingMetric.ACCOUNT_STORAGE_GB, organization_billing_enum_1.BillingMetric.BANDWIDTH_GB],
|
|
403
|
+
[organization_billing_enum_1.BillingMetric.ACCOUNT_STORAGE_GB, organization_billing_enum_1.BillingMetric.PRESIGNED_URLS],
|
|
404
|
+
];
|
|
405
|
+
const COUPLED_RATIO_TOLERANCE = 2;
|
|
406
|
+
const limitOf = (quotas, metric) => quotas.find((quota) => quota.metric === metric)?.limit;
|
|
407
|
+
const planQuotaCoherenceIssues = (accountType, quotasByTier) => {
|
|
408
|
+
const issues = [];
|
|
409
|
+
const paidTiers = exports.PAID_TIER_ORDER.filter((tier) => quotasByTier[tier]);
|
|
410
|
+
const offered = new Set((0, billing_catalog_constants_1.billableServicesForAccountType)(accountType));
|
|
411
|
+
for (const [tier, quotas] of Object.entries(quotasByTier)) {
|
|
412
|
+
for (const quota of quotas) {
|
|
413
|
+
if (!offered.has(quota.service)) {
|
|
414
|
+
issues.push(`${accountType}/${tier} : ${quota.metric} relève de ${quota.service}, qui n'est pas offert à cette portée.`);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
const allPaidMetrics = new Set();
|
|
419
|
+
for (const tier of paidTiers) {
|
|
420
|
+
for (const quota of quotasByTier[tier]) {
|
|
421
|
+
allPaidMetrics.add(quota.metric);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
for (const tier of paidTiers) {
|
|
425
|
+
for (const metric of allPaidMetrics) {
|
|
426
|
+
if (limitOf(quotasByTier[tier], metric) === undefined) {
|
|
427
|
+
issues.push(`${accountType}/${tier} : ${metric} est servie sur un autre palier payant mais absente ici — une absence vaut zéro.`);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
const atLeast = (value, floor) => value === -1 || (floor !== -1 && value >= floor);
|
|
432
|
+
for (let i = 1; i < paidTiers.length; i += 1) {
|
|
433
|
+
const lower = quotasByTier[paidTiers[i - 1]];
|
|
434
|
+
const upper = quotasByTier[paidTiers[i]];
|
|
435
|
+
for (const metric of allPaidMetrics) {
|
|
436
|
+
const bas = limitOf(lower, metric);
|
|
437
|
+
const haut = limitOf(upper, metric);
|
|
438
|
+
if (bas === undefined || haut === undefined) {
|
|
439
|
+
continue;
|
|
440
|
+
}
|
|
441
|
+
if (!atLeast(haut, bas)) {
|
|
442
|
+
issues.push(`${accountType} : ${metric} est régressif entre ${paidTiers[i - 1]} (${bas}) et ${paidTiers[i]} (${haut}) — le client paie plus et reçoit moins.`);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
for (const [a, b] of COUPLED_METRICS) {
|
|
447
|
+
const rapports = [];
|
|
448
|
+
for (const tier of paidTiers) {
|
|
449
|
+
const x = limitOf(quotasByTier[tier], a);
|
|
450
|
+
const y = limitOf(quotasByTier[tier], b);
|
|
451
|
+
if (x === undefined || y === undefined || x <= 0 || y <= 0) {
|
|
452
|
+
continue;
|
|
453
|
+
}
|
|
454
|
+
rapports.push({ tier, ratio: y / x });
|
|
455
|
+
}
|
|
456
|
+
for (let i = 1; i < rapports.length; i += 1) {
|
|
457
|
+
const avant = rapports[i - 1];
|
|
458
|
+
const apres = rapports[i];
|
|
459
|
+
const ecart = Math.max(avant.ratio / apres.ratio, apres.ratio / avant.ratio);
|
|
460
|
+
if (ecart > COUPLED_RATIO_TOLERANCE) {
|
|
461
|
+
issues.push(`${accountType} : le rapport ${b} / ${a} passe de ${avant.ratio.toFixed(2)} (${avant.tier}) à ${apres.ratio.toFixed(2)} (${apres.tier}) — au-delà du facteur ${COUPLED_RATIO_TOLERANCE} toléré.`);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
return issues;
|
|
466
|
+
};
|
|
467
|
+
exports.planQuotaCoherenceIssues = planQuotaCoherenceIssues;
|
|
399
468
|
//# sourceMappingURL=catalog-plan-quotas.constants.js.map
|