quidproquo-core 0.0.140 → 0.0.142

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 (49) hide show
  1. package/lib/commonjs/actions/eventBus/EventBusSendMessageActionTypes.d.ts +0 -4
  2. package/lib/commonjs/actions/file/FileActionType.d.ts +5 -3
  3. package/lib/commonjs/actions/file/FileDeleteActionRequester.d.ts +1 -2
  4. package/lib/commonjs/actions/file/FileDeleteActionTypes.d.ts +2 -2
  5. package/lib/commonjs/actions/file/FileExistsActionRequester.d.ts +1 -2
  6. package/lib/commonjs/actions/file/FileExistsActionTypes.d.ts +2 -2
  7. package/lib/commonjs/actions/file/FileListDirectoryActionRequester.d.ts +3 -3
  8. package/lib/commonjs/actions/file/FileListDirectoryActionTypes.d.ts +2 -2
  9. package/lib/commonjs/actions/file/FileReadBinaryContentsActionRequester.d.ts +1 -2
  10. package/lib/commonjs/actions/file/FileReadBinaryContentsActionTypes.d.ts +2 -2
  11. package/lib/commonjs/actions/file/FileReadTextContentsActionRequester.d.ts +1 -2
  12. package/lib/commonjs/actions/file/FileReadTextContentsActionTypes.d.ts +2 -2
  13. package/lib/commonjs/actions/file/FileWriteBinaryContentsActionRequester.d.ts +2 -2
  14. package/lib/commonjs/actions/file/FileWriteBinaryContentsActionRequester.js +2 -1
  15. package/lib/commonjs/actions/file/FileWriteBinaryContentsActionTypes.d.ts +3 -2
  16. package/lib/commonjs/actions/file/FileWriteTextContentsActionRequester.d.ts +2 -2
  17. package/lib/commonjs/actions/file/FileWriteTextContentsActionRequester.js +2 -1
  18. package/lib/commonjs/actions/file/FileWriteTextContentsActionTypes.d.ts +3 -2
  19. package/lib/commonjs/actions/keyValueStore/KeyValueStoreDeleteActionRequester.d.ts +1 -2
  20. package/lib/commonjs/actions/keyValueStore/KeyValueStoreDeleteActionTypes.d.ts +1 -2
  21. package/lib/commonjs/actions/keyValueStore/KeyValueStoreGetActionRequester.d.ts +1 -2
  22. package/lib/commonjs/actions/keyValueStore/KeyValueStoreGetActionTypes.d.ts +1 -2
  23. package/lib/commonjs/actions/keyValueStore/KeyValueStoreGetAllActionRequester.d.ts +1 -2
  24. package/lib/commonjs/actions/keyValueStore/KeyValueStoreGetAllActionTypes.d.ts +1 -2
  25. package/lib/commonjs/actions/keyValueStore/KeyValueStoreQueryActionRequester.d.ts +1 -2
  26. package/lib/commonjs/actions/keyValueStore/KeyValueStoreQueryActionTypes.d.ts +2 -2
  27. package/lib/commonjs/actions/keyValueStore/KeyValueStoreScanActionRequester.d.ts +1 -2
  28. package/lib/commonjs/actions/keyValueStore/KeyValueStoreScanActionTypes.d.ts +1 -2
  29. package/lib/commonjs/actions/keyValueStore/KeyValueStoreUpdateActionRequester.d.ts +1 -2
  30. package/lib/commonjs/actions/keyValueStore/KeyValueStoreUpdateActionTypes.d.ts +1 -2
  31. package/lib/commonjs/actions/keyValueStore/KeyValueStoreUpsertActionRequester.d.ts +1 -2
  32. package/lib/commonjs/actions/keyValueStore/KeyValueStoreUpsertActionTypes.d.ts +1 -2
  33. package/lib/commonjs/config/settings/eventBus.d.ts +1 -30
  34. package/lib/commonjs/config/settings/eventBus.js +2 -0
  35. package/lib/commonjs/config/settings/keyValueStore.d.ts +2 -0
  36. package/lib/commonjs/config/settings/keyValueStore.js +1 -0
  37. package/lib/commonjs/config/settings/queue.d.ts +2 -3
  38. package/lib/commonjs/config/settings/storageDrive.d.ts +72 -0
  39. package/lib/commonjs/config/settings/storageDrive.js +56 -1
  40. package/lib/commonjs/qpqCoreUtils.d.ts +7 -2
  41. package/lib/commonjs/qpqCoreUtils.js +48 -6
  42. package/lib/commonjs/stories/dateTime/askGetCurrentEpoch.d.ts +2 -0
  43. package/lib/commonjs/stories/dateTime/askGetCurrentEpoch.js +13 -0
  44. package/lib/commonjs/stories/dateTime/index.d.ts +1 -0
  45. package/lib/commonjs/stories/dateTime/index.js +17 -0
  46. package/lib/commonjs/stories/index.d.ts +1 -0
  47. package/lib/commonjs/stories/index.js +1 -0
  48. package/lib/commonjs/types/CrossModuleOwner.d.ts +6 -1
  49. package/package.json +1 -1
@@ -5,10 +5,6 @@ export type EventBusMessage<T> = CrossModuleMessage<T>;
5
5
  export interface EventBusSendMessageOptions<T> {
6
6
  eventBusName: string;
7
7
  eventBusMessages: EventBusMessage<T>[];
8
- moduleOverride?: string;
9
- environmentOverride?: string;
10
- featureOverride?: string;
11
- applicationOverride?: string;
12
8
  }
13
9
  export interface EventBusSendMessageActionPayload<T> extends EventBusSendMessageOptions<T> {
14
10
  context: QpqContext<any>;
@@ -1,4 +1,4 @@
1
- import { CrossServiceResourceName, ResourceName } from '../../types';
1
+ import { StorageDriveTier } from "../../config";
2
2
  export declare enum FileActionType {
3
3
  ReadTextContents = "@quidproquo-core/File/ReadTextContents",
4
4
  WriteTextContents = "@quidproquo-core/File/WriteTextContents",
@@ -11,7 +11,7 @@ export declare enum FileActionType {
11
11
  export declare const filePathDelimiter = "/";
12
12
  export interface FileInfo {
13
13
  filepath: string;
14
- drive: CrossServiceResourceName;
14
+ drive: string;
15
15
  isDir: boolean;
16
16
  hashMd5?: string;
17
17
  }
@@ -19,4 +19,6 @@ export interface DirectoryList {
19
19
  fileInfos: FileInfo[];
20
20
  pageToken?: string;
21
21
  }
22
- export type DriveName = ResourceName;
22
+ export interface StorageDriveAdvancedWriteOptions {
23
+ storageDriveTier?: StorageDriveTier;
24
+ }
@@ -1,3 +1,2 @@
1
1
  import { FileDeleteActionRequester } from './FileDeleteActionTypes';
2
- import { DriveName } from './FileActionType';
3
- export declare function askFileDelete(drive: DriveName, filepaths: string[]): FileDeleteActionRequester;
2
+ export declare function askFileDelete(drive: string, filepaths: string[]): FileDeleteActionRequester;
@@ -1,7 +1,7 @@
1
1
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
2
- import { FileActionType, DriveName } from './FileActionType';
2
+ import { FileActionType } from './FileActionType';
3
3
  export interface FileDeleteActionPayload {
4
- drive: DriveName;
4
+ drive: string;
5
5
  filepaths: string[];
6
6
  }
7
7
  export interface FileDeleteAction extends Action<FileDeleteActionPayload> {
@@ -1,3 +1,2 @@
1
1
  import { FileExistsActionRequester } from './FileExistsActionTypes';
2
- import { DriveName } from './FileActionType';
3
- export declare function askFileExists(drive: DriveName, filepath: string): FileExistsActionRequester;
2
+ export declare function askFileExists(drive: string, filepath: string): FileExistsActionRequester;
@@ -1,7 +1,7 @@
1
1
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
2
- import { FileActionType, DriveName } from './FileActionType';
2
+ import { FileActionType } from './FileActionType';
3
3
  export interface FileExistsActionPayload {
4
- drive: DriveName;
4
+ drive: string;
5
5
  filepath: string;
6
6
  }
7
7
  export interface FileExistsAction extends Action<FileExistsActionPayload> {
@@ -1,5 +1,5 @@
1
1
  import { FileListDirectoryActionRequester } from './FileListDirectoryActionTypes';
2
- import { FileInfo, DriveName } from './FileActionType';
2
+ import { FileInfo } from './FileActionType';
3
3
  import { AskResponse } from '../../types/StorySession';
4
- export declare function askFileListDirectory(drive: DriveName, folderPath: string, maxFiles?: number, pageToken?: string): FileListDirectoryActionRequester;
5
- export declare function askFileListAllDirectory(drive: DriveName, folderPath: string): AskResponse<FileInfo[]>;
4
+ export declare function askFileListDirectory(drive: string, folderPath: string, maxFiles?: number, pageToken?: string): FileListDirectoryActionRequester;
5
+ export declare function askFileListAllDirectory(drive: string, folderPath: string): AskResponse<FileInfo[]>;
@@ -1,7 +1,7 @@
1
1
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
2
- import { FileActionType, DirectoryList, DriveName } from './FileActionType';
2
+ import { FileActionType, DirectoryList } from './FileActionType';
3
3
  export interface FileListDirectoryActionPayload {
4
- drive: DriveName;
4
+ drive: string;
5
5
  folderPath: string;
6
6
  maxFiles: number;
7
7
  pageToken?: string;
@@ -1,3 +1,2 @@
1
1
  import { FileReadBinaryContentsActionRequester } from './FileReadBinaryContentsActionTypes';
2
- import { DriveName } from './FileActionType';
3
- export declare function askFileReadBinaryContents(drive: DriveName, filepath: string): FileReadBinaryContentsActionRequester;
2
+ export declare function askFileReadBinaryContents(drive: string, filepath: string): FileReadBinaryContentsActionRequester;
@@ -1,8 +1,8 @@
1
1
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
2
2
  import { QPQBinaryData } from '../../types/QPQBinaryData';
3
- import { FileActionType, DriveName } from './FileActionType';
3
+ import { FileActionType } from './FileActionType';
4
4
  export interface FileReadBinaryContentsActionPayload {
5
- drive: DriveName;
5
+ drive: string;
6
6
  filepath: string;
7
7
  }
8
8
  export interface FileReadBinaryContentsAction extends Action<FileReadBinaryContentsActionPayload> {
@@ -1,3 +1,2 @@
1
1
  import { FileReadTextContentsActionRequester } from './FileReadTextContentsActionTypes';
2
- import { DriveName } from './FileActionType';
3
- export declare function askFileReadTextContents(drive: DriveName, filepath: string): FileReadTextContentsActionRequester;
2
+ export declare function askFileReadTextContents(drive: string, filepath: string): FileReadTextContentsActionRequester;
@@ -1,7 +1,7 @@
1
1
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
2
- import { FileActionType, DriveName } from './FileActionType';
2
+ import { FileActionType } from './FileActionType';
3
3
  export interface FileReadTextContentsActionPayload {
4
- drive: DriveName;
4
+ drive: string;
5
5
  filepath: string;
6
6
  }
7
7
  export interface FileReadTextContentsAction extends Action<FileReadTextContentsActionPayload> {
@@ -1,4 +1,4 @@
1
1
  import { QPQBinaryData } from '../../types/QPQBinaryData';
2
2
  import { FileWriteBinaryContentsActionRequester } from './FileWriteBinaryContentsActionTypes';
3
- import { DriveName } from './FileActionType';
4
- export declare function askFileWriteBinaryContents(drive: DriveName, filepath: string, data: QPQBinaryData): FileWriteBinaryContentsActionRequester;
3
+ import { StorageDriveAdvancedWriteOptions } from './FileActionType';
4
+ export declare function askFileWriteBinaryContents(drive: string, filepath: string, data: QPQBinaryData, storageDriveAdvancedWriteOptions?: StorageDriveAdvancedWriteOptions): FileWriteBinaryContentsActionRequester;
@@ -2,13 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.askFileWriteBinaryContents = void 0;
4
4
  const FileActionType_1 = require("./FileActionType");
5
- function* askFileWriteBinaryContents(drive, filepath, data) {
5
+ function* askFileWriteBinaryContents(drive, filepath, data, storageDriveAdvancedWriteOptions) {
6
6
  return yield {
7
7
  type: FileActionType_1.FileActionType.WriteBinaryContents,
8
8
  payload: {
9
9
  drive,
10
10
  filepath,
11
11
  data,
12
+ storageDriveAdvancedWriteOptions
12
13
  },
13
14
  };
14
15
  }
@@ -1,10 +1,11 @@
1
1
  import { QPQBinaryData } from '../../types/QPQBinaryData';
2
2
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
3
- import { FileActionType, DriveName } from './FileActionType';
3
+ import { FileActionType, StorageDriveAdvancedWriteOptions } from './FileActionType';
4
4
  export interface FileWriteBinaryContentsActionPayload {
5
- drive: DriveName;
5
+ drive: string;
6
6
  filepath: string;
7
7
  data: QPQBinaryData;
8
+ storageDriveAdvancedWriteOptions?: StorageDriveAdvancedWriteOptions;
8
9
  }
9
10
  export interface FileWriteBinaryContentsAction extends Action<FileWriteBinaryContentsActionPayload> {
10
11
  type: FileActionType.WriteBinaryContents;
@@ -1,3 +1,3 @@
1
1
  import { FileWriteTextContentsActionRequester } from './FileWriteTextContentsActionTypes';
2
- import { DriveName } from './FileActionType';
3
- export declare function askFileWriteTextContents(drive: DriveName, filepath: string, data: string): FileWriteTextContentsActionRequester;
2
+ import { StorageDriveAdvancedWriteOptions } from './FileActionType';
3
+ export declare function askFileWriteTextContents(drive: string, filepath: string, data: string, storageDriveAdvancedWriteOptions?: StorageDriveAdvancedWriteOptions): FileWriteTextContentsActionRequester;
@@ -2,13 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.askFileWriteTextContents = void 0;
4
4
  const FileActionType_1 = require("./FileActionType");
5
- function* askFileWriteTextContents(drive, filepath, data) {
5
+ function* askFileWriteTextContents(drive, filepath, data, storageDriveAdvancedWriteOptions) {
6
6
  return yield {
7
7
  type: FileActionType_1.FileActionType.WriteTextContents,
8
8
  payload: {
9
9
  drive,
10
10
  filepath,
11
11
  data,
12
+ storageDriveAdvancedWriteOptions
12
13
  },
13
14
  };
14
15
  }
@@ -1,9 +1,10 @@
1
1
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
2
- import { FileActionType, DriveName } from './FileActionType';
2
+ import { FileActionType, StorageDriveAdvancedWriteOptions } from './FileActionType';
3
3
  export interface FileWriteTextContentsActionPayload {
4
- drive: DriveName;
4
+ drive: string;
5
5
  filepath: string;
6
6
  data: string;
7
+ storageDriveAdvancedWriteOptions?: StorageDriveAdvancedWriteOptions;
7
8
  }
8
9
  export interface FileWriteTextContentsAction extends Action<FileWriteTextContentsActionPayload> {
9
10
  type: FileActionType.WriteTextContents;
@@ -1,4 +1,3 @@
1
1
  import { KeyValueStoreDeleteActionRequester, KeyValueStoreDeleteOptions } from './KeyValueStoreDeleteActionTypes';
2
2
  import { KvsCoreDataType } from './types';
3
- import { ResourceName } from '../../types';
4
- export declare function askKeyValueStoreDelete(keyValueStoreName: ResourceName, key: KvsCoreDataType, sortKey?: KvsCoreDataType, options?: KeyValueStoreDeleteOptions): KeyValueStoreDeleteActionRequester;
3
+ export declare function askKeyValueStoreDelete(keyValueStoreName: string, key: KvsCoreDataType, sortKey?: KvsCoreDataType, options?: KeyValueStoreDeleteOptions): KeyValueStoreDeleteActionRequester;
@@ -1,11 +1,10 @@
1
1
  import { KeyValueStoreActionType } from './KeyValueStoreActionType';
2
2
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
3
3
  import { KvsCoreDataType } from './types';
4
- import { ResourceName } from '../../types';
5
4
  export interface KeyValueStoreDeleteOptions {
6
5
  }
7
6
  export interface KeyValueStoreDeleteActionPayload {
8
- keyValueStoreName: ResourceName;
7
+ keyValueStoreName: string;
9
8
  key: KvsCoreDataType;
10
9
  sortKey?: KvsCoreDataType;
11
10
  options?: KeyValueStoreDeleteOptions;
@@ -1,3 +1,2 @@
1
1
  import { KeyValueStoreGetActionRequester, KeyValueStoreGetOptions } from './KeyValueStoreGetActionTypes';
2
- import { ResourceName } from '../../types';
3
- export declare function askKeyValueStoreGet<Value>(keyValueStoreName: ResourceName, key: string, options?: KeyValueStoreGetOptions): KeyValueStoreGetActionRequester<Value>;
2
+ export declare function askKeyValueStoreGet<Value>(keyValueStoreName: string, key: string, options?: KeyValueStoreGetOptions): KeyValueStoreGetActionRequester<Value>;
@@ -1,10 +1,9 @@
1
1
  import { KeyValueStoreActionType } from './KeyValueStoreActionType';
2
2
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
3
- import { ResourceName } from '../../types';
4
3
  export interface KeyValueStoreGetOptions {
5
4
  }
6
5
  export interface KeyValueStoreGetActionPayload {
7
- keyValueStoreName: ResourceName;
6
+ keyValueStoreName: string;
8
7
  key: string;
9
8
  options?: KeyValueStoreGetOptions;
10
9
  }
@@ -1,3 +1,2 @@
1
1
  import { KeyValueStoreGetAllActionRequester, KeyValueStoreGetAllOptions } from './KeyValueStoreGetAllActionTypes';
2
- import { ResourceName } from '../../types';
3
- export declare function askKeyValueStoreGetAll<Value>(keyValueStoreName: ResourceName, options?: KeyValueStoreGetAllOptions): KeyValueStoreGetAllActionRequester<Value>;
2
+ export declare function askKeyValueStoreGetAll<Value>(keyValueStoreName: string, options?: KeyValueStoreGetAllOptions): KeyValueStoreGetAllActionRequester<Value>;
@@ -2,9 +2,8 @@ import { KeyValueStoreActionType } from './KeyValueStoreActionType';
2
2
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
3
3
  export interface KeyValueStoreGetAllOptions {
4
4
  }
5
- import { ResourceName } from '../../types';
6
5
  export interface KeyValueStoreGetAllActionPayload {
7
- keyValueStoreName: ResourceName;
6
+ keyValueStoreName: string;
8
7
  options?: KeyValueStoreGetAllOptions;
9
8
  }
10
9
  export interface KeyValueStoreGetAllAction<Value> extends Action<KeyValueStoreGetAllActionPayload> {
@@ -1,4 +1,3 @@
1
1
  import { KeyValueStoreQueryActionRequester } from './KeyValueStoreQueryActionTypes';
2
2
  import { KvsQueryOperation } from './types';
3
- import { ResourceName } from '../../types';
4
- export declare function askKeyValueStoreQuery<KvsItem>(keyValueStoreName: ResourceName, keyCondition: KvsQueryOperation, filterCondition?: KvsQueryOperation, nextPageKey?: string): KeyValueStoreQueryActionRequester<KvsItem>;
3
+ export declare function askKeyValueStoreQuery<KvsItem>(keyValueStoreName: string, keyCondition: KvsQueryOperation, filterCondition?: KvsQueryOperation, nextPageKey?: string): KeyValueStoreQueryActionRequester<KvsItem>;
@@ -1,12 +1,12 @@
1
1
  import { KeyValueStoreActionType } from './KeyValueStoreActionType';
2
2
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
3
3
  import { KvsQueryOperation } from './types';
4
- import { ResourceName, QpqPagedData } from '../../types';
4
+ import { QpqPagedData } from '../../types';
5
5
  export interface KeyValueStoreQueryOptions {
6
6
  ttlInSeconds?: number;
7
7
  }
8
8
  export interface KeyValueStoreQueryActionPayload {
9
- keyValueStoreName: ResourceName;
9
+ keyValueStoreName: string;
10
10
  keyCondition: KvsQueryOperation;
11
11
  filterCondition?: KvsQueryOperation;
12
12
  nextPageKey?: string;
@@ -1,4 +1,3 @@
1
1
  import { KeyValueStoreScanActionRequester } from './KeyValueStoreScanActionTypes';
2
2
  import { KvsQueryOperation } from './types';
3
- import { ResourceName } from '../../types';
4
- export declare function askKeyValueStoreScan<KvsItem>(keyValueStoreName: ResourceName, filterCondition?: KvsQueryOperation, nextPageKey?: string): KeyValueStoreScanActionRequester<KvsItem>;
3
+ export declare function askKeyValueStoreScan<KvsItem>(keyValueStoreName: string, filterCondition?: KvsQueryOperation, nextPageKey?: string): KeyValueStoreScanActionRequester<KvsItem>;
@@ -2,13 +2,12 @@ import { QpqPagedData } from '../../types';
2
2
  import { KeyValueStoreActionType } from './KeyValueStoreActionType';
3
3
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
4
4
  import { KvsQueryOperation } from './types';
5
- import { ResourceName } from '../../types';
6
5
  export interface KeyValueStoreScanOptions {
7
6
  ttlInSeconds?: number;
8
7
  limit?: number;
9
8
  }
10
9
  export interface KeyValueStoreScanActionPayload {
11
- keyValueStoreName: ResourceName;
10
+ keyValueStoreName: string;
12
11
  filterCondition?: KvsQueryOperation;
13
12
  nextPageKey?: string;
14
13
  }
@@ -1,4 +1,3 @@
1
1
  import { KeyValueStoreUpdateActionRequester, KeyValueStoreUpdateOptions } from './KeyValueStoreUpdateActionTypes';
2
2
  import { KvsCoreDataType, KvsUpdate } from './types';
3
- import { ResourceName } from '../../types';
4
- export declare function askKeyValueStoreUpdate<Value>(keyValueStoreName: ResourceName, updates: KvsUpdate, key: KvsCoreDataType, sortKey?: KvsCoreDataType, options?: KeyValueStoreUpdateOptions): KeyValueStoreUpdateActionRequester<Value>;
3
+ export declare function askKeyValueStoreUpdate<Value>(keyValueStoreName: string, updates: KvsUpdate, key: KvsCoreDataType, sortKey?: KvsCoreDataType, options?: KeyValueStoreUpdateOptions): KeyValueStoreUpdateActionRequester<Value>;
@@ -1,11 +1,10 @@
1
1
  import { KeyValueStoreActionType } from './KeyValueStoreActionType';
2
2
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
3
3
  import { KvsUpdate, KvsCoreDataType } from './types';
4
- import { ResourceName } from '../../types';
5
4
  export interface KeyValueStoreUpdateOptions {
6
5
  }
7
6
  export interface KeyValueStoreUpdateActionPayload<Value> {
8
- keyValueStoreName: ResourceName;
7
+ keyValueStoreName: string;
9
8
  key: KvsCoreDataType;
10
9
  sortKey?: KvsCoreDataType;
11
10
  updates: KvsUpdate;
@@ -1,3 +1,2 @@
1
1
  import { KeyValueStoreUpsertActionRequester, KeyValueStoreUpsertOptions } from './KeyValueStoreUpsertActionTypes';
2
- import { ResourceName } from '../../types';
3
- export declare function askKeyValueStoreUpsert<KvsItem>(keyValueStoreName: ResourceName, item: KvsItem, options?: KeyValueStoreUpsertOptions): KeyValueStoreUpsertActionRequester<KvsItem>;
2
+ export declare function askKeyValueStoreUpsert<KvsItem>(keyValueStoreName: string, item: KvsItem, options?: KeyValueStoreUpsertOptions): KeyValueStoreUpsertActionRequester<KvsItem>;
@@ -1,11 +1,10 @@
1
1
  import { KeyValueStoreActionType } from './KeyValueStoreActionType';
2
2
  import { Action, ActionProcessor, ActionRequester } from '../../types/Action';
3
- import { ResourceName } from '../../types';
4
3
  export interface KeyValueStoreUpsertOptions {
5
4
  ttlInSeconds?: number;
6
5
  }
7
6
  export interface KeyValueStoreUpsertActionPayload<KvsItem> {
8
- keyValueStoreName: ResourceName;
7
+ keyValueStoreName: string;
9
8
  item: KvsItem;
10
9
  options?: KeyValueStoreUpsertOptions;
11
10
  }
@@ -1,36 +1,7 @@
1
1
  import { CrossModuleOwner } from '../../types';
2
2
  import { QPQConfigSetting, QPQConfigAdvancedSettings } from '../QPQConfig';
3
- /**
4
- * Represents detailed information about a subscription to an event bus.
5
- * It includes the name of the event bus ('eventBusName') as well as the module, environment, and application
6
- * where the event bus is deployed.
7
- * An optional 'feature' property can be included to further specify the subscription details.
8
- * This type is typically used when complete information about the event bus subscription is available and needed.
9
- */
10
- export type EventBusSubscriptionDetails = {
11
- eventBusName: string;
12
- module: string;
13
- environment: string;
14
- application: string;
15
- feature?: string;
16
- };
17
- /**
18
- * This type is a variation of EventBusSubscriptionDetails where all properties except 'eventBusName' are optional.
19
- * If the optional properties are not provided, they are inferred from the context of the service that is being deployed.
20
- * This provides flexibility, allowing for detailed specification of the event bus subscription when needed,
21
- * while also allowing for simpler usage when the service context can provide the necessary details.
22
- */
23
- export type PartialEventBusSubscriptionDetails = Pick<EventBusSubscriptionDetails, 'eventBusName'> & Partial<Omit<EventBusSubscriptionDetails, 'eventBusName'>>;
24
- /**
25
- * This type represents a subscription to an event bus. It can either be a simple string representing the event bus name,
26
- * or a more detailed object describing the subscription. The detailed object is represented by the
27
- * PartialEventBusSubscriptionDetails type and includes the name of the event bus and optionally additional properties.
28
- * This type provides flexibility, allowing for both simple subscriptions where only the bus name is needed,
29
- * as well as more detailed subscriptions where additional context is necessary.
30
- */
31
- export type EventBusSubscription = PartialEventBusSubscriptionDetails | string;
32
3
  export interface QPQConfigAdvancedEventBusSettings extends QPQConfigAdvancedSettings {
33
- owner?: CrossModuleOwner;
4
+ owner?: CrossModuleOwner<'eventBusName'>;
34
5
  }
35
6
  export interface EventBusQPQConfigSetting extends QPQConfigSetting {
36
7
  name: string;
@@ -1,11 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defineEventBus = void 0;
4
+ const qpqCoreUtils_1 = require("../../qpqCoreUtils");
4
5
  const QPQConfig_1 = require("../QPQConfig");
5
6
  const defineEventBus = (name, options) => ({
6
7
  configSettingType: QPQConfig_1.QPQCoreConfigSettingType.eventBus,
7
8
  uniqueKey: name,
8
9
  name,
9
10
  deprecated: !!(options === null || options === void 0 ? void 0 : options.deprecated),
11
+ owner: (0, qpqCoreUtils_1.convertCrossModuleOwnerToGenericResourceNameOverride)(options === null || options === void 0 ? void 0 : options.owner),
10
12
  });
11
13
  exports.defineEventBus = defineEventBus;
@@ -19,6 +19,7 @@ export interface QPQConfigAdvancedKeyValueStoreSettings extends QPQConfigAdvance
19
19
  indexes?: CompositeKvsIndex[];
20
20
  global?: boolean;
21
21
  owner?: CrossModuleOwner;
22
+ ttlAttribute?: string;
22
23
  }
23
24
  export interface KeyValueStoreQPQConfigSetting extends QPQConfigSetting {
24
25
  keyValueStoreName: string;
@@ -26,6 +27,7 @@ export interface KeyValueStoreQPQConfigSetting extends QPQConfigSetting {
26
27
  sortKeys: KvsKey[];
27
28
  indexes: KvsIndex[];
28
29
  global: boolean;
30
+ ttlAttribute?: string;
29
31
  }
30
32
  export declare const defineKeyValueStore: (keyValueStoreName: string, partitionKey: CompositeKvsKey, sortKeys?: CompositeKvsKey[], options?: QPQConfigAdvancedKeyValueStoreSettings) => KeyValueStoreQPQConfigSetting;
31
33
  export {};
@@ -37,6 +37,7 @@ const defineKeyValueStore = (keyValueStoreName, partitionKey, sortKeys = [], opt
37
37
  indexes: ((_a = options === null || options === void 0 ? void 0 : options.indexes) !== null && _a !== void 0 ? _a : []).map(convertCompositeKvsIndexToKvsIndex),
38
38
  global: (_b = options === null || options === void 0 ? void 0 : options.global) !== null && _b !== void 0 ? _b : false,
39
39
  owner: options === null || options === void 0 ? void 0 : options.owner,
40
+ ttlAttribute: options === null || options === void 0 ? void 0 : options.ttlAttribute,
40
41
  });
41
42
  };
42
43
  exports.defineKeyValueStore = defineKeyValueStore;
@@ -1,5 +1,4 @@
1
1
  import { QPQConfigSetting, QPQConfigAdvancedSettings } from '../QPQConfig';
2
- import { EventBusSubscription } from './eventBus';
3
2
  export interface QpqSourceEntry {
4
3
  src: string;
5
4
  runtime: string;
@@ -14,7 +13,7 @@ export interface QPQConfigAdvancedQueueSettings extends QPQConfigAdvancedSetting
14
13
  maxTries?: number;
15
14
  ttRetryInSeconds?: number;
16
15
  hasDeadLetterQueue?: boolean;
17
- eventBusSubscriptions?: EventBusSubscription[];
16
+ eventBusSubscriptions?: string[];
18
17
  maxConcurrentExecutions?: number;
19
18
  }
20
19
  export interface QueueQPQConfigSetting extends QPQConfigSetting {
@@ -27,7 +26,7 @@ export interface QueueQPQConfigSetting extends QPQConfigSetting {
27
26
  ttRetryInSeconds: number;
28
27
  hasDeadLetterQueue: boolean;
29
28
  qpqQueueProcessors: QpqQueueProcessors;
30
- eventBusSubscriptions: EventBusSubscription[];
29
+ eventBusSubscriptions: string[];
31
30
  maxConcurrentExecutions?: number;
32
31
  }
33
32
  export declare const defineQueue: (name: string, buildPath: string, processors: QpqQueueProcessors, options?: QPQConfigAdvancedQueueSettings) => QueueQPQConfigSetting;
@@ -1,9 +1,78 @@
1
1
  import { QpqSourceEntry } from './queue';
2
2
  import { QPQConfigSetting, QPQConfigAdvancedSettings } from '../QPQConfig';
3
+ import { CrossModuleOwner } from '../../types';
4
+ /**
5
+ * Represents different storage tiers for a "storageDrive".
6
+ */
7
+ export declare enum StorageDriveTier {
8
+ /**
9
+ * Standard storage tier suitable for frequently accessed data.
10
+ * (Reference: AWS S3 Standard)
11
+ */
12
+ REGULAR = "REGULAR",
13
+ /**
14
+ * Storage tier optimized for data that is accessed less frequently,
15
+ * but requires rapid access when needed. Lower availability compared
16
+ * to the REGULAR tier.
17
+ * (Reference: AWS S3 Infrequent Access)
18
+ */
19
+ OCCASIONAL_ACCESS = "OCCASIONAL_ACCESS",
20
+ /**
21
+ * Optimized for infrequently accessed data stored in a single zone.
22
+ * Lower availability compared to OCCASIONAL_ACCESS tier.
23
+ * (Reference: AWS S3 One Zone-Infrequent Access)
24
+ */
25
+ SINGLE_ZONE_OCCASIONAL_ACCESS = "SINGLE_ZONE_OCCASIONAL_ACCESS",
26
+ /**
27
+ * Cold storage tier suitable for long-term archival. Data retrieval
28
+ * can take between minutes to hours. A cost-effective solution for
29
+ * archival purposes where prompt data retrieval isn't crucial.
30
+ * (Reference: AWS S3 Glacier)
31
+ */
32
+ COLD_STORAGE = "COLD_STORAGE",
33
+ /**
34
+ * Cold storage tier optimized for long-term archival, but with the advantage
35
+ * of immediate data access (in milliseconds). Ideal for data that might be
36
+ * accessed once or twice per quarter.
37
+ * (Reference: AWS S3 Glacier Instant Retrieval)
38
+ */
39
+ COLD_STORAGE_INSTANT_ACCESS = "COLD_STORAGE_INSTANT_ACCESS",
40
+ /**
41
+ * Extremely cold storage suitable for data that's rarely accessed.
42
+ * Data retrieval might take up to 12 hours. This offers the lowest
43
+ * storage cost at the expense of retrieval time.
44
+ * (Reference: AWS S3 Glacier Deep Archive)
45
+ */
46
+ DEEP_COLD_STORAGE = "DEEP_COLD_STORAGE",
47
+ /**
48
+ * Dynamic storage tier designed to auto-optimize costs by moving data
49
+ * between frequently and infrequently accessed tiers based on access patterns.
50
+ * Ideal for long-lived data with unpredictable access patterns.
51
+ * (Reference: AWS S3 Intelligent Tiering)
52
+ */
53
+ SMART_TIERING = "SMART_TIERING"
54
+ }
3
55
  export declare enum StorageDriveEvent {
4
56
  CREATED = "CREATED",
5
57
  DELETED = "DELETED"
6
58
  }
59
+ export type StorageDriveTransition = {
60
+ storageDriveTier: StorageDriveTier;
61
+ } & ({
62
+ transitionAfterDays: number;
63
+ transitionDate?: never;
64
+ } | {
65
+ transitionAfterDays?: never;
66
+ transitionDate: string;
67
+ });
68
+ export type StorageDriveLifecycleRule = {
69
+ prefix?: string;
70
+ transitions?: StorageDriveTransition[];
71
+ deleteAfterDays?: number;
72
+ fileSizeLessThan?: number;
73
+ fileSizeGreaterThan?: number;
74
+ enabled?: boolean;
75
+ };
7
76
  export interface StorageDriveEvents {
8
77
  buildPath: string;
9
78
  create?: QpqSourceEntry;
@@ -13,11 +82,14 @@ export interface QPQConfigAdvancedStorageDriveSettings extends QPQConfigAdvanced
13
82
  copyPath?: string;
14
83
  global?: boolean;
15
84
  onEvent?: StorageDriveEvents;
85
+ lifecycleRules?: StorageDriveLifecycleRule[];
86
+ owner?: CrossModuleOwner<'storageDriveName'>;
16
87
  }
17
88
  export interface StorageDriveQPQConfigSetting extends QPQConfigSetting {
18
89
  storageDrive: string;
19
90
  copyPath?: string;
20
91
  global: boolean;
21
92
  onEvent?: StorageDriveEvents;
93
+ lifecycleRules?: StorageDriveLifecycleRule[];
22
94
  }
23
95
  export declare const defineStorageDrive: (storageDrive: string, options?: QPQConfigAdvancedStorageDriveSettings) => StorageDriveQPQConfigSetting;
@@ -1,7 +1,60 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defineStorageDrive = exports.StorageDriveEvent = void 0;
3
+ exports.defineStorageDrive = exports.StorageDriveEvent = exports.StorageDriveTier = void 0;
4
4
  const QPQConfig_1 = require("../QPQConfig");
5
+ const qpqCoreUtils_1 = require("../../qpqCoreUtils");
6
+ /**
7
+ * Represents different storage tiers for a "storageDrive".
8
+ */
9
+ var StorageDriveTier;
10
+ (function (StorageDriveTier) {
11
+ /**
12
+ * Standard storage tier suitable for frequently accessed data.
13
+ * (Reference: AWS S3 Standard)
14
+ */
15
+ StorageDriveTier["REGULAR"] = "REGULAR";
16
+ /**
17
+ * Storage tier optimized for data that is accessed less frequently,
18
+ * but requires rapid access when needed. Lower availability compared
19
+ * to the REGULAR tier.
20
+ * (Reference: AWS S3 Infrequent Access)
21
+ */
22
+ StorageDriveTier["OCCASIONAL_ACCESS"] = "OCCASIONAL_ACCESS";
23
+ /**
24
+ * Optimized for infrequently accessed data stored in a single zone.
25
+ * Lower availability compared to OCCASIONAL_ACCESS tier.
26
+ * (Reference: AWS S3 One Zone-Infrequent Access)
27
+ */
28
+ StorageDriveTier["SINGLE_ZONE_OCCASIONAL_ACCESS"] = "SINGLE_ZONE_OCCASIONAL_ACCESS";
29
+ /**
30
+ * Cold storage tier suitable for long-term archival. Data retrieval
31
+ * can take between minutes to hours. A cost-effective solution for
32
+ * archival purposes where prompt data retrieval isn't crucial.
33
+ * (Reference: AWS S3 Glacier)
34
+ */
35
+ StorageDriveTier["COLD_STORAGE"] = "COLD_STORAGE";
36
+ /**
37
+ * Cold storage tier optimized for long-term archival, but with the advantage
38
+ * of immediate data access (in milliseconds). Ideal for data that might be
39
+ * accessed once or twice per quarter.
40
+ * (Reference: AWS S3 Glacier Instant Retrieval)
41
+ */
42
+ StorageDriveTier["COLD_STORAGE_INSTANT_ACCESS"] = "COLD_STORAGE_INSTANT_ACCESS";
43
+ /**
44
+ * Extremely cold storage suitable for data that's rarely accessed.
45
+ * Data retrieval might take up to 12 hours. This offers the lowest
46
+ * storage cost at the expense of retrieval time.
47
+ * (Reference: AWS S3 Glacier Deep Archive)
48
+ */
49
+ StorageDriveTier["DEEP_COLD_STORAGE"] = "DEEP_COLD_STORAGE";
50
+ /**
51
+ * Dynamic storage tier designed to auto-optimize costs by moving data
52
+ * between frequently and infrequently accessed tiers based on access patterns.
53
+ * Ideal for long-lived data with unpredictable access patterns.
54
+ * (Reference: AWS S3 Intelligent Tiering)
55
+ */
56
+ StorageDriveTier["SMART_TIERING"] = "SMART_TIERING";
57
+ })(StorageDriveTier = exports.StorageDriveTier || (exports.StorageDriveTier = {}));
5
58
  var StorageDriveEvent;
6
59
  (function (StorageDriveEvent) {
7
60
  StorageDriveEvent["CREATED"] = "CREATED";
@@ -16,6 +69,8 @@ const defineStorageDrive = (storageDrive, options) => {
16
69
  copyPath: options === null || options === void 0 ? void 0 : options.copyPath,
17
70
  global: (_a = options === null || options === void 0 ? void 0 : options.global) !== null && _a !== void 0 ? _a : false,
18
71
  onEvent: options === null || options === void 0 ? void 0 : options.onEvent,
72
+ lifecycleRules: options === null || options === void 0 ? void 0 : options.lifecycleRules,
73
+ owner: (0, qpqCoreUtils_1.convertCrossModuleOwnerToGenericResourceNameOverride)(options === null || options === void 0 ? void 0 : options.owner),
19
74
  });
20
75
  };
21
76
  exports.defineStorageDrive = defineStorageDrive;
@@ -1,7 +1,7 @@
1
1
  import { QPQConfig, QPQConfigSetting } from './config/QPQConfig';
2
2
  import { ApplicationModuleQPQConfigSetting, StorageDriveQPQConfigSetting, EventBusQPQConfigSetting, ScheduleQPQConfigSetting, SecretQPQConfigSetting, ParameterQPQConfigSetting, QueueQPQConfigSetting, QpqQueueProcessors, UserDirectoryQPQConfigSetting, KeyValueStoreQPQConfigSetting, DeployEventsQPQConfigSetting } from './config/settings';
3
3
  import { EmailTemplates } from './config/settings/emailTemplates/types';
4
- import { CrossServiceResourceName, ResourceName } from './types';
4
+ import { CrossModuleOwner, CrossServiceResourceName, ResourceName } from './types';
5
5
  /**
6
6
  * Flattens a QPQConfig array into a single array of QPQConfigSetting objects.
7
7
  * If a QPQConfigItem has a configSettingType of QPQCoreConfigSettingType.environmentSettings,
@@ -44,15 +44,19 @@ export declare const getConfigRoot: (qpqConfig: QPQConfig) => string;
44
44
  export declare const getApplicationModuleEnvironment: (qpqConfig: QPQConfig) => string;
45
45
  export declare const getApplicationModuleDeployRegion: (qpqConfig: QPQConfig) => string;
46
46
  export declare const getStorageDrives: (configs: QPQConfig) => StorageDriveQPQConfigSetting[];
47
+ export declare const getStorageDriveByName: (storageDriveName: string, configs: QPQConfig) => StorageDriveQPQConfigSetting | undefined;
47
48
  export declare const getQueues: (configs: QPQConfig) => QueueQPQConfigSetting[];
48
49
  export declare const getStorageDriveNames: (configs: QPQConfig) => string[];
49
50
  export declare const getAllEventBusConfigs: (qpqConfig: QPQConfig) => EventBusQPQConfigSetting[];
51
+ export declare const getOwnedEventBusConfigs: (qpqConfig: QPQConfig) => EventBusQPQConfigSetting[];
52
+ export declare const getEventBusConfigByName: (eventBusName: string, qpqConfig: QPQConfig) => EventBusQPQConfigSetting | undefined;
50
53
  export declare const getOwnedItems: <T extends QPQConfigSetting>(settings: T[], qpqConfig: QPQConfig) => T[];
51
54
  export declare const getAllKeyValueStores: (qpqConfig: QPQConfig) => KeyValueStoreQPQConfigSetting[];
52
55
  export declare const getDeployEventConfigs: (qpqConfig: QPQConfig) => DeployEventsQPQConfigSetting[];
53
56
  export declare const getOwnedKeyValueStores: (qpqConfig: QPQConfig) => KeyValueStoreQPQConfigSetting[];
57
+ export declare const getOwnedStorageDrives: (qpqConfig: QPQConfig) => StorageDriveQPQConfigSetting[];
54
58
  export declare const resolveCrossServiceResourceName: (resourceName: ResourceName) => CrossServiceResourceName;
55
- export declare const getKeyValueStoreByName: (qpqConfig: QPQConfig, kvsName: ResourceName) => KeyValueStoreQPQConfigSetting | undefined;
59
+ export declare const getKeyValueStoreByName: (qpqConfig: QPQConfig, kvsName: string) => KeyValueStoreQPQConfigSetting | undefined;
56
60
  export declare const getActionProcessorSources: (configs: QPQConfig) => string[];
57
61
  export declare const getUserDirectoryEmailTemplates: (qpqConfig: QPQConfig) => Record<string, EmailTemplates>;
58
62
  export declare const getScheduleEvents: (configs: QPQConfig) => ScheduleQPQConfigSetting[];
@@ -72,3 +76,4 @@ export declare const getStorageDriveUploadFullPath: (qpqConfig: QPQConfig, stora
72
76
  export declare const getQueueEntryFullPath: (qpqConfig: QPQConfig, queueConfig: QueueQPQConfigSetting) => string;
73
77
  export declare const getUserDirectoryEntryFullPath: (qpqConfig: QPQConfig, userDirectoryConfig: UserDirectoryQPQConfigSetting) => string;
74
78
  export declare const getQueueQueueProcessors: (name: string, qpqConfig: QPQConfig) => QpqQueueProcessors;
79
+ export declare const convertCrossModuleOwnerToGenericResourceNameOverride: <T extends string>(owner?: CrossModuleOwner<T> | undefined) => CrossModuleOwner<'resourceNameOverride'> | undefined;
@@ -22,8 +22,19 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
+ var __rest = (this && this.__rest) || function (s, e) {
26
+ var t = {};
27
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
+ t[p] = s[p];
29
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
+ t[p[i]] = s[p[i]];
33
+ }
34
+ return t;
35
+ };
25
36
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getQueueQueueProcessors = exports.getUserDirectoryEntryFullPath = exports.getQueueEntryFullPath = exports.getStorageDriveUploadFullPath = exports.getDeployEventFullPath = exports.getStorageDriveEntryFullPath = exports.getScheduleEntryFullPath = exports.getUniqueKeyForSetting = exports.getSharedSecrets = exports.getParameterConfigs = exports.getUserDirectories = exports.getGlobalConfigValue = exports.getOwnedSecrets = exports.getAllSrcEntries = exports.getUserDirectorySrcEntries = exports.getQueueSrcEntries = exports.getScheduleEvents = exports.getUserDirectoryEmailTemplates = exports.getActionProcessorSources = exports.getKeyValueStoreByName = exports.resolveCrossServiceResourceName = exports.getOwnedKeyValueStores = exports.getDeployEventConfigs = exports.getAllKeyValueStores = exports.getOwnedItems = exports.getAllEventBusConfigs = exports.getStorageDriveNames = exports.getQueues = exports.getStorageDrives = exports.getApplicationModuleDeployRegion = exports.getApplicationModuleEnvironment = exports.getConfigRoot = exports.getApplicationModuleFeature = exports.getApplicationModuleName = exports.getApplicationName = exports.getApplicationModuleSetting = exports.getConfigSetting = exports.getConfigSettings = exports.flattenQpqConfig = void 0;
37
+ exports.convertCrossModuleOwnerToGenericResourceNameOverride = exports.getQueueQueueProcessors = exports.getUserDirectoryEntryFullPath = exports.getQueueEntryFullPath = exports.getStorageDriveUploadFullPath = exports.getDeployEventFullPath = exports.getStorageDriveEntryFullPath = exports.getScheduleEntryFullPath = exports.getUniqueKeyForSetting = exports.getSharedSecrets = exports.getParameterConfigs = exports.getUserDirectories = exports.getGlobalConfigValue = exports.getOwnedSecrets = exports.getAllSrcEntries = exports.getUserDirectorySrcEntries = exports.getQueueSrcEntries = exports.getScheduleEvents = exports.getUserDirectoryEmailTemplates = exports.getActionProcessorSources = exports.getKeyValueStoreByName = exports.resolveCrossServiceResourceName = exports.getOwnedStorageDrives = exports.getOwnedKeyValueStores = exports.getDeployEventConfigs = exports.getAllKeyValueStores = exports.getOwnedItems = exports.getEventBusConfigByName = exports.getOwnedEventBusConfigs = exports.getAllEventBusConfigs = exports.getStorageDriveNames = exports.getQueues = exports.getStorageDriveByName = exports.getStorageDrives = exports.getApplicationModuleDeployRegion = exports.getApplicationModuleEnvironment = exports.getConfigRoot = exports.getApplicationModuleFeature = exports.getApplicationModuleName = exports.getApplicationName = exports.getApplicationModuleSetting = exports.getConfigSetting = exports.getConfigSettings = exports.flattenQpqConfig = void 0;
27
38
  const path = __importStar(require("path"));
28
39
  const QPQConfig_1 = require("./config/QPQConfig");
29
40
  /**
@@ -136,6 +147,10 @@ const getStorageDrives = (configs) => {
136
147
  return (0, exports.getConfigSettings)(configs, QPQConfig_1.QPQCoreConfigSettingType.storageDrive);
137
148
  };
138
149
  exports.getStorageDrives = getStorageDrives;
150
+ const getStorageDriveByName = (storageDriveName, configs) => {
151
+ return (0, exports.getStorageDrives)(configs).find(sd => sd.storageDrive === storageDriveName);
152
+ };
153
+ exports.getStorageDriveByName = getStorageDriveByName;
139
154
  const getQueues = (configs) => {
140
155
  return (0, exports.getConfigSettings)(configs, QPQConfig_1.QPQCoreConfigSettingType.queue);
141
156
  };
@@ -150,9 +165,25 @@ const getAllEventBusConfigs = (qpqConfig) => {
150
165
  return eventBuses;
151
166
  };
152
167
  exports.getAllEventBusConfigs = getAllEventBusConfigs;
168
+ const getOwnedEventBusConfigs = (qpqConfig) => {
169
+ const ownedEventBusConfigs = (0, exports.getOwnedItems)((0, exports.getAllEventBusConfigs)(qpqConfig), qpqConfig);
170
+ return ownedEventBusConfigs;
171
+ };
172
+ exports.getOwnedEventBusConfigs = getOwnedEventBusConfigs;
173
+ const getEventBusConfigByName = (eventBusName, qpqConfig) => {
174
+ const eventBusConfig = (0, exports.getAllEventBusConfigs)(qpqConfig).find(eb => eb.name === eventBusName);
175
+ return eventBusConfig;
176
+ };
177
+ exports.getEventBusConfigByName = getEventBusConfigByName;
153
178
  const getOwnedItems = (settings, qpqConfig) => {
154
179
  const appModuleName = (0, exports.getApplicationModuleName)(qpqConfig);
155
- return settings.filter((s) => !s.owner || s.owner.module === appModuleName);
180
+ const appName = (0, exports.getApplicationName)(qpqConfig);
181
+ const appFeature = (0, exports.getApplicationModuleFeature)(qpqConfig);
182
+ const appEnvironment = (0, exports.getApplicationModuleEnvironment)(qpqConfig);
183
+ return settings.filter((s) => !s.owner || ((!s.owner.module || s.owner.module === appModuleName) &&
184
+ (!s.owner.application || s.owner.application === appName) &&
185
+ (s.owner.feature === undefined || (!s.owner.feature && !appFeature) || s.owner.feature === appFeature) &&
186
+ (!s.owner.environment || s.owner.environment === appEnvironment)));
156
187
  };
157
188
  exports.getOwnedItems = getOwnedItems;
158
189
  const getAllKeyValueStores = (qpqConfig) => {
@@ -169,6 +200,10 @@ const getOwnedKeyValueStores = (qpqConfig) => {
169
200
  return (0, exports.getOwnedItems)((0, exports.getAllKeyValueStores)(qpqConfig), qpqConfig);
170
201
  };
171
202
  exports.getOwnedKeyValueStores = getOwnedKeyValueStores;
203
+ const getOwnedStorageDrives = (qpqConfig) => {
204
+ return (0, exports.getOwnedItems)((0, exports.getStorageDrives)(qpqConfig), qpqConfig);
205
+ };
206
+ exports.getOwnedStorageDrives = getOwnedStorageDrives;
172
207
  const resolveCrossServiceResourceName = (resourceName) => {
173
208
  if (typeof resourceName === 'string') {
174
209
  return {
@@ -179,10 +214,7 @@ const resolveCrossServiceResourceName = (resourceName) => {
179
214
  };
180
215
  exports.resolveCrossServiceResourceName = resolveCrossServiceResourceName;
181
216
  const getKeyValueStoreByName = (qpqConfig, kvsName) => {
182
- const crossServiceResourceName = (0, exports.resolveCrossServiceResourceName)(kvsName);
183
- const appModuleName = (0, exports.getApplicationModuleName)(qpqConfig);
184
- const keyValueStore = (0, exports.getAllKeyValueStores)(qpqConfig).find((kvs) => kvs.keyValueStoreName === crossServiceResourceName.name &&
185
- (!crossServiceResourceName.service || crossServiceResourceName.service === appModuleName));
217
+ const keyValueStore = (0, exports.getAllKeyValueStores)(qpqConfig).find((kvs) => kvs.keyValueStoreName === kvsName);
186
218
  return keyValueStore;
187
219
  };
188
220
  exports.getKeyValueStoreByName = getKeyValueStoreByName;
@@ -290,3 +322,13 @@ const getQueueQueueProcessors = (name, qpqConfig) => {
290
322
  return (queueConfig === null || queueConfig === void 0 ? void 0 : queueConfig.qpqQueueProcessors) || {};
291
323
  };
292
324
  exports.getQueueQueueProcessors = getQueueQueueProcessors;
325
+ const convertCrossModuleOwnerToGenericResourceNameOverride = (owner) => {
326
+ if (!owner) {
327
+ return undefined;
328
+ }
329
+ const key = Array.from(Object.keys(owner)).find((k) => k !== 'module' && k !== 'application' && k !== 'feature' && k !== 'environment');
330
+ const resourceName = owner[key];
331
+ const _a = owner, _b = key, _ = _a[_b], otherProps = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
332
+ return Object.assign(Object.assign({}, otherProps), { resourceNameOverride: resourceName });
333
+ };
334
+ exports.convertCrossModuleOwnerToGenericResourceNameOverride = convertCrossModuleOwnerToGenericResourceNameOverride;
@@ -0,0 +1,2 @@
1
+ import { AskResponse } from "../../types";
2
+ export declare function askGetCurrentEpoch(): AskResponse<number>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.askGetCurrentEpoch = void 0;
4
+ const actions_1 = require("../../actions");
5
+ function* askGetCurrentEpoch() {
6
+ const currentDateTime = yield* (0, actions_1.askDateNow)();
7
+ // Convert the ISO datetime string to a Date object.
8
+ const dateObj = new Date(currentDateTime);
9
+ // Convert the Date object to an epoch timestamp.
10
+ const epochTime = Math.floor(dateObj.getTime() / 1000);
11
+ return epochTime;
12
+ }
13
+ exports.askGetCurrentEpoch = askGetCurrentEpoch;
@@ -0,0 +1 @@
1
+ export * from "./askGetCurrentEpoch";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./askGetCurrentEpoch"), exports);
@@ -1,4 +1,5 @@
1
1
  export * from './array';
2
2
  export * from './context';
3
3
  export * from './system';
4
+ export * from './dateTime';
4
5
  export * from './askProcessEvent';
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./array"), exports);
18
18
  __exportStar(require("./context"), exports);
19
19
  __exportStar(require("./system"), exports);
20
+ __exportStar(require("./dateTime"), exports);
20
21
  __exportStar(require("./askProcessEvent"), exports);
@@ -1,3 +1,8 @@
1
- export type CrossModuleOwner = {
1
+ export type CrossModuleOwner<T extends string = 'resourceNameOverride'> = {
2
2
  module?: string;
3
+ application?: string;
4
+ feature?: string;
5
+ environment?: string;
6
+ } & {
7
+ [key in T]?: string;
3
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidproquo-core",
3
- "version": "0.0.140",
3
+ "version": "0.0.142",
4
4
  "description": "",
5
5
  "main": "./lib/commonjs/index.js",
6
6
  "types": "./lib/commonjs/index.d.js",