@nizam-os/dashboard-sdk 1.0.0

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 (261) hide show
  1. package/dist/BaseClient.d.ts +42 -0
  2. package/dist/BaseClient.js +80 -0
  3. package/dist/Client.d.ts +44 -0
  4. package/dist/Client.js +94 -0
  5. package/dist/api/errors/ConflictError.d.ts +6 -0
  6. package/dist/api/errors/ConflictError.js +54 -0
  7. package/dist/api/errors/ForbiddenError.d.ts +6 -0
  8. package/dist/api/errors/ForbiddenError.js +54 -0
  9. package/dist/api/errors/GoneError.d.ts +6 -0
  10. package/dist/api/errors/GoneError.js +54 -0
  11. package/dist/api/errors/InternalServerError.d.ts +6 -0
  12. package/dist/api/errors/InternalServerError.js +54 -0
  13. package/dist/api/errors/NotFoundError.d.ts +6 -0
  14. package/dist/api/errors/NotFoundError.js +54 -0
  15. package/dist/api/errors/UnauthorizedError.d.ts +6 -0
  16. package/dist/api/errors/UnauthorizedError.js +54 -0
  17. package/dist/api/errors/UnprocessableEntityError.d.ts +6 -0
  18. package/dist/api/errors/UnprocessableEntityError.js +54 -0
  19. package/dist/api/errors/index.d.ts +7 -0
  20. package/dist/api/errors/index.js +23 -0
  21. package/dist/api/index.d.ts +3 -0
  22. package/dist/api/index.js +19 -0
  23. package/dist/api/resources/assets/client/Client.d.ts +52 -0
  24. package/dist/api/resources/assets/client/Client.js +173 -0
  25. package/dist/api/resources/assets/client/index.d.ts +1 -0
  26. package/dist/api/resources/assets/client/index.js +17 -0
  27. package/dist/api/resources/assets/client/requests/CreateAssetRequest.d.ts +31 -0
  28. package/dist/api/resources/assets/client/requests/CreateAssetRequest.js +19 -0
  29. package/dist/api/resources/assets/client/requests/GetAssetRequest.d.ts +9 -0
  30. package/dist/api/resources/assets/client/requests/GetAssetRequest.js +3 -0
  31. package/dist/api/resources/assets/client/requests/index.d.ts +2 -0
  32. package/dist/api/resources/assets/client/requests/index.js +5 -0
  33. package/dist/api/resources/assets/exports.d.ts +2 -0
  34. package/dist/api/resources/assets/exports.js +21 -0
  35. package/dist/api/resources/assets/index.d.ts +1 -0
  36. package/dist/api/resources/assets/index.js +17 -0
  37. package/dist/api/resources/assignments/client/Client.d.ts +74 -0
  38. package/dist/api/resources/assignments/client/Client.js +245 -0
  39. package/dist/api/resources/assignments/client/index.d.ts +1 -0
  40. package/dist/api/resources/assignments/client/index.js +17 -0
  41. package/dist/api/resources/assignments/client/requests/CloseAssignmentRequest.d.ts +26 -0
  42. package/dist/api/resources/assignments/client/requests/CloseAssignmentRequest.js +18 -0
  43. package/dist/api/resources/assignments/client/requests/GetAssignmentRequest.d.ts +9 -0
  44. package/dist/api/resources/assignments/client/requests/GetAssignmentRequest.js +3 -0
  45. package/dist/api/resources/assignments/client/requests/OpenAssignmentRequest.d.ts +27 -0
  46. package/dist/api/resources/assignments/client/requests/OpenAssignmentRequest.js +15 -0
  47. package/dist/api/resources/assignments/client/requests/index.d.ts +3 -0
  48. package/dist/api/resources/assignments/client/requests/index.js +7 -0
  49. package/dist/api/resources/assignments/exports.d.ts +2 -0
  50. package/dist/api/resources/assignments/exports.js +21 -0
  51. package/dist/api/resources/assignments/index.d.ts +1 -0
  52. package/dist/api/resources/assignments/index.js +17 -0
  53. package/dist/api/resources/identity/client/Client.d.ts +114 -0
  54. package/dist/api/resources/identity/client/Client.js +373 -0
  55. package/dist/api/resources/identity/client/index.d.ts +1 -0
  56. package/dist/api/resources/identity/client/index.js +17 -0
  57. package/dist/api/resources/identity/client/requests/InviteUserRequest.d.ts +13 -0
  58. package/dist/api/resources/identity/client/requests/InviteUserRequest.js +3 -0
  59. package/dist/api/resources/identity/client/requests/ListUsersRequest.d.ts +10 -0
  60. package/dist/api/resources/identity/client/requests/ListUsersRequest.js +3 -0
  61. package/dist/api/resources/identity/client/requests/SoftDeleteUserRequest.d.ts +9 -0
  62. package/dist/api/resources/identity/client/requests/SoftDeleteUserRequest.js +3 -0
  63. package/dist/api/resources/identity/client/requests/UserUpdateRequest.d.ts +15 -0
  64. package/dist/api/resources/identity/client/requests/UserUpdateRequest.js +3 -0
  65. package/dist/api/resources/identity/client/requests/index.d.ts +4 -0
  66. package/dist/api/resources/identity/client/requests/index.js +2 -0
  67. package/dist/api/resources/identity/exports.d.ts +2 -0
  68. package/dist/api/resources/identity/exports.js +21 -0
  69. package/dist/api/resources/identity/index.d.ts +1 -0
  70. package/dist/api/resources/identity/index.js +17 -0
  71. package/dist/api/resources/index.d.ts +13 -0
  72. package/dist/api/resources/index.js +52 -0
  73. package/dist/api/resources/invites/client/Client.d.ts +58 -0
  74. package/dist/api/resources/invites/client/Client.js +187 -0
  75. package/dist/api/resources/invites/client/index.d.ts +1 -0
  76. package/dist/api/resources/invites/client/index.js +17 -0
  77. package/dist/api/resources/invites/client/requests/AcceptInviteRequest.d.ts +10 -0
  78. package/dist/api/resources/invites/client/requests/AcceptInviteRequest.js +3 -0
  79. package/dist/api/resources/invites/client/requests/CreateInviteRequest.d.ts +32 -0
  80. package/dist/api/resources/invites/client/requests/CreateInviteRequest.js +17 -0
  81. package/dist/api/resources/invites/client/requests/index.d.ts +2 -0
  82. package/dist/api/resources/invites/client/requests/index.js +5 -0
  83. package/dist/api/resources/invites/exports.d.ts +2 -0
  84. package/dist/api/resources/invites/exports.js +21 -0
  85. package/dist/api/resources/invites/index.d.ts +1 -0
  86. package/dist/api/resources/invites/index.js +17 -0
  87. package/dist/api/resources/lookups/client/Client.d.ts +27 -0
  88. package/dist/api/resources/lookups/client/Client.js +100 -0
  89. package/dist/api/resources/lookups/client/index.d.ts +1 -0
  90. package/dist/api/resources/lookups/client/index.js +2 -0
  91. package/dist/api/resources/lookups/exports.d.ts +2 -0
  92. package/dist/api/resources/lookups/exports.js +21 -0
  93. package/dist/api/resources/lookups/index.d.ts +1 -0
  94. package/dist/api/resources/lookups/index.js +17 -0
  95. package/dist/api/resources/operators/client/Client.d.ts +66 -0
  96. package/dist/api/resources/operators/client/Client.js +187 -0
  97. package/dist/api/resources/operators/client/index.d.ts +1 -0
  98. package/dist/api/resources/operators/client/index.js +17 -0
  99. package/dist/api/resources/operators/client/requests/GetOperatorRequest.d.ts +9 -0
  100. package/dist/api/resources/operators/client/requests/GetOperatorRequest.js +3 -0
  101. package/dist/api/resources/operators/client/requests/index.d.ts +1 -0
  102. package/dist/api/resources/operators/client/requests/index.js +2 -0
  103. package/dist/api/resources/operators/exports.d.ts +2 -0
  104. package/dist/api/resources/operators/exports.js +21 -0
  105. package/dist/api/resources/operators/index.d.ts +1 -0
  106. package/dist/api/resources/operators/index.js +17 -0
  107. package/dist/api/resources/organizations/client/Client.d.ts +136 -0
  108. package/dist/api/resources/organizations/client/Client.js +432 -0
  109. package/dist/api/resources/organizations/client/index.d.ts +1 -0
  110. package/dist/api/resources/organizations/client/index.js +17 -0
  111. package/dist/api/resources/organizations/client/requests/CreateOrganizationRequest.d.ts +28 -0
  112. package/dist/api/resources/organizations/client/requests/CreateOrganizationRequest.js +3 -0
  113. package/dist/api/resources/organizations/client/requests/DeleteOrganizationRequest.d.ts +9 -0
  114. package/dist/api/resources/organizations/client/requests/DeleteOrganizationRequest.js +3 -0
  115. package/dist/api/resources/organizations/client/requests/GetOrganizationRequest.d.ts +9 -0
  116. package/dist/api/resources/organizations/client/requests/GetOrganizationRequest.js +3 -0
  117. package/dist/api/resources/organizations/client/requests/LeaveOrganizationRequest.d.ts +9 -0
  118. package/dist/api/resources/organizations/client/requests/LeaveOrganizationRequest.js +3 -0
  119. package/dist/api/resources/organizations/client/requests/UpdateOrganizationRequest.d.ts +27 -0
  120. package/dist/api/resources/organizations/client/requests/UpdateOrganizationRequest.js +3 -0
  121. package/dist/api/resources/organizations/client/requests/index.d.ts +5 -0
  122. package/dist/api/resources/organizations/client/requests/index.js +2 -0
  123. package/dist/api/resources/organizations/exports.d.ts +2 -0
  124. package/dist/api/resources/organizations/exports.js +21 -0
  125. package/dist/api/resources/organizations/index.d.ts +1 -0
  126. package/dist/api/resources/organizations/index.js +17 -0
  127. package/dist/api/types/ApiFieldError.d.ts +11 -0
  128. package/dist/api/types/ApiFieldError.js +3 -0
  129. package/dist/api/types/Asset.d.ts +58 -0
  130. package/dist/api/types/Asset.js +33 -0
  131. package/dist/api/types/Assignment.d.ts +49 -0
  132. package/dist/api/types/Assignment.js +30 -0
  133. package/dist/api/types/CreateAutonomousOperatorRequest.d.ts +15 -0
  134. package/dist/api/types/CreateAutonomousOperatorRequest.js +3 -0
  135. package/dist/api/types/CreateHumanOperatorRequest.d.ts +17 -0
  136. package/dist/api/types/CreateHumanOperatorRequest.js +3 -0
  137. package/dist/api/types/CreateOperatorRequest.d.ts +16 -0
  138. package/dist/api/types/CreateOperatorRequest.js +3 -0
  139. package/dist/api/types/CreateTeleoperatedOperatorRequest.d.ts +11 -0
  140. package/dist/api/types/CreateTeleoperatedOperatorRequest.js +3 -0
  141. package/dist/api/types/InternalUserUpdateRequest.d.ts +21 -0
  142. package/dist/api/types/InternalUserUpdateRequest.js +14 -0
  143. package/dist/api/types/Invite.d.ts +47 -0
  144. package/dist/api/types/Invite.js +28 -0
  145. package/dist/api/types/ListResponse.d.ts +23 -0
  146. package/dist/api/types/ListResponse.js +11 -0
  147. package/dist/api/types/Operator.d.ts +45 -0
  148. package/dist/api/types/Operator.js +26 -0
  149. package/dist/api/types/Organization.d.ts +35 -0
  150. package/dist/api/types/Organization.js +17 -0
  151. package/dist/api/types/OrganizationMembership.d.ts +29 -0
  152. package/dist/api/types/OrganizationMembership.js +21 -0
  153. package/dist/api/types/ProblemDetail.d.ts +21 -0
  154. package/dist/api/types/ProblemDetail.js +3 -0
  155. package/dist/api/types/User.d.ts +40 -0
  156. package/dist/api/types/User.js +21 -0
  157. package/dist/api/types/UserResource.d.ts +34 -0
  158. package/dist/api/types/UserResource.js +18 -0
  159. package/dist/api/types/index.d.ts +16 -0
  160. package/dist/api/types/index.js +32 -0
  161. package/dist/auth/BearerAuthProvider.d.ts +20 -0
  162. package/dist/auth/BearerAuthProvider.js +68 -0
  163. package/dist/auth/index.d.ts +1 -0
  164. package/dist/auth/index.js +5 -0
  165. package/dist/core/auth/AuthProvider.d.ts +8 -0
  166. package/dist/core/auth/AuthProvider.js +9 -0
  167. package/dist/core/auth/AuthRequest.d.ts +9 -0
  168. package/dist/core/auth/AuthRequest.js +2 -0
  169. package/dist/core/auth/BasicAuth.d.ts +8 -0
  170. package/dist/core/auth/BasicAuth.js +32 -0
  171. package/dist/core/auth/BearerToken.d.ts +7 -0
  172. package/dist/core/auth/BearerToken.js +16 -0
  173. package/dist/core/auth/NoOpAuthProvider.d.ts +5 -0
  174. package/dist/core/auth/NoOpAuthProvider.js +9 -0
  175. package/dist/core/auth/index.d.ts +5 -0
  176. package/dist/core/auth/index.js +11 -0
  177. package/dist/core/base64.d.ts +2 -0
  178. package/dist/core/base64.js +26 -0
  179. package/dist/core/exports.d.ts +1 -0
  180. package/dist/core/exports.js +17 -0
  181. package/dist/core/fetcher/APIResponse.d.ts +20 -0
  182. package/dist/core/fetcher/APIResponse.js +2 -0
  183. package/dist/core/fetcher/BinaryResponse.d.ts +19 -0
  184. package/dist/core/fetcher/BinaryResponse.js +17 -0
  185. package/dist/core/fetcher/EndpointMetadata.d.ts +13 -0
  186. package/dist/core/fetcher/EndpointMetadata.js +2 -0
  187. package/dist/core/fetcher/EndpointSupplier.d.ts +12 -0
  188. package/dist/core/fetcher/EndpointSupplier.js +13 -0
  189. package/dist/core/fetcher/Fetcher.d.ts +56 -0
  190. package/dist/core/fetcher/Fetcher.js +310 -0
  191. package/dist/core/fetcher/Headers.d.ts +2 -0
  192. package/dist/core/fetcher/Headers.js +84 -0
  193. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  194. package/dist/core/fetcher/HttpResponsePromise.js +92 -0
  195. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  196. package/dist/core/fetcher/RawResponse.js +44 -0
  197. package/dist/core/fetcher/Supplier.d.ts +4 -0
  198. package/dist/core/fetcher/Supplier.js +13 -0
  199. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  200. package/dist/core/fetcher/createRequestUrl.js +8 -0
  201. package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
  202. package/dist/core/fetcher/getErrorResponseBody.js +33 -0
  203. package/dist/core/fetcher/getFetchFn.d.ts +1 -0
  204. package/dist/core/fetcher/getFetchFn.js +6 -0
  205. package/dist/core/fetcher/getHeader.d.ts +1 -0
  206. package/dist/core/fetcher/getHeader.js +11 -0
  207. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  208. package/dist/core/fetcher/getRequestBody.js +16 -0
  209. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  210. package/dist/core/fetcher/getResponseBody.js +58 -0
  211. package/dist/core/fetcher/index.d.ts +13 -0
  212. package/dist/core/fetcher/index.js +19 -0
  213. package/dist/core/fetcher/makePassthroughRequest.d.ts +49 -0
  214. package/dist/core/fetcher/makePassthroughRequest.js +122 -0
  215. package/dist/core/fetcher/makeRequest.d.ts +6 -0
  216. package/dist/core/fetcher/makeRequest.js +59 -0
  217. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  218. package/dist/core/fetcher/requestWithRetries.js +59 -0
  219. package/dist/core/fetcher/signals.d.ts +5 -0
  220. package/dist/core/fetcher/signals.js +24 -0
  221. package/dist/core/headers.d.ts +2 -0
  222. package/dist/core/headers.js +31 -0
  223. package/dist/core/index.d.ts +6 -0
  224. package/dist/core/index.js +45 -0
  225. package/dist/core/json.d.ts +15 -0
  226. package/dist/core/json.js +24 -0
  227. package/dist/core/logging/exports.d.ts +18 -0
  228. package/dist/core/logging/exports.js +45 -0
  229. package/dist/core/logging/index.d.ts +1 -0
  230. package/dist/core/logging/index.js +17 -0
  231. package/dist/core/logging/logger.d.ts +126 -0
  232. package/dist/core/logging/logger.js +143 -0
  233. package/dist/core/runtime/index.d.ts +1 -0
  234. package/dist/core/runtime/index.js +5 -0
  235. package/dist/core/runtime/runtime.d.ts +9 -0
  236. package/dist/core/runtime/runtime.js +103 -0
  237. package/dist/core/url/QueryStringBuilder.d.ts +47 -0
  238. package/dist/core/url/QueryStringBuilder.js +83 -0
  239. package/dist/core/url/encodePathParam.d.ts +1 -0
  240. package/dist/core/url/encodePathParam.js +21 -0
  241. package/dist/core/url/index.d.ts +4 -0
  242. package/dist/core/url/index.js +11 -0
  243. package/dist/core/url/join.d.ts +1 -0
  244. package/dist/core/url/join.js +68 -0
  245. package/dist/core/url/qs.d.ts +7 -0
  246. package/dist/core/url/qs.js +79 -0
  247. package/dist/environments.d.ts +4 -0
  248. package/dist/environments.js +7 -0
  249. package/dist/errors/NizamDashboardError.d.ts +14 -0
  250. package/dist/errors/NizamDashboardError.js +35 -0
  251. package/dist/errors/NizamDashboardTimeoutError.d.ts +6 -0
  252. package/dist/errors/NizamDashboardTimeoutError.js +18 -0
  253. package/dist/errors/handleNonStatusCodeError.d.ts +2 -0
  254. package/dist/errors/handleNonStatusCodeError.js +68 -0
  255. package/dist/errors/index.d.ts +2 -0
  256. package/dist/errors/index.js +7 -0
  257. package/dist/exports.d.ts +1 -0
  258. package/dist/exports.js +17 -0
  259. package/dist/index.d.ts +6 -0
  260. package/dist/index.js +48 -0
  261. package/package.json +35 -0
@@ -0,0 +1,432 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.OrganizationsClient = void 0;
38
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
39
+ const headers_js_1 = require("../../../../core/headers.js");
40
+ const core = __importStar(require("../../../../core/index.js"));
41
+ const environments = __importStar(require("../../../../environments.js"));
42
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
43
+ const errors = __importStar(require("../../../../errors/index.js"));
44
+ const NizamDashboard = __importStar(require("../../../index.js"));
45
+ /**
46
+ * Tenants — the top-level container for users, merchants, and operations.
47
+ */
48
+ class OrganizationsClient {
49
+ constructor(options) {
50
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
51
+ }
52
+ /**
53
+ * Returns every organization the calling user is a member of, with their role inside.
54
+ *
55
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
56
+ *
57
+ * @throws {@link NizamDashboard.UnauthorizedError}
58
+ * @throws {@link NizamDashboard.ForbiddenError}
59
+ * @throws {@link NizamDashboard.InternalServerError}
60
+ *
61
+ * @example
62
+ * await client.organizations.listMyOrganizations()
63
+ */
64
+ listMyOrganizations(requestOptions) {
65
+ return core.HttpResponsePromise.fromPromise(this.__listMyOrganizations(requestOptions));
66
+ }
67
+ async __listMyOrganizations(requestOptions) {
68
+ const _authRequest = await this._options.authProvider.getAuthRequest();
69
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
70
+ const _response = await core.fetcher({
71
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
72
+ (await core.Supplier.get(this._options.environment)) ??
73
+ environments.NizamDashboardEnvironment.Production, "v1/me/organizations"),
74
+ method: "GET",
75
+ headers: _headers,
76
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
77
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
78
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
79
+ abortSignal: requestOptions?.abortSignal,
80
+ fetchFn: this._options?.fetch,
81
+ logging: this._options.logging,
82
+ });
83
+ if (_response.ok) {
84
+ return {
85
+ data: _response.body,
86
+ rawResponse: _response.rawResponse,
87
+ };
88
+ }
89
+ if (_response.error.reason === "status-code") {
90
+ switch (_response.error.statusCode) {
91
+ case 401:
92
+ throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
93
+ case 403:
94
+ throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
95
+ case 500:
96
+ throw new NizamDashboard.InternalServerError(_response.error.body, _response.rawResponse);
97
+ default:
98
+ throw new errors.NizamDashboardError({
99
+ statusCode: _response.error.statusCode,
100
+ body: _response.error.body,
101
+ rawResponse: _response.rawResponse,
102
+ });
103
+ }
104
+ }
105
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/me/organizations");
106
+ }
107
+ /**
108
+ * Creates a brand-new tenant with the calling user as the founding admin. The id is assigned by Keycloak so the same value identifies the organization in both systems. Slug is derived from the name when not supplied.
109
+ *
110
+ * @param {NizamDashboard.CreateOrganizationRequest} request
111
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
112
+ *
113
+ * @throws {@link NizamDashboard.UnauthorizedError}
114
+ * @throws {@link NizamDashboard.ForbiddenError}
115
+ * @throws {@link NizamDashboard.ConflictError}
116
+ * @throws {@link NizamDashboard.UnprocessableEntityError}
117
+ * @throws {@link NizamDashboard.InternalServerError}
118
+ *
119
+ * @example
120
+ * await client.organizations.createOrganization({
121
+ * name: "Acme Logistics",
122
+ * slug: "acme-logistics",
123
+ * primary_domain: "acme.com",
124
+ * business_category: "third_party_logistics",
125
+ * phone: "+15551234567",
126
+ * country: "US",
127
+ * timezone: "America/Los_Angeles"
128
+ * })
129
+ */
130
+ createOrganization(request, requestOptions) {
131
+ return core.HttpResponsePromise.fromPromise(this.__createOrganization(request, requestOptions));
132
+ }
133
+ async __createOrganization(request, requestOptions) {
134
+ const _authRequest = await this._options.authProvider.getAuthRequest();
135
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
136
+ const _response = await core.fetcher({
137
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
138
+ (await core.Supplier.get(this._options.environment)) ??
139
+ environments.NizamDashboardEnvironment.Production, "v1/organizations"),
140
+ method: "POST",
141
+ headers: _headers,
142
+ contentType: "application/json",
143
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
144
+ requestType: "json",
145
+ body: request,
146
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
147
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
148
+ abortSignal: requestOptions?.abortSignal,
149
+ fetchFn: this._options?.fetch,
150
+ logging: this._options.logging,
151
+ });
152
+ if (_response.ok) {
153
+ return { data: _response.body, rawResponse: _response.rawResponse };
154
+ }
155
+ if (_response.error.reason === "status-code") {
156
+ switch (_response.error.statusCode) {
157
+ case 401:
158
+ throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
159
+ case 403:
160
+ throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
161
+ case 409:
162
+ throw new NizamDashboard.ConflictError(_response.error.body, _response.rawResponse);
163
+ case 422:
164
+ throw new NizamDashboard.UnprocessableEntityError(_response.error.body, _response.rawResponse);
165
+ case 500:
166
+ throw new NizamDashboard.InternalServerError(_response.error.body, _response.rawResponse);
167
+ default:
168
+ throw new errors.NizamDashboardError({
169
+ statusCode: _response.error.statusCode,
170
+ body: _response.error.body,
171
+ rawResponse: _response.rawResponse,
172
+ });
173
+ }
174
+ }
175
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/organizations");
176
+ }
177
+ /**
178
+ * Returns one organization. RLS narrows visibility — non-members get 404 indistinguishable from a non-existent id (prevents tenant probing).
179
+ *
180
+ * @param {NizamDashboard.GetOrganizationRequest} request
181
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
182
+ *
183
+ * @throws {@link NizamDashboard.UnauthorizedError}
184
+ * @throws {@link NizamDashboard.ForbiddenError}
185
+ * @throws {@link NizamDashboard.NotFoundError}
186
+ * @throws {@link NizamDashboard.InternalServerError}
187
+ *
188
+ * @example
189
+ * await client.organizations.getOrganization({
190
+ * id: "00000000-0000-0000-0000-000000000000"
191
+ * })
192
+ */
193
+ getOrganization(request, requestOptions) {
194
+ return core.HttpResponsePromise.fromPromise(this.__getOrganization(request, requestOptions));
195
+ }
196
+ async __getOrganization(request, requestOptions) {
197
+ const { id } = request;
198
+ const _authRequest = await this._options.authProvider.getAuthRequest();
199
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
200
+ const _response = await core.fetcher({
201
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
202
+ (await core.Supplier.get(this._options.environment)) ??
203
+ environments.NizamDashboardEnvironment.Production, `v1/organizations/${core.url.encodePathParam(id)}`),
204
+ method: "GET",
205
+ headers: _headers,
206
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
207
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
208
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
209
+ abortSignal: requestOptions?.abortSignal,
210
+ fetchFn: this._options?.fetch,
211
+ logging: this._options.logging,
212
+ });
213
+ if (_response.ok) {
214
+ return { data: _response.body, rawResponse: _response.rawResponse };
215
+ }
216
+ if (_response.error.reason === "status-code") {
217
+ switch (_response.error.statusCode) {
218
+ case 401:
219
+ throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
220
+ case 403:
221
+ throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
222
+ case 404:
223
+ throw new NizamDashboard.NotFoundError(_response.error.body, _response.rawResponse);
224
+ case 500:
225
+ throw new NizamDashboard.InternalServerError(_response.error.body, _response.rawResponse);
226
+ default:
227
+ throw new errors.NizamDashboardError({
228
+ statusCode: _response.error.statusCode,
229
+ body: _response.error.body,
230
+ rawResponse: _response.rawResponse,
231
+ });
232
+ }
233
+ }
234
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/organizations/{id}");
235
+ }
236
+ /**
237
+ * Owner-only. Sets `deleted_at` on the organizations row; subsequent reads filter it out. The Keycloak Organization is intentionally left in place — restore is just an UPDATE un-setting `deleted_at`. Members are not removed; their memberships persist alongside the soft-deleted row in case a restore path is added later.
238
+ *
239
+ * @param {NizamDashboard.DeleteOrganizationRequest} request
240
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
241
+ *
242
+ * @throws {@link NizamDashboard.UnauthorizedError}
243
+ * @throws {@link NizamDashboard.ForbiddenError}
244
+ * @throws {@link NizamDashboard.NotFoundError}
245
+ * @throws {@link NizamDashboard.InternalServerError}
246
+ *
247
+ * @example
248
+ * await client.organizations.deleteOrganization({
249
+ * id: "00000000-0000-0000-0000-000000000000"
250
+ * })
251
+ */
252
+ deleteOrganization(request, requestOptions) {
253
+ return core.HttpResponsePromise.fromPromise(this.__deleteOrganization(request, requestOptions));
254
+ }
255
+ async __deleteOrganization(request, requestOptions) {
256
+ const { id } = request;
257
+ const _authRequest = await this._options.authProvider.getAuthRequest();
258
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
259
+ const _response = await core.fetcher({
260
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
261
+ (await core.Supplier.get(this._options.environment)) ??
262
+ environments.NizamDashboardEnvironment.Production, `v1/organizations/${core.url.encodePathParam(id)}`),
263
+ method: "DELETE",
264
+ headers: _headers,
265
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
266
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
267
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
268
+ abortSignal: requestOptions?.abortSignal,
269
+ fetchFn: this._options?.fetch,
270
+ logging: this._options.logging,
271
+ });
272
+ if (_response.ok) {
273
+ return { data: undefined, rawResponse: _response.rawResponse };
274
+ }
275
+ if (_response.error.reason === "status-code") {
276
+ switch (_response.error.statusCode) {
277
+ case 401:
278
+ throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
279
+ case 403:
280
+ throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
281
+ case 404:
282
+ throw new NizamDashboard.NotFoundError(_response.error.body, _response.rawResponse);
283
+ case 500:
284
+ throw new NizamDashboard.InternalServerError(_response.error.body, _response.rawResponse);
285
+ default:
286
+ throw new errors.NizamDashboardError({
287
+ statusCode: _response.error.statusCode,
288
+ body: _response.error.body,
289
+ rawResponse: _response.rawResponse,
290
+ });
291
+ }
292
+ }
293
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v1/organizations/{id}");
294
+ }
295
+ /**
296
+ * Set-only partial update. Null/omitted fields stay unchanged. A slug rename also renames the Keycloak Organization's alias inside the same transaction so the two stay in lockstep.
297
+ *
298
+ * @param {NizamDashboard.UpdateOrganizationRequest} request
299
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
300
+ *
301
+ * @throws {@link NizamDashboard.UnauthorizedError}
302
+ * @throws {@link NizamDashboard.ForbiddenError}
303
+ * @throws {@link NizamDashboard.NotFoundError}
304
+ * @throws {@link NizamDashboard.ConflictError}
305
+ * @throws {@link NizamDashboard.UnprocessableEntityError}
306
+ * @throws {@link NizamDashboard.InternalServerError}
307
+ *
308
+ * @example
309
+ * await client.organizations.updateOrganization({
310
+ * id: "00000000-0000-0000-0000-000000000000",
311
+ * name: "Acme Logistics",
312
+ * slug: "acme-logistics",
313
+ * business_category: "third_party_logistics",
314
+ * phone: "+15551234567",
315
+ * country: "US",
316
+ * timezone: "America/Los_Angeles"
317
+ * })
318
+ */
319
+ updateOrganization(request, requestOptions) {
320
+ return core.HttpResponsePromise.fromPromise(this.__updateOrganization(request, requestOptions));
321
+ }
322
+ async __updateOrganization(request, requestOptions) {
323
+ const { id, ..._body } = request;
324
+ const _authRequest = await this._options.authProvider.getAuthRequest();
325
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
326
+ const _response = await core.fetcher({
327
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
328
+ (await core.Supplier.get(this._options.environment)) ??
329
+ environments.NizamDashboardEnvironment.Production, `v1/organizations/${core.url.encodePathParam(id)}`),
330
+ method: "PATCH",
331
+ headers: _headers,
332
+ contentType: "application/json",
333
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
334
+ requestType: "json",
335
+ body: _body,
336
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
337
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
338
+ abortSignal: requestOptions?.abortSignal,
339
+ fetchFn: this._options?.fetch,
340
+ logging: this._options.logging,
341
+ });
342
+ if (_response.ok) {
343
+ return { data: _response.body, rawResponse: _response.rawResponse };
344
+ }
345
+ if (_response.error.reason === "status-code") {
346
+ switch (_response.error.statusCode) {
347
+ case 401:
348
+ throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
349
+ case 403:
350
+ throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
351
+ case 404:
352
+ throw new NizamDashboard.NotFoundError(_response.error.body, _response.rawResponse);
353
+ case 409:
354
+ throw new NizamDashboard.ConflictError(_response.error.body, _response.rawResponse);
355
+ case 422:
356
+ throw new NizamDashboard.UnprocessableEntityError(_response.error.body, _response.rawResponse);
357
+ case 500:
358
+ throw new NizamDashboard.InternalServerError(_response.error.body, _response.rawResponse);
359
+ default:
360
+ throw new errors.NizamDashboardError({
361
+ statusCode: _response.error.statusCode,
362
+ body: _response.error.body,
363
+ rawResponse: _response.rawResponse,
364
+ });
365
+ }
366
+ }
367
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v1/organizations/{id}");
368
+ }
369
+ /**
370
+ * Removes the caller's membership from the organization. The owner cannot leave — they must transfer ownership (future endpoint) or delete the org instead.
371
+ *
372
+ * @param {NizamDashboard.LeaveOrganizationRequest} request
373
+ * @param {OrganizationsClient.RequestOptions} requestOptions - Request-specific configuration.
374
+ *
375
+ * @throws {@link NizamDashboard.UnauthorizedError}
376
+ * @throws {@link NizamDashboard.ForbiddenError}
377
+ * @throws {@link NizamDashboard.NotFoundError}
378
+ * @throws {@link NizamDashboard.ConflictError}
379
+ * @throws {@link NizamDashboard.InternalServerError}
380
+ *
381
+ * @example
382
+ * await client.organizations.leaveOrganization({
383
+ * id: "00000000-0000-0000-0000-000000000000"
384
+ * })
385
+ */
386
+ leaveOrganization(request, requestOptions) {
387
+ return core.HttpResponsePromise.fromPromise(this.__leaveOrganization(request, requestOptions));
388
+ }
389
+ async __leaveOrganization(request, requestOptions) {
390
+ const { id } = request;
391
+ const _authRequest = await this._options.authProvider.getAuthRequest();
392
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
393
+ const _response = await core.fetcher({
394
+ url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
395
+ (await core.Supplier.get(this._options.environment)) ??
396
+ environments.NizamDashboardEnvironment.Production, `v1/organizations/${core.url.encodePathParam(id)}/members/me`),
397
+ method: "DELETE",
398
+ headers: _headers,
399
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
400
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
401
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
402
+ abortSignal: requestOptions?.abortSignal,
403
+ fetchFn: this._options?.fetch,
404
+ logging: this._options.logging,
405
+ });
406
+ if (_response.ok) {
407
+ return { data: undefined, rawResponse: _response.rawResponse };
408
+ }
409
+ if (_response.error.reason === "status-code") {
410
+ switch (_response.error.statusCode) {
411
+ case 401:
412
+ throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
413
+ case 403:
414
+ throw new NizamDashboard.ForbiddenError(_response.error.body, _response.rawResponse);
415
+ case 404:
416
+ throw new NizamDashboard.NotFoundError(_response.error.body, _response.rawResponse);
417
+ case 409:
418
+ throw new NizamDashboard.ConflictError(_response.error.body, _response.rawResponse);
419
+ case 500:
420
+ throw new NizamDashboard.InternalServerError(_response.error.body, _response.rawResponse);
421
+ default:
422
+ throw new errors.NizamDashboardError({
423
+ statusCode: _response.error.statusCode,
424
+ body: _response.error.body,
425
+ rawResponse: _response.rawResponse,
426
+ });
427
+ }
428
+ }
429
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v1/organizations/{id}/members/me");
430
+ }
431
+ }
432
+ exports.OrganizationsClient = OrganizationsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * name: "Acme Logistics",
5
+ * slug: "acme-logistics",
6
+ * primary_domain: "acme.com",
7
+ * business_category: "third_party_logistics",
8
+ * phone: "+15551234567",
9
+ * country: "US",
10
+ * timezone: "America/Los_Angeles"
11
+ * }
12
+ */
13
+ export interface CreateOrganizationRequest {
14
+ /** Display name of the organization. */
15
+ name: string;
16
+ /** Optional URL-safe slug. When omitted, the server derives one from the name. */
17
+ slug?: string;
18
+ /** Optional primary email domain. When set, Keycloak attaches it to the new Organization so per-domain IdP discovery works. */
19
+ primary_domain?: string;
20
+ /** Optional self-selected vertical from /v1/lookups/business-categories. Lowercase slug (e.g. 'restaurant', 'third_party_logistics'). Drives downstream personalization. */
21
+ business_category?: string;
22
+ /** Optional contact phone number in E.164 format (leading +, country code, then digits). */
23
+ phone?: string;
24
+ /** Optional ISO 3166-1 alpha-2 country code. */
25
+ country?: string;
26
+ /** Optional IANA timezone identifier. */
27
+ timezone?: string;
28
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "00000000-0000-0000-0000-000000000000"
5
+ * }
6
+ */
7
+ export interface DeleteOrganizationRequest {
8
+ id: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "00000000-0000-0000-0000-000000000000"
5
+ * }
6
+ */
7
+ export interface GetOrganizationRequest {
8
+ id: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "00000000-0000-0000-0000-000000000000"
5
+ * }
6
+ */
7
+ export interface LeaveOrganizationRequest {
8
+ id: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "00000000-0000-0000-0000-000000000000",
5
+ * name: "Acme Logistics",
6
+ * slug: "acme-logistics",
7
+ * business_category: "third_party_logistics",
8
+ * phone: "+15551234567",
9
+ * country: "US",
10
+ * timezone: "America/Los_Angeles"
11
+ * }
12
+ */
13
+ export interface UpdateOrganizationRequest {
14
+ id: string;
15
+ /** New display name. Omit to leave unchanged. */
16
+ name?: string;
17
+ /** New URL-safe slug. Cross-tenant unique. Cascades to the Keycloak Organization's alias. Omit to leave unchanged. */
18
+ slug?: string;
19
+ /** New business category — lowercase slug from /v1/lookups/business-categories. Omit to leave unchanged. */
20
+ business_category?: string;
21
+ /** New contact phone in E.164 format. Omit to leave unchanged. */
22
+ phone?: string;
23
+ /** New ISO 3166-1 alpha-2 country code. Omit to leave unchanged. */
24
+ country?: string;
25
+ /** New IANA timezone identifier. Omit to leave unchanged. */
26
+ timezone?: string;
27
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export type { CreateOrganizationRequest } from "./CreateOrganizationRequest.js";
2
+ export type { DeleteOrganizationRequest } from "./DeleteOrganizationRequest.js";
3
+ export type { GetOrganizationRequest } from "./GetOrganizationRequest.js";
4
+ export type { LeaveOrganizationRequest } from "./LeaveOrganizationRequest.js";
5
+ export type { UpdateOrganizationRequest } from "./UpdateOrganizationRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { OrganizationsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.OrganizationsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "OrganizationsClient", { enumerable: true, get: function () { return Client_js_1.OrganizationsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * One field-level entry inside a 422 validation problem.
3
+ */
4
+ export interface ApiFieldError {
5
+ /** Dot-notated JSON path matching the request shape. */
6
+ field: string;
7
+ /** Stable machine-readable code. */
8
+ code: string;
9
+ /** Human-readable detail (English). */
10
+ message: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });