/*! * Copyright Adaptavist 2023 (c) All rights reserved */ import { HeadersOption } from '@managed-api/commons-core'; import { ErrorStrategyOption } from '../errorStrategy'; import { Table, TableType } from '../definitions/table'; export interface DeleteRecordRequest extends HeadersOption, ErrorStrategyOption { /** * Sys_id of the record to delete. */ sys_id: string; /** * Name of the table from which to delete the specified record, such as "incident" or "asset". */ tableName: string; /** * Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured. * Valid values: * false: Exclude the record if it is in a domain that the currently logged in user is not configured to access. * true: Include the record even if it is in a domain that the currently logged in user is not configured to access. * Default: false */ sysparm_query_no_domain?: boolean; } export declare type DeleteRecordResponseOK = undefined; export declare type DeleteRecordResponseError = undefined; export interface GetRecordsRequest extends HeadersOption, ErrorStrategyOption { /** * Name of the table from which to delete the specified record, such as "incident" or "asset". */ tableName: string; /** * Determines the type of data returned, either the actual values from the database or the display values of the fields. * Valid values: * true: Returns the display values for all fields. * false: Returns the actual values from the database. * all: Returns both actual and display values. * Default: false */ sysparm_display_value?: string; /** * Flag that indicates whether to exclude Table API links for reference fields. * Valid values: * true: Exclude Table API links for reference fields. * false: Include Table API links for reference fields. * Default: false */ sysparm_exclude_reference_link?: boolean; /** * Comma-separated list of fields to return in the response. */ sysparm_fields?: string; /** * Maximum number of records to return. For requests that exceed this number of records, use the sysparm_offset parameter to paginate record retrieval. * This limit is applied before ACL evaluation. If no records return, including records you have access to, rearrange the record order so records you have access to return first. * Note: Unusually large sysparm_limit values can impact system performance. * Default: 1000 */ sysparm_limit?: number; /** * Flag that indicates whether to execute a select count(*) query on the table to return the number of rows in the associated table. * Valid values: * true: Do not execute a select count(*). * false: Execute a select count(*). * Default: false */ sysparm_no_count?: boolean; /** * Starting record index for which to begin retrieving records. Use this value to paginate record retrieval. This functionality enables the retrieval of all records, regardless of the number of records, in small manageable chunks. * For example, the first time you call this endpoint, sysparm_offset is set to "0". To simply page through all available records, use sysparm_offset=sysparm_offset+sysparm_limit, until you reach the end of all records. * Do not pass a negative number in the sysparm_offset parameter. * Default: 0 */ sysparm_offset?: number; /** * Encoded query used to filter the result set. You can use a UI filter to obtain a properly encoded query. */ sysparm_query?: string; /** * Name of the category to use for queries. */ sysparm_query_category?: string; /** * Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured. * Valid values: * false: Exclude the record if it is in a domain that the currently logged in user is not configured to access. * true: Include the record even if it is in a domain that the currently logged in user is not configured to access. * Default: false */ sysparm_query_no_domain?: boolean; /** * Flag that indicates whether to remove the Link header from the response. The Link header provides various URLs to relative pages in the record set which you can use to paginate the returned record set. * Valid values: * true: Remove the Link header from the response. * false: Do not remove the Link header from the response. * Default: false */ sysparm_suppress_pagination_header?: boolean; /** * UI view for which to render the data. Determines the fields returned in the response. * Valid values: * - desktop * - mobile * - both * * If you also specify the sysparm_fields parameter, it takes precedent. */ sysparm_view?: string; /** * Name-value pairs to use to filter the result set. This parameter is mutually exclusive with sysparm_query. * For example, instead of using &sysparm_query=active=true, you can simplify the calling statement by using &active=true. * You can also use the display value when the field is a choice or reference type field, such as &state=closed instead of &state=7. */ [x: string]: any; } export declare type GetRecordsResponseOK = { result: TableType[]; }; export declare type GetRecordsResponseError = undefined; export interface GetRecordRequest extends HeadersOption, ErrorStrategyOption { /** * Name of the table from which to retrieve the record. */ tableName: string; /** * Sys_id of the record to retrieve. */ sys_id: string; /** * Determines the type of data returned, either the actual values from the database or the display values of the fields. * Valid values: * true: Returns the display values for all fields. * false: Returns the actual values from the database. * all: Returns both actual and display values. * Default: false */ sysparm_display_value?: string; /** * Flag that indicates whether to exclude Table API links for reference fields. * Valid values: * true: Exclude Table API links for reference fields. * false: Include Table API links for reference fields. * Default: false */ sysparm_exclude_reference_link?: boolean; /** * Comma-separated list of fields to return in the response. */ sysparm_fields?: string; /** * Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured. * Valid values: * false: Exclude the record if it is in a domain that the currently logged in user is not configured to access. * true: Include the record even if it is in a domain that the currently logged in user is not configured to access. * Default: false */ sysparm_query_no_domain?: boolean; /** * UI view for which to render the data. Determines the fields returned in the response. * Valid values: * - desktop * - mobile * - both * * If you also specify the sysparm_fields parameter, it takes precedent. */ sysparm_view?: string; } export interface GetRecordResponseOK extends Table { } export declare type GetRecordResponseError = undefined; export interface UpdateRecordWithNameValuePairRequest extends HeadersOption, ErrorStrategyOption { /** * Name of the table from which to retrieve the record. */ tableName: string; /** * Sys_id of the record to retrieve. */ sys_id: string; /** * Determines the type of data returned, either the actual values from the database or the display values of the fields. * Valid values: * true: Returns the display values for all fields. * false: Returns the actual values from the database. * all: Returns both actual and display values. * Default: false */ sysparm_display_value?: string; /** * Comma-separated list of fields to return in the response. */ sysparm_fields?: string; /** * Flag that indicates whether to set field values using the display value or the actual value. * Depending on the different types of fields, the endpoint may manipulate the passed in display values to store the proper values in the database. * For example, if you send the display name for a reference field, the endpoint stores the sys_id for that value in the database. * For date and time fields, when this parameter is true, the date and time value is adjusted for the current user's timezone. * When false, the date and time value is inserted using the GMC timezone. * Valid values: true: Treats input values as display values and they are manipulated so they are stored properly in the database. * false: Treats input values as actual values and stores them in the database without manipulation. * Default: false - This matches the data type that is returned during data retrieval (GET methods), which is the actual values. */ sysparm_input_display_value?: boolean; /** * Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured. * Valid values: * false: Exclude the record if it is in a domain that the currently logged in user is not configured to access. * true: Include the record even if it is in a domain that the currently logged in user is not configured to access. * Default: false */ sysparm_query_no_domain?: boolean; /** * UI view for which to render the data. Determines the fields returned in the response. * Valid values: * - desktop * - mobile * - both * * If you also specify the sysparm_fields parameter, it takes precedent. */ sysparm_view?: string; /** * Field name and the new value for each parameter to update in the specified record. * Note: All fields within a record may not be available for update. For example, fields that have a prefix of "sys_" are typically system parameters that are automatically generated and cannot be updated. */ body: Record; } export interface UpdateRecordWithNameValuePairResponseOK extends Table { } export declare type UpdateRecordWithNameValuePairResponseError = undefined; export interface AddRecordRequest extends HeadersOption, ErrorStrategyOption { /** * Name of the table from which to retrieve the record. */ tableName: string; /** * Determines the type of data returned, either the actual values from the database or the display values of the fields. * Valid values: * true: Returns the display values for all fields. * false: Returns the actual values from the database. * all: Returns both actual and display values. * Default: false */ sysparm_display_value?: string; /** * Flag that indicates whether to exclude Table API links for reference fields. * Valid values: * true: Exclude Table API links for reference fields. * false: Include Table API links for reference fields. * Default: false */ sysparm_exclude_reference_link?: boolean; /** * Comma-separated list of fields to return in the response. */ sysparm_fields?: string; /** * Flag that indicates whether to set field values using the display value or the actual value. * Depending on the different types of fields, the endpoint may manipulate the passed in display values to store the proper values in the database. * For example, if you send the display name for a reference field, the endpoint stores the sys_id for that value in the database. * For date and time fields, when this parameter is true, the date and time value is adjusted for the current user's timezone. * When false, the date and time value is inserted using the GMC timezone. * Valid values: true: Treats input values as display values and they are manipulated so they are stored properly in the database. * false: Treats input values as actual values and stores them in the database without manipulation. * Default: false - This matches the data type that is returned during data retrieval (GET methods), which is the actual values. */ sysparm_input_display_value?: boolean; /** * UI view for which to render the data. Determines the fields returned in the response. * Valid values: * - desktop * - mobile * - both * * If you also specify the sysparm_fields parameter, it takes precedent. */ sysparm_view?: string; /** * Field name and the new value for each parameter to update in the specified record. * Note: All fields within a record may not be available for update. For example, fields that have a prefix of "sys_" are typically system parameters that are automatically generated and cannot be updated. */ body: Record; } export interface AddRecordResponseOK extends Table { } export declare type AddRecordResponseError = undefined; export interface UpdateRecordRequest extends HeadersOption, ErrorStrategyOption { /** * Name of the table from which to retrieve the record. */ tableName: string; /** * Unique identifier of the record to update. */ sys_id: string; /** * Determines the type of data returned, either the actual values from the database or the display values of the fields. * Valid values: * true: Returns the display values for all fields. * false: Returns the actual values from the database. * all: Returns both actual and display values. * Default: false */ sysparm_display_value?: string; /** * Flag that indicates whether to exclude Table API links for reference fields. * Valid values: * true: Exclude Table API links for reference fields. * false: Include Table API links for reference fields. * Default: false */ sysparm_exclude_reference_link?: boolean; /** * Comma-separated list of fields to return in the response. */ sysparm_fields?: string; /** * Flag that indicates whether to set field values using the display value or the actual value. * Depending on the different types of fields, the endpoint may manipulate the passed in display values to store the proper values in the database. * For example, if you send the display name for a reference field, the endpoint stores the sys_id for that value in the database. * For date and time fields, when this parameter is true, the date and time value is adjusted for the current user's timezone. * When false, the date and time value is inserted using the GMC timezone. * Valid values: true: Treats input values as display values and they are manipulated so they are stored properly in the database. * false: Treats input values as actual values and stores them in the database without manipulation. * Default: false - This matches the data type that is returned during data retrieval (GET methods), which is the actual values. */ sysparm_input_display_value?: boolean; /** * Flag that indicates whether to restrict the record search to only the domains for which the logged in user is configured. * Valid values: * false: Exclude the record if it is in a domain that the currently logged in user is not configured to access. * true: Include the record even if it is in a domain that the currently logged in user is not configured to access. * Default: false */ sysparm_query_no_domain?: boolean; /** * UI view for which to render the data. Determines the fields returned in the response. * Valid values: * - desktop * - mobile * - both * * If you also specify the sysparm_fields parameter, it takes precedent. */ sysparm_view?: string; /** * Field name and the new value for each parameter to update in the specified record. * Note: All fields within a record may not be available for update. For example, fields that have a prefix of "sys_" are typically system parameters that are automatically generated and cannot be updated. */ body: Record; } export interface UpdateRecordResponseOK extends Table { } export declare type UpdateRecordResponseError = undefined; //# sourceMappingURL=table.d.ts.map