@@ -52,10 +52,14 @@ export type FunctionResponseObject<DataT = AnyObject, ErrorT = AnyObject> = {
5252 errors ?: ErrorT [ ] ;
5353} ;
5454
55- export type FunctionResponseObjectWithoutErrors < DataT = AnyObject > = {
55+ export type FunctionDataResponseObject < DataT = AnyObject > = {
5656 data : DataT ;
5757} ;
5858
59+ export type FunctionErrorResponseObject < ErrorT = AnyObject > = {
60+ errors : ErrorT [ ] ;
61+ } ;
62+
5963export type ResolverFunctionEvent < DataT = AnyObject > = {
6064 data : DataT ;
6165 headers : StringMap ;
@@ -117,7 +121,7 @@ export type BeforeDeleteTriggerFunctionEvent<
117121export type BeforeDeleteTriggerResponse <
118122 DataT = AnyObject ,
119123 ErrorT = AnyObject
120- > = Promise < FunctionResponseObject < DataT , ErrorT > | void > ;
124+ > = Promise < FunctionErrorResponseObject < ErrorT > | void > ;
121125
122126export type AfterCreateTriggerFunctionEvent <
123127 DataT = AnyObject ,
@@ -130,7 +134,7 @@ export type AfterCreateTriggerFunctionEvent<
130134} & ExtendObjectT ;
131135
132136export type AfterCreateTriggerResponse < DataT = AnyObject > =
133- Promise < FunctionResponseObjectWithoutErrors < DataT > | void > ;
137+ Promise < FunctionDataResponseObject < DataT > | void > ;
134138
135139export type AfterUpdateTriggerFunctionEvent <
136140 DataT = AnyObject ,
@@ -145,7 +149,7 @@ export type AfterUpdateTriggerFunctionEvent<
145149} & ExtendObjectT ;
146150
147151export type AfterUpdateTriggerResponse < DataT = AnyObject > =
148- Promise < FunctionResponseObjectWithoutErrors < DataT > | void > ;
152+ Promise < FunctionDataResponseObject < DataT > | void > ;
149153
150154export type AfterDeleteTriggerFunctionEvent <
151155 DataT = AnyObject ,
@@ -210,12 +214,11 @@ export type BeforeUpdateTriggerFunction<
210214
211215export type BeforeDeleteTriggerFunction <
212216 EventOriginalObject = AnyObject ,
213- ResultData = AnyObject ,
214217 ResultError = AnyObject
215218> = (
216219 event : BeforeDeleteTriggerFunctionEvent < EventOriginalObject > ,
217220 ctx : FunctionContext
218- ) => BeforeDeleteTriggerResponse < ResultData , ResultError > ;
221+ ) => BeforeDeleteTriggerResponse < ResultError > ;
219222
220223export type AfterCreateTriggerFunction <
221224 EventData = AnyObject ,
0 commit comments