@complyforce/api 1.8.5 → 1.8.6-23181

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/README.md CHANGED
@@ -122,7 +122,7 @@ client.setConfig({
122
122
  });
123
123
 
124
124
  try {
125
- const data = await api.getOrderProgress({
125
+ const data = await api.getOrder({
126
126
  query: { orderUuid: "your-order-uuid" },
127
127
  });
128
128
  // `data` is the response body
@@ -219,28 +219,6 @@ if (readOrder?.response.ok) {
219
219
  }
220
220
  ```
221
221
 
222
- ### getOrderProgress()
223
-
224
- Fetches scan progress of the order as a percentage.
225
-
226
- You can also receive the order progress by a webhook. Configure the webhook at _Brand & Channel > [Name of brand] > [Name of channel] > Edit > Webhooks_ in the [Complyforce Vendor Dashboard](https://vendor.complyforce.com/).
227
-
228
- ```ts
229
- const orderUuid = "your-order-uuid";
230
-
231
- const readOrderProgress = await api.getOrderProgress({
232
- query: {
233
- orderUuid: orderUuid,
234
- },
235
- });
236
-
237
- if (readOrderProgress?.response.ok) {
238
- console.log("Order progress", readOrderProgress.data?.progressInPercent);
239
- } else {
240
- console.error("Read order progress failed", readOrderProgress.error);
241
- }
242
- ```
243
-
244
222
  ### getOrderReport()
245
223
 
246
224
  Retrieve full report data and report link for completed orders.
package/cjs/sdk.gen.js CHANGED
@@ -86,7 +86,6 @@ class ComplyforceApi extends HeyApiClient {
86
86
  * "id": "1",
87
87
  * "uuid": "e1b4dcd4-2e50-4b3d-a6f5-3c13b5c7e20",
88
88
  * "status": "created",
89
- * "progressInPercent": 0,
90
89
  * "updatedAt": "2025-01-01T12:00:00.000Z",
91
90
  * "createdAt": "2025-01-01T12:00:00.000Z"
92
91
  * }
@@ -140,7 +139,6 @@ class ComplyforceApi extends HeyApiClient {
140
139
  * "id": "2",
141
140
  * "uuid": "e1b4dcd4-2e51-4b3d-a6f5-3c13b5c7e21",
142
141
  * "status": "created",
143
- * "progressInPercent": 0,
144
142
  * "updatedAt": "2025-01-01T12:01:00.000Z",
145
143
  * "createdAt": "2025-01-01T12:01:00.000Z"
146
144
  * }
@@ -189,7 +187,6 @@ class ComplyforceApi extends HeyApiClient {
189
187
  * "id": "3",
190
188
  * "uuid": "e1b4dcd4-2e52-4b3d-a6f5-3c13b5c7e22",
191
189
  * "status": "created",
192
- * "progressInPercent": 0,
193
190
  * "updatedAt": "2025-01-01T12:02:00.000Z",
194
191
  * "createdAt": "2025-01-01T12:02:00.000Z"
195
192
  * }
@@ -244,7 +241,6 @@ class ComplyforceApi extends HeyApiClient {
244
241
  * "id": "4",
245
242
  * "uuid": "e1b4dcd4-2e53-4b3d-a6f5-3c13b5c7e23",
246
243
  * "status": "created",
247
- * "progressInPercent": 0,
248
244
  * "updatedAt": "2025-01-01T12:03:00.000Z",
249
245
  * "createdAt": "2025-01-01T12:03:00.000Z"
250
246
  * }
@@ -261,7 +257,7 @@ class ComplyforceApi extends HeyApiClient {
261
257
  /**
262
258
  * Get order progress
263
259
  *
264
- * Progress of the order as a percentage.
260
+ * Current order workflow status and URL processing counters.
265
261
  */
266
262
  getOrderProgress(options) {
267
263
  var _a;
package/esm/sdk.gen.js CHANGED
@@ -83,7 +83,6 @@ export class ComplyforceApi extends HeyApiClient {
83
83
  * "id": "1",
84
84
  * "uuid": "e1b4dcd4-2e50-4b3d-a6f5-3c13b5c7e20",
85
85
  * "status": "created",
86
- * "progressInPercent": 0,
87
86
  * "updatedAt": "2025-01-01T12:00:00.000Z",
88
87
  * "createdAt": "2025-01-01T12:00:00.000Z"
89
88
  * }
@@ -137,7 +136,6 @@ export class ComplyforceApi extends HeyApiClient {
137
136
  * "id": "2",
138
137
  * "uuid": "e1b4dcd4-2e51-4b3d-a6f5-3c13b5c7e21",
139
138
  * "status": "created",
140
- * "progressInPercent": 0,
141
139
  * "updatedAt": "2025-01-01T12:01:00.000Z",
142
140
  * "createdAt": "2025-01-01T12:01:00.000Z"
143
141
  * }
@@ -186,7 +184,6 @@ export class ComplyforceApi extends HeyApiClient {
186
184
  * "id": "3",
187
185
  * "uuid": "e1b4dcd4-2e52-4b3d-a6f5-3c13b5c7e22",
188
186
  * "status": "created",
189
- * "progressInPercent": 0,
190
187
  * "updatedAt": "2025-01-01T12:02:00.000Z",
191
188
  * "createdAt": "2025-01-01T12:02:00.000Z"
192
189
  * }
@@ -241,7 +238,6 @@ export class ComplyforceApi extends HeyApiClient {
241
238
  * "id": "4",
242
239
  * "uuid": "e1b4dcd4-2e53-4b3d-a6f5-3c13b5c7e23",
243
240
  * "status": "created",
244
- * "progressInPercent": 0,
245
241
  * "updatedAt": "2025-01-01T12:03:00.000Z",
246
242
  * "createdAt": "2025-01-01T12:03:00.000Z"
247
243
  * }
@@ -258,7 +254,7 @@ export class ComplyforceApi extends HeyApiClient {
258
254
  /**
259
255
  * Get order progress
260
256
  *
261
- * Progress of the order as a percentage.
257
+ * Current order workflow status and URL processing counters.
262
258
  */
263
259
  getOrderProgress(options) {
264
260
  var _a;
package/package.json CHANGED
@@ -1,26 +1,30 @@
1
1
  {
2
- "name": "@complyforce/api",
3
- "version": "1.8.5",
4
- "description": "TypeScript client for the Complyforce API",
5
- "digestMd5": "cd13cecba77b446b132716b7bf8eecbf",
6
- "type": "module",
7
- "main": "cjs/index.cjs.js",
8
- "module": "esm/index.js",
9
- "types": "types/index.d.ts",
10
- "exports": {
11
- "types": "./types/index.d.ts",
12
- "default": {
13
- "import": "./esm/index.js",
14
- "require": "./cjs/index.js"
15
- }
16
- },
17
- "author": "devowl.io GmbH <support@devowl.io> (https://devowl.io)",
18
- "license": "MIT",
19
- "homepage": "https://complyforce.com",
20
- "devDependencies": {
21
- "@types/node": "^22.10.2",
22
- "typescript": "^5.7.2",
23
- "undici-types": "^7.2.0"
24
- },
25
- "files": ["cjs", "esm", "types"]
2
+ "name": "@complyforce/api",
3
+ "version": "1.8.6-23181",
4
+ "description": "TypeScript client for the Complyforce API",
5
+ "digestMd5": "3aad72bbd03c007c40973004be652923",
6
+ "type": "module",
7
+ "main": "cjs/index.cjs.js",
8
+ "module": "esm/index.js",
9
+ "types": "types/index.d.ts",
10
+ "exports": {
11
+ "types": "./types/index.d.ts",
12
+ "default": {
13
+ "import": "./esm/index.js",
14
+ "require": "./cjs/index.js"
15
+ }
16
+ },
17
+ "author": "devowl.io GmbH <support@devowl.io> (https://devowl.io)",
18
+ "license": "MIT",
19
+ "homepage": "https://complyforce.com",
20
+ "devDependencies": {
21
+ "@types/node": "^22.10.2",
22
+ "typescript": "^5.7.2",
23
+ "undici-types": "^7.2.0"
24
+ },
25
+ "files": [
26
+ "cjs",
27
+ "esm",
28
+ "types"
29
+ ]
26
30
  }
@@ -84,7 +84,6 @@ export declare class ComplyforceApi extends HeyApiClient {
84
84
  * "id": "1",
85
85
  * "uuid": "e1b4dcd4-2e50-4b3d-a6f5-3c13b5c7e20",
86
86
  * "status": "created",
87
- * "progressInPercent": 0,
88
87
  * "updatedAt": "2025-01-01T12:00:00.000Z",
89
88
  * "createdAt": "2025-01-01T12:00:00.000Z"
90
89
  * }
@@ -138,7 +137,6 @@ export declare class ComplyforceApi extends HeyApiClient {
138
137
  * "id": "2",
139
138
  * "uuid": "e1b4dcd4-2e51-4b3d-a6f5-3c13b5c7e21",
140
139
  * "status": "created",
141
- * "progressInPercent": 0,
142
140
  * "updatedAt": "2025-01-01T12:01:00.000Z",
143
141
  * "createdAt": "2025-01-01T12:01:00.000Z"
144
142
  * }
@@ -187,7 +185,6 @@ export declare class ComplyforceApi extends HeyApiClient {
187
185
  * "id": "3",
188
186
  * "uuid": "e1b4dcd4-2e52-4b3d-a6f5-3c13b5c7e22",
189
187
  * "status": "created",
190
- * "progressInPercent": 0,
191
188
  * "updatedAt": "2025-01-01T12:02:00.000Z",
192
189
  * "createdAt": "2025-01-01T12:02:00.000Z"
193
190
  * }
@@ -242,7 +239,6 @@ export declare class ComplyforceApi extends HeyApiClient {
242
239
  * "id": "4",
243
240
  * "uuid": "e1b4dcd4-2e53-4b3d-a6f5-3c13b5c7e23",
244
241
  * "status": "created",
245
- * "progressInPercent": 0,
246
242
  * "updatedAt": "2025-01-01T12:03:00.000Z",
247
243
  * "createdAt": "2025-01-01T12:03:00.000Z"
248
244
  * }
@@ -256,7 +252,7 @@ export declare class ComplyforceApi extends HeyApiClient {
256
252
  /**
257
253
  * Get order progress
258
254
  *
259
- * Progress of the order as a percentage.
255
+ * Current order workflow status and URL processing counters.
260
256
  */
261
257
  getOrderProgress<ThrowOnError extends boolean = false>(options: Options<GetOrderProgressData, ThrowOnError>): import("./client/types.gen.js").RequestResult<GetOrderProgressResponses, GetOrderProgressErrors, ThrowOnError, "fields">;
262
258
  /**
@@ -21,7 +21,7 @@ export type OrderGetResponse = {
21
21
  scanPriority: number;
22
22
  scanFeaturesExecuted?: Array<'orderPreparationUrlsEnrichment' | 'browseAgentVisionAi' | 'informationObligationAgentLlmAi' | 'consentComplianceAgent' | 'archivingAgent'>;
23
23
  scanUrlsExecuted?: Array<string>;
24
- status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
24
+ status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebhookQueued' | 'completed' | 'completedPartially' | 'error';
25
25
  reportAvailability: 'pending' | 'available' | 'deleted';
26
26
  reportDeletionReason?: 'expired' | 'websiteOperatorRequest' | 'vendorRequest' | 'unknown';
27
27
  reportAvailableUntil?: string;
@@ -57,9 +57,8 @@ export type OrderGetResponse = {
57
57
  statusUpdates: Array<{
58
58
  id: string;
59
59
  uuid: string;
60
- status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
60
+ status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebhookQueued' | 'completed' | 'completedPartially' | 'error';
61
61
  errorType?: 'domainNotReachable' | 'invalidUrl' | 'domainBlacklisted' | 'scanTypeNotAllowed' | 'channelInactive' | 'brandInactive' | 'tooManyUrls' | 'mixedDomains' | 'crawlingTimeout' | 'processingError' | 'reportGenerationError' | 'webhookDeliveryError';
62
- progressInPercent: number;
63
62
  updatedAt?: string;
64
63
  createdAt?: string;
65
64
  }>;
@@ -87,14 +86,13 @@ export type OrderPosted = {
87
86
  */
88
87
  scanUrlsLimit?: number;
89
88
  scanPriority: number;
90
- status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
89
+ status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebhookQueued' | 'completed' | 'completedPartially' | 'error';
91
90
  createdAt?: string;
92
91
  statusUpdates: Array<{
93
92
  id: string;
94
93
  uuid: string;
95
- status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
94
+ status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebhookQueued' | 'completed' | 'completedPartially' | 'error';
96
95
  errorType?: 'domainNotReachable' | 'invalidUrl' | 'domainBlacklisted' | 'scanTypeNotAllowed' | 'channelInactive' | 'brandInactive' | 'tooManyUrls' | 'mixedDomains' | 'crawlingTimeout' | 'processingError' | 'reportGenerationError' | 'webhookDeliveryError';
97
- progressInPercent: number;
98
96
  updatedAt?: string;
99
97
  createdAt?: string;
100
98
  }>;
@@ -121,7 +119,15 @@ export type OrderCreate = {
121
119
  */
122
120
  export type OrderProgressResponse = {
123
121
  orderUuid: string;
124
- progressInPercent: number;
122
+ status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebhookQueued' | 'completed' | 'completedPartially' | 'error';
123
+ sitemapDiscoveredUrls?: number;
124
+ latestProcessedUrl?: string;
125
+ processedUrls: number;
126
+ totalUrls: number;
127
+ error?: {
128
+ type?: 'domainNotReachable' | 'invalidUrl' | 'domainBlacklisted' | 'scanTypeNotAllowed' | 'channelInactive' | 'brandInactive' | 'tooManyUrls' | 'mixedDomains' | 'crawlingTimeout' | 'processingError' | 'reportGenerationError' | 'webhookDeliveryError';
129
+ message?: string;
130
+ };
125
131
  };
126
132
  /**
127
133
  * Order report delete request
@@ -183,9 +189,8 @@ export type OrderReportGetResponse = {
183
189
  riskScore: number;
184
190
  };
185
191
  latestStatusUpdate: {
186
- status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
192
+ status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebhookQueued' | 'completed' | 'completedPartially' | 'error';
187
193
  errorType?: 'domainNotReachable' | 'invalidUrl' | 'domainBlacklisted' | 'scanTypeNotAllowed' | 'channelInactive' | 'brandInactive' | 'tooManyUrls' | 'mixedDomains' | 'crawlingTimeout' | 'processingError' | 'reportGenerationError' | 'webhookDeliveryError';
188
- progressInPercent: number;
189
194
  updatedAt?: string;
190
195
  createdAt?: string;
191
196
  };
@@ -206,15 +211,14 @@ export type OrderListItem = {
206
211
  dataProtectionViolationsFound: boolean;
207
212
  riskScore: number;
208
213
  };
209
- status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
214
+ status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebhookQueued' | 'completed' | 'completedPartially' | 'error';
210
215
  errorType?: 'domainNotReachable' | 'invalidUrl' | 'domainBlacklisted' | 'scanTypeNotAllowed' | 'channelInactive' | 'brandInactive' | 'tooManyUrls' | 'mixedDomains' | 'crawlingTimeout' | 'processingError' | 'reportGenerationError' | 'webhookDeliveryError';
211
216
  createdAt: string;
212
217
  lastStatusUpdate?: {
213
218
  id: string;
214
219
  uuid: string;
215
- status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
220
+ status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebhookQueued' | 'completed' | 'completedPartially' | 'error';
216
221
  errorType?: 'domainNotReachable' | 'invalidUrl' | 'domainBlacklisted' | 'scanTypeNotAllowed' | 'channelInactive' | 'brandInactive' | 'tooManyUrls' | 'mixedDomains' | 'crawlingTimeout' | 'processingError' | 'reportGenerationError' | 'webhookDeliveryError';
217
- progressInPercent: number;
218
222
  updatedAt?: string;
219
223
  createdAt?: string;
220
224
  };
@@ -492,7 +496,7 @@ export type GetOrdersData = {
492
496
  /**
493
497
  * Filter by order status.
494
498
  */
495
- status?: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
499
+ status?: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebhookQueued' | 'completed' | 'completedPartially' | 'error';
496
500
  /**
497
501
  * Filter by vendor brand UUID.
498
502
  */