@zuplo/runtime 6.74.7 → 6.74.10

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.
@@ -145,10 +145,12 @@ export declare interface AIGatewayAuthInboundPolicyOptions {
145
145
  * Authenticates requests to an AI Gateway v2 endpoint with application API
146
146
  * keys.
147
147
  *
148
- * Place this policy first in the inbound chain. The policies that follow can
149
- * read the authenticated application from `request.user` (`sub` is the
150
- * application name, `data` its metadata), and the application's AI Gateway
151
- * configuration takes effect for the request. Use `authHeader` and
148
+ * Add this policy to an application's `inboundPolicyChain` to require a key
149
+ * for that app only, or place it on the route before the configuration
150
+ * executor to require a key for every application on the route. The policies
151
+ * that follow can read the authenticated application from `request.user`
152
+ * (`sub` is the application name, `data` its metadata), and the application's
153
+ * AI Gateway configuration takes effect for the request. Use `authHeader` and
152
154
  * `authScheme` when clients send their app key somewhere other than the
153
155
  * default `Authorization: Bearer` header.
154
156
  *
@@ -7187,6 +7189,60 @@ declare interface InRule {
7187
7189
  in: [string | number | boolean, ...(string | number | boolean)[]];
7188
7190
  }
7189
7191
 
7192
+ /**
7193
+ * Restricts which client IP addresses can call a route using an allow list, a
7194
+ * deny list, or both. Entries are individual IP addresses or CIDR ranges, in
7195
+ * IPv4 or IPv6.
7196
+ *
7197
+ * @title IP Address Restriction
7198
+ * @product api-gateway
7199
+ * @public
7200
+ * @param request - The ZuploRequest
7201
+ * @param context - The ZuploContext
7202
+ * @param options - The policy options set in policies.json
7203
+ * @param policyName - The name of the policy as set in policies.json
7204
+ * @returns A Request or a Response
7205
+ */
7206
+ export declare class IpAddressRestrictionInboundPolicy extends InboundPolicy<IpAddressRestrictionInboundPolicyOptions> {
7207
+ #private;
7208
+ static readonly policyType = "ip-address-restriction";
7209
+ constructor(
7210
+ options: IpAddressRestrictionInboundPolicyOptions,
7211
+ policyName: string
7212
+ );
7213
+ handler(
7214
+ request: ZuploRequest,
7215
+ context: ZuploContext
7216
+ ): Promise<ZuploRequest | Response>;
7217
+ }
7218
+
7219
+ /**
7220
+ * The options for this policy.
7221
+ * @public
7222
+ */
7223
+ export declare interface IpAddressRestrictionInboundPolicyOptions {
7224
+ /**
7225
+ * The IP addresses and CIDR ranges that are allowed to call the route. When set, requests from every other address are rejected with a `403 Forbidden`.
7226
+ *
7227
+ * @minItems 1
7228
+ */
7229
+ allow?: [string, ...string[]];
7230
+ /**
7231
+ * The IP addresses and CIDR ranges that are rejected with a `403 Forbidden`. Evaluated before `allow`, so an address matching both lists is rejected.
7232
+ *
7233
+ * @minItems 1
7234
+ */
7235
+ deny?: [string, ...string[]];
7236
+ /**
7237
+ * Read the client IP address from this header instead of the standard forwarding headers (`x-real-ip`, `true-client-ip`, `cf-connecting-ip`, then the first entry of `x-forwarded-for`). Only set this when a proxy in front of the gateway reports the client address in a non-standard header.
7238
+ */
7239
+ clientIpHeader?: string;
7240
+ /**
7241
+ * Allow requests whose client IP address cannot be determined. By default these requests are rejected when an `allow` list is set, because an unknown address cannot be on it.
7242
+ */
7243
+ allowUnknownIpAddress?: boolean;
7244
+ }
7245
+
7190
7246
  /**
7191
7247
  * ISO 3166-1 Alpha-2 codes
7192
7248
  * @public
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.74.7",
4
+ "version": "6.74.10",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {