@orq-ai/node 4.16.0-rc.7 → 4.16.0-rc.9

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 (106) hide show
  1. package/README.md +37 -42
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +2 -2
  4. package/lib/config.js +2 -2
  5. package/models/components/index.d.ts +0 -8
  6. package/models/components/index.d.ts.map +1 -1
  7. package/models/components/index.js +0 -8
  8. package/models/components/index.js.map +1 -1
  9. package/models/components/reasoningpart.js +1 -1
  10. package/models/operations/createdataset.js +1 -1
  11. package/models/operations/createdatasetitem.js +5 -5
  12. package/models/operations/createtool.js +4 -4
  13. package/models/operations/getalltools.js +4 -4
  14. package/models/operations/getv2humanevalsets.js +2 -2
  15. package/models/operations/getv2humanevalsetsid.js +2 -2
  16. package/models/operations/listdatasetdatapoints.js +5 -5
  17. package/models/operations/listdatasets.js +1 -1
  18. package/models/operations/patchv2humanevalsetsid.js +2 -2
  19. package/models/operations/postv2feedbackevaluation.js +4 -4
  20. package/models/operations/postv2humanevalsets.js +2 -2
  21. package/models/operations/retrievedatapoint.js +5 -5
  22. package/models/operations/retrievedataset.js +1 -1
  23. package/models/operations/retrievetool.js +4 -4
  24. package/models/operations/runagent.js +1 -1
  25. package/models/operations/streamrunagent.js +1 -1
  26. package/models/operations/updatedatapoint.js +5 -5
  27. package/models/operations/updatedataset.js +1 -1
  28. package/models/operations/updatetool.js +4 -4
  29. package/package.json +7 -7
  30. package/sdk/sdk.d.ts +0 -3
  31. package/sdk/sdk.d.ts.map +1 -1
  32. package/sdk/sdk.js +0 -4
  33. package/sdk/sdk.js.map +1 -1
  34. package/src/lib/config.ts +2 -2
  35. package/src/models/components/index.ts +0 -8
  36. package/src/models/components/reasoningpart.ts +1 -1
  37. package/src/models/operations/createdataset.ts +1 -1
  38. package/src/models/operations/createdatasetitem.ts +5 -5
  39. package/src/models/operations/createtool.ts +4 -4
  40. package/src/models/operations/getalltools.ts +4 -4
  41. package/src/models/operations/getv2humanevalsets.ts +2 -2
  42. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  43. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  44. package/src/models/operations/listdatasets.ts +1 -1
  45. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  46. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  47. package/src/models/operations/postv2humanevalsets.ts +2 -2
  48. package/src/models/operations/retrievedatapoint.ts +5 -5
  49. package/src/models/operations/retrievedataset.ts +1 -1
  50. package/src/models/operations/retrievetool.ts +4 -4
  51. package/src/models/operations/runagent.ts +1 -1
  52. package/src/models/operations/streamrunagent.ts +1 -1
  53. package/src/models/operations/updatedatapoint.ts +5 -5
  54. package/src/models/operations/updatedataset.ts +1 -1
  55. package/src/models/operations/updatetool.ts +4 -4
  56. package/src/sdk/sdk.ts +0 -6
  57. package/funcs/auditLogsQuery.d.ts +0 -17
  58. package/funcs/auditLogsQuery.d.ts.map +0 -1
  59. package/funcs/auditLogsQuery.js +0 -115
  60. package/funcs/auditLogsQuery.js.map +0 -1
  61. package/models/components/auditlog.d.ts +0 -60
  62. package/models/components/auditlog.d.ts.map +0 -1
  63. package/models/components/auditlog.js +0 -83
  64. package/models/components/auditlog.js.map +0 -1
  65. package/models/components/auditlogfilter.d.ts +0 -33
  66. package/models/components/auditlogfilter.d.ts.map +0 -1
  67. package/models/components/auditlogfilter.js +0 -52
  68. package/models/components/auditlogfilter.js.map +0 -1
  69. package/models/components/auditlogfilterquery.d.ts +0 -29
  70. package/models/components/auditlogfilterquery.d.ts.map +0 -1
  71. package/models/components/auditlogfilterquery.js +0 -52
  72. package/models/components/auditlogfilterquery.js.map +0 -1
  73. package/models/components/auditlogpagination.d.ts +0 -28
  74. package/models/components/auditlogpagination.d.ts.map +0 -1
  75. package/models/components/auditlogpagination.js +0 -57
  76. package/models/components/auditlogpagination.js.map +0 -1
  77. package/models/components/auditlogsort.d.ts +0 -23
  78. package/models/components/auditlogsort.d.ts.map +0 -1
  79. package/models/components/auditlogsort.js +0 -50
  80. package/models/components/auditlogsort.js.map +0 -1
  81. package/models/components/queryauditlogsrequest.d.ts +0 -31
  82. package/models/components/queryauditlogsrequest.d.ts.map +0 -1
  83. package/models/components/queryauditlogsrequest.js +0 -54
  84. package/models/components/queryauditlogsrequest.js.map +0 -1
  85. package/models/components/queryauditlogsresponse.d.ts +0 -25
  86. package/models/components/queryauditlogsresponse.d.ts.map +0 -1
  87. package/models/components/queryauditlogsresponse.js +0 -60
  88. package/models/components/queryauditlogsresponse.js.map +0 -1
  89. package/models/components/value.d.ts +0 -17
  90. package/models/components/value.d.ts.map +0 -1
  91. package/models/components/value.js +0 -54
  92. package/models/components/value.js.map +0 -1
  93. package/sdk/auditlogs.d.ts +0 -12
  94. package/sdk/auditlogs.d.ts.map +0 -1
  95. package/sdk/auditlogs.js +0 -22
  96. package/sdk/auditlogs.js.map +0 -1
  97. package/src/funcs/auditLogsQuery.ts +0 -162
  98. package/src/models/components/auditlog.ts +0 -122
  99. package/src/models/components/auditlogfilter.ts +0 -51
  100. package/src/models/components/auditlogfilterquery.ts +0 -54
  101. package/src/models/components/auditlogpagination.ts +0 -55
  102. package/src/models/components/auditlogsort.ts +0 -39
  103. package/src/models/components/queryauditlogsrequest.ts +0 -64
  104. package/src/models/components/queryauditlogsresponse.ts +0 -55
  105. package/src/models/components/value.ts +0 -24
  106. package/src/sdk/auditlogs.ts +0 -27
@@ -1,12 +0,0 @@
1
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
- import * as components from "../models/components/index.js";
3
- export declare class AuditLogs extends ClientSDK {
4
- /**
5
- * Query audit logs
6
- *
7
- * @remarks
8
- * Queries audit logs from your workspace with filters, sorting, and cursor pagination.
9
- */
10
- query(request: components.QueryAuditLogsRequest, options?: RequestOptions): Promise<components.QueryAuditLogsResponse>;
11
- }
12
- //# sourceMappingURL=auditlogs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auditlogs.d.ts","sourceRoot":"","sources":["../src/sdk/auditlogs.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,SAAU,SAAQ,SAAS;IACtC;;;;;OAKG;IACG,KAAK,CACT,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC;CAO9C"}
package/sdk/auditlogs.js DELETED
@@ -1,22 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AuditLogs = void 0;
7
- const auditLogsQuery_js_1 = require("../funcs/auditLogsQuery.js");
8
- const sdks_js_1 = require("../lib/sdks.js");
9
- const fp_js_1 = require("../types/fp.js");
10
- class AuditLogs extends sdks_js_1.ClientSDK {
11
- /**
12
- * Query audit logs
13
- *
14
- * @remarks
15
- * Queries audit logs from your workspace with filters, sorting, and cursor pagination.
16
- */
17
- async query(request, options) {
18
- return (0, fp_js_1.unwrapAsync)((0, auditLogsQuery_js_1.auditLogsQuery)(this, request, options));
19
- }
20
- }
21
- exports.AuditLogs = AuditLogs;
22
- //# sourceMappingURL=auditlogs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auditlogs.js","sourceRoot":"","sources":["../src/sdk/auditlogs.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,SAAU,SAAQ,mBAAS;IACtC;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CACT,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAjBD,8BAiBC"}
@@ -1,162 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { OrqCore } from "../core.js";
6
- import { encodeJSON } from "../lib/encodings.js";
7
- import { matchStatusCode } from "../lib/http.js";
8
- import * as M from "../lib/matchers.js";
9
- import { compactMap } from "../lib/primitives.js";
10
- import { safeParse } from "../lib/schemas.js";
11
- import { RequestOptions } from "../lib/sdks.js";
12
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
- import { pathToFunc } from "../lib/url.js";
14
- import * as components from "../models/components/index.js";
15
- import {
16
- ConnectionError,
17
- InvalidRequestError,
18
- RequestAbortedError,
19
- RequestTimeoutError,
20
- UnexpectedClientError,
21
- } from "../models/errors/httpclienterrors.js";
22
- import { OrqError } from "../models/errors/orqerror.js";
23
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
- import { APICall, APIPromise } from "../types/async.js";
26
- import { Result } from "../types/fp.js";
27
-
28
- /**
29
- * Query audit logs
30
- *
31
- * @remarks
32
- * Queries audit logs from your workspace with filters, sorting, and cursor pagination.
33
- */
34
- export function auditLogsQuery(
35
- client: OrqCore,
36
- request: components.QueryAuditLogsRequest,
37
- options?: RequestOptions,
38
- ): APIPromise<
39
- Result<
40
- components.QueryAuditLogsResponse,
41
- | OrqError
42
- | ResponseValidationError
43
- | ConnectionError
44
- | RequestAbortedError
45
- | RequestTimeoutError
46
- | InvalidRequestError
47
- | UnexpectedClientError
48
- | SDKValidationError
49
- >
50
- > {
51
- return new APIPromise($do(
52
- client,
53
- request,
54
- options,
55
- ));
56
- }
57
-
58
- async function $do(
59
- client: OrqCore,
60
- request: components.QueryAuditLogsRequest,
61
- options?: RequestOptions,
62
- ): Promise<
63
- [
64
- Result<
65
- components.QueryAuditLogsResponse,
66
- | OrqError
67
- | ResponseValidationError
68
- | ConnectionError
69
- | RequestAbortedError
70
- | RequestTimeoutError
71
- | InvalidRequestError
72
- | UnexpectedClientError
73
- | SDKValidationError
74
- >,
75
- APICall,
76
- ]
77
- > {
78
- const parsed = safeParse(
79
- request,
80
- (value) => components.QueryAuditLogsRequest$outboundSchema.parse(value),
81
- "Input validation failed",
82
- );
83
- if (!parsed.ok) {
84
- return [parsed, { status: "invalid" }];
85
- }
86
- const payload = parsed.value;
87
- const body = encodeJSON("body", payload, { explode: true });
88
-
89
- const path = pathToFunc("/v2/audit-logs/query")();
90
-
91
- const headers = new Headers(compactMap({
92
- "Content-Type": "application/json",
93
- Accept: "application/json",
94
- }));
95
-
96
- const secConfig = await extractSecurity(client._options.apiKey);
97
- const securityInput = secConfig == null ? {} : { apiKey: secConfig };
98
- const requestSecurity = resolveGlobalSecurity(securityInput);
99
-
100
- const context = {
101
- options: client._options,
102
- baseURL: options?.serverURL ?? client._baseURL ?? "",
103
- operationID: "AuditLogQuery",
104
- oAuth2Scopes: null,
105
-
106
- resolvedSecurity: requestSecurity,
107
-
108
- securitySource: client._options.apiKey,
109
- retryConfig: options?.retries
110
- || client._options.retryConfig
111
- || { strategy: "none" },
112
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
113
- };
114
-
115
- const requestRes = client._createRequest(context, {
116
- security: requestSecurity,
117
- method: "POST",
118
- baseURL: options?.serverURL,
119
- path: path,
120
- headers: headers,
121
- body: body,
122
- userAgent: client._options.userAgent,
123
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
124
- }, options);
125
- if (!requestRes.ok) {
126
- return [requestRes, { status: "invalid" }];
127
- }
128
- const req = requestRes.value;
129
-
130
- const doResult = await client._do(req, {
131
- context,
132
- isErrorStatusCode: (statusCode: number) =>
133
- matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
134
- retryConfig: context.retryConfig,
135
- retryCodes: context.retryCodes,
136
- });
137
- if (!doResult.ok) {
138
- return [doResult, { status: "request-error", request: req }];
139
- }
140
- const response = doResult.value;
141
-
142
- const [result] = await M.match<
143
- components.QueryAuditLogsResponse,
144
- | OrqError
145
- | ResponseValidationError
146
- | ConnectionError
147
- | RequestAbortedError
148
- | RequestTimeoutError
149
- | InvalidRequestError
150
- | UnexpectedClientError
151
- | SDKValidationError
152
- >(
153
- M.json(200, components.QueryAuditLogsResponse$inboundSchema),
154
- M.fail("4XX"),
155
- M.fail("5XX"),
156
- )(response, req);
157
- if (!result.ok) {
158
- return [result, { status: "complete", request: req, response }];
159
- }
160
-
161
- return [result, { status: "complete", request: req, response }];
162
- }
@@ -1,122 +0,0 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import { Value, Value$inboundSchema } from "./value.js";
11
-
12
- /**
13
- * Additional event metadata. The exact shape depends on entity_type and action.
14
- */
15
- export type AuditLogMetadata = {};
16
-
17
- /**
18
- * An audit log entry for an entity event in the authenticated workspace.
19
- */
20
- export type AuditLog = {
21
- /**
22
- * Unique identifier for the audit log entry.
23
- */
24
- auditLogId: string;
25
- /**
26
- * Project associated with the event, when the audited entity belongs to a project.
27
- */
28
- projectId?: string | undefined;
29
- /**
30
- * Identifier of the entity that changed.
31
- */
32
- entityId: string;
33
- entityType: Value;
34
- action: Value;
35
- /**
36
- * User or system actor that caused the event, when available.
37
- */
38
- actorId?: string | undefined;
39
- /**
40
- * IP address observed for the actor, when available.
41
- */
42
- actorIp?: string | undefined;
43
- actorType?: Value | undefined;
44
- /**
45
- * Human readable actor name captured when the action happened.
46
- */
47
- actorDisplay?: string | undefined;
48
- origin?: Value | undefined;
49
- /**
50
- * Correlates the entry with the originating request.
51
- */
52
- requestId?: string | undefined;
53
- /**
54
- * Time when the audit log entry was created.
55
- */
56
- createdAt: Date;
57
- /**
58
- * Additional event metadata. The exact shape depends on entity_type and action.
59
- */
60
- metadata?: AuditLogMetadata | undefined;
61
- };
62
-
63
- /** @internal */
64
- export const AuditLogMetadata$inboundSchema: z.ZodType<
65
- AuditLogMetadata,
66
- z.ZodTypeDef,
67
- unknown
68
- > = z.object({});
69
-
70
- export function auditLogMetadataFromJSON(
71
- jsonString: string,
72
- ): SafeParseResult<AuditLogMetadata, SDKValidationError> {
73
- return safeParse(
74
- jsonString,
75
- (x) => AuditLogMetadata$inboundSchema.parse(JSON.parse(x)),
76
- `Failed to parse 'AuditLogMetadata' from JSON`,
77
- );
78
- }
79
-
80
- /** @internal */
81
- export const AuditLog$inboundSchema: z.ZodType<
82
- AuditLog,
83
- z.ZodTypeDef,
84
- unknown
85
- > = z.object({
86
- audit_log_id: z.string(),
87
- project_id: z.string().optional(),
88
- entity_id: z.string(),
89
- entity_type: Value$inboundSchema,
90
- action: Value$inboundSchema,
91
- actor_id: z.string().optional(),
92
- actor_ip: z.string().optional(),
93
- actor_type: Value$inboundSchema.optional(),
94
- actor_display: z.string().optional(),
95
- origin: Value$inboundSchema.optional(),
96
- request_id: z.string().optional(),
97
- created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
98
- metadata: z.lazy(() => AuditLogMetadata$inboundSchema).optional(),
99
- }).transform((v) => {
100
- return remap$(v, {
101
- "audit_log_id": "auditLogId",
102
- "project_id": "projectId",
103
- "entity_id": "entityId",
104
- "entity_type": "entityType",
105
- "actor_id": "actorId",
106
- "actor_ip": "actorIp",
107
- "actor_type": "actorType",
108
- "actor_display": "actorDisplay",
109
- "request_id": "requestId",
110
- "created_at": "createdAt",
111
- });
112
- });
113
-
114
- export function auditLogFromJSON(
115
- jsonString: string,
116
- ): SafeParseResult<AuditLog, SDKValidationError> {
117
- return safeParse(
118
- jsonString,
119
- (x) => AuditLog$inboundSchema.parse(JSON.parse(x)),
120
- `Failed to parse 'AuditLog' from JSON`,
121
- );
122
- }
@@ -1,51 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
-
7
- /**
8
- * A single advanced filter applied to audit logs.
9
- */
10
- export type AuditLogFilter = {
11
- /**
12
- * Filter value type, such as string, date, number, boolean, or array.
13
- */
14
- type: string;
15
- /**
16
- * Audit log field path to filter on. Supported paths include created_at, entity_id, entity_type, action, actor_id, origin, and metadata.display_name.
17
- */
18
- path: string;
19
- /**
20
- * Filter operator supported by the selected field type.
21
- */
22
- operator: string;
23
- /**
24
- * Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values.
25
- */
26
- value?: any | undefined;
27
- };
28
-
29
- /** @internal */
30
- export type AuditLogFilter$Outbound = {
31
- type: string;
32
- path: string;
33
- operator: string;
34
- value?: any | undefined;
35
- };
36
-
37
- /** @internal */
38
- export const AuditLogFilter$outboundSchema: z.ZodType<
39
- AuditLogFilter$Outbound,
40
- z.ZodTypeDef,
41
- AuditLogFilter
42
- > = z.object({
43
- type: z.string(),
44
- path: z.string(),
45
- operator: z.string(),
46
- value: z.any().optional(),
47
- });
48
-
49
- export function auditLogFilterToJSON(auditLogFilter: AuditLogFilter): string {
50
- return JSON.stringify(AuditLogFilter$outboundSchema.parse(auditLogFilter));
51
- }
@@ -1,54 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import {
7
- AuditLogFilter,
8
- AuditLogFilter$Outbound,
9
- AuditLogFilter$outboundSchema,
10
- } from "./auditlogfilter.js";
11
-
12
- /**
13
- * Search and advanced filters for querying audit logs.
14
- */
15
- export type AuditLogFilterQuery = {
16
- /**
17
- * Optional text search applied to supported display fields.
18
- */
19
- search?: string | undefined;
20
- /**
21
- * Logical operator used to combine filters.
22
- */
23
- operator: string;
24
- /**
25
- * Advanced filters applied to the query.
26
- */
27
- filters: Array<AuditLogFilter>;
28
- };
29
-
30
- /** @internal */
31
- export type AuditLogFilterQuery$Outbound = {
32
- search?: string | undefined;
33
- operator: string;
34
- filters: Array<AuditLogFilter$Outbound>;
35
- };
36
-
37
- /** @internal */
38
- export const AuditLogFilterQuery$outboundSchema: z.ZodType<
39
- AuditLogFilterQuery$Outbound,
40
- z.ZodTypeDef,
41
- AuditLogFilterQuery
42
- > = z.object({
43
- search: z.string().optional(),
44
- operator: z.string(),
45
- filters: z.array(AuditLogFilter$outboundSchema),
46
- });
47
-
48
- export function auditLogFilterQueryToJSON(
49
- auditLogFilterQuery: AuditLogFilterQuery,
50
- ): string {
51
- return JSON.stringify(
52
- AuditLogFilterQuery$outboundSchema.parse(auditLogFilterQuery),
53
- );
54
- }
@@ -1,55 +0,0 @@
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
-
8
- /**
9
- * Cursor pagination settings for audit log queries.
10
- */
11
- export type AuditLogPagination = {
12
- /**
13
- * Maximum number of audit logs to return. Defaults to 50 when omitted.
14
- */
15
- limit?: number | undefined;
16
- /**
17
- * Cursor for the next page. Use the last audit_log_id from the previous page.
18
- */
19
- startingAfter?: string | undefined;
20
- /**
21
- * Cursor for the previous page. Use the first audit_log_id from the current page.
22
- */
23
- endingBefore?: string | undefined;
24
- };
25
-
26
- /** @internal */
27
- export type AuditLogPagination$Outbound = {
28
- limit?: number | undefined;
29
- starting_after?: string | undefined;
30
- ending_before?: string | undefined;
31
- };
32
-
33
- /** @internal */
34
- export const AuditLogPagination$outboundSchema: z.ZodType<
35
- AuditLogPagination$Outbound,
36
- z.ZodTypeDef,
37
- AuditLogPagination
38
- > = z.object({
39
- limit: z.number().int().optional(),
40
- startingAfter: z.string().optional(),
41
- endingBefore: z.string().optional(),
42
- }).transform((v) => {
43
- return remap$(v, {
44
- startingAfter: "starting_after",
45
- endingBefore: "ending_before",
46
- });
47
- });
48
-
49
- export function auditLogPaginationToJSON(
50
- auditLogPagination: AuditLogPagination,
51
- ): string {
52
- return JSON.stringify(
53
- AuditLogPagination$outboundSchema.parse(auditLogPagination),
54
- );
55
- }
@@ -1,39 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
-
7
- /**
8
- * A sort expression for audit log queries.
9
- */
10
- export type AuditLogSort = {
11
- /**
12
- * Audit log field to sort by. Supported keys include _id, created_at, entity_type, entity_id, action, and actor_id.
13
- */
14
- key: string;
15
- /**
16
- * Sort direction. Defaults to desc when omitted or invalid.
17
- */
18
- direction?: string | undefined;
19
- };
20
-
21
- /** @internal */
22
- export type AuditLogSort$Outbound = {
23
- key: string;
24
- direction?: string | undefined;
25
- };
26
-
27
- /** @internal */
28
- export const AuditLogSort$outboundSchema: z.ZodType<
29
- AuditLogSort$Outbound,
30
- z.ZodTypeDef,
31
- AuditLogSort
32
- > = z.object({
33
- key: z.string(),
34
- direction: z.string().optional(),
35
- });
36
-
37
- export function auditLogSortToJSON(auditLogSort: AuditLogSort): string {
38
- return JSON.stringify(AuditLogSort$outboundSchema.parse(auditLogSort));
39
- }
@@ -1,64 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import {
7
- AuditLogFilterQuery,
8
- AuditLogFilterQuery$Outbound,
9
- AuditLogFilterQuery$outboundSchema,
10
- } from "./auditlogfilterquery.js";
11
- import {
12
- AuditLogPagination,
13
- AuditLogPagination$Outbound,
14
- AuditLogPagination$outboundSchema,
15
- } from "./auditlogpagination.js";
16
- import {
17
- AuditLogSort,
18
- AuditLogSort$Outbound,
19
- AuditLogSort$outboundSchema,
20
- } from "./auditlogsort.js";
21
-
22
- /**
23
- * Request body for querying audit logs in the authenticated workspace.
24
- */
25
- export type QueryAuditLogsRequest = {
26
- /**
27
- * Search and advanced filters for querying audit logs.
28
- */
29
- filters: AuditLogFilterQuery;
30
- /**
31
- * Cursor pagination settings for audit log queries.
32
- */
33
- pagination: AuditLogPagination;
34
- /**
35
- * Sort expressions. Defaults to audit_log_id descending when omitted.
36
- */
37
- sorting?: Array<AuditLogSort> | undefined;
38
- };
39
-
40
- /** @internal */
41
- export type QueryAuditLogsRequest$Outbound = {
42
- filters: AuditLogFilterQuery$Outbound;
43
- pagination: AuditLogPagination$Outbound;
44
- sorting?: Array<AuditLogSort$Outbound> | undefined;
45
- };
46
-
47
- /** @internal */
48
- export const QueryAuditLogsRequest$outboundSchema: z.ZodType<
49
- QueryAuditLogsRequest$Outbound,
50
- z.ZodTypeDef,
51
- QueryAuditLogsRequest
52
- > = z.object({
53
- filters: AuditLogFilterQuery$outboundSchema,
54
- pagination: AuditLogPagination$outboundSchema,
55
- sorting: z.array(AuditLogSort$outboundSchema).optional(),
56
- });
57
-
58
- export function queryAuditLogsRequestToJSON(
59
- queryAuditLogsRequest: QueryAuditLogsRequest,
60
- ): string {
61
- return JSON.stringify(
62
- QueryAuditLogsRequest$outboundSchema.parse(queryAuditLogsRequest),
63
- );
64
- }
@@ -1,55 +0,0 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import { AuditLog, AuditLog$inboundSchema } from "./auditlog.js";
11
-
12
- /**
13
- * Paginated audit log query result.
14
- */
15
- export type QueryAuditLogsResponse = {
16
- /**
17
- * Audit logs matching the query.
18
- */
19
- auditLogs: Array<AuditLog>;
20
- /**
21
- * Total number of audit logs matching the query before cursor pagination.
22
- */
23
- overallTotal: string;
24
- /**
25
- * Whether another page exists after the returned audit logs.
26
- */
27
- hasMore: boolean;
28
- };
29
-
30
- /** @internal */
31
- export const QueryAuditLogsResponse$inboundSchema: z.ZodType<
32
- QueryAuditLogsResponse,
33
- z.ZodTypeDef,
34
- unknown
35
- > = z.object({
36
- audit_logs: z.array(AuditLog$inboundSchema),
37
- overall_total: z.string(),
38
- has_more: z.boolean(),
39
- }).transform((v) => {
40
- return remap$(v, {
41
- "audit_logs": "auditLogs",
42
- "overall_total": "overallTotal",
43
- "has_more": "hasMore",
44
- });
45
- });
46
-
47
- export function queryAuditLogsResponseFromJSON(
48
- jsonString: string,
49
- ): SafeParseResult<QueryAuditLogsResponse, SDKValidationError> {
50
- return safeParse(
51
- jsonString,
52
- (x) => QueryAuditLogsResponse$inboundSchema.parse(JSON.parse(x)),
53
- `Failed to parse 'QueryAuditLogsResponse' from JSON`,
54
- );
55
- }
@@ -1,24 +0,0 @@
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 Value = {
9
- OriginUnspecified: "ORIGIN_UNSPECIFIED",
10
- Ui: "ui",
11
- Api: "api",
12
- Scim: "scim",
13
- System: "system",
14
- Router: "router",
15
- Mcp: "mcp",
16
- Automation: "automation",
17
- Internal: "internal",
18
- } as const;
19
- export type Value = ClosedEnum<typeof Value>;
20
-
21
- /** @internal */
22
- export const Value$inboundSchema: z.ZodNativeEnum<typeof Value> = z.nativeEnum(
23
- Value,
24
- );