@meetkai/mka1 0.54.24 → 0.54.25

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 (214) hide show
  1. package/README.md +302 -283
  2. package/bin/mcp-server.js +668 -10
  3. package/bin/mcp-server.js.map +21 -10
  4. package/dist/commonjs/funcs/authOrgsGetById.d.ts +19 -0
  5. package/dist/commonjs/funcs/authOrgsGetById.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/authOrgsGetById.js +146 -0
  7. package/dist/commonjs/funcs/authOrgsGetById.js.map +1 -0
  8. package/dist/commonjs/funcs/authOrgsUpdate.d.ts +19 -0
  9. package/dist/commonjs/funcs/authOrgsUpdate.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/authOrgsUpdate.js +149 -0
  11. package/dist/commonjs/funcs/authOrgsUpdate.js.map +1 -0
  12. package/dist/commonjs/lib/config.d.ts +2 -2
  13. package/dist/commonjs/lib/config.js +2 -2
  14. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  15. package/dist/commonjs/mcp-server/server.js +1 -1
  16. package/dist/commonjs/models/components/basicorganization.d.ts +41 -0
  17. package/dist/commonjs/models/components/basicorganization.d.ts.map +1 -0
  18. package/dist/commonjs/models/components/basicorganization.js +80 -0
  19. package/dist/commonjs/models/components/basicorganization.js.map +1 -0
  20. package/dist/commonjs/models/components/index.d.ts +7 -0
  21. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  22. package/dist/commonjs/models/components/index.js +7 -0
  23. package/dist/commonjs/models/components/index.js.map +1 -1
  24. package/dist/commonjs/models/components/organizationcodeconfig.d.ts +20 -0
  25. package/dist/commonjs/models/components/organizationcodeconfig.d.ts.map +1 -0
  26. package/dist/commonjs/models/components/organizationcodeconfig.js +58 -0
  27. package/dist/commonjs/models/components/organizationcodeconfig.js.map +1 -0
  28. package/dist/commonjs/models/components/organizationmetadata.d.ts +23 -0
  29. package/dist/commonjs/models/components/organizationmetadata.d.ts.map +1 -0
  30. package/dist/commonjs/models/components/organizationmetadata.js +69 -0
  31. package/dist/commonjs/models/components/organizationmetadata.js.map +1 -0
  32. package/dist/commonjs/models/components/organizationmetadataoutput.d.ts +23 -0
  33. package/dist/commonjs/models/components/organizationmetadataoutput.d.ts.map +1 -0
  34. package/dist/commonjs/models/components/organizationmetadataoutput.js +69 -0
  35. package/dist/commonjs/models/components/organizationmetadataoutput.js.map +1 -0
  36. package/dist/commonjs/models/components/schema0.d.ts +17 -0
  37. package/dist/commonjs/models/components/schema0.d.ts.map +1 -0
  38. package/dist/commonjs/models/components/schema0.js +66 -0
  39. package/dist/commonjs/models/components/schema0.js.map +1 -0
  40. package/dist/commonjs/models/components/schema1.d.ts +17 -0
  41. package/dist/commonjs/models/components/schema1.d.ts.map +1 -0
  42. package/dist/commonjs/models/components/schema1.js +66 -0
  43. package/dist/commonjs/models/components/schema1.js.map +1 -0
  44. package/dist/commonjs/models/components/updateorganizationbody.d.ts +18 -0
  45. package/dist/commonjs/models/components/updateorganizationbody.d.ts.map +1 -0
  46. package/dist/commonjs/models/components/updateorganizationbody.js +59 -0
  47. package/dist/commonjs/models/components/updateorganizationbody.js.map +1 -0
  48. package/dist/commonjs/models/errors/getjwtfromkey.d.ts +9 -9
  49. package/dist/commonjs/models/errors/getjwtfromkey.d.ts.map +1 -1
  50. package/dist/commonjs/models/errors/getjwtfromkey.js +11 -11
  51. package/dist/commonjs/models/errors/getjwtfromkey.js.map +1 -1
  52. package/dist/commonjs/models/errors/getorgbyid.d.ts +211 -0
  53. package/dist/commonjs/models/errors/getorgbyid.d.ts.map +1 -0
  54. package/dist/commonjs/models/errors/getorgbyid.js +298 -0
  55. package/dist/commonjs/models/errors/getorgbyid.js.map +1 -0
  56. package/dist/commonjs/models/errors/index.d.ts +2 -0
  57. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  58. package/dist/commonjs/models/errors/index.js +2 -0
  59. package/dist/commonjs/models/errors/index.js.map +1 -1
  60. package/dist/commonjs/models/errors/updateorganization.d.ts +257 -0
  61. package/dist/commonjs/models/errors/updateorganization.d.ts.map +1 -0
  62. package/dist/commonjs/models/errors/updateorganization.js +353 -0
  63. package/dist/commonjs/models/errors/updateorganization.js.map +1 -0
  64. package/dist/commonjs/models/operations/getorgbyid.d.ts +37 -0
  65. package/dist/commonjs/models/operations/getorgbyid.d.ts.map +1 -0
  66. package/dist/commonjs/models/operations/getorgbyid.js +87 -0
  67. package/dist/commonjs/models/operations/getorgbyid.js.map +1 -0
  68. package/dist/commonjs/models/operations/index.d.ts +2 -0
  69. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  70. package/dist/commonjs/models/operations/index.js +2 -0
  71. package/dist/commonjs/models/operations/index.js.map +1 -1
  72. package/dist/commonjs/models/operations/updateorganization.d.ts +40 -0
  73. package/dist/commonjs/models/operations/updateorganization.d.ts.map +1 -0
  74. package/dist/commonjs/models/operations/updateorganization.js +92 -0
  75. package/dist/commonjs/models/operations/updateorganization.js.map +1 -0
  76. package/dist/commonjs/react-query/authOrgsGetById.core.d.ts +15 -0
  77. package/dist/commonjs/react-query/authOrgsGetById.core.d.ts.map +1 -0
  78. package/dist/commonjs/react-query/authOrgsGetById.core.js +36 -0
  79. package/dist/commonjs/react-query/authOrgsGetById.core.js.map +1 -0
  80. package/dist/commonjs/react-query/authOrgsGetById.d.ts +39 -0
  81. package/dist/commonjs/react-query/authOrgsGetById.d.ts.map +1 -0
  82. package/dist/commonjs/react-query/authOrgsGetById.js +60 -0
  83. package/dist/commonjs/react-query/authOrgsGetById.js.map +1 -0
  84. package/dist/commonjs/react-query/authOrgsUpdate.d.ts +31 -0
  85. package/dist/commonjs/react-query/authOrgsUpdate.d.ts.map +1 -0
  86. package/dist/commonjs/react-query/authOrgsUpdate.js +47 -0
  87. package/dist/commonjs/react-query/authOrgsUpdate.js.map +1 -0
  88. package/dist/commonjs/react-query/index.d.ts +2 -0
  89. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  90. package/dist/commonjs/react-query/index.js +2 -0
  91. package/dist/commonjs/react-query/index.js.map +1 -1
  92. package/dist/commonjs/sdk/orgs.d.ts +15 -0
  93. package/dist/commonjs/sdk/orgs.d.ts.map +1 -1
  94. package/dist/commonjs/sdk/orgs.js +20 -0
  95. package/dist/commonjs/sdk/orgs.js.map +1 -1
  96. package/dist/esm/funcs/authOrgsGetById.d.ts +19 -0
  97. package/dist/esm/funcs/authOrgsGetById.d.ts.map +1 -0
  98. package/dist/esm/funcs/authOrgsGetById.js +110 -0
  99. package/dist/esm/funcs/authOrgsGetById.js.map +1 -0
  100. package/dist/esm/funcs/authOrgsUpdate.d.ts +19 -0
  101. package/dist/esm/funcs/authOrgsUpdate.d.ts.map +1 -0
  102. package/dist/esm/funcs/authOrgsUpdate.js +113 -0
  103. package/dist/esm/funcs/authOrgsUpdate.js.map +1 -0
  104. package/dist/esm/lib/config.d.ts +2 -2
  105. package/dist/esm/lib/config.js +2 -2
  106. package/dist/esm/mcp-server/mcp-server.js +1 -1
  107. package/dist/esm/mcp-server/server.js +1 -1
  108. package/dist/esm/models/components/basicorganization.d.ts +41 -0
  109. package/dist/esm/models/components/basicorganization.d.ts.map +1 -0
  110. package/dist/esm/models/components/basicorganization.js +42 -0
  111. package/dist/esm/models/components/basicorganization.js.map +1 -0
  112. package/dist/esm/models/components/index.d.ts +7 -0
  113. package/dist/esm/models/components/index.d.ts.map +1 -1
  114. package/dist/esm/models/components/index.js +7 -0
  115. package/dist/esm/models/components/index.js.map +1 -1
  116. package/dist/esm/models/components/organizationcodeconfig.d.ts +20 -0
  117. package/dist/esm/models/components/organizationcodeconfig.d.ts.map +1 -0
  118. package/dist/esm/models/components/organizationcodeconfig.js +20 -0
  119. package/dist/esm/models/components/organizationcodeconfig.js.map +1 -0
  120. package/dist/esm/models/components/organizationmetadata.d.ts +23 -0
  121. package/dist/esm/models/components/organizationmetadata.d.ts.map +1 -0
  122. package/dist/esm/models/components/organizationmetadata.js +31 -0
  123. package/dist/esm/models/components/organizationmetadata.js.map +1 -0
  124. package/dist/esm/models/components/organizationmetadataoutput.d.ts +23 -0
  125. package/dist/esm/models/components/organizationmetadataoutput.d.ts.map +1 -0
  126. package/dist/esm/models/components/organizationmetadataoutput.js +31 -0
  127. package/dist/esm/models/components/organizationmetadataoutput.js.map +1 -0
  128. package/dist/esm/models/components/schema0.d.ts +17 -0
  129. package/dist/esm/models/components/schema0.d.ts.map +1 -0
  130. package/dist/esm/models/components/schema0.js +28 -0
  131. package/dist/esm/models/components/schema0.js.map +1 -0
  132. package/dist/esm/models/components/schema1.d.ts +17 -0
  133. package/dist/esm/models/components/schema1.d.ts.map +1 -0
  134. package/dist/esm/models/components/schema1.js +28 -0
  135. package/dist/esm/models/components/schema1.js.map +1 -0
  136. package/dist/esm/models/components/updateorganizationbody.d.ts +18 -0
  137. package/dist/esm/models/components/updateorganizationbody.d.ts.map +1 -0
  138. package/dist/esm/models/components/updateorganizationbody.js +21 -0
  139. package/dist/esm/models/components/updateorganizationbody.js.map +1 -0
  140. package/dist/esm/models/errors/getjwtfromkey.d.ts +9 -9
  141. package/dist/esm/models/errors/getjwtfromkey.d.ts.map +1 -1
  142. package/dist/esm/models/errors/getjwtfromkey.js +8 -8
  143. package/dist/esm/models/errors/getjwtfromkey.js.map +1 -1
  144. package/dist/esm/models/errors/getorgbyid.d.ts +211 -0
  145. package/dist/esm/models/errors/getorgbyid.d.ts.map +1 -0
  146. package/dist/esm/models/errors/getorgbyid.js +254 -0
  147. package/dist/esm/models/errors/getorgbyid.js.map +1 -0
  148. package/dist/esm/models/errors/index.d.ts +2 -0
  149. package/dist/esm/models/errors/index.d.ts.map +1 -1
  150. package/dist/esm/models/errors/index.js +2 -0
  151. package/dist/esm/models/errors/index.js.map +1 -1
  152. package/dist/esm/models/errors/updateorganization.d.ts +257 -0
  153. package/dist/esm/models/errors/updateorganization.d.ts.map +1 -0
  154. package/dist/esm/models/errors/updateorganization.js +306 -0
  155. package/dist/esm/models/errors/updateorganization.js.map +1 -0
  156. package/dist/esm/models/operations/getorgbyid.d.ts +37 -0
  157. package/dist/esm/models/operations/getorgbyid.d.ts.map +1 -0
  158. package/dist/esm/models/operations/getorgbyid.js +47 -0
  159. package/dist/esm/models/operations/getorgbyid.js.map +1 -0
  160. package/dist/esm/models/operations/index.d.ts +2 -0
  161. package/dist/esm/models/operations/index.d.ts.map +1 -1
  162. package/dist/esm/models/operations/index.js +2 -0
  163. package/dist/esm/models/operations/index.js.map +1 -1
  164. package/dist/esm/models/operations/updateorganization.d.ts +40 -0
  165. package/dist/esm/models/operations/updateorganization.d.ts.map +1 -0
  166. package/dist/esm/models/operations/updateorganization.js +52 -0
  167. package/dist/esm/models/operations/updateorganization.js.map +1 -0
  168. package/dist/esm/react-query/authOrgsGetById.core.d.ts +15 -0
  169. package/dist/esm/react-query/authOrgsGetById.core.d.ts.map +1 -0
  170. package/dist/esm/react-query/authOrgsGetById.core.js +31 -0
  171. package/dist/esm/react-query/authOrgsGetById.core.js.map +1 -0
  172. package/dist/esm/react-query/authOrgsGetById.d.ts +39 -0
  173. package/dist/esm/react-query/authOrgsGetById.d.ts.map +1 -0
  174. package/dist/esm/react-query/authOrgsGetById.js +50 -0
  175. package/dist/esm/react-query/authOrgsGetById.js.map +1 -0
  176. package/dist/esm/react-query/authOrgsUpdate.d.ts +31 -0
  177. package/dist/esm/react-query/authOrgsUpdate.d.ts.map +1 -0
  178. package/dist/esm/react-query/authOrgsUpdate.js +42 -0
  179. package/dist/esm/react-query/authOrgsUpdate.js.map +1 -0
  180. package/dist/esm/react-query/index.d.ts +2 -0
  181. package/dist/esm/react-query/index.d.ts.map +1 -1
  182. package/dist/esm/react-query/index.js +2 -0
  183. package/dist/esm/react-query/index.js.map +1 -1
  184. package/dist/esm/sdk/orgs.d.ts +15 -0
  185. package/dist/esm/sdk/orgs.d.ts.map +1 -1
  186. package/dist/esm/sdk/orgs.js +20 -0
  187. package/dist/esm/sdk/orgs.js.map +1 -1
  188. package/jsr.json +1 -1
  189. package/package.json +1 -1
  190. package/src/funcs/authOrgsGetById.ts +251 -0
  191. package/src/funcs/authOrgsUpdate.ts +264 -0
  192. package/src/lib/config.ts +2 -2
  193. package/src/mcp-server/mcp-server.ts +1 -1
  194. package/src/mcp-server/server.ts +1 -1
  195. package/src/models/components/basicorganization.ts +100 -0
  196. package/src/models/components/index.ts +7 -0
  197. package/src/models/components/organizationcodeconfig.ts +54 -0
  198. package/src/models/components/organizationmetadata.ts +80 -0
  199. package/src/models/components/organizationmetadataoutput.ts +80 -0
  200. package/src/models/components/schema0.ts +55 -0
  201. package/src/models/components/schema1.ts +55 -0
  202. package/src/models/components/updateorganizationbody.ts +57 -0
  203. package/src/models/errors/getjwtfromkey.ts +28 -21
  204. package/src/models/errors/getorgbyid.ts +499 -0
  205. package/src/models/errors/index.ts +2 -0
  206. package/src/models/errors/updateorganization.ts +631 -0
  207. package/src/models/operations/getorgbyid.ts +114 -0
  208. package/src/models/operations/index.ts +2 -0
  209. package/src/models/operations/updateorganization.ts +121 -0
  210. package/src/react-query/authOrgsGetById.core.ts +78 -0
  211. package/src/react-query/authOrgsGetById.ts +148 -0
  212. package/src/react-query/authOrgsUpdate.ts +122 -0
  213. package/src/react-query/index.ts +2 -0
  214. package/src/sdk/orgs.ts +41 -0
@@ -0,0 +1,114 @@
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 GetOrgByIdSecurity = {
12
+ bearerAuth?: string | undefined;
13
+ sessionCookie?: string | undefined;
14
+ };
15
+
16
+ export type GetOrgByIdRequest = {
17
+ orgId: string;
18
+ /**
19
+ * Optional external end-user identifier forwarded by the API gateway.
20
+ */
21
+ xOnBehalfOf?: string | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const GetOrgByIdSecurity$inboundSchema: z.ZodType<
26
+ GetOrgByIdSecurity,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ bearerAuth: z.string().optional(),
31
+ sessionCookie: z.string().optional(),
32
+ });
33
+ /** @internal */
34
+ export type GetOrgByIdSecurity$Outbound = {
35
+ bearerAuth?: string | undefined;
36
+ sessionCookie?: string | undefined;
37
+ };
38
+
39
+ /** @internal */
40
+ export const GetOrgByIdSecurity$outboundSchema: z.ZodType<
41
+ GetOrgByIdSecurity$Outbound,
42
+ z.ZodTypeDef,
43
+ GetOrgByIdSecurity
44
+ > = z.object({
45
+ bearerAuth: z.string().optional(),
46
+ sessionCookie: z.string().optional(),
47
+ });
48
+
49
+ export function getOrgByIdSecurityToJSON(
50
+ getOrgByIdSecurity: GetOrgByIdSecurity,
51
+ ): string {
52
+ return JSON.stringify(
53
+ GetOrgByIdSecurity$outboundSchema.parse(getOrgByIdSecurity),
54
+ );
55
+ }
56
+ export function getOrgByIdSecurityFromJSON(
57
+ jsonString: string,
58
+ ): SafeParseResult<GetOrgByIdSecurity, SDKValidationError> {
59
+ return safeParse(
60
+ jsonString,
61
+ (x) => GetOrgByIdSecurity$inboundSchema.parse(JSON.parse(x)),
62
+ `Failed to parse 'GetOrgByIdSecurity' from JSON`,
63
+ );
64
+ }
65
+
66
+ /** @internal */
67
+ export const GetOrgByIdRequest$inboundSchema: z.ZodType<
68
+ GetOrgByIdRequest,
69
+ z.ZodTypeDef,
70
+ unknown
71
+ > = z.object({
72
+ orgId: z.string(),
73
+ "X-On-Behalf-Of": z.string().optional(),
74
+ }).transform((v) => {
75
+ return remap$(v, {
76
+ "X-On-Behalf-Of": "xOnBehalfOf",
77
+ });
78
+ });
79
+ /** @internal */
80
+ export type GetOrgByIdRequest$Outbound = {
81
+ orgId: string;
82
+ "X-On-Behalf-Of"?: string | undefined;
83
+ };
84
+
85
+ /** @internal */
86
+ export const GetOrgByIdRequest$outboundSchema: z.ZodType<
87
+ GetOrgByIdRequest$Outbound,
88
+ z.ZodTypeDef,
89
+ GetOrgByIdRequest
90
+ > = z.object({
91
+ orgId: z.string(),
92
+ xOnBehalfOf: z.string().optional(),
93
+ }).transform((v) => {
94
+ return remap$(v, {
95
+ xOnBehalfOf: "X-On-Behalf-Of",
96
+ });
97
+ });
98
+
99
+ export function getOrgByIdRequestToJSON(
100
+ getOrgByIdRequest: GetOrgByIdRequest,
101
+ ): string {
102
+ return JSON.stringify(
103
+ GetOrgByIdRequest$outboundSchema.parse(getOrgByIdRequest),
104
+ );
105
+ }
106
+ export function getOrgByIdRequestFromJSON(
107
+ jsonString: string,
108
+ ): SafeParseResult<GetOrgByIdRequest, SDKValidationError> {
109
+ return safeParse(
110
+ jsonString,
111
+ (x) => GetOrgByIdRequest$inboundSchema.parse(JSON.parse(x)),
112
+ `Failed to parse 'GetOrgByIdRequest' from JSON`,
113
+ );
114
+ }
@@ -171,6 +171,7 @@ export * from "./getmemoryentry.js";
171
171
  export * from "./getmemorystore.js";
172
172
  export * from "./getmodel.js";
173
173
  export * from "./getorgbudgets.js";
174
+ export * from "./getorgbyid.js";
174
175
  export * from "./getorgquota.js";
175
176
  export * from "./getorgratelimit.js";
176
177
  export * from "./getpricing.js";
@@ -354,6 +355,7 @@ export * from "./updateguardrails.js";
354
355
  export * from "./updatemcpserver.js";
355
356
  export * from "./updatememoryentry.js";
356
357
  export * from "./updatememorystore.js";
358
+ export * from "./updateorganization.js";
357
359
  export * from "./updateorgquota.js";
358
360
  export * from "./updateorgratelimit.js";
359
361
  export * from "./updateprompt.js";
@@ -0,0 +1,121 @@
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 * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type UpdateOrganizationSecurity = {
13
+ bearerAuth?: string | undefined;
14
+ sessionCookie?: string | undefined;
15
+ };
16
+
17
+ export type UpdateOrganizationRequest = {
18
+ orgId: string;
19
+ /**
20
+ * Optional external end-user identifier forwarded by the API gateway.
21
+ */
22
+ xOnBehalfOf?: string | undefined;
23
+ updateOrganizationBody: components.UpdateOrganizationBody;
24
+ };
25
+
26
+ /** @internal */
27
+ export const UpdateOrganizationSecurity$inboundSchema: z.ZodType<
28
+ UpdateOrganizationSecurity,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ bearerAuth: z.string().optional(),
33
+ sessionCookie: z.string().optional(),
34
+ });
35
+ /** @internal */
36
+ export type UpdateOrganizationSecurity$Outbound = {
37
+ bearerAuth?: string | undefined;
38
+ sessionCookie?: string | undefined;
39
+ };
40
+
41
+ /** @internal */
42
+ export const UpdateOrganizationSecurity$outboundSchema: z.ZodType<
43
+ UpdateOrganizationSecurity$Outbound,
44
+ z.ZodTypeDef,
45
+ UpdateOrganizationSecurity
46
+ > = z.object({
47
+ bearerAuth: z.string().optional(),
48
+ sessionCookie: z.string().optional(),
49
+ });
50
+
51
+ export function updateOrganizationSecurityToJSON(
52
+ updateOrganizationSecurity: UpdateOrganizationSecurity,
53
+ ): string {
54
+ return JSON.stringify(
55
+ UpdateOrganizationSecurity$outboundSchema.parse(updateOrganizationSecurity),
56
+ );
57
+ }
58
+ export function updateOrganizationSecurityFromJSON(
59
+ jsonString: string,
60
+ ): SafeParseResult<UpdateOrganizationSecurity, SDKValidationError> {
61
+ return safeParse(
62
+ jsonString,
63
+ (x) => UpdateOrganizationSecurity$inboundSchema.parse(JSON.parse(x)),
64
+ `Failed to parse 'UpdateOrganizationSecurity' from JSON`,
65
+ );
66
+ }
67
+
68
+ /** @internal */
69
+ export const UpdateOrganizationRequest$inboundSchema: z.ZodType<
70
+ UpdateOrganizationRequest,
71
+ z.ZodTypeDef,
72
+ unknown
73
+ > = z.object({
74
+ orgId: z.string(),
75
+ "X-On-Behalf-Of": z.string().optional(),
76
+ UpdateOrganizationBody: components.UpdateOrganizationBody$inboundSchema,
77
+ }).transform((v) => {
78
+ return remap$(v, {
79
+ "X-On-Behalf-Of": "xOnBehalfOf",
80
+ "UpdateOrganizationBody": "updateOrganizationBody",
81
+ });
82
+ });
83
+ /** @internal */
84
+ export type UpdateOrganizationRequest$Outbound = {
85
+ orgId: string;
86
+ "X-On-Behalf-Of"?: string | undefined;
87
+ UpdateOrganizationBody: components.UpdateOrganizationBody$Outbound;
88
+ };
89
+
90
+ /** @internal */
91
+ export const UpdateOrganizationRequest$outboundSchema: z.ZodType<
92
+ UpdateOrganizationRequest$Outbound,
93
+ z.ZodTypeDef,
94
+ UpdateOrganizationRequest
95
+ > = z.object({
96
+ orgId: z.string(),
97
+ xOnBehalfOf: z.string().optional(),
98
+ updateOrganizationBody: components.UpdateOrganizationBody$outboundSchema,
99
+ }).transform((v) => {
100
+ return remap$(v, {
101
+ xOnBehalfOf: "X-On-Behalf-Of",
102
+ updateOrganizationBody: "UpdateOrganizationBody",
103
+ });
104
+ });
105
+
106
+ export function updateOrganizationRequestToJSON(
107
+ updateOrganizationRequest: UpdateOrganizationRequest,
108
+ ): string {
109
+ return JSON.stringify(
110
+ UpdateOrganizationRequest$outboundSchema.parse(updateOrganizationRequest),
111
+ );
112
+ }
113
+ export function updateOrganizationRequestFromJSON(
114
+ jsonString: string,
115
+ ): SafeParseResult<UpdateOrganizationRequest, SDKValidationError> {
116
+ return safeParse(
117
+ jsonString,
118
+ (x) => UpdateOrganizationRequest$inboundSchema.parse(JSON.parse(x)),
119
+ `Failed to parse 'UpdateOrganizationRequest' from JSON`,
120
+ );
121
+ }
@@ -0,0 +1,78 @@
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 { authOrgsGetById } from "../funcs/authOrgsGetById.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 AuthOrgsGetByIdQueryData = components.BasicOrganization;
18
+
19
+ export function prefetchAuthOrgsGetById(
20
+ queryClient: QueryClient,
21
+ client$: SDKCore,
22
+ security: operations.GetOrgByIdSecurity,
23
+ request: operations.GetOrgByIdRequest,
24
+ options?: RequestOptions,
25
+ ): Promise<void> {
26
+ return queryClient.prefetchQuery({
27
+ ...buildAuthOrgsGetByIdQuery(
28
+ client$,
29
+ security,
30
+ request,
31
+ options,
32
+ ),
33
+ });
34
+ }
35
+
36
+ export function buildAuthOrgsGetByIdQuery(
37
+ client$: SDKCore,
38
+ security: operations.GetOrgByIdSecurity,
39
+ request: operations.GetOrgByIdRequest,
40
+ options?: RequestOptions,
41
+ ): {
42
+ queryKey: QueryKey;
43
+ queryFn: (context: QueryFunctionContext) => Promise<AuthOrgsGetByIdQueryData>;
44
+ } {
45
+ return {
46
+ queryKey: queryKeyAuthOrgsGetById(request.orgId, {
47
+ xOnBehalfOf: request.xOnBehalfOf,
48
+ }),
49
+ queryFn: async function authOrgsGetByIdQueryFn(
50
+ ctx,
51
+ ): Promise<AuthOrgsGetByIdQueryData> {
52
+ const sig = combineSignals(
53
+ ctx.signal,
54
+ options?.signal,
55
+ options?.fetchOptions?.signal,
56
+ );
57
+ const mergedOptions = {
58
+ ...options?.fetchOptions,
59
+ ...options,
60
+ signal: sig,
61
+ };
62
+
63
+ return unwrapAsync(authOrgsGetById(
64
+ client$,
65
+ security,
66
+ request,
67
+ mergedOptions,
68
+ ));
69
+ },
70
+ };
71
+ }
72
+
73
+ export function queryKeyAuthOrgsGetById(
74
+ orgId: string,
75
+ parameters: { xOnBehalfOf?: string | undefined },
76
+ ): QueryKey {
77
+ return ["@meetkai/mka1", "orgs", "getById", orgId, parameters];
78
+ }
@@ -0,0 +1,148 @@
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
+ AuthOrgsGetByIdQueryData,
33
+ buildAuthOrgsGetByIdQuery,
34
+ prefetchAuthOrgsGetById,
35
+ queryKeyAuthOrgsGetById,
36
+ } from "./authOrgsGetById.core.js";
37
+ export {
38
+ type AuthOrgsGetByIdQueryData,
39
+ buildAuthOrgsGetByIdQuery,
40
+ prefetchAuthOrgsGetById,
41
+ queryKeyAuthOrgsGetById,
42
+ };
43
+
44
+ export type AuthOrgsGetByIdQueryError =
45
+ | errors.GetOrgByIdResponseBody
46
+ | errors.GetOrgByIdAuthOrgsResponseBody
47
+ | errors.GetOrgByIdAuthOrgsResponseResponseBody
48
+ | errors.GetOrgByIdAuthOrgsResponse404ResponseBody
49
+ | errors.GetOrgByIdAuthOrgsResponse409ResponseBody
50
+ | errors.GetOrgByIdAuthOrgsResponse410ResponseBody
51
+ | errors.GetOrgByIdAuthOrgsResponse429ResponseBody
52
+ | errors.GetOrgByIdAuthOrgsResponse500ResponseBody
53
+ | SDKError
54
+ | ResponseValidationError
55
+ | ConnectionError
56
+ | RequestAbortedError
57
+ | RequestTimeoutError
58
+ | InvalidRequestError
59
+ | UnexpectedClientError
60
+ | SDKValidationError;
61
+
62
+ /**
63
+ * Get basic organization details
64
+ *
65
+ * @remarks
66
+ * Returns basic fields and the full metadata object to a member of the organization or a cluster admin. It never includes member identities, invitations, or API-key details.
67
+ */
68
+ export function useAuthOrgsGetById(
69
+ security: operations.GetOrgByIdSecurity,
70
+ request: operations.GetOrgByIdRequest,
71
+ options?: QueryHookOptions<
72
+ AuthOrgsGetByIdQueryData,
73
+ AuthOrgsGetByIdQueryError
74
+ >,
75
+ ): UseQueryResult<AuthOrgsGetByIdQueryData, AuthOrgsGetByIdQueryError> {
76
+ const client = useSDKContext();
77
+ return useQuery({
78
+ ...buildAuthOrgsGetByIdQuery(
79
+ client,
80
+ security,
81
+ request,
82
+ options,
83
+ ),
84
+ ...options,
85
+ });
86
+ }
87
+
88
+ /**
89
+ * Get basic organization details
90
+ *
91
+ * @remarks
92
+ * Returns basic fields and the full metadata object to a member of the organization or a cluster admin. It never includes member identities, invitations, or API-key details.
93
+ */
94
+ export function useAuthOrgsGetByIdSuspense(
95
+ security: operations.GetOrgByIdSecurity,
96
+ request: operations.GetOrgByIdRequest,
97
+ options?: SuspenseQueryHookOptions<
98
+ AuthOrgsGetByIdQueryData,
99
+ AuthOrgsGetByIdQueryError
100
+ >,
101
+ ): UseSuspenseQueryResult<AuthOrgsGetByIdQueryData, AuthOrgsGetByIdQueryError> {
102
+ const client = useSDKContext();
103
+ return useSuspenseQuery({
104
+ ...buildAuthOrgsGetByIdQuery(
105
+ client,
106
+ security,
107
+ request,
108
+ options,
109
+ ),
110
+ ...options,
111
+ });
112
+ }
113
+
114
+ export function setAuthOrgsGetByIdData(
115
+ client: QueryClient,
116
+ queryKeyBase: [
117
+ orgId: string,
118
+ parameters: { xOnBehalfOf?: string | undefined },
119
+ ],
120
+ data: AuthOrgsGetByIdQueryData,
121
+ ): AuthOrgsGetByIdQueryData | undefined {
122
+ const key = queryKeyAuthOrgsGetById(...queryKeyBase);
123
+
124
+ return client.setQueryData<AuthOrgsGetByIdQueryData>(key, data);
125
+ }
126
+
127
+ export function invalidateAuthOrgsGetById(
128
+ client: QueryClient,
129
+ queryKeyBase: TupleToPrefixes<
130
+ [orgId: string, parameters: { xOnBehalfOf?: string | undefined }]
131
+ >,
132
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
133
+ ): Promise<void> {
134
+ return client.invalidateQueries({
135
+ ...filters,
136
+ queryKey: ["@meetkai/mka1", "orgs", "getById", ...queryKeyBase],
137
+ });
138
+ }
139
+
140
+ export function invalidateAllAuthOrgsGetById(
141
+ client: QueryClient,
142
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
143
+ ): Promise<void> {
144
+ return client.invalidateQueries({
145
+ ...filters,
146
+ queryKey: ["@meetkai/mka1", "orgs", "getById"],
147
+ });
148
+ }
@@ -0,0 +1,122 @@
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 { authOrgsUpdate } from "../funcs/authOrgsUpdate.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 {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKError } from "../models/errors/sdkerror.js";
25
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { unwrapAsync } from "../types/fp.js";
28
+ import { useSDKContext } from "./_context.js";
29
+ import { MutationHookOptions } from "./_types.js";
30
+
31
+ export type AuthOrgsUpdateMutationVariables = {
32
+ security: operations.UpdateOrganizationSecurity;
33
+ request: operations.UpdateOrganizationRequest;
34
+ options?: RequestOptions;
35
+ };
36
+
37
+ export type AuthOrgsUpdateMutationData = components.BasicOrganization;
38
+
39
+ export type AuthOrgsUpdateMutationError =
40
+ | errors.UpdateOrganizationResponseBody
41
+ | errors.UpdateOrganizationAuthOrgsResponseBody
42
+ | errors.UpdateOrganizationAuthOrgsResponseResponseBody
43
+ | errors.UpdateOrganizationAuthOrgsResponse404ResponseBody
44
+ | errors.UpdateOrganizationAuthOrgsResponse409ResponseBody
45
+ | errors.UpdateOrganizationAuthOrgsResponse410ResponseBody
46
+ | errors.UpdateOrganizationAuthOrgsResponse413ResponseBody
47
+ | errors.UpdateOrganizationAuthOrgsResponse429ResponseBody
48
+ | errors.UpdateOrganizationAuthOrgsResponse500ResponseBody
49
+ | SDKError
50
+ | ResponseValidationError
51
+ | ConnectionError
52
+ | RequestAbortedError
53
+ | RequestTimeoutError
54
+ | InvalidRequestError
55
+ | UnexpectedClientError
56
+ | SDKValidationError;
57
+
58
+ /**
59
+ * Patch organization metadata (cluster-admin)
60
+ *
61
+ * @remarks
62
+ * Merges supplied top-level metadata keys while preserving omitted siblings. metadata.codeConfig accepts one releaseManifestUrl; codeConfig:null removes that override.
63
+ */
64
+ export function useAuthOrgsUpdateMutation(
65
+ options?: MutationHookOptions<
66
+ AuthOrgsUpdateMutationData,
67
+ AuthOrgsUpdateMutationError,
68
+ AuthOrgsUpdateMutationVariables
69
+ >,
70
+ ): UseMutationResult<
71
+ AuthOrgsUpdateMutationData,
72
+ AuthOrgsUpdateMutationError,
73
+ AuthOrgsUpdateMutationVariables
74
+ > {
75
+ const client = useSDKContext();
76
+ return useMutation({
77
+ ...buildAuthOrgsUpdateMutation(client, options),
78
+ ...options,
79
+ });
80
+ }
81
+
82
+ export function mutationKeyAuthOrgsUpdate(): MutationKey {
83
+ return ["@meetkai/mka1", "orgs", "update"];
84
+ }
85
+
86
+ export function buildAuthOrgsUpdateMutation(
87
+ client$: SDKCore,
88
+ hookOptions?: RequestOptions,
89
+ ): {
90
+ mutationKey: MutationKey;
91
+ mutationFn: (
92
+ variables: AuthOrgsUpdateMutationVariables,
93
+ ) => Promise<AuthOrgsUpdateMutationData>;
94
+ } {
95
+ return {
96
+ mutationKey: mutationKeyAuthOrgsUpdate(),
97
+ mutationFn: function authOrgsUpdateMutationFn({
98
+ security,
99
+ request,
100
+ options,
101
+ }): Promise<AuthOrgsUpdateMutationData> {
102
+ const mergedOptions = {
103
+ ...hookOptions,
104
+ ...options,
105
+ fetchOptions: {
106
+ ...hookOptions?.fetchOptions,
107
+ ...options?.fetchOptions,
108
+ signal: combineSignals(
109
+ hookOptions?.fetchOptions?.signal,
110
+ options?.fetchOptions?.signal,
111
+ ),
112
+ },
113
+ };
114
+ return unwrapAsync(authOrgsUpdate(
115
+ client$,
116
+ security,
117
+ request,
118
+ mergedOptions,
119
+ ));
120
+ },
121
+ };
122
+ }
@@ -50,8 +50,10 @@ export * from "./authClusterRevokeInvite.js";
50
50
  export * from "./authClusterSuspendOrg.js";
51
51
  export * from "./authClusterUnsuspendOrg.js";
52
52
  export * from "./authClusterUpdateInvite.js";
53
+ export * from "./authOrgsGetById.js";
53
54
  export * from "./authOrgsGetQuota.js";
54
55
  export * from "./authOrgsGetRateLimit.js";
56
+ export * from "./authOrgsUpdate.js";
55
57
  export * from "./authOrgsUpdateQuota.js";
56
58
  export * from "./authOrgsUpdateRateLimit.js";
57
59
  export * from "./authServiceAccountsCreate.js";
package/src/sdk/orgs.ts CHANGED
@@ -2,15 +2,56 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { authOrgsGetById } from "../funcs/authOrgsGetById.js";
5
6
  import { authOrgsGetQuota } from "../funcs/authOrgsGetQuota.js";
6
7
  import { authOrgsGetRateLimit } from "../funcs/authOrgsGetRateLimit.js";
8
+ import { authOrgsUpdate } from "../funcs/authOrgsUpdate.js";
7
9
  import { authOrgsUpdateQuota } from "../funcs/authOrgsUpdateQuota.js";
8
10
  import { authOrgsUpdateRateLimit } from "../funcs/authOrgsUpdateRateLimit.js";
9
11
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
12
+ import * as components from "../models/components/index.js";
10
13
  import * as operations from "../models/operations/index.js";
11
14
  import { unwrapAsync } from "../types/fp.js";
12
15
 
13
16
  export class Orgs extends ClientSDK {
17
+ /**
18
+ * Get basic organization details
19
+ *
20
+ * @remarks
21
+ * Returns basic fields and the full metadata object to a member of the organization or a cluster admin. It never includes member identities, invitations, or API-key details.
22
+ */
23
+ async getById(
24
+ security: operations.GetOrgByIdSecurity,
25
+ request: operations.GetOrgByIdRequest,
26
+ options?: RequestOptions,
27
+ ): Promise<components.BasicOrganization> {
28
+ return unwrapAsync(authOrgsGetById(
29
+ this,
30
+ security,
31
+ request,
32
+ options,
33
+ ));
34
+ }
35
+
36
+ /**
37
+ * Patch organization metadata (cluster-admin)
38
+ *
39
+ * @remarks
40
+ * Merges supplied top-level metadata keys while preserving omitted siblings. metadata.codeConfig accepts one releaseManifestUrl; codeConfig:null removes that override.
41
+ */
42
+ async update(
43
+ security: operations.UpdateOrganizationSecurity,
44
+ request: operations.UpdateOrganizationRequest,
45
+ options?: RequestOptions,
46
+ ): Promise<components.BasicOrganization> {
47
+ return unwrapAsync(authOrgsUpdate(
48
+ this,
49
+ security,
50
+ request,
51
+ options,
52
+ ));
53
+ }
54
+
14
55
  /**
15
56
  * Get an org's usage quota
16
57
  */