@harnessio/react-ccm-optimization-service-client 0.2.0 → 0.3.1
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/ccm-optimization-service/src/services/hooks/useCreateAiGovernancePolicyMutation.d.ts +23 -0
- package/dist/ccm-optimization-service/src/services/hooks/useCreateAiGovernancePolicyMutation.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useDeleteAiGovernancePolicyMutation.d.ts +24 -0
- package/dist/ccm-optimization-service/src/services/hooks/useDeleteAiGovernancePolicyMutation.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useDryRunAiGovernancePolicyMutation.d.ts +29 -0
- package/dist/ccm-optimization-service/src/services/hooks/useDryRunAiGovernancePolicyMutation.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useGetAiGovernancePolicyOverviewQuery.d.ts +24 -0
- package/dist/ccm-optimization-service/src/services/hooks/useGetAiGovernancePolicyOverviewQuery.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useGetAiGovernancePolicyQuery.d.ts +24 -0
- package/dist/ccm-optimization-service/src/services/hooks/useGetAiGovernancePolicyQuery.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useGetMyAiGovernanceBudgetOverviewQuery.d.ts +28 -0
- package/dist/ccm-optimization-service/src/services/hooks/useGetMyAiGovernanceBudgetOverviewQuery.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernanceOverrideRequestsMutation.d.ts +27 -0
- package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernanceOverrideRequestsMutation.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernancePoliciesMutation.d.ts +23 -0
- package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernancePoliciesMutation.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernancePolicySubjectsMutation.d.ts +27 -0
- package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernancePolicySubjectsMutation.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useListMyAiGovernanceBudgetsQuery.d.ts +20 -0
- package/dist/ccm-optimization-service/src/services/hooks/useListMyAiGovernanceBudgetsQuery.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useListMyAiGovernanceOverrideRequestsMutation.d.ts +23 -0
- package/dist/ccm-optimization-service/src/services/hooks/useListMyAiGovernanceOverrideRequestsMutation.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useRequestMyAiGovernanceBudgetOverrideMutation.d.ts +23 -0
- package/dist/ccm-optimization-service/src/services/hooks/useRequestMyAiGovernanceBudgetOverrideMutation.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useReviewAiGovernanceOverrideRequestsMutation.d.ts +27 -0
- package/dist/ccm-optimization-service/src/services/hooks/useReviewAiGovernanceOverrideRequestsMutation.js +14 -0
- package/dist/ccm-optimization-service/src/services/hooks/useUpdateAiGovernancePolicyMutation.d.ts +27 -0
- package/dist/ccm-optimization-service/src/services/hooks/useUpdateAiGovernancePolicyMutation.js +14 -0
- package/dist/ccm-optimization-service/src/services/index.d.ts +74 -0
- package/dist/ccm-optimization-service/src/services/index.js +14 -0
- package/dist/ccm-optimization-service/src/services/requestBodies/AiGovernancePolicyUpsertRequestRequestBody.d.ts +2 -0
- package/dist/ccm-optimization-service/src/services/requestBodies/AiGovernancePolicyUpsertRequestRequestBody.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceApprovalRequest.d.ts +64 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceApprovalRequest.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceApprovalRequestList.d.ts +20 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceApprovalRequestList.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceApprovalRequestListResponse.d.ts +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceApprovalRequestListResponse.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceApprovalRequestView.d.ts +7 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceApprovalRequestView.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceConnectorRef.d.ts +14 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceConnectorRef.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceDryRunResponse.d.ts +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceDryRunResponse.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceDryRunResult.d.ts +14 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceDryRunResult.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceDryRunRuleResult.d.ts +15 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceDryRunRuleResult.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceDryRunSubject.d.ts +28 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceDryRunSubject.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceGovernancePeriod.d.ts +21 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceGovernancePeriod.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceMyOverrideRequestsList.d.ts +6 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceMyOverrideRequestsList.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceMyOverrideRequestsListRequest.d.ts +47 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceMyOverrideRequestsListRequest.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceMyOverrideRequestsListResponse.d.ts +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceMyOverrideRequestsListResponse.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceOverrideRequestsListRequest.d.ts +51 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceOverrideRequestsListRequest.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicy.d.ts +24 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicy.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyAuthoring.d.ts +10 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyAuthoring.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyBudget.d.ts +9 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyBudget.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyDetails.d.ts +8 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyDetails.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyDetailsResponse.d.ts +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyDetailsResponse.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyDocument.d.ts +6 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyDocument.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyListItem.d.ts +21 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyListItem.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyListRequest.d.ts +33 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyListRequest.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyListResponse.d.ts +14 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyListResponse.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyOverviewMetrics.d.ts +31 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyOverviewMetrics.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyResponse.d.ts +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyResponse.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySpec.d.ts +56 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySpec.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySubjectRow.d.ts +24 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySubjectRow.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySubjectsRequest.d.ts +39 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySubjectsRequest.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySubjectsResponse.d.ts +14 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicySubjectsResponse.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyUpsertRequest.d.ts +11 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyUpsertRequest.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyUserHealth.d.ts +5 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernancePolicyUserHealth.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRequestBudgetOverrideRequest.d.ts +20 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRequestBudgetOverrideRequest.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceReviewOverrideItem.d.ts +11 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceReviewOverrideItem.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceReviewOverrideOutcome.d.ts +10 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceReviewOverrideOutcome.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceReviewOverridesRequest.d.ts +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceReviewOverridesRequest.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceReviewOverridesResponse.d.ts +12 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceReviewOverridesResponse.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceReviewOverridesResult.d.ts +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceReviewOverridesResult.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRuleBudget.d.ts +32 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceRuleBudget.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceSubjects.d.ts +31 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceSubjects.js +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetOverview.d.ts +8 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetOverview.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetOverviewResponse.d.ts +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetOverviewResponse.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetRow.d.ts +61 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetRow.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgets.d.ts +12 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgets.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetsResponse.d.ts +4 -0
- package/dist/ccm-optimization-service/src/services/schemas/AiGovernanceUserBudgetsResponse.js +1 -0
- package/dist/ccm-optimization-service/src/services/schemas/AlertMessageResponse.d.ts +8 -0
- package/dist/ccm-optimization-service/src/services/schemas/AlertMessageResponse.js +4 -0
- package/package.json +1 -1
package/dist/ccm-optimization-service/src/services/hooks/useCreateAiGovernancePolicyMutation.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernancePolicyResponse } from '../schemas/AiGovernancePolicyResponse';
|
|
3
|
+
import type { AiGovernancePolicyUpsertRequestRequestBody } from '../requestBodies/AiGovernancePolicyUpsertRequestRequestBody';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface CreateAiGovernancePolicyMutationPathParams {
|
|
7
|
+
account_id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface CreateAiGovernancePolicyMutationQueryParams {
|
|
10
|
+
accountIdentifier: string;
|
|
11
|
+
}
|
|
12
|
+
export type CreateAiGovernancePolicyRequestBody = AiGovernancePolicyUpsertRequestRequestBody;
|
|
13
|
+
export type CreateAiGovernancePolicyOkResponse = ResponseWithPagination<AiGovernancePolicyResponse>;
|
|
14
|
+
export type CreateAiGovernancePolicyErrorResponse = unknown;
|
|
15
|
+
export interface CreateAiGovernancePolicyProps extends CreateAiGovernancePolicyMutationPathParams, Omit<FetcherOptions<CreateAiGovernancePolicyMutationQueryParams, CreateAiGovernancePolicyRequestBody>, 'url'> {
|
|
16
|
+
queryParams: CreateAiGovernancePolicyMutationQueryParams;
|
|
17
|
+
body: CreateAiGovernancePolicyRequestBody;
|
|
18
|
+
}
|
|
19
|
+
export declare function createAiGovernancePolicy(props: CreateAiGovernancePolicyProps): Promise<CreateAiGovernancePolicyOkResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a governance policy from either a YAML upload (rawYaml) or a JSON policy object (policy). The persisted document is always canonical JSON with platform-assigned ruleIds. When the JSON path is used, rawYaml in the response is empty.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useCreateAiGovernancePolicyMutation(options?: Omit<UseMutationOptions<CreateAiGovernancePolicyOkResponse, CreateAiGovernancePolicyErrorResponse, CreateAiGovernancePolicyProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateAiGovernancePolicyOkResponse, unknown, CreateAiGovernancePolicyProps, unknown>;
|
package/dist/ccm-optimization-service/src/services/hooks/useCreateAiGovernancePolicyMutation.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function createAiGovernancePolicy(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/policies`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Creates a governance policy from either a YAML upload (rawYaml) or a JSON policy object (policy). The persisted document is always canonical JSON with platform-assigned ruleIds. When the JSON path is used, rawYaml in the response is empty.
|
|
11
|
+
*/
|
|
12
|
+
export function useCreateAiGovernancePolicyMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => createAiGovernancePolicy(mutateProps), options);
|
|
14
|
+
}
|
package/dist/ccm-optimization-service/src/services/hooks/useDeleteAiGovernancePolicyMutation.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AlertMessageResponse } from '../schemas/AlertMessageResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface DeleteAiGovernancePolicyMutationPathParams {
|
|
6
|
+
account_id: string;
|
|
7
|
+
/**
|
|
8
|
+
* @format uuid
|
|
9
|
+
*/
|
|
10
|
+
policy_id: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DeleteAiGovernancePolicyMutationQueryParams {
|
|
13
|
+
accountIdentifier: string;
|
|
14
|
+
}
|
|
15
|
+
export type DeleteAiGovernancePolicyOkResponse = ResponseWithPagination<AlertMessageResponse>;
|
|
16
|
+
export type DeleteAiGovernancePolicyErrorResponse = unknown;
|
|
17
|
+
export interface DeleteAiGovernancePolicyProps extends DeleteAiGovernancePolicyMutationPathParams, Omit<FetcherOptions<DeleteAiGovernancePolicyMutationQueryParams, unknown>, 'url'> {
|
|
18
|
+
queryParams: DeleteAiGovernancePolicyMutationQueryParams;
|
|
19
|
+
}
|
|
20
|
+
export declare function deleteAiGovernancePolicy(props: DeleteAiGovernancePolicyProps): Promise<DeleteAiGovernancePolicyOkResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Soft-deletes a governance policy.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useDeleteAiGovernancePolicyMutation(options?: Omit<UseMutationOptions<DeleteAiGovernancePolicyOkResponse, DeleteAiGovernancePolicyErrorResponse, DeleteAiGovernancePolicyProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteAiGovernancePolicyOkResponse, unknown, DeleteAiGovernancePolicyProps, unknown>;
|
package/dist/ccm-optimization-service/src/services/hooks/useDeleteAiGovernancePolicyMutation.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function deleteAiGovernancePolicy(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/policies/${props.policy_id}`, method: 'DELETE' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Soft-deletes a governance policy.
|
|
11
|
+
*/
|
|
12
|
+
export function useDeleteAiGovernancePolicyMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => deleteAiGovernancePolicy(mutateProps), options);
|
|
14
|
+
}
|
package/dist/ccm-optimization-service/src/services/hooks/useDryRunAiGovernancePolicyMutation.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernanceDryRunResponse } from '../schemas/AiGovernanceDryRunResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface DryRunAiGovernancePolicyMutationPathParams {
|
|
6
|
+
account_id: string;
|
|
7
|
+
/**
|
|
8
|
+
* @format uuid
|
|
9
|
+
*/
|
|
10
|
+
policy_id: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DryRunAiGovernancePolicyMutationQueryParams {
|
|
13
|
+
accountIdentifier: string;
|
|
14
|
+
/**
|
|
15
|
+
* @format uuid
|
|
16
|
+
*/
|
|
17
|
+
ruleId?: string;
|
|
18
|
+
subjectId?: string;
|
|
19
|
+
}
|
|
20
|
+
export type DryRunAiGovernancePolicyOkResponse = ResponseWithPagination<AiGovernanceDryRunResponse>;
|
|
21
|
+
export type DryRunAiGovernancePolicyErrorResponse = unknown;
|
|
22
|
+
export interface DryRunAiGovernancePolicyProps extends DryRunAiGovernancePolicyMutationPathParams, Omit<FetcherOptions<DryRunAiGovernancePolicyMutationQueryParams, unknown>, 'url'> {
|
|
23
|
+
queryParams: DryRunAiGovernancePolicyMutationQueryParams;
|
|
24
|
+
}
|
|
25
|
+
export declare function dryRunAiGovernancePolicy(props: DryRunAiGovernancePolicyProps): Promise<DryRunAiGovernancePolicyOkResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Evaluates who would be governed for the policy without persisting enforcement state. Optionally scope to one rule and/or subject.
|
|
28
|
+
*/
|
|
29
|
+
export declare function useDryRunAiGovernancePolicyMutation(options?: Omit<UseMutationOptions<DryRunAiGovernancePolicyOkResponse, DryRunAiGovernancePolicyErrorResponse, DryRunAiGovernancePolicyProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DryRunAiGovernancePolicyOkResponse, unknown, DryRunAiGovernancePolicyProps, unknown>;
|
package/dist/ccm-optimization-service/src/services/hooks/useDryRunAiGovernancePolicyMutation.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function dryRunAiGovernancePolicy(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/policies/${props.policy_id}/dry-run`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Evaluates who would be governed for the policy without persisting enforcement state. Optionally scope to one rule and/or subject.
|
|
11
|
+
*/
|
|
12
|
+
export function useDryRunAiGovernancePolicyMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => dryRunAiGovernancePolicy(mutateProps), options);
|
|
14
|
+
}
|
package/dist/ccm-optimization-service/src/services/hooks/useGetAiGovernancePolicyOverviewQuery.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernancePolicyDetailsResponse } from '../schemas/AiGovernancePolicyDetailsResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetAiGovernancePolicyOverviewQueryPathParams {
|
|
6
|
+
account_id: string;
|
|
7
|
+
/**
|
|
8
|
+
* @format uuid
|
|
9
|
+
*/
|
|
10
|
+
policy_id: string;
|
|
11
|
+
}
|
|
12
|
+
export interface GetAiGovernancePolicyOverviewQueryQueryParams {
|
|
13
|
+
accountIdentifier: string;
|
|
14
|
+
}
|
|
15
|
+
export type GetAiGovernancePolicyOverviewOkResponse = ResponseWithPagination<AiGovernancePolicyDetailsResponse>;
|
|
16
|
+
export type GetAiGovernancePolicyOverviewErrorResponse = unknown;
|
|
17
|
+
export interface GetAiGovernancePolicyOverviewProps extends GetAiGovernancePolicyOverviewQueryPathParams, Omit<FetcherOptions<GetAiGovernancePolicyOverviewQueryQueryParams, unknown>, 'url'> {
|
|
18
|
+
queryParams: GetAiGovernancePolicyOverviewQueryQueryParams;
|
|
19
|
+
}
|
|
20
|
+
export declare function getAiGovernancePolicyOverview(props: GetAiGovernancePolicyOverviewProps): Promise<GetAiGovernancePolicyOverviewOkResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns an admin overview for one governance policy including subject count, aggregate budget, health bands, cumulative spend in the current budget period, and pending budget raise requests. cumulativeSpend, spendPercent, and userHealth are null until dry-run or reconcile has seeded the per-policy stats cache for the current period; list and overview read that cache and do not query BigQuery.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useGetAiGovernancePolicyOverviewQuery(props: GetAiGovernancePolicyOverviewProps, options?: Omit<UseQueryOptions<GetAiGovernancePolicyOverviewOkResponse, GetAiGovernancePolicyOverviewErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAiGovernancePolicyOverviewOkResponse, unknown>;
|
package/dist/ccm-optimization-service/src/services/hooks/useGetAiGovernancePolicyOverviewQuery.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useQuery } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function getAiGovernancePolicyOverview(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/policies/${props.policy_id}/overview`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns an admin overview for one governance policy including subject count, aggregate budget, health bands, cumulative spend in the current budget period, and pending budget raise requests. cumulativeSpend, spendPercent, and userHealth are null until dry-run or reconcile has seeded the per-policy stats cache for the current period; list and overview read that cache and do not query BigQuery.
|
|
11
|
+
*/
|
|
12
|
+
export function useGetAiGovernancePolicyOverviewQuery(props, options) {
|
|
13
|
+
return useQuery(['GetAIGovernancePolicyOverview', props.account_id, props.policy_id, props.queryParams], ({ signal }) => getAiGovernancePolicyOverview(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernancePolicyResponse } from '../schemas/AiGovernancePolicyResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetAiGovernancePolicyQueryPathParams {
|
|
6
|
+
account_id: string;
|
|
7
|
+
/**
|
|
8
|
+
* @format uuid
|
|
9
|
+
*/
|
|
10
|
+
policy_id: string;
|
|
11
|
+
}
|
|
12
|
+
export interface GetAiGovernancePolicyQueryQueryParams {
|
|
13
|
+
accountIdentifier: string;
|
|
14
|
+
}
|
|
15
|
+
export type GetAiGovernancePolicyOkResponse = ResponseWithPagination<AiGovernancePolicyResponse>;
|
|
16
|
+
export type GetAiGovernancePolicyErrorResponse = unknown;
|
|
17
|
+
export interface GetAiGovernancePolicyProps extends GetAiGovernancePolicyQueryPathParams, Omit<FetcherOptions<GetAiGovernancePolicyQueryQueryParams, unknown>, 'url'> {
|
|
18
|
+
queryParams: GetAiGovernancePolicyQueryQueryParams;
|
|
19
|
+
}
|
|
20
|
+
export declare function getAiGovernancePolicy(props: GetAiGovernancePolicyProps): Promise<GetAiGovernancePolicyOkResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Returns one governance policy including persisted ruleIds per rule.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useGetAiGovernancePolicyQuery(props: GetAiGovernancePolicyProps, options?: Omit<UseQueryOptions<GetAiGovernancePolicyOkResponse, GetAiGovernancePolicyErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAiGovernancePolicyOkResponse, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useQuery } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function getAiGovernancePolicy(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/policies/${props.policy_id}`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns one governance policy including persisted ruleIds per rule.
|
|
11
|
+
*/
|
|
12
|
+
export function useGetAiGovernancePolicyQuery(props, options) {
|
|
13
|
+
return useQuery(['GetAIGovernancePolicy', props.account_id, props.policy_id, props.queryParams], ({ signal }) => getAiGovernancePolicy(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernanceUserBudgetOverviewResponse } from '../schemas/AiGovernanceUserBudgetOverviewResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetMyAiGovernanceBudgetOverviewQueryPathParams {
|
|
6
|
+
account_id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GetMyAiGovernanceBudgetOverviewQueryQueryParams {
|
|
9
|
+
accountIdentifier: string;
|
|
10
|
+
/**
|
|
11
|
+
* @format date-time
|
|
12
|
+
*/
|
|
13
|
+
from?: string;
|
|
14
|
+
/**
|
|
15
|
+
* @format date-time
|
|
16
|
+
*/
|
|
17
|
+
to?: string;
|
|
18
|
+
}
|
|
19
|
+
export type GetMyAiGovernanceBudgetOverviewOkResponse = ResponseWithPagination<AiGovernanceUserBudgetOverviewResponse>;
|
|
20
|
+
export type GetMyAiGovernanceBudgetOverviewErrorResponse = unknown;
|
|
21
|
+
export interface GetMyAiGovernanceBudgetOverviewProps extends GetMyAiGovernanceBudgetOverviewQueryPathParams, Omit<FetcherOptions<GetMyAiGovernanceBudgetOverviewQueryQueryParams, unknown>, 'url'> {
|
|
22
|
+
queryParams: GetMyAiGovernanceBudgetOverviewQueryQueryParams;
|
|
23
|
+
}
|
|
24
|
+
export declare function getMyAiGovernanceBudgetOverview(props: GetMyAiGovernanceBudgetOverviewProps): Promise<GetMyAiGovernanceBudgetOverviewOkResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Returns a spend-versus-budget overview for the logged-in user across all mapped governance policies. Each policy includes per-rule spend, effective ceiling, utilization percentages, and the current budget period window. When from and to query parameters are omitted, the window defaults to the last 30 days ending at the current UTC time. Requires authentication only; governed users do not need AI governance admin RBAC.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useGetMyAiGovernanceBudgetOverviewQuery(props: GetMyAiGovernanceBudgetOverviewProps, options?: Omit<UseQueryOptions<GetMyAiGovernanceBudgetOverviewOkResponse, GetMyAiGovernanceBudgetOverviewErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetMyAiGovernanceBudgetOverviewOkResponse, unknown>;
|
package/dist/ccm-optimization-service/src/services/hooks/useGetMyAiGovernanceBudgetOverviewQuery.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useQuery } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function getMyAiGovernanceBudgetOverview(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/me/overview`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns a spend-versus-budget overview for the logged-in user across all mapped governance policies. Each policy includes per-rule spend, effective ceiling, utilization percentages, and the current budget period window. When from and to query parameters are omitted, the window defaults to the last 30 days ending at the current UTC time. Requires authentication only; governed users do not need AI governance admin RBAC.
|
|
11
|
+
*/
|
|
12
|
+
export function useGetMyAiGovernanceBudgetOverviewQuery(props, options) {
|
|
13
|
+
return useQuery(['GetMyAIGovernanceBudgetOverview', props.account_id, props.queryParams], ({ signal }) => getMyAiGovernanceBudgetOverview(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernanceApprovalRequestListResponse } from '../schemas/AiGovernanceApprovalRequestListResponse';
|
|
3
|
+
import type { AiGovernanceOverrideRequestsListRequest } from '../schemas/AiGovernanceOverrideRequestsListRequest';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface ListAiGovernanceOverrideRequestsMutationPathParams {
|
|
7
|
+
account_id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @format uuid
|
|
10
|
+
*/
|
|
11
|
+
policy_id: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ListAiGovernanceOverrideRequestsMutationQueryParams {
|
|
14
|
+
accountIdentifier: string;
|
|
15
|
+
}
|
|
16
|
+
export type ListAiGovernanceOverrideRequestsRequestBody = AiGovernanceOverrideRequestsListRequest;
|
|
17
|
+
export type ListAiGovernanceOverrideRequestsOkResponse = ResponseWithPagination<AiGovernanceApprovalRequestListResponse>;
|
|
18
|
+
export type ListAiGovernanceOverrideRequestsErrorResponse = unknown;
|
|
19
|
+
export interface ListAiGovernanceOverrideRequestsProps extends ListAiGovernanceOverrideRequestsMutationPathParams, Omit<FetcherOptions<ListAiGovernanceOverrideRequestsMutationQueryParams, ListAiGovernanceOverrideRequestsRequestBody>, 'url'> {
|
|
20
|
+
queryParams: ListAiGovernanceOverrideRequestsMutationQueryParams;
|
|
21
|
+
body: ListAiGovernanceOverrideRequestsRequestBody;
|
|
22
|
+
}
|
|
23
|
+
export declare function listAiGovernanceOverrideRequests(props: ListAiGovernanceOverrideRequestsProps): Promise<ListAiGovernanceOverrideRequestsOkResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Returns active override requests and a paginated decision history for a governance policy. Visible only to users who are approvers on at least one approval tier of the policy. Each active request includes canApprove indicating whether the caller can act on the pending tier for the requested amount. Pagination (page/limit) applies to history; open requests are always returned in full. Optionally pass filters with field subject_id and operator equals to scope results to one governed user.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useListAiGovernanceOverrideRequestsMutation(options?: Omit<UseMutationOptions<ListAiGovernanceOverrideRequestsOkResponse, ListAiGovernanceOverrideRequestsErrorResponse, ListAiGovernanceOverrideRequestsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ListAiGovernanceOverrideRequestsOkResponse, unknown, ListAiGovernanceOverrideRequestsProps, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function listAiGovernanceOverrideRequests(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/policies/${props.policy_id}/override/requests`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns active override requests and a paginated decision history for a governance policy. Visible only to users who are approvers on at least one approval tier of the policy. Each active request includes canApprove indicating whether the caller can act on the pending tier for the requested amount. Pagination (page/limit) applies to history; open requests are always returned in full. Optionally pass filters with field subject_id and operator equals to scope results to one governed user.
|
|
11
|
+
*/
|
|
12
|
+
export function useListAiGovernanceOverrideRequestsMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => listAiGovernanceOverrideRequests(mutateProps), options);
|
|
14
|
+
}
|
package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernancePoliciesMutation.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernancePolicyListResponse } from '../schemas/AiGovernancePolicyListResponse';
|
|
3
|
+
import type { AiGovernancePolicyListRequest } from '../schemas/AiGovernancePolicyListRequest';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface ListAiGovernancePoliciesMutationPathParams {
|
|
7
|
+
account_id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ListAiGovernancePoliciesMutationQueryParams {
|
|
10
|
+
accountIdentifier: string;
|
|
11
|
+
}
|
|
12
|
+
export type ListAiGovernancePoliciesRequestBody = AiGovernancePolicyListRequest;
|
|
13
|
+
export type ListAiGovernancePoliciesOkResponse = ResponseWithPagination<AiGovernancePolicyListResponse>;
|
|
14
|
+
export type ListAiGovernancePoliciesErrorResponse = unknown;
|
|
15
|
+
export interface ListAiGovernancePoliciesProps extends ListAiGovernancePoliciesMutationPathParams, Omit<FetcherOptions<ListAiGovernancePoliciesMutationQueryParams, ListAiGovernancePoliciesRequestBody>, 'url'> {
|
|
16
|
+
queryParams: ListAiGovernancePoliciesMutationQueryParams;
|
|
17
|
+
body: ListAiGovernancePoliciesRequestBody;
|
|
18
|
+
}
|
|
19
|
+
export declare function listAiGovernancePolicies(props: ListAiGovernancePoliciesProps): Promise<ListAiGovernancePoliciesOkResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Returns a paginated list of governance policies. Each item is a flat object with persisted policy fields (id, name, document, audit metadata) plus overview metrics (subjects, budget, spend, health). List responses omit rawYaml. cumulativeSpend, spendPercent, and userHealth are null until dry-run or reconcile has seeded the per-policy stats cache for the current period.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useListAiGovernancePoliciesMutation(options?: Omit<UseMutationOptions<ListAiGovernancePoliciesOkResponse, ListAiGovernancePoliciesErrorResponse, ListAiGovernancePoliciesProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ListAiGovernancePoliciesOkResponse, unknown, ListAiGovernancePoliciesProps, unknown>;
|
package/dist/ccm-optimization-service/src/services/hooks/useListAiGovernancePoliciesMutation.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function listAiGovernancePolicies(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/policies/list`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns a paginated list of governance policies. Each item is a flat object with persisted policy fields (id, name, document, audit metadata) plus overview metrics (subjects, budget, spend, health). List responses omit rawYaml. cumulativeSpend, spendPercent, and userHealth are null until dry-run or reconcile has seeded the per-policy stats cache for the current period.
|
|
11
|
+
*/
|
|
12
|
+
export function useListAiGovernancePoliciesMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => listAiGovernancePolicies(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernancePolicySubjectsResponse } from '../schemas/AiGovernancePolicySubjectsResponse';
|
|
3
|
+
import type { AiGovernancePolicySubjectsRequest } from '../schemas/AiGovernancePolicySubjectsRequest';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface ListAiGovernancePolicySubjectsMutationPathParams {
|
|
7
|
+
account_id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @format uuid
|
|
10
|
+
*/
|
|
11
|
+
policy_id: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ListAiGovernancePolicySubjectsMutationQueryParams {
|
|
14
|
+
accountIdentifier: string;
|
|
15
|
+
}
|
|
16
|
+
export type ListAiGovernancePolicySubjectsRequestBody = AiGovernancePolicySubjectsRequest;
|
|
17
|
+
export type ListAiGovernancePolicySubjectsOkResponse = ResponseWithPagination<AiGovernancePolicySubjectsResponse>;
|
|
18
|
+
export type ListAiGovernancePolicySubjectsErrorResponse = unknown;
|
|
19
|
+
export interface ListAiGovernancePolicySubjectsProps extends ListAiGovernancePolicySubjectsMutationPathParams, Omit<FetcherOptions<ListAiGovernancePolicySubjectsMutationQueryParams, ListAiGovernancePolicySubjectsRequestBody>, 'url'> {
|
|
20
|
+
queryParams: ListAiGovernancePolicySubjectsMutationQueryParams;
|
|
21
|
+
body: ListAiGovernancePolicySubjectsRequestBody;
|
|
22
|
+
}
|
|
23
|
+
export declare function listAiGovernancePolicySubjects(props: ListAiGovernancePolicySubjectsProps): Promise<ListAiGovernancePolicySubjectsOkResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Returns a paginated admin view of subjects mapped to a governance policy. Each row includes effective budget (after active overrides), current-period spend, budget health status, and any open budget raise request.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useListAiGovernancePolicySubjectsMutation(options?: Omit<UseMutationOptions<ListAiGovernancePolicySubjectsOkResponse, ListAiGovernancePolicySubjectsErrorResponse, ListAiGovernancePolicySubjectsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ListAiGovernancePolicySubjectsOkResponse, unknown, ListAiGovernancePolicySubjectsProps, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function listAiGovernancePolicySubjects(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/policies/${props.policy_id}/subjects`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns a paginated admin view of subjects mapped to a governance policy. Each row includes effective budget (after active overrides), current-period spend, budget health status, and any open budget raise request.
|
|
11
|
+
*/
|
|
12
|
+
export function useListAiGovernancePolicySubjectsMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => listAiGovernancePolicySubjects(mutateProps), options);
|
|
14
|
+
}
|
package/dist/ccm-optimization-service/src/services/hooks/useListMyAiGovernanceBudgetsQuery.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernanceUserBudgetsResponse } from '../schemas/AiGovernanceUserBudgetsResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface ListMyAiGovernanceBudgetsQueryPathParams {
|
|
6
|
+
account_id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ListMyAiGovernanceBudgetsQueryQueryParams {
|
|
9
|
+
accountIdentifier: string;
|
|
10
|
+
}
|
|
11
|
+
export type ListMyAiGovernanceBudgetsOkResponse = ResponseWithPagination<AiGovernanceUserBudgetsResponse>;
|
|
12
|
+
export type ListMyAiGovernanceBudgetsErrorResponse = unknown;
|
|
13
|
+
export interface ListMyAiGovernanceBudgetsProps extends ListMyAiGovernanceBudgetsQueryPathParams, Omit<FetcherOptions<ListMyAiGovernanceBudgetsQueryQueryParams, unknown>, 'url'> {
|
|
14
|
+
queryParams: ListMyAiGovernanceBudgetsQueryQueryParams;
|
|
15
|
+
}
|
|
16
|
+
export declare function listMyAiGovernanceBudgets(props: ListMyAiGovernanceBudgetsProps): Promise<ListMyAiGovernanceBudgetsOkResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Returns budget-cap rules that govern the logged-in user, including effective ceilings and current-period spend. Requires authentication only; governed users do not need AI governance admin RBAC.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useListMyAiGovernanceBudgetsQuery(props: ListMyAiGovernanceBudgetsProps, options?: Omit<UseQueryOptions<ListMyAiGovernanceBudgetsOkResponse, ListMyAiGovernanceBudgetsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListMyAiGovernanceBudgetsOkResponse, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useQuery } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function listMyAiGovernanceBudgets(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/me/budgets`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns budget-cap rules that govern the logged-in user, including effective ceilings and current-period spend. Requires authentication only; governed users do not need AI governance admin RBAC.
|
|
11
|
+
*/
|
|
12
|
+
export function useListMyAiGovernanceBudgetsQuery(props, options) {
|
|
13
|
+
return useQuery(['ListMyAIGovernanceBudgets', props.account_id, props.queryParams], ({ signal }) => listMyAiGovernanceBudgets(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernanceMyOverrideRequestsListResponse } from '../schemas/AiGovernanceMyOverrideRequestsListResponse';
|
|
3
|
+
import type { AiGovernanceMyOverrideRequestsListRequest } from '../schemas/AiGovernanceMyOverrideRequestsListRequest';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface ListMyAiGovernanceOverrideRequestsMutationPathParams {
|
|
7
|
+
account_id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ListMyAiGovernanceOverrideRequestsMutationQueryParams {
|
|
10
|
+
accountIdentifier: string;
|
|
11
|
+
}
|
|
12
|
+
export type ListMyAiGovernanceOverrideRequestsRequestBody = AiGovernanceMyOverrideRequestsListRequest;
|
|
13
|
+
export type ListMyAiGovernanceOverrideRequestsOkResponse = ResponseWithPagination<AiGovernanceMyOverrideRequestsListResponse>;
|
|
14
|
+
export type ListMyAiGovernanceOverrideRequestsErrorResponse = unknown;
|
|
15
|
+
export interface ListMyAiGovernanceOverrideRequestsProps extends ListMyAiGovernanceOverrideRequestsMutationPathParams, Omit<FetcherOptions<ListMyAiGovernanceOverrideRequestsMutationQueryParams, ListMyAiGovernanceOverrideRequestsRequestBody>, 'url'> {
|
|
16
|
+
queryParams: ListMyAiGovernanceOverrideRequestsMutationQueryParams;
|
|
17
|
+
body: ListMyAiGovernanceOverrideRequestsRequestBody;
|
|
18
|
+
}
|
|
19
|
+
export declare function listMyAiGovernanceOverrideRequests(props: ListMyAiGovernanceOverrideRequestsProps): Promise<ListMyAiGovernanceOverrideRequestsOkResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Returns a paginated list of budget override requests submitted by the logged-in user across active (non-deleted) policies. Supports filters on status and policy_id, and sorting by created_at or requested_amount (amount alias accepted).
|
|
22
|
+
*/
|
|
23
|
+
export declare function useListMyAiGovernanceOverrideRequestsMutation(options?: Omit<UseMutationOptions<ListMyAiGovernanceOverrideRequestsOkResponse, ListMyAiGovernanceOverrideRequestsErrorResponse, ListMyAiGovernanceOverrideRequestsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ListMyAiGovernanceOverrideRequestsOkResponse, unknown, ListMyAiGovernanceOverrideRequestsProps, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function listMyAiGovernanceOverrideRequests(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/me/budgets/override/requests`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns a paginated list of budget override requests submitted by the logged-in user across active (non-deleted) policies. Supports filters on status and policy_id, and sorting by created_at or requested_amount (amount alias accepted).
|
|
11
|
+
*/
|
|
12
|
+
export function useListMyAiGovernanceOverrideRequestsMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => listMyAiGovernanceOverrideRequests(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AlertMessageResponse } from '../schemas/AlertMessageResponse';
|
|
3
|
+
import type { AiGovernanceRequestBudgetOverrideRequest } from '../schemas/AiGovernanceRequestBudgetOverrideRequest';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface RequestMyAiGovernanceBudgetOverrideMutationPathParams {
|
|
7
|
+
account_id: string;
|
|
8
|
+
}
|
|
9
|
+
export interface RequestMyAiGovernanceBudgetOverrideMutationQueryParams {
|
|
10
|
+
accountIdentifier: string;
|
|
11
|
+
}
|
|
12
|
+
export type RequestMyAiGovernanceBudgetOverrideRequestBody = AiGovernanceRequestBudgetOverrideRequest;
|
|
13
|
+
export type RequestMyAiGovernanceBudgetOverrideOkResponse = ResponseWithPagination<AlertMessageResponse>;
|
|
14
|
+
export type RequestMyAiGovernanceBudgetOverrideErrorResponse = unknown;
|
|
15
|
+
export interface RequestMyAiGovernanceBudgetOverrideProps extends RequestMyAiGovernanceBudgetOverrideMutationPathParams, Omit<FetcherOptions<RequestMyAiGovernanceBudgetOverrideMutationQueryParams, RequestMyAiGovernanceBudgetOverrideRequestBody>, 'url'> {
|
|
16
|
+
queryParams: RequestMyAiGovernanceBudgetOverrideMutationQueryParams;
|
|
17
|
+
body: RequestMyAiGovernanceBudgetOverrideRequestBody;
|
|
18
|
+
}
|
|
19
|
+
export declare function requestMyAiGovernanceBudgetOverride(props: RequestMyAiGovernanceBudgetOverrideProps): Promise<RequestMyAiGovernanceBudgetOverrideOkResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Submits a budget ceiling raise request for one budget-cap rule on a policy that governs the logged-in user. The request enters the policy's configured approval workflow (single- or multi-tier). Requires authentication only; governed users do not need AI governance admin RBAC.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useRequestMyAiGovernanceBudgetOverrideMutation(options?: Omit<UseMutationOptions<RequestMyAiGovernanceBudgetOverrideOkResponse, RequestMyAiGovernanceBudgetOverrideErrorResponse, RequestMyAiGovernanceBudgetOverrideProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<RequestMyAiGovernanceBudgetOverrideOkResponse, unknown, RequestMyAiGovernanceBudgetOverrideProps, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function requestMyAiGovernanceBudgetOverride(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/me/budgets/override/request`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Submits a budget ceiling raise request for one budget-cap rule on a policy that governs the logged-in user. The request enters the policy's configured approval workflow (single- or multi-tier). Requires authentication only; governed users do not need AI governance admin RBAC.
|
|
11
|
+
*/
|
|
12
|
+
export function useRequestMyAiGovernanceBudgetOverrideMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => requestMyAiGovernanceBudgetOverride(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernanceReviewOverridesResponse } from '../schemas/AiGovernanceReviewOverridesResponse';
|
|
3
|
+
import type { AiGovernanceReviewOverridesRequest } from '../schemas/AiGovernanceReviewOverridesRequest';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface ReviewAiGovernanceOverrideRequestsMutationPathParams {
|
|
7
|
+
account_id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @format uuid
|
|
10
|
+
*/
|
|
11
|
+
policy_id: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ReviewAiGovernanceOverrideRequestsMutationQueryParams {
|
|
14
|
+
accountIdentifier: string;
|
|
15
|
+
}
|
|
16
|
+
export type ReviewAiGovernanceOverrideRequestsRequestBody = AiGovernanceReviewOverridesRequest;
|
|
17
|
+
export type ReviewAiGovernanceOverrideRequestsOkResponse = ResponseWithPagination<AiGovernanceReviewOverridesResponse>;
|
|
18
|
+
export type ReviewAiGovernanceOverrideRequestsErrorResponse = unknown;
|
|
19
|
+
export interface ReviewAiGovernanceOverrideRequestsProps extends ReviewAiGovernanceOverrideRequestsMutationPathParams, Omit<FetcherOptions<ReviewAiGovernanceOverrideRequestsMutationQueryParams, ReviewAiGovernanceOverrideRequestsRequestBody>, 'url'> {
|
|
20
|
+
queryParams: ReviewAiGovernanceOverrideRequestsMutationQueryParams;
|
|
21
|
+
body: ReviewAiGovernanceOverrideRequestsRequestBody;
|
|
22
|
+
}
|
|
23
|
+
export declare function reviewAiGovernanceOverrideRequests(props: ReviewAiGovernanceOverrideRequestsProps): Promise<ReviewAiGovernanceOverrideRequestsOkResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Applies approve or reject actions to one or more open budget override requests on a governance policy. Each item is processed independently. The caller must be eligible to act on the pending approval tier. Approve advances multi-tier requests until all required tiers sign off; optional approved_amount on approve sets the approved ceiling when the caller is authorized for that amount.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useReviewAiGovernanceOverrideRequestsMutation(options?: Omit<UseMutationOptions<ReviewAiGovernanceOverrideRequestsOkResponse, ReviewAiGovernanceOverrideRequestsErrorResponse, ReviewAiGovernanceOverrideRequestsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ReviewAiGovernanceOverrideRequestsOkResponse, unknown, ReviewAiGovernanceOverrideRequestsProps, unknown>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function reviewAiGovernanceOverrideRequests(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/policies/${props.policy_id}/override/requests/review`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Applies approve or reject actions to one or more open budget override requests on a governance policy. Each item is processed independently. The caller must be eligible to act on the pending approval tier. Approve advances multi-tier requests until all required tiers sign off; optional approved_amount on approve sets the approved ceiling when the caller is authorized for that amount.
|
|
11
|
+
*/
|
|
12
|
+
export function useReviewAiGovernanceOverrideRequestsMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => reviewAiGovernanceOverrideRequests(mutateProps), options);
|
|
14
|
+
}
|
package/dist/ccm-optimization-service/src/services/hooks/useUpdateAiGovernancePolicyMutation.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { AiGovernancePolicyResponse } from '../schemas/AiGovernancePolicyResponse';
|
|
3
|
+
import type { AiGovernancePolicyUpsertRequestRequestBody } from '../requestBodies/AiGovernancePolicyUpsertRequestRequestBody';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface UpdateAiGovernancePolicyMutationPathParams {
|
|
7
|
+
account_id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @format uuid
|
|
10
|
+
*/
|
|
11
|
+
policy_id: string;
|
|
12
|
+
}
|
|
13
|
+
export interface UpdateAiGovernancePolicyMutationQueryParams {
|
|
14
|
+
accountIdentifier: string;
|
|
15
|
+
}
|
|
16
|
+
export type UpdateAiGovernancePolicyRequestBody = AiGovernancePolicyUpsertRequestRequestBody;
|
|
17
|
+
export type UpdateAiGovernancePolicyOkResponse = ResponseWithPagination<AiGovernancePolicyResponse>;
|
|
18
|
+
export type UpdateAiGovernancePolicyErrorResponse = unknown;
|
|
19
|
+
export interface UpdateAiGovernancePolicyProps extends UpdateAiGovernancePolicyMutationPathParams, Omit<FetcherOptions<UpdateAiGovernancePolicyMutationQueryParams, UpdateAiGovernancePolicyRequestBody>, 'url'> {
|
|
20
|
+
queryParams: UpdateAiGovernancePolicyMutationQueryParams;
|
|
21
|
+
body: UpdateAiGovernancePolicyRequestBody;
|
|
22
|
+
}
|
|
23
|
+
export declare function updateAiGovernancePolicy(props: UpdateAiGovernancePolicyProps): Promise<UpdateAiGovernancePolicyOkResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Replaces policy content from either rawYaml or policy JSON while preserving stable ruleIds where rule content is unchanged. When updated via the JSON path, any previously stored rawYaml is cleared so GET never returns YAML that no longer matches document.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useUpdateAiGovernancePolicyMutation(options?: Omit<UseMutationOptions<UpdateAiGovernancePolicyOkResponse, UpdateAiGovernancePolicyErrorResponse, UpdateAiGovernancePolicyProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateAiGovernancePolicyOkResponse, unknown, UpdateAiGovernancePolicyProps, unknown>;
|
package/dist/ccm-optimization-service/src/services/hooks/useUpdateAiGovernancePolicyMutation.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
|
+
// Please do not modify this code directly.
|
|
4
|
+
import { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function updateAiGovernancePolicy(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/accounts/${props.account_id}/ai-governance/policies/${props.policy_id}`, method: 'PUT' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Replaces policy content from either rawYaml or policy JSON while preserving stable ruleIds where rule content is unchanged. When updated via the JSON path, any previously stored rawYaml is cleared so GET never returns YAML that no longer matches document.
|
|
11
|
+
*/
|
|
12
|
+
export function useUpdateAiGovernancePolicyMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => updateAiGovernancePolicy(mutateProps), options);
|
|
14
|
+
}
|