@complyforce/api 1.7.1-21451 → 1.8.0-21475
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/cjs/sdk.gen.js +10 -1
- package/esm/sdk.gen.js +10 -1
- package/package.json +2 -2
- package/types/index.d.ts +1 -1
- package/types/sdk.gen.d.ts +7 -1
- package/types/types.gen.d.ts +168 -4
package/cjs/sdk.gen.js
CHANGED
|
@@ -281,7 +281,16 @@ class ComplyforceApi extends HeyApiClient {
|
|
|
281
281
|
*/
|
|
282
282
|
getOrderReport(options) {
|
|
283
283
|
var _a;
|
|
284
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(Object.assign({ url: '/order/report' }, options));
|
|
284
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(Object.assign({ security: [{ name: 'x-api-key', type: 'apiKey' }], url: '/order/report' }, options));
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Get orders overview
|
|
288
|
+
*
|
|
289
|
+
* List orders for the authenticated vendor. Supports cursor-based pagination and optional filters by date range, billing, status, brand and channel.
|
|
290
|
+
*/
|
|
291
|
+
getOrders(options) {
|
|
292
|
+
var _a;
|
|
293
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(Object.assign({ security: [{ name: 'authorization', type: 'apiKey' }], url: '/orders' }, options));
|
|
285
294
|
}
|
|
286
295
|
/**
|
|
287
296
|
* Validate API key authorization
|
package/esm/sdk.gen.js
CHANGED
|
@@ -278,7 +278,16 @@ export class ComplyforceApi extends HeyApiClient {
|
|
|
278
278
|
*/
|
|
279
279
|
getOrderReport(options) {
|
|
280
280
|
var _a;
|
|
281
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(Object.assign({ url: '/order/report' }, options));
|
|
281
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(Object.assign({ security: [{ name: 'x-api-key', type: 'apiKey' }], url: '/order/report' }, options));
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Get orders overview
|
|
285
|
+
*
|
|
286
|
+
* List orders for the authenticated vendor. Supports cursor-based pagination and optional filters by date range, billing, status, brand and channel.
|
|
287
|
+
*/
|
|
288
|
+
getOrders(options) {
|
|
289
|
+
var _a;
|
|
290
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : this.client).get(Object.assign({ security: [{ name: 'authorization', type: 'apiKey' }], url: '/orders' }, options));
|
|
282
291
|
}
|
|
283
292
|
/**
|
|
284
293
|
* Validate API key authorization
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@complyforce/api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0-21475",
|
|
4
4
|
"description": "TypeScript client for the Complyforce API",
|
|
5
|
-
"digestMd5": "
|
|
5
|
+
"digestMd5": "d6ac88e36427471e5d121b90e6ae2bdb",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "cjs/index.cjs.js",
|
|
8
8
|
"module": "esm/index.js",
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ComplyforceApi, type Options } from './sdk.gen.js';
|
|
2
|
-
export type { ClientOptions, DeleteOrderReportData, DeleteOrderReportError, DeleteOrderReportErrors, DeleteOrderReportResponse, DeleteOrderReportResponses, GetOrderData, GetOrderError, GetOrderErrors, GetOrderProgressData, GetOrderProgressError, GetOrderProgressErrors, GetOrderProgressResponse, GetOrderProgressResponses, GetOrderReportData, GetOrderReportError, GetOrderReportErrors, GetOrderReportResponse, GetOrderReportResponses, GetOrderResponse, GetOrderResponses, GetVendorApiKeyValidateData, GetVendorApiKeyValidateError, GetVendorApiKeyValidateErrors, GetVendorApiKeyValidateResponse, GetVendorApiKeyValidateResponses, OrderCreate, OrderGetResponse, OrderPosted, OrderProgressResponse, OrderReportDeleteRequest, OrderReportGetResponse, PostOrderData, PostOrderError, PostOrderErrors, PostOrderResponse, PostOrderResponses } from './types.gen.js';
|
|
2
|
+
export type { ClientOptions, CursorPaginationResponseMetadata, DeleteOrderReportData, DeleteOrderReportError, DeleteOrderReportErrors, DeleteOrderReportResponse, DeleteOrderReportResponses, GetOrderData, GetOrderError, GetOrderErrors, GetOrderProgressData, GetOrderProgressError, GetOrderProgressErrors, GetOrderProgressResponse, GetOrderProgressResponses, GetOrderReportData, GetOrderReportError, GetOrderReportErrors, GetOrderReportResponse, GetOrderReportResponses, GetOrderResponse, GetOrderResponses, GetOrdersData, GetOrdersError, GetOrdersErrors, GetOrdersResponse, GetOrdersResponses, GetVendorApiKeyValidateData, GetVendorApiKeyValidateError, GetVendorApiKeyValidateErrors, GetVendorApiKeyValidateResponse, GetVendorApiKeyValidateResponses, OrderCreate, OrderGetResponse, OrderListItem, OrderPosted, OrderProgressResponse, OrderReportDeleteRequest, OrderReportGetResponse, PostOrderData, PostOrderError, PostOrderErrors, PostOrderResponse, PostOrderResponses } from './types.gen.js';
|
|
3
3
|
export { createClient, createConfig } from "./client/index.js";
|
|
4
4
|
export { client } from "./client.gen.js";
|
package/types/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client/index.js';
|
|
2
|
-
import type { DeleteOrderReportData, DeleteOrderReportErrors, DeleteOrderReportResponses, GetOrderData, GetOrderErrors, GetOrderProgressData, GetOrderProgressErrors, GetOrderProgressResponses, GetOrderReportData, GetOrderReportErrors, GetOrderReportResponses, GetOrderResponses, GetVendorApiKeyValidateData, GetVendorApiKeyValidateErrors, GetVendorApiKeyValidateResponses, PostOrderData, PostOrderErrors, PostOrderResponses } from './types.gen.js';
|
|
2
|
+
import type { DeleteOrderReportData, DeleteOrderReportErrors, DeleteOrderReportResponses, GetOrderData, GetOrderErrors, GetOrderProgressData, GetOrderProgressErrors, GetOrderProgressResponses, GetOrderReportData, GetOrderReportErrors, GetOrderReportResponses, GetOrderResponses, GetOrdersData, GetOrdersErrors, GetOrdersResponses, GetVendorApiKeyValidateData, GetVendorApiKeyValidateErrors, GetVendorApiKeyValidateResponses, PostOrderData, PostOrderErrors, PostOrderResponses } from './types.gen.js';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -269,6 +269,12 @@ export declare class ComplyforceApi extends HeyApiClient {
|
|
|
269
269
|
* Retrieve full report data and report link for completed orders.
|
|
270
270
|
*/
|
|
271
271
|
getOrderReport<ThrowOnError extends boolean = false>(options: Options<GetOrderReportData, ThrowOnError>): import("./client/types.gen.js").RequestResult<GetOrderReportResponses, GetOrderReportErrors, ThrowOnError, "fields">;
|
|
272
|
+
/**
|
|
273
|
+
* Get orders overview
|
|
274
|
+
*
|
|
275
|
+
* List orders for the authenticated vendor. Supports cursor-based pagination and optional filters by date range, billing, status, brand and channel.
|
|
276
|
+
*/
|
|
277
|
+
getOrders<ThrowOnError extends boolean = false>(options: Options<GetOrdersData, ThrowOnError>): import("./client/types.gen.js").RequestResult<GetOrdersResponses, GetOrdersErrors, ThrowOnError, "fields">;
|
|
272
278
|
/**
|
|
273
279
|
* Validate API key authorization
|
|
274
280
|
*
|
package/types/types.gen.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type ClientOptions = {
|
|
|
6
6
|
*/
|
|
7
7
|
export type OrderGetResponse = {
|
|
8
8
|
uuid: string;
|
|
9
|
+
id?: string;
|
|
9
10
|
scanType: 'single' | 'multiple' | 'mostRelevant' | 'all';
|
|
10
11
|
scanFeaturesRequested: Array<'orderPreparationUrlsEnrichment' | 'browseAgentVisionAi' | 'informationObligationAgentLlmAi' | 'consentComplianceAgent' | 'archivingAgent'>;
|
|
11
12
|
scanDomain: string;
|
|
@@ -155,10 +156,26 @@ export type OrderReportGetResponse = {
|
|
|
155
156
|
downloadUrl?: string;
|
|
156
157
|
deleted: boolean;
|
|
157
158
|
};
|
|
158
|
-
properties:
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
properties: {
|
|
160
|
+
id: string;
|
|
161
|
+
language?: string;
|
|
162
|
+
brandName?: string;
|
|
163
|
+
colorPrimary?: string;
|
|
164
|
+
whiteLabel?: boolean | null;
|
|
165
|
+
realCookieBannerAds?: boolean | null;
|
|
166
|
+
legalNoticeUrl?: string;
|
|
167
|
+
legalPrivacyPolicyUrl?: string;
|
|
168
|
+
legalDisclaimerLegalAdviceOverwrite?: string;
|
|
169
|
+
translations?: Array<{
|
|
170
|
+
createdAt?: string;
|
|
171
|
+
legalNoticeUrl?: string;
|
|
172
|
+
legalPrivacyPolicyUrl?: string;
|
|
173
|
+
legalDisclaimerLegalAdviceOverwrite?: string;
|
|
174
|
+
language: string;
|
|
175
|
+
}>;
|
|
176
|
+
revision?: number;
|
|
177
|
+
createdAt?: string;
|
|
178
|
+
};
|
|
162
179
|
};
|
|
163
180
|
report: {
|
|
164
181
|
reportUrl?: string;
|
|
@@ -173,6 +190,64 @@ export type OrderReportGetResponse = {
|
|
|
173
190
|
createdAt?: string;
|
|
174
191
|
};
|
|
175
192
|
};
|
|
193
|
+
/**
|
|
194
|
+
* Order summary for list view
|
|
195
|
+
*/
|
|
196
|
+
export type OrderListItem = {
|
|
197
|
+
uuid: string;
|
|
198
|
+
id: string;
|
|
199
|
+
scanType: 'single' | 'multiple' | 'mostRelevant' | 'all';
|
|
200
|
+
scanDomain: string;
|
|
201
|
+
scanUrlsRequestedCount: number;
|
|
202
|
+
reportScanUrlsExecutedCount: number;
|
|
203
|
+
report?: {
|
|
204
|
+
uuid: string;
|
|
205
|
+
reportUrl?: string;
|
|
206
|
+
dataProtectionViolationsFound: boolean;
|
|
207
|
+
riskScore: number;
|
|
208
|
+
};
|
|
209
|
+
status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
|
|
210
|
+
errorType?: 'domainNotReachable' | 'invalidUrl' | 'domainBlacklisted' | 'scanTypeNotAllowed' | 'channelInactive' | 'brandInactive' | 'tooManyUrls' | 'mixedDomains' | 'crawlingTimeout' | 'processingError' | 'reportGenerationError' | 'webhookDeliveryError';
|
|
211
|
+
createdAt: string;
|
|
212
|
+
lastStatusUpdate?: {
|
|
213
|
+
id: string;
|
|
214
|
+
uuid: string;
|
|
215
|
+
status: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
|
|
216
|
+
errorType?: 'domainNotReachable' | 'invalidUrl' | 'domainBlacklisted' | 'scanTypeNotAllowed' | 'channelInactive' | 'brandInactive' | 'tooManyUrls' | 'mixedDomains' | 'crawlingTimeout' | 'processingError' | 'reportGenerationError' | 'webhookDeliveryError';
|
|
217
|
+
progressInPercent: number;
|
|
218
|
+
updatedAt?: string;
|
|
219
|
+
createdAt?: string;
|
|
220
|
+
};
|
|
221
|
+
reportAvailability: 'pending' | 'available' | 'deleted';
|
|
222
|
+
reportAvailableUntil?: string;
|
|
223
|
+
vendorBrand: {
|
|
224
|
+
id: string;
|
|
225
|
+
uuid: string;
|
|
226
|
+
name: string;
|
|
227
|
+
};
|
|
228
|
+
vendorBrandChannel: {
|
|
229
|
+
id: string;
|
|
230
|
+
uuid: string;
|
|
231
|
+
name: string;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Cursor-based pagination metadata for list responses.
|
|
236
|
+
*/
|
|
237
|
+
export type CursorPaginationResponseMetadata = {
|
|
238
|
+
/**
|
|
239
|
+
* Cursor used for this page (echoed back).
|
|
240
|
+
*/
|
|
241
|
+
cursor?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Cursor for the next page. Omit when there is no next page.
|
|
244
|
+
*/
|
|
245
|
+
nextCursor?: string;
|
|
246
|
+
/**
|
|
247
|
+
* Number of items in this response.
|
|
248
|
+
*/
|
|
249
|
+
dataCount: number;
|
|
250
|
+
};
|
|
176
251
|
export type GetOrderData = {
|
|
177
252
|
body?: never;
|
|
178
253
|
path?: never;
|
|
@@ -350,6 +425,20 @@ export type GetOrderReportData = {
|
|
|
350
425
|
url: '/order/report';
|
|
351
426
|
};
|
|
352
427
|
export type GetOrderReportErrors = {
|
|
428
|
+
401: Array<{
|
|
429
|
+
code: string;
|
|
430
|
+
message: string;
|
|
431
|
+
description?: string;
|
|
432
|
+
entityName?: string;
|
|
433
|
+
fieldName?: string;
|
|
434
|
+
index?: number;
|
|
435
|
+
data?: {
|
|
436
|
+
[key: string]: unknown;
|
|
437
|
+
};
|
|
438
|
+
} | {
|
|
439
|
+
code: 'InvalidApiKey';
|
|
440
|
+
message: string;
|
|
441
|
+
}>;
|
|
353
442
|
default: Array<{
|
|
354
443
|
code: string;
|
|
355
444
|
message: string;
|
|
@@ -372,6 +461,81 @@ export type GetOrderReportResponses = {
|
|
|
372
461
|
};
|
|
373
462
|
};
|
|
374
463
|
export type GetOrderReportResponse = GetOrderReportResponses[keyof GetOrderReportResponses];
|
|
464
|
+
export type GetOrdersData = {
|
|
465
|
+
body?: never;
|
|
466
|
+
path?: never;
|
|
467
|
+
query: {
|
|
468
|
+
/**
|
|
469
|
+
* Vendor UUID. User must be assigned to this vendor.
|
|
470
|
+
*/
|
|
471
|
+
vendorUuid: string;
|
|
472
|
+
/**
|
|
473
|
+
* Cursor for pagination. Omit for first page.
|
|
474
|
+
*/
|
|
475
|
+
cursor?: string;
|
|
476
|
+
/**
|
|
477
|
+
* Max number of orders per page (default and max: 100).
|
|
478
|
+
*/
|
|
479
|
+
limit?: number;
|
|
480
|
+
/**
|
|
481
|
+
* Filter orders created on or after the start of this calendar day (YYYY-MM-DD), interpreted in UTC.
|
|
482
|
+
*/
|
|
483
|
+
dateFrom?: string;
|
|
484
|
+
/**
|
|
485
|
+
* Filter orders created on or before the end of this calendar day (YYYY-MM-DD), interpreted in UTC.
|
|
486
|
+
*/
|
|
487
|
+
dateTo?: string;
|
|
488
|
+
/**
|
|
489
|
+
* Filter by vendor billing ID (numeric primary key).
|
|
490
|
+
*/
|
|
491
|
+
billingId?: string;
|
|
492
|
+
/**
|
|
493
|
+
* Filter by order status.
|
|
494
|
+
*/
|
|
495
|
+
status?: 'created' | 'preparing' | 'prepared' | 'queued' | 'crawling' | 'crawled' | 'processing' | 'processed' | 'reportGenerating' | 'reportGenerated' | 'reportDeliveryToWebookQueued' | 'completed' | 'completedPartially' | 'error';
|
|
496
|
+
/**
|
|
497
|
+
* Filter by vendor brand UUID.
|
|
498
|
+
*/
|
|
499
|
+
brandUuid?: string;
|
|
500
|
+
/**
|
|
501
|
+
* Filter by vendor brand channel UUID.
|
|
502
|
+
*/
|
|
503
|
+
channelUuid?: string;
|
|
504
|
+
};
|
|
505
|
+
url: '/orders';
|
|
506
|
+
};
|
|
507
|
+
export type GetOrdersErrors = {
|
|
508
|
+
/**
|
|
509
|
+
* JWT is invalid
|
|
510
|
+
*/
|
|
511
|
+
401: null;
|
|
512
|
+
/**
|
|
513
|
+
* JWT valid, but insufficient permissions
|
|
514
|
+
*/
|
|
515
|
+
403: null;
|
|
516
|
+
default: Array<{
|
|
517
|
+
code: string;
|
|
518
|
+
message: string;
|
|
519
|
+
description?: string;
|
|
520
|
+
entityName?: string;
|
|
521
|
+
fieldName?: string;
|
|
522
|
+
index?: number;
|
|
523
|
+
data?: {
|
|
524
|
+
[key: string]: unknown;
|
|
525
|
+
};
|
|
526
|
+
}>;
|
|
527
|
+
};
|
|
528
|
+
export type GetOrdersError = GetOrdersErrors[keyof GetOrdersErrors];
|
|
529
|
+
export type GetOrdersResponses = {
|
|
530
|
+
/**
|
|
531
|
+
* Orders list with pagination metadata
|
|
532
|
+
*/
|
|
533
|
+
200: {
|
|
534
|
+
data: Array<OrderListItem>;
|
|
535
|
+
responseMetadata: CursorPaginationResponseMetadata;
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
export type GetOrdersResponse = GetOrdersResponses[keyof GetOrdersResponses];
|
|
375
539
|
export type GetVendorApiKeyValidateData = {
|
|
376
540
|
body?: never;
|
|
377
541
|
path?: never;
|