@mesadev/sdk 0.1.0 → 0.1.2
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/FUNCTIONS.md +2 -2
- package/README.md +159 -133
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAgentblame.d.ts +18 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAgentblame.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAgentblame.js +133 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAgentblame.js.map +1 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAnalytics.d.ts +18 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAnalytics.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAnalytics.js +132 -0
- package/dist/commonjs/funcs/agentBlameGetOrgRepoAnalytics.js.map +1 -0
- package/dist/commonjs/funcs/agentBlamePostOrgRepoAnalyticsRefresh.d.ts +18 -0
- package/dist/commonjs/funcs/agentBlamePostOrgRepoAnalyticsRefresh.d.ts.map +1 -0
- package/dist/commonjs/funcs/agentBlamePostOrgRepoAnalyticsRefresh.js +128 -0
- package/dist/commonjs/funcs/agentBlamePostOrgRepoAnalyticsRefresh.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +4 -4
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +4 -4
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/errors/getorgrepoagentblame.d.ts +151 -0
- package/dist/commonjs/models/errors/getorgrepoagentblame.d.ts.map +1 -0
- package/dist/commonjs/models/errors/getorgrepoagentblame.js +232 -0
- package/dist/commonjs/models/errors/getorgrepoagentblame.js.map +1 -0
- package/dist/commonjs/models/errors/getorgrepoanalytics.d.ts +151 -0
- package/dist/commonjs/models/errors/getorgrepoanalytics.d.ts.map +1 -0
- package/dist/commonjs/models/errors/getorgrepoanalytics.js +232 -0
- package/dist/commonjs/models/errors/getorgrepoanalytics.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +3 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +3 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/errors/postorgrepoanalyticsrefresh.d.ts +151 -0
- package/dist/commonjs/models/errors/postorgrepoanalyticsrefresh.d.ts.map +1 -0
- package/dist/commonjs/models/errors/postorgrepoanalyticsrefresh.js +235 -0
- package/dist/commonjs/models/errors/postorgrepoanalyticsrefresh.js.map +1 -0
- package/dist/commonjs/models/operations/getorgrepoagentblame.d.ts +121 -0
- package/dist/commonjs/models/operations/getorgrepoagentblame.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getorgrepoagentblame.js +170 -0
- package/dist/commonjs/models/operations/getorgrepoagentblame.js.map +1 -0
- package/dist/commonjs/models/operations/getorgrepoanalytics.d.ts +183 -0
- package/dist/commonjs/models/operations/getorgrepoanalytics.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getorgrepoanalytics.js +217 -0
- package/dist/commonjs/models/operations/getorgrepoanalytics.js.map +1 -0
- package/dist/commonjs/models/operations/getorgrepodiff.d.ts +4 -4
- package/dist/commonjs/models/operations/getorgrepodiff.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getorgrepodiff.js +6 -6
- package/dist/commonjs/models/operations/getorgrepodiff.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +3 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +3 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/postorgrepoanalyticsrefresh.d.ts +172 -0
- package/dist/commonjs/models/operations/postorgrepoanalyticsrefresh.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postorgrepoanalyticsrefresh.js +209 -0
- package/dist/commonjs/models/operations/postorgrepoanalyticsrefresh.js.map +1 -0
- package/dist/commonjs/sdk/agentblame.d.ts +26 -0
- package/dist/commonjs/sdk/agentblame.d.ts.map +1 -0
- package/dist/commonjs/sdk/agentblame.js +42 -0
- package/dist/commonjs/sdk/agentblame.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/agentBlameGetOrgRepoAgentblame.d.ts +18 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAgentblame.d.ts.map +1 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAgentblame.js +97 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAgentblame.js.map +1 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAnalytics.d.ts +18 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAnalytics.d.ts.map +1 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAnalytics.js +96 -0
- package/dist/esm/funcs/agentBlameGetOrgRepoAnalytics.js.map +1 -0
- package/dist/esm/funcs/agentBlamePostOrgRepoAnalyticsRefresh.d.ts +18 -0
- package/dist/esm/funcs/agentBlamePostOrgRepoAnalyticsRefresh.d.ts.map +1 -0
- package/dist/esm/funcs/agentBlamePostOrgRepoAnalyticsRefresh.js +92 -0
- package/dist/esm/funcs/agentBlamePostOrgRepoAnalyticsRefresh.js.map +1 -0
- package/dist/esm/lib/config.d.ts +4 -4
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +4 -4
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/errors/getorgrepoagentblame.d.ts +151 -0
- package/dist/esm/models/errors/getorgrepoagentblame.d.ts.map +1 -0
- package/dist/esm/models/errors/getorgrepoagentblame.js +189 -0
- package/dist/esm/models/errors/getorgrepoagentblame.js.map +1 -0
- package/dist/esm/models/errors/getorgrepoanalytics.d.ts +151 -0
- package/dist/esm/models/errors/getorgrepoanalytics.d.ts.map +1 -0
- package/dist/esm/models/errors/getorgrepoanalytics.js +189 -0
- package/dist/esm/models/errors/getorgrepoanalytics.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +3 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +3 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/errors/postorgrepoanalyticsrefresh.d.ts +151 -0
- package/dist/esm/models/errors/postorgrepoanalyticsrefresh.d.ts.map +1 -0
- package/dist/esm/models/errors/postorgrepoanalyticsrefresh.js +192 -0
- package/dist/esm/models/errors/postorgrepoanalyticsrefresh.js.map +1 -0
- package/dist/esm/models/operations/getorgrepoagentblame.d.ts +121 -0
- package/dist/esm/models/operations/getorgrepoagentblame.d.ts.map +1 -0
- package/dist/esm/models/operations/getorgrepoagentblame.js +123 -0
- package/dist/esm/models/operations/getorgrepoagentblame.js.map +1 -0
- package/dist/esm/models/operations/getorgrepoanalytics.d.ts +183 -0
- package/dist/esm/models/operations/getorgrepoanalytics.d.ts.map +1 -0
- package/dist/esm/models/operations/getorgrepoanalytics.js +167 -0
- package/dist/esm/models/operations/getorgrepoanalytics.js.map +1 -0
- package/dist/esm/models/operations/getorgrepodiff.d.ts +4 -4
- package/dist/esm/models/operations/getorgrepodiff.d.ts.map +1 -1
- package/dist/esm/models/operations/getorgrepodiff.js +4 -4
- package/dist/esm/models/operations/getorgrepodiff.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +3 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +3 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/postorgrepoanalyticsrefresh.d.ts +172 -0
- package/dist/esm/models/operations/postorgrepoanalyticsrefresh.d.ts.map +1 -0
- package/dist/esm/models/operations/postorgrepoanalyticsrefresh.js +159 -0
- package/dist/esm/models/operations/postorgrepoanalyticsrefresh.js.map +1 -0
- package/dist/esm/sdk/agentblame.d.ts +26 -0
- package/dist/esm/sdk/agentblame.d.ts.map +1 -0
- package/dist/esm/sdk/agentblame.js +38 -0
- package/dist/esm/sdk/agentblame.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/examples/adminCreateApiKey.example.ts +2 -2
- package/examples/package.json +2 -2
- package/jsr.json +2 -2
- package/package.json +12 -9
- package/src/funcs/agentBlameGetOrgRepoAgentblame.ts +214 -0
- package/src/funcs/agentBlameGetOrgRepoAnalytics.ts +210 -0
- package/src/funcs/agentBlamePostOrgRepoAnalyticsRefresh.ts +229 -0
- package/src/lib/config.ts +4 -4
- package/src/models/errors/getorgrepoagentblame.ts +367 -0
- package/src/models/errors/getorgrepoanalytics.ts +369 -0
- package/src/models/errors/index.ts +3 -0
- package/src/models/errors/postorgrepoanalyticsrefresh.ts +360 -0
- package/src/models/operations/getorgrepoagentblame.ts +338 -0
- package/src/models/operations/getorgrepoanalytics.ts +456 -0
- package/src/models/operations/getorgrepodiff.ts +11 -8
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/postorgrepoanalyticsrefresh.ts +479 -0
- package/src/sdk/agentblame.ts +63 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
10
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
|
+
import * as types from "../../types/primitives.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
|
+
|
|
14
|
+
export type PostOrgRepoAnalyticsRefreshRequest = {
|
|
15
|
+
org: string;
|
|
16
|
+
repo: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type PostOrgRepoAnalyticsRefreshInternalServerErrorError = {
|
|
20
|
+
code: string;
|
|
21
|
+
message: string;
|
|
22
|
+
details?: { [k: string]: any } | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type PostOrgRepoAnalyticsRefreshConflictError = {
|
|
26
|
+
code: string;
|
|
27
|
+
message: string;
|
|
28
|
+
details?: { [k: string]: any } | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type PostOrgRepoAnalyticsRefreshNotAcceptableError = {
|
|
32
|
+
code: string;
|
|
33
|
+
message: string;
|
|
34
|
+
details?: { [k: string]: any } | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type PostOrgRepoAnalyticsRefreshNotFoundError = {
|
|
38
|
+
code: string;
|
|
39
|
+
message: string;
|
|
40
|
+
details?: { [k: string]: any } | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type PostOrgRepoAnalyticsRefreshForbiddenError = {
|
|
44
|
+
code: string;
|
|
45
|
+
message: string;
|
|
46
|
+
details?: { [k: string]: any } | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export type PostOrgRepoAnalyticsRefreshUnauthorizedError = {
|
|
50
|
+
code: string;
|
|
51
|
+
message: string;
|
|
52
|
+
details?: { [k: string]: any } | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export type PostOrgRepoAnalyticsRefreshBadRequestError = {
|
|
56
|
+
code: string;
|
|
57
|
+
message: string;
|
|
58
|
+
details?: { [k: string]: any } | undefined;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type PostOrgRepoAnalyticsRefreshSummary = {
|
|
62
|
+
totalLines: number;
|
|
63
|
+
aiLines: number;
|
|
64
|
+
humanLines: number;
|
|
65
|
+
providers: { [k: string]: number };
|
|
66
|
+
models: { [k: string]: number };
|
|
67
|
+
updated: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type PostOrgRepoAnalyticsRefreshContributors = {
|
|
71
|
+
totalLines: number;
|
|
72
|
+
aiLines: number;
|
|
73
|
+
providers: { [k: string]: number };
|
|
74
|
+
models: { [k: string]: number };
|
|
75
|
+
commitCount: number;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export type PostOrgRepoAnalyticsRefreshHistory = {
|
|
79
|
+
date: string;
|
|
80
|
+
sha: string;
|
|
81
|
+
message?: string | undefined;
|
|
82
|
+
author: string;
|
|
83
|
+
added: number;
|
|
84
|
+
removed: number;
|
|
85
|
+
aiLines: number;
|
|
86
|
+
providers?: { [k: string]: number } | undefined;
|
|
87
|
+
models?: { [k: string]: number } | undefined;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export type PostOrgRepoAnalyticsRefreshMeta = {
|
|
91
|
+
lastAttempt: string;
|
|
92
|
+
lastSuccess: string | null;
|
|
93
|
+
lastError: string | null;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export type PostOrgRepoAnalyticsRefreshAnalytics = {
|
|
97
|
+
version: 2;
|
|
98
|
+
summary: PostOrgRepoAnalyticsRefreshSummary;
|
|
99
|
+
contributors: { [k: string]: PostOrgRepoAnalyticsRefreshContributors };
|
|
100
|
+
history: Array<PostOrgRepoAnalyticsRefreshHistory>;
|
|
101
|
+
meta?: PostOrgRepoAnalyticsRefreshMeta | undefined;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export const PostOrgRepoAnalyticsRefreshStatus = {
|
|
105
|
+
Current: "current",
|
|
106
|
+
Stale: "stale",
|
|
107
|
+
None: "none",
|
|
108
|
+
} as const;
|
|
109
|
+
export type PostOrgRepoAnalyticsRefreshStatus = OpenEnum<
|
|
110
|
+
typeof PostOrgRepoAnalyticsRefreshStatus
|
|
111
|
+
>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Analytics refreshed
|
|
115
|
+
*/
|
|
116
|
+
export type PostOrgRepoAnalyticsRefreshResponse = {
|
|
117
|
+
analytics: PostOrgRepoAnalyticsRefreshAnalytics | null;
|
|
118
|
+
status: PostOrgRepoAnalyticsRefreshStatus;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export type PostOrgRepoAnalyticsRefreshRequest$Outbound = {
|
|
123
|
+
org: string;
|
|
124
|
+
repo: string;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const PostOrgRepoAnalyticsRefreshRequest$outboundSchema: z.ZodMiniType<
|
|
129
|
+
PostOrgRepoAnalyticsRefreshRequest$Outbound,
|
|
130
|
+
PostOrgRepoAnalyticsRefreshRequest
|
|
131
|
+
> = z.object({
|
|
132
|
+
org: z.string(),
|
|
133
|
+
repo: z.string(),
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
export function postOrgRepoAnalyticsRefreshRequestToJSON(
|
|
137
|
+
postOrgRepoAnalyticsRefreshRequest: PostOrgRepoAnalyticsRefreshRequest,
|
|
138
|
+
): string {
|
|
139
|
+
return JSON.stringify(
|
|
140
|
+
PostOrgRepoAnalyticsRefreshRequest$outboundSchema.parse(
|
|
141
|
+
postOrgRepoAnalyticsRefreshRequest,
|
|
142
|
+
),
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** @internal */
|
|
147
|
+
export const PostOrgRepoAnalyticsRefreshInternalServerErrorError$inboundSchema:
|
|
148
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshInternalServerErrorError, unknown> =
|
|
149
|
+
z.object({
|
|
150
|
+
code: types.string(),
|
|
151
|
+
message: types.string(),
|
|
152
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
export function postOrgRepoAnalyticsRefreshInternalServerErrorErrorFromJSON(
|
|
156
|
+
jsonString: string,
|
|
157
|
+
): SafeParseResult<
|
|
158
|
+
PostOrgRepoAnalyticsRefreshInternalServerErrorError,
|
|
159
|
+
SDKValidationError
|
|
160
|
+
> {
|
|
161
|
+
return safeParse(
|
|
162
|
+
jsonString,
|
|
163
|
+
(x) =>
|
|
164
|
+
PostOrgRepoAnalyticsRefreshInternalServerErrorError$inboundSchema.parse(
|
|
165
|
+
JSON.parse(x),
|
|
166
|
+
),
|
|
167
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshInternalServerErrorError' from JSON`,
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
export const PostOrgRepoAnalyticsRefreshConflictError$inboundSchema:
|
|
173
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshConflictError, unknown> = z.object({
|
|
174
|
+
code: types.string(),
|
|
175
|
+
message: types.string(),
|
|
176
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
export function postOrgRepoAnalyticsRefreshConflictErrorFromJSON(
|
|
180
|
+
jsonString: string,
|
|
181
|
+
): SafeParseResult<
|
|
182
|
+
PostOrgRepoAnalyticsRefreshConflictError,
|
|
183
|
+
SDKValidationError
|
|
184
|
+
> {
|
|
185
|
+
return safeParse(
|
|
186
|
+
jsonString,
|
|
187
|
+
(x) =>
|
|
188
|
+
PostOrgRepoAnalyticsRefreshConflictError$inboundSchema.parse(
|
|
189
|
+
JSON.parse(x),
|
|
190
|
+
),
|
|
191
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshConflictError' from JSON`,
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** @internal */
|
|
196
|
+
export const PostOrgRepoAnalyticsRefreshNotAcceptableError$inboundSchema:
|
|
197
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshNotAcceptableError, unknown> = z
|
|
198
|
+
.object({
|
|
199
|
+
code: types.string(),
|
|
200
|
+
message: types.string(),
|
|
201
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
export function postOrgRepoAnalyticsRefreshNotAcceptableErrorFromJSON(
|
|
205
|
+
jsonString: string,
|
|
206
|
+
): SafeParseResult<
|
|
207
|
+
PostOrgRepoAnalyticsRefreshNotAcceptableError,
|
|
208
|
+
SDKValidationError
|
|
209
|
+
> {
|
|
210
|
+
return safeParse(
|
|
211
|
+
jsonString,
|
|
212
|
+
(x) =>
|
|
213
|
+
PostOrgRepoAnalyticsRefreshNotAcceptableError$inboundSchema.parse(
|
|
214
|
+
JSON.parse(x),
|
|
215
|
+
),
|
|
216
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshNotAcceptableError' from JSON`,
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** @internal */
|
|
221
|
+
export const PostOrgRepoAnalyticsRefreshNotFoundError$inboundSchema:
|
|
222
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshNotFoundError, unknown> = z.object({
|
|
223
|
+
code: types.string(),
|
|
224
|
+
message: types.string(),
|
|
225
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
export function postOrgRepoAnalyticsRefreshNotFoundErrorFromJSON(
|
|
229
|
+
jsonString: string,
|
|
230
|
+
): SafeParseResult<
|
|
231
|
+
PostOrgRepoAnalyticsRefreshNotFoundError,
|
|
232
|
+
SDKValidationError
|
|
233
|
+
> {
|
|
234
|
+
return safeParse(
|
|
235
|
+
jsonString,
|
|
236
|
+
(x) =>
|
|
237
|
+
PostOrgRepoAnalyticsRefreshNotFoundError$inboundSchema.parse(
|
|
238
|
+
JSON.parse(x),
|
|
239
|
+
),
|
|
240
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshNotFoundError' from JSON`,
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/** @internal */
|
|
245
|
+
export const PostOrgRepoAnalyticsRefreshForbiddenError$inboundSchema:
|
|
246
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshForbiddenError, unknown> = z.object({
|
|
247
|
+
code: types.string(),
|
|
248
|
+
message: types.string(),
|
|
249
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
export function postOrgRepoAnalyticsRefreshForbiddenErrorFromJSON(
|
|
253
|
+
jsonString: string,
|
|
254
|
+
): SafeParseResult<
|
|
255
|
+
PostOrgRepoAnalyticsRefreshForbiddenError,
|
|
256
|
+
SDKValidationError
|
|
257
|
+
> {
|
|
258
|
+
return safeParse(
|
|
259
|
+
jsonString,
|
|
260
|
+
(x) =>
|
|
261
|
+
PostOrgRepoAnalyticsRefreshForbiddenError$inboundSchema.parse(
|
|
262
|
+
JSON.parse(x),
|
|
263
|
+
),
|
|
264
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshForbiddenError' from JSON`,
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/** @internal */
|
|
269
|
+
export const PostOrgRepoAnalyticsRefreshUnauthorizedError$inboundSchema:
|
|
270
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshUnauthorizedError, unknown> = z
|
|
271
|
+
.object({
|
|
272
|
+
code: types.string(),
|
|
273
|
+
message: types.string(),
|
|
274
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
export function postOrgRepoAnalyticsRefreshUnauthorizedErrorFromJSON(
|
|
278
|
+
jsonString: string,
|
|
279
|
+
): SafeParseResult<
|
|
280
|
+
PostOrgRepoAnalyticsRefreshUnauthorizedError,
|
|
281
|
+
SDKValidationError
|
|
282
|
+
> {
|
|
283
|
+
return safeParse(
|
|
284
|
+
jsonString,
|
|
285
|
+
(x) =>
|
|
286
|
+
PostOrgRepoAnalyticsRefreshUnauthorizedError$inboundSchema.parse(
|
|
287
|
+
JSON.parse(x),
|
|
288
|
+
),
|
|
289
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshUnauthorizedError' from JSON`,
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** @internal */
|
|
294
|
+
export const PostOrgRepoAnalyticsRefreshBadRequestError$inboundSchema:
|
|
295
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshBadRequestError, unknown> = z.object(
|
|
296
|
+
{
|
|
297
|
+
code: types.string(),
|
|
298
|
+
message: types.string(),
|
|
299
|
+
details: types.optional(z.record(z.string(), z.any())),
|
|
300
|
+
},
|
|
301
|
+
);
|
|
302
|
+
|
|
303
|
+
export function postOrgRepoAnalyticsRefreshBadRequestErrorFromJSON(
|
|
304
|
+
jsonString: string,
|
|
305
|
+
): SafeParseResult<
|
|
306
|
+
PostOrgRepoAnalyticsRefreshBadRequestError,
|
|
307
|
+
SDKValidationError
|
|
308
|
+
> {
|
|
309
|
+
return safeParse(
|
|
310
|
+
jsonString,
|
|
311
|
+
(x) =>
|
|
312
|
+
PostOrgRepoAnalyticsRefreshBadRequestError$inboundSchema.parse(
|
|
313
|
+
JSON.parse(x),
|
|
314
|
+
),
|
|
315
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshBadRequestError' from JSON`,
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/** @internal */
|
|
320
|
+
export const PostOrgRepoAnalyticsRefreshSummary$inboundSchema: z.ZodMiniType<
|
|
321
|
+
PostOrgRepoAnalyticsRefreshSummary,
|
|
322
|
+
unknown
|
|
323
|
+
> = z.object({
|
|
324
|
+
totalLines: types.number(),
|
|
325
|
+
aiLines: types.number(),
|
|
326
|
+
humanLines: types.number(),
|
|
327
|
+
providers: z.record(z.string(), types.number()),
|
|
328
|
+
models: z.record(z.string(), types.number()),
|
|
329
|
+
updated: types.string(),
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
export function postOrgRepoAnalyticsRefreshSummaryFromJSON(
|
|
333
|
+
jsonString: string,
|
|
334
|
+
): SafeParseResult<PostOrgRepoAnalyticsRefreshSummary, SDKValidationError> {
|
|
335
|
+
return safeParse(
|
|
336
|
+
jsonString,
|
|
337
|
+
(x) =>
|
|
338
|
+
PostOrgRepoAnalyticsRefreshSummary$inboundSchema.parse(JSON.parse(x)),
|
|
339
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshSummary' from JSON`,
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** @internal */
|
|
344
|
+
export const PostOrgRepoAnalyticsRefreshContributors$inboundSchema:
|
|
345
|
+
z.ZodMiniType<PostOrgRepoAnalyticsRefreshContributors, unknown> = z.object({
|
|
346
|
+
totalLines: types.number(),
|
|
347
|
+
aiLines: types.number(),
|
|
348
|
+
providers: z.record(z.string(), types.number()),
|
|
349
|
+
models: z.record(z.string(), types.number()),
|
|
350
|
+
commitCount: types.number(),
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
export function postOrgRepoAnalyticsRefreshContributorsFromJSON(
|
|
354
|
+
jsonString: string,
|
|
355
|
+
): SafeParseResult<
|
|
356
|
+
PostOrgRepoAnalyticsRefreshContributors,
|
|
357
|
+
SDKValidationError
|
|
358
|
+
> {
|
|
359
|
+
return safeParse(
|
|
360
|
+
jsonString,
|
|
361
|
+
(x) =>
|
|
362
|
+
PostOrgRepoAnalyticsRefreshContributors$inboundSchema.parse(
|
|
363
|
+
JSON.parse(x),
|
|
364
|
+
),
|
|
365
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshContributors' from JSON`,
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/** @internal */
|
|
370
|
+
export const PostOrgRepoAnalyticsRefreshHistory$inboundSchema: z.ZodMiniType<
|
|
371
|
+
PostOrgRepoAnalyticsRefreshHistory,
|
|
372
|
+
unknown
|
|
373
|
+
> = z.object({
|
|
374
|
+
date: types.string(),
|
|
375
|
+
sha: types.string(),
|
|
376
|
+
message: types.optional(types.string()),
|
|
377
|
+
author: types.string(),
|
|
378
|
+
added: types.number(),
|
|
379
|
+
removed: types.number(),
|
|
380
|
+
aiLines: types.number(),
|
|
381
|
+
providers: types.optional(z.record(z.string(), types.number())),
|
|
382
|
+
models: types.optional(z.record(z.string(), types.number())),
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
export function postOrgRepoAnalyticsRefreshHistoryFromJSON(
|
|
386
|
+
jsonString: string,
|
|
387
|
+
): SafeParseResult<PostOrgRepoAnalyticsRefreshHistory, SDKValidationError> {
|
|
388
|
+
return safeParse(
|
|
389
|
+
jsonString,
|
|
390
|
+
(x) =>
|
|
391
|
+
PostOrgRepoAnalyticsRefreshHistory$inboundSchema.parse(JSON.parse(x)),
|
|
392
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshHistory' from JSON`,
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/** @internal */
|
|
397
|
+
export const PostOrgRepoAnalyticsRefreshMeta$inboundSchema: z.ZodMiniType<
|
|
398
|
+
PostOrgRepoAnalyticsRefreshMeta,
|
|
399
|
+
unknown
|
|
400
|
+
> = z.object({
|
|
401
|
+
lastAttempt: types.string(),
|
|
402
|
+
lastSuccess: types.nullable(types.string()),
|
|
403
|
+
lastError: types.nullable(types.string()),
|
|
404
|
+
});
|
|
405
|
+
|
|
406
|
+
export function postOrgRepoAnalyticsRefreshMetaFromJSON(
|
|
407
|
+
jsonString: string,
|
|
408
|
+
): SafeParseResult<PostOrgRepoAnalyticsRefreshMeta, SDKValidationError> {
|
|
409
|
+
return safeParse(
|
|
410
|
+
jsonString,
|
|
411
|
+
(x) => PostOrgRepoAnalyticsRefreshMeta$inboundSchema.parse(JSON.parse(x)),
|
|
412
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshMeta' from JSON`,
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/** @internal */
|
|
417
|
+
export const PostOrgRepoAnalyticsRefreshAnalytics$inboundSchema: z.ZodMiniType<
|
|
418
|
+
PostOrgRepoAnalyticsRefreshAnalytics,
|
|
419
|
+
unknown
|
|
420
|
+
> = z.pipe(
|
|
421
|
+
z.object({
|
|
422
|
+
version: types.literal(2),
|
|
423
|
+
summary: z.lazy(() => PostOrgRepoAnalyticsRefreshSummary$inboundSchema),
|
|
424
|
+
contributors: z.record(
|
|
425
|
+
z.string(),
|
|
426
|
+
z.lazy(() => PostOrgRepoAnalyticsRefreshContributors$inboundSchema),
|
|
427
|
+
),
|
|
428
|
+
history: z.array(
|
|
429
|
+
z.lazy(() => PostOrgRepoAnalyticsRefreshHistory$inboundSchema),
|
|
430
|
+
),
|
|
431
|
+
_meta: types.optional(
|
|
432
|
+
z.lazy(() => PostOrgRepoAnalyticsRefreshMeta$inboundSchema),
|
|
433
|
+
),
|
|
434
|
+
}),
|
|
435
|
+
z.transform((v) => {
|
|
436
|
+
return remap$(v, {
|
|
437
|
+
"_meta": "meta",
|
|
438
|
+
});
|
|
439
|
+
}),
|
|
440
|
+
);
|
|
441
|
+
|
|
442
|
+
export function postOrgRepoAnalyticsRefreshAnalyticsFromJSON(
|
|
443
|
+
jsonString: string,
|
|
444
|
+
): SafeParseResult<PostOrgRepoAnalyticsRefreshAnalytics, SDKValidationError> {
|
|
445
|
+
return safeParse(
|
|
446
|
+
jsonString,
|
|
447
|
+
(x) =>
|
|
448
|
+
PostOrgRepoAnalyticsRefreshAnalytics$inboundSchema.parse(JSON.parse(x)),
|
|
449
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshAnalytics' from JSON`,
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/** @internal */
|
|
454
|
+
export const PostOrgRepoAnalyticsRefreshStatus$inboundSchema: z.ZodMiniType<
|
|
455
|
+
PostOrgRepoAnalyticsRefreshStatus,
|
|
456
|
+
unknown
|
|
457
|
+
> = openEnums.inboundSchema(PostOrgRepoAnalyticsRefreshStatus);
|
|
458
|
+
|
|
459
|
+
/** @internal */
|
|
460
|
+
export const PostOrgRepoAnalyticsRefreshResponse$inboundSchema: z.ZodMiniType<
|
|
461
|
+
PostOrgRepoAnalyticsRefreshResponse,
|
|
462
|
+
unknown
|
|
463
|
+
> = z.object({
|
|
464
|
+
analytics: types.nullable(
|
|
465
|
+
z.lazy(() => PostOrgRepoAnalyticsRefreshAnalytics$inboundSchema),
|
|
466
|
+
),
|
|
467
|
+
status: PostOrgRepoAnalyticsRefreshStatus$inboundSchema,
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
export function postOrgRepoAnalyticsRefreshResponseFromJSON(
|
|
471
|
+
jsonString: string,
|
|
472
|
+
): SafeParseResult<PostOrgRepoAnalyticsRefreshResponse, SDKValidationError> {
|
|
473
|
+
return safeParse(
|
|
474
|
+
jsonString,
|
|
475
|
+
(x) =>
|
|
476
|
+
PostOrgRepoAnalyticsRefreshResponse$inboundSchema.parse(JSON.parse(x)),
|
|
477
|
+
`Failed to parse 'PostOrgRepoAnalyticsRefreshResponse' from JSON`,
|
|
478
|
+
);
|
|
479
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { agentBlameGetOrgRepoAgentblame } from "../funcs/agentBlameGetOrgRepoAgentblame.js";
|
|
6
|
+
import { agentBlameGetOrgRepoAnalytics } from "../funcs/agentBlameGetOrgRepoAnalytics.js";
|
|
7
|
+
import { agentBlamePostOrgRepoAnalyticsRefresh } from "../funcs/agentBlamePostOrgRepoAnalyticsRefresh.js";
|
|
8
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import * as operations from "../models/operations/index.js";
|
|
10
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
11
|
+
|
|
12
|
+
export class AgentBlame extends ClientSDK {
|
|
13
|
+
/**
|
|
14
|
+
* Get AI attribution data
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Retrieve agentblame attribution data for commits between two refs
|
|
18
|
+
*/
|
|
19
|
+
async getOrgRepoAgentblame(
|
|
20
|
+
request: operations.GetOrgRepoAgentblameRequest,
|
|
21
|
+
options?: RequestOptions,
|
|
22
|
+
): Promise<operations.GetOrgRepoAgentblameResponse> {
|
|
23
|
+
return unwrapAsync(agentBlameGetOrgRepoAgentblame(
|
|
24
|
+
this,
|
|
25
|
+
request,
|
|
26
|
+
options,
|
|
27
|
+
));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Get repository analytics
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* Retrieve repository-wide AI attribution analytics from agentblame
|
|
35
|
+
*/
|
|
36
|
+
async getOrgRepoAnalytics(
|
|
37
|
+
request: operations.GetOrgRepoAnalyticsRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): Promise<operations.GetOrgRepoAnalyticsResponse> {
|
|
40
|
+
return unwrapAsync(agentBlameGetOrgRepoAnalytics(
|
|
41
|
+
this,
|
|
42
|
+
request,
|
|
43
|
+
options,
|
|
44
|
+
));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Refresh repository analytics
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* Trigger a full re-aggregation of repository analytics
|
|
52
|
+
*/
|
|
53
|
+
async postOrgRepoAnalyticsRefresh(
|
|
54
|
+
request: operations.PostOrgRepoAnalyticsRefreshRequest,
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): Promise<operations.PostOrgRepoAnalyticsRefreshResponse> {
|
|
57
|
+
return unwrapAsync(agentBlamePostOrgRepoAnalyticsRefresh(
|
|
58
|
+
this,
|
|
59
|
+
request,
|
|
60
|
+
options,
|
|
61
|
+
));
|
|
62
|
+
}
|
|
63
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { ClientSDK } from "../lib/sdks.js";
|
|
6
6
|
import { Admin } from "./admin.js";
|
|
7
|
+
import { AgentBlame } from "./agentblame.js";
|
|
7
8
|
import { Branches } from "./branches.js";
|
|
8
9
|
import { Commits } from "./commits.js";
|
|
9
10
|
import { Content } from "./content.js";
|
|
@@ -40,4 +41,9 @@ export class Mesa extends ClientSDK {
|
|
|
40
41
|
get diffs(): Diffs {
|
|
41
42
|
return (this._diffs ??= new Diffs(this._options));
|
|
42
43
|
}
|
|
44
|
+
|
|
45
|
+
private _agentBlame?: AgentBlame;
|
|
46
|
+
get agentBlame(): AgentBlame {
|
|
47
|
+
return (this._agentBlame ??= new AgentBlame(this._options));
|
|
48
|
+
}
|
|
43
49
|
}
|