node-zendesk • Docs
node-zendesk / clients/core/organizationfields / OrganizationFields
Class: OrganizationFields
Class representing the OrganizationFields API endpoints.
See
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_fields/
Extends
Constructors
new OrganizationFields()
new OrganizationFields(
options):OrganizationFields
Parameters
• options: any
Returns
Overrides
Defined in
clients/core/organizationfields.d.ts:6
Properties
_transporter
_transporter:
Transporter
Inherited from
Defined in
clients/client.d.ts:42
eventTarget
eventTarget:
CustomEventTarget
Event target to handle custom events.
Inherited from
Defined in
clients/client.d.ts:40
jsonAPINames
jsonAPINames:
string[]
Array to hold names used in the JSON API.
Overrides
Defined in
clients/core/organizationfields.d.ts:7
options
options:
ZendeskClientOptions&object
Configuration options for the client.
Type declaration
get()
get: (
key) =>any
Parameters
• key: string
Returns
any
Inherited from
Defined in
clients/client.d.ts:34
sideLoad
sideLoad:
any[]
Array to handle side-loaded resources.
Inherited from
Defined in
clients/client.d.ts:37
useDotJson
useDotJson:
boolean
Flag to indicate if the API endpoint should use '.json' ending.
Inherited from
Defined in
clients/client.d.ts:39
Accessors
transporter
Get Signature
get transporter():
Transporter
Returns
Transporter for making requests.
Inherited from
Defined in
clients/client.d.ts:41
Methods
_rawRequest()
_rawRequest(
method,uri, ...arguments_):Promise<object>
Parameters
• method: any
• uri: any
• ...arguments_: any[]
Returns
Promise<object>
response
response:
any
result
result:
object
Inherited from
Defined in
clients/client.d.ts:78
create()
create(
organizationField):Promise<object>
Create a new organization field.
Parameters
• organizationField: object
The organization field object.
Returns
Promise<object>
The newly created organization field.
response
response:
object
result
result:
object
See
Example
const newOrgField = await client.organizationfields.create({ type: 'text', title: 'Support description' });Defined in
clients/core/organizationfields.d.ts:34
delete()
delete(
organizationFieldID):Promise<object>
Delete an organization field.
Parameters
• organizationFieldID: number
The ID of the organization field to delete.
Returns
Promise<object>
Response indicating the deletion status.
Throws
Throws an error if the deletion fails.
See
Example
await client.organizationfields.delete(12345);Overrides
Defined in
clients/core/organizationfields.d.ts:58
emit()
emit(
eventType,eventData):void
Parameters
• eventType: any
• eventData: any
Returns
void
Inherited from
Defined in
clients/client.d.ts:43
get()
get(
resource):Promise<NodeModule>
Parameters
• resource: any
Returns
Promise<NodeModule>
Inherited from
Defined in
clients/client.d.ts:62
getAll()
getAll(
resource):Promise<any[]>
Parameters
• resource: any
Returns
Promise<any[]>
Inherited from
Defined in
clients/client.d.ts:77
list()
list():
Promise<object>
List all organization fields.
Returns
Promise<object>
The organization fields.
See
Example
const orgFields = await client.organizationfields.list();Defined in
clients/core/organizationfields.d.ts:14
on()
on(
eventType,callback):void
Parameters
• eventType: any
• callback: any
Returns
void
Inherited from
Defined in
clients/client.d.ts:44
patch()
patch(...
arguments_):Promise<void|object>
Patches a resource.
Parameters
• ...arguments_: any[]
The resources or parts of the resource path followed by the body.
Returns
Promise<void | object>
- Either void or response object
Inherited from
Defined in
clients/client.d.ts:68
post()
post(
resource,body):Promise<NodeModule>
Parameters
• resource: any
• body: any
Returns
Promise<NodeModule>
Inherited from
Defined in
clients/client.d.ts:70
put()
put(
resource,body):Promise<NodeModule>
Parameters
• resource: any
• body: any
Returns
Promise<NodeModule>
Inherited from
Defined in
clients/client.d.ts:69
reorder()
reorder(
organizationFieldIds):Promise<object>
Reorder the organization fields.
Parameters
• organizationFieldIds: number[]
An array of organization field IDs in the desired order.
Returns
Promise<object>
The reordered organization fields.
response
response:
object
result
result:
object
See
Example
await client.organizationfields.reorder([3, 4]);Defined in
clients/core/organizationfields.d.ts:66
request()
request<
T>(method,uri, ...arguments_):Promise<NodeModule>
Request method that handles various HTTP methods.
Type Parameters
• T
Parameters
• method: string
HTTP method (e.g., 'GET', 'POST').
• uri: string
The URI for the request.
• ...arguments_: any[]
Additional arguments for the request.
Returns
Promise<NodeModule>
- The API response.
Inherited from
Defined in
clients/client.d.ts:96
requestAll()
requestAll(
method,uri, ...arguments_):Promise<any[]>
Parameters
• method: any
• uri: any
• ...arguments_: any[]
Returns
Promise<any[]>
Inherited from
Defined in
clients/client.d.ts:97
requestUpload()
requestUpload(
uri,file):Promise<any>
Parameters
• uri: any
• file: any
Returns
Promise<any>
Inherited from
Defined in
clients/client.d.ts:98
setSideLoad()
setSideLoad(
array):void
Parameters
• array: any
Returns
void
Inherited from
Defined in
clients/client.d.ts:61
show()
show(
organizationFieldID):Promise<object>
Show a specific organization field.
Parameters
• organizationFieldID: number
The ID of the organization field.
Returns
Promise<object>
The organization field details.
response
response:
object
result
result:
object
Throws
Throws an error if the organization field is not found.
See
Example
const orgField = await client.organizationfields.show(12345);Defined in
clients/core/organizationfields.d.ts:23
update()
update(
organizationFieldID,organizationField):Promise<object>
Update an existing organization field.
Parameters
• organizationFieldID: number
The ID of the organization field to update.
• organizationField: object
The updated organization field object.
Returns
Promise<object>
The updated organization field.
response
response:
object
result
result:
object
See
Example
const updatedOrgField = await client.organizationfields.update(12345, { title: 'New title' });Defined in
clients/core/organizationfields.d.ts:46