@zuplo/runtime 6.43.9 → 6.43.11

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.
@@ -51,12 +51,39 @@ export declare class AkamaiApiSecurityPlugin extends SystemRuntimePlugin {
51
51
  initialize(runtime: RuntimeExtensions): Promise<void>;
52
52
  }
53
53
 
54
+ /**
55
+ * @public
56
+ * Configuration options for the Akamai API Security Plugin
57
+ */
54
58
  export declare interface AkamaiApiSecurityPluginOptions {
59
+ /**
60
+ * The hostname of the Akamai API Security service
61
+ */
55
62
  hostname: string;
63
+ /**
64
+ * The source index identifier for the Akamai API Security service
65
+ */
66
+ index: number;
67
+ /**
68
+ * The configuration key for authenticating with the Akamai API Security service
69
+ */
56
70
  key: string;
71
+ /**
72
+ * When true, enables request blocking based on protection rules
73
+ */
57
74
  enableProtection?: boolean;
75
+ /**
76
+ * When true, enables additional debug logging output (use in production with caution)
77
+ */
58
78
  debug?: boolean;
79
+ /**
80
+ * Maximum number of entries to queue before sending to the API
81
+ */
59
82
  maxQueueSize?: number;
83
+ /**
84
+ * Optional function that determines if a request should be logged
85
+ */
86
+ shouldLog?: ShouldLogFunction;
60
87
  }
61
88
 
62
89
  /**
@@ -4230,6 +4257,13 @@ declare interface PolicyInstance {
4230
4257
  instanceLabel?: string;
4231
4258
  }
4232
4259
 
4260
+ /**
4261
+ * @public
4262
+ */
4263
+ export declare interface PreRoutingHook {
4264
+ (request: Request): Promise<Request> | Request;
4265
+ }
4266
+
4233
4267
  declare type Primitive = null | undefined | string | number | boolean | symbol | bigint;
4234
4268
 
4235
4269
  /**
@@ -4961,6 +4995,11 @@ export declare interface RuntimeExtensions {
4961
4995
  addRequestHook(hook: OnRequestHook): void;
4962
4996
  addResponseSendingHook(hook: OnResponseSendingHook): void;
4963
4997
  addResponseSendingFinalHook(hook: OnResponseSendingFinalHook): void;
4998
+ /**
4999
+ * Add a hook that runs before route matching occurs
5000
+ * @param hook - The pre-routing hook function
5001
+ */
5002
+ addPreRoutingHook(hook: PreRoutingHook): void;
4964
5003
  }
4965
5004
 
4966
5005
  export declare interface RuntimeExtensionsFunction {
@@ -5159,6 +5198,15 @@ export declare interface SetStatusOutboundPolicyOptions {
5159
5198
  statusText?: string;
5160
5199
  }
5161
5200
 
5201
+ /**
5202
+ * Function type for determining if a request should be logged
5203
+ * @public
5204
+ * @param request - The HTTP request
5205
+ * @param context - The Zuplo context
5206
+ * @returns Promise resolving to true if the request should be logged, false otherwise
5207
+ */
5208
+ declare type ShouldLogFunction = (request: ZuploRequest, context: ZuploContext) => Promise<boolean>;
5209
+
5162
5210
  /**
5163
5211
  * Add a delay to the incoming request. Useful for testing.
5164
5212
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.43.9",
4
+ "version": "6.43.11",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {