@decaf-ts/integrations 0.1.3 → 0.1.4

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 (172) hide show
  1. package/dist/integrations.cjs +1 -1
  2. package/docker/azure-blob-compose.yml +21 -0
  3. package/docker/gcs-blob-compose.yml +21 -0
  4. package/docker/ipfs-compose.yml +25 -0
  5. package/docker/minio-compose.yml +25 -0
  6. package/lib/cjs/blob/azure/AzureBlobStoreService.cjs +293 -0
  7. package/lib/cjs/blob/azure/AzureBlobStoreService.cjs.map +1 -0
  8. package/lib/cjs/blob/azure/index.cjs +24 -0
  9. package/lib/cjs/blob/azure/index.cjs.map +1 -0
  10. package/lib/cjs/blob/core/BlobErrors.cjs +74 -0
  11. package/lib/cjs/blob/core/BlobErrors.cjs.map +1 -0
  12. package/lib/cjs/blob/core/BlobKey.cjs +37 -0
  13. package/lib/cjs/blob/core/BlobKey.cjs.map +1 -0
  14. package/lib/cjs/blob/core/BlobStoreFactory.cjs +57 -0
  15. package/lib/cjs/blob/core/BlobStoreFactory.cjs.map +1 -0
  16. package/lib/cjs/blob/core/BlobStoreService.cjs +42 -0
  17. package/lib/cjs/blob/core/BlobStoreService.cjs.map +1 -0
  18. package/lib/cjs/blob/core/BlobTypes.cjs +4 -0
  19. package/lib/cjs/blob/core/BlobTypes.cjs.map +1 -0
  20. package/lib/cjs/blob/core/BlobValue.cjs +72 -0
  21. package/lib/cjs/blob/core/BlobValue.cjs.map +1 -0
  22. package/lib/cjs/blob/core/index.cjs +29 -0
  23. package/lib/cjs/blob/core/index.cjs.map +1 -0
  24. package/lib/cjs/blob/gcp/GcsBlobStoreService.cjs +272 -0
  25. package/lib/cjs/blob/gcp/GcsBlobStoreService.cjs.map +1 -0
  26. package/lib/cjs/blob/gcp/index.cjs +24 -0
  27. package/lib/cjs/blob/gcp/index.cjs.map +1 -0
  28. package/lib/cjs/blob/index.cjs +25 -0
  29. package/lib/cjs/blob/index.cjs.map +1 -0
  30. package/lib/cjs/blob/ipfs/IpfsBlobStoreService.cjs +182 -0
  31. package/lib/cjs/blob/ipfs/IpfsBlobStoreService.cjs.map +1 -0
  32. package/lib/cjs/blob/ipfs/IpfsKeyIndex.cjs +27 -0
  33. package/lib/cjs/blob/ipfs/IpfsKeyIndex.cjs.map +1 -0
  34. package/lib/cjs/blob/ipfs/LocalJsonIpfsKeyIndex.cjs +35 -0
  35. package/lib/cjs/blob/ipfs/LocalJsonIpfsKeyIndex.cjs.map +1 -0
  36. package/lib/cjs/blob/ipfs/MemoryIpfsKeyIndex.cjs +45 -0
  37. package/lib/cjs/blob/ipfs/MemoryIpfsKeyIndex.cjs.map +1 -0
  38. package/lib/cjs/blob/ipfs/PostgresIpfsKeyIndex.cjs +35 -0
  39. package/lib/cjs/blob/ipfs/PostgresIpfsKeyIndex.cjs.map +1 -0
  40. package/lib/cjs/blob/ipfs/index.cjs +28 -0
  41. package/lib/cjs/blob/ipfs/index.cjs.map +1 -0
  42. package/lib/cjs/blob/local/LocalBlobStoreService.cjs +288 -0
  43. package/lib/cjs/blob/local/LocalBlobStoreService.cjs.map +1 -0
  44. package/lib/cjs/blob/local/index.cjs +24 -0
  45. package/lib/cjs/blob/local/index.cjs.map +1 -0
  46. package/lib/cjs/blob/memory/MemoryBlobStoreService.cjs +146 -0
  47. package/lib/cjs/blob/memory/MemoryBlobStoreService.cjs.map +1 -0
  48. package/lib/cjs/blob/memory/index.cjs +24 -0
  49. package/lib/cjs/blob/memory/index.cjs.map +1 -0
  50. package/lib/cjs/blob/s3/MinioBlobStoreService.cjs +14 -0
  51. package/lib/cjs/blob/s3/MinioBlobStoreService.cjs.map +1 -0
  52. package/lib/cjs/blob/s3/R2BlobStoreService.cjs +14 -0
  53. package/lib/cjs/blob/s3/R2BlobStoreService.cjs.map +1 -0
  54. package/lib/cjs/blob/s3/S3BlobStoreService.cjs +322 -0
  55. package/lib/cjs/blob/s3/S3BlobStoreService.cjs.map +1 -0
  56. package/lib/cjs/blob/s3/index.cjs +26 -0
  57. package/lib/cjs/blob/s3/index.cjs.map +1 -0
  58. package/lib/cjs/docker/DockerComposeService.cjs +2 -2
  59. package/lib/cjs/docker/DockerComposeService.cjs.map +1 -1
  60. package/lib/cjs/index.cjs +3 -3
  61. package/lib/esm/blob/azure/AzureBlobStoreService.js +288 -0
  62. package/lib/esm/blob/azure/AzureBlobStoreService.js.map +1 -0
  63. package/lib/esm/blob/azure/index.js +7 -0
  64. package/lib/esm/blob/azure/index.js.map +1 -0
  65. package/lib/esm/blob/core/BlobErrors.js +61 -0
  66. package/lib/esm/blob/core/BlobErrors.js.map +1 -0
  67. package/lib/esm/blob/core/BlobKey.js +32 -0
  68. package/lib/esm/blob/core/BlobKey.js.map +1 -0
  69. package/lib/esm/blob/core/BlobStoreFactory.js +52 -0
  70. package/lib/esm/blob/core/BlobStoreFactory.js.map +1 -0
  71. package/lib/esm/blob/core/BlobStoreService.js +37 -0
  72. package/lib/esm/blob/core/BlobStoreService.js.map +1 -0
  73. package/lib/esm/blob/core/BlobTypes.js +2 -0
  74. package/lib/esm/blob/core/BlobTypes.js.map +1 -0
  75. package/lib/esm/blob/core/BlobValue.js +66 -0
  76. package/lib/esm/blob/core/BlobValue.js.map +1 -0
  77. package/lib/esm/blob/core/index.js +12 -0
  78. package/lib/esm/blob/core/index.js.map +1 -0
  79. package/lib/esm/blob/gcp/GcsBlobStoreService.js +267 -0
  80. package/lib/esm/blob/gcp/GcsBlobStoreService.js.map +1 -0
  81. package/lib/esm/blob/gcp/index.js +7 -0
  82. package/lib/esm/blob/gcp/index.js.map +1 -0
  83. package/lib/esm/blob/index.js +8 -0
  84. package/lib/esm/blob/index.js.map +1 -0
  85. package/lib/esm/blob/ipfs/IpfsBlobStoreService.js +177 -0
  86. package/lib/esm/blob/ipfs/IpfsBlobStoreService.js.map +1 -0
  87. package/lib/esm/blob/ipfs/IpfsKeyIndex.js +23 -0
  88. package/lib/esm/blob/ipfs/IpfsKeyIndex.js.map +1 -0
  89. package/lib/esm/blob/ipfs/LocalJsonIpfsKeyIndex.js +30 -0
  90. package/lib/esm/blob/ipfs/LocalJsonIpfsKeyIndex.js.map +1 -0
  91. package/lib/esm/blob/ipfs/MemoryIpfsKeyIndex.js +40 -0
  92. package/lib/esm/blob/ipfs/MemoryIpfsKeyIndex.js.map +1 -0
  93. package/lib/esm/blob/ipfs/PostgresIpfsKeyIndex.js +30 -0
  94. package/lib/esm/blob/ipfs/PostgresIpfsKeyIndex.js.map +1 -0
  95. package/lib/esm/blob/ipfs/index.js +11 -0
  96. package/lib/esm/blob/ipfs/index.js.map +1 -0
  97. package/lib/esm/blob/local/LocalBlobStoreService.js +283 -0
  98. package/lib/esm/blob/local/LocalBlobStoreService.js.map +1 -0
  99. package/lib/esm/blob/local/index.js +7 -0
  100. package/lib/esm/blob/local/index.js.map +1 -0
  101. package/lib/esm/blob/memory/MemoryBlobStoreService.js +141 -0
  102. package/lib/esm/blob/memory/MemoryBlobStoreService.js.map +1 -0
  103. package/lib/esm/blob/memory/index.js +7 -0
  104. package/lib/esm/blob/memory/index.js.map +1 -0
  105. package/lib/esm/blob/s3/MinioBlobStoreService.js +9 -0
  106. package/lib/esm/blob/s3/MinioBlobStoreService.js.map +1 -0
  107. package/lib/esm/blob/s3/R2BlobStoreService.js +9 -0
  108. package/lib/esm/blob/s3/R2BlobStoreService.js.map +1 -0
  109. package/lib/esm/blob/s3/S3BlobStoreService.js +317 -0
  110. package/lib/esm/blob/s3/S3BlobStoreService.js.map +1 -0
  111. package/lib/esm/blob/s3/index.js +9 -0
  112. package/lib/esm/blob/s3/index.js.map +1 -0
  113. package/lib/esm/docker/DockerComposeService.js +2 -2
  114. package/lib/esm/docker/DockerComposeService.js.map +1 -1
  115. package/lib/esm/index.js +3 -3
  116. package/lib/types/blob/azure/AzureBlobStoreService.d.cts +25 -0
  117. package/lib/types/blob/azure/AzureBlobStoreService.d.mts +25 -0
  118. package/lib/types/blob/azure/index.d.cts +6 -0
  119. package/lib/types/blob/azure/index.d.mts +6 -0
  120. package/lib/types/blob/core/BlobErrors.d.cts +14 -0
  121. package/lib/types/blob/core/BlobErrors.d.mts +14 -0
  122. package/lib/types/blob/core/BlobKey.d.cts +9 -0
  123. package/lib/types/blob/core/BlobKey.d.mts +9 -0
  124. package/lib/types/blob/core/BlobStoreFactory.d.cts +5 -0
  125. package/lib/types/blob/core/BlobStoreFactory.d.mts +5 -0
  126. package/lib/types/blob/core/BlobStoreService.d.cts +28 -0
  127. package/lib/types/blob/core/BlobStoreService.d.mts +28 -0
  128. package/lib/types/blob/core/BlobTypes.d.cts +122 -0
  129. package/lib/types/blob/core/BlobTypes.d.mts +122 -0
  130. package/lib/types/blob/core/BlobValue.d.cts +13 -0
  131. package/lib/types/blob/core/BlobValue.d.mts +13 -0
  132. package/lib/types/blob/core/index.d.cts +11 -0
  133. package/lib/types/blob/core/index.d.mts +11 -0
  134. package/lib/types/blob/gcp/GcsBlobStoreService.d.cts +25 -0
  135. package/lib/types/blob/gcp/GcsBlobStoreService.d.mts +25 -0
  136. package/lib/types/blob/gcp/index.d.cts +6 -0
  137. package/lib/types/blob/gcp/index.d.mts +6 -0
  138. package/lib/types/blob/index.d.cts +7 -0
  139. package/lib/types/blob/index.d.mts +7 -0
  140. package/lib/types/blob/ipfs/IpfsBlobStoreService.d.cts +26 -0
  141. package/lib/types/blob/ipfs/IpfsBlobStoreService.d.mts +26 -0
  142. package/lib/types/blob/ipfs/IpfsKeyIndex.d.cts +9 -0
  143. package/lib/types/blob/ipfs/IpfsKeyIndex.d.mts +9 -0
  144. package/lib/types/blob/ipfs/LocalJsonIpfsKeyIndex.d.cts +11 -0
  145. package/lib/types/blob/ipfs/LocalJsonIpfsKeyIndex.d.mts +11 -0
  146. package/lib/types/blob/ipfs/MemoryIpfsKeyIndex.d.cts +15 -0
  147. package/lib/types/blob/ipfs/MemoryIpfsKeyIndex.d.mts +15 -0
  148. package/lib/types/blob/ipfs/PostgresIpfsKeyIndex.d.cts +11 -0
  149. package/lib/types/blob/ipfs/PostgresIpfsKeyIndex.d.mts +11 -0
  150. package/lib/types/blob/ipfs/index.d.cts +10 -0
  151. package/lib/types/blob/ipfs/index.d.mts +10 -0
  152. package/lib/types/blob/local/LocalBlobStoreService.d.cts +30 -0
  153. package/lib/types/blob/local/LocalBlobStoreService.d.mts +30 -0
  154. package/lib/types/blob/local/index.d.cts +6 -0
  155. package/lib/types/blob/local/index.d.mts +6 -0
  156. package/lib/types/blob/memory/MemoryBlobStoreService.d.cts +28 -0
  157. package/lib/types/blob/memory/MemoryBlobStoreService.d.mts +28 -0
  158. package/lib/types/blob/memory/index.d.cts +6 -0
  159. package/lib/types/blob/memory/index.d.mts +6 -0
  160. package/lib/types/blob/s3/MinioBlobStoreService.d.cts +8 -0
  161. package/lib/types/blob/s3/MinioBlobStoreService.d.mts +8 -0
  162. package/lib/types/blob/s3/R2BlobStoreService.d.cts +8 -0
  163. package/lib/types/blob/s3/R2BlobStoreService.d.mts +8 -0
  164. package/lib/types/blob/s3/S3BlobStoreService.d.cts +25 -0
  165. package/lib/types/blob/s3/S3BlobStoreService.d.mts +25 -0
  166. package/lib/types/blob/s3/index.d.cts +8 -0
  167. package/lib/types/blob/s3/index.d.mts +8 -0
  168. package/lib/types/docker/DockerComposeService.d.cts +6 -0
  169. package/lib/types/docker/DockerComposeService.d.mts +6 -0
  170. package/lib/types/index.d.cts +2 -2
  171. package/lib/types/index.d.mts +2 -2
  172. package/package.json +88 -6
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @module integrations/blob/core/types
3
+ * @summary Blob core types.
4
+ * @description Shared payload, metadata, option, and configuration types for blob store service implementations.
5
+ */
6
+ export type BlobProvider = "s3" | "minio" | "r2" | "azure-blob" | "gcs" | "local" | "ipfs" | "memory";
7
+ export type BlobKey = string;
8
+ export type BlobValue = Uint8Array | Buffer | AsyncIterable<Uint8Array> | ReadableStream;
9
+ export interface BlobMetadata {
10
+ contentType?: string;
11
+ contentLength?: number;
12
+ sha256?: string;
13
+ etag?: string;
14
+ versionId?: string;
15
+ cid?: string;
16
+ custom?: Record<string, string>;
17
+ }
18
+ export interface BlobPutOptions {
19
+ contentType?: string;
20
+ metadata?: Record<string, string>;
21
+ ifNotExists?: boolean;
22
+ expectedSha256?: string;
23
+ }
24
+ export interface BlobGetOptions {
25
+ range?: {
26
+ start: number;
27
+ end?: number;
28
+ };
29
+ versionId?: string;
30
+ }
31
+ export interface BlobListOptions {
32
+ prefix?: string;
33
+ limit?: number;
34
+ cursor?: string;
35
+ }
36
+ export interface BlobEntry {
37
+ key: BlobKey;
38
+ metadata?: BlobMetadata;
39
+ }
40
+ export interface BlobListResult {
41
+ items: BlobEntry[];
42
+ cursor?: string;
43
+ }
44
+ export interface BlobPutResult {
45
+ key: BlobKey;
46
+ uri: string;
47
+ provider: BlobProvider;
48
+ sourceId: string;
49
+ metadata: BlobMetadata;
50
+ }
51
+ export interface BlobGetResult {
52
+ key: BlobKey;
53
+ value: AsyncIterable<Uint8Array>;
54
+ uri: string;
55
+ provider: BlobProvider;
56
+ sourceId: string;
57
+ metadata: BlobMetadata;
58
+ }
59
+ export interface BlobUrlOptions {
60
+ operation?: "get" | "put";
61
+ expiresInSeconds?: number;
62
+ contentType?: string;
63
+ metadata?: Record<string, string>;
64
+ }
65
+ export interface BlobUrlResult {
66
+ url: string;
67
+ method: "GET" | "PUT";
68
+ expiresAt: Date;
69
+ headers?: Record<string, string>;
70
+ }
71
+ export interface BlobStoreServiceConfig {
72
+ provider: BlobProvider;
73
+ sourceId: string;
74
+ prefix?: string;
75
+ credentialsRef?: string;
76
+ endpoint?: string;
77
+ region?: string;
78
+ timeoutMs?: number;
79
+ maxRetries?: number;
80
+ [key: string]: unknown;
81
+ }
82
+ export interface S3BlobStoreServiceConfig extends BlobStoreServiceConfig {
83
+ provider: "s3" | "minio" | "r2";
84
+ bucket: string;
85
+ forcePathStyle?: boolean;
86
+ autoCreateBucket?: boolean;
87
+ credentials?: {
88
+ accessKeyId: string;
89
+ secretAccessKey: string;
90
+ sessionToken?: string;
91
+ };
92
+ }
93
+ export interface AzureBlobStoreServiceConfig extends BlobStoreServiceConfig {
94
+ provider: "azure-blob";
95
+ container: string;
96
+ accountName?: string;
97
+ connectionString?: string;
98
+ }
99
+ export interface GcsBlobStoreServiceConfig extends BlobStoreServiceConfig {
100
+ provider: "gcs";
101
+ bucket: string;
102
+ projectId?: string;
103
+ credentials?: Record<string, unknown>;
104
+ apiEndpoint?: string;
105
+ }
106
+ export interface LocalBlobStoreServiceConfig extends BlobStoreServiceConfig {
107
+ provider: "local";
108
+ rootPath: string;
109
+ }
110
+ export interface IpfsKeyIndexConfig {
111
+ provider: "memory" | "postgres" | "local-json";
112
+ connectionRef?: string;
113
+ path?: string;
114
+ }
115
+ export interface IpfsBlobStoreServiceConfig extends BlobStoreServiceConfig {
116
+ provider: "ipfs";
117
+ apiUrl?: string;
118
+ gatewayUrl?: string;
119
+ pinByDefault?: boolean;
120
+ encryptedOnly?: boolean;
121
+ keyIndex: IpfsKeyIndexConfig;
122
+ }
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @module integrations/blob/core/types
3
+ * @summary Blob core types.
4
+ * @description Shared payload, metadata, option, and configuration types for blob store service implementations.
5
+ */
6
+ export type BlobProvider = "s3" | "minio" | "r2" | "azure-blob" | "gcs" | "local" | "ipfs" | "memory";
7
+ export type BlobKey = string;
8
+ export type BlobValue = Uint8Array | Buffer | AsyncIterable<Uint8Array> | ReadableStream;
9
+ export interface BlobMetadata {
10
+ contentType?: string;
11
+ contentLength?: number;
12
+ sha256?: string;
13
+ etag?: string;
14
+ versionId?: string;
15
+ cid?: string;
16
+ custom?: Record<string, string>;
17
+ }
18
+ export interface BlobPutOptions {
19
+ contentType?: string;
20
+ metadata?: Record<string, string>;
21
+ ifNotExists?: boolean;
22
+ expectedSha256?: string;
23
+ }
24
+ export interface BlobGetOptions {
25
+ range?: {
26
+ start: number;
27
+ end?: number;
28
+ };
29
+ versionId?: string;
30
+ }
31
+ export interface BlobListOptions {
32
+ prefix?: string;
33
+ limit?: number;
34
+ cursor?: string;
35
+ }
36
+ export interface BlobEntry {
37
+ key: BlobKey;
38
+ metadata?: BlobMetadata;
39
+ }
40
+ export interface BlobListResult {
41
+ items: BlobEntry[];
42
+ cursor?: string;
43
+ }
44
+ export interface BlobPutResult {
45
+ key: BlobKey;
46
+ uri: string;
47
+ provider: BlobProvider;
48
+ sourceId: string;
49
+ metadata: BlobMetadata;
50
+ }
51
+ export interface BlobGetResult {
52
+ key: BlobKey;
53
+ value: AsyncIterable<Uint8Array>;
54
+ uri: string;
55
+ provider: BlobProvider;
56
+ sourceId: string;
57
+ metadata: BlobMetadata;
58
+ }
59
+ export interface BlobUrlOptions {
60
+ operation?: "get" | "put";
61
+ expiresInSeconds?: number;
62
+ contentType?: string;
63
+ metadata?: Record<string, string>;
64
+ }
65
+ export interface BlobUrlResult {
66
+ url: string;
67
+ method: "GET" | "PUT";
68
+ expiresAt: Date;
69
+ headers?: Record<string, string>;
70
+ }
71
+ export interface BlobStoreServiceConfig {
72
+ provider: BlobProvider;
73
+ sourceId: string;
74
+ prefix?: string;
75
+ credentialsRef?: string;
76
+ endpoint?: string;
77
+ region?: string;
78
+ timeoutMs?: number;
79
+ maxRetries?: number;
80
+ [key: string]: unknown;
81
+ }
82
+ export interface S3BlobStoreServiceConfig extends BlobStoreServiceConfig {
83
+ provider: "s3" | "minio" | "r2";
84
+ bucket: string;
85
+ forcePathStyle?: boolean;
86
+ autoCreateBucket?: boolean;
87
+ credentials?: {
88
+ accessKeyId: string;
89
+ secretAccessKey: string;
90
+ sessionToken?: string;
91
+ };
92
+ }
93
+ export interface AzureBlobStoreServiceConfig extends BlobStoreServiceConfig {
94
+ provider: "azure-blob";
95
+ container: string;
96
+ accountName?: string;
97
+ connectionString?: string;
98
+ }
99
+ export interface GcsBlobStoreServiceConfig extends BlobStoreServiceConfig {
100
+ provider: "gcs";
101
+ bucket: string;
102
+ projectId?: string;
103
+ credentials?: Record<string, unknown>;
104
+ apiEndpoint?: string;
105
+ }
106
+ export interface LocalBlobStoreServiceConfig extends BlobStoreServiceConfig {
107
+ provider: "local";
108
+ rootPath: string;
109
+ }
110
+ export interface IpfsKeyIndexConfig {
111
+ provider: "memory" | "postgres" | "local-json";
112
+ connectionRef?: string;
113
+ path?: string;
114
+ }
115
+ export interface IpfsBlobStoreServiceConfig extends BlobStoreServiceConfig {
116
+ provider: "ipfs";
117
+ apiUrl?: string;
118
+ gatewayUrl?: string;
119
+ pinByDefault?: boolean;
120
+ encryptedOnly?: boolean;
121
+ keyIndex: IpfsKeyIndexConfig;
122
+ }
@@ -0,0 +1,13 @@
1
+ import type { BlobValue } from "./BlobTypes.d.cts";
2
+ /**
3
+ * Converts any supported BlobValue into an AsyncIterable of Uint8Array chunks.
4
+ */
5
+ export declare function toAsyncIterable(value: BlobValue): AsyncIterable<Uint8Array>;
6
+ /**
7
+ * Collects an AsyncIterable of Uint8Array chunks into a single Buffer.
8
+ */
9
+ export declare function collectToBuffer(value: BlobValue): Promise<Buffer>;
10
+ /**
11
+ * Computes the sha256 hex digest of a blob value.
12
+ */
13
+ export declare function computeSha256(value: BlobValue): Promise<string>;
@@ -0,0 +1,13 @@
1
+ import type { BlobValue } from "./BlobTypes.d.mts";
2
+ /**
3
+ * Converts any supported BlobValue into an AsyncIterable of Uint8Array chunks.
4
+ */
5
+ export declare function toAsyncIterable(value: BlobValue): AsyncIterable<Uint8Array>;
6
+ /**
7
+ * Collects an AsyncIterable of Uint8Array chunks into a single Buffer.
8
+ */
9
+ export declare function collectToBuffer(value: BlobValue): Promise<Buffer>;
10
+ /**
11
+ * Computes the sha256 hex digest of a blob value.
12
+ */
13
+ export declare function computeSha256(value: BlobValue): Promise<string>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @module integrations/blob/core
3
+ * @summary Blob core exports.
4
+ * @description Re-exports the blob store core types, errors, key/value helpers, service abstraction, and factory.
5
+ */
6
+ export * from "./BlobTypes.d.cts";
7
+ export * from "./BlobErrors.d.cts";
8
+ export * from "./BlobKey.d.cts";
9
+ export * from "./BlobValue.d.cts";
10
+ export * from "./BlobStoreService.d.cts";
11
+ export * from "./BlobStoreFactory.d.cts";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @module integrations/blob/core
3
+ * @summary Blob core exports.
4
+ * @description Re-exports the blob store core types, errors, key/value helpers, service abstraction, and factory.
5
+ */
6
+ export * from "./BlobTypes.d.mts";
7
+ export * from "./BlobErrors.d.mts";
8
+ export * from "./BlobKey.d.mts";
9
+ export * from "./BlobValue.d.mts";
10
+ export * from "./BlobStoreService.d.mts";
11
+ export * from "./BlobStoreFactory.d.mts";
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @module integrations/blob/gcp/service
3
+ * @summary Google Cloud Storage blob store service.
4
+ * @description Blob store backed by Google Cloud Storage via @google-cloud/storage.
5
+ */
6
+ import { type Bucket } from "@google-cloud/storage";
7
+ import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
8
+ import { BlobStoreService } from "../core/BlobStoreService.d.cts";
9
+ import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, GcsBlobStoreServiceConfig } from "../core/BlobTypes.d.cts";
10
+ export declare class GcsBlobStoreService extends BlobStoreService<Bucket, GcsBlobStoreServiceConfig> {
11
+ private storage;
12
+ initialize(...args: ContextualArgs<any>): Promise<{
13
+ config: GcsBlobStoreServiceConfig;
14
+ client: Bucket;
15
+ }>;
16
+ put(key: BlobKey, value: BlobValue, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
17
+ get(key: BlobKey, options?: BlobGetOptions, ...args: MaybeContextualArg<any>): Promise<BlobGetResult>;
18
+ has(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<boolean>;
19
+ stat(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<BlobMetadata>;
20
+ delete(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<void>;
21
+ copy(fromKey: BlobKey, toKey: BlobKey, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
22
+ list(options?: BlobListOptions, ...args: MaybeContextualArg<any>): Promise<BlobListResult>;
23
+ url(key: BlobKey, options?: BlobUrlOptions, ...args: MaybeContextualArg<any>): Promise<BlobUrlResult>;
24
+ protected parseError(error: unknown): Error;
25
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @module integrations/blob/gcp/service
3
+ * @summary Google Cloud Storage blob store service.
4
+ * @description Blob store backed by Google Cloud Storage via @google-cloud/storage.
5
+ */
6
+ import { type Bucket } from "@google-cloud/storage";
7
+ import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
8
+ import { BlobStoreService } from "../core/BlobStoreService.d.mts";
9
+ import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, GcsBlobStoreServiceConfig } from "../core/BlobTypes.d.mts";
10
+ export declare class GcsBlobStoreService extends BlobStoreService<Bucket, GcsBlobStoreServiceConfig> {
11
+ private storage;
12
+ initialize(...args: ContextualArgs<any>): Promise<{
13
+ config: GcsBlobStoreServiceConfig;
14
+ client: Bucket;
15
+ }>;
16
+ put(key: BlobKey, value: BlobValue, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
17
+ get(key: BlobKey, options?: BlobGetOptions, ...args: MaybeContextualArg<any>): Promise<BlobGetResult>;
18
+ has(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<boolean>;
19
+ stat(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<BlobMetadata>;
20
+ delete(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<void>;
21
+ copy(fromKey: BlobKey, toKey: BlobKey, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
22
+ list(options?: BlobListOptions, ...args: MaybeContextualArg<any>): Promise<BlobListResult>;
23
+ url(key: BlobKey, options?: BlobUrlOptions, ...args: MaybeContextualArg<any>): Promise<BlobUrlResult>;
24
+ protected parseError(error: unknown): Error;
25
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @module integrations/blob/gcp
3
+ * @summary Google Cloud Storage blob store exports.
4
+ * @description Re-exports the GCS blob store service.
5
+ */
6
+ export * from "./GcsBlobStoreService.d.cts";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @module integrations/blob/gcp
3
+ * @summary Google Cloud Storage blob store exports.
4
+ * @description Re-exports the GCS blob store service.
5
+ */
6
+ export * from "./GcsBlobStoreService.d.mts";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module integrations/blob
3
+ * @summary Blob store management helpers for the integrations package.
4
+ * @description Re-exports the blob store core abstractions only. Provider implementations are exported
5
+ * through their own subpaths so the core entry does not eagerly load optional provider SDKs.
6
+ */
7
+ export * from "./core/index.d.cts";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @module integrations/blob
3
+ * @summary Blob store management helpers for the integrations package.
4
+ * @description Re-exports the blob store core abstractions only. Provider implementations are exported
5
+ * through their own subpaths so the core entry does not eagerly load optional provider SDKs.
6
+ */
7
+ export * from "./core/index.d.mts";
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @module integrations/blob/ipfs/service
3
+ * @summary IPFS blob store service.
4
+ * @description Blob store backed by an IPFS (Kubo) node. Because the blob API is key/value CRUD-like
5
+ * and IPFS is content-addressed, an IpfsKeyIndex maps logical keys to CIDs.
6
+ */
7
+ import { type KuboRPCClient } from "kubo-rpc-client";
8
+ import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
9
+ import { BlobStoreService } from "../core/BlobStoreService.d.cts";
10
+ import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, IpfsBlobStoreServiceConfig } from "../core/BlobTypes.d.cts";
11
+ export declare class IpfsBlobStoreService extends BlobStoreService<KuboRPCClient, IpfsBlobStoreServiceConfig> {
12
+ private index;
13
+ initialize(...args: ContextualArgs<any>): Promise<{
14
+ config: IpfsBlobStoreServiceConfig;
15
+ client: KuboRPCClient;
16
+ }>;
17
+ put(key: BlobKey, value: BlobValue, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
18
+ get(key: BlobKey, options?: BlobGetOptions, ...args: MaybeContextualArg<any>): Promise<BlobGetResult>;
19
+ has(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<boolean>;
20
+ stat(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<BlobMetadata>;
21
+ delete(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<void>;
22
+ copy(fromKey: BlobKey, toKey: BlobKey, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
23
+ list(options?: BlobListOptions, ...args: MaybeContextualArg<any>): Promise<BlobListResult>;
24
+ url(key: BlobKey, options?: BlobUrlOptions, ...args: MaybeContextualArg<any>): Promise<BlobUrlResult>;
25
+ protected parseError(error: unknown): Error;
26
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @module integrations/blob/ipfs/service
3
+ * @summary IPFS blob store service.
4
+ * @description Blob store backed by an IPFS (Kubo) node. Because the blob API is key/value CRUD-like
5
+ * and IPFS is content-addressed, an IpfsKeyIndex maps logical keys to CIDs.
6
+ */
7
+ import { type KuboRPCClient } from "kubo-rpc-client";
8
+ import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
9
+ import { BlobStoreService } from "../core/BlobStoreService.d.mts";
10
+ import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, IpfsBlobStoreServiceConfig } from "../core/BlobTypes.d.mts";
11
+ export declare class IpfsBlobStoreService extends BlobStoreService<KuboRPCClient, IpfsBlobStoreServiceConfig> {
12
+ private index;
13
+ initialize(...args: ContextualArgs<any>): Promise<{
14
+ config: IpfsBlobStoreServiceConfig;
15
+ client: KuboRPCClient;
16
+ }>;
17
+ put(key: BlobKey, value: BlobValue, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
18
+ get(key: BlobKey, options?: BlobGetOptions, ...args: MaybeContextualArg<any>): Promise<BlobGetResult>;
19
+ has(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<boolean>;
20
+ stat(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<BlobMetadata>;
21
+ delete(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<void>;
22
+ copy(fromKey: BlobKey, toKey: BlobKey, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
23
+ list(options?: BlobListOptions, ...args: MaybeContextualArg<any>): Promise<BlobListResult>;
24
+ url(key: BlobKey, options?: BlobUrlOptions, ...args: MaybeContextualArg<any>): Promise<BlobUrlResult>;
25
+ protected parseError(error: unknown): Error;
26
+ }
@@ -0,0 +1,9 @@
1
+ import type { BlobListResult, BlobMetadata, IpfsKeyIndexConfig } from "../core/BlobTypes.d.cts";
2
+ export interface IpfsKeyIndex {
3
+ get(key: string): Promise<string | undefined>;
4
+ set(key: string, cid: string, metadata?: BlobMetadata): Promise<void>;
5
+ delete(key: string): Promise<void>;
6
+ list(prefix?: string, limit?: number, cursor?: string): Promise<BlobListResult>;
7
+ stat(key: string): Promise<BlobMetadata>;
8
+ }
9
+ export declare function createIpfsKeyIndex(config: IpfsKeyIndexConfig): IpfsKeyIndex;
@@ -0,0 +1,9 @@
1
+ import type { BlobListResult, BlobMetadata, IpfsKeyIndexConfig } from "../core/BlobTypes.d.mts";
2
+ export interface IpfsKeyIndex {
3
+ get(key: string): Promise<string | undefined>;
4
+ set(key: string, cid: string, metadata?: BlobMetadata): Promise<void>;
5
+ delete(key: string): Promise<void>;
6
+ list(prefix?: string, limit?: number, cursor?: string): Promise<BlobListResult>;
7
+ stat(key: string): Promise<BlobMetadata>;
8
+ }
9
+ export declare function createIpfsKeyIndex(config: IpfsKeyIndexConfig): IpfsKeyIndex;
@@ -0,0 +1,11 @@
1
+ import type { BlobListResult, BlobMetadata } from "../core/BlobTypes.d.cts";
2
+ import type { IpfsKeyIndex } from "./IpfsKeyIndex.d.cts";
3
+ export declare class LocalJsonIpfsKeyIndex implements IpfsKeyIndex {
4
+ private readonly path;
5
+ constructor(path: string);
6
+ get(key: string): Promise<string | undefined>;
7
+ set(key: string, cid: string, metadata?: BlobMetadata): Promise<void>;
8
+ delete(key: string): Promise<void>;
9
+ list(prefix?: string, limit?: number, cursor?: string): Promise<BlobListResult>;
10
+ stat(key: string): Promise<BlobMetadata>;
11
+ }
@@ -0,0 +1,11 @@
1
+ import type { BlobListResult, BlobMetadata } from "../core/BlobTypes.d.mts";
2
+ import type { IpfsKeyIndex } from "./IpfsKeyIndex.d.mts";
3
+ export declare class LocalJsonIpfsKeyIndex implements IpfsKeyIndex {
4
+ private readonly path;
5
+ constructor(path: string);
6
+ get(key: string): Promise<string | undefined>;
7
+ set(key: string, cid: string, metadata?: BlobMetadata): Promise<void>;
8
+ delete(key: string): Promise<void>;
9
+ list(prefix?: string, limit?: number, cursor?: string): Promise<BlobListResult>;
10
+ stat(key: string): Promise<BlobMetadata>;
11
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @module integrations/blob/ipfs/memory-index
3
+ * @summary In-memory IPFS key index.
4
+ * @description Process-local Map-backed key index for tests and examples.
5
+ */
6
+ import type { BlobListResult, BlobMetadata } from "../core/BlobTypes.d.cts";
7
+ import type { IpfsKeyIndex } from "./IpfsKeyIndex.d.cts";
8
+ export declare class MemoryIpfsKeyIndex implements IpfsKeyIndex {
9
+ private readonly values;
10
+ get(key: string): Promise<string | undefined>;
11
+ set(key: string, cid: string, metadata?: BlobMetadata): Promise<void>;
12
+ delete(key: string): Promise<void>;
13
+ list(prefix?: string, limit?: number, cursor?: string): Promise<BlobListResult>;
14
+ stat(key: string): Promise<BlobMetadata>;
15
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @module integrations/blob/ipfs/memory-index
3
+ * @summary In-memory IPFS key index.
4
+ * @description Process-local Map-backed key index for tests and examples.
5
+ */
6
+ import type { BlobListResult, BlobMetadata } from "../core/BlobTypes.d.mts";
7
+ import type { IpfsKeyIndex } from "./IpfsKeyIndex.d.mts";
8
+ export declare class MemoryIpfsKeyIndex implements IpfsKeyIndex {
9
+ private readonly values;
10
+ get(key: string): Promise<string | undefined>;
11
+ set(key: string, cid: string, metadata?: BlobMetadata): Promise<void>;
12
+ delete(key: string): Promise<void>;
13
+ list(prefix?: string, limit?: number, cursor?: string): Promise<BlobListResult>;
14
+ stat(key: string): Promise<BlobMetadata>;
15
+ }
@@ -0,0 +1,11 @@
1
+ import type { BlobListResult, BlobMetadata } from "../core/BlobTypes.d.cts";
2
+ import type { IpfsKeyIndex } from "./IpfsKeyIndex.d.cts";
3
+ export declare class PostgresIpfsKeyIndex implements IpfsKeyIndex {
4
+ private readonly connectionRef;
5
+ constructor(connectionRef: string);
6
+ get(key: string): Promise<string | undefined>;
7
+ set(key: string, cid: string, metadata?: BlobMetadata): Promise<void>;
8
+ delete(key: string): Promise<void>;
9
+ list(prefix?: string, limit?: number, cursor?: string): Promise<BlobListResult>;
10
+ stat(key: string): Promise<BlobMetadata>;
11
+ }
@@ -0,0 +1,11 @@
1
+ import type { BlobListResult, BlobMetadata } from "../core/BlobTypes.d.mts";
2
+ import type { IpfsKeyIndex } from "./IpfsKeyIndex.d.mts";
3
+ export declare class PostgresIpfsKeyIndex implements IpfsKeyIndex {
4
+ private readonly connectionRef;
5
+ constructor(connectionRef: string);
6
+ get(key: string): Promise<string | undefined>;
7
+ set(key: string, cid: string, metadata?: BlobMetadata): Promise<void>;
8
+ delete(key: string): Promise<void>;
9
+ list(prefix?: string, limit?: number, cursor?: string): Promise<BlobListResult>;
10
+ stat(key: string): Promise<BlobMetadata>;
11
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @module integrations/blob/ipfs
3
+ * @summary IPFS blob store exports.
4
+ * @description Re-exports the IPFS blob store service and key-index abstraction.
5
+ */
6
+ export * from "./IpfsBlobStoreService.d.cts";
7
+ export * from "./IpfsKeyIndex.d.cts";
8
+ export * from "./MemoryIpfsKeyIndex.d.cts";
9
+ export * from "./PostgresIpfsKeyIndex.d.cts";
10
+ export * from "./LocalJsonIpfsKeyIndex.d.cts";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @module integrations/blob/ipfs
3
+ * @summary IPFS blob store exports.
4
+ * @description Re-exports the IPFS blob store service and key-index abstraction.
5
+ */
6
+ export * from "./IpfsBlobStoreService.d.mts";
7
+ export * from "./IpfsKeyIndex.d.mts";
8
+ export * from "./MemoryIpfsKeyIndex.d.mts";
9
+ export * from "./PostgresIpfsKeyIndex.d.mts";
10
+ export * from "./LocalJsonIpfsKeyIndex.d.mts";
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @module integrations/blob/local/service
3
+ * @summary Local filesystem blob store service.
4
+ * @description Filesystem-backed blob store wrapping node:fs with atomic writes and path-traversal protection.
5
+ */
6
+ import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
7
+ import { BlobStoreService } from "../core/BlobStoreService.d.cts";
8
+ import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, LocalBlobStoreServiceConfig } from "../core/BlobTypes.d.cts";
9
+ interface LocalFsClient {
10
+ root: string;
11
+ }
12
+ export declare class LocalBlobStoreService extends BlobStoreService<LocalFsClient, LocalBlobStoreServiceConfig> {
13
+ initialize(...args: ContextualArgs<any>): Promise<{
14
+ config: LocalBlobStoreServiceConfig;
15
+ client: LocalFsClient;
16
+ }>;
17
+ put(key: BlobKey, value: BlobValue, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
18
+ get(key: BlobKey, options?: BlobGetOptions, ...args: MaybeContextualArg<any>): Promise<BlobGetResult>;
19
+ has(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<boolean>;
20
+ stat(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<BlobMetadata>;
21
+ delete(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<void>;
22
+ copy(fromKey: BlobKey, toKey: BlobKey, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
23
+ list(options?: BlobListOptions, ...args: MaybeContextualArg<any>): Promise<BlobListResult>;
24
+ url(key: BlobKey, options?: BlobUrlOptions, ...args: MaybeContextualArg<any>): Promise<BlobUrlResult>;
25
+ protected parseError(error: unknown): Error;
26
+ private safePath;
27
+ private safeStat;
28
+ private atomicWrite;
29
+ }
30
+ export {};
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @module integrations/blob/local/service
3
+ * @summary Local filesystem blob store service.
4
+ * @description Filesystem-backed blob store wrapping node:fs with atomic writes and path-traversal protection.
5
+ */
6
+ import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
7
+ import { BlobStoreService } from "../core/BlobStoreService.d.mts";
8
+ import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, LocalBlobStoreServiceConfig } from "../core/BlobTypes.d.mts";
9
+ interface LocalFsClient {
10
+ root: string;
11
+ }
12
+ export declare class LocalBlobStoreService extends BlobStoreService<LocalFsClient, LocalBlobStoreServiceConfig> {
13
+ initialize(...args: ContextualArgs<any>): Promise<{
14
+ config: LocalBlobStoreServiceConfig;
15
+ client: LocalFsClient;
16
+ }>;
17
+ put(key: BlobKey, value: BlobValue, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
18
+ get(key: BlobKey, options?: BlobGetOptions, ...args: MaybeContextualArg<any>): Promise<BlobGetResult>;
19
+ has(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<boolean>;
20
+ stat(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<BlobMetadata>;
21
+ delete(key: BlobKey, ...args: MaybeContextualArg<any>): Promise<void>;
22
+ copy(fromKey: BlobKey, toKey: BlobKey, options?: BlobPutOptions, ...args: MaybeContextualArg<any>): Promise<BlobPutResult>;
23
+ list(options?: BlobListOptions, ...args: MaybeContextualArg<any>): Promise<BlobListResult>;
24
+ url(key: BlobKey, options?: BlobUrlOptions, ...args: MaybeContextualArg<any>): Promise<BlobUrlResult>;
25
+ protected parseError(error: unknown): Error;
26
+ private safePath;
27
+ private safeStat;
28
+ private atomicWrite;
29
+ }
30
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @module integrations/blob/local
3
+ * @summary Local filesystem blob store exports.
4
+ * @description Re-exports the local filesystem blob store service.
5
+ */
6
+ export * from "./LocalBlobStoreService.d.cts";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @module integrations/blob/local
3
+ * @summary Local filesystem blob store exports.
4
+ * @description Re-exports the local filesystem blob store service.
5
+ */
6
+ export * from "./LocalBlobStoreService.d.mts";