@miradorlabs/web-grpc 3.42.0 → 3.44.0
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.
|
@@ -21,6 +21,12 @@ export enum ClaudeEnterpriseCapability {
|
|
|
21
21
|
CLAUDE_ENTERPRISE_CAPABILITY_USAGE_REPORTS = 1,
|
|
22
22
|
/** CLAUDE_ENTERPRISE_CAPABILITY_MEMBER_DIRECTORY - The member directory. Anthropic: read:members or read:org_audit. */
|
|
23
23
|
CLAUDE_ENTERPRISE_CAPABILITY_MEMBER_DIRECTORY = 2,
|
|
24
|
+
/** CLAUDE_ENTERPRISE_CAPABILITY_ACTIVITY_FEED - The compliance activity feed. Anthropic: read:compliance_activities. */
|
|
25
|
+
CLAUDE_ENTERPRISE_CAPABILITY_ACTIVITY_FEED = 3,
|
|
26
|
+
/** CLAUDE_ENTERPRISE_CAPABILITY_ORG_DATA - Organizations, roles, groups and settings. Anthropic: read:compliance_org_data. */
|
|
27
|
+
CLAUDE_ENTERPRISE_CAPABILITY_ORG_DATA = 4,
|
|
28
|
+
/** CLAUDE_ENTERPRISE_CAPABILITY_USER_CONTENT - Chats, files, projects, session transcripts and organization users. Anthropic: read:compliance_user_data. */
|
|
29
|
+
CLAUDE_ENTERPRISE_CAPABILITY_USER_CONTENT = 5,
|
|
24
30
|
UNRECOGNIZED = -1,
|
|
25
31
|
}
|
|
26
32
|
|
|
@@ -35,6 +41,15 @@ export function claudeEnterpriseCapabilityFromJSON(object: any): ClaudeEnterpris
|
|
|
35
41
|
case 2:
|
|
36
42
|
case "CLAUDE_ENTERPRISE_CAPABILITY_MEMBER_DIRECTORY":
|
|
37
43
|
return ClaudeEnterpriseCapability.CLAUDE_ENTERPRISE_CAPABILITY_MEMBER_DIRECTORY;
|
|
44
|
+
case 3:
|
|
45
|
+
case "CLAUDE_ENTERPRISE_CAPABILITY_ACTIVITY_FEED":
|
|
46
|
+
return ClaudeEnterpriseCapability.CLAUDE_ENTERPRISE_CAPABILITY_ACTIVITY_FEED;
|
|
47
|
+
case 4:
|
|
48
|
+
case "CLAUDE_ENTERPRISE_CAPABILITY_ORG_DATA":
|
|
49
|
+
return ClaudeEnterpriseCapability.CLAUDE_ENTERPRISE_CAPABILITY_ORG_DATA;
|
|
50
|
+
case 5:
|
|
51
|
+
case "CLAUDE_ENTERPRISE_CAPABILITY_USER_CONTENT":
|
|
52
|
+
return ClaudeEnterpriseCapability.CLAUDE_ENTERPRISE_CAPABILITY_USER_CONTENT;
|
|
38
53
|
case -1:
|
|
39
54
|
case "UNRECOGNIZED":
|
|
40
55
|
default:
|
|
@@ -50,6 +65,12 @@ export function claudeEnterpriseCapabilityToJSON(object: ClaudeEnterpriseCapabil
|
|
|
50
65
|
return "CLAUDE_ENTERPRISE_CAPABILITY_USAGE_REPORTS";
|
|
51
66
|
case ClaudeEnterpriseCapability.CLAUDE_ENTERPRISE_CAPABILITY_MEMBER_DIRECTORY:
|
|
52
67
|
return "CLAUDE_ENTERPRISE_CAPABILITY_MEMBER_DIRECTORY";
|
|
68
|
+
case ClaudeEnterpriseCapability.CLAUDE_ENTERPRISE_CAPABILITY_ACTIVITY_FEED:
|
|
69
|
+
return "CLAUDE_ENTERPRISE_CAPABILITY_ACTIVITY_FEED";
|
|
70
|
+
case ClaudeEnterpriseCapability.CLAUDE_ENTERPRISE_CAPABILITY_ORG_DATA:
|
|
71
|
+
return "CLAUDE_ENTERPRISE_CAPABILITY_ORG_DATA";
|
|
72
|
+
case ClaudeEnterpriseCapability.CLAUDE_ENTERPRISE_CAPABILITY_USER_CONTENT:
|
|
73
|
+
return "CLAUDE_ENTERPRISE_CAPABILITY_USER_CONTENT";
|
|
53
74
|
case ClaudeEnterpriseCapability.UNRECOGNIZED:
|
|
54
75
|
default:
|
|
55
76
|
return "UNRECOGNIZED";
|
|
@@ -98,6 +119,233 @@ export function claudeEnterpriseBillingModelToJSON(object: ClaudeEnterpriseBilli
|
|
|
98
119
|
}
|
|
99
120
|
}
|
|
100
121
|
|
|
122
|
+
export enum ClaudeEnterpriseBilledUsageDimension {
|
|
123
|
+
CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_UNSPECIFIED = 0,
|
|
124
|
+
CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_DAY = 1,
|
|
125
|
+
CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_PRODUCT = 2,
|
|
126
|
+
CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_MODEL = 3,
|
|
127
|
+
CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_USER = 4,
|
|
128
|
+
UNRECOGNIZED = -1,
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function claudeEnterpriseBilledUsageDimensionFromJSON(object: any): ClaudeEnterpriseBilledUsageDimension {
|
|
132
|
+
switch (object) {
|
|
133
|
+
case 0:
|
|
134
|
+
case "CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_UNSPECIFIED":
|
|
135
|
+
return ClaudeEnterpriseBilledUsageDimension.CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_UNSPECIFIED;
|
|
136
|
+
case 1:
|
|
137
|
+
case "CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_DAY":
|
|
138
|
+
return ClaudeEnterpriseBilledUsageDimension.CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_DAY;
|
|
139
|
+
case 2:
|
|
140
|
+
case "CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_PRODUCT":
|
|
141
|
+
return ClaudeEnterpriseBilledUsageDimension.CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_PRODUCT;
|
|
142
|
+
case 3:
|
|
143
|
+
case "CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_MODEL":
|
|
144
|
+
return ClaudeEnterpriseBilledUsageDimension.CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_MODEL;
|
|
145
|
+
case 4:
|
|
146
|
+
case "CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_USER":
|
|
147
|
+
return ClaudeEnterpriseBilledUsageDimension.CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_USER;
|
|
148
|
+
case -1:
|
|
149
|
+
case "UNRECOGNIZED":
|
|
150
|
+
default:
|
|
151
|
+
return ClaudeEnterpriseBilledUsageDimension.UNRECOGNIZED;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function claudeEnterpriseBilledUsageDimensionToJSON(object: ClaudeEnterpriseBilledUsageDimension): string {
|
|
156
|
+
switch (object) {
|
|
157
|
+
case ClaudeEnterpriseBilledUsageDimension.CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_UNSPECIFIED:
|
|
158
|
+
return "CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_UNSPECIFIED";
|
|
159
|
+
case ClaudeEnterpriseBilledUsageDimension.CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_DAY:
|
|
160
|
+
return "CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_DAY";
|
|
161
|
+
case ClaudeEnterpriseBilledUsageDimension.CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_PRODUCT:
|
|
162
|
+
return "CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_PRODUCT";
|
|
163
|
+
case ClaudeEnterpriseBilledUsageDimension.CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_MODEL:
|
|
164
|
+
return "CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_MODEL";
|
|
165
|
+
case ClaudeEnterpriseBilledUsageDimension.CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_USER:
|
|
166
|
+
return "CLAUDE_ENTERPRISE_BILLED_USAGE_DIMENSION_USER";
|
|
167
|
+
case ClaudeEnterpriseBilledUsageDimension.UNRECOGNIZED:
|
|
168
|
+
default:
|
|
169
|
+
return "UNRECOGNIZED";
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export enum ClaudeEnterpriseBilledUsageSort {
|
|
174
|
+
/** CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_UNSPECIFIED - Unspecified is KEY_ASC. */
|
|
175
|
+
CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_UNSPECIFIED = 0,
|
|
176
|
+
CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_KEY_ASC = 1,
|
|
177
|
+
/** CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_AMOUNT_DESC - Highest Net first, ties by key. */
|
|
178
|
+
CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_AMOUNT_DESC = 2,
|
|
179
|
+
/** CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_LIST_AMOUNT_DESC - Highest Notional (list price) first, ties by key. */
|
|
180
|
+
CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_LIST_AMOUNT_DESC = 3,
|
|
181
|
+
/** CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_TOKENS_DESC - Most tokens (uncached input, cache and output) first, ties by key. */
|
|
182
|
+
CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_TOKENS_DESC = 4,
|
|
183
|
+
UNRECOGNIZED = -1,
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function claudeEnterpriseBilledUsageSortFromJSON(object: any): ClaudeEnterpriseBilledUsageSort {
|
|
187
|
+
switch (object) {
|
|
188
|
+
case 0:
|
|
189
|
+
case "CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_UNSPECIFIED":
|
|
190
|
+
return ClaudeEnterpriseBilledUsageSort.CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_UNSPECIFIED;
|
|
191
|
+
case 1:
|
|
192
|
+
case "CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_KEY_ASC":
|
|
193
|
+
return ClaudeEnterpriseBilledUsageSort.CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_KEY_ASC;
|
|
194
|
+
case 2:
|
|
195
|
+
case "CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_AMOUNT_DESC":
|
|
196
|
+
return ClaudeEnterpriseBilledUsageSort.CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_AMOUNT_DESC;
|
|
197
|
+
case 3:
|
|
198
|
+
case "CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_LIST_AMOUNT_DESC":
|
|
199
|
+
return ClaudeEnterpriseBilledUsageSort.CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_LIST_AMOUNT_DESC;
|
|
200
|
+
case 4:
|
|
201
|
+
case "CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_TOKENS_DESC":
|
|
202
|
+
return ClaudeEnterpriseBilledUsageSort.CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_TOKENS_DESC;
|
|
203
|
+
case -1:
|
|
204
|
+
case "UNRECOGNIZED":
|
|
205
|
+
default:
|
|
206
|
+
return ClaudeEnterpriseBilledUsageSort.UNRECOGNIZED;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function claudeEnterpriseBilledUsageSortToJSON(object: ClaudeEnterpriseBilledUsageSort): string {
|
|
211
|
+
switch (object) {
|
|
212
|
+
case ClaudeEnterpriseBilledUsageSort.CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_UNSPECIFIED:
|
|
213
|
+
return "CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_UNSPECIFIED";
|
|
214
|
+
case ClaudeEnterpriseBilledUsageSort.CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_KEY_ASC:
|
|
215
|
+
return "CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_KEY_ASC";
|
|
216
|
+
case ClaudeEnterpriseBilledUsageSort.CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_AMOUNT_DESC:
|
|
217
|
+
return "CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_AMOUNT_DESC";
|
|
218
|
+
case ClaudeEnterpriseBilledUsageSort.CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_LIST_AMOUNT_DESC:
|
|
219
|
+
return "CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_LIST_AMOUNT_DESC";
|
|
220
|
+
case ClaudeEnterpriseBilledUsageSort.CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_TOKENS_DESC:
|
|
221
|
+
return "CLAUDE_ENTERPRISE_BILLED_USAGE_SORT_TOKENS_DESC";
|
|
222
|
+
case ClaudeEnterpriseBilledUsageSort.UNRECOGNIZED:
|
|
223
|
+
default:
|
|
224
|
+
return "UNRECOGNIZED";
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export enum ClaudeEnterpriseMemberSort {
|
|
229
|
+
/** CLAUDE_ENTERPRISE_MEMBER_SORT_UNSPECIFIED - Unspecified is EMAIL_ASC. */
|
|
230
|
+
CLAUDE_ENTERPRISE_MEMBER_SORT_UNSPECIFIED = 0,
|
|
231
|
+
CLAUDE_ENTERPRISE_MEMBER_SORT_EMAIL_ASC = 1,
|
|
232
|
+
/** CLAUDE_ENTERPRISE_MEMBER_SORT_LAST_ACTIVITY_ASC - Longest idle first (no activity first), ties by email then id. */
|
|
233
|
+
CLAUDE_ENTERPRISE_MEMBER_SORT_LAST_ACTIVITY_ASC = 2,
|
|
234
|
+
UNRECOGNIZED = -1,
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export function claudeEnterpriseMemberSortFromJSON(object: any): ClaudeEnterpriseMemberSort {
|
|
238
|
+
switch (object) {
|
|
239
|
+
case 0:
|
|
240
|
+
case "CLAUDE_ENTERPRISE_MEMBER_SORT_UNSPECIFIED":
|
|
241
|
+
return ClaudeEnterpriseMemberSort.CLAUDE_ENTERPRISE_MEMBER_SORT_UNSPECIFIED;
|
|
242
|
+
case 1:
|
|
243
|
+
case "CLAUDE_ENTERPRISE_MEMBER_SORT_EMAIL_ASC":
|
|
244
|
+
return ClaudeEnterpriseMemberSort.CLAUDE_ENTERPRISE_MEMBER_SORT_EMAIL_ASC;
|
|
245
|
+
case 2:
|
|
246
|
+
case "CLAUDE_ENTERPRISE_MEMBER_SORT_LAST_ACTIVITY_ASC":
|
|
247
|
+
return ClaudeEnterpriseMemberSort.CLAUDE_ENTERPRISE_MEMBER_SORT_LAST_ACTIVITY_ASC;
|
|
248
|
+
case -1:
|
|
249
|
+
case "UNRECOGNIZED":
|
|
250
|
+
default:
|
|
251
|
+
return ClaudeEnterpriseMemberSort.UNRECOGNIZED;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export function claudeEnterpriseMemberSortToJSON(object: ClaudeEnterpriseMemberSort): string {
|
|
256
|
+
switch (object) {
|
|
257
|
+
case ClaudeEnterpriseMemberSort.CLAUDE_ENTERPRISE_MEMBER_SORT_UNSPECIFIED:
|
|
258
|
+
return "CLAUDE_ENTERPRISE_MEMBER_SORT_UNSPECIFIED";
|
|
259
|
+
case ClaudeEnterpriseMemberSort.CLAUDE_ENTERPRISE_MEMBER_SORT_EMAIL_ASC:
|
|
260
|
+
return "CLAUDE_ENTERPRISE_MEMBER_SORT_EMAIL_ASC";
|
|
261
|
+
case ClaudeEnterpriseMemberSort.CLAUDE_ENTERPRISE_MEMBER_SORT_LAST_ACTIVITY_ASC:
|
|
262
|
+
return "CLAUDE_ENTERPRISE_MEMBER_SORT_LAST_ACTIVITY_ASC";
|
|
263
|
+
case ClaudeEnterpriseMemberSort.UNRECOGNIZED:
|
|
264
|
+
default:
|
|
265
|
+
return "UNRECOGNIZED";
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/** Why the last pull failed. Unspecified when it succeeded, or before any pull. */
|
|
270
|
+
export enum ClaudeEnterprisePullError {
|
|
271
|
+
CLAUDE_ENTERPRISE_PULL_ERROR_UNSPECIFIED = 0,
|
|
272
|
+
/** CLAUDE_ENTERPRISE_PULL_ERROR_UNAUTHORIZED - Anthropic rejected the key: revoked, deleted or expired. A new key fixes it. */
|
|
273
|
+
CLAUDE_ENTERPRISE_PULL_ERROR_UNAUTHORIZED = 1,
|
|
274
|
+
/**
|
|
275
|
+
* CLAUDE_ENTERPRISE_PULL_ERROR_MISSING_SCOPE - No key reads what the pull reads (read:analytics), or that API was turned off. A new key or the setting
|
|
276
|
+
* fixes it.
|
|
277
|
+
*/
|
|
278
|
+
CLAUDE_ENTERPRISE_PULL_ERROR_MISSING_SCOPE = 2,
|
|
279
|
+
/** CLAUDE_ENTERPRISE_PULL_ERROR_EXPORT_CHANGED - Anthropic refreshed a report during the pull; the next pull reads it again. */
|
|
280
|
+
CLAUDE_ENTERPRISE_PULL_ERROR_EXPORT_CHANGED = 3,
|
|
281
|
+
/** CLAUDE_ENTERPRISE_PULL_ERROR_UNAVAILABLE - Anthropic was down, slow or rate limited. */
|
|
282
|
+
CLAUDE_ENTERPRISE_PULL_ERROR_UNAVAILABLE = 4,
|
|
283
|
+
/** CLAUDE_ENTERPRISE_PULL_ERROR_REJECTED - Anthropic refused a request. */
|
|
284
|
+
CLAUDE_ENTERPRISE_PULL_ERROR_REJECTED = 5,
|
|
285
|
+
/** CLAUDE_ENTERPRISE_PULL_ERROR_UNREADABLE - Anthropic sent what Terma could not use. */
|
|
286
|
+
CLAUDE_ENTERPRISE_PULL_ERROR_UNREADABLE = 6,
|
|
287
|
+
/** CLAUDE_ENTERPRISE_PULL_ERROR_INTERNAL - Terma's own failure. */
|
|
288
|
+
CLAUDE_ENTERPRISE_PULL_ERROR_INTERNAL = 7,
|
|
289
|
+
UNRECOGNIZED = -1,
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export function claudeEnterprisePullErrorFromJSON(object: any): ClaudeEnterprisePullError {
|
|
293
|
+
switch (object) {
|
|
294
|
+
case 0:
|
|
295
|
+
case "CLAUDE_ENTERPRISE_PULL_ERROR_UNSPECIFIED":
|
|
296
|
+
return ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_UNSPECIFIED;
|
|
297
|
+
case 1:
|
|
298
|
+
case "CLAUDE_ENTERPRISE_PULL_ERROR_UNAUTHORIZED":
|
|
299
|
+
return ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_UNAUTHORIZED;
|
|
300
|
+
case 2:
|
|
301
|
+
case "CLAUDE_ENTERPRISE_PULL_ERROR_MISSING_SCOPE":
|
|
302
|
+
return ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_MISSING_SCOPE;
|
|
303
|
+
case 3:
|
|
304
|
+
case "CLAUDE_ENTERPRISE_PULL_ERROR_EXPORT_CHANGED":
|
|
305
|
+
return ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_EXPORT_CHANGED;
|
|
306
|
+
case 4:
|
|
307
|
+
case "CLAUDE_ENTERPRISE_PULL_ERROR_UNAVAILABLE":
|
|
308
|
+
return ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_UNAVAILABLE;
|
|
309
|
+
case 5:
|
|
310
|
+
case "CLAUDE_ENTERPRISE_PULL_ERROR_REJECTED":
|
|
311
|
+
return ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_REJECTED;
|
|
312
|
+
case 6:
|
|
313
|
+
case "CLAUDE_ENTERPRISE_PULL_ERROR_UNREADABLE":
|
|
314
|
+
return ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_UNREADABLE;
|
|
315
|
+
case 7:
|
|
316
|
+
case "CLAUDE_ENTERPRISE_PULL_ERROR_INTERNAL":
|
|
317
|
+
return ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_INTERNAL;
|
|
318
|
+
case -1:
|
|
319
|
+
case "UNRECOGNIZED":
|
|
320
|
+
default:
|
|
321
|
+
return ClaudeEnterprisePullError.UNRECOGNIZED;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export function claudeEnterprisePullErrorToJSON(object: ClaudeEnterprisePullError): string {
|
|
326
|
+
switch (object) {
|
|
327
|
+
case ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_UNSPECIFIED:
|
|
328
|
+
return "CLAUDE_ENTERPRISE_PULL_ERROR_UNSPECIFIED";
|
|
329
|
+
case ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_UNAUTHORIZED:
|
|
330
|
+
return "CLAUDE_ENTERPRISE_PULL_ERROR_UNAUTHORIZED";
|
|
331
|
+
case ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_MISSING_SCOPE:
|
|
332
|
+
return "CLAUDE_ENTERPRISE_PULL_ERROR_MISSING_SCOPE";
|
|
333
|
+
case ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_EXPORT_CHANGED:
|
|
334
|
+
return "CLAUDE_ENTERPRISE_PULL_ERROR_EXPORT_CHANGED";
|
|
335
|
+
case ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_UNAVAILABLE:
|
|
336
|
+
return "CLAUDE_ENTERPRISE_PULL_ERROR_UNAVAILABLE";
|
|
337
|
+
case ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_REJECTED:
|
|
338
|
+
return "CLAUDE_ENTERPRISE_PULL_ERROR_REJECTED";
|
|
339
|
+
case ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_UNREADABLE:
|
|
340
|
+
return "CLAUDE_ENTERPRISE_PULL_ERROR_UNREADABLE";
|
|
341
|
+
case ClaudeEnterprisePullError.CLAUDE_ENTERPRISE_PULL_ERROR_INTERNAL:
|
|
342
|
+
return "CLAUDE_ENTERPRISE_PULL_ERROR_INTERNAL";
|
|
343
|
+
case ClaudeEnterprisePullError.UNRECOGNIZED:
|
|
344
|
+
default:
|
|
345
|
+
return "UNRECOGNIZED";
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
101
349
|
export interface GetClaudeEnterpriseConnectorRequest {
|
|
102
350
|
organizationId: string;
|
|
103
351
|
}
|
|
@@ -106,7 +354,18 @@ export interface GetClaudeEnterpriseConnectorResponse {
|
|
|
106
354
|
status: ResponseStatus | undefined;
|
|
107
355
|
canManage: boolean;
|
|
108
356
|
/** Absent when the organization has not connected. */
|
|
109
|
-
connection:
|
|
357
|
+
connection:
|
|
358
|
+
| ClaudeEnterpriseConnection
|
|
359
|
+
| undefined;
|
|
360
|
+
/** Absent before the first usage pull with the key that now reads the usage reports, and when sync_unavailable. */
|
|
361
|
+
sync:
|
|
362
|
+
| ClaudeEnterpriseSync
|
|
363
|
+
| undefined;
|
|
364
|
+
/**
|
|
365
|
+
* True when Terma could not read the pull status: sync is then absent and says nothing about pulls. The connection
|
|
366
|
+
* and its keys are still served.
|
|
367
|
+
*/
|
|
368
|
+
syncUnavailable: boolean;
|
|
110
369
|
}
|
|
111
370
|
|
|
112
371
|
export interface ClaudeEnterpriseConnection {
|
|
@@ -126,9 +385,48 @@ export interface ClaudeEnterpriseKey {
|
|
|
126
385
|
createdAt: Date | undefined;
|
|
127
386
|
}
|
|
128
387
|
|
|
388
|
+
export interface ClaudeEnterpriseSync {
|
|
389
|
+
/** The Anthropic organization (org_...) whose rows the pulls last wrote; empty until a pull writes some. */
|
|
390
|
+
anthropicOrganizationId: string;
|
|
391
|
+
lastAttemptAt:
|
|
392
|
+
| Date
|
|
393
|
+
| undefined;
|
|
394
|
+
/**
|
|
395
|
+
* When a pull last wrote rows; absent until one does. A pull Anthropic answered with nothing to write (an export
|
|
396
|
+
* not refreshed yet) leaves it as it was.
|
|
397
|
+
*/
|
|
398
|
+
lastSuccessAt:
|
|
399
|
+
| Date
|
|
400
|
+
| undefined;
|
|
401
|
+
/** Unspecified after a successful pull. */
|
|
402
|
+
lastError: ClaudeEnterprisePullError;
|
|
403
|
+
/** Anthropic's own words about the last failure, for display. */
|
|
404
|
+
lastErrorMessage: string;
|
|
405
|
+
/**
|
|
406
|
+
* YYYY-MM-DD, the newest day any pull wrote: days after it hold nothing yet, which is not zero usage. '' before
|
|
407
|
+
* the first pull that wrote a day.
|
|
408
|
+
*/
|
|
409
|
+
reportedThrough: string;
|
|
410
|
+
/**
|
|
411
|
+
* YYYY-MM-DD: every day before it holds Anthropic's final figures. A month settles about seven days after it ends;
|
|
412
|
+
* days from settled_through on are the newest figures pulled and may still change on a later pull. '' until a
|
|
413
|
+
* pull writes rows.
|
|
414
|
+
*/
|
|
415
|
+
settledThrough: string;
|
|
416
|
+
/**
|
|
417
|
+
* [backfill_start, backfill_end), YYYY-MM-DD: older days the key has not read yet, which the next pull reads. A
|
|
418
|
+
* window that reaches them is missing their figures until it does. Both '' when no days are owed.
|
|
419
|
+
*/
|
|
420
|
+
backfillStart: string;
|
|
421
|
+
backfillEnd: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
129
424
|
export interface CreateClaudeEnterpriseKeyRequest {
|
|
130
425
|
organizationId: string;
|
|
131
|
-
/**
|
|
426
|
+
/**
|
|
427
|
+
* Created in claude.ai > Organization settings > API: an Analytics API key (by the primary owner,
|
|
428
|
+
* read:analytics) or a Compliance Access Key (read:compliance_* scopes).
|
|
429
|
+
*/
|
|
132
430
|
apiKey: string;
|
|
133
431
|
billingModel: ClaudeEnterpriseBillingModel;
|
|
134
432
|
}
|
|
@@ -164,6 +462,137 @@ export interface DeleteClaudeEnterpriseConnectionResponse {
|
|
|
164
462
|
deleted: boolean;
|
|
165
463
|
}
|
|
166
464
|
|
|
465
|
+
export interface ListClaudeEnterpriseBilledUsageRequest {
|
|
466
|
+
organizationId: string;
|
|
467
|
+
/** [start_time, end_time), snapped out to whole UTC days, at most 366 days. */
|
|
468
|
+
startTime: Date | undefined;
|
|
469
|
+
endTime:
|
|
470
|
+
| Date
|
|
471
|
+
| undefined;
|
|
472
|
+
/** USER needs the org admin role. */
|
|
473
|
+
dimension: ClaudeEnterpriseBilledUsageDimension;
|
|
474
|
+
sort: ClaudeEnterpriseBilledUsageSort;
|
|
475
|
+
/** Default 100, max 1000. */
|
|
476
|
+
pageSize: number;
|
|
477
|
+
pageToken: string;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export interface ListClaudeEnterpriseBilledUsageResponse {
|
|
481
|
+
status: ResponseStatus | undefined;
|
|
482
|
+
rows: ClaudeEnterpriseBilledUsageRow[];
|
|
483
|
+
nextPageToken: string;
|
|
484
|
+
/**
|
|
485
|
+
* The whole window's total across every row, not only this page. Absent before the first pull: nothing pulled is
|
|
486
|
+
* not zero spend.
|
|
487
|
+
*/
|
|
488
|
+
total: ClaudeEnterpriseBilledUsageRow | undefined;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
export interface ClaudeEnterpriseBilledUsageRow {
|
|
492
|
+
/**
|
|
493
|
+
* The dimension value: a YYYY-MM-DD day, a product, a model, or an account id. On DAY, every pulled day in the
|
|
494
|
+
* window has a row, all zeros when it had no usage; a day not pulled yet has none. On USER, '' is usage Anthropic
|
|
495
|
+
* attributes to no seat (API-key and automation traffic). On PRODUCT, 'null' is usage it attributes to no product.
|
|
496
|
+
* On MODEL, '' is usage that names no model (unattributed usage and code execution).
|
|
497
|
+
*/
|
|
498
|
+
key: string;
|
|
499
|
+
/**
|
|
500
|
+
* Token counts cover seat users only: Anthropic's organization report has no tokens, so the unattributed usage
|
|
501
|
+
* the amounts and requests include carries none.
|
|
502
|
+
*/
|
|
503
|
+
uncachedInputTokens: number;
|
|
504
|
+
cacheReadTokens: number;
|
|
505
|
+
cacheWriteTokens: number;
|
|
506
|
+
outputTokens: number;
|
|
507
|
+
requests: number;
|
|
508
|
+
/** Post-discount, pre-credit (Net). */
|
|
509
|
+
amountUsd: number;
|
|
510
|
+
/** List price (Notional). */
|
|
511
|
+
listAmountUsd: number;
|
|
512
|
+
/**
|
|
513
|
+
* On USER, the member's email from the directory: '' for the unattributed row and for an account the directory does
|
|
514
|
+
* not hold (a usage key that cannot read it). Display-only.
|
|
515
|
+
*/
|
|
516
|
+
email: string;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export interface GetClaudeEnterpriseSeatAdoptionRequest {
|
|
520
|
+
organizationId: string;
|
|
521
|
+
/** [start_time, end_time), snapped out to whole UTC days, at most 366 days. */
|
|
522
|
+
startTime: Date | undefined;
|
|
523
|
+
endTime: Date | undefined;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export interface GetClaudeEnterpriseSeatAdoptionResponse {
|
|
527
|
+
status:
|
|
528
|
+
| ResponseStatus
|
|
529
|
+
| undefined;
|
|
530
|
+
/**
|
|
531
|
+
* One per pulled day in the window, oldest first; a day Anthropic had not published at the last pull is absent. A
|
|
532
|
+
* time series bounded by the request's window (at most 366 days), unpaged like GetSessionUsageTrend.
|
|
533
|
+
*/
|
|
534
|
+
days: ClaudeEnterpriseSeatAdoptionDay[];
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/** A count Anthropic reported as null is absent, never 0. */
|
|
538
|
+
export interface ClaudeEnterpriseSeatAdoptionDay {
|
|
539
|
+
/** YYYY-MM-DD, UTC. */
|
|
540
|
+
day: string;
|
|
541
|
+
assignedSeats?: number | undefined;
|
|
542
|
+
pendingInvites?: number | undefined;
|
|
543
|
+
dailyActiveUsers?: number | undefined;
|
|
544
|
+
weeklyActiveUsers?: number | undefined;
|
|
545
|
+
monthlyActiveUsers?: number | undefined;
|
|
546
|
+
products: ClaudeEnterpriseProductActiveUsers[];
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/** Per-product counts overlap (one person can use two products), so they never sum to the overall counts. */
|
|
550
|
+
export interface ClaudeEnterpriseProductActiveUsers {
|
|
551
|
+
product: string;
|
|
552
|
+
dailyActiveUsers?: number | undefined;
|
|
553
|
+
weeklyActiveUsers?: number | undefined;
|
|
554
|
+
monthlyActiveUsers?: number | undefined;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export interface ListClaudeEnterpriseMembersRequest {
|
|
558
|
+
organizationId: string;
|
|
559
|
+
filter: ClaudeEnterpriseMemberFilter | undefined;
|
|
560
|
+
sort: ClaudeEnterpriseMemberSort;
|
|
561
|
+
/** Default 100, max 1000. */
|
|
562
|
+
pageSize: number;
|
|
563
|
+
pageToken: string;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/** Fields AND; an unset field does not filter. */
|
|
567
|
+
export interface ClaudeEnterpriseMemberFilter {
|
|
568
|
+
/** Case-insensitive substring of the email or the name. */
|
|
569
|
+
search: string;
|
|
570
|
+
/** Only members with no activity in the last idle_days days, at most 90: the activity history the puller keeps. */
|
|
571
|
+
idleDays: number;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export interface ListClaudeEnterpriseMembersResponse {
|
|
575
|
+
status: ResponseStatus | undefined;
|
|
576
|
+
members: ClaudeEnterpriseMember[];
|
|
577
|
+
nextPageToken: string;
|
|
578
|
+
/**
|
|
579
|
+
* Every member the filter matches, computed on the first page only; absent until a pull has read the directory
|
|
580
|
+
* (never, with a usage key that cannot read it).
|
|
581
|
+
*/
|
|
582
|
+
totalCount?: number | undefined;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export interface ClaudeEnterpriseMember {
|
|
586
|
+
/** Anthropic's account id (user_..., the id Claude Code exports as user.account_id). */
|
|
587
|
+
userId: string;
|
|
588
|
+
/** Display only, as Anthropic lists it; '' for a deleted account. */
|
|
589
|
+
email: string;
|
|
590
|
+
name: string;
|
|
591
|
+
role: string;
|
|
592
|
+
/** YYYY-MM-DD, UTC; '' when no activity was seen in the last 90 days. */
|
|
593
|
+
lastActivityDate: string;
|
|
594
|
+
}
|
|
595
|
+
|
|
167
596
|
function createBaseGetClaudeEnterpriseConnectorRequest(): GetClaudeEnterpriseConnectorRequest {
|
|
168
597
|
return { organizationId: "" };
|
|
169
598
|
}
|
|
@@ -242,7 +671,7 @@ export const GetClaudeEnterpriseConnectorRequest: MessageFns<GetClaudeEnterprise
|
|
|
242
671
|
};
|
|
243
672
|
|
|
244
673
|
function createBaseGetClaudeEnterpriseConnectorResponse(): GetClaudeEnterpriseConnectorResponse {
|
|
245
|
-
return { status: undefined, canManage: false, connection: undefined };
|
|
674
|
+
return { status: undefined, canManage: false, connection: undefined, sync: undefined, syncUnavailable: false };
|
|
246
675
|
}
|
|
247
676
|
|
|
248
677
|
export const GetClaudeEnterpriseConnectorResponse: MessageFns<GetClaudeEnterpriseConnectorResponse> = {
|
|
@@ -256,6 +685,12 @@ export const GetClaudeEnterpriseConnectorResponse: MessageFns<GetClaudeEnterpris
|
|
|
256
685
|
if (message.connection !== undefined) {
|
|
257
686
|
ClaudeEnterpriseConnection.encode(message.connection, writer.uint32(26).fork()).join();
|
|
258
687
|
}
|
|
688
|
+
if (message.sync !== undefined) {
|
|
689
|
+
ClaudeEnterpriseSync.encode(message.sync, writer.uint32(34).fork()).join();
|
|
690
|
+
}
|
|
691
|
+
if (message.syncUnavailable !== false) {
|
|
692
|
+
writer.uint32(40).bool(message.syncUnavailable);
|
|
693
|
+
}
|
|
259
694
|
return writer;
|
|
260
695
|
},
|
|
261
696
|
|
|
@@ -296,6 +731,22 @@ export const GetClaudeEnterpriseConnectorResponse: MessageFns<GetClaudeEnterpris
|
|
|
296
731
|
message.connection = ClaudeEnterpriseConnection.decode(reader, reader.uint32());
|
|
297
732
|
continue;
|
|
298
733
|
}
|
|
734
|
+
case 4: {
|
|
735
|
+
if (tag !== 34) {
|
|
736
|
+
break;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
message.sync = ClaudeEnterpriseSync.decode(reader, reader.uint32());
|
|
740
|
+
continue;
|
|
741
|
+
}
|
|
742
|
+
case 5: {
|
|
743
|
+
if (tag !== 40) {
|
|
744
|
+
break;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
message.syncUnavailable = reader.bool();
|
|
748
|
+
continue;
|
|
749
|
+
}
|
|
299
750
|
}
|
|
300
751
|
if ((tag & 7) === 4 || tag === 0) {
|
|
301
752
|
break;
|
|
@@ -317,6 +768,12 @@ export const GetClaudeEnterpriseConnectorResponse: MessageFns<GetClaudeEnterpris
|
|
|
317
768
|
? globalThis.Boolean(object.can_manage)
|
|
318
769
|
: false,
|
|
319
770
|
connection: isSet(object.connection) ? ClaudeEnterpriseConnection.fromJSON(object.connection) : undefined,
|
|
771
|
+
sync: isSet(object.sync) ? ClaudeEnterpriseSync.fromJSON(object.sync) : undefined,
|
|
772
|
+
syncUnavailable: isSet(object.syncUnavailable)
|
|
773
|
+
? globalThis.Boolean(object.syncUnavailable)
|
|
774
|
+
: isSet(object.sync_unavailable)
|
|
775
|
+
? globalThis.Boolean(object.sync_unavailable)
|
|
776
|
+
: false,
|
|
320
777
|
};
|
|
321
778
|
},
|
|
322
779
|
|
|
@@ -331,6 +788,12 @@ export const GetClaudeEnterpriseConnectorResponse: MessageFns<GetClaudeEnterpris
|
|
|
331
788
|
if (message.connection !== undefined) {
|
|
332
789
|
obj.connection = ClaudeEnterpriseConnection.toJSON(message.connection);
|
|
333
790
|
}
|
|
791
|
+
if (message.sync !== undefined) {
|
|
792
|
+
obj.sync = ClaudeEnterpriseSync.toJSON(message.sync);
|
|
793
|
+
}
|
|
794
|
+
if (message.syncUnavailable !== false) {
|
|
795
|
+
obj.syncUnavailable = message.syncUnavailable;
|
|
796
|
+
}
|
|
334
797
|
return obj;
|
|
335
798
|
},
|
|
336
799
|
|
|
@@ -350,6 +813,10 @@ export const GetClaudeEnterpriseConnectorResponse: MessageFns<GetClaudeEnterpris
|
|
|
350
813
|
message.connection = (object.connection !== undefined && object.connection !== null)
|
|
351
814
|
? ClaudeEnterpriseConnection.fromPartial(object.connection)
|
|
352
815
|
: undefined;
|
|
816
|
+
message.sync = (object.sync !== undefined && object.sync !== null)
|
|
817
|
+
? ClaudeEnterpriseSync.fromPartial(object.sync)
|
|
818
|
+
: undefined;
|
|
819
|
+
message.syncUnavailable = object.syncUnavailable ?? false;
|
|
353
820
|
return message;
|
|
354
821
|
},
|
|
355
822
|
};
|
|
@@ -620,25 +1087,53 @@ export const ClaudeEnterpriseKey: MessageFns<ClaudeEnterpriseKey> = {
|
|
|
620
1087
|
},
|
|
621
1088
|
};
|
|
622
1089
|
|
|
623
|
-
function
|
|
624
|
-
return {
|
|
1090
|
+
function createBaseClaudeEnterpriseSync(): ClaudeEnterpriseSync {
|
|
1091
|
+
return {
|
|
1092
|
+
anthropicOrganizationId: "",
|
|
1093
|
+
lastAttemptAt: undefined,
|
|
1094
|
+
lastSuccessAt: undefined,
|
|
1095
|
+
lastError: 0,
|
|
1096
|
+
lastErrorMessage: "",
|
|
1097
|
+
reportedThrough: "",
|
|
1098
|
+
settledThrough: "",
|
|
1099
|
+
backfillStart: "",
|
|
1100
|
+
backfillEnd: "",
|
|
1101
|
+
};
|
|
625
1102
|
}
|
|
626
1103
|
|
|
627
|
-
export const
|
|
628
|
-
encode(message:
|
|
629
|
-
if (message.
|
|
630
|
-
writer.uint32(10).string(message.
|
|
1104
|
+
export const ClaudeEnterpriseSync: MessageFns<ClaudeEnterpriseSync> = {
|
|
1105
|
+
encode(message: ClaudeEnterpriseSync, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1106
|
+
if (message.anthropicOrganizationId !== "") {
|
|
1107
|
+
writer.uint32(10).string(message.anthropicOrganizationId);
|
|
631
1108
|
}
|
|
632
|
-
if (message.
|
|
633
|
-
writer.uint32(18).
|
|
1109
|
+
if (message.lastAttemptAt !== undefined) {
|
|
1110
|
+
Timestamp.encode(toTimestamp(message.lastAttemptAt), writer.uint32(18).fork()).join();
|
|
634
1111
|
}
|
|
635
|
-
if (message.
|
|
636
|
-
writer.uint32(
|
|
1112
|
+
if (message.lastSuccessAt !== undefined) {
|
|
1113
|
+
Timestamp.encode(toTimestamp(message.lastSuccessAt), writer.uint32(26).fork()).join();
|
|
1114
|
+
}
|
|
1115
|
+
if (message.lastError !== 0) {
|
|
1116
|
+
writer.uint32(32).int32(message.lastError);
|
|
1117
|
+
}
|
|
1118
|
+
if (message.lastErrorMessage !== "") {
|
|
1119
|
+
writer.uint32(42).string(message.lastErrorMessage);
|
|
1120
|
+
}
|
|
1121
|
+
if (message.reportedThrough !== "") {
|
|
1122
|
+
writer.uint32(50).string(message.reportedThrough);
|
|
1123
|
+
}
|
|
1124
|
+
if (message.settledThrough !== "") {
|
|
1125
|
+
writer.uint32(58).string(message.settledThrough);
|
|
1126
|
+
}
|
|
1127
|
+
if (message.backfillStart !== "") {
|
|
1128
|
+
writer.uint32(66).string(message.backfillStart);
|
|
1129
|
+
}
|
|
1130
|
+
if (message.backfillEnd !== "") {
|
|
1131
|
+
writer.uint32(74).string(message.backfillEnd);
|
|
637
1132
|
}
|
|
638
1133
|
return writer;
|
|
639
1134
|
},
|
|
640
1135
|
|
|
641
|
-
decode(input: BinaryReader | Uint8Array, length?: number):
|
|
1136
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClaudeEnterpriseSync {
|
|
642
1137
|
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
643
1138
|
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
644
1139
|
if (previousRecursionDepth >= 100) {
|
|
@@ -647,7 +1142,7 @@ export const CreateClaudeEnterpriseKeyRequest: MessageFns<CreateClaudeEnterprise
|
|
|
647
1142
|
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
648
1143
|
try {
|
|
649
1144
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
650
|
-
const message =
|
|
1145
|
+
const message = createBaseClaudeEnterpriseSync();
|
|
651
1146
|
while (reader.pos < end) {
|
|
652
1147
|
const tag = reader.uint32();
|
|
653
1148
|
switch (tag >>> 3) {
|
|
@@ -656,7 +1151,7 @@ export const CreateClaudeEnterpriseKeyRequest: MessageFns<CreateClaudeEnterprise
|
|
|
656
1151
|
break;
|
|
657
1152
|
}
|
|
658
1153
|
|
|
659
|
-
message.
|
|
1154
|
+
message.anthropicOrganizationId = reader.string();
|
|
660
1155
|
continue;
|
|
661
1156
|
}
|
|
662
1157
|
case 2: {
|
|
@@ -664,15 +1159,63 @@ export const CreateClaudeEnterpriseKeyRequest: MessageFns<CreateClaudeEnterprise
|
|
|
664
1159
|
break;
|
|
665
1160
|
}
|
|
666
1161
|
|
|
667
|
-
message.
|
|
1162
|
+
message.lastAttemptAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
668
1163
|
continue;
|
|
669
1164
|
}
|
|
670
1165
|
case 3: {
|
|
671
|
-
if (tag !==
|
|
1166
|
+
if (tag !== 26) {
|
|
672
1167
|
break;
|
|
673
1168
|
}
|
|
674
1169
|
|
|
675
|
-
message.
|
|
1170
|
+
message.lastSuccessAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1171
|
+
continue;
|
|
1172
|
+
}
|
|
1173
|
+
case 4: {
|
|
1174
|
+
if (tag !== 32) {
|
|
1175
|
+
break;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
message.lastError = reader.int32() as any;
|
|
1179
|
+
continue;
|
|
1180
|
+
}
|
|
1181
|
+
case 5: {
|
|
1182
|
+
if (tag !== 42) {
|
|
1183
|
+
break;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
message.lastErrorMessage = reader.string();
|
|
1187
|
+
continue;
|
|
1188
|
+
}
|
|
1189
|
+
case 6: {
|
|
1190
|
+
if (tag !== 50) {
|
|
1191
|
+
break;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
message.reportedThrough = reader.string();
|
|
1195
|
+
continue;
|
|
1196
|
+
}
|
|
1197
|
+
case 7: {
|
|
1198
|
+
if (tag !== 58) {
|
|
1199
|
+
break;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
message.settledThrough = reader.string();
|
|
1203
|
+
continue;
|
|
1204
|
+
}
|
|
1205
|
+
case 8: {
|
|
1206
|
+
if (tag !== 66) {
|
|
1207
|
+
break;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
message.backfillStart = reader.string();
|
|
1211
|
+
continue;
|
|
1212
|
+
}
|
|
1213
|
+
case 9: {
|
|
1214
|
+
if (tag !== 74) {
|
|
1215
|
+
break;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
message.backfillEnd = reader.string();
|
|
676
1219
|
continue;
|
|
677
1220
|
}
|
|
678
1221
|
}
|
|
@@ -687,51 +1230,218 @@ export const CreateClaudeEnterpriseKeyRequest: MessageFns<CreateClaudeEnterprise
|
|
|
687
1230
|
}
|
|
688
1231
|
},
|
|
689
1232
|
|
|
690
|
-
fromJSON(object: any):
|
|
1233
|
+
fromJSON(object: any): ClaudeEnterpriseSync {
|
|
691
1234
|
return {
|
|
692
|
-
|
|
693
|
-
? globalThis.String(object.
|
|
694
|
-
: isSet(object.
|
|
695
|
-
? globalThis.String(object.
|
|
696
|
-
: "",
|
|
697
|
-
apiKey: isSet(object.apiKey)
|
|
698
|
-
? globalThis.String(object.apiKey)
|
|
699
|
-
: isSet(object.api_key)
|
|
700
|
-
? globalThis.String(object.api_key)
|
|
1235
|
+
anthropicOrganizationId: isSet(object.anthropicOrganizationId)
|
|
1236
|
+
? globalThis.String(object.anthropicOrganizationId)
|
|
1237
|
+
: isSet(object.anthropic_organization_id)
|
|
1238
|
+
? globalThis.String(object.anthropic_organization_id)
|
|
701
1239
|
: "",
|
|
702
|
-
|
|
703
|
-
?
|
|
704
|
-
: isSet(object.
|
|
705
|
-
?
|
|
1240
|
+
lastAttemptAt: isSet(object.lastAttemptAt)
|
|
1241
|
+
? fromJsonTimestamp(object.lastAttemptAt)
|
|
1242
|
+
: isSet(object.last_attempt_at)
|
|
1243
|
+
? fromJsonTimestamp(object.last_attempt_at)
|
|
1244
|
+
: undefined,
|
|
1245
|
+
lastSuccessAt: isSet(object.lastSuccessAt)
|
|
1246
|
+
? fromJsonTimestamp(object.lastSuccessAt)
|
|
1247
|
+
: isSet(object.last_success_at)
|
|
1248
|
+
? fromJsonTimestamp(object.last_success_at)
|
|
1249
|
+
: undefined,
|
|
1250
|
+
lastError: isSet(object.lastError)
|
|
1251
|
+
? claudeEnterprisePullErrorFromJSON(object.lastError)
|
|
1252
|
+
: isSet(object.last_error)
|
|
1253
|
+
? claudeEnterprisePullErrorFromJSON(object.last_error)
|
|
706
1254
|
: 0,
|
|
1255
|
+
lastErrorMessage: isSet(object.lastErrorMessage)
|
|
1256
|
+
? globalThis.String(object.lastErrorMessage)
|
|
1257
|
+
: isSet(object.last_error_message)
|
|
1258
|
+
? globalThis.String(object.last_error_message)
|
|
1259
|
+
: "",
|
|
1260
|
+
reportedThrough: isSet(object.reportedThrough)
|
|
1261
|
+
? globalThis.String(object.reportedThrough)
|
|
1262
|
+
: isSet(object.reported_through)
|
|
1263
|
+
? globalThis.String(object.reported_through)
|
|
1264
|
+
: "",
|
|
1265
|
+
settledThrough: isSet(object.settledThrough)
|
|
1266
|
+
? globalThis.String(object.settledThrough)
|
|
1267
|
+
: isSet(object.settled_through)
|
|
1268
|
+
? globalThis.String(object.settled_through)
|
|
1269
|
+
: "",
|
|
1270
|
+
backfillStart: isSet(object.backfillStart)
|
|
1271
|
+
? globalThis.String(object.backfillStart)
|
|
1272
|
+
: isSet(object.backfill_start)
|
|
1273
|
+
? globalThis.String(object.backfill_start)
|
|
1274
|
+
: "",
|
|
1275
|
+
backfillEnd: isSet(object.backfillEnd)
|
|
1276
|
+
? globalThis.String(object.backfillEnd)
|
|
1277
|
+
: isSet(object.backfill_end)
|
|
1278
|
+
? globalThis.String(object.backfill_end)
|
|
1279
|
+
: "",
|
|
707
1280
|
};
|
|
708
1281
|
},
|
|
709
1282
|
|
|
710
|
-
toJSON(message:
|
|
1283
|
+
toJSON(message: ClaudeEnterpriseSync): unknown {
|
|
711
1284
|
const obj: any = {};
|
|
712
|
-
if (message.
|
|
713
|
-
obj.
|
|
1285
|
+
if (message.anthropicOrganizationId !== "") {
|
|
1286
|
+
obj.anthropicOrganizationId = message.anthropicOrganizationId;
|
|
714
1287
|
}
|
|
715
|
-
if (message.
|
|
716
|
-
obj.
|
|
1288
|
+
if (message.lastAttemptAt !== undefined) {
|
|
1289
|
+
obj.lastAttemptAt = message.lastAttemptAt.toISOString();
|
|
717
1290
|
}
|
|
718
|
-
if (message.
|
|
719
|
-
obj.
|
|
1291
|
+
if (message.lastSuccessAt !== undefined) {
|
|
1292
|
+
obj.lastSuccessAt = message.lastSuccessAt.toISOString();
|
|
1293
|
+
}
|
|
1294
|
+
if (message.lastError !== 0) {
|
|
1295
|
+
obj.lastError = claudeEnterprisePullErrorToJSON(message.lastError);
|
|
1296
|
+
}
|
|
1297
|
+
if (message.lastErrorMessage !== "") {
|
|
1298
|
+
obj.lastErrorMessage = message.lastErrorMessage;
|
|
1299
|
+
}
|
|
1300
|
+
if (message.reportedThrough !== "") {
|
|
1301
|
+
obj.reportedThrough = message.reportedThrough;
|
|
1302
|
+
}
|
|
1303
|
+
if (message.settledThrough !== "") {
|
|
1304
|
+
obj.settledThrough = message.settledThrough;
|
|
1305
|
+
}
|
|
1306
|
+
if (message.backfillStart !== "") {
|
|
1307
|
+
obj.backfillStart = message.backfillStart;
|
|
1308
|
+
}
|
|
1309
|
+
if (message.backfillEnd !== "") {
|
|
1310
|
+
obj.backfillEnd = message.backfillEnd;
|
|
720
1311
|
}
|
|
721
1312
|
return obj;
|
|
722
1313
|
},
|
|
723
1314
|
|
|
724
|
-
create<I extends Exact<DeepPartial<
|
|
725
|
-
base
|
|
726
|
-
): CreateClaudeEnterpriseKeyRequest {
|
|
727
|
-
return CreateClaudeEnterpriseKeyRequest.fromPartial(base ?? ({} as any));
|
|
1315
|
+
create<I extends Exact<DeepPartial<ClaudeEnterpriseSync>, I>>(base?: I): ClaudeEnterpriseSync {
|
|
1316
|
+
return ClaudeEnterpriseSync.fromPartial(base ?? ({} as any));
|
|
728
1317
|
},
|
|
729
|
-
fromPartial<I extends Exact<DeepPartial<
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
message.
|
|
734
|
-
message.
|
|
1318
|
+
fromPartial<I extends Exact<DeepPartial<ClaudeEnterpriseSync>, I>>(object: I): ClaudeEnterpriseSync {
|
|
1319
|
+
const message = createBaseClaudeEnterpriseSync();
|
|
1320
|
+
message.anthropicOrganizationId = object.anthropicOrganizationId ?? "";
|
|
1321
|
+
message.lastAttemptAt = object.lastAttemptAt ?? undefined;
|
|
1322
|
+
message.lastSuccessAt = object.lastSuccessAt ?? undefined;
|
|
1323
|
+
message.lastError = object.lastError ?? 0;
|
|
1324
|
+
message.lastErrorMessage = object.lastErrorMessage ?? "";
|
|
1325
|
+
message.reportedThrough = object.reportedThrough ?? "";
|
|
1326
|
+
message.settledThrough = object.settledThrough ?? "";
|
|
1327
|
+
message.backfillStart = object.backfillStart ?? "";
|
|
1328
|
+
message.backfillEnd = object.backfillEnd ?? "";
|
|
1329
|
+
return message;
|
|
1330
|
+
},
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
function createBaseCreateClaudeEnterpriseKeyRequest(): CreateClaudeEnterpriseKeyRequest {
|
|
1334
|
+
return { organizationId: "", apiKey: "", billingModel: 0 };
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
export const CreateClaudeEnterpriseKeyRequest: MessageFns<CreateClaudeEnterpriseKeyRequest> = {
|
|
1338
|
+
encode(message: CreateClaudeEnterpriseKeyRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1339
|
+
if (message.organizationId !== "") {
|
|
1340
|
+
writer.uint32(10).string(message.organizationId);
|
|
1341
|
+
}
|
|
1342
|
+
if (message.apiKey !== "") {
|
|
1343
|
+
writer.uint32(18).string(message.apiKey);
|
|
1344
|
+
}
|
|
1345
|
+
if (message.billingModel !== 0) {
|
|
1346
|
+
writer.uint32(24).int32(message.billingModel);
|
|
1347
|
+
}
|
|
1348
|
+
return writer;
|
|
1349
|
+
},
|
|
1350
|
+
|
|
1351
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CreateClaudeEnterpriseKeyRequest {
|
|
1352
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1353
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1354
|
+
if (previousRecursionDepth >= 100) {
|
|
1355
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1356
|
+
}
|
|
1357
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1358
|
+
try {
|
|
1359
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1360
|
+
const message = createBaseCreateClaudeEnterpriseKeyRequest();
|
|
1361
|
+
while (reader.pos < end) {
|
|
1362
|
+
const tag = reader.uint32();
|
|
1363
|
+
switch (tag >>> 3) {
|
|
1364
|
+
case 1: {
|
|
1365
|
+
if (tag !== 10) {
|
|
1366
|
+
break;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
message.organizationId = reader.string();
|
|
1370
|
+
continue;
|
|
1371
|
+
}
|
|
1372
|
+
case 2: {
|
|
1373
|
+
if (tag !== 18) {
|
|
1374
|
+
break;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
message.apiKey = reader.string();
|
|
1378
|
+
continue;
|
|
1379
|
+
}
|
|
1380
|
+
case 3: {
|
|
1381
|
+
if (tag !== 24) {
|
|
1382
|
+
break;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
message.billingModel = reader.int32() as any;
|
|
1386
|
+
continue;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1390
|
+
break;
|
|
1391
|
+
}
|
|
1392
|
+
reader.skip(tag & 7);
|
|
1393
|
+
}
|
|
1394
|
+
return message;
|
|
1395
|
+
} finally {
|
|
1396
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1397
|
+
}
|
|
1398
|
+
},
|
|
1399
|
+
|
|
1400
|
+
fromJSON(object: any): CreateClaudeEnterpriseKeyRequest {
|
|
1401
|
+
return {
|
|
1402
|
+
organizationId: isSet(object.organizationId)
|
|
1403
|
+
? globalThis.String(object.organizationId)
|
|
1404
|
+
: isSet(object.organization_id)
|
|
1405
|
+
? globalThis.String(object.organization_id)
|
|
1406
|
+
: "",
|
|
1407
|
+
apiKey: isSet(object.apiKey)
|
|
1408
|
+
? globalThis.String(object.apiKey)
|
|
1409
|
+
: isSet(object.api_key)
|
|
1410
|
+
? globalThis.String(object.api_key)
|
|
1411
|
+
: "",
|
|
1412
|
+
billingModel: isSet(object.billingModel)
|
|
1413
|
+
? claudeEnterpriseBillingModelFromJSON(object.billingModel)
|
|
1414
|
+
: isSet(object.billing_model)
|
|
1415
|
+
? claudeEnterpriseBillingModelFromJSON(object.billing_model)
|
|
1416
|
+
: 0,
|
|
1417
|
+
};
|
|
1418
|
+
},
|
|
1419
|
+
|
|
1420
|
+
toJSON(message: CreateClaudeEnterpriseKeyRequest): unknown {
|
|
1421
|
+
const obj: any = {};
|
|
1422
|
+
if (message.organizationId !== "") {
|
|
1423
|
+
obj.organizationId = message.organizationId;
|
|
1424
|
+
}
|
|
1425
|
+
if (message.apiKey !== "") {
|
|
1426
|
+
obj.apiKey = message.apiKey;
|
|
1427
|
+
}
|
|
1428
|
+
if (message.billingModel !== 0) {
|
|
1429
|
+
obj.billingModel = claudeEnterpriseBillingModelToJSON(message.billingModel);
|
|
1430
|
+
}
|
|
1431
|
+
return obj;
|
|
1432
|
+
},
|
|
1433
|
+
|
|
1434
|
+
create<I extends Exact<DeepPartial<CreateClaudeEnterpriseKeyRequest>, I>>(
|
|
1435
|
+
base?: I,
|
|
1436
|
+
): CreateClaudeEnterpriseKeyRequest {
|
|
1437
|
+
return CreateClaudeEnterpriseKeyRequest.fromPartial(base ?? ({} as any));
|
|
1438
|
+
},
|
|
1439
|
+
fromPartial<I extends Exact<DeepPartial<CreateClaudeEnterpriseKeyRequest>, I>>(
|
|
1440
|
+
object: I,
|
|
1441
|
+
): CreateClaudeEnterpriseKeyRequest {
|
|
1442
|
+
const message = createBaseCreateClaudeEnterpriseKeyRequest();
|
|
1443
|
+
message.organizationId = object.organizationId ?? "";
|
|
1444
|
+
message.apiKey = object.apiKey ?? "";
|
|
735
1445
|
message.billingModel = object.billingModel ?? 0;
|
|
736
1446
|
return message;
|
|
737
1447
|
},
|
|
@@ -1206,109 +1916,1785 @@ export const DeleteClaudeEnterpriseConnectionResponse: MessageFns<DeleteClaudeEn
|
|
|
1206
1916
|
},
|
|
1207
1917
|
};
|
|
1208
1918
|
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
): Promise<GetClaudeEnterpriseConnectorResponse>;
|
|
1220
|
-
/**
|
|
1221
|
-
* Org admin. Anthropic must accept the key for its usage reports, or it is not stored and the status is
|
|
1222
|
-
* STATUS_CODE_VALIDATION_ERROR naming the reason, Anthropic's own words included. The first key creates the
|
|
1223
|
-
* connection, every key sets its billing model, and a stored key whose capabilities the new key all reads is
|
|
1224
|
-
* replaced.
|
|
1225
|
-
*/
|
|
1226
|
-
CreateClaudeEnterpriseKey(
|
|
1227
|
-
request: CreateClaudeEnterpriseKeyRequest,
|
|
1228
|
-
metadata?: Metadata,
|
|
1229
|
-
): Promise<CreateClaudeEnterpriseKeyResponse>;
|
|
1230
|
-
/**
|
|
1231
|
-
* Org admin. Deleting the connection's last key disconnects it. STATUS_CODE_NOT_FOUND for a key the
|
|
1232
|
-
* organization's connection does not hold.
|
|
1233
|
-
*/
|
|
1234
|
-
DeleteClaudeEnterpriseKey(
|
|
1235
|
-
request: DeleteClaudeEnterpriseKeyRequest,
|
|
1236
|
-
metadata?: Metadata,
|
|
1237
|
-
): Promise<DeleteClaudeEnterpriseKeyResponse>;
|
|
1238
|
-
/** Org admin. Deletes every key. */
|
|
1239
|
-
DeleteClaudeEnterpriseConnection(
|
|
1240
|
-
request: DeleteClaudeEnterpriseConnectionRequest,
|
|
1241
|
-
metadata?: Metadata,
|
|
1242
|
-
): Promise<DeleteClaudeEnterpriseConnectionResponse>;
|
|
1919
|
+
function createBaseListClaudeEnterpriseBilledUsageRequest(): ListClaudeEnterpriseBilledUsageRequest {
|
|
1920
|
+
return {
|
|
1921
|
+
organizationId: "",
|
|
1922
|
+
startTime: undefined,
|
|
1923
|
+
endTime: undefined,
|
|
1924
|
+
dimension: 0,
|
|
1925
|
+
sort: 0,
|
|
1926
|
+
pageSize: 0,
|
|
1927
|
+
pageToken: "",
|
|
1928
|
+
};
|
|
1243
1929
|
}
|
|
1244
1930
|
|
|
1245
|
-
export const
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
const data = CreateClaudeEnterpriseKeyRequest.encode(request).finish();
|
|
1271
|
-
const promise = this.rpc.request(this.service, "CreateClaudeEnterpriseKey", data, metadata);
|
|
1272
|
-
return promise.then((data) => CreateClaudeEnterpriseKeyResponse.decode(new BinaryReader(data)));
|
|
1273
|
-
}
|
|
1931
|
+
export const ListClaudeEnterpriseBilledUsageRequest: MessageFns<ListClaudeEnterpriseBilledUsageRequest> = {
|
|
1932
|
+
encode(message: ListClaudeEnterpriseBilledUsageRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1933
|
+
if (message.organizationId !== "") {
|
|
1934
|
+
writer.uint32(10).string(message.organizationId);
|
|
1935
|
+
}
|
|
1936
|
+
if (message.startTime !== undefined) {
|
|
1937
|
+
Timestamp.encode(toTimestamp(message.startTime), writer.uint32(18).fork()).join();
|
|
1938
|
+
}
|
|
1939
|
+
if (message.endTime !== undefined) {
|
|
1940
|
+
Timestamp.encode(toTimestamp(message.endTime), writer.uint32(26).fork()).join();
|
|
1941
|
+
}
|
|
1942
|
+
if (message.dimension !== 0) {
|
|
1943
|
+
writer.uint32(32).int32(message.dimension);
|
|
1944
|
+
}
|
|
1945
|
+
if (message.sort !== 0) {
|
|
1946
|
+
writer.uint32(40).int32(message.sort);
|
|
1947
|
+
}
|
|
1948
|
+
if (message.pageSize !== 0) {
|
|
1949
|
+
writer.uint32(48).int32(message.pageSize);
|
|
1950
|
+
}
|
|
1951
|
+
if (message.pageToken !== "") {
|
|
1952
|
+
writer.uint32(58).string(message.pageToken);
|
|
1953
|
+
}
|
|
1954
|
+
return writer;
|
|
1955
|
+
},
|
|
1274
1956
|
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1957
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListClaudeEnterpriseBilledUsageRequest {
|
|
1958
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1959
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1960
|
+
if (previousRecursionDepth >= 100) {
|
|
1961
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1962
|
+
}
|
|
1963
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1964
|
+
try {
|
|
1965
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1966
|
+
const message = createBaseListClaudeEnterpriseBilledUsageRequest();
|
|
1967
|
+
while (reader.pos < end) {
|
|
1968
|
+
const tag = reader.uint32();
|
|
1969
|
+
switch (tag >>> 3) {
|
|
1970
|
+
case 1: {
|
|
1971
|
+
if (tag !== 10) {
|
|
1972
|
+
break;
|
|
1973
|
+
}
|
|
1283
1974
|
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
}
|
|
1292
|
-
}
|
|
1975
|
+
message.organizationId = reader.string();
|
|
1976
|
+
continue;
|
|
1977
|
+
}
|
|
1978
|
+
case 2: {
|
|
1979
|
+
if (tag !== 18) {
|
|
1980
|
+
break;
|
|
1981
|
+
}
|
|
1293
1982
|
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
}
|
|
1983
|
+
message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1984
|
+
continue;
|
|
1985
|
+
}
|
|
1986
|
+
case 3: {
|
|
1987
|
+
if (tag !== 26) {
|
|
1988
|
+
break;
|
|
1989
|
+
}
|
|
1297
1990
|
|
|
1298
|
-
|
|
1991
|
+
message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1992
|
+
continue;
|
|
1993
|
+
}
|
|
1994
|
+
case 4: {
|
|
1995
|
+
if (tag !== 32) {
|
|
1996
|
+
break;
|
|
1997
|
+
}
|
|
1299
1998
|
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1999
|
+
message.dimension = reader.int32() as any;
|
|
2000
|
+
continue;
|
|
2001
|
+
}
|
|
2002
|
+
case 5: {
|
|
2003
|
+
if (tag !== 40) {
|
|
2004
|
+
break;
|
|
2005
|
+
}
|
|
1305
2006
|
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
2007
|
+
message.sort = reader.int32() as any;
|
|
2008
|
+
continue;
|
|
2009
|
+
}
|
|
2010
|
+
case 6: {
|
|
2011
|
+
if (tag !== 48) {
|
|
2012
|
+
break;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
message.pageSize = reader.int32();
|
|
2016
|
+
continue;
|
|
2017
|
+
}
|
|
2018
|
+
case 7: {
|
|
2019
|
+
if (tag !== 58) {
|
|
2020
|
+
break;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
message.pageToken = reader.string();
|
|
2024
|
+
continue;
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
2027
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2028
|
+
break;
|
|
2029
|
+
}
|
|
2030
|
+
reader.skip(tag & 7);
|
|
2031
|
+
}
|
|
2032
|
+
return message;
|
|
2033
|
+
} finally {
|
|
2034
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2035
|
+
}
|
|
2036
|
+
},
|
|
2037
|
+
|
|
2038
|
+
fromJSON(object: any): ListClaudeEnterpriseBilledUsageRequest {
|
|
2039
|
+
return {
|
|
2040
|
+
organizationId: isSet(object.organizationId)
|
|
2041
|
+
? globalThis.String(object.organizationId)
|
|
2042
|
+
: isSet(object.organization_id)
|
|
2043
|
+
? globalThis.String(object.organization_id)
|
|
2044
|
+
: "",
|
|
2045
|
+
startTime: isSet(object.startTime)
|
|
2046
|
+
? fromJsonTimestamp(object.startTime)
|
|
2047
|
+
: isSet(object.start_time)
|
|
2048
|
+
? fromJsonTimestamp(object.start_time)
|
|
2049
|
+
: undefined,
|
|
2050
|
+
endTime: isSet(object.endTime)
|
|
2051
|
+
? fromJsonTimestamp(object.endTime)
|
|
2052
|
+
: isSet(object.end_time)
|
|
2053
|
+
? fromJsonTimestamp(object.end_time)
|
|
2054
|
+
: undefined,
|
|
2055
|
+
dimension: isSet(object.dimension) ? claudeEnterpriseBilledUsageDimensionFromJSON(object.dimension) : 0,
|
|
2056
|
+
sort: isSet(object.sort) ? claudeEnterpriseBilledUsageSortFromJSON(object.sort) : 0,
|
|
2057
|
+
pageSize: isSet(object.pageSize)
|
|
2058
|
+
? globalThis.Number(object.pageSize)
|
|
2059
|
+
: isSet(object.page_size)
|
|
2060
|
+
? globalThis.Number(object.page_size)
|
|
2061
|
+
: 0,
|
|
2062
|
+
pageToken: isSet(object.pageToken)
|
|
2063
|
+
? globalThis.String(object.pageToken)
|
|
2064
|
+
: isSet(object.page_token)
|
|
2065
|
+
? globalThis.String(object.page_token)
|
|
2066
|
+
: "",
|
|
2067
|
+
};
|
|
2068
|
+
},
|
|
2069
|
+
|
|
2070
|
+
toJSON(message: ListClaudeEnterpriseBilledUsageRequest): unknown {
|
|
2071
|
+
const obj: any = {};
|
|
2072
|
+
if (message.organizationId !== "") {
|
|
2073
|
+
obj.organizationId = message.organizationId;
|
|
2074
|
+
}
|
|
2075
|
+
if (message.startTime !== undefined) {
|
|
2076
|
+
obj.startTime = message.startTime.toISOString();
|
|
2077
|
+
}
|
|
2078
|
+
if (message.endTime !== undefined) {
|
|
2079
|
+
obj.endTime = message.endTime.toISOString();
|
|
2080
|
+
}
|
|
2081
|
+
if (message.dimension !== 0) {
|
|
2082
|
+
obj.dimension = claudeEnterpriseBilledUsageDimensionToJSON(message.dimension);
|
|
2083
|
+
}
|
|
2084
|
+
if (message.sort !== 0) {
|
|
2085
|
+
obj.sort = claudeEnterpriseBilledUsageSortToJSON(message.sort);
|
|
2086
|
+
}
|
|
2087
|
+
if (message.pageSize !== 0) {
|
|
2088
|
+
obj.pageSize = Math.round(message.pageSize);
|
|
2089
|
+
}
|
|
2090
|
+
if (message.pageToken !== "") {
|
|
2091
|
+
obj.pageToken = message.pageToken;
|
|
2092
|
+
}
|
|
2093
|
+
return obj;
|
|
2094
|
+
},
|
|
2095
|
+
|
|
2096
|
+
create<I extends Exact<DeepPartial<ListClaudeEnterpriseBilledUsageRequest>, I>>(
|
|
2097
|
+
base?: I,
|
|
2098
|
+
): ListClaudeEnterpriseBilledUsageRequest {
|
|
2099
|
+
return ListClaudeEnterpriseBilledUsageRequest.fromPartial(base ?? ({} as any));
|
|
2100
|
+
},
|
|
2101
|
+
fromPartial<I extends Exact<DeepPartial<ListClaudeEnterpriseBilledUsageRequest>, I>>(
|
|
2102
|
+
object: I,
|
|
2103
|
+
): ListClaudeEnterpriseBilledUsageRequest {
|
|
2104
|
+
const message = createBaseListClaudeEnterpriseBilledUsageRequest();
|
|
2105
|
+
message.organizationId = object.organizationId ?? "";
|
|
2106
|
+
message.startTime = object.startTime ?? undefined;
|
|
2107
|
+
message.endTime = object.endTime ?? undefined;
|
|
2108
|
+
message.dimension = object.dimension ?? 0;
|
|
2109
|
+
message.sort = object.sort ?? 0;
|
|
2110
|
+
message.pageSize = object.pageSize ?? 0;
|
|
2111
|
+
message.pageToken = object.pageToken ?? "";
|
|
2112
|
+
return message;
|
|
2113
|
+
},
|
|
2114
|
+
};
|
|
2115
|
+
|
|
2116
|
+
function createBaseListClaudeEnterpriseBilledUsageResponse(): ListClaudeEnterpriseBilledUsageResponse {
|
|
2117
|
+
return { status: undefined, rows: [], nextPageToken: "", total: undefined };
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
export const ListClaudeEnterpriseBilledUsageResponse: MessageFns<ListClaudeEnterpriseBilledUsageResponse> = {
|
|
2121
|
+
encode(message: ListClaudeEnterpriseBilledUsageResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2122
|
+
if (message.status !== undefined) {
|
|
2123
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
2124
|
+
}
|
|
2125
|
+
for (const v of message.rows) {
|
|
2126
|
+
ClaudeEnterpriseBilledUsageRow.encode(v!, writer.uint32(18).fork()).join();
|
|
2127
|
+
}
|
|
2128
|
+
if (message.nextPageToken !== "") {
|
|
2129
|
+
writer.uint32(26).string(message.nextPageToken);
|
|
2130
|
+
}
|
|
2131
|
+
if (message.total !== undefined) {
|
|
2132
|
+
ClaudeEnterpriseBilledUsageRow.encode(message.total, writer.uint32(34).fork()).join();
|
|
2133
|
+
}
|
|
2134
|
+
return writer;
|
|
2135
|
+
},
|
|
2136
|
+
|
|
2137
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListClaudeEnterpriseBilledUsageResponse {
|
|
2138
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2139
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2140
|
+
if (previousRecursionDepth >= 100) {
|
|
2141
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2142
|
+
}
|
|
2143
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2144
|
+
try {
|
|
2145
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2146
|
+
const message = createBaseListClaudeEnterpriseBilledUsageResponse();
|
|
2147
|
+
while (reader.pos < end) {
|
|
2148
|
+
const tag = reader.uint32();
|
|
2149
|
+
switch (tag >>> 3) {
|
|
2150
|
+
case 1: {
|
|
2151
|
+
if (tag !== 10) {
|
|
2152
|
+
break;
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
2156
|
+
continue;
|
|
2157
|
+
}
|
|
2158
|
+
case 2: {
|
|
2159
|
+
if (tag !== 18) {
|
|
2160
|
+
break;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
message.rows.push(ClaudeEnterpriseBilledUsageRow.decode(reader, reader.uint32()));
|
|
2164
|
+
continue;
|
|
2165
|
+
}
|
|
2166
|
+
case 3: {
|
|
2167
|
+
if (tag !== 26) {
|
|
2168
|
+
break;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
message.nextPageToken = reader.string();
|
|
2172
|
+
continue;
|
|
2173
|
+
}
|
|
2174
|
+
case 4: {
|
|
2175
|
+
if (tag !== 34) {
|
|
2176
|
+
break;
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
message.total = ClaudeEnterpriseBilledUsageRow.decode(reader, reader.uint32());
|
|
2180
|
+
continue;
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2184
|
+
break;
|
|
2185
|
+
}
|
|
2186
|
+
reader.skip(tag & 7);
|
|
2187
|
+
}
|
|
2188
|
+
return message;
|
|
2189
|
+
} finally {
|
|
2190
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2191
|
+
}
|
|
2192
|
+
},
|
|
2193
|
+
|
|
2194
|
+
fromJSON(object: any): ListClaudeEnterpriseBilledUsageResponse {
|
|
2195
|
+
return {
|
|
2196
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
2197
|
+
rows: globalThis.Array.isArray(object?.rows)
|
|
2198
|
+
? object.rows.map((e: any) => ClaudeEnterpriseBilledUsageRow.fromJSON(e))
|
|
2199
|
+
: [],
|
|
2200
|
+
nextPageToken: isSet(object.nextPageToken)
|
|
2201
|
+
? globalThis.String(object.nextPageToken)
|
|
2202
|
+
: isSet(object.next_page_token)
|
|
2203
|
+
? globalThis.String(object.next_page_token)
|
|
2204
|
+
: "",
|
|
2205
|
+
total: isSet(object.total) ? ClaudeEnterpriseBilledUsageRow.fromJSON(object.total) : undefined,
|
|
2206
|
+
};
|
|
2207
|
+
},
|
|
2208
|
+
|
|
2209
|
+
toJSON(message: ListClaudeEnterpriseBilledUsageResponse): unknown {
|
|
2210
|
+
const obj: any = {};
|
|
2211
|
+
if (message.status !== undefined) {
|
|
2212
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
2213
|
+
}
|
|
2214
|
+
if (message.rows?.length) {
|
|
2215
|
+
obj.rows = message.rows.map((e) => ClaudeEnterpriseBilledUsageRow.toJSON(e));
|
|
2216
|
+
}
|
|
2217
|
+
if (message.nextPageToken !== "") {
|
|
2218
|
+
obj.nextPageToken = message.nextPageToken;
|
|
2219
|
+
}
|
|
2220
|
+
if (message.total !== undefined) {
|
|
2221
|
+
obj.total = ClaudeEnterpriseBilledUsageRow.toJSON(message.total);
|
|
2222
|
+
}
|
|
2223
|
+
return obj;
|
|
2224
|
+
},
|
|
2225
|
+
|
|
2226
|
+
create<I extends Exact<DeepPartial<ListClaudeEnterpriseBilledUsageResponse>, I>>(
|
|
2227
|
+
base?: I,
|
|
2228
|
+
): ListClaudeEnterpriseBilledUsageResponse {
|
|
2229
|
+
return ListClaudeEnterpriseBilledUsageResponse.fromPartial(base ?? ({} as any));
|
|
2230
|
+
},
|
|
2231
|
+
fromPartial<I extends Exact<DeepPartial<ListClaudeEnterpriseBilledUsageResponse>, I>>(
|
|
2232
|
+
object: I,
|
|
2233
|
+
): ListClaudeEnterpriseBilledUsageResponse {
|
|
2234
|
+
const message = createBaseListClaudeEnterpriseBilledUsageResponse();
|
|
2235
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
2236
|
+
? ResponseStatus.fromPartial(object.status)
|
|
2237
|
+
: undefined;
|
|
2238
|
+
message.rows = object.rows?.map((e) => ClaudeEnterpriseBilledUsageRow.fromPartial(e)) || [];
|
|
2239
|
+
message.nextPageToken = object.nextPageToken ?? "";
|
|
2240
|
+
message.total = (object.total !== undefined && object.total !== null)
|
|
2241
|
+
? ClaudeEnterpriseBilledUsageRow.fromPartial(object.total)
|
|
2242
|
+
: undefined;
|
|
2243
|
+
return message;
|
|
2244
|
+
},
|
|
2245
|
+
};
|
|
2246
|
+
|
|
2247
|
+
function createBaseClaudeEnterpriseBilledUsageRow(): ClaudeEnterpriseBilledUsageRow {
|
|
2248
|
+
return {
|
|
2249
|
+
key: "",
|
|
2250
|
+
uncachedInputTokens: 0,
|
|
2251
|
+
cacheReadTokens: 0,
|
|
2252
|
+
cacheWriteTokens: 0,
|
|
2253
|
+
outputTokens: 0,
|
|
2254
|
+
requests: 0,
|
|
2255
|
+
amountUsd: 0,
|
|
2256
|
+
listAmountUsd: 0,
|
|
2257
|
+
email: "",
|
|
2258
|
+
};
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
export const ClaudeEnterpriseBilledUsageRow: MessageFns<ClaudeEnterpriseBilledUsageRow> = {
|
|
2262
|
+
encode(message: ClaudeEnterpriseBilledUsageRow, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2263
|
+
if (message.key !== "") {
|
|
2264
|
+
writer.uint32(10).string(message.key);
|
|
2265
|
+
}
|
|
2266
|
+
if (message.uncachedInputTokens !== 0) {
|
|
2267
|
+
writer.uint32(16).uint64(message.uncachedInputTokens);
|
|
2268
|
+
}
|
|
2269
|
+
if (message.cacheReadTokens !== 0) {
|
|
2270
|
+
writer.uint32(24).uint64(message.cacheReadTokens);
|
|
2271
|
+
}
|
|
2272
|
+
if (message.cacheWriteTokens !== 0) {
|
|
2273
|
+
writer.uint32(32).uint64(message.cacheWriteTokens);
|
|
2274
|
+
}
|
|
2275
|
+
if (message.outputTokens !== 0) {
|
|
2276
|
+
writer.uint32(40).uint64(message.outputTokens);
|
|
2277
|
+
}
|
|
2278
|
+
if (message.requests !== 0) {
|
|
2279
|
+
writer.uint32(48).uint64(message.requests);
|
|
2280
|
+
}
|
|
2281
|
+
if (message.amountUsd !== 0) {
|
|
2282
|
+
writer.uint32(57).double(message.amountUsd);
|
|
2283
|
+
}
|
|
2284
|
+
if (message.listAmountUsd !== 0) {
|
|
2285
|
+
writer.uint32(65).double(message.listAmountUsd);
|
|
2286
|
+
}
|
|
2287
|
+
if (message.email !== "") {
|
|
2288
|
+
writer.uint32(74).string(message.email);
|
|
2289
|
+
}
|
|
2290
|
+
return writer;
|
|
2291
|
+
},
|
|
2292
|
+
|
|
2293
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClaudeEnterpriseBilledUsageRow {
|
|
2294
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2295
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2296
|
+
if (previousRecursionDepth >= 100) {
|
|
2297
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2298
|
+
}
|
|
2299
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2300
|
+
try {
|
|
2301
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2302
|
+
const message = createBaseClaudeEnterpriseBilledUsageRow();
|
|
2303
|
+
while (reader.pos < end) {
|
|
2304
|
+
const tag = reader.uint32();
|
|
2305
|
+
switch (tag >>> 3) {
|
|
2306
|
+
case 1: {
|
|
2307
|
+
if (tag !== 10) {
|
|
2308
|
+
break;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
message.key = reader.string();
|
|
2312
|
+
continue;
|
|
2313
|
+
}
|
|
2314
|
+
case 2: {
|
|
2315
|
+
if (tag !== 16) {
|
|
2316
|
+
break;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
message.uncachedInputTokens = longToNumber(reader.uint64());
|
|
2320
|
+
continue;
|
|
2321
|
+
}
|
|
2322
|
+
case 3: {
|
|
2323
|
+
if (tag !== 24) {
|
|
2324
|
+
break;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
message.cacheReadTokens = longToNumber(reader.uint64());
|
|
2328
|
+
continue;
|
|
2329
|
+
}
|
|
2330
|
+
case 4: {
|
|
2331
|
+
if (tag !== 32) {
|
|
2332
|
+
break;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
message.cacheWriteTokens = longToNumber(reader.uint64());
|
|
2336
|
+
continue;
|
|
2337
|
+
}
|
|
2338
|
+
case 5: {
|
|
2339
|
+
if (tag !== 40) {
|
|
2340
|
+
break;
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
message.outputTokens = longToNumber(reader.uint64());
|
|
2344
|
+
continue;
|
|
2345
|
+
}
|
|
2346
|
+
case 6: {
|
|
2347
|
+
if (tag !== 48) {
|
|
2348
|
+
break;
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
message.requests = longToNumber(reader.uint64());
|
|
2352
|
+
continue;
|
|
2353
|
+
}
|
|
2354
|
+
case 7: {
|
|
2355
|
+
if (tag !== 57) {
|
|
2356
|
+
break;
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
message.amountUsd = reader.double();
|
|
2360
|
+
continue;
|
|
2361
|
+
}
|
|
2362
|
+
case 8: {
|
|
2363
|
+
if (tag !== 65) {
|
|
2364
|
+
break;
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
message.listAmountUsd = reader.double();
|
|
2368
|
+
continue;
|
|
2369
|
+
}
|
|
2370
|
+
case 9: {
|
|
2371
|
+
if (tag !== 74) {
|
|
2372
|
+
break;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
message.email = reader.string();
|
|
2376
|
+
continue;
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2380
|
+
break;
|
|
2381
|
+
}
|
|
2382
|
+
reader.skip(tag & 7);
|
|
2383
|
+
}
|
|
2384
|
+
return message;
|
|
2385
|
+
} finally {
|
|
2386
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2387
|
+
}
|
|
2388
|
+
},
|
|
2389
|
+
|
|
2390
|
+
fromJSON(object: any): ClaudeEnterpriseBilledUsageRow {
|
|
2391
|
+
return {
|
|
2392
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
2393
|
+
uncachedInputTokens: isSet(object.uncachedInputTokens)
|
|
2394
|
+
? globalThis.Number(object.uncachedInputTokens)
|
|
2395
|
+
: isSet(object.uncached_input_tokens)
|
|
2396
|
+
? globalThis.Number(object.uncached_input_tokens)
|
|
2397
|
+
: 0,
|
|
2398
|
+
cacheReadTokens: isSet(object.cacheReadTokens)
|
|
2399
|
+
? globalThis.Number(object.cacheReadTokens)
|
|
2400
|
+
: isSet(object.cache_read_tokens)
|
|
2401
|
+
? globalThis.Number(object.cache_read_tokens)
|
|
2402
|
+
: 0,
|
|
2403
|
+
cacheWriteTokens: isSet(object.cacheWriteTokens)
|
|
2404
|
+
? globalThis.Number(object.cacheWriteTokens)
|
|
2405
|
+
: isSet(object.cache_write_tokens)
|
|
2406
|
+
? globalThis.Number(object.cache_write_tokens)
|
|
2407
|
+
: 0,
|
|
2408
|
+
outputTokens: isSet(object.outputTokens)
|
|
2409
|
+
? globalThis.Number(object.outputTokens)
|
|
2410
|
+
: isSet(object.output_tokens)
|
|
2411
|
+
? globalThis.Number(object.output_tokens)
|
|
2412
|
+
: 0,
|
|
2413
|
+
requests: isSet(object.requests) ? globalThis.Number(object.requests) : 0,
|
|
2414
|
+
amountUsd: isSet(object.amountUsd)
|
|
2415
|
+
? globalThis.Number(object.amountUsd)
|
|
2416
|
+
: isSet(object.amount_usd)
|
|
2417
|
+
? globalThis.Number(object.amount_usd)
|
|
2418
|
+
: 0,
|
|
2419
|
+
listAmountUsd: isSet(object.listAmountUsd)
|
|
2420
|
+
? globalThis.Number(object.listAmountUsd)
|
|
2421
|
+
: isSet(object.list_amount_usd)
|
|
2422
|
+
? globalThis.Number(object.list_amount_usd)
|
|
2423
|
+
: 0,
|
|
2424
|
+
email: isSet(object.email) ? globalThis.String(object.email) : "",
|
|
2425
|
+
};
|
|
2426
|
+
},
|
|
2427
|
+
|
|
2428
|
+
toJSON(message: ClaudeEnterpriseBilledUsageRow): unknown {
|
|
2429
|
+
const obj: any = {};
|
|
2430
|
+
if (message.key !== "") {
|
|
2431
|
+
obj.key = message.key;
|
|
2432
|
+
}
|
|
2433
|
+
if (message.uncachedInputTokens !== 0) {
|
|
2434
|
+
obj.uncachedInputTokens = Math.round(message.uncachedInputTokens);
|
|
2435
|
+
}
|
|
2436
|
+
if (message.cacheReadTokens !== 0) {
|
|
2437
|
+
obj.cacheReadTokens = Math.round(message.cacheReadTokens);
|
|
2438
|
+
}
|
|
2439
|
+
if (message.cacheWriteTokens !== 0) {
|
|
2440
|
+
obj.cacheWriteTokens = Math.round(message.cacheWriteTokens);
|
|
2441
|
+
}
|
|
2442
|
+
if (message.outputTokens !== 0) {
|
|
2443
|
+
obj.outputTokens = Math.round(message.outputTokens);
|
|
2444
|
+
}
|
|
2445
|
+
if (message.requests !== 0) {
|
|
2446
|
+
obj.requests = Math.round(message.requests);
|
|
2447
|
+
}
|
|
2448
|
+
if (message.amountUsd !== 0) {
|
|
2449
|
+
obj.amountUsd = floatToJson(message.amountUsd);
|
|
2450
|
+
}
|
|
2451
|
+
if (message.listAmountUsd !== 0) {
|
|
2452
|
+
obj.listAmountUsd = floatToJson(message.listAmountUsd);
|
|
2453
|
+
}
|
|
2454
|
+
if (message.email !== "") {
|
|
2455
|
+
obj.email = message.email;
|
|
2456
|
+
}
|
|
2457
|
+
return obj;
|
|
2458
|
+
},
|
|
2459
|
+
|
|
2460
|
+
create<I extends Exact<DeepPartial<ClaudeEnterpriseBilledUsageRow>, I>>(base?: I): ClaudeEnterpriseBilledUsageRow {
|
|
2461
|
+
return ClaudeEnterpriseBilledUsageRow.fromPartial(base ?? ({} as any));
|
|
2462
|
+
},
|
|
2463
|
+
fromPartial<I extends Exact<DeepPartial<ClaudeEnterpriseBilledUsageRow>, I>>(
|
|
2464
|
+
object: I,
|
|
2465
|
+
): ClaudeEnterpriseBilledUsageRow {
|
|
2466
|
+
const message = createBaseClaudeEnterpriseBilledUsageRow();
|
|
2467
|
+
message.key = object.key ?? "";
|
|
2468
|
+
message.uncachedInputTokens = object.uncachedInputTokens ?? 0;
|
|
2469
|
+
message.cacheReadTokens = object.cacheReadTokens ?? 0;
|
|
2470
|
+
message.cacheWriteTokens = object.cacheWriteTokens ?? 0;
|
|
2471
|
+
message.outputTokens = object.outputTokens ?? 0;
|
|
2472
|
+
message.requests = object.requests ?? 0;
|
|
2473
|
+
message.amountUsd = object.amountUsd ?? 0;
|
|
2474
|
+
message.listAmountUsd = object.listAmountUsd ?? 0;
|
|
2475
|
+
message.email = object.email ?? "";
|
|
2476
|
+
return message;
|
|
2477
|
+
},
|
|
2478
|
+
};
|
|
2479
|
+
|
|
2480
|
+
function createBaseGetClaudeEnterpriseSeatAdoptionRequest(): GetClaudeEnterpriseSeatAdoptionRequest {
|
|
2481
|
+
return { organizationId: "", startTime: undefined, endTime: undefined };
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
export const GetClaudeEnterpriseSeatAdoptionRequest: MessageFns<GetClaudeEnterpriseSeatAdoptionRequest> = {
|
|
2485
|
+
encode(message: GetClaudeEnterpriseSeatAdoptionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2486
|
+
if (message.organizationId !== "") {
|
|
2487
|
+
writer.uint32(10).string(message.organizationId);
|
|
2488
|
+
}
|
|
2489
|
+
if (message.startTime !== undefined) {
|
|
2490
|
+
Timestamp.encode(toTimestamp(message.startTime), writer.uint32(18).fork()).join();
|
|
2491
|
+
}
|
|
2492
|
+
if (message.endTime !== undefined) {
|
|
2493
|
+
Timestamp.encode(toTimestamp(message.endTime), writer.uint32(26).fork()).join();
|
|
2494
|
+
}
|
|
2495
|
+
return writer;
|
|
2496
|
+
},
|
|
2497
|
+
|
|
2498
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetClaudeEnterpriseSeatAdoptionRequest {
|
|
2499
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2500
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2501
|
+
if (previousRecursionDepth >= 100) {
|
|
2502
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2503
|
+
}
|
|
2504
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2505
|
+
try {
|
|
2506
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2507
|
+
const message = createBaseGetClaudeEnterpriseSeatAdoptionRequest();
|
|
2508
|
+
while (reader.pos < end) {
|
|
2509
|
+
const tag = reader.uint32();
|
|
2510
|
+
switch (tag >>> 3) {
|
|
2511
|
+
case 1: {
|
|
2512
|
+
if (tag !== 10) {
|
|
2513
|
+
break;
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
message.organizationId = reader.string();
|
|
2517
|
+
continue;
|
|
2518
|
+
}
|
|
2519
|
+
case 2: {
|
|
2520
|
+
if (tag !== 18) {
|
|
2521
|
+
break;
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2525
|
+
continue;
|
|
2526
|
+
}
|
|
2527
|
+
case 3: {
|
|
2528
|
+
if (tag !== 26) {
|
|
2529
|
+
break;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2533
|
+
continue;
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2537
|
+
break;
|
|
2538
|
+
}
|
|
2539
|
+
reader.skip(tag & 7);
|
|
2540
|
+
}
|
|
2541
|
+
return message;
|
|
2542
|
+
} finally {
|
|
2543
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2544
|
+
}
|
|
2545
|
+
},
|
|
2546
|
+
|
|
2547
|
+
fromJSON(object: any): GetClaudeEnterpriseSeatAdoptionRequest {
|
|
2548
|
+
return {
|
|
2549
|
+
organizationId: isSet(object.organizationId)
|
|
2550
|
+
? globalThis.String(object.organizationId)
|
|
2551
|
+
: isSet(object.organization_id)
|
|
2552
|
+
? globalThis.String(object.organization_id)
|
|
2553
|
+
: "",
|
|
2554
|
+
startTime: isSet(object.startTime)
|
|
2555
|
+
? fromJsonTimestamp(object.startTime)
|
|
2556
|
+
: isSet(object.start_time)
|
|
2557
|
+
? fromJsonTimestamp(object.start_time)
|
|
2558
|
+
: undefined,
|
|
2559
|
+
endTime: isSet(object.endTime)
|
|
2560
|
+
? fromJsonTimestamp(object.endTime)
|
|
2561
|
+
: isSet(object.end_time)
|
|
2562
|
+
? fromJsonTimestamp(object.end_time)
|
|
2563
|
+
: undefined,
|
|
2564
|
+
};
|
|
2565
|
+
},
|
|
2566
|
+
|
|
2567
|
+
toJSON(message: GetClaudeEnterpriseSeatAdoptionRequest): unknown {
|
|
2568
|
+
const obj: any = {};
|
|
2569
|
+
if (message.organizationId !== "") {
|
|
2570
|
+
obj.organizationId = message.organizationId;
|
|
2571
|
+
}
|
|
2572
|
+
if (message.startTime !== undefined) {
|
|
2573
|
+
obj.startTime = message.startTime.toISOString();
|
|
2574
|
+
}
|
|
2575
|
+
if (message.endTime !== undefined) {
|
|
2576
|
+
obj.endTime = message.endTime.toISOString();
|
|
2577
|
+
}
|
|
2578
|
+
return obj;
|
|
2579
|
+
},
|
|
2580
|
+
|
|
2581
|
+
create<I extends Exact<DeepPartial<GetClaudeEnterpriseSeatAdoptionRequest>, I>>(
|
|
2582
|
+
base?: I,
|
|
2583
|
+
): GetClaudeEnterpriseSeatAdoptionRequest {
|
|
2584
|
+
return GetClaudeEnterpriseSeatAdoptionRequest.fromPartial(base ?? ({} as any));
|
|
2585
|
+
},
|
|
2586
|
+
fromPartial<I extends Exact<DeepPartial<GetClaudeEnterpriseSeatAdoptionRequest>, I>>(
|
|
2587
|
+
object: I,
|
|
2588
|
+
): GetClaudeEnterpriseSeatAdoptionRequest {
|
|
2589
|
+
const message = createBaseGetClaudeEnterpriseSeatAdoptionRequest();
|
|
2590
|
+
message.organizationId = object.organizationId ?? "";
|
|
2591
|
+
message.startTime = object.startTime ?? undefined;
|
|
2592
|
+
message.endTime = object.endTime ?? undefined;
|
|
2593
|
+
return message;
|
|
2594
|
+
},
|
|
2595
|
+
};
|
|
2596
|
+
|
|
2597
|
+
function createBaseGetClaudeEnterpriseSeatAdoptionResponse(): GetClaudeEnterpriseSeatAdoptionResponse {
|
|
2598
|
+
return { status: undefined, days: [] };
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
export const GetClaudeEnterpriseSeatAdoptionResponse: MessageFns<GetClaudeEnterpriseSeatAdoptionResponse> = {
|
|
2602
|
+
encode(message: GetClaudeEnterpriseSeatAdoptionResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2603
|
+
if (message.status !== undefined) {
|
|
2604
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
2605
|
+
}
|
|
2606
|
+
for (const v of message.days) {
|
|
2607
|
+
ClaudeEnterpriseSeatAdoptionDay.encode(v!, writer.uint32(18).fork()).join();
|
|
2608
|
+
}
|
|
2609
|
+
return writer;
|
|
2610
|
+
},
|
|
2611
|
+
|
|
2612
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetClaudeEnterpriseSeatAdoptionResponse {
|
|
2613
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2614
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2615
|
+
if (previousRecursionDepth >= 100) {
|
|
2616
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2617
|
+
}
|
|
2618
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2619
|
+
try {
|
|
2620
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2621
|
+
const message = createBaseGetClaudeEnterpriseSeatAdoptionResponse();
|
|
2622
|
+
while (reader.pos < end) {
|
|
2623
|
+
const tag = reader.uint32();
|
|
2624
|
+
switch (tag >>> 3) {
|
|
2625
|
+
case 1: {
|
|
2626
|
+
if (tag !== 10) {
|
|
2627
|
+
break;
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
2631
|
+
continue;
|
|
2632
|
+
}
|
|
2633
|
+
case 2: {
|
|
2634
|
+
if (tag !== 18) {
|
|
2635
|
+
break;
|
|
2636
|
+
}
|
|
2637
|
+
|
|
2638
|
+
message.days.push(ClaudeEnterpriseSeatAdoptionDay.decode(reader, reader.uint32()));
|
|
2639
|
+
continue;
|
|
2640
|
+
}
|
|
2641
|
+
}
|
|
2642
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2643
|
+
break;
|
|
2644
|
+
}
|
|
2645
|
+
reader.skip(tag & 7);
|
|
2646
|
+
}
|
|
2647
|
+
return message;
|
|
2648
|
+
} finally {
|
|
2649
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
|
|
2653
|
+
fromJSON(object: any): GetClaudeEnterpriseSeatAdoptionResponse {
|
|
2654
|
+
return {
|
|
2655
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
2656
|
+
days: globalThis.Array.isArray(object?.days)
|
|
2657
|
+
? object.days.map((e: any) => ClaudeEnterpriseSeatAdoptionDay.fromJSON(e))
|
|
2658
|
+
: [],
|
|
2659
|
+
};
|
|
2660
|
+
},
|
|
2661
|
+
|
|
2662
|
+
toJSON(message: GetClaudeEnterpriseSeatAdoptionResponse): unknown {
|
|
2663
|
+
const obj: any = {};
|
|
2664
|
+
if (message.status !== undefined) {
|
|
2665
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
2666
|
+
}
|
|
2667
|
+
if (message.days?.length) {
|
|
2668
|
+
obj.days = message.days.map((e) => ClaudeEnterpriseSeatAdoptionDay.toJSON(e));
|
|
2669
|
+
}
|
|
2670
|
+
return obj;
|
|
2671
|
+
},
|
|
2672
|
+
|
|
2673
|
+
create<I extends Exact<DeepPartial<GetClaudeEnterpriseSeatAdoptionResponse>, I>>(
|
|
2674
|
+
base?: I,
|
|
2675
|
+
): GetClaudeEnterpriseSeatAdoptionResponse {
|
|
2676
|
+
return GetClaudeEnterpriseSeatAdoptionResponse.fromPartial(base ?? ({} as any));
|
|
2677
|
+
},
|
|
2678
|
+
fromPartial<I extends Exact<DeepPartial<GetClaudeEnterpriseSeatAdoptionResponse>, I>>(
|
|
2679
|
+
object: I,
|
|
2680
|
+
): GetClaudeEnterpriseSeatAdoptionResponse {
|
|
2681
|
+
const message = createBaseGetClaudeEnterpriseSeatAdoptionResponse();
|
|
2682
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
2683
|
+
? ResponseStatus.fromPartial(object.status)
|
|
2684
|
+
: undefined;
|
|
2685
|
+
message.days = object.days?.map((e) => ClaudeEnterpriseSeatAdoptionDay.fromPartial(e)) || [];
|
|
2686
|
+
return message;
|
|
2687
|
+
},
|
|
2688
|
+
};
|
|
2689
|
+
|
|
2690
|
+
function createBaseClaudeEnterpriseSeatAdoptionDay(): ClaudeEnterpriseSeatAdoptionDay {
|
|
2691
|
+
return {
|
|
2692
|
+
day: "",
|
|
2693
|
+
assignedSeats: undefined,
|
|
2694
|
+
pendingInvites: undefined,
|
|
2695
|
+
dailyActiveUsers: undefined,
|
|
2696
|
+
weeklyActiveUsers: undefined,
|
|
2697
|
+
monthlyActiveUsers: undefined,
|
|
2698
|
+
products: [],
|
|
2699
|
+
};
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
export const ClaudeEnterpriseSeatAdoptionDay: MessageFns<ClaudeEnterpriseSeatAdoptionDay> = {
|
|
2703
|
+
encode(message: ClaudeEnterpriseSeatAdoptionDay, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2704
|
+
if (message.day !== "") {
|
|
2705
|
+
writer.uint32(10).string(message.day);
|
|
2706
|
+
}
|
|
2707
|
+
if (message.assignedSeats !== undefined) {
|
|
2708
|
+
writer.uint32(16).int64(message.assignedSeats);
|
|
2709
|
+
}
|
|
2710
|
+
if (message.pendingInvites !== undefined) {
|
|
2711
|
+
writer.uint32(24).int64(message.pendingInvites);
|
|
2712
|
+
}
|
|
2713
|
+
if (message.dailyActiveUsers !== undefined) {
|
|
2714
|
+
writer.uint32(32).int64(message.dailyActiveUsers);
|
|
2715
|
+
}
|
|
2716
|
+
if (message.weeklyActiveUsers !== undefined) {
|
|
2717
|
+
writer.uint32(40).int64(message.weeklyActiveUsers);
|
|
2718
|
+
}
|
|
2719
|
+
if (message.monthlyActiveUsers !== undefined) {
|
|
2720
|
+
writer.uint32(48).int64(message.monthlyActiveUsers);
|
|
2721
|
+
}
|
|
2722
|
+
for (const v of message.products) {
|
|
2723
|
+
ClaudeEnterpriseProductActiveUsers.encode(v!, writer.uint32(58).fork()).join();
|
|
2724
|
+
}
|
|
2725
|
+
return writer;
|
|
2726
|
+
},
|
|
2727
|
+
|
|
2728
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClaudeEnterpriseSeatAdoptionDay {
|
|
2729
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2730
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2731
|
+
if (previousRecursionDepth >= 100) {
|
|
2732
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2733
|
+
}
|
|
2734
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2735
|
+
try {
|
|
2736
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2737
|
+
const message = createBaseClaudeEnterpriseSeatAdoptionDay();
|
|
2738
|
+
while (reader.pos < end) {
|
|
2739
|
+
const tag = reader.uint32();
|
|
2740
|
+
switch (tag >>> 3) {
|
|
2741
|
+
case 1: {
|
|
2742
|
+
if (tag !== 10) {
|
|
2743
|
+
break;
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2746
|
+
message.day = reader.string();
|
|
2747
|
+
continue;
|
|
2748
|
+
}
|
|
2749
|
+
case 2: {
|
|
2750
|
+
if (tag !== 16) {
|
|
2751
|
+
break;
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
message.assignedSeats = longToNumber(reader.int64());
|
|
2755
|
+
continue;
|
|
2756
|
+
}
|
|
2757
|
+
case 3: {
|
|
2758
|
+
if (tag !== 24) {
|
|
2759
|
+
break;
|
|
2760
|
+
}
|
|
2761
|
+
|
|
2762
|
+
message.pendingInvites = longToNumber(reader.int64());
|
|
2763
|
+
continue;
|
|
2764
|
+
}
|
|
2765
|
+
case 4: {
|
|
2766
|
+
if (tag !== 32) {
|
|
2767
|
+
break;
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
message.dailyActiveUsers = longToNumber(reader.int64());
|
|
2771
|
+
continue;
|
|
2772
|
+
}
|
|
2773
|
+
case 5: {
|
|
2774
|
+
if (tag !== 40) {
|
|
2775
|
+
break;
|
|
2776
|
+
}
|
|
2777
|
+
|
|
2778
|
+
message.weeklyActiveUsers = longToNumber(reader.int64());
|
|
2779
|
+
continue;
|
|
2780
|
+
}
|
|
2781
|
+
case 6: {
|
|
2782
|
+
if (tag !== 48) {
|
|
2783
|
+
break;
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
message.monthlyActiveUsers = longToNumber(reader.int64());
|
|
2787
|
+
continue;
|
|
2788
|
+
}
|
|
2789
|
+
case 7: {
|
|
2790
|
+
if (tag !== 58) {
|
|
2791
|
+
break;
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2794
|
+
message.products.push(ClaudeEnterpriseProductActiveUsers.decode(reader, reader.uint32()));
|
|
2795
|
+
continue;
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2799
|
+
break;
|
|
2800
|
+
}
|
|
2801
|
+
reader.skip(tag & 7);
|
|
2802
|
+
}
|
|
2803
|
+
return message;
|
|
2804
|
+
} finally {
|
|
2805
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2806
|
+
}
|
|
2807
|
+
},
|
|
2808
|
+
|
|
2809
|
+
fromJSON(object: any): ClaudeEnterpriseSeatAdoptionDay {
|
|
2810
|
+
return {
|
|
2811
|
+
day: isSet(object.day) ? globalThis.String(object.day) : "",
|
|
2812
|
+
assignedSeats: isSet(object.assignedSeats)
|
|
2813
|
+
? globalThis.Number(object.assignedSeats)
|
|
2814
|
+
: isSet(object.assigned_seats)
|
|
2815
|
+
? globalThis.Number(object.assigned_seats)
|
|
2816
|
+
: undefined,
|
|
2817
|
+
pendingInvites: isSet(object.pendingInvites)
|
|
2818
|
+
? globalThis.Number(object.pendingInvites)
|
|
2819
|
+
: isSet(object.pending_invites)
|
|
2820
|
+
? globalThis.Number(object.pending_invites)
|
|
2821
|
+
: undefined,
|
|
2822
|
+
dailyActiveUsers: isSet(object.dailyActiveUsers)
|
|
2823
|
+
? globalThis.Number(object.dailyActiveUsers)
|
|
2824
|
+
: isSet(object.daily_active_users)
|
|
2825
|
+
? globalThis.Number(object.daily_active_users)
|
|
2826
|
+
: undefined,
|
|
2827
|
+
weeklyActiveUsers: isSet(object.weeklyActiveUsers)
|
|
2828
|
+
? globalThis.Number(object.weeklyActiveUsers)
|
|
2829
|
+
: isSet(object.weekly_active_users)
|
|
2830
|
+
? globalThis.Number(object.weekly_active_users)
|
|
2831
|
+
: undefined,
|
|
2832
|
+
monthlyActiveUsers: isSet(object.monthlyActiveUsers)
|
|
2833
|
+
? globalThis.Number(object.monthlyActiveUsers)
|
|
2834
|
+
: isSet(object.monthly_active_users)
|
|
2835
|
+
? globalThis.Number(object.monthly_active_users)
|
|
2836
|
+
: undefined,
|
|
2837
|
+
products: globalThis.Array.isArray(object?.products)
|
|
2838
|
+
? object.products.map((e: any) => ClaudeEnterpriseProductActiveUsers.fromJSON(e))
|
|
2839
|
+
: [],
|
|
2840
|
+
};
|
|
2841
|
+
},
|
|
2842
|
+
|
|
2843
|
+
toJSON(message: ClaudeEnterpriseSeatAdoptionDay): unknown {
|
|
2844
|
+
const obj: any = {};
|
|
2845
|
+
if (message.day !== "") {
|
|
2846
|
+
obj.day = message.day;
|
|
2847
|
+
}
|
|
2848
|
+
if (message.assignedSeats !== undefined) {
|
|
2849
|
+
obj.assignedSeats = Math.round(message.assignedSeats);
|
|
2850
|
+
}
|
|
2851
|
+
if (message.pendingInvites !== undefined) {
|
|
2852
|
+
obj.pendingInvites = Math.round(message.pendingInvites);
|
|
2853
|
+
}
|
|
2854
|
+
if (message.dailyActiveUsers !== undefined) {
|
|
2855
|
+
obj.dailyActiveUsers = Math.round(message.dailyActiveUsers);
|
|
2856
|
+
}
|
|
2857
|
+
if (message.weeklyActiveUsers !== undefined) {
|
|
2858
|
+
obj.weeklyActiveUsers = Math.round(message.weeklyActiveUsers);
|
|
2859
|
+
}
|
|
2860
|
+
if (message.monthlyActiveUsers !== undefined) {
|
|
2861
|
+
obj.monthlyActiveUsers = Math.round(message.monthlyActiveUsers);
|
|
2862
|
+
}
|
|
2863
|
+
if (message.products?.length) {
|
|
2864
|
+
obj.products = message.products.map((e) => ClaudeEnterpriseProductActiveUsers.toJSON(e));
|
|
2865
|
+
}
|
|
2866
|
+
return obj;
|
|
2867
|
+
},
|
|
2868
|
+
|
|
2869
|
+
create<I extends Exact<DeepPartial<ClaudeEnterpriseSeatAdoptionDay>, I>>(base?: I): ClaudeEnterpriseSeatAdoptionDay {
|
|
2870
|
+
return ClaudeEnterpriseSeatAdoptionDay.fromPartial(base ?? ({} as any));
|
|
2871
|
+
},
|
|
2872
|
+
fromPartial<I extends Exact<DeepPartial<ClaudeEnterpriseSeatAdoptionDay>, I>>(
|
|
2873
|
+
object: I,
|
|
2874
|
+
): ClaudeEnterpriseSeatAdoptionDay {
|
|
2875
|
+
const message = createBaseClaudeEnterpriseSeatAdoptionDay();
|
|
2876
|
+
message.day = object.day ?? "";
|
|
2877
|
+
message.assignedSeats = object.assignedSeats ?? undefined;
|
|
2878
|
+
message.pendingInvites = object.pendingInvites ?? undefined;
|
|
2879
|
+
message.dailyActiveUsers = object.dailyActiveUsers ?? undefined;
|
|
2880
|
+
message.weeklyActiveUsers = object.weeklyActiveUsers ?? undefined;
|
|
2881
|
+
message.monthlyActiveUsers = object.monthlyActiveUsers ?? undefined;
|
|
2882
|
+
message.products = object.products?.map((e) => ClaudeEnterpriseProductActiveUsers.fromPartial(e)) || [];
|
|
2883
|
+
return message;
|
|
2884
|
+
},
|
|
2885
|
+
};
|
|
2886
|
+
|
|
2887
|
+
function createBaseClaudeEnterpriseProductActiveUsers(): ClaudeEnterpriseProductActiveUsers {
|
|
2888
|
+
return { product: "", dailyActiveUsers: undefined, weeklyActiveUsers: undefined, monthlyActiveUsers: undefined };
|
|
2889
|
+
}
|
|
2890
|
+
|
|
2891
|
+
export const ClaudeEnterpriseProductActiveUsers: MessageFns<ClaudeEnterpriseProductActiveUsers> = {
|
|
2892
|
+
encode(message: ClaudeEnterpriseProductActiveUsers, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2893
|
+
if (message.product !== "") {
|
|
2894
|
+
writer.uint32(10).string(message.product);
|
|
2895
|
+
}
|
|
2896
|
+
if (message.dailyActiveUsers !== undefined) {
|
|
2897
|
+
writer.uint32(16).int64(message.dailyActiveUsers);
|
|
2898
|
+
}
|
|
2899
|
+
if (message.weeklyActiveUsers !== undefined) {
|
|
2900
|
+
writer.uint32(24).int64(message.weeklyActiveUsers);
|
|
2901
|
+
}
|
|
2902
|
+
if (message.monthlyActiveUsers !== undefined) {
|
|
2903
|
+
writer.uint32(32).int64(message.monthlyActiveUsers);
|
|
2904
|
+
}
|
|
2905
|
+
return writer;
|
|
2906
|
+
},
|
|
2907
|
+
|
|
2908
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClaudeEnterpriseProductActiveUsers {
|
|
2909
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2910
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2911
|
+
if (previousRecursionDepth >= 100) {
|
|
2912
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2913
|
+
}
|
|
2914
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2915
|
+
try {
|
|
2916
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2917
|
+
const message = createBaseClaudeEnterpriseProductActiveUsers();
|
|
2918
|
+
while (reader.pos < end) {
|
|
2919
|
+
const tag = reader.uint32();
|
|
2920
|
+
switch (tag >>> 3) {
|
|
2921
|
+
case 1: {
|
|
2922
|
+
if (tag !== 10) {
|
|
2923
|
+
break;
|
|
2924
|
+
}
|
|
2925
|
+
|
|
2926
|
+
message.product = reader.string();
|
|
2927
|
+
continue;
|
|
2928
|
+
}
|
|
2929
|
+
case 2: {
|
|
2930
|
+
if (tag !== 16) {
|
|
2931
|
+
break;
|
|
2932
|
+
}
|
|
2933
|
+
|
|
2934
|
+
message.dailyActiveUsers = longToNumber(reader.int64());
|
|
2935
|
+
continue;
|
|
2936
|
+
}
|
|
2937
|
+
case 3: {
|
|
2938
|
+
if (tag !== 24) {
|
|
2939
|
+
break;
|
|
2940
|
+
}
|
|
2941
|
+
|
|
2942
|
+
message.weeklyActiveUsers = longToNumber(reader.int64());
|
|
2943
|
+
continue;
|
|
2944
|
+
}
|
|
2945
|
+
case 4: {
|
|
2946
|
+
if (tag !== 32) {
|
|
2947
|
+
break;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
message.monthlyActiveUsers = longToNumber(reader.int64());
|
|
2951
|
+
continue;
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2955
|
+
break;
|
|
2956
|
+
}
|
|
2957
|
+
reader.skip(tag & 7);
|
|
2958
|
+
}
|
|
2959
|
+
return message;
|
|
2960
|
+
} finally {
|
|
2961
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2962
|
+
}
|
|
2963
|
+
},
|
|
2964
|
+
|
|
2965
|
+
fromJSON(object: any): ClaudeEnterpriseProductActiveUsers {
|
|
2966
|
+
return {
|
|
2967
|
+
product: isSet(object.product) ? globalThis.String(object.product) : "",
|
|
2968
|
+
dailyActiveUsers: isSet(object.dailyActiveUsers)
|
|
2969
|
+
? globalThis.Number(object.dailyActiveUsers)
|
|
2970
|
+
: isSet(object.daily_active_users)
|
|
2971
|
+
? globalThis.Number(object.daily_active_users)
|
|
2972
|
+
: undefined,
|
|
2973
|
+
weeklyActiveUsers: isSet(object.weeklyActiveUsers)
|
|
2974
|
+
? globalThis.Number(object.weeklyActiveUsers)
|
|
2975
|
+
: isSet(object.weekly_active_users)
|
|
2976
|
+
? globalThis.Number(object.weekly_active_users)
|
|
2977
|
+
: undefined,
|
|
2978
|
+
monthlyActiveUsers: isSet(object.monthlyActiveUsers)
|
|
2979
|
+
? globalThis.Number(object.monthlyActiveUsers)
|
|
2980
|
+
: isSet(object.monthly_active_users)
|
|
2981
|
+
? globalThis.Number(object.monthly_active_users)
|
|
2982
|
+
: undefined,
|
|
2983
|
+
};
|
|
2984
|
+
},
|
|
2985
|
+
|
|
2986
|
+
toJSON(message: ClaudeEnterpriseProductActiveUsers): unknown {
|
|
2987
|
+
const obj: any = {};
|
|
2988
|
+
if (message.product !== "") {
|
|
2989
|
+
obj.product = message.product;
|
|
2990
|
+
}
|
|
2991
|
+
if (message.dailyActiveUsers !== undefined) {
|
|
2992
|
+
obj.dailyActiveUsers = Math.round(message.dailyActiveUsers);
|
|
2993
|
+
}
|
|
2994
|
+
if (message.weeklyActiveUsers !== undefined) {
|
|
2995
|
+
obj.weeklyActiveUsers = Math.round(message.weeklyActiveUsers);
|
|
2996
|
+
}
|
|
2997
|
+
if (message.monthlyActiveUsers !== undefined) {
|
|
2998
|
+
obj.monthlyActiveUsers = Math.round(message.monthlyActiveUsers);
|
|
2999
|
+
}
|
|
3000
|
+
return obj;
|
|
3001
|
+
},
|
|
3002
|
+
|
|
3003
|
+
create<I extends Exact<DeepPartial<ClaudeEnterpriseProductActiveUsers>, I>>(
|
|
3004
|
+
base?: I,
|
|
3005
|
+
): ClaudeEnterpriseProductActiveUsers {
|
|
3006
|
+
return ClaudeEnterpriseProductActiveUsers.fromPartial(base ?? ({} as any));
|
|
3007
|
+
},
|
|
3008
|
+
fromPartial<I extends Exact<DeepPartial<ClaudeEnterpriseProductActiveUsers>, I>>(
|
|
3009
|
+
object: I,
|
|
3010
|
+
): ClaudeEnterpriseProductActiveUsers {
|
|
3011
|
+
const message = createBaseClaudeEnterpriseProductActiveUsers();
|
|
3012
|
+
message.product = object.product ?? "";
|
|
3013
|
+
message.dailyActiveUsers = object.dailyActiveUsers ?? undefined;
|
|
3014
|
+
message.weeklyActiveUsers = object.weeklyActiveUsers ?? undefined;
|
|
3015
|
+
message.monthlyActiveUsers = object.monthlyActiveUsers ?? undefined;
|
|
3016
|
+
return message;
|
|
3017
|
+
},
|
|
3018
|
+
};
|
|
3019
|
+
|
|
3020
|
+
function createBaseListClaudeEnterpriseMembersRequest(): ListClaudeEnterpriseMembersRequest {
|
|
3021
|
+
return { organizationId: "", filter: undefined, sort: 0, pageSize: 0, pageToken: "" };
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
export const ListClaudeEnterpriseMembersRequest: MessageFns<ListClaudeEnterpriseMembersRequest> = {
|
|
3025
|
+
encode(message: ListClaudeEnterpriseMembersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3026
|
+
if (message.organizationId !== "") {
|
|
3027
|
+
writer.uint32(10).string(message.organizationId);
|
|
3028
|
+
}
|
|
3029
|
+
if (message.filter !== undefined) {
|
|
3030
|
+
ClaudeEnterpriseMemberFilter.encode(message.filter, writer.uint32(18).fork()).join();
|
|
3031
|
+
}
|
|
3032
|
+
if (message.sort !== 0) {
|
|
3033
|
+
writer.uint32(24).int32(message.sort);
|
|
3034
|
+
}
|
|
3035
|
+
if (message.pageSize !== 0) {
|
|
3036
|
+
writer.uint32(32).int32(message.pageSize);
|
|
3037
|
+
}
|
|
3038
|
+
if (message.pageToken !== "") {
|
|
3039
|
+
writer.uint32(42).string(message.pageToken);
|
|
3040
|
+
}
|
|
3041
|
+
return writer;
|
|
3042
|
+
},
|
|
3043
|
+
|
|
3044
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListClaudeEnterpriseMembersRequest {
|
|
3045
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3046
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3047
|
+
if (previousRecursionDepth >= 100) {
|
|
3048
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3049
|
+
}
|
|
3050
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3051
|
+
try {
|
|
3052
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3053
|
+
const message = createBaseListClaudeEnterpriseMembersRequest();
|
|
3054
|
+
while (reader.pos < end) {
|
|
3055
|
+
const tag = reader.uint32();
|
|
3056
|
+
switch (tag >>> 3) {
|
|
3057
|
+
case 1: {
|
|
3058
|
+
if (tag !== 10) {
|
|
3059
|
+
break;
|
|
3060
|
+
}
|
|
3061
|
+
|
|
3062
|
+
message.organizationId = reader.string();
|
|
3063
|
+
continue;
|
|
3064
|
+
}
|
|
3065
|
+
case 2: {
|
|
3066
|
+
if (tag !== 18) {
|
|
3067
|
+
break;
|
|
3068
|
+
}
|
|
3069
|
+
|
|
3070
|
+
message.filter = ClaudeEnterpriseMemberFilter.decode(reader, reader.uint32());
|
|
3071
|
+
continue;
|
|
3072
|
+
}
|
|
3073
|
+
case 3: {
|
|
3074
|
+
if (tag !== 24) {
|
|
3075
|
+
break;
|
|
3076
|
+
}
|
|
3077
|
+
|
|
3078
|
+
message.sort = reader.int32() as any;
|
|
3079
|
+
continue;
|
|
3080
|
+
}
|
|
3081
|
+
case 4: {
|
|
3082
|
+
if (tag !== 32) {
|
|
3083
|
+
break;
|
|
3084
|
+
}
|
|
3085
|
+
|
|
3086
|
+
message.pageSize = reader.int32();
|
|
3087
|
+
continue;
|
|
3088
|
+
}
|
|
3089
|
+
case 5: {
|
|
3090
|
+
if (tag !== 42) {
|
|
3091
|
+
break;
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
message.pageToken = reader.string();
|
|
3095
|
+
continue;
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3098
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3099
|
+
break;
|
|
3100
|
+
}
|
|
3101
|
+
reader.skip(tag & 7);
|
|
3102
|
+
}
|
|
3103
|
+
return message;
|
|
3104
|
+
} finally {
|
|
3105
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3106
|
+
}
|
|
3107
|
+
},
|
|
3108
|
+
|
|
3109
|
+
fromJSON(object: any): ListClaudeEnterpriseMembersRequest {
|
|
3110
|
+
return {
|
|
3111
|
+
organizationId: isSet(object.organizationId)
|
|
3112
|
+
? globalThis.String(object.organizationId)
|
|
3113
|
+
: isSet(object.organization_id)
|
|
3114
|
+
? globalThis.String(object.organization_id)
|
|
3115
|
+
: "",
|
|
3116
|
+
filter: isSet(object.filter) ? ClaudeEnterpriseMemberFilter.fromJSON(object.filter) : undefined,
|
|
3117
|
+
sort: isSet(object.sort) ? claudeEnterpriseMemberSortFromJSON(object.sort) : 0,
|
|
3118
|
+
pageSize: isSet(object.pageSize)
|
|
3119
|
+
? globalThis.Number(object.pageSize)
|
|
3120
|
+
: isSet(object.page_size)
|
|
3121
|
+
? globalThis.Number(object.page_size)
|
|
3122
|
+
: 0,
|
|
3123
|
+
pageToken: isSet(object.pageToken)
|
|
3124
|
+
? globalThis.String(object.pageToken)
|
|
3125
|
+
: isSet(object.page_token)
|
|
3126
|
+
? globalThis.String(object.page_token)
|
|
3127
|
+
: "",
|
|
3128
|
+
};
|
|
3129
|
+
},
|
|
3130
|
+
|
|
3131
|
+
toJSON(message: ListClaudeEnterpriseMembersRequest): unknown {
|
|
3132
|
+
const obj: any = {};
|
|
3133
|
+
if (message.organizationId !== "") {
|
|
3134
|
+
obj.organizationId = message.organizationId;
|
|
3135
|
+
}
|
|
3136
|
+
if (message.filter !== undefined) {
|
|
3137
|
+
obj.filter = ClaudeEnterpriseMemberFilter.toJSON(message.filter);
|
|
3138
|
+
}
|
|
3139
|
+
if (message.sort !== 0) {
|
|
3140
|
+
obj.sort = claudeEnterpriseMemberSortToJSON(message.sort);
|
|
3141
|
+
}
|
|
3142
|
+
if (message.pageSize !== 0) {
|
|
3143
|
+
obj.pageSize = Math.round(message.pageSize);
|
|
3144
|
+
}
|
|
3145
|
+
if (message.pageToken !== "") {
|
|
3146
|
+
obj.pageToken = message.pageToken;
|
|
3147
|
+
}
|
|
3148
|
+
return obj;
|
|
3149
|
+
},
|
|
3150
|
+
|
|
3151
|
+
create<I extends Exact<DeepPartial<ListClaudeEnterpriseMembersRequest>, I>>(
|
|
3152
|
+
base?: I,
|
|
3153
|
+
): ListClaudeEnterpriseMembersRequest {
|
|
3154
|
+
return ListClaudeEnterpriseMembersRequest.fromPartial(base ?? ({} as any));
|
|
3155
|
+
},
|
|
3156
|
+
fromPartial<I extends Exact<DeepPartial<ListClaudeEnterpriseMembersRequest>, I>>(
|
|
3157
|
+
object: I,
|
|
3158
|
+
): ListClaudeEnterpriseMembersRequest {
|
|
3159
|
+
const message = createBaseListClaudeEnterpriseMembersRequest();
|
|
3160
|
+
message.organizationId = object.organizationId ?? "";
|
|
3161
|
+
message.filter = (object.filter !== undefined && object.filter !== null)
|
|
3162
|
+
? ClaudeEnterpriseMemberFilter.fromPartial(object.filter)
|
|
3163
|
+
: undefined;
|
|
3164
|
+
message.sort = object.sort ?? 0;
|
|
3165
|
+
message.pageSize = object.pageSize ?? 0;
|
|
3166
|
+
message.pageToken = object.pageToken ?? "";
|
|
3167
|
+
return message;
|
|
3168
|
+
},
|
|
3169
|
+
};
|
|
3170
|
+
|
|
3171
|
+
function createBaseClaudeEnterpriseMemberFilter(): ClaudeEnterpriseMemberFilter {
|
|
3172
|
+
return { search: "", idleDays: 0 };
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3175
|
+
export const ClaudeEnterpriseMemberFilter: MessageFns<ClaudeEnterpriseMemberFilter> = {
|
|
3176
|
+
encode(message: ClaudeEnterpriseMemberFilter, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3177
|
+
if (message.search !== "") {
|
|
3178
|
+
writer.uint32(10).string(message.search);
|
|
3179
|
+
}
|
|
3180
|
+
if (message.idleDays !== 0) {
|
|
3181
|
+
writer.uint32(16).int32(message.idleDays);
|
|
3182
|
+
}
|
|
3183
|
+
return writer;
|
|
3184
|
+
},
|
|
3185
|
+
|
|
3186
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClaudeEnterpriseMemberFilter {
|
|
3187
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3188
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3189
|
+
if (previousRecursionDepth >= 100) {
|
|
3190
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3191
|
+
}
|
|
3192
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3193
|
+
try {
|
|
3194
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3195
|
+
const message = createBaseClaudeEnterpriseMemberFilter();
|
|
3196
|
+
while (reader.pos < end) {
|
|
3197
|
+
const tag = reader.uint32();
|
|
3198
|
+
switch (tag >>> 3) {
|
|
3199
|
+
case 1: {
|
|
3200
|
+
if (tag !== 10) {
|
|
3201
|
+
break;
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
message.search = reader.string();
|
|
3205
|
+
continue;
|
|
3206
|
+
}
|
|
3207
|
+
case 2: {
|
|
3208
|
+
if (tag !== 16) {
|
|
3209
|
+
break;
|
|
3210
|
+
}
|
|
3211
|
+
|
|
3212
|
+
message.idleDays = reader.int32();
|
|
3213
|
+
continue;
|
|
3214
|
+
}
|
|
3215
|
+
}
|
|
3216
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3217
|
+
break;
|
|
3218
|
+
}
|
|
3219
|
+
reader.skip(tag & 7);
|
|
3220
|
+
}
|
|
3221
|
+
return message;
|
|
3222
|
+
} finally {
|
|
3223
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3224
|
+
}
|
|
3225
|
+
},
|
|
3226
|
+
|
|
3227
|
+
fromJSON(object: any): ClaudeEnterpriseMemberFilter {
|
|
3228
|
+
return {
|
|
3229
|
+
search: isSet(object.search) ? globalThis.String(object.search) : "",
|
|
3230
|
+
idleDays: isSet(object.idleDays)
|
|
3231
|
+
? globalThis.Number(object.idleDays)
|
|
3232
|
+
: isSet(object.idle_days)
|
|
3233
|
+
? globalThis.Number(object.idle_days)
|
|
3234
|
+
: 0,
|
|
3235
|
+
};
|
|
3236
|
+
},
|
|
3237
|
+
|
|
3238
|
+
toJSON(message: ClaudeEnterpriseMemberFilter): unknown {
|
|
3239
|
+
const obj: any = {};
|
|
3240
|
+
if (message.search !== "") {
|
|
3241
|
+
obj.search = message.search;
|
|
3242
|
+
}
|
|
3243
|
+
if (message.idleDays !== 0) {
|
|
3244
|
+
obj.idleDays = Math.round(message.idleDays);
|
|
3245
|
+
}
|
|
3246
|
+
return obj;
|
|
3247
|
+
},
|
|
3248
|
+
|
|
3249
|
+
create<I extends Exact<DeepPartial<ClaudeEnterpriseMemberFilter>, I>>(base?: I): ClaudeEnterpriseMemberFilter {
|
|
3250
|
+
return ClaudeEnterpriseMemberFilter.fromPartial(base ?? ({} as any));
|
|
3251
|
+
},
|
|
3252
|
+
fromPartial<I extends Exact<DeepPartial<ClaudeEnterpriseMemberFilter>, I>>(object: I): ClaudeEnterpriseMemberFilter {
|
|
3253
|
+
const message = createBaseClaudeEnterpriseMemberFilter();
|
|
3254
|
+
message.search = object.search ?? "";
|
|
3255
|
+
message.idleDays = object.idleDays ?? 0;
|
|
3256
|
+
return message;
|
|
3257
|
+
},
|
|
3258
|
+
};
|
|
3259
|
+
|
|
3260
|
+
function createBaseListClaudeEnterpriseMembersResponse(): ListClaudeEnterpriseMembersResponse {
|
|
3261
|
+
return { status: undefined, members: [], nextPageToken: "", totalCount: undefined };
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3264
|
+
export const ListClaudeEnterpriseMembersResponse: MessageFns<ListClaudeEnterpriseMembersResponse> = {
|
|
3265
|
+
encode(message: ListClaudeEnterpriseMembersResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3266
|
+
if (message.status !== undefined) {
|
|
3267
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
3268
|
+
}
|
|
3269
|
+
for (const v of message.members) {
|
|
3270
|
+
ClaudeEnterpriseMember.encode(v!, writer.uint32(18).fork()).join();
|
|
3271
|
+
}
|
|
3272
|
+
if (message.nextPageToken !== "") {
|
|
3273
|
+
writer.uint32(26).string(message.nextPageToken);
|
|
3274
|
+
}
|
|
3275
|
+
if (message.totalCount !== undefined) {
|
|
3276
|
+
writer.uint32(32).int64(message.totalCount);
|
|
3277
|
+
}
|
|
3278
|
+
return writer;
|
|
3279
|
+
},
|
|
3280
|
+
|
|
3281
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ListClaudeEnterpriseMembersResponse {
|
|
3282
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3283
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3284
|
+
if (previousRecursionDepth >= 100) {
|
|
3285
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3286
|
+
}
|
|
3287
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3288
|
+
try {
|
|
3289
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3290
|
+
const message = createBaseListClaudeEnterpriseMembersResponse();
|
|
3291
|
+
while (reader.pos < end) {
|
|
3292
|
+
const tag = reader.uint32();
|
|
3293
|
+
switch (tag >>> 3) {
|
|
3294
|
+
case 1: {
|
|
3295
|
+
if (tag !== 10) {
|
|
3296
|
+
break;
|
|
3297
|
+
}
|
|
3298
|
+
|
|
3299
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
3300
|
+
continue;
|
|
3301
|
+
}
|
|
3302
|
+
case 2: {
|
|
3303
|
+
if (tag !== 18) {
|
|
3304
|
+
break;
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3307
|
+
message.members.push(ClaudeEnterpriseMember.decode(reader, reader.uint32()));
|
|
3308
|
+
continue;
|
|
3309
|
+
}
|
|
3310
|
+
case 3: {
|
|
3311
|
+
if (tag !== 26) {
|
|
3312
|
+
break;
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3315
|
+
message.nextPageToken = reader.string();
|
|
3316
|
+
continue;
|
|
3317
|
+
}
|
|
3318
|
+
case 4: {
|
|
3319
|
+
if (tag !== 32) {
|
|
3320
|
+
break;
|
|
3321
|
+
}
|
|
3322
|
+
|
|
3323
|
+
message.totalCount = longToNumber(reader.int64());
|
|
3324
|
+
continue;
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3328
|
+
break;
|
|
3329
|
+
}
|
|
3330
|
+
reader.skip(tag & 7);
|
|
3331
|
+
}
|
|
3332
|
+
return message;
|
|
3333
|
+
} finally {
|
|
3334
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3335
|
+
}
|
|
3336
|
+
},
|
|
3337
|
+
|
|
3338
|
+
fromJSON(object: any): ListClaudeEnterpriseMembersResponse {
|
|
3339
|
+
return {
|
|
3340
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
3341
|
+
members: globalThis.Array.isArray(object?.members)
|
|
3342
|
+
? object.members.map((e: any) => ClaudeEnterpriseMember.fromJSON(e))
|
|
3343
|
+
: [],
|
|
3344
|
+
nextPageToken: isSet(object.nextPageToken)
|
|
3345
|
+
? globalThis.String(object.nextPageToken)
|
|
3346
|
+
: isSet(object.next_page_token)
|
|
3347
|
+
? globalThis.String(object.next_page_token)
|
|
3348
|
+
: "",
|
|
3349
|
+
totalCount: isSet(object.totalCount)
|
|
3350
|
+
? globalThis.Number(object.totalCount)
|
|
3351
|
+
: isSet(object.total_count)
|
|
3352
|
+
? globalThis.Number(object.total_count)
|
|
3353
|
+
: undefined,
|
|
3354
|
+
};
|
|
3355
|
+
},
|
|
3356
|
+
|
|
3357
|
+
toJSON(message: ListClaudeEnterpriseMembersResponse): unknown {
|
|
3358
|
+
const obj: any = {};
|
|
3359
|
+
if (message.status !== undefined) {
|
|
3360
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
3361
|
+
}
|
|
3362
|
+
if (message.members?.length) {
|
|
3363
|
+
obj.members = message.members.map((e) => ClaudeEnterpriseMember.toJSON(e));
|
|
3364
|
+
}
|
|
3365
|
+
if (message.nextPageToken !== "") {
|
|
3366
|
+
obj.nextPageToken = message.nextPageToken;
|
|
3367
|
+
}
|
|
3368
|
+
if (message.totalCount !== undefined) {
|
|
3369
|
+
obj.totalCount = Math.round(message.totalCount);
|
|
3370
|
+
}
|
|
3371
|
+
return obj;
|
|
3372
|
+
},
|
|
3373
|
+
|
|
3374
|
+
create<I extends Exact<DeepPartial<ListClaudeEnterpriseMembersResponse>, I>>(
|
|
3375
|
+
base?: I,
|
|
3376
|
+
): ListClaudeEnterpriseMembersResponse {
|
|
3377
|
+
return ListClaudeEnterpriseMembersResponse.fromPartial(base ?? ({} as any));
|
|
3378
|
+
},
|
|
3379
|
+
fromPartial<I extends Exact<DeepPartial<ListClaudeEnterpriseMembersResponse>, I>>(
|
|
3380
|
+
object: I,
|
|
3381
|
+
): ListClaudeEnterpriseMembersResponse {
|
|
3382
|
+
const message = createBaseListClaudeEnterpriseMembersResponse();
|
|
3383
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
3384
|
+
? ResponseStatus.fromPartial(object.status)
|
|
3385
|
+
: undefined;
|
|
3386
|
+
message.members = object.members?.map((e) => ClaudeEnterpriseMember.fromPartial(e)) || [];
|
|
3387
|
+
message.nextPageToken = object.nextPageToken ?? "";
|
|
3388
|
+
message.totalCount = object.totalCount ?? undefined;
|
|
3389
|
+
return message;
|
|
3390
|
+
},
|
|
3391
|
+
};
|
|
3392
|
+
|
|
3393
|
+
function createBaseClaudeEnterpriseMember(): ClaudeEnterpriseMember {
|
|
3394
|
+
return { userId: "", email: "", name: "", role: "", lastActivityDate: "" };
|
|
3395
|
+
}
|
|
3396
|
+
|
|
3397
|
+
export const ClaudeEnterpriseMember: MessageFns<ClaudeEnterpriseMember> = {
|
|
3398
|
+
encode(message: ClaudeEnterpriseMember, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3399
|
+
if (message.userId !== "") {
|
|
3400
|
+
writer.uint32(10).string(message.userId);
|
|
3401
|
+
}
|
|
3402
|
+
if (message.email !== "") {
|
|
3403
|
+
writer.uint32(18).string(message.email);
|
|
3404
|
+
}
|
|
3405
|
+
if (message.name !== "") {
|
|
3406
|
+
writer.uint32(26).string(message.name);
|
|
3407
|
+
}
|
|
3408
|
+
if (message.role !== "") {
|
|
3409
|
+
writer.uint32(34).string(message.role);
|
|
3410
|
+
}
|
|
3411
|
+
if (message.lastActivityDate !== "") {
|
|
3412
|
+
writer.uint32(42).string(message.lastActivityDate);
|
|
3413
|
+
}
|
|
3414
|
+
return writer;
|
|
3415
|
+
},
|
|
3416
|
+
|
|
3417
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClaudeEnterpriseMember {
|
|
3418
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3419
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3420
|
+
if (previousRecursionDepth >= 100) {
|
|
3421
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3422
|
+
}
|
|
3423
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3424
|
+
try {
|
|
3425
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3426
|
+
const message = createBaseClaudeEnterpriseMember();
|
|
3427
|
+
while (reader.pos < end) {
|
|
3428
|
+
const tag = reader.uint32();
|
|
3429
|
+
switch (tag >>> 3) {
|
|
3430
|
+
case 1: {
|
|
3431
|
+
if (tag !== 10) {
|
|
3432
|
+
break;
|
|
3433
|
+
}
|
|
3434
|
+
|
|
3435
|
+
message.userId = reader.string();
|
|
3436
|
+
continue;
|
|
3437
|
+
}
|
|
3438
|
+
case 2: {
|
|
3439
|
+
if (tag !== 18) {
|
|
3440
|
+
break;
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
message.email = reader.string();
|
|
3444
|
+
continue;
|
|
3445
|
+
}
|
|
3446
|
+
case 3: {
|
|
3447
|
+
if (tag !== 26) {
|
|
3448
|
+
break;
|
|
3449
|
+
}
|
|
3450
|
+
|
|
3451
|
+
message.name = reader.string();
|
|
3452
|
+
continue;
|
|
3453
|
+
}
|
|
3454
|
+
case 4: {
|
|
3455
|
+
if (tag !== 34) {
|
|
3456
|
+
break;
|
|
3457
|
+
}
|
|
3458
|
+
|
|
3459
|
+
message.role = reader.string();
|
|
3460
|
+
continue;
|
|
3461
|
+
}
|
|
3462
|
+
case 5: {
|
|
3463
|
+
if (tag !== 42) {
|
|
3464
|
+
break;
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
message.lastActivityDate = reader.string();
|
|
3468
|
+
continue;
|
|
3469
|
+
}
|
|
3470
|
+
}
|
|
3471
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
3472
|
+
break;
|
|
3473
|
+
}
|
|
3474
|
+
reader.skip(tag & 7);
|
|
3475
|
+
}
|
|
3476
|
+
return message;
|
|
3477
|
+
} finally {
|
|
3478
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3479
|
+
}
|
|
3480
|
+
},
|
|
3481
|
+
|
|
3482
|
+
fromJSON(object: any): ClaudeEnterpriseMember {
|
|
3483
|
+
return {
|
|
3484
|
+
userId: isSet(object.userId)
|
|
3485
|
+
? globalThis.String(object.userId)
|
|
3486
|
+
: isSet(object.user_id)
|
|
3487
|
+
? globalThis.String(object.user_id)
|
|
3488
|
+
: "",
|
|
3489
|
+
email: isSet(object.email) ? globalThis.String(object.email) : "",
|
|
3490
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
3491
|
+
role: isSet(object.role) ? globalThis.String(object.role) : "",
|
|
3492
|
+
lastActivityDate: isSet(object.lastActivityDate)
|
|
3493
|
+
? globalThis.String(object.lastActivityDate)
|
|
3494
|
+
: isSet(object.last_activity_date)
|
|
3495
|
+
? globalThis.String(object.last_activity_date)
|
|
3496
|
+
: "",
|
|
3497
|
+
};
|
|
3498
|
+
},
|
|
3499
|
+
|
|
3500
|
+
toJSON(message: ClaudeEnterpriseMember): unknown {
|
|
3501
|
+
const obj: any = {};
|
|
3502
|
+
if (message.userId !== "") {
|
|
3503
|
+
obj.userId = message.userId;
|
|
3504
|
+
}
|
|
3505
|
+
if (message.email !== "") {
|
|
3506
|
+
obj.email = message.email;
|
|
3507
|
+
}
|
|
3508
|
+
if (message.name !== "") {
|
|
3509
|
+
obj.name = message.name;
|
|
3510
|
+
}
|
|
3511
|
+
if (message.role !== "") {
|
|
3512
|
+
obj.role = message.role;
|
|
3513
|
+
}
|
|
3514
|
+
if (message.lastActivityDate !== "") {
|
|
3515
|
+
obj.lastActivityDate = message.lastActivityDate;
|
|
3516
|
+
}
|
|
3517
|
+
return obj;
|
|
3518
|
+
},
|
|
3519
|
+
|
|
3520
|
+
create<I extends Exact<DeepPartial<ClaudeEnterpriseMember>, I>>(base?: I): ClaudeEnterpriseMember {
|
|
3521
|
+
return ClaudeEnterpriseMember.fromPartial(base ?? ({} as any));
|
|
3522
|
+
},
|
|
3523
|
+
fromPartial<I extends Exact<DeepPartial<ClaudeEnterpriseMember>, I>>(object: I): ClaudeEnterpriseMember {
|
|
3524
|
+
const message = createBaseClaudeEnterpriseMember();
|
|
3525
|
+
message.userId = object.userId ?? "";
|
|
3526
|
+
message.email = object.email ?? "";
|
|
3527
|
+
message.name = object.name ?? "";
|
|
3528
|
+
message.role = object.role ?? "";
|
|
3529
|
+
message.lastActivityDate = object.lastActivityDate ?? "";
|
|
3530
|
+
return message;
|
|
3531
|
+
},
|
|
3532
|
+
};
|
|
3533
|
+
|
|
3534
|
+
/**
|
|
3535
|
+
* An organization's Claude Enterprise account: an org admin connects read-only Anthropic keys, each checked against
|
|
3536
|
+
* Anthropic before it is stored, and Terma reads what Anthropic reports for the connected Anthropic organization. An
|
|
3537
|
+
* organization-level surface, never a team's. Terma only. Reads of one person's figures (a USER dimension, the member
|
|
3538
|
+
* directory) need the org admin role. An organization with no key reads as never connected, from the moment its last
|
|
3539
|
+
* key is deleted. These figures report the same calls AIGatewayService does: a client never adds the two.
|
|
3540
|
+
*
|
|
3541
|
+
* The reads serve what pulls since the key now serving usage reports was saved wrote: a replaced key, which may reach
|
|
3542
|
+
* another Anthropic organization, serves nothing until a pull with it succeeds. (An older key that serves again after
|
|
3543
|
+
* a newer one is deleted also serves the newer key's rows of the same Anthropic organization.) Figures are the newest
|
|
3544
|
+
* Anthropic published at the last pull. Days on or after the sync status's settled_through may still be revised and
|
|
3545
|
+
* change on a later pull; days in its owed backfill range are not read yet and are missing from a window that reaches
|
|
3546
|
+
* them.
|
|
3547
|
+
*/
|
|
3548
|
+
export interface ClaudeEnterpriseGatewayService {
|
|
3549
|
+
/**
|
|
3550
|
+
* The connection, its keys and its last usage pull. can_manage tells the client whether to offer adding and
|
|
3551
|
+
* deleting keys.
|
|
3552
|
+
*/
|
|
3553
|
+
GetClaudeEnterpriseConnector(
|
|
3554
|
+
request: GetClaudeEnterpriseConnectorRequest,
|
|
3555
|
+
metadata?: Metadata,
|
|
3556
|
+
): Promise<GetClaudeEnterpriseConnectorResponse>;
|
|
3557
|
+
/**
|
|
3558
|
+
* Org admin. Anthropic must accept the key for its usage reports or a compliance read, or it is not stored and
|
|
3559
|
+
* the status is STATUS_CODE_VALIDATION_ERROR naming the reason, Anthropic's own words included. The first key
|
|
3560
|
+
* creates the connection, every key sets its billing model, and a stored key whose capabilities the new key all
|
|
3561
|
+
* reads is replaced.
|
|
3562
|
+
*/
|
|
3563
|
+
CreateClaudeEnterpriseKey(
|
|
3564
|
+
request: CreateClaudeEnterpriseKeyRequest,
|
|
3565
|
+
metadata?: Metadata,
|
|
3566
|
+
): Promise<CreateClaudeEnterpriseKeyResponse>;
|
|
3567
|
+
/**
|
|
3568
|
+
* Org admin. Deleting the connection's last key disconnects it. STATUS_CODE_NOT_FOUND for a key the
|
|
3569
|
+
* organization's connection does not hold.
|
|
3570
|
+
*/
|
|
3571
|
+
DeleteClaudeEnterpriseKey(
|
|
3572
|
+
request: DeleteClaudeEnterpriseKeyRequest,
|
|
3573
|
+
metadata?: Metadata,
|
|
3574
|
+
): Promise<DeleteClaudeEnterpriseKeyResponse>;
|
|
3575
|
+
/** Org admin. Deletes every key. */
|
|
3576
|
+
DeleteClaudeEnterpriseConnection(
|
|
3577
|
+
request: DeleteClaudeEnterpriseConnectionRequest,
|
|
3578
|
+
metadata?: Metadata,
|
|
3579
|
+
): Promise<DeleteClaudeEnterpriseConnectionResponse>;
|
|
3580
|
+
/** Billed tokens and cost over whole UTC days, one row per dimension value. */
|
|
3581
|
+
ListClaudeEnterpriseBilledUsage(
|
|
3582
|
+
request: ListClaudeEnterpriseBilledUsageRequest,
|
|
3583
|
+
metadata?: Metadata,
|
|
3584
|
+
): Promise<ListClaudeEnterpriseBilledUsageResponse>;
|
|
3585
|
+
/** Seats and active users per UTC day. */
|
|
3586
|
+
GetClaudeEnterpriseSeatAdoption(
|
|
3587
|
+
request: GetClaudeEnterpriseSeatAdoptionRequest,
|
|
3588
|
+
metadata?: Metadata,
|
|
3589
|
+
): Promise<GetClaudeEnterpriseSeatAdoptionResponse>;
|
|
3590
|
+
/** Org admin. The members the latest directory pull listed. */
|
|
3591
|
+
ListClaudeEnterpriseMembers(
|
|
3592
|
+
request: ListClaudeEnterpriseMembersRequest,
|
|
3593
|
+
metadata?: Metadata,
|
|
3594
|
+
): Promise<ListClaudeEnterpriseMembersResponse>;
|
|
3595
|
+
}
|
|
3596
|
+
|
|
3597
|
+
export const ClaudeEnterpriseGatewayServiceServiceName = "gateway.web.v1.ClaudeEnterpriseGatewayService";
|
|
3598
|
+
export class ClaudeEnterpriseGatewayServiceClientImpl implements ClaudeEnterpriseGatewayService {
|
|
3599
|
+
private readonly rpc: Rpc;
|
|
3600
|
+
private readonly service: string;
|
|
3601
|
+
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
3602
|
+
this.service = opts?.service || ClaudeEnterpriseGatewayServiceServiceName;
|
|
3603
|
+
this.rpc = rpc;
|
|
3604
|
+
this.GetClaudeEnterpriseConnector = this.GetClaudeEnterpriseConnector.bind(this);
|
|
3605
|
+
this.CreateClaudeEnterpriseKey = this.CreateClaudeEnterpriseKey.bind(this);
|
|
3606
|
+
this.DeleteClaudeEnterpriseKey = this.DeleteClaudeEnterpriseKey.bind(this);
|
|
3607
|
+
this.DeleteClaudeEnterpriseConnection = this.DeleteClaudeEnterpriseConnection.bind(this);
|
|
3608
|
+
this.ListClaudeEnterpriseBilledUsage = this.ListClaudeEnterpriseBilledUsage.bind(this);
|
|
3609
|
+
this.GetClaudeEnterpriseSeatAdoption = this.GetClaudeEnterpriseSeatAdoption.bind(this);
|
|
3610
|
+
this.ListClaudeEnterpriseMembers = this.ListClaudeEnterpriseMembers.bind(this);
|
|
3611
|
+
}
|
|
3612
|
+
GetClaudeEnterpriseConnector(
|
|
3613
|
+
request: GetClaudeEnterpriseConnectorRequest,
|
|
3614
|
+
metadata?: Metadata,
|
|
3615
|
+
): Promise<GetClaudeEnterpriseConnectorResponse> {
|
|
3616
|
+
const data = GetClaudeEnterpriseConnectorRequest.encode(request).finish();
|
|
3617
|
+
const promise = this.rpc.request(this.service, "GetClaudeEnterpriseConnector", data, metadata);
|
|
3618
|
+
return promise.then((data) => GetClaudeEnterpriseConnectorResponse.decode(new BinaryReader(data)));
|
|
3619
|
+
}
|
|
3620
|
+
|
|
3621
|
+
CreateClaudeEnterpriseKey(
|
|
3622
|
+
request: CreateClaudeEnterpriseKeyRequest,
|
|
3623
|
+
metadata?: Metadata,
|
|
3624
|
+
): Promise<CreateClaudeEnterpriseKeyResponse> {
|
|
3625
|
+
const data = CreateClaudeEnterpriseKeyRequest.encode(request).finish();
|
|
3626
|
+
const promise = this.rpc.request(this.service, "CreateClaudeEnterpriseKey", data, metadata);
|
|
3627
|
+
return promise.then((data) => CreateClaudeEnterpriseKeyResponse.decode(new BinaryReader(data)));
|
|
3628
|
+
}
|
|
3629
|
+
|
|
3630
|
+
DeleteClaudeEnterpriseKey(
|
|
3631
|
+
request: DeleteClaudeEnterpriseKeyRequest,
|
|
3632
|
+
metadata?: Metadata,
|
|
3633
|
+
): Promise<DeleteClaudeEnterpriseKeyResponse> {
|
|
3634
|
+
const data = DeleteClaudeEnterpriseKeyRequest.encode(request).finish();
|
|
3635
|
+
const promise = this.rpc.request(this.service, "DeleteClaudeEnterpriseKey", data, metadata);
|
|
3636
|
+
return promise.then((data) => DeleteClaudeEnterpriseKeyResponse.decode(new BinaryReader(data)));
|
|
3637
|
+
}
|
|
3638
|
+
|
|
3639
|
+
DeleteClaudeEnterpriseConnection(
|
|
3640
|
+
request: DeleteClaudeEnterpriseConnectionRequest,
|
|
3641
|
+
metadata?: Metadata,
|
|
3642
|
+
): Promise<DeleteClaudeEnterpriseConnectionResponse> {
|
|
3643
|
+
const data = DeleteClaudeEnterpriseConnectionRequest.encode(request).finish();
|
|
3644
|
+
const promise = this.rpc.request(this.service, "DeleteClaudeEnterpriseConnection", data, metadata);
|
|
3645
|
+
return promise.then((data) => DeleteClaudeEnterpriseConnectionResponse.decode(new BinaryReader(data)));
|
|
3646
|
+
}
|
|
3647
|
+
|
|
3648
|
+
ListClaudeEnterpriseBilledUsage(
|
|
3649
|
+
request: ListClaudeEnterpriseBilledUsageRequest,
|
|
3650
|
+
metadata?: Metadata,
|
|
3651
|
+
): Promise<ListClaudeEnterpriseBilledUsageResponse> {
|
|
3652
|
+
const data = ListClaudeEnterpriseBilledUsageRequest.encode(request).finish();
|
|
3653
|
+
const promise = this.rpc.request(this.service, "ListClaudeEnterpriseBilledUsage", data, metadata);
|
|
3654
|
+
return promise.then((data) => ListClaudeEnterpriseBilledUsageResponse.decode(new BinaryReader(data)));
|
|
3655
|
+
}
|
|
3656
|
+
|
|
3657
|
+
GetClaudeEnterpriseSeatAdoption(
|
|
3658
|
+
request: GetClaudeEnterpriseSeatAdoptionRequest,
|
|
3659
|
+
metadata?: Metadata,
|
|
3660
|
+
): Promise<GetClaudeEnterpriseSeatAdoptionResponse> {
|
|
3661
|
+
const data = GetClaudeEnterpriseSeatAdoptionRequest.encode(request).finish();
|
|
3662
|
+
const promise = this.rpc.request(this.service, "GetClaudeEnterpriseSeatAdoption", data, metadata);
|
|
3663
|
+
return promise.then((data) => GetClaudeEnterpriseSeatAdoptionResponse.decode(new BinaryReader(data)));
|
|
3664
|
+
}
|
|
3665
|
+
|
|
3666
|
+
ListClaudeEnterpriseMembers(
|
|
3667
|
+
request: ListClaudeEnterpriseMembersRequest,
|
|
3668
|
+
metadata?: Metadata,
|
|
3669
|
+
): Promise<ListClaudeEnterpriseMembersResponse> {
|
|
3670
|
+
const data = ListClaudeEnterpriseMembersRequest.encode(request).finish();
|
|
3671
|
+
const promise = this.rpc.request(this.service, "ListClaudeEnterpriseMembers", data, metadata);
|
|
3672
|
+
return promise.then((data) => ListClaudeEnterpriseMembersResponse.decode(new BinaryReader(data)));
|
|
3673
|
+
}
|
|
3674
|
+
}
|
|
3675
|
+
|
|
3676
|
+
interface Rpc {
|
|
3677
|
+
request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
|
|
3678
|
+
}
|
|
3679
|
+
|
|
3680
|
+
function floatToJson(value: number | null | undefined): number | string | null | undefined {
|
|
3681
|
+
return typeof value === "number" && !globalThis.Number.isFinite(value) ? globalThis.String(value) : value;
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3684
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
3685
|
+
|
|
3686
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
3687
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
3688
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
3689
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
3690
|
+
: Partial<T>;
|
|
3691
|
+
|
|
3692
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
3693
|
+
export type Exact<P, I> = P extends Builtin ? P
|
|
3694
|
+
:
|
|
3695
|
+
& P
|
|
3696
|
+
& { [K in keyof P as Extract<K, keyof I>]: Exact<P[K], I[K & keyof I]> }
|
|
3697
|
+
& { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
1312
3698
|
|
|
1313
3699
|
function toTimestamp(date: Date): Timestamp {
|
|
1314
3700
|
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
@@ -1332,6 +3718,17 @@ function fromJsonTimestamp(o: any): Date {
|
|
|
1332
3718
|
}
|
|
1333
3719
|
}
|
|
1334
3720
|
|
|
3721
|
+
function longToNumber(int64: { toString(): string }): number {
|
|
3722
|
+
const num = globalThis.Number(int64.toString());
|
|
3723
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
3724
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
3725
|
+
}
|
|
3726
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
3727
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
3728
|
+
}
|
|
3729
|
+
return num;
|
|
3730
|
+
}
|
|
3731
|
+
|
|
1335
3732
|
function isSet(value: any): boolean {
|
|
1336
3733
|
return value !== null && value !== undefined;
|
|
1337
3734
|
}
|