@plyaz/api 1.3.0 → 1.4.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.
Files changed (55) hide show
  1. package/dist/api/endpoints/cdn.d.ts +122 -0
  2. package/dist/api/endpoints/cdn.d.ts.map +1 -0
  3. package/dist/api/endpoints/index.d.ts +34 -4
  4. package/dist/api/endpoints/index.d.ts.map +1 -1
  5. package/dist/api/endpoints/virustotal.d.ts +91 -0
  6. package/dist/api/endpoints/virustotal.d.ts.map +1 -0
  7. package/dist/api/services/cdn/cloudflare/POST/cloudflarePurgeCache.d.ts +35 -0
  8. package/dist/api/services/cdn/cloudflare/POST/cloudflarePurgeCache.d.ts.map +1 -0
  9. package/dist/api/services/cdn/cloudflare/POST/index.d.ts +5 -0
  10. package/dist/api/services/cdn/cloudflare/POST/index.d.ts.map +1 -0
  11. package/dist/api/services/cdn/cloudflare/index.d.ts +5 -0
  12. package/dist/api/services/cdn/cloudflare/index.d.ts.map +1 -0
  13. package/dist/api/services/cdn/cloudfront/POST/cloudFrontCreateInvalidation.d.ts +38 -0
  14. package/dist/api/services/cdn/cloudfront/POST/cloudFrontCreateInvalidation.d.ts.map +1 -0
  15. package/dist/api/services/cdn/cloudfront/POST/index.d.ts +5 -0
  16. package/dist/api/services/cdn/cloudfront/POST/index.d.ts.map +1 -0
  17. package/dist/api/services/cdn/cloudfront/index.d.ts +5 -0
  18. package/dist/api/services/cdn/cloudfront/index.d.ts.map +1 -0
  19. package/dist/api/services/cdn/fastly/POST/fastlyPurgeUrl.d.ts +35 -0
  20. package/dist/api/services/cdn/fastly/POST/fastlyPurgeUrl.d.ts.map +1 -0
  21. package/dist/api/services/cdn/fastly/POST/index.d.ts +5 -0
  22. package/dist/api/services/cdn/fastly/POST/index.d.ts.map +1 -0
  23. package/dist/api/services/cdn/fastly/index.d.ts +5 -0
  24. package/dist/api/services/cdn/fastly/index.d.ts.map +1 -0
  25. package/dist/api/services/cdn/index.d.ts +8 -0
  26. package/dist/api/services/cdn/index.d.ts.map +1 -0
  27. package/dist/api/services/index.d.ts +2 -0
  28. package/dist/api/services/index.d.ts.map +1 -1
  29. package/dist/api/services/virustotal/analyses/GET/getAnalysisResult.d.ts +35 -0
  30. package/dist/api/services/virustotal/analyses/GET/getAnalysisResult.d.ts.map +1 -0
  31. package/dist/api/services/virustotal/analyses/GET/index.d.ts +6 -0
  32. package/dist/api/services/virustotal/analyses/GET/index.d.ts.map +1 -0
  33. package/dist/api/services/virustotal/analyses/index.d.ts +6 -0
  34. package/dist/api/services/virustotal/analyses/index.d.ts.map +1 -0
  35. package/dist/api/services/virustotal/files/POST/index.d.ts +6 -0
  36. package/dist/api/services/virustotal/files/POST/index.d.ts.map +1 -0
  37. package/dist/api/services/virustotal/files/POST/uploadFileForScanning.d.ts +36 -0
  38. package/dist/api/services/virustotal/files/POST/uploadFileForScanning.d.ts.map +1 -0
  39. package/dist/api/services/virustotal/files/index.d.ts +6 -0
  40. package/dist/api/services/virustotal/files/index.d.ts.map +1 -0
  41. package/dist/api/services/virustotal/index.d.ts +8 -0
  42. package/dist/api/services/virustotal/index.d.ts.map +1 -0
  43. package/dist/api/utils/aws/index.d.ts +7 -0
  44. package/dist/api/utils/aws/index.d.ts.map +1 -0
  45. package/dist/api/utils/aws/signature-v4.d.ts +41 -0
  46. package/dist/api/utils/aws/signature-v4.d.ts.map +1 -0
  47. package/dist/api/utils/aws/xml/cloudfront.d.ts +37 -0
  48. package/dist/api/utils/aws/xml/cloudfront.d.ts.map +1 -0
  49. package/dist/api/utils/aws/xml/index.d.ts +6 -0
  50. package/dist/api/utils/aws/xml/index.d.ts.map +1 -0
  51. package/dist/index.cjs +475 -8
  52. package/dist/index.cjs.map +1 -1
  53. package/dist/index.mjs +446 -8
  54. package/dist/index.mjs.map +1 -1
  55. package/package.json +5 -5
@@ -0,0 +1,122 @@
1
+ /**
2
+ * CDN Provider API Endpoints Configuration
3
+ * Cloudflare, AWS CloudFront, and Fastly CDN cache invalidation endpoints
4
+ *
5
+ * Third-party providers for CDN cache management
6
+ * Supports: Cache purging/invalidation, health checks
7
+ */
8
+ /**
9
+ * Cloudflare CDN endpoints - Zone-based cache purging
10
+ * API v4 for cache management
11
+ * @see https://developers.cloudflare.com/api/operations/zone-purge
12
+ */
13
+ export declare const cloudflareEndpoints: {
14
+ /**
15
+ * POST /zones/{zoneId}/purge_cache - Purge files from cache
16
+ * Purge specific files or all files in a zone
17
+ * Rate limits may change; see official documentation for current limits:
18
+ * https://developers.cloudflare.com/api/operations/zone-purge#rate-limits
19
+ *
20
+ * @param {string} zoneId - Cloudflare Zone ID
21
+ * @returns {object} response - Purge result with success status
22
+ */
23
+ readonly cloudflarePurgeCache: {
24
+ readonly url: "/zones/:zoneId/purge_cache";
25
+ readonly method: "POST";
26
+ readonly cacheTime: 0;
27
+ };
28
+ };
29
+ /**
30
+ * AWS CloudFront endpoints - Distribution-based invalidation
31
+ * REST API for cache invalidation
32
+ * @see https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateInvalidation.html
33
+ */
34
+ export declare const cloudFrontEndpoints: {
35
+ /**
36
+ * POST /{apiVersion}/distribution/{distributionId}/invalidation - Create invalidation
37
+ * Creates an invalidation batch for specified paths
38
+ * Rate limits may change; see the official AWS documentation for current limits:
39
+ * https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html
40
+ * Requires AWS Signature Version 4 authentication
41
+ *
42
+ * @param {string} distributionId - CloudFront Distribution ID
43
+ * @returns {object} response - Invalidation result with ID and status
44
+ */
45
+ readonly cloudFrontCreateInvalidation: {
46
+ readonly url: "/2020-05-31/distribution/:distributionId/invalidation";
47
+ readonly method: "POST";
48
+ readonly cacheTime: 0;
49
+ };
50
+ };
51
+ /**
52
+ * Fastly CDN endpoints - URL-based purging
53
+ * API for instant cache purging
54
+ * @see https://developer.fastly.com/reference/api/purging/
55
+ */
56
+ export declare const fastlyEndpoints: {
57
+ /**
58
+ * POST /service/{serviceId}/purge/{url} - Purge single URL
59
+ * Instant soft-purge of specific URL
60
+ * Rate limit: Unlimited soft-purges. Hard-purges are limited to 1000 requests per hour per service (as of 2024-06). See Fastly documentation for updates:
61
+ * @see https://developer.fastly.com/reference/api/purging/#rate-limits
62
+ *
63
+ * @param {string} serviceId - Fastly Service ID
64
+ * @param {string} url - URL to purge (URL-encoded)
65
+ * @returns {object} response - Purge result with status
66
+ */
67
+ readonly fastlyPurgeUrl: {
68
+ readonly url: "/service/:serviceId/purge/:url";
69
+ readonly method: "POST";
70
+ readonly cacheTime: 0;
71
+ };
72
+ };
73
+ /**
74
+ * ALL CDN endpoints combined
75
+ */
76
+ export declare const cdnEndpoints: {
77
+ /**
78
+ * POST /service/{serviceId}/purge/{url} - Purge single URL
79
+ * Instant soft-purge of specific URL
80
+ * Rate limit: Unlimited soft-purges. Hard-purges are limited to 1000 requests per hour per service (as of 2024-06). See Fastly documentation for updates:
81
+ * @see https://developer.fastly.com/reference/api/purging/#rate-limits
82
+ *
83
+ * @param {string} serviceId - Fastly Service ID
84
+ * @param {string} url - URL to purge (URL-encoded)
85
+ * @returns {object} response - Purge result with status
86
+ */
87
+ readonly fastlyPurgeUrl: {
88
+ readonly url: "/service/:serviceId/purge/:url";
89
+ readonly method: "POST";
90
+ readonly cacheTime: 0;
91
+ };
92
+ /**
93
+ * POST /{apiVersion}/distribution/{distributionId}/invalidation - Create invalidation
94
+ * Creates an invalidation batch for specified paths
95
+ * Rate limits may change; see the official AWS documentation for current limits:
96
+ * https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html
97
+ * Requires AWS Signature Version 4 authentication
98
+ *
99
+ * @param {string} distributionId - CloudFront Distribution ID
100
+ * @returns {object} response - Invalidation result with ID and status
101
+ */
102
+ readonly cloudFrontCreateInvalidation: {
103
+ readonly url: "/2020-05-31/distribution/:distributionId/invalidation";
104
+ readonly method: "POST";
105
+ readonly cacheTime: 0;
106
+ };
107
+ /**
108
+ * POST /zones/{zoneId}/purge_cache - Purge files from cache
109
+ * Purge specific files or all files in a zone
110
+ * Rate limits may change; see official documentation for current limits:
111
+ * https://developers.cloudflare.com/api/operations/zone-purge#rate-limits
112
+ *
113
+ * @param {string} zoneId - Cloudflare Zone ID
114
+ * @returns {object} response - Purge result with success status
115
+ */
116
+ readonly cloudflarePurgeCache: {
117
+ readonly url: "/zones/:zoneId/purge_cache";
118
+ readonly method: "POST";
119
+ readonly cacheTime: 0;
120
+ };
121
+ };
122
+ //# sourceMappingURL=cdn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdn.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/cdn.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;;;;;;;OAQG;;;;;;CAMK,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;;;;;;;;OASG;;;;;;CAMK,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,eAAe;IAC1B;;;;;;;;;OASG;;;;;;CAMK,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY;IApBvB;;;;;;;;;OASG;;;;;;IAhCH;;;;;;;;;OASG;;;;;;IA/BH;;;;;;;;OAQG;;;;;;CA6DK,CAAC"}
@@ -2,13 +2,41 @@
2
2
  * Combined Endpoints Configuration
3
3
  * Aggregates all endpoint configurations with their types
4
4
  */
5
- import { campaignEndpoints } from './campaigns';
6
- import { pollingEndpoints } from './polling';
7
5
  /**
8
6
  * All API endpoints combined
9
7
  * This is passed to createApiClient to generate endpoint methods
10
8
  */
11
9
  export declare const endpoints: {
10
+ readonly fastlyPurgeUrl: {
11
+ readonly url: "/service/:serviceId/purge/:url";
12
+ readonly method: "POST";
13
+ readonly cacheTime: 0;
14
+ };
15
+ readonly cloudFrontCreateInvalidation: {
16
+ readonly url: "/2020-05-31/distribution/:distributionId/invalidation";
17
+ readonly method: "POST";
18
+ readonly cacheTime: 0;
19
+ };
20
+ readonly cloudflarePurgeCache: {
21
+ readonly url: "/zones/:zoneId/purge_cache";
22
+ readonly method: "POST";
23
+ readonly cacheTime: 0;
24
+ };
25
+ readonly uploadFileForScanning: {
26
+ readonly url: "/files";
27
+ readonly method: "POST";
28
+ };
29
+ readonly getAnalysisResult: {
30
+ readonly url: "/analyses/:id";
31
+ readonly method: "GET";
32
+ readonly cacheTime: 0;
33
+ };
34
+ readonly getApiVersion: {
35
+ readonly url: "/version";
36
+ readonly method: "GET";
37
+ readonly cacheTime: 300;
38
+ readonly staleTime: 600;
39
+ };
12
40
  readonly sendEmail: {
13
41
  readonly url: "/email/3/send";
14
42
  readonly method: "POST";
@@ -144,9 +172,11 @@ export type EndpointsList = typeof endpoints;
144
172
  /**
145
173
  * Export individual endpoint groups for selective imports
146
174
  */
147
- export { campaignEndpoints };
148
- export { pollingEndpoints };
175
+ export { campaignEndpoints } from './campaigns';
176
+ export { pollingEndpoints } from './polling';
149
177
  export { infobipEndpoints, infobipEmailEndpoints } from './infobip';
178
+ export { virusTotalEndpoints } from './virustotal';
179
+ export { cdnEndpoints, cloudflareEndpoints, cloudFrontEndpoints, fastlyEndpoints } from './cdn';
150
180
  /**
151
181
  * Export endpoint utilities
152
182
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMZ,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC;AAE7C;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEpE;;GAEG;AACH,OAAO,EAEL,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,QAAQ,EACR,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAEL,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,GACnB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;GAGG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYZ,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC;AAE7C;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAEhG;;GAEG;AACH,OAAO,EAEL,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,QAAQ,EACR,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAEL,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,GACnB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * VirusTotal API Endpoints Configuration
3
+ * Malware and virus scanning endpoints for file security
4
+ *
5
+ * Third-party provider for virus/malware scanning
6
+ * Supports: File upload, analysis retrieval, health checks
7
+ *
8
+ * @see https://developers.virustotal.com/reference/overview
9
+ */
10
+ /**
11
+ * VirusTotal endpoints - File scanning and analysis
12
+ * API v3 for virus/malware detection
13
+ */
14
+ export declare const virusTotalEndpoints: {
15
+ /**
16
+ * POST /files - Upload file for scanning
17
+ * Multipart/form-data with file attachment
18
+ * See official documentation for current free tier limits:
19
+ * https://developers.virustotal.com/reference/overview#public-vs-premium-api
20
+ *
21
+ * @returns {object} response - Upload response with analysis ID
22
+ * @returns {string} response.data.id - Analysis ID for polling results
23
+ */
24
+ readonly uploadFileForScanning: {
25
+ readonly url: "/files";
26
+ readonly method: "POST";
27
+ };
28
+ /**
29
+ * GET /analyses/{id} - Get analysis result
30
+ * Retrieve scan results for previously uploaded file
31
+ *
32
+ * @param {string} id - Analysis ID from upload response
33
+ * @returns {object} response - Analysis result with threat details
34
+ */
35
+ readonly getAnalysisResult: {
36
+ readonly url: "/analyses/:id";
37
+ readonly method: "GET";
38
+ readonly cacheTime: 0;
39
+ };
40
+ /**
41
+ * GET /version - Get API version info (health check)
42
+ * Simple endpoint to verify API availability
43
+ */
44
+ readonly getApiVersion: {
45
+ readonly url: "/version";
46
+ readonly method: "GET";
47
+ readonly cacheTime: 300;
48
+ readonly staleTime: 600;
49
+ };
50
+ };
51
+ /**
52
+ * ALL VirusTotal endpoints
53
+ */
54
+ export declare const virusTotal: {
55
+ /**
56
+ * POST /files - Upload file for scanning
57
+ * Multipart/form-data with file attachment
58
+ * See official documentation for current free tier limits:
59
+ * https://developers.virustotal.com/reference/overview#public-vs-premium-api
60
+ *
61
+ * @returns {object} response - Upload response with analysis ID
62
+ * @returns {string} response.data.id - Analysis ID for polling results
63
+ */
64
+ readonly uploadFileForScanning: {
65
+ readonly url: "/files";
66
+ readonly method: "POST";
67
+ };
68
+ /**
69
+ * GET /analyses/{id} - Get analysis result
70
+ * Retrieve scan results for previously uploaded file
71
+ *
72
+ * @param {string} id - Analysis ID from upload response
73
+ * @returns {object} response - Analysis result with threat details
74
+ */
75
+ readonly getAnalysisResult: {
76
+ readonly url: "/analyses/:id";
77
+ readonly method: "GET";
78
+ readonly cacheTime: 0;
79
+ };
80
+ /**
81
+ * GET /version - Get API version info (health check)
82
+ * Simple endpoint to verify API availability
83
+ */
84
+ readonly getApiVersion: {
85
+ readonly url: "/version";
86
+ readonly method: "GET";
87
+ readonly cacheTime: 300;
88
+ readonly staleTime: 600;
89
+ };
90
+ };
91
+ //# sourceMappingURL=virustotal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virustotal.d.ts","sourceRoot":"","sources":["../../../src/api/endpoints/virustotal.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IAG9B;;;;;;;;OAQG;;;;;IAMH;;;;;;OAMG;;;;;;IASH;;;OAGG;;;;;;;CAOK,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU;IA5CrB;;;;;;;;OAQG;;;;;IAMH;;;;;;OAMG;;;;;;IASH;;;OAGG;;;;;;;CAcK,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Purge Cloudflare CDN Cache
3
+ * Purges specific URLs from Cloudflare CDN cache
4
+ *
5
+ * @see https://developers.cloudflare.com/api/operations/zone-purge
6
+ */
7
+ import type { ServiceOptions } from '@plyaz/types/api';
8
+ import type { EndpointsList } from '@/api/endpoints';
9
+ import type { FetchResponse } from 'fetchff';
10
+ import type { CloudflarePurgeCacheRequest, CloudflarePurgeCacheResponse } from '@plyaz/types/api';
11
+ /**
12
+ * Purge cache for specific URLs from Cloudflare
13
+ * Uses endpoint: POST /zones/{zoneId}/purge_cache
14
+ *
15
+ * @param payload - Cache purge request with zone ID and file URLs
16
+ * @param options - Optional service options (client override, config overrides)
17
+ * @returns Promise<FetchResponse> with CloudflarePurgeCacheResponse
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * import { cloudflarePurgeCache } from '@plyaz/api/services';
22
+ *
23
+ * const result = await cloudflarePurgeCache({
24
+ * zoneId: 'abc123...',
25
+ * apiToken: process.env.CLOUDFLARE_API_TOKEN!,
26
+ * files: ['https://example.com/image.jpg', 'https://example.com/style.css'],
27
+ * });
28
+ *
29
+ * console.log('Purge successful:', result.data.success);
30
+ * ```
31
+ *
32
+ * @throws {ApiPackageError} When the request fails or validation errors occur
33
+ */
34
+ export declare function cloudflarePurgeCache<TEndpoints = EndpointsList>(payload: CloudflarePurgeCacheRequest, options?: ServiceOptions<TEndpoints>): Promise<FetchResponse<CloudflarePurgeCacheResponse>>;
35
+ //# sourceMappingURL=cloudflarePurgeCache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudflarePurgeCache.d.ts","sourceRoot":"","sources":["../../../../../../src/api/services/cdn/cloudflare/POST/cloudflarePurgeCache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAElG;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,wBAAsB,oBAAoB,CAAC,UAAU,GAAG,aAAa,EACnE,OAAO,EAAE,2BAA2B,EACpC,OAAO,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,OAAO,CAAC,aAAa,CAAC,4BAA4B,CAAC,CAAC,CAuDtD"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Cloudflare POST Services
3
+ */
4
+ export { cloudflarePurgeCache } from './cloudflarePurgeCache';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/services/cdn/cloudflare/POST/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Cloudflare Services
3
+ */
4
+ export { cloudflarePurgeCache } from './POST';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/services/cdn/cloudflare/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Create CloudFront Invalidation
3
+ * Creates an invalidation batch for AWS CloudFront distribution via REST API
4
+ *
5
+ * Uses AWS CloudFront REST API with AWS Signature Version 4 authentication
6
+ * @see https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateInvalidation.html
7
+ */
8
+ import type { ServiceOptions } from '@plyaz/types/api';
9
+ import type { EndpointsList } from '@/api/endpoints';
10
+ import type { FetchResponse } from 'fetchff';
11
+ import type { CloudFrontInvalidationRequest, CloudFrontInvalidationResponse } from '@plyaz/types/api';
12
+ /**
13
+ * Create CloudFront invalidation
14
+ * Uses REST API with AWS Signature V4 authentication
15
+ *
16
+ * @param payload - Invalidation request with distribution ID, credentials, and paths
17
+ * @param options - Optional service options
18
+ * @returns Promise with CloudFrontInvalidationResponse
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * import { cloudFrontCreateInvalidation } from '@plyaz/api/services';
23
+ *
24
+ * const result = await cloudFrontCreateInvalidation({
25
+ * distributionId: 'E1234ABCDEFG',
26
+ * accessKeyId: process.env.AWS_ACCESS_KEY_ID!,
27
+ * secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY!,
28
+ * region: 'us-east-1',
29
+ * paths: ['/image.jpg', '/style.css'],
30
+ * });
31
+ *
32
+ * console.log('Invalidation ID:', result.data.Invalidation?.Id);
33
+ * ```
34
+ *
35
+ * @throws {ApiPackageError} When the request fails or validation errors occur
36
+ */
37
+ export declare function cloudFrontCreateInvalidation<TEndpoints = EndpointsList>(payload: CloudFrontInvalidationRequest, options?: ServiceOptions<TEndpoints>): Promise<FetchResponse<CloudFrontInvalidationResponse>>;
38
+ //# sourceMappingURL=cloudFrontCreateInvalidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudFrontCreateInvalidation.d.ts","sourceRoot":"","sources":["../../../../../../src/api/services/cdn/cloudfront/POST/cloudFrontCreateInvalidation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EACV,6BAA6B,EAC7B,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAO1B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,wBAAsB,4BAA4B,CAAC,UAAU,GAAG,aAAa,EAC3E,OAAO,EAAE,6BAA6B,EACtC,OAAO,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,OAAO,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAC,CAsFxD"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * CloudFront POST Services
3
+ */
4
+ export { cloudFrontCreateInvalidation } from './cloudFrontCreateInvalidation';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/services/cdn/cloudfront/POST/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * CloudFront Services
3
+ */
4
+ export { cloudFrontCreateInvalidation } from './POST';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/services/cdn/cloudfront/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Purge Fastly CDN URL
3
+ * Purges a specific URL from Fastly CDN cache
4
+ *
5
+ * @see https://developer.fastly.com/reference/api/purging/
6
+ */
7
+ import type { ServiceOptions } from '@plyaz/types/api';
8
+ import type { EndpointsList } from '@/api/endpoints';
9
+ import type { FetchResponse } from 'fetchff';
10
+ import type { FastlyPurgeUrlRequest, FastlyPurgeUrlResponse } from '@plyaz/types/api';
11
+ /**
12
+ * Purge single URL from Fastly CDN
13
+ * Uses endpoint: POST /service/{serviceId}/purge/{url}
14
+ *
15
+ * @param payload - URL purge request with service ID and URL
16
+ * @param options - Optional service options (client override, config overrides)
17
+ * @returns Promise<FetchResponse> with FastlyPurgeUrlResponse
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * import { fastlyPurgeUrl } from '@plyaz/api/services';
22
+ *
23
+ * const result = await fastlyPurgeUrl({
24
+ * serviceId: 'ABC123',
25
+ * apiToken: process.env.FASTLY_API_TOKEN!,
26
+ * url: 'https://example.com/image.jpg',
27
+ * });
28
+ *
29
+ * console.log('Purge status:', result.data.status);
30
+ * ```
31
+ *
32
+ * @throws {ApiPackageError} When the request fails or validation errors occur
33
+ */
34
+ export declare function fastlyPurgeUrl<TEndpoints = EndpointsList>(payload: FastlyPurgeUrlRequest, options?: ServiceOptions<TEndpoints>): Promise<FetchResponse<FastlyPurgeUrlResponse>>;
35
+ //# sourceMappingURL=fastlyPurgeUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fastlyPurgeUrl.d.ts","sourceRoot":"","sources":["../../../../../../src/api/services/cdn/fastly/POST/fastlyPurgeUrl.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,wBAAsB,cAAc,CAAC,UAAU,GAAG,aAAa,EAC7D,OAAO,EAAE,qBAAqB,EAC9B,OAAO,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,OAAO,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC,CAqDhD"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Fastly POST Services
3
+ */
4
+ export { fastlyPurgeUrl } from './fastlyPurgeUrl';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/services/cdn/fastly/POST/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Fastly Services
3
+ */
4
+ export { fastlyPurgeUrl } from './POST';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/services/cdn/fastly/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * CDN Provider Services
3
+ * Aggregates all CDN cache invalidation services
4
+ */
5
+ export { cloudflarePurgeCache } from './cloudflare';
6
+ export { cloudFrontCreateInvalidation } from './cloudfront';
7
+ export { fastlyPurgeUrl } from './fastly';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/services/cdn/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
@@ -5,4 +5,6 @@
5
5
  export { setDefaultApiClient, getDefaultApiClient } from './clients';
6
6
  export * from './campaigns';
7
7
  export * from './infobip';
8
+ export * from './virustotal';
9
+ export * from './cdn';
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGrE,cAAc,aAAa,CAAC;AAG5B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGrE,cAAc,aAAa,CAAC;AAG5B,cAAc,WAAW,CAAC;AAG1B,cAAc,cAAc,CAAC;AAG7B,cAAc,OAAO,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Get Analysis Result from VirusTotal
3
+ * Retrieves virus scan results for a previously uploaded file
4
+ *
5
+ * @see https://developers.virustotal.com/reference/analysis
6
+ */
7
+ import type { ServiceOptions } from '@plyaz/types/api';
8
+ import type { EndpointsList } from '@/api/endpoints';
9
+ import type { FetchResponse } from 'fetchff';
10
+ import type { VirusTotalGetAnalysisRequest } from '@plyaz/types/api';
11
+ /**
12
+ * Get analysis result from VirusTotal
13
+ * Uses endpoint: GET /analyses/:id
14
+ *
15
+ * @param payload - Analysis request payload
16
+ * @param options - Optional service options (client override, config overrides)
17
+ * @returns Promise<FetchResponse> with VirusTotalAnalysisResponse
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * import { getAnalysisResult } from '@plyaz/api/services';
22
+ *
23
+ * const result = await getAnalysisResult({
24
+ * analysisId: 'ZmY4ZjY4ZjY4ZjY4ZjY4ZjY4ZjY4ZjY4ZjY4ZjY4ZjY4ZjY4',
25
+ * });
26
+ *
27
+ * if (result.data.data.attributes.status === 'completed') {
28
+ * console.log('Malicious engines:', result.data.data.attributes.stats.malicious);
29
+ * }
30
+ * ```
31
+ *
32
+ * @throws {ApiPackageError} When the request fails or validation errors occur
33
+ */
34
+ export declare function getAnalysisResult<TEndpoints = EndpointsList>(payload: VirusTotalGetAnalysisRequest, options?: ServiceOptions<TEndpoints>): Promise<FetchResponse>;
35
+ //# sourceMappingURL=getAnalysisResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAnalysisResult.d.ts","sourceRoot":"","sources":["../../../../../../src/api/services/virustotal/analyses/GET/getAnalysisResult.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,iBAAiB,CAAC,UAAU,GAAG,aAAa,EAChE,OAAO,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,OAAO,CAAC,aAAa,CAAC,CAgCxB"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * VirusTotal Analyses GET Services
3
+ * Exports all GET-based analysis services
4
+ */
5
+ export { getAnalysisResult } from './getAnalysisResult';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/services/virustotal/analyses/GET/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * VirusTotal Analyses Services
3
+ * Aggregates all analysis-related services
4
+ */
5
+ export { getAnalysisResult } from './GET';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/services/virustotal/analyses/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * VirusTotal Files POST Services
3
+ * Exports all POST-based file services
4
+ */
5
+ export { uploadFileForScanning } from './uploadFileForScanning';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/services/virustotal/files/POST/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Upload File for Virus Scanning via VirusTotal
3
+ * Uploads a file to VirusTotal for malware/virus analysis
4
+ *
5
+ * @see https://developers.virustotal.com/reference/files-scan
6
+ */
7
+ import type { ServiceOptions } from '@plyaz/types/api';
8
+ import type { EndpointsList } from '@/api/endpoints';
9
+ import type { FetchResponse } from 'fetchff';
10
+ import type { VirusTotalUploadFileRequest } from '@plyaz/types/api';
11
+ /**
12
+ * Upload file to VirusTotal for scanning
13
+ * Uses endpoint: POST /files
14
+ *
15
+ * @param payload - File upload request payload
16
+ * @param options - Optional service options (client override, config overrides)
17
+ * @returns Promise<FetchResponse> with VirusTotalUploadResponse
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * import { uploadFileForScanning } from '@plyaz/api/services';
22
+ *
23
+ * const fileBuffer = fs.readFileSync('suspicious-file.exe');
24
+ *
25
+ * const result = await uploadFileForScanning({
26
+ * file: fileBuffer,
27
+ * filename: 'suspicious-file.exe',
28
+ * });
29
+ *
30
+ * console.log('Analysis ID:', result.data.data.id);
31
+ * ```
32
+ *
33
+ * @throws {ApiPackageError} When the request fails or validation errors occur
34
+ */
35
+ export declare function uploadFileForScanning<TEndpoints = EndpointsList>(payload: VirusTotalUploadFileRequest, options?: ServiceOptions<TEndpoints>): Promise<FetchResponse>;
36
+ //# sourceMappingURL=uploadFileForScanning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploadFileForScanning.d.ts","sourceRoot":"","sources":["../../../../../../src/api/services/virustotal/files/POST/uploadFileForScanning.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,wBAAsB,qBAAqB,CAAC,UAAU,GAAG,aAAa,EACpE,OAAO,EAAE,2BAA2B,EACpC,OAAO,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,OAAO,CAAC,aAAa,CAAC,CAsDxB"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * VirusTotal Files Services
3
+ * Aggregates all file-related services
4
+ */
5
+ export { uploadFileForScanning } from './POST';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/services/virustotal/files/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * VirusTotal Services
3
+ * Third-party virus/malware scanning services
4
+ * Aggregates all VirusTotal API services
5
+ */
6
+ export { uploadFileForScanning } from './files';
7
+ export { getAnalysisResult } from './analyses';
8
+ //# sourceMappingURL=index.d.ts.map