@shushed/helpers 0.0.85 → 0.0.86

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 (3) hide show
  1. package/dist/index.d.ts +14 -9
  2. package/dist/index.js +66 -109301
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { JSONSchemaType } from 'ajv';
2
2
  import { DeepRedact } from '@hackylabs/deep-redact';
3
3
  import { Firestore, DocumentReference } from '@google-cloud/firestore';
4
- import { Logging as Logging$1 } from '@google-cloud/logging';
5
4
  import { PubSub, Topic, Subscription } from '@google-cloud/pubsub';
6
5
  import { Context } from 'co-body';
7
6
  import * as _google_cloud_scheduler_build_protos_protos from '@google-cloud/scheduler/build/protos/protos';
@@ -29483,7 +29482,6 @@ declare class Logging implements ILogging {
29483
29482
  private workflowId;
29484
29483
  private triggerId;
29485
29484
  private systemEnvName;
29486
- gcpLogging: Logging$1;
29487
29485
  metadata: any;
29488
29486
  logFn: (...args: any[]) => void;
29489
29487
  errorFn: (...args: any[]) => void;
@@ -29748,16 +29746,23 @@ interface CreateTaskOpts {
29748
29746
  };
29749
29747
  extraQuery?: Record<string, string>;
29750
29748
  scheduleSeconds?: number;
29751
- repeatCount?: number;
29752
- doNotCreateIfExists?: boolean;
29749
+ doNotCreateIfExists?: string;
29753
29750
  deleteExistingTasks?: boolean;
29751
+ repeatCount?: number;
29752
+ }
29753
+ interface GcpQueue {
29754
+ name: string;
29754
29755
  retryConfig?: {
29755
29756
  maxAttempts?: number;
29756
- maxRetryDuration?: number;
29757
- minBackoff?: number;
29758
- maxBackoff?: number;
29757
+ maxRetryDuration?: string;
29758
+ minBackoff?: string;
29759
+ maxBackoff?: string;
29759
29760
  maxDoublings?: number;
29760
29761
  };
29762
+ rateLimits?: {
29763
+ maxDispatchesPerSecond?: number;
29764
+ maxConcurrentDispatches?: number;
29765
+ };
29761
29766
  }
29762
29767
  declare class CloudTasksHelper extends Runtime {
29763
29768
  private projectId;
@@ -29772,8 +29777,8 @@ declare class CloudTasksHelper extends Runtime {
29772
29777
  private getQueuePath;
29773
29778
  private getQueueApiUrl;
29774
29779
  private getLocationApiUrl;
29775
- private queueExists;
29776
- private createOrUpdateQueue;
29780
+ getQueue(topicName: string): Promise<GcpQueue | null>;
29781
+ createOrUpdateQueue(topicName: string, retryConfig?: Required<GcpQueue['retryConfig']>, rateLimits?: Required<GcpQueue['rateLimits']>): Promise<void>;
29777
29782
  private listTasks;
29778
29783
  private deleteTask;
29779
29784
  create(opts: CreateTaskOpts): Promise<false | string[]>;