@zuplo/runtime 6.33.13 → 6.33.15

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.
@@ -604,8 +604,8 @@ export declare interface AxiomaticsAuthZInboundPolicyOptions {
604
604
  actionAttributes?: Attribute2;
605
605
  }
606
606
 
607
- export declare interface AzureBlobEntryGenerator<T> {
608
- (response: Response, request: ZuploRequest, context: ZuploContext): Promise<T>;
607
+ declare interface AzureBlobGenerateName<T> {
608
+ (entries: T[]): string;
609
609
  }
610
610
 
611
611
  export declare class AzureBlobPlugin<T extends {
@@ -619,7 +619,8 @@ export declare class AzureBlobPlugin<T extends {
619
619
  export declare interface AzureBlobPluginOptions<T> {
620
620
  sasUrl: string;
621
621
  batchPeriodSeconds: number;
622
- generateLogEntry: AzureBlobEntryGenerator<T>;
622
+ generateLogEntry: GenerateRequestLoggerEntry<T>;
623
+ generateBlobName?: AzureBlobGenerateName<T>;
623
624
  }
624
625
 
625
626
  export declare class BackgroundDispatcher<TPayload> {
@@ -1412,6 +1413,10 @@ export declare class DataDogMetricsPlugin extends MetricsPlugin {
1412
1413
  */
1413
1414
  export declare type DispatchFunction<TPayload> = (batch: TPayload[]) => Promise<void>;
1414
1415
 
1416
+ export declare interface DispatchRequestLoggerEntries<T> {
1417
+ (entries: T[]): Promise<void>;
1418
+ }
1419
+
1415
1420
  declare interface DynaTraceLoggingOptions {
1416
1421
  url: string;
1417
1422
  apiToken: string;
@@ -1519,6 +1524,10 @@ export declare interface FormDataToJsonInboundPolicyOptions {
1519
1524
 
1520
1525
  /* Excluded from this release type: Gateway */
1521
1526
 
1527
+ export declare interface GenerateRequestLoggerEntry<T> {
1528
+ (response: Response, request: ZuploRequest, context: ZuploContext, metadata: RequestLoggerMetaData): Promise<T>;
1529
+ }
1530
+
1522
1531
  /**
1523
1532
  * Block requests based on geo-location parameters: country, region code, and ASN
1524
1533
  *
@@ -4469,6 +4478,29 @@ export declare interface RequestInitGeneric {
4469
4478
  Params?: RequestParamsDefault;
4470
4479
  }
4471
4480
 
4481
+ export declare interface RequestLoggerMetaData {
4482
+ requestStartTime: Date;
4483
+ durationMs: number;
4484
+ instanceId: string;
4485
+ deploymentName: string;
4486
+ systemUserAgent: string;
4487
+ }
4488
+
4489
+ export declare interface RequestLoggerOptions<T> {
4490
+ name: string;
4491
+ dispatchFunction: DispatchRequestLoggerEntries<T>;
4492
+ generateLogEntry: GenerateRequestLoggerEntry<T>;
4493
+ batchPeriodSeconds: number | undefined;
4494
+ }
4495
+
4496
+ export declare class RequestLoggerPlugin<T extends {
4497
+ [P in keyof T]: string | number | boolean | null;
4498
+ }> extends SystemRuntimePlugin {
4499
+ #private;
4500
+ constructor(options: RequestLoggerOptions<T>);
4501
+ initialize(runtime: RuntimeExtensions): Promise<void>;
4502
+ }
4503
+
4472
4504
  declare type RequestParamsDefault = Record<string, string>;
4473
4505
 
4474
4506
  declare type RequestQueryDefault = Record<string, string>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.33.13",
4
+ "version": "6.33.15",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {