@voyantjs/products-react 0.52.2 → 0.52.3

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/client.d.ts CHANGED
@@ -10,5 +10,7 @@ export interface FetchWithValidationOptions {
10
10
  baseUrl: string;
11
11
  fetcher: VoyantFetcher;
12
12
  }
13
+ export type QueryParamValue = string | number | boolean | null | undefined | Array<string | number | boolean>;
13
14
  export declare function fetchWithValidation<TOut>(path: string, schema: z.ZodType<TOut>, options: FetchWithValidationOptions, init?: RequestInit): Promise<TOut>;
15
+ export declare function withQueryParams(path: string, query?: object): string;
14
16
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,aACoB,CAAA;AAEjD,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;gBAEV,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;CAM3D;AAaD,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,aAAa,CAAA;CACvB;AAED,wBAAsB,mBAAmB,CAAC,IAAI,EAC5C,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EACvB,OAAO,EAAE,0BAA0B,EACnC,IAAI,CAAC,EAAE,WAAW,GACjB,OAAO,CAAC,IAAI,CAAC,CAgCf"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAElF,eAAO,MAAM,cAAc,EAAE,aACoB,CAAA;AAEjD,qBAAa,cAAe,SAAQ,KAAK;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;gBAEV,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;CAM3D;AAaD,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,aAAa,CAAA;CACvB;AAED,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,GACT,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;AAEpC,wBAAsB,mBAAmB,CAAC,IAAI,EAC5C,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EACvB,OAAO,EAAE,0BAA0B,EACnC,IAAI,CAAC,EAAE,WAAW,GACjB,OAAO,CAAC,IAAI,CAAC,CAgCf;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAwBpE"}
package/dist/client.js CHANGED
@@ -41,6 +41,26 @@ export async function fetchWithValidation(path, schema, options, init) {
41
41
  }
42
42
  return parsed.data;
43
43
  }
44
+ export function withQueryParams(path, query) {
45
+ if (!query) {
46
+ return path;
47
+ }
48
+ const params = new URLSearchParams();
49
+ for (const [key, value] of Object.entries(query)) {
50
+ if (value === undefined || value === null) {
51
+ continue;
52
+ }
53
+ if (Array.isArray(value)) {
54
+ for (const item of value) {
55
+ params.append(key, String(item));
56
+ }
57
+ continue;
58
+ }
59
+ params.set(key, String(value));
60
+ }
61
+ const serialized = params.toString();
62
+ return serialized ? `${path}?${serialized}` : path;
63
+ }
44
64
  async function safeJson(response) {
45
65
  const text = await response.text();
46
66
  if (!text)
@@ -3,6 +3,7 @@ export * from "./use-option-unit.js";
3
3
  export * from "./use-option-unit-mutation.js";
4
4
  export * from "./use-option-units.js";
5
5
  export * from "./use-product.js";
6
+ export * from "./use-product-action-ledger.js";
6
7
  export * from "./use-product-categories.js";
7
8
  export * from "./use-product-category.js";
8
9
  export * from "./use-product-category-mutation.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAA;AAC1D,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,oCAAoC,CAAA;AAClD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uCAAuC,CAAA;AACrD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,qCAAqC,CAAA;AACnD,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAA;AAC1D,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,oCAAoC,CAAA;AAClD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uCAAuC,CAAA;AACrD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,qCAAqC,CAAA;AACnD,cAAc,wBAAwB,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA"}
@@ -3,6 +3,7 @@ export * from "./use-option-unit.js";
3
3
  export * from "./use-option-unit-mutation.js";
4
4
  export * from "./use-option-units.js";
5
5
  export * from "./use-product.js";
6
+ export * from "./use-product-action-ledger.js";
6
7
  export * from "./use-product-categories.js";
7
8
  export * from "./use-product-category.js";
8
9
  export * from "./use-product-category-mutation.js";
@@ -0,0 +1,48 @@
1
+ import { type UseProductActionLedgerOptions } from "../query-options-action-ledger.js";
2
+ export declare function useProductActionLedger(productId: string | null | undefined, options?: UseProductActionLedgerOptions): import("@tanstack/react-query").UseQueryResult<{
3
+ data: {
4
+ id: string;
5
+ occurredAt: string;
6
+ actionName: string;
7
+ actionVersion: string;
8
+ actionKind: "reverse" | "read" | "delete" | "execute" | "update" | "create" | "approve" | "reject" | "compensate" | "duplicate";
9
+ status: "failed" | "cancelled" | "compensated" | "succeeded" | "requested" | "awaiting_approval" | "approved" | "denied" | "reversed" | "expired" | "superseded";
10
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
11
+ actorType: string | null;
12
+ principalType: "api_key" | "workflow" | "system" | "user" | "agent";
13
+ principalId: string;
14
+ principalSubtype: string | null;
15
+ sessionId: string | null;
16
+ apiTokenId: string | null;
17
+ internalRequest: boolean;
18
+ delegatedByPrincipalType: "api_key" | "workflow" | "system" | "user" | "agent" | null;
19
+ delegatedByPrincipalId: string | null;
20
+ delegationId: string | null;
21
+ callerType: string | null;
22
+ organizationId: string | null;
23
+ routeOrToolName: string | null;
24
+ workflowRunId: string | null;
25
+ workflowStepId: string | null;
26
+ correlationId: string | null;
27
+ causationActionId: string | null;
28
+ idempotencyScope: string | null;
29
+ idempotencyKey: string | null;
30
+ idempotencyFingerprint: string | null;
31
+ targetType: string;
32
+ targetId: string;
33
+ capabilityId: string | null;
34
+ capabilityVersion: string | null;
35
+ authorizationSource: string | null;
36
+ approvalId: string | null;
37
+ amendsActionId: string | null;
38
+ createdAt: string;
39
+ mutationSummary: string | null;
40
+ }[];
41
+ pageInfo: {
42
+ nextCursor: {
43
+ occurredAt: string;
44
+ id: string;
45
+ } | null;
46
+ };
47
+ }, Error>;
48
+ //# sourceMappingURL=use-product-action-ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-product-action-ledger.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-action-ledger.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,mCAAmC,CAAA;AAE1C,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,6BAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAS5C"}
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { useVoyantProductsContext } from "../provider.js";
4
+ import { getProductActionLedgerQueryOptions, } from "../query-options-action-ledger.js";
5
+ export function useProductActionLedger(productId, options = {}) {
6
+ const { baseUrl, fetcher } = useVoyantProductsContext();
7
+ const { enabled = true } = options;
8
+ return useQuery({
9
+ ...getProductActionLedgerQueryOptions({ baseUrl, fetcher }, productId, options),
10
+ enabled: enabled && Boolean(productId),
11
+ });
12
+ }
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
- export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher, } from "./client.js";
1
+ export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher, withQueryParams, } from "./client.js";
2
2
  export * from "./hooks/index.js";
3
+ export { listProductActionLedger, type ProductActionLedgerListInput } from "./operations.js";
3
4
  export { useVoyantProductsContext, type VoyantProductsContextValue, VoyantProductsProvider, type VoyantProductsProviderProps, } from "./provider.js";
4
- export { type ProductsListFilters, type ProductsListSortDir, type ProductsListSortField, productsQueryKeys, } from "./query-keys.js";
5
+ export { type ProductActionLedgerListCursor, type ProductActionLedgerListFilters, type ProductsListFilters, type ProductsListSortDir, type ProductsListSortField, productsQueryKeys, } from "./query-keys.js";
5
6
  export { getOptionUnitQueryOptions, getOptionUnitsQueryOptions, getProductCategoriesQueryOptions, getProductDayServicesQueryOptions, getProductDaysQueryOptions, getProductItinerariesQueryOptions, getProductItineraryDaysQueryOptions, getProductMediaQueryOptions, getProductOptionQueryOptions, getProductOptionsQueryOptions, getProductQueryOptions, getProductsQueryOptions, getProductTagsQueryOptions, getProductTypeQueryOptions, getProductTypesQueryOptions, getProductVersionsQueryOptions, } from "./query-options.js";
7
+ export { getProductActionLedgerQueryOptions } from "./query-options-action-ledger.js";
6
8
  export * from "./schemas.js";
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,GACnB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,wBAAwB,EACxB,KAAK,0BAA0B,EAC/B,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,iBAAiB,GAClB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,gCAAgC,EAChC,iCAAiC,EACjC,0BAA0B,EAC1B,iCAAiC,EACjC,mCAAmC,EACnC,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EACL,wBAAwB,EACxB,KAAK,0BAA0B,EAC/B,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,iBAAiB,GAClB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,gCAAgC,EAChC,iCAAiC,EACjC,0BAA0B,EAC1B,iCAAiC,EACjC,mCAAmC,EACnC,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,kCAAkC,EAAE,MAAM,kCAAkC,CAAA;AACrF,cAAc,cAAc,CAAA"}
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
- export { defaultFetcher, fetchWithValidation, VoyantApiError, } from "./client.js";
1
+ export { defaultFetcher, fetchWithValidation, VoyantApiError, withQueryParams, } from "./client.js";
2
2
  export * from "./hooks/index.js";
3
+ export { listProductActionLedger } from "./operations.js";
3
4
  export { useVoyantProductsContext, VoyantProductsProvider, } from "./provider.js";
4
5
  export { productsQueryKeys, } from "./query-keys.js";
5
6
  export { getOptionUnitQueryOptions, getOptionUnitsQueryOptions, getProductCategoriesQueryOptions, getProductDayServicesQueryOptions, getProductDaysQueryOptions, getProductItinerariesQueryOptions, getProductItineraryDaysQueryOptions, getProductMediaQueryOptions, getProductOptionQueryOptions, getProductOptionsQueryOptions, getProductQueryOptions, getProductsQueryOptions, getProductTagsQueryOptions, getProductTypeQueryOptions, getProductTypesQueryOptions, getProductVersionsQueryOptions, } from "./query-options.js";
7
+ export { getProductActionLedgerQueryOptions } from "./query-options-action-ledger.js";
6
8
  export * from "./schemas.js";
@@ -0,0 +1,53 @@
1
+ import { type FetchWithValidationOptions } from "./client.js";
2
+ import type { ProductActionLedgerListCursor } from "./query-keys.js";
3
+ export interface ProductActionLedgerListInput {
4
+ cursor?: ProductActionLedgerListCursor | null | undefined;
5
+ limit?: number | undefined;
6
+ }
7
+ export declare function listProductActionLedger(client: FetchWithValidationOptions, productId: string, input?: ProductActionLedgerListInput): Promise<{
8
+ data: {
9
+ id: string;
10
+ occurredAt: string;
11
+ actionName: string;
12
+ actionVersion: string;
13
+ actionKind: "reverse" | "read" | "delete" | "execute" | "update" | "create" | "approve" | "reject" | "compensate" | "duplicate";
14
+ status: "failed" | "cancelled" | "compensated" | "succeeded" | "requested" | "awaiting_approval" | "approved" | "denied" | "reversed" | "expired" | "superseded";
15
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
16
+ actorType: string | null;
17
+ principalType: "api_key" | "workflow" | "system" | "user" | "agent";
18
+ principalId: string;
19
+ principalSubtype: string | null;
20
+ sessionId: string | null;
21
+ apiTokenId: string | null;
22
+ internalRequest: boolean;
23
+ delegatedByPrincipalType: "api_key" | "workflow" | "system" | "user" | "agent" | null;
24
+ delegatedByPrincipalId: string | null;
25
+ delegationId: string | null;
26
+ callerType: string | null;
27
+ organizationId: string | null;
28
+ routeOrToolName: string | null;
29
+ workflowRunId: string | null;
30
+ workflowStepId: string | null;
31
+ correlationId: string | null;
32
+ causationActionId: string | null;
33
+ idempotencyScope: string | null;
34
+ idempotencyKey: string | null;
35
+ idempotencyFingerprint: string | null;
36
+ targetType: string;
37
+ targetId: string;
38
+ capabilityId: string | null;
39
+ capabilityVersion: string | null;
40
+ authorizationSource: string | null;
41
+ approvalId: string | null;
42
+ amendsActionId: string | null;
43
+ createdAt: string;
44
+ mutationSummary: string | null;
45
+ }[];
46
+ pageInfo: {
47
+ nextCursor: {
48
+ occurredAt: string;
49
+ id: string;
50
+ } | null;
51
+ };
52
+ }>;
53
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,0BAA0B,EAAwC,MAAM,aAAa,CAAA;AACnG,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAA;AAGpE,MAAM,WAAW,4BAA4B;IAC3C,MAAM,CAAC,EAAE,6BAA6B,GAAG,IAAI,GAAG,SAAS,CAAA;IACzD,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B;AAUD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,4BAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOzC"}
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { fetchWithValidation, withQueryParams } from "./client.js";
3
+ import { productActionLedgerListResponse } from "./schemas.js";
4
+ function toProductActionLedgerQuery(input) {
5
+ return {
6
+ cursorOccurredAt: input?.cursor?.occurredAt,
7
+ cursorId: input?.cursor?.id,
8
+ limit: input?.limit,
9
+ };
10
+ }
11
+ export function listProductActionLedger(client, productId, input = {}) {
12
+ return fetchWithValidation(withQueryParams(`/v1/products/${productId}/action-ledger`, toProductActionLedgerQuery(input)), productActionLedgerListResponse, client);
13
+ }
@@ -57,11 +57,21 @@ export interface ProductMediaListFilters {
57
57
  limit?: number | undefined;
58
58
  offset?: number | undefined;
59
59
  }
60
+ export interface ProductActionLedgerListCursor {
61
+ occurredAt: string;
62
+ id: string;
63
+ }
64
+ export interface ProductActionLedgerListFilters {
65
+ cursorOccurredAt?: string | undefined;
66
+ cursorId?: string | undefined;
67
+ limit?: number | undefined;
68
+ }
60
69
  export declare const productsQueryKeys: {
61
70
  readonly all: readonly ["voyant", "products"];
62
71
  readonly products: () => readonly ["voyant", "products", "products"];
63
72
  readonly productsList: (filters: ProductsListFilters) => readonly ["voyant", "products", "products", "list", ProductsListFilters];
64
73
  readonly product: (id: string) => readonly ["voyant", "products", "products", "detail", string];
74
+ readonly productActionLedger: (id: string, filters?: ProductActionLedgerListFilters) => readonly ["voyant", "products", "products", "detail", string, "action-ledger", ProductActionLedgerListFilters];
65
75
  readonly productTypes: () => readonly ["voyant", "products", "product-types"];
66
76
  readonly productTypesList: (filters: ProductTypesListFilters) => readonly ["voyant", "products", "product-types", "list", ProductTypesListFilters];
67
77
  readonly productType: (id: string) => readonly ["voyant", "products", "product-types", "detail", string];
@@ -1 +1 @@
1
- {"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN,QAAQ,GACR,YAAY,GACZ,KAAK,GACL,WAAW,GACX,SAAS,GACT,WAAW,CAAA;AAEf,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,MAAM,CAAA;AAEhD,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,aAAa,CAAC,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BAA8B;;yCAI7C,uBAAuB;+BAEjC,MAAM;;8CAGS,4BAA4B;mCAEvC,MAAM;;wCAID,sBAAsB;8BAEhC,MAAM;;2CAGO,yBAAyB;iCAEnC,MAAM;;wCAGC,sBAAsB;8BAEhC,MAAM;6CAES,MAAM;+CAEJ,MAAM,eAAe,MAAM;sCAEpC,MAAM;6CACC,MAAM,SAAS,MAAM;0CAExB,MAAM;uCAET,MAAM;2CACF,MAAM,WAAW,uBAAuB;yCAE1C,MAAM;CAE1B,CAAA"}
@@ -3,6 +3,7 @@ export const productsQueryKeys = {
3
3
  products: () => [...productsQueryKeys.all, "products"],
4
4
  productsList: (filters) => [...productsQueryKeys.products(), "list", filters],
5
5
  product: (id) => [...productsQueryKeys.products(), "detail", id],
6
+ productActionLedger: (id, filters = {}) => [...productsQueryKeys.product(id), "action-ledger", filters],
6
7
  productTypes: () => [...productsQueryKeys.all, "product-types"],
7
8
  productTypesList: (filters) => [...productsQueryKeys.productTypes(), "list", filters],
8
9
  productType: (id) => [...productsQueryKeys.productTypes(), "detail", id],
@@ -0,0 +1,194 @@
1
+ import type { FetchWithValidationOptions } from "./client.js";
2
+ import { type ProductActionLedgerListInput } from "./operations.js";
3
+ export interface UseProductActionLedgerOptions extends ProductActionLedgerListInput {
4
+ enabled?: boolean;
5
+ }
6
+ export declare function getProductActionLedgerQueryOptions(client: FetchWithValidationOptions, productId: string | null | undefined, options?: UseProductActionLedgerOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
7
+ data: {
8
+ id: string;
9
+ occurredAt: string;
10
+ actionName: string;
11
+ actionVersion: string;
12
+ actionKind: "reverse" | "read" | "delete" | "execute" | "update" | "create" | "approve" | "reject" | "compensate" | "duplicate";
13
+ status: "failed" | "cancelled" | "compensated" | "succeeded" | "requested" | "awaiting_approval" | "approved" | "denied" | "reversed" | "expired" | "superseded";
14
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
15
+ actorType: string | null;
16
+ principalType: "api_key" | "workflow" | "system" | "user" | "agent";
17
+ principalId: string;
18
+ principalSubtype: string | null;
19
+ sessionId: string | null;
20
+ apiTokenId: string | null;
21
+ internalRequest: boolean;
22
+ delegatedByPrincipalType: "api_key" | "workflow" | "system" | "user" | "agent" | null;
23
+ delegatedByPrincipalId: string | null;
24
+ delegationId: string | null;
25
+ callerType: string | null;
26
+ organizationId: string | null;
27
+ routeOrToolName: string | null;
28
+ workflowRunId: string | null;
29
+ workflowStepId: string | null;
30
+ correlationId: string | null;
31
+ causationActionId: string | null;
32
+ idempotencyScope: string | null;
33
+ idempotencyKey: string | null;
34
+ idempotencyFingerprint: string | null;
35
+ targetType: string;
36
+ targetId: string;
37
+ capabilityId: string | null;
38
+ capabilityVersion: string | null;
39
+ authorizationSource: string | null;
40
+ approvalId: string | null;
41
+ amendsActionId: string | null;
42
+ createdAt: string;
43
+ mutationSummary: string | null;
44
+ }[];
45
+ pageInfo: {
46
+ nextCursor: {
47
+ occurredAt: string;
48
+ id: string;
49
+ } | null;
50
+ };
51
+ }, Error, {
52
+ data: {
53
+ id: string;
54
+ occurredAt: string;
55
+ actionName: string;
56
+ actionVersion: string;
57
+ actionKind: "reverse" | "read" | "delete" | "execute" | "update" | "create" | "approve" | "reject" | "compensate" | "duplicate";
58
+ status: "failed" | "cancelled" | "compensated" | "succeeded" | "requested" | "awaiting_approval" | "approved" | "denied" | "reversed" | "expired" | "superseded";
59
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
60
+ actorType: string | null;
61
+ principalType: "api_key" | "workflow" | "system" | "user" | "agent";
62
+ principalId: string;
63
+ principalSubtype: string | null;
64
+ sessionId: string | null;
65
+ apiTokenId: string | null;
66
+ internalRequest: boolean;
67
+ delegatedByPrincipalType: "api_key" | "workflow" | "system" | "user" | "agent" | null;
68
+ delegatedByPrincipalId: string | null;
69
+ delegationId: string | null;
70
+ callerType: string | null;
71
+ organizationId: string | null;
72
+ routeOrToolName: string | null;
73
+ workflowRunId: string | null;
74
+ workflowStepId: string | null;
75
+ correlationId: string | null;
76
+ causationActionId: string | null;
77
+ idempotencyScope: string | null;
78
+ idempotencyKey: string | null;
79
+ idempotencyFingerprint: string | null;
80
+ targetType: string;
81
+ targetId: string;
82
+ capabilityId: string | null;
83
+ capabilityVersion: string | null;
84
+ authorizationSource: string | null;
85
+ approvalId: string | null;
86
+ amendsActionId: string | null;
87
+ createdAt: string;
88
+ mutationSummary: string | null;
89
+ }[];
90
+ pageInfo: {
91
+ nextCursor: {
92
+ occurredAt: string;
93
+ id: string;
94
+ } | null;
95
+ };
96
+ }, readonly ["voyant", "products", "products", "detail", string, "action-ledger", import("./query-keys.js").ProductActionLedgerListFilters]>, "queryFn"> & {
97
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
98
+ data: {
99
+ id: string;
100
+ occurredAt: string;
101
+ actionName: string;
102
+ actionVersion: string;
103
+ actionKind: "reverse" | "read" | "delete" | "execute" | "update" | "create" | "approve" | "reject" | "compensate" | "duplicate";
104
+ status: "failed" | "cancelled" | "compensated" | "succeeded" | "requested" | "awaiting_approval" | "approved" | "denied" | "reversed" | "expired" | "superseded";
105
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
106
+ actorType: string | null;
107
+ principalType: "api_key" | "workflow" | "system" | "user" | "agent";
108
+ principalId: string;
109
+ principalSubtype: string | null;
110
+ sessionId: string | null;
111
+ apiTokenId: string | null;
112
+ internalRequest: boolean;
113
+ delegatedByPrincipalType: "api_key" | "workflow" | "system" | "user" | "agent" | null;
114
+ delegatedByPrincipalId: string | null;
115
+ delegationId: string | null;
116
+ callerType: string | null;
117
+ organizationId: string | null;
118
+ routeOrToolName: string | null;
119
+ workflowRunId: string | null;
120
+ workflowStepId: string | null;
121
+ correlationId: string | null;
122
+ causationActionId: string | null;
123
+ idempotencyScope: string | null;
124
+ idempotencyKey: string | null;
125
+ idempotencyFingerprint: string | null;
126
+ targetType: string;
127
+ targetId: string;
128
+ capabilityId: string | null;
129
+ capabilityVersion: string | null;
130
+ authorizationSource: string | null;
131
+ approvalId: string | null;
132
+ amendsActionId: string | null;
133
+ createdAt: string;
134
+ mutationSummary: string | null;
135
+ }[];
136
+ pageInfo: {
137
+ nextCursor: {
138
+ occurredAt: string;
139
+ id: string;
140
+ } | null;
141
+ };
142
+ }, readonly ["voyant", "products", "products", "detail", string, "action-ledger", import("./query-keys.js").ProductActionLedgerListFilters], never> | undefined;
143
+ } & {
144
+ queryKey: readonly ["voyant", "products", "products", "detail", string, "action-ledger", import("./query-keys.js").ProductActionLedgerListFilters] & {
145
+ [dataTagSymbol]: {
146
+ data: {
147
+ id: string;
148
+ occurredAt: string;
149
+ actionName: string;
150
+ actionVersion: string;
151
+ actionKind: "reverse" | "read" | "delete" | "execute" | "update" | "create" | "approve" | "reject" | "compensate" | "duplicate";
152
+ status: "failed" | "cancelled" | "compensated" | "succeeded" | "requested" | "awaiting_approval" | "approved" | "denied" | "reversed" | "expired" | "superseded";
153
+ evaluatedRisk: "high" | "low" | "medium" | "critical";
154
+ actorType: string | null;
155
+ principalType: "api_key" | "workflow" | "system" | "user" | "agent";
156
+ principalId: string;
157
+ principalSubtype: string | null;
158
+ sessionId: string | null;
159
+ apiTokenId: string | null;
160
+ internalRequest: boolean;
161
+ delegatedByPrincipalType: "api_key" | "workflow" | "system" | "user" | "agent" | null;
162
+ delegatedByPrincipalId: string | null;
163
+ delegationId: string | null;
164
+ callerType: string | null;
165
+ organizationId: string | null;
166
+ routeOrToolName: string | null;
167
+ workflowRunId: string | null;
168
+ workflowStepId: string | null;
169
+ correlationId: string | null;
170
+ causationActionId: string | null;
171
+ idempotencyScope: string | null;
172
+ idempotencyKey: string | null;
173
+ idempotencyFingerprint: string | null;
174
+ targetType: string;
175
+ targetId: string;
176
+ capabilityId: string | null;
177
+ capabilityVersion: string | null;
178
+ authorizationSource: string | null;
179
+ approvalId: string | null;
180
+ amendsActionId: string | null;
181
+ createdAt: string;
182
+ mutationSummary: string | null;
183
+ }[];
184
+ pageInfo: {
185
+ nextCursor: {
186
+ occurredAt: string;
187
+ id: string;
188
+ } | null;
189
+ };
190
+ };
191
+ [dataTagErrorSymbol]: Error;
192
+ };
193
+ };
194
+ //# sourceMappingURL=query-options-action-ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-options-action-ledger.d.ts","sourceRoot":"","sources":["../src/query-options-action-ledger.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAA2B,KAAK,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAG5F,MAAM,WAAW,6BAA8B,SAAQ,4BAA4B;IACjF,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,6BAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB5C"}
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import { queryOptions } from "@tanstack/react-query";
3
+ import { listProductActionLedger } from "./operations.js";
4
+ import { productsQueryKeys } from "./query-keys.js";
5
+ export function getProductActionLedgerQueryOptions(client, productId, options = {}) {
6
+ const { enabled: _enabled = true, ...ledgerOptions } = options;
7
+ return queryOptions({
8
+ queryKey: productsQueryKeys.productActionLedger(productId ?? "", {
9
+ cursorOccurredAt: ledgerOptions.cursor?.occurredAt,
10
+ cursorId: ledgerOptions.cursor?.id,
11
+ limit: ledgerOptions.limit,
12
+ }),
13
+ queryFn: async () => {
14
+ if (!productId) {
15
+ throw new Error("getProductActionLedgerQueryOptions requires a productId");
16
+ }
17
+ return listProductActionLedger(client, productId, ledgerOptions);
18
+ },
19
+ });
20
+ }
package/dist/schemas.d.ts CHANGED
@@ -763,6 +763,210 @@ export declare const productMediaResponse: z.ZodObject<{
763
763
  updatedAt: z.ZodString;
764
764
  }, z.core.$strip>;
765
765
  }, z.core.$strip>;
766
+ export declare const productActionLedgerActionKindSchema: z.ZodEnum<{
767
+ reverse: "reverse";
768
+ read: "read";
769
+ delete: "delete";
770
+ execute: "execute";
771
+ update: "update";
772
+ create: "create";
773
+ approve: "approve";
774
+ reject: "reject";
775
+ compensate: "compensate";
776
+ duplicate: "duplicate";
777
+ }>;
778
+ export declare const productActionLedgerStatusSchema: z.ZodEnum<{
779
+ failed: "failed";
780
+ cancelled: "cancelled";
781
+ compensated: "compensated";
782
+ succeeded: "succeeded";
783
+ requested: "requested";
784
+ awaiting_approval: "awaiting_approval";
785
+ approved: "approved";
786
+ denied: "denied";
787
+ reversed: "reversed";
788
+ expired: "expired";
789
+ superseded: "superseded";
790
+ }>;
791
+ export declare const productActionLedgerRiskSchema: z.ZodEnum<{
792
+ high: "high";
793
+ low: "low";
794
+ medium: "medium";
795
+ critical: "critical";
796
+ }>;
797
+ export declare const productActionLedgerPrincipalTypeSchema: z.ZodEnum<{
798
+ api_key: "api_key";
799
+ workflow: "workflow";
800
+ system: "system";
801
+ user: "user";
802
+ agent: "agent";
803
+ }>;
804
+ export declare const productActionLedgerEntrySchema: z.ZodObject<{
805
+ id: z.ZodString;
806
+ occurredAt: z.ZodString;
807
+ actionName: z.ZodString;
808
+ actionVersion: z.ZodString;
809
+ actionKind: z.ZodEnum<{
810
+ reverse: "reverse";
811
+ read: "read";
812
+ delete: "delete";
813
+ execute: "execute";
814
+ update: "update";
815
+ create: "create";
816
+ approve: "approve";
817
+ reject: "reject";
818
+ compensate: "compensate";
819
+ duplicate: "duplicate";
820
+ }>;
821
+ status: z.ZodEnum<{
822
+ failed: "failed";
823
+ cancelled: "cancelled";
824
+ compensated: "compensated";
825
+ succeeded: "succeeded";
826
+ requested: "requested";
827
+ awaiting_approval: "awaiting_approval";
828
+ approved: "approved";
829
+ denied: "denied";
830
+ reversed: "reversed";
831
+ expired: "expired";
832
+ superseded: "superseded";
833
+ }>;
834
+ evaluatedRisk: z.ZodEnum<{
835
+ high: "high";
836
+ low: "low";
837
+ medium: "medium";
838
+ critical: "critical";
839
+ }>;
840
+ actorType: z.ZodNullable<z.ZodString>;
841
+ principalType: z.ZodEnum<{
842
+ api_key: "api_key";
843
+ workflow: "workflow";
844
+ system: "system";
845
+ user: "user";
846
+ agent: "agent";
847
+ }>;
848
+ principalId: z.ZodString;
849
+ principalSubtype: z.ZodNullable<z.ZodString>;
850
+ sessionId: z.ZodNullable<z.ZodString>;
851
+ apiTokenId: z.ZodNullable<z.ZodString>;
852
+ internalRequest: z.ZodBoolean;
853
+ delegatedByPrincipalType: z.ZodNullable<z.ZodEnum<{
854
+ api_key: "api_key";
855
+ workflow: "workflow";
856
+ system: "system";
857
+ user: "user";
858
+ agent: "agent";
859
+ }>>;
860
+ delegatedByPrincipalId: z.ZodNullable<z.ZodString>;
861
+ delegationId: z.ZodNullable<z.ZodString>;
862
+ callerType: z.ZodNullable<z.ZodString>;
863
+ organizationId: z.ZodNullable<z.ZodString>;
864
+ routeOrToolName: z.ZodNullable<z.ZodString>;
865
+ workflowRunId: z.ZodNullable<z.ZodString>;
866
+ workflowStepId: z.ZodNullable<z.ZodString>;
867
+ correlationId: z.ZodNullable<z.ZodString>;
868
+ causationActionId: z.ZodNullable<z.ZodString>;
869
+ idempotencyScope: z.ZodNullable<z.ZodString>;
870
+ idempotencyKey: z.ZodNullable<z.ZodString>;
871
+ idempotencyFingerprint: z.ZodNullable<z.ZodString>;
872
+ targetType: z.ZodString;
873
+ targetId: z.ZodString;
874
+ capabilityId: z.ZodNullable<z.ZodString>;
875
+ capabilityVersion: z.ZodNullable<z.ZodString>;
876
+ authorizationSource: z.ZodNullable<z.ZodString>;
877
+ approvalId: z.ZodNullable<z.ZodString>;
878
+ amendsActionId: z.ZodNullable<z.ZodString>;
879
+ createdAt: z.ZodString;
880
+ mutationSummary: z.ZodNullable<z.ZodString>;
881
+ }, z.core.$strip>;
882
+ export type ProductActionLedgerEntryRecord = z.infer<typeof productActionLedgerEntrySchema>;
883
+ export declare const productActionLedgerListResponse: z.ZodObject<{
884
+ data: z.ZodArray<z.ZodObject<{
885
+ id: z.ZodString;
886
+ occurredAt: z.ZodString;
887
+ actionName: z.ZodString;
888
+ actionVersion: z.ZodString;
889
+ actionKind: z.ZodEnum<{
890
+ reverse: "reverse";
891
+ read: "read";
892
+ delete: "delete";
893
+ execute: "execute";
894
+ update: "update";
895
+ create: "create";
896
+ approve: "approve";
897
+ reject: "reject";
898
+ compensate: "compensate";
899
+ duplicate: "duplicate";
900
+ }>;
901
+ status: z.ZodEnum<{
902
+ failed: "failed";
903
+ cancelled: "cancelled";
904
+ compensated: "compensated";
905
+ succeeded: "succeeded";
906
+ requested: "requested";
907
+ awaiting_approval: "awaiting_approval";
908
+ approved: "approved";
909
+ denied: "denied";
910
+ reversed: "reversed";
911
+ expired: "expired";
912
+ superseded: "superseded";
913
+ }>;
914
+ evaluatedRisk: z.ZodEnum<{
915
+ high: "high";
916
+ low: "low";
917
+ medium: "medium";
918
+ critical: "critical";
919
+ }>;
920
+ actorType: z.ZodNullable<z.ZodString>;
921
+ principalType: z.ZodEnum<{
922
+ api_key: "api_key";
923
+ workflow: "workflow";
924
+ system: "system";
925
+ user: "user";
926
+ agent: "agent";
927
+ }>;
928
+ principalId: z.ZodString;
929
+ principalSubtype: z.ZodNullable<z.ZodString>;
930
+ sessionId: z.ZodNullable<z.ZodString>;
931
+ apiTokenId: z.ZodNullable<z.ZodString>;
932
+ internalRequest: z.ZodBoolean;
933
+ delegatedByPrincipalType: z.ZodNullable<z.ZodEnum<{
934
+ api_key: "api_key";
935
+ workflow: "workflow";
936
+ system: "system";
937
+ user: "user";
938
+ agent: "agent";
939
+ }>>;
940
+ delegatedByPrincipalId: z.ZodNullable<z.ZodString>;
941
+ delegationId: z.ZodNullable<z.ZodString>;
942
+ callerType: z.ZodNullable<z.ZodString>;
943
+ organizationId: z.ZodNullable<z.ZodString>;
944
+ routeOrToolName: z.ZodNullable<z.ZodString>;
945
+ workflowRunId: z.ZodNullable<z.ZodString>;
946
+ workflowStepId: z.ZodNullable<z.ZodString>;
947
+ correlationId: z.ZodNullable<z.ZodString>;
948
+ causationActionId: z.ZodNullable<z.ZodString>;
949
+ idempotencyScope: z.ZodNullable<z.ZodString>;
950
+ idempotencyKey: z.ZodNullable<z.ZodString>;
951
+ idempotencyFingerprint: z.ZodNullable<z.ZodString>;
952
+ targetType: z.ZodString;
953
+ targetId: z.ZodString;
954
+ capabilityId: z.ZodNullable<z.ZodString>;
955
+ capabilityVersion: z.ZodNullable<z.ZodString>;
956
+ authorizationSource: z.ZodNullable<z.ZodString>;
957
+ approvalId: z.ZodNullable<z.ZodString>;
958
+ amendsActionId: z.ZodNullable<z.ZodString>;
959
+ createdAt: z.ZodString;
960
+ mutationSummary: z.ZodNullable<z.ZodString>;
961
+ }, z.core.$strip>>;
962
+ pageInfo: z.ZodObject<{
963
+ nextCursor: z.ZodNullable<z.ZodObject<{
964
+ occurredAt: z.ZodString;
965
+ id: z.ZodString;
966
+ }, z.core.$strip>>;
967
+ }, z.core.$strip>;
968
+ }, z.core.$strip>;
969
+ export type ProductActionLedgerListResponse = z.infer<typeof productActionLedgerListResponse>;
766
970
  export { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductMediaSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductMediaSchema, };
767
971
  export type CreateProductItineraryInput = z.input<typeof insertItinerarySchema>;
768
972
  export type UpdateProductItineraryInput = z.input<typeof updateItinerarySchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAw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AAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAC/E,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AACrF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACnE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACnE,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AACjF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AACjF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAC3E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAC9E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAC9E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
package/dist/schemas.js CHANGED
@@ -199,4 +199,86 @@ export const productVersionsResponse = arrayEnvelope(productVersionRecordSchema)
199
199
  export const productVersionResponse = singleEnvelope(productVersionRecordSchema);
200
200
  export const productMediaListResponse = paginatedEnvelope(productMediaRecordSchema);
201
201
  export const productMediaResponse = singleEnvelope(productMediaRecordSchema);
202
+ export const productActionLedgerActionKindSchema = z.enum([
203
+ "read",
204
+ "create",
205
+ "update",
206
+ "delete",
207
+ "execute",
208
+ "approve",
209
+ "reject",
210
+ "reverse",
211
+ "compensate",
212
+ "duplicate",
213
+ ]);
214
+ export const productActionLedgerStatusSchema = z.enum([
215
+ "requested",
216
+ "awaiting_approval",
217
+ "approved",
218
+ "denied",
219
+ "succeeded",
220
+ "failed",
221
+ "reversed",
222
+ "compensated",
223
+ "expired",
224
+ "cancelled",
225
+ "superseded",
226
+ ]);
227
+ export const productActionLedgerRiskSchema = z.enum(["low", "medium", "high", "critical"]);
228
+ export const productActionLedgerPrincipalTypeSchema = z.enum([
229
+ "user",
230
+ "api_key",
231
+ "agent",
232
+ "workflow",
233
+ "system",
234
+ ]);
235
+ export const productActionLedgerEntrySchema = z.object({
236
+ id: z.string(),
237
+ occurredAt: z.string(),
238
+ actionName: z.string(),
239
+ actionVersion: z.string(),
240
+ actionKind: productActionLedgerActionKindSchema,
241
+ status: productActionLedgerStatusSchema,
242
+ evaluatedRisk: productActionLedgerRiskSchema,
243
+ actorType: z.string().nullable(),
244
+ principalType: productActionLedgerPrincipalTypeSchema,
245
+ principalId: z.string(),
246
+ principalSubtype: z.string().nullable(),
247
+ sessionId: z.string().nullable(),
248
+ apiTokenId: z.string().nullable(),
249
+ internalRequest: z.boolean(),
250
+ delegatedByPrincipalType: productActionLedgerPrincipalTypeSchema.nullable(),
251
+ delegatedByPrincipalId: z.string().nullable(),
252
+ delegationId: z.string().nullable(),
253
+ callerType: z.string().nullable(),
254
+ organizationId: z.string().nullable(),
255
+ routeOrToolName: z.string().nullable(),
256
+ workflowRunId: z.string().nullable(),
257
+ workflowStepId: z.string().nullable(),
258
+ correlationId: z.string().nullable(),
259
+ causationActionId: z.string().nullable(),
260
+ idempotencyScope: z.string().nullable(),
261
+ idempotencyKey: z.string().nullable(),
262
+ idempotencyFingerprint: z.string().nullable(),
263
+ targetType: z.string(),
264
+ targetId: z.string(),
265
+ capabilityId: z.string().nullable(),
266
+ capabilityVersion: z.string().nullable(),
267
+ authorizationSource: z.string().nullable(),
268
+ approvalId: z.string().nullable(),
269
+ amendsActionId: z.string().nullable(),
270
+ createdAt: z.string(),
271
+ mutationSummary: z.string().nullable(),
272
+ });
273
+ export const productActionLedgerListResponse = z.object({
274
+ data: z.array(productActionLedgerEntrySchema),
275
+ pageInfo: z.object({
276
+ nextCursor: z
277
+ .object({
278
+ occurredAt: z.string(),
279
+ id: z.string(),
280
+ })
281
+ .nullable(),
282
+ }),
283
+ });
202
284
  export { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductMediaSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductMediaSchema, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/products-react",
3
- "version": "0.52.2",
3
+ "version": "0.52.3",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,7 +41,7 @@
41
41
  "react": "^19.0.0",
42
42
  "react-dom": "^19.0.0",
43
43
  "zod": "^4.0.0",
44
- "@voyantjs/products": "0.52.2"
44
+ "@voyantjs/products": "0.52.3"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@tanstack/react-query": "^5.96.2",
@@ -52,12 +52,12 @@
52
52
  "typescript": "^6.0.2",
53
53
  "vitest": "^4.1.2",
54
54
  "zod": "^4.3.6",
55
- "@voyantjs/products": "0.52.2",
56
- "@voyantjs/react": "0.52.2",
55
+ "@voyantjs/products": "0.52.3",
56
+ "@voyantjs/react": "0.52.3",
57
57
  "@voyantjs/voyant-typescript-config": "0.1.0"
58
58
  },
59
59
  "dependencies": {
60
- "@voyantjs/react": "0.52.2"
60
+ "@voyantjs/react": "0.52.3"
61
61
  },
62
62
  "files": [
63
63
  "dist"