@dealcrawl/sdk 2.0.0
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 +540 -0
- package/dist/sdk/src/client.d.ts +285 -0
- package/dist/sdk/src/client.d.ts.map +1 -0
- package/dist/sdk/src/client.js +336 -0
- package/dist/sdk/src/client.js.map +1 -0
- package/dist/sdk/src/error.d.ts +54 -0
- package/dist/sdk/src/error.d.ts.map +1 -0
- package/dist/sdk/src/error.js +115 -0
- package/dist/sdk/src/error.js.map +1 -0
- package/dist/sdk/src/index.d.ts +58 -0
- package/dist/sdk/src/index.d.ts.map +1 -0
- package/dist/sdk/src/index.js +65 -0
- package/dist/sdk/src/index.js.map +1 -0
- package/dist/sdk/src/resources/account.d.ts +143 -0
- package/dist/sdk/src/resources/account.d.ts.map +1 -0
- package/dist/sdk/src/resources/account.js +186 -0
- package/dist/sdk/src/resources/account.js.map +1 -0
- package/dist/sdk/src/resources/crawl.d.ts +87 -0
- package/dist/sdk/src/resources/crawl.d.ts.map +1 -0
- package/dist/sdk/src/resources/crawl.js +205 -0
- package/dist/sdk/src/resources/crawl.js.map +1 -0
- package/dist/sdk/src/resources/data.d.ts +157 -0
- package/dist/sdk/src/resources/data.d.ts.map +1 -0
- package/dist/sdk/src/resources/data.js +239 -0
- package/dist/sdk/src/resources/data.js.map +1 -0
- package/dist/sdk/src/resources/dork.d.ts +104 -0
- package/dist/sdk/src/resources/dork.d.ts.map +1 -0
- package/dist/sdk/src/resources/dork.js +163 -0
- package/dist/sdk/src/resources/dork.js.map +1 -0
- package/dist/sdk/src/resources/extract.d.ts +105 -0
- package/dist/sdk/src/resources/extract.d.ts.map +1 -0
- package/dist/sdk/src/resources/extract.js +246 -0
- package/dist/sdk/src/resources/extract.js.map +1 -0
- package/dist/sdk/src/resources/index.d.ts +14 -0
- package/dist/sdk/src/resources/index.d.ts.map +1 -0
- package/dist/sdk/src/resources/index.js +14 -0
- package/dist/sdk/src/resources/index.js.map +1 -0
- package/dist/sdk/src/resources/keys.d.ts +124 -0
- package/dist/sdk/src/resources/keys.d.ts.map +1 -0
- package/dist/sdk/src/resources/keys.js +168 -0
- package/dist/sdk/src/resources/keys.js.map +1 -0
- package/dist/sdk/src/resources/scrape.d.ts +53 -0
- package/dist/sdk/src/resources/scrape.d.ts.map +1 -0
- package/dist/sdk/src/resources/scrape.js +85 -0
- package/dist/sdk/src/resources/scrape.js.map +1 -0
- package/dist/sdk/src/resources/status.d.ts +100 -0
- package/dist/sdk/src/resources/status.d.ts.map +1 -0
- package/dist/sdk/src/resources/status.js +133 -0
- package/dist/sdk/src/resources/status.js.map +1 -0
- package/dist/sdk/src/resources/webhooks.d.ts +126 -0
- package/dist/sdk/src/resources/webhooks.d.ts.map +1 -0
- package/dist/sdk/src/resources/webhooks.js +167 -0
- package/dist/sdk/src/resources/webhooks.js.map +1 -0
- package/dist/sdk/src/types/config.d.ts +45 -0
- package/dist/sdk/src/types/config.d.ts.map +1 -0
- package/dist/sdk/src/types/config.js +10 -0
- package/dist/sdk/src/types/config.js.map +1 -0
- package/dist/sdk/src/types/index.d.ts +8 -0
- package/dist/sdk/src/types/index.d.ts.map +1 -0
- package/dist/sdk/src/types/index.js +8 -0
- package/dist/sdk/src/types/index.js.map +1 -0
- package/dist/sdk/src/types/options.d.ts +286 -0
- package/dist/sdk/src/types/options.d.ts.map +1 -0
- package/dist/sdk/src/types/options.js +6 -0
- package/dist/sdk/src/types/options.js.map +1 -0
- package/dist/sdk/src/types/responses.d.ts +385 -0
- package/dist/sdk/src/types/responses.d.ts.map +1 -0
- package/dist/sdk/src/types/responses.js +6 -0
- package/dist/sdk/src/types/responses.js.map +1 -0
- package/dist/sdk/src/utils/polling.d.ts +57 -0
- package/dist/sdk/src/utils/polling.d.ts.map +1 -0
- package/dist/sdk/src/utils/polling.js +110 -0
- package/dist/sdk/src/utils/polling.js.map +1 -0
- package/dist/sdk/src/utils/request.d.ts +47 -0
- package/dist/sdk/src/utils/request.d.ts.map +1 -0
- package/dist/sdk/src/utils/request.js +161 -0
- package/dist/sdk/src/utils/request.js.map +1 -0
- package/dist/shared/src/constants/errors.d.ts +26 -0
- package/dist/shared/src/constants/errors.d.ts.map +1 -0
- package/dist/shared/src/constants/errors.js +39 -0
- package/dist/shared/src/constants/errors.js.map +1 -0
- package/dist/shared/src/constants/http.d.ts +26 -0
- package/dist/shared/src/constants/http.d.ts.map +1 -0
- package/dist/shared/src/constants/http.js +26 -0
- package/dist/shared/src/constants/http.js.map +1 -0
- package/dist/shared/src/constants/index.d.ts +4 -0
- package/dist/shared/src/constants/index.d.ts.map +1 -0
- package/dist/shared/src/constants/index.js +5 -0
- package/dist/shared/src/constants/index.js.map +1 -0
- package/dist/shared/src/constants/limits.d.ts +52 -0
- package/dist/shared/src/constants/limits.d.ts.map +1 -0
- package/dist/shared/src/constants/limits.js +43 -0
- package/dist/shared/src/constants/limits.js.map +1 -0
- package/dist/shared/src/index.d.ts +5 -0
- package/dist/shared/src/index.d.ts.map +1 -0
- package/dist/shared/src/index.js +11 -0
- package/dist/shared/src/index.js.map +1 -0
- package/dist/shared/src/lib/index.d.ts +2 -0
- package/dist/shared/src/lib/index.d.ts.map +1 -0
- package/dist/shared/src/lib/index.js +2 -0
- package/dist/shared/src/lib/index.js.map +1 -0
- package/dist/shared/src/lib/redis.d.ts +14 -0
- package/dist/shared/src/lib/redis.d.ts.map +1 -0
- package/dist/shared/src/lib/redis.js +60 -0
- package/dist/shared/src/lib/redis.js.map +1 -0
- package/dist/shared/src/types/api-key.types.d.ts +94 -0
- package/dist/shared/src/types/api-key.types.d.ts.map +1 -0
- package/dist/shared/src/types/api-key.types.js +30 -0
- package/dist/shared/src/types/api-key.types.js.map +1 -0
- package/dist/shared/src/types/api.types.d.ts +38 -0
- package/dist/shared/src/types/api.types.d.ts.map +1 -0
- package/dist/shared/src/types/api.types.js +2 -0
- package/dist/shared/src/types/api.types.js.map +1 -0
- package/dist/shared/src/types/client.types.d.ts +73 -0
- package/dist/shared/src/types/client.types.d.ts.map +1 -0
- package/dist/shared/src/types/client.types.js +9 -0
- package/dist/shared/src/types/client.types.js.map +1 -0
- package/dist/shared/src/types/crawl.types.d.ts +65 -0
- package/dist/shared/src/types/crawl.types.d.ts.map +1 -0
- package/dist/shared/src/types/crawl.types.js +2 -0
- package/dist/shared/src/types/crawl.types.js.map +1 -0
- package/dist/shared/src/types/deal.types.d.ts +210 -0
- package/dist/shared/src/types/deal.types.d.ts.map +1 -0
- package/dist/shared/src/types/deal.types.js +6 -0
- package/dist/shared/src/types/deal.types.js.map +1 -0
- package/dist/shared/src/types/dork.types.d.ts +29 -0
- package/dist/shared/src/types/dork.types.d.ts.map +1 -0
- package/dist/shared/src/types/dork.types.js +2 -0
- package/dist/shared/src/types/dork.types.js.map +1 -0
- package/dist/shared/src/types/index.d.ts +8 -0
- package/dist/shared/src/types/index.d.ts.map +1 -0
- package/dist/shared/src/types/index.js +9 -0
- package/dist/shared/src/types/index.js.map +1 -0
- package/dist/shared/src/types/scrape.types.d.ts +151 -0
- package/dist/shared/src/types/scrape.types.d.ts.map +1 -0
- package/dist/shared/src/types/scrape.types.js +2 -0
- package/dist/shared/src/types/scrape.types.js.map +1 -0
- package/dist/shared/src/utils/date.d.ts +7 -0
- package/dist/shared/src/utils/date.d.ts.map +1 -0
- package/dist/shared/src/utils/date.js +25 -0
- package/dist/shared/src/utils/date.js.map +1 -0
- package/dist/shared/src/utils/hash.d.ts +4 -0
- package/dist/shared/src/utils/hash.d.ts.map +1 -0
- package/dist/shared/src/utils/hash.js +21 -0
- package/dist/shared/src/utils/hash.js.map +1 -0
- package/dist/shared/src/utils/index.d.ts +7 -0
- package/dist/shared/src/utils/index.d.ts.map +1 -0
- package/dist/shared/src/utils/index.js +8 -0
- package/dist/shared/src/utils/index.js.map +1 -0
- package/dist/shared/src/utils/logger.d.ts +66 -0
- package/dist/shared/src/utils/logger.d.ts.map +1 -0
- package/dist/shared/src/utils/logger.js +268 -0
- package/dist/shared/src/utils/logger.js.map +1 -0
- package/dist/shared/src/utils/retry.d.ts +11 -0
- package/dist/shared/src/utils/retry.d.ts.map +1 -0
- package/dist/shared/src/utils/retry.js +36 -0
- package/dist/shared/src/utils/retry.js.map +1 -0
- package/dist/shared/src/utils/url-validator.d.ts +37 -0
- package/dist/shared/src/utils/url-validator.d.ts.map +1 -0
- package/dist/shared/src/utils/url-validator.js +179 -0
- package/dist/shared/src/utils/url-validator.js.map +1 -0
- package/dist/shared/src/utils/url.d.ts +6 -0
- package/dist/shared/src/utils/url.d.ts.map +1 -0
- package/dist/shared/src/utils/url.js +56 -0
- package/dist/shared/src/utils/url.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-key.types.d.ts","sourceRoot":"","sources":["../../../../../shared/src/types/api-key.types.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,OAAO,GACP,MAAM,GACN,SAAS,GACT,QAAQ,GACR,WAAW,GACX,aAAa,GACb,aAAa,GACb,iBAAiB,CAAC;AAEtB;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,WAAW,EAU3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,WAAW,EAO/C,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IA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C,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// ============================================
|
|
2
|
+
// API KEY TYPES
|
|
3
|
+
// Multi-key management with scopes and expiration
|
|
4
|
+
// ============================================
|
|
5
|
+
/**
|
|
6
|
+
* All available scopes
|
|
7
|
+
*/
|
|
8
|
+
export const ALL_API_KEY_SCOPES = [
|
|
9
|
+
"scrape",
|
|
10
|
+
"crawl",
|
|
11
|
+
"dork",
|
|
12
|
+
"extract",
|
|
13
|
+
"status",
|
|
14
|
+
"data:read",
|
|
15
|
+
"data:export",
|
|
16
|
+
"keys:manage",
|
|
17
|
+
"webhooks:manage",
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Default scopes for new keys
|
|
21
|
+
*/
|
|
22
|
+
export const DEFAULT_API_KEY_SCOPES = [
|
|
23
|
+
"scrape",
|
|
24
|
+
"crawl",
|
|
25
|
+
"dork",
|
|
26
|
+
"extract",
|
|
27
|
+
"status",
|
|
28
|
+
"data:read",
|
|
29
|
+
];
|
|
30
|
+
//# sourceMappingURL=api-key.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-key.types.js","sourceRoot":"","sources":["../../../../../shared/src/types/api-key.types.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,gBAAgB;AAChB,kDAAkD;AAClD,+CAA+C;AAgB/C;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAkB;IAC/C,QAAQ;IACR,OAAO;IACP,MAAM;IACN,SAAS;IACT,QAAQ;IACR,WAAW;IACX,aAAa;IACb,aAAa;IACb,iBAAiB;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAkB;IACnD,QAAQ;IACR,OAAO;IACP,MAAM;IACN,SAAS;IACT,QAAQ;IACR,WAAW;CACZ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface ApiResponse<T = unknown> {
|
|
2
|
+
success: boolean;
|
|
3
|
+
data?: T;
|
|
4
|
+
error?: ApiError;
|
|
5
|
+
meta?: ResponseMeta;
|
|
6
|
+
}
|
|
7
|
+
export interface ApiError {
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
details?: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
export interface ResponseMeta {
|
|
13
|
+
requestId: string;
|
|
14
|
+
timestamp: string;
|
|
15
|
+
duration?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface JobResponse {
|
|
18
|
+
jobId: string;
|
|
19
|
+
status: JobStatus;
|
|
20
|
+
statusUrl: string;
|
|
21
|
+
estimatedTime?: string;
|
|
22
|
+
}
|
|
23
|
+
export type JobStatus = "pending" | "active" | "completed" | "failed" | "delayed" | "paused";
|
|
24
|
+
export interface PaginatedResponse<T> {
|
|
25
|
+
data: T[];
|
|
26
|
+
pagination: {
|
|
27
|
+
page: number;
|
|
28
|
+
limit: number;
|
|
29
|
+
total: number;
|
|
30
|
+
hasMore: boolean;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface RateLimitInfo {
|
|
34
|
+
limit: number;
|
|
35
|
+
remaining: number;
|
|
36
|
+
reset: number;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=api.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.types.d.ts","sourceRoot":"","sources":["../../../../../shared/src/types/api.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,OAAO;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.types.js","sourceRoot":"","sources":["../../../../../shared/src/types/api.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type ClientTier = "free" | "pro" | "enterprise";
|
|
2
|
+
export interface ClientQuotas {
|
|
3
|
+
crawls: number;
|
|
4
|
+
scrapes: number;
|
|
5
|
+
dorks: number;
|
|
6
|
+
}
|
|
7
|
+
export interface ClientUsage {
|
|
8
|
+
crawls: number;
|
|
9
|
+
scrapes: number;
|
|
10
|
+
dorks: number;
|
|
11
|
+
lastResetAt?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ClientRateLimitOverride {
|
|
14
|
+
requests?: number;
|
|
15
|
+
windowMs?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* API Client (account) - can have multiple API keys
|
|
19
|
+
* Updated for multi-key system
|
|
20
|
+
*/
|
|
21
|
+
export interface ApiClient {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
email: string | null;
|
|
25
|
+
tier: ClientTier;
|
|
26
|
+
isActive: boolean;
|
|
27
|
+
organizationId?: string | null;
|
|
28
|
+
quotas: ClientQuotas;
|
|
29
|
+
usage: ClientUsage;
|
|
30
|
+
rateLimitOverride?: ClientRateLimitOverride | null;
|
|
31
|
+
dealPreferences?: Record<string, unknown> | null;
|
|
32
|
+
metadata?: Record<string, unknown>;
|
|
33
|
+
description?: string | null;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
/** @deprecated Use api_keys table for multi-key support */
|
|
37
|
+
apiKey?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface ClientContext {
|
|
40
|
+
client: ApiClient;
|
|
41
|
+
requestId: string;
|
|
42
|
+
ipAddress?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Request to create a new API client
|
|
46
|
+
*/
|
|
47
|
+
export interface CreateApiClientRequest {
|
|
48
|
+
name: string;
|
|
49
|
+
email?: string;
|
|
50
|
+
tier?: ClientTier;
|
|
51
|
+
organizationId?: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
quotas?: Partial<ClientQuotas>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Request to update an API client
|
|
57
|
+
*/
|
|
58
|
+
export interface UpdateApiClientRequest {
|
|
59
|
+
name?: string;
|
|
60
|
+
email?: string;
|
|
61
|
+
tier?: ClientTier;
|
|
62
|
+
isActive?: boolean;
|
|
63
|
+
description?: string;
|
|
64
|
+
quotas?: Partial<ClientQuotas>;
|
|
65
|
+
rateLimitOverride?: ClientRateLimitOverride | null;
|
|
66
|
+
dealPreferences?: Record<string, unknown>;
|
|
67
|
+
metadata?: Record<string, unknown>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Key limits by tier
|
|
71
|
+
*/
|
|
72
|
+
export declare const API_KEY_LIMITS_BY_TIER: Record<ClientTier, number>;
|
|
73
|
+
//# sourceMappingURL=client.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.types.d.ts","sourceRoot":"","sources":["../../../../../shared/src/types/client.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,YAAY,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CA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AAO,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAI7D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.types.js","sourceRoot":"","sources":["../../../../../shared/src/types/client.types.ts"],"names":[],"mappings":"AA8EA;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAA+B;IAChE,IAAI,EAAE,CAAC;IACP,GAAG,EAAE,EAAE;IACP,UAAU,EAAE,EAAE;CACf,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { ParsedPage } from "./scrape.types";
|
|
2
|
+
import type { ScoredUrl, UrlScoreFactors } from "./deal.types";
|
|
3
|
+
export type { ScoredUrl, UrlScoreFactors };
|
|
4
|
+
export interface CrawlOptions {
|
|
5
|
+
startUrl: string;
|
|
6
|
+
prompt?: string;
|
|
7
|
+
maxDepth?: number;
|
|
8
|
+
maxPages?: number;
|
|
9
|
+
delayMs?: number;
|
|
10
|
+
detectSignals?: boolean;
|
|
11
|
+
extractWithAI?: boolean;
|
|
12
|
+
followExternalLinks?: boolean;
|
|
13
|
+
allowedDomains?: string[];
|
|
14
|
+
excludePatterns?: string[];
|
|
15
|
+
/** Use SmartFrontier for deal-prioritized crawling (default: true) */
|
|
16
|
+
prioritizeDealPages?: boolean;
|
|
17
|
+
/** Minimum deal score to keep a page result (0-100) */
|
|
18
|
+
minDealScore?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface CrawlResult {
|
|
21
|
+
startUrl: string;
|
|
22
|
+
pagesFound: number;
|
|
23
|
+
pages: ParsedPage[];
|
|
24
|
+
crawledAt: string;
|
|
25
|
+
duration?: number;
|
|
26
|
+
errors?: CrawlError[];
|
|
27
|
+
/** Statistics about the crawl when using SmartFrontier */
|
|
28
|
+
stats?: CrawlStats;
|
|
29
|
+
}
|
|
30
|
+
export interface CrawlStats {
|
|
31
|
+
/** Total URLs discovered during crawl */
|
|
32
|
+
totalUrlsDiscovered?: number;
|
|
33
|
+
/** URLs skipped (duplicates, filtered, etc.) */
|
|
34
|
+
urlsSkipped?: number;
|
|
35
|
+
/** Average deal score across all pages */
|
|
36
|
+
avgDealScore?: number;
|
|
37
|
+
/** Pages with deal score > 70 */
|
|
38
|
+
highValuePages?: number;
|
|
39
|
+
/** Total pages scraped */
|
|
40
|
+
pagesScraped?: number;
|
|
41
|
+
/** Total pages found including unprocessed/unvisited pages */
|
|
42
|
+
totalPagesFound?: number;
|
|
43
|
+
/** Total links discovered */
|
|
44
|
+
linksFound?: number;
|
|
45
|
+
/** Current crawl depth */
|
|
46
|
+
depth?: number;
|
|
47
|
+
/** Number of errors encountered */
|
|
48
|
+
errors?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface CrawlError {
|
|
51
|
+
url: string;
|
|
52
|
+
error: string;
|
|
53
|
+
timestamp: string;
|
|
54
|
+
}
|
|
55
|
+
export interface CrawlProgress {
|
|
56
|
+
jobId: string;
|
|
57
|
+
status: "pending" | "running" | "completed" | "failed";
|
|
58
|
+
progress: number;
|
|
59
|
+
pagesScraped: number;
|
|
60
|
+
pagesTotal: number;
|
|
61
|
+
currentUrl?: string;
|
|
62
|
+
startedAt?: string;
|
|
63
|
+
estimatedCompletion?: string;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=crawl.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crawl.types.d.ts","sourceRoot":"","sources":["../../../../../shared/src/types/crawl.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAU,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/D,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AAE3C,MAAM,WA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AmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crawl.types.js","sourceRoot":"","sources":["../../../../../shared/src/types/crawl.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deal-specific types for DealUp integration
|
|
3
|
+
* Part of the Ultimate Crawl feature set
|
|
4
|
+
*/
|
|
5
|
+
import type { Signal } from "./scrape.types";
|
|
6
|
+
export interface DealSignal extends Signal {
|
|
7
|
+
type: "price" | "original_price" | "discount" | "discount_amount" | "sale_indicator" | "deal_score" | "urgency_level" | "is_legit_deal";
|
|
8
|
+
}
|
|
9
|
+
export interface PriceSignal extends DealSignal {
|
|
10
|
+
type: "price" | "original_price";
|
|
11
|
+
metadata: {
|
|
12
|
+
currency: string;
|
|
13
|
+
raw: string;
|
|
14
|
+
source: "json-ld" | "og-meta" | "microdata" | "regex" | "css-selector";
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface DiscountSignal extends DealSignal {
|
|
18
|
+
type: "discount" | "discount_amount";
|
|
19
|
+
metadata: {
|
|
20
|
+
percent?: number;
|
|
21
|
+
amount?: number;
|
|
22
|
+
currency?: string;
|
|
23
|
+
raw?: string;
|
|
24
|
+
calculated?: boolean;
|
|
25
|
+
source: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface DealScoreSignal extends DealSignal {
|
|
29
|
+
type: "deal_score";
|
|
30
|
+
metadata: {
|
|
31
|
+
breakdown: DealScoreBreakdown;
|
|
32
|
+
reasoning: string[];
|
|
33
|
+
quality: "excellent" | "good" | "average" | "poor" | "very_poor";
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface DealScoreBreakdown {
|
|
37
|
+
discount: number;
|
|
38
|
+
urgency: number;
|
|
39
|
+
legitimacy: number;
|
|
40
|
+
priceClarity: number;
|
|
41
|
+
productInfo: number;
|
|
42
|
+
}
|
|
43
|
+
export interface ExtractedDeal {
|
|
44
|
+
/** Unique identifier for deduplication */
|
|
45
|
+
id: string;
|
|
46
|
+
/** Source URL where the deal was found */
|
|
47
|
+
sourceUrl: string;
|
|
48
|
+
/** Product Information */
|
|
49
|
+
product: {
|
|
50
|
+
name: string;
|
|
51
|
+
brand?: string;
|
|
52
|
+
category?: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
imageUrl?: string;
|
|
55
|
+
sku?: string;
|
|
56
|
+
};
|
|
57
|
+
/** Pricing Information */
|
|
58
|
+
pricing: {
|
|
59
|
+
currentPrice: number;
|
|
60
|
+
originalPrice?: number;
|
|
61
|
+
discountPercent?: number;
|
|
62
|
+
savedAmount?: number;
|
|
63
|
+
currency: string;
|
|
64
|
+
priceConfidence: number;
|
|
65
|
+
};
|
|
66
|
+
/** Deal Quality Assessment */
|
|
67
|
+
quality: {
|
|
68
|
+
dealScore: number;
|
|
69
|
+
urgencyLevel: UrgencyLevel;
|
|
70
|
+
isLegitDeal: boolean;
|
|
71
|
+
legitimacyScore: number;
|
|
72
|
+
};
|
|
73
|
+
/** Metadata */
|
|
74
|
+
merchant: string;
|
|
75
|
+
affiliateEligible?: boolean;
|
|
76
|
+
expiresAt?: string;
|
|
77
|
+
crawledAt: string;
|
|
78
|
+
/** Raw signals for debugging */
|
|
79
|
+
rawSignals?: Signal[];
|
|
80
|
+
}
|
|
81
|
+
export type UrgencyLevel = "none" | "low" | "medium" | "high" | "critical";
|
|
82
|
+
export interface CrawledDeal {
|
|
83
|
+
id: string;
|
|
84
|
+
job_id: string;
|
|
85
|
+
source_url: string;
|
|
86
|
+
product_name: string;
|
|
87
|
+
product_brand?: string;
|
|
88
|
+
product_category?: string;
|
|
89
|
+
product_description?: string;
|
|
90
|
+
product_image_url?: string;
|
|
91
|
+
current_price: number;
|
|
92
|
+
original_price?: number;
|
|
93
|
+
discount_percent?: number;
|
|
94
|
+
currency: string;
|
|
95
|
+
deal_score: number;
|
|
96
|
+
urgency_level: UrgencyLevel;
|
|
97
|
+
is_legit_deal: boolean;
|
|
98
|
+
synced_to_dealup: boolean;
|
|
99
|
+
dealup_deal_id?: string;
|
|
100
|
+
merchant: string;
|
|
101
|
+
affiliate_eligible?: boolean;
|
|
102
|
+
raw_signals?: Signal[];
|
|
103
|
+
ai_extraction?: Record<string, unknown>;
|
|
104
|
+
created_at: string;
|
|
105
|
+
updated_at: string;
|
|
106
|
+
}
|
|
107
|
+
export interface DealCrawlOptions {
|
|
108
|
+
/** Starting URL for the crawl */
|
|
109
|
+
startUrl: string;
|
|
110
|
+
/** Optional prompt for AI extraction guidance */
|
|
111
|
+
prompt?: string;
|
|
112
|
+
/** Maximum crawl depth (default: 3) */
|
|
113
|
+
maxDepth?: number;
|
|
114
|
+
/** Maximum pages to crawl (default: 100) */
|
|
115
|
+
maxPages?: number;
|
|
116
|
+
/** Delay between requests in ms (default: 1000) */
|
|
117
|
+
delayMs?: number;
|
|
118
|
+
/** Minimum deal score to include (default: 30) */
|
|
119
|
+
minDealScore?: number;
|
|
120
|
+
/** Categories to focus on */
|
|
121
|
+
targetCategories?: string[];
|
|
122
|
+
/** Price range filter */
|
|
123
|
+
priceRange?: {
|
|
124
|
+
min?: number;
|
|
125
|
+
max?: number;
|
|
126
|
+
currency?: string;
|
|
127
|
+
};
|
|
128
|
+
/** Minimum discount percentage to include */
|
|
129
|
+
minDiscountPercent?: number;
|
|
130
|
+
/** Sync found deals directly to DealUp */
|
|
131
|
+
syncToDealup?: boolean;
|
|
132
|
+
/** Webhook URL to notify when deals are found */
|
|
133
|
+
webhookUrl?: string;
|
|
134
|
+
}
|
|
135
|
+
export interface DealCrawlResult {
|
|
136
|
+
startUrl: string;
|
|
137
|
+
pagesScraped: number;
|
|
138
|
+
dealsFound: number;
|
|
139
|
+
deals: ExtractedDeal[];
|
|
140
|
+
crawledAt: string;
|
|
141
|
+
duration: number;
|
|
142
|
+
/** Statistics */
|
|
143
|
+
stats: {
|
|
144
|
+
avgDealScore: number;
|
|
145
|
+
topCategories: {
|
|
146
|
+
category: string;
|
|
147
|
+
count: number;
|
|
148
|
+
}[];
|
|
149
|
+
priceRange: {
|
|
150
|
+
min: number;
|
|
151
|
+
max: number;
|
|
152
|
+
};
|
|
153
|
+
discountRange: {
|
|
154
|
+
min: number;
|
|
155
|
+
max: number;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
/** Errors encountered */
|
|
159
|
+
errors?: {
|
|
160
|
+
url: string;
|
|
161
|
+
error: string;
|
|
162
|
+
}[];
|
|
163
|
+
}
|
|
164
|
+
export interface SiteConfig {
|
|
165
|
+
/** Which scraping engine to use */
|
|
166
|
+
engine: "static" | "dynamic" | "stealth";
|
|
167
|
+
/** CSS selectors for data extraction */
|
|
168
|
+
selectors?: {
|
|
169
|
+
price?: string;
|
|
170
|
+
originalPrice?: string;
|
|
171
|
+
title?: string;
|
|
172
|
+
description?: string;
|
|
173
|
+
image?: string;
|
|
174
|
+
discount?: string;
|
|
175
|
+
rating?: string;
|
|
176
|
+
reviewCount?: string;
|
|
177
|
+
};
|
|
178
|
+
/** For dynamic scraper: element to wait for */
|
|
179
|
+
waitFor?: string;
|
|
180
|
+
/** Rate limiting configuration */
|
|
181
|
+
rateLimit?: {
|
|
182
|
+
requests: number;
|
|
183
|
+
perSeconds: number;
|
|
184
|
+
};
|
|
185
|
+
/** Custom headers to send */
|
|
186
|
+
headers?: Record<string, string>;
|
|
187
|
+
/** Patterns to prioritize when crawling this site */
|
|
188
|
+
priorityPatterns?: string[];
|
|
189
|
+
/** Patterns to exclude */
|
|
190
|
+
excludePatterns?: string[];
|
|
191
|
+
}
|
|
192
|
+
export interface ScoredUrl {
|
|
193
|
+
url: string;
|
|
194
|
+
depth: number;
|
|
195
|
+
score: number;
|
|
196
|
+
reason?: string;
|
|
197
|
+
}
|
|
198
|
+
export interface UrlScoreFactors {
|
|
199
|
+
/** Base score for this URL pattern */
|
|
200
|
+
baseScore: number;
|
|
201
|
+
/** Boost for deal-related paths */
|
|
202
|
+
dealPathBoost: number;
|
|
203
|
+
/** Boost for product-related paths */
|
|
204
|
+
productPathBoost: number;
|
|
205
|
+
/** Penalty for non-content paths */
|
|
206
|
+
nonContentPenalty: number;
|
|
207
|
+
/** Depth penalty per level */
|
|
208
|
+
depthPenalty: number;
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=deal.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deal.types.d.ts","sourceRoot":"","sources":["../../../../../shared/src/types/deal.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,gBAAgB,CAAC;AAMzD,MAAM,WAAW,UAAW,SAAQ,MAAM;IACxC,IAAI,EACA,OAAO,GACP,gBAAgB,GAChB,UAAU,GACV,iBAAiB,GACjB,gBAAgB,GAChB,YAAY,GACZ,eAAe,GACf,eAAe,CAAC;CACrB;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC;IACjC,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,SAAS,GAAG,S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AC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAMD,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAElB,mCAAmC;IACnC,aAAa,EAAE,MAAM,CAAC;IAEtB,sCAAsC;IACtC,gBAAgB,EAAE,MAAM,CAAC;IAEzB,oCAAoC;IACpC,iBAAiB,EAAE,MAAM,CAAC;IAE1B,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deal.types.js","sourceRoot":"","sources":["../../../../../shared/src/types/deal.types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface DorkOptions {
|
|
2
|
+
query: string;
|
|
3
|
+
site?: string;
|
|
4
|
+
fileType?: string;
|
|
5
|
+
inUrl?: string;
|
|
6
|
+
inTitle?: string;
|
|
7
|
+
maxResults?: number;
|
|
8
|
+
region?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DorkResult {
|
|
11
|
+
query: string;
|
|
12
|
+
site?: string;
|
|
13
|
+
results: DorkSearchResult[];
|
|
14
|
+
totalResults?: number;
|
|
15
|
+
searchedAt: string;
|
|
16
|
+
}
|
|
17
|
+
export interface DorkSearchResult {
|
|
18
|
+
url: string;
|
|
19
|
+
title: string;
|
|
20
|
+
snippet: string;
|
|
21
|
+
position: number;
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
export type DorkOperator = "site" | "filetype" | "inurl" | "intitle" | "intext" | "cache" | "related" | "info";
|
|
25
|
+
export interface DorkQuery {
|
|
26
|
+
operator: DorkOperator;
|
|
27
|
+
value: string;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=dork.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dork.types.d.ts","sourceRoot":"","sources":["../../../../../shared/src/types/dork.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,UAAU,GACV,OAAO,GACP,SAAS,GACT,QAAQ,GACR,OAAO,GACP,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dork.types.js","sourceRoot":"","sources":["../../../../../shared/src/types/dork.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./scrape.types";
|
|
2
|
+
export * from "./crawl.types";
|
|
3
|
+
export * from "./dork.types";
|
|
4
|
+
export * from "./api.types";
|
|
5
|
+
export * from "./client.types";
|
|
6
|
+
export * from "./deal.types";
|
|
7
|
+
export * from "./api-key.types";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../shared/src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Type exports
|
|
2
|
+
export * from "./scrape.types";
|
|
3
|
+
export * from "./crawl.types";
|
|
4
|
+
export * from "./dork.types";
|
|
5
|
+
export * from "./api.types";
|
|
6
|
+
export * from "./client.types";
|
|
7
|
+
export * from "./deal.types";
|
|
8
|
+
export * from "./api-key.types";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../shared/src/types/index.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|