-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathidentities.ts
More file actions
51 lines (43 loc) · 1.55 KB
/
identities.ts
File metadata and controls
51 lines (43 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import { APIPromise } from '../../core/api-promise';
import { RequestOptions } from '../../internal/request-options';
import { path } from '../../internal/utils/path';
export class Identities extends APIResource {
/**
* Attach an identity to an agent.
*/
attach(identityID: string, params: IdentityAttachParams, options?: RequestOptions): APIPromise<unknown> {
const { agent_id } = params;
return this._client.patch(path`/v1/agents/${agent_id}/identities/attach/${identityID}`, options);
}
/**
* Detach an identity from an agent.
*/
detach(identityID: string, params: IdentityDetachParams, options?: RequestOptions): APIPromise<unknown> {
const { agent_id } = params;
return this._client.patch(path`/v1/agents/${agent_id}/identities/detach/${identityID}`, options);
}
}
export type IdentityAttachResponse = unknown;
export type IdentityDetachResponse = unknown;
export interface IdentityAttachParams {
/**
* The ID of the agent in the format 'agent-<uuid4>'
*/
agent_id: string;
}
export interface IdentityDetachParams {
/**
* The ID of the agent in the format 'agent-<uuid4>'
*/
agent_id: string;
}
export declare namespace Identities {
export {
type IdentityAttachResponse as IdentityAttachResponse,
type IdentityDetachResponse as IdentityDetachResponse,
type IdentityAttachParams as IdentityAttachParams,
type IdentityDetachParams as IdentityDetachParams,
};
}