@e-mc/types 0.0.1 → 0.0.2

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.
package/constant.d.ts CHANGED
@@ -4,6 +4,24 @@ export const enum VAL_MESSAGE {
4
4
  COMMIT_TRANSACTION = 'Transactions were committed'
5
5
  }
6
6
 
7
+ export const enum VAL_DB {
8
+ EXEC_QUERYUNASSIGNED = 'Execute unassigned queries'
9
+ }
10
+
11
+ export const enum VAL_CLOUD {
12
+ UPLOAD_FILE = 'Upload success',
13
+ DOWNLOAD_FILE = 'Download success',
14
+ DELETE_FILE = 'Delete success',
15
+ RENAME_FILE = 'File renamed',
16
+ PUBLIC_READ = 'Grant public-read',
17
+ CREATE_BUCKET = 'Bucket created',
18
+ DELETE_BUCKET = 'Bucket deleted',
19
+ EMPTY_BUCKET = 'Bucket emptied',
20
+ CONFIGURE_BUCKET = 'Bucket configured',
21
+ POLICY_BUCKET = 'Bucket policy configured',
22
+ ACL_BUCKET = 'Bucket ACL configured'
23
+ }
24
+
7
25
  export const enum ERR_MESSAGE {
8
26
  UNKNOWN = 'Unknown',
9
27
  FAIL = 'FAIL!',
@@ -66,6 +84,65 @@ export const enum ERR_MESSAGE {
66
84
  PERFORM_TASK = 'Unable to perform task'
67
85
  }
68
86
 
87
+ export const enum ERR_DB {
88
+ CONSTRUCTOR = 'Not a Db constructor',
89
+ PROVIDER_NOTFOUND = 'Database provider not found',
90
+ MODULE_NOTFOUND = 'Db module not installed',
91
+ UPGRADE = 'Upgrade client to latest version',
92
+ NAME = 'Missing database name',
93
+ INSTANCE = 'Missing instance name',
94
+ PRODUCT = 'Missing database product',
95
+ TABLE = 'Missing database table',
96
+ QUERY = 'Missing database query',
97
+ CONNECTION = 'Missing connection string',
98
+ CLIENT = 'Unable to configure client',
99
+ EXEC_QUERY = 'Unable to execute query',
100
+ FILTER_QUERY = 'Unable to filter results',
101
+ CONNECTION_OPEN = 'Unable to open connnection',
102
+ CONNECTION_CLOSE = 'Unable to close connnection',
103
+ KEY = 'Invalid key',
104
+ VALUE = 'Invalid value',
105
+ CREDENTIALS = 'Invalid credentials'
106
+ }
107
+
108
+ export const enum ERR_CLOUD {
109
+ CONSTRUCTOR = 'Not a Cloud constructor',
110
+ CREATE_BUCKET = 'Unable to create bucket',
111
+ POLICY_BUCKET = 'Unable to update bucket policy',
112
+ DELETE_BUCKET = 'Unable to empty bucket',
113
+ CONFIGURE_BUCKET = 'Unable to configure bucket',
114
+ EXISTS_BUCKET = 'Bucket does not exist',
115
+ POLICY_INVALID = 'Invalid bucket policy',
116
+ LIST_BUCKET = 'Unable to list bucket',
117
+ PUBLIC_READ = 'Unable to grant public-read',
118
+ TEMP_DIR = 'Unable to create temp directory',
119
+ PROVIDER_NOTFOUND = 'Cloud provider not found',
120
+ ACCOUNT_NOTFOUND = 'Cloud account not found',
121
+ MODULE_NOTFOUND = 'Cloud module not installed',
122
+ CREATE_BUCKET_SUPPORT = 'Create bucket not supported',
123
+ BUCKET_POLICY_SUPPORT = 'Bucket policy not supported',
124
+ DELETE_OBJECTS_SUPPORT = 'Delete objects not supported',
125
+ BUCKET_WEBSITE_SUPPORT = 'Set bucket website not supported',
126
+ EXECUTE_QUERY_SUPPORT = 'Execute query not supported',
127
+ UPLOAD_SUPPORT = 'Upload function not supported',
128
+ DOWNLOAD_SUPPORT = 'Download function not supported',
129
+ UPLOAD_FAIL = 'Upload failed',
130
+ DOWNLOAD_FAIL = 'Download failed',
131
+ DELETE_FAIL = 'Delete failed',
132
+ METADATA_FAIL = 'Metadata failed'
133
+ }
134
+
135
+ export const enum TRANSACTION_DB {
136
+ ACTIVE = 1,
137
+ PARTIAL = 2,
138
+ COMMIT = 4,
139
+ TERMINATE = 8,
140
+ ABORT = 16,
141
+ FAIL = 32,
142
+ AUTH = 64,
143
+ CACHE = 128
144
+ }
145
+
69
146
  export const enum TIME {
70
147
  Y = 1000 * 60 * 60 * 24 * 7 * 52,
71
148
  M = 1000 * 60 * 60 * 24 * 30,
package/index.js CHANGED
@@ -234,32 +234,32 @@ var WATCH_EVENT;
234
234
  var IMPORT_MAP;
235
235
  (function (IMPORT_MAP) {
236
236
  IMPORT_MAP["@squared-functions/cloud"] = "@e-mc/cloud";
237
- IMPORT_MAP["@squared-functions/cloud/atlas"] = "@e-mc/cloud/atlas";
238
- IMPORT_MAP["@squared-functions/cloud/aws"] = "@e-mc/cloud/aws";
239
- IMPORT_MAP["@squared-functions/cloud/aws/download"] = "@e-mc/cloud/aws/download";
240
- IMPORT_MAP["@squared-functions/cloud/aws/upload"] = "@e-mc/cloud/aws/upload";
241
- IMPORT_MAP["@squared-functions/cloud/aws-v3"] = "@e-mc/cloud/aws-v3";
242
- IMPORT_MAP["@squared-functions/cloud/aws-v3/download"] = "@e-mc/cloud/aws-v3/download";
243
- IMPORT_MAP["@squared-functions/cloud/aws-v3/upload"] = "@e-mc/cloud/aws-v3/upload";
244
- IMPORT_MAP["@squared-functions/cloud/azure"] = "@e-mc/cloud/azure";
245
- IMPORT_MAP["@squared-functions/cloud/azure/download"] = "@e-mc/cloud/azure/download";
246
- IMPORT_MAP["@squared-functions/cloud/azure/upload"] = "@e-mc/cloud/azure/upload";
247
- IMPORT_MAP["@squared-functions/cloud/gcp"] = "@e-mc/cloud/gcp";
248
- IMPORT_MAP["@squared-functions/cloud/gcp/download"] = "@e-mc/cloud/gcp/download";
249
- IMPORT_MAP["@squared-functions/cloud/gcp/upload"] = "@e-mc/cloud/gcp/upload";
250
- IMPORT_MAP["@squared-functions/cloud/ibm"] = "@e-mc/cloud/ibm";
251
- IMPORT_MAP["@squared-functions/cloud/ibm/download"] = "@e-mc/cloud/ibm/download";
252
- IMPORT_MAP["@squared-functions/cloud/ibm/upload"] = "@e-mc/cloud/ibm/upload";
253
- IMPORT_MAP["@squared-functions/cloud/ibm-v1"] = "@e-mc/cloud/ibm-v1";
254
- IMPORT_MAP["@squared-functions/cloud/ibm-v1/download"] = "@e-mc/cloud/ibm/download";
255
- IMPORT_MAP["@squared-functions/cloud/ibm-v1/upload"] = "@e-mc/cloud/ibm/upload";
256
- IMPORT_MAP["@squared-functions/cloud/minio"] = "@e-mc/cloud/minio";
257
- IMPORT_MAP["@squared-functions/cloud/minio/download"] = "@e-mc/cloud/minio/download";
258
- IMPORT_MAP["@squared-functions/cloud/minio/upload"] = "@e-mc/cloud/minio/upload";
259
- IMPORT_MAP["@squared-functions/cloud/oci"] = "@e-mc/cloud/oci";
260
- IMPORT_MAP["@squared-functions/cloud/oci/download"] = "@e-mc/cloud/oci/download";
261
- IMPORT_MAP["@squared-functions/cloud/oci/upload"] = "@e-mc/cloud/oci/upload";
262
- IMPORT_MAP["@squared-functions/cloud/util"] = "@e-mc/cloud/util";
237
+ IMPORT_MAP["@squared-functions/cloud/atlas"] = "@e-mc2/atlas";
238
+ IMPORT_MAP["@squared-functions/cloud/aws"] = "@e-mc2/aws";
239
+ IMPORT_MAP["@squared-functions/cloud/aws/download"] = "@e-mc2/aws/download";
240
+ IMPORT_MAP["@squared-functions/cloud/aws/upload"] = "@e-mc2/aws/upload";
241
+ IMPORT_MAP["@squared-functions/cloud/aws-v3"] = "@e-mc2/aws-v3";
242
+ IMPORT_MAP["@squared-functions/cloud/aws-v3/download"] = "@e-mc2/aws-v3/download";
243
+ IMPORT_MAP["@squared-functions/cloud/aws-v3/upload"] = "@e-mc2/aws-v3/upload";
244
+ IMPORT_MAP["@squared-functions/cloud/azure"] = "@e-mc2/azure";
245
+ IMPORT_MAP["@squared-functions/cloud/azure/download"] = "@e-mc2/azure/download";
246
+ IMPORT_MAP["@squared-functions/cloud/azure/upload"] = "@e-mc2/azure/upload";
247
+ IMPORT_MAP["@squared-functions/cloud/gcp"] = "@e-mc2/gcp";
248
+ IMPORT_MAP["@squared-functions/cloud/gcp/download"] = "@e-mc2/gcp/download";
249
+ IMPORT_MAP["@squared-functions/cloud/gcp/upload"] = "@e-mc2/gcp/upload";
250
+ IMPORT_MAP["@squared-functions/cloud/ibm"] = "@e-mc2/ibm";
251
+ IMPORT_MAP["@squared-functions/cloud/ibm/download"] = "@e-mc2/ibm/download";
252
+ IMPORT_MAP["@squared-functions/cloud/ibm/upload"] = "@e-mc2/ibm/upload";
253
+ IMPORT_MAP["@squared-functions/cloud/ibm-v1"] = "@e-mc2/ibm";
254
+ IMPORT_MAP["@squared-functions/cloud/ibm-v1/download"] = "@e-mc2/ibm/download";
255
+ IMPORT_MAP["@squared-functions/cloud/ibm-v1/upload"] = "@e-mc2/ibm/upload";
256
+ IMPORT_MAP["@squared-functions/cloud/minio"] = "@e-mc2/minio";
257
+ IMPORT_MAP["@squared-functions/cloud/minio/download"] = "@e-mc2/minio/download";
258
+ IMPORT_MAP["@squared-functions/cloud/minio/upload"] = "@e-mc2/minio/upload";
259
+ IMPORT_MAP["@squared-functions/cloud/oci"] = "@e-mc2/oci";
260
+ IMPORT_MAP["@squared-functions/cloud/oci/download"] = "@e-mc2/oci/download";
261
+ IMPORT_MAP["@squared-functions/cloud/oci/upload"] = "@e-mc2/oci/upload";
262
+ IMPORT_MAP["@squared-functions/cloud/util"] = "@e-mc2/util";
263
263
  IMPORT_MAP["@squared-functions/compress-v3"] = "@e-mc/compress";
264
264
  IMPORT_MAP["@squared-functions/core"] = "@e-mc/core";
265
265
  IMPORT_MAP["@squared-functions/db"] = "@e-mc/db";
package/lib/db.d.ts CHANGED
@@ -125,6 +125,11 @@ export interface MongoDBQueryWithOptions {
125
125
  options: CommandOperationOptions;
126
126
  }
127
127
 
128
+ export interface MongoDBFilterValue {
129
+ value?: Filter<Document>;
130
+ options?: CommandOperationOptions;
131
+ }
132
+
128
133
  export interface RedisSetValue<T = "HASH" | undefined, U = RedisCommandArgument, V = RedisCommandValue | RedisHSETObject> {
129
134
  format: T;
130
135
  key?: U;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/types",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Type definitions for e-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",