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