flexorch-sdk 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,9 @@ var Dataset = class _Dataset {
16
16
  slug;
17
17
  status;
18
18
  rowCount;
19
+ piiMasked;
20
+ piiFindingsCount;
21
+ piiTypeSummary;
19
22
  createdAt;
20
23
  availableFormats;
21
24
  _transport;
@@ -25,6 +28,9 @@ var Dataset = class _Dataset {
25
28
  this.slug = data.slug;
26
29
  this.status = data.status;
27
30
  this.rowCount = data.rowCount;
31
+ this.piiMasked = data.piiMasked;
32
+ this.piiFindingsCount = data.piiFindingsCount;
33
+ this.piiTypeSummary = data.piiTypeSummary;
28
34
  this.createdAt = data.createdAt;
29
35
  this.availableFormats = data.availableFormats;
30
36
  this._transport = data._transport;
@@ -32,12 +38,19 @@ var Dataset = class _Dataset {
32
38
  static fromDict(data, transport) {
33
39
  const fmt = data["format_summary"] ?? {};
34
40
  const files = fmt["files"] ?? {};
41
+ const privacy = data["privacy"];
42
+ const piiMasked = privacy ? Boolean(privacy["privacy_applied"] ?? false) : Boolean(data["privacy_applied"] ?? false);
43
+ const piiFindingsCount = privacy ? Number(privacy["pii_findings_count"] ?? 0) : Number(data["pii_findings_count"] ?? 0);
44
+ const piiTypeSummary = privacy ? privacy["pii_type_summary"] ?? {} : {};
35
45
  return new _Dataset({
36
46
  id: String(data["id"] ?? ""),
37
47
  name: String(data["name"] ?? ""),
38
48
  slug: String(data["slug"] ?? ""),
39
49
  status: String(data["status"] ?? ""),
40
50
  rowCount: Number(data["row_count"] ?? 0),
51
+ piiMasked,
52
+ piiFindingsCount,
53
+ piiTypeSummary,
41
54
  createdAt: String(data["created_at"] ?? ""),
42
55
  availableFormats: Object.keys(files),
43
56
  _transport: transport
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Dataset
3
- } from "./chunk-4KCMMRD7.js";
3
+ } from "./chunk-U2CE5GVG.js";
4
4
  export {
5
5
  Dataset
6
6
  };
package/dist/index.cjs CHANGED
@@ -56,6 +56,9 @@ var init_dataset = __esm({
56
56
  slug;
57
57
  status;
58
58
  rowCount;
59
+ piiMasked;
60
+ piiFindingsCount;
61
+ piiTypeSummary;
59
62
  createdAt;
60
63
  availableFormats;
61
64
  _transport;
@@ -65,6 +68,9 @@ var init_dataset = __esm({
65
68
  this.slug = data.slug;
66
69
  this.status = data.status;
67
70
  this.rowCount = data.rowCount;
71
+ this.piiMasked = data.piiMasked;
72
+ this.piiFindingsCount = data.piiFindingsCount;
73
+ this.piiTypeSummary = data.piiTypeSummary;
68
74
  this.createdAt = data.createdAt;
69
75
  this.availableFormats = data.availableFormats;
70
76
  this._transport = data._transport;
@@ -72,12 +78,19 @@ var init_dataset = __esm({
72
78
  static fromDict(data, transport) {
73
79
  const fmt = data["format_summary"] ?? {};
74
80
  const files = fmt["files"] ?? {};
81
+ const privacy = data["privacy"];
82
+ const piiMasked = privacy ? Boolean(privacy["privacy_applied"] ?? false) : Boolean(data["privacy_applied"] ?? false);
83
+ const piiFindingsCount = privacy ? Number(privacy["pii_findings_count"] ?? 0) : Number(data["pii_findings_count"] ?? 0);
84
+ const piiTypeSummary = privacy ? privacy["pii_type_summary"] ?? {} : {};
75
85
  return new _Dataset({
76
86
  id: String(data["id"] ?? ""),
77
87
  name: String(data["name"] ?? ""),
78
88
  slug: String(data["slug"] ?? ""),
79
89
  status: String(data["status"] ?? ""),
80
90
  rowCount: Number(data["row_count"] ?? 0),
91
+ piiMasked,
92
+ piiFindingsCount,
93
+ piiTypeSummary,
81
94
  createdAt: String(data["created_at"] ?? ""),
82
95
  availableFormats: Object.keys(files),
83
96
  _transport: transport
@@ -312,7 +325,7 @@ var Transport = class {
312
325
  this.fetchFn = fetchFn ?? globalThis.fetch.bind(globalThis);
313
326
  this.defaultHeaders = {
314
327
  "X-API-KEY": apiKey,
315
- "User-Agent": "flexorch-sdk-js/0.3.1"
328
+ "User-Agent": "flexorch-sdk-js/0.3.2"
316
329
  };
317
330
  }
318
331
  url(path, params) {
@@ -418,6 +431,9 @@ var Job = class _Job {
418
431
  */
419
432
  degraded;
420
433
  failureReason;
434
+ piiMasked;
435
+ piiFindingsCount;
436
+ piiTypeSummary;
421
437
  _transport;
422
438
  constructor(data) {
423
439
  this.id = data.id;
@@ -430,12 +446,16 @@ var Job = class _Job {
430
446
  this.datasetId = data.datasetId;
431
447
  this.degraded = data.degraded;
432
448
  this.failureReason = data.failureReason;
449
+ this.piiMasked = data.piiMasked;
450
+ this.piiFindingsCount = data.piiFindingsCount;
451
+ this.piiTypeSummary = data.piiTypeSummary;
433
452
  this._transport = data._transport;
434
453
  }
435
454
  static fromDict(data, transport) {
436
455
  const executionSummary = data["execution_summary"];
437
456
  const processingSummary = data["processing_summary"];
438
457
  const datasetSummary = data["dataset_summary"];
458
+ const privacy = executionSummary?.["privacy"];
439
459
  let quality = data["quality"];
440
460
  if (!quality && processingSummary) {
441
461
  quality = processingSummary["quality"];
@@ -458,6 +478,13 @@ var Job = class _Job {
458
478
  datasetId: datasetSummary?.["dataset_id"] ?? null,
459
479
  degraded: Boolean(executionSummary?.["degraded"] ?? false),
460
480
  failureReason: data["failure_reason"] ?? null,
481
+ // execution_summary.privacy — computed fresh on every GET /jobs/{id}
482
+ // read, not frozen at job-completion time, so this works even for
483
+ // jobs older than this field. Defaults for jobs with no execution
484
+ // (e.g. dataset_build) or against an older API version.
485
+ piiMasked: Boolean(privacy?.["privacy_applied"] ?? false),
486
+ piiFindingsCount: Number(privacy?.["pii_findings_count"] ?? 0),
487
+ piiTypeSummary: privacy?.["pii_type_summary"] ?? {},
461
488
  _transport: transport
462
489
  });
463
490
  }
@@ -1275,7 +1302,7 @@ var FlexOrchReader = class {
1275
1302
  };
1276
1303
 
1277
1304
  // src/index.ts
1278
- var version = "0.3.1";
1305
+ var version = "0.3.2";
1279
1306
  // Annotate the CommonJS export names for ESM import in node:
1280
1307
  0 && (module.exports = {
1281
1308
  AuthError,
package/dist/index.d.cts CHANGED
@@ -22,6 +22,9 @@ declare class Dataset {
22
22
  readonly slug: string;
23
23
  readonly status: string;
24
24
  readonly rowCount: number;
25
+ readonly piiMasked: boolean;
26
+ readonly piiFindingsCount: number;
27
+ readonly piiTypeSummary: Record<string, number>;
25
28
  readonly createdAt: string;
26
29
  readonly availableFormats: string[];
27
30
  private readonly _transport;
@@ -31,6 +34,9 @@ declare class Dataset {
31
34
  slug: string;
32
35
  status: string;
33
36
  rowCount: number;
37
+ piiMasked: boolean;
38
+ piiFindingsCount: number;
39
+ piiTypeSummary: Record<string, number>;
34
40
  createdAt: string;
35
41
  availableFormats: string[];
36
42
  _transport: Transport;
@@ -112,6 +118,9 @@ declare class Job {
112
118
  */
113
119
  readonly degraded: boolean;
114
120
  readonly failureReason: string | null;
121
+ readonly piiMasked: boolean;
122
+ readonly piiFindingsCount: number;
123
+ readonly piiTypeSummary: Record<string, number>;
115
124
  private readonly _transport;
116
125
  constructor(data: {
117
126
  id: string;
@@ -124,6 +133,9 @@ declare class Job {
124
133
  datasetId: number | null;
125
134
  degraded: boolean;
126
135
  failureReason: string | null;
136
+ piiMasked: boolean;
137
+ piiFindingsCount: number;
138
+ piiTypeSummary: Record<string, number>;
127
139
  _transport: Transport;
128
140
  });
129
141
  static fromDict(data: Record<string, unknown>, transport: Transport): Job;
@@ -606,6 +618,6 @@ declare class FlexOrchReader {
606
618
  toString(): string;
607
619
  }
608
620
 
609
- declare const version = "0.3.1";
621
+ declare const version = "0.3.2";
610
622
 
611
623
  export { AuthError, Connector, type ConnectorTestResult, type ConnectorType, Dataset, Document, type ExportFormat, FlexOrchClient, type FlexOrchClientOptions, FlexOrchError, FlexOrchReader, FlexOrchRetriever, Job, JobFailedError, type JobFeedback, JobTimeoutError, NotFoundError, type QualityTrendItem, QuotaError, RAGDocument, RateLimitError, type RateLimitStatus, type ReaderLoadOptions, type RetrieverOptions, type S3ConnectorConfig, type SearchFilters, SearchResult, ServerError, type SyncLog, type SyncSchedule, type UsageHistoryItem, type UsageSnapshot, ValidationError, type Webhook, type WebhookEvent, version };
package/dist/index.d.ts CHANGED
@@ -22,6 +22,9 @@ declare class Dataset {
22
22
  readonly slug: string;
23
23
  readonly status: string;
24
24
  readonly rowCount: number;
25
+ readonly piiMasked: boolean;
26
+ readonly piiFindingsCount: number;
27
+ readonly piiTypeSummary: Record<string, number>;
25
28
  readonly createdAt: string;
26
29
  readonly availableFormats: string[];
27
30
  private readonly _transport;
@@ -31,6 +34,9 @@ declare class Dataset {
31
34
  slug: string;
32
35
  status: string;
33
36
  rowCount: number;
37
+ piiMasked: boolean;
38
+ piiFindingsCount: number;
39
+ piiTypeSummary: Record<string, number>;
34
40
  createdAt: string;
35
41
  availableFormats: string[];
36
42
  _transport: Transport;
@@ -112,6 +118,9 @@ declare class Job {
112
118
  */
113
119
  readonly degraded: boolean;
114
120
  readonly failureReason: string | null;
121
+ readonly piiMasked: boolean;
122
+ readonly piiFindingsCount: number;
123
+ readonly piiTypeSummary: Record<string, number>;
115
124
  private readonly _transport;
116
125
  constructor(data: {
117
126
  id: string;
@@ -124,6 +133,9 @@ declare class Job {
124
133
  datasetId: number | null;
125
134
  degraded: boolean;
126
135
  failureReason: string | null;
136
+ piiMasked: boolean;
137
+ piiFindingsCount: number;
138
+ piiTypeSummary: Record<string, number>;
127
139
  _transport: Transport;
128
140
  });
129
141
  static fromDict(data: Record<string, unknown>, transport: Transport): Job;
@@ -606,6 +618,6 @@ declare class FlexOrchReader {
606
618
  toString(): string;
607
619
  }
608
620
 
609
- declare const version = "0.3.1";
621
+ declare const version = "0.3.2";
610
622
 
611
623
  export { AuthError, Connector, type ConnectorTestResult, type ConnectorType, Dataset, Document, type ExportFormat, FlexOrchClient, type FlexOrchClientOptions, FlexOrchError, FlexOrchReader, FlexOrchRetriever, Job, JobFailedError, type JobFeedback, JobTimeoutError, NotFoundError, type QualityTrendItem, QuotaError, RAGDocument, RateLimitError, type RateLimitStatus, type ReaderLoadOptions, type RetrieverOptions, type S3ConnectorConfig, type SearchFilters, SearchResult, ServerError, type SyncLog, type SyncSchedule, type UsageHistoryItem, type UsageSnapshot, ValidationError, type Webhook, type WebhookEvent, version };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Dataset
3
- } from "./chunk-4KCMMRD7.js";
3
+ } from "./chunk-U2CE5GVG.js";
4
4
 
5
5
  // src/errors.ts
6
6
  var FlexOrchError = class extends Error {
@@ -123,7 +123,7 @@ var Transport = class {
123
123
  this.fetchFn = fetchFn ?? globalThis.fetch.bind(globalThis);
124
124
  this.defaultHeaders = {
125
125
  "X-API-KEY": apiKey,
126
- "User-Agent": "flexorch-sdk-js/0.3.1"
126
+ "User-Agent": "flexorch-sdk-js/0.3.2"
127
127
  };
128
128
  }
129
129
  url(path, params) {
@@ -229,6 +229,9 @@ var Job = class _Job {
229
229
  */
230
230
  degraded;
231
231
  failureReason;
232
+ piiMasked;
233
+ piiFindingsCount;
234
+ piiTypeSummary;
232
235
  _transport;
233
236
  constructor(data) {
234
237
  this.id = data.id;
@@ -241,12 +244,16 @@ var Job = class _Job {
241
244
  this.datasetId = data.datasetId;
242
245
  this.degraded = data.degraded;
243
246
  this.failureReason = data.failureReason;
247
+ this.piiMasked = data.piiMasked;
248
+ this.piiFindingsCount = data.piiFindingsCount;
249
+ this.piiTypeSummary = data.piiTypeSummary;
244
250
  this._transport = data._transport;
245
251
  }
246
252
  static fromDict(data, transport) {
247
253
  const executionSummary = data["execution_summary"];
248
254
  const processingSummary = data["processing_summary"];
249
255
  const datasetSummary = data["dataset_summary"];
256
+ const privacy = executionSummary?.["privacy"];
250
257
  let quality = data["quality"];
251
258
  if (!quality && processingSummary) {
252
259
  quality = processingSummary["quality"];
@@ -269,6 +276,13 @@ var Job = class _Job {
269
276
  datasetId: datasetSummary?.["dataset_id"] ?? null,
270
277
  degraded: Boolean(executionSummary?.["degraded"] ?? false),
271
278
  failureReason: data["failure_reason"] ?? null,
279
+ // execution_summary.privacy — computed fresh on every GET /jobs/{id}
280
+ // read, not frozen at job-completion time, so this works even for
281
+ // jobs older than this field. Defaults for jobs with no execution
282
+ // (e.g. dataset_build) or against an older API version.
283
+ piiMasked: Boolean(privacy?.["privacy_applied"] ?? false),
284
+ piiFindingsCount: Number(privacy?.["pii_findings_count"] ?? 0),
285
+ piiTypeSummary: privacy?.["pii_type_summary"] ?? {},
272
286
  _transport: transport
273
287
  });
274
288
  }
@@ -294,7 +308,7 @@ var Job = class _Job {
294
308
  throw new JobTimeoutError(this.id, timeout);
295
309
  }
296
310
  async dataset() {
297
- const { Dataset: Dataset2 } = await import("./dataset-E7EXJETI.js");
311
+ const { Dataset: Dataset2 } = await import("./dataset-UGUUKKH3.js");
298
312
  if (this.datasetId !== null) {
299
313
  const data2 = await this._transport.get(`/datasets/${this.datasetId}`);
300
314
  return Dataset2.fromDict(data2, this._transport);
@@ -1082,7 +1096,7 @@ var FlexOrchReader = class {
1082
1096
  };
1083
1097
 
1084
1098
  // src/index.ts
1085
- var version = "0.3.1";
1099
+ var version = "0.3.2";
1086
1100
  export {
1087
1101
  AuthError,
1088
1102
  Connector,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flexorch-sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "TypeScript/JavaScript SDK for the FlexOrch API — process documents, build LLM-ready datasets",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",