@genesislcap/foundation-comms 14.125.1 → 14.126.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.
@@ -203,6 +203,7 @@ export type Message<T = void | any> = {
203
203
  SESSION_ID?: string;
204
204
  SOURCE_REF?: string;
205
205
  USER_NAME?: string;
206
+ WARNING?: any[];
206
207
  };
207
208
  /**
208
209
  * Parameters for a REQUEST message
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/connect/message.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAY,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGrE;;;GAGG;AACH,oBAAY,WAAW;IACrB,SAAS,cAAc;IACvB,UAAU,eAAe;IAEzB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAE3B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IAEjC,SAAS,cAAc;IAEvB,OAAO,YAAY;IACnB,QAAQ,aAAa;IAErB,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAE3B,YAAY,iBAAiB;CAC9B;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,gBAAgB,qBAAqB;IACrC,oBAAoB,yBAAyB;IAC7C,qBAAqB,0BAA0B;IAE/C,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAE3B,YAAY,iBAAiB;IAC7B,mBAAmB,wBAAwB;IAC3C,iBAAiB,sBAAsB;IAEvC,0BAA0B,+BAA+B;IACzD,iCAAiC,sCAAsC;IACvE,2BAA2B,gCAAgC;CAC5D;AAED;;;GAGG;AACH,oBAAY,WAAW;IACrB,iBAAiB,sBAAsB;IACvC,oBAAoB,yBAAyB;CAC9C;AAED;;GAEG;AACH,yBAAiB,cAAc,CAAC;IAC9B;;;OAGG;IACH,KAAY,UAAU,GAAG;QACvB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;K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,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAE1C;;;;;;;;;OASG;IACH,2BAA2B,CACzB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAE1C;;;;;;;;;OASG;IACH,gCAAgC,CAC9B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC;IAE/C;;;;;;;OAOG;IACH,4BAA4B,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CACnF;AA6MD;;;GAGG;AACH,eAAO,MAAM,cAAc,sEAE1B,CAAC"}
@@ -6,6 +6,7 @@ export * from './datasource';
6
6
  export * from './fdc3';
7
7
  export * from './metadata';
8
8
  export * from './session';
9
+ export * from './storage';
9
10
  export * from './testing';
10
11
  export * from './user';
11
12
  export * from './utils';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -136,7 +136,7 @@ export declare class DefaultSession implements Session {
136
136
  removeSessionStorageItem(key: string | UserInfoKeys): void;
137
137
  }
138
138
  /**
139
- * The DI token for the SessionService interface.
139
+ * The DI token for the Session interface.
140
140
  * @internal
141
141
  */
142
142
  export declare const Session: import("@microsoft/fast-foundation").InterfaceSymbol<Session>;
@@ -0,0 +1,2 @@
1
+ export * from './kv';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":"AAAA,cAAc,MAAM,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './kv-config.service';
2
+ export * from './kv.service';
3
+ export * from './kv.types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/storage/kv/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * KVStorageConfig DI interface.
3
+ * @alpha
4
+ */
5
+ export interface KVStorageConfig {
6
+ /**
7
+ * The account id to use.
8
+ *
9
+ * @privateRemarks
10
+ * May require access control.
11
+ *
12
+ * @alpha
13
+ */
14
+ account?: string;
15
+ /**
16
+ * The namespace to use.
17
+ *
18
+ * @privateRemarks
19
+ * May require access control.
20
+ *
21
+ * @alpha
22
+ */
23
+ namespace?: string;
24
+ /**
25
+ * Access control auth key.
26
+ *
27
+ * @alpha
28
+ */
29
+ authKey?: string;
30
+ /**
31
+ * Access control auth email.
32
+ *
33
+ * @remarks
34
+ * Part of access requirements and where to report integration issues.
35
+ *
36
+ * @alpha
37
+ */
38
+ authEmail?: string;
39
+ }
40
+ /**
41
+ * The default configuration for the KVStorage service.
42
+ * @alpha
43
+ */
44
+ export declare const defaultKVStorageConfig: KVStorageConfig;
45
+ /**
46
+ * KVStorageConfig DI key.
47
+ *
48
+ * @internal
49
+ */
50
+ export declare const KVStorageConfig: import("@microsoft/fast-foundation").InterfaceSymbol<KVStorageConfig>;
51
+ //# sourceMappingURL=kv-config.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kv-config.service.d.ts","sourceRoot":"","sources":["../../../../src/storage/kv/kv-config.service.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAKpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,uEAAwC,CAAC"}
@@ -0,0 +1,97 @@
1
+ import { Connect } from '../../connect';
2
+ import { KVStorageConfig } from './kv-config.service';
3
+ import { KeyValue, KeyValueTransfer, KVValue, KVEventFailureResponse } from './kv.types';
4
+ /**
5
+ * Represents a KV (key-value) data storage and its capabilities.
6
+ * Provides methods to set and get items from the KV data storage.
7
+ *
8
+ * @remarks
9
+ * Provides a key value storage api that abstracts the underlying storage technology.
10
+ *
11
+ * @privateRemarks
12
+ * This entire package will likely evolve into a standalone repo; Storage PBC.
13
+ * Need to create a design document covering how account and namespace ids may come into play.
14
+ *
15
+ * @alpha
16
+ */
17
+ export interface KVStorage {
18
+ delete(keys: string[]): Promise<true | KVEventFailureResponse>;
19
+ get<T = KVValue>(key?: string): Promise<KeyValueTransfer<T>[]>;
20
+ list(): Promise<string[]>;
21
+ put(kvs: KeyValue<KVValue>[]): Promise<true | KVEventFailureResponse>;
22
+ }
23
+ /**
24
+ * The default implementation for the KVStorage interface.
25
+ * @alpha
26
+ */
27
+ export declare class DefaultKVStorage implements KVStorage {
28
+ private connect;
29
+ private kvStorageConfig;
30
+ constructor(connect: Connect, kvStorageConfig?: KVStorageConfig);
31
+ /**
32
+ * Deletes the specified key-value pairs from the KV storage.
33
+ * @alpha
34
+ * @param kvs - The key names to delete.
35
+ * @returns A promise that resolves to true if the operation was successful, or an object containing error and warning information if the operation failed.
36
+ * @example
37
+ * ```ts
38
+ * ...
39
+ * const result = await this.kvStorage.delete(['myKey']);
40
+ * logger.debug(result); // true or { ERROR: ..., WARNING: ... }
41
+ * ...
42
+ * ```
43
+ */
44
+ delete(keys: string[]): Promise<true | KVEventFailureResponse>;
45
+ /**
46
+ * Gets the specified key-value pairs from the KV storage.
47
+ * @remarks If no key is specified, all key-value pairs for the current user are returned.
48
+ * @alpha
49
+ * @param kv - The single key-value pair to get.
50
+ * @returns A promise that resolves to an array of key-value pairs.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * ...
55
+ * const result = await this.kvStorage.get({ key: 'myKey' });
56
+ * logger.debug(result); // [{ key: 'myKey', value: 'myValue' }]
57
+ *
58
+ * const result2 = await this.kvStorage.get();
59
+ * logger.debug(result); // [{ key: 'myKey', value: 'myValue' }, { key: 'myOtherKey', value: 'myOtherValue' }]
60
+ * ...
61
+ * ```
62
+ */
63
+ get<T = KVValue>(key?: string): Promise<KeyValueTransfer<T>[]>;
64
+ /**
65
+ * Lists all keys for the user.
66
+ * @alpha
67
+ * @returns A promise that resolves to all keys for the user.
68
+ * @example
69
+ * ```ts
70
+ * ...
71
+ * const result = await this.kvStorage.list();
72
+ * logger.debug(result); // ['myKey', 'myOtherKey']
73
+ * ...
74
+ * ```
75
+ */
76
+ list(): Promise<string[]>;
77
+ /**
78
+ * Inserts or updates the specified key-value pairs in the KV storage.
79
+ * @alpha
80
+ * @param kvs - The key-value pairs to insert or update.
81
+ * @returns A promise that resolves to true if the operation was successful, or an object containing error and warning information if the operation failed.
82
+ * @example
83
+ * ```ts
84
+ * ...
85
+ * const result = await this.kvStorage.put([{ key: 'myKey', value: 'myValue' }]);
86
+ * logger.debug(result); // true or { ERROR: ..., WARNING: ... }
87
+ * ...
88
+ * ```
89
+ */
90
+ put(kvs: KeyValue<KVValue>[]): Promise<true | KVEventFailureResponse>;
91
+ }
92
+ /**
93
+ * The DI token for the KVStorage interface.
94
+ * @internal
95
+ */
96
+ export declare const KVStorage: import("@microsoft/fast-foundation").InterfaceSymbol<KVStorage>;
97
+ //# sourceMappingURL=kv.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kv.service.d.ts","sourceRoot":"","sources":["../../../../src/storage/kv/kv.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,OAAO,EAA0B,MAAM,eAAe,CAAC;AAE9E,OAAO,EAA0B,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,sBAAsB,EAGvB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,GAAG,sBAAsB,CAAC,CAAC;IAC/D,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC/D,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1B,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,GAAG,sBAAsB,CAAC,CAAC;CACvE;AAED;;;GAGG;AACH,qBAAa,gBAAiB,YAAW,SAAS;IAErC,OAAO,CAAC,OAAO;IACG,OAAO,CAAC,eAAe;gBADjC,OAAO,EAAE,OAAO,EACE,eAAe,kBAAyB;IAG7E;;;;;;;;;;;;OAYG;IACG,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,GAAG,sBAAsB,CAAC;IAuBpE;;;;;;;;;;;;;;;;;OAiBG;IACG,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;IAwBpE;;;;;;;;;;;OAWG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAqB/B;;;;;;;;;;;;OAYG;IACG,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,GAAG,sBAAsB,CAAC;CAsB5E;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,iEAAsE,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { MessageError } from '../../connect';
2
+ /**
3
+ * KV Message types
4
+ * @alpha
5
+ */
6
+ export declare enum KVMessageType {
7
+ REQ_KEY_VALUE_LIST = "REQ_KEY_VALUE_LIST",
8
+ REQ_KEY_VALUE_READ = "REQ_KEY_VALUE_READ"
9
+ }
10
+ /**
11
+ * KV Event Message types
12
+ * @alpha
13
+ */
14
+ export declare enum KVEventMessageType {
15
+ EVENT_KEY_VALUE_PUT = "EVENT_KEY_VALUE_PUT",
16
+ EVENT_KEY_VALUE_DELETE = "EVENT_KEY_VALUE_DELETE"
17
+ }
18
+ /**
19
+ * KVValue type.
20
+ * @alpha
21
+ */
22
+ export type KVValue = string | ArrayBuffer;
23
+ /**
24
+ * KeyValue interface.
25
+ * @alpha
26
+ */
27
+ export interface KeyValue<T = KVValue> {
28
+ /**
29
+ * Key
30
+ * @alpha
31
+ */
32
+ key: string;
33
+ /**
34
+ * Value
35
+ * @alpha
36
+ */
37
+ value?: T;
38
+ /**
39
+ * Time key expires.
40
+ *
41
+ * @privateRemarks
42
+ * Should we clean up with lazy deletion, ie. wait until an access request?
43
+ *
44
+ * @alpha
45
+ */
46
+ expiration?: number;
47
+ /**
48
+ * Value should be encoded.
49
+ * @alpha
50
+ */
51
+ base64?: boolean;
52
+ /**
53
+ * Additional metadata.
54
+ * @alpha
55
+ */
56
+ metadata?: {
57
+ [key: string]: unknown;
58
+ };
59
+ }
60
+ /**
61
+ * KeyValueTransfer interface.
62
+ *
63
+ * @alpha
64
+ */
65
+ export interface KeyValueTransfer<T> {
66
+ kv: KeyValue<T>;
67
+ serialize?(value: unknown): unknown;
68
+ deserialize?(value: unknown): Promise<T>;
69
+ }
70
+ /**
71
+ * KVStorage type.
72
+ * @alpha
73
+ */
74
+ export type KVEventFailureResponse = {
75
+ ERROR?: MessageError[];
76
+ WARNING: any[];
77
+ };
78
+ //# sourceMappingURL=kv.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kv.types.d.ts","sourceRoot":"","sources":["../../../../src/storage/kv/kv.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;;GAGG;AACH,oBAAY,aAAa;IACvB,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;CAC1C;AAED;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,mBAAmB,wBAAwB;IAC3C,sBAAsB,2BAA2B;CAClD;AAED;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC;AAE3C;;;GAGG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,GAAG,OAAO;IACnC;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,CAAC;IACV;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEhB,SAAS,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IACpC,WAAW,CAAC,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG;IAAE,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IAAC,OAAO,EAAE,GAAG,EAAE,CAAA;CAAE,CAAC"}
package/dist/esm/index.js CHANGED
@@ -6,6 +6,7 @@ export * from './datasource';
6
6
  export * from './fdc3';
7
7
  export * from './metadata';
8
8
  export * from './session';
9
+ export * from './storage';
9
10
  export * from './testing';
10
11
  export * from './user';
11
12
  export * from './utils';
@@ -79,7 +79,7 @@ export class DefaultSession {
79
79
  }
80
80
  }
81
81
  /**
82
- * The DI token for the SessionService interface.
82
+ * The DI token for the Session interface.
83
83
  * @internal
84
84
  */
85
85
  export const Session = DI.createInterface((x) => x.singleton(DefaultSession));
@@ -0,0 +1 @@
1
+ export * from './kv';
@@ -0,0 +1,3 @@
1
+ export * from './kv-config.service';
2
+ export * from './kv.service';
3
+ export * from './kv.types';
@@ -0,0 +1,17 @@
1
+ import { DI } from '@microsoft/fast-foundation';
2
+ /**
3
+ * The default configuration for the KVStorage service.
4
+ * @alpha
5
+ */
6
+ export const defaultKVStorageConfig = {
7
+ account: 'genesis',
8
+ namespace: 'default',
9
+ authKey: 'kv-default',
10
+ authEmail: 'kv@genesis.global',
11
+ };
12
+ /**
13
+ * KVStorageConfig DI key.
14
+ *
15
+ * @internal
16
+ */
17
+ export const KVStorageConfig = DI.createInterface();
@@ -0,0 +1,164 @@
1
+ import { __awaiter, __decorate, __param } from "tslib";
2
+ import { DI, optional } from '@microsoft/fast-foundation';
3
+ import { Connect } from '../../connect';
4
+ import { logger } from '../../utils';
5
+ import { defaultKVStorageConfig, KVStorageConfig } from './kv-config.service';
6
+ import { KVEventMessageType, KVMessageType, } from './kv.types';
7
+ /**
8
+ * The default implementation for the KVStorage interface.
9
+ * @alpha
10
+ */
11
+ let DefaultKVStorage = class DefaultKVStorage {
12
+ constructor(connect, kvStorageConfig = defaultKVStorageConfig) {
13
+ this.connect = connect;
14
+ this.kvStorageConfig = kvStorageConfig;
15
+ }
16
+ /**
17
+ * Deletes the specified key-value pairs from the KV storage.
18
+ * @alpha
19
+ * @param kvs - The key names to delete.
20
+ * @returns A promise that resolves to true if the operation was successful, or an object containing error and warning information if the operation failed.
21
+ * @example
22
+ * ```ts
23
+ * ...
24
+ * const result = await this.kvStorage.delete(['myKey']);
25
+ * logger.debug(result); // true or { ERROR: ..., WARNING: ... }
26
+ * ...
27
+ * ```
28
+ */
29
+ delete(keys) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ const params = {
32
+ DETAILS: {
33
+ KEYS: keys,
34
+ },
35
+ };
36
+ const result = yield this.connect.commitEvent(KVEventMessageType.EVENT_KEY_VALUE_DELETE, params);
37
+ logger.debug('KV Delete result: ', result);
38
+ return new Promise((resolve) => {
39
+ if (result && result.MESSAGE_TYPE === 'EVENT_ACK') {
40
+ resolve(true);
41
+ }
42
+ else {
43
+ resolve({ ERROR: result.ERROR, WARNING: result.WARNING });
44
+ }
45
+ });
46
+ });
47
+ }
48
+ /**
49
+ * Gets the specified key-value pairs from the KV storage.
50
+ * @remarks If no key is specified, all key-value pairs for the current user are returned.
51
+ * @alpha
52
+ * @param kv - The single key-value pair to get.
53
+ * @returns A promise that resolves to an array of key-value pairs.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * ...
58
+ * const result = await this.kvStorage.get({ key: 'myKey' });
59
+ * logger.debug(result); // [{ key: 'myKey', value: 'myValue' }]
60
+ *
61
+ * const result2 = await this.kvStorage.get();
62
+ * logger.debug(result); // [{ key: 'myKey', value: 'myValue' }, { key: 'myOtherKey', value: 'myOtherValue' }]
63
+ * ...
64
+ * ```
65
+ */
66
+ get(key) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const params = {
69
+ REQUEST: {
70
+ USER_NAME: this.kvStorageConfig.authEmail,
71
+ KEY: key,
72
+ },
73
+ };
74
+ const result = yield this.connect.request(KVMessageType.REQ_KEY_VALUE_READ, params);
75
+ logger.debug('KV Get result: ', result);
76
+ return new Promise((resolve) => {
77
+ if (result && result.REPLY && result.REPLY.length > 0) {
78
+ const kvs = result.REPLY.map((kv) => ({ kv: { key: kv.KEY, value: kv.VALUE } }));
79
+ resolve(kvs);
80
+ }
81
+ else {
82
+ resolve(result.REPLY);
83
+ }
84
+ });
85
+ });
86
+ }
87
+ /**
88
+ * Lists all keys for the user.
89
+ * @alpha
90
+ * @returns A promise that resolves to all keys for the user.
91
+ * @example
92
+ * ```ts
93
+ * ...
94
+ * const result = await this.kvStorage.list();
95
+ * logger.debug(result); // ['myKey', 'myOtherKey']
96
+ * ...
97
+ * ```
98
+ */
99
+ list() {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ const params = {
102
+ REQUEST: {
103
+ USER_NAME: this.kvStorageConfig.authEmail,
104
+ },
105
+ };
106
+ const result = yield this.connect.request(KVMessageType.REQ_KEY_VALUE_LIST, params);
107
+ logger.debug('KV List result: ', result);
108
+ return new Promise((resolve) => {
109
+ if (result && result.REPLY) {
110
+ const keys = result.REPLY.map((kv) => kv.KEY);
111
+ resolve(keys);
112
+ }
113
+ else {
114
+ resolve([]);
115
+ }
116
+ });
117
+ });
118
+ }
119
+ /**
120
+ * Inserts or updates the specified key-value pairs in the KV storage.
121
+ * @alpha
122
+ * @param kvs - The key-value pairs to insert or update.
123
+ * @returns A promise that resolves to true if the operation was successful, or an object containing error and warning information if the operation failed.
124
+ * @example
125
+ * ```ts
126
+ * ...
127
+ * const result = await this.kvStorage.put([{ key: 'myKey', value: 'myValue' }]);
128
+ * logger.debug(result); // true or { ERROR: ..., WARNING: ... }
129
+ * ...
130
+ * ```
131
+ */
132
+ put(kvs) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ const params = {
135
+ DETAILS: {
136
+ RECORDS: kvs.map((kv) => ({
137
+ KEY: kv.key,
138
+ VALUE: kv.value,
139
+ })),
140
+ },
141
+ };
142
+ const result = yield this.connect.commitEvent(KVEventMessageType.EVENT_KEY_VALUE_PUT, params);
143
+ logger.debug('KV Put result: ', result);
144
+ return new Promise((resolve) => {
145
+ if (result && result.MESSAGE_TYPE === 'EVENT_ACK') {
146
+ resolve(true);
147
+ }
148
+ else {
149
+ resolve({ ERROR: result.ERROR, WARNING: result.WARNING });
150
+ }
151
+ });
152
+ });
153
+ }
154
+ };
155
+ DefaultKVStorage = __decorate([
156
+ __param(0, Connect),
157
+ __param(1, optional(KVStorageConfig))
158
+ ], DefaultKVStorage);
159
+ export { DefaultKVStorage };
160
+ /**
161
+ * The DI token for the KVStorage interface.
162
+ * @internal
163
+ */
164
+ export const KVStorage = DI.createInterface((x) => x.singleton(DefaultKVStorage));
@@ -0,0 +1,18 @@
1
+ /**
2
+ * KV Message types
3
+ * @alpha
4
+ */
5
+ export var KVMessageType;
6
+ (function (KVMessageType) {
7
+ KVMessageType["REQ_KEY_VALUE_LIST"] = "REQ_KEY_VALUE_LIST";
8
+ KVMessageType["REQ_KEY_VALUE_READ"] = "REQ_KEY_VALUE_READ";
9
+ })(KVMessageType || (KVMessageType = {}));
10
+ /**
11
+ * KV Event Message types
12
+ * @alpha
13
+ */
14
+ export var KVEventMessageType;
15
+ (function (KVEventMessageType) {
16
+ KVEventMessageType["EVENT_KEY_VALUE_PUT"] = "EVENT_KEY_VALUE_PUT";
17
+ KVEventMessageType["EVENT_KEY_VALUE_DELETE"] = "EVENT_KEY_VALUE_DELETE";
18
+ })(KVEventMessageType || (KVEventMessageType = {}));
@@ -14366,7 +14366,7 @@
14366
14366
  },
14367
14367
  {
14368
14368
  "kind": "Content",
14369
- "text": " | string;\n PERMISSION?: string[];\n PROFILE?: string[];\n REFRESH_AUTH_TOKEN?: string;\n ROW?: any[];\n ROWS_COUNT?: number;\n SEQUENCE_ID?: number;\n SERVICE_NAME?: string;\n SESSION_AUTH_TOKEN?: string;\n SESSION_ID?: string;\n SOURCE_REF?: string;\n USER_NAME?: string;\n}"
14369
+ "text": " | string;\n PERMISSION?: string[];\n PROFILE?: string[];\n REFRESH_AUTH_TOKEN?: string;\n ROW?: any[];\n ROWS_COUNT?: number;\n SEQUENCE_ID?: number;\n SERVICE_NAME?: string;\n SESSION_AUTH_TOKEN?: string;\n SESSION_ID?: string;\n SOURCE_REF?: string;\n USER_NAME?: string;\n WARNING?: any[];\n}"
14370
14370
  },
14371
14371
  {
14372
14372
  "kind": "Content",
@@ -1229,6 +1229,82 @@ export declare class DefaultHttpConnect implements Connect {
1229
1229
  */
1230
1230
  export declare const defaultHttpConnectConfig: HttpConnectConfig;
1231
1231
 
1232
+ /**
1233
+ * The default implementation for the KVStorage interface.
1234
+ * @alpha
1235
+ */
1236
+ export declare class DefaultKVStorage implements KVStorage {
1237
+ private connect;
1238
+ private kvStorageConfig;
1239
+ constructor(connect: Connect, kvStorageConfig?: KVStorageConfig);
1240
+ /**
1241
+ * Deletes the specified key-value pairs from the KV storage.
1242
+ * @alpha
1243
+ * @param kvs - The key names to delete.
1244
+ * @returns A promise that resolves to true if the operation was successful, or an object containing error and warning information if the operation failed.
1245
+ * @example
1246
+ * ```ts
1247
+ * ...
1248
+ * const result = await this.kvStorage.delete(['myKey']);
1249
+ * logger.debug(result); // true or { ERROR: ..., WARNING: ... }
1250
+ * ...
1251
+ * ```
1252
+ */
1253
+ delete(keys: string[]): Promise<true | KVEventFailureResponse>;
1254
+ /**
1255
+ * Gets the specified key-value pairs from the KV storage.
1256
+ * @remarks If no key is specified, all key-value pairs for the current user are returned.
1257
+ * @alpha
1258
+ * @param kv - The single key-value pair to get.
1259
+ * @returns A promise that resolves to an array of key-value pairs.
1260
+ *
1261
+ * @example
1262
+ * ```ts
1263
+ * ...
1264
+ * const result = await this.kvStorage.get({ key: 'myKey' });
1265
+ * logger.debug(result); // [{ key: 'myKey', value: 'myValue' }]
1266
+ *
1267
+ * const result2 = await this.kvStorage.get();
1268
+ * logger.debug(result); // [{ key: 'myKey', value: 'myValue' }, { key: 'myOtherKey', value: 'myOtherValue' }]
1269
+ * ...
1270
+ * ```
1271
+ */
1272
+ get<T = KVValue>(key?: string): Promise<KeyValueTransfer<T>[]>;
1273
+ /**
1274
+ * Lists all keys for the user.
1275
+ * @alpha
1276
+ * @returns A promise that resolves to all keys for the user.
1277
+ * @example
1278
+ * ```ts
1279
+ * ...
1280
+ * const result = await this.kvStorage.list();
1281
+ * logger.debug(result); // ['myKey', 'myOtherKey']
1282
+ * ...
1283
+ * ```
1284
+ */
1285
+ list(): Promise<string[]>;
1286
+ /**
1287
+ * Inserts or updates the specified key-value pairs in the KV storage.
1288
+ * @alpha
1289
+ * @param kvs - The key-value pairs to insert or update.
1290
+ * @returns A promise that resolves to true if the operation was successful, or an object containing error and warning information if the operation failed.
1291
+ * @example
1292
+ * ```ts
1293
+ * ...
1294
+ * const result = await this.kvStorage.put([{ key: 'myKey', value: 'myValue' }]);
1295
+ * logger.debug(result); // true or { ERROR: ..., WARNING: ... }
1296
+ * ...
1297
+ * ```
1298
+ */
1299
+ put(kvs: KeyValue<KVValue>[]): Promise<true | KVEventFailureResponse>;
1300
+ }
1301
+
1302
+ /**
1303
+ * The default configuration for the KVStorage service.
1304
+ * @alpha
1305
+ */
1306
+ export declare const defaultKVStorageConfig: KVStorageConfig;
1307
+
1232
1308
  /**
1233
1309
  * The default implementation for the MetaCache interface.
1234
1310
  * @public
@@ -1808,6 +1884,161 @@ export declare type JwtAuthInfo = {
1808
1884
  domain: string;
1809
1885
  };
1810
1886
 
1887
+ /**
1888
+ * KeyValue interface.
1889
+ * @alpha
1890
+ */
1891
+ export declare interface KeyValue<T = KVValue> {
1892
+ /**
1893
+ * Key
1894
+ * @alpha
1895
+ */
1896
+ key: string;
1897
+ /**
1898
+ * Value
1899
+ * @alpha
1900
+ */
1901
+ value?: T;
1902
+ /**
1903
+ * Time key expires.
1904
+ *
1905
+ * @privateRemarks
1906
+ * Should we clean up with lazy deletion, ie. wait until an access request?
1907
+ *
1908
+ * @alpha
1909
+ */
1910
+ expiration?: number;
1911
+ /**
1912
+ * Value should be encoded.
1913
+ * @alpha
1914
+ */
1915
+ base64?: boolean;
1916
+ /**
1917
+ * Additional metadata.
1918
+ * @alpha
1919
+ */
1920
+ metadata?: {
1921
+ [key: string]: unknown;
1922
+ };
1923
+ }
1924
+
1925
+ /**
1926
+ * KeyValueTransfer interface.
1927
+ *
1928
+ * @alpha
1929
+ */
1930
+ export declare interface KeyValueTransfer<T> {
1931
+ kv: KeyValue<T>;
1932
+ serialize?(value: unknown): unknown;
1933
+ deserialize?(value: unknown): Promise<T>;
1934
+ }
1935
+
1936
+ /**
1937
+ * KVStorage type.
1938
+ * @alpha
1939
+ */
1940
+ export declare type KVEventFailureResponse = {
1941
+ ERROR?: MessageError[];
1942
+ WARNING: any[];
1943
+ };
1944
+
1945
+ /**
1946
+ * KV Event Message types
1947
+ * @alpha
1948
+ */
1949
+ export declare enum KVEventMessageType {
1950
+ EVENT_KEY_VALUE_PUT = "EVENT_KEY_VALUE_PUT",
1951
+ EVENT_KEY_VALUE_DELETE = "EVENT_KEY_VALUE_DELETE"
1952
+ }
1953
+
1954
+ /**
1955
+ * KV Message types
1956
+ * @alpha
1957
+ */
1958
+ export declare enum KVMessageType {
1959
+ REQ_KEY_VALUE_LIST = "REQ_KEY_VALUE_LIST",
1960
+ REQ_KEY_VALUE_READ = "REQ_KEY_VALUE_READ"
1961
+ }
1962
+
1963
+ /**
1964
+ * Represents a KV (key-value) data storage and its capabilities.
1965
+ * Provides methods to set and get items from the KV data storage.
1966
+ *
1967
+ * @remarks
1968
+ * Provides a key value storage api that abstracts the underlying storage technology.
1969
+ *
1970
+ * @privateRemarks
1971
+ * This entire package will likely evolve into a standalone repo; Storage PBC.
1972
+ * Need to create a design document covering how account and namespace ids may come into play.
1973
+ *
1974
+ * @alpha
1975
+ */
1976
+ export declare interface KVStorage {
1977
+ delete(keys: string[]): Promise<true | KVEventFailureResponse>;
1978
+ get<T = KVValue>(key?: string): Promise<KeyValueTransfer<T>[]>;
1979
+ list(): Promise<string[]>;
1980
+ put(kvs: KeyValue<KVValue>[]): Promise<true | KVEventFailureResponse>;
1981
+ }
1982
+
1983
+ /**
1984
+ * The DI token for the KVStorage interface.
1985
+ * @internal
1986
+ */
1987
+ export declare const KVStorage: InterfaceSymbol<KVStorage>;
1988
+
1989
+ /**
1990
+ * KVStorageConfig DI interface.
1991
+ * @alpha
1992
+ */
1993
+ export declare interface KVStorageConfig {
1994
+ /**
1995
+ * The account id to use.
1996
+ *
1997
+ * @privateRemarks
1998
+ * May require access control.
1999
+ *
2000
+ * @alpha
2001
+ */
2002
+ account?: string;
2003
+ /**
2004
+ * The namespace to use.
2005
+ *
2006
+ * @privateRemarks
2007
+ * May require access control.
2008
+ *
2009
+ * @alpha
2010
+ */
2011
+ namespace?: string;
2012
+ /**
2013
+ * Access control auth key.
2014
+ *
2015
+ * @alpha
2016
+ */
2017
+ authKey?: string;
2018
+ /**
2019
+ * Access control auth email.
2020
+ *
2021
+ * @remarks
2022
+ * Part of access requirements and where to report integration issues.
2023
+ *
2024
+ * @alpha
2025
+ */
2026
+ authEmail?: string;
2027
+ }
2028
+
2029
+ /**
2030
+ * KVStorageConfig DI key.
2031
+ *
2032
+ * @internal
2033
+ */
2034
+ export declare const KVStorageConfig: InterfaceSymbol<KVStorageConfig>;
2035
+
2036
+ /**
2037
+ * KVValue type.
2038
+ * @alpha
2039
+ */
2040
+ export declare type KVValue = string | ArrayBuffer;
2041
+
1811
2042
  /**
1812
2043
  * Linear Interval scheduler for reconnect
1813
2044
  * @public
@@ -1880,6 +2111,7 @@ export declare type Message<T = void | any> = {
1880
2111
  SESSION_ID?: string;
1881
2112
  SOURCE_REF?: string;
1882
2113
  USER_NAME?: string;
2114
+ WARNING?: any[];
1883
2115
  };
1884
2116
 
1885
2117
  /**
@@ -2547,7 +2779,7 @@ export declare interface Session {
2547
2779
  }
2548
2780
 
2549
2781
  /**
2550
- * The DI token for the SessionService interface.
2782
+ * The DI token for the Session interface.
2551
2783
  * @internal
2552
2784
  */
2553
2785
  export declare const Session: InterfaceSymbol<Session>;
@@ -27,6 +27,7 @@ export type Message<T = void | any> = {
27
27
  SESSION_ID?: string;
28
28
  SOURCE_REF?: string;
29
29
  USER_NAME?: string;
30
+ WARNING?: any[];
30
31
  };
31
32
  ```
32
33
  **References:** [MessageCode](./foundation-comms.messagecode.md)<!-- -->, [MessageError](./foundation-comms.messageerror.md)<!-- -->, [MessageType](./foundation-comms.messagetype.md)<!-- -->, [EventMessageType](./foundation-comms.eventmessagetype.md)
@@ -742,6 +742,18 @@ export class DefaultHttpConnect implements Connect {
742
742
  // @public
743
743
  export const defaultHttpConnectConfig: HttpConnectConfig;
744
744
 
745
+ // @alpha
746
+ export class DefaultKVStorage implements KVStorage {
747
+ constructor(connect: Connect, kvStorageConfig?: KVStorageConfig);
748
+ delete(keys: string[]): Promise<true | KVEventFailureResponse>;
749
+ get<T = KVValue>(key?: string): Promise<KeyValueTransfer<T>[]>;
750
+ list(): Promise<string[]>;
751
+ put(kvs: KeyValue<KVValue>[]): Promise<true | KVEventFailureResponse>;
752
+ }
753
+
754
+ // @alpha
755
+ export const defaultKVStorageConfig: KVStorageConfig;
756
+
745
757
  // @public
746
758
  export class DefaultMetaCache implements MetaCache {
747
759
  // (undocumented)
@@ -1040,6 +1052,82 @@ export type JwtAuthInfo = {
1040
1052
  domain: string;
1041
1053
  };
1042
1054
 
1055
+ // @alpha
1056
+ export interface KeyValue<T = KVValue> {
1057
+ base64?: boolean;
1058
+ expiration?: number;
1059
+ key: string;
1060
+ metadata?: {
1061
+ [key: string]: unknown;
1062
+ };
1063
+ value?: T;
1064
+ }
1065
+
1066
+ // @alpha
1067
+ export interface KeyValueTransfer<T> {
1068
+ // (undocumented)
1069
+ deserialize?(value: unknown): Promise<T>;
1070
+ // (undocumented)
1071
+ kv: KeyValue<T>;
1072
+ // (undocumented)
1073
+ serialize?(value: unknown): unknown;
1074
+ }
1075
+
1076
+ // @alpha
1077
+ export type KVEventFailureResponse = {
1078
+ ERROR?: MessageError[];
1079
+ WARNING: any[];
1080
+ };
1081
+
1082
+ // @alpha
1083
+ export enum KVEventMessageType {
1084
+ // (undocumented)
1085
+ EVENT_KEY_VALUE_DELETE = "EVENT_KEY_VALUE_DELETE",
1086
+ // (undocumented)
1087
+ EVENT_KEY_VALUE_PUT = "EVENT_KEY_VALUE_PUT"
1088
+ }
1089
+
1090
+ // @alpha
1091
+ export enum KVMessageType {
1092
+ // (undocumented)
1093
+ REQ_KEY_VALUE_LIST = "REQ_KEY_VALUE_LIST",
1094
+ // (undocumented)
1095
+ REQ_KEY_VALUE_READ = "REQ_KEY_VALUE_READ"
1096
+ }
1097
+
1098
+ // Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "KVStorage" because one of its declarations is marked as @internal
1099
+ //
1100
+ // @alpha
1101
+ export interface KVStorage {
1102
+ // (undocumented)
1103
+ delete(keys: string[]): Promise<true | KVEventFailureResponse>;
1104
+ // (undocumented)
1105
+ get<T = KVValue>(key?: string): Promise<KeyValueTransfer<T>[]>;
1106
+ // (undocumented)
1107
+ list(): Promise<string[]>;
1108
+ // (undocumented)
1109
+ put(kvs: KeyValue<KVValue>[]): Promise<true | KVEventFailureResponse>;
1110
+ }
1111
+
1112
+ // @internal
1113
+ export const KVStorage: InterfaceSymbol<KVStorage>;
1114
+
1115
+ // Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "KVStorageConfig" because one of its declarations is marked as @internal
1116
+ //
1117
+ // @alpha
1118
+ export interface KVStorageConfig {
1119
+ account?: string;
1120
+ authEmail?: string;
1121
+ authKey?: string;
1122
+ namespace?: string;
1123
+ }
1124
+
1125
+ // @internal
1126
+ export const KVStorageConfig: InterfaceSymbol<KVStorageConfig>;
1127
+
1128
+ // @alpha
1129
+ export type KVValue = string | ArrayBuffer;
1130
+
1043
1131
  // @public
1044
1132
  export const linearScheduler: SocketReconnectScheduler;
1045
1133
 
@@ -1084,6 +1172,7 @@ export type Message<T = void | any> = {
1084
1172
  SESSION_ID?: string;
1085
1173
  SOURCE_REF?: string;
1086
1174
  USER_NAME?: string;
1175
+ WARNING?: any[];
1087
1176
  };
1088
1177
 
1089
1178
  // Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "MessageBuilder" because one of its declarations is marked as @internal
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-comms",
3
3
  "description": "Genesis Foundation UI Comms",
4
- "version": "14.125.1",
4
+ "version": "14.126.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -59,8 +59,8 @@
59
59
  "test:debug": "genx test --debug"
60
60
  },
61
61
  "devDependencies": {
62
- "@genesislcap/foundation-testing": "14.125.1",
63
- "@genesislcap/genx": "14.125.1",
62
+ "@genesislcap/foundation-testing": "14.126.0",
63
+ "@genesislcap/genx": "14.126.0",
64
64
  "@types/js-cookie": "^3.0.2",
65
65
  "@types/json-schema": "^7.0.11",
66
66
  "@types/webappsec-credential-management": "^0.6.2",
@@ -68,8 +68,8 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@finos/fdc3": "^1.2.0",
71
- "@genesislcap/foundation-logger": "14.125.1",
72
- "@genesislcap/foundation-utils": "14.125.1",
71
+ "@genesislcap/foundation-logger": "14.126.0",
72
+ "@genesislcap/foundation-utils": "14.126.0",
73
73
  "@microsoft/fast-element": "^1.7.0",
74
74
  "@microsoft/fast-foundation": "^2.33.2",
75
75
  "analytics": "^0.8.0",
@@ -86,5 +86,5 @@
86
86
  "publishConfig": {
87
87
  "access": "public"
88
88
  },
89
- "gitHead": "1c6f03b9dccb2332ab68e08f66ecc4f4011b604b"
89
+ "gitHead": "726c78d9ec85c2d1b308d070eb090db8b68e421d"
90
90
  }