@decaf-ts/integrations 0.9.0 → 0.10.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 (97) hide show
  1. package/dist/integrations.cjs +1 -1
  2. package/docker/minio-compose.yml +1 -1
  3. package/lib/cjs/blob/azure/AzureBlobStoreService.cjs +33 -0
  4. package/lib/cjs/blob/azure/AzureBlobStoreService.cjs.map +1 -1
  5. package/lib/cjs/blob/core/BlobStoreService.cjs +176 -1
  6. package/lib/cjs/blob/core/BlobStoreService.cjs.map +1 -1
  7. package/lib/cjs/blob/gcp/GcsBlobStoreService.cjs +32 -0
  8. package/lib/cjs/blob/gcp/GcsBlobStoreService.cjs.map +1 -1
  9. package/lib/cjs/blob/ipfs/IpfsBlobStoreService.cjs +31 -0
  10. package/lib/cjs/blob/ipfs/IpfsBlobStoreService.cjs.map +1 -1
  11. package/lib/cjs/blob/local/LocalBlobStoreService.cjs +30 -0
  12. package/lib/cjs/blob/local/LocalBlobStoreService.cjs.map +1 -1
  13. package/lib/cjs/blob/memory/MemoryBlobStoreService.cjs +30 -0
  14. package/lib/cjs/blob/memory/MemoryBlobStoreService.cjs.map +1 -1
  15. package/lib/cjs/blob/s3/S3CompatibleBlobStoreService.cjs +31 -0
  16. package/lib/cjs/blob/s3/S3CompatibleBlobStoreService.cjs.map +1 -1
  17. package/lib/cjs/calendar/CalendarService.cjs +393 -0
  18. package/lib/cjs/calendar/CalendarService.cjs.map +1 -0
  19. package/lib/cjs/calendar/index.cjs +21 -0
  20. package/lib/cjs/calendar/index.cjs.map +1 -0
  21. package/lib/cjs/calendar/types.cjs +4 -0
  22. package/lib/cjs/calendar/types.cjs.map +1 -0
  23. package/lib/cjs/calendar/validators/cron.cjs +58 -0
  24. package/lib/cjs/calendar/validators/cron.cjs.map +1 -0
  25. package/lib/cjs/calendar/writers/CalendarFsWriter.cjs +39 -0
  26. package/lib/cjs/calendar/writers/CalendarFsWriter.cjs.map +1 -0
  27. package/lib/cjs/calendar/writers/CalenderDownloader.cjs +47 -0
  28. package/lib/cjs/calendar/writers/CalenderDownloader.cjs.map +1 -0
  29. package/lib/cjs/calendar/writers/ICalendarWriter.cjs +4 -0
  30. package/lib/cjs/calendar/writers/ICalendarWriter.cjs.map +1 -0
  31. package/lib/cjs/graph/log/GraphRunLogger.cjs +2 -3
  32. package/lib/cjs/graph/log/GraphRunLogger.cjs.map +1 -1
  33. package/lib/cjs/index.cjs +3 -3
  34. package/lib/esm/blob/azure/AzureBlobStoreService.js +33 -0
  35. package/lib/esm/blob/azure/AzureBlobStoreService.js.map +1 -1
  36. package/lib/esm/blob/core/BlobStoreService.js +176 -1
  37. package/lib/esm/blob/core/BlobStoreService.js.map +1 -1
  38. package/lib/esm/blob/gcp/GcsBlobStoreService.js +32 -0
  39. package/lib/esm/blob/gcp/GcsBlobStoreService.js.map +1 -1
  40. package/lib/esm/blob/ipfs/IpfsBlobStoreService.js +31 -0
  41. package/lib/esm/blob/ipfs/IpfsBlobStoreService.js.map +1 -1
  42. package/lib/esm/blob/local/LocalBlobStoreService.js +30 -0
  43. package/lib/esm/blob/local/LocalBlobStoreService.js.map +1 -1
  44. package/lib/esm/blob/memory/MemoryBlobStoreService.js +30 -0
  45. package/lib/esm/blob/memory/MemoryBlobStoreService.js.map +1 -1
  46. package/lib/esm/blob/s3/S3CompatibleBlobStoreService.js +31 -0
  47. package/lib/esm/blob/s3/S3CompatibleBlobStoreService.js.map +1 -1
  48. package/lib/esm/calendar/CalendarService.js +384 -0
  49. package/lib/esm/calendar/CalendarService.js.map +1 -0
  50. package/lib/esm/calendar/index.js +4 -0
  51. package/lib/esm/calendar/index.js.map +1 -0
  52. package/lib/esm/calendar/types.js +2 -0
  53. package/lib/esm/calendar/types.js.map +1 -0
  54. package/lib/esm/calendar/validators/cron.js +48 -0
  55. package/lib/esm/calendar/validators/cron.js.map +1 -0
  56. package/lib/esm/calendar/writers/CalendarFsWriter.js +31 -0
  57. package/lib/esm/calendar/writers/CalendarFsWriter.js.map +1 -0
  58. package/lib/esm/calendar/writers/CalenderDownloader.js +39 -0
  59. package/lib/esm/calendar/writers/CalenderDownloader.js.map +1 -0
  60. package/lib/esm/calendar/writers/ICalendarWriter.js +2 -0
  61. package/lib/esm/calendar/writers/ICalendarWriter.js.map +1 -0
  62. package/lib/esm/graph/log/GraphRunLogger.js +2 -3
  63. package/lib/esm/graph/log/GraphRunLogger.js.map +1 -1
  64. package/lib/esm/index.js +3 -3
  65. package/lib/types/blob/azure/AzureBlobStoreService.d.cts +37 -0
  66. package/lib/types/blob/azure/AzureBlobStoreService.d.mts +37 -0
  67. package/lib/types/blob/core/BlobStoreService.d.cts +232 -1
  68. package/lib/types/blob/core/BlobStoreService.d.mts +232 -1
  69. package/lib/types/blob/gcp/GcsBlobStoreService.d.cts +35 -0
  70. package/lib/types/blob/gcp/GcsBlobStoreService.d.mts +35 -0
  71. package/lib/types/blob/ipfs/IpfsBlobStoreService.d.cts +34 -0
  72. package/lib/types/blob/ipfs/IpfsBlobStoreService.d.mts +34 -0
  73. package/lib/types/blob/local/LocalBlobStoreService.d.cts +27 -0
  74. package/lib/types/blob/local/LocalBlobStoreService.d.mts +27 -0
  75. package/lib/types/blob/memory/MemoryBlobStoreService.d.cts +27 -0
  76. package/lib/types/blob/memory/MemoryBlobStoreService.d.mts +27 -0
  77. package/lib/types/blob/s3/S3CompatibleBlobStoreService.d.cts +28 -0
  78. package/lib/types/blob/s3/S3CompatibleBlobStoreService.d.mts +28 -0
  79. package/lib/types/calendar/CalendarService.d.cts +40 -0
  80. package/lib/types/calendar/CalendarService.d.mts +40 -0
  81. package/lib/types/calendar/index.d.cts +3 -0
  82. package/lib/types/calendar/index.d.mts +3 -0
  83. package/lib/types/calendar/types.d.cts +64 -0
  84. package/lib/types/calendar/types.d.mts +64 -0
  85. package/lib/types/calendar/validators/cron.d.cts +7 -0
  86. package/lib/types/calendar/validators/cron.d.mts +7 -0
  87. package/lib/types/calendar/writers/CalendarFsWriter.d.cts +6 -0
  88. package/lib/types/calendar/writers/CalendarFsWriter.d.mts +6 -0
  89. package/lib/types/calendar/writers/CalenderDownloader.d.cts +6 -0
  90. package/lib/types/calendar/writers/CalenderDownloader.d.mts +6 -0
  91. package/lib/types/calendar/writers/ICalendarWriter.d.cts +5 -0
  92. package/lib/types/calendar/writers/ICalendarWriter.d.mts +5 -0
  93. package/lib/types/graph/log/GraphRunLogger.d.cts +3 -1
  94. package/lib/types/graph/log/GraphRunLogger.d.mts +3 -1
  95. package/lib/types/index.d.cts +2 -2
  96. package/lib/types/index.d.mts +2 -2
  97. package/package.json +14 -2
@@ -7,9 +7,44 @@ import { type Bucket } from "@google-cloud/storage";
7
7
  import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
8
8
  import { BlobStoreService } from "../core/BlobStoreService.d.cts";
9
9
  import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, GcsBlobStoreServiceConfig } from "../core/BlobTypes.d.cts";
10
+ /**
11
+ * @description Google Cloud Storage blob store service registered as `blob-gcs`
12
+ * @summary Stores blobs in a GCS bucket via `@google-cloud/storage`,
13
+ * authenticating with optional explicit credentials or the environment's
14
+ * application default credentials.
15
+ * @class GcsBlobStoreService
16
+ * @memberOf module:integrations/blob/gcp/service
17
+ */
10
18
  export declare class GcsBlobStoreService extends BlobStoreService<Bucket, GcsBlobStoreServiceConfig> {
19
+ /**
20
+ * @description The `Storage` client used to resolve the bucket
21
+ * @summary Built in `initialize()` from the resolved config.
22
+ * @type {Storage}
23
+ * @private
24
+ */
11
25
  private storage;
26
+ /**
27
+ * @description Builds the GCS blob config from the environment
28
+ * @summary Reads the `blobs.gcs` environment slice; considered
29
+ * unconfigured when no `bucket` is set, which keeps the auto-boot
30
+ * fallback (see `getConfigFromArgs`) resolving to `undefined`.
31
+ * @return {GcsBlobStoreServiceConfig | undefined} The environment-derived config, or `undefined` when unconfigured
32
+ */
12
33
  protected configFromEnvironment(): GcsBlobStoreServiceConfig | undefined;
34
+ /**
35
+ * @description Initializes the GCS bucket client
36
+ * @summary Resolves the config via `getConfigFromArgs` (explicit config,
37
+ * then the `blobs.gcs` environment slice). When no config resolves during a
38
+ * context-bearing auto-boot of an unconfigured provider, returns
39
+ * `skipInitialization()` so `Service.boot` does not throw; an explicit
40
+ * `initialize()` with no resolvable config still throws a
41
+ * `ValidationError`. Requires a `bucket`, builds the `Storage` client with
42
+ * the configured project ID, credentials, and API endpoint, and stores the
43
+ * bucket client.
44
+ * @param {...ContextualArgs<any>} args - An optional `GcsBlobStoreServiceConfig`, optionally followed by a decaf `Context`
45
+ * @return {Promise<{config: GcsBlobStoreServiceConfig, client: Bucket}>} The resolved config and the bucket client
46
+ * @throws {InternalError} When a resolved config has no `bucket`
47
+ */
13
48
  initialize(...args: ContextualArgs<any>): Promise<{
14
49
  config: GcsBlobStoreServiceConfig;
15
50
  client: Bucket;
@@ -7,9 +7,44 @@ import { type Bucket } from "@google-cloud/storage";
7
7
  import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
8
8
  import { BlobStoreService } from "../core/BlobStoreService.d.mts";
9
9
  import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, GcsBlobStoreServiceConfig } from "../core/BlobTypes.d.mts";
10
+ /**
11
+ * @description Google Cloud Storage blob store service registered as `blob-gcs`
12
+ * @summary Stores blobs in a GCS bucket via `@google-cloud/storage`,
13
+ * authenticating with optional explicit credentials or the environment's
14
+ * application default credentials.
15
+ * @class GcsBlobStoreService
16
+ * @memberOf module:integrations/blob/gcp/service
17
+ */
10
18
  export declare class GcsBlobStoreService extends BlobStoreService<Bucket, GcsBlobStoreServiceConfig> {
19
+ /**
20
+ * @description The `Storage` client used to resolve the bucket
21
+ * @summary Built in `initialize()` from the resolved config.
22
+ * @type {Storage}
23
+ * @private
24
+ */
11
25
  private storage;
26
+ /**
27
+ * @description Builds the GCS blob config from the environment
28
+ * @summary Reads the `blobs.gcs` environment slice; considered
29
+ * unconfigured when no `bucket` is set, which keeps the auto-boot
30
+ * fallback (see `getConfigFromArgs`) resolving to `undefined`.
31
+ * @return {GcsBlobStoreServiceConfig | undefined} The environment-derived config, or `undefined` when unconfigured
32
+ */
12
33
  protected configFromEnvironment(): GcsBlobStoreServiceConfig | undefined;
34
+ /**
35
+ * @description Initializes the GCS bucket client
36
+ * @summary Resolves the config via `getConfigFromArgs` (explicit config,
37
+ * then the `blobs.gcs` environment slice). When no config resolves during a
38
+ * context-bearing auto-boot of an unconfigured provider, returns
39
+ * `skipInitialization()` so `Service.boot` does not throw; an explicit
40
+ * `initialize()` with no resolvable config still throws a
41
+ * `ValidationError`. Requires a `bucket`, builds the `Storage` client with
42
+ * the configured project ID, credentials, and API endpoint, and stores the
43
+ * bucket client.
44
+ * @param {...ContextualArgs<any>} args - An optional `GcsBlobStoreServiceConfig`, optionally followed by a decaf `Context`
45
+ * @return {Promise<{config: GcsBlobStoreServiceConfig, client: Bucket}>} The resolved config and the bucket client
46
+ * @throws {InternalError} When a resolved config has no `bucket`
47
+ */
13
48
  initialize(...args: ContextualArgs<any>): Promise<{
14
49
  config: GcsBlobStoreServiceConfig;
15
50
  client: Bucket;
@@ -8,9 +8,43 @@ import { type KuboRPCClient } from "kubo-rpc-client";
8
8
  import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
9
9
  import { BlobStoreService } from "../core/BlobStoreService.d.cts";
10
10
  import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, IpfsBlobStoreServiceConfig } from "../core/BlobTypes.d.cts";
11
+ /**
12
+ * @description IPFS blob store service registered as `blob-ipfs`
13
+ * @summary Stores blobs on an IPFS (Kubo) node via `kubo-rpc-client`. Because
14
+ * the blob API is key/value CRUD-like and IPFS is content-addressed, an
15
+ * `IpfsKeyIndex` maps logical keys to CIDs; when `encryptedOnly` is set only
16
+ * encrypted payloads are accepted.
17
+ * @class IpfsBlobStoreService
18
+ * @memberOf module:integrations/blob/ipfs/service
19
+ */
11
20
  export declare class IpfsBlobStoreService extends BlobStoreService<KuboRPCClient, IpfsBlobStoreServiceConfig> {
21
+ /**
22
+ * @description The key index mapping logical keys to IPFS CIDs
23
+ * @summary Created in `initialize()` from the configured `keyIndex` provider.
24
+ * @type {IpfsKeyIndex}
25
+ * @private
26
+ */
12
27
  private index;
28
+ /**
29
+ * @description Builds the IPFS blob config from the environment
30
+ * @summary Reads the `blobs.ipfs` environment slice; considered
31
+ * unconfigured when no `sourceId` is set, which keeps the auto-boot
32
+ * fallback (see `getConfigFromArgs`) resolving to `undefined`.
33
+ * @return {IpfsBlobStoreServiceConfig | undefined} The environment-derived config, or `undefined` when unconfigured
34
+ */
13
35
  protected configFromEnvironment(): IpfsBlobStoreServiceConfig | undefined;
36
+ /**
37
+ * @description Initializes the IPFS Kubo RPC client and key index
38
+ * @summary Resolves the config via `getConfigFromArgs` (explicit config,
39
+ * then the `blobs.ipfs` environment slice). When no config resolves during
40
+ * a context-bearing auto-boot of an unconfigured provider, returns
41
+ * `skipInitialization()` so `Service.boot` does not throw; an explicit
42
+ * `initialize()` with no resolvable config still throws a
43
+ * `ValidationError`. Connects to the Kubo node at the configured `apiUrl`
44
+ * (default `http://localhost:5001`) and creates the `IpfsKeyIndex`.
45
+ * @param {...ContextualArgs<any>} args - An optional `IpfsBlobStoreServiceConfig`, optionally followed by a decaf `Context`
46
+ * @return {Promise<{config: IpfsBlobStoreServiceConfig, client: KuboRPCClient}>} The resolved config and the Kubo RPC client
47
+ */
14
48
  initialize(...args: ContextualArgs<any>): Promise<{
15
49
  config: IpfsBlobStoreServiceConfig;
16
50
  client: KuboRPCClient;
@@ -8,9 +8,43 @@ import { type KuboRPCClient } from "kubo-rpc-client";
8
8
  import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
9
9
  import { BlobStoreService } from "../core/BlobStoreService.d.mts";
10
10
  import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, IpfsBlobStoreServiceConfig } from "../core/BlobTypes.d.mts";
11
+ /**
12
+ * @description IPFS blob store service registered as `blob-ipfs`
13
+ * @summary Stores blobs on an IPFS (Kubo) node via `kubo-rpc-client`. Because
14
+ * the blob API is key/value CRUD-like and IPFS is content-addressed, an
15
+ * `IpfsKeyIndex` maps logical keys to CIDs; when `encryptedOnly` is set only
16
+ * encrypted payloads are accepted.
17
+ * @class IpfsBlobStoreService
18
+ * @memberOf module:integrations/blob/ipfs/service
19
+ */
11
20
  export declare class IpfsBlobStoreService extends BlobStoreService<KuboRPCClient, IpfsBlobStoreServiceConfig> {
21
+ /**
22
+ * @description The key index mapping logical keys to IPFS CIDs
23
+ * @summary Created in `initialize()` from the configured `keyIndex` provider.
24
+ * @type {IpfsKeyIndex}
25
+ * @private
26
+ */
12
27
  private index;
28
+ /**
29
+ * @description Builds the IPFS blob config from the environment
30
+ * @summary Reads the `blobs.ipfs` environment slice; considered
31
+ * unconfigured when no `sourceId` is set, which keeps the auto-boot
32
+ * fallback (see `getConfigFromArgs`) resolving to `undefined`.
33
+ * @return {IpfsBlobStoreServiceConfig | undefined} The environment-derived config, or `undefined` when unconfigured
34
+ */
13
35
  protected configFromEnvironment(): IpfsBlobStoreServiceConfig | undefined;
36
+ /**
37
+ * @description Initializes the IPFS Kubo RPC client and key index
38
+ * @summary Resolves the config via `getConfigFromArgs` (explicit config,
39
+ * then the `blobs.ipfs` environment slice). When no config resolves during
40
+ * a context-bearing auto-boot of an unconfigured provider, returns
41
+ * `skipInitialization()` so `Service.boot` does not throw; an explicit
42
+ * `initialize()` with no resolvable config still throws a
43
+ * `ValidationError`. Connects to the Kubo node at the configured `apiUrl`
44
+ * (default `http://localhost:5001`) and creates the `IpfsKeyIndex`.
45
+ * @param {...ContextualArgs<any>} args - An optional `IpfsBlobStoreServiceConfig`, optionally followed by a decaf `Context`
46
+ * @return {Promise<{config: IpfsBlobStoreServiceConfig, client: KuboRPCClient}>} The resolved config and the Kubo RPC client
47
+ */
14
48
  initialize(...args: ContextualArgs<any>): Promise<{
15
49
  config: IpfsBlobStoreServiceConfig;
16
50
  client: KuboRPCClient;
@@ -9,8 +9,35 @@ import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListR
9
9
  interface LocalFsClient {
10
10
  root: string;
11
11
  }
12
+ /**
13
+ * @description Local filesystem blob store service registered as `blob-local`
14
+ * @summary Stores blobs under a configurable root path using `node:fs` with
15
+ * atomic writes (temp file + rename) and path-traversal protection.
16
+ * @class LocalBlobStoreService
17
+ * @memberOf module:integrations/blob/local/service
18
+ */
12
19
  export declare class LocalBlobStoreService extends BlobStoreService<LocalFsClient, LocalBlobStoreServiceConfig> {
20
+ /**
21
+ * @description Builds the local blob config from the environment
22
+ * @summary Reads the `blobs.local` environment slice; considered
23
+ * unconfigured when no `rootPath` is set, which keeps the auto-boot
24
+ * fallback (see `getConfigFromArgs`) resolving to `undefined`.
25
+ * @return {LocalBlobStoreServiceConfig | undefined} The environment-derived config, or `undefined` when unconfigured
26
+ */
13
27
  protected configFromEnvironment(): LocalBlobStoreServiceConfig | undefined;
28
+ /**
29
+ * @description Initializes the local filesystem blob store client
30
+ * @summary Resolves the config via `getConfigFromArgs` (explicit config,
31
+ * then the `blobs.local` environment slice). When no config resolves during
32
+ * a context-bearing auto-boot of an unconfigured provider, returns
33
+ * `skipInitialization()` so `Service.boot` does not throw; an explicit
34
+ * `initialize()` with no resolvable config still throws a
35
+ * `ValidationError`. Requires a `rootPath`, creates it recursively, and
36
+ * stores the resolved absolute root as the client.
37
+ * @param {...ContextualArgs<any>} args - An optional `LocalBlobStoreServiceConfig`, optionally followed by a decaf `Context`
38
+ * @return {Promise<{config: LocalBlobStoreServiceConfig, client: LocalFsClient}>} The resolved config and the filesystem client
39
+ * @throws {InternalError} When a resolved config has no `rootPath`
40
+ */
14
41
  initialize(...args: ContextualArgs<any>): Promise<{
15
42
  config: LocalBlobStoreServiceConfig;
16
43
  client: LocalFsClient;
@@ -9,8 +9,35 @@ import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListR
9
9
  interface LocalFsClient {
10
10
  root: string;
11
11
  }
12
+ /**
13
+ * @description Local filesystem blob store service registered as `blob-local`
14
+ * @summary Stores blobs under a configurable root path using `node:fs` with
15
+ * atomic writes (temp file + rename) and path-traversal protection.
16
+ * @class LocalBlobStoreService
17
+ * @memberOf module:integrations/blob/local/service
18
+ */
12
19
  export declare class LocalBlobStoreService extends BlobStoreService<LocalFsClient, LocalBlobStoreServiceConfig> {
20
+ /**
21
+ * @description Builds the local blob config from the environment
22
+ * @summary Reads the `blobs.local` environment slice; considered
23
+ * unconfigured when no `rootPath` is set, which keeps the auto-boot
24
+ * fallback (see `getConfigFromArgs`) resolving to `undefined`.
25
+ * @return {LocalBlobStoreServiceConfig | undefined} The environment-derived config, or `undefined` when unconfigured
26
+ */
13
27
  protected configFromEnvironment(): LocalBlobStoreServiceConfig | undefined;
28
+ /**
29
+ * @description Initializes the local filesystem blob store client
30
+ * @summary Resolves the config via `getConfigFromArgs` (explicit config,
31
+ * then the `blobs.local` environment slice). When no config resolves during
32
+ * a context-bearing auto-boot of an unconfigured provider, returns
33
+ * `skipInitialization()` so `Service.boot` does not throw; an explicit
34
+ * `initialize()` with no resolvable config still throws a
35
+ * `ValidationError`. Requires a `rootPath`, creates it recursively, and
36
+ * stores the resolved absolute root as the client.
37
+ * @param {...ContextualArgs<any>} args - An optional `LocalBlobStoreServiceConfig`, optionally followed by a decaf `Context`
38
+ * @return {Promise<{config: LocalBlobStoreServiceConfig, client: LocalFsClient}>} The resolved config and the filesystem client
39
+ * @throws {InternalError} When a resolved config has no `rootPath`
40
+ */
14
41
  initialize(...args: ContextualArgs<any>): Promise<{
15
42
  config: LocalBlobStoreServiceConfig;
16
43
  client: LocalFsClient;
@@ -10,8 +10,35 @@ interface MemoryEntry {
10
10
  value: Buffer;
11
11
  metadata: BlobMetadata;
12
12
  }
13
+ /**
14
+ * @description In-memory blob store service registered as `blob-memory`
15
+ * @summary Stores blobs in a process-local `Map`, so data does not survive
16
+ * restarts. Intended for tests and examples; supports the full blob CRUD API
17
+ * without any SDK dependency.
18
+ * @class MemoryBlobStoreService
19
+ * @memberOf module:integrations/blob/memory/service
20
+ */
13
21
  export declare class MemoryBlobStoreService extends BlobStoreService<Map<string, MemoryEntry>, BlobStoreServiceConfig> {
22
+ /**
23
+ * @description Builds the memory blob config from the environment
24
+ * @summary Reads the `blobs.memory` environment slice; considered
25
+ * unconfigured when no `sourceId` is set, which keeps the auto-boot
26
+ * fallback (see `getConfigFromArgs`) resolving to `undefined`.
27
+ * @return {BlobStoreServiceConfig | undefined} The environment-derived config, or `undefined` when unconfigured
28
+ */
14
29
  protected configFromEnvironment(): BlobStoreServiceConfig | undefined;
30
+ /**
31
+ * @description Initializes the in-memory blob store client
32
+ * @summary Resolves the config via `getConfigFromArgs` (explicit config,
33
+ * then the `blobs.memory` environment slice). When no config resolves during
34
+ * a context-bearing auto-boot of an unconfigured provider, returns
35
+ * `skipInitialization()` so `Service.boot` does not throw; an explicit
36
+ * `initialize()` with no resolvable config still throws a
37
+ * `ValidationError`. On success, stores the config and creates the backing
38
+ * `Map` client.
39
+ * @param {...ContextualArgs<any>} args - An optional `BlobStoreServiceConfig`, optionally followed by a decaf `Context`
40
+ * @return {Promise<{config: BlobStoreServiceConfig, client: Map<string, MemoryEntry>}>} The resolved config and the in-memory client
41
+ */
15
42
  initialize(...args: ContextualArgs<any>): Promise<{
16
43
  config: BlobStoreServiceConfig;
17
44
  client: Map<string, MemoryEntry>;
@@ -10,8 +10,35 @@ interface MemoryEntry {
10
10
  value: Buffer;
11
11
  metadata: BlobMetadata;
12
12
  }
13
+ /**
14
+ * @description In-memory blob store service registered as `blob-memory`
15
+ * @summary Stores blobs in a process-local `Map`, so data does not survive
16
+ * restarts. Intended for tests and examples; supports the full blob CRUD API
17
+ * without any SDK dependency.
18
+ * @class MemoryBlobStoreService
19
+ * @memberOf module:integrations/blob/memory/service
20
+ */
13
21
  export declare class MemoryBlobStoreService extends BlobStoreService<Map<string, MemoryEntry>, BlobStoreServiceConfig> {
22
+ /**
23
+ * @description Builds the memory blob config from the environment
24
+ * @summary Reads the `blobs.memory` environment slice; considered
25
+ * unconfigured when no `sourceId` is set, which keeps the auto-boot
26
+ * fallback (see `getConfigFromArgs`) resolving to `undefined`.
27
+ * @return {BlobStoreServiceConfig | undefined} The environment-derived config, or `undefined` when unconfigured
28
+ */
14
29
  protected configFromEnvironment(): BlobStoreServiceConfig | undefined;
30
+ /**
31
+ * @description Initializes the in-memory blob store client
32
+ * @summary Resolves the config via `getConfigFromArgs` (explicit config,
33
+ * then the `blobs.memory` environment slice). When no config resolves during
34
+ * a context-bearing auto-boot of an unconfigured provider, returns
35
+ * `skipInitialization()` so `Service.boot` does not throw; an explicit
36
+ * `initialize()` with no resolvable config still throws a
37
+ * `ValidationError`. On success, stores the config and creates the backing
38
+ * `Map` client.
39
+ * @param {...ContextualArgs<any>} args - An optional `BlobStoreServiceConfig`, optionally followed by a decaf `Context`
40
+ * @return {Promise<{config: BlobStoreServiceConfig, client: Map<string, MemoryEntry>}>} The resolved config and the in-memory client
41
+ */
15
42
  initialize(...args: ContextualArgs<any>): Promise<{
16
43
  config: BlobStoreServiceConfig;
17
44
  client: Map<string, MemoryEntry>;
@@ -12,7 +12,35 @@ import { S3Client } from "@aws-sdk/client-s3";
12
12
  import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
13
13
  import { BlobStoreService } from "../core/BlobStoreService.d.cts";
14
14
  import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, S3BlobStoreServiceConfig } from "../core/BlobTypes.d.cts";
15
+ /**
16
+ * @description Base implementation for S3-compatible blob stores
17
+ * @summary Implements the full blob CRUD API on top of the AWS SDK v3
18
+ * `S3Client` and is shared by the S3, MinIO, and Cloudflare R2 provider
19
+ * services. Deliberately left undecorated: `@service(...)` on a class whose
20
+ * parent is itself `@service(...)`-decorated breaks that subclass's inherited
21
+ * field initializers (e.g. `Context` ends up `undefined`). Each concrete
22
+ * provider extends this class directly and carries its own
23
+ * `@service("blob-<provider>")` decorator instead of stacking on top of one
24
+ * another.
25
+ * @class S3CompatibleBlobStoreService
26
+ * @memberOf module:integrations/blob/s3/base-service
27
+ */
15
28
  export declare abstract class S3CompatibleBlobStoreService extends BlobStoreService<S3Client, S3BlobStoreServiceConfig> {
29
+ /**
30
+ * @description Initializes the S3 client from config or environment
31
+ * @summary Resolves the config via `getConfigFromArgs` (explicit config,
32
+ * then the provider's environment slice). When no config resolves during a
33
+ * context-bearing auto-boot of an unconfigured provider (e.g. an optional
34
+ * `blob-minio`/`blob-r2` registered alongside `blob-s3`), returns
35
+ * `skipInitialization()` so `Service.boot` does not throw; an explicit
36
+ * `initialize()` with no resolvable config still throws a
37
+ * `ValidationError`. Requires a `bucket`, builds the `S3Client` (with
38
+ * optional static credentials), stores config and client, and optionally
39
+ * creates the bucket when `autoCreateBucket` is set.
40
+ * @param {...ContextualArgs<any>} args - An optional `S3BlobStoreServiceConfig`, optionally followed by a decaf `Context`
41
+ * @return {Promise<{config: S3BlobStoreServiceConfig, client: S3Client}>} The resolved config and the constructed `S3Client`
42
+ * @throws {InternalError} When a resolved config has no `bucket`
43
+ */
16
44
  initialize(...args: ContextualArgs<any>): Promise<{
17
45
  config: S3BlobStoreServiceConfig;
18
46
  client: S3Client;
@@ -12,7 +12,35 @@ import { S3Client } from "@aws-sdk/client-s3";
12
12
  import { type ContextualArgs, type MaybeContextualArg } from "@decaf-ts/core";
13
13
  import { BlobStoreService } from "../core/BlobStoreService.d.mts";
14
14
  import type { BlobGetOptions, BlobGetResult, BlobKey, BlobListOptions, BlobListResult, BlobMetadata, BlobPutOptions, BlobPutResult, BlobUrlOptions, BlobUrlResult, BlobValue, S3BlobStoreServiceConfig } from "../core/BlobTypes.d.mts";
15
+ /**
16
+ * @description Base implementation for S3-compatible blob stores
17
+ * @summary Implements the full blob CRUD API on top of the AWS SDK v3
18
+ * `S3Client` and is shared by the S3, MinIO, and Cloudflare R2 provider
19
+ * services. Deliberately left undecorated: `@service(...)` on a class whose
20
+ * parent is itself `@service(...)`-decorated breaks that subclass's inherited
21
+ * field initializers (e.g. `Context` ends up `undefined`). Each concrete
22
+ * provider extends this class directly and carries its own
23
+ * `@service("blob-<provider>")` decorator instead of stacking on top of one
24
+ * another.
25
+ * @class S3CompatibleBlobStoreService
26
+ * @memberOf module:integrations/blob/s3/base-service
27
+ */
15
28
  export declare abstract class S3CompatibleBlobStoreService extends BlobStoreService<S3Client, S3BlobStoreServiceConfig> {
29
+ /**
30
+ * @description Initializes the S3 client from config or environment
31
+ * @summary Resolves the config via `getConfigFromArgs` (explicit config,
32
+ * then the provider's environment slice). When no config resolves during a
33
+ * context-bearing auto-boot of an unconfigured provider (e.g. an optional
34
+ * `blob-minio`/`blob-r2` registered alongside `blob-s3`), returns
35
+ * `skipInitialization()` so `Service.boot` does not throw; an explicit
36
+ * `initialize()` with no resolvable config still throws a
37
+ * `ValidationError`. Requires a `bucket`, builds the `S3Client` (with
38
+ * optional static credentials), stores config and client, and optionally
39
+ * creates the bucket when `autoCreateBucket` is set.
40
+ * @param {...ContextualArgs<any>} args - An optional `S3BlobStoreServiceConfig`, optionally followed by a decaf `Context`
41
+ * @return {Promise<{config: S3BlobStoreServiceConfig, client: S3Client}>} The resolved config and the constructed `S3Client`
42
+ * @throws {InternalError} When a resolved config has no `bucket`
43
+ */
16
44
  initialize(...args: ContextualArgs<any>): Promise<{
17
45
  config: S3BlobStoreServiceConfig;
18
46
  client: S3Client;
@@ -0,0 +1,40 @@
1
+ import { MaybeContextualArg, Service } from "@decaf-ts/core";
2
+ import { CalendarFile, CalendarReminderOptions } from "./types.d.cts";
3
+ import { type ICalendarWriter } from "./writers/ICalendarWriter.d.cts";
4
+ /**
5
+ * Creates interoperable iCalendar medication reminders.
6
+ *
7
+ * The service has no static Node imports, so the same module can be bundled
8
+ * for browsers. Node-only filesystem behavior is loaded dynamically.
9
+ */
10
+ export declare class CalendarService extends Service {
11
+ protected writer: ICalendarWriter;
12
+ createMedicationReminder(options: CalendarReminderOptions, ...args: MaybeContextualArg<any>): Promise<CalendarFile>;
13
+ createAndStoreReminder(options: CalendarReminderOptions, ...args: MaybeContextualArg<any>): Promise<void>;
14
+ private createRecurrence;
15
+ /**
16
+ * Converts the commonly needed medication schedules.
17
+ *
18
+ * Unsupported cron shapes fall back to explicit RDATE occurrences.
19
+ */
20
+ private convertSimpleCronToRRule;
21
+ private parseSimpleCron;
22
+ private parseCronField;
23
+ private expandCronDates;
24
+ private getFirstOccurrence;
25
+ private createFoldedRDateLines;
26
+ private formatUtcDate;
27
+ private formatLocalDate;
28
+ private foldLines;
29
+ /**
30
+ * RFC 5545 content lines should be folded at 75 octets.
31
+ */
32
+ private foldLine;
33
+ private escapeText;
34
+ private escapeProperty;
35
+ private escapeParameter;
36
+ private weekdayToIcs;
37
+ private createUid;
38
+ private createFilename;
39
+ private validateOptions;
40
+ }
@@ -0,0 +1,40 @@
1
+ import { MaybeContextualArg, Service } from "@decaf-ts/core";
2
+ import { CalendarFile, CalendarReminderOptions } from "./types.d.mts";
3
+ import { type ICalendarWriter } from "./writers/ICalendarWriter.d.mts";
4
+ /**
5
+ * Creates interoperable iCalendar medication reminders.
6
+ *
7
+ * The service has no static Node imports, so the same module can be bundled
8
+ * for browsers. Node-only filesystem behavior is loaded dynamically.
9
+ */
10
+ export declare class CalendarService extends Service {
11
+ protected writer: ICalendarWriter;
12
+ createMedicationReminder(options: CalendarReminderOptions, ...args: MaybeContextualArg<any>): Promise<CalendarFile>;
13
+ createAndStoreReminder(options: CalendarReminderOptions, ...args: MaybeContextualArg<any>): Promise<void>;
14
+ private createRecurrence;
15
+ /**
16
+ * Converts the commonly needed medication schedules.
17
+ *
18
+ * Unsupported cron shapes fall back to explicit RDATE occurrences.
19
+ */
20
+ private convertSimpleCronToRRule;
21
+ private parseSimpleCron;
22
+ private parseCronField;
23
+ private expandCronDates;
24
+ private getFirstOccurrence;
25
+ private createFoldedRDateLines;
26
+ private formatUtcDate;
27
+ private formatLocalDate;
28
+ private foldLines;
29
+ /**
30
+ * RFC 5545 content lines should be folded at 75 octets.
31
+ */
32
+ private foldLine;
33
+ private escapeText;
34
+ private escapeProperty;
35
+ private escapeParameter;
36
+ private weekdayToIcs;
37
+ private createUid;
38
+ private createFilename;
39
+ private validateOptions;
40
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./validators/cron.d.cts";
2
+ export * from "./types.d.cts";
3
+ export * from "./CalendarService.d.cts";
@@ -0,0 +1,3 @@
1
+ export * from "./validators/cron.d.mts";
2
+ export * from "./types.d.mts";
3
+ export * from "./CalendarService.d.mts";
@@ -0,0 +1,64 @@
1
+ export interface CalendarReminderOptions {
2
+ /**
3
+ * Standard 5-field cron:
4
+ * minute hour day-of-month month day-of-week
5
+ *
6
+ * Examples:
7
+ * "0 9 * * *" Every day at 09:00
8
+ * "0 9,21 * * *" Every day at 09:00 and 21:00
9
+ * "0 9 * * 1-5" Weekdays at 09:00
10
+ */
11
+ cron: string;
12
+ title: string;
13
+ description?: string;
14
+ location?: string;
15
+ /**
16
+ * First date from which occurrences should be calculated.
17
+ * Defaults to now.
18
+ */
19
+ start?: Date;
20
+ /**
21
+ * IANA timezone, for example:
22
+ * "Europe/Lisbon"
23
+ */
24
+ timezone?: string;
25
+ /**
26
+ * Length of each calendar event.
27
+ * Defaults to 15 minutes.
28
+ */
29
+ durationMinutes?: number;
30
+ /**
31
+ * Calendar notification before every occurrence.
32
+ * Defaults to 10 minutes.
33
+ */
34
+ alarmMinutesBefore?: number;
35
+ /**
36
+ * Maximum number of generated RDATE occurrences when the cron
37
+ * expression cannot be converted into a single RRULE.
38
+ */
39
+ maxOccurrences?: number;
40
+ /**
41
+ * Do not generate occurrences after this date.
42
+ */
43
+ until?: Date;
44
+ uid?: string;
45
+ organizerEmail?: string;
46
+ attendeeEmail?: string;
47
+ }
48
+ export interface CalendarFile {
49
+ filename: string;
50
+ content: string;
51
+ mimeType: "text/calendar";
52
+ bytes: Uint8Array;
53
+ }
54
+ export interface ParsedCron {
55
+ minute: number[];
56
+ hour: number[];
57
+ dayOfMonth: number[] | null;
58
+ month: number[] | null;
59
+ dayOfWeek: number[] | null;
60
+ }
61
+ export interface RecurrenceResult {
62
+ rrule?: string;
63
+ rdates?: Date[];
64
+ }
@@ -0,0 +1,64 @@
1
+ export interface CalendarReminderOptions {
2
+ /**
3
+ * Standard 5-field cron:
4
+ * minute hour day-of-month month day-of-week
5
+ *
6
+ * Examples:
7
+ * "0 9 * * *" Every day at 09:00
8
+ * "0 9,21 * * *" Every day at 09:00 and 21:00
9
+ * "0 9 * * 1-5" Weekdays at 09:00
10
+ */
11
+ cron: string;
12
+ title: string;
13
+ description?: string;
14
+ location?: string;
15
+ /**
16
+ * First date from which occurrences should be calculated.
17
+ * Defaults to now.
18
+ */
19
+ start?: Date;
20
+ /**
21
+ * IANA timezone, for example:
22
+ * "Europe/Lisbon"
23
+ */
24
+ timezone?: string;
25
+ /**
26
+ * Length of each calendar event.
27
+ * Defaults to 15 minutes.
28
+ */
29
+ durationMinutes?: number;
30
+ /**
31
+ * Calendar notification before every occurrence.
32
+ * Defaults to 10 minutes.
33
+ */
34
+ alarmMinutesBefore?: number;
35
+ /**
36
+ * Maximum number of generated RDATE occurrences when the cron
37
+ * expression cannot be converted into a single RRULE.
38
+ */
39
+ maxOccurrences?: number;
40
+ /**
41
+ * Do not generate occurrences after this date.
42
+ */
43
+ until?: Date;
44
+ uid?: string;
45
+ organizerEmail?: string;
46
+ attendeeEmail?: string;
47
+ }
48
+ export interface CalendarFile {
49
+ filename: string;
50
+ content: string;
51
+ mimeType: "text/calendar";
52
+ bytes: Uint8Array;
53
+ }
54
+ export interface ParsedCron {
55
+ minute: number[];
56
+ hour: number[];
57
+ dayOfMonth: number[] | null;
58
+ month: number[] | null;
59
+ dayOfWeek: number[] | null;
60
+ }
61
+ export interface RecurrenceResult {
62
+ rrule?: string;
63
+ rdates?: Date[];
64
+ }
@@ -0,0 +1,7 @@
1
+ import { Validator, ValidatorOptions } from "@decaf-ts/decorator-validation";
2
+ export declare const CRON_VALIDATION_ERROR_MESSAGE = "Not a valid cron expression";
3
+ export declare class CronValidator extends Validator {
4
+ constructor(message?: string);
5
+ hasErrors(value: string, options?: ValidatorOptions): string | undefined;
6
+ }
7
+ export declare const cron: (message?: string) => (target: object, propKey?: any) => any;
@@ -0,0 +1,7 @@
1
+ import { Validator, ValidatorOptions } from "@decaf-ts/decorator-validation";
2
+ export declare const CRON_VALIDATION_ERROR_MESSAGE = "Not a valid cron expression";
3
+ export declare class CronValidator extends Validator {
4
+ constructor(message?: string);
5
+ hasErrors(value: string, options?: ValidatorOptions): string | undefined;
6
+ }
7
+ export declare const cron: (message?: string) => (target: object, propKey?: any) => any;
@@ -0,0 +1,6 @@
1
+ import { ICalendarWriter } from "./ICalendarWriter.d.cts";
2
+ import { CalendarFile } from "../types.d.cts";
3
+ import { Context } from "@decaf-ts/core";
4
+ export declare class FsCalenderWriter implements ICalendarWriter {
5
+ write(file: CalendarFile, ctx: Context<any>): Promise<CalendarFile>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { ICalendarWriter } from "./ICalendarWriter.d.mts";
2
+ import { CalendarFile } from "../types.d.mts";
3
+ import { Context } from "@decaf-ts/core";
4
+ export declare class FsCalenderWriter implements ICalendarWriter {
5
+ write(file: CalendarFile, ctx: Context<any>): Promise<CalendarFile>;
6
+ }