@meetkai/mka1 0.54.50 → 0.54.51

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 (198) hide show
  1. package/README.md +313 -304
  2. package/bin/mcp-server.js +777 -390
  3. package/bin/mcp-server.js.map +19 -11
  4. package/dist/commonjs/funcs/reposTagsDelete.d.ts +29 -0
  5. package/dist/commonjs/funcs/reposTagsDelete.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/reposTagsDelete.js +155 -0
  7. package/dist/commonjs/funcs/reposTagsDelete.js.map +1 -0
  8. package/dist/commonjs/funcs/reposTagsList.d.ts +35 -0
  9. package/dist/commonjs/funcs/reposTagsList.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/reposTagsList.js +156 -0
  11. package/dist/commonjs/funcs/reposTagsList.js.map +1 -0
  12. package/dist/commonjs/funcs/reposUpdate.d.ts +7 -4
  13. package/dist/commonjs/funcs/reposUpdate.d.ts.map +1 -1
  14. package/dist/commonjs/funcs/reposUpdate.js +7 -4
  15. package/dist/commonjs/funcs/reposUpdate.js.map +1 -1
  16. package/dist/commonjs/lib/config.d.ts +3 -3
  17. package/dist/commonjs/lib/config.js +3 -3
  18. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  19. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  20. package/dist/commonjs/mcp-server/server.js +5 -1
  21. package/dist/commonjs/mcp-server/server.js.map +1 -1
  22. package/dist/commonjs/mcp-server/tools/reposTagsDelete.d.ts +8 -0
  23. package/dist/commonjs/mcp-server/tools/reposTagsDelete.d.ts.map +1 -0
  24. package/dist/commonjs/mcp-server/tools/reposTagsDelete.js +73 -0
  25. package/dist/commonjs/mcp-server/tools/reposTagsDelete.js.map +1 -0
  26. package/dist/commonjs/mcp-server/tools/reposTagsList.d.ts +8 -0
  27. package/dist/commonjs/mcp-server/tools/reposTagsList.d.ts.map +1 -0
  28. package/dist/commonjs/mcp-server/tools/reposTagsList.js +79 -0
  29. package/dist/commonjs/mcp-server/tools/reposTagsList.js.map +1 -0
  30. package/dist/commonjs/mcp-server/tools/reposUpdate.d.ts.map +1 -1
  31. package/dist/commonjs/mcp-server/tools/reposUpdate.js +7 -4
  32. package/dist/commonjs/mcp-server/tools/reposUpdate.js.map +1 -1
  33. package/dist/commonjs/models/components/index.d.ts +2 -0
  34. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  35. package/dist/commonjs/models/components/index.js +2 -0
  36. package/dist/commonjs/models/components/index.js.map +1 -1
  37. package/dist/commonjs/models/components/repo.d.ts +11 -0
  38. package/dist/commonjs/models/components/repo.d.ts.map +1 -1
  39. package/dist/commonjs/models/components/repo.js +2 -0
  40. package/dist/commonjs/models/components/repo.js.map +1 -1
  41. package/dist/commonjs/models/components/repotag.d.ts +42 -0
  42. package/dist/commonjs/models/components/repotag.d.ts.map +1 -0
  43. package/dist/commonjs/models/components/repotag.js +77 -0
  44. package/dist/commonjs/models/components/repotag.js.map +1 -0
  45. package/dist/commonjs/models/components/repotaglist.d.ts +29 -0
  46. package/dist/commonjs/models/components/repotaglist.d.ts.map +1 -0
  47. package/dist/commonjs/models/components/repotaglist.js +61 -0
  48. package/dist/commonjs/models/components/repotaglist.js.map +1 -0
  49. package/dist/commonjs/models/operations/deleterepotag.d.ts +35 -0
  50. package/dist/commonjs/models/operations/deleterepotag.d.ts.map +1 -0
  51. package/dist/commonjs/models/operations/deleterepotag.js +73 -0
  52. package/dist/commonjs/models/operations/deleterepotag.js.map +1 -0
  53. package/dist/commonjs/models/operations/index.d.ts +2 -0
  54. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  55. package/dist/commonjs/models/operations/index.js +2 -0
  56. package/dist/commonjs/models/operations/index.js.map +1 -1
  57. package/dist/commonjs/models/operations/listrepotags.d.ts +30 -0
  58. package/dist/commonjs/models/operations/listrepotags.d.ts.map +1 -0
  59. package/dist/commonjs/models/operations/listrepotags.js +71 -0
  60. package/dist/commonjs/models/operations/listrepotags.js.map +1 -0
  61. package/dist/commonjs/react-query/index.d.ts +2 -0
  62. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  63. package/dist/commonjs/react-query/index.js +2 -0
  64. package/dist/commonjs/react-query/index.js.map +1 -1
  65. package/dist/commonjs/react-query/reposTagsDelete.d.ts +38 -0
  66. package/dist/commonjs/react-query/reposTagsDelete.d.ts.map +1 -0
  67. package/dist/commonjs/react-query/reposTagsDelete.js +56 -0
  68. package/dist/commonjs/react-query/reposTagsDelete.js.map +1 -0
  69. package/dist/commonjs/react-query/reposTagsList.core.d.ts +15 -0
  70. package/dist/commonjs/react-query/reposTagsList.core.d.ts.map +1 -0
  71. package/dist/commonjs/react-query/reposTagsList.core.js +36 -0
  72. package/dist/commonjs/react-query/reposTagsList.core.js.map +1 -0
  73. package/dist/commonjs/react-query/reposTagsList.d.ts +69 -0
  74. package/dist/commonjs/react-query/reposTagsList.d.ts.map +1 -0
  75. package/dist/commonjs/react-query/reposTagsList.js +88 -0
  76. package/dist/commonjs/react-query/reposTagsList.js.map +1 -0
  77. package/dist/commonjs/react-query/reposUpdate.d.ts +7 -4
  78. package/dist/commonjs/react-query/reposUpdate.d.ts.map +1 -1
  79. package/dist/commonjs/react-query/reposUpdate.js +7 -4
  80. package/dist/commonjs/react-query/reposUpdate.js.map +1 -1
  81. package/dist/commonjs/sdk/repos.d.ts +10 -4
  82. package/dist/commonjs/sdk/repos.d.ts.map +1 -1
  83. package/dist/commonjs/sdk/repos.js +11 -4
  84. package/dist/commonjs/sdk/repos.js.map +1 -1
  85. package/dist/commonjs/sdk/tags.d.ts +43 -0
  86. package/dist/commonjs/sdk/tags.d.ts.map +1 -0
  87. package/dist/commonjs/sdk/tags.js +55 -0
  88. package/dist/commonjs/sdk/tags.js.map +1 -0
  89. package/dist/esm/funcs/reposTagsDelete.d.ts +29 -0
  90. package/dist/esm/funcs/reposTagsDelete.d.ts.map +1 -0
  91. package/dist/esm/funcs/reposTagsDelete.js +119 -0
  92. package/dist/esm/funcs/reposTagsDelete.js.map +1 -0
  93. package/dist/esm/funcs/reposTagsList.d.ts +35 -0
  94. package/dist/esm/funcs/reposTagsList.d.ts.map +1 -0
  95. package/dist/esm/funcs/reposTagsList.js +120 -0
  96. package/dist/esm/funcs/reposTagsList.js.map +1 -0
  97. package/dist/esm/funcs/reposUpdate.d.ts +7 -4
  98. package/dist/esm/funcs/reposUpdate.d.ts.map +1 -1
  99. package/dist/esm/funcs/reposUpdate.js +7 -4
  100. package/dist/esm/funcs/reposUpdate.js.map +1 -1
  101. package/dist/esm/lib/config.d.ts +3 -3
  102. package/dist/esm/lib/config.js +3 -3
  103. package/dist/esm/mcp-server/mcp-server.js +1 -1
  104. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  105. package/dist/esm/mcp-server/server.js +5 -1
  106. package/dist/esm/mcp-server/server.js.map +1 -1
  107. package/dist/esm/mcp-server/tools/reposTagsDelete.d.ts +8 -0
  108. package/dist/esm/mcp-server/tools/reposTagsDelete.d.ts.map +1 -0
  109. package/dist/esm/mcp-server/tools/reposTagsDelete.js +37 -0
  110. package/dist/esm/mcp-server/tools/reposTagsDelete.js.map +1 -0
  111. package/dist/esm/mcp-server/tools/reposTagsList.d.ts +8 -0
  112. package/dist/esm/mcp-server/tools/reposTagsList.d.ts.map +1 -0
  113. package/dist/esm/mcp-server/tools/reposTagsList.js +43 -0
  114. package/dist/esm/mcp-server/tools/reposTagsList.js.map +1 -0
  115. package/dist/esm/mcp-server/tools/reposUpdate.d.ts.map +1 -1
  116. package/dist/esm/mcp-server/tools/reposUpdate.js +7 -4
  117. package/dist/esm/mcp-server/tools/reposUpdate.js.map +1 -1
  118. package/dist/esm/models/components/index.d.ts +2 -0
  119. package/dist/esm/models/components/index.d.ts.map +1 -1
  120. package/dist/esm/models/components/index.js +2 -0
  121. package/dist/esm/models/components/index.js.map +1 -1
  122. package/dist/esm/models/components/repo.d.ts +11 -0
  123. package/dist/esm/models/components/repo.d.ts.map +1 -1
  124. package/dist/esm/models/components/repo.js +2 -0
  125. package/dist/esm/models/components/repo.js.map +1 -1
  126. package/dist/esm/models/components/repotag.d.ts +42 -0
  127. package/dist/esm/models/components/repotag.d.ts.map +1 -0
  128. package/dist/esm/models/components/repotag.js +39 -0
  129. package/dist/esm/models/components/repotag.js.map +1 -0
  130. package/dist/esm/models/components/repotaglist.d.ts +29 -0
  131. package/dist/esm/models/components/repotaglist.d.ts.map +1 -0
  132. package/dist/esm/models/components/repotaglist.js +23 -0
  133. package/dist/esm/models/components/repotaglist.js.map +1 -0
  134. package/dist/esm/models/operations/deleterepotag.d.ts +35 -0
  135. package/dist/esm/models/operations/deleterepotag.d.ts.map +1 -0
  136. package/dist/esm/models/operations/deleterepotag.js +35 -0
  137. package/dist/esm/models/operations/deleterepotag.js.map +1 -0
  138. package/dist/esm/models/operations/index.d.ts +2 -0
  139. package/dist/esm/models/operations/index.d.ts.map +1 -1
  140. package/dist/esm/models/operations/index.js +2 -0
  141. package/dist/esm/models/operations/index.js.map +1 -1
  142. package/dist/esm/models/operations/listrepotags.d.ts +30 -0
  143. package/dist/esm/models/operations/listrepotags.d.ts.map +1 -0
  144. package/dist/esm/models/operations/listrepotags.js +33 -0
  145. package/dist/esm/models/operations/listrepotags.js.map +1 -0
  146. package/dist/esm/react-query/index.d.ts +2 -0
  147. package/dist/esm/react-query/index.d.ts.map +1 -1
  148. package/dist/esm/react-query/index.js +2 -0
  149. package/dist/esm/react-query/index.js.map +1 -1
  150. package/dist/esm/react-query/reposTagsDelete.d.ts +38 -0
  151. package/dist/esm/react-query/reposTagsDelete.d.ts.map +1 -0
  152. package/dist/esm/react-query/reposTagsDelete.js +51 -0
  153. package/dist/esm/react-query/reposTagsDelete.js.map +1 -0
  154. package/dist/esm/react-query/reposTagsList.core.d.ts +15 -0
  155. package/dist/esm/react-query/reposTagsList.core.d.ts.map +1 -0
  156. package/dist/esm/react-query/reposTagsList.core.js +31 -0
  157. package/dist/esm/react-query/reposTagsList.core.js.map +1 -0
  158. package/dist/esm/react-query/reposTagsList.d.ts +69 -0
  159. package/dist/esm/react-query/reposTagsList.d.ts.map +1 -0
  160. package/dist/esm/react-query/reposTagsList.js +78 -0
  161. package/dist/esm/react-query/reposTagsList.js.map +1 -0
  162. package/dist/esm/react-query/reposUpdate.d.ts +7 -4
  163. package/dist/esm/react-query/reposUpdate.d.ts.map +1 -1
  164. package/dist/esm/react-query/reposUpdate.js +7 -4
  165. package/dist/esm/react-query/reposUpdate.js.map +1 -1
  166. package/dist/esm/sdk/repos.d.ts +10 -4
  167. package/dist/esm/sdk/repos.d.ts.map +1 -1
  168. package/dist/esm/sdk/repos.js +11 -4
  169. package/dist/esm/sdk/repos.js.map +1 -1
  170. package/dist/esm/sdk/tags.d.ts +43 -0
  171. package/dist/esm/sdk/tags.d.ts.map +1 -0
  172. package/dist/esm/sdk/tags.js +51 -0
  173. package/dist/esm/sdk/tags.js.map +1 -0
  174. package/jsr.json +1 -1
  175. package/package.json +1 -1
  176. package/src/funcs/reposTagsDelete.ts +212 -0
  177. package/src/funcs/reposTagsList.ts +213 -0
  178. package/src/funcs/reposUpdate.ts +7 -4
  179. package/src/lib/config.ts +3 -3
  180. package/src/mcp-server/mcp-server.ts +1 -1
  181. package/src/mcp-server/server.ts +5 -1
  182. package/src/mcp-server/tools/reposTagsDelete.ts +45 -0
  183. package/src/mcp-server/tools/reposTagsList.ts +52 -0
  184. package/src/mcp-server/tools/reposUpdate.ts +7 -4
  185. package/src/models/components/index.ts +2 -0
  186. package/src/models/components/repo.ts +13 -0
  187. package/src/models/components/repotag.ts +90 -0
  188. package/src/models/components/repotaglist.ts +66 -0
  189. package/src/models/operations/deleterepotag.ts +84 -0
  190. package/src/models/operations/index.ts +2 -0
  191. package/src/models/operations/listrepotags.ts +77 -0
  192. package/src/react-query/index.ts +2 -0
  193. package/src/react-query/reposTagsDelete.ts +119 -0
  194. package/src/react-query/reposTagsList.core.ts +75 -0
  195. package/src/react-query/reposTagsList.ts +167 -0
  196. package/src/react-query/reposUpdate.ts +7 -4
  197. package/src/sdk/repos.ts +13 -4
  198. package/src/sdk/tags.ts +69 -0
@@ -0,0 +1,90 @@
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
+
11
+ export type RepoTag = {
12
+ /**
13
+ * The manifest the tag points at, `sha256:<hex>`.
14
+ */
15
+ digest: string;
16
+ /**
17
+ * The manifest's media type, as the registry serves it.
18
+ */
19
+ mediaType: string;
20
+ /**
21
+ * The image's total size in bytes as its manifest declares it (the
22
+ *
23
+ * @remarks
24
+ * config plus every layer — what `docker images` prints), or `null`
25
+ * when the manifest states no total: a multi-arch index, whose
26
+ * sizes belong to its per-platform children.
27
+ */
28
+ size: number | null;
29
+ tag: string;
30
+ /**
31
+ * When the tag was last pushed or moved.
32
+ */
33
+ updatedAt: Date;
34
+ };
35
+
36
+ /** @internal */
37
+ export const RepoTag$inboundSchema: z.ZodType<RepoTag, z.ZodTypeDef, unknown> =
38
+ z.object({
39
+ digest: z.string(),
40
+ media_type: z.string(),
41
+ size: z.nullable(z.number().int()),
42
+ tag: z.string(),
43
+ updated_at: z.string().datetime({ offset: true }).transform(v =>
44
+ new Date(v)
45
+ ),
46
+ }).transform((v) => {
47
+ return remap$(v, {
48
+ "media_type": "mediaType",
49
+ "updated_at": "updatedAt",
50
+ });
51
+ });
52
+ /** @internal */
53
+ export type RepoTag$Outbound = {
54
+ digest: string;
55
+ media_type: string;
56
+ size: number | null;
57
+ tag: string;
58
+ updated_at: string;
59
+ };
60
+
61
+ /** @internal */
62
+ export const RepoTag$outboundSchema: z.ZodType<
63
+ RepoTag$Outbound,
64
+ z.ZodTypeDef,
65
+ RepoTag
66
+ > = z.object({
67
+ digest: z.string(),
68
+ mediaType: z.string(),
69
+ size: z.nullable(z.number().int()),
70
+ tag: z.string(),
71
+ updatedAt: z.date().transform(v => v.toISOString()),
72
+ }).transform((v) => {
73
+ return remap$(v, {
74
+ mediaType: "media_type",
75
+ updatedAt: "updated_at",
76
+ });
77
+ });
78
+
79
+ export function repoTagToJSON(repoTag: RepoTag): string {
80
+ return JSON.stringify(RepoTag$outboundSchema.parse(repoTag));
81
+ }
82
+ export function repoTagFromJSON(
83
+ jsonString: string,
84
+ ): SafeParseResult<RepoTag, SDKValidationError> {
85
+ return safeParse(
86
+ jsonString,
87
+ (x) => RepoTag$inboundSchema.parse(JSON.parse(x)),
88
+ `Failed to parse 'RepoTag' from JSON`,
89
+ );
90
+ }
@@ -0,0 +1,66 @@
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
+ import {
10
+ RepoTag,
11
+ RepoTag$inboundSchema,
12
+ RepoTag$Outbound,
13
+ RepoTag$outboundSchema,
14
+ } from "./repotag.js";
15
+
16
+ export type RepoTagList = {
17
+ /**
18
+ * Newest-moved first.
19
+ */
20
+ tags: Array<RepoTag>;
21
+ /**
22
+ * `true` when the repository holds more tags than this one page
23
+ *
24
+ * @remarks
25
+ * (1000) shows. Never silently cut.
26
+ */
27
+ truncated: boolean;
28
+ };
29
+
30
+ /** @internal */
31
+ export const RepoTagList$inboundSchema: z.ZodType<
32
+ RepoTagList,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ tags: z.array(RepoTag$inboundSchema),
37
+ truncated: z.boolean(),
38
+ });
39
+ /** @internal */
40
+ export type RepoTagList$Outbound = {
41
+ tags: Array<RepoTag$Outbound>;
42
+ truncated: boolean;
43
+ };
44
+
45
+ /** @internal */
46
+ export const RepoTagList$outboundSchema: z.ZodType<
47
+ RepoTagList$Outbound,
48
+ z.ZodTypeDef,
49
+ RepoTagList
50
+ > = z.object({
51
+ tags: z.array(RepoTag$outboundSchema),
52
+ truncated: z.boolean(),
53
+ });
54
+
55
+ export function repoTagListToJSON(repoTagList: RepoTagList): string {
56
+ return JSON.stringify(RepoTagList$outboundSchema.parse(repoTagList));
57
+ }
58
+ export function repoTagListFromJSON(
59
+ jsonString: string,
60
+ ): SafeParseResult<RepoTagList, SDKValidationError> {
61
+ return safeParse(
62
+ jsonString,
63
+ (x) => RepoTagList$inboundSchema.parse(JSON.parse(x)),
64
+ `Failed to parse 'RepoTagList' from JSON`,
65
+ );
66
+ }
@@ -0,0 +1,84 @@
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
+
11
+ export type DeleteRepoTagRequest = {
12
+ /**
13
+ * The organization URL slug.
14
+ */
15
+ org: string;
16
+ /**
17
+ * The repository name (URL label).
18
+ */
19
+ name: string;
20
+ /**
21
+ * The image tag, exactly as pushed (tags are case-sensitive).
22
+ */
23
+ tag: string;
24
+ /**
25
+ * Optional external end-user identifier forwarded by the API gateway.
26
+ */
27
+ xOnBehalfOf?: string | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const DeleteRepoTagRequest$inboundSchema: z.ZodType<
32
+ DeleteRepoTagRequest,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ org: z.string(),
37
+ name: z.string(),
38
+ tag: z.string(),
39
+ "X-On-Behalf-Of": z.string().optional(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ "X-On-Behalf-Of": "xOnBehalfOf",
43
+ });
44
+ });
45
+ /** @internal */
46
+ export type DeleteRepoTagRequest$Outbound = {
47
+ org: string;
48
+ name: string;
49
+ tag: string;
50
+ "X-On-Behalf-Of"?: string | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const DeleteRepoTagRequest$outboundSchema: z.ZodType<
55
+ DeleteRepoTagRequest$Outbound,
56
+ z.ZodTypeDef,
57
+ DeleteRepoTagRequest
58
+ > = z.object({
59
+ org: z.string(),
60
+ name: z.string(),
61
+ tag: z.string(),
62
+ xOnBehalfOf: z.string().optional(),
63
+ }).transform((v) => {
64
+ return remap$(v, {
65
+ xOnBehalfOf: "X-On-Behalf-Of",
66
+ });
67
+ });
68
+
69
+ export function deleteRepoTagRequestToJSON(
70
+ deleteRepoTagRequest: DeleteRepoTagRequest,
71
+ ): string {
72
+ return JSON.stringify(
73
+ DeleteRepoTagRequest$outboundSchema.parse(deleteRepoTagRequest),
74
+ );
75
+ }
76
+ export function deleteRepoTagRequestFromJSON(
77
+ jsonString: string,
78
+ ): SafeParseResult<DeleteRepoTagRequest, SDKValidationError> {
79
+ return safeParse(
80
+ jsonString,
81
+ (x) => DeleteRepoTagRequest$inboundSchema.parse(JSON.parse(x)),
82
+ `Failed to parse 'DeleteRepoTagRequest' from JSON`,
83
+ );
84
+ }
@@ -115,6 +115,7 @@ export * from "./deleteorgautomodel.js";
115
115
  export * from "./deleteorgbudget.js";
116
116
  export * from "./deleteprompt.js";
117
117
  export * from "./deleterepo.js";
118
+ export * from "./deleterepotag.js";
118
119
  export * from "./deleteresponse.js";
119
120
  export * from "./deleteserviceaccount.js";
120
121
  export * from "./deleteserviceaccountapikey.js";
@@ -296,6 +297,7 @@ export * from "./listprompts.js";
296
297
  export * from "./listpromptversions.js";
297
298
  export * from "./listrepos.js";
298
299
  export * from "./listrepositoriesapiv1sandboxgithubrepositoriesget.js";
300
+ export * from "./listrepotags.js";
299
301
  export * from "./listresponsefeedback.js";
300
302
  export * from "./listresponses.js";
301
303
  export * from "./listscopedapikeys.js";
@@ -0,0 +1,77 @@
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
+
11
+ export type ListRepoTagsRequest = {
12
+ /**
13
+ * The organization URL slug.
14
+ */
15
+ org: string;
16
+ /**
17
+ * The repository name (URL label).
18
+ */
19
+ name: string;
20
+ /**
21
+ * Optional external end-user identifier forwarded by the API gateway.
22
+ */
23
+ xOnBehalfOf?: string | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export const ListRepoTagsRequest$inboundSchema: z.ZodType<
28
+ ListRepoTagsRequest,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ org: z.string(),
33
+ name: z.string(),
34
+ "X-On-Behalf-Of": z.string().optional(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "X-On-Behalf-Of": "xOnBehalfOf",
38
+ });
39
+ });
40
+ /** @internal */
41
+ export type ListRepoTagsRequest$Outbound = {
42
+ org: string;
43
+ name: string;
44
+ "X-On-Behalf-Of"?: string | undefined;
45
+ };
46
+
47
+ /** @internal */
48
+ export const ListRepoTagsRequest$outboundSchema: z.ZodType<
49
+ ListRepoTagsRequest$Outbound,
50
+ z.ZodTypeDef,
51
+ ListRepoTagsRequest
52
+ > = z.object({
53
+ org: z.string(),
54
+ name: z.string(),
55
+ xOnBehalfOf: z.string().optional(),
56
+ }).transform((v) => {
57
+ return remap$(v, {
58
+ xOnBehalfOf: "X-On-Behalf-Of",
59
+ });
60
+ });
61
+
62
+ export function listRepoTagsRequestToJSON(
63
+ listRepoTagsRequest: ListRepoTagsRequest,
64
+ ): string {
65
+ return JSON.stringify(
66
+ ListRepoTagsRequest$outboundSchema.parse(listRepoTagsRequest),
67
+ );
68
+ }
69
+ export function listRepoTagsRequestFromJSON(
70
+ jsonString: string,
71
+ ): SafeParseResult<ListRepoTagsRequest, SDKValidationError> {
72
+ return safeParse(
73
+ jsonString,
74
+ (x) => ListRepoTagsRequest$inboundSchema.parse(JSON.parse(x)),
75
+ `Failed to parse 'ListRepoTagsRequest' from JSON`,
76
+ );
77
+ }
@@ -392,6 +392,8 @@ export * from "./reposCreate.js";
392
392
  export * from "./reposDelete.js";
393
393
  export * from "./reposGet.js";
394
394
  export * from "./reposList.js";
395
+ export * from "./reposTagsDelete.js";
396
+ export * from "./reposTagsList.js";
395
397
  export * from "./reposUpdate.js";
396
398
  export * from "./sandboxCreate.js";
397
399
  export * from "./sandboxDownloadArchive.js";
@@ -0,0 +1,119 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ MutationKey,
7
+ useMutation,
8
+ UseMutationResult,
9
+ } from "@tanstack/react-query";
10
+ import { SDKCore } from "../core.js";
11
+ import { reposTagsDelete } from "../funcs/reposTagsDelete.js";
12
+ import { combineSignals } from "../lib/primitives.js";
13
+ import { RequestOptions } from "../lib/sdks.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKError } from "../models/errors/sdkerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { unwrapAsync } from "../types/fp.js";
27
+ import { useSDKContext } from "./_context.js";
28
+ import { MutationHookOptions } from "./_types.js";
29
+
30
+ export type ReposTagsDeleteMutationVariables = {
31
+ request: operations.DeleteRepoTagRequest;
32
+ options?: RequestOptions;
33
+ };
34
+
35
+ export type ReposTagsDeleteMutationData = void;
36
+
37
+ export type ReposTagsDeleteMutationError =
38
+ | errors.RepoError
39
+ | SDKError
40
+ | ResponseValidationError
41
+ | ConnectionError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | InvalidRequestError
45
+ | UnexpectedClientError
46
+ | SDKValidationError;
47
+
48
+ /**
49
+ * Delete an image tag
50
+ *
51
+ * @remarks
52
+ * Removes one tag; org owner/admin only (`write:repos` for a key). The
53
+ * same untag as the registry's `DELETE /v2/{org}/{name}/manifests/{tag}`:
54
+ * the name goes and the image stays, reachable by digest and by any
55
+ * other tag that names it.
56
+ *
57
+ * What makes a repository convertible afterwards is the kind switch
58
+ * itself: `PATCH` to another `kind` first collects every image no tag
59
+ * reaches (a multi-arch index's per-platform images included) and is
60
+ * refused with `409 kind_has_content` only for images a tag still
61
+ * names. So delete the tags the listing shows, then switch.
62
+ */
63
+ export function useReposTagsDeleteMutation(
64
+ options?: MutationHookOptions<
65
+ ReposTagsDeleteMutationData,
66
+ ReposTagsDeleteMutationError,
67
+ ReposTagsDeleteMutationVariables
68
+ >,
69
+ ): UseMutationResult<
70
+ ReposTagsDeleteMutationData,
71
+ ReposTagsDeleteMutationError,
72
+ ReposTagsDeleteMutationVariables
73
+ > {
74
+ const client = useSDKContext();
75
+ return useMutation({
76
+ ...buildReposTagsDeleteMutation(client, options),
77
+ ...options,
78
+ });
79
+ }
80
+
81
+ export function mutationKeyReposTagsDelete(): MutationKey {
82
+ return ["@meetkai/mka1", "tags", "delete"];
83
+ }
84
+
85
+ export function buildReposTagsDeleteMutation(
86
+ client$: SDKCore,
87
+ hookOptions?: RequestOptions,
88
+ ): {
89
+ mutationKey: MutationKey;
90
+ mutationFn: (
91
+ variables: ReposTagsDeleteMutationVariables,
92
+ ) => Promise<ReposTagsDeleteMutationData>;
93
+ } {
94
+ return {
95
+ mutationKey: mutationKeyReposTagsDelete(),
96
+ mutationFn: function reposTagsDeleteMutationFn({
97
+ request,
98
+ options,
99
+ }): Promise<ReposTagsDeleteMutationData> {
100
+ const mergedOptions = {
101
+ ...hookOptions,
102
+ ...options,
103
+ fetchOptions: {
104
+ ...hookOptions?.fetchOptions,
105
+ ...options?.fetchOptions,
106
+ signal: combineSignals(
107
+ hookOptions?.fetchOptions?.signal,
108
+ options?.fetchOptions?.signal,
109
+ ),
110
+ },
111
+ };
112
+ return unwrapAsync(reposTagsDelete(
113
+ client$,
114
+ request,
115
+ mergedOptions,
116
+ ));
117
+ },
118
+ };
119
+ }
@@ -0,0 +1,75 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ QueryClient,
7
+ QueryFunctionContext,
8
+ QueryKey,
9
+ } from "@tanstack/react-query";
10
+ import { SDKCore } from "../core.js";
11
+ import { reposTagsList } from "../funcs/reposTagsList.js";
12
+ import { combineSignals } from "../lib/primitives.js";
13
+ import { RequestOptions } from "../lib/sdks.js";
14
+ import * as components from "../models/components/index.js";
15
+ import * as operations from "../models/operations/index.js";
16
+ import { unwrapAsync } from "../types/fp.js";
17
+ export type ReposTagsListQueryData = components.RepoTagList;
18
+
19
+ export function prefetchReposTagsList(
20
+ queryClient: QueryClient,
21
+ client$: SDKCore,
22
+ request: operations.ListRepoTagsRequest,
23
+ options?: RequestOptions,
24
+ ): Promise<void> {
25
+ return queryClient.prefetchQuery({
26
+ ...buildReposTagsListQuery(
27
+ client$,
28
+ request,
29
+ options,
30
+ ),
31
+ });
32
+ }
33
+
34
+ export function buildReposTagsListQuery(
35
+ client$: SDKCore,
36
+ request: operations.ListRepoTagsRequest,
37
+ options?: RequestOptions,
38
+ ): {
39
+ queryKey: QueryKey;
40
+ queryFn: (context: QueryFunctionContext) => Promise<ReposTagsListQueryData>;
41
+ } {
42
+ return {
43
+ queryKey: queryKeyReposTagsList(request.org, request.name, {
44
+ xOnBehalfOf: request.xOnBehalfOf,
45
+ }),
46
+ queryFn: async function reposTagsListQueryFn(
47
+ ctx,
48
+ ): Promise<ReposTagsListQueryData> {
49
+ const sig = combineSignals(
50
+ ctx.signal,
51
+ options?.signal,
52
+ options?.fetchOptions?.signal,
53
+ );
54
+ const mergedOptions = {
55
+ ...options?.fetchOptions,
56
+ ...options,
57
+ signal: sig,
58
+ };
59
+
60
+ return unwrapAsync(reposTagsList(
61
+ client$,
62
+ request,
63
+ mergedOptions,
64
+ ));
65
+ },
66
+ };
67
+ }
68
+
69
+ export function queryKeyReposTagsList(
70
+ org: string,
71
+ name: string,
72
+ parameters: { xOnBehalfOf?: string | undefined },
73
+ ): QueryKey {
74
+ return ["@meetkai/mka1", "tags", "list", org, name, parameters];
75
+ }
@@ -0,0 +1,167 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ InvalidateQueryFilters,
7
+ QueryClient,
8
+ useQuery,
9
+ UseQueryResult,
10
+ useSuspenseQuery,
11
+ UseSuspenseQueryResult,
12
+ } from "@tanstack/react-query";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
22
+ import { SDKError } from "../models/errors/sdkerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { useSDKContext } from "./_context.js";
26
+ import {
27
+ QueryHookOptions,
28
+ SuspenseQueryHookOptions,
29
+ TupleToPrefixes,
30
+ } from "./_types.js";
31
+ import {
32
+ buildReposTagsListQuery,
33
+ prefetchReposTagsList,
34
+ queryKeyReposTagsList,
35
+ ReposTagsListQueryData,
36
+ } from "./reposTagsList.core.js";
37
+ export {
38
+ buildReposTagsListQuery,
39
+ prefetchReposTagsList,
40
+ queryKeyReposTagsList,
41
+ type ReposTagsListQueryData,
42
+ };
43
+
44
+ export type ReposTagsListQueryError =
45
+ | errors.RepoError
46
+ | SDKError
47
+ | ResponseValidationError
48
+ | ConnectionError
49
+ | RequestAbortedError
50
+ | RequestTimeoutError
51
+ | InvalidRequestError
52
+ | UnexpectedClientError
53
+ | SDKValidationError;
54
+
55
+ /**
56
+ * List an image repository's tags
57
+ *
58
+ * @remarks
59
+ * Lists the container-image tags a repository holds, newest-moved first,
60
+ * each with the manifest it points at, the manifest's media type, the
61
+ * image's declared size and when the tag last moved. The same access
62
+ * check as reading the repository (org owner/admin; `read:repos` for a
63
+ * key).
64
+ *
65
+ * It is a fact about what the repository HOLDS, not about its `kind`:
66
+ * a `model` lists `[]`, and a legacy `kind: null` repository that still
67
+ * holds images lists them — those are the tags a `409 kind_has_content`
68
+ * on PATCH is about, and deleting them through this API is what makes
69
+ * that PATCH go through.
70
+ *
71
+ * One page, of at most 1000 tags; `truncated` says whether the
72
+ * repository holds more. The registry's own `GET /v2/{org}/{name}/tags/list`
73
+ * is the paginated, names-only listing every OCI client speaks.
74
+ */
75
+ export function useReposTagsList(
76
+ request: operations.ListRepoTagsRequest,
77
+ options?: QueryHookOptions<ReposTagsListQueryData, ReposTagsListQueryError>,
78
+ ): UseQueryResult<ReposTagsListQueryData, ReposTagsListQueryError> {
79
+ const client = useSDKContext();
80
+ return useQuery({
81
+ ...buildReposTagsListQuery(
82
+ client,
83
+ request,
84
+ options,
85
+ ),
86
+ ...options,
87
+ });
88
+ }
89
+
90
+ /**
91
+ * List an image repository's tags
92
+ *
93
+ * @remarks
94
+ * Lists the container-image tags a repository holds, newest-moved first,
95
+ * each with the manifest it points at, the manifest's media type, the
96
+ * image's declared size and when the tag last moved. The same access
97
+ * check as reading the repository (org owner/admin; `read:repos` for a
98
+ * key).
99
+ *
100
+ * It is a fact about what the repository HOLDS, not about its `kind`:
101
+ * a `model` lists `[]`, and a legacy `kind: null` repository that still
102
+ * holds images lists them — those are the tags a `409 kind_has_content`
103
+ * on PATCH is about, and deleting them through this API is what makes
104
+ * that PATCH go through.
105
+ *
106
+ * One page, of at most 1000 tags; `truncated` says whether the
107
+ * repository holds more. The registry's own `GET /v2/{org}/{name}/tags/list`
108
+ * is the paginated, names-only listing every OCI client speaks.
109
+ */
110
+ export function useReposTagsListSuspense(
111
+ request: operations.ListRepoTagsRequest,
112
+ options?: SuspenseQueryHookOptions<
113
+ ReposTagsListQueryData,
114
+ ReposTagsListQueryError
115
+ >,
116
+ ): UseSuspenseQueryResult<ReposTagsListQueryData, ReposTagsListQueryError> {
117
+ const client = useSDKContext();
118
+ return useSuspenseQuery({
119
+ ...buildReposTagsListQuery(
120
+ client,
121
+ request,
122
+ options,
123
+ ),
124
+ ...options,
125
+ });
126
+ }
127
+
128
+ export function setReposTagsListData(
129
+ client: QueryClient,
130
+ queryKeyBase: [
131
+ org: string,
132
+ name: string,
133
+ parameters: { xOnBehalfOf?: string | undefined },
134
+ ],
135
+ data: ReposTagsListQueryData,
136
+ ): ReposTagsListQueryData | undefined {
137
+ const key = queryKeyReposTagsList(...queryKeyBase);
138
+
139
+ return client.setQueryData<ReposTagsListQueryData>(key, data);
140
+ }
141
+
142
+ export function invalidateReposTagsList(
143
+ client: QueryClient,
144
+ queryKeyBase: TupleToPrefixes<
145
+ [
146
+ org: string,
147
+ name: string,
148
+ parameters: { xOnBehalfOf?: string | undefined },
149
+ ]
150
+ >,
151
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
152
+ ): Promise<void> {
153
+ return client.invalidateQueries({
154
+ ...filters,
155
+ queryKey: ["@meetkai/mka1", "tags", "list", ...queryKeyBase],
156
+ });
157
+ }
158
+
159
+ export function invalidateAllReposTagsList(
160
+ client: QueryClient,
161
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
162
+ ): Promise<void> {
163
+ return client.invalidateQueries({
164
+ ...filters,
165
+ queryKey: ["@meetkai/mka1", "tags", "list"],
166
+ });
167
+ }