@zuplo/graphql 5.1796.0 → 5.1800.0

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/index.d.ts CHANGED
@@ -449,7 +449,17 @@ declare enum HttpStatusCode {
449
449
  declare type HttpStatusCodeRangeDefinition = "1XX" | "2XX" | "3XX" | "4XX" | "5XX";
450
450
 
451
451
  /**
452
- * @beta
452
+ * @public
453
+ * A policy that can modify the incoming HTTP request before it is sent to
454
+ * the handler. If a response is returned, the request is short-circuited and
455
+ * the response is returned to the client. If a Request is returned, policies
456
+ * or a handler that follow are executed.
457
+ *
458
+ * @param request - The incoming Request
459
+ * @param context - The current context of the Request
460
+ * @param options - The configuration options for the policy
461
+ * @param policyName - The name set on the policy in the configuration
462
+ * @returns A Response or Request object
453
463
  */
454
464
  declare interface InboundPolicyHandler<TOptions = any> {
455
465
  (request: ZuploRequest, context: ZuploContext, options: TOptions, policyName: string): Promise<ZuploRequest | Response>;
@@ -634,6 +644,10 @@ declare interface RouteConfiguration extends Omit<BuildRouteConfiguration, "raw"
634
644
 
635
645
  declare type UserDataDefault = any;
636
646
 
647
+ declare interface WaitUntilFunc {
648
+ (promise: Promise<any>): void;
649
+ }
650
+
637
651
  /**
638
652
  * @beta
639
653
  */
@@ -653,7 +667,7 @@ declare interface ZuploContext extends EventTarget {
653
667
  readonly custom: Record<string, any>;
654
668
  readonly incomingRequestProperties: IncomingRequestProperties;
655
669
  readonly invokeInboundPolicy: (policyName: string, request: ZuploRequest) => Promise<Response | ZuploRequest>;
656
- readonly waitUntil: (promise: Promise<any>) => void;
670
+ readonly waitUntil: WaitUntilFunc;
657
671
  /**
658
672
  * Fires just before the response is sent. Response can be modified.
659
673
  */