@devopness/sdk-js
Version:
Devopness API JS/TS SDK - Painless essential DevOps to everyone
164 lines (163 loc) • 4.28 kB
TypeScript
/**
* devopness API
* Devopness API - Painless essential DevOps to everyone
*
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ActionType } from './action-type';
import { HookIncomingSettings } from './hook-incoming-settings';
import { HookOutgoingSettings } from './hook-outgoing-settings';
import { HookTriggerWhen } from './hook-trigger-when';
import { HookType } from './hook-type';
import { ResourceType } from './resource-type';
import { UserRelation } from './user-relation';
/**
*
* @export
* @interface Hook
*/
export interface Hook {
/**
* The UUID of the given hook
* @type {string}
* @memberof Hook
*/
id: string;
/**
* The name entered by the user (or auto-generated by `Devopness`) to uniquely identify the hook
* @type {string}
* @memberof Hook
*/
name: string;
/**
*
* @type {HookType}
* @memberof Hook
*/
type: HookType;
/**
*
* @type {ActionType}
* @memberof Hook
*/
action_type: ActionType;
/**
* URL that triggers incoming hooks
* @type {string}
* @memberof Hook
*/
url: string | null;
/**
* URL that outgoing hooks make a request to
* @type {string}
* @memberof Hook
*/
target_url: string | null;
/**
* Indicates if the record was auto_generated by `Devopness` itself
* @type {boolean}
* @memberof Hook
*/
is_auto_generated: boolean;
/**
* Tells if requests to this hook must only be accepted when a HTTP header is sent with a message authentication code ([HMAC](https://en.wikipedia.org/wiki/HMAC)) generated based on the secret provided by Devopness and shared by user with external sources
* @type {boolean}
* @memberof Hook
*/
requires_secret: boolean;
/**
* Indicates if the Devopness must be verify the SSL certificate of the request
* @type {boolean}
* @memberof Hook
*/
verify_ssl: boolean;
/**
* Determines if the hook is currently active
* @type {boolean}
* @memberof Hook
*/
active: boolean;
/**
* The ID of the project
* @type {number}
* @memberof Hook
*/
project_id: number;
/**
* The ID of the environment
* @type {number}
* @memberof Hook
*/
environment_id: number;
/**
* The ID of the pipeline executed by this hook
* @type {number}
* @memberof Hook
*/
pipeline_id: number | null;
/**
*
* @type {ResourceType}
* @memberof Hook
*/
resource_type: ResourceType;
/**
* The hooks\' resource ID
* @type {number}
* @memberof Hook
*/
resource_id: number;
/**
*
* @type {HookIncomingSettings | HookOutgoingSettings}
* @memberof Hook
*/
settings: HookIncomingSettings | HookOutgoingSettings | null;
/**
*
* @type {HookTriggerWhen}
* @memberof Hook
*/
trigger_when: HookTriggerWhen;
/**
* The secret generated by Devopness to be used to digitally sign incoming requests. This value is returned only once after a hook is created and cannot be retrieved again after that.
* @type {string}
* @memberof Hook
*/
secret: string;
/**
* The cryptographic hash function to be used by Devopness when validating digitally signed incoming requests for hooks that require secret validation
* @type {string}
* @memberof Hook
*/
secret_algorithm: string | null;
/**
* The name of the HTTP request header from which the request digital signature should be extracted
* @type {string}
* @memberof Hook
*/
secret_header_name: string | null;
/**
*
* @type {UserRelation}
* @memberof Hook
*/
created_by_user: UserRelation;
/**
* The date and time when the record was created
* @type {string}
* @memberof Hook
*/
created_at: string;
/**
* The date and time when the record was last updated
* @type {string}
* @memberof Hook
*/
updated_at: string;
}