@amigo-ai/platform-sdk 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -7
- package/api.md +5 -0
- package/dist/index.cjs +43 -10
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -10
- package/dist/index.mjs.map +2 -2
- package/dist/resources/base.js +7 -2
- package/dist/resources/base.js.map +1 -1
- package/dist/resources/operators.js.map +1 -1
- package/dist/resources/personas.js.map +1 -1
- package/dist/resources/webhook-destinations.js.map +1 -1
- package/dist/resources/workspaces.js +22 -0
- package/dist/resources/workspaces.js.map +1 -1
- package/dist/resources/world.js.map +1 -1
- package/dist/types/generated/api.d.ts +13373 -13213
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/actions.d.ts +166 -166
- package/dist/types/resources/agents.d.ts +88 -88
- package/dist/types/resources/analytics.d.ts +39 -39
- package/dist/types/resources/api-keys.d.ts +29 -29
- package/dist/types/resources/audit.d.ts +73 -73
- package/dist/types/resources/base.d.ts.map +1 -1
- package/dist/types/resources/billing.d.ts +36 -36
- package/dist/types/resources/calls.d.ts +106 -106
- package/dist/types/resources/compliance.d.ts +17 -17
- package/dist/types/resources/context-graphs.d.ts +643 -643
- package/dist/types/resources/data-sources.d.ts +81 -81
- package/dist/types/resources/functions.d.ts +22 -22
- package/dist/types/resources/functions.d.ts.map +1 -1
- package/dist/types/resources/integrations.d.ts +258 -258
- package/dist/types/resources/memory.d.ts +35 -35
- package/dist/types/resources/operators.d.ts +147 -147
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/personas.d.ts +37 -37
- package/dist/types/resources/personas.d.ts.map +1 -1
- package/dist/types/resources/phone-numbers.d.ts +62 -62
- package/dist/types/resources/recordings.d.ts +9 -9
- package/dist/types/resources/review-queue.d.ts +331 -331
- package/dist/types/resources/safety.d.ts +33 -33
- package/dist/types/resources/services.d.ts +142 -142
- package/dist/types/resources/settings.d.ts +254 -254
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/simulations.d.ts +73 -73
- package/dist/types/resources/skills.d.ts +163 -163
- package/dist/types/resources/triggers.d.ts +74 -74
- package/dist/types/resources/webhook-destinations.d.ts +57 -57
- package/dist/types/resources/webhook-destinations.d.ts.map +1 -1
- package/dist/types/resources/workspaces.d.ts +69 -35
- package/dist/types/resources/workspaces.d.ts.map +1 -1
- package/dist/types/resources/world.d.ts +216 -216
- package/dist/types/resources/world.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7,184 +7,184 @@ export interface ListAgentsParams extends ListParams {
|
|
|
7
7
|
}
|
|
8
8
|
export declare class AgentsResource extends WorkspaceScopedResource {
|
|
9
9
|
create(body: components['schemas']['CreateAgentRequest']): Promise<{
|
|
10
|
-
created_at: string;
|
|
11
|
-
description: string;
|
|
12
10
|
id: string;
|
|
13
|
-
|
|
11
|
+
workspace_id: string;
|
|
14
12
|
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
latest_version?: number | undefined;
|
|
15
|
+
created_at: string;
|
|
15
16
|
updated_at: string;
|
|
16
|
-
workspace_id: string;
|
|
17
17
|
} & import("../index.js").ResponseMetadata>;
|
|
18
18
|
list(params?: ListAgentsParams): Promise<{
|
|
19
|
-
continuation_token?: number | null | undefined;
|
|
20
|
-
has_more: boolean;
|
|
21
19
|
items: {
|
|
22
|
-
created_at: string;
|
|
23
|
-
description: string;
|
|
24
20
|
id: string;
|
|
25
|
-
|
|
21
|
+
workspace_id: string;
|
|
26
22
|
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
latest_version?: number | undefined;
|
|
25
|
+
created_at: string;
|
|
27
26
|
updated_at: string;
|
|
28
|
-
workspace_id: string;
|
|
29
27
|
}[];
|
|
28
|
+
has_more: boolean;
|
|
29
|
+
continuation_token?: number | null | undefined;
|
|
30
30
|
total?: number | null | undefined;
|
|
31
31
|
} & import("../index.js").ResponseMetadata>;
|
|
32
32
|
listAutoPaging(params?: ListAgentsParams): AsyncGenerator<{
|
|
33
|
-
created_at: string;
|
|
34
|
-
description: string;
|
|
35
33
|
id: string;
|
|
36
|
-
|
|
34
|
+
workspace_id: string;
|
|
37
35
|
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
latest_version?: number | undefined;
|
|
38
|
+
created_at: string;
|
|
38
39
|
updated_at: string;
|
|
39
|
-
workspace_id: string;
|
|
40
40
|
}, any, any>;
|
|
41
41
|
get(agentId: AgentId | string): Promise<{
|
|
42
|
-
created_at: string;
|
|
43
|
-
description: string;
|
|
44
42
|
id: string;
|
|
45
|
-
|
|
43
|
+
workspace_id: string;
|
|
46
44
|
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
latest_version?: number | undefined;
|
|
47
|
+
created_at: string;
|
|
47
48
|
updated_at: string;
|
|
48
|
-
workspace_id: string;
|
|
49
49
|
} & import("../index.js").ResponseMetadata>;
|
|
50
50
|
update(agentId: AgentId | string, body: components['schemas']['UpdateAgentRequest']): Promise<{
|
|
51
|
-
created_at: string;
|
|
52
|
-
description: string;
|
|
53
51
|
id: string;
|
|
54
|
-
|
|
52
|
+
workspace_id: string;
|
|
55
53
|
name: string;
|
|
54
|
+
description: string;
|
|
55
|
+
latest_version?: number | undefined;
|
|
56
|
+
created_at: string;
|
|
56
57
|
updated_at: string;
|
|
57
|
-
workspace_id: string;
|
|
58
58
|
} & import("../index.js").ResponseMetadata>;
|
|
59
59
|
delete(agentId: AgentId | string): Promise<void>;
|
|
60
60
|
listVersions(agentId: AgentId | string, params?: ListParams): Promise<{
|
|
61
|
-
continuation_token?: number | null | undefined;
|
|
62
|
-
has_more: boolean;
|
|
63
61
|
items: {
|
|
64
|
-
agent_id: string;
|
|
65
|
-
background: string;
|
|
66
|
-
behaviors: string[];
|
|
67
|
-
communication_patterns: string[];
|
|
68
|
-
created_at: string;
|
|
69
62
|
id: string;
|
|
63
|
+
workspace_id: string;
|
|
64
|
+
agent_id: string;
|
|
65
|
+
version: number;
|
|
66
|
+
name: string;
|
|
67
|
+
initials: string;
|
|
70
68
|
identity: {
|
|
71
|
-
default_spoken_language: string;
|
|
72
|
-
developed_by: string;
|
|
73
69
|
name: string;
|
|
70
|
+
role: string;
|
|
71
|
+
developed_by: string;
|
|
72
|
+
default_spoken_language: string;
|
|
74
73
|
relationship_to_developer?: {
|
|
75
|
-
conversation_visibility: string;
|
|
76
74
|
ownership: string;
|
|
77
|
-
thought_visibility: string;
|
|
78
75
|
type: string;
|
|
76
|
+
conversation_visibility: string;
|
|
77
|
+
thought_visibility: string;
|
|
79
78
|
} | undefined;
|
|
80
|
-
role: string;
|
|
81
79
|
};
|
|
82
|
-
initials: string;
|
|
83
|
-
name: string;
|
|
84
|
-
updated_at: string;
|
|
85
|
-
version: number;
|
|
86
80
|
voice_config: {
|
|
87
|
-
|
|
81
|
+
voice_id: string;
|
|
88
82
|
stability?: number | undefined;
|
|
83
|
+
similarity_boost?: number | undefined;
|
|
89
84
|
style?: number | undefined;
|
|
90
|
-
voice_id: string;
|
|
91
85
|
} | null;
|
|
92
|
-
|
|
86
|
+
background: string;
|
|
87
|
+
behaviors: string[];
|
|
88
|
+
communication_patterns: string[];
|
|
89
|
+
created_at: string;
|
|
90
|
+
updated_at: string;
|
|
93
91
|
}[];
|
|
92
|
+
has_more: boolean;
|
|
93
|
+
continuation_token?: number | null | undefined;
|
|
94
94
|
total?: number | null | undefined;
|
|
95
95
|
} & import("../index.js").ResponseMetadata>;
|
|
96
96
|
listVersionsAutoPaging(agentId: AgentId | string, params?: ListParams): AsyncGenerator<{
|
|
97
|
-
agent_id: string;
|
|
98
|
-
background: string;
|
|
99
|
-
behaviors: string[];
|
|
100
|
-
communication_patterns: string[];
|
|
101
|
-
created_at: string;
|
|
102
97
|
id: string;
|
|
98
|
+
workspace_id: string;
|
|
99
|
+
agent_id: string;
|
|
100
|
+
version: number;
|
|
101
|
+
name: string;
|
|
102
|
+
initials: string;
|
|
103
103
|
identity: {
|
|
104
|
-
default_spoken_language: string;
|
|
105
|
-
developed_by: string;
|
|
106
104
|
name: string;
|
|
105
|
+
role: string;
|
|
106
|
+
developed_by: string;
|
|
107
|
+
default_spoken_language: string;
|
|
107
108
|
relationship_to_developer?: {
|
|
108
|
-
conversation_visibility: string;
|
|
109
109
|
ownership: string;
|
|
110
|
-
thought_visibility: string;
|
|
111
110
|
type: string;
|
|
111
|
+
conversation_visibility: string;
|
|
112
|
+
thought_visibility: string;
|
|
112
113
|
} | undefined;
|
|
113
|
-
role: string;
|
|
114
114
|
};
|
|
115
|
-
initials: string;
|
|
116
|
-
name: string;
|
|
117
|
-
updated_at: string;
|
|
118
|
-
version: number;
|
|
119
115
|
voice_config: {
|
|
120
|
-
|
|
116
|
+
voice_id: string;
|
|
121
117
|
stability?: number | undefined;
|
|
118
|
+
similarity_boost?: number | undefined;
|
|
122
119
|
style?: number | undefined;
|
|
123
|
-
voice_id: string;
|
|
124
120
|
} | null;
|
|
125
|
-
workspace_id: string;
|
|
126
|
-
}, any, any>;
|
|
127
|
-
getVersion(agentId: AgentId | string, version: number | 'latest'): Promise<{
|
|
128
|
-
agent_id: string;
|
|
129
121
|
background: string;
|
|
130
122
|
behaviors: string[];
|
|
131
123
|
communication_patterns: string[];
|
|
132
124
|
created_at: string;
|
|
125
|
+
updated_at: string;
|
|
126
|
+
}, any, any>;
|
|
127
|
+
getVersion(agentId: AgentId | string, version: number | 'latest'): Promise<{
|
|
133
128
|
id: string;
|
|
129
|
+
workspace_id: string;
|
|
130
|
+
agent_id: string;
|
|
131
|
+
version: number;
|
|
132
|
+
name: string;
|
|
133
|
+
initials: string;
|
|
134
134
|
identity: {
|
|
135
|
-
default_spoken_language: string;
|
|
136
|
-
developed_by: string;
|
|
137
135
|
name: string;
|
|
136
|
+
role: string;
|
|
137
|
+
developed_by: string;
|
|
138
|
+
default_spoken_language: string;
|
|
138
139
|
relationship_to_developer?: {
|
|
139
|
-
conversation_visibility: string;
|
|
140
140
|
ownership: string;
|
|
141
|
-
thought_visibility: string;
|
|
142
141
|
type: string;
|
|
142
|
+
conversation_visibility: string;
|
|
143
|
+
thought_visibility: string;
|
|
143
144
|
} | undefined;
|
|
144
|
-
role: string;
|
|
145
145
|
};
|
|
146
|
-
initials: string;
|
|
147
|
-
name: string;
|
|
148
|
-
updated_at: string;
|
|
149
|
-
version: number;
|
|
150
146
|
voice_config: {
|
|
151
|
-
|
|
147
|
+
voice_id: string;
|
|
152
148
|
stability?: number | undefined;
|
|
149
|
+
similarity_boost?: number | undefined;
|
|
153
150
|
style?: number | undefined;
|
|
154
|
-
voice_id: string;
|
|
155
151
|
} | null;
|
|
156
|
-
workspace_id: string;
|
|
157
|
-
} & import("../index.js").ResponseMetadata>;
|
|
158
|
-
createVersion(agentId: AgentId | string, body: components['schemas']['CreateAgentVersionRequest']): Promise<{
|
|
159
|
-
agent_id: string;
|
|
160
152
|
background: string;
|
|
161
153
|
behaviors: string[];
|
|
162
154
|
communication_patterns: string[];
|
|
163
155
|
created_at: string;
|
|
156
|
+
updated_at: string;
|
|
157
|
+
} & import("../index.js").ResponseMetadata>;
|
|
158
|
+
createVersion(agentId: AgentId | string, body: components['schemas']['CreateAgentVersionRequest']): Promise<{
|
|
164
159
|
id: string;
|
|
160
|
+
workspace_id: string;
|
|
161
|
+
agent_id: string;
|
|
162
|
+
version: number;
|
|
163
|
+
name: string;
|
|
164
|
+
initials: string;
|
|
165
165
|
identity: {
|
|
166
|
-
default_spoken_language: string;
|
|
167
|
-
developed_by: string;
|
|
168
166
|
name: string;
|
|
167
|
+
role: string;
|
|
168
|
+
developed_by: string;
|
|
169
|
+
default_spoken_language: string;
|
|
169
170
|
relationship_to_developer?: {
|
|
170
|
-
conversation_visibility: string;
|
|
171
171
|
ownership: string;
|
|
172
|
-
thought_visibility: string;
|
|
173
172
|
type: string;
|
|
173
|
+
conversation_visibility: string;
|
|
174
|
+
thought_visibility: string;
|
|
174
175
|
} | undefined;
|
|
175
|
-
role: string;
|
|
176
176
|
};
|
|
177
|
-
initials: string;
|
|
178
|
-
name: string;
|
|
179
|
-
updated_at: string;
|
|
180
|
-
version: number;
|
|
181
177
|
voice_config: {
|
|
182
|
-
|
|
178
|
+
voice_id: string;
|
|
183
179
|
stability?: number | undefined;
|
|
180
|
+
similarity_boost?: number | undefined;
|
|
184
181
|
style?: number | undefined;
|
|
185
|
-
voice_id: string;
|
|
186
182
|
} | null;
|
|
187
|
-
|
|
183
|
+
background: string;
|
|
184
|
+
behaviors: string[];
|
|
185
|
+
communication_patterns: string[];
|
|
186
|
+
created_at: string;
|
|
187
|
+
updated_at: string;
|
|
188
188
|
} & import("../index.js").ResponseMetadata>;
|
|
189
189
|
}
|
|
190
190
|
//# sourceMappingURL=agents.d.ts.map
|
|
@@ -17,17 +17,17 @@ export declare class AnalyticsResource extends WorkspaceScopedResource {
|
|
|
17
17
|
interval?: '1h' | '1d' | '1w';
|
|
18
18
|
service_id?: string | null;
|
|
19
19
|
}): Promise<{
|
|
20
|
+
workspace_id: string;
|
|
21
|
+
period_start: string;
|
|
22
|
+
period_end: string;
|
|
23
|
+
total_calls: number;
|
|
24
|
+
total_duration_seconds: number;
|
|
20
25
|
avg_duration_seconds: number;
|
|
21
26
|
calls_by_date: {
|
|
22
|
-
avg_duration_seconds?: number | null | undefined;
|
|
23
|
-
count: number;
|
|
24
27
|
date: string;
|
|
28
|
+
count: number;
|
|
29
|
+
avg_duration_seconds?: number | null | undefined;
|
|
25
30
|
}[];
|
|
26
|
-
period_end: string;
|
|
27
|
-
period_start: string;
|
|
28
|
-
total_calls: number;
|
|
29
|
-
total_duration_seconds: number;
|
|
30
|
-
workspace_id: string;
|
|
31
31
|
} & import("../index.js").ResponseMetadata>;
|
|
32
32
|
/** Per-agent performance breakdown */
|
|
33
33
|
getAgents(params?: {
|
|
@@ -36,10 +36,10 @@ export declare class AnalyticsResource extends WorkspaceScopedResource {
|
|
|
36
36
|
agents: {
|
|
37
37
|
agent_id: string;
|
|
38
38
|
agent_name: string;
|
|
39
|
-
|
|
39
|
+
total_calls: number;
|
|
40
40
|
completed_calls: number;
|
|
41
|
+
avg_duration_seconds: number;
|
|
41
42
|
completion_rate: number;
|
|
42
|
-
total_calls: number;
|
|
43
43
|
}[];
|
|
44
44
|
period?: string | null | undefined;
|
|
45
45
|
} & import("../index.js").ResponseMetadata>;
|
|
@@ -83,18 +83,19 @@ export declare class AnalyticsResource extends WorkspaceScopedResource {
|
|
|
83
83
|
getDataQuality(params?: {
|
|
84
84
|
days?: number;
|
|
85
85
|
}): Promise<{
|
|
86
|
+
workspace_id: string;
|
|
87
|
+
period_start: string;
|
|
88
|
+
period_end: string;
|
|
89
|
+
confidence_distribution: {
|
|
90
|
+
confidence_range: string;
|
|
91
|
+
count: number;
|
|
92
|
+
}[];
|
|
86
93
|
confidence_by_source: {
|
|
87
94
|
[x: string]: {
|
|
88
95
|
confidence_range: string;
|
|
89
96
|
count: number;
|
|
90
97
|
}[];
|
|
91
98
|
};
|
|
92
|
-
confidence_distribution: {
|
|
93
|
-
confidence_range: string;
|
|
94
|
-
count: number;
|
|
95
|
-
}[];
|
|
96
|
-
period_end: string;
|
|
97
|
-
period_start: string;
|
|
98
99
|
review_pipeline: {
|
|
99
100
|
[x: string]: unknown;
|
|
100
101
|
};
|
|
@@ -102,7 +103,6 @@ export declare class AnalyticsResource extends WorkspaceScopedResource {
|
|
|
102
103
|
[x: string]: unknown;
|
|
103
104
|
}[];
|
|
104
105
|
total_events: number;
|
|
105
|
-
workspace_id: string;
|
|
106
106
|
} & import("../index.js").ResponseMetadata>;
|
|
107
107
|
/** Usage summary — API requests, call minutes, storage */
|
|
108
108
|
getUsage(params?: {
|
|
@@ -113,34 +113,34 @@ export declare class AnalyticsResource extends WorkspaceScopedResource {
|
|
|
113
113
|
service_id?: string | null;
|
|
114
114
|
direction?: string | null;
|
|
115
115
|
}): Promise<{
|
|
116
|
+
workspace_id: string;
|
|
117
|
+
period_start: string;
|
|
118
|
+
period_end: string;
|
|
116
119
|
buckets: {
|
|
117
|
-
avg_duration_seconds?: number | null | undefined;
|
|
118
|
-
count: number;
|
|
119
|
-
event_date: string;
|
|
120
120
|
event_type: string;
|
|
121
|
+
event_date: string;
|
|
122
|
+
count: number;
|
|
123
|
+
avg_duration_seconds?: number | null | undefined;
|
|
121
124
|
total_duration_seconds?: number | null | undefined;
|
|
122
125
|
}[];
|
|
123
|
-
period_end: string;
|
|
124
|
-
period_start: string;
|
|
125
126
|
total_events: number;
|
|
126
|
-
workspace_id: string;
|
|
127
127
|
} & import("../index.js").ResponseMetadata>;
|
|
128
128
|
/** Event type breakdown — counts and trends per event type */
|
|
129
129
|
getEventBreakdown(params?: {
|
|
130
130
|
days?: number;
|
|
131
131
|
}): Promise<{
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}[];
|
|
132
|
+
workspace_id: string;
|
|
133
|
+
period_start: string;
|
|
134
|
+
period_end: string;
|
|
136
135
|
by_type: {
|
|
136
|
+
key: string;
|
|
137
137
|
count: number;
|
|
138
|
+
}[];
|
|
139
|
+
by_source: {
|
|
138
140
|
key: string;
|
|
141
|
+
count: number;
|
|
139
142
|
}[];
|
|
140
|
-
period_end: string;
|
|
141
|
-
period_start: string;
|
|
142
143
|
total_events: number;
|
|
143
|
-
workspace_id: string;
|
|
144
144
|
} & import("../index.js").ResponseMetadata>;
|
|
145
145
|
/** Safety and escalation trends — risk distribution and time-series data */
|
|
146
146
|
getSafetyTrends(params?: {
|
|
@@ -150,21 +150,21 @@ export declare class AnalyticsResource extends WorkspaceScopedResource {
|
|
|
150
150
|
interval?: '1h' | '1d' | '1w';
|
|
151
151
|
service_id?: string | null;
|
|
152
152
|
}): Promise<{
|
|
153
|
-
risk_distribution: {
|
|
154
|
-
[x: string]: number;
|
|
155
|
-
};
|
|
156
153
|
summary: {
|
|
157
|
-
escalation_rate: number;
|
|
158
154
|
total_calls: number;
|
|
159
155
|
total_escalations: number;
|
|
156
|
+
escalation_rate: number;
|
|
160
157
|
total_safety_flagged: number;
|
|
161
158
|
total_safety_matches: number;
|
|
162
159
|
};
|
|
160
|
+
risk_distribution: {
|
|
161
|
+
[x: string]: number;
|
|
162
|
+
};
|
|
163
163
|
trend: {
|
|
164
164
|
date: string;
|
|
165
|
+
total_calls: number;
|
|
165
166
|
escalated_count: number;
|
|
166
167
|
safety_flagged: number;
|
|
167
|
-
total_calls: number;
|
|
168
168
|
}[];
|
|
169
169
|
} & import("../index.js").ResponseMetadata>;
|
|
170
170
|
/** Operator escalation performance and quality comparison */
|
|
@@ -176,18 +176,18 @@ export declare class AnalyticsResource extends WorkspaceScopedResource {
|
|
|
176
176
|
service_id?: string | null;
|
|
177
177
|
}): Promise<{
|
|
178
178
|
summary: {
|
|
179
|
-
|
|
180
|
-
avg_escalated_quality_score?: number | null | undefined;
|
|
181
|
-
avg_non_escalated_quality_score?: number | null | undefined;
|
|
179
|
+
total_calls: number;
|
|
182
180
|
escalated_count: number;
|
|
183
181
|
escalation_rate: number;
|
|
184
182
|
operator_handled_count: number;
|
|
185
|
-
|
|
183
|
+
avg_escalated_duration_seconds?: number | null | undefined;
|
|
184
|
+
avg_escalated_quality_score?: number | null | undefined;
|
|
185
|
+
avg_non_escalated_quality_score?: number | null | undefined;
|
|
186
186
|
};
|
|
187
187
|
trend: {
|
|
188
188
|
date: string;
|
|
189
|
-
escalated_count: number;
|
|
190
189
|
total_calls: number;
|
|
190
|
+
escalated_count: number;
|
|
191
191
|
}[];
|
|
192
192
|
} & import("../index.js").ResponseMetadata>;
|
|
193
193
|
/** Advanced call statistics (abandonment, transfers, silence, hour-of-day) */
|
|
@@ -14,73 +14,73 @@ export declare class ApiKeysResource extends WorkspaceScopedResource {
|
|
|
14
14
|
* Does not require a workspace ID in the path.
|
|
15
15
|
*/
|
|
16
16
|
me(): Promise<{
|
|
17
|
-
|
|
18
|
-
expires_in_seconds: number;
|
|
17
|
+
workspace_id: string;
|
|
19
18
|
key_id: string;
|
|
20
19
|
name: string | null;
|
|
21
|
-
|
|
20
|
+
expires_at: string;
|
|
21
|
+
expires_in_seconds: number;
|
|
22
22
|
} & import("../index.js").ResponseMetadata>;
|
|
23
23
|
/** Create a new API key */
|
|
24
24
|
create(body: components['schemas']['CreateApiKeyRequest']): Promise<{
|
|
25
|
-
api_key: string;
|
|
26
|
-
created_by_credential_id: string | null;
|
|
27
|
-
created_by_entity_id: string | null;
|
|
28
|
-
expires_at: string;
|
|
29
25
|
key_id: string;
|
|
26
|
+
api_key: string;
|
|
30
27
|
name: string | null;
|
|
31
|
-
permissions: string[];
|
|
32
28
|
role: string;
|
|
29
|
+
permissions: string[];
|
|
30
|
+
expires_at: string;
|
|
31
|
+
created_by_entity_id: string | null;
|
|
32
|
+
created_by_credential_id: string | null;
|
|
33
33
|
} & import("../index.js").ResponseMetadata>;
|
|
34
34
|
/** List API keys in the workspace */
|
|
35
35
|
list(params?: ListParams & {
|
|
36
36
|
mine_only?: boolean;
|
|
37
37
|
}): Promise<{
|
|
38
|
-
continuation_token?: number | null | undefined;
|
|
39
|
-
has_more: boolean;
|
|
40
38
|
items: {
|
|
41
|
-
created_at: string;
|
|
42
|
-
created_by_credential_id: string | null;
|
|
43
|
-
created_by_entity_id: string | null;
|
|
44
|
-
expires_at: string;
|
|
45
39
|
id: string;
|
|
40
|
+
workspace_id: string;
|
|
41
|
+
created_by_entity_id: string | null;
|
|
42
|
+
created_by_credential_id: string | null;
|
|
46
43
|
key_id: string;
|
|
47
|
-
last_used_at: string | null;
|
|
48
44
|
name: string | null;
|
|
49
|
-
permissions: string[];
|
|
50
45
|
role: string;
|
|
46
|
+
permissions: string[];
|
|
47
|
+
expires_at: string;
|
|
48
|
+
last_used_at: string | null;
|
|
49
|
+
created_at: string;
|
|
51
50
|
updated_at: string;
|
|
52
|
-
workspace_id: string;
|
|
53
51
|
}[];
|
|
52
|
+
has_more: boolean;
|
|
53
|
+
continuation_token?: number | null | undefined;
|
|
54
54
|
total?: number | null | undefined;
|
|
55
55
|
} & import("../index.js").ResponseMetadata>;
|
|
56
56
|
listAutoPaging(params?: ListParams & {
|
|
57
57
|
mine_only?: boolean;
|
|
58
58
|
}): AsyncGenerator<{
|
|
59
|
-
created_at: string;
|
|
60
|
-
created_by_credential_id: string | null;
|
|
61
|
-
created_by_entity_id: string | null;
|
|
62
|
-
expires_at: string;
|
|
63
59
|
id: string;
|
|
60
|
+
workspace_id: string;
|
|
61
|
+
created_by_entity_id: string | null;
|
|
62
|
+
created_by_credential_id: string | null;
|
|
64
63
|
key_id: string;
|
|
65
|
-
last_used_at: string | null;
|
|
66
64
|
name: string | null;
|
|
67
|
-
permissions: string[];
|
|
68
65
|
role: string;
|
|
66
|
+
permissions: string[];
|
|
67
|
+
expires_at: string;
|
|
68
|
+
last_used_at: string | null;
|
|
69
|
+
created_at: string;
|
|
69
70
|
updated_at: string;
|
|
70
|
-
workspace_id: string;
|
|
71
71
|
}, any, any>;
|
|
72
72
|
/** Revoke an API key */
|
|
73
73
|
revoke(keyId: ApiKeyId | string): Promise<void>;
|
|
74
74
|
/** Rotate an API key — invalidates the old key and issues a new one */
|
|
75
75
|
rotate(keyId: ApiKeyId | string, body: components['schemas']['RotateApiKeyRequest']): Promise<{
|
|
76
|
-
api_key: string;
|
|
77
|
-
created_by_credential_id: string | null;
|
|
78
|
-
created_by_entity_id: string | null;
|
|
79
|
-
expires_at: string;
|
|
80
76
|
key_id: string;
|
|
77
|
+
api_key: string;
|
|
81
78
|
name: string | null;
|
|
82
|
-
permissions: string[];
|
|
83
79
|
role: string;
|
|
80
|
+
permissions: string[];
|
|
81
|
+
expires_at: string;
|
|
82
|
+
created_by_entity_id: string | null;
|
|
83
|
+
created_by_credential_id: string | null;
|
|
84
84
|
} & import("../index.js").ResponseMetadata>;
|
|
85
85
|
}
|
|
86
86
|
//# sourceMappingURL=api-keys.d.ts.map
|