filecheck-node 0.1.0 → 0.1.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.
- package/dist/index.d.cts +36 -1
- package/dist/index.d.ts +36 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -411,6 +411,38 @@ interface WebhookParam {
|
|
|
411
411
|
url: string;
|
|
412
412
|
headers?: Record<string, string>;
|
|
413
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* What the customer configured for this order — finished size, page count,
|
|
416
|
+
* finish. Applied to each source's `profileId` before the file is judged, so
|
|
417
|
+
* one profile can serve every size of a product. Only narrows thresholds the
|
|
418
|
+
* profile already checks; has no effect on sources without a `profileId`.
|
|
419
|
+
* Accepted by `POST /jobs`, `/jobs/preflight`, and `/jobs/fix`.
|
|
420
|
+
*/
|
|
421
|
+
interface JobContext {
|
|
422
|
+
/** Finished (trim) size of the product ordered. Both dimensions required to take effect. */
|
|
423
|
+
artworkSize?: {
|
|
424
|
+
width_mm?: number;
|
|
425
|
+
height_mm?: number;
|
|
426
|
+
};
|
|
427
|
+
/** Expected page count. Set min === max for an exact count. */
|
|
428
|
+
pageCount?: {
|
|
429
|
+
min?: number;
|
|
430
|
+
max?: number;
|
|
431
|
+
};
|
|
432
|
+
/** Expected number of separate files (NOT the order quantity). */
|
|
433
|
+
fileCount?: {
|
|
434
|
+
min?: number;
|
|
435
|
+
max?: number;
|
|
436
|
+
};
|
|
437
|
+
/** Bleed the chosen finish requires. */
|
|
438
|
+
bleed?: {
|
|
439
|
+
required_mm?: number;
|
|
440
|
+
};
|
|
441
|
+
/** Safe margin the chosen finish requires. */
|
|
442
|
+
safety?: {
|
|
443
|
+
min_mm?: number;
|
|
444
|
+
};
|
|
445
|
+
}
|
|
414
446
|
/** `POST /jobs`. NOTE: `workflowId` is not accepted — it is response-only. */
|
|
415
447
|
interface CreateJobParams {
|
|
416
448
|
sources: CreateJobSource[];
|
|
@@ -423,6 +455,7 @@ interface CreateJobParams {
|
|
|
423
455
|
};
|
|
424
456
|
webhook?: WebhookParam;
|
|
425
457
|
metaData?: Record<string, unknown>;
|
|
458
|
+
context?: JobContext;
|
|
426
459
|
}
|
|
427
460
|
/** PDF validation profile codes accepted by `POST /jobs/validate`. */
|
|
428
461
|
type ValidateProfileCode = 'auto' | '1a' | '1b' | '2a' | '2b' | '2u' | '3a' | '3b' | '3u' | '4' | '4e' | '4f' | 'ua1' | 'ua2';
|
|
@@ -444,6 +477,7 @@ interface PreflightParams {
|
|
|
444
477
|
sources: PreflightSource[];
|
|
445
478
|
webhook?: WebhookParam;
|
|
446
479
|
metaData?: Record<string, unknown>;
|
|
480
|
+
context?: JobContext;
|
|
447
481
|
}
|
|
448
482
|
interface FixSource extends SourceRef {
|
|
449
483
|
profileId?: string;
|
|
@@ -455,6 +489,7 @@ interface FixParams {
|
|
|
455
489
|
repreflight?: boolean;
|
|
456
490
|
webhook?: WebhookParam;
|
|
457
491
|
metaData?: Record<string, unknown>;
|
|
492
|
+
context?: JobContext;
|
|
458
493
|
}
|
|
459
494
|
interface PreviewsSource extends SourceRef {
|
|
460
495
|
params?: Record<string, unknown>;
|
|
@@ -707,4 +742,4 @@ declare class ConnectionError extends FilecheckError {
|
|
|
707
742
|
declare class WebhookSignatureError extends FilecheckError {
|
|
708
743
|
}
|
|
709
744
|
|
|
710
|
-
export { APIError, type Artifact, AuthenticationError, ConnectionError, type ConstructEventOptions, type CreateJobParams, type CreateJobSource, type DeleteJobResult, type FetchLike, type FileType, Filecheck, type FilecheckClientOptions, FilecheckError, type FixParams, type FixSource, type HttpRequest, type HttpResponse, type HttpTransport, InvalidRequestError, type Job, type JobCompletedPayload, type JobCreatedPayload, type JobPage, type JobResult, type JobRuns, type JobStatus, type JobStepInput, type JobSummary, type LibraryItem, type ListJobsParams, NotFoundError, type OnFailPolicy, type OptimizeParams, type OptimizeResult, type OptimizeSource, type OrderResult, type Outcome, type PreflightParams, type PreflightResult, type PreflightSource, type PreviewsParams, type PreviewsSource, RateLimitError, type Run, type SourceRef, type Step, type StepType, TERMINAL_STATUSES, type Task, type UploadInput, type UploadOptions, type UploadResult, type ValidateParams, type ValidateProfileCode, type ValidateProfileResult, type ValidateResult, type ValidateSource, type VerifyOptions, type VerifyReason, type VerifyResult, type VerifyState, type WaitOptions, type WebhookEvent, type WebhookParam, WebhookSignatureError, computeSignature, constructEvent, Filecheck as default, isTerminal, maskKey, resolveVerify, webhooks };
|
|
745
|
+
export { APIError, type Artifact, AuthenticationError, ConnectionError, type ConstructEventOptions, type CreateJobParams, type CreateJobSource, type DeleteJobResult, type FetchLike, type FileType, Filecheck, type FilecheckClientOptions, FilecheckError, type FixParams, type FixSource, type HttpRequest, type HttpResponse, type HttpTransport, InvalidRequestError, type Job, type JobCompletedPayload, type JobContext, type JobCreatedPayload, type JobPage, type JobResult, type JobRuns, type JobStatus, type JobStepInput, type JobSummary, type LibraryItem, type ListJobsParams, NotFoundError, type OnFailPolicy, type OptimizeParams, type OptimizeResult, type OptimizeSource, type OrderResult, type Outcome, type PreflightParams, type PreflightResult, type PreflightSource, type PreviewsParams, type PreviewsSource, RateLimitError, type Run, type SourceRef, type Step, type StepType, TERMINAL_STATUSES, type Task, type UploadInput, type UploadOptions, type UploadResult, type ValidateParams, type ValidateProfileCode, type ValidateProfileResult, type ValidateResult, type ValidateSource, type VerifyOptions, type VerifyReason, type VerifyResult, type VerifyState, type WaitOptions, type WebhookEvent, type WebhookParam, WebhookSignatureError, computeSignature, constructEvent, Filecheck as default, isTerminal, maskKey, resolveVerify, webhooks };
|
package/dist/index.d.ts
CHANGED
|
@@ -411,6 +411,38 @@ interface WebhookParam {
|
|
|
411
411
|
url: string;
|
|
412
412
|
headers?: Record<string, string>;
|
|
413
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* What the customer configured for this order — finished size, page count,
|
|
416
|
+
* finish. Applied to each source's `profileId` before the file is judged, so
|
|
417
|
+
* one profile can serve every size of a product. Only narrows thresholds the
|
|
418
|
+
* profile already checks; has no effect on sources without a `profileId`.
|
|
419
|
+
* Accepted by `POST /jobs`, `/jobs/preflight`, and `/jobs/fix`.
|
|
420
|
+
*/
|
|
421
|
+
interface JobContext {
|
|
422
|
+
/** Finished (trim) size of the product ordered. Both dimensions required to take effect. */
|
|
423
|
+
artworkSize?: {
|
|
424
|
+
width_mm?: number;
|
|
425
|
+
height_mm?: number;
|
|
426
|
+
};
|
|
427
|
+
/** Expected page count. Set min === max for an exact count. */
|
|
428
|
+
pageCount?: {
|
|
429
|
+
min?: number;
|
|
430
|
+
max?: number;
|
|
431
|
+
};
|
|
432
|
+
/** Expected number of separate files (NOT the order quantity). */
|
|
433
|
+
fileCount?: {
|
|
434
|
+
min?: number;
|
|
435
|
+
max?: number;
|
|
436
|
+
};
|
|
437
|
+
/** Bleed the chosen finish requires. */
|
|
438
|
+
bleed?: {
|
|
439
|
+
required_mm?: number;
|
|
440
|
+
};
|
|
441
|
+
/** Safe margin the chosen finish requires. */
|
|
442
|
+
safety?: {
|
|
443
|
+
min_mm?: number;
|
|
444
|
+
};
|
|
445
|
+
}
|
|
414
446
|
/** `POST /jobs`. NOTE: `workflowId` is not accepted — it is response-only. */
|
|
415
447
|
interface CreateJobParams {
|
|
416
448
|
sources: CreateJobSource[];
|
|
@@ -423,6 +455,7 @@ interface CreateJobParams {
|
|
|
423
455
|
};
|
|
424
456
|
webhook?: WebhookParam;
|
|
425
457
|
metaData?: Record<string, unknown>;
|
|
458
|
+
context?: JobContext;
|
|
426
459
|
}
|
|
427
460
|
/** PDF validation profile codes accepted by `POST /jobs/validate`. */
|
|
428
461
|
type ValidateProfileCode = 'auto' | '1a' | '1b' | '2a' | '2b' | '2u' | '3a' | '3b' | '3u' | '4' | '4e' | '4f' | 'ua1' | 'ua2';
|
|
@@ -444,6 +477,7 @@ interface PreflightParams {
|
|
|
444
477
|
sources: PreflightSource[];
|
|
445
478
|
webhook?: WebhookParam;
|
|
446
479
|
metaData?: Record<string, unknown>;
|
|
480
|
+
context?: JobContext;
|
|
447
481
|
}
|
|
448
482
|
interface FixSource extends SourceRef {
|
|
449
483
|
profileId?: string;
|
|
@@ -455,6 +489,7 @@ interface FixParams {
|
|
|
455
489
|
repreflight?: boolean;
|
|
456
490
|
webhook?: WebhookParam;
|
|
457
491
|
metaData?: Record<string, unknown>;
|
|
492
|
+
context?: JobContext;
|
|
458
493
|
}
|
|
459
494
|
interface PreviewsSource extends SourceRef {
|
|
460
495
|
params?: Record<string, unknown>;
|
|
@@ -707,4 +742,4 @@ declare class ConnectionError extends FilecheckError {
|
|
|
707
742
|
declare class WebhookSignatureError extends FilecheckError {
|
|
708
743
|
}
|
|
709
744
|
|
|
710
|
-
export { APIError, type Artifact, AuthenticationError, ConnectionError, type ConstructEventOptions, type CreateJobParams, type CreateJobSource, type DeleteJobResult, type FetchLike, type FileType, Filecheck, type FilecheckClientOptions, FilecheckError, type FixParams, type FixSource, type HttpRequest, type HttpResponse, type HttpTransport, InvalidRequestError, type Job, type JobCompletedPayload, type JobCreatedPayload, type JobPage, type JobResult, type JobRuns, type JobStatus, type JobStepInput, type JobSummary, type LibraryItem, type ListJobsParams, NotFoundError, type OnFailPolicy, type OptimizeParams, type OptimizeResult, type OptimizeSource, type OrderResult, type Outcome, type PreflightParams, type PreflightResult, type PreflightSource, type PreviewsParams, type PreviewsSource, RateLimitError, type Run, type SourceRef, type Step, type StepType, TERMINAL_STATUSES, type Task, type UploadInput, type UploadOptions, type UploadResult, type ValidateParams, type ValidateProfileCode, type ValidateProfileResult, type ValidateResult, type ValidateSource, type VerifyOptions, type VerifyReason, type VerifyResult, type VerifyState, type WaitOptions, type WebhookEvent, type WebhookParam, WebhookSignatureError, computeSignature, constructEvent, Filecheck as default, isTerminal, maskKey, resolveVerify, webhooks };
|
|
745
|
+
export { APIError, type Artifact, AuthenticationError, ConnectionError, type ConstructEventOptions, type CreateJobParams, type CreateJobSource, type DeleteJobResult, type FetchLike, type FileType, Filecheck, type FilecheckClientOptions, FilecheckError, type FixParams, type FixSource, type HttpRequest, type HttpResponse, type HttpTransport, InvalidRequestError, type Job, type JobCompletedPayload, type JobContext, type JobCreatedPayload, type JobPage, type JobResult, type JobRuns, type JobStatus, type JobStepInput, type JobSummary, type LibraryItem, type ListJobsParams, NotFoundError, type OnFailPolicy, type OptimizeParams, type OptimizeResult, type OptimizeSource, type OrderResult, type Outcome, type PreflightParams, type PreflightResult, type PreflightSource, type PreviewsParams, type PreviewsSource, RateLimitError, type Run, type SourceRef, type Step, type StepType, TERMINAL_STATUSES, type Task, type UploadInput, type UploadOptions, type UploadResult, type ValidateParams, type ValidateProfileCode, type ValidateProfileResult, type ValidateResult, type ValidateSource, type VerifyOptions, type VerifyReason, type VerifyResult, type VerifyState, type WaitOptions, type WebhookEvent, type WebhookParam, WebhookSignatureError, computeSignature, constructEvent, Filecheck as default, isTerminal, maskKey, resolveVerify, webhooks };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "filecheck-node",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Filecheck server SDK for Node.js — jobs, uploads, webhooks, and server-side job verification",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
|
-
"url": "https://github.com/
|
|
42
|
+
"url": "https://github.com/PrintApp/filecheck-integrations.git",
|
|
43
43
|
"directory": "packages/node"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|