/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { "/approval/required": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Is Required * @description Check if an approval is required for the specified NRN, entity, action, and dimensions. */ get: operations["approval_required:list"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/approval/action": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List actions * @description List approval actions filtered by NRN, entity, action, or dimensions. */ get: operations["approval_action:list"]; put?: never; /** * Create an approval action * @description Creates a new approval action. */ post: operations["approval_action:create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/approval/action/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read an approval action * @description Reads an approval action. */ get: operations["approval_action:read"]; put?: never; post?: never; /** * Delete an action * @description Permanently removes an approval action. This action cannot be undone." */ delete: operations["approval_action:delete"]; options?: never; head?: never; /** * Update an action * @description Updates the `on_policy_success` and `on_policy_fail` fields of an existing approval action. */ patch: operations["approval_action:update"]; trace?: never; }; "/approval/action/{id}/policy": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Associate policy with action * @description Associates a policy with the specified approval action. */ post: operations["approval_action:associate_policy"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/approval/action/{id}/policy/{policy_id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; post?: never; /** * Disassociate policy from action * @description Disassociates a policy from the specified approval action. */ delete: operations["approval_action:disassociate_policy"]; options?: never; head?: never; patch?: never; trace?: never; }; "/approval/policy": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List policies * @description List policies filtered by NRN. */ get: operations["policy:list"]; put?: never; /** * Create a policy * @description Creates a new policy. */ post: operations["policy:create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/approval/policy/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read a policy * @description Reads a policy. */ get: operations["policy:read"]; put?: never; post?: never; /** * Delete a policy * @description Deletes a policy. This action cannot be undone. */ delete: operations["policy:delete"]; options?: never; head?: never; /** * Update a policy * @description Updates the conditions of an existing policy. */ patch: operations["policy:update"]; trace?: never; }; "/approval": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * List approvals * @description Lists approvals. */ get: operations["approval:list"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/approval/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** * Read an approval * @description Reads an approval. */ get: operations["approval:read"]; put?: never; post?: never; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/approval/{id}/approve": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Approve a request * @description Approves a request using its ID. * * :::note * This endpoint is executed according to the URL you received in the approval notification. * ::: */ post: operations["approval_approve:create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/approval/{id}/deny": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** * Deny a request * @description Denies a request by ID. * * :::note * This endpoint is executed according to the URL you received in the approval notification. * ::: */ post: operations["approval_deny:create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; } export type webhooks = Record; export interface components { schemas: { approval: { /** * @description A unique identifier for the approval. * @example 1234 */ id: number; /** * @description The ID of the user who initiated this approval request. * @example 2345 */ user_id: number; /** * @description The ID of the action that triggered this approval. * @example 3456 */ approval_action_id: number; /** * @description The ID of the entity affected by this approval. * @example 4567 */ entity_id: number; entity_name: components["schemas"]["entity_name"]; entity_action: components["schemas"]["entity_action"]; /** @description The HTTP request that triggered the approval. */ original_http_request: Record; /** @description The HTTP request that must be executed to approve the action. */ approval_http_request: Record; /** @description The HTTP request that must be executed to deny the action. */ denial_http_request: Record; status: components["schemas"]["approval_status"]; /** * @description The execution state of the approval action. * @example pending * @enum {string} */ execution_status: | "pending" | "executing" | "success" | "failed" | "expired"; /** * @description The set of dimension/values pairs to which this action applies. * @example { * "environment": "production", * "country": "us" * } */ dimensions: Record; }; /** * @description The current status of the approval request. * @example pending * @enum {string} */ approval_status: "pending" | "approved" | "denied" | "expired"; /** * @example { * "reviewer": { * "name": "Alex Manager", * "email": "alex.mgr@crypto-inc.com", * "nullplatform_user_id": null * }, * "message": "Approved due to emergency deployment requirements.", * "details": {} * } */ approval_replyApprove: { /** * @description The person or system that approved the request. * @example { * "name": "Alex Manager", * "email": "alex.mgr@crypto-inc.com", * "nullplatform_user_id": null * } */ reviewer: { /** * @description The name of the approver. * @example Alex Manager */ name: string; /** * @description The email of the approver. * @example alex.mgr@crypto-inc.com */ email: string; /** @description The nullplatform ID of the approver (optional). */ nullplatform_user_id?: number; }; /** * @description An optional message explaining the approver's decision. * @example Approved due to emergency deployment requirements. */ message?: string; /** @description Additional structured metadata related to the approver's decision. */ details?: Record; }; /** * @example { * "reviewer": { * "name": "Alex Manager", * "email": "alex.mgr@crypto-inc.com", * "nullplatform_user_id": null * }, * "message": "Denied because it's outside of the deployment window.", * "details": { * "deployment_window": "Mon-Fri ; 9 AM to 5 PM" * } * } */ approval_replyDeny: { /** * @description The person or system that denied the request. * @example { * "name": "Alex Manager", * "email": "alex.mgr@crypto-inc.com", * "nullplatform_user_id": null * } */ reviewer: { /** * @description The name of the approver. * @example Alex Manager */ name: string; /** * @description The email of the approver. * @example alex.mgr@crypto-inc.com */ email: string; /** @description The nullplatform ID of the approver (optional). */ nullplatform_user_id?: number; }; /** * @description An optional message explaining the approver's decision. * @example Denied because the request falls outside the deployment window. */ message?: string; /** * @description Additional structured metadata related to the approver's decision. * @example { * "deployment_window": "Mon-Fri ; 9 AM to 5 PM" * } */ details?: Record; }; approval_action: { /** * @description A unique identifier for the approval action. * @example 1234 */ id: number; /** * @description A resource identifier (NRN) specifying where this action applies. * @example organization=1:account=2:namespace=3:application=4 */ nrn: string; entity: components["schemas"]["entity"]; action: components["schemas"]["action"]; /** * @description Key-value pairs defining the scope of the action. * @example { * "environment": "production", * "country": "us" * } */ dimensions?: Record; /** * @description The action to be taken when the policy check is successful. * * > **Note:** If omitted, this value defaults to **manual**. * @example approve * @enum {string} */ on_policy_success?: "approve" | "manual"; /** * @description The action to be taken when the policy check fails. * * > **Note:** If omitted, this value defaults to **manual**. * @example deny * @enum {string} */ on_policy_fail?: "manual" | "deny"; }; approval_actionWrite: { /** * @description The action to be taken on policy success. * @example approve * @enum {string} */ on_policy_success?: "approve" | "manual"; /** * @description The action to be taken on policy failure. * @example deny * @enum {string} */ on_policy_fail?: "manual" | "deny"; }; /** * @example { * "nrn": "organization=1:account=2:namespace=3:application=4", * "entity": "deployment", * "action": "deployment:create", * "dimensions": { * "environment": "production", * "country": "us" * }, * "on_policy_success": "approve", * "on_policy_fail": "deny" * } */ approval_actionCreate: { /** * @description A resource identifier (NRN) specifying where this action applies. * @example organization=1:account=2:namespace=3:application=4 */ nrn: string; entity: components["schemas"]["entity"]; action: components["schemas"]["action"]; /** * @description Key-value pairs defining the scope of the action. * @example { * "environment": "production", * "country": "us" * } */ dimensions?: Record; /** * @description The action to be taken when the policy check is successful. * * > **Note:** If omitted, this value defaults to **manual**. * @example approve * @enum {string} */ on_policy_success?: "approve" | "manual"; /** * @description The action to be taken when the policy check fails. * * > **Note:** If omitted, this value defaults to **manual**. * @example deny * @enum {string} */ on_policy_fail?: "manual" | "deny"; }; approvalListResponse: { paging: { /** * @description The starting point for pagination. Defaults to 0 if not provided. * @example 0 */ offset: number; /** * @description The maximum number of results to return per page. The maximum allowed value is 200. * @example 200 */ limit: number; }; results: components["schemas"]["approval"][]; }; actionListResponse: { paging: { /** * @description The starting point for pagination. Defaults to 0 if not provided. * @example 0 */ offset: number; /** * @description The maximum number of results to return per page. The maximum allowed value is 200. * @example 200 */ limit: number; }; results: components["schemas"]["approval_action"][]; }; policyListResponse: { paging: { /** * @description The starting point for pagination. Defaults to 0 if not provided. * @example 0 */ offset: number; /** * @description The maximum number of results to return per page. The maximum allowed value is 200. * @example 200 */ limit: number; }; results: components["schemas"]["policy"][]; }; policy: { /** * @description A unique identifier for the policy. * @example 5678 */ id: number; /** * @description A resource identifier (NRN) specifying where the policy applies. * @example organization=1:account=2:namespace=3:application=4 */ nrn: string; /** * @description The name of the policy. * @example Crypto Kong Policies */ name: string; /** * @description A JSON object defining the conditions under which this policy applies. * @example { * "scope.requested_spec.memory_in_gb": { * "$lte": 4 * } * } */ conditions: Record; /** * @description A JSON object defining the selector for the policy. * @example { * "service.spec.id": { * "$eq": 2 * } * } */ selector?: Record; }; policyCreate: { /** * @description A resource identifier (NRN) specifying where the policy applies. * @example organization=1:account=2:namespace=3:application=4 */ nrn: string; /** * @description The name of the policy. * @example Crypto Kong Policies */ name: string; /** * @description A JSON object defining the conditions under which this policy applies. * @example { * "scope.requested_spec.memory_in_gb": { * "$lte": 4 * } * } */ conditions: Record; /** * @description A JSON object defining the selector for the policy. * > **Note:** We recommend using selectors for services, as they allow you to target specific service specifications. * @example { * "service.spec.id": { * "$eq": 2 * } * } */ selector?: Record; }; policyWrite: { /** * @description A JSON object defining the conditions under which this policy applies. * @example { * "scope.requested_spec.memory_in_gb": { * "$lte": 4 * } * } */ conditions?: Record; /** * @description A JSON object defining the selector for the policy. * > **Note:** We recommend using selectors for services, as they allow you to target specific service specifications. * @example { * "service.spec.id": { * "$eq": 2 * } * } */ selector?: Record; }; /** * @description The entity that requires approval. * @example deployment * @enum {string} */ entity: "deployment" | "scope" | "service:action" | "parameter"; /** * @description The action that requires approval. * @example deployment:create * @enum {string} */ action: | "deployment:create" | "scope:create" | "scope:recreate" | "scope:write" | "scope:delete" | "scope:stop" | "service:action:create" | "parameter:read-secrets"; /** * @description The entity that requires approval. * @example deployment * @enum {string} */ entity_name: "deployment" | "scope" | "service:action" | "parameter"; /** * @description The action that requires approval. * @example deployment:create * @enum {string} */ entity_action: | "deployment:create" | "scope:create" | "scope:recreate" | "scope:write" | "scope:delete" | "scope:stop" | "service:action:create" | "parameter:read-secrets"; }; responses: { /** @description Client error responses due to invalid input or missing parameters. */ "4XX": { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description HTTP status code representing the specific client error (e.g., 400, 401, 403, 404). * @example 400 */ statusCode: number; /** * @description A machine-readable error code that categorizes the server failure. * @example bad_request */ code?: string; /** * @description A brief, human-readable description of the error type (e.g., "Bad Request", "Unauthorized"). * @example Bad Request */ error: string; /** * @description Additional details about the error. * @example The request was malformed or contained invalid parameters. */ message: string; }; }; }; /** @description Server error responses indicating an issue on the API side. */ "5XX": { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description HTTP status code representing the specific server error (e.g., 500, 502, 503). * @example 500 */ statusCode: number; /** * @description A machine-readable error code that categorizes the server failure. * @example internal_server_error */ code?: string; /** * @description A brief, human-readable description of the error type (e.g., "Internal Server Error", "Service Unavailable"). * @example Internal Server Error */ error: string; /** * @description Additional details about the error. * @example An unexpected error occurred. Please try again later. */ message: string; }; }; }; }; parameters: never; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { "approval_required:list": { parameters: { query: { /** * @description Specifies the resource (application, scope, etc.) that requires approval. * * > **Note:** This follows a hierarchical structure, meaning if approvals are set at the namespace level, all applications and scopes within that namespace will inherit the rule. * * Format: organization=1:account=2:namespace=3:application=4:scope=5 (trailing levels optional). Read one from an entity's nrn field, e.g. 'np application read --id --query .nrn'. * @example organization=1:account=2:namespace=4:application=4:scope=5 */ nrn: string; /** * @description The entity that requires approval. * @example deployment */ entity: components["schemas"]["entity"]; /** * @description The action that requires approval. * @example deployment:create */ action: components["schemas"]["action"]; /** * @description Specify the [dimensions](/docs/dimensions) you have configured.You can include multiple key-value pairs, separated by commas * @example environment:production,country:us */ dimensions?: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description Returns whether approval is required for the specified parameters. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description `true` when an approval will be required for these parameters, `false` otherwise. * @example true */ required: boolean; }; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval_action:list": { parameters: { query: { /** * @description The resource that will be subject to approvals. * * > **Note:** This is a hierarchical setting, so if you set approvals for a namespace, then all applications and scopes inside the namespace will match against the action. * * Format: organization=1:account=2:namespace=3:application=4:scope=5 (trailing levels optional). Read one from an entity's nrn field, e.g. 'np application read --id --query .nrn'. * @example organization=1:account=2:namespace=4:application=4:scope=5 */ nrn: string; /** * @description The entity that requires approval. * @example deployment */ entity: components["schemas"]["entity"]; /** * @description The action that requires approval. * @example deployment:create */ action: components["schemas"]["action"]; /** * @description Specify the [dimensions](/docs/dimensions) you have configured.You can include multiple key-value pairs, separated by commas * @example environment:production,country:us */ dimensions?: string; /** @description Specifies whether to show entities defined in the lower level of the NRN hierarchy */ show_descendants?: boolean; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["actionListResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval_action:create": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["approval_actionCreate"]; }; }; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["approval_action"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval_action:read": { parameters: { query?: never; header?: never; path: { /** @description The ID of the approval action. */ id: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["approval_action"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval_action:delete": { parameters: { query?: never; header?: never; path: { /** * @description The ID of the approval action. * @example 1234 */ id: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description Indicates whether the operation was successful. * @example true */ success?: boolean; }; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval_action:update": { parameters: { query?: never; header?: never; path: { /** @description The ID of the approval action. */ id: number; }; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["approval_actionWrite"]; }; }; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["approval_action"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval_action:associate_policy": { parameters: { query?: never; header?: never; path: { /** * @description The ID of the approval action. * @example 1234 */ id: number; }; cookie?: never; }; requestBody?: { content: { "application/json": { /** @description The ID of the policy to associate. */ policy_id?: number; }; }; }; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description Indicates whether the operation was successful. * @example true */ success?: boolean; }; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval_action:disassociate_policy": { parameters: { query?: never; header?: never; path: { /** * @description The ID of the approval action. * @example 1234 */ id: number; /** * @description The ID of the policy to disassociate. * @example 5678 */ policy_id: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description Indicates whether the operation was successful. * @example true */ success?: boolean; }; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "policy:list": { parameters: { query: { /** * @description The NRN of the resource (including children resources) where the policy applies. Format: organization=1:account=2:namespace=3:application=4:scope=5 (trailing levels optional). Read one from an entity's nrn field, e.g. 'np application read --id --query .nrn'. * @example organization=1:account=2:namespace=4:application=4:scope=5 */ nrn: string; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["policyListResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "policy:create": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["policyCreate"]; }; }; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["policy"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "policy:read": { parameters: { query?: never; header?: never; path: { /** * @description The ID of the policy. * @example 5678 */ id: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["policy"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "policy:delete": { parameters: { query?: never; header?: never; path: { /** * @description The ID of the policy. * @example 5678 */ id: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description Indicates whether the operation was successful. * @example true */ success?: boolean; }; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "policy:update": { parameters: { query?: never; header?: never; path: { /** * @description The ID of the policy. * @example 5678 */ id: number; }; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["policyWrite"]; }; }; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["policy"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval:list": { parameters: { query: { /** * @description Specifies the resource (application, scope, etc.) that requires approval. * * > **Note:** This follows a hierarchical structure, meaning if approvals are set at the namespace level, all applications and scopes within that namespace will inherit the rule. * * Format: organization=1:account=2:namespace=3:application=4:scope=5 (trailing levels optional). Read one from an entity's nrn field, e.g. 'np application read --id --query .nrn'. * @example organization=1:account=2:namespace=4:application=4:scope=5 */ nrn: string; /** * @description The entity that requires approval. * @example deployment */ entity_name?: components["schemas"]["entity"]; /** * @description The action that requires approval. * @example deployment:create */ entity_action?: components["schemas"]["action"]; /** * @description The status of the approval. * @example pending */ status?: components["schemas"]["approval_status"]; /** * @description The ID of the action that triggered this approval. * @example 3456 */ approval_action_id?: number; }; header?: never; path?: never; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["approvalListResponse"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval:read": { parameters: { query?: never; header?: never; path: { /** * @description The ID of the approval. * @example 1234 */ id: number; }; cookie?: never; }; requestBody?: never; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": components["schemas"]["approval"]; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval_approve:create": { parameters: { query: { /** * @description The authentication token provided in the approval notification. * @example your-authentication-token */ token: string; }; header?: never; path: { /** * @description The ID of the approval. * @example 1234 */ id: number; }; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["approval_replyApprove"]; }; }; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description Indicates whether the operation was successful. * @example true */ success?: boolean; }; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; "approval_deny:create": { parameters: { query: { /** * @description The authentication token provided in the approval notification. * @example your-authentication-token */ token: string; }; header?: never; path: { /** * @description The ID of the approval. * @example 1234 */ id: number; }; cookie?: never; }; requestBody?: { content: { "application/json": components["schemas"]["approval_replyDeny"]; }; }; responses: { /** @description The operation was successful. */ 200: { headers: { [name: string]: unknown; }; content: { "application/json": { /** * @description Indicates whether the operation was successful. * @example true */ success: boolean; }; }; }; "4XX": components["responses"]["4XX"]; "5XX": components["responses"]["5XX"]; }; }; }