@myagentroam/protocol 0.10.12 → 0.10.14

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/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export * from './direct-transfer.js';
13
13
  export * from './terminal-direct.js';
14
14
  export * from './mail-notification.js';
15
15
  export * from './model-usage.js';
16
+ export * from './management-pagination.js';
16
17
  export declare const healthStatusSchema: z.ZodObject<{
17
18
  status: z.ZodLiteral<"ok">;
18
19
  }, "strip", z.ZodTypeAny, {
package/dist/index.js CHANGED
@@ -18,6 +18,7 @@ export * from './direct-transfer.js';
18
18
  export * from './terminal-direct.js';
19
19
  export * from './mail-notification.js';
20
20
  export * from './model-usage.js';
21
+ export * from './management-pagination.js';
21
22
  export const healthStatusSchema = z.object({
22
23
  status: z.literal('ok')
23
24
  });
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ export declare const MANAGEMENT_DEFAULT_LIMIT = 20;
3
+ export declare const MANAGEMENT_MAX_LIMIT = 500;
4
+ export declare const managementPageMetadataSchema: z.ZodObject<{
5
+ page: z.ZodNumber;
6
+ pageSize: z.ZodNumber;
7
+ total: z.ZodNumber;
8
+ hasMore: z.ZodBoolean;
9
+ }, "strip", z.ZodTypeAny, {
10
+ page: number;
11
+ pageSize: number;
12
+ total: number;
13
+ hasMore: boolean;
14
+ }, {
15
+ page: number;
16
+ pageSize: number;
17
+ total: number;
18
+ hasMore: boolean;
19
+ }>;
20
+ export type ManagementPageMetadata = z.infer<typeof managementPageMetadataSchema>;
21
+ export interface ManagementPageQuery {
22
+ readonly page: number;
23
+ readonly limit: number;
24
+ }
25
+ export interface ManagementPage<T> extends ManagementPageMetadata {
26
+ readonly items: readonly T[];
27
+ readonly facets?: {
28
+ readonly tags: readonly string[];
29
+ };
30
+ }
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export const MANAGEMENT_DEFAULT_LIMIT = 20;
3
+ export const MANAGEMENT_MAX_LIMIT = 500;
4
+ export const managementPageMetadataSchema = z.object({
5
+ page: z.number().int().positive().safe(),
6
+ pageSize: z.number().int().min(1).max(MANAGEMENT_MAX_LIMIT),
7
+ total: z.number().int().nonnegative().safe(),
8
+ hasMore: z.boolean()
9
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.10.12",
3
+ "version": "0.10.14",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",