deepline 0.3.87 → 0.3.88
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/bundling-sources/sdk/src/client.ts +2 -2
- package/dist/bundling-sources/sdk/src/monitor-fleet-contract.ts +1 -1
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-env.ts +0 -6
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +0 -302
- package/dist/bundling-sources/shared_libs/plays/email-status.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/tool-category-descriptions.ts +2 -2
- package/dist/bundling-sources/shared_libs/runtime-env.ts +0 -6
- package/dist/cli/index.js +4 -6
- package/dist/cli/index.mjs +4 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +2 -45
- package/package.json +1 -3
- package/dist/bundling-sources/shared_libs/integration-contracts/AGENTS.md +0 -9
- package/dist/bundling-sources/shared_libs/integration-contracts/README.md +0 -3
- package/dist/bundling-sources/shared_libs/integration-contracts/index.ts +0 -2
- package/dist/bundling-sources/shared_libs/monitors/analytics-install-guides.ts +0 -77
- package/dist/bundling-sources/shared_libs/monitors/billing/charges.ts +0 -125
- package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +0 -686
- package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +0 -54
- package/dist/bundling-sources/shared_libs/monitors/billing/public-pricing.ts +0 -72
- package/dist/bundling-sources/shared_libs/monitors/billing/session.ts +0 -45
- package/dist/bundling-sources/shared_libs/monitors/billing/state.ts +0 -454
- package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +0 -260
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +0 -215
- package/dist/bundling-sources/shared_libs/monitors/callback-security.ts +0 -333
- package/dist/bundling-sources/shared_libs/monitors/cursor-page.ts +0 -42
- package/dist/bundling-sources/shared_libs/monitors/framework-managed-payload-fields.ts +0 -71
- package/dist/bundling-sources/shared_libs/monitors/generated/provider-monitor-callback-admission-targets.ts +0 -16
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +0 -267
- package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +0 -39
- package/dist/bundling-sources/shared_libs/monitors/inbound-queue.ts +0 -82
- package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +0 -473
- package/dist/bundling-sources/shared_libs/monitors/package.json +0 -29
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +0 -1125
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +0 -964
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-consumer-health.ts +0 -56
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +0 -131
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +0 -527
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-legacy-aliases.ts +0 -16
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-priority-execution.ts +0 -56
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-public-aliases.ts +0 -28
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-runtime-read-eligibility.ts +0 -38
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-status.ts +0 -10
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +0 -112
- package/dist/bundling-sources/shared_libs/monitors/provider-webhook-monitor-runtime.ts +0 -300
- package/dist/bundling-sources/shared_libs/monitors/quickstart-prompts.ts +0 -22
- package/dist/bundling-sources/shared_libs/monitors/snitcher-install-validation.ts +0 -93
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +0 -332
- package/dist/bundling-sources/shared_libs/monitors/snitcher-radar.ts +0 -221
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +0 -105
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +0 -73
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +0 -81
- package/dist/bundling-sources/shared_libs/monitors/tsconfig.json +0 -10
- package/dist/bundling-sources/shared_libs/security/header-safe-env.ts +0 -28
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +0 -267
- /package/dist/bundling-sources/shared_libs/{integration-contracts/bettercontact/execution-policy.ts → integrations/bettercontact-execution-policy.ts} +0 -0
- /package/dist/bundling-sources/shared_libs/{integration-contracts/theirstack/execution-policy.ts → integrations/theirstack-execution-policy.ts} +0 -0
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import { monitorProviderUsdToRetailCredits } from '@deepline/monitors/billing/pricing';
|
|
2
|
-
import type {
|
|
3
|
-
MonitorCommercialModel,
|
|
4
|
-
MonitorPayloadPricingEntry,
|
|
5
|
-
MonitorPayloadPricingMap,
|
|
6
|
-
} from '@deepline/monitors/billing/types';
|
|
7
|
-
import { publicMonitorPricingEntry } from '@deepline/monitors/billing/public-pricing';
|
|
8
|
-
|
|
9
|
-
export const TAMRADAR_RADAR_TYPE_PRICING = {
|
|
10
|
-
company_job_openings: {
|
|
11
|
-
capability: 'company_radar',
|
|
12
|
-
label: 'Company job openings',
|
|
13
|
-
mode: 'monitor_usage',
|
|
14
|
-
providerCostUsd: 0.025,
|
|
15
|
-
unitLabel: 'finding',
|
|
16
|
-
},
|
|
17
|
-
company_promotions: {
|
|
18
|
-
capability: 'company_radar',
|
|
19
|
-
label: 'Company promotions',
|
|
20
|
-
mode: 'monitor_usage',
|
|
21
|
-
providerCostUsd: 0.035,
|
|
22
|
-
unitLabel: 'finding',
|
|
23
|
-
},
|
|
24
|
-
company_mentions: {
|
|
25
|
-
capability: 'company_radar',
|
|
26
|
-
label: 'Company mentions',
|
|
27
|
-
mode: 'monitor_usage',
|
|
28
|
-
providerCostUsd: 0.03,
|
|
29
|
-
unitLabel: 'finding',
|
|
30
|
-
},
|
|
31
|
-
// Source: TAMRadar per-update pricing (confidential/internal),
|
|
32
|
-
// https://tamradar.mintlify.app/api-reference/create-company-radar (new_hires).
|
|
33
|
-
company_new_hires: {
|
|
34
|
-
capability: 'company_radar',
|
|
35
|
-
label: 'Company new hires',
|
|
36
|
-
mode: 'monitor_usage',
|
|
37
|
-
providerCostUsd: 0.035,
|
|
38
|
-
unitLabel: 'finding',
|
|
39
|
-
},
|
|
40
|
-
// Source: TAMRadar per-update pricing (confidential/internal),
|
|
41
|
-
// https://tamradar.mintlify.app/api-reference/create-company-radar (reviews).
|
|
42
|
-
company_reviews: {
|
|
43
|
-
capability: 'company_radar',
|
|
44
|
-
label: 'Company reviews',
|
|
45
|
-
mode: 'monitor_usage',
|
|
46
|
-
providerCostUsd: 0.03,
|
|
47
|
-
unitLabel: 'finding',
|
|
48
|
-
},
|
|
49
|
-
// Source: TAMRadar per-update pricing (confidential/internal),
|
|
50
|
-
// https://tamradar.mintlify.app/api-reference/create-company-radar (social_posts).
|
|
51
|
-
company_social_posts: {
|
|
52
|
-
capability: 'company_radar',
|
|
53
|
-
label: 'Company social posts',
|
|
54
|
-
mode: 'monitor_usage',
|
|
55
|
-
providerCostUsd: 0.015,
|
|
56
|
-
unitLabel: 'finding',
|
|
57
|
-
},
|
|
58
|
-
// Source: TAMRadar per-update pricing (confidential/internal),
|
|
59
|
-
// https://tamradar.mintlify.app/api-reference/create-company-radar (social_engagements).
|
|
60
|
-
company_social_engagements: {
|
|
61
|
-
capability: 'company_radar',
|
|
62
|
-
label: 'Company social engagements',
|
|
63
|
-
mode: 'monitor_usage',
|
|
64
|
-
providerCostUsd: 0.025,
|
|
65
|
-
unitLabel: 'finding',
|
|
66
|
-
},
|
|
67
|
-
contact_job_changes: {
|
|
68
|
-
capability: 'contact_radar',
|
|
69
|
-
label: 'Contact job changes',
|
|
70
|
-
mode: 'monitor_subscription',
|
|
71
|
-
providerCostUsd: 0.07,
|
|
72
|
-
unitLabel: 'month',
|
|
73
|
-
periodDays: 30,
|
|
74
|
-
},
|
|
75
|
-
// Source: TAMRadar per-update pricing (confidential/internal),
|
|
76
|
-
// https://tamradar.mintlify.app/api-reference/create-contact-radar (social_posts).
|
|
77
|
-
contact_social_posts: {
|
|
78
|
-
capability: 'contact_radar',
|
|
79
|
-
label: 'Contact social posts',
|
|
80
|
-
mode: 'monitor_usage',
|
|
81
|
-
providerCostUsd: 0.03,
|
|
82
|
-
unitLabel: 'finding',
|
|
83
|
-
},
|
|
84
|
-
// Source: TAMRadar per-update pricing (confidential/internal),
|
|
85
|
-
// https://tamradar.mintlify.app/api-reference/create-contact-radar (social_engagements).
|
|
86
|
-
contact_social_engagements: {
|
|
87
|
-
capability: 'contact_radar',
|
|
88
|
-
label: 'Contact social engagements',
|
|
89
|
-
mode: 'monitor_usage',
|
|
90
|
-
providerCostUsd: 0.025,
|
|
91
|
-
unitLabel: 'finding',
|
|
92
|
-
},
|
|
93
|
-
industry_mentions: {
|
|
94
|
-
capability: 'industry_radar',
|
|
95
|
-
label: 'Industry mentions',
|
|
96
|
-
mode: 'monitor_usage',
|
|
97
|
-
providerCostUsd: 0.03,
|
|
98
|
-
unitLabel: 'finding',
|
|
99
|
-
},
|
|
100
|
-
// Source: TAMRadar per-update pricing (confidential/internal),
|
|
101
|
-
// https://tamradar.mintlify.app/api-reference/create-industry-radar (job_openings).
|
|
102
|
-
industry_job_openings: {
|
|
103
|
-
capability: 'industry_radar',
|
|
104
|
-
label: 'Industry job openings',
|
|
105
|
-
mode: 'monitor_usage',
|
|
106
|
-
providerCostUsd: 0.045,
|
|
107
|
-
unitLabel: 'finding',
|
|
108
|
-
},
|
|
109
|
-
// DORMANT (disabled from deployment — see TAMRADAR_DISABLED_RADAR_TYPES).
|
|
110
|
-
// Kept for reversibility: $150/mo resell-tier subscription pricing is retained
|
|
111
|
-
// so the type can be re-enabled per-partner by removing it from the disabled
|
|
112
|
-
// set. It is excluded from the deployable enum + public pricing surface.
|
|
113
|
-
industry_funding_rounds: {
|
|
114
|
-
capability: 'industry_radar',
|
|
115
|
-
label: 'Industry funding rounds',
|
|
116
|
-
mode: 'monitor_subscription',
|
|
117
|
-
providerCostUsd: 150,
|
|
118
|
-
unitLabel: 'month',
|
|
119
|
-
periodDays: 30,
|
|
120
|
-
},
|
|
121
|
-
} as const;
|
|
122
|
-
|
|
123
|
-
export type TamradarRadarType = keyof typeof TAMRADAR_RADAR_TYPE_PRICING;
|
|
124
|
-
|
|
125
|
-
export function isTamradarRadarType(value: string): value is TamradarRadarType {
|
|
126
|
-
return value in TAMRADAR_RADAR_TYPE_PRICING;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Explicit, documented off-switch for radar types that are modeled/priced but
|
|
130
|
-
// intentionally NOT deployable. Each entry carries a one-line CUSTOMER-FACING
|
|
131
|
-
// reason. Disabled types are EXCLUDED from every capability's deployable
|
|
132
|
-
// `radar_type` enum (so they never appear in `monitors tools`/CLI and payload
|
|
133
|
-
// validation rejects them) and from the public pricing surface — the deploy
|
|
134
|
-
// path surfaces a clear "radar type not available for deployment" error rather
|
|
135
|
-
// than a bare enum mismatch. Flipping a type back on is a one-line delete here
|
|
136
|
-
// (the two resell-tier types below carry resell rights and may be enabled
|
|
137
|
-
// per-partner).
|
|
138
|
-
//
|
|
139
|
-
// IMPORTANT (guardrail): these reason strings are CUSTOMER-VISIBLE — they flow
|
|
140
|
-
// into the deploy-rejection `suggestion` via `tamradarDisabledRadarTypeReason`.
|
|
141
|
-
// NEVER put provider spend, resell-tier prices, or any "$X/mo" figure here.
|
|
142
|
-
// Internal price context belongs in the per-entry code comment below, not in
|
|
143
|
-
// the returned string.
|
|
144
|
-
export const TAMRADAR_DISABLED_RADAR_TYPES: Record<string, string> = {
|
|
145
|
-
company_social_posts_cxo:
|
|
146
|
-
'This Deepline radar type is not available for self-serve deploy.',
|
|
147
|
-
// Internal note (NOT customer-visible): $250/mo resell-tier subscription.
|
|
148
|
-
industry_new_companies:
|
|
149
|
-
'This Deepline radar type is not available for self-serve deploy.',
|
|
150
|
-
// Internal note (NOT customer-visible): $150/mo resell-tier subscription.
|
|
151
|
-
industry_funding_rounds:
|
|
152
|
-
'This Deepline radar type is not available for self-serve deploy.',
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export function isTamradarDisabledRadarType(value: string): boolean {
|
|
156
|
-
return value in TAMRADAR_DISABLED_RADAR_TYPES;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export function tamradarDisabledRadarTypeReason(value: string): string | null {
|
|
160
|
-
return TAMRADAR_DISABLED_RADAR_TYPES[value] ?? null;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Deployable radar types for a capability = priced under that capability MINUS
|
|
164
|
-
// any disabled type. This is the single source the capability enum + public
|
|
165
|
-
// pricing derive from, so disabling a type flips every surface at once.
|
|
166
|
-
export function tamradarDeployableRadarTypesForCapability(
|
|
167
|
-
capability: string,
|
|
168
|
-
): TamradarRadarType[] {
|
|
169
|
-
return (Object.keys(TAMRADAR_RADAR_TYPE_PRICING) as TamradarRadarType[])
|
|
170
|
-
.filter((radarType) => !isTamradarDisabledRadarType(radarType))
|
|
171
|
-
.filter(
|
|
172
|
-
(radarType) =>
|
|
173
|
-
TAMRADAR_RADAR_TYPE_PRICING[radarType].capability === capability,
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export function tamradarProviderCostKey(input: {
|
|
178
|
-
capability: string;
|
|
179
|
-
radarType: string;
|
|
180
|
-
}) {
|
|
181
|
-
return `deepline_native.${input.capability}.${input.radarType}`;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function entryForRadarType(
|
|
185
|
-
radarType: TamradarRadarType,
|
|
186
|
-
): MonitorPayloadPricingEntry {
|
|
187
|
-
const config = TAMRADAR_RADAR_TYPE_PRICING[radarType];
|
|
188
|
-
return {
|
|
189
|
-
label: config.label,
|
|
190
|
-
mode: config.mode,
|
|
191
|
-
providerCostKey: tamradarProviderCostKey({
|
|
192
|
-
capability: config.capability,
|
|
193
|
-
radarType,
|
|
194
|
-
}),
|
|
195
|
-
providerCostUsd: config.providerCostUsd,
|
|
196
|
-
retailCredits: monitorProviderUsdToRetailCredits(config.providerCostUsd),
|
|
197
|
-
unitLabel: config.unitLabel,
|
|
198
|
-
...(config.mode === 'monitor_subscription'
|
|
199
|
-
? { periodDays: config.periodDays }
|
|
200
|
-
: {}),
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
export function tamradarPricingEntryForRadarType(
|
|
205
|
-
radarType: string | null | undefined,
|
|
206
|
-
) {
|
|
207
|
-
if (!radarType || !isTamradarRadarType(radarType)) return null;
|
|
208
|
-
return entryForRadarType(radarType);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export function tamradarPayloadPricingForCapability(
|
|
212
|
-
capability: string,
|
|
213
|
-
): MonitorPayloadPricingMap {
|
|
214
|
-
const entries = Object.fromEntries(
|
|
215
|
-
Object.keys(TAMRADAR_RADAR_TYPE_PRICING)
|
|
216
|
-
.filter(
|
|
217
|
-
(radarType): radarType is TamradarRadarType =>
|
|
218
|
-
TAMRADAR_RADAR_TYPE_PRICING[radarType as TamradarRadarType]
|
|
219
|
-
.capability === capability,
|
|
220
|
-
)
|
|
221
|
-
.map((radarType) => [radarType, entryForRadarType(radarType)]),
|
|
222
|
-
);
|
|
223
|
-
return {
|
|
224
|
-
discriminator: 'radar_type',
|
|
225
|
-
entries,
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
export function tamradarCommercialModelForCapability(
|
|
230
|
-
capability: string,
|
|
231
|
-
): MonitorCommercialModel {
|
|
232
|
-
const pricing = tamradarPayloadPricingForCapability(capability);
|
|
233
|
-
return {
|
|
234
|
-
kind: 'provider_native_payload_map',
|
|
235
|
-
discriminator: pricing.discriminator,
|
|
236
|
-
entries: Object.fromEntries(
|
|
237
|
-
Object.entries(pricing.entries).map(([radarType, entry]) => [
|
|
238
|
-
radarType,
|
|
239
|
-
{
|
|
240
|
-
mode: entry.mode,
|
|
241
|
-
providerCostKey: entry.providerCostKey,
|
|
242
|
-
},
|
|
243
|
-
]),
|
|
244
|
-
),
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export function tamradarPublicPricingByRadarType(capability: string) {
|
|
249
|
-
const pricing = tamradarPayloadPricingForCapability(capability);
|
|
250
|
-
return Object.fromEntries(
|
|
251
|
-
Object.entries(pricing.entries)
|
|
252
|
-
// Never expose disabled radar types on the public/capability pricing
|
|
253
|
-
// surface — they are not deployable (see TAMRADAR_DISABLED_RADAR_TYPES).
|
|
254
|
-
.filter(([radarType]) => !isTamradarDisabledRadarType(radarType))
|
|
255
|
-
.map(([radarType, entry]) => [
|
|
256
|
-
radarType,
|
|
257
|
-
publicMonitorPricingEntry(entry),
|
|
258
|
-
]),
|
|
259
|
-
);
|
|
260
|
-
}
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
export type MonitorBillingPhase =
|
|
2
|
-
| 'create'
|
|
3
|
-
| 'reactivate'
|
|
4
|
-
| 'periodic_renewal'
|
|
5
|
-
| 'subscription_renewal'
|
|
6
|
-
| 'webhook_event'
|
|
7
|
-
| 'provider_execution'
|
|
8
|
-
| 'manual_update';
|
|
9
|
-
|
|
10
|
-
export type MonitorBillingState =
|
|
11
|
-
| 'active'
|
|
12
|
-
| 'preflight_denied'
|
|
13
|
-
| 'billing_pending'
|
|
14
|
-
| 'billing_suspended'
|
|
15
|
-
| 'upstream_disable_pending'
|
|
16
|
-
| 'upstream_disable_failed'
|
|
17
|
-
| 'disabled';
|
|
18
|
-
|
|
19
|
-
export type MonitorBillingEvidenceStatus = 'verified' | 'partially_unresolved';
|
|
20
|
-
|
|
21
|
-
export type MonitorBillingSourceKind =
|
|
22
|
-
| 'official_provider_docs'
|
|
23
|
-
| 'official_pricing_page'
|
|
24
|
-
| 'official_api_reference'
|
|
25
|
-
| 'provider_account_truth'
|
|
26
|
-
| 'provider_contract_or_invoice';
|
|
27
|
-
|
|
28
|
-
export type MonitorBillingSource = {
|
|
29
|
-
kind: MonitorBillingSourceKind;
|
|
30
|
-
label: string;
|
|
31
|
-
url: string;
|
|
32
|
-
verifiedAt: string;
|
|
33
|
-
notes?: string;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export type MonitorEconomicResponsibility =
|
|
37
|
-
| 'deepline_managed_upstream'
|
|
38
|
-
| 'runtime_upstream_account_owner'
|
|
39
|
-
| 'customer_owned_upstream';
|
|
40
|
-
|
|
41
|
-
export type MonitorRetailChargeSource =
|
|
42
|
-
| 'plan_entitlement_formula'
|
|
43
|
-
| 'metered_monitor_default'
|
|
44
|
-
| 'configured_deepline_retail_fee'
|
|
45
|
-
| 'static_provider_unit_formula'
|
|
46
|
-
| 'provider_truth_markup';
|
|
47
|
-
|
|
48
|
-
export type MonitorRetailChargeComponent =
|
|
49
|
-
| {
|
|
50
|
-
kind: 'fixed_deepline_credits';
|
|
51
|
-
credits: number;
|
|
52
|
-
source: MonitorRetailChargeSource;
|
|
53
|
-
customerLabel: string;
|
|
54
|
-
basis?: {
|
|
55
|
-
minimumMonthlyPlanUsd?: number;
|
|
56
|
-
allocationDivisor?: number;
|
|
57
|
-
usdPerDeeplineCredit?: number;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
| {
|
|
61
|
-
kind: 'upstream_cost_markup';
|
|
62
|
-
multiplier: number;
|
|
63
|
-
source: 'static_provider_unit' | 'provider_truth';
|
|
64
|
-
customerLabel: string;
|
|
65
|
-
providerCostKey: string;
|
|
66
|
-
retailCredits?: number;
|
|
67
|
-
}
|
|
68
|
-
| {
|
|
69
|
-
kind: 'no_customer_charge';
|
|
70
|
-
reason:
|
|
71
|
-
| 'included_in_plan_entitlement'
|
|
72
|
-
| 'customer_paid_upstream'
|
|
73
|
-
| 'provider_documented_no_charge';
|
|
74
|
-
customerLabel: string;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export type MonitorRetailCharge = {
|
|
78
|
-
phase: MonitorBillingPhase;
|
|
79
|
-
label: string;
|
|
80
|
-
components: readonly MonitorRetailChargeComponent[];
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export type MonitorPayloadPricingMode =
|
|
84
|
-
| 'monitor_usage'
|
|
85
|
-
| 'monitor_subscription';
|
|
86
|
-
|
|
87
|
-
export type MonitorPayloadPricingEntry = {
|
|
88
|
-
label: string;
|
|
89
|
-
mode: MonitorPayloadPricingMode;
|
|
90
|
-
providerCostKey: string;
|
|
91
|
-
providerCostUsd: number;
|
|
92
|
-
retailCredits: number;
|
|
93
|
-
unitLabel: string;
|
|
94
|
-
periodDays?: number;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export type MonitorPayloadPricingMap = {
|
|
98
|
-
discriminator: string;
|
|
99
|
-
entries: Record<string, MonitorPayloadPricingEntry>;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export type MonitorProviderTruthSource =
|
|
103
|
-
| 'provider_response'
|
|
104
|
-
| 'provider_webhook'
|
|
105
|
-
| 'provider_account_balance_delta'
|
|
106
|
-
| 'provider_billing_export'
|
|
107
|
-
| 'provider_ledger_api';
|
|
108
|
-
|
|
109
|
-
export type MonitorProviderChargeComponent =
|
|
110
|
-
| {
|
|
111
|
-
kind: 'provider_documented_no_charge';
|
|
112
|
-
phase: MonitorBillingPhase;
|
|
113
|
-
scope: string;
|
|
114
|
-
sourceLabel: string;
|
|
115
|
-
}
|
|
116
|
-
| {
|
|
117
|
-
kind: 'provider_entitlement_cost';
|
|
118
|
-
phase: MonitorBillingPhase;
|
|
119
|
-
owner: MonitorEconomicResponsibility;
|
|
120
|
-
planName: string;
|
|
121
|
-
minimumMonthlyPlanUsd: number;
|
|
122
|
-
allocation: 'plan_entitlement_retail_formula' | 'customer_paid_directly';
|
|
123
|
-
usageIncluded: boolean;
|
|
124
|
-
}
|
|
125
|
-
| {
|
|
126
|
-
kind: 'provider_metered_static';
|
|
127
|
-
phase: MonitorBillingPhase;
|
|
128
|
-
providerCostKey: string;
|
|
129
|
-
unitName: string;
|
|
130
|
-
units: number | { min: number; max: number };
|
|
131
|
-
unitCostUsd: number;
|
|
132
|
-
retailCredits: number;
|
|
133
|
-
sourceLabel: string;
|
|
134
|
-
}
|
|
135
|
-
| {
|
|
136
|
-
kind: 'provider_metered_dynamic';
|
|
137
|
-
phase: MonitorBillingPhase;
|
|
138
|
-
truthSources: readonly MonitorProviderTruthSource[];
|
|
139
|
-
amountStatus: 'known_at_runtime';
|
|
140
|
-
sourceLabel: string;
|
|
141
|
-
}
|
|
142
|
-
| {
|
|
143
|
-
kind: 'provider_recurring_period';
|
|
144
|
-
phase: 'periodic_renewal';
|
|
145
|
-
periodDays: number;
|
|
146
|
-
amountStatus: 'known_at_runtime' | 'unresolved';
|
|
147
|
-
amountUsd?: number;
|
|
148
|
-
sourceLabel: string;
|
|
149
|
-
}
|
|
150
|
-
| {
|
|
151
|
-
kind: 'unresolved_deepline_paid_exposure';
|
|
152
|
-
phase: MonitorBillingPhase;
|
|
153
|
-
missing: readonly (
|
|
154
|
-
| 'exact_billing_mode'
|
|
155
|
-
| 'exact_usd_amount'
|
|
156
|
-
| 'provider_truth_source'
|
|
157
|
-
)[];
|
|
158
|
-
sourceLabel: string;
|
|
159
|
-
blocksPublicDeploy: true;
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export type MonitorBillingPolicy = {
|
|
163
|
-
provider: string;
|
|
164
|
-
capability: string;
|
|
165
|
-
providerCapability: string;
|
|
166
|
-
pricingMode:
|
|
167
|
-
| 'plan_entitlement'
|
|
168
|
-
| 'metered_static'
|
|
169
|
-
| 'metered_dynamic'
|
|
170
|
-
| 'mixed_provider_native'
|
|
171
|
-
| 'hybrid_unresolved';
|
|
172
|
-
evidenceStatus: MonitorBillingEvidenceStatus;
|
|
173
|
-
economicResponsibility: MonitorEconomicResponsibility;
|
|
174
|
-
sourceDocs: readonly MonitorBillingSource[];
|
|
175
|
-
upstreamMarkupMultiplier: number;
|
|
176
|
-
customerCreateCharge: MonitorRetailCharge;
|
|
177
|
-
customerReactivateCharge: MonitorRetailCharge;
|
|
178
|
-
customerUsageCharges: readonly MonitorRetailCharge[];
|
|
179
|
-
providerChargeComponents: readonly MonitorProviderChargeComponent[];
|
|
180
|
-
disableOnBillingFailure: boolean;
|
|
181
|
-
payloadPricing?: MonitorPayloadPricingMap;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
export type MonitorBillingSession = {
|
|
185
|
-
key: string;
|
|
186
|
-
orgId: string;
|
|
187
|
-
monitorKey: string;
|
|
188
|
-
billingReason: MonitorBillingPhase;
|
|
189
|
-
providerEventIdOrPeriod: string;
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
export type MonitorCommercialModel =
|
|
193
|
-
| {
|
|
194
|
-
kind: 'wrapper_entitlement';
|
|
195
|
-
entitlementId: string;
|
|
196
|
-
limitId: string;
|
|
197
|
-
}
|
|
198
|
-
| {
|
|
199
|
-
kind: 'provider_native_usage';
|
|
200
|
-
}
|
|
201
|
-
| {
|
|
202
|
-
kind: 'provider_native_payload_map';
|
|
203
|
-
discriminator: string;
|
|
204
|
-
entries: Record<
|
|
205
|
-
string,
|
|
206
|
-
{
|
|
207
|
-
mode: MonitorPayloadPricingMode;
|
|
208
|
-
providerCostKey: string;
|
|
209
|
-
}
|
|
210
|
-
>;
|
|
211
|
-
}
|
|
212
|
-
| {
|
|
213
|
-
kind: 'unresolved_fail_closed';
|
|
214
|
-
reason: string;
|
|
215
|
-
};
|