@spotto/contract 1.0.70-alpha.2 → 1.0.70-alpha.21

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 (305) hide show
  1. package/README.md +33 -33
  2. package/dist/actions/[id]/index.d.ts +1 -0
  3. package/dist/actions/[id]/index.js +18 -0
  4. package/dist/actions/[id]/index.js.map +1 -0
  5. package/dist/actions/[id]/patch/index.d.ts +2 -0
  6. package/dist/actions/[id]/patch/index.js +19 -0
  7. package/dist/actions/[id]/patch/index.js.map +1 -0
  8. package/dist/actions/[id]/patch/request.d.ts +16 -0
  9. package/dist/actions/[id]/patch/request.js +3 -0
  10. package/dist/actions/[id]/patch/request.js.map +1 -0
  11. package/dist/actions/[id]/patch/response.d.ts +1 -0
  12. package/dist/actions/[id]/patch/response.js +3 -0
  13. package/dist/actions/[id]/patch/response.js.map +1 -0
  14. package/dist/actions/get/index.d.ts +2 -0
  15. package/dist/actions/get/index.js +19 -0
  16. package/dist/actions/get/index.js.map +1 -0
  17. package/dist/actions/get/query.d.ts +14 -0
  18. package/dist/actions/get/query.js +3 -0
  19. package/dist/actions/get/query.js.map +1 -0
  20. package/dist/actions/get/response.d.ts +29 -0
  21. package/dist/actions/get/response.js +3 -0
  22. package/dist/actions/get/response.js.map +1 -0
  23. package/dist/actions/index.d.ts +4 -0
  24. package/dist/actions/index.js +21 -0
  25. package/dist/actions/index.js.map +1 -0
  26. package/dist/actions/post/index.d.ts +2 -0
  27. package/dist/actions/post/index.js +19 -0
  28. package/dist/actions/post/index.js.map +1 -0
  29. package/dist/actions/post/request.d.ts +15 -0
  30. package/dist/actions/post/request.js +3 -0
  31. package/dist/actions/post/request.js.map +1 -0
  32. package/dist/actions/post/response.d.ts +1 -0
  33. package/dist/actions/post/response.js +3 -0
  34. package/dist/actions/post/response.js.map +1 -0
  35. package/dist/actions/shared.d.ts +51 -0
  36. package/dist/actions/shared.js +13 -0
  37. package/dist/actions/shared.js.map +1 -0
  38. package/dist/ai/chat/index.d.ts +2 -0
  39. package/dist/ai/chat/index.js +19 -0
  40. package/dist/ai/chat/index.js.map +1 -0
  41. package/dist/ai/chat/request.d.ts +27 -0
  42. package/dist/ai/chat/request.js +3 -0
  43. package/dist/ai/chat/request.js.map +1 -0
  44. package/dist/ai/chat/response.d.ts +57 -0
  45. package/dist/ai/chat/response.js +11 -0
  46. package/dist/ai/chat/response.js.map +1 -0
  47. package/dist/ai/expression/index.d.ts +2 -0
  48. package/dist/ai/expression/index.js +19 -0
  49. package/dist/ai/expression/index.js.map +1 -0
  50. package/dist/ai/expression/request.d.ts +29 -0
  51. package/dist/ai/expression/request.js +3 -0
  52. package/dist/ai/expression/request.js.map +1 -0
  53. package/dist/ai/expression/response.d.ts +23 -0
  54. package/dist/ai/expression/response.js +3 -0
  55. package/dist/ai/expression/response.js.map +1 -0
  56. package/dist/ai/index.d.ts +4 -0
  57. package/dist/ai/index.js +21 -0
  58. package/dist/ai/index.js.map +1 -0
  59. package/dist/ai/semantic-query/index.d.ts +2 -0
  60. package/dist/ai/semantic-query/index.js +19 -0
  61. package/dist/ai/semantic-query/index.js.map +1 -0
  62. package/dist/ai/semantic-query/request.d.ts +43 -0
  63. package/dist/ai/semantic-query/request.js +3 -0
  64. package/dist/ai/semantic-query/request.js.map +1 -0
  65. package/dist/ai/semantic-query/response.d.ts +40 -0
  66. package/dist/ai/semantic-query/response.js +3 -0
  67. package/dist/ai/semantic-query/response.js.map +1 -0
  68. package/dist/ai/shared.d.ts +22 -0
  69. package/dist/ai/shared.js +11 -0
  70. package/dist/ai/shared.js.map +1 -0
  71. package/dist/assets/[id]/get.d.ts +9 -1
  72. package/dist/assets/[id]/patch/request.d.ts +5 -0
  73. package/dist/assets/count/query.d.ts +16 -1
  74. package/dist/assets/download/query.d.ts +7 -0
  75. package/dist/assets/get/query.d.ts +22 -4
  76. package/dist/assets/post/request.d.ts +2 -0
  77. package/dist/assets/post/request.js.map +1 -1
  78. package/dist/events/constants.d.ts +2 -1
  79. package/dist/events/constants.js +2 -0
  80. package/dist/events/constants.js.map +1 -1
  81. package/dist/events/get/response.d.ts +17 -1
  82. package/dist/fields/[id]/get.d.ts +3 -0
  83. package/dist/fields/[id]/patch/request.d.ts +4 -0
  84. package/dist/fields/constants.d.ts +19 -0
  85. package/dist/fields/constants.js +15 -1
  86. package/dist/fields/constants.js.map +1 -1
  87. package/dist/forms/[id]/index.d.ts +1 -0
  88. package/dist/forms/[id]/index.js +18 -0
  89. package/dist/forms/[id]/index.js.map +1 -0
  90. package/dist/forms/[id]/patch/index.d.ts +2 -0
  91. package/dist/forms/[id]/patch/index.js +19 -0
  92. package/dist/forms/[id]/patch/index.js.map +1 -0
  93. package/dist/forms/[id]/patch/request.d.ts +14 -0
  94. package/dist/forms/[id]/patch/request.js +3 -0
  95. package/dist/forms/[id]/patch/request.js.map +1 -0
  96. package/dist/forms/[id]/patch/response.d.ts +1 -0
  97. package/dist/forms/[id]/patch/response.js +3 -0
  98. package/dist/forms/[id]/patch/response.js.map +1 -0
  99. package/dist/forms/constants.d.ts +19 -0
  100. package/dist/forms/constants.js +33 -0
  101. package/dist/forms/constants.js.map +1 -0
  102. package/dist/forms/get/index.d.ts +2 -0
  103. package/dist/forms/get/index.js +19 -0
  104. package/dist/forms/get/index.js.map +1 -0
  105. package/dist/forms/get/query.d.ts +18 -0
  106. package/dist/forms/get/query.js +3 -0
  107. package/dist/forms/get/query.js.map +1 -0
  108. package/dist/forms/get/response.d.ts +23 -0
  109. package/dist/forms/get/response.js +3 -0
  110. package/dist/forms/get/response.js.map +1 -0
  111. package/dist/forms/index.d.ts +6 -0
  112. package/dist/forms/index.js +23 -0
  113. package/dist/forms/index.js.map +1 -0
  114. package/dist/forms/post/index.d.ts +2 -0
  115. package/dist/forms/post/index.js +19 -0
  116. package/dist/forms/post/index.js.map +1 -0
  117. package/dist/forms/post/request.d.ts +9 -0
  118. package/dist/forms/post/request.js +3 -0
  119. package/dist/forms/post/request.js.map +1 -0
  120. package/dist/forms/post/response.d.ts +1 -0
  121. package/dist/forms/post/response.js +3 -0
  122. package/dist/forms/post/response.js.map +1 -0
  123. package/dist/forms/shared.d.ts +127 -0
  124. package/dist/forms/shared.js +3 -0
  125. package/dist/forms/shared.js.map +1 -0
  126. package/dist/forms/versions/index.d.ts +2 -0
  127. package/dist/forms/versions/index.js +19 -0
  128. package/dist/forms/versions/index.js.map +1 -0
  129. package/dist/forms/versions/path.d.ts +8 -0
  130. package/dist/forms/versions/path.js +3 -0
  131. package/dist/forms/versions/path.js.map +1 -0
  132. package/dist/forms/versions/response.d.ts +1 -0
  133. package/dist/forms/versions/response.js +3 -0
  134. package/dist/forms/versions/response.js.map +1 -0
  135. package/dist/index.d.ts +6 -0
  136. package/dist/index.js +6 -0
  137. package/dist/index.js.map +1 -1
  138. package/dist/integrations/oneblink/patch/request.d.ts +2 -2
  139. package/dist/integrations/oneblink/token.d.ts +2 -0
  140. package/dist/locations/get/query.d.ts +14 -0
  141. package/dist/organisations/constants.d.ts +11 -0
  142. package/dist/organisations/sso/constants.d.ts +15 -0
  143. package/dist/organisations/sso/constants.js +16 -1
  144. package/dist/organisations/sso/constants.js.map +1 -1
  145. package/dist/organisations/sso/types.d.ts +48 -0
  146. package/dist/semantic-queries/[id]/index.d.ts +1 -0
  147. package/dist/semantic-queries/[id]/index.js +18 -0
  148. package/dist/semantic-queries/[id]/index.js.map +1 -0
  149. package/dist/semantic-queries/[id]/patch/index.d.ts +2 -0
  150. package/dist/semantic-queries/[id]/patch/index.js +19 -0
  151. package/dist/semantic-queries/[id]/patch/index.js.map +1 -0
  152. package/dist/semantic-queries/[id]/patch/request.d.ts +20 -0
  153. package/dist/semantic-queries/[id]/patch/request.js +3 -0
  154. package/dist/semantic-queries/[id]/patch/request.js.map +1 -0
  155. package/dist/semantic-queries/[id]/patch/response.d.ts +1 -0
  156. package/dist/semantic-queries/[id]/patch/response.js +3 -0
  157. package/dist/semantic-queries/[id]/patch/response.js.map +1 -0
  158. package/dist/semantic-queries/get/index.d.ts +2 -0
  159. package/dist/semantic-queries/get/index.js +19 -0
  160. package/dist/semantic-queries/get/index.js.map +1 -0
  161. package/dist/semantic-queries/get/query.d.ts +18 -0
  162. package/dist/semantic-queries/get/query.js +3 -0
  163. package/dist/semantic-queries/get/query.js.map +1 -0
  164. package/dist/semantic-queries/get/response.d.ts +40 -0
  165. package/dist/semantic-queries/get/response.js +3 -0
  166. package/dist/semantic-queries/get/response.js.map +1 -0
  167. package/dist/semantic-queries/index.d.ts +4 -0
  168. package/dist/semantic-queries/index.js +21 -0
  169. package/dist/semantic-queries/index.js.map +1 -0
  170. package/dist/semantic-queries/post/index.d.ts +2 -0
  171. package/dist/semantic-queries/post/index.js +19 -0
  172. package/dist/semantic-queries/post/index.js.map +1 -0
  173. package/dist/semantic-queries/post/request.d.ts +56 -0
  174. package/dist/semantic-queries/post/request.js +3 -0
  175. package/dist/semantic-queries/post/request.js.map +1 -0
  176. package/dist/semantic-queries/post/response.d.ts +1 -0
  177. package/dist/semantic-queries/post/response.js +3 -0
  178. package/dist/semantic-queries/post/response.js.map +1 -0
  179. package/dist/semantic-queries/shared.d.ts +496 -0
  180. package/dist/semantic-queries/shared.js +224 -0
  181. package/dist/semantic-queries/shared.js.map +1 -0
  182. package/dist/shared/attachments.d.ts +29 -0
  183. package/dist/shared/attachments.js +11 -0
  184. package/dist/shared/attachments.js.map +1 -0
  185. package/dist/shared/embed.d.ts +14 -0
  186. package/dist/shared/index.d.ts +2 -0
  187. package/dist/shared/index.js +2 -0
  188. package/dist/shared/index.js.map +1 -1
  189. package/dist/shared/readiness.d.ts +81 -0
  190. package/dist/shared/readiness.js +11 -0
  191. package/dist/shared/readiness.js.map +1 -0
  192. package/dist/sso/onboard/request.d.ts +12 -1
  193. package/dist/sso/sso-mappings/request.d.ts +10 -5
  194. package/dist/submissions/[id]/index.d.ts +1 -0
  195. package/dist/submissions/[id]/index.js +18 -0
  196. package/dist/submissions/[id]/index.js.map +1 -0
  197. package/dist/submissions/[id]/void/post.d.ts +6 -0
  198. package/dist/submissions/[id]/void/post.js +3 -0
  199. package/dist/submissions/[id]/void/post.js.map +1 -0
  200. package/dist/submissions/constants.d.ts +14 -0
  201. package/dist/submissions/constants.js +21 -0
  202. package/dist/submissions/constants.js.map +1 -0
  203. package/dist/submissions/get/index.d.ts +2 -0
  204. package/dist/submissions/get/index.js +19 -0
  205. package/dist/submissions/get/index.js.map +1 -0
  206. package/dist/submissions/get/query.d.ts +14 -0
  207. package/dist/submissions/get/query.js +3 -0
  208. package/dist/submissions/get/query.js.map +1 -0
  209. package/dist/submissions/get/response.d.ts +6 -0
  210. package/dist/submissions/get/response.js +3 -0
  211. package/dist/submissions/get/response.js.map +1 -0
  212. package/dist/submissions/index.d.ts +6 -0
  213. package/dist/submissions/index.js +23 -0
  214. package/dist/submissions/index.js.map +1 -0
  215. package/dist/submissions/post/index.d.ts +2 -0
  216. package/dist/submissions/post/index.js +19 -0
  217. package/dist/submissions/post/index.js.map +1 -0
  218. package/dist/submissions/post/request.d.ts +17 -0
  219. package/dist/submissions/post/request.js +3 -0
  220. package/dist/submissions/post/request.js.map +1 -0
  221. package/dist/submissions/post/response.d.ts +22 -0
  222. package/dist/submissions/post/response.js +3 -0
  223. package/dist/submissions/post/response.js.map +1 -0
  224. package/dist/submissions/shared.d.ts +133 -0
  225. package/dist/submissions/shared.js +3 -0
  226. package/dist/submissions/shared.js.map +1 -0
  227. package/dist/submissions/uploads/[fileId]/get.d.ts +11 -0
  228. package/dist/submissions/uploads/[fileId]/get.js +3 -0
  229. package/dist/submissions/uploads/[fileId]/get.js.map +1 -0
  230. package/dist/submissions/uploads/[fileId]/index.d.ts +1 -0
  231. package/dist/submissions/uploads/[fileId]/index.js +18 -0
  232. package/dist/submissions/uploads/[fileId]/index.js.map +1 -0
  233. package/dist/submissions/uploads/index.d.ts +2 -0
  234. package/dist/submissions/uploads/index.js +19 -0
  235. package/dist/submissions/uploads/index.js.map +1 -0
  236. package/dist/submissions/uploads/post/index.d.ts +2 -0
  237. package/dist/submissions/uploads/post/index.js +19 -0
  238. package/dist/submissions/uploads/post/index.js.map +1 -0
  239. package/dist/submissions/uploads/post/request.d.ts +9 -0
  240. package/dist/submissions/uploads/post/request.js +3 -0
  241. package/dist/submissions/uploads/post/request.js.map +1 -0
  242. package/dist/submissions/uploads/post/response.d.ts +18 -0
  243. package/dist/submissions/uploads/post/response.js +3 -0
  244. package/dist/submissions/uploads/post/response.js.map +1 -0
  245. package/dist/types/[id]/get.d.ts +17 -2
  246. package/dist/types/[id]/patch/request.d.ts +16 -2
  247. package/dist/types/post/request.d.ts +16 -2
  248. package/dist/types/post/request.js.map +1 -1
  249. package/dist/usergroups/[id]/index.d.ts +1 -0
  250. package/dist/usergroups/[id]/index.js +18 -0
  251. package/dist/usergroups/[id]/index.js.map +1 -0
  252. package/dist/usergroups/[id]/patch/index.d.ts +2 -0
  253. package/dist/usergroups/[id]/patch/index.js +19 -0
  254. package/dist/usergroups/[id]/patch/index.js.map +1 -0
  255. package/dist/usergroups/[id]/patch/request.d.ts +12 -0
  256. package/dist/usergroups/[id]/patch/request.js +3 -0
  257. package/dist/usergroups/[id]/patch/request.js.map +1 -0
  258. package/dist/usergroups/[id]/patch/response.d.ts +1 -0
  259. package/dist/usergroups/[id]/patch/response.js +3 -0
  260. package/dist/usergroups/[id]/patch/response.js.map +1 -0
  261. package/dist/usergroups/get/index.d.ts +2 -0
  262. package/dist/usergroups/get/index.js +19 -0
  263. package/dist/usergroups/get/index.js.map +1 -0
  264. package/dist/usergroups/get/query.d.ts +12 -0
  265. package/dist/usergroups/get/query.js +3 -0
  266. package/dist/usergroups/get/query.js.map +1 -0
  267. package/dist/usergroups/get/response.d.ts +35 -0
  268. package/dist/usergroups/get/response.js +3 -0
  269. package/dist/usergroups/get/response.js.map +1 -0
  270. package/dist/usergroups/index.d.ts +4 -0
  271. package/dist/usergroups/index.js +21 -0
  272. package/dist/usergroups/index.js.map +1 -0
  273. package/dist/usergroups/post/index.d.ts +2 -0
  274. package/dist/usergroups/post/index.js +19 -0
  275. package/dist/usergroups/post/index.js.map +1 -0
  276. package/dist/usergroups/post/request.d.ts +11 -0
  277. package/dist/usergroups/post/request.js +3 -0
  278. package/dist/usergroups/post/request.js.map +1 -0
  279. package/dist/usergroups/post/response.d.ts +1 -0
  280. package/dist/usergroups/post/response.js +3 -0
  281. package/dist/usergroups/post/response.js.map +1 -0
  282. package/dist/usergroups/shared.d.ts +25 -0
  283. package/dist/usergroups/shared.js +11 -0
  284. package/dist/usergroups/shared.js.map +1 -0
  285. package/dist/users/[id]/get/response.d.ts +0 -2
  286. package/dist/users/[id]/patch/request.d.ts +5 -1
  287. package/dist/users/current.d.ts +29 -4
  288. package/dist/users/get/query.d.ts +0 -2
  289. package/dist/users/home-layout/index.d.ts +3 -0
  290. package/dist/users/home-layout/index.js +20 -0
  291. package/dist/users/home-layout/index.js.map +1 -0
  292. package/dist/users/home-layout/request.d.ts +5 -0
  293. package/dist/users/home-layout/request.js +3 -0
  294. package/dist/users/home-layout/request.js.map +1 -0
  295. package/dist/users/home-layout/response.d.ts +5 -0
  296. package/dist/users/home-layout/response.js +3 -0
  297. package/dist/users/home-layout/response.js.map +1 -0
  298. package/dist/users/home-layout/shared.d.ts +98 -0
  299. package/dist/users/home-layout/shared.js +21 -0
  300. package/dist/users/home-layout/shared.js.map +1 -0
  301. package/dist/users/index.d.ts +1 -0
  302. package/dist/users/index.js +1 -0
  303. package/dist/users/index.js.map +1 -1
  304. package/dist/users/post/request.d.ts +6 -1
  305. package/package.json +2 -2
@@ -0,0 +1,19 @@
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("./query"), exports);
18
+ __exportStar(require("./response"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/usergroups/get/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,6CAA0B"}
@@ -0,0 +1,12 @@
1
+ import { StandardSortFields, SortOrders } from '../../shared';
2
+ export declare type UsergroupEmbedField = 'meta';
3
+ export interface GetUsergroupsQuery {
4
+ page?: number;
5
+ limit?: number;
6
+ ids?: string[];
7
+ sort?: StandardSortFields;
8
+ sortOrder?: SortOrders;
9
+ embed?: Array<UsergroupEmbedField>;
10
+ /** Usergroups a given user id is a member of. */
11
+ member?: string;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/usergroups/get/query.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ import { IEntityMeta } from '../../shared';
2
+ import { GetUsergroupsQuery } from './query';
3
+ export interface GetUsergroupResponse {
4
+ id: string;
5
+ name: string;
6
+ /** User ids. Membership's source of truth lives here, never on the user. */
7
+ members: string[];
8
+ /**
9
+ * Location-name path prefixes this group confines its members to. Absent
10
+ * or empty = the group abstains from location scope (it may exist purely
11
+ * for field/action grants).
12
+ */
13
+ locationScope?: string[];
14
+ /**
15
+ * The explicit "entire organisation" sentinel — never expressed as the
16
+ * root location's path (the root's name is the empty string). Emitted
17
+ * only when true.
18
+ */
19
+ allLocations?: boolean;
20
+ /**
21
+ * True when the group is referenced by the org's SSO `usergroupMappings` —
22
+ * i.e. membership is SSO-managed for federated users (manual membership
23
+ * edits for `authProvider: 'sso'` users are refused; sync adds AND removes
24
+ * within the mapped set). Emitted only when true. Lets group/user admin
25
+ * surfaces mark managed groups without needing `sso:admin` to read the
26
+ * org's SSO config.
27
+ */
28
+ ssoManaged?: boolean;
29
+ meta?: IEntityMeta;
30
+ }
31
+ export interface GetUsergroupsResponse {
32
+ query: GetUsergroupsQuery | null;
33
+ total: number;
34
+ items: GetUsergroupResponse[];
35
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/usergroups/get/response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './shared';
2
+ export * from './get';
3
+ export * from './post';
4
+ export * from './[id]';
@@ -0,0 +1,21 @@
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("./shared"), exports);
18
+ __exportStar(require("./get"), exports);
19
+ __exportStar(require("./post"), exports);
20
+ __exportStar(require("./[id]"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/usergroups/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,wCAAqB;AACrB,yCAAsB;AACtB,yCAAsB"}
@@ -0,0 +1,2 @@
1
+ export * from './request';
2
+ export * from './response';
@@ -0,0 +1,19 @@
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("./request"), exports);
18
+ __exportStar(require("./response"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/usergroups/post/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,6CAA0B"}
@@ -0,0 +1,11 @@
1
+ export interface PostUsergroupRequest {
2
+ name: string;
3
+ /** User ids. The actor's own id is rejected — nobody edits their own
4
+ * memberships (the own-role-guard rule). */
5
+ members?: string[];
6
+ /** Non-empty location-name path prefixes; omitted/empty = the group
7
+ * abstains from location scope. Never the root path — "entire
8
+ * organisation" is `allLocations: true`. */
9
+ locationScope?: string[];
10
+ allLocations?: boolean;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/usergroups/post/request.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { GetUsergroupResponse as PostUsergroupResponse } from '../get/response';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/usergroups/post/response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Effective access level a field grant confers. Most-permissive wins across
3
+ * a user's groups; a field with no grants at all is open (EDIT) to everyone.
4
+ * Actions reuse the grant shape with `level` ignored (binary: any grant ⇒
5
+ * members-only).
6
+ */
7
+ export declare const PERMISSION_GRANT_LEVELS: readonly ["NONE", "VIEW", "EDIT"];
8
+ export declare type PermissionGrantLevel = (typeof PERMISSION_GRANT_LEVELS)[number];
9
+ /** One usergroup's grant on a field or action. */
10
+ export interface PermissionGrant {
11
+ /** Usergroup id — must exist in the organisation at write time. */
12
+ group: string;
13
+ level: PermissionGrantLevel;
14
+ }
15
+ /**
16
+ * A user's resolved location scope, derived from their usergroups: any
17
+ * `allLocations` group — or no location-defining group at all — resolves to
18
+ * unconfined; otherwise the union of the groups' `locationScope` prefixes.
19
+ * Emitted on GET /users/current so the client can detect scope changes.
20
+ */
21
+ export declare type UsergroupsScope = {
22
+ unconfined: true;
23
+ } | {
24
+ paths: string[];
25
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PERMISSION_GRANT_LEVELS = void 0;
4
+ /**
5
+ * Effective access level a field grant confers. Most-permissive wins across
6
+ * a user's groups; a field with no grants at all is open (EDIT) to everyone.
7
+ * Actions reuse the grant shape with `level` ignored (binary: any grant ⇒
8
+ * members-only).
9
+ */
10
+ exports.PERMISSION_GRANT_LEVELS = ['NONE', 'VIEW', 'EDIT'];
11
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/usergroups/shared.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACU,QAAA,uBAAuB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAU,CAAA"}
@@ -4,8 +4,6 @@ export interface BaseGetUserResponse {
4
4
  name: string;
5
5
  role: IEmbeddedEntity;
6
6
  organisation: IEmbeddedEntity;
7
- permissionLocationId: string;
8
- permissionLocationPath: string;
9
7
  homeLocationId: string;
10
8
  homeLocationPath: string;
11
9
  meta?: IEntityMeta;
@@ -1,6 +1,10 @@
1
1
  export interface UpdateUserRequest {
2
2
  name?: string;
3
3
  role?: string;
4
- permissionLocationId?: string;
5
4
  homeLocationId?: string;
5
+ /**
6
+ * Complete usergroup membership for the target (group ids) — replaced
7
+ * wholesale; [] clears every membership. Never applied to yourself.
8
+ */
9
+ usergroups?: string[];
6
10
  }
@@ -2,6 +2,13 @@ import { IEntityMeta, IEmbeddedEntity } from '../shared';
2
2
  import { Preferences } from '../organisations/constants';
3
3
  import { Integrations } from '../integrations/constants';
4
4
  import { System } from '../system';
5
+ import { HomeLayout } from './home-layout';
6
+ import { PermissionGrantLevel, UsergroupsScope } from '../usergroups/shared';
7
+ /** One entry of the §1.7 field access list — every org field appears. */
8
+ export interface FieldAccessEntry {
9
+ id: string;
10
+ level: PermissionGrantLevel;
11
+ }
5
12
  export interface EmbeddedRole extends IEmbeddedEntity {
6
13
  permissions: string[];
7
14
  }
@@ -15,8 +22,6 @@ export interface CurrentUserResponse {
15
22
  name: string;
16
23
  role: EmbeddedRole;
17
24
  organisation: EmbeddedOrganisation;
18
- permissionLocationId: string;
19
- permissionLocationPath: string;
20
25
  homeLocationId: string;
21
26
  homeLocationPath: string;
22
27
  meta?: IEntityMeta;
@@ -28,14 +33,34 @@ export interface CurrentUserResponse {
28
33
  * - `undefined` — legacy native user (non-SSO org, or pre-SSO).
29
34
  */
30
35
  authProvider?: 'sso' | 'native';
36
+ /**
37
+ * Personal Home-screen layout (widget arrangement). Persisted on the user doc
38
+ * and written via `POST /users/current/home-layout`. `undefined` until the
39
+ * user customises — the client then renders its built-in default layout.
40
+ */
41
+ homeLayout?: HomeLayout;
42
+ /**
43
+ * UI-only visibility lists (usergroups feature) — COMPLETE: every org
44
+ * field appears with the caller's effective level (grant-less ⇒ EDIT;
45
+ * admin bypass ⇒ all EDIT), every usable action id appears. All three
46
+ * keys are omitted entirely when the org toggle is OFF — client rule:
47
+ * absent list (or absent id) ⇒ open.
48
+ */
49
+ fieldAccess?: FieldAccessEntry[];
50
+ actionAccess?: string[];
51
+ /**
52
+ * The caller's resolved location scope, verbatim from the user-doc cache.
53
+ * The offline client treats a CHANGE in this value (including appearing/
54
+ * disappearing) as its delta-cursor + cache reset trigger — delta reads
55
+ * never re-deliver docs whose lastChanged predates the cursor.
56
+ */
57
+ usergroupsScope?: UsergroupsScope;
31
58
  }
32
59
  export interface CurrentUserPublicResponse {
33
60
  id: string;
34
61
  name: string;
35
62
  role: EmbeddedRole;
36
63
  organisation: EmbeddedOrganisation;
37
- permissionLocationId: string;
38
- permissionLocationPath: string;
39
64
  homeLocationId: string;
40
65
  homeLocationPath: string;
41
66
  meta?: IEntityMeta;
@@ -10,8 +10,6 @@ export interface GetUsersQuery {
10
10
  sort?: StandardSortFields;
11
11
  sortOrder?: SortOrders;
12
12
  embed?: Array<UserEmbedField>;
13
- permissionLocationId?: string;
14
- permissionLocationPathBeginsWith?: string;
15
13
  homeLocationId?: string;
16
14
  homeLocationPathBeginsWith?: string;
17
15
  }
@@ -0,0 +1,3 @@
1
+ export * from './shared';
2
+ export * from './request';
3
+ export * from './response';
@@ -0,0 +1,20 @@
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("./shared"), exports);
18
+ __exportStar(require("./request"), exports);
19
+ __exportStar(require("./response"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/users/home-layout/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,4CAAyB;AACzB,6CAA0B"}
@@ -0,0 +1,5 @@
1
+ import { HomeLayout } from './shared';
2
+ /** Body for `POST /users/current/home-layout` — replaces the caller's home layout. */
3
+ export interface UpdateHomeLayoutRequest {
4
+ homeLayout: HomeLayout;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/users/home-layout/request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { HomeLayout } from './shared';
2
+ /** Response for `POST /users/current/home-layout` — echoes the saved layout. */
3
+ export interface UpdateHomeLayoutResponse {
4
+ homeLayout: HomeLayout;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/users/home-layout/response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Per-user Home screen layout — a personal, server-persisted arrangement of
3
+ * Home widgets. Stored directly on the user document (like `homeLocationId`),
4
+ * returned on `GET /users/current`, and written via
5
+ * `POST /users/current/home-layout`.
6
+ *
7
+ * A layout is a flat, ordered list of widgets, each pinned to a rect on a
8
+ * 4-column grid (`gridPos`). The widget `type` is a closed union (below): adding
9
+ * a new kind is a contract change + republish + client bump. Per-widget `config`
10
+ * carries widget *behaviour* only (a saved-view id, an action id, a heading's
11
+ * text) — never geometry. Since 2026-07-30 the API validates each kind's KNOWN
12
+ * config keys on write (the per-kind `*WidgetConfig` shapes below) while
13
+ * tolerating unknown keys, so the client can still add config keys without an
14
+ * API deploy ordering — only changing a known key's meaning needs one.
15
+ *
16
+ * `version` discriminates stored layouts so the client can detect and
17
+ * reset/migrate an older one on read.
18
+ */
19
+ /**
20
+ * The kinds of Home widget. Closed set — adding one is a contract change.
21
+ * - `tile-link` — a link card (a saved view or a nav destination); may show a live count.
22
+ * - `summary-list` — top-N rows of a saved view's results.
23
+ * - `recent-activity` — the account's latest activity feed.
24
+ * - `recent-assets` / `recent-locations` — most-recently-updated entities.
25
+ * - `needs-attention` — assets flagged not-ready / partially-ready.
26
+ * - `kit-spotlight` — kit readiness summary.
27
+ * - `hero` — the fleet-readiness hero (overview + inline needs-attention legend).
28
+ * - `heading` — a text heading to label a run of widgets (heading text lives in `config`).
29
+ *
30
+ * `hero` and `heading` are full-width structural widgets: the client renders them
31
+ * spanning the whole row at every breakpoint. As with all widgets, width is
32
+ * expressed through `gridPos.w`, not enforced by the API.
33
+ */
34
+ export declare type HomeWidgetType = 'tile-link' | 'summary-list' | 'recent-activity' | 'recent-assets' | 'recent-locations' | 'needs-attention' | 'kit-spotlight' | 'hero' | 'heading';
35
+ /**
36
+ * Per-kind `config` shapes — the authoritative form of each configurable
37
+ * kind's KNOWN keys, which the API enforces on write (unknown keys pass, so
38
+ * these can grow client-first). The feed kinds define no config keys. `config`
39
+ * itself stays loosely typed on `HomeWidget`; the client parses defensively at
40
+ * the render boundary regardless (stored data may predate validation).
41
+ */
42
+ /** A `tile-link`'s target: a registered app action or a saved view — never a
43
+ * free URL (the client resolves targets to internal routes by design). */
44
+ export declare type TileLinkWidgetConfig = {
45
+ source: 'action';
46
+ actionId: string;
47
+ } | {
48
+ source: 'view';
49
+ viewId: string;
50
+ };
51
+ /** A `summary-list` renders the top matches of one saved view. */
52
+ export interface SummaryListWidgetConfig {
53
+ viewId: string;
54
+ }
55
+ /** A `heading`'s user-editable label — empty while freshly added. */
56
+ export interface HeadingWidgetConfig {
57
+ text: string;
58
+ }
59
+ /** The `hero`'s data source: the whole account's assets, or one saved view's
60
+ * matches. Always present on a stored hero (the kind shipped with it). */
61
+ export declare type HeroWidgetConfig = {
62
+ source: 'account';
63
+ } | {
64
+ source: 'view';
65
+ viewId: string;
66
+ };
67
+ /**
68
+ * A widget's cell on the Home grid: top-left position (`x`/`y`) and size
69
+ * (`w`/`h`), in grid units. The grid is 4 columns wide, so `x + w <= 4`, and
70
+ * `h` is a whole number of row-units. Below the desktop breakpoint the client
71
+ * collapses to a single column, so `x`/`w` only bind on wide viewports.
72
+ */
73
+ export interface HomeWidgetGridPos {
74
+ /** Column of the top-left corner (0-based; `x + w <= 4`). */
75
+ x: number;
76
+ /** Row of the top-left corner (0-based), in row-units. */
77
+ y: number;
78
+ /** Width in columns (1–4). */
79
+ w: number;
80
+ /** Height in row-units (>= 1). */
81
+ h: number;
82
+ }
83
+ export interface HomeWidget {
84
+ /** Stable client-generated id (ulid) — the reorder / remove key. */
85
+ id: string;
86
+ /** Widget kind (closed union). The client registry maps it to a renderer + config shape. */
87
+ type: HomeWidgetType;
88
+ /** Position + size on the 4-column grid. */
89
+ gridPos: HomeWidgetGridPos;
90
+ /** Widget-specific *behaviour* config (e.g. a saved-view id, a heading's text) — never geometry. Known keys are validated per kind (see the `*WidgetConfig` shapes); unknown keys pass through. */
91
+ config?: Record<string, unknown>;
92
+ }
93
+ export interface HomeLayout {
94
+ /** Layout schema version, so the client can detect + migrate/reset older stored layouts. */
95
+ version: number;
96
+ /** Flat, ordered widget list; geometry lives on each widget's `gridPos`. */
97
+ widgets: HomeWidget[];
98
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Per-user Home screen layout — a personal, server-persisted arrangement of
4
+ * Home widgets. Stored directly on the user document (like `homeLocationId`),
5
+ * returned on `GET /users/current`, and written via
6
+ * `POST /users/current/home-layout`.
7
+ *
8
+ * A layout is a flat, ordered list of widgets, each pinned to a rect on a
9
+ * 4-column grid (`gridPos`). The widget `type` is a closed union (below): adding
10
+ * a new kind is a contract change + republish + client bump. Per-widget `config`
11
+ * carries widget *behaviour* only (a saved-view id, an action id, a heading's
12
+ * text) — never geometry. Since 2026-07-30 the API validates each kind's KNOWN
13
+ * config keys on write (the per-kind `*WidgetConfig` shapes below) while
14
+ * tolerating unknown keys, so the client can still add config keys without an
15
+ * API deploy ordering — only changing a known key's meaning needs one.
16
+ *
17
+ * `version` discriminates stored layouts so the client can detect and
18
+ * reset/migrate an older one on read.
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../src/users/home-layout/shared.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,5 +1,6 @@
1
1
  export * from './constants';
2
2
  export * from './current';
3
+ export * from './home-layout';
3
4
  export * from './post';
4
5
  export * from './get';
5
6
  export * from './[id]';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./constants"), exports);
18
18
  __exportStar(require("./current"), exports);
19
+ __exportStar(require("./home-layout"), exports);
19
20
  __exportStar(require("./post"), exports);
20
21
  __exportStar(require("./get"), exports);
21
22
  __exportStar(require("./[id]"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,4CAAyB;AACzB,yCAAsB;AACtB,wCAAqB;AACrB,yCAAsB;AACtB,4CAAyB;AACzB,mDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,4CAAyB;AACzB,gDAA6B;AAC7B,yCAAsB;AACtB,wCAAqB;AACrB,yCAAsB;AACtB,4CAAyB;AACzB,mDAAgC"}
@@ -1,8 +1,13 @@
1
1
  export interface BasePostUserRequest {
2
2
  name: string;
3
3
  role: string;
4
- permissionLocationId?: string;
5
4
  homeLocationId?: string;
5
+ /**
6
+ * Complete usergroup membership for the new user (group ids). Enforced
7
+ * per the closure invariant when the org toggle is ON; omitted = no
8
+ * groups (resolves unconfined).
9
+ */
10
+ usergroups?: string[];
6
11
  }
7
12
  export interface PostExternalUserRequest extends BasePostUserRequest {
8
13
  type: 'EXTERNAL';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spotto/contract",
3
3
  "license": "ISC",
4
- "version": "1.0.70-alpha.2",
4
+ "version": "1.0.70-alpha.21",
5
5
  "description": "Spotto's API Contract type definitions",
6
6
  "main": "./dist/index.js",
7
7
  "files": [
@@ -18,5 +18,5 @@
18
18
  "@types/geojson": "^7946.0.11",
19
19
  "shx": "^0.3.4"
20
20
  },
21
- "gitHead": "2a9778335a42fb649f0b40e81be008fe09d6cbe6"
21
+ "gitHead": "f4b9aa917dee5e07a6b8c1442dd98a4e15cd2b89"
22
22
  }