@63klabs/cache-data 1.3.7 → 1.3.9

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.
@@ -17,7 +17,17 @@ const isTrue = (value) => {
17
17
  */
18
18
  const USE_XRAY = isTrue(process.env?.CacheData_AWSXRayOn) || isTrue(process.env?.CACHE_DATA_AWS_X_RAY_ON);
19
19
 
20
+ /**
21
+ * X-Ray object if it is enabled
22
+ * @returns {object|null} The AWSXRay object if enabled and initialized, null otherwise
23
+ */
20
24
  let AWSXRay = null;
25
+
26
+ /**
27
+ * Whether or not X-Ray is initialized
28
+ * @private
29
+ * @returns {object|null} The AWSXRay object if enabled and initialized, null otherwise
30
+ */
21
31
  let xrayInitialized = false;
22
32
 
23
33
  const initializeXRay = () => {
@@ -278,9 +288,25 @@ class AWS {
278
288
  }
279
289
  }
280
290
  )();
281
-
291
+
282
292
  /**
283
- * @returns {object} DynamoDB Document Client and functions for put, get, scan, delete, update
293
+ * Provides a DynamoDB client and helper functions.
294
+ *
295
+ * @returns {{
296
+ * client: object,
297
+ * put: {(params:Object) => Promise<any>},
298
+ * get: {(params:Object) => Promise<any>},
299
+ * scan: {(params:Object) => Promise<any>},
300
+ * delete: {(params:Object) => Promise<any>},
301
+ * update: {(params:Object) => Promise<any>},
302
+ * sdk: {
303
+ * DynamoDB: object,
304
+ * DynamoDBClient: object,
305
+ * DynamoDBDocumentClient: object,
306
+ * GetCommand: object,
307
+ * PutCommand: object
308
+ * }
309
+ * }}
284
310
  */
285
311
  static get dynamo() {
286
312
  return {
@@ -295,7 +321,18 @@ class AWS {
295
321
  }
296
322
 
297
323
  /**
298
- * @returns {object} S3 Client and functions for put, get
324
+ * Provides a S3 client and helper functions.
325
+ *
326
+ * @returns {{
327
+ * client: object,
328
+ * put: {(params:Object) => Promise<any>},
329
+ * get: {(params:Object) => Promise<any>},
330
+ * sdk: {
331
+ * S3: object,
332
+ * GetObjectCommand: object,
333
+ * PutObjectCommand: object
334
+ * }
335
+ * }}
299
336
  */
300
337
  static get s3() {
301
338
  return {
@@ -307,7 +344,18 @@ class AWS {
307
344
  }
308
345
 
309
346
  /**
310
- * @returns {object} SSM Client and functions for getByName, getByPath
347
+ * Provides a SSM client and helper functions.
348
+ *
349
+ * @returns {{
350
+ * client: object,
351
+ * getByName: {(query:Object) => Promise<any>},
352
+ * getByPath: {(query:Object) => Promise<any>},
353
+ * sdk: {
354
+ * SSMClient: object,
355
+ * GetParametersByPathCommand: object,
356
+ * GetParametersCommand: object
357
+ * }
358
+ * }}
311
359
  */
312
360
  static get ssm() {
313
361
  return {
@@ -327,4 +375,9 @@ class AWS {
327
375
 
328
376
  };
329
377
 
330
- module.exports = {AWS, AWSXRay};
378
+ module.exports = {
379
+ AWS,
380
+ Aws: AWS, // alias
381
+ AWSXRay,
382
+ AwsXRay: AWSXRay, // alias
383
+ };
@@ -579,5 +579,6 @@ module.exports = {
579
579
  CachedParameterSecrets,
580
580
  CachedParameterSecret,
581
581
  CachedSSMParameter,
582
+ CachedSsmParameter: CachedSSMParameter,
582
583
  CachedSecret
583
584
  }