@harnessio/react-ccm-optimization-service-client 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/ccm-optimization-service/src/services/hooks/useCreateAiGovernanceOverrideMutation.d.ts +27 -0
  2. package/dist/ccm-optimization-service/src/services/hooks/useCreateAiGovernanceOverrideMutation.js +14 -0
  3. package/dist/ccm-optimization-service/src/services/hooks/useCreateAiGovernancePolicyMutation.d.ts +1 -1
  4. package/dist/ccm-optimization-service/src/services/hooks/useCreateAiGovernancePolicyMutation.js +1 -1
  5. package/dist/ccm-optimization-service/src/services/hooks/useDeleteAiGovernancePolicyMutation.d.ts +2 -2
  6. package/dist/ccm-optimization-service/src/services/hooks/useDryRunAiGovernancePolicyMutation.d.ts +1 -1
  7. package/dist/ccm-optimization-service/src/services/hooks/useDryRunAiGovernancePolicyMutation.js +1 -1
  8. package/dist/ccm-optimization-service/src/services/hooks/useGetAiGovernancePolicyOverviewQuery.d.ts +1 -1
  9. package/dist/ccm-optimization-service/src/services/hooks/useGetAiGovernancePolicyOverviewQuery.js +1 -1
  10. package/dist/ccm-optimization-service/src/services/hooks/useGetMyAiGovernanceBudgetOverviewQuery.d.ts +28 -0
  11. package/dist/ccm-optimization-service/src/services/hooks/useGetMyAiGovernanceBudgetOverviewQuery.js +14 -0
  12. package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernanceOverrideRequestsMutation.d.ts +1 -1
  13. package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernanceOverrideRequestsMutation.js +1 -1
  14. package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernancePoliciesMutation.d.ts +1 -1
  15. package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernancePoliciesMutation.js +1 -1
  16. package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernancePolicySubjectsMutation.d.ts +1 -1
  17. package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernancePolicySubjectsMutation.js +1 -1
  18. package/dist/ccm-optimization-service/src/services/hooks/useListMyAiGovernanceBudgetsQuery.d.ts +2 -6
  19. package/dist/ccm-optimization-service/src/services/hooks/useListMyAiGovernanceBudgetsQuery.js +2 -2
  20. package/dist/ccm-optimization-service/src/services/hooks/useRequestMyAiGovernanceBudgetOverrideMutation.d.ts +23 -0
  21. package/dist/ccm-optimization-service/src/services/hooks/useRequestMyAiGovernanceBudgetOverrideMutation.js +14 -0
  22. package/dist/ccm-optimization-service/src/services/hooks/useReviewAiGovernanceOverrideRequestsMutation.d.ts +1 -1
  23. package/dist/ccm-optimization-service/src/services/hooks/useReviewAiGovernanceOverrideRequestsMutation.js +1 -1
  24. package/dist/ccm-optimization-service/src/services/hooks/useUpdateAiGovernancePolicyMutation.d.ts +1 -1
  25. package/dist/ccm-optimization-service/src/services/hooks/useUpdateAiGovernancePolicyMutation.js +1 -1
  26. package/dist/ccm-optimization-service/src/services/index.d.ts +21 -2
  27. package/dist/ccm-optimization-service/src/services/index.js +3 -0
  28. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceApprovalRequest.d.ts +0 -29
  29. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceApprovalRequestView.d.ts +1 -1
  30. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceBudgetAction.d.ts +27 -0
  31. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceBudgetAction.js +1 -0
  32. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceBudgetActionWhen.d.ts +6 -0
  33. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceCreateOverrideRequest.d.ts +10 -0
  34. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceCreateOverrideRequest.js +4 -0
  35. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceDryRunRuleResult.d.ts +1 -2
  36. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceDryRunSubject.d.ts +2 -8
  37. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceGovernancePeriod.d.ts +19 -0
  38. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceGovernancePeriod.js +4 -0
  39. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicy.d.ts +4 -29
  40. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyAuthoring.d.ts +10 -12
  41. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyAuthoring.js +0 -3
  42. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyBudget.d.ts +9 -0
  43. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyBudget.js +1 -0
  44. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyDocument.d.ts +8 -18
  45. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyDocument.js +0 -3
  46. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyListItem.d.ts +4 -0
  47. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyListRequest.d.ts +26 -2
  48. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyOverviewMetrics.d.ts +4 -0
  49. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySpec.d.ts +45 -0
  50. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySpec.js +1 -0
  51. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySubjectRow.d.ts +4 -0
  52. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySubjectsRequest.d.ts +2 -2
  53. package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyUpsertRequest.d.ts +14 -8
  54. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRequestBudgetOverrideRequest.d.ts +15 -0
  55. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRequestBudgetOverrideRequest.js +4 -0
  56. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRuleBudget.d.ts +32 -0
  57. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRuleBudget.js +1 -0
  58. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRuleOverride.d.ts +36 -0
  59. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRuleOverride.js +4 -0
  60. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRuleOverrideResponse.d.ts +12 -0
  61. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRuleOverrideResponse.js +1 -0
  62. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceSubjects.d.ts +31 -0
  63. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceSubjects.js +4 -0
  64. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetOverview.d.ts +8 -0
  65. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetOverview.js +1 -0
  66. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetOverviewResponse.d.ts +4 -0
  67. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetOverviewResponse.js +1 -0
  68. package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetRow.d.ts +8 -5
  69. package/dist/ccm-optimization-service/src/services/schemas/{AiGovernanceMessageResponse.d.ts → AlertMessageResponse.d.ts} +1 -1
  70. package/dist/ccm-optimization-service/src/services/schemas/AlertMessageResponse.js +4 -0
  71. package/package.json +1 -1
  72. /package/dist/ccm-optimization-service/src/services/schemas/{AiGovernanceMessageResponse.js → AiGovernanceBudgetActionWhen.js} +0 -0
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -1,8 +1,7 @@
1
1
  import type { AiGovernanceConnectorRef } from '../schemas/AiGovernanceConnectorRef';
2
2
  import type { AiGovernanceDryRunSubject } from '../schemas/AiGovernanceDryRunSubject';
3
3
  export interface AiGovernanceDryRunRuleResult {
4
- authoredConnectors: AiGovernanceConnectorRef[];
5
- resolvedConnectors: AiGovernanceConnectorRef[];
4
+ connectors: AiGovernanceConnectorRef[];
6
5
  /**
7
6
  * @format uuid
8
7
  */
@@ -1,8 +1,5 @@
1
1
  export interface AiGovernanceDryRunSubject {
2
- /**
3
- * @format int64
4
- */
5
- ceilingCents?: number;
2
+ ceilingDollars?: number;
6
3
  disallowedModels?: string[];
7
4
  /**
8
5
  * @format int64
@@ -15,10 +12,7 @@ export interface AiGovernanceDryRunSubject {
15
12
  modelsUsed?: string[];
16
13
  reason?: string;
17
14
  skippedForRuleType?: boolean;
18
- /**
19
- * @format int64
20
- */
21
- spendCents?: number;
15
+ spendDollars?: number;
22
16
  subject: {
23
17
  email?: string;
24
18
  id?: string;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Budget period window used for spend attribution on a rule
3
+ */
4
+ export interface AiGovernanceGovernancePeriod {
5
+ /**
6
+ * Budget period label, e.g. monthly, weekly, quarterly
7
+ */
8
+ Period?: string;
9
+ Range?: {
10
+ /**
11
+ * @format date-time
12
+ */
13
+ End?: string;
14
+ /**
15
+ * @format date-time
16
+ */
17
+ Start?: string;
18
+ };
19
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -7,47 +7,22 @@ export interface AiGovernancePolicy {
7
7
  createdAt?: string;
8
8
  createdBy?: string;
9
9
  document?: AiGovernancePolicyDocument;
10
+ /**
11
+ * Harness folder identifier when the policy is assigned to a folder. Omitted when unset.
12
+ */
13
+ folderId?: string;
10
14
  /**
11
15
  * @format uuid
12
16
  */
13
17
  id?: string;
14
18
  name?: string;
15
- /**
16
- * Count of pending cap-raise approval requests for this policy. Present on list responses only.
17
- */
18
- pendingUpgradeRequests?: number;
19
19
  /**
20
20
  * Original YAML upload when the policy was created or last updated via rawYaml. Empty when the JSON policy path was used; document is always authoritative.
21
21
  */
22
22
  rawYaml?: string;
23
- /**
24
- * Total current-period spend across governed subjects for budget-cap rules on this policy. Present on list responses only.
25
- */
26
- rolledUpSpend?: number;
27
- /**
28
- * Total number of unique governed subjects across budget-cap rules on this policy. Present on list responses only.
29
- */
30
- totalUsers?: number;
31
23
  /**
32
24
  * @format date-time
33
25
  */
34
26
  updatedAt?: string;
35
27
  updatedBy?: string;
36
- /**
37
- * Counts of governed subjects by budget utilization band. Present on list responses only.
38
- */
39
- userHealth?: {
40
- /**
41
- * Subjects at or above the at-risk threshold but below budget
42
- */
43
- atRisk?: number;
44
- /**
45
- * Subjects below the at-risk spend threshold
46
- */
47
- good?: number;
48
- /**
49
- * Subjects at or above 100% of their effective budget ceiling
50
- */
51
- overBudget?: number;
52
- };
53
28
  }
@@ -1,18 +1,16 @@
1
+ import type { AiGovernancePolicySpec } from '../schemas/AiGovernancePolicySpec';
2
+ import type { AiGovernanceSubjects } from '../schemas/AiGovernanceSubjects';
1
3
  export interface AiGovernancePolicyAuthoring {
2
4
  /**
3
- * Lowercase slug policy name
5
+ * Optional UTC timestamp before which policy evaluation is skipped. Omitted means the policy is active immediately.
6
+ * @format date-time
7
+ * @example "2026-09-01T00:00:00Z"
4
8
  */
5
- name: string;
6
- /**
7
- * Governance rules with flat type-specific fields (same shape as YAML rules)
8
- */
9
- rules: Array<{
10
- [key: string]: any;
11
- }>;
9
+ beginsAt?: string;
12
10
  /**
13
- * Policy-level subject selectors
11
+ * Human-readable policy name; must start with a letter and contain only letters, digits, spaces, and hyphens
14
12
  */
15
- subjects: {
16
- [key: string]: any;
17
- };
13
+ name: string;
14
+ spec: AiGovernancePolicySpec;
15
+ subjects: AiGovernanceSubjects;
18
16
  }
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -0,0 +1,9 @@
1
+ import type { AiGovernanceRuleBudget } from '../schemas/AiGovernanceRuleBudget';
2
+ export interface AiGovernancePolicyBudget {
3
+ /**
4
+ * @format uuid
5
+ */
6
+ policy_id: string;
7
+ policy_name: string;
8
+ rule_budgets: AiGovernanceRuleBudget[];
9
+ }
@@ -1,22 +1,12 @@
1
+ import type { AiGovernancePolicySpec } from '../schemas/AiGovernancePolicySpec';
2
+ import type { AiGovernanceSubjects } from '../schemas/AiGovernanceSubjects';
1
3
  export interface AiGovernancePolicyDocument {
2
4
  /**
3
- * Persisted rules with platform-assigned ruleIds
5
+ * Optional UTC timestamp before which policy evaluation is skipped. Omitted means the policy is active immediately.
6
+ * @format date-time
7
+ * @example "2026-09-01T00:00:00Z"
4
8
  */
5
- rules?: Array<{
6
- connectors?: Array<{
7
- [key: string]: any;
8
- }>;
9
- frequency?: string;
10
- /**
11
- * @format uuid
12
- */
13
- ruleId?: string;
14
- type?: string;
15
- }>;
16
- /**
17
- * Policy-level subject selectors
18
- */
19
- subjects?: {
20
- [key: string]: any;
21
- };
9
+ beginsAt?: string;
10
+ spec?: AiGovernancePolicySpec;
11
+ subjects?: AiGovernanceSubjects;
22
12
  }
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -8,6 +8,10 @@ export interface AiGovernancePolicyListItem extends AiGovernancePolicyOverviewMe
8
8
  createdAt?: string;
9
9
  createdBy?: string;
10
10
  document?: AiGovernancePolicyDocument;
11
+ /**
12
+ * Harness folder identifier when the policy is assigned to a folder. Omitted when unset.
13
+ */
14
+ folderId?: string;
11
15
  /**
12
16
  * @format uuid
13
17
  */
@@ -1,9 +1,28 @@
1
1
  /**
2
- * Pagination request for listing governance policies
2
+ * Pagination request for listing governance policies. Use query for free-text name search; use filters for exact or structured criteria.
3
3
  */
4
4
  export interface AiGovernancePolicyListRequest {
5
+ /**
6
+ * Optional filters; supports name, folder_id, created_at, and updated_at with standard operators (equals, not_equals, greater_than, greater_than_or_equals, less_than, less_than_or_equals)
7
+ * @example [{"field":"folder_id","operator":"equals","values":["folder-abc123"]}]
8
+ */
5
9
  filters?: Array<{
6
- [key: string]: any;
10
+ /**
11
+ * Database column to filter on. Use folder_id (snake_case) to scope policies to a Harness folder.
12
+ */
13
+ field?: 'created_at' | 'folder_id' | 'name' | 'updated_at';
14
+ /**
15
+ * Multiple fields to filter with OR clause (higher priority than single field)
16
+ */
17
+ fields?: Array<'created_at' | 'folder_id' | 'name' | 'updated_at'>;
18
+ /**
19
+ * Filter operator
20
+ */
21
+ operator?: 'equals' | 'greater_than' | 'greater_than_or_equals' | 'less_than' | 'less_than_or_equals' | 'not_equals';
22
+ /**
23
+ * Values to match against the selected field
24
+ */
25
+ values?: string[];
7
26
  }>;
8
27
  /**
9
28
  * Number of records per page (max 100)
@@ -17,6 +36,11 @@ export interface AiGovernancePolicyListRequest {
17
36
  * @example 1
18
37
  */
19
38
  page?: number;
39
+ /**
40
+ * Search query to filter policies by name (case-insensitive partial match)
41
+ * @example "production"
42
+ */
43
+ query?: string;
20
44
  /**
21
45
  * Sorting options
22
46
  */
@@ -3,6 +3,10 @@ import type { AiGovernancePolicyUserHealth } from '../schemas/AiGovernancePolicy
3
3
  * Overview metrics shared by policy list items and the single-policy overview response. Spend fields are populated only after dry-run or reconcile writes the per-policy stats cache.
4
4
  */
5
5
  export interface AiGovernancePolicyOverviewMetrics {
6
+ /**
7
+ * Number of mapped subjects with an active block-user enforcement action
8
+ */
9
+ blockedCount: number;
6
10
  /**
7
11
  * Null until dry-run or reconcile has seeded the per-policy stats cache for the current period
8
12
  */
@@ -0,0 +1,45 @@
1
+ import type { AiGovernanceBudgetAction } from '../schemas/AiGovernanceBudgetAction';
2
+ /**
3
+ * Typed constraint payload for a policy. Only type=budget-cap is currently supported.
4
+ */
5
+ export interface AiGovernancePolicySpec {
6
+ /**
7
+ * Graduated responses triggered at ascending spend thresholds. Actions determine enforcement behavior; there is no separate enforcement strategy field. When omitted on create, the platform default is block-user at 100%.
8
+ */
9
+ actions?: AiGovernanceBudgetAction[];
10
+ /**
11
+ * Overall budget ceiling. Required unless every entry in providers sets its own amount.
12
+ */
13
+ amount?: number;
14
+ /**
15
+ * Approval tiers for budget-override requests, with strictly ascending upToAmount
16
+ */
17
+ approvals?: Array<{
18
+ approvers: {
19
+ auto?: boolean;
20
+ emails?: string[];
21
+ userGroups?: string[];
22
+ };
23
+ upToAmount: number;
24
+ }>;
25
+ /**
26
+ * Cron expression or descriptor (e.g. @hourly) controlling how often the policy is evaluated
27
+ */
28
+ evaluationSchedule: string;
29
+ /**
30
+ * Whether the ceiling applies per subject or to a shared pool. Defaults to per-subject (pooled for account-scoped subjects). Account-scoped policies must use pooled.
31
+ */
32
+ mode?: 'per-subject' | 'pooled';
33
+ period: 'custom' | 'monthly' | 'quarterly' | 'weekly';
34
+ /**
35
+ * Per-provider budget ceilings. Required (non-empty) when amount is omitted; provider names must not repeat. Each entry with its own amount creates an independent provider scope; an entry with no amount is governed by the total scope only.
36
+ */
37
+ providers?: Array<{
38
+ amount?: number;
39
+ provider: 'anthropic' | 'bedrock' | 'cursor';
40
+ }>;
41
+ /**
42
+ * Constraint shape; only budget-cap is currently supported
43
+ */
44
+ type: 'budget-cap';
45
+ }
@@ -1,5 +1,9 @@
1
1
  import type { AiGovernanceApprovalRequestView } from '../schemas/AiGovernanceApprovalRequestView';
2
2
  export interface AiGovernancePolicySubjectRow {
3
+ /**
4
+ * True when the subject has an active block-user enforcement action
5
+ */
6
+ blocked: boolean;
3
7
  /**
4
8
  * Effective budget ceiling after active overrides
5
9
  */
@@ -3,10 +3,10 @@
3
3
  */
4
4
  export interface AiGovernancePolicySubjectsRequest {
5
5
  /**
6
- * all returns every mapped subject; pending_requests returns only subjects with an open budget raise request
6
+ * all returns every mapped subject; pending_requests returns only subjects with an open budget raise request; blocked returns only subjects with an active block-user enforcement action
7
7
  * @default "all"
8
8
  */
9
- filter?: 'all' | 'pending_requests';
9
+ filter?: 'all' | 'blocked' | 'pending_requests';
10
10
  /**
11
11
  * Number of records per page (max 100)
12
12
  * @default 10
@@ -1,11 +1,17 @@
1
1
  import type { AiGovernancePolicyAuthoring } from '../schemas/AiGovernancePolicyAuthoring';
2
- /**
3
- * Provide either rawYaml or policy (not both required in schema, but one must be supplied at runtime).
4
- */
5
- export interface AiGovernancePolicyUpsertRequest {
6
- policy?: AiGovernancePolicyAuthoring;
2
+ export type AiGovernancePolicyUpsertRequest = {
7
3
  /**
8
- * Full governance policy YAML document with exactly one policy entry containing subjects and rules
4
+ * Optional Harness folder identifier for RBAC scoping and UI organization. Stored as a table column; not part of the policy document.
9
5
  */
10
- rawYaml?: string;
11
- }
6
+ folderId?: string;
7
+ /**
8
+ * Full governance policy YAML document with exactly one policy entry containing optional beginsAt, subjects, and spec
9
+ */
10
+ rawYaml: string;
11
+ } & {
12
+ /**
13
+ * Optional Harness folder identifier for RBAC scoping and UI organization. Stored as a table column; not part of the policy document.
14
+ */
15
+ folderId?: string;
16
+ policy: AiGovernancePolicyAuthoring;
17
+ };
@@ -0,0 +1,15 @@
1
+ export interface AiGovernanceRequestBudgetOverrideRequest {
2
+ /**
3
+ * Requested budget ceiling raise in USD dollars
4
+ */
5
+ amount: number;
6
+ /**
7
+ * Governance policy that contains the budget-cap rule
8
+ * @format uuid
9
+ */
10
+ policy_id: string;
11
+ /**
12
+ * Business justification for the override request
13
+ */
14
+ reason?: string;
15
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,32 @@
1
+ import type { AiGovernanceGovernancePeriod } from '../schemas/AiGovernanceGovernancePeriod';
2
+ export interface AiGovernanceRuleBudget {
3
+ /**
4
+ * Effective budget ceiling in USD dollars after active overrides
5
+ */
6
+ amount: number;
7
+ /**
8
+ * Spend as a percentage of the effective ceiling
9
+ */
10
+ percentage: number;
11
+ period: AiGovernanceGovernancePeriod;
12
+ /**
13
+ * Connector providers with spend in the current period for this rule
14
+ */
15
+ providers: string[];
16
+ /**
17
+ * Remaining budget in USD dollars (effective ceiling minus spend)
18
+ */
19
+ remaining: number;
20
+ /**
21
+ * Remaining budget as a percentage of the effective ceiling
22
+ */
23
+ remaining_percentage: number;
24
+ /**
25
+ * @format uuid
26
+ */
27
+ rule_id: string;
28
+ /**
29
+ * Current-period spend in USD dollars
30
+ */
31
+ spend: number;
32
+ }
@@ -0,0 +1,36 @@
1
+ export interface AiGovernanceRuleOverride {
2
+ /**
3
+ * @format uuid
4
+ */
5
+ approvalRequestId?: string;
6
+ /**
7
+ * @format date-time
8
+ */
9
+ createdAt?: string;
10
+ createdBy?: string;
11
+ /**
12
+ * @format date-time
13
+ */
14
+ expiresAt?: string;
15
+ /**
16
+ * @format uuid
17
+ */
18
+ id: string;
19
+ payload?: {
20
+ [key: string]: any;
21
+ };
22
+ /**
23
+ * @format uuid
24
+ */
25
+ policyId: string;
26
+ /**
27
+ * @format uuid
28
+ */
29
+ ruleId: string;
30
+ source: 'approved' | 'self-service';
31
+ subjectId: string;
32
+ /**
33
+ * @format date-time
34
+ */
35
+ updatedAt?: string;
36
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { AiGovernanceRuleOverride } from '../schemas/AiGovernanceRuleOverride';
2
+ export interface AiGovernanceRuleOverrideResponse {
3
+ code?: string;
4
+ errors?: string[];
5
+ response?: AiGovernanceRuleOverride;
6
+ success?: boolean;
7
+ /**
8
+ * Unix milliseconds timestamp
9
+ * @format int64
10
+ */
11
+ ts?: number;
12
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Policy-level subject selector. Exactly one of account, users, userGroups, perspective, or costCategory must be set.
3
+ */
4
+ export interface AiGovernanceSubjects {
5
+ /**
6
+ * Governs every subject on the account. Must be true when set.
7
+ */
8
+ account?: boolean;
9
+ /**
10
+ * Cost category identifier in scope
11
+ */
12
+ costCategory?: string;
13
+ /**
14
+ * Principals permanently excluded from every scope under the policy
15
+ */
16
+ exclude?: {
17
+ users?: string[];
18
+ };
19
+ /**
20
+ * Cost perspective identifier in scope
21
+ */
22
+ perspective?: string;
23
+ /**
24
+ * User group identifiers in scope
25
+ */
26
+ userGroups?: string[];
27
+ /**
28
+ * Explicit user emails in scope
29
+ */
30
+ users?: string[];
31
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { AiGovernancePolicyBudget } from '../schemas/AiGovernancePolicyBudget';
2
+ export interface AiGovernanceUserBudgetOverview {
3
+ policy_budgets: AiGovernancePolicyBudget[];
4
+ /**
5
+ * Canonical subject identifier for the logged-in user (typically email when available)
6
+ */
7
+ subject_id: string;
8
+ }
@@ -0,0 +1,4 @@
1
+ import type { AiGovernanceUserBudgetOverview } from '../schemas/AiGovernanceUserBudgetOverview';
2
+ export interface AiGovernanceUserBudgetOverviewResponse {
3
+ response: AiGovernanceUserBudgetOverview;
4
+ }
@@ -1,10 +1,15 @@
1
+ import type { AiGovernanceBudgetAction } from '../schemas/AiGovernanceBudgetAction';
1
2
  import type { AiGovernanceConnectorRef } from '../schemas/AiGovernanceConnectorRef';
2
3
  export interface AiGovernanceUserBudgetRow {
4
+ /**
5
+ * Graduated responses configured on the budget-cap rule, in ascending threshold order
6
+ */
7
+ actions: AiGovernanceBudgetAction[];
3
8
  /**
4
9
  * Budget ceiling from policy YAML, in USD dollars
5
10
  */
6
11
  authoredAmount: number;
7
- authoredConnectors: AiGovernanceConnectorRef[];
12
+ connectors: AiGovernanceConnectorRef[];
8
13
  /**
9
14
  * Effective ceiling after active overrides (same as authored until Phase 1b overrides land)
10
15
  */
@@ -26,16 +31,14 @@ export interface AiGovernanceUserBudgetRow {
26
31
  */
27
32
  policyId: string;
28
33
  policyName: string;
29
- resolvedConnectors: AiGovernanceConnectorRef[];
30
34
  /**
31
35
  * @format uuid
32
36
  */
33
37
  ruleId: string;
34
38
  /**
35
- * Current-period spend in USD cents from attribution
36
- * @format int64
39
+ * Current-period spend in USD dollars from attribution
37
40
  */
38
- spendCents: number;
41
+ spendDollars: number;
39
42
  /**
40
43
  * Spend as a percentage of the effective ceiling
41
44
  */
@@ -1,4 +1,4 @@
1
- export interface AiGovernanceMessageResponse {
1
+ export interface AlertMessageResponse {
2
2
  response: {
3
3
  /**
4
4
  * Success message
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ccm-optimization-service-client",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Harness CCM Optimization Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",