@centrali-io/centrali-sdk 2.3.5 → 2.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +7 -7
  2. package/index.ts +10 -10
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -490,8 +490,8 @@ function getValidationRecordSuggestionsApiPath(workspaceId, recordId) {
490
490
  /**
491
491
  * Generate Validation structure pending count API URL PATH.
492
492
  */
493
- function getValidationPendingCountApiPath(workspaceId, structureId) {
494
- return `data/workspace/${workspaceId}/api/v1/ai/validation/structures/${structureId}/pending-count`;
493
+ function getValidationPendingCountApiPath(workspaceId, structureSlug) {
494
+ return `data/workspace/${workspaceId}/api/v1/ai/validation/structures/${structureSlug}/pending-count`;
495
495
  }
496
496
  /**
497
497
  * Generate Validation batch scan API URL PATH (AI Service).
@@ -1184,19 +1184,19 @@ class ValidationManager {
1184
1184
  * console.log('By type:', summary.data.byIssueType);
1185
1185
  * ```
1186
1186
  */
1187
- getSummary(structureId) {
1187
+ getSummary(structureSlug) {
1188
1188
  const path = getValidationSummaryApiPath(this.workspaceId);
1189
- const params = structureId ? { structureId } : undefined;
1189
+ const params = structureSlug ? { structureSlug } : undefined;
1190
1190
  return this.requestFn('GET', path, null, params);
1191
1191
  }
1192
1192
  /**
1193
1193
  * Get the count of pending suggestions for a structure.
1194
1194
  *
1195
- * @param structureId - The structure UUID
1195
+ * @param structureSlug - The structure slug (recordSlug)
1196
1196
  * @returns Object with pending count
1197
1197
  */
1198
- getPendingCount(structureId) {
1199
- const path = getValidationPendingCountApiPath(this.workspaceId, structureId);
1198
+ getPendingCount(structureSlug) {
1199
+ const path = getValidationPendingCountApiPath(this.workspaceId, structureSlug);
1200
1200
  return this.requestFn('GET', path);
1201
1201
  }
1202
1202
  }
package/index.ts CHANGED
@@ -750,8 +750,8 @@ export interface ValidationSuggestion {
750
750
  * Options for listing validation suggestions.
751
751
  */
752
752
  export interface ListValidationSuggestionsOptions {
753
- /** Filter by structure ID */
754
- structureId?: string;
753
+ /** Filter by structure slug (recordSlug) */
754
+ structureSlug?: string;
755
755
  /** Filter by record ID */
756
756
  recordId?: string;
757
757
  /** Filter by status */
@@ -1350,8 +1350,8 @@ export function getValidationRecordSuggestionsApiPath(workspaceId: string, recor
1350
1350
  /**
1351
1351
  * Generate Validation structure pending count API URL PATH.
1352
1352
  */
1353
- export function getValidationPendingCountApiPath(workspaceId: string, structureId: string): string {
1354
- return `data/workspace/${workspaceId}/api/v1/ai/validation/structures/${structureId}/pending-count`;
1353
+ export function getValidationPendingCountApiPath(workspaceId: string, structureSlug: string): string {
1354
+ return `data/workspace/${workspaceId}/api/v1/ai/validation/structures/${structureSlug}/pending-count`;
1355
1355
  }
1356
1356
 
1357
1357
  /**
@@ -2127,21 +2127,21 @@ export class ValidationManager {
2127
2127
  * console.log('By type:', summary.data.byIssueType);
2128
2128
  * ```
2129
2129
  */
2130
- public getSummary(structureId?: string): Promise<ApiResponse<ValidationSummary>> {
2130
+ public getSummary(structureSlug?: string): Promise<ApiResponse<ValidationSummary>> {
2131
2131
  const path = getValidationSummaryApiPath(this.workspaceId);
2132
- const params = structureId ? { structureId } : undefined;
2132
+ const params = structureSlug ? { structureSlug } : undefined;
2133
2133
  return this.requestFn<ValidationSummary>('GET', path, null, params);
2134
2134
  }
2135
2135
 
2136
2136
  /**
2137
2137
  * Get the count of pending suggestions for a structure.
2138
2138
  *
2139
- * @param structureId - The structure UUID
2139
+ * @param structureSlug - The structure slug (recordSlug)
2140
2140
  * @returns Object with pending count
2141
2141
  */
2142
- public getPendingCount(structureId: string): Promise<ApiResponse<{ structureId: string; pendingCount: number }>> {
2143
- const path = getValidationPendingCountApiPath(this.workspaceId, structureId);
2144
- return this.requestFn<{ structureId: string; pendingCount: number }>('GET', path);
2142
+ public getPendingCount(structureSlug: string): Promise<ApiResponse<{ structureSlug: string; pendingCount: number }>> {
2143
+ const path = getValidationPendingCountApiPath(this.workspaceId, structureSlug);
2144
+ return this.requestFn<{ structureSlug: string; pendingCount: number }>('GET', path);
2145
2145
  }
2146
2146
  }
2147
2147
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centrali-io/centrali-sdk",
3
- "version": "2.3.5",
3
+ "version": "2.3.7",
4
4
  "description": "Centrali Node SDK",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",