@app-vitals/agent-lib 1.72.0 → 1.74.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.
Files changed (2) hide show
  1. package/admin-types.ts +165 -0
  2. package/package.json +1 -1
package/admin-types.ts CHANGED
@@ -4517,6 +4517,153 @@ export interface paths {
4517
4517
  patch?: never;
4518
4518
  trace?: never;
4519
4519
  };
4520
+ "/principals/lookup": {
4521
+ parameters: {
4522
+ query?: never;
4523
+ header?: never;
4524
+ path?: never;
4525
+ cookie?: never;
4526
+ };
4527
+ get?: never;
4528
+ put?: never;
4529
+ /**
4530
+ * Batch-resolve principal ids
4531
+ * @description Admin-only. Resolves AccountMember ids (type user) and Agent ids (type agent) to type and email. Agents have no email (null). Unknown ids are listed in notFound; they are not an error.
4532
+ */
4533
+ post: {
4534
+ parameters: {
4535
+ query?: never;
4536
+ header?: never;
4537
+ path?: never;
4538
+ cookie?: never;
4539
+ };
4540
+ requestBody?: {
4541
+ content: {
4542
+ "application/json": components["schemas"]["PrincipalLookupBody"];
4543
+ };
4544
+ };
4545
+ responses: {
4546
+ /** @description Resolved principals and unknown ids */
4547
+ 200: {
4548
+ headers: {
4549
+ [name: string]: unknown;
4550
+ };
4551
+ content: {
4552
+ "application/json": components["schemas"]["PrincipalLookupResponse"];
4553
+ };
4554
+ };
4555
+ /** @description Bad request */
4556
+ 400: {
4557
+ headers: {
4558
+ [name: string]: unknown;
4559
+ };
4560
+ content: {
4561
+ "application/json": components["schemas"]["Error"];
4562
+ };
4563
+ };
4564
+ /** @description Unauthorized */
4565
+ 401: {
4566
+ headers: {
4567
+ [name: string]: unknown;
4568
+ };
4569
+ content: {
4570
+ "application/json": components["schemas"]["Error"];
4571
+ };
4572
+ };
4573
+ /** @description Forbidden (non-admin caller) */
4574
+ 403: {
4575
+ headers: {
4576
+ [name: string]: unknown;
4577
+ };
4578
+ content: {
4579
+ "application/json": components["schemas"]["Error"];
4580
+ };
4581
+ };
4582
+ };
4583
+ };
4584
+ delete?: never;
4585
+ options?: never;
4586
+ head?: never;
4587
+ patch?: never;
4588
+ trace?: never;
4589
+ };
4590
+ "/principals/by-email": {
4591
+ parameters: {
4592
+ query?: never;
4593
+ header?: never;
4594
+ path?: never;
4595
+ cookie?: never;
4596
+ };
4597
+ /**
4598
+ * Resolve an email to its principal id
4599
+ * @description Admin-only. Case-insensitive (emails are stored lowercased). 404 when no member has the email.
4600
+ */
4601
+ get: {
4602
+ parameters: {
4603
+ query: {
4604
+ email: string;
4605
+ };
4606
+ header?: never;
4607
+ path?: never;
4608
+ cookie?: never;
4609
+ };
4610
+ requestBody?: never;
4611
+ responses: {
4612
+ /** @description Principal */
4613
+ 200: {
4614
+ headers: {
4615
+ [name: string]: unknown;
4616
+ };
4617
+ content: {
4618
+ "application/json": components["schemas"]["Principal"];
4619
+ };
4620
+ };
4621
+ /** @description Bad request */
4622
+ 400: {
4623
+ headers: {
4624
+ [name: string]: unknown;
4625
+ };
4626
+ content: {
4627
+ "application/json": components["schemas"]["Error"];
4628
+ };
4629
+ };
4630
+ /** @description Unauthorized */
4631
+ 401: {
4632
+ headers: {
4633
+ [name: string]: unknown;
4634
+ };
4635
+ content: {
4636
+ "application/json": components["schemas"]["Error"];
4637
+ };
4638
+ };
4639
+ /** @description Forbidden (non-admin caller) */
4640
+ 403: {
4641
+ headers: {
4642
+ [name: string]: unknown;
4643
+ };
4644
+ content: {
4645
+ "application/json": components["schemas"]["Error"];
4646
+ };
4647
+ };
4648
+ /** @description No principal with that email */
4649
+ 404: {
4650
+ headers: {
4651
+ [name: string]: unknown;
4652
+ };
4653
+ content: {
4654
+ "application/json": components["schemas"]["Error"];
4655
+ };
4656
+ };
4657
+ };
4658
+ };
4659
+ put?: never;
4660
+ post?: never;
4661
+ delete?: never;
4662
+ options?: never;
4663
+ head?: never;
4664
+ patch?: never;
4665
+ trace?: never;
4666
+ };
4520
4667
  }
4521
4668
  export type webhooks = Record<string, never>;
4522
4669
  export interface components {
@@ -6158,6 +6305,24 @@ export interface components {
6158
6305
  [key: string]: unknown;
6159
6306
  };
6160
6307
  };
6308
+ PrincipalLookupResponse: {
6309
+ principals: components["schemas"]["Principal"][];
6310
+ notFound: string[];
6311
+ };
6312
+ Principal: {
6313
+ /** @example clx1abc */
6314
+ id: string;
6315
+ /** @enum {string} */
6316
+ type: "user" | "agent";
6317
+ /**
6318
+ * @description null for agents
6319
+ * @example o@acme.com
6320
+ */
6321
+ email: string | null;
6322
+ };
6323
+ PrincipalLookupBody: {
6324
+ ids: string[];
6325
+ };
6161
6326
  };
6162
6327
  responses: never;
6163
6328
  parameters: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-vitals/agent-lib",
3
- "version": "1.72.0",
3
+ "version": "1.74.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/app-vitals/agent.git",