@jskit-ai/users-core 0.1.76 → 0.1.77

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.
@@ -1,7 +1,7 @@
1
1
  export default Object.freeze({
2
2
  packageVersion: 1,
3
3
  packageId: "@jskit-ai/users-core",
4
- version: "0.1.76",
4
+ version: "0.1.77",
5
5
  kind: "runtime",
6
6
  description: "Users/account runtime plus HTTP routes for account features.",
7
7
  dependsOn: [
@@ -143,16 +143,16 @@ export default Object.freeze({
143
143
  mutations: {
144
144
  dependencies: {
145
145
  runtime: {
146
- "@jskit-ai/auth-core": "0.1.65",
147
- "@jskit-ai/crud-core": "0.1.74",
148
- "@jskit-ai/database-runtime": "0.1.66",
149
- "@jskit-ai/http-runtime": "0.1.65",
150
- "@jskit-ai/json-rest-api-core": "0.1.11",
151
- "@jskit-ai/kernel": "0.1.66",
152
- "@jskit-ai/resource-core": "0.1.11",
153
- "@jskit-ai/resource-crud-core": "0.1.11",
146
+ "@jskit-ai/auth-core": "0.1.66",
147
+ "@jskit-ai/crud-core": "0.1.75",
148
+ "@jskit-ai/database-runtime": "0.1.67",
149
+ "@jskit-ai/http-runtime": "0.1.66",
150
+ "@jskit-ai/json-rest-api-core": "0.1.12",
151
+ "@jskit-ai/kernel": "0.1.67",
152
+ "@jskit-ai/resource-core": "0.1.12",
153
+ "@jskit-ai/resource-crud-core": "0.1.12",
154
154
  "@local/users": "file:packages/users",
155
- "@jskit-ai/uploads-runtime": "0.1.44"
155
+ "@jskit-ai/uploads-runtime": "0.1.45"
156
156
  },
157
157
  dev: {}
158
158
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/users-core",
3
- "version": "0.1.76",
3
+ "version": "0.1.77",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test"
@@ -11,14 +11,14 @@
11
11
  "./shared/resources/userSettingsResource": "./src/shared/resources/userSettingsResource.js"
12
12
  },
13
13
  "dependencies": {
14
- "@jskit-ai/auth-core": "0.1.65",
15
- "@jskit-ai/database-runtime": "0.1.66",
16
- "@jskit-ai/http-runtime": "0.1.65",
17
- "@jskit-ai/json-rest-api-core": "0.1.11",
18
- "@jskit-ai/kernel": "0.1.66",
19
- "@jskit-ai/resource-crud-core": "0.1.11",
20
- "@jskit-ai/resource-core": "0.1.11",
21
- "@jskit-ai/uploads-runtime": "0.1.44",
14
+ "@jskit-ai/auth-core": "0.1.66",
15
+ "@jskit-ai/database-runtime": "0.1.67",
16
+ "@jskit-ai/http-runtime": "0.1.66",
17
+ "@jskit-ai/json-rest-api-core": "0.1.12",
18
+ "@jskit-ai/kernel": "0.1.67",
19
+ "@jskit-ai/resource-crud-core": "0.1.12",
20
+ "@jskit-ai/resource-core": "0.1.12",
21
+ "@jskit-ai/uploads-runtime": "0.1.45",
22
22
  "json-rest-schema": "1.x.x"
23
23
  }
24
24
  }
@@ -35,8 +35,7 @@ function createActions({ surface } = {}) {
35
35
  },
36
36
  observability: {},
37
37
  async execute(input, context, deps) {
38
- const { workspaceSlug, ...query } = input || {};
39
- return deps.usersService.queryDocuments(query, {
38
+ return deps.usersService.queryDocuments(input || {}, {
40
39
  context,
41
40
  visibilityContext: context?.visibilityContext
42
41
  });
@@ -16,6 +16,12 @@ const authenticatedPermission = Object.freeze({
16
16
  require: "authenticated"
17
17
  });
18
18
 
19
+ function buildListQuery(input = {}) {
20
+ const query = { ...(input || {}) };
21
+ delete query.workspaceSlug;
22
+ return query;
23
+ }
24
+
19
25
  function createActions({ surface } = {}) {
20
26
  return Object.freeze([
21
27
  {
@@ -37,8 +43,7 @@ function createActions({ surface } = {}) {
37
43
  },
38
44
  observability: {},
39
45
  async execute(input, context, deps) {
40
- const { workspaceSlug, ...query } = input || {};
41
- return deps.usersService.queryDocuments(query, {
46
+ return deps.usersService.queryDocuments(buildListQuery(input), {
42
47
  context,
43
48
  visibilityContext: context?.visibilityContext
44
49
  });
@@ -96,6 +96,7 @@ test("users-core base users package templates stay aligned with non-workspace ap
96
96
  assert.match(repositorySource, /async function getDocumentById\(recordId, options = \{\}\)/);
97
97
  assert.match(repositorySource, /returnNullWhenJsonRestResourceMissing/);
98
98
  assert.doesNotMatch(actionsSource, /workspaceSlugParamsValidator/);
99
+ assert.doesNotMatch(actionsSource, /delete query\.workspaceSlug/);
99
100
  assert.doesNotMatch(actionsSource, /requireActionSurface/);
100
101
  assert.match(actionsSource, /orderBy: resource\.defaultSort/);
101
102
  assert.match(actionsSource, /output: null/);
@@ -154,6 +155,7 @@ test("users-core workspace users package templates stay aligned with workspace a
154
155
  assert.match(providerSource, /createJsonRestResourceScopeOptions/);
155
156
  assert.match(providerSource, /addResourceIfMissing\(\s*api,\s*"users",\s*createJsonRestResourceScopeOptions\(resource,/s);
156
157
  assert.match(actionsSource, /workspaceSlugParamsValidator/);
158
+ assert.match(actionsSource, /delete query\.workspaceSlug/);
157
159
  assert.doesNotMatch(actionsSource, /requireActionSurface/);
158
160
  assert.match(actionsSource, /orderBy: resource\.defaultSort/);
159
161
  assert.match(actionsSource, /usersService\.queryDocuments/);