diff --git a/.speakeasy/logs/changes/changes.html b/.speakeasy/logs/changes/changes.html index ab8bf9a48..ac64ac183 100644 --- a/.speakeasy/logs/changes/changes.html +++ b/.speakeasy/logs/changes/changes.html @@ -4,7 +4,7 @@ - SDK Changelog - typescript + SDK Changelog - outpost -

Typescript SDK Changes:

+ +

Go SDK Changes:

+ + +

Typescript SDK Changes:

+ +

Python SDK Changes:

+ - \ No newline at end of file + diff --git a/.speakeasy/logs/changes/changes.md b/.speakeasy/logs/changes/changes.md index d8b0f24bf..702bf5da5 100644 --- a/.speakeasy/logs/changes/changes.md +++ b/.speakeasy/logs/changes/changes.md @@ -1,3 +1,59 @@ +## Go SDK Changes: +* `Outpost.Attempts.List()`: `response.Models[]` **Changed** (Breaking ⚠️) + - `Destination` **Added** + - `Event` **Changed** (Breaking ⚠️) + - `ResponseData` **Changed** (Breaking ⚠️) +* `Outpost.Attempts.Get()`: `response` **Changed** (Breaking ⚠️) + - `Destination` **Added** + - `Event` **Changed** (Breaking ⚠️) + - `ResponseData` **Changed** (Breaking ⚠️) +* `Outpost.Destinations.ListAttempts()`: `response.Models[]` **Changed** (Breaking ⚠️) + - `Destination` **Added** + - `Event` **Changed** (Breaking ⚠️) + - `ResponseData` **Changed** (Breaking ⚠️) +* `Outpost.Destinations.GetAttempt()`: `response` **Changed** (Breaking ⚠️) + - `Destination` **Added** + - `Event` **Changed** (Breaking ⚠️) + - `ResponseData` **Changed** (Breaking ⚠️) +* `Outpost.Metrics.GetEventMetrics()`: **Added** +* `Outpost.Metrics.GetAttemptMetrics()`: **Added** + ## Typescript SDK Changes: -* `outpost.schemas.listDestinationTypes()`: `response.[].configFields[].type.enum(keyValueMap)` **Added** (Breaking ⚠️) -* `outpost.schemas.getDestinationType()`: `response.configFields[].type.enum(keyValueMap)` **Added** (Breaking ⚠️) +* `outpost.attempts.list()`: `response.models[]` **Changed** (Breaking ⚠️) + - `destination` **Added** + - `event` **Changed** (Breaking ⚠️) + - `responseData` **Changed** (Breaking ⚠️) +* `outpost.attempts.get()`: `response` **Changed** (Breaking ⚠️) + - `destination` **Added** + - `event` **Changed** (Breaking ⚠️) + - `responseData` **Changed** (Breaking ⚠️) +* `outpost.destinations.listAttempts()`: `response.models[]` **Changed** (Breaking ⚠️) + - `destination` **Added** + - `event` **Changed** (Breaking ⚠️) + - `responseData` **Changed** (Breaking ⚠️) +* `outpost.destinations.getAttempt()`: `response` **Changed** (Breaking ⚠️) + - `destination` **Added** + - `event` **Changed** (Breaking ⚠️) + - `responseData` **Changed** (Breaking ⚠️) +* `outpost.metrics.getEventMetrics()`: **Added** +* `outpost.metrics.getAttemptMetrics()`: **Added** + +## Python SDK Changes: +* `outpost.attempts.list()`: `response.models[]` **Changed** (Breaking ⚠️) + - `destination` **Added** + - `event` **Changed** (Breaking ⚠️) + - `response_data` **Changed** (Breaking ⚠️) +* `outpost.attempts.get()`: `response` **Changed** (Breaking ⚠️) + - `destination` **Added** + - `event` **Changed** (Breaking ⚠️) + - `response_data` **Changed** (Breaking ⚠️) +* `outpost.destinations.list_attempts()`: `response.models[]` **Changed** (Breaking ⚠️) + - `destination` **Added** + - `event` **Changed** (Breaking ⚠️) + - `response_data` **Changed** (Breaking ⚠️) +* `outpost.destinations.get_attempt()`: `response` **Changed** (Breaking ⚠️) + - `destination` **Added** + - `event` **Changed** (Breaking ⚠️) + - `response_data` **Changed** (Breaking ⚠️) +* `outpost.metrics.get_event_metrics()`: **Added** +* `outpost.metrics.get_attempt_metrics()`: **Added** diff --git a/.speakeasy/logs/changes/new.openapi.yaml b/.speakeasy/logs/changes/new.openapi.yaml index 0e9a440ef..ffd1cbb1c 100644 --- a/.speakeasy/logs/changes/new.openapi.yaml +++ b/.speakeasy/logs/changes/new.openapi.yaml @@ -204,13 +204,11 @@ components: nullable: true description: Cursor for the next page of results. Null if no more results. example: "MTcwNDA2NzIwMA==" - x-speakeasy-name-override: "next_cursor" prev: type: string nullable: true description: Cursor for the previous page of results. Null if on first page. example: null - x-speakeasy-name-override: "prev_cursor" APIErrorResponse: type: object description: Standard error response format. @@ -1745,6 +1743,7 @@ components: example: "200" response_data: type: object + nullable: true description: Response data from the attempt. Only included when include=response_data. additionalProperties: true example: {"status_code": 200, "body": '{"status":"ok"}', "headers": {"content-type": "application/json"}} @@ -1765,10 +1764,15 @@ components: description: The destination ID this attempt was sent to. example: "des_456" event: + nullable: true oneOf: - $ref: "#/components/schemas/EventSummary" - $ref: "#/components/schemas/EventFull" description: The associated event object. Only present when include=event or include=event.data. + destination: + nullable: true + $ref: "#/components/schemas/Destination" + description: The destination object. Only present when include=destination. EventSummary: type: object description: Event object without data (returned when include=event). @@ -1952,6 +1956,66 @@ components: type: string description: Regex pattern for validation (compatible with HTML5 pattern attribute). example: "^[a-zA-Z0-9_]+$" + MetricsDataPoint: + type: object + properties: + time_bucket: + type: + - string + - "null" + format: date-time + description: Start of the time bucket. Null when no granularity is specified. + example: "2026-03-02T14:00:00Z" + dimensions: + type: object + additionalProperties: + type: string + description: Dimension values for this data point. Empty object when no dimensions are requested. + example: + destination_id: "dest_abc" + topic: "user.created" + metrics: + type: object + additionalProperties: {} + description: Requested measure values for this data point. + example: + count: 1423 + error_rate: 0.02 + MetricsMetadata: + type: object + properties: + granularity: + type: + - string + - "null" + description: The granularity used for time bucketing, or null if none was specified. + example: "1h" + query_time_ms: + type: integer + description: Query execution time in milliseconds. + example: 42 + row_count: + type: integer + description: Number of data points returned. + example: 2 + row_limit: + type: integer + description: Maximum number of rows the query will return. + example: 100000 + truncated: + type: boolean + description: Whether the results were truncated due to hitting the row limit. + example: false + MetricsResponse: + type: object + properties: + data: + type: array + items: + $ref: "#/components/schemas/MetricsDataPoint" + description: Array of aggregated data points. + metadata: + $ref: "#/components/schemas/MetricsMetadata" BadRequest: type: object properties: @@ -2045,8 +2109,12 @@ tags: - `include=event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `include=event.data`: Include full event with payload data - `include=response_data`: Include response body and headers from the attempt + - `include=destination`: Include the full destination object with target information - name: Events description: Operations related to event history. + - name: Metrics + description: | + Aggregated metrics for events and delivery attempts. Supports time bucketing, dimensional grouping, and filtering. paths: /healthz: get: @@ -2211,9 +2279,11 @@ paths: in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: Filter tenants by ID(s). Use bracket notation for multiple values (e.g., `id[0]=t1&id[1]=t2` or `id[]=t1&id[]=t2`). - name: limit in: query @@ -2232,21 +2302,18 @@ paths: enum: [asc, desc] default: desc description: Sort direction. - x-speakeasy-name-override: "direction" - name: next in: query required: false schema: type: string description: Cursor for the next page of results. Mutually exclusive with `prev`. - x-speakeasy-name-override: "next_cursor" - name: prev in: query required: false schema: type: string description: Cursor for the previous page of results. Mutually exclusive with `next`. - x-speakeasy-name-override: "prev_cursor" responses: "200": description: List of tenants. @@ -2401,17 +2468,21 @@ paths: in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: Filter events by ID(s). Use bracket notation for multiple values (e.g., `id[0]=abc&id[1]=def`). - name: tenant_id in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: | Filter events by tenant ID(s). Use bracket notation for multiple values (e.g., `tenant_id[0]=t1&tenant_id[1]=t2`). When authenticated with a Tenant JWT, this parameter is ignored and the JWT's tenant is used. @@ -2420,9 +2491,11 @@ paths: in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: Filter events by topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). - name: time[gte] in: query @@ -2467,14 +2540,12 @@ paths: schema: type: string description: Cursor for next page of results. - x-speakeasy-name-override: "next_cursor" - name: prev in: query required: false schema: type: string description: Cursor for previous page of results. - x-speakeasy-name-override: "prev_cursor" - name: order_by in: query required: false @@ -2491,7 +2562,6 @@ paths: enum: [asc, desc] default: desc description: Sort direction. - x-speakeasy-name-override: "direction" responses: "200": description: A paginated list of events. @@ -2595,9 +2665,11 @@ paths: in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: | Filter attempts by tenant ID(s). Use bracket notation for multiple values (e.g., `tenant_id[0]=t1&tenant_id[1]=t2`). When authenticated with a Tenant JWT, this parameter is ignored and the JWT's tenant is used. @@ -2606,17 +2678,21 @@ paths: in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). - name: destination_id in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: Filter attempts by destination ID(s). Use bracket notation for multiple values (e.g., `destination_id[0]=d1&destination_id[1]=d2`). - name: status in: query @@ -2629,9 +2705,11 @@ paths: in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). - name: time[gte] in: query @@ -2676,26 +2754,27 @@ paths: schema: type: string description: Cursor for next page of results. - x-speakeasy-name-override: "next_cursor" - name: prev in: query required: false schema: type: string description: Cursor for previous page of results. - x-speakeasy-name-override: "prev_cursor" - name: include in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`). - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object - name: order_by in: query required: false @@ -2712,7 +2791,6 @@ paths: enum: [asc, desc] default: desc description: Sort direction. - x-speakeasy-name-override: "direction" responses: "200": description: A paginated list of attempts. @@ -2808,14 +2886,17 @@ paths: in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`). - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object responses: "200": description: Attempt details. @@ -2959,17 +3040,21 @@ paths: in: query required: false schema: - type: array - items: - $ref: "#/components/schemas/DestinationType" + oneOf: + - $ref: "#/components/schemas/DestinationType" + - type: array + items: + $ref: "#/components/schemas/DestinationType" description: Filter destinations by type(s). Use bracket notation for multiple values (e.g., `type[0]=webhook&type[1]=aws_sqs`). - name: topics in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: Filter destinations by supported topic(s). Use bracket notation for multiple values (e.g., `topics[0]=user.created&topics[1]=user.deleted`). responses: "200": @@ -3303,9 +3388,11 @@ paths: in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). - name: status in: query @@ -3318,9 +3405,11 @@ paths: in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). - name: time[gte] in: query @@ -3365,26 +3454,27 @@ paths: schema: type: string description: Cursor for next page of results. - x-speakeasy-name-override: "next_cursor" - name: prev in: query required: false schema: type: string description: Cursor for previous page of results. - x-speakeasy-name-override: "prev_cursor" - name: include in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`). - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object - name: order_by in: query required: false @@ -3401,7 +3491,6 @@ paths: enum: [asc, desc] default: desc description: Sort direction. - x-speakeasy-name-override: "direction" responses: "200": description: A paginated list of attempts for the destination. @@ -3482,14 +3571,17 @@ paths: in: query required: false schema: - type: array - items: - type: string + oneOf: + - type: string + - type: array + items: + type: string description: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`). - `event`: Include event summary - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object responses: "200": description: Attempt details. @@ -3851,5 +3943,314 @@ paths: '504': $ref: '#/components/responses/Timeout' x-speakeasy-name-override: list + /metrics/events: + get: + tags: [Metrics] + summary: Get Event Metrics + description: | + Returns aggregated event publish metrics. Supports time bucketing via granularity, + dimensional grouping, and filtering. + + **Measures:** `count`, `rate` + + **Dimensions:** `tenant_id` (admin-only), `topic`, `destination_id` + + **Filters:** `tenant_id` (admin-only), `topic`, `destination_id` + operationId: getEventMetrics + parameters: + - name: time[start] + in: query + required: true + schema: + type: string + format: date-time + description: Start of the time range (inclusive). ISO 8601 timestamp. + example: "2026-03-02T00:00:00Z" + - name: time[end] + in: query + required: true + schema: + type: string + format: date-time + description: End of the time range (exclusive). ISO 8601 timestamp. + example: "2026-03-03T00:00:00Z" + - name: granularity + in: query + required: false + schema: + type: string + description: | + Time bucketing granularity. Pattern: ``. + Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12). + When omitted, returns a single aggregate row per dimension combination. + example: "1h" + - name: measures + in: query + required: true + schema: + oneOf: + - type: string + enum: [count, rate] + - type: array + items: + type: string + enum: [count, rate] + description: Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). + example: ["count"] + - name: dimensions + in: query + required: false + schema: + oneOf: + - type: string + enum: [tenant_id, topic, destination_id] + - type: array + items: + type: string + enum: [tenant_id, topic, destination_id] + description: Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). + - name: filters[topic] + in: query + required: false + schema: + oneOf: + - type: string + - type: array + items: + type: string + description: Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + - name: filters[destination_id] + in: query + required: false + schema: + oneOf: + - type: string + - type: array + items: + type: string + description: Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + - name: filters[tenant_id] + in: query + required: false + schema: + oneOf: + - type: string + - type: array + items: + type: string + description: Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + responses: + "200": + description: Aggregated event metrics. + content: + application/json: + schema: + $ref: "#/components/schemas/MetricsResponse" + examples: + HourlyEventCount: + value: + data: + - time_bucket: "2026-03-02T14:00:00Z" + dimensions: + topic: "user.created" + metrics: + count: 1423 + - time_bucket: "2026-03-02T15:00:00Z" + dimensions: + topic: "user.created" + metrics: + count: 1891 + metadata: + granularity: "1h" + query_time_ms: 42 + row_count: 2 + row_limit: 100000 + truncated: false + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "403": + description: JWT caller attempted to use admin-only dimension or filter (tenant_id). + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + "500": + $ref: "#/components/responses/InternalServerError" + /metrics/attempts: + get: + tags: [Metrics] + summary: Get Attempt Metrics + description: | + Returns aggregated delivery attempt metrics. Supports time bucketing via granularity, + dimensional grouping, and filtering. + + **Measures:** `count`, `successful_count`, `failed_count`, `error_rate`, + `first_attempt_count`, `retry_count`, `manual_retry_count`, `avg_attempt_number`, + `rate`, `successful_rate`, `failed_rate` + + **Dimensions:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + + **Filters:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + operationId: getAttemptMetrics + parameters: + - name: time[start] + in: query + required: true + schema: + type: string + format: date-time + description: Start of the time range (inclusive). ISO 8601 timestamp. + example: "2026-03-02T00:00:00Z" + - name: time[end] + in: query + required: true + schema: + type: string + format: date-time + description: End of the time range (exclusive). ISO 8601 timestamp. + example: "2026-03-03T00:00:00Z" + - name: granularity + in: query + required: false + schema: + type: string + description: | + Time bucketing granularity. Pattern: ``. + Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12). + When omitted, returns a single aggregate row per dimension combination. + example: "1h" + - name: measures + in: query + required: true + schema: + oneOf: + - type: string + enum: [count, successful_count, failed_count, error_rate, first_attempt_count, retry_count, manual_retry_count, avg_attempt_number, rate, successful_rate, failed_rate] + - type: array + items: + type: string + enum: [count, successful_count, failed_count, error_rate, first_attempt_count, retry_count, manual_retry_count, avg_attempt_number, rate, successful_rate, failed_rate] + description: Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). + example: ["count", "error_rate"] + - name: dimensions + in: query + required: false + schema: + oneOf: + - type: string + enum: [tenant_id, destination_id, topic, status, code, manual, attempt_number] + - type: array + items: + type: string + enum: [tenant_id, destination_id, topic, status, code, manual, attempt_number] + description: Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). + - name: filters[destination_id] + in: query + required: false + schema: + oneOf: + - type: string + - type: array + items: + type: string + description: Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + - name: filters[topic] + in: query + required: false + schema: + oneOf: + - type: string + - type: array + items: + type: string + description: Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + - name: filters[status] + in: query + required: false + schema: + oneOf: + - type: string + enum: [success, failed] + - type: array + items: + type: string + enum: [success, failed] + description: Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). + - name: filters[code] + in: query + required: false + schema: + oneOf: + - type: string + - type: array + items: + type: string + description: Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). + - name: filters[manual] + in: query + required: false + schema: + type: string + enum: ["true", "false"] + description: Filter by manual retry flag. + - name: filters[attempt_number] + in: query + required: false + schema: + oneOf: + - type: string + - type: array + items: + type: string + description: Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). + - name: filters[tenant_id] + in: query + required: false + schema: + oneOf: + - type: string + - type: array + items: + type: string + description: Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + responses: + "200": + description: Aggregated attempt metrics. + content: + application/json: + schema: + $ref: "#/components/schemas/MetricsResponse" + examples: + DailyAttemptCounts: + value: + data: + - time_bucket: "2026-03-02T00:00:00Z" + dimensions: + destination_id: "dest_abc" + metrics: + count: 1423 + successful_count: 1393 + failed_count: 30 + error_rate: 0.0211 + metadata: + granularity: "1d" + query_time_ms: 38 + row_count: 1 + row_limit: 100000 + truncated: false + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthorized" + "403": + description: JWT caller attempted to use admin-only dimension or filter (tenant_id). + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + "500": + $ref: "#/components/responses/InternalServerError" security: - BearerAuth: [] diff --git a/.speakeasy/logs/changes/old.openapi.yaml b/.speakeasy/logs/changes/old.openapi.yaml index 0a2c08661..b086ca97a 100644 --- a/.speakeasy/logs/changes/old.openapi.yaml +++ b/.speakeasy/logs/changes/old.openapi.yaml @@ -204,13 +204,11 @@ components: nullable: true description: Cursor for the next page of results. Null if no more results. example: "MTcwNDA2NzIwMA==" - x-speakeasy-name-override: "next_cursor" prev: type: string nullable: true description: Cursor for the previous page of results. Null if on first page. example: null - x-speakeasy-name-override: "prev_cursor" APIErrorResponse: type: object description: Standard error response format. @@ -1921,7 +1919,7 @@ components: properties: type: type: string - enum: [text, checkbox] + enum: [text, checkbox, key_value_map] example: "text" label: type: string @@ -2174,11 +2172,9 @@ paths: in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: Filter tenants by ID(s). Use bracket notation for multiple values (e.g., `id[0]=t1&id[1]=t2` or `id[]=t1&id[]=t2`). - name: limit in: query @@ -2197,21 +2193,18 @@ paths: enum: [asc, desc] default: desc description: Sort direction. - x-speakeasy-name-override: "direction" - name: next in: query required: false schema: type: string description: Cursor for the next page of results. Mutually exclusive with `prev`. - x-speakeasy-name-override: "next_cursor" - name: prev in: query required: false schema: type: string description: Cursor for the previous page of results. Mutually exclusive with `next`. - x-speakeasy-name-override: "prev_cursor" responses: "200": description: List of tenants. @@ -2366,21 +2359,17 @@ paths: in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: Filter events by ID(s). Use bracket notation for multiple values (e.g., `id[0]=abc&id[1]=def`). - name: tenant_id in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: | Filter events by tenant ID(s). Use bracket notation for multiple values (e.g., `tenant_id[0]=t1&tenant_id[1]=t2`). When authenticated with a Tenant JWT, this parameter is ignored and the JWT's tenant is used. @@ -2389,11 +2378,9 @@ paths: in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: Filter events by topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). - name: time[gte] in: query @@ -2438,14 +2425,12 @@ paths: schema: type: string description: Cursor for next page of results. - x-speakeasy-name-override: "next_cursor" - name: prev in: query required: false schema: type: string description: Cursor for previous page of results. - x-speakeasy-name-override: "prev_cursor" - name: order_by in: query required: false @@ -2462,7 +2447,6 @@ paths: enum: [asc, desc] default: desc description: Sort direction. - x-speakeasy-name-override: "direction" responses: "200": description: A paginated list of events. @@ -2566,11 +2550,9 @@ paths: in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: | Filter attempts by tenant ID(s). Use bracket notation for multiple values (e.g., `tenant_id[0]=t1&tenant_id[1]=t2`). When authenticated with a Tenant JWT, this parameter is ignored and the JWT's tenant is used. @@ -2579,21 +2561,17 @@ paths: in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). - name: destination_id in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: Filter attempts by destination ID(s). Use bracket notation for multiple values (e.g., `destination_id[0]=d1&destination_id[1]=d2`). - name: status in: query @@ -2606,11 +2584,9 @@ paths: in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). - name: time[gte] in: query @@ -2655,23 +2631,19 @@ paths: schema: type: string description: Cursor for next page of results. - x-speakeasy-name-override: "next_cursor" - name: prev in: query required: false schema: type: string description: Cursor for previous page of results. - x-speakeasy-name-override: "prev_cursor" - name: include in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`). - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) @@ -2693,7 +2665,6 @@ paths: enum: [asc, desc] default: desc description: Sort direction. - x-speakeasy-name-override: "direction" responses: "200": description: A paginated list of attempts. @@ -2789,11 +2760,9 @@ paths: in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`). - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) @@ -2942,21 +2911,17 @@ paths: in: query required: false schema: - oneOf: - - $ref: "#/components/schemas/DestinationType" - - type: array - items: - $ref: "#/components/schemas/DestinationType" + type: array + items: + $ref: "#/components/schemas/DestinationType" description: Filter destinations by type(s). Use bracket notation for multiple values (e.g., `type[0]=webhook&type[1]=aws_sqs`). - name: topics in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: Filter destinations by supported topic(s). Use bracket notation for multiple values (e.g., `topics[0]=user.created&topics[1]=user.deleted`). responses: "200": @@ -3290,11 +3255,9 @@ paths: in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). - name: status in: query @@ -3307,11 +3270,9 @@ paths: in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). - name: time[gte] in: query @@ -3356,23 +3317,19 @@ paths: schema: type: string description: Cursor for next page of results. - x-speakeasy-name-override: "next_cursor" - name: prev in: query required: false schema: type: string description: Cursor for previous page of results. - x-speakeasy-name-override: "prev_cursor" - name: include in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`). - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) @@ -3394,7 +3351,6 @@ paths: enum: [asc, desc] default: desc description: Sort direction. - x-speakeasy-name-override: "direction" responses: "200": description: A paginated list of attempts for the destination. @@ -3475,11 +3431,9 @@ paths: in: query required: false schema: - oneOf: - - type: string - - type: array - items: - type: string + type: array + items: + type: string description: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`). - `event`: Include event summary diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ba159fccc..1486f5abb 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,23 +1,23 @@ -speakeasyVersion: 1.755.0 +speakeasyVersion: 1.759.1 sources: Outpost API: sourceNamespace: outpost-api - sourceRevisionDigest: sha256:867bbe73f297922d29a29d4e14dabac69782cd49cc91781afe75acb9f28d6716 - sourceBlobDigest: sha256:ea8cdc8c007d826f491f066a1c07109eeda20d77e8c4ddbe0f33164b5b6d7cf7 + sourceRevisionDigest: sha256:0b2ab603d9f9a43a0c31f79cb13632639b897a982fae7a633eeecf7cf26e6912 + sourceBlobDigest: sha256:790d6ebac7e044629fe9887d22820a470e0552fe9bac0c23fcb1d03be5849c89 tags: - latest - 0.0.1 Outpost API (Go): sourceNamespace: outpost-api - sourceRevisionDigest: sha256:9a8a195371b0dddde46be4b4d643f98d4ad1011306f0f8cf40e2e008ae0f0b2e - sourceBlobDigest: sha256:c4768c8648fbe077a9988fff6c1cc3826d17353eaf23c49b5bb4f88e4980e849 + sourceRevisionDigest: sha256:d66dd7c6ff71be88a80a57f56609bd53e8bc7b18faa82e912c67f28f0073967f + sourceBlobDigest: sha256:493b98b664325d00c98a11bb3d556af035573398771826f9df1adbfed2384a24 tags: - latest - 0.0.1 Outpost API (Python): sourceNamespace: outpost-api - sourceRevisionDigest: sha256:79f3198fcfdc6df1891dce6405ee29bc2dab9b1479fd3cbda5539e64d8bcab1e - sourceBlobDigest: sha256:be44b375e1684309e73c394ed059285a10eb26018a198e257f21c225201aa83c + sourceRevisionDigest: sha256:f10d5369c323618c5b3b4a8a9fd381047fcd26efcca435c53667325d9e915f70 + sourceBlobDigest: sha256:fec566896c61d5010672201dbc244e2427680eabddccccb35c8757554d397abf tags: - latest - 0.0.1 @@ -25,24 +25,24 @@ targets: outpost-go: source: Outpost API (Go) sourceNamespace: outpost-api - sourceRevisionDigest: sha256:9a8a195371b0dddde46be4b4d643f98d4ad1011306f0f8cf40e2e008ae0f0b2e - sourceBlobDigest: sha256:c4768c8648fbe077a9988fff6c1cc3826d17353eaf23c49b5bb4f88e4980e849 + sourceRevisionDigest: sha256:d66dd7c6ff71be88a80a57f56609bd53e8bc7b18faa82e912c67f28f0073967f + sourceBlobDigest: sha256:493b98b664325d00c98a11bb3d556af035573398771826f9df1adbfed2384a24 codeSamplesNamespace: outpost-api-go-code-samples - codeSamplesRevisionDigest: sha256:fa2dd0f0ec1437900004256eada093d0134f82db512c12a7cf059f928301215d + codeSamplesRevisionDigest: sha256:04d011ca0667a262a53f06e20cd9f1c41ceec3fe8107dbb01906ad89e7f947e7 outpost-python: source: Outpost API (Python) sourceNamespace: outpost-api - sourceRevisionDigest: sha256:79f3198fcfdc6df1891dce6405ee29bc2dab9b1479fd3cbda5539e64d8bcab1e - sourceBlobDigest: sha256:be44b375e1684309e73c394ed059285a10eb26018a198e257f21c225201aa83c + sourceRevisionDigest: sha256:f10d5369c323618c5b3b4a8a9fd381047fcd26efcca435c53667325d9e915f70 + sourceBlobDigest: sha256:fec566896c61d5010672201dbc244e2427680eabddccccb35c8757554d397abf codeSamplesNamespace: outpost-api-python-code-samples - codeSamplesRevisionDigest: sha256:6e91a5c9b46a4d8089f20f1421b0f91f84edd39fdc3cce0665b27451d2b275ce + codeSamplesRevisionDigest: sha256:245d392bfe60e871669508a60b699465d294783ea10e92e53ba617b3cb1101e2 outpost-ts: source: Outpost API sourceNamespace: outpost-api - sourceRevisionDigest: sha256:867bbe73f297922d29a29d4e14dabac69782cd49cc91781afe75acb9f28d6716 - sourceBlobDigest: sha256:ea8cdc8c007d826f491f066a1c07109eeda20d77e8c4ddbe0f33164b5b6d7cf7 + sourceRevisionDigest: sha256:0b2ab603d9f9a43a0c31f79cb13632639b897a982fae7a633eeecf7cf26e6912 + sourceBlobDigest: sha256:790d6ebac7e044629fe9887d22820a470e0552fe9bac0c23fcb1d03be5849c89 codeSamplesNamespace: outpost-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:2092e27c6781b7555ba912ab3bf31c1aa62e6dca75bf647848993c9207615f95 + codeSamplesRevisionDigest: sha256:2d1c881332d1b89c0ab46f8698011a441e45833dd77d6bf9196c54ea8ede935b workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/sdks/outpost-go/.speakeasy/gen.lock b/sdks/outpost-go/.speakeasy/gen.lock index 039063330..beffd27c1 100644 --- a/sdks/outpost-go/.speakeasy/gen.lock +++ b/sdks/outpost-go/.speakeasy/gen.lock @@ -1,19 +1,19 @@ lockVersion: 2.0.0 id: f0627709-5a00-43ac-8678-ca716d6f379c management: - docChecksum: 9f9ff1119215b8ddec5bff30b20e09e4 + docChecksum: 303920ca886857183138e55fb698076e docVersion: 0.0.1 - speakeasyVersion: 1.755.0 - generationVersion: 2.865.2 - releaseVersion: 0.8.1 - configChecksum: f02c81872a9c1b3485067c91a779f409 + speakeasyVersion: 1.759.1 + generationVersion: 2.869.10 + releaseVersion: 0.8.2 + configChecksum: db7c4733c735e162777795a1362696b6 repoURL: https://github.com/hookdeck/outpost.git repoSubDirectory: sdks/outpost-go installationURL: https://github.com/hookdeck/outpost persistentEdits: - generation_id: 4de79089-e877-4b1b-8b39-945807a81ff0 - pristine_commit_hash: 9e4fded31dd17ea2a88c0a76460d9eec5bf09ef6 - pristine_tree_hash: 6995c7018d734deadad1ffae5b00cd941cd5ff02 + generation_id: fbfea985-c960-40e1-8de6-130648f793d0 + pristine_commit_hash: 4ef7c636d656405f7f2e360d5d700de112785625 + pristine_tree_hash: 7e285f492eb44389c6c1662dd3a28f6846af16c5 features: go: additionalDependencies: 0.1.0 @@ -46,8 +46,8 @@ trackedFiles: pristine_git_object: 302b1c4952b4902140fcd2a6b900b887733b3255 attempts.go: id: f21bf72dadf3 - last_write_checksum: sha1:45a334f5b7b228c14d107fc4c03e8be237b8a6e1 - pristine_git_object: 51208c5f6ff4c90b9f7c5e2a18d9d940de93eae4 + last_write_checksum: sha1:76951b5b57e890a1bd1540ecfbed4028850917b6 + pristine_git_object: 82dbebf6b2ab9468d6e4f7c30c896bb3b3b2c949 destinations.go: id: c850727f8555 last_write_checksum: sha1:e9dc75a06c150e1ea29a7135fb98f9a178396c5c @@ -90,8 +90,8 @@ trackedFiles: pristine_git_object: 71ddaa3bff7c43aa01c16c3b89c30ab09e66f732 docs/models/components/attempt.md: id: 830868ab1006 - last_write_checksum: sha1:44985e03a38582e104feba2385c7ac86836be6c9 - pristine_git_object: 8372100a137f4b73f15c3dd6d867e54c8cd6c7e5 + last_write_checksum: sha1:e66531bff7d20fdc97ee3d2af853be356b34c8fd + pristine_git_object: 86b670de7964a5ac4adb2b5a4cecd543a7f2e268 docs/models/components/attemptpaginatedresult.md: id: 56e122fd3059 last_write_checksum: sha1:7a3213bad4fe3fe5d00a55b1355eee275c5cc588 @@ -356,6 +356,18 @@ trackedFiles: id: 728948c70168 last_write_checksum: sha1:7c40945dac218ce5e5e11e7c907d27a3ea14c417 pristine_git_object: df1fdd59f3c85e4ba70573ff7954b12ac1d33d08 + docs/models/components/metricsdatapoint.md: + id: dfbc8ed48932 + last_write_checksum: sha1:4acc3e90d99abaeee4cf7169467132982f961ec7 + pristine_git_object: af730affb0b930a7546e8ac0fab76278ffc79472 + docs/models/components/metricsmetadata.md: + id: 09b0bc8b1617 + last_write_checksum: sha1:6f3e1abd39378a7cabe79fea99328e301d8c86f3 + pristine_git_object: f367062aba11780369dc5c43550a0ec49ab062d5 + docs/models/components/metricsresponse.md: + id: c99709afc575 + last_write_checksum: sha1:c9b2a561cfc884d53dbee7208b0aff55bf4c39d0 + pristine_git_object: b9a2167dd564f2febeb6adb4849e35fb3bf06c24 docs/models/components/portalredirect.md: id: bd1e51e1707f last_write_checksum: sha1:f14dc9ef3182ec15849c2d2a56cc2db18fe1b8b4 @@ -476,10 +488,78 @@ trackedFiles: id: b795ac6783b2 last_write_checksum: sha1:bc61c705302651aeeed1e3cb65f4c3880fb35825 pristine_git_object: 36fdba2e3a1e447f386a62fe5b70a452e35a59e6 + docs/models/operations/filtersattemptnumber.md: + id: 3e38bcb79609 + last_write_checksum: sha1:b74f4f77fbe5fba1398d7cb43a13e1bcf5f7b703 + pristine_git_object: 354f7d4c79c406b779b1a35cb89f845bca2abff3 + docs/models/operations/filterscode.md: + id: 11d407086ff1 + last_write_checksum: sha1:a8348d0505dc70c0c917ce8f72c295e3d8ff37b8 + pristine_git_object: c22660d27a53fb4ad24a7d0f326d188d8eab14fa + docs/models/operations/filtersmanual.md: + id: 0d3afc32fb66 + last_write_checksum: sha1:eaf2f525ff7f1c44a2d118c08769bcb49280b98d + pristine_git_object: 963804309c940d750d57efeae7465543b484bcea + docs/models/operations/filtersstatus.md: + id: 288bb529766f + last_write_checksum: sha1:68bfa9a917d68e821e5ed5a7a9612dae13e3e5f7 + pristine_git_object: c4597015ef819f334d307a135da5380f63cb78eb + docs/models/operations/filtersstatusenum1.md: + id: a9be4606ddf5 + last_write_checksum: sha1:77323b7deaff38adcc6c295562ef842a633c263e + pristine_git_object: 7d42cba72fb8e61e18d7130278ed912f1b82773f + docs/models/operations/filtersstatusenum2.md: + id: 3eece9a873a7 + last_write_checksum: sha1:e57919d264339dbb09fa870931d360454bf52274 + pristine_git_object: d8bd54a950f6e5e5b40cb60781fe68e182553f0c + docs/models/operations/getattemptmetricsdimensionsenum1.md: + id: 34d0bcda1090 + last_write_checksum: sha1:76ad1c4f21813ae9a9c2a7a792b99d7e68ced92e + pristine_git_object: 81dae1a2c15569a60c896e5c4e643dcf633d99c9 + docs/models/operations/getattemptmetricsdimensionsenum2.md: + id: 10661da57a75 + last_write_checksum: sha1:12da3ee112562d0ce955f65e79f47d2ef8700481 + pristine_git_object: d8de2903e17482d5dd025371ae625c451ef7b7c4 + docs/models/operations/getattemptmetricsdimensionsunion.md: + id: ce40423a335e + last_write_checksum: sha1:c3026491283c30570b6369aa572b8466fd280f0d + pristine_git_object: 4283cd846050e362148b9f07c4dffc2081fec6dc + docs/models/operations/getattemptmetricsfiltersdestinationid.md: + id: 6a00cec335e3 + last_write_checksum: sha1:6dff65517fea2ccb1d2ea7721bc847c9e44a00ab + pristine_git_object: 5c072334cf946fa07c45584328cc23f9422cb40e + docs/models/operations/getattemptmetricsfilterstenantid.md: + id: 44ae32fc6953 + last_write_checksum: sha1:d7864f805c1d13a09900713bbfd24a793265779a + pristine_git_object: c3850bb1bd046065808d5dbcdc65516bef0feeb9 + docs/models/operations/getattemptmetricsfilterstopic.md: + id: 6c1ed722a603 + last_write_checksum: sha1:5eb472937354345bccf3fac5367fbabf70efaaf1 + pristine_git_object: 4f12ca072b0a8cee0b27359549a2471b1517581a + docs/models/operations/getattemptmetricsmeasuresenum1.md: + id: 4057a7c16751 + last_write_checksum: sha1:3610684ca16502e539a1aa8c15a8e32c16c2f116 + pristine_git_object: 089476203de0c31abdf5f33cfb816edf4df00d21 + docs/models/operations/getattemptmetricsmeasuresenum2.md: + id: dfe6f415e02b + last_write_checksum: sha1:f6779514e6b1700cffaf6ae7751fd8dbb8acd418 + pristine_git_object: 8453b07ef639178c259fd8dc88efdb9e292d1e85 + docs/models/operations/getattemptmetricsmeasuresunion.md: + id: 454f41df243f + last_write_checksum: sha1:ed3ad8b4a0f803216c9665c47d56ad156a95e2fd + pristine_git_object: 44cc67051a611770fbc03f4f2091ecee86e090da + docs/models/operations/getattemptmetricsrequest.md: + id: accc5c32f0c1 + last_write_checksum: sha1:dc7a24e0788bf28aa20400690739e43b0824f325 + pristine_git_object: e4a450ce8ed982774481bd05a0cad940702a1b0d + docs/models/operations/getattemptmetricsresponse.md: + id: 69295ef2ea44 + last_write_checksum: sha1:765207f47455d5bae79f60ce273d7d110750d5e8 + pristine_git_object: 4edcac53a06b2afe897c5ed17fb3d4e4aed4b55e docs/models/operations/getattemptrequest.md: id: 58916c0b18d3 - last_write_checksum: sha1:b28ba005e425bb3208484b48ecf42109c7c60593 - pristine_git_object: dffc6fbb246101084e11aabf42df29f8717830c1 + last_write_checksum: sha1:532c6786aaca0bdc63b302befd15e844742e0e82 + pristine_git_object: 91ba0139f7dd125dedbe04cc6145c6f861741381 docs/models/operations/getattemptresponse.md: id: c167b6fb6be1 last_write_checksum: sha1:1cd2a22dc75f0bb162f603d572273f9a9e8c4b5f @@ -492,6 +572,50 @@ trackedFiles: id: ddc808c51d22 last_write_checksum: sha1:55ba8aca411d0c24994bf9337502f10717506c07 pristine_git_object: ad61ebe1c989506ccf92da97dbed7365762a08c0 + docs/models/operations/geteventmetricsdimensionsenum1.md: + id: c09d77f90607 + last_write_checksum: sha1:8e5fd7e585aca586f26cd8e1d74d7cb170fc52e6 + pristine_git_object: 82a63ae56caf29495e63ca0405f91c1f899ea951 + docs/models/operations/geteventmetricsdimensionsenum2.md: + id: 96e65d2f3eb2 + last_write_checksum: sha1:cdf4848c354d10baf3933ac1dbc9cc7800a69015 + pristine_git_object: c1dd9adcf9241a368d520d3a488f2bda1cd10fe7 + docs/models/operations/geteventmetricsdimensionsunion.md: + id: 7bc8cbf6b0b9 + last_write_checksum: sha1:25f477b2d2e581b8ecdadbeb7236c48e0ec9ac87 + pristine_git_object: 150d986c243bec573a956e8728fcd56e7128829e + docs/models/operations/geteventmetricsfiltersdestinationid.md: + id: 3848b6181583 + last_write_checksum: sha1:99a2844d873501ec9110c10e3a32d1da2c4bb209 + pristine_git_object: 4c5e374d167825b62c05f82b840408f346bef277 + docs/models/operations/geteventmetricsfilterstenantid.md: + id: 3f1ff10bfc33 + last_write_checksum: sha1:65427bc0b420521a2dc7ad8d2b755e574683ff9c + pristine_git_object: 417fd0be3418646fc2871016b471723745470ad8 + docs/models/operations/geteventmetricsfilterstopic.md: + id: d653fc88c22c + last_write_checksum: sha1:01e6459aad971b9c1ce05389bf3dd7a108c89ae3 + pristine_git_object: e61ae463ad4c0234301b6b1a29ea675a7f34a70f + docs/models/operations/geteventmetricsmeasuresenum1.md: + id: aff95eb8bafe + last_write_checksum: sha1:bc954a0671f1bae5784b2a6e90bc7a9b8b49a147 + pristine_git_object: 146bab7a7b737239f194b1d671ee92d86171e53c + docs/models/operations/geteventmetricsmeasuresenum2.md: + id: 717cd1b20163 + last_write_checksum: sha1:0fc87706e0fca81b410fbb1c4364492a5e676f70 + pristine_git_object: daf4bcfd76220c47f010956bd503fd23cafe85c3 + docs/models/operations/geteventmetricsmeasuresunion.md: + id: 6bc8aed73c02 + last_write_checksum: sha1:6df28427c6229238e149fa4abef388fceee4c424 + pristine_git_object: 3ad50814c22f67548f1f563512f666be486c775d + docs/models/operations/geteventmetricsrequest.md: + id: e149809d1e2c + last_write_checksum: sha1:13c5dbc3d2d3dee5d8f5b6d00a3b7aa3fca7cfeb + pristine_git_object: 6e4ccf4c68258ba99cab6890fa2a37c99cf2fc92 + docs/models/operations/geteventmetricsresponse.md: + id: 033f139e5465 + last_write_checksum: sha1:0d0f1ed89036c211103a9cf85456b3b8ac99c9c4 + pristine_git_object: f220aebf283f270cdc3773caee17b59d8fc4d83b docs/models/operations/geteventrequest.md: id: ed4423b8e9dd last_write_checksum: sha1:d3c74c42699e2fce61db02de129ca8fa02a0ec00 @@ -502,8 +626,8 @@ trackedFiles: pristine_git_object: b91badabb475ffaeadaeb6030a11bc4c47245238 docs/models/operations/gettenantdestinationattemptrequest.md: id: ba08fde2adc7 - last_write_checksum: sha1:d7c7c7bd153e9149afc65852e7f3bbf9366247ad - pristine_git_object: 049c52de5ac404a266beb6d85aeb8d2391aa2c2a + last_write_checksum: sha1:e77c6280b9b7288146752a4bdd4067886421d049 + pristine_git_object: 08d9b92e9df595fc1441f02f34755338fc8a830e docs/models/operations/gettenantdestinationattemptresponse.md: id: a3d87920e70c last_write_checksum: sha1:94c25e711ef5320350a137fc58fdef479022f7f8 @@ -566,8 +690,8 @@ trackedFiles: pristine_git_object: 021610147662ccba72666c2c460084c201250be5 docs/models/operations/listattemptsrequest.md: id: c664c21b68cc - last_write_checksum: sha1:38fe46ce82fd345cfc36e7eb3ea4ba0a465543a1 - pristine_git_object: 8a4b24dcea60eefabeb329c02d32a457e829b852 + last_write_checksum: sha1:63ca7fb4c2c62e0ea87b5389e108b296b166e2bb + pristine_git_object: 78b1d2e3e0d1d286fccfb774dd3dfc1e20cbae11 docs/models/operations/listattemptsresponse.md: id: fa9c919a289b last_write_checksum: sha1:6eed5efa749686ef922a53fef7fe3b6852355dae @@ -606,8 +730,8 @@ trackedFiles: pristine_git_object: 289bab4419ad077e95a8418271d9646621d17131 docs/models/operations/listtenantdestinationattemptsrequest.md: id: 341955bbcb29 - last_write_checksum: sha1:9bfe6816b6c8c4a9ddc30a56c7d87533df696505 - pristine_git_object: bf2e6bc3f5aa3e5e3a6765b8e7456b74aeafa420 + last_write_checksum: sha1:2065c862bf038bbcc7779e4171cd318bc53e2659 + pristine_git_object: 91a13034062d0196876c501febb2aa0ac60ad331 docs/models/operations/listtenantdestinationattemptsresponse.md: id: 2e6018891322 last_write_checksum: sha1:279b89417ca9c301009d0a4c92a98587a4f82583 @@ -686,12 +810,12 @@ trackedFiles: pristine_git_object: 2ee4dd095128cac6926139658e39e3e815e51396 docs/sdks/attempts/README.md: id: 41a6f5edd623 - last_write_checksum: sha1:42ab97552d7b07e7461967a2bcee9e031eb452f8 - pristine_git_object: 91b2d248eb0315301f7e8cbea3c04e49968fa7dd + last_write_checksum: sha1:414ba3650e78fa7000a97ae33ec8f3c840bb63b5 + pristine_git_object: 7b31816cf89d5bd51a9356a91c7351b43f93e8eb docs/sdks/destinations/README.md: id: e83d288899aa - last_write_checksum: sha1:87a4fa0ab33895feb2dc8e27edece39fb4e5a90c - pristine_git_object: 0de1f256b179b31232574fdc003020efdb97ec5f + last_write_checksum: sha1:7334c67e08e0422563eb2780513dbca8f15554b6 + pristine_git_object: 91402ab569f5f4898f212310ac06fecc0371b706 docs/sdks/events/README.md: id: cf45a4390b9b last_write_checksum: sha1:89e2774d5d34b8822b6e9df9d2e9f1e0fabbf321 @@ -700,6 +824,10 @@ trackedFiles: id: 5082c50d5e82 last_write_checksum: sha1:23157d5489dfa44c296067f57581ada0ad7ee463 pristine_git_object: 56cf1acd9d15018b231328e0cac0f84a11f4af5f + docs/sdks/metrics/README.md: + id: a8545d964e21 + last_write_checksum: sha1:d4409bb14996e5c684c65c75ed437203bf5759ae + pristine_git_object: f2194dbf971c234cf51cb4e043a05d710a12e75e docs/sdks/publish/README.md: id: 370ef5537c93 last_write_checksum: sha1:ca3f50a154544a3aafbb9ee95b8e1a592ddee43a @@ -788,6 +916,10 @@ trackedFiles: id: 1133b2a27019 last_write_checksum: sha1:c03378176a107205b8938606faef3fd8fb8f91a0 pristine_git_object: a614e37673d3ea81eabc6139236edfb22a15dc55 + metrics.go: + id: 9539b0d0fd18 + last_write_checksum: sha1:5a55de3671de88e538697160706e90df66ae6829 + pristine_git_object: 199f17173ef8eb293c03429fec0b88661235b2a8 models/apierrors/apierror.go: id: 4cecf27a5a54 last_write_checksum: sha1:e699d3325ea82ea2b0d29656396210f0513c3391 @@ -826,8 +958,8 @@ trackedFiles: pristine_git_object: 7a24725d255c9bb5620dcd8e128b1b9b4965469b models/components/attempt.go: id: f1a7ba25d0ee - last_write_checksum: sha1:f5e063482f8386df36fd49e4794bc6f3a1b10246 - pristine_git_object: d47ceaf6bd3b04621061b6af82795a2678ee7ead + last_write_checksum: sha1:d72beba9cf6e7e4f8b8d967bac463b286d528bc6 + pristine_git_object: 41ced248dddc08c10132904911bb7a05f1670385 models/components/attemptpaginatedresult.go: id: 9540a56f5184 last_write_checksum: sha1:f30c24734f4388bf1080447828cbc7dfc2466484 @@ -988,18 +1120,10 @@ trackedFiles: id: 3382b9f29930 last_write_checksum: sha1:ff5c3780b7e17614eecc25b6a59bbf9ce5469cef pristine_git_object: 8c0b77e890bbb512adf9cc3632448e61749b318b - models/components/eventfull.go: - id: c15f9a36e30e - last_write_checksum: sha1:ae8641b280ba8bb6ea80a5786c695b43b2fca3e6 - pristine_git_object: 870ed875350d24e03dcb772b32809c4c6404c658 models/components/eventpaginatedresult.go: id: d5bf76e9c0f5 last_write_checksum: sha1:0aa59e112bc9547471480c6a0fe594042c8717a0 pristine_git_object: 686b14c89f9d4739a5c9bed097ec8ffaa3909dbb - models/components/eventsummary.go: - id: 51083012e78e - last_write_checksum: sha1:ec095e8c179b0363ca40452f03e6fd373e5dc227 - pristine_git_object: d378f04d5eba8385d12b1af963aa03476afff644 models/components/gcppubsubconfig.go: id: d2d3b56c9d41 last_write_checksum: sha1:2e170005719447bbd61e4c38b30280cf83aaa7cf @@ -1016,6 +1140,18 @@ trackedFiles: id: 790bad4a7abb last_write_checksum: sha1:01a20fcff33179809ff9920ee431c7adabbd98f1 pristine_git_object: 148ec47fb2dea6c188ec68eb3532d93169608168 + models/components/metricsdatapoint.go: + id: 7a1d3a5a8a04 + last_write_checksum: sha1:02da0e664e4bf174f371398344a5e50117ba52b8 + pristine_git_object: bbaa6c1ede1f2f2e850d0fb7bba62294d75735df + models/components/metricsmetadata.go: + id: d6585509ad49 + last_write_checksum: sha1:b49d91cad81cee6df33dae9040beb55d17c30f79 + pristine_git_object: ec2077890831855bc43e3e33b5713260c97e9338 + models/components/metricsresponse.go: + id: 3e26d776c914 + last_write_checksum: sha1:7042d03bacd00472079ff66646552df9cc591b19 + pristine_git_object: 95d8b89893847fd870245e93ed56044f5bde2541 models/components/portalredirect.go: id: 10570f8d72fd last_write_checksum: sha1:9ec6aeeef52f427e79b8c8c16f6c77cc2d7fc4b3 @@ -1106,8 +1242,12 @@ trackedFiles: pristine_git_object: 8612b4b6a5732b83935fc1509b10765bbc7a6778 models/operations/getattempt.go: id: 5bdbb1b54eed - last_write_checksum: sha1:64d55a0ad5aaeb722c281e6d4b907bab1ee4de56 - pristine_git_object: f2c75fc33fe5340103fd24186c5cc3791b92b047 + last_write_checksum: sha1:20c4c4f3ac2b9a8c1a6ccf2095aae9db75d9351b + pristine_git_object: 907ae735e91bdcceab2bf5da76b33e26bc1d52d2 + models/operations/getattemptmetrics.go: + id: 2cba7e6f3d47 + last_write_checksum: sha1:647b7b5fb7ec2e2a5c9bc819a134bdf7593e1a6f + pristine_git_object: 4b4f7ed553b19e9ba37ae6bc4df8aa0f231ad2ad models/operations/getdestinationtypeschema.go: id: 469bb274efa3 last_write_checksum: sha1:4432b390507c74248fbd263cfebc10e51297b05e @@ -1116,6 +1256,10 @@ trackedFiles: id: c0f52659220b last_write_checksum: sha1:af461521a094389ef681c192b8e7c74f472aece7 pristine_git_object: 8d41e63c252ffaaa3b8c44846524199dc0102fd9 + models/operations/geteventmetrics.go: + id: c1ef3d39de67 + last_write_checksum: sha1:1709de17267819766bf58b60b72c0eb2166570b8 + pristine_git_object: 87fab145fae4a0c7b452c14f9472aab73edb8e2f models/operations/gettenant.go: id: 24249036c6f1 last_write_checksum: sha1:67bf3e92f96199335f6ed7efb615a5f5d76a4131 @@ -1126,8 +1270,8 @@ trackedFiles: pristine_git_object: 156a49b5516c8c20421406c97ab2925308472353 models/operations/gettenantdestinationattempt.go: id: f1b412ffe1c3 - last_write_checksum: sha1:f67d59e7d5b99b95abd6b655c59814d0c9ede810 - pristine_git_object: 5a8f9a6f8cfd94cc43bd73240a00b708d3e722c3 + last_write_checksum: sha1:09ebfb6f5e1f22897c9ff6713b29d5cf2dde70a8 + pristine_git_object: 1a2d2e171ecb0662fe6b9eeecbbf221f1ac188a3 models/operations/gettenantportalurl.go: id: 5430be50389e last_write_checksum: sha1:872ba375dc6429ec504915a5bbb6fa7450ad3149 @@ -1142,8 +1286,8 @@ trackedFiles: pristine_git_object: 0dd35327c5d50f6989eb6efc122bbc494a2321fe models/operations/listattempts.go: id: 2aa25aef61af - last_write_checksum: sha1:5ec578e7b32381f892892ee2e9281d01714f743a - pristine_git_object: aa71fe196d29b14f2af5991d32665fd897d860bf + last_write_checksum: sha1:7674c11c6528423578c9222392dfd0480991caf3 + pristine_git_object: 9b77f5298e48b215b81a92417030640764fca8fe models/operations/listdestinationtypeschemas.go: id: d2e665967050 last_write_checksum: sha1:a001a482905b714996e6379d376970e46f67980e @@ -1154,8 +1298,8 @@ trackedFiles: pristine_git_object: bc2dcf28c93ddab219eecad93c918e3aa37fc07b models/operations/listtenantdestinationattempts.go: id: d8e07f679505 - last_write_checksum: sha1:a743b5f84749827e9037c8120db1cbbca69c3f89 - pristine_git_object: 883ad4769654f30d3037a4136a4e0a08439ccabd + last_write_checksum: sha1:88cfb02129699c4daa4fdd32fe9765fa4891606b + pristine_git_object: b0c5305554cc4451c415045383478b7e8cf9ff13 models/operations/listtenantdestinations.go: id: ce62042d8804 last_write_checksum: sha1:65aa11c2afd66d0e3b37adfa188d51d94808374c @@ -1198,8 +1342,8 @@ trackedFiles: pristine_git_object: e6e5a01c6e721e879e24a38a1f97e3e27d4686d4 outpost.go: id: 7aebc57e3f81 - last_write_checksum: sha1:45f644d95df8abbd46de76275178f0425a003c9a - pristine_git_object: ece5f32e51108940106cd935c05a2c8c1d39a6af + last_write_checksum: sha1:f8e3ae12507986b95358c5b816c1bf5d609c4146 + pristine_git_object: ba6c4ec49bbfabe9886cc43db843b614df2367ba publish.go: id: b4cd78c909e0 last_write_checksum: sha1:2591f3410b71150c66f40f3c9448e35594e4b6ab @@ -1679,12 +1823,74 @@ examples: responses: "200": application/json: {"models": [{"id": "del_123", "status": "success", "time": "2024-01-01T00:00:05Z", "code": "200", "attempt_number": 1, "event_id": "evt_123", "destination_id": "des_456", "event": {"id": "evt_123", "topic": "user.created", "time": "2024-01-01T00:00:00Z", "eligible_for_retry": false, "metadata": {"source": "crm"}}}], "pagination": {"order_by": "time", "dir": "desc", "limit": 100, "next": null, "prev": null}} + getEventMetrics: + speakeasy-default-get-event-metrics: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T14:00:00Z", "dimensions": {"destination_id": "dest_abc", "topic": "user.created"}, "metrics": {"count": 1423, "error_rate": 0.02}}], "metadata": {"granularity": "1h", "query_time_ms": 42, "row_count": 2, "row_limit": 100000, "truncated": false}} + "400": + application/json: {} + "401": + application/json: {} + "403": + application/json: {"status": 422, "message": "validation error", "data": ["email is required", "password must be at least 6 characters"]} + "500": + application/json: {} + HourlyEventCount: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T14:00:00Z", "dimensions": {"topic": "user.created"}, "metrics": {"count": 1423}}, {"time_bucket": "2026-03-02T15:00:00Z", "dimensions": {"topic": "user.created"}, "metrics": {"count": 1891}}], "metadata": {"granularity": "1h", "query_time_ms": 42, "row_count": 2, "row_limit": 100000, "truncated": false}} + getAttemptMetrics: + speakeasy-default-get-attempt-metrics: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count", "error_rate"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T14:00:00Z", "dimensions": {"destination_id": "dest_abc", "topic": "user.created"}, "metrics": {"count": 1423, "error_rate": 0.02}}], "metadata": {"granularity": "1h", "query_time_ms": 42, "row_count": 2, "row_limit": 100000, "truncated": false}} + "400": + application/json: {} + "401": + application/json: {} + "403": + application/json: {"status": 422, "message": "validation error", "data": ["email is required", "password must be at least 6 characters"]} + "500": + application/json: {} + DailyAttemptCounts: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count", "error_rate"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T00:00:00Z", "dimensions": {"destination_id": "dest_abc"}, "metrics": {"count": 1423, "successful_count": 1393, "failed_count": 30, "error_rate": 0.0211}}], "metadata": {"granularity": "1d", "query_time_ms": 38, "row_count": 1, "row_limit": 100000, "truncated": false}} examplesVersion: 1.0.2 generatedTests: {} releaseNotes: | ## Go SDK Changes: - * `Outpost.Schemas.ListDestinationTypes()`: `response.[].ConfigFields[].Type.Enum(keyValueMap)` **Added** (Breaking ⚠️) - * `Outpost.Schemas.GetDestinationType()`: `response.ConfigFields[].Type.Enum(keyValueMap)` **Added** (Breaking ⚠️) + * `Outpost.Attempts.List()`: `response.Models[]` **Changed** (Breaking ⚠️) + * `Outpost.Attempts.Get()`: `response` **Changed** (Breaking ⚠️) + * `Outpost.Destinations.ListAttempts()`: `response.Models[]` **Changed** (Breaking ⚠️) + * `Outpost.Destinations.GetAttempt()`: `response` **Changed** (Breaking ⚠️) + * `Outpost.Metrics.GetEventMetrics()`: **Added** + * `Outpost.Metrics.GetAttemptMetrics()`: **Added** generatedFiles: - .gitattributes - /models/apierrors/badrequesterror.go diff --git a/sdks/outpost-go/.speakeasy/gen.yaml b/sdks/outpost-go/.speakeasy/gen.yaml index 72e02f867..d08591952 100644 --- a/sdks/outpost-go/.speakeasy/gen.yaml +++ b/sdks/outpost-go/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false go: - version: 0.8.1 + version: 0.8.2 additionalDependencies: {} allowUnknownFieldsInWeakUnions: false baseErrorName: OutpostError diff --git a/sdks/outpost-go/README.md b/sdks/outpost-go/README.md index df3663e0c..5e144cf91 100644 --- a/sdks/outpost-go/README.md +++ b/sdks/outpost-go/README.md @@ -147,6 +147,11 @@ func main() { * [Check](docs/sdks/health/README.md#check) - Health Check +### [Metrics](docs/sdks/metrics/README.md) + +* [GetEventMetrics](docs/sdks/metrics/README.md#geteventmetrics) - Get Event Metrics +* [GetAttemptMetrics](docs/sdks/metrics/README.md#getattemptmetrics) - Get Attempt Metrics + ### [Publish](docs/sdks/publish/README.md) * [Event](docs/sdks/publish/README.md#event) - Publish Event diff --git a/sdks/outpost-go/RELEASES.md b/sdks/outpost-go/RELEASES.md index f157551d2..b38c8a707 100644 --- a/sdks/outpost-go/RELEASES.md +++ b/sdks/outpost-go/RELEASES.md @@ -118,4 +118,14 @@ Based on: ### Generated - [go v0.8.1] sdks/outpost-go ### Releases -- [Go v0.8.1] https://github.com/hookdeck/outpost/releases/tag/sdks/outpost-go/v0.8.1 - sdks/outpost-go \ No newline at end of file +- [Go v0.8.1] https://github.com/hookdeck/outpost/releases/tag/sdks/outpost-go/v0.8.1 - sdks/outpost-go + +## 2026-03-24 16:46:42 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.759.1 (2.869.10) https://github.com/speakeasy-api/speakeasy +### Generated +- [go v0.8.2] sdks/outpost-go +### Releases +- [Go v0.8.2] https://github.com/hookdeck/outpost/releases/tag/sdks/outpost-go/v0.8.2 - sdks/outpost-go \ No newline at end of file diff --git a/sdks/outpost-go/attempts.go b/sdks/outpost-go/attempts.go index 51208c5f6..82dbebf6b 100644 --- a/sdks/outpost-go/attempts.go +++ b/sdks/outpost-go/attempts.go @@ -35,6 +35,7 @@ import ( // - `include=event`: Include event summary (id, topic, time, eligible_for_retry, metadata) // - `include=event.data`: Include full event with payload data // - `include=response_data`: Include response body and headers from the attempt +// - `include=destination`: Include the full destination object with target information type Attempts struct { rootSDK *Outpost sdkConfiguration config.SDKConfiguration diff --git a/sdks/outpost-go/docs/models/components/attempt.md b/sdks/outpost-go/docs/models/components/attempt.md index 8372100a1..86b670de7 100644 --- a/sdks/outpost-go/docs/models/components/attempt.md +++ b/sdks/outpost-go/docs/models/components/attempt.md @@ -17,4 +17,5 @@ An attempt represents a single delivery attempt of an event to a destination. | `Manual` | `*bool` | :heavy_minus_sign: | Whether this attempt was manually triggered (e.g., a retry initiated by a user). | false | | `EventID` | `*string` | :heavy_minus_sign: | The ID of the associated event. | evt_123 | | `DestinationID` | `*string` | :heavy_minus_sign: | The destination ID this attempt was sent to. | des_456 | -| `Event` | [*components.EventUnion](../../models/components/eventunion.md) | :heavy_minus_sign: | The associated event object. Only present when include=event or include=event.data. | | \ No newline at end of file +| `Event` | [*components.EventUnion](../../models/components/eventunion.md) | :heavy_minus_sign: | The associated event object. Only present when include=event or include=event.data. | | +| `Destination` | [*components.Destination](../../models/components/destination.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/components/metricsdatapoint.md b/sdks/outpost-go/docs/models/components/metricsdatapoint.md new file mode 100644 index 000000000..af730affb --- /dev/null +++ b/sdks/outpost-go/docs/models/components/metricsdatapoint.md @@ -0,0 +1,10 @@ +# MetricsDataPoint + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `TimeBucket` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Start of the time bucket. Null when no granularity is specified. | 2026-03-02T14:00:00Z | +| `Dimensions` | map[string]`string` | :heavy_minus_sign: | Dimension values for this data point. Empty object when no dimensions are requested. | {
"destination_id": "dest_abc",
"topic": "user.created"
} | +| `Metrics` | map[string]`any` | :heavy_minus_sign: | Requested measure values for this data point. | {
"count": 1423,
"error_rate": 0.02
} | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/components/metricsmetadata.md b/sdks/outpost-go/docs/models/components/metricsmetadata.md new file mode 100644 index 000000000..f367062ab --- /dev/null +++ b/sdks/outpost-go/docs/models/components/metricsmetadata.md @@ -0,0 +1,12 @@ +# MetricsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `Granularity` | `*string` | :heavy_minus_sign: | The granularity used for time bucketing, or null if none was specified. | 1h | +| `QueryTimeMs` | `*int64` | :heavy_minus_sign: | Query execution time in milliseconds. | 42 | +| `RowCount` | `*int64` | :heavy_minus_sign: | Number of data points returned. | 2 | +| `RowLimit` | `*int64` | :heavy_minus_sign: | Maximum number of rows the query will return. | 100000 | +| `Truncated` | `*bool` | :heavy_minus_sign: | Whether the results were truncated due to hitting the row limit. | false | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/components/metricsresponse.md b/sdks/outpost-go/docs/models/components/metricsresponse.md new file mode 100644 index 000000000..b9a2167dd --- /dev/null +++ b/sdks/outpost-go/docs/models/components/metricsresponse.md @@ -0,0 +1,9 @@ +# MetricsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `Data` | [][components.MetricsDataPoint](../../models/components/metricsdatapoint.md) | :heavy_minus_sign: | Array of aggregated data points. | +| `Metadata` | [*components.MetricsMetadata](../../models/components/metricsmetadata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/filtersattemptnumber.md b/sdks/outpost-go/docs/models/operations/filtersattemptnumber.md new file mode 100644 index 000000000..354f7d4c7 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/filtersattemptnumber.md @@ -0,0 +1,31 @@ +# FiltersAttemptNumber + +Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). + + +## Supported Types + +### + +```go +filtersAttemptNumber := operations.CreateFiltersAttemptNumberStr(string{/* values here */}) +``` + +### + +```go +filtersAttemptNumber := operations.CreateFiltersAttemptNumberArrayOfStr([]string{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch filtersAttemptNumber.Type { + case operations.FiltersAttemptNumberTypeStr: + // filtersAttemptNumber.Str is populated + case operations.FiltersAttemptNumberTypeArrayOfStr: + // filtersAttemptNumber.ArrayOfStr is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/filterscode.md b/sdks/outpost-go/docs/models/operations/filterscode.md new file mode 100644 index 000000000..c22660d27 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/filterscode.md @@ -0,0 +1,31 @@ +# FiltersCode + +Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). + + +## Supported Types + +### + +```go +filtersCode := operations.CreateFiltersCodeStr(string{/* values here */}) +``` + +### + +```go +filtersCode := operations.CreateFiltersCodeArrayOfStr([]string{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch filtersCode.Type { + case operations.FiltersCodeTypeStr: + // filtersCode.Str is populated + case operations.FiltersCodeTypeArrayOfStr: + // filtersCode.ArrayOfStr is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/filtersmanual.md b/sdks/outpost-go/docs/models/operations/filtersmanual.md new file mode 100644 index 000000000..963804309 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/filtersmanual.md @@ -0,0 +1,21 @@ +# FiltersManual + +Filter by manual retry flag. + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.FiltersManualTrue +``` + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `FiltersManualTrue` | true | +| `FiltersManualFalse` | false | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/filtersstatus.md b/sdks/outpost-go/docs/models/operations/filtersstatus.md new file mode 100644 index 000000000..c4597015e --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/filtersstatus.md @@ -0,0 +1,31 @@ +# FiltersStatus + +Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). + + +## Supported Types + +### FiltersStatusEnum1 + +```go +filtersStatus := operations.CreateFiltersStatusFiltersStatusEnum1(operations.FiltersStatusEnum1{/* values here */}) +``` + +### + +```go +filtersStatus := operations.CreateFiltersStatusArrayOfFiltersStatusEnum2([]operations.FiltersStatusEnum2{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch filtersStatus.Type { + case operations.FiltersStatusTypeFiltersStatusEnum1: + // filtersStatus.FiltersStatusEnum1 is populated + case operations.FiltersStatusTypeArrayOfFiltersStatusEnum2: + // filtersStatus.ArrayOfFiltersStatusEnum2 is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/filtersstatusenum1.md b/sdks/outpost-go/docs/models/operations/filtersstatusenum1.md new file mode 100644 index 000000000..7d42cba72 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/filtersstatusenum1.md @@ -0,0 +1,19 @@ +# FiltersStatusEnum1 + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.FiltersStatusEnum1Success +``` + + +## Values + +| Name | Value | +| --------------------------- | --------------------------- | +| `FiltersStatusEnum1Success` | success | +| `FiltersStatusEnum1Failed` | failed | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/filtersstatusenum2.md b/sdks/outpost-go/docs/models/operations/filtersstatusenum2.md new file mode 100644 index 000000000..d8bd54a95 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/filtersstatusenum2.md @@ -0,0 +1,19 @@ +# FiltersStatusEnum2 + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.FiltersStatusEnum2Success +``` + + +## Values + +| Name | Value | +| --------------------------- | --------------------------- | +| `FiltersStatusEnum2Success` | success | +| `FiltersStatusEnum2Failed` | failed | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsdimensionsenum1.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsdimensionsenum1.md new file mode 100644 index 000000000..81dae1a2c --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsdimensionsenum1.md @@ -0,0 +1,24 @@ +# GetAttemptMetricsDimensionsEnum1 + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.GetAttemptMetricsDimensionsEnum1TenantID +``` + + +## Values + +| Name | Value | +| ----------------------------------------------- | ----------------------------------------------- | +| `GetAttemptMetricsDimensionsEnum1TenantID` | tenant_id | +| `GetAttemptMetricsDimensionsEnum1DestinationID` | destination_id | +| `GetAttemptMetricsDimensionsEnum1Topic` | topic | +| `GetAttemptMetricsDimensionsEnum1Status` | status | +| `GetAttemptMetricsDimensionsEnum1Code` | code | +| `GetAttemptMetricsDimensionsEnum1Manual` | manual | +| `GetAttemptMetricsDimensionsEnum1AttemptNumber` | attempt_number | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsdimensionsenum2.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsdimensionsenum2.md new file mode 100644 index 000000000..d8de2903e --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsdimensionsenum2.md @@ -0,0 +1,24 @@ +# GetAttemptMetricsDimensionsEnum2 + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.GetAttemptMetricsDimensionsEnum2TenantID +``` + + +## Values + +| Name | Value | +| ----------------------------------------------- | ----------------------------------------------- | +| `GetAttemptMetricsDimensionsEnum2TenantID` | tenant_id | +| `GetAttemptMetricsDimensionsEnum2DestinationID` | destination_id | +| `GetAttemptMetricsDimensionsEnum2Topic` | topic | +| `GetAttemptMetricsDimensionsEnum2Status` | status | +| `GetAttemptMetricsDimensionsEnum2Code` | code | +| `GetAttemptMetricsDimensionsEnum2Manual` | manual | +| `GetAttemptMetricsDimensionsEnum2AttemptNumber` | attempt_number | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsdimensionsunion.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsdimensionsunion.md new file mode 100644 index 000000000..4283cd846 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsdimensionsunion.md @@ -0,0 +1,31 @@ +# GetAttemptMetricsDimensionsUnion + +Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). + + +## Supported Types + +### GetAttemptMetricsDimensionsEnum1 + +```go +getAttemptMetricsDimensionsUnion := operations.CreateGetAttemptMetricsDimensionsUnionGetAttemptMetricsDimensionsEnum1(operations.GetAttemptMetricsDimensionsEnum1{/* values here */}) +``` + +### + +```go +getAttemptMetricsDimensionsUnion := operations.CreateGetAttemptMetricsDimensionsUnionArrayOfGetAttemptMetricsDimensionsEnum2([]operations.GetAttemptMetricsDimensionsEnum2{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch getAttemptMetricsDimensionsUnion.Type { + case operations.GetAttemptMetricsDimensionsUnionTypeGetAttemptMetricsDimensionsEnum1: + // getAttemptMetricsDimensionsUnion.GetAttemptMetricsDimensionsEnum1 is populated + case operations.GetAttemptMetricsDimensionsUnionTypeArrayOfGetAttemptMetricsDimensionsEnum2: + // getAttemptMetricsDimensionsUnion.ArrayOfGetAttemptMetricsDimensionsEnum2 is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsfiltersdestinationid.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsfiltersdestinationid.md new file mode 100644 index 000000000..5c072334c --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsfiltersdestinationid.md @@ -0,0 +1,31 @@ +# GetAttemptMetricsFiltersDestinationID + +Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + + +## Supported Types + +### + +```go +getAttemptMetricsFiltersDestinationID := operations.CreateGetAttemptMetricsFiltersDestinationIDStr(string{/* values here */}) +``` + +### + +```go +getAttemptMetricsFiltersDestinationID := operations.CreateGetAttemptMetricsFiltersDestinationIDArrayOfStr([]string{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch getAttemptMetricsFiltersDestinationID.Type { + case operations.GetAttemptMetricsFiltersDestinationIDTypeStr: + // getAttemptMetricsFiltersDestinationID.Str is populated + case operations.GetAttemptMetricsFiltersDestinationIDTypeArrayOfStr: + // getAttemptMetricsFiltersDestinationID.ArrayOfStr is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsfilterstenantid.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsfilterstenantid.md new file mode 100644 index 000000000..c3850bb1b --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsfilterstenantid.md @@ -0,0 +1,31 @@ +# GetAttemptMetricsFiltersTenantID + +Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + + +## Supported Types + +### + +```go +getAttemptMetricsFiltersTenantID := operations.CreateGetAttemptMetricsFiltersTenantIDStr(string{/* values here */}) +``` + +### + +```go +getAttemptMetricsFiltersTenantID := operations.CreateGetAttemptMetricsFiltersTenantIDArrayOfStr([]string{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch getAttemptMetricsFiltersTenantID.Type { + case operations.GetAttemptMetricsFiltersTenantIDTypeStr: + // getAttemptMetricsFiltersTenantID.Str is populated + case operations.GetAttemptMetricsFiltersTenantIDTypeArrayOfStr: + // getAttemptMetricsFiltersTenantID.ArrayOfStr is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsfilterstopic.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsfilterstopic.md new file mode 100644 index 000000000..4f12ca072 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsfilterstopic.md @@ -0,0 +1,31 @@ +# GetAttemptMetricsFiltersTopic + +Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + + +## Supported Types + +### + +```go +getAttemptMetricsFiltersTopic := operations.CreateGetAttemptMetricsFiltersTopicStr(string{/* values here */}) +``` + +### + +```go +getAttemptMetricsFiltersTopic := operations.CreateGetAttemptMetricsFiltersTopicArrayOfStr([]string{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch getAttemptMetricsFiltersTopic.Type { + case operations.GetAttemptMetricsFiltersTopicTypeStr: + // getAttemptMetricsFiltersTopic.Str is populated + case operations.GetAttemptMetricsFiltersTopicTypeArrayOfStr: + // getAttemptMetricsFiltersTopic.ArrayOfStr is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsmeasuresenum1.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsmeasuresenum1.md new file mode 100644 index 000000000..089476203 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsmeasuresenum1.md @@ -0,0 +1,28 @@ +# GetAttemptMetricsMeasuresEnum1 + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.GetAttemptMetricsMeasuresEnum1Count +``` + + +## Values + +| Name | Value | +| ------------------------------------------------- | ------------------------------------------------- | +| `GetAttemptMetricsMeasuresEnum1Count` | count | +| `GetAttemptMetricsMeasuresEnum1SuccessfulCount` | successful_count | +| `GetAttemptMetricsMeasuresEnum1FailedCount` | failed_count | +| `GetAttemptMetricsMeasuresEnum1ErrorRate` | error_rate | +| `GetAttemptMetricsMeasuresEnum1FirstAttemptCount` | first_attempt_count | +| `GetAttemptMetricsMeasuresEnum1RetryCount` | retry_count | +| `GetAttemptMetricsMeasuresEnum1ManualRetryCount` | manual_retry_count | +| `GetAttemptMetricsMeasuresEnum1AvgAttemptNumber` | avg_attempt_number | +| `GetAttemptMetricsMeasuresEnum1Rate` | rate | +| `GetAttemptMetricsMeasuresEnum1SuccessfulRate` | successful_rate | +| `GetAttemptMetricsMeasuresEnum1FailedRate` | failed_rate | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsmeasuresenum2.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsmeasuresenum2.md new file mode 100644 index 000000000..8453b07ef --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsmeasuresenum2.md @@ -0,0 +1,28 @@ +# GetAttemptMetricsMeasuresEnum2 + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.GetAttemptMetricsMeasuresEnum2Count +``` + + +## Values + +| Name | Value | +| ------------------------------------------------- | ------------------------------------------------- | +| `GetAttemptMetricsMeasuresEnum2Count` | count | +| `GetAttemptMetricsMeasuresEnum2SuccessfulCount` | successful_count | +| `GetAttemptMetricsMeasuresEnum2FailedCount` | failed_count | +| `GetAttemptMetricsMeasuresEnum2ErrorRate` | error_rate | +| `GetAttemptMetricsMeasuresEnum2FirstAttemptCount` | first_attempt_count | +| `GetAttemptMetricsMeasuresEnum2RetryCount` | retry_count | +| `GetAttemptMetricsMeasuresEnum2ManualRetryCount` | manual_retry_count | +| `GetAttemptMetricsMeasuresEnum2AvgAttemptNumber` | avg_attempt_number | +| `GetAttemptMetricsMeasuresEnum2Rate` | rate | +| `GetAttemptMetricsMeasuresEnum2SuccessfulRate` | successful_rate | +| `GetAttemptMetricsMeasuresEnum2FailedRate` | failed_rate | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsmeasuresunion.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsmeasuresunion.md new file mode 100644 index 000000000..44cc67051 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsmeasuresunion.md @@ -0,0 +1,31 @@ +# GetAttemptMetricsMeasuresUnion + +Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). + + +## Supported Types + +### GetAttemptMetricsMeasuresEnum1 + +```go +getAttemptMetricsMeasuresUnion := operations.CreateGetAttemptMetricsMeasuresUnionGetAttemptMetricsMeasuresEnum1(operations.GetAttemptMetricsMeasuresEnum1{/* values here */}) +``` + +### + +```go +getAttemptMetricsMeasuresUnion := operations.CreateGetAttemptMetricsMeasuresUnionArrayOfGetAttemptMetricsMeasuresEnum2([]operations.GetAttemptMetricsMeasuresEnum2{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch getAttemptMetricsMeasuresUnion.Type { + case operations.GetAttemptMetricsMeasuresUnionTypeGetAttemptMetricsMeasuresEnum1: + // getAttemptMetricsMeasuresUnion.GetAttemptMetricsMeasuresEnum1 is populated + case operations.GetAttemptMetricsMeasuresUnionTypeArrayOfGetAttemptMetricsMeasuresEnum2: + // getAttemptMetricsMeasuresUnion.ArrayOfGetAttemptMetricsMeasuresEnum2 is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsrequest.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsrequest.md new file mode 100644 index 000000000..e4a450ce8 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsrequest.md @@ -0,0 +1,19 @@ +# GetAttemptMetricsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `TimeStart` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | Start of the time range (inclusive). ISO 8601 timestamp. | 2026-03-02T00:00:00Z | +| `TimeEnd` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | End of the time range (exclusive). ISO 8601 timestamp. | 2026-03-03T00:00:00Z | +| `Granularity` | `*string` | :heavy_minus_sign: | Time bucketing granularity. Pattern: ``.
Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12).
When omitted, returns a single aggregate row per dimension combination.
| 1h | +| `Measures` | [operations.GetAttemptMetricsMeasuresUnion](../../models/operations/getattemptmetricsmeasuresunion.md) | :heavy_check_mark: | Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). | [
"count",
"error_rate"
] | +| `Dimensions` | [*operations.GetAttemptMetricsDimensionsUnion](../../models/operations/getattemptmetricsdimensionsunion.md) | :heavy_minus_sign: | Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). | | +| `FiltersDestinationID` | [*operations.GetAttemptMetricsFiltersDestinationID](../../models/operations/getattemptmetricsfiltersdestinationid.md) | :heavy_minus_sign: | Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). | | +| `FiltersTopic` | [*operations.GetAttemptMetricsFiltersTopic](../../models/operations/getattemptmetricsfilterstopic.md) | :heavy_minus_sign: | Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). | | +| `FiltersStatus` | [*operations.FiltersStatus](../../models/operations/filtersstatus.md) | :heavy_minus_sign: | Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). | | +| `FiltersCode` | [*operations.FiltersCode](../../models/operations/filterscode.md) | :heavy_minus_sign: | Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). | | +| `FiltersManual` | [*operations.FiltersManual](../../models/operations/filtersmanual.md) | :heavy_minus_sign: | Filter by manual retry flag. | | +| `FiltersAttemptNumber` | [*operations.FiltersAttemptNumber](../../models/operations/filtersattemptnumber.md) | :heavy_minus_sign: | Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). | | +| `FiltersTenantID` | [*operations.GetAttemptMetricsFiltersTenantID](../../models/operations/getattemptmetricsfilterstenantid.md) | :heavy_minus_sign: | Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). | | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/getattemptmetricsresponse.md b/sdks/outpost-go/docs/models/operations/getattemptmetricsresponse.md new file mode 100644 index 000000000..4edcac53a --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/getattemptmetricsresponse.md @@ -0,0 +1,9 @@ +# GetAttemptMetricsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | +| `MetricsResponse` | [*components.MetricsResponse](../../models/components/metricsresponse.md) | :heavy_minus_sign: | Aggregated attempt metrics. | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/getattemptrequest.md b/sdks/outpost-go/docs/models/operations/getattemptrequest.md index dffc6fbb2..91ba0139f 100644 --- a/sdks/outpost-go/docs/models/operations/getattemptrequest.md +++ b/sdks/outpost-go/docs/models/operations/getattemptrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `AttemptID` | `string` | :heavy_check_mark: | The ID of the attempt. | -| `Include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AttemptID` | `string` | :heavy_check_mark: | The ID of the attempt. | +| `Include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsdimensionsenum1.md b/sdks/outpost-go/docs/models/operations/geteventmetricsdimensionsenum1.md new file mode 100644 index 000000000..82a63ae56 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsdimensionsenum1.md @@ -0,0 +1,20 @@ +# GetEventMetricsDimensionsEnum1 + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.GetEventMetricsDimensionsEnum1TenantID +``` + + +## Values + +| Name | Value | +| --------------------------------------------- | --------------------------------------------- | +| `GetEventMetricsDimensionsEnum1TenantID` | tenant_id | +| `GetEventMetricsDimensionsEnum1Topic` | topic | +| `GetEventMetricsDimensionsEnum1DestinationID` | destination_id | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsdimensionsenum2.md b/sdks/outpost-go/docs/models/operations/geteventmetricsdimensionsenum2.md new file mode 100644 index 000000000..c1dd9adcf --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsdimensionsenum2.md @@ -0,0 +1,20 @@ +# GetEventMetricsDimensionsEnum2 + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.GetEventMetricsDimensionsEnum2TenantID +``` + + +## Values + +| Name | Value | +| --------------------------------------------- | --------------------------------------------- | +| `GetEventMetricsDimensionsEnum2TenantID` | tenant_id | +| `GetEventMetricsDimensionsEnum2Topic` | topic | +| `GetEventMetricsDimensionsEnum2DestinationID` | destination_id | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsdimensionsunion.md b/sdks/outpost-go/docs/models/operations/geteventmetricsdimensionsunion.md new file mode 100644 index 000000000..150d986c2 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsdimensionsunion.md @@ -0,0 +1,31 @@ +# GetEventMetricsDimensionsUnion + +Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). + + +## Supported Types + +### GetEventMetricsDimensionsEnum1 + +```go +getEventMetricsDimensionsUnion := operations.CreateGetEventMetricsDimensionsUnionGetEventMetricsDimensionsEnum1(operations.GetEventMetricsDimensionsEnum1{/* values here */}) +``` + +### + +```go +getEventMetricsDimensionsUnion := operations.CreateGetEventMetricsDimensionsUnionArrayOfGetEventMetricsDimensionsEnum2([]operations.GetEventMetricsDimensionsEnum2{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch getEventMetricsDimensionsUnion.Type { + case operations.GetEventMetricsDimensionsUnionTypeGetEventMetricsDimensionsEnum1: + // getEventMetricsDimensionsUnion.GetEventMetricsDimensionsEnum1 is populated + case operations.GetEventMetricsDimensionsUnionTypeArrayOfGetEventMetricsDimensionsEnum2: + // getEventMetricsDimensionsUnion.ArrayOfGetEventMetricsDimensionsEnum2 is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsfiltersdestinationid.md b/sdks/outpost-go/docs/models/operations/geteventmetricsfiltersdestinationid.md new file mode 100644 index 000000000..4c5e374d1 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsfiltersdestinationid.md @@ -0,0 +1,31 @@ +# GetEventMetricsFiltersDestinationID + +Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + + +## Supported Types + +### + +```go +getEventMetricsFiltersDestinationID := operations.CreateGetEventMetricsFiltersDestinationIDStr(string{/* values here */}) +``` + +### + +```go +getEventMetricsFiltersDestinationID := operations.CreateGetEventMetricsFiltersDestinationIDArrayOfStr([]string{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch getEventMetricsFiltersDestinationID.Type { + case operations.GetEventMetricsFiltersDestinationIDTypeStr: + // getEventMetricsFiltersDestinationID.Str is populated + case operations.GetEventMetricsFiltersDestinationIDTypeArrayOfStr: + // getEventMetricsFiltersDestinationID.ArrayOfStr is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsfilterstenantid.md b/sdks/outpost-go/docs/models/operations/geteventmetricsfilterstenantid.md new file mode 100644 index 000000000..417fd0be3 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsfilterstenantid.md @@ -0,0 +1,31 @@ +# GetEventMetricsFiltersTenantID + +Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + + +## Supported Types + +### + +```go +getEventMetricsFiltersTenantID := operations.CreateGetEventMetricsFiltersTenantIDStr(string{/* values here */}) +``` + +### + +```go +getEventMetricsFiltersTenantID := operations.CreateGetEventMetricsFiltersTenantIDArrayOfStr([]string{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch getEventMetricsFiltersTenantID.Type { + case operations.GetEventMetricsFiltersTenantIDTypeStr: + // getEventMetricsFiltersTenantID.Str is populated + case operations.GetEventMetricsFiltersTenantIDTypeArrayOfStr: + // getEventMetricsFiltersTenantID.ArrayOfStr is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsfilterstopic.md b/sdks/outpost-go/docs/models/operations/geteventmetricsfilterstopic.md new file mode 100644 index 000000000..e61ae463a --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsfilterstopic.md @@ -0,0 +1,31 @@ +# GetEventMetricsFiltersTopic + +Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + + +## Supported Types + +### + +```go +getEventMetricsFiltersTopic := operations.CreateGetEventMetricsFiltersTopicStr(string{/* values here */}) +``` + +### + +```go +getEventMetricsFiltersTopic := operations.CreateGetEventMetricsFiltersTopicArrayOfStr([]string{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch getEventMetricsFiltersTopic.Type { + case operations.GetEventMetricsFiltersTopicTypeStr: + // getEventMetricsFiltersTopic.Str is populated + case operations.GetEventMetricsFiltersTopicTypeArrayOfStr: + // getEventMetricsFiltersTopic.ArrayOfStr is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsmeasuresenum1.md b/sdks/outpost-go/docs/models/operations/geteventmetricsmeasuresenum1.md new file mode 100644 index 000000000..146bab7a7 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsmeasuresenum1.md @@ -0,0 +1,19 @@ +# GetEventMetricsMeasuresEnum1 + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.GetEventMetricsMeasuresEnum1Count +``` + + +## Values + +| Name | Value | +| ----------------------------------- | ----------------------------------- | +| `GetEventMetricsMeasuresEnum1Count` | count | +| `GetEventMetricsMeasuresEnum1Rate` | rate | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsmeasuresenum2.md b/sdks/outpost-go/docs/models/operations/geteventmetricsmeasuresenum2.md new file mode 100644 index 000000000..daf4bcfd7 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsmeasuresenum2.md @@ -0,0 +1,19 @@ +# GetEventMetricsMeasuresEnum2 + +## Example Usage + +```go +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" +) + +value := operations.GetEventMetricsMeasuresEnum2Count +``` + + +## Values + +| Name | Value | +| ----------------------------------- | ----------------------------------- | +| `GetEventMetricsMeasuresEnum2Count` | count | +| `GetEventMetricsMeasuresEnum2Rate` | rate | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsmeasuresunion.md b/sdks/outpost-go/docs/models/operations/geteventmetricsmeasuresunion.md new file mode 100644 index 000000000..3ad50814c --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsmeasuresunion.md @@ -0,0 +1,31 @@ +# GetEventMetricsMeasuresUnion + +Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). + + +## Supported Types + +### GetEventMetricsMeasuresEnum1 + +```go +getEventMetricsMeasuresUnion := operations.CreateGetEventMetricsMeasuresUnionGetEventMetricsMeasuresEnum1(operations.GetEventMetricsMeasuresEnum1{/* values here */}) +``` + +### + +```go +getEventMetricsMeasuresUnion := operations.CreateGetEventMetricsMeasuresUnionArrayOfGetEventMetricsMeasuresEnum2([]operations.GetEventMetricsMeasuresEnum2{/* values here */}) +``` + +## Union Discrimination + +Use the `Type` field to determine which variant is active, then access the corresponding field: + +```go +switch getEventMetricsMeasuresUnion.Type { + case operations.GetEventMetricsMeasuresUnionTypeGetEventMetricsMeasuresEnum1: + // getEventMetricsMeasuresUnion.GetEventMetricsMeasuresEnum1 is populated + case operations.GetEventMetricsMeasuresUnionTypeArrayOfGetEventMetricsMeasuresEnum2: + // getEventMetricsMeasuresUnion.ArrayOfGetEventMetricsMeasuresEnum2 is populated +} +``` diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsrequest.md b/sdks/outpost-go/docs/models/operations/geteventmetricsrequest.md new file mode 100644 index 000000000..6e4ccf4c6 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsrequest.md @@ -0,0 +1,15 @@ +# GetEventMetricsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `TimeStart` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | Start of the time range (inclusive). ISO 8601 timestamp. | 2026-03-02T00:00:00Z | +| `TimeEnd` | [time.Time](https://pkg.go.dev/time#Time) | :heavy_check_mark: | End of the time range (exclusive). ISO 8601 timestamp. | 2026-03-03T00:00:00Z | +| `Granularity` | `*string` | :heavy_minus_sign: | Time bucketing granularity. Pattern: ``.
Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12).
When omitted, returns a single aggregate row per dimension combination.
| 1h | +| `Measures` | [operations.GetEventMetricsMeasuresUnion](../../models/operations/geteventmetricsmeasuresunion.md) | :heavy_check_mark: | Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). | [
"count"
] | +| `Dimensions` | [*operations.GetEventMetricsDimensionsUnion](../../models/operations/geteventmetricsdimensionsunion.md) | :heavy_minus_sign: | Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). | | +| `FiltersTopic` | [*operations.GetEventMetricsFiltersTopic](../../models/operations/geteventmetricsfilterstopic.md) | :heavy_minus_sign: | Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). | | +| `FiltersDestinationID` | [*operations.GetEventMetricsFiltersDestinationID](../../models/operations/geteventmetricsfiltersdestinationid.md) | :heavy_minus_sign: | Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). | | +| `FiltersTenantID` | [*operations.GetEventMetricsFiltersTenantID](../../models/operations/geteventmetricsfilterstenantid.md) | :heavy_minus_sign: | Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). | | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/geteventmetricsresponse.md b/sdks/outpost-go/docs/models/operations/geteventmetricsresponse.md new file mode 100644 index 000000000..f220aebf2 --- /dev/null +++ b/sdks/outpost-go/docs/models/operations/geteventmetricsresponse.md @@ -0,0 +1,9 @@ +# GetEventMetricsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `HTTPMeta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | +| `MetricsResponse` | [*components.MetricsResponse](../../models/components/metricsresponse.md) | :heavy_minus_sign: | Aggregated event metrics. | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/gettenantdestinationattemptrequest.md b/sdks/outpost-go/docs/models/operations/gettenantdestinationattemptrequest.md index 049c52de5..08d9b92e9 100644 --- a/sdks/outpost-go/docs/models/operations/gettenantdestinationattemptrequest.md +++ b/sdks/outpost-go/docs/models/operations/gettenantdestinationattemptrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `TenantID` | `string` | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | -| `DestinationID` | `string` | :heavy_check_mark: | The ID of the destination. | -| `AttemptID` | `string` | :heavy_check_mark: | The ID of the attempt. | -| `Include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `TenantID` | `string` | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | +| `DestinationID` | `string` | :heavy_check_mark: | The ID of the destination. | +| `AttemptID` | `string` | :heavy_check_mark: | The ID of the attempt. | +| `Include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/listattemptsrequest.md b/sdks/outpost-go/docs/models/operations/listattemptsrequest.md index 8a4b24dce..78b1d2e3e 100644 --- a/sdks/outpost-go/docs/models/operations/listattemptsrequest.md +++ b/sdks/outpost-go/docs/models/operations/listattemptsrequest.md @@ -3,20 +3,20 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `TenantID` | []`string` | :heavy_minus_sign: | Filter attempts by tenant ID(s). Use bracket notation for multiple values (e.g., `tenant_id[0]=t1&tenant_id[1]=t2`).
When authenticated with a Tenant JWT, this parameter is ignored and the JWT's tenant is used.
If not provided with API key auth, returns attempts from all tenants.
| -| `EventID` | []`string` | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | -| `DestinationID` | []`string` | :heavy_minus_sign: | Filter attempts by destination ID(s). Use bracket notation for multiple values (e.g., `destination_id[0]=d1&destination_id[1]=d2`). | -| `Status` | [*operations.ListAttemptsStatus](../../models/operations/listattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | -| `Topic` | []`string` | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | -| `TimeGte` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | -| `TimeLte` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | -| `TimeGt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | -| `TimeLt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | -| `Limit` | `*int64` | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | -| `Next` | `*string` | :heavy_minus_sign: | Cursor for next page of results. | -| `Prev` | `*string` | :heavy_minus_sign: | Cursor for previous page of results. | -| `Include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `OrderBy` | [*operations.ListAttemptsOrderBy](../../models/operations/listattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | -| `Dir` | [*operations.ListAttemptsDir](../../models/operations/listattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `TenantID` | []`string` | :heavy_minus_sign: | Filter attempts by tenant ID(s). Use bracket notation for multiple values (e.g., `tenant_id[0]=t1&tenant_id[1]=t2`).
When authenticated with a Tenant JWT, this parameter is ignored and the JWT's tenant is used.
If not provided with API key auth, returns attempts from all tenants.
| +| `EventID` | []`string` | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | +| `DestinationID` | []`string` | :heavy_minus_sign: | Filter attempts by destination ID(s). Use bracket notation for multiple values (e.g., `destination_id[0]=d1&destination_id[1]=d2`). | +| `Status` | [*operations.ListAttemptsStatus](../../models/operations/listattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | +| `Topic` | []`string` | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | +| `TimeGte` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | +| `TimeLte` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | +| `TimeGt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | +| `TimeLt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | +| `Limit` | `*int64` | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | +| `Next` | `*string` | :heavy_minus_sign: | Cursor for next page of results. | +| `Prev` | `*string` | :heavy_minus_sign: | Cursor for previous page of results. | +| `Include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `OrderBy` | [*operations.ListAttemptsOrderBy](../../models/operations/listattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | +| `Dir` | [*operations.ListAttemptsDir](../../models/operations/listattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file diff --git a/sdks/outpost-go/docs/models/operations/listtenantdestinationattemptsrequest.md b/sdks/outpost-go/docs/models/operations/listtenantdestinationattemptsrequest.md index bf2e6bc3f..91a130340 100644 --- a/sdks/outpost-go/docs/models/operations/listtenantdestinationattemptsrequest.md +++ b/sdks/outpost-go/docs/models/operations/listtenantdestinationattemptsrequest.md @@ -3,20 +3,20 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `TenantID` | `string` | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | -| `DestinationID` | `string` | :heavy_check_mark: | The ID of the destination. | -| `EventID` | []`string` | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | -| `Status` | [*operations.ListTenantDestinationAttemptsStatus](../../models/operations/listtenantdestinationattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | -| `Topic` | []`string` | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | -| `TimeGte` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | -| `TimeLte` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | -| `TimeGt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | -| `TimeLt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | -| `Limit` | `*int64` | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | -| `Next` | `*string` | :heavy_minus_sign: | Cursor for next page of results. | -| `Prev` | `*string` | :heavy_minus_sign: | Cursor for previous page of results. | -| `Include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `OrderBy` | [*operations.ListTenantDestinationAttemptsOrderBy](../../models/operations/listtenantdestinationattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | -| `Dir` | [*operations.ListTenantDestinationAttemptsDir](../../models/operations/listtenantdestinationattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `TenantID` | `string` | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | +| `DestinationID` | `string` | :heavy_check_mark: | The ID of the destination. | +| `EventID` | []`string` | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | +| `Status` | [*operations.ListTenantDestinationAttemptsStatus](../../models/operations/listtenantdestinationattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | +| `Topic` | []`string` | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | +| `TimeGte` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | +| `TimeLte` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | +| `TimeGt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | +| `TimeLt` | [*time.Time](https://pkg.go.dev/time#Time) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | +| `Limit` | `*int64` | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | +| `Next` | `*string` | :heavy_minus_sign: | Cursor for next page of results. | +| `Prev` | `*string` | :heavy_minus_sign: | Cursor for previous page of results. | +| `Include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `OrderBy` | [*operations.ListTenantDestinationAttemptsOrderBy](../../models/operations/listtenantdestinationattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | +| `Dir` | [*operations.ListTenantDestinationAttemptsDir](../../models/operations/listtenantdestinationattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file diff --git a/sdks/outpost-go/docs/sdks/attempts/README.md b/sdks/outpost-go/docs/sdks/attempts/README.md index 91b2d248e..7b31816cf 100644 --- a/sdks/outpost-go/docs/sdks/attempts/README.md +++ b/sdks/outpost-go/docs/sdks/attempts/README.md @@ -17,6 +17,7 @@ Use the `include` query parameter to include related data: - `include=event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `include=event.data`: Include full event with payload data - `include=response_data`: Include response body and headers from the attempt +- `include=destination`: Include the full destination object with target information ### Available Operations @@ -217,12 +218,12 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `attemptID` | `string` | :heavy_check_mark: | The ID of the attempt. | -| `include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `attemptID` | `string` | :heavy_check_mark: | The ID of the attempt. | +| `include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | ### Response diff --git a/sdks/outpost-go/docs/sdks/destinations/README.md b/sdks/outpost-go/docs/sdks/destinations/README.md index 0de1f256b..91402ab56 100644 --- a/sdks/outpost-go/docs/sdks/destinations/README.md +++ b/sdks/outpost-go/docs/sdks/destinations/README.md @@ -657,14 +657,14 @@ func main() { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | -| `tenantID` | `string` | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | -| `destinationID` | `string` | :heavy_check_mark: | The ID of the destination. | -| `attemptID` | `string` | :heavy_check_mark: | The ID of the attempt. | -| `include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `tenantID` | `string` | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | +| `destinationID` | `string` | :heavy_check_mark: | The ID of the destination. | +| `attemptID` | `string` | :heavy_check_mark: | The ID of the attempt. | +| `include` | []`string` | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | ### Response diff --git a/sdks/outpost-go/docs/sdks/metrics/README.md b/sdks/outpost-go/docs/sdks/metrics/README.md new file mode 100644 index 000000000..f2194dbf9 --- /dev/null +++ b/sdks/outpost-go/docs/sdks/metrics/README.md @@ -0,0 +1,162 @@ +# Metrics + +## Overview + +Aggregated metrics for events and delivery attempts. Supports time bucketing, dimensional grouping, and filtering. + + +### Available Operations + +* [GetEventMetrics](#geteventmetrics) - Get Event Metrics +* [GetAttemptMetrics](#getattemptmetrics) - Get Attempt Metrics + +## GetEventMetrics + +Returns aggregated event publish metrics. Supports time bucketing via granularity, +dimensional grouping, and filtering. + +**Measures:** `count`, `rate` + +**Dimensions:** `tenant_id` (admin-only), `topic`, `destination_id` + +**Filters:** `tenant_id` (admin-only), `topic`, `destination_id` + + +### Example Usage + + +```go +package main + +import( + "context" + outpostgo "github.com/hookdeck/outpost/sdks/outpost-go" + "github.com/hookdeck/outpost/sdks/outpost-go/types" + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" + "log" +) + +func main() { + ctx := context.Background() + + s := outpostgo.New( + outpostgo.WithSecurity(""), + ) + + res, err := s.Metrics.GetEventMetrics(ctx, operations.GetEventMetricsRequest{ + TimeStart: types.MustTimeFromString("2026-03-02T00:00:00Z"), + TimeEnd: types.MustTimeFromString("2026-03-03T00:00:00Z"), + Granularity: outpostgo.Pointer("1h"), + Measures: operations.CreateGetEventMetricsMeasuresUnionArrayOfGetEventMetricsMeasuresEnum2( + []operations.GetEventMetricsMeasuresEnum2{ + operations.GetEventMetricsMeasuresEnum2Count, + }, + ), + }) + if err != nil { + log.Fatal(err) + } + if res.MetricsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.GetEventMetricsRequest](../../models/operations/geteventmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | + +### Response + +**[*operations.GetEventMetricsResponse](../../models/operations/geteventmetricsresponse.md), error** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| apierrors.BadRequestError | 400 | application/json | +| apierrors.UnauthorizedError | 401 | application/json | +| apierrors.APIErrorResponse | 403 | application/json | +| apierrors.InternalServerError | 500 | application/json | +| apierrors.APIError | 4XX, 5XX | \*/\* | + +## GetAttemptMetrics + +Returns aggregated delivery attempt metrics. Supports time bucketing via granularity, +dimensional grouping, and filtering. + +**Measures:** `count`, `successful_count`, `failed_count`, `error_rate`, +`first_attempt_count`, `retry_count`, `manual_retry_count`, `avg_attempt_number`, +`rate`, `successful_rate`, `failed_rate` + +**Dimensions:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + +**Filters:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + + +### Example Usage + + +```go +package main + +import( + "context" + outpostgo "github.com/hookdeck/outpost/sdks/outpost-go" + "github.com/hookdeck/outpost/sdks/outpost-go/types" + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" + "log" +) + +func main() { + ctx := context.Background() + + s := outpostgo.New( + outpostgo.WithSecurity(""), + ) + + res, err := s.Metrics.GetAttemptMetrics(ctx, operations.GetAttemptMetricsRequest{ + TimeStart: types.MustTimeFromString("2026-03-02T00:00:00Z"), + TimeEnd: types.MustTimeFromString("2026-03-03T00:00:00Z"), + Granularity: outpostgo.Pointer("1h"), + Measures: operations.CreateGetAttemptMetricsMeasuresUnionArrayOfGetAttemptMetricsMeasuresEnum2( + []operations.GetAttemptMetricsMeasuresEnum2{ + operations.GetAttemptMetricsMeasuresEnum2Count, + operations.GetAttemptMetricsMeasuresEnum2ErrorRate, + }, + ), + }) + if err != nil { + log.Fatal(err) + } + if res.MetricsResponse != nil { + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. | +| `request` | [operations.GetAttemptMetricsRequest](../../models/operations/getattemptmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. | + +### Response + +**[*operations.GetAttemptMetricsResponse](../../models/operations/getattemptmetricsresponse.md), error** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| apierrors.BadRequestError | 400 | application/json | +| apierrors.UnauthorizedError | 401 | application/json | +| apierrors.APIErrorResponse | 403 | application/json | +| apierrors.InternalServerError | 500 | application/json | +| apierrors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sdks/outpost-go/metrics.go b/sdks/outpost-go/metrics.go new file mode 100644 index 000000000..199f17173 --- /dev/null +++ b/sdks/outpost-go/metrics.go @@ -0,0 +1,637 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package outpostgo + +import ( + "bytes" + "context" + "fmt" + "github.com/hookdeck/outpost/sdks/outpost-go/internal/config" + "github.com/hookdeck/outpost/sdks/outpost-go/internal/hooks" + "github.com/hookdeck/outpost/sdks/outpost-go/internal/utils" + "github.com/hookdeck/outpost/sdks/outpost-go/models/apierrors" + "github.com/hookdeck/outpost/sdks/outpost-go/models/components" + "github.com/hookdeck/outpost/sdks/outpost-go/models/operations" + "github.com/hookdeck/outpost/sdks/outpost-go/retry" + "net/http" + "net/url" +) + +// Metrics - Aggregated metrics for events and delivery attempts. Supports time bucketing, dimensional grouping, and filtering. +type Metrics struct { + rootSDK *Outpost + sdkConfiguration config.SDKConfiguration + hooks *hooks.Hooks +} + +func newMetrics(rootSDK *Outpost, sdkConfig config.SDKConfiguration, hooks *hooks.Hooks) *Metrics { + return &Metrics{ + rootSDK: rootSDK, + sdkConfiguration: sdkConfig, + hooks: hooks, + } +} + +// GetEventMetrics - Get Event Metrics +// Returns aggregated event publish metrics. Supports time bucketing via granularity, +// dimensional grouping, and filtering. +// +// **Measures:** `count`, `rate` +// +// **Dimensions:** `tenant_id` (admin-only), `topic`, `destination_id` +// +// **Filters:** `tenant_id` (admin-only), `topic`, `destination_id` +func (s *Metrics) GetEventMetrics(ctx context.Context, request operations.GetEventMetricsRequest, opts ...operations.Option) (*operations.GetEventMetricsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/metrics/events") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getEventMetrics", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"400", "401", "403", "4XX", "500", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.GetEventMetricsResponse{ + HTTPMeta: components.HTTPMetadata{ + Request: req, + Response: httpRes, + }, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out components.MetricsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.MetricsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out apierrors.BadRequestError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 401: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out apierrors.UnauthorizedError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 403: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out apierrors.APIErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 500: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out apierrors.InternalServerError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} + +// GetAttemptMetrics - Get Attempt Metrics +// Returns aggregated delivery attempt metrics. Supports time bucketing via granularity, +// dimensional grouping, and filtering. +// +// **Measures:** `count`, `successful_count`, `failed_count`, `error_rate`, +// `first_attempt_count`, `retry_count`, `manual_retry_count`, `avg_attempt_number`, +// `rate`, `successful_rate`, `failed_rate` +// +// **Dimensions:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` +// +// **Filters:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` +func (s *Metrics) GetAttemptMetrics(ctx context.Context, request operations.GetAttemptMetricsRequest, opts ...operations.Option) (*operations.GetAttemptMetricsResponse, error) { + o := operations.Options{} + supportedOptions := []string{ + operations.SupportedOptionRetries, + operations.SupportedOptionTimeout, + } + + for _, opt := range opts { + if err := opt(&o, supportedOptions...); err != nil { + return nil, fmt.Errorf("error applying option: %w", err) + } + } + + var baseURL string + if o.ServerURL == nil { + baseURL = utils.ReplaceParameters(s.sdkConfiguration.GetServerDetails()) + } else { + baseURL = *o.ServerURL + } + opURL, err := url.JoinPath(baseURL, "/metrics/attempts") + if err != nil { + return nil, fmt.Errorf("error generating URL: %w", err) + } + + hookCtx := hooks.HookContext{ + SDK: s.rootSDK, + SDKConfiguration: s.sdkConfiguration, + BaseURL: baseURL, + Context: ctx, + OperationID: "getAttemptMetrics", + OAuth2Scopes: nil, + SecuritySource: s.sdkConfiguration.Security, + } + + timeout := o.Timeout + if timeout == nil { + timeout = s.sdkConfiguration.Timeout + } + + if timeout != nil { + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, *timeout) + defer cancel() + } + + req, err := http.NewRequestWithContext(ctx, "GET", opURL, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Accept", "application/json") + req.Header.Set("User-Agent", s.sdkConfiguration.UserAgent) + + if err := utils.PopulateQueryParams(ctx, req, request, nil, nil); err != nil { + return nil, fmt.Errorf("error populating query params: %w", err) + } + + if err := utils.PopulateSecurity(ctx, req, s.sdkConfiguration.Security); err != nil { + return nil, err + } + + for k, v := range o.SetHeaders { + req.Header.Set(k, v) + } + + globalRetryConfig := s.sdkConfiguration.RetryConfig + retryConfig := o.Retries + if retryConfig == nil { + if globalRetryConfig != nil { + retryConfig = globalRetryConfig + } + } + + var httpRes *http.Response + if retryConfig != nil { + httpRes, err = utils.Retry(ctx, utils.Retries{ + Config: retryConfig, + StatusCodes: []string{ + "429", + "500", + "502", + "503", + "504", + }, + }, func() (*http.Response, error) { + if req.Body != nil && req.Body != http.NoBody && req.GetBody != nil { + copyBody, err := req.GetBody() + + if err != nil { + return nil, err + } + + req.Body = copyBody + } + + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + if retry.IsPermanentError(err) || retry.IsTemporaryError(err) { + return nil, err + } + + return nil, retry.Permanent(err) + } + + httpRes, err := s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + } + return httpRes, err + }) + + if err != nil { + return nil, err + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } else { + req, err = s.hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req) + if err != nil { + return nil, err + } + + httpRes, err = s.sdkConfiguration.Client.Do(req) + if err != nil || httpRes == nil { + if err != nil { + err = fmt.Errorf("error sending request: %w", err) + } else { + err = fmt.Errorf("error sending request: no response") + } + + _, err = s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, nil, err) + return nil, err + } else if utils.MatchStatusCodes([]string{"400", "401", "403", "4XX", "500", "5XX"}, httpRes.StatusCode) { + _httpRes, err := s.hooks.AfterError(hooks.AfterErrorContext{HookContext: hookCtx}, httpRes, nil) + if err != nil { + return nil, err + } else if _httpRes != nil { + httpRes = _httpRes + } + } else { + httpRes, err = s.hooks.AfterSuccess(hooks.AfterSuccessContext{HookContext: hookCtx}, httpRes) + if err != nil { + return nil, err + } + } + } + + res := &operations.GetAttemptMetricsResponse{ + HTTPMeta: components.HTTPMetadata{ + Request: req, + Response: httpRes, + }, + } + + switch { + case httpRes.StatusCode == 200: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out components.MetricsResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + res.MetricsResponse = &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 400: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out apierrors.BadRequestError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 401: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out apierrors.UnauthorizedError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 403: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out apierrors.APIErrorResponse + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode == 500: + switch { + case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`): + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + + var out apierrors.InternalServerError + if err := utils.UnmarshalJsonFromResponseBody(bytes.NewBuffer(rawBody), &out, ""); err != nil { + return nil, err + } + + return nil, &out + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError(fmt.Sprintf("unknown content-type received: %s", httpRes.Header.Get("Content-Type")), httpRes.StatusCode, string(rawBody), httpRes) + } + case httpRes.StatusCode >= 400 && httpRes.StatusCode < 500: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + case httpRes.StatusCode >= 500 && httpRes.StatusCode < 600: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError("API error occurred", httpRes.StatusCode, string(rawBody), httpRes) + default: + rawBody, err := utils.ConsumeRawBody(httpRes) + if err != nil { + return nil, err + } + return nil, apierrors.NewAPIError("unknown status code returned", httpRes.StatusCode, string(rawBody), httpRes) + } + + return res, nil + +} diff --git a/sdks/outpost-go/models/components/attempt.go b/sdks/outpost-go/models/components/attempt.go index d47ceaf6b..41ced248d 100644 --- a/sdks/outpost-go/models/components/attempt.go +++ b/sdks/outpost-go/models/components/attempt.go @@ -37,6 +37,165 @@ func (e *Status) UnmarshalJSON(data []byte) error { } } +// EventFull - Full event object with data (returned when include=event.data). +type EventFull struct { + ID *string `json:"id,omitempty"` + // The tenant this event belongs to. + TenantID *string `json:"tenant_id,omitempty"` + // The destination this event was delivered to. + DestinationID *string `json:"destination_id,omitempty"` + Topic *string `json:"topic,omitempty"` + // Time the event was received. + Time *time.Time `json:"time,omitempty"` + // Whether this event can be retried. + EligibleForRetry *bool `json:"eligible_for_retry,omitempty"` + Metadata map[string]string `json:"metadata,omitempty"` + // The event payload data. + Data map[string]any `json:"data,omitempty"` +} + +func (e EventFull) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(e, "", false) +} + +func (e *EventFull) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &e, "", false, nil); err != nil { + return err + } + return nil +} + +func (e *EventFull) GetID() *string { + if e == nil { + return nil + } + return e.ID +} + +func (e *EventFull) GetTenantID() *string { + if e == nil { + return nil + } + return e.TenantID +} + +func (e *EventFull) GetDestinationID() *string { + if e == nil { + return nil + } + return e.DestinationID +} + +func (e *EventFull) GetTopic() *string { + if e == nil { + return nil + } + return e.Topic +} + +func (e *EventFull) GetTime() *time.Time { + if e == nil { + return nil + } + return e.Time +} + +func (e *EventFull) GetEligibleForRetry() *bool { + if e == nil { + return nil + } + return e.EligibleForRetry +} + +func (e *EventFull) GetMetadata() map[string]string { + if e == nil { + return nil + } + return e.Metadata +} + +func (e *EventFull) GetData() map[string]any { + if e == nil { + return nil + } + return e.Data +} + +// EventSummary - Event object without data (returned when include=event). +type EventSummary struct { + ID *string `json:"id,omitempty"` + // The tenant this event belongs to. + TenantID *string `json:"tenant_id,omitempty"` + // The destination this event was delivered to. + DestinationID *string `json:"destination_id,omitempty"` + Topic *string `json:"topic,omitempty"` + // Time the event was received. + Time *time.Time `json:"time,omitempty"` + // Whether this event can be retried. + EligibleForRetry *bool `json:"eligible_for_retry,omitempty"` + Metadata map[string]string `json:"metadata,omitempty"` +} + +func (e EventSummary) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(e, "", false) +} + +func (e *EventSummary) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &e, "", false, nil); err != nil { + return err + } + return nil +} + +func (e *EventSummary) GetID() *string { + if e == nil { + return nil + } + return e.ID +} + +func (e *EventSummary) GetTenantID() *string { + if e == nil { + return nil + } + return e.TenantID +} + +func (e *EventSummary) GetDestinationID() *string { + if e == nil { + return nil + } + return e.DestinationID +} + +func (e *EventSummary) GetTopic() *string { + if e == nil { + return nil + } + return e.Topic +} + +func (e *EventSummary) GetTime() *time.Time { + if e == nil { + return nil + } + return e.Time +} + +func (e *EventSummary) GetEligibleForRetry() *bool { + if e == nil { + return nil + } + return e.EligibleForRetry +} + +func (e *EventSummary) GetMetadata() map[string]string { + if e == nil { + return nil + } + return e.Metadata +} + type EventUnionType string const ( @@ -124,7 +283,8 @@ type Attempt struct { // The destination ID this attempt was sent to. DestinationID *string `json:"destination_id,omitempty"` // The associated event object. Only present when include=event or include=event.data. - Event *EventUnion `json:"event,omitempty"` + Event *EventUnion `json:"event,omitempty"` + Destination *Destination `json:"destination,omitempty"` } func (a Attempt) MarshalJSON() ([]byte, error) { @@ -214,3 +374,66 @@ func (a *Attempt) GetEvent() *EventUnion { } return a.Event } + +func (a *Attempt) GetDestination() *Destination { + if a == nil { + return nil + } + return a.Destination +} + +func (a *Attempt) GetDestinationWebhook() *DestinationWebhook { + if v := a.GetDestination(); v != nil { + return v.DestinationWebhook + } + return nil +} + +func (a *Attempt) GetDestinationAwsSqs() *DestinationAWSSQS { + if v := a.GetDestination(); v != nil { + return v.DestinationAWSSQS + } + return nil +} + +func (a *Attempt) GetDestinationRabbitmq() *DestinationRabbitMQ { + if v := a.GetDestination(); v != nil { + return v.DestinationRabbitMQ + } + return nil +} + +func (a *Attempt) GetDestinationHookdeck() *DestinationHookdeck { + if v := a.GetDestination(); v != nil { + return v.DestinationHookdeck + } + return nil +} + +func (a *Attempt) GetDestinationAwsKinesis() *DestinationAWSKinesis { + if v := a.GetDestination(); v != nil { + return v.DestinationAWSKinesis + } + return nil +} + +func (a *Attempt) GetDestinationAzureServicebus() *DestinationAzureServiceBus { + if v := a.GetDestination(); v != nil { + return v.DestinationAzureServiceBus + } + return nil +} + +func (a *Attempt) GetDestinationAwsS3() *DestinationAwss3 { + if v := a.GetDestination(); v != nil { + return v.DestinationAwss3 + } + return nil +} + +func (a *Attempt) GetDestinationGcpPubsub() *DestinationGCPPubSub { + if v := a.GetDestination(); v != nil { + return v.DestinationGCPPubSub + } + return nil +} diff --git a/sdks/outpost-go/models/components/eventfull.go b/sdks/outpost-go/models/components/eventfull.go deleted file mode 100644 index 870ed8753..000000000 --- a/sdks/outpost-go/models/components/eventfull.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package components - -import ( - "github.com/hookdeck/outpost/sdks/outpost-go/internal/utils" - "time" -) - -// EventFull - Full event object with data (returned when include=event.data). -type EventFull struct { - ID *string `json:"id,omitempty"` - // The tenant this event belongs to. - TenantID *string `json:"tenant_id,omitempty"` - // The destination this event was delivered to. - DestinationID *string `json:"destination_id,omitempty"` - Topic *string `json:"topic,omitempty"` - // Time the event was received. - Time *time.Time `json:"time,omitempty"` - // Whether this event can be retried. - EligibleForRetry *bool `json:"eligible_for_retry,omitempty"` - Metadata map[string]string `json:"metadata,omitempty"` - // The event payload data. - Data map[string]any `json:"data,omitempty"` -} - -func (e EventFull) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(e, "", false) -} - -func (e *EventFull) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &e, "", false, nil); err != nil { - return err - } - return nil -} - -func (e *EventFull) GetID() *string { - if e == nil { - return nil - } - return e.ID -} - -func (e *EventFull) GetTenantID() *string { - if e == nil { - return nil - } - return e.TenantID -} - -func (e *EventFull) GetDestinationID() *string { - if e == nil { - return nil - } - return e.DestinationID -} - -func (e *EventFull) GetTopic() *string { - if e == nil { - return nil - } - return e.Topic -} - -func (e *EventFull) GetTime() *time.Time { - if e == nil { - return nil - } - return e.Time -} - -func (e *EventFull) GetEligibleForRetry() *bool { - if e == nil { - return nil - } - return e.EligibleForRetry -} - -func (e *EventFull) GetMetadata() map[string]string { - if e == nil { - return nil - } - return e.Metadata -} - -func (e *EventFull) GetData() map[string]any { - if e == nil { - return nil - } - return e.Data -} diff --git a/sdks/outpost-go/models/components/eventsummary.go b/sdks/outpost-go/models/components/eventsummary.go deleted file mode 100644 index d378f04d5..000000000 --- a/sdks/outpost-go/models/components/eventsummary.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - -package components - -import ( - "github.com/hookdeck/outpost/sdks/outpost-go/internal/utils" - "time" -) - -// EventSummary - Event object without data (returned when include=event). -type EventSummary struct { - ID *string `json:"id,omitempty"` - // The tenant this event belongs to. - TenantID *string `json:"tenant_id,omitempty"` - // The destination this event was delivered to. - DestinationID *string `json:"destination_id,omitempty"` - Topic *string `json:"topic,omitempty"` - // Time the event was received. - Time *time.Time `json:"time,omitempty"` - // Whether this event can be retried. - EligibleForRetry *bool `json:"eligible_for_retry,omitempty"` - Metadata map[string]string `json:"metadata,omitempty"` -} - -func (e EventSummary) MarshalJSON() ([]byte, error) { - return utils.MarshalJSON(e, "", false) -} - -func (e *EventSummary) UnmarshalJSON(data []byte) error { - if err := utils.UnmarshalJSON(data, &e, "", false, nil); err != nil { - return err - } - return nil -} - -func (e *EventSummary) GetID() *string { - if e == nil { - return nil - } - return e.ID -} - -func (e *EventSummary) GetTenantID() *string { - if e == nil { - return nil - } - return e.TenantID -} - -func (e *EventSummary) GetDestinationID() *string { - if e == nil { - return nil - } - return e.DestinationID -} - -func (e *EventSummary) GetTopic() *string { - if e == nil { - return nil - } - return e.Topic -} - -func (e *EventSummary) GetTime() *time.Time { - if e == nil { - return nil - } - return e.Time -} - -func (e *EventSummary) GetEligibleForRetry() *bool { - if e == nil { - return nil - } - return e.EligibleForRetry -} - -func (e *EventSummary) GetMetadata() map[string]string { - if e == nil { - return nil - } - return e.Metadata -} diff --git a/sdks/outpost-go/models/components/metricsdatapoint.go b/sdks/outpost-go/models/components/metricsdatapoint.go new file mode 100644 index 000000000..bbaa6c1ed --- /dev/null +++ b/sdks/outpost-go/models/components/metricsdatapoint.go @@ -0,0 +1,49 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +import ( + "github.com/hookdeck/outpost/sdks/outpost-go/internal/utils" + "time" +) + +type MetricsDataPoint struct { + // Start of the time bucket. Null when no granularity is specified. + TimeBucket *time.Time `json:"time_bucket,omitempty"` + // Dimension values for this data point. Empty object when no dimensions are requested. + Dimensions map[string]string `json:"dimensions,omitempty"` + // Requested measure values for this data point. + Metrics map[string]any `json:"metrics,omitempty"` +} + +func (m MetricsDataPoint) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(m, "", false) +} + +func (m *MetricsDataPoint) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &m, "", false, nil); err != nil { + return err + } + return nil +} + +func (m *MetricsDataPoint) GetTimeBucket() *time.Time { + if m == nil { + return nil + } + return m.TimeBucket +} + +func (m *MetricsDataPoint) GetDimensions() map[string]string { + if m == nil { + return nil + } + return m.Dimensions +} + +func (m *MetricsDataPoint) GetMetrics() map[string]any { + if m == nil { + return nil + } + return m.Metrics +} diff --git a/sdks/outpost-go/models/components/metricsmetadata.go b/sdks/outpost-go/models/components/metricsmetadata.go new file mode 100644 index 000000000..ec2077890 --- /dev/null +++ b/sdks/outpost-go/models/components/metricsmetadata.go @@ -0,0 +1,51 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type MetricsMetadata struct { + // The granularity used for time bucketing, or null if none was specified. + Granularity *string `json:"granularity,omitempty"` + // Query execution time in milliseconds. + QueryTimeMs *int64 `json:"query_time_ms,omitempty"` + // Number of data points returned. + RowCount *int64 `json:"row_count,omitempty"` + // Maximum number of rows the query will return. + RowLimit *int64 `json:"row_limit,omitempty"` + // Whether the results were truncated due to hitting the row limit. + Truncated *bool `json:"truncated,omitempty"` +} + +func (m *MetricsMetadata) GetGranularity() *string { + if m == nil { + return nil + } + return m.Granularity +} + +func (m *MetricsMetadata) GetQueryTimeMs() *int64 { + if m == nil { + return nil + } + return m.QueryTimeMs +} + +func (m *MetricsMetadata) GetRowCount() *int64 { + if m == nil { + return nil + } + return m.RowCount +} + +func (m *MetricsMetadata) GetRowLimit() *int64 { + if m == nil { + return nil + } + return m.RowLimit +} + +func (m *MetricsMetadata) GetTruncated() *bool { + if m == nil { + return nil + } + return m.Truncated +} diff --git a/sdks/outpost-go/models/components/metricsresponse.go b/sdks/outpost-go/models/components/metricsresponse.go new file mode 100644 index 000000000..95d8b8989 --- /dev/null +++ b/sdks/outpost-go/models/components/metricsresponse.go @@ -0,0 +1,23 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package components + +type MetricsResponse struct { + // Array of aggregated data points. + Data []MetricsDataPoint `json:"data,omitempty"` + Metadata *MetricsMetadata `json:"metadata,omitempty"` +} + +func (m *MetricsResponse) GetData() []MetricsDataPoint { + if m == nil { + return nil + } + return m.Data +} + +func (m *MetricsResponse) GetMetadata() *MetricsMetadata { + if m == nil { + return nil + } + return m.Metadata +} diff --git a/sdks/outpost-go/models/operations/getattempt.go b/sdks/outpost-go/models/operations/getattempt.go index f2c75fc33..907ae735e 100644 --- a/sdks/outpost-go/models/operations/getattempt.go +++ b/sdks/outpost-go/models/operations/getattempt.go @@ -13,6 +13,7 @@ type GetAttemptRequest struct { // - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) // - `event.data`: Include full event with payload data // - `response_data`: Include response body and headers + // - `destination`: Include the full destination object // Include []string `queryParam:"style=form,explode=true,name=include"` } diff --git a/sdks/outpost-go/models/operations/getattemptmetrics.go b/sdks/outpost-go/models/operations/getattemptmetrics.go new file mode 100644 index 000000000..4b4f7ed55 --- /dev/null +++ b/sdks/outpost-go/models/operations/getattemptmetrics.go @@ -0,0 +1,936 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "github.com/hookdeck/outpost/sdks/outpost-go/internal/utils" + "github.com/hookdeck/outpost/sdks/outpost-go/models/components" + "time" +) + +type GetAttemptMetricsMeasuresEnum2 string + +const ( + GetAttemptMetricsMeasuresEnum2Count GetAttemptMetricsMeasuresEnum2 = "count" + GetAttemptMetricsMeasuresEnum2SuccessfulCount GetAttemptMetricsMeasuresEnum2 = "successful_count" + GetAttemptMetricsMeasuresEnum2FailedCount GetAttemptMetricsMeasuresEnum2 = "failed_count" + GetAttemptMetricsMeasuresEnum2ErrorRate GetAttemptMetricsMeasuresEnum2 = "error_rate" + GetAttemptMetricsMeasuresEnum2FirstAttemptCount GetAttemptMetricsMeasuresEnum2 = "first_attempt_count" + GetAttemptMetricsMeasuresEnum2RetryCount GetAttemptMetricsMeasuresEnum2 = "retry_count" + GetAttemptMetricsMeasuresEnum2ManualRetryCount GetAttemptMetricsMeasuresEnum2 = "manual_retry_count" + GetAttemptMetricsMeasuresEnum2AvgAttemptNumber GetAttemptMetricsMeasuresEnum2 = "avg_attempt_number" + GetAttemptMetricsMeasuresEnum2Rate GetAttemptMetricsMeasuresEnum2 = "rate" + GetAttemptMetricsMeasuresEnum2SuccessfulRate GetAttemptMetricsMeasuresEnum2 = "successful_rate" + GetAttemptMetricsMeasuresEnum2FailedRate GetAttemptMetricsMeasuresEnum2 = "failed_rate" +) + +func (e GetAttemptMetricsMeasuresEnum2) ToPointer() *GetAttemptMetricsMeasuresEnum2 { + return &e +} +func (e *GetAttemptMetricsMeasuresEnum2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "count": + fallthrough + case "successful_count": + fallthrough + case "failed_count": + fallthrough + case "error_rate": + fallthrough + case "first_attempt_count": + fallthrough + case "retry_count": + fallthrough + case "manual_retry_count": + fallthrough + case "avg_attempt_number": + fallthrough + case "rate": + fallthrough + case "successful_rate": + fallthrough + case "failed_rate": + *e = GetAttemptMetricsMeasuresEnum2(v) + return nil + default: + return fmt.Errorf("invalid value for GetAttemptMetricsMeasuresEnum2: %v", v) + } +} + +type GetAttemptMetricsMeasuresEnum1 string + +const ( + GetAttemptMetricsMeasuresEnum1Count GetAttemptMetricsMeasuresEnum1 = "count" + GetAttemptMetricsMeasuresEnum1SuccessfulCount GetAttemptMetricsMeasuresEnum1 = "successful_count" + GetAttemptMetricsMeasuresEnum1FailedCount GetAttemptMetricsMeasuresEnum1 = "failed_count" + GetAttemptMetricsMeasuresEnum1ErrorRate GetAttemptMetricsMeasuresEnum1 = "error_rate" + GetAttemptMetricsMeasuresEnum1FirstAttemptCount GetAttemptMetricsMeasuresEnum1 = "first_attempt_count" + GetAttemptMetricsMeasuresEnum1RetryCount GetAttemptMetricsMeasuresEnum1 = "retry_count" + GetAttemptMetricsMeasuresEnum1ManualRetryCount GetAttemptMetricsMeasuresEnum1 = "manual_retry_count" + GetAttemptMetricsMeasuresEnum1AvgAttemptNumber GetAttemptMetricsMeasuresEnum1 = "avg_attempt_number" + GetAttemptMetricsMeasuresEnum1Rate GetAttemptMetricsMeasuresEnum1 = "rate" + GetAttemptMetricsMeasuresEnum1SuccessfulRate GetAttemptMetricsMeasuresEnum1 = "successful_rate" + GetAttemptMetricsMeasuresEnum1FailedRate GetAttemptMetricsMeasuresEnum1 = "failed_rate" +) + +func (e GetAttemptMetricsMeasuresEnum1) ToPointer() *GetAttemptMetricsMeasuresEnum1 { + return &e +} +func (e *GetAttemptMetricsMeasuresEnum1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "count": + fallthrough + case "successful_count": + fallthrough + case "failed_count": + fallthrough + case "error_rate": + fallthrough + case "first_attempt_count": + fallthrough + case "retry_count": + fallthrough + case "manual_retry_count": + fallthrough + case "avg_attempt_number": + fallthrough + case "rate": + fallthrough + case "successful_rate": + fallthrough + case "failed_rate": + *e = GetAttemptMetricsMeasuresEnum1(v) + return nil + default: + return fmt.Errorf("invalid value for GetAttemptMetricsMeasuresEnum1: %v", v) + } +} + +type GetAttemptMetricsMeasuresUnionType string + +const ( + GetAttemptMetricsMeasuresUnionTypeGetAttemptMetricsMeasuresEnum1 GetAttemptMetricsMeasuresUnionType = "getAttemptMetrics_measures_enum_1" + GetAttemptMetricsMeasuresUnionTypeArrayOfGetAttemptMetricsMeasuresEnum2 GetAttemptMetricsMeasuresUnionType = "arrayOfGetAttemptMetricsMeasuresEnum2" +) + +// GetAttemptMetricsMeasuresUnion - Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). +type GetAttemptMetricsMeasuresUnion struct { + GetAttemptMetricsMeasuresEnum1 *GetAttemptMetricsMeasuresEnum1 `queryParam:"inline" union:"member"` + ArrayOfGetAttemptMetricsMeasuresEnum2 []GetAttemptMetricsMeasuresEnum2 `queryParam:"inline" union:"member"` + + Type GetAttemptMetricsMeasuresUnionType +} + +func CreateGetAttemptMetricsMeasuresUnionGetAttemptMetricsMeasuresEnum1(getAttemptMetricsMeasuresEnum1 GetAttemptMetricsMeasuresEnum1) GetAttemptMetricsMeasuresUnion { + typ := GetAttemptMetricsMeasuresUnionTypeGetAttemptMetricsMeasuresEnum1 + + return GetAttemptMetricsMeasuresUnion{ + GetAttemptMetricsMeasuresEnum1: &getAttemptMetricsMeasuresEnum1, + Type: typ, + } +} + +func CreateGetAttemptMetricsMeasuresUnionArrayOfGetAttemptMetricsMeasuresEnum2(arrayOfGetAttemptMetricsMeasuresEnum2 []GetAttemptMetricsMeasuresEnum2) GetAttemptMetricsMeasuresUnion { + typ := GetAttemptMetricsMeasuresUnionTypeArrayOfGetAttemptMetricsMeasuresEnum2 + + return GetAttemptMetricsMeasuresUnion{ + ArrayOfGetAttemptMetricsMeasuresEnum2: arrayOfGetAttemptMetricsMeasuresEnum2, + Type: typ, + } +} + +func (u *GetAttemptMetricsMeasuresUnion) UnmarshalJSON(data []byte) error { + + var getAttemptMetricsMeasuresEnum1 GetAttemptMetricsMeasuresEnum1 = GetAttemptMetricsMeasuresEnum1("") + if err := utils.UnmarshalJSON(data, &getAttemptMetricsMeasuresEnum1, "", true, nil); err == nil { + u.GetAttemptMetricsMeasuresEnum1 = &getAttemptMetricsMeasuresEnum1 + u.Type = GetAttemptMetricsMeasuresUnionTypeGetAttemptMetricsMeasuresEnum1 + return nil + } + + var arrayOfGetAttemptMetricsMeasuresEnum2 []GetAttemptMetricsMeasuresEnum2 = []GetAttemptMetricsMeasuresEnum2{} + if err := utils.UnmarshalJSON(data, &arrayOfGetAttemptMetricsMeasuresEnum2, "", true, nil); err == nil { + u.ArrayOfGetAttemptMetricsMeasuresEnum2 = arrayOfGetAttemptMetricsMeasuresEnum2 + u.Type = GetAttemptMetricsMeasuresUnionTypeArrayOfGetAttemptMetricsMeasuresEnum2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetAttemptMetricsMeasuresUnion", string(data)) +} + +func (u GetAttemptMetricsMeasuresUnion) MarshalJSON() ([]byte, error) { + if u.GetAttemptMetricsMeasuresEnum1 != nil { + return utils.MarshalJSON(u.GetAttemptMetricsMeasuresEnum1, "", true) + } + + if u.ArrayOfGetAttemptMetricsMeasuresEnum2 != nil { + return utils.MarshalJSON(u.ArrayOfGetAttemptMetricsMeasuresEnum2, "", true) + } + + return nil, errors.New("could not marshal union type GetAttemptMetricsMeasuresUnion: all fields are null") +} + +type GetAttemptMetricsDimensionsEnum2 string + +const ( + GetAttemptMetricsDimensionsEnum2TenantID GetAttemptMetricsDimensionsEnum2 = "tenant_id" + GetAttemptMetricsDimensionsEnum2DestinationID GetAttemptMetricsDimensionsEnum2 = "destination_id" + GetAttemptMetricsDimensionsEnum2Topic GetAttemptMetricsDimensionsEnum2 = "topic" + GetAttemptMetricsDimensionsEnum2Status GetAttemptMetricsDimensionsEnum2 = "status" + GetAttemptMetricsDimensionsEnum2Code GetAttemptMetricsDimensionsEnum2 = "code" + GetAttemptMetricsDimensionsEnum2Manual GetAttemptMetricsDimensionsEnum2 = "manual" + GetAttemptMetricsDimensionsEnum2AttemptNumber GetAttemptMetricsDimensionsEnum2 = "attempt_number" +) + +func (e GetAttemptMetricsDimensionsEnum2) ToPointer() *GetAttemptMetricsDimensionsEnum2 { + return &e +} +func (e *GetAttemptMetricsDimensionsEnum2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "tenant_id": + fallthrough + case "destination_id": + fallthrough + case "topic": + fallthrough + case "status": + fallthrough + case "code": + fallthrough + case "manual": + fallthrough + case "attempt_number": + *e = GetAttemptMetricsDimensionsEnum2(v) + return nil + default: + return fmt.Errorf("invalid value for GetAttemptMetricsDimensionsEnum2: %v", v) + } +} + +type GetAttemptMetricsDimensionsEnum1 string + +const ( + GetAttemptMetricsDimensionsEnum1TenantID GetAttemptMetricsDimensionsEnum1 = "tenant_id" + GetAttemptMetricsDimensionsEnum1DestinationID GetAttemptMetricsDimensionsEnum1 = "destination_id" + GetAttemptMetricsDimensionsEnum1Topic GetAttemptMetricsDimensionsEnum1 = "topic" + GetAttemptMetricsDimensionsEnum1Status GetAttemptMetricsDimensionsEnum1 = "status" + GetAttemptMetricsDimensionsEnum1Code GetAttemptMetricsDimensionsEnum1 = "code" + GetAttemptMetricsDimensionsEnum1Manual GetAttemptMetricsDimensionsEnum1 = "manual" + GetAttemptMetricsDimensionsEnum1AttemptNumber GetAttemptMetricsDimensionsEnum1 = "attempt_number" +) + +func (e GetAttemptMetricsDimensionsEnum1) ToPointer() *GetAttemptMetricsDimensionsEnum1 { + return &e +} +func (e *GetAttemptMetricsDimensionsEnum1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "tenant_id": + fallthrough + case "destination_id": + fallthrough + case "topic": + fallthrough + case "status": + fallthrough + case "code": + fallthrough + case "manual": + fallthrough + case "attempt_number": + *e = GetAttemptMetricsDimensionsEnum1(v) + return nil + default: + return fmt.Errorf("invalid value for GetAttemptMetricsDimensionsEnum1: %v", v) + } +} + +type GetAttemptMetricsDimensionsUnionType string + +const ( + GetAttemptMetricsDimensionsUnionTypeGetAttemptMetricsDimensionsEnum1 GetAttemptMetricsDimensionsUnionType = "getAttemptMetrics_dimensions_enum_1" + GetAttemptMetricsDimensionsUnionTypeArrayOfGetAttemptMetricsDimensionsEnum2 GetAttemptMetricsDimensionsUnionType = "arrayOfGetAttemptMetricsDimensionsEnum2" +) + +// GetAttemptMetricsDimensionsUnion - Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). +type GetAttemptMetricsDimensionsUnion struct { + GetAttemptMetricsDimensionsEnum1 *GetAttemptMetricsDimensionsEnum1 `queryParam:"inline" union:"member"` + ArrayOfGetAttemptMetricsDimensionsEnum2 []GetAttemptMetricsDimensionsEnum2 `queryParam:"inline" union:"member"` + + Type GetAttemptMetricsDimensionsUnionType +} + +func CreateGetAttemptMetricsDimensionsUnionGetAttemptMetricsDimensionsEnum1(getAttemptMetricsDimensionsEnum1 GetAttemptMetricsDimensionsEnum1) GetAttemptMetricsDimensionsUnion { + typ := GetAttemptMetricsDimensionsUnionTypeGetAttemptMetricsDimensionsEnum1 + + return GetAttemptMetricsDimensionsUnion{ + GetAttemptMetricsDimensionsEnum1: &getAttemptMetricsDimensionsEnum1, + Type: typ, + } +} + +func CreateGetAttemptMetricsDimensionsUnionArrayOfGetAttemptMetricsDimensionsEnum2(arrayOfGetAttemptMetricsDimensionsEnum2 []GetAttemptMetricsDimensionsEnum2) GetAttemptMetricsDimensionsUnion { + typ := GetAttemptMetricsDimensionsUnionTypeArrayOfGetAttemptMetricsDimensionsEnum2 + + return GetAttemptMetricsDimensionsUnion{ + ArrayOfGetAttemptMetricsDimensionsEnum2: arrayOfGetAttemptMetricsDimensionsEnum2, + Type: typ, + } +} + +func (u *GetAttemptMetricsDimensionsUnion) UnmarshalJSON(data []byte) error { + + var getAttemptMetricsDimensionsEnum1 GetAttemptMetricsDimensionsEnum1 = GetAttemptMetricsDimensionsEnum1("") + if err := utils.UnmarshalJSON(data, &getAttemptMetricsDimensionsEnum1, "", true, nil); err == nil { + u.GetAttemptMetricsDimensionsEnum1 = &getAttemptMetricsDimensionsEnum1 + u.Type = GetAttemptMetricsDimensionsUnionTypeGetAttemptMetricsDimensionsEnum1 + return nil + } + + var arrayOfGetAttemptMetricsDimensionsEnum2 []GetAttemptMetricsDimensionsEnum2 = []GetAttemptMetricsDimensionsEnum2{} + if err := utils.UnmarshalJSON(data, &arrayOfGetAttemptMetricsDimensionsEnum2, "", true, nil); err == nil { + u.ArrayOfGetAttemptMetricsDimensionsEnum2 = arrayOfGetAttemptMetricsDimensionsEnum2 + u.Type = GetAttemptMetricsDimensionsUnionTypeArrayOfGetAttemptMetricsDimensionsEnum2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetAttemptMetricsDimensionsUnion", string(data)) +} + +func (u GetAttemptMetricsDimensionsUnion) MarshalJSON() ([]byte, error) { + if u.GetAttemptMetricsDimensionsEnum1 != nil { + return utils.MarshalJSON(u.GetAttemptMetricsDimensionsEnum1, "", true) + } + + if u.ArrayOfGetAttemptMetricsDimensionsEnum2 != nil { + return utils.MarshalJSON(u.ArrayOfGetAttemptMetricsDimensionsEnum2, "", true) + } + + return nil, errors.New("could not marshal union type GetAttemptMetricsDimensionsUnion: all fields are null") +} + +type GetAttemptMetricsFiltersDestinationIDType string + +const ( + GetAttemptMetricsFiltersDestinationIDTypeStr GetAttemptMetricsFiltersDestinationIDType = "str" + GetAttemptMetricsFiltersDestinationIDTypeArrayOfStr GetAttemptMetricsFiltersDestinationIDType = "arrayOfStr" +) + +// GetAttemptMetricsFiltersDestinationID - Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). +type GetAttemptMetricsFiltersDestinationID struct { + Str *string `queryParam:"inline" union:"member"` + ArrayOfStr []string `queryParam:"inline" union:"member"` + + Type GetAttemptMetricsFiltersDestinationIDType +} + +func CreateGetAttemptMetricsFiltersDestinationIDStr(str string) GetAttemptMetricsFiltersDestinationID { + typ := GetAttemptMetricsFiltersDestinationIDTypeStr + + return GetAttemptMetricsFiltersDestinationID{ + Str: &str, + Type: typ, + } +} + +func CreateGetAttemptMetricsFiltersDestinationIDArrayOfStr(arrayOfStr []string) GetAttemptMetricsFiltersDestinationID { + typ := GetAttemptMetricsFiltersDestinationIDTypeArrayOfStr + + return GetAttemptMetricsFiltersDestinationID{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func (u *GetAttemptMetricsFiltersDestinationID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil { + u.Str = &str + u.Type = GetAttemptMetricsFiltersDestinationIDTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, nil); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = GetAttemptMetricsFiltersDestinationIDTypeArrayOfStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetAttemptMetricsFiltersDestinationID", string(data)) +} + +func (u GetAttemptMetricsFiltersDestinationID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + return nil, errors.New("could not marshal union type GetAttemptMetricsFiltersDestinationID: all fields are null") +} + +type GetAttemptMetricsFiltersTopicType string + +const ( + GetAttemptMetricsFiltersTopicTypeStr GetAttemptMetricsFiltersTopicType = "str" + GetAttemptMetricsFiltersTopicTypeArrayOfStr GetAttemptMetricsFiltersTopicType = "arrayOfStr" +) + +// GetAttemptMetricsFiltersTopic - Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). +type GetAttemptMetricsFiltersTopic struct { + Str *string `queryParam:"inline" union:"member"` + ArrayOfStr []string `queryParam:"inline" union:"member"` + + Type GetAttemptMetricsFiltersTopicType +} + +func CreateGetAttemptMetricsFiltersTopicStr(str string) GetAttemptMetricsFiltersTopic { + typ := GetAttemptMetricsFiltersTopicTypeStr + + return GetAttemptMetricsFiltersTopic{ + Str: &str, + Type: typ, + } +} + +func CreateGetAttemptMetricsFiltersTopicArrayOfStr(arrayOfStr []string) GetAttemptMetricsFiltersTopic { + typ := GetAttemptMetricsFiltersTopicTypeArrayOfStr + + return GetAttemptMetricsFiltersTopic{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func (u *GetAttemptMetricsFiltersTopic) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil { + u.Str = &str + u.Type = GetAttemptMetricsFiltersTopicTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, nil); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = GetAttemptMetricsFiltersTopicTypeArrayOfStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetAttemptMetricsFiltersTopic", string(data)) +} + +func (u GetAttemptMetricsFiltersTopic) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + return nil, errors.New("could not marshal union type GetAttemptMetricsFiltersTopic: all fields are null") +} + +type FiltersStatusEnum2 string + +const ( + FiltersStatusEnum2Success FiltersStatusEnum2 = "success" + FiltersStatusEnum2Failed FiltersStatusEnum2 = "failed" +) + +func (e FiltersStatusEnum2) ToPointer() *FiltersStatusEnum2 { + return &e +} +func (e *FiltersStatusEnum2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "success": + fallthrough + case "failed": + *e = FiltersStatusEnum2(v) + return nil + default: + return fmt.Errorf("invalid value for FiltersStatusEnum2: %v", v) + } +} + +type FiltersStatusEnum1 string + +const ( + FiltersStatusEnum1Success FiltersStatusEnum1 = "success" + FiltersStatusEnum1Failed FiltersStatusEnum1 = "failed" +) + +func (e FiltersStatusEnum1) ToPointer() *FiltersStatusEnum1 { + return &e +} +func (e *FiltersStatusEnum1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "success": + fallthrough + case "failed": + *e = FiltersStatusEnum1(v) + return nil + default: + return fmt.Errorf("invalid value for FiltersStatusEnum1: %v", v) + } +} + +type FiltersStatusType string + +const ( + FiltersStatusTypeFiltersStatusEnum1 FiltersStatusType = "filters[status]_enum_1" + FiltersStatusTypeArrayOfFiltersStatusEnum2 FiltersStatusType = "arrayOfFilters[status]Enum2" +) + +// FiltersStatus - Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). +type FiltersStatus struct { + FiltersStatusEnum1 *FiltersStatusEnum1 `queryParam:"inline" union:"member"` + ArrayOfFiltersStatusEnum2 []FiltersStatusEnum2 `queryParam:"inline" union:"member"` + + Type FiltersStatusType +} + +func CreateFiltersStatusFiltersStatusEnum1(filtersStatusEnum1 FiltersStatusEnum1) FiltersStatus { + typ := FiltersStatusTypeFiltersStatusEnum1 + + return FiltersStatus{ + FiltersStatusEnum1: &filtersStatusEnum1, + Type: typ, + } +} + +func CreateFiltersStatusArrayOfFiltersStatusEnum2(arrayOfFiltersStatusEnum2 []FiltersStatusEnum2) FiltersStatus { + typ := FiltersStatusTypeArrayOfFiltersStatusEnum2 + + return FiltersStatus{ + ArrayOfFiltersStatusEnum2: arrayOfFiltersStatusEnum2, + Type: typ, + } +} + +func (u *FiltersStatus) UnmarshalJSON(data []byte) error { + + var filtersStatusEnum1 FiltersStatusEnum1 = FiltersStatusEnum1("") + if err := utils.UnmarshalJSON(data, &filtersStatusEnum1, "", true, nil); err == nil { + u.FiltersStatusEnum1 = &filtersStatusEnum1 + u.Type = FiltersStatusTypeFiltersStatusEnum1 + return nil + } + + var arrayOfFiltersStatusEnum2 []FiltersStatusEnum2 = []FiltersStatusEnum2{} + if err := utils.UnmarshalJSON(data, &arrayOfFiltersStatusEnum2, "", true, nil); err == nil { + u.ArrayOfFiltersStatusEnum2 = arrayOfFiltersStatusEnum2 + u.Type = FiltersStatusTypeArrayOfFiltersStatusEnum2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FiltersStatus", string(data)) +} + +func (u FiltersStatus) MarshalJSON() ([]byte, error) { + if u.FiltersStatusEnum1 != nil { + return utils.MarshalJSON(u.FiltersStatusEnum1, "", true) + } + + if u.ArrayOfFiltersStatusEnum2 != nil { + return utils.MarshalJSON(u.ArrayOfFiltersStatusEnum2, "", true) + } + + return nil, errors.New("could not marshal union type FiltersStatus: all fields are null") +} + +type FiltersCodeType string + +const ( + FiltersCodeTypeStr FiltersCodeType = "str" + FiltersCodeTypeArrayOfStr FiltersCodeType = "arrayOfStr" +) + +// FiltersCode - Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). +type FiltersCode struct { + Str *string `queryParam:"inline" union:"member"` + ArrayOfStr []string `queryParam:"inline" union:"member"` + + Type FiltersCodeType +} + +func CreateFiltersCodeStr(str string) FiltersCode { + typ := FiltersCodeTypeStr + + return FiltersCode{ + Str: &str, + Type: typ, + } +} + +func CreateFiltersCodeArrayOfStr(arrayOfStr []string) FiltersCode { + typ := FiltersCodeTypeArrayOfStr + + return FiltersCode{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func (u *FiltersCode) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil { + u.Str = &str + u.Type = FiltersCodeTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, nil); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = FiltersCodeTypeArrayOfStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FiltersCode", string(data)) +} + +func (u FiltersCode) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + return nil, errors.New("could not marshal union type FiltersCode: all fields are null") +} + +// FiltersManual - Filter by manual retry flag. +type FiltersManual string + +const ( + FiltersManualTrue FiltersManual = "true" + FiltersManualFalse FiltersManual = "false" +) + +func (e FiltersManual) ToPointer() *FiltersManual { + return &e +} +func (e *FiltersManual) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "true": + fallthrough + case "false": + *e = FiltersManual(v) + return nil + default: + return fmt.Errorf("invalid value for FiltersManual: %v", v) + } +} + +type FiltersAttemptNumberType string + +const ( + FiltersAttemptNumberTypeStr FiltersAttemptNumberType = "str" + FiltersAttemptNumberTypeArrayOfStr FiltersAttemptNumberType = "arrayOfStr" +) + +// FiltersAttemptNumber - Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). +type FiltersAttemptNumber struct { + Str *string `queryParam:"inline" union:"member"` + ArrayOfStr []string `queryParam:"inline" union:"member"` + + Type FiltersAttemptNumberType +} + +func CreateFiltersAttemptNumberStr(str string) FiltersAttemptNumber { + typ := FiltersAttemptNumberTypeStr + + return FiltersAttemptNumber{ + Str: &str, + Type: typ, + } +} + +func CreateFiltersAttemptNumberArrayOfStr(arrayOfStr []string) FiltersAttemptNumber { + typ := FiltersAttemptNumberTypeArrayOfStr + + return FiltersAttemptNumber{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func (u *FiltersAttemptNumber) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil { + u.Str = &str + u.Type = FiltersAttemptNumberTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, nil); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = FiltersAttemptNumberTypeArrayOfStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for FiltersAttemptNumber", string(data)) +} + +func (u FiltersAttemptNumber) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + return nil, errors.New("could not marshal union type FiltersAttemptNumber: all fields are null") +} + +type GetAttemptMetricsFiltersTenantIDType string + +const ( + GetAttemptMetricsFiltersTenantIDTypeStr GetAttemptMetricsFiltersTenantIDType = "str" + GetAttemptMetricsFiltersTenantIDTypeArrayOfStr GetAttemptMetricsFiltersTenantIDType = "arrayOfStr" +) + +// GetAttemptMetricsFiltersTenantID - Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). +type GetAttemptMetricsFiltersTenantID struct { + Str *string `queryParam:"inline" union:"member"` + ArrayOfStr []string `queryParam:"inline" union:"member"` + + Type GetAttemptMetricsFiltersTenantIDType +} + +func CreateGetAttemptMetricsFiltersTenantIDStr(str string) GetAttemptMetricsFiltersTenantID { + typ := GetAttemptMetricsFiltersTenantIDTypeStr + + return GetAttemptMetricsFiltersTenantID{ + Str: &str, + Type: typ, + } +} + +func CreateGetAttemptMetricsFiltersTenantIDArrayOfStr(arrayOfStr []string) GetAttemptMetricsFiltersTenantID { + typ := GetAttemptMetricsFiltersTenantIDTypeArrayOfStr + + return GetAttemptMetricsFiltersTenantID{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func (u *GetAttemptMetricsFiltersTenantID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil { + u.Str = &str + u.Type = GetAttemptMetricsFiltersTenantIDTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, nil); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = GetAttemptMetricsFiltersTenantIDTypeArrayOfStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetAttemptMetricsFiltersTenantID", string(data)) +} + +func (u GetAttemptMetricsFiltersTenantID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + return nil, errors.New("could not marshal union type GetAttemptMetricsFiltersTenantID: all fields are null") +} + +type GetAttemptMetricsRequest struct { + // Start of the time range (inclusive). ISO 8601 timestamp. + TimeStart time.Time `queryParam:"style=form,explode=true,name=time[start]"` + // End of the time range (exclusive). ISO 8601 timestamp. + TimeEnd time.Time `queryParam:"style=form,explode=true,name=time[end]"` + // Time bucketing granularity. Pattern: ``. + // Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12). + // When omitted, returns a single aggregate row per dimension combination. + // + Granularity *string `queryParam:"style=form,explode=true,name=granularity"` + // Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). + Measures GetAttemptMetricsMeasuresUnion `queryParam:"style=form,explode=true,name=measures"` + // Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). + Dimensions *GetAttemptMetricsDimensionsUnion `queryParam:"style=form,explode=true,name=dimensions"` + // Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + FiltersDestinationID *GetAttemptMetricsFiltersDestinationID `queryParam:"style=form,explode=true,name=filters[destination_id]"` + // Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + FiltersTopic *GetAttemptMetricsFiltersTopic `queryParam:"style=form,explode=true,name=filters[topic]"` + // Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). + FiltersStatus *FiltersStatus `queryParam:"style=form,explode=true,name=filters[status]"` + // Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). + FiltersCode *FiltersCode `queryParam:"style=form,explode=true,name=filters[code]"` + // Filter by manual retry flag. + FiltersManual *FiltersManual `queryParam:"style=form,explode=true,name=filters[manual]"` + // Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). + FiltersAttemptNumber *FiltersAttemptNumber `queryParam:"style=form,explode=true,name=filters[attempt_number]"` + // Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + FiltersTenantID *GetAttemptMetricsFiltersTenantID `queryParam:"style=form,explode=true,name=filters[tenant_id]"` +} + +func (g GetAttemptMetricsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetAttemptMetricsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, nil); err != nil { + return err + } + return nil +} + +func (g *GetAttemptMetricsRequest) GetTimeStart() time.Time { + if g == nil { + return time.Time{} + } + return g.TimeStart +} + +func (g *GetAttemptMetricsRequest) GetTimeEnd() time.Time { + if g == nil { + return time.Time{} + } + return g.TimeEnd +} + +func (g *GetAttemptMetricsRequest) GetGranularity() *string { + if g == nil { + return nil + } + return g.Granularity +} + +func (g *GetAttemptMetricsRequest) GetMeasures() GetAttemptMetricsMeasuresUnion { + if g == nil { + return GetAttemptMetricsMeasuresUnion{} + } + return g.Measures +} + +func (g *GetAttemptMetricsRequest) GetDimensions() *GetAttemptMetricsDimensionsUnion { + if g == nil { + return nil + } + return g.Dimensions +} + +func (g *GetAttemptMetricsRequest) GetFiltersDestinationID() *GetAttemptMetricsFiltersDestinationID { + if g == nil { + return nil + } + return g.FiltersDestinationID +} + +func (g *GetAttemptMetricsRequest) GetFiltersTopic() *GetAttemptMetricsFiltersTopic { + if g == nil { + return nil + } + return g.FiltersTopic +} + +func (g *GetAttemptMetricsRequest) GetFiltersStatus() *FiltersStatus { + if g == nil { + return nil + } + return g.FiltersStatus +} + +func (g *GetAttemptMetricsRequest) GetFiltersCode() *FiltersCode { + if g == nil { + return nil + } + return g.FiltersCode +} + +func (g *GetAttemptMetricsRequest) GetFiltersManual() *FiltersManual { + if g == nil { + return nil + } + return g.FiltersManual +} + +func (g *GetAttemptMetricsRequest) GetFiltersAttemptNumber() *FiltersAttemptNumber { + if g == nil { + return nil + } + return g.FiltersAttemptNumber +} + +func (g *GetAttemptMetricsRequest) GetFiltersTenantID() *GetAttemptMetricsFiltersTenantID { + if g == nil { + return nil + } + return g.FiltersTenantID +} + +type GetAttemptMetricsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Aggregated attempt metrics. + MetricsResponse *components.MetricsResponse +} + +func (g *GetAttemptMetricsResponse) GetHTTPMeta() components.HTTPMetadata { + if g == nil { + return components.HTTPMetadata{} + } + return g.HTTPMeta +} + +func (g *GetAttemptMetricsResponse) GetMetricsResponse() *components.MetricsResponse { + if g == nil { + return nil + } + return g.MetricsResponse +} diff --git a/sdks/outpost-go/models/operations/geteventmetrics.go b/sdks/outpost-go/models/operations/geteventmetrics.go new file mode 100644 index 000000000..87fab145f --- /dev/null +++ b/sdks/outpost-go/models/operations/geteventmetrics.go @@ -0,0 +1,551 @@ +// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + +package operations + +import ( + "encoding/json" + "errors" + "fmt" + "github.com/hookdeck/outpost/sdks/outpost-go/internal/utils" + "github.com/hookdeck/outpost/sdks/outpost-go/models/components" + "time" +) + +type GetEventMetricsMeasuresEnum2 string + +const ( + GetEventMetricsMeasuresEnum2Count GetEventMetricsMeasuresEnum2 = "count" + GetEventMetricsMeasuresEnum2Rate GetEventMetricsMeasuresEnum2 = "rate" +) + +func (e GetEventMetricsMeasuresEnum2) ToPointer() *GetEventMetricsMeasuresEnum2 { + return &e +} +func (e *GetEventMetricsMeasuresEnum2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "count": + fallthrough + case "rate": + *e = GetEventMetricsMeasuresEnum2(v) + return nil + default: + return fmt.Errorf("invalid value for GetEventMetricsMeasuresEnum2: %v", v) + } +} + +type GetEventMetricsMeasuresEnum1 string + +const ( + GetEventMetricsMeasuresEnum1Count GetEventMetricsMeasuresEnum1 = "count" + GetEventMetricsMeasuresEnum1Rate GetEventMetricsMeasuresEnum1 = "rate" +) + +func (e GetEventMetricsMeasuresEnum1) ToPointer() *GetEventMetricsMeasuresEnum1 { + return &e +} +func (e *GetEventMetricsMeasuresEnum1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "count": + fallthrough + case "rate": + *e = GetEventMetricsMeasuresEnum1(v) + return nil + default: + return fmt.Errorf("invalid value for GetEventMetricsMeasuresEnum1: %v", v) + } +} + +type GetEventMetricsMeasuresUnionType string + +const ( + GetEventMetricsMeasuresUnionTypeGetEventMetricsMeasuresEnum1 GetEventMetricsMeasuresUnionType = "getEventMetrics_measures_enum_1" + GetEventMetricsMeasuresUnionTypeArrayOfGetEventMetricsMeasuresEnum2 GetEventMetricsMeasuresUnionType = "arrayOfGetEventMetricsMeasuresEnum2" +) + +// GetEventMetricsMeasuresUnion - Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). +type GetEventMetricsMeasuresUnion struct { + GetEventMetricsMeasuresEnum1 *GetEventMetricsMeasuresEnum1 `queryParam:"inline" union:"member"` + ArrayOfGetEventMetricsMeasuresEnum2 []GetEventMetricsMeasuresEnum2 `queryParam:"inline" union:"member"` + + Type GetEventMetricsMeasuresUnionType +} + +func CreateGetEventMetricsMeasuresUnionGetEventMetricsMeasuresEnum1(getEventMetricsMeasuresEnum1 GetEventMetricsMeasuresEnum1) GetEventMetricsMeasuresUnion { + typ := GetEventMetricsMeasuresUnionTypeGetEventMetricsMeasuresEnum1 + + return GetEventMetricsMeasuresUnion{ + GetEventMetricsMeasuresEnum1: &getEventMetricsMeasuresEnum1, + Type: typ, + } +} + +func CreateGetEventMetricsMeasuresUnionArrayOfGetEventMetricsMeasuresEnum2(arrayOfGetEventMetricsMeasuresEnum2 []GetEventMetricsMeasuresEnum2) GetEventMetricsMeasuresUnion { + typ := GetEventMetricsMeasuresUnionTypeArrayOfGetEventMetricsMeasuresEnum2 + + return GetEventMetricsMeasuresUnion{ + ArrayOfGetEventMetricsMeasuresEnum2: arrayOfGetEventMetricsMeasuresEnum2, + Type: typ, + } +} + +func (u *GetEventMetricsMeasuresUnion) UnmarshalJSON(data []byte) error { + + var getEventMetricsMeasuresEnum1 GetEventMetricsMeasuresEnum1 = GetEventMetricsMeasuresEnum1("") + if err := utils.UnmarshalJSON(data, &getEventMetricsMeasuresEnum1, "", true, nil); err == nil { + u.GetEventMetricsMeasuresEnum1 = &getEventMetricsMeasuresEnum1 + u.Type = GetEventMetricsMeasuresUnionTypeGetEventMetricsMeasuresEnum1 + return nil + } + + var arrayOfGetEventMetricsMeasuresEnum2 []GetEventMetricsMeasuresEnum2 = []GetEventMetricsMeasuresEnum2{} + if err := utils.UnmarshalJSON(data, &arrayOfGetEventMetricsMeasuresEnum2, "", true, nil); err == nil { + u.ArrayOfGetEventMetricsMeasuresEnum2 = arrayOfGetEventMetricsMeasuresEnum2 + u.Type = GetEventMetricsMeasuresUnionTypeArrayOfGetEventMetricsMeasuresEnum2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetEventMetricsMeasuresUnion", string(data)) +} + +func (u GetEventMetricsMeasuresUnion) MarshalJSON() ([]byte, error) { + if u.GetEventMetricsMeasuresEnum1 != nil { + return utils.MarshalJSON(u.GetEventMetricsMeasuresEnum1, "", true) + } + + if u.ArrayOfGetEventMetricsMeasuresEnum2 != nil { + return utils.MarshalJSON(u.ArrayOfGetEventMetricsMeasuresEnum2, "", true) + } + + return nil, errors.New("could not marshal union type GetEventMetricsMeasuresUnion: all fields are null") +} + +type GetEventMetricsDimensionsEnum2 string + +const ( + GetEventMetricsDimensionsEnum2TenantID GetEventMetricsDimensionsEnum2 = "tenant_id" + GetEventMetricsDimensionsEnum2Topic GetEventMetricsDimensionsEnum2 = "topic" + GetEventMetricsDimensionsEnum2DestinationID GetEventMetricsDimensionsEnum2 = "destination_id" +) + +func (e GetEventMetricsDimensionsEnum2) ToPointer() *GetEventMetricsDimensionsEnum2 { + return &e +} +func (e *GetEventMetricsDimensionsEnum2) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "tenant_id": + fallthrough + case "topic": + fallthrough + case "destination_id": + *e = GetEventMetricsDimensionsEnum2(v) + return nil + default: + return fmt.Errorf("invalid value for GetEventMetricsDimensionsEnum2: %v", v) + } +} + +type GetEventMetricsDimensionsEnum1 string + +const ( + GetEventMetricsDimensionsEnum1TenantID GetEventMetricsDimensionsEnum1 = "tenant_id" + GetEventMetricsDimensionsEnum1Topic GetEventMetricsDimensionsEnum1 = "topic" + GetEventMetricsDimensionsEnum1DestinationID GetEventMetricsDimensionsEnum1 = "destination_id" +) + +func (e GetEventMetricsDimensionsEnum1) ToPointer() *GetEventMetricsDimensionsEnum1 { + return &e +} +func (e *GetEventMetricsDimensionsEnum1) UnmarshalJSON(data []byte) error { + var v string + if err := json.Unmarshal(data, &v); err != nil { + return err + } + switch v { + case "tenant_id": + fallthrough + case "topic": + fallthrough + case "destination_id": + *e = GetEventMetricsDimensionsEnum1(v) + return nil + default: + return fmt.Errorf("invalid value for GetEventMetricsDimensionsEnum1: %v", v) + } +} + +type GetEventMetricsDimensionsUnionType string + +const ( + GetEventMetricsDimensionsUnionTypeGetEventMetricsDimensionsEnum1 GetEventMetricsDimensionsUnionType = "getEventMetrics_dimensions_enum_1" + GetEventMetricsDimensionsUnionTypeArrayOfGetEventMetricsDimensionsEnum2 GetEventMetricsDimensionsUnionType = "arrayOfGetEventMetricsDimensionsEnum2" +) + +// GetEventMetricsDimensionsUnion - Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). +type GetEventMetricsDimensionsUnion struct { + GetEventMetricsDimensionsEnum1 *GetEventMetricsDimensionsEnum1 `queryParam:"inline" union:"member"` + ArrayOfGetEventMetricsDimensionsEnum2 []GetEventMetricsDimensionsEnum2 `queryParam:"inline" union:"member"` + + Type GetEventMetricsDimensionsUnionType +} + +func CreateGetEventMetricsDimensionsUnionGetEventMetricsDimensionsEnum1(getEventMetricsDimensionsEnum1 GetEventMetricsDimensionsEnum1) GetEventMetricsDimensionsUnion { + typ := GetEventMetricsDimensionsUnionTypeGetEventMetricsDimensionsEnum1 + + return GetEventMetricsDimensionsUnion{ + GetEventMetricsDimensionsEnum1: &getEventMetricsDimensionsEnum1, + Type: typ, + } +} + +func CreateGetEventMetricsDimensionsUnionArrayOfGetEventMetricsDimensionsEnum2(arrayOfGetEventMetricsDimensionsEnum2 []GetEventMetricsDimensionsEnum2) GetEventMetricsDimensionsUnion { + typ := GetEventMetricsDimensionsUnionTypeArrayOfGetEventMetricsDimensionsEnum2 + + return GetEventMetricsDimensionsUnion{ + ArrayOfGetEventMetricsDimensionsEnum2: arrayOfGetEventMetricsDimensionsEnum2, + Type: typ, + } +} + +func (u *GetEventMetricsDimensionsUnion) UnmarshalJSON(data []byte) error { + + var getEventMetricsDimensionsEnum1 GetEventMetricsDimensionsEnum1 = GetEventMetricsDimensionsEnum1("") + if err := utils.UnmarshalJSON(data, &getEventMetricsDimensionsEnum1, "", true, nil); err == nil { + u.GetEventMetricsDimensionsEnum1 = &getEventMetricsDimensionsEnum1 + u.Type = GetEventMetricsDimensionsUnionTypeGetEventMetricsDimensionsEnum1 + return nil + } + + var arrayOfGetEventMetricsDimensionsEnum2 []GetEventMetricsDimensionsEnum2 = []GetEventMetricsDimensionsEnum2{} + if err := utils.UnmarshalJSON(data, &arrayOfGetEventMetricsDimensionsEnum2, "", true, nil); err == nil { + u.ArrayOfGetEventMetricsDimensionsEnum2 = arrayOfGetEventMetricsDimensionsEnum2 + u.Type = GetEventMetricsDimensionsUnionTypeArrayOfGetEventMetricsDimensionsEnum2 + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetEventMetricsDimensionsUnion", string(data)) +} + +func (u GetEventMetricsDimensionsUnion) MarshalJSON() ([]byte, error) { + if u.GetEventMetricsDimensionsEnum1 != nil { + return utils.MarshalJSON(u.GetEventMetricsDimensionsEnum1, "", true) + } + + if u.ArrayOfGetEventMetricsDimensionsEnum2 != nil { + return utils.MarshalJSON(u.ArrayOfGetEventMetricsDimensionsEnum2, "", true) + } + + return nil, errors.New("could not marshal union type GetEventMetricsDimensionsUnion: all fields are null") +} + +type GetEventMetricsFiltersTopicType string + +const ( + GetEventMetricsFiltersTopicTypeStr GetEventMetricsFiltersTopicType = "str" + GetEventMetricsFiltersTopicTypeArrayOfStr GetEventMetricsFiltersTopicType = "arrayOfStr" +) + +// GetEventMetricsFiltersTopic - Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). +type GetEventMetricsFiltersTopic struct { + Str *string `queryParam:"inline" union:"member"` + ArrayOfStr []string `queryParam:"inline" union:"member"` + + Type GetEventMetricsFiltersTopicType +} + +func CreateGetEventMetricsFiltersTopicStr(str string) GetEventMetricsFiltersTopic { + typ := GetEventMetricsFiltersTopicTypeStr + + return GetEventMetricsFiltersTopic{ + Str: &str, + Type: typ, + } +} + +func CreateGetEventMetricsFiltersTopicArrayOfStr(arrayOfStr []string) GetEventMetricsFiltersTopic { + typ := GetEventMetricsFiltersTopicTypeArrayOfStr + + return GetEventMetricsFiltersTopic{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func (u *GetEventMetricsFiltersTopic) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil { + u.Str = &str + u.Type = GetEventMetricsFiltersTopicTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, nil); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = GetEventMetricsFiltersTopicTypeArrayOfStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetEventMetricsFiltersTopic", string(data)) +} + +func (u GetEventMetricsFiltersTopic) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + return nil, errors.New("could not marshal union type GetEventMetricsFiltersTopic: all fields are null") +} + +type GetEventMetricsFiltersDestinationIDType string + +const ( + GetEventMetricsFiltersDestinationIDTypeStr GetEventMetricsFiltersDestinationIDType = "str" + GetEventMetricsFiltersDestinationIDTypeArrayOfStr GetEventMetricsFiltersDestinationIDType = "arrayOfStr" +) + +// GetEventMetricsFiltersDestinationID - Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). +type GetEventMetricsFiltersDestinationID struct { + Str *string `queryParam:"inline" union:"member"` + ArrayOfStr []string `queryParam:"inline" union:"member"` + + Type GetEventMetricsFiltersDestinationIDType +} + +func CreateGetEventMetricsFiltersDestinationIDStr(str string) GetEventMetricsFiltersDestinationID { + typ := GetEventMetricsFiltersDestinationIDTypeStr + + return GetEventMetricsFiltersDestinationID{ + Str: &str, + Type: typ, + } +} + +func CreateGetEventMetricsFiltersDestinationIDArrayOfStr(arrayOfStr []string) GetEventMetricsFiltersDestinationID { + typ := GetEventMetricsFiltersDestinationIDTypeArrayOfStr + + return GetEventMetricsFiltersDestinationID{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func (u *GetEventMetricsFiltersDestinationID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil { + u.Str = &str + u.Type = GetEventMetricsFiltersDestinationIDTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, nil); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = GetEventMetricsFiltersDestinationIDTypeArrayOfStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetEventMetricsFiltersDestinationID", string(data)) +} + +func (u GetEventMetricsFiltersDestinationID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + return nil, errors.New("could not marshal union type GetEventMetricsFiltersDestinationID: all fields are null") +} + +type GetEventMetricsFiltersTenantIDType string + +const ( + GetEventMetricsFiltersTenantIDTypeStr GetEventMetricsFiltersTenantIDType = "str" + GetEventMetricsFiltersTenantIDTypeArrayOfStr GetEventMetricsFiltersTenantIDType = "arrayOfStr" +) + +// GetEventMetricsFiltersTenantID - Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). +type GetEventMetricsFiltersTenantID struct { + Str *string `queryParam:"inline" union:"member"` + ArrayOfStr []string `queryParam:"inline" union:"member"` + + Type GetEventMetricsFiltersTenantIDType +} + +func CreateGetEventMetricsFiltersTenantIDStr(str string) GetEventMetricsFiltersTenantID { + typ := GetEventMetricsFiltersTenantIDTypeStr + + return GetEventMetricsFiltersTenantID{ + Str: &str, + Type: typ, + } +} + +func CreateGetEventMetricsFiltersTenantIDArrayOfStr(arrayOfStr []string) GetEventMetricsFiltersTenantID { + typ := GetEventMetricsFiltersTenantIDTypeArrayOfStr + + return GetEventMetricsFiltersTenantID{ + ArrayOfStr: arrayOfStr, + Type: typ, + } +} + +func (u *GetEventMetricsFiltersTenantID) UnmarshalJSON(data []byte) error { + + var str string = "" + if err := utils.UnmarshalJSON(data, &str, "", true, nil); err == nil { + u.Str = &str + u.Type = GetEventMetricsFiltersTenantIDTypeStr + return nil + } + + var arrayOfStr []string = []string{} + if err := utils.UnmarshalJSON(data, &arrayOfStr, "", true, nil); err == nil { + u.ArrayOfStr = arrayOfStr + u.Type = GetEventMetricsFiltersTenantIDTypeArrayOfStr + return nil + } + + return fmt.Errorf("could not unmarshal `%s` into any supported union types for GetEventMetricsFiltersTenantID", string(data)) +} + +func (u GetEventMetricsFiltersTenantID) MarshalJSON() ([]byte, error) { + if u.Str != nil { + return utils.MarshalJSON(u.Str, "", true) + } + + if u.ArrayOfStr != nil { + return utils.MarshalJSON(u.ArrayOfStr, "", true) + } + + return nil, errors.New("could not marshal union type GetEventMetricsFiltersTenantID: all fields are null") +} + +type GetEventMetricsRequest struct { + // Start of the time range (inclusive). ISO 8601 timestamp. + TimeStart time.Time `queryParam:"style=form,explode=true,name=time[start]"` + // End of the time range (exclusive). ISO 8601 timestamp. + TimeEnd time.Time `queryParam:"style=form,explode=true,name=time[end]"` + // Time bucketing granularity. Pattern: ``. + // Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12). + // When omitted, returns a single aggregate row per dimension combination. + // + Granularity *string `queryParam:"style=form,explode=true,name=granularity"` + // Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). + Measures GetEventMetricsMeasuresUnion `queryParam:"style=form,explode=true,name=measures"` + // Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). + Dimensions *GetEventMetricsDimensionsUnion `queryParam:"style=form,explode=true,name=dimensions"` + // Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + FiltersTopic *GetEventMetricsFiltersTopic `queryParam:"style=form,explode=true,name=filters[topic]"` + // Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + FiltersDestinationID *GetEventMetricsFiltersDestinationID `queryParam:"style=form,explode=true,name=filters[destination_id]"` + // Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + FiltersTenantID *GetEventMetricsFiltersTenantID `queryParam:"style=form,explode=true,name=filters[tenant_id]"` +} + +func (g GetEventMetricsRequest) MarshalJSON() ([]byte, error) { + return utils.MarshalJSON(g, "", false) +} + +func (g *GetEventMetricsRequest) UnmarshalJSON(data []byte) error { + if err := utils.UnmarshalJSON(data, &g, "", false, nil); err != nil { + return err + } + return nil +} + +func (g *GetEventMetricsRequest) GetTimeStart() time.Time { + if g == nil { + return time.Time{} + } + return g.TimeStart +} + +func (g *GetEventMetricsRequest) GetTimeEnd() time.Time { + if g == nil { + return time.Time{} + } + return g.TimeEnd +} + +func (g *GetEventMetricsRequest) GetGranularity() *string { + if g == nil { + return nil + } + return g.Granularity +} + +func (g *GetEventMetricsRequest) GetMeasures() GetEventMetricsMeasuresUnion { + if g == nil { + return GetEventMetricsMeasuresUnion{} + } + return g.Measures +} + +func (g *GetEventMetricsRequest) GetDimensions() *GetEventMetricsDimensionsUnion { + if g == nil { + return nil + } + return g.Dimensions +} + +func (g *GetEventMetricsRequest) GetFiltersTopic() *GetEventMetricsFiltersTopic { + if g == nil { + return nil + } + return g.FiltersTopic +} + +func (g *GetEventMetricsRequest) GetFiltersDestinationID() *GetEventMetricsFiltersDestinationID { + if g == nil { + return nil + } + return g.FiltersDestinationID +} + +func (g *GetEventMetricsRequest) GetFiltersTenantID() *GetEventMetricsFiltersTenantID { + if g == nil { + return nil + } + return g.FiltersTenantID +} + +type GetEventMetricsResponse struct { + HTTPMeta components.HTTPMetadata `json:"-"` + // Aggregated event metrics. + MetricsResponse *components.MetricsResponse +} + +func (g *GetEventMetricsResponse) GetHTTPMeta() components.HTTPMetadata { + if g == nil { + return components.HTTPMetadata{} + } + return g.HTTPMeta +} + +func (g *GetEventMetricsResponse) GetMetricsResponse() *components.MetricsResponse { + if g == nil { + return nil + } + return g.MetricsResponse +} diff --git a/sdks/outpost-go/models/operations/gettenantdestinationattempt.go b/sdks/outpost-go/models/operations/gettenantdestinationattempt.go index 5a8f9a6f8..1a2d2e171 100644 --- a/sdks/outpost-go/models/operations/gettenantdestinationattempt.go +++ b/sdks/outpost-go/models/operations/gettenantdestinationattempt.go @@ -17,6 +17,7 @@ type GetTenantDestinationAttemptRequest struct { // - `event`: Include event summary // - `event.data`: Include full event with payload data // - `response_data`: Include response body and headers + // - `destination`: Include the full destination object // Include []string `queryParam:"style=form,explode=true,name=include"` } diff --git a/sdks/outpost-go/models/operations/listattempts.go b/sdks/outpost-go/models/operations/listattempts.go index aa71fe196..9b77f5298 100644 --- a/sdks/outpost-go/models/operations/listattempts.go +++ b/sdks/outpost-go/models/operations/listattempts.go @@ -120,6 +120,7 @@ type ListAttemptsRequest struct { // - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) // - `event.data`: Include full event with payload data // - `response_data`: Include response body and headers + // - `destination`: Include the full destination object // Include []string `queryParam:"style=form,explode=true,name=include"` // Field to sort by. diff --git a/sdks/outpost-go/models/operations/listtenantdestinationattempts.go b/sdks/outpost-go/models/operations/listtenantdestinationattempts.go index 883ad4769..b0c530555 100644 --- a/sdks/outpost-go/models/operations/listtenantdestinationattempts.go +++ b/sdks/outpost-go/models/operations/listtenantdestinationattempts.go @@ -117,6 +117,7 @@ type ListTenantDestinationAttemptsRequest struct { // - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) // - `event.data`: Include full event with payload data // - `response_data`: Include response body and headers + // - `destination`: Include the full destination object // Include []string `queryParam:"style=form,explode=true,name=include"` // Field to sort by. diff --git a/sdks/outpost-go/outpost.go b/sdks/outpost-go/outpost.go index ece5f32e5..ba6c4ec49 100644 --- a/sdks/outpost-go/outpost.go +++ b/sdks/outpost-go/outpost.go @@ -2,7 +2,7 @@ package outpostgo -// Generated from OpenAPI doc version 0.0.1 and generator version 2.865.2 +// Generated from OpenAPI doc version 0.0.1 and generator version 2.869.10 import ( "context" @@ -77,6 +77,7 @@ type Outpost struct { // - `include=event`: Include event summary (id, topic, time, eligible_for_retry, metadata) // - `include=event.data`: Include full event with payload data // - `include=response_data`: Include response body and headers from the attempt + // - `include=destination`: Include the full destination object with target information // Attempts *Attempts // Destinations are the endpoints where events are sent. Each destination is associated with a tenant and can be configured to receive specific event topics. @@ -110,6 +111,9 @@ type Outpost struct { Schemas *Schemas // Operations for retrieving available event topics. Topics *Topics + // Aggregated metrics for events and delivery attempts. Supports time bucketing, dimensional grouping, and filtering. + // + Metrics *Metrics sdkConfiguration config.SDKConfiguration hooks *hooks.Hooks @@ -186,9 +190,9 @@ func WithTimeout(timeout time.Duration) SDKOption { // New creates a new instance of the SDK with the provided options func New(opts ...SDKOption) *Outpost { sdk := &Outpost{ - SDKVersion: "0.8.1", + SDKVersion: "0.8.2", sdkConfiguration: config.SDKConfiguration{ - UserAgent: "speakeasy-sdk/go 0.8.1 2.865.2 0.0.1 github.com/hookdeck/outpost/sdks/outpost-go", + UserAgent: "speakeasy-sdk/go 0.8.2 2.869.10 0.0.1 github.com/hookdeck/outpost/sdks/outpost-go", ServerList: ServerList, }, hooks: hooks.New(), @@ -217,6 +221,7 @@ func New(opts ...SDKOption) *Outpost { sdk.Publish = newPublish(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Schemas = newSchemas(sdk, sdk.sdkConfiguration, sdk.hooks) sdk.Topics = newTopics(sdk, sdk.sdkConfiguration, sdk.hooks) + sdk.Metrics = newMetrics(sdk, sdk.sdkConfiguration, sdk.hooks) return sdk } diff --git a/sdks/outpost-python/.speakeasy/gen.lock b/sdks/outpost-python/.speakeasy/gen.lock index 95c797ad6..b7e9ec0c9 100644 --- a/sdks/outpost-python/.speakeasy/gen.lock +++ b/sdks/outpost-python/.speakeasy/gen.lock @@ -1,26 +1,26 @@ lockVersion: 2.0.0 id: da774284-22d9-4b6c-bb26-1c3fc9f2c7ee management: - docChecksum: 4b1fca0908ac380a40851cdc7bf4b49d + docChecksum: 699b79694ffc953a802037528cb929ae docVersion: 0.0.1 - speakeasyVersion: 1.755.0 - generationVersion: 2.865.2 - releaseVersion: 0.8.1 - configChecksum: 41a3437dab240e4ae9be979bcfa634cd + speakeasyVersion: 1.759.1 + generationVersion: 2.869.10 + releaseVersion: 0.8.2 + configChecksum: a4ac367a595981c5ea8d094cafd8fad1 repoURL: https://github.com/hookdeck/outpost.git repoSubDirectory: sdks/outpost-python installationURL: https://github.com/hookdeck/outpost.git#subdirectory=sdks/outpost-python published: true persistentEdits: - generation_id: d5da4cbd-9b63-4cef-b698-6197e64b1f1b - pristine_commit_hash: 6e231d60bfb31d6fb32c9cb8571fb3c580008c5d - pristine_tree_hash: f60c8b0f03eba406a913637533002072fcb86a91 + generation_id: 72effc0e-1ba0-4843-9305-07cfe1b09400 + pristine_commit_hash: 559ad45d75ce3f841f01a4279df7d48ea8cd9eaf + pristine_tree_hash: 3e7988586372a828083c8612b501dd7f50803345 features: python: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 constsAndDefaults: 1.0.7 - core: 6.0.18 + core: 6.0.20 defaultEnabledRetries: 0.2.0 enumUnions: 0.1.1 envVarSecurityUsage: 0.3.2 @@ -31,7 +31,7 @@ features: globalServerURLs: 3.2.1 nameOverrides: 3.0.3 nullables: 1.0.2 - pagination: 3.0.7 + pagination: 3.0.8 responseFormat: 1.1.0 retries: 3.0.4 sdkHooks: 1.2.1 @@ -87,8 +87,8 @@ trackedFiles: pristine_git_object: 09ac1d2ca6456ccec1ff23f1fdc849faee367687 docs/models/attempt.md: id: f7e36b022ef5 - last_write_checksum: sha1:07d4d388d45d433832034efad2cc49943b0a4c3b - pristine_git_object: d0e1c896a81db22e0211ff4541b172e77649463b + last_write_checksum: sha1:81c03976613ecbc8a97e5f0e9883d9e4be829c06 + pristine_git_object: 4b5deb47e43e9fe89d5ab3d9a2b549ff5c0462eb docs/models/attemptpaginatedresult.md: id: fc54f8012629 last_write_checksum: sha1:7357bd610224732ea903c32e4ec1ef05dae101a4 @@ -361,6 +361,30 @@ trackedFiles: id: c0e98633f2f2 last_write_checksum: sha1:a83c623c7b182be49e7db9cc026f98c7aca3e974 pristine_git_object: a060fdb7c645303e3f39f35dcc9a798668d67071 + docs/models/filtersattemptnumber.md: + id: 7093f183b527 + last_write_checksum: sha1:3740c85b5e67f188602425dc5fac0418a4b2eccf + pristine_git_object: b653070688142146c1619e80001fe5d64523c2bd + docs/models/filterscode.md: + id: 30c9cee795ce + last_write_checksum: sha1:0983c2bef9308bc6e62ca453350946a50a7a716a + pristine_git_object: 0362e4a8c9dd8250bf796c3f76d731308ebb2783 + docs/models/filtersmanual.md: + id: 792f2b36762a + last_write_checksum: sha1:1ff2055b406e03574adafe511642ab29a558d12d + pristine_git_object: bf05b7d9470eedf6af43da868dc73699512d9200 + docs/models/filtersstatus.md: + id: 85eb7da3a1c4 + last_write_checksum: sha1:4eff35b3a4402c2b9162a02b5057a9d7eef1fbd3 + pristine_git_object: d97dc2d99c8dba8879469988b9d218c193f76f56 + docs/models/filtersstatusenum1.md: + id: a1ec5d5fddf6 + last_write_checksum: sha1:634f3031b284b2b50a2b0dbaf6892d8c0cecc311 + pristine_git_object: fe751a68fd8bf476f9a84ef1e0045b2d533fd1bc + docs/models/filtersstatusenum2.md: + id: 4ece33cdd189 + last_write_checksum: sha1:7afcd15c20ac803d134438161e915b9d3bc375f5 + pristine_git_object: 8deba13a1cb55acd758558d1a94f5fd6d51324f5 docs/models/gcppubsubconfig.md: id: 73a8559c13a6 last_write_checksum: sha1:cc3c9973f838d2521151e9db34eedc1c732bbfd5 @@ -371,12 +395,52 @@ trackedFiles: pristine_git_object: c785edab1894fa93f3b5011161f15dd0caab3196 docs/models/getattemptinclude.md: id: 5e7bbec19c6a - last_write_checksum: sha1:49bed9c878da42b5ae10da573cd025e91395ce92 - pristine_git_object: 0f6692238cc054447734ef88f3976ec789cedd5e + last_write_checksum: sha1:3a86f815197561a0299cec3ccbbad486c7f679e5 + pristine_git_object: 9a64d589edd2c54ddb4c3efea0520871ee06b4cc + docs/models/getattemptmetricsdimensionsenum1.md: + id: 8d9147cb6047 + last_write_checksum: sha1:0c4bc6b38d6920132f884351c2f23dd172d77dea + pristine_git_object: e7bfb37487cae9fc103f180fb7cffcbf4ad66280 + docs/models/getattemptmetricsdimensionsenum2.md: + id: 59ab837ac2eb + last_write_checksum: sha1:436f9bf63c968a9955fb1634467ea72baa8e084f + pristine_git_object: 54c533f75ceb4500e9c69e92da5dfb54a1de1556 + docs/models/getattemptmetricsdimensionsunion.md: + id: ac27a5c7961d + last_write_checksum: sha1:1e8f6005ac0fcada1fa62987118c1957ab3d3f84 + pristine_git_object: 8f16905c0adff684fd7fdb836e0b64d3fbadd3b0 + docs/models/getattemptmetricsfiltersdestinationid.md: + id: 32342b9f338c + last_write_checksum: sha1:130651a0480414b6743cc0ec41ebeaf04ecec824 + pristine_git_object: 2b418ace93a9e8dc5fc651e6d4bac773e1f13b55 + docs/models/getattemptmetricsfilterstenantid.md: + id: 8d72da5fa184 + last_write_checksum: sha1:20bbba75d197f54f3f68fb734493d4e0e7c56ff2 + pristine_git_object: 1c5e8ba9f40afd6cf4616c58cae019544a7f99b6 + docs/models/getattemptmetricsfilterstopic.md: + id: 81b062eb4fd8 + last_write_checksum: sha1:2f5bedd8d2f491dced075fa1c502a4c475aa0148 + pristine_git_object: ddb69747067f4c315521f7fb59c85a532b695709 + docs/models/getattemptmetricsmeasuresenum1.md: + id: 8eeb3416346f + last_write_checksum: sha1:4a8d6e010105e9606f4072328131e2121d264264 + pristine_git_object: 80fadf55273907e32ce11b18b26d8707f83da609 + docs/models/getattemptmetricsmeasuresenum2.md: + id: e8a6523879fc + last_write_checksum: sha1:485c5252334d3b8e92d37ea6ce94c883a9bd2adc + pristine_git_object: 6b523f6e1d189fabb131b6f511a10744e5d43719 + docs/models/getattemptmetricsmeasuresunion.md: + id: 43ad71547aa3 + last_write_checksum: sha1:730bc2e9bd2b8e31336ffa3a2606b445690aea00 + pristine_git_object: 77494922eaa4188daac135809846ee5589d1fcdd + docs/models/getattemptmetricsrequest.md: + id: 324bf98974db + last_write_checksum: sha1:5e41ef2e9a3d950c85a3b31f10cfbf72099d62c5 + pristine_git_object: 7a37825a828e708071037e9590e85dc47e61662d docs/models/getattemptrequest.md: id: fd7906421f5d - last_write_checksum: sha1:7a06ed40dfaff1b0fbd7d2f755540a0237140420 - pristine_git_object: f37fc70798871376942043e77b996f21fef0faf2 + last_write_checksum: sha1:001503ad5034f3e5ad6e982d28e2d06c7eb8e844 + pristine_git_object: ed9951459ce8524ed8e9ea405f10dcc54cd8fbea docs/models/getdestinationtypeschemarequest.md: id: 7964f308b544 last_write_checksum: sha1:1cf8c0bf9c095ca337822676dacdfb6e43791c6a @@ -385,18 +449,58 @@ trackedFiles: id: 443fef4341c3 last_write_checksum: sha1:2059e5680600393bf1eabc689bf1c1ccdcba486a pristine_git_object: 730cf1175dc713474d0b81110238790855f87cc6 + docs/models/geteventmetricsdimensionsenum1.md: + id: 6aaf56280b2f + last_write_checksum: sha1:1a7f121106ee4d2d7d6b612e97c4fc6275c65a01 + pristine_git_object: 73e7a7cb59698e9ced92ce217cc93a57d2c188d5 + docs/models/geteventmetricsdimensionsenum2.md: + id: f088534767a6 + last_write_checksum: sha1:3760aa6052e0063fb707f0515518ccfb87aaffc8 + pristine_git_object: cd37567353d97afc78a4c9394249e177ff53161d + docs/models/geteventmetricsdimensionsunion.md: + id: 7b0057b83597 + last_write_checksum: sha1:c4fc84697aab4c5a39a84018c58e2d600353217a + pristine_git_object: 078e2f8b132a261fad6fc679316e4579f5ef5f25 + docs/models/geteventmetricsfiltersdestinationid.md: + id: 148546f84842 + last_write_checksum: sha1:230c29dd6727f086e700fc8bb6cd789ca69f9f74 + pristine_git_object: b7f4c507972fd7f6d393f1ae437fa5fc97222aa1 + docs/models/geteventmetricsfilterstenantid.md: + id: a35d2b2fc9a1 + last_write_checksum: sha1:3613590b2bd9f4e2149ab86ba108aa90da2ff08a + pristine_git_object: 1fa2f684008f9f90407118232c72752f0b5c7676 + docs/models/geteventmetricsfilterstopic.md: + id: efb00948c295 + last_write_checksum: sha1:7c6d252a1e7630a8a2fc86cdc09f9eb355a55289 + pristine_git_object: 0e8e61178eaa15b970c195d9d7a91de822b6f5c3 + docs/models/geteventmetricsmeasuresenum1.md: + id: 4923c0edba14 + last_write_checksum: sha1:141f1029ed82fdfa6743377559d47f0f8dc84080 + pristine_git_object: 81dad8281f48dab93e729a3b5cfce393f9804d28 + docs/models/geteventmetricsmeasuresenum2.md: + id: 646123e726be + last_write_checksum: sha1:8fb7b4d57f1ddc8f1f7284aa40efbafa2e77e8a5 + pristine_git_object: 86f3e4bdafeafa60e2f3db5df224a8a7ba3bd420 + docs/models/geteventmetricsmeasuresunion.md: + id: d6a26ead7043 + last_write_checksum: sha1:45d6dc0727c384c7809bd32946d4c9df0152cc22 + pristine_git_object: ed278c3b9b181e7aff2b114432574a5903e4336d + docs/models/geteventmetricsrequest.md: + id: d766e3760036 + last_write_checksum: sha1:e451e8dc2f089b6f0ec1402f1e1cb91dacb8934f + pristine_git_object: 112538118f90ba30e437c731c9e38e83701b6cf0 docs/models/geteventrequest.md: id: e4729450786a last_write_checksum: sha1:1c5a0e7c3f91521c568689b92a280e2f1cd3a74d pristine_git_object: 6b518b40c64c40fc10fdc5146f76c63fcb26b88d docs/models/gettenantdestinationattemptinclude.md: id: b56354c2a7d4 - last_write_checksum: sha1:c57bc0cf317de9272e2631df40990c30ca3fbea8 - pristine_git_object: 4c0d34b44f2ddd0cdba87229497ccde27da7d748 + last_write_checksum: sha1:8d0b02afe2df8657b141311920658cb1de8f822b + pristine_git_object: 61facc2610423f2282395d414e1cc099010d66d3 docs/models/gettenantdestinationattemptrequest.md: id: 522abfb549c9 - last_write_checksum: sha1:186914b4494b59cb2d8a259f8a48c3ec6da6fbdb - pristine_git_object: ff3ef651eefeda42fd0af0d312f469855daba33e + last_write_checksum: sha1:00b3978b625bc26abba8838ac39f5b85e189a69f + pristine_git_object: 48894375554c4420da9fc731c9a2848eb5e8a2fd docs/models/gettenantdestinationrequest.md: id: 173425f3055d last_write_checksum: sha1:d5b085c9e99d3b2e005de2695cd218b203bb3e43 @@ -439,16 +543,16 @@ trackedFiles: pristine_git_object: 35df71f508817a086478307839c49f0708123628 docs/models/listattemptsinclude.md: id: 024177981c3a - last_write_checksum: sha1:530b9158af4a7e71b6e278f5a9349a0b3627f3b7 - pristine_git_object: b2ca934ef64852cb9c846110f8284423ff9bde1e + last_write_checksum: sha1:5684af598705a1317194cc3fc790a8e8b8b91076 + pristine_git_object: b60bb8053248857db703d2267085dfc17d3d9031 docs/models/listattemptsorderby.md: id: 1069decaba38 last_write_checksum: sha1:dfaab937573a6561259421a5dd34562ddb20db42 pristine_git_object: 04dcda31401076909fccc8841b0ee6229449f930 docs/models/listattemptsrequest.md: id: 934b5dab0590 - last_write_checksum: sha1:c2ffac0dfc6404737160916c7b6a58a50712fd49 - pristine_git_object: e1a97afe10b1ccd7c11c681d12e9e7f9d390e995 + last_write_checksum: sha1:69589f54fe61509459d3e20f37b6b97936e30922 + pristine_git_object: 31d65494c343129c8b69d0cc76069706f34200cc docs/models/listattemptsresponse.md: id: e036b31e7aec last_write_checksum: sha1:db48676f2cf5e3273c6ddd4bee2545150d4c4097 @@ -503,16 +607,16 @@ trackedFiles: pristine_git_object: 189021e2cee9c388021f36318a4415be31dbaca1 docs/models/listtenantdestinationattemptsinclude.md: id: 9f996f6daa33 - last_write_checksum: sha1:99cd75f2ceba3bb5a4be5b1b915b02d0ee1724be - pristine_git_object: 15c7715838180eabf159bc3a9c3c51402f7b386e + last_write_checksum: sha1:811c244fbdbc8c10bff2ad82ea8ce71a1ce33ab4 + pristine_git_object: a4b23f4b66405165f76d509ee723f433dc9af6da docs/models/listtenantdestinationattemptsorderby.md: id: a7d360311114 last_write_checksum: sha1:6c33d99acae78266f7c8c5a3e4342c0bc7b8b953 pristine_git_object: 0ea9f5ebd8633f45a62046b90fcbe73c628e7601 docs/models/listtenantdestinationattemptsrequest.md: id: c8a7c18306b0 - last_write_checksum: sha1:be83f7884af281b826655fd2c5c47de34ead373c - pristine_git_object: 38bef260ce3e6b25d26de906eb670cb2851de358 + last_write_checksum: sha1:fed20ce84fd985769c6a48bc6df4054de9d0403c + pristine_git_object: 3a38e2cd68a914af70ac0c6e7177bde7b865312b docs/models/listtenantdestinationattemptsresponse.md: id: 6bcaf756b801 last_write_checksum: sha1:9ca4b3533e4c72bcca30b4f617b5e9cbbf0252f5 @@ -553,6 +657,18 @@ trackedFiles: id: 1f7eb86195fd last_write_checksum: sha1:de0b042e331b60f344f8ab65b3997997f82c674e pristine_git_object: 8175101b0060fc660291e9ecc87b34f064d1dc45 + docs/models/metricsdatapoint.md: + id: 7ab5449287c3 + last_write_checksum: sha1:95a28ddc95e44fcd9b26f96fac41ce615d251b9c + pristine_git_object: 18716712395e329c0b4aba7d0049d28f24fa31b1 + docs/models/metricsmetadata.md: + id: e2e327f505e4 + last_write_checksum: sha1:e0c579bf1b55cce348e8923d05fb7283bdbc6d7f + pristine_git_object: df771d36b8fcb32fbd3fd39349c5f76e8ec37b0b + docs/models/metricsresponse.md: + id: da5c44e3eee0 + last_write_checksum: sha1:0188f7016936bf9e8c1b3b8a8448c6cae8843a18 + pristine_git_object: 9aa1b0e3cfd3f9fb3da4e9f057ad471490140090 docs/models/portalredirect.md: id: c3fc0cb823e3 last_write_checksum: sha1:15496013ace8b922ec2cf99c5ceade2324156ba1 @@ -659,12 +775,12 @@ trackedFiles: pristine_git_object: 36572088751475931126b4d86e8ea067ac214eed docs/sdks/attempts/README.md: id: 41a6f5edd623 - last_write_checksum: sha1:19a92d358f46677f255ae8e4db0e9bb1cbfc8419 - pristine_git_object: 91534caccd61c040381d20b4a94b40a8638e2c28 + last_write_checksum: sha1:96e7d5f247b9c6dc1f520598e89e87d728c2a6fe + pristine_git_object: 53504f53ddfd1c6818b326162091ea5fe4cba2d9 docs/sdks/destinations/README.md: id: e83d288899aa - last_write_checksum: sha1:2ee5e618f6aefbfc66fce6d9d04be69121e95dda - pristine_git_object: 3c9960b0ecd93d4a5ac8ff117b6070a473473f04 + last_write_checksum: sha1:94185b5f0537b8570ff335d45857264b56eadd9a + pristine_git_object: ddafa6e9b149d041ab9769c73a6f4a76d2d928fb docs/sdks/events/README.md: id: cf45a4390b9b last_write_checksum: sha1:ac966b4d12318a9c4395cb21e2f9dced84da554b @@ -673,6 +789,10 @@ trackedFiles: id: 5082c50d5e82 last_write_checksum: sha1:edbbd8aa126aa79f9db43884174dcadb6724b3d2 pristine_git_object: 450073a93bd5a48acda412a41083b545ab9c5604 + docs/sdks/metrics/README.md: + id: a8545d964e21 + last_write_checksum: sha1:cddb6199450c2a0791be8714555c44418c6f41d9 + pristine_git_object: 3041abbe1c7740c8d89690f686442a53cb7d0b11 docs/sdks/publish/README.md: id: 370ef5537c93 last_write_checksum: sha1:86d4567afe9f0224ff74d39a1f5277cdef65e531 @@ -703,8 +823,8 @@ trackedFiles: pristine_git_object: cb9c15d314c1930557401074329ed7a737147919 pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:ff5345d7e473622e8cf4ce6f0197a2fd75d41b0a - pristine_git_object: f50ca6701be590ecc9d42b535297f4a7d2fb01a7 + last_write_checksum: sha1:9b935fbdd328c56a087f80827885901914e7361f + pristine_git_object: 61d6ebeefae255f9f078e33a2c3b3432d62f4eca scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:eb460f85c06b287fee629d997b2df75c92fa1cab @@ -731,20 +851,20 @@ trackedFiles: pristine_git_object: b1777a2eacece4434c53b2e136158f0c1360707d src/outpost_sdk/_version.py: id: 22be68f35ad0 - last_write_checksum: sha1:3f6d917776e142434708631f0f3511241ccc5777 - pristine_git_object: 6331143a72d4bbf28e292e714b0e6ce40eed4977 + last_write_checksum: sha1:9005c98ba72f357e4d2dbe1f87ea7f05c3f77aa4 + pristine_git_object: 26c32671b9d023ff029193f7324dc38421498dd5 src/outpost_sdk/attempts.py: id: 304ea4e0bbf1 - last_write_checksum: sha1:f0c6e47c0a8b491757dcd598f966eca8476bed0c - pristine_git_object: 06c122eaa57ad24da014d0aa32f3aa0a6215e500 + last_write_checksum: sha1:0df50d563c64f9370b4f6a2fa55c083a743db091 + pristine_git_object: f6a78376433e3eadb37641e5973d2b50cee4a513 src/outpost_sdk/basesdk.py: id: 06a87cb4bdaf last_write_checksum: sha1:b009b4794d3bc426ab812ae401ae678c2ed8a6ed pristine_git_object: 31ce35a30dfa71de49f055b40083baca20e75ced src/outpost_sdk/destinations.py: id: c941d7cf8960 - last_write_checksum: sha1:e8f543def0751b5338fed1be14ce69864e66e5b8 - pristine_git_object: d95d2dc5949314aca686b8139940445140dd7d0b + last_write_checksum: sha1:a1a11eb23fc9917de10ce492c101a64737a64a31 + pristine_git_object: 0463cb24ec7375cf1f10ca1d3e24303961b8dd95 src/outpost_sdk/errors/__init__.py: id: 8cd8140f4773 last_write_checksum: sha1:32a90fdbd5d713cbffb8ff6e4066055df2268392 @@ -799,8 +919,8 @@ trackedFiles: pristine_git_object: 38b68bb656c457a7801b6da04e384737dd5ffdb2 src/outpost_sdk/events.py: id: 8b2e2ec7d8c0 - last_write_checksum: sha1:866e58e6eb2c3eae5c61eca2b3d7508cd85f6c28 - pristine_git_object: 27ac65497472572553f1fa03a43f7d9044d5ac48 + last_write_checksum: sha1:b768870b95d22943a96a6439c34980d3b01192d0 + pristine_git_object: 7db53c46442005d912302a3a8c2b7eee65d6637e src/outpost_sdk/health.py: id: 10a3c4bcf747 last_write_checksum: sha1:aee0baed7d4d328e475db9081b1ed80615d53e15 @@ -809,14 +929,18 @@ trackedFiles: id: "608165498304" last_write_checksum: sha1:5e55338d6ee9f01ab648cad4380201a8a3da7dd7 pristine_git_object: 89560b566073785535643e694c112bedbd3db13d + src/outpost_sdk/metrics.py: + id: 8db1d4257393 + last_write_checksum: sha1:86dc51850a8e84327e4a03e131c66586dc0d6025 + pristine_git_object: d17e87a11eb928acf2fecc5d6d066bda768ba063 src/outpost_sdk/models/__init__.py: id: 690a20e1a54c - last_write_checksum: sha1:51b8a0f6fa7a7bf031e2fba8da73e2ed09222a9b - pristine_git_object: 23477ccc07bb943a586e92eb72cbd13b824c3bc8 + last_write_checksum: sha1:f5bf9341acfc33bdca29de79ea02249040800cbf + pristine_git_object: cdd2550cbb4ab825eafd5c0a6e6586e7474c83d7 src/outpost_sdk/models/attempt.py: id: 931b46ffc0d9 - last_write_checksum: sha1:5f43e5faf5ab50bee4a2d8a06ec90eaeb78d4797 - pristine_git_object: c13f62510cae4c2252547081772b4a919089189c + last_write_checksum: sha1:1b25ba290854c590f67a36d8fa356305befdfd2b + pristine_git_object: 5843193d195050073d646b0d9b7dd2aa93ff14c5 src/outpost_sdk/models/attemptpaginatedresult.py: id: 8a2ab0a7d088 last_write_checksum: sha1:6c08df5fd93aec38d39adda6e167ea0c9404f607 @@ -997,18 +1121,10 @@ trackedFiles: id: d76334f49c72 last_write_checksum: sha1:b4552440fb0adc1191dc54c1967e8a62f977f5af pristine_git_object: 7320fd229270a725f89d68ae7d51eaeecb6f3a1b - src/outpost_sdk/models/eventfull.py: - id: 5d4778348e54 - last_write_checksum: sha1:441194efacc87d848068876e9f40c4089ee0f617 - pristine_git_object: 8db47be89fe946a33b8d4b8e515885d996307b38 src/outpost_sdk/models/eventpaginatedresult.py: id: d3ac58b45469 last_write_checksum: sha1:cae2c5021c282c68e34b66591fb1cc3a8cadcaac pristine_git_object: c1815a38476eec2c9bd46901195cf999ba1fcc93 - src/outpost_sdk/models/eventsummary.py: - id: f3dd5eebc5ac - last_write_checksum: sha1:10a53bf7c303aff33cd357c85c47372e3a0ff1fb - pristine_git_object: 1609f1df2787e04294528d9ee7b154bea3420c27 src/outpost_sdk/models/gcppubsubconfig.py: id: 5088ceb75781 last_write_checksum: sha1:00ca10c52495f57d6ae4e5429a24a4716bb0a625 @@ -1017,22 +1133,30 @@ trackedFiles: id: abca05169737 last_write_checksum: sha1:dc8390c93bf25ac535e88256a7e4d5b4717055f1 pristine_git_object: 359c1110785eb1541c9db38d18edf145df04bfc6 + src/outpost_sdk/models/getattemptmetricsop.py: + id: f4bca8e34941 + last_write_checksum: sha1:7b651e1abd8f5db939f2c8da0f60c88909b80187 + pristine_git_object: 8a8d9e7a489161d552ba7c9f9c9d12e6cb2848b9 src/outpost_sdk/models/getattemptop.py: id: 7782fa767ceb - last_write_checksum: sha1:5f643ea8bbf3cc5b1909a27c9805a1f783977e7e - pristine_git_object: 2977650be25b0f4cc766c26fdf4c0deb32aed2d0 + last_write_checksum: sha1:b327ec88de2353e7d90edc9712e80b3b0208fe4f + pristine_git_object: 4cdaae6bb091a49950748e345b071506f8043ec4 src/outpost_sdk/models/getdestinationtypeschemaop.py: id: c2eac8f2bbca last_write_checksum: sha1:9f1e56affa65b5e7fd8ef4009ab475de68b434e4 pristine_git_object: f22dd1d0b552bf3e96c5f98a621af91cb1313f29 + src/outpost_sdk/models/geteventmetricsop.py: + id: 0e21e647baa9 + last_write_checksum: sha1:fd7e4f6c9246c2b5d7acc6ed1dfb605b4aeac40f + pristine_git_object: 5cae8888e81b95d98f8b32c4719de46ef2de6cce src/outpost_sdk/models/geteventop.py: id: ebedfc1647c7 last_write_checksum: sha1:ec4eef64b8b750bdb89ccb0b6e98d7856d5b218f pristine_git_object: 3359c7636361c151177b86cce9a7f365258431f6 src/outpost_sdk/models/gettenantdestinationattemptop.py: id: ccf28ac65f39 - last_write_checksum: sha1:22bb48ee41df86ae7651e750d160c25e3ac7a204 - pristine_git_object: 72e267abab1c42cf0f6e659091326981d9b1acc1 + last_write_checksum: sha1:a4b12854d8c94d45993c537beee2d4ed297962f0 + pristine_git_object: 8fc5f1b2beeff6dba18dee6423882ec7c1c2ac52 src/outpost_sdk/models/gettenantdestinationop.py: id: 6f1966ca7278 last_write_checksum: sha1:846e419ffc178a7713a0c80f3fc32bcaf2e8ae89 @@ -1059,16 +1183,16 @@ trackedFiles: pristine_git_object: 090b478df5d6be4f69b4460766fb4f87411d2d43 src/outpost_sdk/models/listattemptsop.py: id: 23d568326218 - last_write_checksum: sha1:bfdb77068a6ab44684377ebcb6b70c12a4d599ad - pristine_git_object: 1e29a0ba8c1d4680b3d598b81ea350aa0af72fed + last_write_checksum: sha1:acd64ac1f6bfd6ea30c6fac645782f82ff3f2b19 + pristine_git_object: f0dba924761f1b8563fc4a6b946953d3564d335f src/outpost_sdk/models/listeventsop.py: id: 2d1ec5c5d505 last_write_checksum: sha1:237e04b749293b5b3731f216499cbf199b9c4670 pristine_git_object: 41b53192d3756bb5439d0318eb84c8391c9f1266 src/outpost_sdk/models/listtenantdestinationattemptsop.py: id: 1b700f60c32a - last_write_checksum: sha1:e005d1164e0ecd7d7076c61765bc21aad587f957 - pristine_git_object: 0a3c888cd22db85096f0c6c4dd423056207e94e0 + last_write_checksum: sha1:dc39a9cf75ea8ec2a320458b131bba14e22049e0 + pristine_git_object: 0a73255ee195a3762293eb3a19699497cc82a53b src/outpost_sdk/models/listtenantdestinationsop.py: id: 8e9d6032dbe9 last_write_checksum: sha1:68ce6e93902bdb9c6ec423f1cbeb08768f387995 @@ -1077,6 +1201,18 @@ trackedFiles: id: 4f4212a7d66b last_write_checksum: sha1:61259c156c44c30bfd6c9670408d0ce3813e3774 pristine_git_object: 3ffaf234fbda6f5fd0b915e3f0d4df0d9d073bcd + src/outpost_sdk/models/metricsdatapoint.py: + id: 402c8bbf628c + last_write_checksum: sha1:20e5cff10f451034d6564339a0fc2e1737b6f4dd + pristine_git_object: 9ae956368b6adb9bcbe4442d25887cc9af92bf42 + src/outpost_sdk/models/metricsmetadata.py: + id: 7a5ac79945d1 + last_write_checksum: sha1:8b7d61ded7a41ed613cc66cdf0c58488e595a3dc + pristine_git_object: 05c040cdbc743fa1084c2c266ff7bef6ff6fd5a6 + src/outpost_sdk/models/metricsresponse.py: + id: 258f057e789b + last_write_checksum: sha1:d125cb56a64b55562853649da3137a4f72da9e53 + pristine_git_object: edfbdfa04f2487354cb47058b3ef50f80b4de0de src/outpost_sdk/models/portalredirect.py: id: 24df1cb14669 last_write_checksum: sha1:7518f878e6a37489d8ea45bb7d6fb0ce04042db9 @@ -1167,16 +1303,16 @@ trackedFiles: pristine_git_object: 99b69d409a49f53a5e24a58586e4592f5fbc71e9 src/outpost_sdk/sdk.py: id: 745ed80a189d - last_write_checksum: sha1:04c1d86ed83d5b171843919cb2cbb150f65d81a9 - pristine_git_object: 119d2c6a7c135953dc293020ababdb40c1241429 + last_write_checksum: sha1:64b00ea433d51c0b38657346c13078f4abc06f4f + pristine_git_object: 13ba5e41cb34ccb522a724774192ab4173689911 src/outpost_sdk/sdkconfiguration.py: id: 730fcc1ee551 last_write_checksum: sha1:e21789880a912f502c7e435bc95db99696c4cbaa pristine_git_object: 6a045c19a5a7a033e43debf63d5393d9459d2d32 src/outpost_sdk/tenants.py: id: 6575cae7064e - last_write_checksum: sha1:5a5c554f676d5b07f5334dcc0104972fb5ec5586 - pristine_git_object: 7e2c69ddf99c7f9801f3bbfbee4ea5fbf4a7db2b + last_write_checksum: sha1:4f6a3bef0f38d2166239c84a4b8dd4f3320f7289 + pristine_git_object: 36eea08bb895231aa30f959b7c14d5d4f3e2a947 src/outpost_sdk/topics_sdk.py: id: 7e5ee20344bd last_write_checksum: sha1:4a5f8b212df50f2156dcdfed4679cfdff999ab8c @@ -1704,12 +1840,74 @@ examples: responses: "200": application/json: {"models": [{"id": "del_123", "status": "success", "time": "2024-01-01T00:00:05Z", "code": "200", "attempt_number": 1, "event_id": "evt_123", "destination_id": "des_456", "event": {"id": "evt_123", "topic": "user.created", "time": "2024-01-01T00:00:00Z", "eligible_for_retry": false, "metadata": {"source": "crm"}}}], "pagination": {"order_by": "time", "dir": "desc", "limit": 100, "next": null, "prev": null}} + getEventMetrics: + speakeasy-default-get-event-metrics: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T14:00:00Z", "dimensions": {"destination_id": "dest_abc", "topic": "user.created"}, "metrics": {"count": 1423, "error_rate": 0.02}}], "metadata": {"granularity": "1h", "query_time_ms": 42, "row_count": 2, "row_limit": 100000, "truncated": false}} + "400": + application/json: {} + "401": + application/json: {} + "403": + application/json: {"status": 422, "message": "validation error", "data": ["email is required", "password must be at least 6 characters"]} + "500": + application/json: {} + HourlyEventCount: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T14:00:00Z", "dimensions": {"topic": "user.created"}, "metrics": {"count": 1423}}, {"time_bucket": "2026-03-02T15:00:00Z", "dimensions": {"topic": "user.created"}, "metrics": {"count": 1891}}], "metadata": {"granularity": "1h", "query_time_ms": 42, "row_count": 2, "row_limit": 100000, "truncated": false}} + getAttemptMetrics: + speakeasy-default-get-attempt-metrics: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count", "error_rate"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T14:00:00Z", "dimensions": {"destination_id": "dest_abc", "topic": "user.created"}, "metrics": {"count": 1423, "error_rate": 0.02}}], "metadata": {"granularity": "1h", "query_time_ms": 42, "row_count": 2, "row_limit": 100000, "truncated": false}} + "400": + application/json: {} + "401": + application/json: {} + "403": + application/json: {"status": 422, "message": "validation error", "data": ["email is required", "password must be at least 6 characters"]} + "500": + application/json: {} + DailyAttemptCounts: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count", "error_rate"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T00:00:00Z", "dimensions": {"destination_id": "dest_abc"}, "metrics": {"count": 1423, "successful_count": 1393, "failed_count": 30, "error_rate": 0.0211}}], "metadata": {"granularity": "1d", "query_time_ms": 38, "row_count": 1, "row_limit": 100000, "truncated": false}} examplesVersion: 1.0.2 generatedTests: {} releaseNotes: | ## Python SDK Changes: - * `outpost.schemas.list_destination_types()`: `response.[].config_fields[].type.enum(key_value_map)` **Added** (Breaking ⚠️) - * `outpost.schemas.get_destination_type()`: `response.config_fields[].type.enum(key_value_map)` **Added** (Breaking ⚠️) + * `outpost.attempts.list()`: `response.models[]` **Changed** (Breaking ⚠️) + * `outpost.attempts.get()`: `response` **Changed** (Breaking ⚠️) + * `outpost.destinations.list_attempts()`: `response.models[]` **Changed** (Breaking ⚠️) + * `outpost.destinations.get_attempt()`: `response` **Changed** (Breaking ⚠️) + * `outpost.metrics.get_event_metrics()`: **Added** + * `outpost.metrics.get_attempt_metrics()`: **Added** generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/sdks/outpost-python/.speakeasy/gen.yaml b/sdks/outpost-python/.speakeasy/gen.yaml index 3af64b3f9..b3b3160d6 100644 --- a/sdks/outpost-python/.speakeasy/gen.yaml +++ b/sdks/outpost-python/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false python: - version: 0.8.1 + version: 0.8.2 additionalDependencies: dev: {} main: {} diff --git a/sdks/outpost-python/README-PYPI.md b/sdks/outpost-python/README-PYPI.md index eef54d59b..c43e4d305 100644 --- a/sdks/outpost-python/README-PYPI.md +++ b/sdks/outpost-python/README-PYPI.md @@ -214,6 +214,11 @@ with Outpost( * [check](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/docs/sdks/health/README.md#check) - Health Check +### [Metrics](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/docs/sdks/metrics/README.md) + +* [get_event_metrics](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/docs/sdks/metrics/README.md#get_event_metrics) - Get Event Metrics +* [get_attempt_metrics](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/docs/sdks/metrics/README.md#get_attempt_metrics) - Get Attempt Metrics + ### [Publish](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/docs/sdks/publish/README.md) * [event](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/docs/sdks/publish/README.md#event) - Publish Event @@ -352,9 +357,8 @@ with Outpost() as outpost: * [`OutpostError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/outposterror.py): The base class for HTTP error responses. * [`UnauthorizedError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/unauthorizederror.py): A collection of codes that generally means the client was not authenticated correctly for the request they want to make. * [`InternalServerError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/internalservererror.py): A collection of status codes that generally mean the server failed in an unexpected way. - * [`NotFoundError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/notfounderror.py): Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing. * -
Less common errors (10) +
Less common errors (11)
@@ -365,11 +369,12 @@ with Outpost() as outpost: **Inherit from [`OutpostError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/outposterror.py)**: -* [`BadRequestError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/badrequesterror.py): A collection of codes that generally means the end user got something wrong in making the request. Applicable to 6 of 25 methods.* -* [`TimeoutErrorT`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/timeouterrort.py): Timeouts occurred with the request. Applicable to 5 of 25 methods.* -* [`RateLimitedError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/ratelimitederror.py): Status codes relating to the client being rate limited by the server. Status code `429`. Applicable to 5 of 25 methods.* -* [`APIErrorResponse`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/apierrorresponse.py): Standard error response format. Status code `422`. Applicable to 3 of 25 methods.* -* [`NotImplementedErrorT`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/notimplementederrort.py): List Tenants feature is not available. Requires Redis with RediSearch module. Status code `501`. Applicable to 1 of 25 methods.* +* [`NotFoundError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/notfounderror.py): Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing. Applicable to 21 of 27 methods.* +* [`BadRequestError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/badrequesterror.py): A collection of codes that generally means the end user got something wrong in making the request. Applicable to 8 of 27 methods.* +* [`APIErrorResponse`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/apierrorresponse.py): Standard error response format. Applicable to 5 of 27 methods.* +* [`TimeoutErrorT`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/timeouterrort.py): Timeouts occurred with the request. Applicable to 5 of 27 methods.* +* [`RateLimitedError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/ratelimitederror.py): Status codes relating to the client being rate limited by the server. Status code `429`. Applicable to 5 of 27 methods.* +* [`NotImplementedErrorT`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/notimplementederrort.py): List Tenants feature is not available. Requires Redis with RediSearch module. Status code `501`. Applicable to 1 of 27 methods.* * [`ResponseValidationError`](https://github.com/hookdeck/outpost/blob/master/sdks/outpost-python/./src/outpost_sdk/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
diff --git a/sdks/outpost-python/README.md b/sdks/outpost-python/README.md index 586e967d4..fd3580d96 100644 --- a/sdks/outpost-python/README.md +++ b/sdks/outpost-python/README.md @@ -214,6 +214,11 @@ with Outpost( * [check](docs/sdks/health/README.md#check) - Health Check +### [Metrics](docs/sdks/metrics/README.md) + +* [get_event_metrics](docs/sdks/metrics/README.md#get_event_metrics) - Get Event Metrics +* [get_attempt_metrics](docs/sdks/metrics/README.md#get_attempt_metrics) - Get Attempt Metrics + ### [Publish](docs/sdks/publish/README.md) * [event](docs/sdks/publish/README.md#event) - Publish Event @@ -352,9 +357,8 @@ with Outpost() as outpost: * [`OutpostError`](./src/outpost_sdk/errors/outposterror.py): The base class for HTTP error responses. * [`UnauthorizedError`](./src/outpost_sdk/errors/unauthorizederror.py): A collection of codes that generally means the client was not authenticated correctly for the request they want to make. * [`InternalServerError`](./src/outpost_sdk/errors/internalservererror.py): A collection of status codes that generally mean the server failed in an unexpected way. - * [`NotFoundError`](./src/outpost_sdk/errors/notfounderror.py): Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing. * -
Less common errors (10) +
Less common errors (11)
@@ -365,11 +369,12 @@ with Outpost() as outpost: **Inherit from [`OutpostError`](./src/outpost_sdk/errors/outposterror.py)**: -* [`BadRequestError`](./src/outpost_sdk/errors/badrequesterror.py): A collection of codes that generally means the end user got something wrong in making the request. Applicable to 6 of 25 methods.* -* [`TimeoutErrorT`](./src/outpost_sdk/errors/timeouterrort.py): Timeouts occurred with the request. Applicable to 5 of 25 methods.* -* [`RateLimitedError`](./src/outpost_sdk/errors/ratelimitederror.py): Status codes relating to the client being rate limited by the server. Status code `429`. Applicable to 5 of 25 methods.* -* [`APIErrorResponse`](./src/outpost_sdk/errors/apierrorresponse.py): Standard error response format. Status code `422`. Applicable to 3 of 25 methods.* -* [`NotImplementedErrorT`](./src/outpost_sdk/errors/notimplementederrort.py): List Tenants feature is not available. Requires Redis with RediSearch module. Status code `501`. Applicable to 1 of 25 methods.* +* [`NotFoundError`](./src/outpost_sdk/errors/notfounderror.py): Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing. Applicable to 21 of 27 methods.* +* [`BadRequestError`](./src/outpost_sdk/errors/badrequesterror.py): A collection of codes that generally means the end user got something wrong in making the request. Applicable to 8 of 27 methods.* +* [`APIErrorResponse`](./src/outpost_sdk/errors/apierrorresponse.py): Standard error response format. Applicable to 5 of 27 methods.* +* [`TimeoutErrorT`](./src/outpost_sdk/errors/timeouterrort.py): Timeouts occurred with the request. Applicable to 5 of 27 methods.* +* [`RateLimitedError`](./src/outpost_sdk/errors/ratelimitederror.py): Status codes relating to the client being rate limited by the server. Status code `429`. Applicable to 5 of 27 methods.* +* [`NotImplementedErrorT`](./src/outpost_sdk/errors/notimplementederrort.py): List Tenants feature is not available. Requires Redis with RediSearch module. Status code `501`. Applicable to 1 of 27 methods.* * [`ResponseValidationError`](./src/outpost_sdk/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
diff --git a/sdks/outpost-python/RELEASES.md b/sdks/outpost-python/RELEASES.md index a9bf65de0..7e742dfba 100644 --- a/sdks/outpost-python/RELEASES.md +++ b/sdks/outpost-python/RELEASES.md @@ -78,4 +78,14 @@ Based on: ### Generated - [python v0.8.1] sdks/outpost-python ### Releases -- [PyPI v0.8.1] https://pypi.org/project/outpost_sdk/0.8.1 - sdks/outpost-python \ No newline at end of file +- [PyPI v0.8.1] https://pypi.org/project/outpost_sdk/0.8.1 - sdks/outpost-python + +## 2026-03-24 16:49:50 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.759.1 (2.869.10) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.8.2] sdks/outpost-python +### Releases +- [PyPI v0.8.2] https://pypi.org/project/outpost_sdk/0.8.2 - sdks/outpost-python \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/attempt.md b/sdks/outpost-python/docs/models/attempt.md index d0e1c896a..4b5deb47e 100644 --- a/sdks/outpost-python/docs/models/attempt.md +++ b/sdks/outpost-python/docs/models/attempt.md @@ -17,4 +17,5 @@ An attempt represents a single delivery attempt of an event to a destination. | `manual` | *Optional[bool]* | :heavy_minus_sign: | Whether this attempt was manually triggered (e.g., a retry initiated by a user). | false | | `event_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the associated event. | evt_123 | | `destination_id` | *Optional[str]* | :heavy_minus_sign: | The destination ID this attempt was sent to. | des_456 | -| `event` | [Optional[models.EventUnion]](../models/eventunion.md) | :heavy_minus_sign: | The associated event object. Only present when include=event or include=event.data. | | \ No newline at end of file +| `event` | [OptionalNullable[models.EventUnion]](../models/eventunion.md) | :heavy_minus_sign: | The associated event object. Only present when include=event or include=event.data. | | +| `destination` | [Optional[models.Destination]](../models/destination.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/filtersattemptnumber.md b/sdks/outpost-python/docs/models/filtersattemptnumber.md new file mode 100644 index 000000000..b65307068 --- /dev/null +++ b/sdks/outpost-python/docs/models/filtersattemptnumber.md @@ -0,0 +1,19 @@ +# FiltersAttemptNumber + +Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/filterscode.md b/sdks/outpost-python/docs/models/filterscode.md new file mode 100644 index 000000000..0362e4a8c --- /dev/null +++ b/sdks/outpost-python/docs/models/filterscode.md @@ -0,0 +1,19 @@ +# FiltersCode + +Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/filtersmanual.md b/sdks/outpost-python/docs/models/filtersmanual.md new file mode 100644 index 000000000..bf05b7d94 --- /dev/null +++ b/sdks/outpost-python/docs/models/filtersmanual.md @@ -0,0 +1,19 @@ +# FiltersManual + +Filter by manual retry flag. + +## Example Usage + +```python +from outpost_sdk.models import FiltersManual + +value = FiltersManual.TRUE +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `TRUE` | true | +| `FALSE` | false | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/filtersstatus.md b/sdks/outpost-python/docs/models/filtersstatus.md new file mode 100644 index 000000000..d97dc2d99 --- /dev/null +++ b/sdks/outpost-python/docs/models/filtersstatus.md @@ -0,0 +1,19 @@ +# FiltersStatus + +Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). + + +## Supported Types + +### `models.FiltersStatusEnum1` + +```python +value: models.FiltersStatusEnum1 = /* values here */ +``` + +### `List[models.FiltersStatusEnum2]` + +```python +value: List[models.FiltersStatusEnum2] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/filtersstatusenum1.md b/sdks/outpost-python/docs/models/filtersstatusenum1.md new file mode 100644 index 000000000..fe751a68f --- /dev/null +++ b/sdks/outpost-python/docs/models/filtersstatusenum1.md @@ -0,0 +1,17 @@ +# FiltersStatusEnum1 + +## Example Usage + +```python +from outpost_sdk.models import FiltersStatusEnum1 + +value = FiltersStatusEnum1.SUCCESS +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `SUCCESS` | success | +| `FAILED` | failed | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/filtersstatusenum2.md b/sdks/outpost-python/docs/models/filtersstatusenum2.md new file mode 100644 index 000000000..8deba13a1 --- /dev/null +++ b/sdks/outpost-python/docs/models/filtersstatusenum2.md @@ -0,0 +1,17 @@ +# FiltersStatusEnum2 + +## Example Usage + +```python +from outpost_sdk.models import FiltersStatusEnum2 + +value = FiltersStatusEnum2.SUCCESS +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `SUCCESS` | success | +| `FAILED` | failed | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/getattemptinclude.md b/sdks/outpost-python/docs/models/getattemptinclude.md index 0f6692238..9a64d589e 100644 --- a/sdks/outpost-python/docs/models/getattemptinclude.md +++ b/sdks/outpost-python/docs/models/getattemptinclude.md @@ -4,6 +4,7 @@ Fields to include in the response. Use bracket notation for multiple values (e.g - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object diff --git a/sdks/outpost-python/docs/models/getattemptmetricsdimensionsenum1.md b/sdks/outpost-python/docs/models/getattemptmetricsdimensionsenum1.md new file mode 100644 index 000000000..e7bfb3748 --- /dev/null +++ b/sdks/outpost-python/docs/models/getattemptmetricsdimensionsenum1.md @@ -0,0 +1,22 @@ +# GetAttemptMetricsDimensionsEnum1 + +## Example Usage + +```python +from outpost_sdk.models import GetAttemptMetricsDimensionsEnum1 + +value = GetAttemptMetricsDimensionsEnum1.TENANT_ID +``` + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `TENANT_ID` | tenant_id | +| `DESTINATION_ID` | destination_id | +| `TOPIC` | topic | +| `STATUS` | status | +| `CODE` | code | +| `MANUAL` | manual | +| `ATTEMPT_NUMBER` | attempt_number | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/getattemptmetricsdimensionsenum2.md b/sdks/outpost-python/docs/models/getattemptmetricsdimensionsenum2.md new file mode 100644 index 000000000..54c533f75 --- /dev/null +++ b/sdks/outpost-python/docs/models/getattemptmetricsdimensionsenum2.md @@ -0,0 +1,22 @@ +# GetAttemptMetricsDimensionsEnum2 + +## Example Usage + +```python +from outpost_sdk.models import GetAttemptMetricsDimensionsEnum2 + +value = GetAttemptMetricsDimensionsEnum2.TENANT_ID +``` + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `TENANT_ID` | tenant_id | +| `DESTINATION_ID` | destination_id | +| `TOPIC` | topic | +| `STATUS` | status | +| `CODE` | code | +| `MANUAL` | manual | +| `ATTEMPT_NUMBER` | attempt_number | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/getattemptmetricsdimensionsunion.md b/sdks/outpost-python/docs/models/getattemptmetricsdimensionsunion.md new file mode 100644 index 000000000..8f16905c0 --- /dev/null +++ b/sdks/outpost-python/docs/models/getattemptmetricsdimensionsunion.md @@ -0,0 +1,19 @@ +# GetAttemptMetricsDimensionsUnion + +Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). + + +## Supported Types + +### `models.GetAttemptMetricsDimensionsEnum1` + +```python +value: models.GetAttemptMetricsDimensionsEnum1 = /* values here */ +``` + +### `List[models.GetAttemptMetricsDimensionsEnum2]` + +```python +value: List[models.GetAttemptMetricsDimensionsEnum2] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/getattemptmetricsfiltersdestinationid.md b/sdks/outpost-python/docs/models/getattemptmetricsfiltersdestinationid.md new file mode 100644 index 000000000..2b418ace9 --- /dev/null +++ b/sdks/outpost-python/docs/models/getattemptmetricsfiltersdestinationid.md @@ -0,0 +1,19 @@ +# GetAttemptMetricsFiltersDestinationID + +Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/getattemptmetricsfilterstenantid.md b/sdks/outpost-python/docs/models/getattemptmetricsfilterstenantid.md new file mode 100644 index 000000000..1c5e8ba9f --- /dev/null +++ b/sdks/outpost-python/docs/models/getattemptmetricsfilterstenantid.md @@ -0,0 +1,19 @@ +# GetAttemptMetricsFiltersTenantID + +Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/getattemptmetricsfilterstopic.md b/sdks/outpost-python/docs/models/getattemptmetricsfilterstopic.md new file mode 100644 index 000000000..ddb697470 --- /dev/null +++ b/sdks/outpost-python/docs/models/getattemptmetricsfilterstopic.md @@ -0,0 +1,19 @@ +# GetAttemptMetricsFiltersTopic + +Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/getattemptmetricsmeasuresenum1.md b/sdks/outpost-python/docs/models/getattemptmetricsmeasuresenum1.md new file mode 100644 index 000000000..80fadf552 --- /dev/null +++ b/sdks/outpost-python/docs/models/getattemptmetricsmeasuresenum1.md @@ -0,0 +1,26 @@ +# GetAttemptMetricsMeasuresEnum1 + +## Example Usage + +```python +from outpost_sdk.models import GetAttemptMetricsMeasuresEnum1 + +value = GetAttemptMetricsMeasuresEnum1.COUNT +``` + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `COUNT` | count | +| `SUCCESSFUL_COUNT` | successful_count | +| `FAILED_COUNT` | failed_count | +| `ERROR_RATE` | error_rate | +| `FIRST_ATTEMPT_COUNT` | first_attempt_count | +| `RETRY_COUNT` | retry_count | +| `MANUAL_RETRY_COUNT` | manual_retry_count | +| `AVG_ATTEMPT_NUMBER` | avg_attempt_number | +| `RATE` | rate | +| `SUCCESSFUL_RATE` | successful_rate | +| `FAILED_RATE` | failed_rate | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/getattemptmetricsmeasuresenum2.md b/sdks/outpost-python/docs/models/getattemptmetricsmeasuresenum2.md new file mode 100644 index 000000000..6b523f6e1 --- /dev/null +++ b/sdks/outpost-python/docs/models/getattemptmetricsmeasuresenum2.md @@ -0,0 +1,26 @@ +# GetAttemptMetricsMeasuresEnum2 + +## Example Usage + +```python +from outpost_sdk.models import GetAttemptMetricsMeasuresEnum2 + +value = GetAttemptMetricsMeasuresEnum2.COUNT +``` + + +## Values + +| Name | Value | +| --------------------- | --------------------- | +| `COUNT` | count | +| `SUCCESSFUL_COUNT` | successful_count | +| `FAILED_COUNT` | failed_count | +| `ERROR_RATE` | error_rate | +| `FIRST_ATTEMPT_COUNT` | first_attempt_count | +| `RETRY_COUNT` | retry_count | +| `MANUAL_RETRY_COUNT` | manual_retry_count | +| `AVG_ATTEMPT_NUMBER` | avg_attempt_number | +| `RATE` | rate | +| `SUCCESSFUL_RATE` | successful_rate | +| `FAILED_RATE` | failed_rate | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/getattemptmetricsmeasuresunion.md b/sdks/outpost-python/docs/models/getattemptmetricsmeasuresunion.md new file mode 100644 index 000000000..77494922e --- /dev/null +++ b/sdks/outpost-python/docs/models/getattemptmetricsmeasuresunion.md @@ -0,0 +1,19 @@ +# GetAttemptMetricsMeasuresUnion + +Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). + + +## Supported Types + +### `models.GetAttemptMetricsMeasuresEnum1` + +```python +value: models.GetAttemptMetricsMeasuresEnum1 = /* values here */ +``` + +### `List[models.GetAttemptMetricsMeasuresEnum2]` + +```python +value: List[models.GetAttemptMetricsMeasuresEnum2] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/getattemptmetricsrequest.md b/sdks/outpost-python/docs/models/getattemptmetricsrequest.md new file mode 100644 index 000000000..7a37825a8 --- /dev/null +++ b/sdks/outpost-python/docs/models/getattemptmetricsrequest.md @@ -0,0 +1,19 @@ +# GetAttemptMetricsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `time_start` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Start of the time range (inclusive). ISO 8601 timestamp. | 2026-03-02T00:00:00Z | +| `time_end` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | End of the time range (exclusive). ISO 8601 timestamp. | 2026-03-03T00:00:00Z | +| `granularity` | *Optional[str]* | :heavy_minus_sign: | Time bucketing granularity. Pattern: ``.
Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12).
When omitted, returns a single aggregate row per dimension combination.
| 1h | +| `measures` | [models.GetAttemptMetricsMeasuresUnion](../models/getattemptmetricsmeasuresunion.md) | :heavy_check_mark: | Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). | [
"count",
"error_rate"
] | +| `dimensions` | [Optional[models.GetAttemptMetricsDimensionsUnion]](../models/getattemptmetricsdimensionsunion.md) | :heavy_minus_sign: | Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). | | +| `filters_destination_id` | [Optional[models.GetAttemptMetricsFiltersDestinationID]](../models/getattemptmetricsfiltersdestinationid.md) | :heavy_minus_sign: | Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). | | +| `filters_topic` | [Optional[models.GetAttemptMetricsFiltersTopic]](../models/getattemptmetricsfilterstopic.md) | :heavy_minus_sign: | Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). | | +| `filters_status` | [Optional[models.FiltersStatus]](../models/filtersstatus.md) | :heavy_minus_sign: | Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). | | +| `filters_code` | [Optional[models.FiltersCode]](../models/filterscode.md) | :heavy_minus_sign: | Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). | | +| `filters_manual` | [Optional[models.FiltersManual]](../models/filtersmanual.md) | :heavy_minus_sign: | Filter by manual retry flag. | | +| `filters_attempt_number` | [Optional[models.FiltersAttemptNumber]](../models/filtersattemptnumber.md) | :heavy_minus_sign: | Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). | | +| `filters_tenant_id` | [Optional[models.GetAttemptMetricsFiltersTenantID]](../models/getattemptmetricsfilterstenantid.md) | :heavy_minus_sign: | Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). | | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/getattemptrequest.md b/sdks/outpost-python/docs/models/getattemptrequest.md index f37fc7079..ed9951459 100644 --- a/sdks/outpost-python/docs/models/getattemptrequest.md +++ b/sdks/outpost-python/docs/models/getattemptrequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `attempt_id` | *str* | :heavy_check_mark: | The ID of the attempt. | -| `include` | [Optional[models.GetAttemptInclude]](../models/getattemptinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `attempt_id` | *str* | :heavy_check_mark: | The ID of the attempt. | +| `include` | [Optional[models.GetAttemptInclude]](../models/getattemptinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/geteventmetricsdimensionsenum1.md b/sdks/outpost-python/docs/models/geteventmetricsdimensionsenum1.md new file mode 100644 index 000000000..73e7a7cb5 --- /dev/null +++ b/sdks/outpost-python/docs/models/geteventmetricsdimensionsenum1.md @@ -0,0 +1,18 @@ +# GetEventMetricsDimensionsEnum1 + +## Example Usage + +```python +from outpost_sdk.models import GetEventMetricsDimensionsEnum1 + +value = GetEventMetricsDimensionsEnum1.TENANT_ID +``` + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `TENANT_ID` | tenant_id | +| `TOPIC` | topic | +| `DESTINATION_ID` | destination_id | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/geteventmetricsdimensionsenum2.md b/sdks/outpost-python/docs/models/geteventmetricsdimensionsenum2.md new file mode 100644 index 000000000..cd3756735 --- /dev/null +++ b/sdks/outpost-python/docs/models/geteventmetricsdimensionsenum2.md @@ -0,0 +1,18 @@ +# GetEventMetricsDimensionsEnum2 + +## Example Usage + +```python +from outpost_sdk.models import GetEventMetricsDimensionsEnum2 + +value = GetEventMetricsDimensionsEnum2.TENANT_ID +``` + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `TENANT_ID` | tenant_id | +| `TOPIC` | topic | +| `DESTINATION_ID` | destination_id | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/geteventmetricsdimensionsunion.md b/sdks/outpost-python/docs/models/geteventmetricsdimensionsunion.md new file mode 100644 index 000000000..078e2f8b1 --- /dev/null +++ b/sdks/outpost-python/docs/models/geteventmetricsdimensionsunion.md @@ -0,0 +1,19 @@ +# GetEventMetricsDimensionsUnion + +Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). + + +## Supported Types + +### `models.GetEventMetricsDimensionsEnum1` + +```python +value: models.GetEventMetricsDimensionsEnum1 = /* values here */ +``` + +### `List[models.GetEventMetricsDimensionsEnum2]` + +```python +value: List[models.GetEventMetricsDimensionsEnum2] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/geteventmetricsfiltersdestinationid.md b/sdks/outpost-python/docs/models/geteventmetricsfiltersdestinationid.md new file mode 100644 index 000000000..b7f4c5079 --- /dev/null +++ b/sdks/outpost-python/docs/models/geteventmetricsfiltersdestinationid.md @@ -0,0 +1,19 @@ +# GetEventMetricsFiltersDestinationID + +Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/geteventmetricsfilterstenantid.md b/sdks/outpost-python/docs/models/geteventmetricsfilterstenantid.md new file mode 100644 index 000000000..1fa2f6840 --- /dev/null +++ b/sdks/outpost-python/docs/models/geteventmetricsfilterstenantid.md @@ -0,0 +1,19 @@ +# GetEventMetricsFiltersTenantID + +Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/geteventmetricsfilterstopic.md b/sdks/outpost-python/docs/models/geteventmetricsfilterstopic.md new file mode 100644 index 000000000..0e8e61178 --- /dev/null +++ b/sdks/outpost-python/docs/models/geteventmetricsfilterstopic.md @@ -0,0 +1,19 @@ +# GetEventMetricsFiltersTopic + +Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + + +## Supported Types + +### `str` + +```python +value: str = /* values here */ +``` + +### `List[str]` + +```python +value: List[str] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/geteventmetricsmeasuresenum1.md b/sdks/outpost-python/docs/models/geteventmetricsmeasuresenum1.md new file mode 100644 index 000000000..81dad8281 --- /dev/null +++ b/sdks/outpost-python/docs/models/geteventmetricsmeasuresenum1.md @@ -0,0 +1,17 @@ +# GetEventMetricsMeasuresEnum1 + +## Example Usage + +```python +from outpost_sdk.models import GetEventMetricsMeasuresEnum1 + +value = GetEventMetricsMeasuresEnum1.COUNT +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `COUNT` | count | +| `RATE` | rate | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/geteventmetricsmeasuresenum2.md b/sdks/outpost-python/docs/models/geteventmetricsmeasuresenum2.md new file mode 100644 index 000000000..86f3e4bda --- /dev/null +++ b/sdks/outpost-python/docs/models/geteventmetricsmeasuresenum2.md @@ -0,0 +1,17 @@ +# GetEventMetricsMeasuresEnum2 + +## Example Usage + +```python +from outpost_sdk.models import GetEventMetricsMeasuresEnum2 + +value = GetEventMetricsMeasuresEnum2.COUNT +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `COUNT` | count | +| `RATE` | rate | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/geteventmetricsmeasuresunion.md b/sdks/outpost-python/docs/models/geteventmetricsmeasuresunion.md new file mode 100644 index 000000000..ed278c3b9 --- /dev/null +++ b/sdks/outpost-python/docs/models/geteventmetricsmeasuresunion.md @@ -0,0 +1,19 @@ +# GetEventMetricsMeasuresUnion + +Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). + + +## Supported Types + +### `models.GetEventMetricsMeasuresEnum1` + +```python +value: models.GetEventMetricsMeasuresEnum1 = /* values here */ +``` + +### `List[models.GetEventMetricsMeasuresEnum2]` + +```python +value: List[models.GetEventMetricsMeasuresEnum2] = /* values here */ +``` + diff --git a/sdks/outpost-python/docs/models/geteventmetricsrequest.md b/sdks/outpost-python/docs/models/geteventmetricsrequest.md new file mode 100644 index 000000000..112538118 --- /dev/null +++ b/sdks/outpost-python/docs/models/geteventmetricsrequest.md @@ -0,0 +1,15 @@ +# GetEventMetricsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `time_start` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | Start of the time range (inclusive). ISO 8601 timestamp. | 2026-03-02T00:00:00Z | +| `time_end` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | End of the time range (exclusive). ISO 8601 timestamp. | 2026-03-03T00:00:00Z | +| `granularity` | *Optional[str]* | :heavy_minus_sign: | Time bucketing granularity. Pattern: ``.
Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12).
When omitted, returns a single aggregate row per dimension combination.
| 1h | +| `measures` | [models.GetEventMetricsMeasuresUnion](../models/geteventmetricsmeasuresunion.md) | :heavy_check_mark: | Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). | [
"count"
] | +| `dimensions` | [Optional[models.GetEventMetricsDimensionsUnion]](../models/geteventmetricsdimensionsunion.md) | :heavy_minus_sign: | Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). | | +| `filters_topic` | [Optional[models.GetEventMetricsFiltersTopic]](../models/geteventmetricsfilterstopic.md) | :heavy_minus_sign: | Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). | | +| `filters_destination_id` | [Optional[models.GetEventMetricsFiltersDestinationID]](../models/geteventmetricsfiltersdestinationid.md) | :heavy_minus_sign: | Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). | | +| `filters_tenant_id` | [Optional[models.GetEventMetricsFiltersTenantID]](../models/geteventmetricsfilterstenantid.md) | :heavy_minus_sign: | Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). | | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/gettenantdestinationattemptinclude.md b/sdks/outpost-python/docs/models/gettenantdestinationattemptinclude.md index 4c0d34b44..61facc261 100644 --- a/sdks/outpost-python/docs/models/gettenantdestinationattemptinclude.md +++ b/sdks/outpost-python/docs/models/gettenantdestinationattemptinclude.md @@ -4,6 +4,7 @@ Fields to include in the response. Use bracket notation for multiple values (e.g - `event`: Include event summary - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object diff --git a/sdks/outpost-python/docs/models/gettenantdestinationattemptrequest.md b/sdks/outpost-python/docs/models/gettenantdestinationattemptrequest.md index ff3ef651e..488943755 100644 --- a/sdks/outpost-python/docs/models/gettenantdestinationattemptrequest.md +++ b/sdks/outpost-python/docs/models/gettenantdestinationattemptrequest.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tenant_id` | *str* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | -| `destination_id` | *str* | :heavy_check_mark: | The ID of the destination. | -| `attempt_id` | *str* | :heavy_check_mark: | The ID of the attempt. | -| `include` | [Optional[models.GetTenantDestinationAttemptInclude]](../models/gettenantdestinationattemptinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tenant_id` | *str* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | +| `destination_id` | *str* | :heavy_check_mark: | The ID of the destination. | +| `attempt_id` | *str* | :heavy_check_mark: | The ID of the attempt. | +| `include` | [Optional[models.GetTenantDestinationAttemptInclude]](../models/gettenantdestinationattemptinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/listattemptsinclude.md b/sdks/outpost-python/docs/models/listattemptsinclude.md index b2ca934ef..b60bb8053 100644 --- a/sdks/outpost-python/docs/models/listattemptsinclude.md +++ b/sdks/outpost-python/docs/models/listattemptsinclude.md @@ -4,6 +4,7 @@ Fields to include in the response. Use bracket notation for multiple values (e.g - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object diff --git a/sdks/outpost-python/docs/models/listattemptsrequest.md b/sdks/outpost-python/docs/models/listattemptsrequest.md index e1a97afe1..31d65494c 100644 --- a/sdks/outpost-python/docs/models/listattemptsrequest.md +++ b/sdks/outpost-python/docs/models/listattemptsrequest.md @@ -3,20 +3,20 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tenant_id` | [Optional[models.ListAttemptsTenantID]](../models/listattemptstenantid.md) | :heavy_minus_sign: | Filter attempts by tenant ID(s). Use bracket notation for multiple values (e.g., `tenant_id[0]=t1&tenant_id[1]=t2`).
When authenticated with a Tenant JWT, this parameter is ignored and the JWT's tenant is used.
If not provided with API key auth, returns attempts from all tenants.
| -| `event_id` | [Optional[models.ListAttemptsEventID]](../models/listattemptseventid.md) | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | -| `destination_id` | [Optional[models.DestinationID]](../models/destinationid.md) | :heavy_minus_sign: | Filter attempts by destination ID(s). Use bracket notation for multiple values (e.g., `destination_id[0]=d1&destination_id[1]=d2`). | -| `status` | [Optional[models.ListAttemptsStatus]](../models/listattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | -| `topic` | [Optional[models.ListAttemptsTopic]](../models/listattemptstopic.md) | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | -| `time_gte` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | -| `time_lte` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | -| `time_gt` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | -| `time_lt` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | -| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | -| `next_cursor` | *Optional[str]* | :heavy_minus_sign: | Cursor for next page of results. | -| `prev_cursor` | *Optional[str]* | :heavy_minus_sign: | Cursor for previous page of results. | -| `include` | [Optional[models.ListAttemptsInclude]](../models/listattemptsinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `order_by` | [Optional[models.ListAttemptsOrderBy]](../models/listattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | -| `direction` | [Optional[models.ListAttemptsDir]](../models/listattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tenant_id` | [Optional[models.ListAttemptsTenantID]](../models/listattemptstenantid.md) | :heavy_minus_sign: | Filter attempts by tenant ID(s). Use bracket notation for multiple values (e.g., `tenant_id[0]=t1&tenant_id[1]=t2`).
When authenticated with a Tenant JWT, this parameter is ignored and the JWT's tenant is used.
If not provided with API key auth, returns attempts from all tenants.
| +| `event_id` | [Optional[models.ListAttemptsEventID]](../models/listattemptseventid.md) | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | +| `destination_id` | [Optional[models.DestinationID]](../models/destinationid.md) | :heavy_minus_sign: | Filter attempts by destination ID(s). Use bracket notation for multiple values (e.g., `destination_id[0]=d1&destination_id[1]=d2`). | +| `status` | [Optional[models.ListAttemptsStatus]](../models/listattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | +| `topic` | [Optional[models.ListAttemptsTopic]](../models/listattemptstopic.md) | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | +| `time_gte` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | +| `time_lte` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | +| `time_gt` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | +| `time_lt` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | +| `next_cursor` | *Optional[str]* | :heavy_minus_sign: | Cursor for next page of results. | +| `prev_cursor` | *Optional[str]* | :heavy_minus_sign: | Cursor for previous page of results. | +| `include` | [Optional[models.ListAttemptsInclude]](../models/listattemptsinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `order_by` | [Optional[models.ListAttemptsOrderBy]](../models/listattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | +| `direction` | [Optional[models.ListAttemptsDir]](../models/listattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/listtenantdestinationattemptsinclude.md b/sdks/outpost-python/docs/models/listtenantdestinationattemptsinclude.md index 15c771583..a4b23f4b6 100644 --- a/sdks/outpost-python/docs/models/listtenantdestinationattemptsinclude.md +++ b/sdks/outpost-python/docs/models/listtenantdestinationattemptsinclude.md @@ -4,6 +4,7 @@ Fields to include in the response. Use bracket notation for multiple values (e.g - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object diff --git a/sdks/outpost-python/docs/models/listtenantdestinationattemptsrequest.md b/sdks/outpost-python/docs/models/listtenantdestinationattemptsrequest.md index 38bef260c..3a38e2cd6 100644 --- a/sdks/outpost-python/docs/models/listtenantdestinationattemptsrequest.md +++ b/sdks/outpost-python/docs/models/listtenantdestinationattemptsrequest.md @@ -3,20 +3,20 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tenant_id` | *str* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | -| `destination_id` | *str* | :heavy_check_mark: | The ID of the destination. | -| `event_id` | [Optional[models.ListTenantDestinationAttemptsEventID]](../models/listtenantdestinationattemptseventid.md) | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | -| `status` | [Optional[models.ListTenantDestinationAttemptsStatus]](../models/listtenantdestinationattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | -| `topic` | [Optional[models.ListTenantDestinationAttemptsTopic]](../models/listtenantdestinationattemptstopic.md) | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | -| `time_gte` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | -| `time_lte` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | -| `time_gt` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | -| `time_lt` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | -| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | -| `next_cursor` | *Optional[str]* | :heavy_minus_sign: | Cursor for next page of results. | -| `prev_cursor` | *Optional[str]* | :heavy_minus_sign: | Cursor for previous page of results. | -| `include` | [Optional[models.ListTenantDestinationAttemptsInclude]](../models/listtenantdestinationattemptsinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `order_by` | [Optional[models.ListTenantDestinationAttemptsOrderBy]](../models/listtenantdestinationattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | -| `direction` | [Optional[models.ListTenantDestinationAttemptsDir]](../models/listtenantdestinationattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tenant_id` | *str* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | +| `destination_id` | *str* | :heavy_check_mark: | The ID of the destination. | +| `event_id` | [Optional[models.ListTenantDestinationAttemptsEventID]](../models/listtenantdestinationattemptseventid.md) | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | +| `status` | [Optional[models.ListTenantDestinationAttemptsStatus]](../models/listtenantdestinationattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | +| `topic` | [Optional[models.ListTenantDestinationAttemptsTopic]](../models/listtenantdestinationattemptstopic.md) | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | +| `time_gte` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | +| `time_lte` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | +| `time_gt` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | +| `time_lt` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | +| `next_cursor` | *Optional[str]* | :heavy_minus_sign: | Cursor for next page of results. | +| `prev_cursor` | *Optional[str]* | :heavy_minus_sign: | Cursor for previous page of results. | +| `include` | [Optional[models.ListTenantDestinationAttemptsInclude]](../models/listtenantdestinationattemptsinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `order_by` | [Optional[models.ListTenantDestinationAttemptsOrderBy]](../models/listtenantdestinationattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | +| `direction` | [Optional[models.ListTenantDestinationAttemptsDir]](../models/listtenantdestinationattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/metricsdatapoint.md b/sdks/outpost-python/docs/models/metricsdatapoint.md new file mode 100644 index 000000000..187167123 --- /dev/null +++ b/sdks/outpost-python/docs/models/metricsdatapoint.md @@ -0,0 +1,10 @@ +# MetricsDataPoint + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `time_bucket` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Start of the time bucket. Null when no granularity is specified. | 2026-03-02T14:00:00Z | +| `dimensions` | Dict[str, *str*] | :heavy_minus_sign: | Dimension values for this data point. Empty object when no dimensions are requested. | {
"destination_id": "dest_abc",
"topic": "user.created"
} | +| `metrics` | Dict[str, *Any*] | :heavy_minus_sign: | Requested measure values for this data point. | {
"count": 1423,
"error_rate": 0.02
} | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/metricsmetadata.md b/sdks/outpost-python/docs/models/metricsmetadata.md new file mode 100644 index 000000000..df771d36b --- /dev/null +++ b/sdks/outpost-python/docs/models/metricsmetadata.md @@ -0,0 +1,12 @@ +# MetricsMetadata + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `granularity` | *OptionalNullable[str]* | :heavy_minus_sign: | The granularity used for time bucketing, or null if none was specified. | 1h | +| `query_time_ms` | *Optional[int]* | :heavy_minus_sign: | Query execution time in milliseconds. | 42 | +| `row_count` | *Optional[int]* | :heavy_minus_sign: | Number of data points returned. | 2 | +| `row_limit` | *Optional[int]* | :heavy_minus_sign: | Maximum number of rows the query will return. | 100000 | +| `truncated` | *Optional[bool]* | :heavy_minus_sign: | Whether the results were truncated due to hitting the row limit. | false | \ No newline at end of file diff --git a/sdks/outpost-python/docs/models/metricsresponse.md b/sdks/outpost-python/docs/models/metricsresponse.md new file mode 100644 index 000000000..9aa1b0e3c --- /dev/null +++ b/sdks/outpost-python/docs/models/metricsresponse.md @@ -0,0 +1,9 @@ +# MetricsResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `data` | List[[models.MetricsDataPoint](../models/metricsdatapoint.md)] | :heavy_minus_sign: | Array of aggregated data points. | +| `metadata` | [Optional[models.MetricsMetadata]](../models/metricsmetadata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sdks/outpost-python/docs/sdks/attempts/README.md b/sdks/outpost-python/docs/sdks/attempts/README.md index 91534cacc..53504f53d 100644 --- a/sdks/outpost-python/docs/sdks/attempts/README.md +++ b/sdks/outpost-python/docs/sdks/attempts/README.md @@ -17,6 +17,7 @@ Use the `include` query parameter to include related data: - `include=event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `include=event.data`: Include full event with payload data - `include=response_data`: Include response body and headers from the attempt +- `include=destination`: Include the full destination object with target information ### Available Operations @@ -136,11 +137,11 @@ with Outpost( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `attempt_id` | *str* | :heavy_check_mark: | The ID of the attempt. | -| `include` | [Optional[models.GetAttemptInclude]](../../models/getattemptinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `attempt_id` | *str* | :heavy_check_mark: | The ID of the attempt. | +| `include` | [Optional[models.GetAttemptInclude]](../../models/getattemptinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/sdks/outpost-python/docs/sdks/destinations/README.md b/sdks/outpost-python/docs/sdks/destinations/README.md index 3c9960b0e..ddafa6e9b 100644 --- a/sdks/outpost-python/docs/sdks/destinations/README.md +++ b/sdks/outpost-python/docs/sdks/destinations/README.md @@ -439,13 +439,13 @@ with Outpost( ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tenant_id` | *str* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | -| `destination_id` | *str* | :heavy_check_mark: | The ID of the destination. | -| `attempt_id` | *str* | :heavy_check_mark: | The ID of the attempt. | -| `include` | [Optional[models.GetTenantDestinationAttemptInclude]](../../models/gettenantdestinationattemptinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tenant_id` | *str* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | +| `destination_id` | *str* | :heavy_check_mark: | The ID of the destination. | +| `attempt_id` | *str* | :heavy_check_mark: | The ID of the attempt. | +| `include` | [Optional[models.GetTenantDestinationAttemptInclude]](../../models/gettenantdestinationattemptinclude.md) | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | ### Response diff --git a/sdks/outpost-python/docs/sdks/metrics/README.md b/sdks/outpost-python/docs/sdks/metrics/README.md new file mode 100644 index 000000000..3041abbe1 --- /dev/null +++ b/sdks/outpost-python/docs/sdks/metrics/README.md @@ -0,0 +1,132 @@ +# Metrics + +## Overview + +Aggregated metrics for events and delivery attempts. Supports time bucketing, dimensional grouping, and filtering. + + +### Available Operations + +* [get_event_metrics](#get_event_metrics) - Get Event Metrics +* [get_attempt_metrics](#get_attempt_metrics) - Get Attempt Metrics + +## get_event_metrics + +Returns aggregated event publish metrics. Supports time bucketing via granularity, +dimensional grouping, and filtering. + +**Measures:** `count`, `rate` + +**Dimensions:** `tenant_id` (admin-only), `topic`, `destination_id` + +**Filters:** `tenant_id` (admin-only), `topic`, `destination_id` + + +### Example Usage + + +```python +from outpost_sdk import Outpost, models +from outpost_sdk.utils import parse_datetime + + +with Outpost( + api_key="", +) as outpost: + + res = outpost.metrics.get_event_metrics(request={ + "time_start": parse_datetime("2026-03-02T00:00:00Z"), + "time_end": parse_datetime("2026-03-03T00:00:00Z"), + "granularity": "1h", + "measures": [ + models.GetEventMetricsMeasuresEnum2.COUNT, + ], + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `request` | [models.GetEventMetricsRequest](../../models/geteventmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MetricsResponse](../../models/metricsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequestError | 400 | application/json | +| errors.UnauthorizedError | 401 | application/json | +| errors.APIErrorResponse | 403 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## get_attempt_metrics + +Returns aggregated delivery attempt metrics. Supports time bucketing via granularity, +dimensional grouping, and filtering. + +**Measures:** `count`, `successful_count`, `failed_count`, `error_rate`, +`first_attempt_count`, `retry_count`, `manual_retry_count`, `avg_attempt_number`, +`rate`, `successful_rate`, `failed_rate` + +**Dimensions:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + +**Filters:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + + +### Example Usage + + +```python +from outpost_sdk import Outpost, models +from outpost_sdk.utils import parse_datetime + + +with Outpost( + api_key="", +) as outpost: + + res = outpost.metrics.get_attempt_metrics(request={ + "time_start": parse_datetime("2026-03-02T00:00:00Z"), + "time_end": parse_datetime("2026-03-03T00:00:00Z"), + "granularity": "1h", + "measures": [ + models.GetAttemptMetricsMeasuresEnum2.COUNT, + models.GetAttemptMetricsMeasuresEnum2.ERROR_RATE, + ], + }) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `request` | [models.GetAttemptMetricsRequest](../../models/getattemptmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.MetricsResponse](../../models/metricsresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequestError | 400 | application/json | +| errors.UnauthorizedError | 401 | application/json | +| errors.APIErrorResponse | 403 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sdks/outpost-python/pyproject.toml b/sdks/outpost-python/pyproject.toml index f50ca6701..61d6ebeef 100644 --- a/sdks/outpost-python/pyproject.toml +++ b/sdks/outpost-python/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "outpost_sdk" -version = "0.8.1" +version = "0.8.2" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" diff --git a/sdks/outpost-python/src/outpost_sdk/_version.py b/sdks/outpost-python/src/outpost_sdk/_version.py index 6331143a7..26c32671b 100644 --- a/sdks/outpost-python/src/outpost_sdk/_version.py +++ b/sdks/outpost-python/src/outpost_sdk/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "outpost_sdk" -__version__: str = "0.8.1" +__version__: str = "0.8.2" __openapi_doc_version__: str = "0.0.1" -__gen_version__: str = "2.865.2" -__user_agent__: str = "speakeasy-sdk/python 0.8.1 2.865.2 0.0.1 outpost_sdk" +__gen_version__: str = "2.869.10" +__user_agent__: str = "speakeasy-sdk/python 0.8.2 2.869.10 0.0.1 outpost_sdk" try: if __package__ is not None: diff --git a/sdks/outpost-python/src/outpost_sdk/attempts.py b/sdks/outpost-python/src/outpost_sdk/attempts.py index 06c122eaa..f6a783764 100644 --- a/sdks/outpost-python/src/outpost_sdk/attempts.py +++ b/sdks/outpost-python/src/outpost_sdk/attempts.py @@ -25,6 +25,7 @@ class Attempts(BaseSDK): - `include=event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `include=event.data`: Include full event with payload data - `include=response_data`: Include response body and headers from the attempt + - `include=destination`: Include the full destination object with target information """ @@ -116,7 +117,7 @@ def next_func() -> Optional[models.ListAttemptsResponse]: results = JSONPath("$.models").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if not request.limit is None else 100 + limit = request.limit if isinstance(request.limit, int) else 100 if len(results[0]) < limit: return None @@ -254,7 +255,7 @@ def next_func() -> Optional[models.ListAttemptsResponse]: results = JSONPath("$.models").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if not request.limit is None else 100 + limit = request.limit if isinstance(request.limit, int) else 100 if len(results[0]) < limit: return None @@ -329,6 +330,7 @@ def get( - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -438,6 +440,7 @@ async def get_async( - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method diff --git a/sdks/outpost-python/src/outpost_sdk/destinations.py b/sdks/outpost-python/src/outpost_sdk/destinations.py index d95d2dc59..0463cb24e 100644 --- a/sdks/outpost-python/src/outpost_sdk/destinations.py +++ b/sdks/outpost-python/src/outpost_sdk/destinations.py @@ -1579,7 +1579,7 @@ def next_func() -> Optional[models.ListTenantDestinationAttemptsResponse]: results = JSONPath("$.models").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if not request.limit is None else 100 + limit = request.limit if isinstance(request.limit, int) else 100 if len(results[0]) < limit: return None @@ -1721,7 +1721,7 @@ def next_func() -> Optional[models.ListTenantDestinationAttemptsResponse]: results = JSONPath("$.models").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if not request.limit is None else 100 + limit = request.limit if isinstance(request.limit, int) else 100 if len(results[0]) < limit: return None @@ -1802,6 +1802,7 @@ def get_attempt( - `event`: Include event summary - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method @@ -1916,6 +1917,7 @@ async def get_attempt_async( - `event`: Include event summary - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method diff --git a/sdks/outpost-python/src/outpost_sdk/events.py b/sdks/outpost-python/src/outpost_sdk/events.py index 27ac65497..7db53c464 100644 --- a/sdks/outpost-python/src/outpost_sdk/events.py +++ b/sdks/outpost-python/src/outpost_sdk/events.py @@ -100,7 +100,7 @@ def next_func() -> Optional[models.ListEventsResponse]: results = JSONPath("$.models").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if not request.limit is None else 100 + limit = request.limit if isinstance(request.limit, int) else 100 if len(results[0]) < limit: return None @@ -235,7 +235,7 @@ def next_func() -> Optional[models.ListEventsResponse]: results = JSONPath("$.models").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if not request.limit is None else 100 + limit = request.limit if isinstance(request.limit, int) else 100 if len(results[0]) < limit: return None diff --git a/sdks/outpost-python/src/outpost_sdk/metrics.py b/sdks/outpost-python/src/outpost_sdk/metrics.py new file mode 100644 index 000000000..d17e87a11 --- /dev/null +++ b/sdks/outpost-python/src/outpost_sdk/metrics.py @@ -0,0 +1,468 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from outpost_sdk import errors, models, utils +from outpost_sdk._hooks import HookContext +from outpost_sdk.types import BaseModel, OptionalNullable, UNSET +from outpost_sdk.utils.unmarshal_json_response import unmarshal_json_response +from typing import Any, Mapping, Optional, Union, cast + + +class Metrics(BaseSDK): + r"""Aggregated metrics for events and delivery attempts. Supports time bucketing, dimensional grouping, and filtering.""" + + def get_event_metrics( + self, + *, + request: Union[ + models.GetEventMetricsRequest, models.GetEventMetricsRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MetricsResponse: + r"""Get Event Metrics + + Returns aggregated event publish metrics. Supports time bucketing via granularity, + dimensional grouping, and filtering. + + **Measures:** `count`, `rate` + + **Dimensions:** `tenant_id` (admin-only), `topic`, `destination_id` + + **Filters:** `tenant_id` (admin-only), `topic`, `destination_id` + + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.GetEventMetricsRequest) + request = cast(models.GetEventMetricsRequest, request) + + req = self._build_request( + method="GET", + path="/metrics/events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getEventMetrics", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MetricsResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestErrorData, http_res + ) + raise errors.BadRequestError(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + errors.UnauthorizedErrorData, http_res + ) + raise errors.UnauthorizedError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.APIErrorResponseData, http_res + ) + raise errors.APIErrorResponse(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response( + errors.InternalServerErrorData, http_res + ) + raise errors.InternalServerError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + + raise errors.APIError("Unexpected response received", http_res) + + async def get_event_metrics_async( + self, + *, + request: Union[ + models.GetEventMetricsRequest, models.GetEventMetricsRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MetricsResponse: + r"""Get Event Metrics + + Returns aggregated event publish metrics. Supports time bucketing via granularity, + dimensional grouping, and filtering. + + **Measures:** `count`, `rate` + + **Dimensions:** `tenant_id` (admin-only), `topic`, `destination_id` + + **Filters:** `tenant_id` (admin-only), `topic`, `destination_id` + + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.GetEventMetricsRequest) + request = cast(models.GetEventMetricsRequest, request) + + req = self._build_request_async( + method="GET", + path="/metrics/events", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getEventMetrics", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MetricsResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestErrorData, http_res + ) + raise errors.BadRequestError(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + errors.UnauthorizedErrorData, http_res + ) + raise errors.UnauthorizedError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.APIErrorResponseData, http_res + ) + raise errors.APIErrorResponse(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response( + errors.InternalServerErrorData, http_res + ) + raise errors.InternalServerError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + + raise errors.APIError("Unexpected response received", http_res) + + def get_attempt_metrics( + self, + *, + request: Union[ + models.GetAttemptMetricsRequest, models.GetAttemptMetricsRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MetricsResponse: + r"""Get Attempt Metrics + + Returns aggregated delivery attempt metrics. Supports time bucketing via granularity, + dimensional grouping, and filtering. + + **Measures:** `count`, `successful_count`, `failed_count`, `error_rate`, + `first_attempt_count`, `retry_count`, `manual_retry_count`, `avg_attempt_number`, + `rate`, `successful_rate`, `failed_rate` + + **Dimensions:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + + **Filters:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.GetAttemptMetricsRequest) + request = cast(models.GetAttemptMetricsRequest, request) + + req = self._build_request( + method="GET", + path="/metrics/attempts", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getAttemptMetrics", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MetricsResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestErrorData, http_res + ) + raise errors.BadRequestError(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + errors.UnauthorizedErrorData, http_res + ) + raise errors.UnauthorizedError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.APIErrorResponseData, http_res + ) + raise errors.APIErrorResponse(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response( + errors.InternalServerErrorData, http_res + ) + raise errors.InternalServerError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + + raise errors.APIError("Unexpected response received", http_res) + + async def get_attempt_metrics_async( + self, + *, + request: Union[ + models.GetAttemptMetricsRequest, models.GetAttemptMetricsRequestTypedDict + ], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.MetricsResponse: + r"""Get Attempt Metrics + + Returns aggregated delivery attempt metrics. Supports time bucketing via granularity, + dimensional grouping, and filtering. + + **Measures:** `count`, `successful_count`, `failed_count`, `error_rate`, + `first_attempt_count`, `retry_count`, `manual_retry_count`, `avg_attempt_number`, + `rate`, `successful_rate`, `failed_rate` + + **Dimensions:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + + **Filters:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, models.GetAttemptMetricsRequest) + request = cast(models.GetAttemptMetricsRequest, request) + + req = self._build_request_async( + method="GET", + path="/metrics/attempts", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="getAttemptMetrics", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "403", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response(models.MetricsResponse, http_res) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + errors.BadRequestErrorData, http_res + ) + raise errors.BadRequestError(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + errors.UnauthorizedErrorData, http_res + ) + raise errors.UnauthorizedError(response_data, http_res) + if utils.match_response(http_res, "403", "application/json"): + response_data = unmarshal_json_response( + errors.APIErrorResponseData, http_res + ) + raise errors.APIErrorResponse(response_data, http_res) + if utils.match_response(http_res, "500", "application/json"): + response_data = unmarshal_json_response( + errors.InternalServerErrorData, http_res + ) + raise errors.InternalServerError(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.APIError("API error occurred", http_res, http_res_text) + + raise errors.APIError("Unexpected response received", http_res) diff --git a/sdks/outpost-python/src/outpost_sdk/models/__init__.py b/sdks/outpost-python/src/outpost_sdk/models/__init__.py index 23477ccc0..cdd2550cb 100644 --- a/sdks/outpost-python/src/outpost_sdk/models/__init__.py +++ b/sdks/outpost-python/src/outpost_sdk/models/__init__.py @@ -8,6 +8,10 @@ from .attempt import ( Attempt, AttemptTypedDict, + EventFull, + EventFullTypedDict, + EventSummary, + EventSummaryTypedDict, EventUnion, EventUnionTypedDict, Status, @@ -176,17 +180,42 @@ EnableTenantDestinationRequestTypedDict, ) from .event import Event, EventTypedDict - from .eventfull import EventFull, EventFullTypedDict from .eventpaginatedresult import ( EventPaginatedResult, EventPaginatedResultTypedDict, ) - from .eventsummary import EventSummary, EventSummaryTypedDict from .gcppubsubconfig import GCPPubSubConfig, GCPPubSubConfigTypedDict from .gcppubsubcredentials import ( GCPPubSubCredentials, GCPPubSubCredentialsTypedDict, ) + from .getattemptmetricsop import ( + FiltersAttemptNumber, + FiltersAttemptNumberTypedDict, + FiltersCode, + FiltersCodeTypedDict, + FiltersManual, + FiltersStatus, + FiltersStatusEnum1, + FiltersStatusEnum2, + FiltersStatusTypedDict, + GetAttemptMetricsDimensionsEnum1, + GetAttemptMetricsDimensionsEnum2, + GetAttemptMetricsDimensionsUnion, + GetAttemptMetricsDimensionsUnionTypedDict, + GetAttemptMetricsFiltersDestinationID, + GetAttemptMetricsFiltersDestinationIDTypedDict, + GetAttemptMetricsFiltersTenantID, + GetAttemptMetricsFiltersTenantIDTypedDict, + GetAttemptMetricsFiltersTopic, + GetAttemptMetricsFiltersTopicTypedDict, + GetAttemptMetricsMeasuresEnum1, + GetAttemptMetricsMeasuresEnum2, + GetAttemptMetricsMeasuresUnion, + GetAttemptMetricsMeasuresUnionTypedDict, + GetAttemptMetricsRequest, + GetAttemptMetricsRequestTypedDict, + ) from .getattemptop import ( GetAttemptInclude, GetAttemptIncludeTypedDict, @@ -198,6 +227,24 @@ GetDestinationTypeSchemaRequestTypedDict, GetDestinationTypeSchemaType, ) + from .geteventmetricsop import ( + GetEventMetricsDimensionsEnum1, + GetEventMetricsDimensionsEnum2, + GetEventMetricsDimensionsUnion, + GetEventMetricsDimensionsUnionTypedDict, + GetEventMetricsFiltersDestinationID, + GetEventMetricsFiltersDestinationIDTypedDict, + GetEventMetricsFiltersTenantID, + GetEventMetricsFiltersTenantIDTypedDict, + GetEventMetricsFiltersTopic, + GetEventMetricsFiltersTopicTypedDict, + GetEventMetricsMeasuresEnum1, + GetEventMetricsMeasuresEnum2, + GetEventMetricsMeasuresUnion, + GetEventMetricsMeasuresUnionTypedDict, + GetEventMetricsRequest, + GetEventMetricsRequestTypedDict, + ) from .geteventop import GetEventRequest, GetEventRequestTypedDict from .gettenantdestinationattemptop import ( GetTenantDestinationAttemptInclude, @@ -290,6 +337,9 @@ ListTenantsResponse, ListTenantsResponseTypedDict, ) + from .metricsdatapoint import MetricsDataPoint, MetricsDataPointTypedDict + from .metricsmetadata import MetricsMetadata, MetricsMetadataTypedDict + from .metricsresponse import MetricsResponse, MetricsResponseTypedDict from .portalredirect import PortalRedirect, PortalRedirectTypedDict from .publishrequest import PublishRequest, PublishRequestTypedDict from .publishresponse import PublishResponse, PublishResponseTypedDict @@ -441,17 +491,58 @@ "EventTypedDict", "EventUnion", "EventUnionTypedDict", + "FiltersAttemptNumber", + "FiltersAttemptNumberTypedDict", + "FiltersCode", + "FiltersCodeTypedDict", + "FiltersManual", + "FiltersStatus", + "FiltersStatusEnum1", + "FiltersStatusEnum2", + "FiltersStatusTypedDict", "GCPPubSubConfig", "GCPPubSubConfigTypedDict", "GCPPubSubCredentials", "GCPPubSubCredentialsTypedDict", "GetAttemptInclude", "GetAttemptIncludeTypedDict", + "GetAttemptMetricsDimensionsEnum1", + "GetAttemptMetricsDimensionsEnum2", + "GetAttemptMetricsDimensionsUnion", + "GetAttemptMetricsDimensionsUnionTypedDict", + "GetAttemptMetricsFiltersDestinationID", + "GetAttemptMetricsFiltersDestinationIDTypedDict", + "GetAttemptMetricsFiltersTenantID", + "GetAttemptMetricsFiltersTenantIDTypedDict", + "GetAttemptMetricsFiltersTopic", + "GetAttemptMetricsFiltersTopicTypedDict", + "GetAttemptMetricsMeasuresEnum1", + "GetAttemptMetricsMeasuresEnum2", + "GetAttemptMetricsMeasuresUnion", + "GetAttemptMetricsMeasuresUnionTypedDict", + "GetAttemptMetricsRequest", + "GetAttemptMetricsRequestTypedDict", "GetAttemptRequest", "GetAttemptRequestTypedDict", "GetDestinationTypeSchemaRequest", "GetDestinationTypeSchemaRequestTypedDict", "GetDestinationTypeSchemaType", + "GetEventMetricsDimensionsEnum1", + "GetEventMetricsDimensionsEnum2", + "GetEventMetricsDimensionsUnion", + "GetEventMetricsDimensionsUnionTypedDict", + "GetEventMetricsFiltersDestinationID", + "GetEventMetricsFiltersDestinationIDTypedDict", + "GetEventMetricsFiltersTenantID", + "GetEventMetricsFiltersTenantIDTypedDict", + "GetEventMetricsFiltersTopic", + "GetEventMetricsFiltersTopicTypedDict", + "GetEventMetricsMeasuresEnum1", + "GetEventMetricsMeasuresEnum2", + "GetEventMetricsMeasuresUnion", + "GetEventMetricsMeasuresUnionTypedDict", + "GetEventMetricsRequest", + "GetEventMetricsRequestTypedDict", "GetEventRequest", "GetEventRequestTypedDict", "GetTenantDestinationAttemptInclude", @@ -525,6 +616,12 @@ "ListTenantsRequestTypedDict", "ListTenantsResponse", "ListTenantsResponseTypedDict", + "MetricsDataPoint", + "MetricsDataPointTypedDict", + "MetricsMetadata", + "MetricsMetadataTypedDict", + "MetricsResponse", + "MetricsResponseTypedDict", "PortalRedirect", "PortalRedirectTypedDict", "PublishRequest", @@ -576,6 +673,10 @@ _dynamic_imports: dict[str, str] = { "Attempt": ".attempt", "AttemptTypedDict": ".attempt", + "EventFull": ".attempt", + "EventFullTypedDict": ".attempt", + "EventSummary": ".attempt", + "EventSummaryTypedDict": ".attempt", "EventUnion": ".attempt", "EventUnionTypedDict": ".attempt", "Status": ".attempt", @@ -685,16 +786,37 @@ "EnableTenantDestinationRequestTypedDict": ".enabletenantdestinationop", "Event": ".event", "EventTypedDict": ".event", - "EventFull": ".eventfull", - "EventFullTypedDict": ".eventfull", "EventPaginatedResult": ".eventpaginatedresult", "EventPaginatedResultTypedDict": ".eventpaginatedresult", - "EventSummary": ".eventsummary", - "EventSummaryTypedDict": ".eventsummary", "GCPPubSubConfig": ".gcppubsubconfig", "GCPPubSubConfigTypedDict": ".gcppubsubconfig", "GCPPubSubCredentials": ".gcppubsubcredentials", "GCPPubSubCredentialsTypedDict": ".gcppubsubcredentials", + "FiltersAttemptNumber": ".getattemptmetricsop", + "FiltersAttemptNumberTypedDict": ".getattemptmetricsop", + "FiltersCode": ".getattemptmetricsop", + "FiltersCodeTypedDict": ".getattemptmetricsop", + "FiltersManual": ".getattemptmetricsop", + "FiltersStatus": ".getattemptmetricsop", + "FiltersStatusEnum1": ".getattemptmetricsop", + "FiltersStatusEnum2": ".getattemptmetricsop", + "FiltersStatusTypedDict": ".getattemptmetricsop", + "GetAttemptMetricsDimensionsEnum1": ".getattemptmetricsop", + "GetAttemptMetricsDimensionsEnum2": ".getattemptmetricsop", + "GetAttemptMetricsDimensionsUnion": ".getattemptmetricsop", + "GetAttemptMetricsDimensionsUnionTypedDict": ".getattemptmetricsop", + "GetAttemptMetricsFiltersDestinationID": ".getattemptmetricsop", + "GetAttemptMetricsFiltersDestinationIDTypedDict": ".getattemptmetricsop", + "GetAttemptMetricsFiltersTenantID": ".getattemptmetricsop", + "GetAttemptMetricsFiltersTenantIDTypedDict": ".getattemptmetricsop", + "GetAttemptMetricsFiltersTopic": ".getattemptmetricsop", + "GetAttemptMetricsFiltersTopicTypedDict": ".getattemptmetricsop", + "GetAttemptMetricsMeasuresEnum1": ".getattemptmetricsop", + "GetAttemptMetricsMeasuresEnum2": ".getattemptmetricsop", + "GetAttemptMetricsMeasuresUnion": ".getattemptmetricsop", + "GetAttemptMetricsMeasuresUnionTypedDict": ".getattemptmetricsop", + "GetAttemptMetricsRequest": ".getattemptmetricsop", + "GetAttemptMetricsRequestTypedDict": ".getattemptmetricsop", "GetAttemptInclude": ".getattemptop", "GetAttemptIncludeTypedDict": ".getattemptop", "GetAttemptRequest": ".getattemptop", @@ -702,6 +824,22 @@ "GetDestinationTypeSchemaRequest": ".getdestinationtypeschemaop", "GetDestinationTypeSchemaRequestTypedDict": ".getdestinationtypeschemaop", "GetDestinationTypeSchemaType": ".getdestinationtypeschemaop", + "GetEventMetricsDimensionsEnum1": ".geteventmetricsop", + "GetEventMetricsDimensionsEnum2": ".geteventmetricsop", + "GetEventMetricsDimensionsUnion": ".geteventmetricsop", + "GetEventMetricsDimensionsUnionTypedDict": ".geteventmetricsop", + "GetEventMetricsFiltersDestinationID": ".geteventmetricsop", + "GetEventMetricsFiltersDestinationIDTypedDict": ".geteventmetricsop", + "GetEventMetricsFiltersTenantID": ".geteventmetricsop", + "GetEventMetricsFiltersTenantIDTypedDict": ".geteventmetricsop", + "GetEventMetricsFiltersTopic": ".geteventmetricsop", + "GetEventMetricsFiltersTopicTypedDict": ".geteventmetricsop", + "GetEventMetricsMeasuresEnum1": ".geteventmetricsop", + "GetEventMetricsMeasuresEnum2": ".geteventmetricsop", + "GetEventMetricsMeasuresUnion": ".geteventmetricsop", + "GetEventMetricsMeasuresUnionTypedDict": ".geteventmetricsop", + "GetEventMetricsRequest": ".geteventmetricsop", + "GetEventMetricsRequestTypedDict": ".geteventmetricsop", "GetEventRequest": ".geteventop", "GetEventRequestTypedDict": ".geteventop", "GetTenantDestinationAttemptInclude": ".gettenantdestinationattemptop", @@ -780,6 +918,12 @@ "ListTenantsRequestTypedDict": ".listtenantsop", "ListTenantsResponse": ".listtenantsop", "ListTenantsResponseTypedDict": ".listtenantsop", + "MetricsDataPoint": ".metricsdatapoint", + "MetricsDataPointTypedDict": ".metricsdatapoint", + "MetricsMetadata": ".metricsmetadata", + "MetricsMetadataTypedDict": ".metricsmetadata", + "MetricsResponse": ".metricsresponse", + "MetricsResponseTypedDict": ".metricsresponse", "PortalRedirect": ".portalredirect", "PortalRedirectTypedDict": ".portalredirect", "PublishRequest": ".publishrequest", diff --git a/sdks/outpost-python/src/outpost_sdk/models/attempt.py b/sdks/outpost-python/src/outpost_sdk/models/attempt.py index c13f62510..5843193d1 100644 --- a/sdks/outpost-python/src/outpost_sdk/models/attempt.py +++ b/sdks/outpost-python/src/outpost_sdk/models/attempt.py @@ -1,11 +1,16 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from .eventfull import EventFull, EventFullTypedDict -from .eventsummary import EventSummary, EventSummaryTypedDict +from .destination import Destination, DestinationTypedDict from datetime import datetime from enum import Enum -from outpost_sdk.types import BaseModel, UNSET_SENTINEL +from outpost_sdk.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) from pydantic import model_serializer from typing import Any, Dict, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -18,6 +23,158 @@ class Status(str, Enum): FAILED = "failed" +class EventFullTypedDict(TypedDict): + r"""Full event object with data (returned when include=event.data).""" + + id: NotRequired[str] + tenant_id: NotRequired[str] + r"""The tenant this event belongs to.""" + destination_id: NotRequired[str] + r"""The destination this event was delivered to.""" + topic: NotRequired[str] + time: NotRequired[datetime] + r"""Time the event was received.""" + eligible_for_retry: NotRequired[bool] + r"""Whether this event can be retried.""" + metadata: NotRequired[Nullable[Dict[str, str]]] + data: NotRequired[Dict[str, Any]] + r"""The event payload data.""" + + +class EventFull(BaseModel): + r"""Full event object with data (returned when include=event.data).""" + + id: Optional[str] = None + + tenant_id: Optional[str] = None + r"""The tenant this event belongs to.""" + + destination_id: Optional[str] = None + r"""The destination this event was delivered to.""" + + topic: Optional[str] = None + + time: Optional[datetime] = None + r"""Time the event was received.""" + + eligible_for_retry: Optional[bool] = None + r"""Whether this event can be retried.""" + + metadata: OptionalNullable[Dict[str, str]] = UNSET + + data: Optional[Dict[str, Any]] = None + r"""The event payload data.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "id", + "tenant_id", + "destination_id", + "topic", + "time", + "eligible_for_retry", + "metadata", + "data", + ] + ) + nullable_fields = set(["metadata"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + +class EventSummaryTypedDict(TypedDict): + r"""Event object without data (returned when include=event).""" + + id: NotRequired[str] + tenant_id: NotRequired[str] + r"""The tenant this event belongs to.""" + destination_id: NotRequired[str] + r"""The destination this event was delivered to.""" + topic: NotRequired[str] + time: NotRequired[datetime] + r"""Time the event was received.""" + eligible_for_retry: NotRequired[bool] + r"""Whether this event can be retried.""" + metadata: NotRequired[Nullable[Dict[str, str]]] + + +class EventSummary(BaseModel): + r"""Event object without data (returned when include=event).""" + + id: Optional[str] = None + + tenant_id: Optional[str] = None + r"""The tenant this event belongs to.""" + + destination_id: Optional[str] = None + r"""The destination this event was delivered to.""" + + topic: Optional[str] = None + + time: Optional[datetime] = None + r"""Time the event was received.""" + + eligible_for_retry: Optional[bool] = None + r"""Whether this event can be retried.""" + + metadata: OptionalNullable[Dict[str, str]] = UNSET + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "id", + "tenant_id", + "destination_id", + "topic", + "time", + "eligible_for_retry", + "metadata", + ] + ) + nullable_fields = set(["metadata"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m + + EventUnionTypedDict = TypeAliasType( "EventUnionTypedDict", Union[EventSummaryTypedDict, EventFullTypedDict] ) @@ -41,7 +198,7 @@ class AttemptTypedDict(TypedDict): r"""Time the attempt was made.""" code: NotRequired[str] r"""Response status code or error code.""" - response_data: NotRequired[Dict[str, Any]] + response_data: NotRequired[Nullable[Dict[str, Any]]] r"""Response data from the attempt. Only included when include=response_data.""" attempt_number: NotRequired[int] r"""The attempt number (1 for first attempt, 2+ for retries).""" @@ -51,8 +208,9 @@ class AttemptTypedDict(TypedDict): r"""The ID of the associated event.""" destination_id: NotRequired[str] r"""The destination ID this attempt was sent to.""" - event: NotRequired[EventUnionTypedDict] + event: NotRequired[Nullable[EventUnionTypedDict]] r"""The associated event object. Only present when include=event or include=event.data.""" + destination: NotRequired[DestinationTypedDict] class Attempt(BaseModel): @@ -73,7 +231,7 @@ class Attempt(BaseModel): code: Optional[str] = None r"""Response status code or error code.""" - response_data: Optional[Dict[str, Any]] = None + response_data: OptionalNullable[Dict[str, Any]] = UNSET r"""Response data from the attempt. Only included when include=response_data.""" attempt_number: Optional[int] = None @@ -88,9 +246,11 @@ class Attempt(BaseModel): destination_id: Optional[str] = None r"""The destination ID this attempt was sent to.""" - event: Optional[EventUnion] = None + event: OptionalNullable[EventUnion] = UNSET r"""The associated event object. Only present when include=event or include=event.data.""" + destination: Optional[Destination] = None + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = set( @@ -106,17 +266,27 @@ def serialize_model(self, handler): "event_id", "destination_id", "event", + "destination", ] ) + nullable_fields = set(["response_data", "event"]) serialized = handler(self) m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) if val != UNSET_SENTINEL: - if val is not None or k not in optional_fields: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): m[k] = val return m diff --git a/sdks/outpost-python/src/outpost_sdk/models/eventfull.py b/sdks/outpost-python/src/outpost_sdk/models/eventfull.py deleted file mode 100644 index 8db47be89..000000000 --- a/sdks/outpost-python/src/outpost_sdk/models/eventfull.py +++ /dev/null @@ -1,93 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from datetime import datetime -from outpost_sdk.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Any, Dict, Optional -from typing_extensions import NotRequired, TypedDict - - -class EventFullTypedDict(TypedDict): - r"""Full event object with data (returned when include=event.data).""" - - id: NotRequired[str] - tenant_id: NotRequired[str] - r"""The tenant this event belongs to.""" - destination_id: NotRequired[str] - r"""The destination this event was delivered to.""" - topic: NotRequired[str] - time: NotRequired[datetime] - r"""Time the event was received.""" - eligible_for_retry: NotRequired[bool] - r"""Whether this event can be retried.""" - metadata: NotRequired[Nullable[Dict[str, str]]] - data: NotRequired[Dict[str, Any]] - r"""The event payload data.""" - - -class EventFull(BaseModel): - r"""Full event object with data (returned when include=event.data).""" - - id: Optional[str] = None - - tenant_id: Optional[str] = None - r"""The tenant this event belongs to.""" - - destination_id: Optional[str] = None - r"""The destination this event was delivered to.""" - - topic: Optional[str] = None - - time: Optional[datetime] = None - r"""Time the event was received.""" - - eligible_for_retry: Optional[bool] = None - r"""Whether this event can be retried.""" - - metadata: OptionalNullable[Dict[str, str]] = UNSET - - data: Optional[Dict[str, Any]] = None - r"""The event payload data.""" - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - [ - "id", - "tenant_id", - "destination_id", - "topic", - "time", - "eligible_for_retry", - "metadata", - "data", - ] - ) - nullable_fields = set(["metadata"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m diff --git a/sdks/outpost-python/src/outpost_sdk/models/eventsummary.py b/sdks/outpost-python/src/outpost_sdk/models/eventsummary.py deleted file mode 100644 index 1609f1df2..000000000 --- a/sdks/outpost-python/src/outpost_sdk/models/eventsummary.py +++ /dev/null @@ -1,87 +0,0 @@ -"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" - -from __future__ import annotations -from datetime import datetime -from outpost_sdk.types import ( - BaseModel, - Nullable, - OptionalNullable, - UNSET, - UNSET_SENTINEL, -) -from pydantic import model_serializer -from typing import Dict, Optional -from typing_extensions import NotRequired, TypedDict - - -class EventSummaryTypedDict(TypedDict): - r"""Event object without data (returned when include=event).""" - - id: NotRequired[str] - tenant_id: NotRequired[str] - r"""The tenant this event belongs to.""" - destination_id: NotRequired[str] - r"""The destination this event was delivered to.""" - topic: NotRequired[str] - time: NotRequired[datetime] - r"""Time the event was received.""" - eligible_for_retry: NotRequired[bool] - r"""Whether this event can be retried.""" - metadata: NotRequired[Nullable[Dict[str, str]]] - - -class EventSummary(BaseModel): - r"""Event object without data (returned when include=event).""" - - id: Optional[str] = None - - tenant_id: Optional[str] = None - r"""The tenant this event belongs to.""" - - destination_id: Optional[str] = None - r"""The destination this event was delivered to.""" - - topic: Optional[str] = None - - time: Optional[datetime] = None - r"""Time the event was received.""" - - eligible_for_retry: Optional[bool] = None - r"""Whether this event can be retried.""" - - metadata: OptionalNullable[Dict[str, str]] = UNSET - - @model_serializer(mode="wrap") - def serialize_model(self, handler): - optional_fields = set( - [ - "id", - "tenant_id", - "destination_id", - "topic", - "time", - "eligible_for_retry", - "metadata", - ] - ) - nullable_fields = set(["metadata"]) - serialized = handler(self) - m = {} - - for n, f in type(self).model_fields.items(): - k = f.alias or n - val = serialized.get(k, serialized.get(n)) - is_nullable_and_explicitly_set = ( - k in nullable_fields - and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member - ) - - if val != UNSET_SENTINEL: - if ( - val is not None - or k not in optional_fields - or is_nullable_and_explicitly_set - ): - m[k] = val - - return m diff --git a/sdks/outpost-python/src/outpost_sdk/models/getattemptmetricsop.py b/sdks/outpost-python/src/outpost_sdk/models/getattemptmetricsop.py new file mode 100644 index 000000000..8a8d9e7a4 --- /dev/null +++ b/sdks/outpost-python/src/outpost_sdk/models/getattemptmetricsop.py @@ -0,0 +1,316 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +from outpost_sdk.types import BaseModel, UNSET_SENTINEL +from outpost_sdk.utils import FieldMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +class GetAttemptMetricsMeasuresEnum2(str, Enum): + COUNT = "count" + SUCCESSFUL_COUNT = "successful_count" + FAILED_COUNT = "failed_count" + ERROR_RATE = "error_rate" + FIRST_ATTEMPT_COUNT = "first_attempt_count" + RETRY_COUNT = "retry_count" + MANUAL_RETRY_COUNT = "manual_retry_count" + AVG_ATTEMPT_NUMBER = "avg_attempt_number" + RATE = "rate" + SUCCESSFUL_RATE = "successful_rate" + FAILED_RATE = "failed_rate" + + +class GetAttemptMetricsMeasuresEnum1(str, Enum): + COUNT = "count" + SUCCESSFUL_COUNT = "successful_count" + FAILED_COUNT = "failed_count" + ERROR_RATE = "error_rate" + FIRST_ATTEMPT_COUNT = "first_attempt_count" + RETRY_COUNT = "retry_count" + MANUAL_RETRY_COUNT = "manual_retry_count" + AVG_ATTEMPT_NUMBER = "avg_attempt_number" + RATE = "rate" + SUCCESSFUL_RATE = "successful_rate" + FAILED_RATE = "failed_rate" + + +GetAttemptMetricsMeasuresUnionTypedDict = TypeAliasType( + "GetAttemptMetricsMeasuresUnionTypedDict", + Union[GetAttemptMetricsMeasuresEnum1, List[GetAttemptMetricsMeasuresEnum2]], +) +r"""Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`).""" + + +GetAttemptMetricsMeasuresUnion = TypeAliasType( + "GetAttemptMetricsMeasuresUnion", + Union[GetAttemptMetricsMeasuresEnum1, List[GetAttemptMetricsMeasuresEnum2]], +) +r"""Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`).""" + + +class GetAttemptMetricsDimensionsEnum2(str, Enum): + TENANT_ID = "tenant_id" + DESTINATION_ID = "destination_id" + TOPIC = "topic" + STATUS = "status" + CODE = "code" + MANUAL = "manual" + ATTEMPT_NUMBER = "attempt_number" + + +class GetAttemptMetricsDimensionsEnum1(str, Enum): + TENANT_ID = "tenant_id" + DESTINATION_ID = "destination_id" + TOPIC = "topic" + STATUS = "status" + CODE = "code" + MANUAL = "manual" + ATTEMPT_NUMBER = "attempt_number" + + +GetAttemptMetricsDimensionsUnionTypedDict = TypeAliasType( + "GetAttemptMetricsDimensionsUnionTypedDict", + Union[GetAttemptMetricsDimensionsEnum1, List[GetAttemptMetricsDimensionsEnum2]], +) +r"""Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`).""" + + +GetAttemptMetricsDimensionsUnion = TypeAliasType( + "GetAttemptMetricsDimensionsUnion", + Union[GetAttemptMetricsDimensionsEnum1, List[GetAttemptMetricsDimensionsEnum2]], +) +r"""Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`).""" + + +GetAttemptMetricsFiltersDestinationIDTypedDict = TypeAliasType( + "GetAttemptMetricsFiltersDestinationIDTypedDict", Union[str, List[str]] +) +r"""Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`).""" + + +GetAttemptMetricsFiltersDestinationID = TypeAliasType( + "GetAttemptMetricsFiltersDestinationID", Union[str, List[str]] +) +r"""Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`).""" + + +GetAttemptMetricsFiltersTopicTypedDict = TypeAliasType( + "GetAttemptMetricsFiltersTopicTypedDict", Union[str, List[str]] +) +r"""Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`).""" + + +GetAttemptMetricsFiltersTopic = TypeAliasType( + "GetAttemptMetricsFiltersTopic", Union[str, List[str]] +) +r"""Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`).""" + + +class FiltersStatusEnum2(str, Enum): + SUCCESS = "success" + FAILED = "failed" + + +class FiltersStatusEnum1(str, Enum): + SUCCESS = "success" + FAILED = "failed" + + +FiltersStatusTypedDict = TypeAliasType( + "FiltersStatusTypedDict", Union[FiltersStatusEnum1, List[FiltersStatusEnum2]] +) +r"""Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`).""" + + +FiltersStatus = TypeAliasType( + "FiltersStatus", Union[FiltersStatusEnum1, List[FiltersStatusEnum2]] +) +r"""Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`).""" + + +FiltersCodeTypedDict = TypeAliasType("FiltersCodeTypedDict", Union[str, List[str]]) +r"""Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`).""" + + +FiltersCode = TypeAliasType("FiltersCode", Union[str, List[str]]) +r"""Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`).""" + + +class FiltersManual(str, Enum): + r"""Filter by manual retry flag.""" + + TRUE = "true" + FALSE = "false" + + +FiltersAttemptNumberTypedDict = TypeAliasType( + "FiltersAttemptNumberTypedDict", Union[str, List[str]] +) +r"""Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`).""" + + +FiltersAttemptNumber = TypeAliasType("FiltersAttemptNumber", Union[str, List[str]]) +r"""Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`).""" + + +GetAttemptMetricsFiltersTenantIDTypedDict = TypeAliasType( + "GetAttemptMetricsFiltersTenantIDTypedDict", Union[str, List[str]] +) +r"""Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`).""" + + +GetAttemptMetricsFiltersTenantID = TypeAliasType( + "GetAttemptMetricsFiltersTenantID", Union[str, List[str]] +) +r"""Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`).""" + + +class GetAttemptMetricsRequestTypedDict(TypedDict): + time_start: datetime + r"""Start of the time range (inclusive). ISO 8601 timestamp.""" + time_end: datetime + r"""End of the time range (exclusive). ISO 8601 timestamp.""" + measures: GetAttemptMetricsMeasuresUnionTypedDict + r"""Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`).""" + granularity: NotRequired[str] + r"""Time bucketing granularity. Pattern: ``. + Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12). + When omitted, returns a single aggregate row per dimension combination. + + """ + dimensions: NotRequired[GetAttemptMetricsDimensionsUnionTypedDict] + r"""Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`).""" + filters_destination_id: NotRequired[GetAttemptMetricsFiltersDestinationIDTypedDict] + r"""Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`).""" + filters_topic: NotRequired[GetAttemptMetricsFiltersTopicTypedDict] + r"""Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`).""" + filters_status: NotRequired[FiltersStatusTypedDict] + r"""Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`).""" + filters_code: NotRequired[FiltersCodeTypedDict] + r"""Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`).""" + filters_manual: NotRequired[FiltersManual] + r"""Filter by manual retry flag.""" + filters_attempt_number: NotRequired[FiltersAttemptNumberTypedDict] + r"""Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`).""" + filters_tenant_id: NotRequired[GetAttemptMetricsFiltersTenantIDTypedDict] + r"""Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`).""" + + +class GetAttemptMetricsRequest(BaseModel): + time_start: Annotated[ + datetime, + pydantic.Field(alias="time[start]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Start of the time range (inclusive). ISO 8601 timestamp.""" + + time_end: Annotated[ + datetime, + pydantic.Field(alias="time[end]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""End of the time range (exclusive). ISO 8601 timestamp.""" + + measures: Annotated[ + GetAttemptMetricsMeasuresUnion, + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`).""" + + granularity: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Time bucketing granularity. Pattern: ``. + Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12). + When omitted, returns a single aggregate row per dimension combination. + + """ + + dimensions: Annotated[ + Optional[GetAttemptMetricsDimensionsUnion], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`).""" + + filters_destination_id: Annotated[ + Optional[GetAttemptMetricsFiltersDestinationID], + pydantic.Field(alias="filters[destination_id]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`).""" + + filters_topic: Annotated[ + Optional[GetAttemptMetricsFiltersTopic], + pydantic.Field(alias="filters[topic]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`).""" + + filters_status: Annotated[ + Optional[FiltersStatus], + pydantic.Field(alias="filters[status]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`).""" + + filters_code: Annotated[ + Optional[FiltersCode], + pydantic.Field(alias="filters[code]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`).""" + + filters_manual: Annotated[ + Optional[FiltersManual], + pydantic.Field(alias="filters[manual]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter by manual retry flag.""" + + filters_attempt_number: Annotated[ + Optional[FiltersAttemptNumber], + pydantic.Field(alias="filters[attempt_number]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`).""" + + filters_tenant_id: Annotated[ + Optional[GetAttemptMetricsFiltersTenantID], + pydantic.Field(alias="filters[tenant_id]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "granularity", + "dimensions", + "filters[destination_id]", + "filters[topic]", + "filters[status]", + "filters[code]", + "filters[manual]", + "filters[attempt_number]", + "filters[tenant_id]", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/sdks/outpost-python/src/outpost_sdk/models/getattemptop.py b/sdks/outpost-python/src/outpost_sdk/models/getattemptop.py index 2977650be..4cdaae6bb 100644 --- a/sdks/outpost-python/src/outpost_sdk/models/getattemptop.py +++ b/sdks/outpost-python/src/outpost_sdk/models/getattemptop.py @@ -15,6 +15,7 @@ - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object """ @@ -24,6 +25,7 @@ - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object """ @@ -36,6 +38,7 @@ class GetAttemptRequestTypedDict(TypedDict): - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object """ @@ -54,6 +57,7 @@ class GetAttemptRequest(BaseModel): - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object """ diff --git a/sdks/outpost-python/src/outpost_sdk/models/geteventmetricsop.py b/sdks/outpost-python/src/outpost_sdk/models/geteventmetricsop.py new file mode 100644 index 000000000..5cae8888e --- /dev/null +++ b/sdks/outpost-python/src/outpost_sdk/models/geteventmetricsop.py @@ -0,0 +1,203 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from enum import Enum +from outpost_sdk.types import BaseModel, UNSET_SENTINEL +from outpost_sdk.utils import FieldMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict + + +class GetEventMetricsMeasuresEnum2(str, Enum): + COUNT = "count" + RATE = "rate" + + +class GetEventMetricsMeasuresEnum1(str, Enum): + COUNT = "count" + RATE = "rate" + + +GetEventMetricsMeasuresUnionTypedDict = TypeAliasType( + "GetEventMetricsMeasuresUnionTypedDict", + Union[GetEventMetricsMeasuresEnum1, List[GetEventMetricsMeasuresEnum2]], +) +r"""Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`).""" + + +GetEventMetricsMeasuresUnion = TypeAliasType( + "GetEventMetricsMeasuresUnion", + Union[GetEventMetricsMeasuresEnum1, List[GetEventMetricsMeasuresEnum2]], +) +r"""Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`).""" + + +class GetEventMetricsDimensionsEnum2(str, Enum): + TENANT_ID = "tenant_id" + TOPIC = "topic" + DESTINATION_ID = "destination_id" + + +class GetEventMetricsDimensionsEnum1(str, Enum): + TENANT_ID = "tenant_id" + TOPIC = "topic" + DESTINATION_ID = "destination_id" + + +GetEventMetricsDimensionsUnionTypedDict = TypeAliasType( + "GetEventMetricsDimensionsUnionTypedDict", + Union[GetEventMetricsDimensionsEnum1, List[GetEventMetricsDimensionsEnum2]], +) +r"""Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`).""" + + +GetEventMetricsDimensionsUnion = TypeAliasType( + "GetEventMetricsDimensionsUnion", + Union[GetEventMetricsDimensionsEnum1, List[GetEventMetricsDimensionsEnum2]], +) +r"""Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`).""" + + +GetEventMetricsFiltersTopicTypedDict = TypeAliasType( + "GetEventMetricsFiltersTopicTypedDict", Union[str, List[str]] +) +r"""Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`).""" + + +GetEventMetricsFiltersTopic = TypeAliasType( + "GetEventMetricsFiltersTopic", Union[str, List[str]] +) +r"""Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`).""" + + +GetEventMetricsFiltersDestinationIDTypedDict = TypeAliasType( + "GetEventMetricsFiltersDestinationIDTypedDict", Union[str, List[str]] +) +r"""Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`).""" + + +GetEventMetricsFiltersDestinationID = TypeAliasType( + "GetEventMetricsFiltersDestinationID", Union[str, List[str]] +) +r"""Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`).""" + + +GetEventMetricsFiltersTenantIDTypedDict = TypeAliasType( + "GetEventMetricsFiltersTenantIDTypedDict", Union[str, List[str]] +) +r"""Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`).""" + + +GetEventMetricsFiltersTenantID = TypeAliasType( + "GetEventMetricsFiltersTenantID", Union[str, List[str]] +) +r"""Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`).""" + + +class GetEventMetricsRequestTypedDict(TypedDict): + time_start: datetime + r"""Start of the time range (inclusive). ISO 8601 timestamp.""" + time_end: datetime + r"""End of the time range (exclusive). ISO 8601 timestamp.""" + measures: GetEventMetricsMeasuresUnionTypedDict + r"""Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`).""" + granularity: NotRequired[str] + r"""Time bucketing granularity. Pattern: ``. + Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12). + When omitted, returns a single aggregate row per dimension combination. + + """ + dimensions: NotRequired[GetEventMetricsDimensionsUnionTypedDict] + r"""Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`).""" + filters_topic: NotRequired[GetEventMetricsFiltersTopicTypedDict] + r"""Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`).""" + filters_destination_id: NotRequired[GetEventMetricsFiltersDestinationIDTypedDict] + r"""Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`).""" + filters_tenant_id: NotRequired[GetEventMetricsFiltersTenantIDTypedDict] + r"""Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`).""" + + +class GetEventMetricsRequest(BaseModel): + time_start: Annotated[ + datetime, + pydantic.Field(alias="time[start]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Start of the time range (inclusive). ISO 8601 timestamp.""" + + time_end: Annotated[ + datetime, + pydantic.Field(alias="time[end]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""End of the time range (exclusive). ISO 8601 timestamp.""" + + measures: Annotated[ + GetEventMetricsMeasuresUnion, + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] + r"""Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`).""" + + granularity: Annotated[ + Optional[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Time bucketing granularity. Pattern: ``. + Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12). + When omitted, returns a single aggregate row per dimension combination. + + """ + + dimensions: Annotated[ + Optional[GetEventMetricsDimensionsUnion], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`).""" + + filters_topic: Annotated[ + Optional[GetEventMetricsFiltersTopic], + pydantic.Field(alias="filters[topic]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`).""" + + filters_destination_id: Annotated[ + Optional[GetEventMetricsFiltersDestinationID], + pydantic.Field(alias="filters[destination_id]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`).""" + + filters_tenant_id: Annotated[ + Optional[GetEventMetricsFiltersTenantID], + pydantic.Field(alias="filters[tenant_id]"), + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = None + r"""Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`).""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "granularity", + "dimensions", + "filters[topic]", + "filters[destination_id]", + "filters[tenant_id]", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/sdks/outpost-python/src/outpost_sdk/models/gettenantdestinationattemptop.py b/sdks/outpost-python/src/outpost_sdk/models/gettenantdestinationattemptop.py index 72e267aba..8fc5f1b2b 100644 --- a/sdks/outpost-python/src/outpost_sdk/models/gettenantdestinationattemptop.py +++ b/sdks/outpost-python/src/outpost_sdk/models/gettenantdestinationattemptop.py @@ -15,6 +15,7 @@ - `event`: Include event summary - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object """ @@ -26,6 +27,7 @@ - `event`: Include event summary - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object """ @@ -42,6 +44,7 @@ class GetTenantDestinationAttemptRequestTypedDict(TypedDict): - `event`: Include event summary - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object """ @@ -70,6 +73,7 @@ class GetTenantDestinationAttemptRequest(BaseModel): - `event`: Include event summary - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object """ diff --git a/sdks/outpost-python/src/outpost_sdk/models/listattemptsop.py b/sdks/outpost-python/src/outpost_sdk/models/listattemptsop.py index 1e29a0ba8..f0dba9247 100644 --- a/sdks/outpost-python/src/outpost_sdk/models/listattemptsop.py +++ b/sdks/outpost-python/src/outpost_sdk/models/listattemptsop.py @@ -75,6 +75,7 @@ class ListAttemptsStatus(str, Enum): - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object """ @@ -84,6 +85,7 @@ class ListAttemptsStatus(str, Enum): - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object """ @@ -135,6 +137,7 @@ class ListAttemptsRequestTypedDict(TypedDict): - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object """ order_by: NotRequired[ListAttemptsOrderBy] @@ -234,6 +237,7 @@ class ListAttemptsRequest(BaseModel): - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object """ diff --git a/sdks/outpost-python/src/outpost_sdk/models/listtenantdestinationattemptsop.py b/sdks/outpost-python/src/outpost_sdk/models/listtenantdestinationattemptsop.py index 0a3c888cd..0a73255ee 100644 --- a/sdks/outpost-python/src/outpost_sdk/models/listtenantdestinationattemptsop.py +++ b/sdks/outpost-python/src/outpost_sdk/models/listtenantdestinationattemptsop.py @@ -53,6 +53,7 @@ class ListTenantDestinationAttemptsStatus(str, Enum): - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object """ @@ -64,6 +65,7 @@ class ListTenantDestinationAttemptsStatus(str, Enum): - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object """ @@ -111,6 +113,7 @@ class ListTenantDestinationAttemptsRequestTypedDict(TypedDict): - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object """ order_by: NotRequired[ListTenantDestinationAttemptsOrderBy] @@ -204,6 +207,7 @@ class ListTenantDestinationAttemptsRequest(BaseModel): - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers + - `destination`: Include the full destination object """ diff --git a/sdks/outpost-python/src/outpost_sdk/models/metricsdatapoint.py b/sdks/outpost-python/src/outpost_sdk/models/metricsdatapoint.py new file mode 100644 index 000000000..9ae956368 --- /dev/null +++ b/sdks/outpost-python/src/outpost_sdk/models/metricsdatapoint.py @@ -0,0 +1,59 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from datetime import datetime +from outpost_sdk.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Any, Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class MetricsDataPointTypedDict(TypedDict): + time_bucket: NotRequired[Nullable[datetime]] + r"""Start of the time bucket. Null when no granularity is specified.""" + dimensions: NotRequired[Dict[str, str]] + r"""Dimension values for this data point. Empty object when no dimensions are requested.""" + metrics: NotRequired[Dict[str, Any]] + r"""Requested measure values for this data point.""" + + +class MetricsDataPoint(BaseModel): + time_bucket: OptionalNullable[datetime] = UNSET + r"""Start of the time bucket. Null when no granularity is specified.""" + + dimensions: Optional[Dict[str, str]] = None + r"""Dimension values for this data point. Empty object when no dimensions are requested.""" + + metrics: Optional[Dict[str, Any]] = None + r"""Requested measure values for this data point.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["time_bucket", "dimensions", "metrics"]) + nullable_fields = set(["time_bucket"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/sdks/outpost-python/src/outpost_sdk/models/metricsmetadata.py b/sdks/outpost-python/src/outpost_sdk/models/metricsmetadata.py new file mode 100644 index 000000000..05c040cdb --- /dev/null +++ b/sdks/outpost-python/src/outpost_sdk/models/metricsmetadata.py @@ -0,0 +1,70 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from outpost_sdk.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from pydantic import model_serializer +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class MetricsMetadataTypedDict(TypedDict): + granularity: NotRequired[Nullable[str]] + r"""The granularity used for time bucketing, or null if none was specified.""" + query_time_ms: NotRequired[int] + r"""Query execution time in milliseconds.""" + row_count: NotRequired[int] + r"""Number of data points returned.""" + row_limit: NotRequired[int] + r"""Maximum number of rows the query will return.""" + truncated: NotRequired[bool] + r"""Whether the results were truncated due to hitting the row limit.""" + + +class MetricsMetadata(BaseModel): + granularity: OptionalNullable[str] = UNSET + r"""The granularity used for time bucketing, or null if none was specified.""" + + query_time_ms: Optional[int] = None + r"""Query execution time in milliseconds.""" + + row_count: Optional[int] = None + r"""Number of data points returned.""" + + row_limit: Optional[int] = None + r"""Maximum number of rows the query will return.""" + + truncated: Optional[bool] = None + r"""Whether the results were truncated due to hitting the row limit.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["granularity", "query_time_ms", "row_count", "row_limit", "truncated"] + ) + nullable_fields = set(["granularity"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val + + return m diff --git a/sdks/outpost-python/src/outpost_sdk/models/metricsresponse.py b/sdks/outpost-python/src/outpost_sdk/models/metricsresponse.py new file mode 100644 index 000000000..edfbdfa04 --- /dev/null +++ b/sdks/outpost-python/src/outpost_sdk/models/metricsresponse.py @@ -0,0 +1,38 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .metricsdatapoint import MetricsDataPoint, MetricsDataPointTypedDict +from .metricsmetadata import MetricsMetadata, MetricsMetadataTypedDict +from outpost_sdk.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class MetricsResponseTypedDict(TypedDict): + data: NotRequired[List[MetricsDataPointTypedDict]] + r"""Array of aggregated data points.""" + metadata: NotRequired[MetricsMetadataTypedDict] + + +class MetricsResponse(BaseModel): + data: Optional[List[MetricsDataPoint]] = None + r"""Array of aggregated data points.""" + + metadata: Optional[MetricsMetadata] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["data", "metadata"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k, serialized.get(n)) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/sdks/outpost-python/src/outpost_sdk/sdk.py b/sdks/outpost-python/src/outpost_sdk/sdk.py index 119d2c6a7..13ba5e41c 100644 --- a/sdks/outpost-python/src/outpost_sdk/sdk.py +++ b/sdks/outpost-python/src/outpost_sdk/sdk.py @@ -19,6 +19,7 @@ from outpost_sdk.destinations import Destinations from outpost_sdk.events import Events from outpost_sdk.health import Health + from outpost_sdk.metrics import Metrics from outpost_sdk.publish import Publish from outpost_sdk.schemas import Schemas from outpost_sdk.tenants import Tenants @@ -54,6 +55,7 @@ class Outpost(BaseSDK): - `include=event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `include=event.data`: Include full event with payload data - `include=response_data`: Include response body and headers from the attempt + - `include=destination`: Include the full destination object with target information """ destinations: "Destinations" @@ -88,6 +90,10 @@ class Outpost(BaseSDK): r"""Operations for retrieving destination type schemas.""" topics: "TopicsSDK" r"""Operations for retrieving available event topics.""" + metrics: "Metrics" + r"""Aggregated metrics for events and delivery attempts. Supports time bucketing, dimensional grouping, and filtering. + + """ _sub_sdk_map = { "health": ("outpost_sdk.health", "Health"), "tenants": ("outpost_sdk.tenants", "Tenants"), @@ -97,6 +103,7 @@ class Outpost(BaseSDK): "publish": ("outpost_sdk.publish", "Publish"), "schemas": ("outpost_sdk.schemas", "Schemas"), "topics": ("outpost_sdk.topics_sdk", "TopicsSDK"), + "metrics": ("outpost_sdk.metrics", "Metrics"), } def __init__( diff --git a/sdks/outpost-python/src/outpost_sdk/tenants.py b/sdks/outpost-python/src/outpost_sdk/tenants.py index 7e2c69ddf..36eea08bb 100644 --- a/sdks/outpost-python/src/outpost_sdk/tenants.py +++ b/sdks/outpost-python/src/outpost_sdk/tenants.py @@ -106,7 +106,7 @@ def next_func() -> Optional[models.ListTenantsResponse]: results = JSONPath("$.models").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if not request.limit is None else 20 + limit = request.limit if isinstance(request.limit, int) else 20 if len(results[0]) < limit: return None @@ -246,7 +246,7 @@ def next_func() -> Optional[models.ListTenantsResponse]: results = JSONPath("$.models").parse(body) if len(results) == 0 or len(results[0]) == 0: return None - limit = request.limit if not request.limit is None else 20 + limit = request.limit if isinstance(request.limit, int) else 20 if len(results[0]) < limit: return None diff --git a/sdks/outpost-typescript/.speakeasy/gen.lock b/sdks/outpost-typescript/.speakeasy/gen.lock index ff079662e..504783f31 100644 --- a/sdks/outpost-typescript/.speakeasy/gen.lock +++ b/sdks/outpost-typescript/.speakeasy/gen.lock @@ -1,26 +1,26 @@ lockVersion: 2.0.0 id: edb58086-83b9-45a3-9095-52bf57a11009 management: - docChecksum: 409a84a454e3afc8f91a26e084995022 + docChecksum: 7d1be852535ebc9dc65da55dd2279c23 docVersion: 0.0.1 - speakeasyVersion: 1.755.0 - generationVersion: 2.865.2 - releaseVersion: 0.9.1 - configChecksum: 58ccfca54748da9182e67ad15a5c253a + speakeasyVersion: 1.759.1 + generationVersion: 2.869.10 + releaseVersion: 0.9.2 + configChecksum: 67db95263438439983c0078adfdab660 repoURL: https://github.com/hookdeck/outpost.git repoSubDirectory: sdks/outpost-typescript installationURL: https://github.com/hookdeck/outpost published: true persistentEdits: - generation_id: 541f1351-b17c-445e-9ffe-3aa9267154cf - pristine_commit_hash: a8cc619c676daa1d203e5006f685ab4dcc8b1e5f - pristine_tree_hash: 15a0c5e0a8dae94751a3bdb05a56dcb99bcc6a91 + generation_id: b5488e3b-7b67-4d93-ace6-ad41dd1b088b + pristine_commit_hash: 7f2ea0aae46e6051b77e6079c53f0d1e7cc38c75 + pristine_tree_hash: 5bfdf911953760857d24244586c8a8934f98d6ee features: typescript: additionalDependencies: 0.1.0 additionalProperties: 0.1.3 constsAndDefaults: 0.1.14 - core: 3.26.42 + core: 3.26.43 defaultEnabledRetries: 0.1.0 enumUnions: 0.1.0 envVarSecurityUsage: 0.1.2 @@ -64,12 +64,12 @@ trackedFiles: pristine_git_object: 08f95f4552349360b2c0b01802aa71ec3a55d2c2 docs/models/components/attempt.md: id: 830868ab1006 - last_write_checksum: sha1:f5fffd242cd310194b6604046a40cf28b5ca4a44 - pristine_git_object: f6341f9d56f8febb4a4d2fc9565b774e2357899f + last_write_checksum: sha1:5d02cfef885c38c72c0c34d08b2bcaafa8274cad + pristine_git_object: e200c0d6b121e4a875f907712c5b363020d74b4f docs/models/components/attemptpaginatedresult.md: id: 56e122fd3059 - last_write_checksum: sha1:209027be8ff19e7cf71d7c04ab292dc75e48f21d - pristine_git_object: 34b23b492fb427ea8740576bf55b4008ad30a53c + last_write_checksum: sha1:92ef130e75a088fd8b014807819cee0ad94e12fc + pristine_git_object: d595fc1a8127f0ab2ce5589a6c74c32ae9014231 docs/models/components/awskinesisconfig.md: id: e1381238f2b5 last_write_checksum: sha1:fb59168acb39a57db5e2e7e2036b76a7479c42ef @@ -258,6 +258,18 @@ trackedFiles: id: a80eb3867695 last_write_checksum: sha1:f21ef7b6bdfa0279e8415a61574abd39af5dc930 pristine_git_object: 7e756f1ed0aed298b0ad1061b10344fc89eb7537 + docs/models/components/metricsdatapoint.md: + id: dfbc8ed48932 + last_write_checksum: sha1:2ccc72ded86512449ed52a91838dab5b079ebcbd + pristine_git_object: e1d4a43b09287b5bf36cd62c921d5e5fa3dcb9b2 + docs/models/components/metricsmetadata.md: + id: 09b0bc8b1617 + last_write_checksum: sha1:af7bab6dad0e409b773a43a22a5473cbd9846825 + pristine_git_object: a0bb64e78ee88fa89a31c2541d25d49a02acefac + docs/models/components/metricsresponse.md: + id: c99709afc575 + last_write_checksum: sha1:962e078756e5a2f7b9ff69743db690711563a1af + pristine_git_object: d2dc65eddad82a2660773500ba7a7b4b31e97371 docs/models/components/portalredirect.md: id: bd1e51e1707f last_write_checksum: sha1:b2c312fe951057fcffa23bd276a7b4899c9aac89 @@ -402,14 +414,78 @@ trackedFiles: id: 8ab704c59cb2 last_write_checksum: sha1:8049200249266d2cfe84494ad616a8b06752255e pristine_git_object: e972cb0b136831ddb65e646dee8a092cf65a9eef + docs/models/operations/filtersattemptnumber.md: + id: 3e38bcb79609 + last_write_checksum: sha1:e5bc37eeb9d3463e5b3fffb980891354946df846 + pristine_git_object: 160c3a730f23e62a59a74eec538e10ac893ff6d2 + docs/models/operations/filterscode.md: + id: 11d407086ff1 + last_write_checksum: sha1:81b4e3256f23a33101142ddf139d640fdc01c4e3 + pristine_git_object: 007fd2eb4b588f65e32f0ecbb2e279db54e277be + docs/models/operations/filtersmanual.md: + id: 0d3afc32fb66 + last_write_checksum: sha1:c7aa74b4b06d3e16ee9e9a5bcd53973287161568 + pristine_git_object: 9fe39960684c0c9ea43bb12abe21ad6733722e27 + docs/models/operations/filtersstatus.md: + id: 288bb529766f + last_write_checksum: sha1:e14458592c5fe0da93c2730175b188a64e9ae0d7 + pristine_git_object: b415c71535044197860b9eec8d3c93041db304e1 + docs/models/operations/filtersstatusenum1.md: + id: a9be4606ddf5 + last_write_checksum: sha1:375ac2ff223d6c7e21c0485a1cecfa047aeb0897 + pristine_git_object: 9f43a282db63c697064537952dcbc2cca530ef0c + docs/models/operations/filtersstatusenum2.md: + id: 3eece9a873a7 + last_write_checksum: sha1:393678390f6892207ddde95905d5032718d70837 + pristine_git_object: c2ff254bc0618bfcc622e727768ae4d381c064e4 docs/models/operations/getattemptinclude.md: id: 899622c94b52 - last_write_checksum: sha1:2885203eaf0647cbf61024cba59a9a9f133b4e17 - pristine_git_object: ef32d450eda3cffe828fd3ef719209b78aa02498 + last_write_checksum: sha1:c6fbada98ce8f7a930aafa293a7bcba8159930f3 + pristine_git_object: 94d31315422e6fae6391722c0a2b580b076d96ad + docs/models/operations/getattemptmetricsdimensionsenum1.md: + id: 34d0bcda1090 + last_write_checksum: sha1:e1d116ca3b6cafec9a1cab48962613d06bc9d4c8 + pristine_git_object: 97cd935bf0fc48e63b76d45a3a8704f691b01279 + docs/models/operations/getattemptmetricsdimensionsenum2.md: + id: 10661da57a75 + last_write_checksum: sha1:e97d825e1943789a3d79bab26b5e97444503792f + pristine_git_object: d92ff56d4734dc884d44850690b44b4d1392a792 + docs/models/operations/getattemptmetricsdimensionsunion.md: + id: ce40423a335e + last_write_checksum: sha1:7f3b0dd3cd38ca5855070cf8d33363998db33b3c + pristine_git_object: f0b361e0cdaff37c9b9e2f8f68df5d3aa1b2ba68 + docs/models/operations/getattemptmetricsfiltersdestinationid.md: + id: 6a00cec335e3 + last_write_checksum: sha1:8e8ada231e0125f3890c197f56d11388ba984f1f + pristine_git_object: 4c7dd7993f11d1f3309819fdc730253d35c742f5 + docs/models/operations/getattemptmetricsfilterstenantid.md: + id: 44ae32fc6953 + last_write_checksum: sha1:91121e47f106f5edb44698d86f440024442155a3 + pristine_git_object: 198eeaf92ad5feb81353d905660a1f631f20623a + docs/models/operations/getattemptmetricsfilterstopic.md: + id: 6c1ed722a603 + last_write_checksum: sha1:6955a89159a18d51ded8b70396b62325d794cdc8 + pristine_git_object: 407ff50afa8f8c4ced76bd279ce099ddf835cc13 + docs/models/operations/getattemptmetricsmeasuresenum1.md: + id: 4057a7c16751 + last_write_checksum: sha1:8bc0fd958dd710419789aa9d3cba45a240a59f26 + pristine_git_object: 7f97c190fe8c9d2040ac60a8e361314f5e65517d + docs/models/operations/getattemptmetricsmeasuresenum2.md: + id: dfe6f415e02b + last_write_checksum: sha1:9ede77d8a6b0a3e3dcdbb7474dd8a98d38ba4cc5 + pristine_git_object: 2da8d17f8ddb8cba068b2f5e7aeccc95b7233f14 + docs/models/operations/getattemptmetricsmeasuresunion.md: + id: 454f41df243f + last_write_checksum: sha1:83327880d33e9832dbb5449952ba3d3e5d9d89fe + pristine_git_object: 13c46492d75f9f7567e76a07c941a9ebd007564f + docs/models/operations/getattemptmetricsrequest.md: + id: accc5c32f0c1 + last_write_checksum: sha1:38fc9da97386fe26a3621cbd4564efb432a893ef + pristine_git_object: edd603363ad5f6810e6e076377ed83d6dc70aa47 docs/models/operations/getattemptrequest.md: id: 58916c0b18d3 - last_write_checksum: sha1:ec397658b11aacff284dae3fdec27ca8b8ace965 - pristine_git_object: 3b7592b28a3fd90b2dc673671f47faeb6cd1f715 + last_write_checksum: sha1:c9b3900f5e2420d73cad4278a824a9f7ba95f9e5 + pristine_git_object: 2fd5b3175b7d1e62a94b4542b23f3ebffb568453 docs/models/operations/getdestinationtypeschemarequest.md: id: 28942fdcd1d3 last_write_checksum: sha1:06191edcf74f20f979c370fb99c4e34d38faa78a @@ -418,18 +494,58 @@ trackedFiles: id: d0a606c7256d last_write_checksum: sha1:0eb9a1563d833f9188155444ea65a5d1856c705e pristine_git_object: 2cd0af6cbd74301cc790cfe9d424fbe2f664a2f0 + docs/models/operations/geteventmetricsdimensionsenum1.md: + id: c09d77f90607 + last_write_checksum: sha1:f2431a9cd32834e695a2ae42f5d475436d65eb0e + pristine_git_object: ee29bd96baa92a15e98dfc0af94039d78ba53aff + docs/models/operations/geteventmetricsdimensionsenum2.md: + id: 96e65d2f3eb2 + last_write_checksum: sha1:08606de18a70a36609f986da620877d4e55a8bf8 + pristine_git_object: e8d0dbe2a927f4e741c8b55b755dcb962866636d + docs/models/operations/geteventmetricsdimensionsunion.md: + id: 7bc8cbf6b0b9 + last_write_checksum: sha1:87bc3a0c889af18aff0b36c904473c08efc246b6 + pristine_git_object: d9335f461aa26535da85c2ab2869ddf96071dd05 + docs/models/operations/geteventmetricsfiltersdestinationid.md: + id: 3848b6181583 + last_write_checksum: sha1:7e50d86fbbef64c98cf1f4436793fbbbbd965e65 + pristine_git_object: 49f3aa4cef4d26ed876bd1c3757b92f737ab3865 + docs/models/operations/geteventmetricsfilterstenantid.md: + id: 3f1ff10bfc33 + last_write_checksum: sha1:ff65fe640e1c82f92397652b79659c6935eea60f + pristine_git_object: 86be6408e91c5e01d2d5a2db833c306a9821d9ea + docs/models/operations/geteventmetricsfilterstopic.md: + id: d653fc88c22c + last_write_checksum: sha1:74684e903a6efdf1dfe78770954794d2410fc11d + pristine_git_object: bd27c69a0f8451aeff67148cf41230248ed335b2 + docs/models/operations/geteventmetricsmeasuresenum1.md: + id: aff95eb8bafe + last_write_checksum: sha1:60f3589bf53ad155f940b2c58ebb80e5cd9918e6 + pristine_git_object: 9bd22dfc9302ecbad37ebd4455e1d1b3cf319cba + docs/models/operations/geteventmetricsmeasuresenum2.md: + id: 717cd1b20163 + last_write_checksum: sha1:a8d12f6f2eca8c710d1d1f205ab987c237390dfd + pristine_git_object: 09d3fa67417cb7cac5e35c36091a883addab5736 + docs/models/operations/geteventmetricsmeasuresunion.md: + id: 6bc8aed73c02 + last_write_checksum: sha1:ae591af94f2c84bb4fa4f8ebb7ce3e059d19be70 + pristine_git_object: a0b8c0bdd2e34cdd398c967136d1e78bcd08db8a + docs/models/operations/geteventmetricsrequest.md: + id: e149809d1e2c + last_write_checksum: sha1:6c783748a0c9f4b1cda2cf7cba9de8863198cb34 + pristine_git_object: 028789a378f0766dee9fcde14a2ed1f9fb18a13a docs/models/operations/geteventrequest.md: id: ed4423b8e9dd last_write_checksum: sha1:52d73922a9bdd4bce6aa600e92ceec84355ac82a pristine_git_object: 3b5424ecc53ae234e768bf6efbe4eb3d12fa6049 docs/models/operations/gettenantdestinationattemptinclude.md: id: 6a2a3c5c804d - last_write_checksum: sha1:d89b283b09a40e3b8ba15bb591b29e4e2a6000db - pristine_git_object: e8d56ea6489d119a5733e9d0dba8c310079b5da3 + last_write_checksum: sha1:689f1cadeb2e0641d411074b9c6b6086cd600b97 + pristine_git_object: b6c9a38f76100dd3fa7b0c272b63c8fcd8a78028 docs/models/operations/gettenantdestinationattemptrequest.md: id: ba08fde2adc7 - last_write_checksum: sha1:b32b4f8c22541dcf969993b0c1eb71294f435d3a - pristine_git_object: f483c1c0c946a21ea063748a992762b59679a067 + last_write_checksum: sha1:09e7934f9104edd912d263f21a4a97b8292e2de0 + pristine_git_object: 8dcee08f7e2e1d8e22ab42ff5840ddb0a011b2f2 docs/models/operations/gettenantdestinationrequest.md: id: f6dbaa55f398 last_write_checksum: sha1:d639d8c187355f5f8b7848f5c5a0b9923d997179 @@ -468,20 +584,20 @@ trackedFiles: pristine_git_object: fb3b0cf62de753df9cd1cc288b2adee8194a6d4c docs/models/operations/listattemptsinclude.md: id: cc99e9b38c4b - last_write_checksum: sha1:3295631cb5078b83a26f6be705bb33a57d8af678 - pristine_git_object: 96a30565bfe4310371f346fcf87b25b3f5f4f80e + last_write_checksum: sha1:ab062c5e2a53bc2735553122ca6cabf54f85c2c3 + pristine_git_object: 79c84f7bc588b837e05f1c994df92d72b6b3934a docs/models/operations/listattemptsorderby.md: id: 8aa3505e4088 last_write_checksum: sha1:31da0d12674bc1e8a001976c0e4778a6efa4ee1e pristine_git_object: 6f854abb0932e74ae27a3426feb4b65a5485c288 docs/models/operations/listattemptsrequest.md: id: c664c21b68cc - last_write_checksum: sha1:a1c0b8cbb5bf3d4ad9269ef2699addb7e5b92cd8 - pristine_git_object: b1ee918f7ef039aad8216e957915aafe4dc7609a + last_write_checksum: sha1:cea426db91aba4debc313ec0d1556c30e13222c5 + pristine_git_object: deb4f57997b06b2caf6ea0be77f2c1f087aeb5e9 docs/models/operations/listattemptsresponse.md: id: fa9c919a289b - last_write_checksum: sha1:6de222864d4dc91ff28e0111a4fde46ab789997f - pristine_git_object: 1602725fdd33ab66e158829d50065e9de7d56fe4 + last_write_checksum: sha1:aa0d5b34f48dc3e1cea11f1ec43d48504bcc9dfc + pristine_git_object: 6a8cc994abcee7bfa8ae85139dce511788b8690f docs/models/operations/listattemptsstatus.md: id: 2135342ab1bc last_write_checksum: sha1:7b19c7107e6a0031cb3e9f642d5644633c469a10 @@ -532,20 +648,20 @@ trackedFiles: pristine_git_object: 02b6f41119ae7cb4970aec3575bb6f66bba30e55 docs/models/operations/listtenantdestinationattemptsinclude.md: id: 2540a66e35b0 - last_write_checksum: sha1:e57102df7d271cb671388b475cb6905b0a3c372c - pristine_git_object: 174760083b8cf77b7887501fe19205abab8452a2 + last_write_checksum: sha1:5c17aac513d51d652580944c0dc9e3db4f10ba9d + pristine_git_object: 3567c4f0cc958d72e3a8885ee06956cfd4011e39 docs/models/operations/listtenantdestinationattemptsorderby.md: id: 528d7d98d88e last_write_checksum: sha1:a9662882f8af09d677d6eb4eec24866fc52fbef8 pristine_git_object: a3f566ce8a637215c28dd7e62ed285def9f4d0b6 docs/models/operations/listtenantdestinationattemptsrequest.md: id: 341955bbcb29 - last_write_checksum: sha1:dd2925f5b142f66b5f16f23d1b1882669a8991a6 - pristine_git_object: db6a29ce0a07b4e687903abb83cc02f502f93960 + last_write_checksum: sha1:7b9911642e158f0704c7460b7d351fefaf46e7ba + pristine_git_object: 2de1ece96ad8fe7803de5287cf8749e8fc59061d docs/models/operations/listtenantdestinationattemptsresponse.md: id: 2e6018891322 - last_write_checksum: sha1:d66bcbe6d9da68b36d377d927bdea3a45898e977 - pristine_git_object: b505a41dee0a3e9c2fbd63abc64838f733a231b1 + last_write_checksum: sha1:0fe686af83410dd9ce186c723a2f6b5d4cf786a3 + pristine_git_object: 1eedae7a641907634208bfb2133db9e7a91a0d08 docs/models/operations/listtenantdestinationattemptsstatus.md: id: 5185c1081587 last_write_checksum: sha1:8fbaab8110940bbd2a269bf878b373396f45748c @@ -604,12 +720,12 @@ trackedFiles: pristine_git_object: b9c3c42e697df4c33f959d7dbc30b2188827055c docs/sdks/attempts/README.md: id: 41a6f5edd623 - last_write_checksum: sha1:5b5c2a048a7fd8aef345f012418c67077c921529 - pristine_git_object: 05f23f3a46c28f591ac91c9010916b75ba817c5b + last_write_checksum: sha1:1c2747fcdf68df658203a969622cef653501ddc8 + pristine_git_object: be43c62163595ceaa47dbed806a4c8346564d5fe docs/sdks/destinations/README.md: id: e83d288899aa - last_write_checksum: sha1:134e78b4bde29457b964c576e56b02e13feaa669 - pristine_git_object: 10b742d05537e5ecc6e5ec93cf1f7a7c0216fa3c + last_write_checksum: sha1:02bb4abc42b3bdd0f5eb4cbd3e8a254877213360 + pristine_git_object: abeb93dbfbd06d6114eeeb4721e0f440152b12a4 docs/sdks/events/README.md: id: cf45a4390b9b last_write_checksum: sha1:a9b6e5ed561176a5f414954a3aa0b6ee7719fdc9 @@ -618,6 +734,10 @@ trackedFiles: id: 5082c50d5e82 last_write_checksum: sha1:4d2fef0b17c2b3e3d660859f80051b64d711b260 pristine_git_object: 6814990c4673104cfdeb4f30c06ace54d18c9453 + docs/sdks/metrics/README.md: + id: a8545d964e21 + last_write_checksum: sha1:3ceb0078a5d579e81d4a46eff6425ed006c6b952 + pristine_git_object: 93b51863ce17d1cdf20c02ccd6bd19a819df47b8 docs/sdks/publish/README.md: id: 370ef5537c93 last_write_checksum: sha1:7a8b1185eef4850fb8ee35b1fed15f5d2336436d @@ -656,20 +776,20 @@ trackedFiles: pristine_git_object: 2ecc914dee96b672e4c966d02b66b72ad7d45435 jsr.json: id: 7f6ab7767282 - last_write_checksum: sha1:8d218867f4712255470ae52f1b461620dfd3268f - pristine_git_object: 0d6a95df74742db926496958b7220196588b03f4 + last_write_checksum: sha1:102a35cbea58b151d01f2160ad7340e1c9603386 + pristine_git_object: 830df65708740c9e2943b848611288dbe367a880 package.json: id: 7030d0b2f71b - last_write_checksum: sha1:802bdc06c033aa80e7f006585a201617b2dbe7a1 - pristine_git_object: c4754e6fe3e22d990bb3a2798f0d7742ab0bd5c0 + last_write_checksum: sha1:697beefbe7114ee369b9c9867e231deb128ce03f + pristine_git_object: eb32e3d41648f3bff094b5ab1253b98b079c54b1 src/core.ts: id: f431fdbcd144 last_write_checksum: sha1:c858d8ea76a86c428e26943bf348319ba0a3c865 pristine_git_object: 074347af521ae87b9d34d8a21dc99f6aaf6a939d src/funcs/attemptsGet.ts: id: ec8fe53541df - last_write_checksum: sha1:f765c72a0f21bffaa87c64f70bf0b2f1886f032c - pristine_git_object: 899f5e38a1216ca9e2ba1674d7af4901c95a448b + last_write_checksum: sha1:f59a1abed923aa7485b02e1c01153d767bb09fcb + pristine_git_object: 54f8c66074757f275628bdf3dc758219a64bb631 src/funcs/attemptsList.ts: id: 05c308c98e04 last_write_checksum: sha1:89e1e5d69f7ee02777ee688401ff0cb28572de23 @@ -680,44 +800,44 @@ trackedFiles: pristine_git_object: 7420c7c6c8746790de8fbffd82ba889427c78ea1 src/funcs/destinationsCreate.ts: id: bb26d96fe47c - last_write_checksum: sha1:6377c0ccd72bc3dcc4c2e998aa79f176565fbbc9 - pristine_git_object: ff6af28867f38a37f308c7a2f7eb23bbde4f8ae0 + last_write_checksum: sha1:6b2d95691afcbd48add2a3ea6c1f7b9bf36e331e + pristine_git_object: c03399eb8d227d22ec2b66aeb625e3d6c0fdb512 src/funcs/destinationsDelete.ts: id: 95323805da0b - last_write_checksum: sha1:43f9166035ec12d9ed16fadbd9e0c80d4be767c3 - pristine_git_object: fe886031e39f6e117bbdc9b72086d41908632cb2 + last_write_checksum: sha1:2b99b0e194c0ef16787fda005667f39f406385a7 + pristine_git_object: 2ee6e9af07f7fbcb303c362993899c3e7c00974e src/funcs/destinationsDisable.ts: id: 04d38cbaaace - last_write_checksum: sha1:ea88300bfe39ed30a2699da69b839e99e93530f7 - pristine_git_object: 7e2778b46184666ad8ed9b783097940821755fb5 + last_write_checksum: sha1:201649f405713292a4dc0eec9d604ada23d216c6 + pristine_git_object: e66c100ad35a8107f37c803237f191c6c14df000 src/funcs/destinationsEnable.ts: id: bcf1345f4c17 - last_write_checksum: sha1:bd8563ef98623dd3d3a5ee7a6307d0199e593ce7 - pristine_git_object: d20e8ba2230e407049310087300eb272f7bba3bb + last_write_checksum: sha1:df37af79456e844f65603bb1e864f26fab9366b6 + pristine_git_object: d3609073fc09825181ec4d4ee3ecdebc0397560b src/funcs/destinationsGet.ts: id: 490db6cf080e - last_write_checksum: sha1:f9bb94e69fd09191c379c1a44641065aa82d36d8 - pristine_git_object: f4d42f73282b70b2d1591748f191a4d76bb91a5f + last_write_checksum: sha1:55846023f79623e36c727a16a16aa6b53d12199a + pristine_git_object: a90cb7934066bec37bfc642f481f8fcf82e233c1 src/funcs/destinationsGetAttempt.ts: id: 5d74d6601449 - last_write_checksum: sha1:363d8e2a2a76c1b90e57b469507185c85110a778 - pristine_git_object: 14e314767fb0e00483e2ba5adf988980a761a96e + last_write_checksum: sha1:199858c63e3ac99dc104cef0f0bff84d6ee6aebb + pristine_git_object: 18b32aaa4165a18361e97569e3089f42a234d439 src/funcs/destinationsList.ts: id: 56d09db0c6aa - last_write_checksum: sha1:b17d2aa78093ec4c1ac040ef82d4feede68ba389 - pristine_git_object: 1a2e07919330a471caca66a7e68d52cb221375db + last_write_checksum: sha1:5f806df02036ec501e70e47528b87f51e5475e4c + pristine_git_object: 0fba4b6413455606036661dfc6ea90caf1707ace src/funcs/destinationsListAttempts.ts: id: bb79602f1494 - last_write_checksum: sha1:bc3889e87f924e52b86d7773875b1f41db717f11 - pristine_git_object: c265d673a2f9bad7c18450129bb3253e2f834ec7 + last_write_checksum: sha1:3dd70c7b73c576490efcde9401dfedc8197c84bd + pristine_git_object: cc71ecf871d9468cb3ff23d552db3806053c5a58 src/funcs/destinationsUpdate.ts: id: bf3a58acd260 - last_write_checksum: sha1:c69d86705a8004ff3bede79ba7e512b70c49eacc - pristine_git_object: 0bb684aa7fb4477301b9ac87744c643f7f863471 + last_write_checksum: sha1:b804d82be8c4cfa27e00e6195d1670b0b0d3dc8f + pristine_git_object: be93ae71ae86a593987834a34b29c7c74579201a src/funcs/eventsGet.ts: id: 5f1c128a8a40 - last_write_checksum: sha1:4efb24b09c08cd4de812a718efbcd450280fdb83 - pristine_git_object: 5effb084c2723b43181fed8d7cec0ebae2716303 + last_write_checksum: sha1:7fa1c65d4a6a252eeb0e202821fe72d178cbf2ca + pristine_git_object: 1a0bd83fee307dba0bd6b010afc66434f0a37927 src/funcs/eventsList.ts: id: 4522a8542985 last_write_checksum: sha1:432a68d42a236c6ab76c0cadd68c4a62e22c081a @@ -726,42 +846,50 @@ trackedFiles: id: c97d559e7f4c last_write_checksum: sha1:b4e79f2734e36285e512b58f322a1ebb402f934f pristine_git_object: 62ca6a6c264f0cddeed3f46ce0cfe379d5e5e715 + src/funcs/metricsGetAttemptMetrics.ts: + id: a88a3e2b33dd + last_write_checksum: sha1:f1423abe346b7f8e0b27be23fdcd295de4f4ebb3 + pristine_git_object: d5350c71b06ec9b356f549593e954422ef32691a + src/funcs/metricsGetEventMetrics.ts: + id: c35ea4d8a7df + last_write_checksum: sha1:f4a3215d5205868ad1d2983cb4c412a83318644a + pristine_git_object: 3e7bbd3716a9fd3eea60fbe919a0ac3f74e4e61d src/funcs/publishEvent.ts: id: b266c6833466 last_write_checksum: sha1:16f19ddc4a8c2f07cbe913b14bd30178e9120573 pristine_git_object: a1ca4799faa1c6351ed519ab0e17693482e44d98 src/funcs/schemasGetDestinationType.ts: id: d0ef9e8a0fda - last_write_checksum: sha1:3b38033130c2a34f7d994a836dae26394e9f87ba - pristine_git_object: cff649e8a9be0aea3aa28ea68f950f52c0814f2d + last_write_checksum: sha1:5c260b1a42b24f3429fd26136343b34db83e587c + pristine_git_object: af3969bc3dc34501abfa951da8f4657ab519b221 src/funcs/schemasListDestinationTypes.ts: id: 93b743f7dd30 last_write_checksum: sha1:9988a2e052c6f6d402e6dae5aa8a70461ebb4e3d pristine_git_object: d34de6fe3f5aa50e46928a60f94a254d593f2b6d src/funcs/tenantsDelete.ts: id: c63d12db0080 - last_write_checksum: sha1:622f18d864585c5b0f55fd43141117c10c2a8862 - pristine_git_object: b5e624e659b2b02cd8838bebf15856edf7a9239c + last_write_checksum: sha1:855913d504461cce0721c6f2326f4c22f66d2c8f + pristine_git_object: f31a18e4b3a767602a100818cbcebe217554fb2a src/funcs/tenantsGet.ts: id: a4c916e43ceb - last_write_checksum: sha1:fce0e1c26302626913da09607df1f6c48c187bab - pristine_git_object: bba8d88da36b1c221ba41f2555629b4112081ec5 + last_write_checksum: sha1:14f31596c77b057a250ad5ba2c17c7de0ee747ad + pristine_git_object: 626ea083534ee893e3d1aa236fa11e806c92361a src/funcs/tenantsGetPortalUrl.ts: id: 618536cf1479 - last_write_checksum: sha1:c6970ef96d6a4355d2e4af65cc33a933f6ecf5a0 - pristine_git_object: 16abe659868445ea396cfeb214f09cb1038e55fc + last_write_checksum: sha1:4d2a0ae2d6ca1a864b5b0d54bfd2452c606d771d + pristine_git_object: d2059365aa6f78a4d14b529c44695052a4f41507 src/funcs/tenantsGetToken.ts: id: 93deaf80b1d2 - last_write_checksum: sha1:1fad44bf97cff0f2e4022cd0acb3416d7a13d929 - pristine_git_object: aee19fd0f8d688ac1f16a871d740468f271ceed7 + last_write_checksum: sha1:7f8d55b8835d0bf9b0ebe3ab3ccee48fb47658fc + pristine_git_object: 7dfdd7d4aba19f2744cf55dbebed86d01b847748 src/funcs/tenantsList.ts: id: 6572ed5a146a last_write_checksum: sha1:747a1b2628f10b722b15bd70d9613568c9000534 pristine_git_object: 15f93aefdb8c3be4efae3de6d7f172cf7419c0d1 src/funcs/tenantsUpsert.ts: id: f6eb1c703ee6 - last_write_checksum: sha1:5b2356b1d539d7032c0b0373399724877c032a0f - pristine_git_object: 03de88cbe6b34e30a4cf21f671ae244682fa06e5 + last_write_checksum: sha1:4438d34429305642956a4adcb3bcb1e5c38d12b5 + pristine_git_object: e11a8f66640a40c6d5b2cc104a4699a9c9f41601 src/funcs/topicsList.ts: id: eb5cfdbc739a last_write_checksum: sha1:d4644855a646edd148b5950a79dbae91d43aa2a3 @@ -788,8 +916,8 @@ trackedFiles: pristine_git_object: 0aebd8b0a4867e35cb3348fc52921c3c0b4725b7 src/lib/config.ts: id: 320761608fb3 - last_write_checksum: sha1:141077de7618d53bab5f0320bee09be5279a3a33 - pristine_git_object: 0d2699e98e69ac52500722d1d9284e313de0379c + last_write_checksum: sha1:f1f5a1827110c26da2c69f98521c6e0d79b7010e + pristine_git_object: 8f8eca3c8dcd893e30517c34c00e8c6f8f278c95 src/lib/dlv.ts: id: b1988214835a last_write_checksum: sha1:1dd3e3fbb4550c4bf31f5ef997faff355d6f3250 @@ -800,8 +928,8 @@ trackedFiles: pristine_git_object: 31cd3733907afbee3641b9ab680ed417247a7d33 src/lib/files.ts: id: e5efa54fcb95 - last_write_checksum: sha1:d0f325f445b8d22e7d73baf052c585ec2dd24841 - pristine_git_object: 0344cd046d033f9e8a55de02f7935c5cec5dc30b + last_write_checksum: sha1:795c14026405d547bfc47012f7ad9666e530fa7f + pristine_git_object: 6ca6b37d35a12448da176ee2517cc036db12c81c src/lib/http.ts: id: 63a80782d37e last_write_checksum: sha1:797cbf16d3c7c4d62d3ba0eedb08617524938457 @@ -832,16 +960,16 @@ trackedFiles: pristine_git_object: 47edb9725c2482c667e2ddc8a56b1fec4285c492 src/lib/sdks.ts: id: 8a6d91f1218d - last_write_checksum: sha1:817fb5878a7fb65ad0c3c1bc0ef9d3fe31d258e1 - pristine_git_object: 8ba2a0f86d67ad3fcca907874e2f80ebbccf2d01 + last_write_checksum: sha1:ec169ae511d52f2c75f82bca85579895638fa4ee + pristine_git_object: 86a6f99b311f43851436440711b72e544e15fa7a src/lib/security.ts: id: 0502afa7922e last_write_checksum: sha1:a7256658dfe8dba1f2b7037639de18f66f2aaf2e pristine_git_object: 8d6c8f385402a188aaac43312ec6457a1151fcb7 src/lib/url.ts: id: b0057e24ed76 - last_write_checksum: sha1:d124050c7e755c0cce233b9e029afb584ff65201 - pristine_git_object: f3a8de6c021de59c991707946cd294596cae954d + last_write_checksum: sha1:3bceadd74bf0b31adf13eb06b7531077c3e07d65 + pristine_git_object: 79e7ce660b3732053e3adcbb5a4cdeb51496e8aa src/mcp-server/build.mts: id: f7a2ed2de4d7 last_write_checksum: sha1:1a7a5dc9ace5a5d707bd8d2339f76719e525e7eb @@ -868,8 +996,8 @@ trackedFiles: pristine_git_object: 0955a573c2ce989d63c737410ab8cc28706d9f74 src/mcp-server/mcp-server.ts: id: aabbc4ab07c1 - last_write_checksum: sha1:68970cd340ea735a7a519fc4c7a28042de76a2ba - pristine_git_object: 45135adbbbf5d6c9939cf3b5d3689478a200e22c + last_write_checksum: sha1:7f305ad583befd44bb691cb2e399678edb6dd074 + pristine_git_object: 107552bbe22e19da8505c31a3a354a7de5fcfa93 src/mcp-server/prompts.ts: id: 26f3d73cbf31 last_write_checksum: sha1:3472c8babea2d3b44d3a61e42fbba471fbd936b7 @@ -884,8 +1012,8 @@ trackedFiles: pristine_git_object: c25696d4c4f70e081fa5d87ad6891874c509a577 src/mcp-server/server.ts: id: 2784dd48e82a - last_write_checksum: sha1:b35dcc76b8024c32ff73b57387830effde7c92e4 - pristine_git_object: 7c10f90e9e77b1589d624149ebcc2ef6555118f1 + last_write_checksum: sha1:775560ebef57af95bde2489dc7232125f22aa08c + pristine_git_object: 69c85743d3839bed296ff0572895f8d80fb86e61 src/mcp-server/shared.ts: id: 074e80d4be1e last_write_checksum: sha1:d89576cea2bef3856b7fc3e65b868875528be042 @@ -954,6 +1082,14 @@ trackedFiles: id: aa7d6471a385 last_write_checksum: sha1:a3fbeaa1791cb33940d95e5709f55b295425794c pristine_git_object: 6eadba6c9a06d3507e12e635b8c9d784ef5b47cd + src/mcp-server/tools/metricsGetAttemptMetrics.ts: + id: fcf855dd8ff5 + last_write_checksum: sha1:2cc80509220d43c908c631e84191701e61cea77b + pristine_git_object: 96c88c98cddb6f715e0e36b11db3cd1f36db66b1 + src/mcp-server/tools/metricsGetEventMetrics.ts: + id: 6e20dd2dcf8e + last_write_checksum: sha1:25d67affdeb0c7e3ddc0618468ec462b24f6e0c1 + pristine_git_object: 55ca65bbed764276c7e3b6189b49989b39a1fe09 src/mcp-server/tools/publishEvent.ts: id: cf8b2710f350 last_write_checksum: sha1:365fd053a867d98abf6792f72a34b8cf9425323e @@ -996,8 +1132,8 @@ trackedFiles: pristine_git_object: fabf96e933821da6e0b5f1deac287d966657a7b7 src/models/components/attempt.ts: id: 55593c6ff589 - last_write_checksum: sha1:2e94fb7be37ffdc2d8ff88da7e2efb25e26f63b9 - pristine_git_object: 9714f6f60af1591bc9395afdfbc8c0fa2c8b8c23 + last_write_checksum: sha1:99db1f226e9dd19c5b509a7596bd3da230f34c38 + pristine_git_object: 7a9640eb312bbf5c569174deb0c1077dac68f606 src/models/components/attemptpaginatedresult.ts: id: cee08168c920 last_write_checksum: sha1:0df4c5a8c0eca6ab38fedefc43e50e592b10f078 @@ -1158,18 +1294,10 @@ trackedFiles: id: a27c655f037c last_write_checksum: sha1:6da0fe5343751001184c13fcf4b4e86afe512f6f pristine_git_object: 590630d5bd59338c153fa50ff1f5170277599f40 - src/models/components/eventfull.ts: - id: 2ea74977190c - last_write_checksum: sha1:19b3b31ef6fb306d8fabe76a1524c19e207ac78f - pristine_git_object: 79606d8187b989e72a28684edf2cbee9666a13fd src/models/components/eventpaginatedresult.ts: id: c8429d525f2c last_write_checksum: sha1:54e247f30f3bcd51e972a74badf96c54260249dd pristine_git_object: ba64f6a5182135a510d01c14abd345bcba1a6788 - src/models/components/eventsummary.ts: - id: 2eb494ed3350 - last_write_checksum: sha1:5b9f760f24c20d9a29f643e6a6d893029df0c0ec - pristine_git_object: 09f79acb7eb5d406cb77db4635e66c1a9ad9122f src/models/components/gcppubsubconfig.ts: id: 8b98e7073aec last_write_checksum: sha1:43f24cd9eadda3e527eb38809fac044f7020c1f8 @@ -1184,8 +1312,20 @@ trackedFiles: pristine_git_object: d1d48bdf5e574fbc0a4b532477c21345b97e36a1 src/models/components/index.ts: id: 0aa842dce54d - last_write_checksum: sha1:451301720fd78d051c218fc80d8e1e9cb7ea9574 - pristine_git_object: 9d7914fa35a1804c8f2691dabe9c7b82d9d39d84 + last_write_checksum: sha1:fc4bf12d0a78af672eddbad36ce9dcbd929a12a2 + pristine_git_object: fedc4d39afc956e152304deab1ec75d871f18aad + src/models/components/metricsdatapoint.ts: + id: 55e9f7c3cc30 + last_write_checksum: sha1:10debb580d4318dc4467c8a4554e643518ee853c + pristine_git_object: eeca746e33ec6d8b26279b3311583f68a88ffb31 + src/models/components/metricsmetadata.ts: + id: 377bae392285 + last_write_checksum: sha1:25f91b6ec5f914e2ec6d8289705d6722ef6cd3d6 + pristine_git_object: d00a1804a9285e7e537cbe7881be98cd4abad126 + src/models/components/metricsresponse.ts: + id: c584790353bb + last_write_checksum: sha1:6ca45171e05056ce801a5bcda846ed60d518c938 + pristine_git_object: 811a01ae25de71079e995d95eb3025f92082c971 src/models/components/portalredirect.ts: id: 8a56b65352a9 last_write_checksum: sha1:dcaf10799feb99bad8897950ea2cf7457f900c7b @@ -1332,8 +1472,12 @@ trackedFiles: pristine_git_object: 748556cec7d226ff993c03129e0e116bf481023e src/models/operations/getattempt.ts: id: 1e29ee3806d0 - last_write_checksum: sha1:f1c59d47d71d12c0edbf58435dbe707b6c74951a - pristine_git_object: d7d95014e6ea7d2813397b70f0e7a8d541e7608a + last_write_checksum: sha1:fc9bd1b8af2d9c9e61ffd9b25be544b2b8a941f0 + pristine_git_object: bd79f9eebef7989e238e4178dfc5ac89101c95f9 + src/models/operations/getattemptmetrics.ts: + id: 046acdbc5af3 + last_write_checksum: sha1:d60fbd82506133b601efa1e4a77b15db1a2ab056 + pristine_git_object: 3517ddd314944022c27b3326db3855cc60e16ee5 src/models/operations/getdestinationtypeschema.ts: id: 66f17cba3cea last_write_checksum: sha1:31c517b873cd57db9bf5ca63857f0cfb2eb7478e @@ -1342,6 +1486,10 @@ trackedFiles: id: ff5a53e430c2 last_write_checksum: sha1:554609bad57d0d126f584b9cb52f51a1dddb530b pristine_git_object: 60b1f257a210197232b0bc9e55553a43804f18f9 + src/models/operations/geteventmetrics.ts: + id: c5dfe894e554 + last_write_checksum: sha1:289c9d33424c7f454417632f390a28131b8a3b23 + pristine_git_object: 5b3fb0a9a880f4e6271a2de8ced8ff77e2649271 src/models/operations/gettenant.ts: id: a84cfb40ee0e last_write_checksum: sha1:65562df14f876c203c5fcee623b4392cf741688a @@ -1352,8 +1500,8 @@ trackedFiles: pristine_git_object: a4c633987fbada9de11409988308e8f36e92932e src/models/operations/gettenantdestinationattempt.ts: id: 6e3d7c05ed74 - last_write_checksum: sha1:6b8b8136383241843a3d3f668088da21ee62bf66 - pristine_git_object: 7fdfac8c181de52b27e17419c0165fc7392b4521 + last_write_checksum: sha1:5967391a2a2e8bf67988981bc67ff80e018e9680 + pristine_git_object: 535ee30cf527c17fd003df909ba09d821dd14106 src/models/operations/gettenantportalurl.ts: id: 7da1ad2b3a94 last_write_checksum: sha1:d1e6eea60e40ef0887a3ef91cb00fbc29bb864bc @@ -1368,20 +1516,20 @@ trackedFiles: pristine_git_object: 7f0ea9939a5124957479343b9e67369e7dbdaaa8 src/models/operations/index.ts: id: 0d9ffaf774d2 - last_write_checksum: sha1:f45cb8649c621158f99ebd294b497c9c9db6ff60 - pristine_git_object: a5a697ad7eb868ecf77f811a8011a24b026ecf18 + last_write_checksum: sha1:b384406ad886b9aaea8eaa75cf9bf4fc4abec8ba + pristine_git_object: 0c5eb1f34fd61d2f92007b7065e8b5fd1940bc91 src/models/operations/listattempts.ts: id: 5d32427e0db0 - last_write_checksum: sha1:9990a3212307c007bce8dbd0e2ff4af5a3606593 - pristine_git_object: 31a8e99f9e7808f6643ae8716ad21712a411051e + last_write_checksum: sha1:0d937257a4d17f6b76aed87623071ed163bf47d1 + pristine_git_object: 7bbc6aabea251913bbadb3eac173f8dc21806145 src/models/operations/listevents.ts: id: 4324ebbf246a last_write_checksum: sha1:8ff43db87d10116be4ca461233425ab397647ab9 pristine_git_object: 905f1834db093cc8ccf42474f043ad834ff4d09e src/models/operations/listtenantdestinationattempts.ts: id: fab875a5d815 - last_write_checksum: sha1:fac1a48abf3a566f6237091fd0d8d262c0763ae0 - pristine_git_object: 828c7c514fba18e9d61c0bb4e9e5148ac919edfb + last_write_checksum: sha1:81180e17d75db2bb18abd5207864b088251da814 + pristine_git_object: ca4aa93de6cc12126177afede0fb3253da382ddb src/models/operations/listtenantdestinations.ts: id: 4f302620b5f9 last_write_checksum: sha1:7c6a2722d47d356687d002264cd59e6243ac40e1 @@ -1418,6 +1566,10 @@ trackedFiles: id: a857902a703f last_write_checksum: sha1:ed6d64f2a6135349aa8498b8d8cff9ba85c7fb8f pristine_git_object: ecac2264817bb369ff2dbf0f0e9029807e67ff77 + src/sdk/metrics.ts: + id: f82082e1b05c + last_write_checksum: sha1:747f1a65d9b57b1cd2a447e1242a96efdd05205d + pristine_git_object: edb89b163b4922f363881fa12bc29adb5fcf426f src/sdk/publish.ts: id: 5fd3cbd12735 last_write_checksum: sha1:74b49c7efb18da2f551825bda2288523327e1f44 @@ -1428,8 +1580,8 @@ trackedFiles: pristine_git_object: bb7f952e534f65d06552abe7849acb572d3ef287 src/sdk/sdk.ts: id: 784571af2f69 - last_write_checksum: sha1:2dabc22562955c1ec00909464268f305c36bc562 - pristine_git_object: bbbc0ae79e5dd3498f902c501596e25c9260fc1b + last_write_checksum: sha1:8a05e2168d685ebd99828f9c9fb2df76601a850d + pristine_git_object: 13b75ede96a3020583a07dd3351672cd53d1a362 src/sdk/tenants.ts: id: 7f3b22c334f5 last_write_checksum: sha1:eda082743774f2187caee546f475d53fac91c797 @@ -1925,12 +2077,74 @@ examples: responses: "200": application/json: {"models": [{"id": "del_123", "status": "success", "time": "2024-01-01T00:00:05Z", "code": "200", "attempt_number": 1, "event_id": "evt_123", "destination_id": "des_456", "event": {"id": "evt_123", "topic": "user.created", "time": "2024-01-01T00:00:00Z", "eligible_for_retry": false, "metadata": {"source": "crm"}}}], "pagination": {"order_by": "time", "dir": "desc", "limit": 100, "next": null, "prev": null}} + getEventMetrics: + speakeasy-default-get-event-metrics: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T14:00:00Z", "dimensions": {"destination_id": "dest_abc", "topic": "user.created"}, "metrics": {"count": 1423, "error_rate": 0.02}}], "metadata": {"granularity": "1h", "query_time_ms": 42, "row_count": 2, "row_limit": 100000, "truncated": false}} + "400": + application/json: {} + "401": + application/json: {} + "403": + application/json: {"status": 422, "message": "validation error", "data": ["email is required", "password must be at least 6 characters"]} + "500": + application/json: {} + HourlyEventCount: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T14:00:00Z", "dimensions": {"topic": "user.created"}, "metrics": {"count": 1423}}, {"time_bucket": "2026-03-02T15:00:00Z", "dimensions": {"topic": "user.created"}, "metrics": {"count": 1891}}], "metadata": {"granularity": "1h", "query_time_ms": 42, "row_count": 2, "row_limit": 100000, "truncated": false}} + getAttemptMetrics: + speakeasy-default-get-attempt-metrics: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count", "error_rate"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T14:00:00Z", "dimensions": {"destination_id": "dest_abc", "topic": "user.created"}, "metrics": {"count": 1423, "error_rate": 0.02}}], "metadata": {"granularity": "1h", "query_time_ms": 42, "row_count": 2, "row_limit": 100000, "truncated": false}} + "400": + application/json: {} + "401": + application/json: {} + "403": + application/json: {"status": 422, "message": "validation error", "data": ["email is required", "password must be at least 6 characters"]} + "500": + application/json: {} + DailyAttemptCounts: + parameters: + query: + time[start]: "2026-03-02T00:00:00Z" + time[end]: "2026-03-03T00:00:00Z" + granularity: "1h" + measures: ["count", "error_rate"] + responses: + "200": + application/json: {"data": [{"time_bucket": "2026-03-02T00:00:00Z", "dimensions": {"destination_id": "dest_abc"}, "metrics": {"count": 1423, "successful_count": 1393, "failed_count": 30, "error_rate": 0.0211}}], "metadata": {"granularity": "1d", "query_time_ms": 38, "row_count": 1, "row_limit": 100000, "truncated": false}} examplesVersion: 1.0.2 generatedTests: {} releaseNotes: | ## Typescript SDK Changes: - * `outpost.schemas.listDestinationTypes()`: `response.[].configFields[].type.enum(keyValueMap)` **Added** (Breaking ⚠️) - * `outpost.schemas.getDestinationType()`: `response.configFields[].type.enum(keyValueMap)` **Added** (Breaking ⚠️) + * `outpost.attempts.list()`: `response.models[]` **Changed** (Breaking ⚠️) + * `outpost.attempts.get()`: `response` **Changed** (Breaking ⚠️) + * `outpost.destinations.listAttempts()`: `response.models[]` **Changed** (Breaking ⚠️) + * `outpost.destinations.getAttempt()`: `response` **Changed** (Breaking ⚠️) + * `outpost.metrics.getEventMetrics()`: **Added** + * `outpost.metrics.getAttemptMetrics()`: **Added** generatedFiles: - .gitattributes - .npmignore diff --git a/sdks/outpost-typescript/.speakeasy/gen.yaml b/sdks/outpost-typescript/.speakeasy/gen.yaml index 138063c70..67a560866 100644 --- a/sdks/outpost-typescript/.speakeasy/gen.yaml +++ b/sdks/outpost-typescript/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false typescript: - version: 0.9.1 + version: 0.9.2 acceptHeaderEnum: true additionalDependencies: dependencies: {} diff --git a/sdks/outpost-typescript/README.md b/sdks/outpost-typescript/README.md index 3e658232b..48ca5e461 100644 --- a/sdks/outpost-typescript/README.md +++ b/sdks/outpost-typescript/README.md @@ -244,6 +244,11 @@ run(); * [check](docs/sdks/health/README.md#check) - Health Check +### [Metrics](docs/sdks/metrics/README.md) + +* [getEventMetrics](docs/sdks/metrics/README.md#geteventmetrics) - Get Event Metrics +* [getAttemptMetrics](docs/sdks/metrics/README.md#getattemptmetrics) - Get Attempt Metrics + ### [Publish](docs/sdks/publish/README.md) * [event](docs/sdks/publish/README.md#event) - Publish Event @@ -299,6 +304,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`eventsGet`](docs/sdks/events/README.md#get) - Get Event - [`eventsList`](docs/sdks/events/README.md#list) - List Events - [`healthCheck`](docs/sdks/health/README.md#check) - Health Check +- [`metricsGetAttemptMetrics`](docs/sdks/metrics/README.md#getattemptmetrics) - Get Attempt Metrics +- [`metricsGetEventMetrics`](docs/sdks/metrics/README.md#geteventmetrics) - Get Event Metrics - [`publishEvent`](docs/sdks/publish/README.md#event) - Publish Event - [`schemasGetDestinationType`](docs/sdks/schemas/README.md#getdestinationtype) - Get Destination Type Schema - [`schemasListDestinationTypes`](docs/sdks/schemas/README.md#listdestinationtypes) - List Destination Type Schemas @@ -457,9 +464,8 @@ run(); * [`OutpostError`](./src/models/errors/outposterror.ts): The base class for HTTP error responses. * [`UnauthorizedError`](./src/models/errors/unauthorizederror.ts): A collection of codes that generally means the client was not authenticated correctly for the request they want to make. * [`InternalServerError`](./src/models/errors/internalservererror.ts): A collection of status codes that generally mean the server failed in an unexpected way. - * [`NotFoundError`](./src/models/errors/notfounderror.ts): Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing. * -
Less common errors (11) +
Less common errors (12)
@@ -472,11 +478,12 @@ run(); **Inherit from [`OutpostError`](./src/models/errors/outposterror.ts)**: -* [`BadRequestError`](./src/models/errors/badrequesterror.ts): A collection of codes that generally means the end user got something wrong in making the request. Applicable to 6 of 25 methods.* -* [`TimeoutError`](./src/models/errors/timeouterror.ts): Timeouts occurred with the request. Applicable to 5 of 25 methods.* -* [`RateLimitedError`](./src/models/errors/ratelimitederror.ts): Status codes relating to the client being rate limited by the server. Status code `429`. Applicable to 5 of 25 methods.* -* [`APIErrorResponse`](./src/models/errors/apierrorresponse.ts): Standard error response format. Status code `422`. Applicable to 3 of 25 methods.* -* [`NotImplementedError`](./src/models/errors/notimplementederror.ts): List Tenants feature is not available. Requires Redis with RediSearch module. Status code `501`. Applicable to 1 of 25 methods.* +* [`NotFoundError`](./src/models/errors/notfounderror.ts): Status codes relating to the resource/entity they are requesting not being found or endpoints/routes not existing. Applicable to 21 of 27 methods.* +* [`BadRequestError`](./src/models/errors/badrequesterror.ts): A collection of codes that generally means the end user got something wrong in making the request. Applicable to 8 of 27 methods.* +* [`APIErrorResponse`](./src/models/errors/apierrorresponse.ts): Standard error response format. Applicable to 5 of 27 methods.* +* [`TimeoutError`](./src/models/errors/timeouterror.ts): Timeouts occurred with the request. Applicable to 5 of 27 methods.* +* [`RateLimitedError`](./src/models/errors/ratelimitederror.ts): Status codes relating to the client being rate limited by the server. Status code `429`. Applicable to 5 of 27 methods.* +* [`NotImplementedError`](./src/models/errors/notimplementederror.ts): List Tenants feature is not available. Requires Redis with RediSearch module. Status code `501`. Applicable to 1 of 27 methods.* * [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
diff --git a/sdks/outpost-typescript/RELEASES.md b/sdks/outpost-typescript/RELEASES.md index a457b67c5..9499afb4b 100644 --- a/sdks/outpost-typescript/RELEASES.md +++ b/sdks/outpost-typescript/RELEASES.md @@ -88,4 +88,14 @@ Based on: ### Generated - [typescript v0.9.1] sdks/outpost-typescript ### Releases -- [NPM v0.9.1] https://www.npmjs.com/package/@hookdeck/outpost-sdk/v/0.9.1 - sdks/outpost-typescript \ No newline at end of file +- [NPM v0.9.1] https://www.npmjs.com/package/@hookdeck/outpost-sdk/v/0.9.1 - sdks/outpost-typescript + +## 2026-03-24 17:06:19 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.759.1 (2.869.10) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.9.2] sdks/outpost-typescript +### Releases +- [NPM v0.9.2] https://www.npmjs.com/package/@hookdeck/outpost-sdk/v/0.9.2 - sdks/outpost-typescript \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/components/attempt.md b/sdks/outpost-typescript/docs/models/components/attempt.md index f6341f9d5..e200c0d6b 100644 --- a/sdks/outpost-typescript/docs/models/components/attempt.md +++ b/sdks/outpost-typescript/docs/models/components/attempt.md @@ -34,6 +34,29 @@ let value: Attempt = { metadata: { "source": "crm", }, + data: { + "user_id": "userid", + "status": "active", + }, + }, + destination: { + id: "des_webhook_123", + type: "webhook", + topics: [ + "user.created", + "order.shipped", + ], + disabledAt: null, + createdAt: new Date("2024-02-15T10:00:00Z"), + updatedAt: new Date("2024-02-15T10:00:00Z"), + config: { + url: "https://my-service.com/webhook/handler", + }, + credentials: { + secret: "whsec_abc123def456", + previousSecret: "whsec_prev789xyz012", + previousSecretInvalidAt: new Date("2024-02-16T10:00:00Z"), + }, }, }; ``` @@ -52,4 +75,5 @@ let value: Attempt = { | `manual` | *boolean* | :heavy_minus_sign: | Whether this attempt was manually triggered (e.g., a retry initiated by a user). | false | | `eventId` | *string* | :heavy_minus_sign: | The ID of the associated event. | evt_123 | | `destinationId` | *string* | :heavy_minus_sign: | The destination ID this attempt was sent to. | des_456 | -| `event` | *components.EventUnion* | :heavy_minus_sign: | The associated event object. Only present when include=event or include=event.data. | | \ No newline at end of file +| `event` | *components.EventUnion* | :heavy_minus_sign: | The associated event object. Only present when include=event or include=event.data. | | +| `destination` | *components.Destination* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/components/attemptpaginatedresult.md b/sdks/outpost-typescript/docs/models/components/attemptpaginatedresult.md index 34b23b492..d595fc1a8 100644 --- a/sdks/outpost-typescript/docs/models/components/attemptpaginatedresult.md +++ b/sdks/outpost-typescript/docs/models/components/attemptpaginatedresult.md @@ -36,9 +36,24 @@ let value: AttemptPaginatedResult = { metadata: { "source": "crm", }, - data: { - "user_id": "userid", - "status": "active", + }, + destination: { + id: "des_webhook_123", + type: "webhook", + topics: [ + "user.created", + "order.shipped", + ], + disabledAt: null, + createdAt: new Date("2024-02-15T10:00:00Z"), + updatedAt: new Date("2024-02-15T10:00:00Z"), + config: { + url: "https://my-service.com/webhook/handler", + }, + credentials: { + secret: "whsec_abc123def456", + previousSecret: "whsec_prev789xyz012", + previousSecretInvalidAt: new Date("2024-02-16T10:00:00Z"), }, }, }, diff --git a/sdks/outpost-typescript/docs/models/components/metricsdatapoint.md b/sdks/outpost-typescript/docs/models/components/metricsdatapoint.md new file mode 100644 index 000000000..e1d4a43b0 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/components/metricsdatapoint.md @@ -0,0 +1,27 @@ +# MetricsDataPoint + +## Example Usage + +```typescript +import { MetricsDataPoint } from "@hookdeck/outpost-sdk/models/components"; + +let value: MetricsDataPoint = { + timeBucket: new Date("2026-03-02T14:00:00Z"), + dimensions: { + "destination_id": "dest_abc", + "topic": "user.created", + }, + metrics: { + "count": 1423, + "error_rate": 0.02, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `timeBucket` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Start of the time bucket. Null when no granularity is specified. | 2026-03-02T14:00:00Z | +| `dimensions` | Record | :heavy_minus_sign: | Dimension values for this data point. Empty object when no dimensions are requested. | {
"destination_id": "dest_abc",
"topic": "user.created"
} | +| `metrics` | Record | :heavy_minus_sign: | Requested measure values for this data point. | {
"count": 1423,
"error_rate": 0.02
} | \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/components/metricsmetadata.md b/sdks/outpost-typescript/docs/models/components/metricsmetadata.md new file mode 100644 index 000000000..a0bb64e78 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/components/metricsmetadata.md @@ -0,0 +1,25 @@ +# MetricsMetadata + +## Example Usage + +```typescript +import { MetricsMetadata } from "@hookdeck/outpost-sdk/models/components"; + +let value: MetricsMetadata = { + granularity: "1h", + queryTimeMs: 42, + rowCount: 2, + rowLimit: 100000, + truncated: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `granularity` | *string* | :heavy_minus_sign: | The granularity used for time bucketing, or null if none was specified. | 1h | +| `queryTimeMs` | *number* | :heavy_minus_sign: | Query execution time in milliseconds. | 42 | +| `rowCount` | *number* | :heavy_minus_sign: | Number of data points returned. | 2 | +| `rowLimit` | *number* | :heavy_minus_sign: | Maximum number of rows the query will return. | 100000 | +| `truncated` | *boolean* | :heavy_minus_sign: | Whether the results were truncated due to hitting the row limit. | false | \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/components/metricsresponse.md b/sdks/outpost-typescript/docs/models/components/metricsresponse.md new file mode 100644 index 000000000..d2dc65edd --- /dev/null +++ b/sdks/outpost-typescript/docs/models/components/metricsresponse.md @@ -0,0 +1,37 @@ +# MetricsResponse + +## Example Usage + +```typescript +import { MetricsResponse } from "@hookdeck/outpost-sdk/models/components"; + +let value: MetricsResponse = { + data: [ + { + timeBucket: new Date("2026-03-02T14:00:00Z"), + dimensions: { + "destination_id": "dest_abc", + "topic": "user.created", + }, + metrics: { + "count": 1423, + "error_rate": 0.02, + }, + }, + ], + metadata: { + granularity: "1h", + queryTimeMs: 42, + rowCount: 2, + rowLimit: 100000, + truncated: false, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `data` | [components.MetricsDataPoint](../../models/components/metricsdatapoint.md)[] | :heavy_minus_sign: | Array of aggregated data points. | +| `metadata` | [components.MetricsMetadata](../../models/components/metricsmetadata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/filtersattemptnumber.md b/sdks/outpost-typescript/docs/models/operations/filtersattemptnumber.md new file mode 100644 index 000000000..160c3a730 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/filtersattemptnumber.md @@ -0,0 +1,22 @@ +# FiltersAttemptNumber + +Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `string[]` + +```typescript +const value: string[] = [ + "", + "", +]; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/filterscode.md b/sdks/outpost-typescript/docs/models/operations/filterscode.md new file mode 100644 index 000000000..007fd2eb4 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/filterscode.md @@ -0,0 +1,22 @@ +# FiltersCode + +Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `string[]` + +```typescript +const value: string[] = [ + "", + "", +]; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/filtersmanual.md b/sdks/outpost-typescript/docs/models/operations/filtersmanual.md new file mode 100644 index 000000000..9fe399606 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/filtersmanual.md @@ -0,0 +1,17 @@ +# FiltersManual + +Filter by manual retry flag. + +## Example Usage + +```typescript +import { FiltersManual } from "@hookdeck/outpost-sdk/models/operations"; + +let value: FiltersManual = "true"; +``` + +## Values + +```typescript +"true" | "false" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/filtersstatus.md b/sdks/outpost-typescript/docs/models/operations/filtersstatus.md new file mode 100644 index 000000000..b415c7153 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/filtersstatus.md @@ -0,0 +1,21 @@ +# FiltersStatus + +Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). + + +## Supported Types + +### `operations.FiltersStatusEnum1` + +```typescript +const value: operations.FiltersStatusEnum1 = "success"; +``` + +### `operations.FiltersStatusEnum2[]` + +```typescript +const value: operations.FiltersStatusEnum2[] = [ + "failed", +]; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/filtersstatusenum1.md b/sdks/outpost-typescript/docs/models/operations/filtersstatusenum1.md new file mode 100644 index 000000000..9f43a282d --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/filtersstatusenum1.md @@ -0,0 +1,15 @@ +# FiltersStatusEnum1 + +## Example Usage + +```typescript +import { FiltersStatusEnum1 } from "@hookdeck/outpost-sdk/models/operations"; + +let value: FiltersStatusEnum1 = "failed"; +``` + +## Values + +```typescript +"success" | "failed" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/filtersstatusenum2.md b/sdks/outpost-typescript/docs/models/operations/filtersstatusenum2.md new file mode 100644 index 000000000..c2ff254bc --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/filtersstatusenum2.md @@ -0,0 +1,15 @@ +# FiltersStatusEnum2 + +## Example Usage + +```typescript +import { FiltersStatusEnum2 } from "@hookdeck/outpost-sdk/models/operations"; + +let value: FiltersStatusEnum2 = "failed"; +``` + +## Values + +```typescript +"success" | "failed" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptinclude.md b/sdks/outpost-typescript/docs/models/operations/getattemptinclude.md index ef32d450e..94d313154 100644 --- a/sdks/outpost-typescript/docs/models/operations/getattemptinclude.md +++ b/sdks/outpost-typescript/docs/models/operations/getattemptinclude.md @@ -4,6 +4,7 @@ Fields to include in the response. Use bracket notation for multiple values (e.g - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptmetricsdimensionsenum1.md b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsdimensionsenum1.md new file mode 100644 index 000000000..97cd935bf --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsdimensionsenum1.md @@ -0,0 +1,15 @@ +# GetAttemptMetricsDimensionsEnum1 + +## Example Usage + +```typescript +import { GetAttemptMetricsDimensionsEnum1 } from "@hookdeck/outpost-sdk/models/operations"; + +let value: GetAttemptMetricsDimensionsEnum1 = "topic"; +``` + +## Values + +```typescript +"tenant_id" | "destination_id" | "topic" | "status" | "code" | "manual" | "attempt_number" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptmetricsdimensionsenum2.md b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsdimensionsenum2.md new file mode 100644 index 000000000..d92ff56d4 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsdimensionsenum2.md @@ -0,0 +1,15 @@ +# GetAttemptMetricsDimensionsEnum2 + +## Example Usage + +```typescript +import { GetAttemptMetricsDimensionsEnum2 } from "@hookdeck/outpost-sdk/models/operations"; + +let value: GetAttemptMetricsDimensionsEnum2 = "attempt_number"; +``` + +## Values + +```typescript +"tenant_id" | "destination_id" | "topic" | "status" | "code" | "manual" | "attempt_number" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptmetricsdimensionsunion.md b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsdimensionsunion.md new file mode 100644 index 000000000..f0b361e0c --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsdimensionsunion.md @@ -0,0 +1,21 @@ +# GetAttemptMetricsDimensionsUnion + +Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). + + +## Supported Types + +### `operations.GetAttemptMetricsDimensionsEnum1` + +```typescript +const value: operations.GetAttemptMetricsDimensionsEnum1 = "destination_id"; +``` + +### `operations.GetAttemptMetricsDimensionsEnum2[]` + +```typescript +const value: operations.GetAttemptMetricsDimensionsEnum2[] = [ + "destination_id", +]; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptmetricsfiltersdestinationid.md b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsfiltersdestinationid.md new file mode 100644 index 000000000..4c7dd7993 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsfiltersdestinationid.md @@ -0,0 +1,22 @@ +# GetAttemptMetricsFiltersDestinationId + +Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `string[]` + +```typescript +const value: string[] = [ + "", + "", +]; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptmetricsfilterstenantid.md b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsfilterstenantid.md new file mode 100644 index 000000000..198eeaf92 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsfilterstenantid.md @@ -0,0 +1,22 @@ +# GetAttemptMetricsFiltersTenantId + +Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `string[]` + +```typescript +const value: string[] = [ + "", + "", +]; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptmetricsfilterstopic.md b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsfilterstopic.md new file mode 100644 index 000000000..407ff50af --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsfilterstopic.md @@ -0,0 +1,22 @@ +# GetAttemptMetricsFiltersTopic + +Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `string[]` + +```typescript +const value: string[] = [ + "", + "", +]; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptmetricsmeasuresenum1.md b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsmeasuresenum1.md new file mode 100644 index 000000000..7f97c190f --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsmeasuresenum1.md @@ -0,0 +1,15 @@ +# GetAttemptMetricsMeasuresEnum1 + +## Example Usage + +```typescript +import { GetAttemptMetricsMeasuresEnum1 } from "@hookdeck/outpost-sdk/models/operations"; + +let value: GetAttemptMetricsMeasuresEnum1 = "manual_retry_count"; +``` + +## Values + +```typescript +"count" | "successful_count" | "failed_count" | "error_rate" | "first_attempt_count" | "retry_count" | "manual_retry_count" | "avg_attempt_number" | "rate" | "successful_rate" | "failed_rate" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptmetricsmeasuresenum2.md b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsmeasuresenum2.md new file mode 100644 index 000000000..2da8d17f8 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsmeasuresenum2.md @@ -0,0 +1,15 @@ +# GetAttemptMetricsMeasuresEnum2 + +## Example Usage + +```typescript +import { GetAttemptMetricsMeasuresEnum2 } from "@hookdeck/outpost-sdk/models/operations"; + +let value: GetAttemptMetricsMeasuresEnum2 = "rate"; +``` + +## Values + +```typescript +"count" | "successful_count" | "failed_count" | "error_rate" | "first_attempt_count" | "retry_count" | "manual_retry_count" | "avg_attempt_number" | "rate" | "successful_rate" | "failed_rate" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptmetricsmeasuresunion.md b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsmeasuresunion.md new file mode 100644 index 000000000..13c46492d --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsmeasuresunion.md @@ -0,0 +1,19 @@ +# GetAttemptMetricsMeasuresUnion + +Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). + + +## Supported Types + +### `operations.GetAttemptMetricsMeasuresEnum1` + +```typescript +const value: operations.GetAttemptMetricsMeasuresEnum1 = "failed_rate"; +``` + +### `operations.GetAttemptMetricsMeasuresEnum2[]` + +```typescript +const value: operations.GetAttemptMetricsMeasuresEnum2[] = []; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptmetricsrequest.md b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsrequest.md new file mode 100644 index 000000000..edd603363 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/getattemptmetricsrequest.md @@ -0,0 +1,34 @@ +# GetAttemptMetricsRequest + +## Example Usage + +```typescript +import { GetAttemptMetricsRequest } from "@hookdeck/outpost-sdk/models/operations"; + +let value: GetAttemptMetricsRequest = { + timeStart: new Date("2026-03-02T00:00:00Z"), + timeEnd: new Date("2026-03-03T00:00:00Z"), + granularity: "1h", + measures: [ + "count", + "error_rate", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `timeStart` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Start of the time range (inclusive). ISO 8601 timestamp. | 2026-03-02T00:00:00Z | +| `timeEnd` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | End of the time range (exclusive). ISO 8601 timestamp. | 2026-03-03T00:00:00Z | +| `granularity` | *string* | :heavy_minus_sign: | Time bucketing granularity. Pattern: ``.
Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12).
When omitted, returns a single aggregate row per dimension combination.
| 1h | +| `measures` | *operations.GetAttemptMetricsMeasuresUnion* | :heavy_check_mark: | Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). | [
"count",
"error_rate"
] | +| `dimensions` | *operations.GetAttemptMetricsDimensionsUnion* | :heavy_minus_sign: | Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). | | +| `filtersDestinationId` | *operations.GetAttemptMetricsFiltersDestinationId* | :heavy_minus_sign: | Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). | | +| `filtersTopic` | *operations.GetAttemptMetricsFiltersTopic* | :heavy_minus_sign: | Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). | | +| `filtersStatus` | *operations.FiltersStatus* | :heavy_minus_sign: | Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). | | +| `filtersCode` | *operations.FiltersCode* | :heavy_minus_sign: | Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). | | +| `filtersManual` | [operations.FiltersManual](../../models/operations/filtersmanual.md) | :heavy_minus_sign: | Filter by manual retry flag. | | +| `filtersAttemptNumber` | *operations.FiltersAttemptNumber* | :heavy_minus_sign: | Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). | | +| `filtersTenantId` | *operations.GetAttemptMetricsFiltersTenantId* | :heavy_minus_sign: | Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). | | \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/getattemptrequest.md b/sdks/outpost-typescript/docs/models/operations/getattemptrequest.md index 3b7592b28..2fd5b3175 100644 --- a/sdks/outpost-typescript/docs/models/operations/getattemptrequest.md +++ b/sdks/outpost-typescript/docs/models/operations/getattemptrequest.md @@ -12,7 +12,7 @@ let value: GetAttemptRequest = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `attemptId` | *string* | :heavy_check_mark: | The ID of the attempt. | -| `include` | *operations.GetAttemptInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `attemptId` | *string* | :heavy_check_mark: | The ID of the attempt. | +| `include` | *operations.GetAttemptInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/geteventmetricsdimensionsenum1.md b/sdks/outpost-typescript/docs/models/operations/geteventmetricsdimensionsenum1.md new file mode 100644 index 000000000..ee29bd96b --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/geteventmetricsdimensionsenum1.md @@ -0,0 +1,15 @@ +# GetEventMetricsDimensionsEnum1 + +## Example Usage + +```typescript +import { GetEventMetricsDimensionsEnum1 } from "@hookdeck/outpost-sdk/models/operations"; + +let value: GetEventMetricsDimensionsEnum1 = "destination_id"; +``` + +## Values + +```typescript +"tenant_id" | "topic" | "destination_id" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/geteventmetricsdimensionsenum2.md b/sdks/outpost-typescript/docs/models/operations/geteventmetricsdimensionsenum2.md new file mode 100644 index 000000000..e8d0dbe2a --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/geteventmetricsdimensionsenum2.md @@ -0,0 +1,15 @@ +# GetEventMetricsDimensionsEnum2 + +## Example Usage + +```typescript +import { GetEventMetricsDimensionsEnum2 } from "@hookdeck/outpost-sdk/models/operations"; + +let value: GetEventMetricsDimensionsEnum2 = "destination_id"; +``` + +## Values + +```typescript +"tenant_id" | "topic" | "destination_id" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/geteventmetricsdimensionsunion.md b/sdks/outpost-typescript/docs/models/operations/geteventmetricsdimensionsunion.md new file mode 100644 index 000000000..d9335f461 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/geteventmetricsdimensionsunion.md @@ -0,0 +1,19 @@ +# GetEventMetricsDimensionsUnion + +Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). + + +## Supported Types + +### `operations.GetEventMetricsDimensionsEnum1` + +```typescript +const value: operations.GetEventMetricsDimensionsEnum1 = "destination_id"; +``` + +### `operations.GetEventMetricsDimensionsEnum2[]` + +```typescript +const value: operations.GetEventMetricsDimensionsEnum2[] = []; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/geteventmetricsfiltersdestinationid.md b/sdks/outpost-typescript/docs/models/operations/geteventmetricsfiltersdestinationid.md new file mode 100644 index 000000000..49f3aa4ce --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/geteventmetricsfiltersdestinationid.md @@ -0,0 +1,22 @@ +# GetEventMetricsFiltersDestinationId + +Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `string[]` + +```typescript +const value: string[] = [ + "", + "", +]; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/geteventmetricsfilterstenantid.md b/sdks/outpost-typescript/docs/models/operations/geteventmetricsfilterstenantid.md new file mode 100644 index 000000000..86be6408e --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/geteventmetricsfilterstenantid.md @@ -0,0 +1,22 @@ +# GetEventMetricsFiltersTenantId + +Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `string[]` + +```typescript +const value: string[] = [ + "", + "", +]; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/geteventmetricsfilterstopic.md b/sdks/outpost-typescript/docs/models/operations/geteventmetricsfilterstopic.md new file mode 100644 index 000000000..bd27c69a0 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/geteventmetricsfilterstopic.md @@ -0,0 +1,22 @@ +# GetEventMetricsFiltersTopic + +Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + + +## Supported Types + +### `string` + +```typescript +const value: string = ""; +``` + +### `string[]` + +```typescript +const value: string[] = [ + "", + "", +]; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/geteventmetricsmeasuresenum1.md b/sdks/outpost-typescript/docs/models/operations/geteventmetricsmeasuresenum1.md new file mode 100644 index 000000000..9bd22dfc9 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/geteventmetricsmeasuresenum1.md @@ -0,0 +1,15 @@ +# GetEventMetricsMeasuresEnum1 + +## Example Usage + +```typescript +import { GetEventMetricsMeasuresEnum1 } from "@hookdeck/outpost-sdk/models/operations"; + +let value: GetEventMetricsMeasuresEnum1 = "count"; +``` + +## Values + +```typescript +"count" | "rate" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/geteventmetricsmeasuresenum2.md b/sdks/outpost-typescript/docs/models/operations/geteventmetricsmeasuresenum2.md new file mode 100644 index 000000000..09d3fa674 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/geteventmetricsmeasuresenum2.md @@ -0,0 +1,15 @@ +# GetEventMetricsMeasuresEnum2 + +## Example Usage + +```typescript +import { GetEventMetricsMeasuresEnum2 } from "@hookdeck/outpost-sdk/models/operations"; + +let value: GetEventMetricsMeasuresEnum2 = "count"; +``` + +## Values + +```typescript +"count" | "rate" +``` \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/geteventmetricsmeasuresunion.md b/sdks/outpost-typescript/docs/models/operations/geteventmetricsmeasuresunion.md new file mode 100644 index 000000000..a0b8c0bdd --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/geteventmetricsmeasuresunion.md @@ -0,0 +1,19 @@ +# GetEventMetricsMeasuresUnion + +Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). + + +## Supported Types + +### `operations.GetEventMetricsMeasuresEnum1` + +```typescript +const value: operations.GetEventMetricsMeasuresEnum1 = "rate"; +``` + +### `operations.GetEventMetricsMeasuresEnum2[]` + +```typescript +const value: operations.GetEventMetricsMeasuresEnum2[] = []; +``` + diff --git a/sdks/outpost-typescript/docs/models/operations/geteventmetricsrequest.md b/sdks/outpost-typescript/docs/models/operations/geteventmetricsrequest.md new file mode 100644 index 000000000..028789a37 --- /dev/null +++ b/sdks/outpost-typescript/docs/models/operations/geteventmetricsrequest.md @@ -0,0 +1,29 @@ +# GetEventMetricsRequest + +## Example Usage + +```typescript +import { GetEventMetricsRequest } from "@hookdeck/outpost-sdk/models/operations"; + +let value: GetEventMetricsRequest = { + timeStart: new Date("2026-03-02T00:00:00Z"), + timeEnd: new Date("2026-03-03T00:00:00Z"), + granularity: "1h", + measures: [ + "count", + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `timeStart` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | Start of the time range (inclusive). ISO 8601 timestamp. | 2026-03-02T00:00:00Z | +| `timeEnd` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_check_mark: | End of the time range (exclusive). ISO 8601 timestamp. | 2026-03-03T00:00:00Z | +| `granularity` | *string* | :heavy_minus_sign: | Time bucketing granularity. Pattern: ``.
Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12).
When omitted, returns a single aggregate row per dimension combination.
| 1h | +| `measures` | *operations.GetEventMetricsMeasuresUnion* | :heavy_check_mark: | Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). | [
"count"
] | +| `dimensions` | *operations.GetEventMetricsDimensionsUnion* | :heavy_minus_sign: | Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). | | +| `filtersTopic` | *operations.GetEventMetricsFiltersTopic* | :heavy_minus_sign: | Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). | | +| `filtersDestinationId` | *operations.GetEventMetricsFiltersDestinationId* | :heavy_minus_sign: | Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). | | +| `filtersTenantId` | *operations.GetEventMetricsFiltersTenantId* | :heavy_minus_sign: | Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). | | \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/gettenantdestinationattemptinclude.md b/sdks/outpost-typescript/docs/models/operations/gettenantdestinationattemptinclude.md index e8d56ea64..b6c9a38f7 100644 --- a/sdks/outpost-typescript/docs/models/operations/gettenantdestinationattemptinclude.md +++ b/sdks/outpost-typescript/docs/models/operations/gettenantdestinationattemptinclude.md @@ -4,6 +4,7 @@ Fields to include in the response. Use bracket notation for multiple values (e.g - `event`: Include event summary - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object diff --git a/sdks/outpost-typescript/docs/models/operations/gettenantdestinationattemptrequest.md b/sdks/outpost-typescript/docs/models/operations/gettenantdestinationattemptrequest.md index f483c1c0c..8dcee08f7 100644 --- a/sdks/outpost-typescript/docs/models/operations/gettenantdestinationattemptrequest.md +++ b/sdks/outpost-typescript/docs/models/operations/gettenantdestinationattemptrequest.md @@ -14,9 +14,9 @@ let value: GetTenantDestinationAttemptRequest = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tenantId` | *string* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | -| `destinationId` | *string* | :heavy_check_mark: | The ID of the destination. | -| `attemptId` | *string* | :heavy_check_mark: | The ID of the attempt. | -| `include` | *operations.GetTenantDestinationAttemptInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tenantId` | *string* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | +| `destinationId` | *string* | :heavy_check_mark: | The ID of the destination. | +| `attemptId` | *string* | :heavy_check_mark: | The ID of the attempt. | +| `include` | *operations.GetTenantDestinationAttemptInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/listattemptsinclude.md b/sdks/outpost-typescript/docs/models/operations/listattemptsinclude.md index 96a30565b..79c84f7bc 100644 --- a/sdks/outpost-typescript/docs/models/operations/listattemptsinclude.md +++ b/sdks/outpost-typescript/docs/models/operations/listattemptsinclude.md @@ -4,6 +4,7 @@ Fields to include in the response. Use bracket notation for multiple values (e.g - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object diff --git a/sdks/outpost-typescript/docs/models/operations/listattemptsrequest.md b/sdks/outpost-typescript/docs/models/operations/listattemptsrequest.md index b1ee918f7..deb4f5799 100644 --- a/sdks/outpost-typescript/docs/models/operations/listattemptsrequest.md +++ b/sdks/outpost-typescript/docs/models/operations/listattemptsrequest.md @@ -10,20 +10,20 @@ let value: ListAttemptsRequest = {}; ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tenantId` | *operations.ListAttemptsTenantId* | :heavy_minus_sign: | Filter attempts by tenant ID(s). Use bracket notation for multiple values (e.g., `tenant_id[0]=t1&tenant_id[1]=t2`).
When authenticated with a Tenant JWT, this parameter is ignored and the JWT's tenant is used.
If not provided with API key auth, returns attempts from all tenants.
| -| `eventId` | *operations.ListAttemptsEventId* | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | -| `destinationId` | *operations.DestinationId* | :heavy_minus_sign: | Filter attempts by destination ID(s). Use bracket notation for multiple values (e.g., `destination_id[0]=d1&destination_id[1]=d2`). | -| `status` | [operations.ListAttemptsStatus](../../models/operations/listattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | -| `topic` | *operations.ListAttemptsTopic* | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | -| `timeGte` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | -| `timeLte` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | -| `timeGt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | -| `timeLt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | -| `limit` | *number* | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | -| `next` | *string* | :heavy_minus_sign: | Cursor for next page of results. | -| `prev` | *string* | :heavy_minus_sign: | Cursor for previous page of results. | -| `include` | *operations.ListAttemptsInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `orderBy` | [operations.ListAttemptsOrderBy](../../models/operations/listattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | -| `dir` | [operations.ListAttemptsDir](../../models/operations/listattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tenantId` | *operations.ListAttemptsTenantId* | :heavy_minus_sign: | Filter attempts by tenant ID(s). Use bracket notation for multiple values (e.g., `tenant_id[0]=t1&tenant_id[1]=t2`).
When authenticated with a Tenant JWT, this parameter is ignored and the JWT's tenant is used.
If not provided with API key auth, returns attempts from all tenants.
| +| `eventId` | *operations.ListAttemptsEventId* | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | +| `destinationId` | *operations.DestinationId* | :heavy_minus_sign: | Filter attempts by destination ID(s). Use bracket notation for multiple values (e.g., `destination_id[0]=d1&destination_id[1]=d2`). | +| `status` | [operations.ListAttemptsStatus](../../models/operations/listattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | +| `topic` | *operations.ListAttemptsTopic* | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | +| `timeGte` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | +| `timeLte` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | +| `timeGt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | +| `timeLt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | +| `limit` | *number* | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | +| `next` | *string* | :heavy_minus_sign: | Cursor for next page of results. | +| `prev` | *string* | :heavy_minus_sign: | Cursor for previous page of results. | +| `include` | *operations.ListAttemptsInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `orderBy` | [operations.ListAttemptsOrderBy](../../models/operations/listattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | +| `dir` | [operations.ListAttemptsDir](../../models/operations/listattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/listattemptsresponse.md b/sdks/outpost-typescript/docs/models/operations/listattemptsresponse.md index 1602725fd..6a8cc994a 100644 --- a/sdks/outpost-typescript/docs/models/operations/listattemptsresponse.md +++ b/sdks/outpost-typescript/docs/models/operations/listattemptsresponse.md @@ -35,9 +35,24 @@ let value: ListAttemptsResponse = { metadata: { "source": "crm", }, - data: { - "user_id": "userid", - "status": "active", + }, + destination: { + id: "des_webhook_123", + type: "webhook", + topics: [ + "user.created", + "order.shipped", + ], + disabledAt: null, + createdAt: new Date("2024-02-15T10:00:00Z"), + updatedAt: new Date("2024-02-15T10:00:00Z"), + config: { + url: "https://my-service.com/webhook/handler", + }, + credentials: { + secret: "whsec_abc123def456", + previousSecret: "whsec_prev789xyz012", + previousSecretInvalidAt: new Date("2024-02-16T10:00:00Z"), }, }, }, diff --git a/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsinclude.md b/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsinclude.md index 174760083..3567c4f0c 100644 --- a/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsinclude.md +++ b/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsinclude.md @@ -4,6 +4,7 @@ Fields to include in the response. Use bracket notation for multiple values (e.g - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `event.data`: Include full event with payload data - `response_data`: Include response body and headers +- `destination`: Include the full destination object diff --git a/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsrequest.md b/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsrequest.md index db6a29ce0..2de1ece96 100644 --- a/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsrequest.md +++ b/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsrequest.md @@ -13,20 +13,20 @@ let value: ListTenantDestinationAttemptsRequest = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tenantId` | *string* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | -| `destinationId` | *string* | :heavy_check_mark: | The ID of the destination. | -| `eventId` | *operations.ListTenantDestinationAttemptsEventId* | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | -| `status` | [operations.ListTenantDestinationAttemptsStatus](../../models/operations/listtenantdestinationattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | -| `topic` | *operations.ListTenantDestinationAttemptsTopic* | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | -| `timeGte` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | -| `timeLte` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | -| `timeGt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | -| `timeLt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | -| `limit` | *number* | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | -| `next` | *string* | :heavy_minus_sign: | Cursor for next page of results. | -| `prev` | *string* | :heavy_minus_sign: | Cursor for previous page of results. | -| `include` | *operations.ListTenantDestinationAttemptsInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `orderBy` | [operations.ListTenantDestinationAttemptsOrderBy](../../models/operations/listtenantdestinationattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | -| `dir` | [operations.ListTenantDestinationAttemptsDir](../../models/operations/listtenantdestinationattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tenantId` | *string* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | +| `destinationId` | *string* | :heavy_check_mark: | The ID of the destination. | +| `eventId` | *operations.ListTenantDestinationAttemptsEventId* | :heavy_minus_sign: | Filter attempts by event ID(s). Use bracket notation for multiple values (e.g., `event_id[0]=e1&event_id[1]=e2`). | +| `status` | [operations.ListTenantDestinationAttemptsStatus](../../models/operations/listtenantdestinationattemptsstatus.md) | :heavy_minus_sign: | Filter attempts by status. | +| `topic` | *operations.ListTenantDestinationAttemptsTopic* | :heavy_minus_sign: | Filter attempts by event topic(s). Use bracket notation for multiple values (e.g., `topic[0]=user.created&topic[1]=user.updated`). | +| `timeGte` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time >= value (RFC3339 or YYYY-MM-DD format). | +| `timeLte` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time <= value (RFC3339 or YYYY-MM-DD format). | +| `timeGt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time > value (RFC3339 or YYYY-MM-DD format). | +| `timeLt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Filter attempts by event time < value (RFC3339 or YYYY-MM-DD format). | +| `limit` | *number* | :heavy_minus_sign: | Number of items per page (default 100, max 1000). | +| `next` | *string* | :heavy_minus_sign: | Cursor for next page of results. | +| `prev` | *string* | :heavy_minus_sign: | Cursor for previous page of results. | +| `include` | *operations.ListTenantDestinationAttemptsInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `orderBy` | [operations.ListTenantDestinationAttemptsOrderBy](../../models/operations/listtenantdestinationattemptsorderby.md) | :heavy_minus_sign: | Field to sort by. | +| `dir` | [operations.ListTenantDestinationAttemptsDir](../../models/operations/listtenantdestinationattemptsdir.md) | :heavy_minus_sign: | Sort direction. | \ No newline at end of file diff --git a/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsresponse.md b/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsresponse.md index b505a41de..1eedae7a6 100644 --- a/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsresponse.md +++ b/sdks/outpost-typescript/docs/models/operations/listtenantdestinationattemptsresponse.md @@ -35,9 +35,24 @@ let value: ListTenantDestinationAttemptsResponse = { metadata: { "source": "crm", }, - data: { - "user_id": "userid", - "status": "active", + }, + destination: { + id: "des_webhook_123", + type: "webhook", + topics: [ + "user.created", + "order.shipped", + ], + disabledAt: null, + createdAt: new Date("2024-02-15T10:00:00Z"), + updatedAt: new Date("2024-02-15T10:00:00Z"), + config: { + url: "https://my-service.com/webhook/handler", + }, + credentials: { + secret: "whsec_abc123def456", + previousSecret: "whsec_prev789xyz012", + previousSecretInvalidAt: new Date("2024-02-16T10:00:00Z"), }, }, }, diff --git a/sdks/outpost-typescript/docs/sdks/attempts/README.md b/sdks/outpost-typescript/docs/sdks/attempts/README.md index 05f23f3a4..be43c6216 100644 --- a/sdks/outpost-typescript/docs/sdks/attempts/README.md +++ b/sdks/outpost-typescript/docs/sdks/attempts/README.md @@ -17,6 +17,7 @@ Use the `include` query parameter to include related data: - `include=event`: Include event summary (id, topic, time, eligible_for_retry, metadata) - `include=event.data`: Include full event with payload data - `include=response_data`: Include response body and headers from the attempt +- `include=destination`: Include the full destination object with target information ### Available Operations @@ -254,13 +255,13 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `attemptId` | *string* | :heavy_check_mark: | The ID of the attempt. | -| `include` | *operations.GetAttemptInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `attemptId` | *string* | :heavy_check_mark: | The ID of the attempt. | +| `include` | *operations.GetAttemptInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary (id, topic, time, eligible_for_retry, metadata)
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/sdks/outpost-typescript/docs/sdks/destinations/README.md b/sdks/outpost-typescript/docs/sdks/destinations/README.md index 10b742d05..abeb93dbf 100644 --- a/sdks/outpost-typescript/docs/sdks/destinations/README.md +++ b/sdks/outpost-typescript/docs/sdks/destinations/README.md @@ -736,15 +736,15 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tenantId` | *string* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | -| `destinationId` | *string* | :heavy_check_mark: | The ID of the destination. | -| `attemptId` | *string* | :heavy_check_mark: | The ID of the attempt. | -| `include` | *operations.GetTenantDestinationAttemptInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
| -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tenantId` | *string* | :heavy_check_mark: | The ID of the tenant. Required when using AdminApiKey authentication. | +| `destinationId` | *string* | :heavy_check_mark: | The ID of the destination. | +| `attemptId` | *string* | :heavy_check_mark: | The ID of the attempt. | +| `include` | *operations.GetTenantDestinationAttemptInclude* | :heavy_minus_sign: | Fields to include in the response. Use bracket notation for multiple values (e.g., `include[0]=event&include[1]=response_data`).
- `event`: Include event summary
- `event.data`: Include full event with payload data
- `response_data`: Include response body and headers
- `destination`: Include the full destination object
| +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | ### Response diff --git a/sdks/outpost-typescript/docs/sdks/metrics/README.md b/sdks/outpost-typescript/docs/sdks/metrics/README.md new file mode 100644 index 000000000..93b51863c --- /dev/null +++ b/sdks/outpost-typescript/docs/sdks/metrics/README.md @@ -0,0 +1,205 @@ +# Metrics + +## Overview + +Aggregated metrics for events and delivery attempts. Supports time bucketing, dimensional grouping, and filtering. + + +### Available Operations + +* [getEventMetrics](#geteventmetrics) - Get Event Metrics +* [getAttemptMetrics](#getattemptmetrics) - Get Attempt Metrics + +## getEventMetrics + +Returns aggregated event publish metrics. Supports time bucketing via granularity, +dimensional grouping, and filtering. + +**Measures:** `count`, `rate` + +**Dimensions:** `tenant_id` (admin-only), `topic`, `destination_id` + +**Filters:** `tenant_id` (admin-only), `topic`, `destination_id` + + +### Example Usage + + +```typescript +import { Outpost } from "@hookdeck/outpost-sdk"; + +const outpost = new Outpost({ + apiKey: "", +}); + +async function run() { + const result = await outpost.metrics.getEventMetrics({ + timeStart: new Date("2026-03-02T00:00:00Z"), + timeEnd: new Date("2026-03-03T00:00:00Z"), + granularity: "1h", + measures: [ + "count", + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OutpostCore } from "@hookdeck/outpost-sdk/core.js"; +import { metricsGetEventMetrics } from "@hookdeck/outpost-sdk/funcs/metricsGetEventMetrics.js"; + +// Use `OutpostCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const outpost = new OutpostCore({ + apiKey: "", +}); + +async function run() { + const res = await metricsGetEventMetrics(outpost, { + timeStart: new Date("2026-03-02T00:00:00Z"), + timeEnd: new Date("2026-03-03T00:00:00Z"), + granularity: "1h", + measures: [ + "count", + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("metricsGetEventMetrics failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetEventMetricsRequest](../../models/operations/geteventmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.MetricsResponse](../../models/components/metricsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequestError | 400 | application/json | +| errors.UnauthorizedError | 401 | application/json | +| errors.APIErrorResponse | 403 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | + +## getAttemptMetrics + +Returns aggregated delivery attempt metrics. Supports time bucketing via granularity, +dimensional grouping, and filtering. + +**Measures:** `count`, `successful_count`, `failed_count`, `error_rate`, +`first_attempt_count`, `retry_count`, `manual_retry_count`, `avg_attempt_number`, +`rate`, `successful_rate`, `failed_rate` + +**Dimensions:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + +**Filters:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + + +### Example Usage + + +```typescript +import { Outpost } from "@hookdeck/outpost-sdk"; + +const outpost = new Outpost({ + apiKey: "", +}); + +async function run() { + const result = await outpost.metrics.getAttemptMetrics({ + timeStart: new Date("2026-03-02T00:00:00Z"), + timeEnd: new Date("2026-03-03T00:00:00Z"), + granularity: "1h", + measures: [ + "count", + "error_rate", + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OutpostCore } from "@hookdeck/outpost-sdk/core.js"; +import { metricsGetAttemptMetrics } from "@hookdeck/outpost-sdk/funcs/metricsGetAttemptMetrics.js"; + +// Use `OutpostCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const outpost = new OutpostCore({ + apiKey: "", +}); + +async function run() { + const res = await metricsGetAttemptMetrics(outpost, { + timeStart: new Date("2026-03-02T00:00:00Z"), + timeEnd: new Date("2026-03-03T00:00:00Z"), + granularity: "1h", + measures: [ + "count", + "error_rate", + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("metricsGetAttemptMetrics failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAttemptMetricsRequest](../../models/operations/getattemptmetricsrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[components.MetricsResponse](../../models/components/metricsresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.BadRequestError | 400 | application/json | +| errors.UnauthorizedError | 401 | application/json | +| errors.APIErrorResponse | 403 | application/json | +| errors.InternalServerError | 500 | application/json | +| errors.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sdks/outpost-typescript/examples/package-lock.json b/sdks/outpost-typescript/examples/package-lock.json index d492801e4..4e30a4c08 100644 --- a/sdks/outpost-typescript/examples/package-lock.json +++ b/sdks/outpost-typescript/examples/package-lock.json @@ -18,7 +18,7 @@ }, "..": { "name": "@hookdeck/outpost-sdk", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { "@modelcontextprotocol/sdk": "^1.26.0", "zod": "^3.25.0 || ^4.0.0" diff --git a/sdks/outpost-typescript/jsr.json b/sdks/outpost-typescript/jsr.json index 0d6a95df7..830df6570 100644 --- a/sdks/outpost-typescript/jsr.json +++ b/sdks/outpost-typescript/jsr.json @@ -2,7 +2,7 @@ { "name": "@hookdeck/outpost-sdk", - "version": "0.9.1", + "version": "0.9.2", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/sdks/outpost-typescript/package-lock.json b/sdks/outpost-typescript/package-lock.json index 2988bd8a5..3d4e93d9e 100644 --- a/sdks/outpost-typescript/package-lock.json +++ b/sdks/outpost-typescript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@hookdeck/outpost-sdk", - "version": "0.9.1", + "version": "0.9.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@hookdeck/outpost-sdk", - "version": "0.9.1", + "version": "0.9.2", "dependencies": { "@modelcontextprotocol/sdk": "^1.26.0", "zod": "^3.25.0 || ^4.0.0" diff --git a/sdks/outpost-typescript/package.json b/sdks/outpost-typescript/package.json index c4754e6fe..eb32e3d41 100644 --- a/sdks/outpost-typescript/package.json +++ b/sdks/outpost-typescript/package.json @@ -1,6 +1,6 @@ { "name": "@hookdeck/outpost-sdk", - "version": "0.9.1", + "version": "0.9.2", "author": "Speakeasy", "type": "module", "bin": { diff --git a/sdks/outpost-typescript/src/funcs/attemptsGet.ts b/sdks/outpost-typescript/src/funcs/attemptsGet.ts index 899f5e38a..54f8c6607 100644 --- a/sdks/outpost-typescript/src/funcs/attemptsGet.ts +++ b/sdks/outpost-typescript/src/funcs/attemptsGet.ts @@ -110,7 +110,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/attempts/{attempt_id}")(pathParams); const query = encodeFormQuery({ diff --git a/sdks/outpost-typescript/src/funcs/destinationsCreate.ts b/sdks/outpost-typescript/src/funcs/destinationsCreate.ts index ff6af2886..c03399eb8 100644 --- a/sdks/outpost-typescript/src/funcs/destinationsCreate.ts +++ b/sdks/outpost-typescript/src/funcs/destinationsCreate.ts @@ -110,7 +110,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tenants/{tenant_id}/destinations")(pathParams); const headers = new Headers(compactMap({ diff --git a/sdks/outpost-typescript/src/funcs/destinationsDelete.ts b/sdks/outpost-typescript/src/funcs/destinationsDelete.ts index fe886031e..2ee6e9af0 100644 --- a/sdks/outpost-typescript/src/funcs/destinationsDelete.ts +++ b/sdks/outpost-typescript/src/funcs/destinationsDelete.ts @@ -112,7 +112,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tenants/{tenant_id}/destinations/{destination_id}")( pathParams, ); diff --git a/sdks/outpost-typescript/src/funcs/destinationsDisable.ts b/sdks/outpost-typescript/src/funcs/destinationsDisable.ts index 7e2778b46..e66c100ad 100644 --- a/sdks/outpost-typescript/src/funcs/destinationsDisable.ts +++ b/sdks/outpost-typescript/src/funcs/destinationsDisable.ts @@ -112,7 +112,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc( "/tenants/{tenant_id}/destinations/{destination_id}/disable", )(pathParams); diff --git a/sdks/outpost-typescript/src/funcs/destinationsEnable.ts b/sdks/outpost-typescript/src/funcs/destinationsEnable.ts index d20e8ba22..d3609073f 100644 --- a/sdks/outpost-typescript/src/funcs/destinationsEnable.ts +++ b/sdks/outpost-typescript/src/funcs/destinationsEnable.ts @@ -112,7 +112,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc( "/tenants/{tenant_id}/destinations/{destination_id}/enable", )(pathParams); diff --git a/sdks/outpost-typescript/src/funcs/destinationsGet.ts b/sdks/outpost-typescript/src/funcs/destinationsGet.ts index f4d42f732..a90cb7934 100644 --- a/sdks/outpost-typescript/src/funcs/destinationsGet.ts +++ b/sdks/outpost-typescript/src/funcs/destinationsGet.ts @@ -112,7 +112,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tenants/{tenant_id}/destinations/{destination_id}")( pathParams, ); diff --git a/sdks/outpost-typescript/src/funcs/destinationsGetAttempt.ts b/sdks/outpost-typescript/src/funcs/destinationsGetAttempt.ts index 14e314767..18b32aaa4 100644 --- a/sdks/outpost-typescript/src/funcs/destinationsGetAttempt.ts +++ b/sdks/outpost-typescript/src/funcs/destinationsGetAttempt.ts @@ -124,7 +124,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc( "/tenants/{tenant_id}/destinations/{destination_id}/attempts/{attempt_id}", )(pathParams); diff --git a/sdks/outpost-typescript/src/funcs/destinationsList.ts b/sdks/outpost-typescript/src/funcs/destinationsList.ts index 1a2e07919..0fba4b641 100644 --- a/sdks/outpost-typescript/src/funcs/destinationsList.ts +++ b/sdks/outpost-typescript/src/funcs/destinationsList.ts @@ -113,7 +113,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tenants/{tenant_id}/destinations")(pathParams); const query = encodeFormQuery({ diff --git a/sdks/outpost-typescript/src/funcs/destinationsListAttempts.ts b/sdks/outpost-typescript/src/funcs/destinationsListAttempts.ts index c265d673a..cc71ecf87 100644 --- a/sdks/outpost-typescript/src/funcs/destinationsListAttempts.ts +++ b/sdks/outpost-typescript/src/funcs/destinationsListAttempts.ts @@ -118,7 +118,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc( "/tenants/{tenant_id}/destinations/{destination_id}/attempts", )(pathParams); diff --git a/sdks/outpost-typescript/src/funcs/destinationsUpdate.ts b/sdks/outpost-typescript/src/funcs/destinationsUpdate.ts index 0bb684aa7..be93ae71a 100644 --- a/sdks/outpost-typescript/src/funcs/destinationsUpdate.ts +++ b/sdks/outpost-typescript/src/funcs/destinationsUpdate.ts @@ -118,7 +118,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tenants/{tenant_id}/destinations/{destination_id}")( pathParams, ); diff --git a/sdks/outpost-typescript/src/funcs/eventsGet.ts b/sdks/outpost-typescript/src/funcs/eventsGet.ts index 5effb084c..1a0bd83fe 100644 --- a/sdks/outpost-typescript/src/funcs/eventsGet.ts +++ b/sdks/outpost-typescript/src/funcs/eventsGet.ts @@ -106,7 +106,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/events/{event_id}")(pathParams); const headers = new Headers(compactMap({ diff --git a/sdks/outpost-typescript/src/funcs/metricsGetAttemptMetrics.ts b/sdks/outpost-typescript/src/funcs/metricsGetAttemptMetrics.ts new file mode 100644 index 000000000..d5350c71b --- /dev/null +++ b/sdks/outpost-typescript/src/funcs/metricsGetAttemptMetrics.ts @@ -0,0 +1,206 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OutpostCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OutpostError } from "../models/errors/outposterror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get Attempt Metrics + * + * @remarks + * Returns aggregated delivery attempt metrics. Supports time bucketing via granularity, + * dimensional grouping, and filtering. + * + * **Measures:** `count`, `successful_count`, `failed_count`, `error_rate`, + * `first_attempt_count`, `retry_count`, `manual_retry_count`, `avg_attempt_number`, + * `rate`, `successful_rate`, `failed_rate` + * + * **Dimensions:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + * + * **Filters:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + */ +export function metricsGetAttemptMetrics( + client: OutpostCore, + request: operations.GetAttemptMetricsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.MetricsResponse, + | errors.BadRequestError + | errors.UnauthorizedError + | errors.APIErrorResponse + | errors.InternalServerError + | OutpostError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OutpostCore, + request: operations.GetAttemptMetricsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.MetricsResponse, + | errors.BadRequestError + | errors.UnauthorizedError + | errors.APIErrorResponse + | errors.InternalServerError + | OutpostError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetAttemptMetricsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/metrics/attempts")(); + + const query = encodeFormQuery({ + "dimensions": payload.dimensions, + "filters[attempt_number]": payload["filters[attempt_number]"], + "filters[code]": payload["filters[code]"], + "filters[destination_id]": payload["filters[destination_id]"], + "filters[manual]": payload["filters[manual]"], + "filters[status]": payload["filters[status]"], + "filters[tenant_id]": payload["filters[tenant_id]"], + "filters[topic]": payload["filters[topic]"], + "granularity": payload.granularity, + "measures": payload.measures, + "time[end]": payload["time[end]"], + "time[start]": payload["time[start]"], + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getAttemptMetrics", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "403", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.MetricsResponse, + | errors.BadRequestError + | errors.UnauthorizedError + | errors.APIErrorResponse + | errors.InternalServerError + | OutpostError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.MetricsResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedError$inboundSchema), + M.jsonErr(403, errors.APIErrorResponse$inboundSchema), + M.jsonErr(500, errors.InternalServerError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/sdks/outpost-typescript/src/funcs/metricsGetEventMetrics.ts b/sdks/outpost-typescript/src/funcs/metricsGetEventMetrics.ts new file mode 100644 index 000000000..3e7bbd371 --- /dev/null +++ b/sdks/outpost-typescript/src/funcs/metricsGetEventMetrics.ts @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OutpostCore } from "../core.js"; +import { encodeFormQuery } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OutpostError } from "../models/errors/outposterror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * Get Event Metrics + * + * @remarks + * Returns aggregated event publish metrics. Supports time bucketing via granularity, + * dimensional grouping, and filtering. + * + * **Measures:** `count`, `rate` + * + * **Dimensions:** `tenant_id` (admin-only), `topic`, `destination_id` + * + * **Filters:** `tenant_id` (admin-only), `topic`, `destination_id` + */ +export function metricsGetEventMetrics( + client: OutpostCore, + request: operations.GetEventMetricsRequest, + options?: RequestOptions, +): APIPromise< + Result< + components.MetricsResponse, + | errors.BadRequestError + | errors.UnauthorizedError + | errors.APIErrorResponse + | errors.InternalServerError + | OutpostError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: OutpostCore, + request: operations.GetEventMetricsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + components.MetricsResponse, + | errors.BadRequestError + | errors.UnauthorizedError + | errors.APIErrorResponse + | errors.InternalServerError + | OutpostError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.GetEventMetricsRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = null; + + const path = pathToFunc("/metrics/events")(); + + const query = encodeFormQuery({ + "dimensions": payload.dimensions, + "filters[destination_id]": payload["filters[destination_id]"], + "filters[tenant_id]": payload["filters[tenant_id]"], + "filters[topic]": payload["filters[topic]"], + "granularity": payload.granularity, + "measures": payload.measures, + "time[end]": payload["time[end]"], + "time[start]": payload["time[start]"], + }); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "getEventMetrics", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + query: query, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "401", "403", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + components.MetricsResponse, + | errors.BadRequestError + | errors.UnauthorizedError + | errors.APIErrorResponse + | errors.InternalServerError + | OutpostError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, components.MetricsResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestError$inboundSchema), + M.jsonErr(401, errors.UnauthorizedError$inboundSchema), + M.jsonErr(403, errors.APIErrorResponse$inboundSchema), + M.jsonErr(500, errors.InternalServerError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/sdks/outpost-typescript/src/funcs/schemasGetDestinationType.ts b/sdks/outpost-typescript/src/funcs/schemasGetDestinationType.ts index cff649e8a..af3969bc3 100644 --- a/sdks/outpost-typescript/src/funcs/schemasGetDestinationType.ts +++ b/sdks/outpost-typescript/src/funcs/schemasGetDestinationType.ts @@ -110,7 +110,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/destination-types/{type}")(pathParams); const headers = new Headers(compactMap({ diff --git a/sdks/outpost-typescript/src/funcs/tenantsDelete.ts b/sdks/outpost-typescript/src/funcs/tenantsDelete.ts index b5e624e65..f31a18e4b 100644 --- a/sdks/outpost-typescript/src/funcs/tenantsDelete.ts +++ b/sdks/outpost-typescript/src/funcs/tenantsDelete.ts @@ -103,7 +103,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tenants/{tenant_id}")(pathParams); const headers = new Headers(compactMap({ diff --git a/sdks/outpost-typescript/src/funcs/tenantsGet.ts b/sdks/outpost-typescript/src/funcs/tenantsGet.ts index bba8d88da..626ea0835 100644 --- a/sdks/outpost-typescript/src/funcs/tenantsGet.ts +++ b/sdks/outpost-typescript/src/funcs/tenantsGet.ts @@ -103,7 +103,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tenants/{tenant_id}")(pathParams); const headers = new Headers(compactMap({ diff --git a/sdks/outpost-typescript/src/funcs/tenantsGetPortalUrl.ts b/sdks/outpost-typescript/src/funcs/tenantsGetPortalUrl.ts index 16abe6598..d2059365a 100644 --- a/sdks/outpost-typescript/src/funcs/tenantsGetPortalUrl.ts +++ b/sdks/outpost-typescript/src/funcs/tenantsGetPortalUrl.ts @@ -107,7 +107,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tenants/{tenant_id}/portal")(pathParams); const query = encodeFormQuery({ diff --git a/sdks/outpost-typescript/src/funcs/tenantsGetToken.ts b/sdks/outpost-typescript/src/funcs/tenantsGetToken.ts index aee19fd0f..7dfdd7d4a 100644 --- a/sdks/outpost-typescript/src/funcs/tenantsGetToken.ts +++ b/sdks/outpost-typescript/src/funcs/tenantsGetToken.ts @@ -103,7 +103,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tenants/{tenant_id}/token")(pathParams); const headers = new Headers(compactMap({ diff --git a/sdks/outpost-typescript/src/funcs/tenantsUpsert.ts b/sdks/outpost-typescript/src/funcs/tenantsUpsert.ts index 03de88cbe..e11a8f666 100644 --- a/sdks/outpost-typescript/src/funcs/tenantsUpsert.ts +++ b/sdks/outpost-typescript/src/funcs/tenantsUpsert.ts @@ -107,7 +107,6 @@ async function $do( charEncoding: "percent", }), }; - const path = pathToFunc("/tenants/{tenant_id}")(pathParams); const headers = new Headers(compactMap({ diff --git a/sdks/outpost-typescript/src/lib/config.ts b/sdks/outpost-typescript/src/lib/config.ts index 0d2699e98..8f8eca3c8 100644 --- a/sdks/outpost-typescript/src/lib/config.ts +++ b/sdks/outpost-typescript/src/lib/config.ts @@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "0.0.1", - sdkVersion: "0.9.1", - genVersion: "2.865.2", + sdkVersion: "0.9.2", + genVersion: "2.869.10", userAgent: - "speakeasy-sdk/typescript 0.9.1 2.865.2 0.0.1 @hookdeck/outpost-sdk", + "speakeasy-sdk/typescript 0.9.2 2.869.10 0.0.1 @hookdeck/outpost-sdk", } as const; diff --git a/sdks/outpost-typescript/src/lib/files.ts b/sdks/outpost-typescript/src/lib/files.ts index 0344cd046..6ca6b37d3 100644 --- a/sdks/outpost-typescript/src/lib/files.ts +++ b/sdks/outpost-typescript/src/lib/files.ts @@ -80,3 +80,25 @@ export function getContentTypeFromFileName(fileName: string): string | null { return mimeTypes[ext] || null; } + +/** + * Creates a Blob from file content with the given MIME type. + * + * Node.js Buffers are Uint8Array subclasses that may share a pooled + * ArrayBuffer (byteOffset > 0, byteLength < buffer.byteLength). Passing + * such a Buffer directly to `new Blob([buf])` can include the entire + * underlying pool on some runtimes, producing a Blob with extra bytes + * that corrupts multipart uploads. + * + * Copying into a standalone Uint8Array ensures the Blob receives only the + * intended bytes regardless of runtime behaviour. + */ +export function bytesToBlob( + content: Uint8Array | ArrayBuffer | Blob | string, + contentType: string, +): Blob { + if (content instanceof Uint8Array) { + return new Blob([new Uint8Array(content)], { type: contentType }); + } + return new Blob([content as BlobPart], { type: contentType }); +} diff --git a/sdks/outpost-typescript/src/lib/sdks.ts b/sdks/outpost-typescript/src/lib/sdks.ts index 8ba2a0f86..86a6f99b3 100644 --- a/sdks/outpost-typescript/src/lib/sdks.ts +++ b/sdks/outpost-typescript/src/lib/sdks.ts @@ -124,13 +124,15 @@ export class ClientSDK { if (!base) { return ERR(new InvalidRequestError("No base URL provided for operation")); } - const reqURL = new URL(base); - const inputURL = new URL(path, reqURL); - + const baseURL = new URL(base); + let reqURL: URL; if (path) { - reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/"; - reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/"; + reqURL = new URL(path, baseURL); + } else { + reqURL = baseURL; } + reqURL.hash = ""; let finalQuery = query || ""; diff --git a/sdks/outpost-typescript/src/lib/url.ts b/sdks/outpost-typescript/src/lib/url.ts index f3a8de6c0..79e7ce660 100644 --- a/sdks/outpost-typescript/src/lib/url.ts +++ b/sdks/outpost-typescript/src/lib/url.ts @@ -13,21 +13,23 @@ export function pathToFunc( const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g; return function buildURLPath(params: Record = {}): string { - return pathPattern.replace(paramRE, function (_, placeholder) { - if (!hasOwn.call(params, placeholder)) { - throw new Error(`Parameter '${placeholder}' is required`); - } + return pathPattern + .replace(paramRE, function (_, placeholder) { + if (!hasOwn.call(params, placeholder)) { + throw new Error(`Parameter '${placeholder}' is required`); + } - const value = params[placeholder]; - if (typeof value !== "string" && typeof value !== "number") { - throw new Error( - `Parameter '${placeholder}' must be a string or number`, - ); - } + const value = params[placeholder]; + if (typeof value !== "string" && typeof value !== "number") { + throw new Error( + `Parameter '${placeholder}' must be a string or number`, + ); + } - return options?.charEncoding === "percent" - ? encodeURIComponent(`${value}`) - : `${value}`; - }); + return options?.charEncoding === "percent" + ? encodeURIComponent(`${value}`) + : `${value}`; + }) + .replace(/^\/+/, ""); }; } diff --git a/sdks/outpost-typescript/src/mcp-server/mcp-server.ts b/sdks/outpost-typescript/src/mcp-server/mcp-server.ts index 45135adbb..107552bbe 100644 --- a/sdks/outpost-typescript/src/mcp-server/mcp-server.ts +++ b/sdks/outpost-typescript/src/mcp-server/mcp-server.ts @@ -19,7 +19,7 @@ const routes = buildRouteMap({ export const app = buildApplication(routes, { name: "mcp", versionInfo: { - currentVersion: "0.9.1", + currentVersion: "0.9.2", }, }); diff --git a/sdks/outpost-typescript/src/mcp-server/server.ts b/sdks/outpost-typescript/src/mcp-server/server.ts index 7c10f90e9..69c85743d 100644 --- a/sdks/outpost-typescript/src/mcp-server/server.ts +++ b/sdks/outpost-typescript/src/mcp-server/server.ts @@ -28,6 +28,8 @@ import { tool$destinationsUpdate } from "./tools/destinationsUpdate.js"; import { tool$eventsGet } from "./tools/eventsGet.js"; import { tool$eventsList } from "./tools/eventsList.js"; import { tool$healthCheck } from "./tools/healthCheck.js"; +import { tool$metricsGetAttemptMetrics } from "./tools/metricsGetAttemptMetrics.js"; +import { tool$metricsGetEventMetrics } from "./tools/metricsGetEventMetrics.js"; import { tool$publishEvent } from "./tools/publishEvent.js"; import { tool$schemasGetDestinationType } from "./tools/schemasGetDestinationType.js"; import { tool$schemasListDestinationTypes } from "./tools/schemasListDestinationTypes.js"; @@ -49,7 +51,7 @@ export function createMCPServer(deps: { }) { const server = new McpServer({ name: "Outpost", - version: "0.9.1", + version: "0.9.2", }); const client = new OutpostCore({ @@ -104,6 +106,8 @@ export function createMCPServer(deps: { tool(tool$schemasListDestinationTypes); tool(tool$schemasGetDestinationType); tool(tool$topicsList); + tool(tool$metricsGetEventMetrics); + tool(tool$metricsGetAttemptMetrics); return server; } diff --git a/sdks/outpost-typescript/src/mcp-server/tools/metricsGetAttemptMetrics.ts b/sdks/outpost-typescript/src/mcp-server/tools/metricsGetAttemptMetrics.ts new file mode 100644 index 000000000..96c88c98c --- /dev/null +++ b/sdks/outpost-typescript/src/mcp-server/tools/metricsGetAttemptMetrics.ts @@ -0,0 +1,47 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsGetAttemptMetrics } from "../../funcs/metricsGetAttemptMetrics.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetAttemptMetricsRequest$inboundSchema, +}; + +export const tool$metricsGetAttemptMetrics: ToolDefinition = { + name: "metrics-get-attempt-metrics", + description: `Get Attempt Metrics + +Returns aggregated delivery attempt metrics. Supports time bucketing via granularity, +dimensional grouping, and filtering. + +**Measures:** \`count\`, \`successful_count\`, \`failed_count\`, \`error_rate\`, +\`first_attempt_count\`, \`retry_count\`, \`manual_retry_count\`, \`avg_attempt_number\`, +\`rate\`, \`successful_rate\`, \`failed_rate\` + +**Dimensions:** \`tenant_id\` (admin-only), \`destination_id\`, \`topic\`, \`status\`, \`code\`, \`manual\`, \`attempt_number\` + +**Filters:** \`tenant_id\` (admin-only), \`destination_id\`, \`topic\`, \`status\`, \`code\`, \`manual\`, \`attempt_number\` +`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsGetAttemptMetrics( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/sdks/outpost-typescript/src/mcp-server/tools/metricsGetEventMetrics.ts b/sdks/outpost-typescript/src/mcp-server/tools/metricsGetEventMetrics.ts new file mode 100644 index 000000000..55ca65bbe --- /dev/null +++ b/sdks/outpost-typescript/src/mcp-server/tools/metricsGetEventMetrics.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsGetEventMetrics } from "../../funcs/metricsGetEventMetrics.js"; +import * as operations from "../../models/operations/index.js"; +import { formatResult, ToolDefinition } from "../tools.js"; + +const args = { + request: operations.GetEventMetricsRequest$inboundSchema, +}; + +export const tool$metricsGetEventMetrics: ToolDefinition = { + name: "metrics-get-event-metrics", + description: `Get Event Metrics + +Returns aggregated event publish metrics. Supports time bucketing via granularity, +dimensional grouping, and filtering. + +**Measures:** \`count\`, \`rate\` + +**Dimensions:** \`tenant_id\` (admin-only), \`topic\`, \`destination_id\` + +**Filters:** \`tenant_id\` (admin-only), \`topic\`, \`destination_id\` +`, + args, + tool: async (client, args, ctx) => { + const [result, apiCall] = await metricsGetEventMetrics( + client, + args.request, + { fetchOptions: { signal: ctx.signal } }, + ).$inspect(); + + if (!result.ok) { + return { + content: [{ type: "text", text: result.error.message }], + isError: true, + }; + } + + const value = result.value; + + return formatResult(value, apiCall); + }, +}; diff --git a/sdks/outpost-typescript/src/models/components/attempt.ts b/sdks/outpost-typescript/src/models/components/attempt.ts index 9714f6f60..7a9640eb3 100644 --- a/sdks/outpost-typescript/src/models/components/attempt.ts +++ b/sdks/outpost-typescript/src/models/components/attempt.ts @@ -9,17 +9,11 @@ import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { - EventFull, - EventFull$inboundSchema, - EventFull$Outbound, - EventFull$outboundSchema, -} from "./eventfull.js"; -import { - EventSummary, - EventSummary$inboundSchema, - EventSummary$Outbound, - EventSummary$outboundSchema, -} from "./eventsummary.js"; + Destination, + Destination$inboundSchema, + Destination$Outbound, + Destination$outboundSchema, +} from "./destination.js"; /** * The attempt status. @@ -33,6 +27,60 @@ export const Status = { */ export type Status = ClosedEnum; +/** + * Full event object with data (returned when include=event.data). + */ +export type EventFull = { + id?: string | undefined; + /** + * The tenant this event belongs to. + */ + tenantId?: string | undefined; + /** + * The destination this event was delivered to. + */ + destinationId?: string | undefined; + topic?: string | undefined; + /** + * Time the event was received. + */ + time?: Date | undefined; + /** + * Whether this event can be retried. + */ + eligibleForRetry?: boolean | undefined; + metadata?: { [k: string]: string } | null | undefined; + /** + * The event payload data. + */ + data?: { [k: string]: any } | undefined; +}; + +/** + * Event object without data (returned when include=event). + */ +export type EventSummary = { + id?: string | undefined; + /** + * The tenant this event belongs to. + */ + tenantId?: string | undefined; + /** + * The destination this event was delivered to. + */ + destinationId?: string | undefined; + topic?: string | undefined; + /** + * Time the event was received. + */ + time?: Date | undefined; + /** + * Whether this event can be retried. + */ + eligibleForRetry?: boolean | undefined; + metadata?: { [k: string]: string } | null | undefined; +}; + /** * The associated event object. Only present when include=event or include=event.data. */ @@ -65,7 +113,7 @@ export type Attempt = { /** * Response data from the attempt. Only included when include=response_data. */ - responseData?: { [k: string]: any } | undefined; + responseData?: { [k: string]: any } | null | undefined; /** * The attempt number (1 for first attempt, 2+ for retries). */ @@ -85,7 +133,8 @@ export type Attempt = { /** * The associated event object. Only present when include=event or include=event.data. */ - event?: EventSummary | EventFull | undefined; + event?: EventSummary | EventFull | null | undefined; + destination?: Destination | undefined; }; /** @internal */ @@ -95,12 +144,150 @@ export const Status$inboundSchema: z.ZodNativeEnum = z export const Status$outboundSchema: z.ZodNativeEnum = Status$inboundSchema; +/** @internal */ +export const EventFull$inboundSchema: z.ZodType< + EventFull, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + tenant_id: z.string().optional(), + destination_id: z.string().optional(), + topic: z.string().optional(), + time: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + eligible_for_retry: z.boolean().optional(), + metadata: z.nullable(z.record(z.string())).optional(), + data: z.record(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + "tenant_id": "tenantId", + "destination_id": "destinationId", + "eligible_for_retry": "eligibleForRetry", + }); +}); +/** @internal */ +export type EventFull$Outbound = { + id?: string | undefined; + tenant_id?: string | undefined; + destination_id?: string | undefined; + topic?: string | undefined; + time?: string | undefined; + eligible_for_retry?: boolean | undefined; + metadata?: { [k: string]: string } | null | undefined; + data?: { [k: string]: any } | undefined; +}; + +/** @internal */ +export const EventFull$outboundSchema: z.ZodType< + EventFull$Outbound, + z.ZodTypeDef, + EventFull +> = z.object({ + id: z.string().optional(), + tenantId: z.string().optional(), + destinationId: z.string().optional(), + topic: z.string().optional(), + time: z.date().transform(v => v.toISOString()).optional(), + eligibleForRetry: z.boolean().optional(), + metadata: z.nullable(z.record(z.string())).optional(), + data: z.record(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + tenantId: "tenant_id", + destinationId: "destination_id", + eligibleForRetry: "eligible_for_retry", + }); +}); + +export function eventFullToJSON(eventFull: EventFull): string { + return JSON.stringify(EventFull$outboundSchema.parse(eventFull)); +} +export function eventFullFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EventFull$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EventFull' from JSON`, + ); +} + +/** @internal */ +export const EventSummary$inboundSchema: z.ZodType< + EventSummary, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + tenant_id: z.string().optional(), + destination_id: z.string().optional(), + topic: z.string().optional(), + time: z.string().datetime({ offset: true }).transform(v => new Date(v)) + .optional(), + eligible_for_retry: z.boolean().optional(), + metadata: z.nullable(z.record(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + "tenant_id": "tenantId", + "destination_id": "destinationId", + "eligible_for_retry": "eligibleForRetry", + }); +}); +/** @internal */ +export type EventSummary$Outbound = { + id?: string | undefined; + tenant_id?: string | undefined; + destination_id?: string | undefined; + topic?: string | undefined; + time?: string | undefined; + eligible_for_retry?: boolean | undefined; + metadata?: { [k: string]: string } | null | undefined; +}; + +/** @internal */ +export const EventSummary$outboundSchema: z.ZodType< + EventSummary$Outbound, + z.ZodTypeDef, + EventSummary +> = z.object({ + id: z.string().optional(), + tenantId: z.string().optional(), + destinationId: z.string().optional(), + topic: z.string().optional(), + time: z.date().transform(v => v.toISOString()).optional(), + eligibleForRetry: z.boolean().optional(), + metadata: z.nullable(z.record(z.string())).optional(), +}).transform((v) => { + return remap$(v, { + tenantId: "tenant_id", + destinationId: "destination_id", + eligibleForRetry: "eligible_for_retry", + }); +}); + +export function eventSummaryToJSON(eventSummary: EventSummary): string { + return JSON.stringify(EventSummary$outboundSchema.parse(eventSummary)); +} +export function eventSummaryFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => EventSummary$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'EventSummary' from JSON`, + ); +} + /** @internal */ export const EventUnion$inboundSchema: z.ZodType< EventUnion, z.ZodTypeDef, unknown -> = z.union([EventSummary$inboundSchema, EventFull$inboundSchema]); +> = z.union([ + z.lazy(() => EventSummary$inboundSchema), + z.lazy(() => EventFull$inboundSchema), +]); /** @internal */ export type EventUnion$Outbound = EventSummary$Outbound | EventFull$Outbound; @@ -109,7 +296,10 @@ export const EventUnion$outboundSchema: z.ZodType< EventUnion$Outbound, z.ZodTypeDef, EventUnion -> = z.union([EventSummary$outboundSchema, EventFull$outboundSchema]); +> = z.union([ + z.lazy(() => EventSummary$outboundSchema), + z.lazy(() => EventFull$outboundSchema), +]); export function eventUnionToJSON(eventUnion: EventUnion): string { return JSON.stringify(EventUnion$outboundSchema.parse(eventUnion)); @@ -133,13 +323,18 @@ export const Attempt$inboundSchema: z.ZodType = time: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), code: z.string().optional(), - response_data: z.record(z.any()).optional(), + response_data: z.nullable(z.record(z.any())).optional(), attempt_number: z.number().int().optional(), manual: z.boolean().optional(), event_id: z.string().optional(), destination_id: z.string().optional(), - event: z.union([EventSummary$inboundSchema, EventFull$inboundSchema]) - .optional(), + event: z.nullable( + z.union([ + z.lazy(() => EventSummary$inboundSchema), + z.lazy(() => EventFull$inboundSchema), + ]), + ).optional(), + destination: Destination$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "tenant_id": "tenantId", @@ -156,12 +351,13 @@ export type Attempt$Outbound = { status?: string | undefined; time?: string | undefined; code?: string | undefined; - response_data?: { [k: string]: any } | undefined; + response_data?: { [k: string]: any } | null | undefined; attempt_number?: number | undefined; manual?: boolean | undefined; event_id?: string | undefined; destination_id?: string | undefined; - event?: EventSummary$Outbound | EventFull$Outbound | undefined; + event?: EventSummary$Outbound | EventFull$Outbound | null | undefined; + destination?: Destination$Outbound | undefined; }; /** @internal */ @@ -175,13 +371,18 @@ export const Attempt$outboundSchema: z.ZodType< status: Status$outboundSchema.optional(), time: z.date().transform(v => v.toISOString()).optional(), code: z.string().optional(), - responseData: z.record(z.any()).optional(), + responseData: z.nullable(z.record(z.any())).optional(), attemptNumber: z.number().int().optional(), manual: z.boolean().optional(), eventId: z.string().optional(), destinationId: z.string().optional(), - event: z.union([EventSummary$outboundSchema, EventFull$outboundSchema]) - .optional(), + event: z.nullable( + z.union([ + z.lazy(() => EventSummary$outboundSchema), + z.lazy(() => EventFull$outboundSchema), + ]), + ).optional(), + destination: Destination$outboundSchema.optional(), }).transform((v) => { return remap$(v, { tenantId: "tenant_id", diff --git a/sdks/outpost-typescript/src/models/components/eventfull.ts b/sdks/outpost-typescript/src/models/components/eventfull.ts deleted file mode 100644 index 79606d818..000000000 --- a/sdks/outpost-typescript/src/models/components/eventfull.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Full event object with data (returned when include=event.data). - */ -export type EventFull = { - id?: string | undefined; - /** - * The tenant this event belongs to. - */ - tenantId?: string | undefined; - /** - * The destination this event was delivered to. - */ - destinationId?: string | undefined; - topic?: string | undefined; - /** - * Time the event was received. - */ - time?: Date | undefined; - /** - * Whether this event can be retried. - */ - eligibleForRetry?: boolean | undefined; - metadata?: { [k: string]: string } | null | undefined; - /** - * The event payload data. - */ - data?: { [k: string]: any } | undefined; -}; - -/** @internal */ -export const EventFull$inboundSchema: z.ZodType< - EventFull, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - tenant_id: z.string().optional(), - destination_id: z.string().optional(), - topic: z.string().optional(), - time: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - eligible_for_retry: z.boolean().optional(), - metadata: z.nullable(z.record(z.string())).optional(), - data: z.record(z.any()).optional(), -}).transform((v) => { - return remap$(v, { - "tenant_id": "tenantId", - "destination_id": "destinationId", - "eligible_for_retry": "eligibleForRetry", - }); -}); -/** @internal */ -export type EventFull$Outbound = { - id?: string | undefined; - tenant_id?: string | undefined; - destination_id?: string | undefined; - topic?: string | undefined; - time?: string | undefined; - eligible_for_retry?: boolean | undefined; - metadata?: { [k: string]: string } | null | undefined; - data?: { [k: string]: any } | undefined; -}; - -/** @internal */ -export const EventFull$outboundSchema: z.ZodType< - EventFull$Outbound, - z.ZodTypeDef, - EventFull -> = z.object({ - id: z.string().optional(), - tenantId: z.string().optional(), - destinationId: z.string().optional(), - topic: z.string().optional(), - time: z.date().transform(v => v.toISOString()).optional(), - eligibleForRetry: z.boolean().optional(), - metadata: z.nullable(z.record(z.string())).optional(), - data: z.record(z.any()).optional(), -}).transform((v) => { - return remap$(v, { - tenantId: "tenant_id", - destinationId: "destination_id", - eligibleForRetry: "eligible_for_retry", - }); -}); - -export function eventFullToJSON(eventFull: EventFull): string { - return JSON.stringify(EventFull$outboundSchema.parse(eventFull)); -} -export function eventFullFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EventFull$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EventFull' from JSON`, - ); -} diff --git a/sdks/outpost-typescript/src/models/components/eventsummary.ts b/sdks/outpost-typescript/src/models/components/eventsummary.ts deleted file mode 100644 index 09f79acb7..000000000 --- a/sdks/outpost-typescript/src/models/components/eventsummary.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v3"; -import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -/** - * Event object without data (returned when include=event). - */ -export type EventSummary = { - id?: string | undefined; - /** - * The tenant this event belongs to. - */ - tenantId?: string | undefined; - /** - * The destination this event was delivered to. - */ - destinationId?: string | undefined; - topic?: string | undefined; - /** - * Time the event was received. - */ - time?: Date | undefined; - /** - * Whether this event can be retried. - */ - eligibleForRetry?: boolean | undefined; - metadata?: { [k: string]: string } | null | undefined; -}; - -/** @internal */ -export const EventSummary$inboundSchema: z.ZodType< - EventSummary, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - tenant_id: z.string().optional(), - destination_id: z.string().optional(), - topic: z.string().optional(), - time: z.string().datetime({ offset: true }).transform(v => new Date(v)) - .optional(), - eligible_for_retry: z.boolean().optional(), - metadata: z.nullable(z.record(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - "tenant_id": "tenantId", - "destination_id": "destinationId", - "eligible_for_retry": "eligibleForRetry", - }); -}); -/** @internal */ -export type EventSummary$Outbound = { - id?: string | undefined; - tenant_id?: string | undefined; - destination_id?: string | undefined; - topic?: string | undefined; - time?: string | undefined; - eligible_for_retry?: boolean | undefined; - metadata?: { [k: string]: string } | null | undefined; -}; - -/** @internal */ -export const EventSummary$outboundSchema: z.ZodType< - EventSummary$Outbound, - z.ZodTypeDef, - EventSummary -> = z.object({ - id: z.string().optional(), - tenantId: z.string().optional(), - destinationId: z.string().optional(), - topic: z.string().optional(), - time: z.date().transform(v => v.toISOString()).optional(), - eligibleForRetry: z.boolean().optional(), - metadata: z.nullable(z.record(z.string())).optional(), -}).transform((v) => { - return remap$(v, { - tenantId: "tenant_id", - destinationId: "destination_id", - eligibleForRetry: "eligible_for_retry", - }); -}); - -export function eventSummaryToJSON(eventSummary: EventSummary): string { - return JSON.stringify(EventSummary$outboundSchema.parse(eventSummary)); -} -export function eventSummaryFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EventSummary$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EventSummary' from JSON`, - ); -} diff --git a/sdks/outpost-typescript/src/models/components/index.ts b/sdks/outpost-typescript/src/models/components/index.ts index 9d7914fa3..fedc4d39a 100644 --- a/sdks/outpost-typescript/src/models/components/index.ts +++ b/sdks/outpost-typescript/src/models/components/index.ts @@ -43,12 +43,13 @@ export * from "./destinationupdaterabbitmq.js"; export * from "./destinationupdatewebhook.js"; export * from "./destinationwebhook.js"; export * from "./event.js"; -export * from "./eventfull.js"; export * from "./eventpaginatedresult.js"; -export * from "./eventsummary.js"; export * from "./gcppubsubconfig.js"; export * from "./gcppubsubcredentials.js"; export * from "./hookdeckcredentials.js"; +export * from "./metricsdatapoint.js"; +export * from "./metricsmetadata.js"; +export * from "./metricsresponse.js"; export * from "./portalredirect.js"; export * from "./publishrequest.js"; export * from "./publishresponse.js"; diff --git a/sdks/outpost-typescript/src/models/components/metricsdatapoint.ts b/sdks/outpost-typescript/src/models/components/metricsdatapoint.ts new file mode 100644 index 000000000..eeca746e3 --- /dev/null +++ b/sdks/outpost-typescript/src/models/components/metricsdatapoint.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MetricsDataPoint = { + /** + * Start of the time bucket. Null when no granularity is specified. + */ + timeBucket?: Date | null | undefined; + /** + * Dimension values for this data point. Empty object when no dimensions are requested. + */ + dimensions?: { [k: string]: string } | undefined; + /** + * Requested measure values for this data point. + */ + metrics?: { [k: string]: any } | undefined; +}; + +/** @internal */ +export const MetricsDataPoint$inboundSchema: z.ZodType< + MetricsDataPoint, + z.ZodTypeDef, + unknown +> = z.object({ + time_bucket: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ).optional(), + dimensions: z.record(z.string()).optional(), + metrics: z.record(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + "time_bucket": "timeBucket", + }); +}); +/** @internal */ +export type MetricsDataPoint$Outbound = { + time_bucket?: string | null | undefined; + dimensions?: { [k: string]: string } | undefined; + metrics?: { [k: string]: any } | undefined; +}; + +/** @internal */ +export const MetricsDataPoint$outboundSchema: z.ZodType< + MetricsDataPoint$Outbound, + z.ZodTypeDef, + MetricsDataPoint +> = z.object({ + timeBucket: z.nullable(z.date().transform(v => v.toISOString())).optional(), + dimensions: z.record(z.string()).optional(), + metrics: z.record(z.any()).optional(), +}).transform((v) => { + return remap$(v, { + timeBucket: "time_bucket", + }); +}); + +export function metricsDataPointToJSON( + metricsDataPoint: MetricsDataPoint, +): string { + return JSON.stringify( + MetricsDataPoint$outboundSchema.parse(metricsDataPoint), + ); +} +export function metricsDataPointFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MetricsDataPoint$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MetricsDataPoint' from JSON`, + ); +} diff --git a/sdks/outpost-typescript/src/models/components/metricsmetadata.ts b/sdks/outpost-typescript/src/models/components/metricsmetadata.ts new file mode 100644 index 000000000..d00a1804a --- /dev/null +++ b/sdks/outpost-typescript/src/models/components/metricsmetadata.ts @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type MetricsMetadata = { + /** + * The granularity used for time bucketing, or null if none was specified. + */ + granularity?: string | null | undefined; + /** + * Query execution time in milliseconds. + */ + queryTimeMs?: number | undefined; + /** + * Number of data points returned. + */ + rowCount?: number | undefined; + /** + * Maximum number of rows the query will return. + */ + rowLimit?: number | undefined; + /** + * Whether the results were truncated due to hitting the row limit. + */ + truncated?: boolean | undefined; +}; + +/** @internal */ +export const MetricsMetadata$inboundSchema: z.ZodType< + MetricsMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + granularity: z.nullable(z.string()).optional(), + query_time_ms: z.number().int().optional(), + row_count: z.number().int().optional(), + row_limit: z.number().int().optional(), + truncated: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "query_time_ms": "queryTimeMs", + "row_count": "rowCount", + "row_limit": "rowLimit", + }); +}); +/** @internal */ +export type MetricsMetadata$Outbound = { + granularity?: string | null | undefined; + query_time_ms?: number | undefined; + row_count?: number | undefined; + row_limit?: number | undefined; + truncated?: boolean | undefined; +}; + +/** @internal */ +export const MetricsMetadata$outboundSchema: z.ZodType< + MetricsMetadata$Outbound, + z.ZodTypeDef, + MetricsMetadata +> = z.object({ + granularity: z.nullable(z.string()).optional(), + queryTimeMs: z.number().int().optional(), + rowCount: z.number().int().optional(), + rowLimit: z.number().int().optional(), + truncated: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + queryTimeMs: "query_time_ms", + rowCount: "row_count", + rowLimit: "row_limit", + }); +}); + +export function metricsMetadataToJSON( + metricsMetadata: MetricsMetadata, +): string { + return JSON.stringify(MetricsMetadata$outboundSchema.parse(metricsMetadata)); +} +export function metricsMetadataFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MetricsMetadata$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MetricsMetadata' from JSON`, + ); +} diff --git a/sdks/outpost-typescript/src/models/components/metricsresponse.ts b/sdks/outpost-typescript/src/models/components/metricsresponse.ts new file mode 100644 index 000000000..811a01ae2 --- /dev/null +++ b/sdks/outpost-typescript/src/models/components/metricsresponse.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import { + MetricsDataPoint, + MetricsDataPoint$inboundSchema, + MetricsDataPoint$Outbound, + MetricsDataPoint$outboundSchema, +} from "./metricsdatapoint.js"; +import { + MetricsMetadata, + MetricsMetadata$inboundSchema, + MetricsMetadata$Outbound, + MetricsMetadata$outboundSchema, +} from "./metricsmetadata.js"; + +export type MetricsResponse = { + /** + * Array of aggregated data points. + */ + data?: Array | undefined; + metadata?: MetricsMetadata | undefined; +}; + +/** @internal */ +export const MetricsResponse$inboundSchema: z.ZodType< + MetricsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.array(MetricsDataPoint$inboundSchema).optional(), + metadata: MetricsMetadata$inboundSchema.optional(), +}); +/** @internal */ +export type MetricsResponse$Outbound = { + data?: Array | undefined; + metadata?: MetricsMetadata$Outbound | undefined; +}; + +/** @internal */ +export const MetricsResponse$outboundSchema: z.ZodType< + MetricsResponse$Outbound, + z.ZodTypeDef, + MetricsResponse +> = z.object({ + data: z.array(MetricsDataPoint$outboundSchema).optional(), + metadata: MetricsMetadata$outboundSchema.optional(), +}); + +export function metricsResponseToJSON( + metricsResponse: MetricsResponse, +): string { + return JSON.stringify(MetricsResponse$outboundSchema.parse(metricsResponse)); +} +export function metricsResponseFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => MetricsResponse$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'MetricsResponse' from JSON`, + ); +} diff --git a/sdks/outpost-typescript/src/models/operations/getattempt.ts b/sdks/outpost-typescript/src/models/operations/getattempt.ts index d7d95014e..bd79f9eeb 100644 --- a/sdks/outpost-typescript/src/models/operations/getattempt.ts +++ b/sdks/outpost-typescript/src/models/operations/getattempt.ts @@ -15,6 +15,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) * - `event.data`: Include full event with payload data * - `response_data`: Include response body and headers + * - `destination`: Include the full destination object */ export type GetAttemptInclude = string | Array; @@ -30,6 +31,7 @@ export type GetAttemptRequest = { * - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) * - `event.data`: Include full event with payload data * - `response_data`: Include response body and headers + * - `destination`: Include the full destination object */ include?: string | Array | undefined; }; diff --git a/sdks/outpost-typescript/src/models/operations/getattemptmetrics.ts b/sdks/outpost-typescript/src/models/operations/getattemptmetrics.ts new file mode 100644 index 000000000..3517ddd31 --- /dev/null +++ b/sdks/outpost-typescript/src/models/operations/getattemptmetrics.ts @@ -0,0 +1,668 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const GetAttemptMetricsMeasuresEnum2 = { + Count: "count", + SuccessfulCount: "successful_count", + FailedCount: "failed_count", + ErrorRate: "error_rate", + FirstAttemptCount: "first_attempt_count", + RetryCount: "retry_count", + ManualRetryCount: "manual_retry_count", + AvgAttemptNumber: "avg_attempt_number", + Rate: "rate", + SuccessfulRate: "successful_rate", + FailedRate: "failed_rate", +} as const; +export type GetAttemptMetricsMeasuresEnum2 = ClosedEnum< + typeof GetAttemptMetricsMeasuresEnum2 +>; + +export const GetAttemptMetricsMeasuresEnum1 = { + Count: "count", + SuccessfulCount: "successful_count", + FailedCount: "failed_count", + ErrorRate: "error_rate", + FirstAttemptCount: "first_attempt_count", + RetryCount: "retry_count", + ManualRetryCount: "manual_retry_count", + AvgAttemptNumber: "avg_attempt_number", + Rate: "rate", + SuccessfulRate: "successful_rate", + FailedRate: "failed_rate", +} as const; +export type GetAttemptMetricsMeasuresEnum1 = ClosedEnum< + typeof GetAttemptMetricsMeasuresEnum1 +>; + +/** + * Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). + */ +export type GetAttemptMetricsMeasuresUnion = + | GetAttemptMetricsMeasuresEnum1 + | Array; + +export const GetAttemptMetricsDimensionsEnum2 = { + TenantId: "tenant_id", + DestinationId: "destination_id", + Topic: "topic", + Status: "status", + Code: "code", + Manual: "manual", + AttemptNumber: "attempt_number", +} as const; +export type GetAttemptMetricsDimensionsEnum2 = ClosedEnum< + typeof GetAttemptMetricsDimensionsEnum2 +>; + +export const GetAttemptMetricsDimensionsEnum1 = { + TenantId: "tenant_id", + DestinationId: "destination_id", + Topic: "topic", + Status: "status", + Code: "code", + Manual: "manual", + AttemptNumber: "attempt_number", +} as const; +export type GetAttemptMetricsDimensionsEnum1 = ClosedEnum< + typeof GetAttemptMetricsDimensionsEnum1 +>; + +/** + * Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). + */ +export type GetAttemptMetricsDimensionsUnion = + | GetAttemptMetricsDimensionsEnum1 + | Array; + +/** + * Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + */ +export type GetAttemptMetricsFiltersDestinationId = string | Array; + +/** + * Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + */ +export type GetAttemptMetricsFiltersTopic = string | Array; + +export const FiltersStatusEnum2 = { + Success: "success", + Failed: "failed", +} as const; +export type FiltersStatusEnum2 = ClosedEnum; + +export const FiltersStatusEnum1 = { + Success: "success", + Failed: "failed", +} as const; +export type FiltersStatusEnum1 = ClosedEnum; + +/** + * Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). + */ +export type FiltersStatus = FiltersStatusEnum1 | Array; + +/** + * Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). + */ +export type FiltersCode = string | Array; + +/** + * Filter by manual retry flag. + */ +export const FiltersManual = { + True: "true", + False: "false", +} as const; +/** + * Filter by manual retry flag. + */ +export type FiltersManual = ClosedEnum; + +/** + * Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). + */ +export type FiltersAttemptNumber = string | Array; + +/** + * Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + */ +export type GetAttemptMetricsFiltersTenantId = string | Array; + +export type GetAttemptMetricsRequest = { + /** + * Start of the time range (inclusive). ISO 8601 timestamp. + */ + timeStart: Date; + /** + * End of the time range (exclusive). ISO 8601 timestamp. + */ + timeEnd: Date; + /** + * Time bucketing granularity. Pattern: ``. + * + * @remarks + * Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12). + * When omitted, returns a single aggregate row per dimension combination. + */ + granularity?: string | undefined; + /** + * Measures to compute. At least one required. Rate measures (`rate`, `successful_rate`, `failed_rate`) are throughput in events/second. Use bracket notation for multiple values (e.g., `measures[0]=count&measures[1]=error_rate`). + */ + measures: + | GetAttemptMetricsMeasuresEnum1 + | Array; + /** + * Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=status&dimensions[1]=destination_id`). + */ + dimensions?: + | GetAttemptMetricsDimensionsEnum1 + | Array + | undefined; + /** + * Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + */ + filtersDestinationId?: string | Array | undefined; + /** + * Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + */ + filtersTopic?: string | Array | undefined; + /** + * Filter by attempt status(es). Use bracket notation for multiple values (e.g., `filters[status][0]=success&filters[status][1]=failed`). + */ + filtersStatus?: FiltersStatusEnum1 | Array | undefined; + /** + * Filter by HTTP status code(s). Use bracket notation for multiple values (e.g., `filters[code][0]=200&filters[code][1]=500`). + */ + filtersCode?: string | Array | undefined; + /** + * Filter by manual retry flag. + */ + filtersManual?: FiltersManual | undefined; + /** + * Filter by attempt number(s). Use bracket notation for multiple values (e.g., `filters[attempt_number][0]=1&filters[attempt_number][1]=2`). + */ + filtersAttemptNumber?: string | Array | undefined; + /** + * Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + */ + filtersTenantId?: string | Array | undefined; +}; + +/** @internal */ +export const GetAttemptMetricsMeasuresEnum2$inboundSchema: z.ZodNativeEnum< + typeof GetAttemptMetricsMeasuresEnum2 +> = z.nativeEnum(GetAttemptMetricsMeasuresEnum2); +/** @internal */ +export const GetAttemptMetricsMeasuresEnum2$outboundSchema: z.ZodNativeEnum< + typeof GetAttemptMetricsMeasuresEnum2 +> = GetAttemptMetricsMeasuresEnum2$inboundSchema; + +/** @internal */ +export const GetAttemptMetricsMeasuresEnum1$inboundSchema: z.ZodNativeEnum< + typeof GetAttemptMetricsMeasuresEnum1 +> = z.nativeEnum(GetAttemptMetricsMeasuresEnum1); +/** @internal */ +export const GetAttemptMetricsMeasuresEnum1$outboundSchema: z.ZodNativeEnum< + typeof GetAttemptMetricsMeasuresEnum1 +> = GetAttemptMetricsMeasuresEnum1$inboundSchema; + +/** @internal */ +export const GetAttemptMetricsMeasuresUnion$inboundSchema: z.ZodType< + GetAttemptMetricsMeasuresUnion, + z.ZodTypeDef, + unknown +> = z.union([ + GetAttemptMetricsMeasuresEnum1$inboundSchema, + z.array(GetAttemptMetricsMeasuresEnum2$inboundSchema), +]); +/** @internal */ +export type GetAttemptMetricsMeasuresUnion$Outbound = string | Array; + +/** @internal */ +export const GetAttemptMetricsMeasuresUnion$outboundSchema: z.ZodType< + GetAttemptMetricsMeasuresUnion$Outbound, + z.ZodTypeDef, + GetAttemptMetricsMeasuresUnion +> = z.union([ + GetAttemptMetricsMeasuresEnum1$outboundSchema, + z.array(GetAttemptMetricsMeasuresEnum2$outboundSchema), +]); + +export function getAttemptMetricsMeasuresUnionToJSON( + getAttemptMetricsMeasuresUnion: GetAttemptMetricsMeasuresUnion, +): string { + return JSON.stringify( + GetAttemptMetricsMeasuresUnion$outboundSchema.parse( + getAttemptMetricsMeasuresUnion, + ), + ); +} +export function getAttemptMetricsMeasuresUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAttemptMetricsMeasuresUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAttemptMetricsMeasuresUnion' from JSON`, + ); +} + +/** @internal */ +export const GetAttemptMetricsDimensionsEnum2$inboundSchema: z.ZodNativeEnum< + typeof GetAttemptMetricsDimensionsEnum2 +> = z.nativeEnum(GetAttemptMetricsDimensionsEnum2); +/** @internal */ +export const GetAttemptMetricsDimensionsEnum2$outboundSchema: z.ZodNativeEnum< + typeof GetAttemptMetricsDimensionsEnum2 +> = GetAttemptMetricsDimensionsEnum2$inboundSchema; + +/** @internal */ +export const GetAttemptMetricsDimensionsEnum1$inboundSchema: z.ZodNativeEnum< + typeof GetAttemptMetricsDimensionsEnum1 +> = z.nativeEnum(GetAttemptMetricsDimensionsEnum1); +/** @internal */ +export const GetAttemptMetricsDimensionsEnum1$outboundSchema: z.ZodNativeEnum< + typeof GetAttemptMetricsDimensionsEnum1 +> = GetAttemptMetricsDimensionsEnum1$inboundSchema; + +/** @internal */ +export const GetAttemptMetricsDimensionsUnion$inboundSchema: z.ZodType< + GetAttemptMetricsDimensionsUnion, + z.ZodTypeDef, + unknown +> = z.union([ + GetAttemptMetricsDimensionsEnum1$inboundSchema, + z.array(GetAttemptMetricsDimensionsEnum2$inboundSchema), +]); +/** @internal */ +export type GetAttemptMetricsDimensionsUnion$Outbound = string | Array; + +/** @internal */ +export const GetAttemptMetricsDimensionsUnion$outboundSchema: z.ZodType< + GetAttemptMetricsDimensionsUnion$Outbound, + z.ZodTypeDef, + GetAttemptMetricsDimensionsUnion +> = z.union([ + GetAttemptMetricsDimensionsEnum1$outboundSchema, + z.array(GetAttemptMetricsDimensionsEnum2$outboundSchema), +]); + +export function getAttemptMetricsDimensionsUnionToJSON( + getAttemptMetricsDimensionsUnion: GetAttemptMetricsDimensionsUnion, +): string { + return JSON.stringify( + GetAttemptMetricsDimensionsUnion$outboundSchema.parse( + getAttemptMetricsDimensionsUnion, + ), + ); +} +export function getAttemptMetricsDimensionsUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAttemptMetricsDimensionsUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAttemptMetricsDimensionsUnion' from JSON`, + ); +} + +/** @internal */ +export const GetAttemptMetricsFiltersDestinationId$inboundSchema: z.ZodType< + GetAttemptMetricsFiltersDestinationId, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); +/** @internal */ +export type GetAttemptMetricsFiltersDestinationId$Outbound = + | string + | Array; + +/** @internal */ +export const GetAttemptMetricsFiltersDestinationId$outboundSchema: z.ZodType< + GetAttemptMetricsFiltersDestinationId$Outbound, + z.ZodTypeDef, + GetAttemptMetricsFiltersDestinationId +> = z.union([z.string(), z.array(z.string())]); + +export function getAttemptMetricsFiltersDestinationIdToJSON( + getAttemptMetricsFiltersDestinationId: GetAttemptMetricsFiltersDestinationId, +): string { + return JSON.stringify( + GetAttemptMetricsFiltersDestinationId$outboundSchema.parse( + getAttemptMetricsFiltersDestinationId, + ), + ); +} +export function getAttemptMetricsFiltersDestinationIdFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetAttemptMetricsFiltersDestinationId$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAttemptMetricsFiltersDestinationId' from JSON`, + ); +} + +/** @internal */ +export const GetAttemptMetricsFiltersTopic$inboundSchema: z.ZodType< + GetAttemptMetricsFiltersTopic, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); +/** @internal */ +export type GetAttemptMetricsFiltersTopic$Outbound = string | Array; + +/** @internal */ +export const GetAttemptMetricsFiltersTopic$outboundSchema: z.ZodType< + GetAttemptMetricsFiltersTopic$Outbound, + z.ZodTypeDef, + GetAttemptMetricsFiltersTopic +> = z.union([z.string(), z.array(z.string())]); + +export function getAttemptMetricsFiltersTopicToJSON( + getAttemptMetricsFiltersTopic: GetAttemptMetricsFiltersTopic, +): string { + return JSON.stringify( + GetAttemptMetricsFiltersTopic$outboundSchema.parse( + getAttemptMetricsFiltersTopic, + ), + ); +} +export function getAttemptMetricsFiltersTopicFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAttemptMetricsFiltersTopic$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAttemptMetricsFiltersTopic' from JSON`, + ); +} + +/** @internal */ +export const FiltersStatusEnum2$inboundSchema: z.ZodNativeEnum< + typeof FiltersStatusEnum2 +> = z.nativeEnum(FiltersStatusEnum2); +/** @internal */ +export const FiltersStatusEnum2$outboundSchema: z.ZodNativeEnum< + typeof FiltersStatusEnum2 +> = FiltersStatusEnum2$inboundSchema; + +/** @internal */ +export const FiltersStatusEnum1$inboundSchema: z.ZodNativeEnum< + typeof FiltersStatusEnum1 +> = z.nativeEnum(FiltersStatusEnum1); +/** @internal */ +export const FiltersStatusEnum1$outboundSchema: z.ZodNativeEnum< + typeof FiltersStatusEnum1 +> = FiltersStatusEnum1$inboundSchema; + +/** @internal */ +export const FiltersStatus$inboundSchema: z.ZodType< + FiltersStatus, + z.ZodTypeDef, + unknown +> = z.union([ + FiltersStatusEnum1$inboundSchema, + z.array(FiltersStatusEnum2$inboundSchema), +]); +/** @internal */ +export type FiltersStatus$Outbound = string | Array; + +/** @internal */ +export const FiltersStatus$outboundSchema: z.ZodType< + FiltersStatus$Outbound, + z.ZodTypeDef, + FiltersStatus +> = z.union([ + FiltersStatusEnum1$outboundSchema, + z.array(FiltersStatusEnum2$outboundSchema), +]); + +export function filtersStatusToJSON(filtersStatus: FiltersStatus): string { + return JSON.stringify(FiltersStatus$outboundSchema.parse(filtersStatus)); +} +export function filtersStatusFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FiltersStatus$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FiltersStatus' from JSON`, + ); +} + +/** @internal */ +export const FiltersCode$inboundSchema: z.ZodType< + FiltersCode, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); +/** @internal */ +export type FiltersCode$Outbound = string | Array; + +/** @internal */ +export const FiltersCode$outboundSchema: z.ZodType< + FiltersCode$Outbound, + z.ZodTypeDef, + FiltersCode +> = z.union([z.string(), z.array(z.string())]); + +export function filtersCodeToJSON(filtersCode: FiltersCode): string { + return JSON.stringify(FiltersCode$outboundSchema.parse(filtersCode)); +} +export function filtersCodeFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FiltersCode$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FiltersCode' from JSON`, + ); +} + +/** @internal */ +export const FiltersManual$inboundSchema: z.ZodNativeEnum< + typeof FiltersManual +> = z.nativeEnum(FiltersManual); +/** @internal */ +export const FiltersManual$outboundSchema: z.ZodNativeEnum< + typeof FiltersManual +> = FiltersManual$inboundSchema; + +/** @internal */ +export const FiltersAttemptNumber$inboundSchema: z.ZodType< + FiltersAttemptNumber, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); +/** @internal */ +export type FiltersAttemptNumber$Outbound = string | Array; + +/** @internal */ +export const FiltersAttemptNumber$outboundSchema: z.ZodType< + FiltersAttemptNumber$Outbound, + z.ZodTypeDef, + FiltersAttemptNumber +> = z.union([z.string(), z.array(z.string())]); + +export function filtersAttemptNumberToJSON( + filtersAttemptNumber: FiltersAttemptNumber, +): string { + return JSON.stringify( + FiltersAttemptNumber$outboundSchema.parse(filtersAttemptNumber), + ); +} +export function filtersAttemptNumberFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => FiltersAttemptNumber$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'FiltersAttemptNumber' from JSON`, + ); +} + +/** @internal */ +export const GetAttemptMetricsFiltersTenantId$inboundSchema: z.ZodType< + GetAttemptMetricsFiltersTenantId, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); +/** @internal */ +export type GetAttemptMetricsFiltersTenantId$Outbound = string | Array; + +/** @internal */ +export const GetAttemptMetricsFiltersTenantId$outboundSchema: z.ZodType< + GetAttemptMetricsFiltersTenantId$Outbound, + z.ZodTypeDef, + GetAttemptMetricsFiltersTenantId +> = z.union([z.string(), z.array(z.string())]); + +export function getAttemptMetricsFiltersTenantIdToJSON( + getAttemptMetricsFiltersTenantId: GetAttemptMetricsFiltersTenantId, +): string { + return JSON.stringify( + GetAttemptMetricsFiltersTenantId$outboundSchema.parse( + getAttemptMetricsFiltersTenantId, + ), + ); +} +export function getAttemptMetricsFiltersTenantIdFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAttemptMetricsFiltersTenantId$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAttemptMetricsFiltersTenantId' from JSON`, + ); +} + +/** @internal */ +export const GetAttemptMetricsRequest$inboundSchema: z.ZodType< + GetAttemptMetricsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "time[start]": z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), + "time[end]": z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), + granularity: z.string().optional(), + measures: z.union([ + GetAttemptMetricsMeasuresEnum1$inboundSchema, + z.array(GetAttemptMetricsMeasuresEnum2$inboundSchema), + ]), + dimensions: z.union([ + GetAttemptMetricsDimensionsEnum1$inboundSchema, + z.array(GetAttemptMetricsDimensionsEnum2$inboundSchema), + ]).optional(), + "filters[destination_id]": z.union([z.string(), z.array(z.string())]) + .optional(), + "filters[topic]": z.union([z.string(), z.array(z.string())]).optional(), + "filters[status]": z.union([ + FiltersStatusEnum1$inboundSchema, + z.array(FiltersStatusEnum2$inboundSchema), + ]).optional(), + "filters[code]": z.union([z.string(), z.array(z.string())]).optional(), + "filters[manual]": FiltersManual$inboundSchema.optional(), + "filters[attempt_number]": z.union([z.string(), z.array(z.string())]) + .optional(), + "filters[tenant_id]": z.union([z.string(), z.array(z.string())]).optional(), +}).transform((v) => { + return remap$(v, { + "time[start]": "timeStart", + "time[end]": "timeEnd", + "filters[destination_id]": "filtersDestinationId", + "filters[topic]": "filtersTopic", + "filters[status]": "filtersStatus", + "filters[code]": "filtersCode", + "filters[manual]": "filtersManual", + "filters[attempt_number]": "filtersAttemptNumber", + "filters[tenant_id]": "filtersTenantId", + }); +}); +/** @internal */ +export type GetAttemptMetricsRequest$Outbound = { + "time[start]": string; + "time[end]": string; + granularity?: string | undefined; + measures: string | Array; + dimensions?: string | Array | undefined; + "filters[destination_id]"?: string | Array | undefined; + "filters[topic]"?: string | Array | undefined; + "filters[status]"?: string | Array | undefined; + "filters[code]"?: string | Array | undefined; + "filters[manual]"?: string | undefined; + "filters[attempt_number]"?: string | Array | undefined; + "filters[tenant_id]"?: string | Array | undefined; +}; + +/** @internal */ +export const GetAttemptMetricsRequest$outboundSchema: z.ZodType< + GetAttemptMetricsRequest$Outbound, + z.ZodTypeDef, + GetAttemptMetricsRequest +> = z.object({ + timeStart: z.date().transform(v => v.toISOString()), + timeEnd: z.date().transform(v => v.toISOString()), + granularity: z.string().optional(), + measures: z.union([ + GetAttemptMetricsMeasuresEnum1$outboundSchema, + z.array(GetAttemptMetricsMeasuresEnum2$outboundSchema), + ]), + dimensions: z.union([ + GetAttemptMetricsDimensionsEnum1$outboundSchema, + z.array(GetAttemptMetricsDimensionsEnum2$outboundSchema), + ]).optional(), + filtersDestinationId: z.union([z.string(), z.array(z.string())]).optional(), + filtersTopic: z.union([z.string(), z.array(z.string())]).optional(), + filtersStatus: z.union([ + FiltersStatusEnum1$outboundSchema, + z.array(FiltersStatusEnum2$outboundSchema), + ]).optional(), + filtersCode: z.union([z.string(), z.array(z.string())]).optional(), + filtersManual: FiltersManual$outboundSchema.optional(), + filtersAttemptNumber: z.union([z.string(), z.array(z.string())]).optional(), + filtersTenantId: z.union([z.string(), z.array(z.string())]).optional(), +}).transform((v) => { + return remap$(v, { + timeStart: "time[start]", + timeEnd: "time[end]", + filtersDestinationId: "filters[destination_id]", + filtersTopic: "filters[topic]", + filtersStatus: "filters[status]", + filtersCode: "filters[code]", + filtersManual: "filters[manual]", + filtersAttemptNumber: "filters[attempt_number]", + filtersTenantId: "filters[tenant_id]", + }); +}); + +export function getAttemptMetricsRequestToJSON( + getAttemptMetricsRequest: GetAttemptMetricsRequest, +): string { + return JSON.stringify( + GetAttemptMetricsRequest$outboundSchema.parse(getAttemptMetricsRequest), + ); +} +export function getAttemptMetricsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetAttemptMetricsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetAttemptMetricsRequest' from JSON`, + ); +} diff --git a/sdks/outpost-typescript/src/models/operations/geteventmetrics.ts b/sdks/outpost-typescript/src/models/operations/geteventmetrics.ts new file mode 100644 index 000000000..5b3fb0a9a --- /dev/null +++ b/sdks/outpost-typescript/src/models/operations/geteventmetrics.ts @@ -0,0 +1,434 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export const GetEventMetricsMeasuresEnum2 = { + Count: "count", + Rate: "rate", +} as const; +export type GetEventMetricsMeasuresEnum2 = ClosedEnum< + typeof GetEventMetricsMeasuresEnum2 +>; + +export const GetEventMetricsMeasuresEnum1 = { + Count: "count", + Rate: "rate", +} as const; +export type GetEventMetricsMeasuresEnum1 = ClosedEnum< + typeof GetEventMetricsMeasuresEnum1 +>; + +/** + * Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). + */ +export type GetEventMetricsMeasuresUnion = + | GetEventMetricsMeasuresEnum1 + | Array; + +export const GetEventMetricsDimensionsEnum2 = { + TenantId: "tenant_id", + Topic: "topic", + DestinationId: "destination_id", +} as const; +export type GetEventMetricsDimensionsEnum2 = ClosedEnum< + typeof GetEventMetricsDimensionsEnum2 +>; + +export const GetEventMetricsDimensionsEnum1 = { + TenantId: "tenant_id", + Topic: "topic", + DestinationId: "destination_id", +} as const; +export type GetEventMetricsDimensionsEnum1 = ClosedEnum< + typeof GetEventMetricsDimensionsEnum1 +>; + +/** + * Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). + */ +export type GetEventMetricsDimensionsUnion = + | GetEventMetricsDimensionsEnum1 + | Array; + +/** + * Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + */ +export type GetEventMetricsFiltersTopic = string | Array; + +/** + * Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + */ +export type GetEventMetricsFiltersDestinationId = string | Array; + +/** + * Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + */ +export type GetEventMetricsFiltersTenantId = string | Array; + +export type GetEventMetricsRequest = { + /** + * Start of the time range (inclusive). ISO 8601 timestamp. + */ + timeStart: Date; + /** + * End of the time range (exclusive). ISO 8601 timestamp. + */ + timeEnd: Date; + /** + * Time bucketing granularity. Pattern: ``. + * + * @remarks + * Units: `s` (1-60), `m` (1-60), `h` (1-24), `d` (1-31), `w` (1-4), `M` (1-12). + * When omitted, returns a single aggregate row per dimension combination. + */ + granularity?: string | undefined; + /** + * Measures to compute. At least one required. `rate` is events/second throughput. Use bracket notation for multiple values (e.g., `measures[0]=count`). + */ + measures: GetEventMetricsMeasuresEnum1 | Array; + /** + * Dimensions to group results by. Use bracket notation for multiple values (e.g., `dimensions[0]=topic&dimensions[1]=destination_id`). + */ + dimensions?: + | GetEventMetricsDimensionsEnum1 + | Array + | undefined; + /** + * Filter by topic name(s). Use bracket notation for multiple values (e.g., `filters[topic][0]=user.created&filters[topic][1]=user.updated`). + */ + filtersTopic?: string | Array | undefined; + /** + * Filter by destination ID(s). Use bracket notation for multiple values (e.g., `filters[destination_id][0]=d1&filters[destination_id][1]=d2`). + */ + filtersDestinationId?: string | Array | undefined; + /** + * Filter by tenant ID(s). Admin-only — rejected with 403 for JWT callers. Use bracket notation for multiple values (e.g., `filters[tenant_id][0]=t1&filters[tenant_id][1]=t2`). + */ + filtersTenantId?: string | Array | undefined; +}; + +/** @internal */ +export const GetEventMetricsMeasuresEnum2$inboundSchema: z.ZodNativeEnum< + typeof GetEventMetricsMeasuresEnum2 +> = z.nativeEnum(GetEventMetricsMeasuresEnum2); +/** @internal */ +export const GetEventMetricsMeasuresEnum2$outboundSchema: z.ZodNativeEnum< + typeof GetEventMetricsMeasuresEnum2 +> = GetEventMetricsMeasuresEnum2$inboundSchema; + +/** @internal */ +export const GetEventMetricsMeasuresEnum1$inboundSchema: z.ZodNativeEnum< + typeof GetEventMetricsMeasuresEnum1 +> = z.nativeEnum(GetEventMetricsMeasuresEnum1); +/** @internal */ +export const GetEventMetricsMeasuresEnum1$outboundSchema: z.ZodNativeEnum< + typeof GetEventMetricsMeasuresEnum1 +> = GetEventMetricsMeasuresEnum1$inboundSchema; + +/** @internal */ +export const GetEventMetricsMeasuresUnion$inboundSchema: z.ZodType< + GetEventMetricsMeasuresUnion, + z.ZodTypeDef, + unknown +> = z.union([ + GetEventMetricsMeasuresEnum1$inboundSchema, + z.array(GetEventMetricsMeasuresEnum2$inboundSchema), +]); +/** @internal */ +export type GetEventMetricsMeasuresUnion$Outbound = string | Array; + +/** @internal */ +export const GetEventMetricsMeasuresUnion$outboundSchema: z.ZodType< + GetEventMetricsMeasuresUnion$Outbound, + z.ZodTypeDef, + GetEventMetricsMeasuresUnion +> = z.union([ + GetEventMetricsMeasuresEnum1$outboundSchema, + z.array(GetEventMetricsMeasuresEnum2$outboundSchema), +]); + +export function getEventMetricsMeasuresUnionToJSON( + getEventMetricsMeasuresUnion: GetEventMetricsMeasuresUnion, +): string { + return JSON.stringify( + GetEventMetricsMeasuresUnion$outboundSchema.parse( + getEventMetricsMeasuresUnion, + ), + ); +} +export function getEventMetricsMeasuresUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetEventMetricsMeasuresUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetEventMetricsMeasuresUnion' from JSON`, + ); +} + +/** @internal */ +export const GetEventMetricsDimensionsEnum2$inboundSchema: z.ZodNativeEnum< + typeof GetEventMetricsDimensionsEnum2 +> = z.nativeEnum(GetEventMetricsDimensionsEnum2); +/** @internal */ +export const GetEventMetricsDimensionsEnum2$outboundSchema: z.ZodNativeEnum< + typeof GetEventMetricsDimensionsEnum2 +> = GetEventMetricsDimensionsEnum2$inboundSchema; + +/** @internal */ +export const GetEventMetricsDimensionsEnum1$inboundSchema: z.ZodNativeEnum< + typeof GetEventMetricsDimensionsEnum1 +> = z.nativeEnum(GetEventMetricsDimensionsEnum1); +/** @internal */ +export const GetEventMetricsDimensionsEnum1$outboundSchema: z.ZodNativeEnum< + typeof GetEventMetricsDimensionsEnum1 +> = GetEventMetricsDimensionsEnum1$inboundSchema; + +/** @internal */ +export const GetEventMetricsDimensionsUnion$inboundSchema: z.ZodType< + GetEventMetricsDimensionsUnion, + z.ZodTypeDef, + unknown +> = z.union([ + GetEventMetricsDimensionsEnum1$inboundSchema, + z.array(GetEventMetricsDimensionsEnum2$inboundSchema), +]); +/** @internal */ +export type GetEventMetricsDimensionsUnion$Outbound = string | Array; + +/** @internal */ +export const GetEventMetricsDimensionsUnion$outboundSchema: z.ZodType< + GetEventMetricsDimensionsUnion$Outbound, + z.ZodTypeDef, + GetEventMetricsDimensionsUnion +> = z.union([ + GetEventMetricsDimensionsEnum1$outboundSchema, + z.array(GetEventMetricsDimensionsEnum2$outboundSchema), +]); + +export function getEventMetricsDimensionsUnionToJSON( + getEventMetricsDimensionsUnion: GetEventMetricsDimensionsUnion, +): string { + return JSON.stringify( + GetEventMetricsDimensionsUnion$outboundSchema.parse( + getEventMetricsDimensionsUnion, + ), + ); +} +export function getEventMetricsDimensionsUnionFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetEventMetricsDimensionsUnion$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetEventMetricsDimensionsUnion' from JSON`, + ); +} + +/** @internal */ +export const GetEventMetricsFiltersTopic$inboundSchema: z.ZodType< + GetEventMetricsFiltersTopic, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); +/** @internal */ +export type GetEventMetricsFiltersTopic$Outbound = string | Array; + +/** @internal */ +export const GetEventMetricsFiltersTopic$outboundSchema: z.ZodType< + GetEventMetricsFiltersTopic$Outbound, + z.ZodTypeDef, + GetEventMetricsFiltersTopic +> = z.union([z.string(), z.array(z.string())]); + +export function getEventMetricsFiltersTopicToJSON( + getEventMetricsFiltersTopic: GetEventMetricsFiltersTopic, +): string { + return JSON.stringify( + GetEventMetricsFiltersTopic$outboundSchema.parse( + getEventMetricsFiltersTopic, + ), + ); +} +export function getEventMetricsFiltersTopicFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetEventMetricsFiltersTopic$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetEventMetricsFiltersTopic' from JSON`, + ); +} + +/** @internal */ +export const GetEventMetricsFiltersDestinationId$inboundSchema: z.ZodType< + GetEventMetricsFiltersDestinationId, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); +/** @internal */ +export type GetEventMetricsFiltersDestinationId$Outbound = + | string + | Array; + +/** @internal */ +export const GetEventMetricsFiltersDestinationId$outboundSchema: z.ZodType< + GetEventMetricsFiltersDestinationId$Outbound, + z.ZodTypeDef, + GetEventMetricsFiltersDestinationId +> = z.union([z.string(), z.array(z.string())]); + +export function getEventMetricsFiltersDestinationIdToJSON( + getEventMetricsFiltersDestinationId: GetEventMetricsFiltersDestinationId, +): string { + return JSON.stringify( + GetEventMetricsFiltersDestinationId$outboundSchema.parse( + getEventMetricsFiltersDestinationId, + ), + ); +} +export function getEventMetricsFiltersDestinationIdFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + GetEventMetricsFiltersDestinationId$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetEventMetricsFiltersDestinationId' from JSON`, + ); +} + +/** @internal */ +export const GetEventMetricsFiltersTenantId$inboundSchema: z.ZodType< + GetEventMetricsFiltersTenantId, + z.ZodTypeDef, + unknown +> = z.union([z.string(), z.array(z.string())]); +/** @internal */ +export type GetEventMetricsFiltersTenantId$Outbound = string | Array; + +/** @internal */ +export const GetEventMetricsFiltersTenantId$outboundSchema: z.ZodType< + GetEventMetricsFiltersTenantId$Outbound, + z.ZodTypeDef, + GetEventMetricsFiltersTenantId +> = z.union([z.string(), z.array(z.string())]); + +export function getEventMetricsFiltersTenantIdToJSON( + getEventMetricsFiltersTenantId: GetEventMetricsFiltersTenantId, +): string { + return JSON.stringify( + GetEventMetricsFiltersTenantId$outboundSchema.parse( + getEventMetricsFiltersTenantId, + ), + ); +} +export function getEventMetricsFiltersTenantIdFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetEventMetricsFiltersTenantId$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetEventMetricsFiltersTenantId' from JSON`, + ); +} + +/** @internal */ +export const GetEventMetricsRequest$inboundSchema: z.ZodType< + GetEventMetricsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "time[start]": z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), + "time[end]": z.string().datetime({ offset: true }).transform(v => + new Date(v) + ), + granularity: z.string().optional(), + measures: z.union([ + GetEventMetricsMeasuresEnum1$inboundSchema, + z.array(GetEventMetricsMeasuresEnum2$inboundSchema), + ]), + dimensions: z.union([ + GetEventMetricsDimensionsEnum1$inboundSchema, + z.array(GetEventMetricsDimensionsEnum2$inboundSchema), + ]).optional(), + "filters[topic]": z.union([z.string(), z.array(z.string())]).optional(), + "filters[destination_id]": z.union([z.string(), z.array(z.string())]) + .optional(), + "filters[tenant_id]": z.union([z.string(), z.array(z.string())]).optional(), +}).transform((v) => { + return remap$(v, { + "time[start]": "timeStart", + "time[end]": "timeEnd", + "filters[topic]": "filtersTopic", + "filters[destination_id]": "filtersDestinationId", + "filters[tenant_id]": "filtersTenantId", + }); +}); +/** @internal */ +export type GetEventMetricsRequest$Outbound = { + "time[start]": string; + "time[end]": string; + granularity?: string | undefined; + measures: string | Array; + dimensions?: string | Array | undefined; + "filters[topic]"?: string | Array | undefined; + "filters[destination_id]"?: string | Array | undefined; + "filters[tenant_id]"?: string | Array | undefined; +}; + +/** @internal */ +export const GetEventMetricsRequest$outboundSchema: z.ZodType< + GetEventMetricsRequest$Outbound, + z.ZodTypeDef, + GetEventMetricsRequest +> = z.object({ + timeStart: z.date().transform(v => v.toISOString()), + timeEnd: z.date().transform(v => v.toISOString()), + granularity: z.string().optional(), + measures: z.union([ + GetEventMetricsMeasuresEnum1$outboundSchema, + z.array(GetEventMetricsMeasuresEnum2$outboundSchema), + ]), + dimensions: z.union([ + GetEventMetricsDimensionsEnum1$outboundSchema, + z.array(GetEventMetricsDimensionsEnum2$outboundSchema), + ]).optional(), + filtersTopic: z.union([z.string(), z.array(z.string())]).optional(), + filtersDestinationId: z.union([z.string(), z.array(z.string())]).optional(), + filtersTenantId: z.union([z.string(), z.array(z.string())]).optional(), +}).transform((v) => { + return remap$(v, { + timeStart: "time[start]", + timeEnd: "time[end]", + filtersTopic: "filters[topic]", + filtersDestinationId: "filters[destination_id]", + filtersTenantId: "filters[tenant_id]", + }); +}); + +export function getEventMetricsRequestToJSON( + getEventMetricsRequest: GetEventMetricsRequest, +): string { + return JSON.stringify( + GetEventMetricsRequest$outboundSchema.parse(getEventMetricsRequest), + ); +} +export function getEventMetricsRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => GetEventMetricsRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'GetEventMetricsRequest' from JSON`, + ); +} diff --git a/sdks/outpost-typescript/src/models/operations/gettenantdestinationattempt.ts b/sdks/outpost-typescript/src/models/operations/gettenantdestinationattempt.ts index 7fdfac8c1..535ee30cf 100644 --- a/sdks/outpost-typescript/src/models/operations/gettenantdestinationattempt.ts +++ b/sdks/outpost-typescript/src/models/operations/gettenantdestinationattempt.ts @@ -15,6 +15,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; * - `event`: Include event summary * - `event.data`: Include full event with payload data * - `response_data`: Include response body and headers + * - `destination`: Include the full destination object */ export type GetTenantDestinationAttemptInclude = string | Array; @@ -38,6 +39,7 @@ export type GetTenantDestinationAttemptRequest = { * - `event`: Include event summary * - `event.data`: Include full event with payload data * - `response_data`: Include response body and headers + * - `destination`: Include the full destination object */ include?: string | Array | undefined; }; diff --git a/sdks/outpost-typescript/src/models/operations/index.ts b/sdks/outpost-typescript/src/models/operations/index.ts index a5a697ad7..0c5eb1f34 100644 --- a/sdks/outpost-typescript/src/models/operations/index.ts +++ b/sdks/outpost-typescript/src/models/operations/index.ts @@ -8,8 +8,10 @@ export * from "./deletetenantdestination.js"; export * from "./disabletenantdestination.js"; export * from "./enabletenantdestination.js"; export * from "./getattempt.js"; +export * from "./getattemptmetrics.js"; export * from "./getdestinationtypeschema.js"; export * from "./getevent.js"; +export * from "./geteventmetrics.js"; export * from "./gettenant.js"; export * from "./gettenantdestination.js"; export * from "./gettenantdestinationattempt.js"; diff --git a/sdks/outpost-typescript/src/models/operations/listattempts.ts b/sdks/outpost-typescript/src/models/operations/listattempts.ts index 31a8e99f9..7bbc6aabe 100644 --- a/sdks/outpost-typescript/src/models/operations/listattempts.ts +++ b/sdks/outpost-typescript/src/models/operations/listattempts.ts @@ -53,6 +53,7 @@ export type ListAttemptsTopic = string | Array; * - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) * - `event.data`: Include full event with payload data * - `response_data`: Include response body and headers + * - `destination`: Include the full destination object */ export type ListAttemptsInclude = string | Array; @@ -139,6 +140,7 @@ export type ListAttemptsRequest = { * - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) * - `event.data`: Include full event with payload data * - `response_data`: Include response body and headers + * - `destination`: Include the full destination object */ include?: string | Array | undefined; /** diff --git a/sdks/outpost-typescript/src/models/operations/listtenantdestinationattempts.ts b/sdks/outpost-typescript/src/models/operations/listtenantdestinationattempts.ts index 828c7c514..ca4aa93de 100644 --- a/sdks/outpost-typescript/src/models/operations/listtenantdestinationattempts.ts +++ b/sdks/outpost-typescript/src/models/operations/listtenantdestinationattempts.ts @@ -41,6 +41,7 @@ export type ListTenantDestinationAttemptsTopic = string | Array; * - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) * - `event.data`: Include full event with payload data * - `response_data`: Include response body and headers + * - `destination`: Include the full destination object */ export type ListTenantDestinationAttemptsInclude = string | Array; @@ -127,6 +128,7 @@ export type ListTenantDestinationAttemptsRequest = { * - `event`: Include event summary (id, topic, time, eligible_for_retry, metadata) * - `event.data`: Include full event with payload data * - `response_data`: Include response body and headers + * - `destination`: Include the full destination object */ include?: string | Array | undefined; /** diff --git a/sdks/outpost-typescript/src/sdk/metrics.ts b/sdks/outpost-typescript/src/sdk/metrics.ts new file mode 100644 index 000000000..edb89b163 --- /dev/null +++ b/sdks/outpost-typescript/src/sdk/metrics.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { metricsGetAttemptMetrics } from "../funcs/metricsGetAttemptMetrics.js"; +import { metricsGetEventMetrics } from "../funcs/metricsGetEventMetrics.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as components from "../models/components/index.js"; +import * as operations from "../models/operations/index.js"; +import { unwrapAsync } from "../types/fp.js"; + +export class Metrics extends ClientSDK { + /** + * Get Event Metrics + * + * @remarks + * Returns aggregated event publish metrics. Supports time bucketing via granularity, + * dimensional grouping, and filtering. + * + * **Measures:** `count`, `rate` + * + * **Dimensions:** `tenant_id` (admin-only), `topic`, `destination_id` + * + * **Filters:** `tenant_id` (admin-only), `topic`, `destination_id` + */ + async getEventMetrics( + request: operations.GetEventMetricsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(metricsGetEventMetrics( + this, + request, + options, + )); + } + + /** + * Get Attempt Metrics + * + * @remarks + * Returns aggregated delivery attempt metrics. Supports time bucketing via granularity, + * dimensional grouping, and filtering. + * + * **Measures:** `count`, `successful_count`, `failed_count`, `error_rate`, + * `first_attempt_count`, `retry_count`, `manual_retry_count`, `avg_attempt_number`, + * `rate`, `successful_rate`, `failed_rate` + * + * **Dimensions:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + * + * **Filters:** `tenant_id` (admin-only), `destination_id`, `topic`, `status`, `code`, `manual`, `attempt_number` + */ + async getAttemptMetrics( + request: operations.GetAttemptMetricsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(metricsGetAttemptMetrics( + this, + request, + options, + )); + } +} diff --git a/sdks/outpost-typescript/src/sdk/sdk.ts b/sdks/outpost-typescript/src/sdk/sdk.ts index bbbc0ae79..13b75ede9 100644 --- a/sdks/outpost-typescript/src/sdk/sdk.ts +++ b/sdks/outpost-typescript/src/sdk/sdk.ts @@ -7,6 +7,7 @@ import { Attempts } from "./attempts.js"; import { Destinations } from "./destinations.js"; import { Events } from "./events.js"; import { Health } from "./health.js"; +import { Metrics } from "./metrics.js"; import { Publish } from "./publish.js"; import { Schemas } from "./schemas.js"; import { Tenants } from "./tenants.js"; @@ -52,4 +53,9 @@ export class Outpost extends ClientSDK { get topics(): Topics { return (this._topics ??= new Topics(this._options)); } + + private _metrics?: Metrics; + get metrics(): Metrics { + return (this._metrics ??= new Metrics(this._options)); + } }