@bpinternal/const 0.12.0 → 0.13.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/billing-legacy/consts.d.ts +9 -0
- package/dist/billing-legacy/consts.js +53 -0
- package/dist/billing-legacy/index.d.ts +2 -0
- package/dist/billing-legacy/index.js +18 -0
- package/dist/billing-next/config/addons.d.ts +181 -0
- package/dist/{billing-addons.js → billing-next/config/addons.js} +70 -47
- package/dist/billing-next/config/index.d.ts +5 -0
- package/dist/billing-next/config/index.js +18 -0
- package/dist/{billing-meters.d.ts → billing-next/config/meters.d.ts} +22 -12
- package/dist/{billing-meters.js → billing-next/config/meters.js} +15 -9
- package/dist/{billing-plans.d.ts → billing-next/config/plans.d.ts} +59 -43
- package/dist/{billing-plans.js → billing-next/config/plans.js} +40 -48
- package/dist/{schema.d.ts → billing-next/config/schemas.d.ts} +392 -196
- package/dist/{schema.js → billing-next/config/schemas.js} +19 -12
- package/dist/billing-next/config/versions.d.ts +829 -0
- package/dist/billing-next/config/versions.js +27 -0
- package/dist/billing-next/consts.d.ts +5 -0
- package/dist/billing-next/consts.js +8 -0
- package/dist/billing-next/features.d.ts +125 -0
- package/dist/billing-next/features.js +127 -0
- package/dist/billing-next/index.d.ts +3 -0
- package/dist/billing-next/index.js +19 -0
- package/dist/billing-next/type-utils.d.ts +4 -0
- package/dist/{types.js → billing-next/type-utils.js} +1 -0
- package/dist/index.d.ts +2 -9
- package/dist/index.js +2 -10
- package/package.json +1 -1
- package/dist/billing-addons.d.ts +0 -136
- package/dist/billing-features.d.ts +0 -94
- package/dist/billing-features.js +0 -132
- package/dist/billing-versions.d.ts +0 -10
- package/dist/billing-versions.js +0 -37
- package/dist/types.d.ts +0 -82
- package/dist/usage-metadata.d.ts +0 -22
- package/dist/usage-metadata.js +0 -138
- /package/dist/{quotas.d.ts → billing-legacy/quotas.d.ts} +0 -0
- /package/dist/{quotas.js → billing-legacy/quotas.js} +0 -0
package/dist/billing-features.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Billing features for v4 billing system
|
|
4
|
-
* Based on the requirements from the billing refactor document
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.billingFeatureDefs = exports.CREDIT_GRANT_BILLING_FEATURE_IDS = exports.NON_RESETTING_BILLING_FEATURE_IDS = exports.NON_ATOMIC_BILLING_FEATURE_IDS = exports.ATOMIC_BILLING_FEATURE_IDS = exports.BILLING_FEATURE_IDS = void 0;
|
|
8
|
-
exports.BILLING_FEATURE_IDS = [
|
|
9
|
-
'human_in_the_loop',
|
|
10
|
-
'ratelimit',
|
|
11
|
-
'incoming_messages_events',
|
|
12
|
-
'integration_spend',
|
|
13
|
-
'integration_subscription',
|
|
14
|
-
'table_rows',
|
|
15
|
-
'bot_count',
|
|
16
|
-
'always_alive_count',
|
|
17
|
-
'always_alive_concurrency',
|
|
18
|
-
'collaborator_count',
|
|
19
|
-
'file_storage',
|
|
20
|
-
'vector_db_storage',
|
|
21
|
-
'indexed_file_count',
|
|
22
|
-
'saved_versions',
|
|
23
|
-
];
|
|
24
|
-
exports.ATOMIC_BILLING_FEATURE_IDS = [
|
|
25
|
-
'integration_subscription',
|
|
26
|
-
'bot_count',
|
|
27
|
-
'always_alive_count',
|
|
28
|
-
'always_alive_concurrency',
|
|
29
|
-
'collaborator_count',
|
|
30
|
-
'saved_versions',
|
|
31
|
-
];
|
|
32
|
-
exports.NON_ATOMIC_BILLING_FEATURE_IDS = [
|
|
33
|
-
'incoming_messages_events',
|
|
34
|
-
'integration_spend',
|
|
35
|
-
'table_rows',
|
|
36
|
-
'file_storage',
|
|
37
|
-
'vector_db_storage',
|
|
38
|
-
'indexed_file_count',
|
|
39
|
-
];
|
|
40
|
-
exports.NON_RESETTING_BILLING_FEATURE_IDS = [
|
|
41
|
-
...exports.ATOMIC_BILLING_FEATURE_IDS,
|
|
42
|
-
'table_rows',
|
|
43
|
-
'file_storage',
|
|
44
|
-
'vector_db_storage',
|
|
45
|
-
'indexed_file_count',
|
|
46
|
-
];
|
|
47
|
-
exports.CREDIT_GRANT_BILLING_FEATURE_IDS = ['integration_spend'];
|
|
48
|
-
exports.billingFeatureDefs = {
|
|
49
|
-
human_in_the_loop: {
|
|
50
|
-
name: 'Human in the Loop',
|
|
51
|
-
description: 'Ability to enable human intervention in bot conversations',
|
|
52
|
-
type: 'boolean',
|
|
53
|
-
},
|
|
54
|
-
ratelimit: {
|
|
55
|
-
name: 'Rate Limit',
|
|
56
|
-
description: 'API rate limiting configuration',
|
|
57
|
-
type: 'static',
|
|
58
|
-
},
|
|
59
|
-
incoming_messages_events: {
|
|
60
|
-
name: 'Incoming Messages/Events',
|
|
61
|
-
description: 'Number of incoming messages and events processed per month',
|
|
62
|
-
type: 'usage',
|
|
63
|
-
resetPeriod: 'monthly',
|
|
64
|
-
dimensions: {
|
|
65
|
-
botId: 'Bot ID',
|
|
66
|
-
type: 'Message or Event type',
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
integration_spend: {
|
|
70
|
-
name: 'Integration Spend',
|
|
71
|
-
description: 'Credits spent on integrations (AI, third-party services)',
|
|
72
|
-
type: 'usage',
|
|
73
|
-
resetPeriod: 'monthly',
|
|
74
|
-
dimensions: {
|
|
75
|
-
botId: 'Bot ID',
|
|
76
|
-
integrationName: 'Integration name',
|
|
77
|
-
integrationVersionId: 'Integration version ID',
|
|
78
|
-
actionName: 'Action name',
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
integration_subscription: {
|
|
82
|
-
name: 'Integration Subscription',
|
|
83
|
-
description: 'Monthly subscription to premium integrations',
|
|
84
|
-
type: 'subscription',
|
|
85
|
-
resetPeriod: 'monthly',
|
|
86
|
-
},
|
|
87
|
-
table_rows: {
|
|
88
|
-
name: 'Table Rows',
|
|
89
|
-
description: 'Number of table rows that can be stored',
|
|
90
|
-
type: 'static',
|
|
91
|
-
},
|
|
92
|
-
bot_count: {
|
|
93
|
-
name: 'Bot Count',
|
|
94
|
-
description: 'Number of bots that can be created',
|
|
95
|
-
type: 'static',
|
|
96
|
-
},
|
|
97
|
-
always_alive_count: {
|
|
98
|
-
name: 'Always Alive Count',
|
|
99
|
-
description: 'Number of bots that can be kept always alive',
|
|
100
|
-
type: 'static',
|
|
101
|
-
},
|
|
102
|
-
always_alive_concurrency: {
|
|
103
|
-
name: 'Always Alive Concurrency',
|
|
104
|
-
description: 'Number of concurrent instances for always alive bots',
|
|
105
|
-
type: 'static',
|
|
106
|
-
},
|
|
107
|
-
collaborator_count: {
|
|
108
|
-
name: 'Collaborator Count',
|
|
109
|
-
description: 'Number of collaborators that can be added to workspace',
|
|
110
|
-
type: 'static',
|
|
111
|
-
},
|
|
112
|
-
file_storage: {
|
|
113
|
-
name: 'File Storage',
|
|
114
|
-
description: 'Amount of file storage available',
|
|
115
|
-
type: 'static',
|
|
116
|
-
},
|
|
117
|
-
vector_db_storage: {
|
|
118
|
-
name: 'Vector DB Storage',
|
|
119
|
-
description: 'Amount of vector database storage available',
|
|
120
|
-
type: 'static',
|
|
121
|
-
},
|
|
122
|
-
saved_versions: {
|
|
123
|
-
name: 'Saved Versions',
|
|
124
|
-
description: 'Number of bot versions that can be saved',
|
|
125
|
-
type: 'static',
|
|
126
|
-
},
|
|
127
|
-
indexed_file_count: {
|
|
128
|
-
name: 'Indexed File Count',
|
|
129
|
-
description: 'The number of indexed files in the files api',
|
|
130
|
-
type: 'static',
|
|
131
|
-
},
|
|
132
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Billing versions for v4 billing system
|
|
3
|
-
* Each version represents a complete billing configuration
|
|
4
|
-
*/
|
|
5
|
-
import { BillingDefinition, BillingVersionDefinition, BillingVersionId } from './types';
|
|
6
|
-
export declare const BILLING_VERSIONS: readonly ["v4"];
|
|
7
|
-
export declare const billingV4Definition: BillingVersionDefinition;
|
|
8
|
-
export declare const billingDefinitions: BillingDefinition;
|
|
9
|
-
export declare const getActiveBillingVersion: () => BillingVersionDefinition;
|
|
10
|
-
export declare const getBillingVersion: (version: BillingVersionId) => BillingVersionDefinition;
|
package/dist/billing-versions.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Billing versions for v4 billing system
|
|
4
|
-
* Each version represents a complete billing configuration
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.getBillingVersion = exports.getActiveBillingVersion = exports.billingDefinitions = exports.billingV4Definition = exports.BILLING_VERSIONS = void 0;
|
|
8
|
-
const billing_plans_1 = require("./billing-plans");
|
|
9
|
-
const billing_addons_1 = require("./billing-addons");
|
|
10
|
-
const billing_meters_1 = require("./billing-meters");
|
|
11
|
-
exports.BILLING_VERSIONS = ['v4'];
|
|
12
|
-
exports.billingV4Definition = {
|
|
13
|
-
version: 'v4',
|
|
14
|
-
name: 'Billing Version 4',
|
|
15
|
-
description: 'New billing system with credit grants and entitlements',
|
|
16
|
-
plans: billing_plans_1.billingPlansDefs,
|
|
17
|
-
addons: billing_addons_1.billingAddonsDefs,
|
|
18
|
-
meters: billing_meters_1.billingMetersDefs,
|
|
19
|
-
isActive: true,
|
|
20
|
-
createdAt: new Date().toISOString(),
|
|
21
|
-
// stripeMapping will be populated by Pulumi
|
|
22
|
-
};
|
|
23
|
-
exports.billingDefinitions = {
|
|
24
|
-
v4: exports.billingV4Definition,
|
|
25
|
-
};
|
|
26
|
-
const getActiveBillingVersion = () => {
|
|
27
|
-
const activeVersion = Object.values(exports.billingDefinitions).find((v) => v.isActive);
|
|
28
|
-
if (!activeVersion) {
|
|
29
|
-
throw new Error('No active billing version found');
|
|
30
|
-
}
|
|
31
|
-
return activeVersion;
|
|
32
|
-
};
|
|
33
|
-
exports.getActiveBillingVersion = getActiveBillingVersion;
|
|
34
|
-
const getBillingVersion = (version) => {
|
|
35
|
-
return exports.billingDefinitions[version];
|
|
36
|
-
};
|
|
37
|
-
exports.getBillingVersion = getBillingVersion;
|
package/dist/types.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { BILLING_FEATURE_IDS } from './billing-features';
|
|
2
|
-
import { BILLING_METERS_IDS } from './billing-meters';
|
|
3
|
-
import { BILLING_PLAN_IDS, BILLING_ADDON_IDS } from './billing-plans';
|
|
4
|
-
import { BILLING_VERSIONS } from './billing-versions';
|
|
5
|
-
import { billingVersionConfigSchema, billingConfigSchema, intervalSchema, unitAmountSchema, aggregationSchema, meterTypeSchema, priceSchema, planSchema, addOnSchema, meterSchema, meteredPriceSchema } from './schema';
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
-
export type Interval = z.infer<typeof intervalSchema>;
|
|
8
|
-
export type UnitAmount = z.infer<typeof unitAmountSchema>;
|
|
9
|
-
export type Aggregation = z.infer<typeof aggregationSchema>;
|
|
10
|
-
export type MeterType = z.infer<typeof meterTypeSchema>;
|
|
11
|
-
export type BillingFeatureId = (typeof BILLING_FEATURE_IDS)[number];
|
|
12
|
-
export type BillingAddonId = (typeof BILLING_ADDON_IDS)[number];
|
|
13
|
-
export type BillingPlanId = (typeof BILLING_PLAN_IDS)[number];
|
|
14
|
-
export type BillingMeterId = (typeof BILLING_METERS_IDS)[number];
|
|
15
|
-
export type BillingFeatureDefinition = {
|
|
16
|
-
name: string;
|
|
17
|
-
description: string;
|
|
18
|
-
type: 'boolean' | 'static' | 'usage' | 'subscription';
|
|
19
|
-
resetPeriod?: 'monthly' | 'yearly' | 'never';
|
|
20
|
-
dimensions?: Record<string, string>;
|
|
21
|
-
metadata?: Record<string, string>;
|
|
22
|
-
};
|
|
23
|
-
export type BillingPriceDefinition = {
|
|
24
|
-
price: number;
|
|
25
|
-
currency: 'usd';
|
|
26
|
-
interval: Interval;
|
|
27
|
-
};
|
|
28
|
-
export type BillingMeteredPriceDefinition = {
|
|
29
|
-
unitAmount: number;
|
|
30
|
-
currency: 'usd';
|
|
31
|
-
interval: Interval;
|
|
32
|
-
};
|
|
33
|
-
export type BillingPlanDefinition = {
|
|
34
|
-
id: BillingPlanId;
|
|
35
|
-
name: string;
|
|
36
|
-
description: string;
|
|
37
|
-
tierIndex: number;
|
|
38
|
-
prices: Array<BillingPriceDefinition>;
|
|
39
|
-
features: Partial<Record<BillingFeatureId, number | boolean>>;
|
|
40
|
-
metadata?: Record<string, string>;
|
|
41
|
-
};
|
|
42
|
-
export type BillingAddonDefinition = Omit<BillingAddon, 'id' | 'prices' | 'providerProductId'> & {
|
|
43
|
-
id: BillingAddonId;
|
|
44
|
-
prices: Array<BillingPriceDefinition>;
|
|
45
|
-
};
|
|
46
|
-
export type BillingMeterDefinition = {
|
|
47
|
-
id: BillingMeterId;
|
|
48
|
-
name: string;
|
|
49
|
-
description: string;
|
|
50
|
-
defaultAggregation: {
|
|
51
|
-
formula: Aggregation;
|
|
52
|
-
};
|
|
53
|
-
customerMapping: {
|
|
54
|
-
eventPayloadKey: 'stripe_customer_id';
|
|
55
|
-
type: 'by_id';
|
|
56
|
-
};
|
|
57
|
-
valueSettings: {
|
|
58
|
-
eventPayloadKey: 'value';
|
|
59
|
-
};
|
|
60
|
-
prices: Array<BillingMeteredPriceDefinition>;
|
|
61
|
-
meterType: MeterType;
|
|
62
|
-
metadata?: Record<string, string>;
|
|
63
|
-
};
|
|
64
|
-
export type BillingVersionId = (typeof BILLING_VERSIONS)[number];
|
|
65
|
-
export type BillingVersionDefinition = {
|
|
66
|
-
version: BillingVersionId;
|
|
67
|
-
name: string;
|
|
68
|
-
description: string;
|
|
69
|
-
plans: Partial<Record<BillingPlanId, BillingPlanDefinition>>;
|
|
70
|
-
addons: Partial<Record<BillingAddonId, BillingAddonDefinition>>;
|
|
71
|
-
meters: Partial<Record<BillingMeterId, BillingMeterDefinition>>;
|
|
72
|
-
isActive: boolean;
|
|
73
|
-
createdAt: string;
|
|
74
|
-
};
|
|
75
|
-
export type BillingDefinition = Record<BillingVersionId, BillingVersionDefinition>;
|
|
76
|
-
export type BillingVersionConfig = z.infer<typeof billingVersionConfigSchema>;
|
|
77
|
-
export type BillingConfig = z.infer<typeof billingConfigSchema>;
|
|
78
|
-
export type BillingPrice = z.infer<typeof priceSchema>;
|
|
79
|
-
export type BillingMeteredPrice = z.infer<typeof meteredPriceSchema>;
|
|
80
|
-
export type BillingPlan = z.infer<typeof planSchema>;
|
|
81
|
-
export type BillingAddon = z.infer<typeof addOnSchema>;
|
|
82
|
-
export type BillingMeter = z.infer<typeof meterSchema>;
|
package/dist/usage-metadata.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Usage metadata definitions for v4 billing system
|
|
3
|
-
* These define the dimensions we want to track for each feature
|
|
4
|
-
*/
|
|
5
|
-
export type UsageEvent = {
|
|
6
|
-
transactionId: string;
|
|
7
|
-
amount: number;
|
|
8
|
-
feature: string;
|
|
9
|
-
workspaceId: string;
|
|
10
|
-
timestamp: number;
|
|
11
|
-
meta: Record<string, unknown>;
|
|
12
|
-
};
|
|
13
|
-
export type UsageMetadataConfig = {
|
|
14
|
-
feature: string;
|
|
15
|
-
dimensions: Record<string, {
|
|
16
|
-
description: string;
|
|
17
|
-
required: boolean;
|
|
18
|
-
type: 'string' | 'number' | 'boolean';
|
|
19
|
-
}>;
|
|
20
|
-
};
|
|
21
|
-
export declare const usageMetadataConfigs: Record<string, UsageMetadataConfig>;
|
|
22
|
-
export declare const validateUsageEvent: (event: UsageEvent) => boolean;
|
package/dist/usage-metadata.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Usage metadata definitions for v4 billing system
|
|
4
|
-
* These define the dimensions we want to track for each feature
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.validateUsageEvent = exports.usageMetadataConfigs = void 0;
|
|
8
|
-
exports.usageMetadataConfigs = {
|
|
9
|
-
incoming_messages_events: {
|
|
10
|
-
feature: 'incoming_messages_events',
|
|
11
|
-
dimensions: {
|
|
12
|
-
botId: {
|
|
13
|
-
description: 'The ID of the bot that processed the message/event',
|
|
14
|
-
required: true,
|
|
15
|
-
type: 'string',
|
|
16
|
-
},
|
|
17
|
-
type: {
|
|
18
|
-
description: 'Whether this is a message or an event',
|
|
19
|
-
required: true,
|
|
20
|
-
type: 'string',
|
|
21
|
-
},
|
|
22
|
-
channel: {
|
|
23
|
-
description: 'The channel where the message/event originated',
|
|
24
|
-
required: false,
|
|
25
|
-
type: 'string',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
integration_spend: {
|
|
30
|
-
feature: 'integration_spend',
|
|
31
|
-
dimensions: {
|
|
32
|
-
botId: {
|
|
33
|
-
description: 'The ID of the bot that used the integration',
|
|
34
|
-
required: true,
|
|
35
|
-
type: 'string',
|
|
36
|
-
},
|
|
37
|
-
integrationVersionId: {
|
|
38
|
-
description: 'The version ID of the integration used',
|
|
39
|
-
required: true,
|
|
40
|
-
type: 'string',
|
|
41
|
-
},
|
|
42
|
-
actionName: {
|
|
43
|
-
description: 'The specific action that was called',
|
|
44
|
-
required: true,
|
|
45
|
-
type: 'string',
|
|
46
|
-
},
|
|
47
|
-
provider: {
|
|
48
|
-
description: 'The provider of the integration (e.g., openai, anthropic)',
|
|
49
|
-
required: false,
|
|
50
|
-
type: 'string',
|
|
51
|
-
},
|
|
52
|
-
model: {
|
|
53
|
-
description: 'The specific model used (for AI integrations)',
|
|
54
|
-
required: false,
|
|
55
|
-
type: 'string',
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
table_rows: {
|
|
60
|
-
feature: 'table_rows',
|
|
61
|
-
dimensions: {
|
|
62
|
-
botId: {
|
|
63
|
-
description: 'The ID of the bot that owns the table',
|
|
64
|
-
required: true,
|
|
65
|
-
type: 'string',
|
|
66
|
-
},
|
|
67
|
-
tableId: {
|
|
68
|
-
description: 'The ID of the table',
|
|
69
|
-
required: true,
|
|
70
|
-
type: 'string',
|
|
71
|
-
},
|
|
72
|
-
operation: {
|
|
73
|
-
description: 'The operation performed (create, update, delete)',
|
|
74
|
-
required: true,
|
|
75
|
-
type: 'string',
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
file_storage: {
|
|
80
|
-
feature: 'file_storage',
|
|
81
|
-
dimensions: {
|
|
82
|
-
botId: {
|
|
83
|
-
description: 'The ID of the bot that owns the file',
|
|
84
|
-
required: true,
|
|
85
|
-
type: 'string',
|
|
86
|
-
},
|
|
87
|
-
fileId: {
|
|
88
|
-
description: 'The ID of the file',
|
|
89
|
-
required: true,
|
|
90
|
-
type: 'string',
|
|
91
|
-
},
|
|
92
|
-
operation: {
|
|
93
|
-
description: 'The operation performed (upload, delete)',
|
|
94
|
-
required: true,
|
|
95
|
-
type: 'string',
|
|
96
|
-
},
|
|
97
|
-
fileType: {
|
|
98
|
-
description: 'The type/extension of the file',
|
|
99
|
-
required: false,
|
|
100
|
-
type: 'string',
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
vector_db_storage: {
|
|
105
|
-
feature: 'vector_db_storage',
|
|
106
|
-
dimensions: {
|
|
107
|
-
botId: {
|
|
108
|
-
description: 'The ID of the bot that owns the vectors',
|
|
109
|
-
required: true,
|
|
110
|
-
type: 'string',
|
|
111
|
-
},
|
|
112
|
-
collectionId: {
|
|
113
|
-
description: 'The ID of the vector collection',
|
|
114
|
-
required: true,
|
|
115
|
-
type: 'string',
|
|
116
|
-
},
|
|
117
|
-
operation: {
|
|
118
|
-
description: 'The operation performed (insert, delete)',
|
|
119
|
-
required: true,
|
|
120
|
-
type: 'string',
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
};
|
|
125
|
-
const validateUsageEvent = (event) => {
|
|
126
|
-
const config = exports.usageMetadataConfigs[event.feature];
|
|
127
|
-
if (!config) {
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
// Check required dimensions
|
|
131
|
-
for (const [dimName, dimConfig] of Object.entries(config.dimensions)) {
|
|
132
|
-
if (dimConfig.required && !(dimName in event.meta)) {
|
|
133
|
-
return false;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return true;
|
|
137
|
-
};
|
|
138
|
-
exports.validateUsageEvent = validateUsageEvent;
|
|
File without changes
|
|
File without changes
|