@abyss-project/main 42.6.0 → 42.7.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/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/oauth-application.admin.api.d.ts +2 -0
- package/dist/api/oauth-application.admin.api.js +9 -0
- package/dist/api/oauth-application.admin.api.js.map +1 -0
- package/dist/api/oauth-application.api.d.ts +8 -0
- package/dist/api/oauth-application.api.js +30 -0
- package/dist/api/oauth-application.api.js.map +1 -0
- package/dist/api/oauth-authorization-request.api.d.ts +3 -2
- package/dist/api/oauth-authorization-request.api.js +5 -1
- package/dist/api/oauth-authorization-request.api.js.map +1 -1
- package/dist/api/oauth-grant.api.d.ts +4 -0
- package/dist/api/oauth-grant.api.js +15 -0
- package/dist/api/oauth-grant.api.js.map +1 -0
- package/dist/billing-metric-label/billing-metric-label.labels.d.ts +0 -4
- package/dist/billing-metric-label/billing-metric-label.labels.js +0 -4
- package/dist/billing-metric-label/billing-metric-label.labels.js.map +1 -1
- package/dist/constants/billing-catalog.constants.js +0 -7
- package/dist/constants/billing-catalog.constants.js.map +1 -1
- package/dist/constants/catalog-plan-quotas.constants.js +0 -6
- package/dist/constants/catalog-plan-quotas.constants.js.map +1 -1
- package/dist/constants/enforcement-registry.constants.js +0 -12
- package/dist/constants/enforcement-registry.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.js +0 -10
- package/dist/constants/metric-price-scale.constants.js.map +1 -1
- package/dist/constants/module-catalog.constants.d.ts +0 -2
- package/dist/constants/module-catalog.constants.js +2 -17
- package/dist/constants/module-catalog.constants.js.map +1 -1
- package/dist/constants/oauth-app.constants.d.ts +25 -0
- package/dist/constants/oauth-app.constants.js +75 -0
- package/dist/constants/oauth-app.constants.js.map +1 -0
- package/dist/constants/overage-base-rates.constants.js +0 -2
- package/dist/constants/overage-base-rates.constants.js.map +1 -1
- package/dist/constants/platform-cap.constants.d.ts +0 -2
- package/dist/constants/platform-cap.constants.js +1 -6
- package/dist/constants/platform-cap.constants.js.map +1 -1
- package/dist/constants/public-plans.constants.js +0 -78
- package/dist/constants/public-plans.constants.js.map +1 -1
- package/dist/constants/quota-metric-kind.constants.js +0 -4
- package/dist/constants/quota-metric-kind.constants.js.map +1 -1
- package/dist/constants/tests/module-catalog.constants.spec.js +1 -17
- package/dist/constants/tests/module-catalog.constants.spec.js.map +1 -1
- package/dist/constants/tests/oauth-app.constants.spec.js +112 -0
- package/dist/constants/tests/oauth-app.constants.spec.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/permissions/ability.d.ts +1 -1
- package/dist/permissions/ability.js +2 -0
- package/dist/permissions/ability.js.map +1 -1
- package/dist/permissions/tests/ability.spec.js +17 -0
- package/dist/permissions/tests/ability.spec.js.map +1 -1
- package/dist/server/api-cors.util.d.ts +8 -0
- package/dist/server/api-cors.util.js +83 -1
- package/dist/server/api-cors.util.js.map +1 -1
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.js +3 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/oauth-access-token.util.d.ts +27 -0
- package/dist/server/oauth-access-token.util.js +99 -0
- package/dist/server/oauth-access-token.util.js.map +1 -0
- package/dist/server/oauth-no-app-token.util.d.ts +7 -0
- package/dist/server/oauth-no-app-token.util.js +14 -0
- package/dist/server/oauth-no-app-token.util.js.map +1 -0
- package/dist/server/oauth-request-guard.util.d.ts +27 -0
- package/dist/server/oauth-request-guard.util.js +34 -0
- package/dist/server/oauth-request-guard.util.js.map +1 -0
- package/dist/server/tests/api-cors-dynamic.util.spec.d.ts +1 -0
- package/dist/server/tests/api-cors-dynamic.util.spec.js +220 -0
- package/dist/server/tests/api-cors-dynamic.util.spec.js.map +1 -0
- package/dist/server/tests/oauth-access-token.util.spec.d.ts +1 -0
- package/dist/server/tests/oauth-access-token.util.spec.js +142 -0
- package/dist/server/tests/oauth-access-token.util.spec.js.map +1 -0
- package/dist/server/tests/oauth-no-app-token.util.spec.d.ts +1 -0
- package/dist/server/tests/oauth-no-app-token.util.spec.js +40 -0
- package/dist/server/tests/oauth-no-app-token.util.spec.js.map +1 -0
- package/dist/server/tests/oauth-request-guard.util.spec.d.ts +1 -0
- package/dist/server/tests/oauth-request-guard.util.spec.js +80 -0
- package/dist/server/tests/oauth-request-guard.util.spec.js.map +1 -0
- package/dist/translate/en.translate.d.ts +0 -4
- package/dist/translate/en.translate.js +1 -5
- package/dist/translate/en.translate.js.map +1 -1
- package/dist/translate/fr.translate.d.ts +0 -4
- package/dist/translate/fr.translate.js +1 -5
- package/dist/translate/fr.translate.js.map +1 -1
- package/dist/types/enum/abyss-application-event.enum.d.ts +0 -1
- package/dist/types/enum/abyss-application-event.enum.js +0 -1
- package/dist/types/enum/abyss-application-event.enum.js.map +1 -1
- package/dist/types/enum/api-error.enum.d.ts +1 -0
- package/dist/types/enum/api-error.enum.js +1 -0
- package/dist/types/enum/api-error.enum.js.map +1 -1
- package/dist/types/enum/email-type.enum.d.ts +0 -1
- package/dist/types/enum/email-type.enum.js +0 -1
- package/dist/types/enum/email-type.enum.js.map +1 -1
- package/dist/types/enum/index.d.ts +1 -0
- package/dist/types/enum/index.js +1 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/oauth-app.enum.d.ts +59 -0
- package/dist/types/enum/oauth-app.enum.js +70 -0
- package/dist/types/enum/oauth-app.enum.js.map +1 -0
- package/dist/types/enum/organization-billing.enum.d.ts +1 -8
- package/dist/types/enum/organization-billing.enum.js +1 -9
- package/dist/types/enum/organization-billing.enum.js.map +1 -1
- package/dist/types/enum/project-access-permission.enum.d.ts +2 -1
- package/dist/types/enum/project-access-permission.enum.js +1 -0
- package/dist/types/enum/project-access-permission.enum.js.map +1 -1
- package/dist/types/enum/user-notification-category.enum.js +0 -1
- package/dist/types/enum/user-notification-category.enum.js.map +1 -1
- package/dist/types/enum/user-notification-content-type.enum.d.ts +0 -11
- package/dist/types/enum/user-notification-content-type.enum.js +1 -2
- package/dist/types/enum/user-notification-content-type.enum.js.map +1 -1
- package/dist/types/interface/api/index.d.ts +5 -0
- package/dist/types/interface/api/index.js +5 -0
- package/dist/types/interface/api/index.js.map +1 -1
- package/dist/types/interface/api/requests/billing-account.admin.request.d.ts +0 -1
- package/dist/types/interface/api/requests/index.d.ts +2 -0
- package/dist/types/interface/api/requests/index.js +2 -0
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/requests/oauth-application.request.d.ts +34 -0
- package/dist/types/interface/api/requests/oauth-application.request.js +3 -0
- package/dist/types/interface/api/requests/oauth-application.request.js.map +1 -0
- package/dist/types/interface/api/requests/oauth-authorization-request.request.d.ts +3 -0
- package/dist/types/interface/api/requests/oauth-grant.request.d.ts +3 -0
- package/dist/types/interface/api/requests/oauth-grant.request.js +3 -0
- package/dist/types/interface/api/requests/oauth-grant.request.js.map +1 -0
- package/dist/types/interface/api/responses/billing-account.admin.response.d.ts +0 -3
- package/dist/types/interface/api/responses/index.d.ts +3 -0
- package/dist/types/interface/api/responses/index.js +3 -0
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/api/responses/oauth-application.response.d.ts +43 -0
- package/dist/types/interface/api/responses/oauth-application.response.js +3 -0
- package/dist/types/interface/api/responses/oauth-application.response.js.map +1 -0
- package/dist/types/interface/api/responses/oauth-authorization-request.response.d.ts +24 -2
- package/dist/types/interface/api/responses/oauth-grant.response.d.ts +19 -0
- package/dist/types/interface/api/responses/oauth-grant.response.js +3 -0
- package/dist/types/interface/api/responses/oauth-grant.response.js.map +1 -0
- package/dist/types/interface/api/responses/oauth-userinfo.response.d.ts +8 -0
- package/dist/types/interface/api/responses/oauth-userinfo.response.js +3 -0
- package/dist/types/interface/api/responses/oauth-userinfo.response.js.map +1 -0
- package/dist/types/interface/api/responses/organization-billing.response.d.ts +1 -2
- package/dist/types/interface/mcp/mcp-oauth.d.ts +2 -0
- package/dist/types/interface/models/organization-service-quota.model.d.ts +0 -1
- package/package.json +3 -1
- package/dist/constants/tests/monitor-ingestion-catalog.spec.js +0 -108
- package/dist/constants/tests/monitor-ingestion-catalog.spec.js.map +0 -1
- /package/dist/constants/tests/{monitor-ingestion-catalog.spec.d.ts → oauth-app.constants.spec.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-grant.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/oauth-grant.response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-userinfo.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/oauth-userinfo.response.ts"],"names":[],"mappings":""}
|
|
@@ -14,7 +14,7 @@ import { IQuotaGrant } from '../../models/quota-grant.model';
|
|
|
14
14
|
import { IStorageBreakdown } from '../../models/storage-subtotal.model';
|
|
15
15
|
import { IBillingDailySnapshot } from '../../models/billing-daily-snapshot.model';
|
|
16
16
|
import { IResponse } from '../type-message/response';
|
|
17
|
-
import {
|
|
17
|
+
import { QuotaDenialReason } from '../../../enum/organization-billing.enum';
|
|
18
18
|
export interface IGetBillingOrganizationData {
|
|
19
19
|
billingAccount: IBillingAccount;
|
|
20
20
|
}
|
|
@@ -69,7 +69,6 @@ export interface IListCreditOrganizationData {
|
|
|
69
69
|
}
|
|
70
70
|
export type IListCreditOrganizationResponse = IResponse<IListCreditOrganizationData>;
|
|
71
71
|
export interface IPlatformCapState {
|
|
72
|
-
scope: PlatformCapScope;
|
|
73
72
|
usage: number;
|
|
74
73
|
cap: number;
|
|
75
74
|
resetsAt: string;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { McpFunctionalScope, McpScopeType } from '../../enum/mcp.enum';
|
|
2
2
|
import type { McpOAuthClientSource } from '../../enum/mcp-oauth.enum';
|
|
3
|
+
import type { OAuthAuthorizationRequestKind } from '../../enum/oauth-app.enum';
|
|
3
4
|
export type McpOAuthAuthorizationRequestStatus = 'OPEN' | 'EXPIRED' | 'CONSUMED';
|
|
4
5
|
export interface IMcpOAuthApprovedScope {
|
|
5
6
|
scopeType: McpScopeType;
|
|
6
7
|
scopeId: string | null;
|
|
7
8
|
}
|
|
8
9
|
export interface IMcpOAuthAuthorizationRequestView {
|
|
10
|
+
kind: OAuthAuthorizationRequestKind.MCP;
|
|
9
11
|
id: string;
|
|
10
12
|
client: {
|
|
11
13
|
name: string;
|
|
@@ -11,7 +11,6 @@ export interface IServiceQuota {
|
|
|
11
11
|
ceilingValue: number | null;
|
|
12
12
|
overageNanocentsPerUnit?: number | null;
|
|
13
13
|
platformCapMonthly?: number | null;
|
|
14
|
-
platformCapDaily?: number | null;
|
|
15
14
|
updatedAt?: Date;
|
|
16
15
|
createdAt?: Date;
|
|
17
16
|
billingAccount?: IBillingAccount;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abyss-project/main",
|
|
3
|
-
"version": "42.
|
|
3
|
+
"version": "42.7.0",
|
|
4
4
|
"description": "Core package to interact with Abyss-Project",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"byte-size": "^8.1.0",
|
|
62
62
|
"date-fns": "^2.29.3",
|
|
63
63
|
"dayjs": "^1.10.7",
|
|
64
|
+
"jsonwebtoken": "^9.0.0",
|
|
64
65
|
"lodash": "^4.17.21",
|
|
65
66
|
"lz-string": "^1.5.0",
|
|
66
67
|
"reflect-metadata": "^0.1.13",
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
"@types/express": "^4.17.21",
|
|
73
74
|
"@types/express-serve-static-core": "^4.17.28",
|
|
74
75
|
"@types/jest": "^29.5.5",
|
|
76
|
+
"@types/jsonwebtoken": "^9.0.1",
|
|
75
77
|
"@types/lodash": "^4.14.177",
|
|
76
78
|
"@types/node": "^20.11.0",
|
|
77
79
|
"@types/uuid": "^9.0.0",
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const organization_billing_enum_1 = require("../../types/enum/organization-billing.enum");
|
|
4
|
-
const plan_template_key_enum_1 = require("../../types/enum/plan-template-key.enum");
|
|
5
|
-
const billing_metric_label_labels_1 = require("../../billing-metric-label/billing-metric-label.labels");
|
|
6
|
-
const billing_catalog_constants_1 = require("../billing-catalog.constants");
|
|
7
|
-
const catalog_plan_quotas_constants_1 = require("../catalog-plan-quotas.constants");
|
|
8
|
-
const enforcement_registry_constants_1 = require("../enforcement-registry.constants");
|
|
9
|
-
const metric_price_scale_constants_1 = require("../metric-price-scale.constants");
|
|
10
|
-
const overage_base_rates_constants_1 = require("../overage-base-rates.constants");
|
|
11
|
-
const platform_cap_constants_1 = require("../platform-cap.constants");
|
|
12
|
-
const quota_metric_kind_constants_1 = require("../quota-metric-kind.constants");
|
|
13
|
-
const limitOf = (key, service, metric) => catalog_plan_quotas_constants_1.CATALOG_PLAN_QUOTAS[organization_billing_enum_1.PlanAccountType.ORGANIZATION][key]?.find((entry) => entry.service === service && entry.metric === metric)?.limit;
|
|
14
|
-
describe('MONITOR_INGESTED_GB in the catalog (ADR-0327)', () => {
|
|
15
|
-
const metric = organization_billing_enum_1.BillingMetric.MONITOR_INGESTED_GB;
|
|
16
|
-
it('is a FLOW metric of AbyssMonitor, in GB, billed past the allowance', () => {
|
|
17
|
-
expect(billing_catalog_constants_1.BILLABLE_SERVICE_METRICS[organization_billing_enum_1.BillingService.ABYSS_MONITOR]).toContain(metric);
|
|
18
|
-
expect(quota_metric_kind_constants_1.QUOTA_METRIC_KIND[metric]).toBe('FLOW');
|
|
19
|
-
expect(billing_catalog_constants_1.METRIC_UNIT[metric]).toBe('GB');
|
|
20
|
-
expect(billing_catalog_constants_1.METRIC_IS_OVERAGE_ELIGIBLE.has(metric)).toBe(true);
|
|
21
|
-
expect(billing_catalog_constants_1.METRIC_SLIDER_CONFIG[metric]).toEqual({
|
|
22
|
-
min: 1,
|
|
23
|
-
max: 4000,
|
|
24
|
-
step: 1,
|
|
25
|
-
unlimitedAllowed: false,
|
|
26
|
-
});
|
|
27
|
-
expect(enforcement_registry_constants_1.ENFORCEMENT_REGISTRY[metric]).toMatchObject({
|
|
28
|
-
mode: 'METER_BILL_DEGRADE',
|
|
29
|
-
repo: 'abyss-monitor',
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
it('is labelled in French and English', () => {
|
|
33
|
-
expect(billing_metric_label_labels_1.BILLING_METRIC_LABELS.fr.MONITOR_INGESTED_GB).toBe('Go ingérés (Monitor)');
|
|
34
|
-
expect(billing_metric_label_labels_1.BILLING_METRIC_LABELS.en.MONITOR_INGESTED_GB).toBe('Ingested GB (Monitor)');
|
|
35
|
-
});
|
|
36
|
-
it('is priced 36 / 25 / 17.5 cents per GB, overage 72 cents', () => {
|
|
37
|
-
expect(metric_price_scale_constants_1.METRIC_PRICE_SCALE[metric]).toEqual([
|
|
38
|
-
{ upToQuantity: 40, nanocentsPerUnit: 36_000_000_000 },
|
|
39
|
-
{ upToQuantity: 400, nanocentsPerUnit: 25_000_000_000 },
|
|
40
|
-
{ upToQuantity: null, nanocentsPerUnit: 17_500_000_000 },
|
|
41
|
-
]);
|
|
42
|
-
expect(overage_base_rates_constants_1.DEFAULT_OVERAGE_BASE_RATES[metric]).toEqual({ rate: 72, unit: 'GB' });
|
|
43
|
-
});
|
|
44
|
-
it('grants 1 / 12 / 120 GB to the organisation plans and nothing to personal plans', () => {
|
|
45
|
-
const monitor = organization_billing_enum_1.BillingService.ABYSS_MONITOR;
|
|
46
|
-
expect(limitOf(plan_template_key_enum_1.PlanTemplateKey.FREEMIUM, monitor, metric)).toBe(1);
|
|
47
|
-
expect(limitOf(plan_template_key_enum_1.PlanTemplateKey.STARTER, monitor, metric)).toBe(12);
|
|
48
|
-
expect(limitOf(plan_template_key_enum_1.PlanTemplateKey.PRO, monitor, metric)).toBe(120);
|
|
49
|
-
expect(limitOf(plan_template_key_enum_1.PlanTemplateKey.DEMO, monitor, metric)).toBe(120);
|
|
50
|
-
for (const type of [organization_billing_enum_1.PlanAccountType.USER, organization_billing_enum_1.PlanAccountType.FAMILY]) {
|
|
51
|
-
for (const quotas of Object.values(catalog_plan_quotas_constants_1.CATALOG_PLAN_QUOTAS[type])) {
|
|
52
|
-
expect(quotas?.some((entry) => entry.metric === metric)).toBe(false);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
describe('HISTORY_RETENTION_GB_DAYS in the catalog (ADR-0327)', () => {
|
|
58
|
-
const metric = organization_billing_enum_1.BillingMetric.HISTORY_RETENTION_GB_DAYS;
|
|
59
|
-
it('is an account-level FLOW metric of ABYSS_PLATFORM, in GB-days, billed past the allowance', () => {
|
|
60
|
-
expect(billing_catalog_constants_1.BILLABLE_SERVICE_METRICS[organization_billing_enum_1.BillingService.ABYSS_PLATFORM]).toContain(metric);
|
|
61
|
-
expect(quota_metric_kind_constants_1.QUOTA_METRIC_KIND[metric]).toBe('FLOW');
|
|
62
|
-
expect(billing_catalog_constants_1.METRIC_UNIT[metric]).toBe('GB-days');
|
|
63
|
-
expect(billing_catalog_constants_1.METRIC_IS_OVERAGE_ELIGIBLE.has(metric)).toBe(true);
|
|
64
|
-
expect(enforcement_registry_constants_1.ENFORCEMENT_REGISTRY[metric]).toMatchObject({ mode: 'METER_BILL_DEGRADE' });
|
|
65
|
-
});
|
|
66
|
-
it('is labelled in French and English', () => {
|
|
67
|
-
expect(billing_metric_label_labels_1.BILLING_METRIC_LABELS.fr.HISTORY_RETENTION_GB_DAYS).toBe('Conservation des historiques (Go-jour)');
|
|
68
|
-
expect(billing_metric_label_labels_1.BILLING_METRIC_LABELS.en.HISTORY_RETENTION_GB_DAYS).toBe('History retention (GB-days)');
|
|
69
|
-
});
|
|
70
|
-
it('is priced 0.50 / 0.45 / 0.40 cent per GB-day, overage 1 cent', () => {
|
|
71
|
-
expect(metric_price_scale_constants_1.METRIC_PRICE_SCALE[metric]).toEqual([
|
|
72
|
-
{ upToQuantity: 3_000, nanocentsPerUnit: 500_000_000 },
|
|
73
|
-
{ upToQuantity: 30_000, nanocentsPerUnit: 450_000_000 },
|
|
74
|
-
{ upToQuantity: null, nanocentsPerUnit: 400_000_000 },
|
|
75
|
-
]);
|
|
76
|
-
expect(overage_base_rates_constants_1.DEFAULT_OVERAGE_BASE_RATES[metric]).toEqual({ rate: 1, unit: 'GB-days' });
|
|
77
|
-
});
|
|
78
|
-
it('grants 10 / 400 / 12 000 GB-days to the organisation plans only', () => {
|
|
79
|
-
const platform = organization_billing_enum_1.BillingService.ABYSS_PLATFORM;
|
|
80
|
-
expect(limitOf(plan_template_key_enum_1.PlanTemplateKey.FREEMIUM, platform, metric)).toBe(10);
|
|
81
|
-
expect(limitOf(plan_template_key_enum_1.PlanTemplateKey.STARTER, platform, metric)).toBe(400);
|
|
82
|
-
expect(limitOf(plan_template_key_enum_1.PlanTemplateKey.PRO, platform, metric)).toBe(12000);
|
|
83
|
-
expect(limitOf(plan_template_key_enum_1.PlanTemplateKey.DEMO, platform, metric)).toBe(12000);
|
|
84
|
-
expect(billing_catalog_constants_1.USER_RELEVANT_METRICS[platform]).not.toContain(metric);
|
|
85
|
-
expect(billing_catalog_constants_1.FAMILY_RELEVANT_METRICS[platform]).not.toContain(metric);
|
|
86
|
-
for (const type of [organization_billing_enum_1.PlanAccountType.USER, organization_billing_enum_1.PlanAccountType.FAMILY]) {
|
|
87
|
-
for (const quotas of Object.values(catalog_plan_quotas_constants_1.CATALOG_PLAN_QUOTAS[type])) {
|
|
88
|
-
expect(quotas?.some((entry) => entry.metric === metric)).toBe(false);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
describe('the platform cap of the two metrics (ADR-0312 decision 8, ADR-0327)', () => {
|
|
94
|
-
it('covers the two metrics with the service that meters them', () => {
|
|
95
|
-
expect(platform_cap_constants_1.PLATFORM_CAPPED_METRIC_SERVICE.get(organization_billing_enum_1.BillingMetric.MONITOR_INGESTED_GB)).toBe(organization_billing_enum_1.BillingService.ABYSS_MONITOR);
|
|
96
|
-
expect(platform_cap_constants_1.PLATFORM_CAPPED_METRIC_SERVICE.get(organization_billing_enum_1.BillingMetric.HISTORY_RETENTION_GB_DAYS)).toBe(organization_billing_enum_1.BillingService.ABYSS_PLATFORM);
|
|
97
|
-
expect(platform_cap_constants_1.PLATFORM_CAPPED_METRIC_SERVICE.get(organization_billing_enum_1.BillingMetric.LOG_EVENTS)).toBe(organization_billing_enum_1.BillingService.ABYSS_MONITOR);
|
|
98
|
-
});
|
|
99
|
-
it('bounds one UTC day at 20 % of the included limit', () => {
|
|
100
|
-
expect(platform_cap_constants_1.PLATFORM_CAP_DAILY_FRACTION).toBe(0.2);
|
|
101
|
-
expect((0, platform_cap_constants_1.platformCapDailyBound)(100)).toBe(20);
|
|
102
|
-
});
|
|
103
|
-
it('names the daily denial and the two scopes', () => {
|
|
104
|
-
expect(organization_billing_enum_1.QuotaDenialReason.PLATFORM_CAP_DAY).toBe('PLATFORM_CAP_DAY');
|
|
105
|
-
expect(Object.values(organization_billing_enum_1.PlatformCapScope)).toEqual(['MONTH', 'DAY']);
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
//# sourceMappingURL=monitor-ingestion-catalog.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monitor-ingestion-catalog.spec.js","sourceRoot":"","sources":["../../../src/constants/tests/monitor-ingestion-catalog.spec.ts"],"names":[],"mappings":";;AAAA,0FAMoD;AACpD,oFAA0E;AAC1E,wGAA+F;AAC/F,4EAOsC;AACtC,oFAAuE;AACvE,sFAAyE;AACzE,kFAAqE;AACrE,k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