fetch-jsd
Version:
A simple and typed library, based on OpenAPI spec from developer.atlassian.com, for accessing product APIs.
213 lines (212 loc) • 15.9 kB
TypeScript
/**
* Service Desk Public REST API
* Public REST API for Jira Service Desk
*
* The version of the OpenAPI document: 1001.0.0-SNAPSHOT
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import { EntityProperty, OrganizationCreateDTO, OrganizationDTO, OrganizationServiceDeskUpdateDTO, PagedDTOOrganizationDTO, PagedDTOUserDTO, PropertyKeys, UsersOrganizationUpdateDTO } from '../models';
export interface AddOrganizationRequest {
serviceDeskId: number;
OrganizationServiceDeskUpdateDTO: OrganizationServiceDeskUpdateDTO;
}
export interface AddUsersToOrganizationRequest {
organizationId: number;
UsersOrganizationUpdateDTO: UsersOrganizationUpdateDTO;
}
export interface CreateOrganizationRequest {
OrganizationCreateDTO: OrganizationCreateDTO;
}
export interface DeleteOrganizationRequest {
organizationId: number;
}
export interface DeletePropertyRequest {
organizationId: string;
propertyKey: string;
}
export interface GetOrganizationRequest {
organizationId: number;
}
export interface GetOrganizationsRequest {
start?: number;
limit?: number;
}
export interface GetOrganizations1Request {
serviceDeskId: number;
start?: number;
limit?: number;
}
export interface GetPropertiesKeysRequest {
organizationId: string;
}
export interface GetPropertyRequest {
organizationId: string;
propertyKey: string;
}
export interface GetUsersInOrganizationRequest {
organizationId: number;
start?: number;
limit?: number;
}
export interface RemoveOrganizationRequest {
serviceDeskId: number;
OrganizationServiceDeskUpdateDTO: OrganizationServiceDeskUpdateDTO;
}
export interface RemoveUsersFromOrganizationRequest {
organizationId: number;
UsersOrganizationUpdateDTO: UsersOrganizationUpdateDTO;
}
export interface SetPropertyRequest {
organizationId: string;
propertyKey: string;
}
/**
* no description
*/
export declare class OrganizationApi extends runtime.BaseAPI {
/**
* This method adds an organization to a service desk. If the organization ID is already associated with the service desk, no change is made and the resource returns a 204 success code. **[Permissions](#permissions) required**: Service desk\'s agent.
* Add organization
*/
addOrganizationRaw(requestParameters: AddOrganizationRequest): Promise<runtime.ApiResponse<void>>;
/**
* This method adds an organization to a service desk. If the organization ID is already associated with the service desk, no change is made and the resource returns a 204 success code. **[Permissions](#permissions) required**: Service desk\'s agent.
* Add organization
*/
addOrganization(requestParameters: AddOrganizationRequest): Promise<void>;
/**
* This method adds users to an organization. **[Permissions](#permissions) required**: Service desk administrator or agent. Note: Permission to add users to an organization can be switched to users with the Jira administrator permission, using the **[Organization management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)** feature.
* Add users to organization
*/
addUsersToOrganizationRaw(requestParameters: AddUsersToOrganizationRequest): Promise<runtime.ApiResponse<void>>;
/**
* This method adds users to an organization. **[Permissions](#permissions) required**: Service desk administrator or agent. Note: Permission to add users to an organization can be switched to users with the Jira administrator permission, using the **[Organization management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)** feature.
* Add users to organization
*/
addUsersToOrganization(requestParameters: AddUsersToOrganizationRequest): Promise<void>;
/**
* This method creates an organization by passing the name of the organization. **[Permissions](#permissions) required**: Service desk administrator or agent. Note: Permission to create organizations can be switched to users with the Jira administrator permission, using the **[Organization management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)** feature.
* Create organization
*/
createOrganizationRaw(requestParameters: CreateOrganizationRequest): Promise<runtime.ApiResponse<OrganizationDTO>>;
/**
* This method creates an organization by passing the name of the organization. **[Permissions](#permissions) required**: Service desk administrator or agent. Note: Permission to create organizations can be switched to users with the Jira administrator permission, using the **[Organization management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)** feature.
* Create organization
*/
createOrganization(requestParameters: CreateOrganizationRequest): Promise<OrganizationDTO>;
/**
* This method deletes an organization. Note that the organization is deleted regardless of other associations it may have. For example, associations with service desks. **[Permissions](#permissions) required**: Jira administrator.
* Delete organization
*/
deleteOrganizationRaw(requestParameters: DeleteOrganizationRequest): Promise<runtime.ApiResponse<void>>;
/**
* This method deletes an organization. Note that the organization is deleted regardless of other associations it may have. For example, associations with service desks. **[Permissions](#permissions) required**: Jira administrator.
* Delete organization
*/
deleteOrganization(requestParameters: DeleteOrganizationRequest): Promise<void>;
/**
* Removes a property from an organization. **[Permissions](#permissions) required**: Service Desk Administrator or Agent. Note: Permission to manage organizations can be switched to users with the Jira administrator permission, using the **[Organization management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)** feature.
* Delete property
*/
deletePropertyRaw(requestParameters: DeletePropertyRequest): Promise<runtime.ApiResponse<void>>;
/**
* Removes a property from an organization. **[Permissions](#permissions) required**: Service Desk Administrator or Agent. Note: Permission to manage organizations can be switched to users with the Jira administrator permission, using the **[Organization management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)** feature.
* Delete property
*/
deleteProperty(requestParameters: DeletePropertyRequest): Promise<void>;
/**
* This method returns details of an organization. Use this method to get organization details whenever your application component is passed an organization ID but needs to display other organization details. **[Permissions](#permissions) required**: Any **Response limitations**: Customers can only retrieve organization of which they are members.
* Get organization
*/
getOrganizationRaw(requestParameters: GetOrganizationRequest): Promise<runtime.ApiResponse<OrganizationDTO>>;
/**
* This method returns details of an organization. Use this method to get organization details whenever your application component is passed an organization ID but needs to display other organization details. **[Permissions](#permissions) required**: Any **Response limitations**: Customers can only retrieve organization of which they are members.
* Get organization
*/
getOrganization(requestParameters: GetOrganizationRequest): Promise<OrganizationDTO>;
/**
* This method returns a list of organizations in the Jira Service Desk instance. Use this method when you want to present a list of organizations or want to locate an organization by name. **[Permissions](#permissions) required**: Any **Response limitations**: If the user is a customer, only those organizations of which the customer is a member are listed.
* Get organizations
*/
getOrganizationsRaw(requestParameters: GetOrganizationsRequest): Promise<runtime.ApiResponse<PagedDTOOrganizationDTO>>;
/**
* This method returns a list of organizations in the Jira Service Desk instance. Use this method when you want to present a list of organizations or want to locate an organization by name. **[Permissions](#permissions) required**: Any **Response limitations**: If the user is a customer, only those organizations of which the customer is a member are listed.
* Get organizations
*/
getOrganizations(requestParameters: GetOrganizationsRequest): Promise<PagedDTOOrganizationDTO>;
/**
* This method returns a list of all organizations associated with a service desk. **[Permissions](#permissions) required**: Service desk\'s agent.
* Get organizations
*/
getOrganizations1Raw(requestParameters: GetOrganizations1Request): Promise<runtime.ApiResponse<PagedDTOOrganizationDTO>>;
/**
* This method returns a list of all organizations associated with a service desk. **[Permissions](#permissions) required**: Service desk\'s agent.
* Get organizations
*/
getOrganizations1(requestParameters: GetOrganizations1Request): Promise<PagedDTOOrganizationDTO>;
/**
* Returns the keys of all properties for an organization. Use this resource when you need to find out what additional properties items have been added to an organization. **[Permissions](#permissions) required**: Any **Response limitations**: Customers can only access properties of organizations of which they are members.
* Get properties keys
*/
getPropertiesKeysRaw(requestParameters: GetPropertiesKeysRequest): Promise<runtime.ApiResponse<PropertyKeys>>;
/**
* Returns the keys of all properties for an organization. Use this resource when you need to find out what additional properties items have been added to an organization. **[Permissions](#permissions) required**: Any **Response limitations**: Customers can only access properties of organizations of which they are members.
* Get properties keys
*/
getPropertiesKeys(requestParameters: GetPropertiesKeysRequest): Promise<PropertyKeys>;
/**
* Returns the value of a property from an organization. Use this method to obtain the JSON content for an organization\'s property. **[Permissions](#permissions) required**: Any **Response limitations**: Customers can only access properties of organizations of which they are members.
* Get property
*/
getPropertyRaw(requestParameters: GetPropertyRequest): Promise<runtime.ApiResponse<EntityProperty>>;
/**
* Returns the value of a property from an organization. Use this method to obtain the JSON content for an organization\'s property. **[Permissions](#permissions) required**: Any **Response limitations**: Customers can only access properties of organizations of which they are members.
* Get property
*/
getProperty(requestParameters: GetPropertyRequest): Promise<EntityProperty>;
/**
* This method returns all the users associated with an organization. Use this method where you want to provide a list of users for an organization or determine if a user is associated with an organization. **[Permissions](#permissions) required**: Service desk administrator or agent.
* Get users in organization
*/
getUsersInOrganizationRaw(requestParameters: GetUsersInOrganizationRequest): Promise<runtime.ApiResponse<PagedDTOUserDTO>>;
/**
* This method returns all the users associated with an organization. Use this method where you want to provide a list of users for an organization or determine if a user is associated with an organization. **[Permissions](#permissions) required**: Service desk administrator or agent.
* Get users in organization
*/
getUsersInOrganization(requestParameters: GetUsersInOrganizationRequest): Promise<PagedDTOUserDTO>;
/**
* This method removes an organization from a service desk. If the organization ID does not match an organization associated with the service desk, no change is made and the resource returns a 204 success code. **[Permissions](#permissions) required**: Service desk\'s agent.
* Remove organization
*/
removeOrganizationRaw(requestParameters: RemoveOrganizationRequest): Promise<runtime.ApiResponse<void>>;
/**
* This method removes an organization from a service desk. If the organization ID does not match an organization associated with the service desk, no change is made and the resource returns a 204 success code. **[Permissions](#permissions) required**: Service desk\'s agent.
* Remove organization
*/
removeOrganization(requestParameters: RemoveOrganizationRequest): Promise<void>;
/**
* This method removes users from an organization. **[Permissions](#permissions) required**: Service desk administrator or agent. Note: Permission to delete users from an organization can be switched to users with the Jira administrator permission, using the **[Organization management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)** feature.
* Remove users from organization
*/
removeUsersFromOrganizationRaw(requestParameters: RemoveUsersFromOrganizationRequest): Promise<runtime.ApiResponse<void>>;
/**
* This method removes users from an organization. **[Permissions](#permissions) required**: Service desk administrator or agent. Note: Permission to delete users from an organization can be switched to users with the Jira administrator permission, using the **[Organization management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)** feature.
* Remove users from organization
*/
removeUsersFromOrganization(requestParameters: RemoveUsersFromOrganizationRequest): Promise<void>;
/**
* Sets the value of a property for an organization. Use this resource to store custom data against an organization. **[Permissions](#permissions) required**: Service Desk Administrator or Agent. Note: Permission to manage organizations can be switched to users with the Jira administrator permission, using the **[Organization management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)** feature.
* Set property
*/
setPropertyRaw(requestParameters: SetPropertyRequest): Promise<runtime.ApiResponse<object>>;
/**
* Sets the value of a property for an organization. Use this resource to store custom data against an organization. **[Permissions](#permissions) required**: Service Desk Administrator or Agent. Note: Permission to manage organizations can be switched to users with the Jira administrator permission, using the **[Organization management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)** feature.
* Set property
*/
setProperty(requestParameters: SetPropertyRequest): Promise<object>;
}