@orq-ai/node 4.16.6 → 4.16.8
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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createtool.js +4 -4
- package/models/operations/getalltools.js +4 -4
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +1 -1
- package/packages/orq-rc/src/funcs/agentsExternalCreate.ts +163 -0
- package/packages/orq-rc/src/funcs/agentsExternalDelete.ts +169 -0
- package/packages/orq-rc/src/funcs/agentsExternalList.ts +172 -0
- package/packages/orq-rc/src/funcs/agentsExternalRefreshCard.ts +174 -0
- package/packages/orq-rc/src/funcs/agentsExternalRetrieve.ts +168 -0
- package/packages/orq-rc/src/funcs/agentsExternalTestConnection.ts +174 -0
- package/packages/orq-rc/src/funcs/agentsExternalUpdate.ts +172 -0
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +2 -2
- package/packages/orq-rc/src/funcs/monitorsCreate.ts +162 -0
- package/packages/orq-rc/src/funcs/monitorsDelete.ts +168 -0
- package/packages/orq-rc/src/funcs/monitorsGet.ts +168 -0
- package/packages/orq-rc/src/funcs/monitorsList.ts +173 -0
- package/packages/orq-rc/src/funcs/monitorsListPresets.ts +144 -0
- package/packages/orq-rc/src/funcs/monitorsUpdate.ts +171 -0
- package/packages/orq-rc/src/funcs/usersCreate.ts +171 -0
- package/packages/orq-rc/src/funcs/usersDelete.ts +168 -0
- package/packages/orq-rc/src/funcs/usersGet.ts +168 -0
- package/packages/orq-rc/src/funcs/usersList.ts +144 -0
- package/packages/orq-rc/src/funcs/usersUpdate.ts +169 -0
- package/packages/orq-rc/src/lib/config.ts +2 -2
- package/packages/orq-rc/src/models/components/autorouterv2config.ts +30 -0
- package/packages/orq-rc/src/models/components/autorouterv2creatorconfig.ts +4 -4
- package/packages/orq-rc/src/models/components/autorouterv2effortconfig.ts +24 -0
- package/packages/orq-rc/src/models/components/createexternalagentrequest.ts +73 -0
- package/packages/orq-rc/src/models/components/createexternalagentresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/createmonitorrequest.ts +108 -0
- package/packages/orq-rc/src/models/components/createmonitorresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/createusersrequest.ts +40 -0
- package/packages/orq-rc/src/models/components/createusersresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/deleteexternalagentresponse.ts +27 -0
- package/packages/orq-rc/src/models/components/deletemonitorresponse.ts +27 -0
- package/packages/orq-rc/src/models/components/deleteuserresponse.ts +27 -0
- package/packages/orq-rc/src/models/components/externalagent.ts +107 -0
- package/packages/orq-rc/src/models/components/externalagentheader.ts +55 -0
- package/packages/orq-rc/src/models/components/getexternalagentresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/getmonitorresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/getuserresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/index.ts +40 -0
- package/packages/orq-rc/src/models/components/listexternalagentsresponse.ts +41 -0
- package/packages/orq-rc/src/models/components/listmonitorpresetsresponse.ts +40 -0
- package/packages/orq-rc/src/models/components/listmonitorsresponse.ts +53 -0
- package/packages/orq-rc/src/models/components/listusersresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/monitor.ts +133 -0
- package/packages/orq-rc/src/models/components/monitorpreset.ts +120 -0
- package/packages/orq-rc/src/models/components/monitortelemetrysource.ts +23 -0
- package/packages/orq-rc/src/models/components/monitorwidget.ts +145 -0
- package/packages/orq-rc/src/models/components/monitorwidgetcompute.ts +61 -0
- package/packages/orq-rc/src/models/components/monitorwidgetdisplay.ts +196 -0
- package/packages/orq-rc/src/models/components/monitorwidgetlayout.ts +75 -0
- package/packages/orq-rc/src/models/components/monitorwidgetquery.ts +165 -0
- package/packages/orq-rc/src/models/components/openaicontextmanagement.ts +43 -0
- package/packages/orq-rc/src/models/components/piiredactionconfig.ts +3 -2
- package/packages/orq-rc/src/models/components/piiredactionplugin.ts +1 -1
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/refreshexternalagentcardrequest.ts +27 -0
- package/packages/orq-rc/src/models/components/refreshexternalagentcardresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/testexternalagentconnectionrequest.ts +27 -0
- package/packages/orq-rc/src/models/components/testexternalagentconnectionresponse.ts +50 -0
- package/packages/orq-rc/src/models/components/thinkingparam.ts +112 -0
- package/packages/orq-rc/src/models/components/updateexternalagentrequest.ts +74 -0
- package/packages/orq-rc/src/models/components/updateexternalagentresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/updatemonitorrequest.ts +80 -0
- package/packages/orq-rc/src/models/components/updatemonitorresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/updateuserrequest.ts +42 -0
- package/packages/orq-rc/src/models/components/updateuserresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/user.ts +90 -0
- package/packages/orq-rc/src/models/components/userinvitationdata.ts +38 -0
- package/packages/orq-rc/src/models/operations/createrouterresponse.ts +24 -0
- package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
- package/packages/orq-rc/src/models/operations/externalagentdelete.ts +36 -0
- package/packages/orq-rc/src/models/operations/externalagentget.ts +36 -0
- package/packages/orq-rc/src/models/operations/externalagentlist.ts +43 -0
- package/packages/orq-rc/src/models/operations/externalagentrefreshcard.ts +45 -0
- package/packages/orq-rc/src/models/operations/externalagenttestconnection.ts +46 -0
- package/packages/orq-rc/src/models/operations/externalagentupdate.ts +42 -0
- package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
- package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/index.ts +14 -0
- package/packages/orq-rc/src/models/operations/monitordelete.ts +39 -0
- package/packages/orq-rc/src/models/operations/monitorget.ts +39 -0
- package/packages/orq-rc/src/models/operations/monitorlist.ts +84 -0
- package/packages/orq-rc/src/models/operations/monitorupdate.ts +44 -0
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
- package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/searchweb.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateagent.ts +16 -11
- package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
- package/packages/orq-rc/src/models/operations/usercreate.ts +44 -0
- package/packages/orq-rc/src/models/operations/userdelete.ts +39 -0
- package/packages/orq-rc/src/models/operations/userget.ts +35 -0
- package/packages/orq-rc/src/models/operations/userupdate.ts +44 -0
- package/packages/orq-rc/src/sdk/agents.ts +7 -1
- package/packages/orq-rc/src/sdk/external.ts +136 -0
- package/packages/orq-rc/src/sdk/monitors.ts +116 -0
- package/packages/orq-rc/src/sdk/sdk.ts +12 -0
- package/packages/orq-rc/src/sdk/users.ts +98 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatetool.ts +4 -4
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import { MonitorWidget, MonitorWidget$inboundSchema } from "./monitorwidget.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Default relative time range applied when the monitor opens.
|
|
15
|
+
*/
|
|
16
|
+
export const DefaultRange = {
|
|
17
|
+
Fivem: "5m",
|
|
18
|
+
Fifteenm: "15m",
|
|
19
|
+
Thirtym: "30m",
|
|
20
|
+
Oneh: "1h",
|
|
21
|
+
Sixh: "6h",
|
|
22
|
+
Twelveh: "12h",
|
|
23
|
+
Oned: "1d",
|
|
24
|
+
Sevend: "7d",
|
|
25
|
+
Fourteend: "14d",
|
|
26
|
+
Thirtyd: "30d",
|
|
27
|
+
Sixtyd: "60d",
|
|
28
|
+
Ninetyd: "90d",
|
|
29
|
+
} as const;
|
|
30
|
+
/**
|
|
31
|
+
* Default relative time range applied when the monitor opens.
|
|
32
|
+
*/
|
|
33
|
+
export type DefaultRange = ClosedEnum<typeof DefaultRange>;
|
|
34
|
+
|
|
35
|
+
export type Monitor = {
|
|
36
|
+
/**
|
|
37
|
+
* Unique monitor identifier assigned by ORQ, for example
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* `monitor_01H...`. Use this value in retrieve, update, and delete
|
|
41
|
+
* requests.
|
|
42
|
+
*/
|
|
43
|
+
monitorId: string;
|
|
44
|
+
/**
|
|
45
|
+
* Workspace-unique display name.
|
|
46
|
+
*/
|
|
47
|
+
displayName: string;
|
|
48
|
+
/**
|
|
49
|
+
* Short human-readable summary of what the monitor tracks.
|
|
50
|
+
*/
|
|
51
|
+
description: string;
|
|
52
|
+
/**
|
|
53
|
+
* Project that owns the monitor. Empty for workspace-wide monitors (admin-managed). Immutable after creation.
|
|
54
|
+
*/
|
|
55
|
+
projectId: string;
|
|
56
|
+
/**
|
|
57
|
+
* Widgets rendered on the monitor, each carrying its own query and
|
|
58
|
+
*
|
|
59
|
+
* @remarks
|
|
60
|
+
* layout position.
|
|
61
|
+
*/
|
|
62
|
+
widgets: Array<MonitorWidget>;
|
|
63
|
+
/**
|
|
64
|
+
* Default relative time range applied when the monitor opens.
|
|
65
|
+
*/
|
|
66
|
+
defaultRange?: DefaultRange | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Preset this monitor was created from. Empty when built from scratch.
|
|
69
|
+
*/
|
|
70
|
+
presetKey: string;
|
|
71
|
+
/**
|
|
72
|
+
* Time when the monitor was created.
|
|
73
|
+
*/
|
|
74
|
+
createdAt: Date;
|
|
75
|
+
/**
|
|
76
|
+
* Time when the monitor was last updated.
|
|
77
|
+
*/
|
|
78
|
+
updatedAt: Date;
|
|
79
|
+
/**
|
|
80
|
+
* User ID that created the monitor.
|
|
81
|
+
*/
|
|
82
|
+
createdById: string;
|
|
83
|
+
/**
|
|
84
|
+
* User ID that last updated the monitor.
|
|
85
|
+
*/
|
|
86
|
+
updatedById: string;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const DefaultRange$inboundSchema: z.ZodNativeEnum<typeof DefaultRange> =
|
|
91
|
+
z.nativeEnum(DefaultRange);
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const Monitor$inboundSchema: z.ZodType<Monitor, z.ZodTypeDef, unknown> =
|
|
95
|
+
z.object({
|
|
96
|
+
monitor_id: z.string(),
|
|
97
|
+
display_name: z.string(),
|
|
98
|
+
description: z.string(),
|
|
99
|
+
project_id: z.string(),
|
|
100
|
+
widgets: z.array(MonitorWidget$inboundSchema),
|
|
101
|
+
default_range: DefaultRange$inboundSchema.optional(),
|
|
102
|
+
preset_key: z.string(),
|
|
103
|
+
created_at: z.string().datetime({ offset: true }).transform(v =>
|
|
104
|
+
new Date(v)
|
|
105
|
+
),
|
|
106
|
+
updated_at: z.string().datetime({ offset: true }).transform(v =>
|
|
107
|
+
new Date(v)
|
|
108
|
+
),
|
|
109
|
+
created_by_id: z.string(),
|
|
110
|
+
updated_by_id: z.string(),
|
|
111
|
+
}).transform((v) => {
|
|
112
|
+
return remap$(v, {
|
|
113
|
+
"monitor_id": "monitorId",
|
|
114
|
+
"display_name": "displayName",
|
|
115
|
+
"project_id": "projectId",
|
|
116
|
+
"default_range": "defaultRange",
|
|
117
|
+
"preset_key": "presetKey",
|
|
118
|
+
"created_at": "createdAt",
|
|
119
|
+
"updated_at": "updatedAt",
|
|
120
|
+
"created_by_id": "createdById",
|
|
121
|
+
"updated_by_id": "updatedById",
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
export function monitorFromJSON(
|
|
126
|
+
jsonString: string,
|
|
127
|
+
): SafeParseResult<Monitor, SDKValidationError> {
|
|
128
|
+
return safeParse(
|
|
129
|
+
jsonString,
|
|
130
|
+
(x) => Monitor$inboundSchema.parse(JSON.parse(x)),
|
|
131
|
+
`Failed to parse 'Monitor' from JSON`,
|
|
132
|
+
);
|
|
133
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import { MonitorWidget, MonitorWidget$inboundSchema } from "./monitorwidget.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Preset kind.
|
|
15
|
+
*/
|
|
16
|
+
export const MonitorPresetKind = {
|
|
17
|
+
Dashboard: "dashboard",
|
|
18
|
+
Widget: "widget",
|
|
19
|
+
} as const;
|
|
20
|
+
/**
|
|
21
|
+
* Preset kind.
|
|
22
|
+
*/
|
|
23
|
+
export type MonitorPresetKind = ClosedEnum<typeof MonitorPresetKind>;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Default relative time range suggested by the preset.
|
|
27
|
+
*/
|
|
28
|
+
export const MonitorPresetDefaultRange = {
|
|
29
|
+
Fivem: "5m",
|
|
30
|
+
Fifteenm: "15m",
|
|
31
|
+
Thirtym: "30m",
|
|
32
|
+
Oneh: "1h",
|
|
33
|
+
Sixh: "6h",
|
|
34
|
+
Twelveh: "12h",
|
|
35
|
+
Oned: "1d",
|
|
36
|
+
Sevend: "7d",
|
|
37
|
+
Fourteend: "14d",
|
|
38
|
+
Thirtyd: "30d",
|
|
39
|
+
Sixtyd: "60d",
|
|
40
|
+
Ninetyd: "90d",
|
|
41
|
+
} as const;
|
|
42
|
+
/**
|
|
43
|
+
* Default relative time range suggested by the preset.
|
|
44
|
+
*/
|
|
45
|
+
export type MonitorPresetDefaultRange = ClosedEnum<
|
|
46
|
+
typeof MonitorPresetDefaultRange
|
|
47
|
+
>;
|
|
48
|
+
|
|
49
|
+
export type MonitorPreset = {
|
|
50
|
+
/**
|
|
51
|
+
* Stable identifier for the preset, e.g. `genai-overview` or
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* `widget-cost-by-model`.
|
|
55
|
+
*/
|
|
56
|
+
presetKey: string;
|
|
57
|
+
/**
|
|
58
|
+
* Human-readable preset name shown in galleries.
|
|
59
|
+
*/
|
|
60
|
+
displayName: string;
|
|
61
|
+
/**
|
|
62
|
+
* What the preset shows and when to use it.
|
|
63
|
+
*/
|
|
64
|
+
description: string;
|
|
65
|
+
/**
|
|
66
|
+
* Preset kind.
|
|
67
|
+
*/
|
|
68
|
+
kind: MonitorPresetKind;
|
|
69
|
+
/**
|
|
70
|
+
* Widgets the preset materializes into a create request. Widget
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* presets carry exactly one entry.
|
|
74
|
+
*/
|
|
75
|
+
widgets: Array<MonitorWidget>;
|
|
76
|
+
/**
|
|
77
|
+
* Default relative time range suggested by the preset.
|
|
78
|
+
*/
|
|
79
|
+
defaultRange?: MonitorPresetDefaultRange | undefined;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const MonitorPresetKind$inboundSchema: z.ZodNativeEnum<
|
|
84
|
+
typeof MonitorPresetKind
|
|
85
|
+
> = z.nativeEnum(MonitorPresetKind);
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const MonitorPresetDefaultRange$inboundSchema: z.ZodNativeEnum<
|
|
89
|
+
typeof MonitorPresetDefaultRange
|
|
90
|
+
> = z.nativeEnum(MonitorPresetDefaultRange);
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const MonitorPreset$inboundSchema: z.ZodType<
|
|
94
|
+
MonitorPreset,
|
|
95
|
+
z.ZodTypeDef,
|
|
96
|
+
unknown
|
|
97
|
+
> = z.object({
|
|
98
|
+
preset_key: z.string(),
|
|
99
|
+
display_name: z.string(),
|
|
100
|
+
description: z.string(),
|
|
101
|
+
kind: MonitorPresetKind$inboundSchema,
|
|
102
|
+
widgets: z.array(MonitorWidget$inboundSchema),
|
|
103
|
+
default_range: MonitorPresetDefaultRange$inboundSchema.optional(),
|
|
104
|
+
}).transform((v) => {
|
|
105
|
+
return remap$(v, {
|
|
106
|
+
"preset_key": "presetKey",
|
|
107
|
+
"display_name": "displayName",
|
|
108
|
+
"default_range": "defaultRange",
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
export function monitorPresetFromJSON(
|
|
113
|
+
jsonString: string,
|
|
114
|
+
): SafeParseResult<MonitorPreset, SDKValidationError> {
|
|
115
|
+
return safeParse(
|
|
116
|
+
jsonString,
|
|
117
|
+
(x) => MonitorPreset$inboundSchema.parse(JSON.parse(x)),
|
|
118
|
+
`Failed to parse 'MonitorPreset' from JSON`,
|
|
119
|
+
);
|
|
120
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const MonitorTelemetrySource = {
|
|
9
|
+
MonitorTelemetrySourceUnspecified: "MONITOR_TELEMETRY_SOURCE_UNSPECIFIED",
|
|
10
|
+
MonitorTelemetrySourceTraces: "MONITOR_TELEMETRY_SOURCE_TRACES",
|
|
11
|
+
MonitorTelemetrySourceMetrics: "MONITOR_TELEMETRY_SOURCE_METRICS",
|
|
12
|
+
MonitorTelemetrySourceLogs: "MONITOR_TELEMETRY_SOURCE_LOGS",
|
|
13
|
+
} as const;
|
|
14
|
+
export type MonitorTelemetrySource = ClosedEnum<typeof MonitorTelemetrySource>;
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const MonitorTelemetrySource$inboundSchema: z.ZodNativeEnum<
|
|
18
|
+
typeof MonitorTelemetrySource
|
|
19
|
+
> = z.nativeEnum(MonitorTelemetrySource);
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const MonitorTelemetrySource$outboundSchema: z.ZodNativeEnum<
|
|
22
|
+
typeof MonitorTelemetrySource
|
|
23
|
+
> = MonitorTelemetrySource$inboundSchema;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
MonitorWidgetDisplay,
|
|
13
|
+
MonitorWidgetDisplay$inboundSchema,
|
|
14
|
+
MonitorWidgetDisplay$Outbound,
|
|
15
|
+
MonitorWidgetDisplay$outboundSchema,
|
|
16
|
+
} from "./monitorwidgetdisplay.js";
|
|
17
|
+
import {
|
|
18
|
+
MonitorWidgetLayout,
|
|
19
|
+
MonitorWidgetLayout$inboundSchema,
|
|
20
|
+
MonitorWidgetLayout$Outbound,
|
|
21
|
+
MonitorWidgetLayout$outboundSchema,
|
|
22
|
+
} from "./monitorwidgetlayout.js";
|
|
23
|
+
import {
|
|
24
|
+
MonitorWidgetQuery,
|
|
25
|
+
MonitorWidgetQuery$inboundSchema,
|
|
26
|
+
MonitorWidgetQuery$Outbound,
|
|
27
|
+
MonitorWidgetQuery$outboundSchema,
|
|
28
|
+
} from "./monitorwidgetquery.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Widget rendering type.
|
|
32
|
+
*/
|
|
33
|
+
export const MonitorWidgetType = {
|
|
34
|
+
Timeseries: "timeseries",
|
|
35
|
+
Toplist: "toplist",
|
|
36
|
+
Table: "table",
|
|
37
|
+
Bignumber: "bignumber",
|
|
38
|
+
Donut: "donut",
|
|
39
|
+
Breakdown: "breakdown",
|
|
40
|
+
} as const;
|
|
41
|
+
/**
|
|
42
|
+
* Widget rendering type.
|
|
43
|
+
*/
|
|
44
|
+
export type MonitorWidgetType = ClosedEnum<typeof MonitorWidgetType>;
|
|
45
|
+
|
|
46
|
+
export type MonitorWidget = {
|
|
47
|
+
/**
|
|
48
|
+
* Widget identifier, unique within the monitor. Provide your own or
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* leave empty to have the server assign one.
|
|
52
|
+
*/
|
|
53
|
+
widgetId: string;
|
|
54
|
+
/**
|
|
55
|
+
* Widget rendering type.
|
|
56
|
+
*/
|
|
57
|
+
type: MonitorWidgetType;
|
|
58
|
+
/**
|
|
59
|
+
* Title shown in the widget header.
|
|
60
|
+
*/
|
|
61
|
+
title: string;
|
|
62
|
+
/**
|
|
63
|
+
* The one query feeding the widget. It maps onto QueryTelemetry; the
|
|
64
|
+
*
|
|
65
|
+
* @remarks
|
|
66
|
+
* viewer's time range, time zone, and the query mode derived from the
|
|
67
|
+
* widget type are supplied at render time.
|
|
68
|
+
*/
|
|
69
|
+
queries: Array<MonitorWidgetQuery>;
|
|
70
|
+
/**
|
|
71
|
+
* Display options such as visualization style and unit. `null` when none are saved.
|
|
72
|
+
*/
|
|
73
|
+
display?: MonitorWidgetDisplay | null | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Position and size on the monitor grid.
|
|
76
|
+
*/
|
|
77
|
+
layout: MonitorWidgetLayout;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const MonitorWidgetType$inboundSchema: z.ZodNativeEnum<
|
|
82
|
+
typeof MonitorWidgetType
|
|
83
|
+
> = z.nativeEnum(MonitorWidgetType);
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const MonitorWidgetType$outboundSchema: z.ZodNativeEnum<
|
|
86
|
+
typeof MonitorWidgetType
|
|
87
|
+
> = MonitorWidgetType$inboundSchema;
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const MonitorWidget$inboundSchema: z.ZodType<
|
|
91
|
+
MonitorWidget,
|
|
92
|
+
z.ZodTypeDef,
|
|
93
|
+
unknown
|
|
94
|
+
> = z.object({
|
|
95
|
+
widget_id: z.string(),
|
|
96
|
+
type: MonitorWidgetType$inboundSchema,
|
|
97
|
+
title: z.string(),
|
|
98
|
+
queries: z.array(MonitorWidgetQuery$inboundSchema),
|
|
99
|
+
display: z.nullable(MonitorWidgetDisplay$inboundSchema).optional(),
|
|
100
|
+
layout: MonitorWidgetLayout$inboundSchema,
|
|
101
|
+
}).transform((v) => {
|
|
102
|
+
return remap$(v, {
|
|
103
|
+
"widget_id": "widgetId",
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
/** @internal */
|
|
107
|
+
export type MonitorWidget$Outbound = {
|
|
108
|
+
widget_id: string;
|
|
109
|
+
type: string;
|
|
110
|
+
title: string;
|
|
111
|
+
queries: Array<MonitorWidgetQuery$Outbound>;
|
|
112
|
+
display?: MonitorWidgetDisplay$Outbound | null | undefined;
|
|
113
|
+
layout: MonitorWidgetLayout$Outbound;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/** @internal */
|
|
117
|
+
export const MonitorWidget$outboundSchema: z.ZodType<
|
|
118
|
+
MonitorWidget$Outbound,
|
|
119
|
+
z.ZodTypeDef,
|
|
120
|
+
MonitorWidget
|
|
121
|
+
> = z.object({
|
|
122
|
+
widgetId: z.string(),
|
|
123
|
+
type: MonitorWidgetType$outboundSchema,
|
|
124
|
+
title: z.string(),
|
|
125
|
+
queries: z.array(MonitorWidgetQuery$outboundSchema),
|
|
126
|
+
display: z.nullable(MonitorWidgetDisplay$outboundSchema).optional(),
|
|
127
|
+
layout: MonitorWidgetLayout$outboundSchema,
|
|
128
|
+
}).transform((v) => {
|
|
129
|
+
return remap$(v, {
|
|
130
|
+
widgetId: "widget_id",
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
export function monitorWidgetToJSON(monitorWidget: MonitorWidget): string {
|
|
135
|
+
return JSON.stringify(MonitorWidget$outboundSchema.parse(monitorWidget));
|
|
136
|
+
}
|
|
137
|
+
export function monitorWidgetFromJSON(
|
|
138
|
+
jsonString: string,
|
|
139
|
+
): SafeParseResult<MonitorWidget, SDKValidationError> {
|
|
140
|
+
return safeParse(
|
|
141
|
+
jsonString,
|
|
142
|
+
(x) => MonitorWidget$inboundSchema.parse(JSON.parse(x)),
|
|
143
|
+
`Failed to parse 'MonitorWidget' from JSON`,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type MonitorWidgetCompute = {
|
|
11
|
+
/**
|
|
12
|
+
* Source-owned metric identifier.
|
|
13
|
+
*/
|
|
14
|
+
metric: string;
|
|
15
|
+
/**
|
|
16
|
+
* Source-owned aggregation operation advertised by telemetry capabilities.
|
|
17
|
+
*/
|
|
18
|
+
operation: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const MonitorWidgetCompute$inboundSchema: z.ZodType<
|
|
23
|
+
MonitorWidgetCompute,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
metric: z.string(),
|
|
28
|
+
operation: z.string(),
|
|
29
|
+
});
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type MonitorWidgetCompute$Outbound = {
|
|
32
|
+
metric: string;
|
|
33
|
+
operation: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const MonitorWidgetCompute$outboundSchema: z.ZodType<
|
|
38
|
+
MonitorWidgetCompute$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
MonitorWidgetCompute
|
|
41
|
+
> = z.object({
|
|
42
|
+
metric: z.string(),
|
|
43
|
+
operation: z.string(),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function monitorWidgetComputeToJSON(
|
|
47
|
+
monitorWidgetCompute: MonitorWidgetCompute,
|
|
48
|
+
): string {
|
|
49
|
+
return JSON.stringify(
|
|
50
|
+
MonitorWidgetCompute$outboundSchema.parse(monitorWidgetCompute),
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
export function monitorWidgetComputeFromJSON(
|
|
54
|
+
jsonString: string,
|
|
55
|
+
): SafeParseResult<MonitorWidgetCompute, SDKValidationError> {
|
|
56
|
+
return safeParse(
|
|
57
|
+
jsonString,
|
|
58
|
+
(x) => MonitorWidgetCompute$inboundSchema.parse(JSON.parse(x)),
|
|
59
|
+
`Failed to parse 'MonitorWidgetCompute' from JSON`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Chart style for timeseries widgets.
|
|
14
|
+
*/
|
|
15
|
+
export const MonitorWidgetDisplayVisualization = {
|
|
16
|
+
Lines: "lines",
|
|
17
|
+
Bars: "bars",
|
|
18
|
+
Area: "area",
|
|
19
|
+
} as const;
|
|
20
|
+
/**
|
|
21
|
+
* Chart style for timeseries widgets.
|
|
22
|
+
*/
|
|
23
|
+
export type MonitorWidgetDisplayVisualization = ClosedEnum<
|
|
24
|
+
typeof MonitorWidgetDisplayVisualization
|
|
25
|
+
>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Unit used for axis and value formatting.
|
|
29
|
+
*/
|
|
30
|
+
export const Unit = {
|
|
31
|
+
Count: "count",
|
|
32
|
+
Cost: "cost",
|
|
33
|
+
Duration: "duration",
|
|
34
|
+
Percent: "percent",
|
|
35
|
+
Bytes: "bytes",
|
|
36
|
+
} as const;
|
|
37
|
+
/**
|
|
38
|
+
* Unit used for axis and value formatting.
|
|
39
|
+
*/
|
|
40
|
+
export type Unit = ClosedEnum<typeof Unit>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Value ordering for toplist, table and breakdown widgets.
|
|
44
|
+
*/
|
|
45
|
+
export const MonitorWidgetDisplaySort = {
|
|
46
|
+
Desc: "desc",
|
|
47
|
+
Asc: "asc",
|
|
48
|
+
} as const;
|
|
49
|
+
/**
|
|
50
|
+
* Value ordering for toplist, table and breakdown widgets.
|
|
51
|
+
*/
|
|
52
|
+
export type MonitorWidgetDisplaySort = ClosedEnum<
|
|
53
|
+
typeof MonitorWidgetDisplaySort
|
|
54
|
+
>;
|
|
55
|
+
|
|
56
|
+
export type MonitorWidgetDisplay = {
|
|
57
|
+
/**
|
|
58
|
+
* Chart style for timeseries widgets.
|
|
59
|
+
*/
|
|
60
|
+
visualization?: MonitorWidgetDisplayVisualization | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Unit used for axis and value formatting.
|
|
63
|
+
*/
|
|
64
|
+
unit?: Unit | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Value ordering for toplist, table and breakdown widgets.
|
|
67
|
+
*/
|
|
68
|
+
sort?: MonitorWidgetDisplaySort | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* When true, toplist, table and breakdown widgets also show the overall
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* total across all groups for the window.
|
|
74
|
+
*/
|
|
75
|
+
showOverall?: boolean | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Optional threshold line rendered on timeseries widgets.
|
|
78
|
+
*/
|
|
79
|
+
target?: number | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Decimal places used when formatting values.
|
|
82
|
+
*/
|
|
83
|
+
decimals?: number | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* When true, toplist and donut widgets show the combined value of groups
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* outside the configured limit.
|
|
89
|
+
*/
|
|
90
|
+
showOthers?: boolean | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* When true, toplist and donut widget values are shown as a percentage of
|
|
93
|
+
*
|
|
94
|
+
* @remarks
|
|
95
|
+
* the overall total.
|
|
96
|
+
*/
|
|
97
|
+
showPercentages?: boolean | undefined;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const MonitorWidgetDisplayVisualization$inboundSchema: z.ZodNativeEnum<
|
|
102
|
+
typeof MonitorWidgetDisplayVisualization
|
|
103
|
+
> = z.nativeEnum(MonitorWidgetDisplayVisualization);
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const MonitorWidgetDisplayVisualization$outboundSchema: z.ZodNativeEnum<
|
|
106
|
+
typeof MonitorWidgetDisplayVisualization
|
|
107
|
+
> = MonitorWidgetDisplayVisualization$inboundSchema;
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const Unit$inboundSchema: z.ZodNativeEnum<typeof Unit> = z.nativeEnum(
|
|
111
|
+
Unit,
|
|
112
|
+
);
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const Unit$outboundSchema: z.ZodNativeEnum<typeof Unit> =
|
|
115
|
+
Unit$inboundSchema;
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export const MonitorWidgetDisplaySort$inboundSchema: z.ZodNativeEnum<
|
|
119
|
+
typeof MonitorWidgetDisplaySort
|
|
120
|
+
> = z.nativeEnum(MonitorWidgetDisplaySort);
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const MonitorWidgetDisplaySort$outboundSchema: z.ZodNativeEnum<
|
|
123
|
+
typeof MonitorWidgetDisplaySort
|
|
124
|
+
> = MonitorWidgetDisplaySort$inboundSchema;
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const MonitorWidgetDisplay$inboundSchema: z.ZodType<
|
|
128
|
+
MonitorWidgetDisplay,
|
|
129
|
+
z.ZodTypeDef,
|
|
130
|
+
unknown
|
|
131
|
+
> = z.object({
|
|
132
|
+
visualization: MonitorWidgetDisplayVisualization$inboundSchema.optional(),
|
|
133
|
+
unit: Unit$inboundSchema.optional(),
|
|
134
|
+
sort: MonitorWidgetDisplaySort$inboundSchema.optional(),
|
|
135
|
+
show_overall: z.boolean().optional(),
|
|
136
|
+
target: z.number().optional(),
|
|
137
|
+
decimals: z.number().int().optional(),
|
|
138
|
+
show_others: z.boolean().optional(),
|
|
139
|
+
show_percentages: z.boolean().optional(),
|
|
140
|
+
}).transform((v) => {
|
|
141
|
+
return remap$(v, {
|
|
142
|
+
"show_overall": "showOverall",
|
|
143
|
+
"show_others": "showOthers",
|
|
144
|
+
"show_percentages": "showPercentages",
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
/** @internal */
|
|
148
|
+
export type MonitorWidgetDisplay$Outbound = {
|
|
149
|
+
visualization?: string | undefined;
|
|
150
|
+
unit?: string | undefined;
|
|
151
|
+
sort?: string | undefined;
|
|
152
|
+
show_overall?: boolean | undefined;
|
|
153
|
+
target?: number | undefined;
|
|
154
|
+
decimals?: number | undefined;
|
|
155
|
+
show_others?: boolean | undefined;
|
|
156
|
+
show_percentages?: boolean | undefined;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
/** @internal */
|
|
160
|
+
export const MonitorWidgetDisplay$outboundSchema: z.ZodType<
|
|
161
|
+
MonitorWidgetDisplay$Outbound,
|
|
162
|
+
z.ZodTypeDef,
|
|
163
|
+
MonitorWidgetDisplay
|
|
164
|
+
> = z.object({
|
|
165
|
+
visualization: MonitorWidgetDisplayVisualization$outboundSchema.optional(),
|
|
166
|
+
unit: Unit$outboundSchema.optional(),
|
|
167
|
+
sort: MonitorWidgetDisplaySort$outboundSchema.optional(),
|
|
168
|
+
showOverall: z.boolean().optional(),
|
|
169
|
+
target: z.number().optional(),
|
|
170
|
+
decimals: z.number().int().optional(),
|
|
171
|
+
showOthers: z.boolean().optional(),
|
|
172
|
+
showPercentages: z.boolean().optional(),
|
|
173
|
+
}).transform((v) => {
|
|
174
|
+
return remap$(v, {
|
|
175
|
+
showOverall: "show_overall",
|
|
176
|
+
showOthers: "show_others",
|
|
177
|
+
showPercentages: "show_percentages",
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
export function monitorWidgetDisplayToJSON(
|
|
182
|
+
monitorWidgetDisplay: MonitorWidgetDisplay,
|
|
183
|
+
): string {
|
|
184
|
+
return JSON.stringify(
|
|
185
|
+
MonitorWidgetDisplay$outboundSchema.parse(monitorWidgetDisplay),
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
export function monitorWidgetDisplayFromJSON(
|
|
189
|
+
jsonString: string,
|
|
190
|
+
): SafeParseResult<MonitorWidgetDisplay, SDKValidationError> {
|
|
191
|
+
return safeParse(
|
|
192
|
+
jsonString,
|
|
193
|
+
(x) => MonitorWidgetDisplay$inboundSchema.parse(JSON.parse(x)),
|
|
194
|
+
`Failed to parse 'MonitorWidgetDisplay' from JSON`,
|
|
195
|
+
);
|
|
196
|
+
}
|