@shushed/helpers 0.0.24 → 0.0.25

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 (2) hide show
  1. package/dist/index.d.ts +149 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -28833,6 +28833,152 @@ declare const validateGoogleAuth: (opts: Opts & {
28833
28833
  serviceAccount?: string | null;
28834
28834
  }, headers: Record<string, string>, firestore: Firestore) => Promise<void>;
28835
28835
 
28836
+ type TriggerOnExecuteOptions = {
28837
+ req: {
28838
+ status?: number;
28839
+ body?: string;
28840
+ throw: (status: number, body: string) => void;
28841
+ };
28842
+ request: {
28843
+ headers: Record<string, string>;
28844
+ method: 'POST' | 'GET' | 'PUT' | 'PATCH';
28845
+ body: undefined;
28846
+ path: string;
28847
+ query: Record<string, string>;
28848
+ host: string;
28849
+ hostname: string;
28850
+ originalUrl: string;
28851
+ ip: string;
28852
+ ips: [];
28853
+ querystring: string;
28854
+ subdomains: Array<string>;
28855
+ secure: boolean;
28856
+ protocol: 'http' | 'https';
28857
+ params: undefined;
28858
+ };
28859
+ nodeReq: Request;
28860
+ state: Record<string, string>;
28861
+ root: {
28862
+ state: Record<string, string>;
28863
+ };
28864
+ workflowExecutionId: string;
28865
+ logging: {
28866
+ log: (...x: Array<any>) => void;
28867
+ warn: (...x: Array<any>) => void;
28868
+ error: (...x: Array<any>) => void;
28869
+ };
28870
+ terminate: (status: number, message: string) => void;
28871
+ env: {
28872
+ set: (args: {
28873
+ name: string;
28874
+ value: string;
28875
+ }[], level: 'workflow' | 'project') => Promise<void>;
28876
+ get: (name: string, level: 'workflow' | 'project') => string | null;
28877
+ triggerEnv: any;
28878
+ workflowId: string;
28879
+ };
28880
+ auth: {
28881
+ getToken: (forceRefresh: boolean) => any;
28882
+ getKey: (options: {
28883
+ ignoreMissingKey?: boolean;
28884
+ }) => any;
28885
+ };
28886
+ getBuildShipFile: (x: any) => any;
28887
+ trigger: {
28888
+ meta: {
28889
+ fileUploadLimit: boolean;
28890
+ name: string;
28891
+ description: string;
28892
+ id: string;
28893
+ payloadLimit: boolean;
28894
+ icon: {
28895
+ type: 'SVG';
28896
+ };
28897
+ };
28898
+ script: string;
28899
+ defaultValues: {
28900
+ path: string;
28901
+ inputs: string;
28902
+ };
28903
+ lifeCycleFunctions: Array<'onExecution' | 'onCreate' | 'onResponse' | 'onUpdate' | 'getData'>;
28904
+ id: string;
28905
+ _libRef: {
28906
+ integrity: string;
28907
+ libNodeRefId: string;
28908
+ libType: string;
28909
+ isDirty: boolean;
28910
+ version: string;
28911
+ src: string;
28912
+ };
28913
+ label: string;
28914
+ description: string;
28915
+ envs: Record<string, any>;
28916
+ env: any;
28917
+ };
28918
+ workflow: {
28919
+ id: string;
28920
+ };
28921
+ };
28922
+ type TriggerOnCreateOptions = {
28923
+ runtimeUrl: string;
28924
+ workflowId: string;
28925
+ auth: {
28926
+ getToken: (forceRefresh: boolean) => any;
28927
+ getKey: (options: {
28928
+ ignoreMissingKey?: boolean;
28929
+ }) => any;
28930
+ };
28931
+ trigger: {
28932
+ meta: {
28933
+ fileUploadLimit: boolean;
28934
+ name: string;
28935
+ description: string;
28936
+ id: string;
28937
+ payloadLimit: boolean;
28938
+ icon: {
28939
+ type: 'SVG';
28940
+ };
28941
+ };
28942
+ script: string;
28943
+ response: any;
28944
+ dependencies: Record<string, string>;
28945
+ type: string;
28946
+ data: any;
28947
+ config: any;
28948
+ usage: string;
28949
+ defaultValues: {
28950
+ path: string;
28951
+ inputs: string;
28952
+ };
28953
+ lifeCycleFunctions: Array<'onExecution' | 'onCreate' | 'onResponse' | 'onUpdate' | 'getData'>;
28954
+ id: string;
28955
+ _libRef: {
28956
+ integrity: string;
28957
+ libNodeRefId: string;
28958
+ libType: string;
28959
+ isDirty: boolean;
28960
+ version: string;
28961
+ src: string;
28962
+ };
28963
+ label: string;
28964
+ description: string;
28965
+ envs: Record<string, any>;
28966
+ env: any;
28967
+ };
28968
+ workflow: {
28969
+ id: string;
28970
+ };
28971
+ env: {
28972
+ set: (args: {
28973
+ name: string;
28974
+ value: string;
28975
+ }[], level: 'workflow' | 'project') => Promise<void>;
28976
+ get: (name: string, level: 'workflow' | 'project') => string | null;
28977
+ triggerEnv: any;
28978
+ workflowId: string;
28979
+ };
28980
+ };
28981
+
28836
28982
  type index_EnvEngine = EnvEngine;
28837
28983
  declare const index_EnvEngine: typeof EnvEngine;
28838
28984
  type index_JWKSHelper = JWKSHelper;
@@ -28845,6 +28991,8 @@ type index_SchedulerHelper = SchedulerHelper;
28845
28991
  declare const index_SchedulerHelper: typeof SchedulerHelper;
28846
28992
  type index_Secrets = Secrets;
28847
28993
  declare const index_Secrets: typeof Secrets;
28994
+ type index_TriggerOnCreateOptions = TriggerOnCreateOptions;
28995
+ type index_TriggerOnExecuteOptions = TriggerOnExecuteOptions;
28848
28996
  declare const index_isCronMessage: typeof isCronMessage;
28849
28997
  declare const index_isPubSubRequest: typeof isPubSubRequest;
28850
28998
  declare const index_sanitize: typeof sanitize;
@@ -28852,7 +29000,7 @@ declare const index_sanitizeToString: typeof sanitizeToString;
28852
29000
  declare const index_validate: typeof validate;
28853
29001
  declare const index_validateGoogleAuth: typeof validateGoogleAuth;
28854
29002
  declare namespace index {
28855
- export { index_EnvEngine as EnvEngine, index_JWKSHelper as JWKSHelper, index_PubSubHelper as PubSubHelper, index_Runtime as Runtime, index_SchedulerHelper as SchedulerHelper, index_Secrets as Secrets, index_isCronMessage as isCronMessage, index_isPubSubRequest as isPubSubRequest, index_sanitize as sanitize, index_sanitizeToString as sanitizeToString, index_validate as validate, index_validateGoogleAuth as validateGoogleAuth };
29003
+ export { index_EnvEngine as EnvEngine, index_JWKSHelper as JWKSHelper, index_PubSubHelper as PubSubHelper, index_Runtime as Runtime, index_SchedulerHelper as SchedulerHelper, index_Secrets as Secrets, type index_TriggerOnCreateOptions as TriggerOnCreateOptions, type index_TriggerOnExecuteOptions as TriggerOnExecuteOptions, index_isCronMessage as isCronMessage, index_isPubSubRequest as isPubSubRequest, index_sanitize as sanitize, index_sanitizeToString as sanitizeToString, index_validate as validate, index_validateGoogleAuth as validateGoogleAuth };
28856
29004
  }
28857
29005
 
28858
29006
  export { index as lib, index$9 as schema, index$1 as types };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shushed/helpers",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "author": "",
5
5
  "license": "UNLICENSED",
6
6
  "description": "",