@carthooks/arcubase-cli 0.1.7 → 0.1.9

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 (66) hide show
  1. package/bundle/arcubase-admin.mjs +1042 -5056
  2. package/bundle/arcubase.mjs +1042 -5056
  3. package/dist/generated/command_registry.generated.d.ts +693 -2812
  4. package/dist/generated/command_registry.generated.d.ts.map +1 -1
  5. package/dist/generated/command_registry.generated.js +812 -4100
  6. package/dist/generated/type_index.generated.d.ts +8 -397
  7. package/dist/generated/type_index.generated.d.ts.map +1 -1
  8. package/dist/generated/type_index.generated.js +8 -403
  9. package/dist/generated/zod_registry.generated.d.ts +33 -261
  10. package/dist/generated/zod_registry.generated.d.ts.map +1 -1
  11. package/dist/generated/zod_registry.generated.js +36 -365
  12. package/dist/runtime/body_loader.d.ts.map +1 -1
  13. package/dist/runtime/body_loader.js +12 -0
  14. package/dist/runtime/command_registry.d.ts +3 -21
  15. package/dist/runtime/command_registry.d.ts.map +1 -1
  16. package/dist/runtime/command_registry.js +17 -23
  17. package/dist/runtime/execute.d.ts +3 -3
  18. package/dist/runtime/execute.d.ts.map +1 -1
  19. package/dist/runtime/execute.js +53 -157
  20. package/dist/runtime/http.js +1 -1
  21. package/dist/runtime/upload.js +3 -3
  22. package/dist/runtime/zod_registry.d.ts.map +1 -1
  23. package/dist/runtime/zod_registry.js +7 -24
  24. package/dist/tests/command_registry.test.js +81 -28
  25. package/dist/tests/execute_validation.test.js +175 -510
  26. package/dist/tests/help.test.js +39 -62
  27. package/dist/tests/upload.test.js +4 -4
  28. package/dist/tests/zod_registry.test.js +0 -10
  29. package/package.json +1 -1
  30. package/sdk-dist/docs/runtime-reference/README.md +20 -30
  31. package/sdk-dist/docs/runtime-reference/entity-schema/README.md +4 -5
  32. package/sdk-dist/docs/runtime-reference/entity-schema/linkto.md +3 -3
  33. package/sdk-dist/docs/runtime-reference/entity-schema/query.md +3 -3
  34. package/sdk-dist/docs/runtime-reference/entity-schema/relation.md +3 -3
  35. package/sdk-dist/docs/runtime-reference/entity-schema/relationfield.md +3 -3
  36. package/sdk-dist/docs/runtime-reference/entity-schema/subform.md +2 -2
  37. package/sdk-dist/docs/runtime-reference/entity-schema.md +4 -4
  38. package/sdk-dist/docs/runtime-reference/examples/README.md +2 -2
  39. package/sdk-dist/docs/runtime-reference/examples/oms-01/README.md +12 -12
  40. package/sdk-dist/docs/runtime-reference/examples/oms-01/app-overview.md +1 -1
  41. package/sdk-dist/docs/runtime-reference/row-crud.md +11 -32
  42. package/sdk-dist/docs/runtime-reference/search-and-bulk-actions.md +16 -47
  43. package/sdk-dist/docs/runtime-reference/table-lifecycle.md +11 -27
  44. package/sdk-dist/docs/runtime-reference/uploads.md +1 -1
  45. package/sdk-dist/docs/runtime-reference/workflow/README.md +19 -0
  46. package/sdk-dist/generated/command_registry.generated.ts +814 -4102
  47. package/sdk-dist/generated/type_index.generated.ts +8 -403
  48. package/sdk-dist/generated/zod_registry.generated.ts +44 -500
  49. package/sdk-dist/types/app.ts +3 -10
  50. package/sdk-dist/types/common.ts +7 -0
  51. package/sdk-dist/types/global-action.ts +2 -1
  52. package/src/generated/command_registry.generated.ts +814 -4102
  53. package/src/generated/type_index.generated.ts +8 -403
  54. package/src/generated/zod_registry.generated.ts +44 -500
  55. package/src/runtime/body_loader.ts +11 -0
  56. package/src/runtime/command_registry.ts +22 -44
  57. package/src/runtime/execute.ts +157 -165
  58. package/src/runtime/http.ts +1 -1
  59. package/src/runtime/upload.ts +3 -3
  60. package/src/runtime/zod_registry.ts +7 -25
  61. package/src/tests/command_registry.test.ts +81 -31
  62. package/src/tests/execute_validation.test.ts +236 -603
  63. package/src/tests/help.test.ts +47 -66
  64. package/src/tests/upload.test.ts +4 -4
  65. package/src/tests/zod_registry.test.ts +0 -13
  66. package/sdk-dist/docs/runtime-reference/app-discovery.md +0 -68
@@ -9,75 +9,52 @@ const env = {
9
9
  ARCUBASE_SUBJECT_ID: '',
10
10
  ARCUBASE_TOKEN_EXPIRES_AT: '',
11
11
  };
12
- test('root help prints modules', async () => {
12
+ test('admin root help exposes reset surface nouns only', async () => {
13
13
  const out = await executeCLI('admin', ['--help'], env, async () => new Response('{}'));
14
14
  assert.equal(out.kind, 'help');
15
- assert.match(out.text, /app/);
16
- });
17
- test('root help does not require runtime env', async () => {
18
- const out = await executeCLI('admin', ['--help'], undefined, async () => new Response('{}'));
19
- assert.equal(out.kind, 'help');
20
- assert.match(out.text, /modules:/);
21
- });
22
- test('module help prints create-entity command', async () => {
15
+ assert.match(out.text, /\bapp\b/);
16
+ assert.match(out.text, /\btable\b/);
17
+ assert.match(out.text, /\baccess-rule\b/);
18
+ assert.match(out.text, /\bworkflow\b/);
19
+ assert.doesNotMatch(out.text, /\bentity\b/);
20
+ assert.doesNotMatch(out.text, /\bingress\b/);
21
+ });
22
+ test('user root help exposes reset surface nouns only', async () => {
23
+ const out = await executeCLI('user', ['--help'], env, async () => new Response('{}'));
24
+ assert.equal(out.kind, 'help');
25
+ assert.match(out.text, /\bentry\b/);
26
+ assert.match(out.text, /\btable\b/);
27
+ assert.match(out.text, /\brow\b/);
28
+ assert.match(out.text, /\bupload\b/);
29
+ assert.match(out.text, /\bprofile\b/);
30
+ assert.match(out.text, /\bworkflow\b/);
31
+ assert.doesNotMatch(out.text, /\bglobal-action\b/);
32
+ assert.doesNotMatch(out.text, /\bentity\b/);
33
+ });
34
+ test('admin module help lists reset app commands', async () => {
23
35
  const out = await executeCLI('admin', ['app', '--help'], env, async () => new Response('{}'));
24
36
  assert.equal(out.kind, 'help');
25
- assert.match(out.text, /create-entity/);
26
- assert.match(out.text, /inventory/);
27
- });
28
- test('module help does not require runtime env', async () => {
29
- const out = await executeCLI('user', ['rows', '--help'], undefined, async () => new Response('{}'));
30
- assert.equal(out.kind, 'help');
31
- assert.match(out.text, /delete-entity-row/);
32
- });
33
- test('command help prints normalized external endpoint', async () => {
34
- const out = await executeCLI('admin', ['app-entity-share', 'get-app-entity-shares', '--help'], env, async () => new Response('{}'));
35
- assert.equal(out.kind, 'help');
36
- assert.match(out.text, /endpoint: \/apps\/:app_id\/entity-shares/);
37
- assert.doesNotMatch(out.text, /endpoint: \/api\//);
38
- });
39
- test('command help does not require runtime env', async () => {
40
- const out = await executeCLI('user', ['rows', 'delete-entity-row', '--help'], undefined, async () => new Response('{}'));
41
- assert.equal(out.kind, 'help');
42
- assert.match(out.text, /endpoint: \/entity\/:app_id\/:entity_id\/delete-item/);
43
- });
44
- test('command help prints runtime doc hints for request body commands', async () => {
45
- const out = await executeCLI('user', ['rows', 'update-entity-row', '--help'], undefined, async () => new Response('{}'));
46
- assert.equal(out.kind, 'help');
47
- assert.match(out.text, /docs:/);
48
- assert.match(out.text, /\/opt\/arcubase-sdk\/docs\/runtime-reference\/row-crud\.md/);
49
- assert.match(out.text, /\/opt\/arcubase-sdk\/docs\/runtime-reference\/examples\/README\.md/);
37
+ assert.match(out.text, /list/);
38
+ assert.match(out.text, /get/);
39
+ assert.match(out.text, /create/);
40
+ assert.match(out.text, /update/);
41
+ assert.match(out.text, /delete/);
42
+ assert.doesNotMatch(out.text, /list-apps/);
43
+ assert.doesNotMatch(out.text, /create-entity/);
50
44
  });
51
- test('command help prints query-file support', async () => {
52
- const out = await executeCLI('user', ['rows', 'query-entity', '--help'], undefined, async () => new Response('{}'));
45
+ test('user row help replaces workflow row commands', async () => {
46
+ const out = await executeCLI('user', ['row', 'query', '--help'], undefined, async () => new Response('{}'));
53
47
  assert.equal(out.kind, 'help');
48
+ assert.match(out.text, /body: .*--body-file or --body-json/);
54
49
  assert.match(out.text, /query flags: --query-file/);
50
+ assert.doesNotMatch(out.text, /workflow query-entity/);
51
+ assert.doesNotMatch(out.text, /--entity-id/);
55
52
  });
56
- test('command help without request body can still point to lifecycle and examples docs', async () => {
57
- const out = await executeCLI('admin', ['entity', 'admin-get-entity-info', '--help'], undefined, async () => new Response('{}'));
58
- assert.equal(out.kind, 'help');
59
- assert.match(out.text, /\/opt\/arcubase-sdk\/docs\/runtime-reference\/table-lifecycle\.md/);
60
- assert.match(out.text, /\/opt\/arcubase-sdk\/docs\/runtime-reference\/examples\/README\.md/);
61
- });
62
- test('app inventory help explains app discovery purpose', async () => {
63
- const out = await executeCLI('admin', ['app', 'inventory', '--help'], undefined, async () => new Response('{}'));
64
- assert.equal(out.kind, 'help');
65
- assert.match(out.text, /list all accessible apps and each app entity list/);
66
- assert.match(out.text, /use this before asking the user for app_id/);
67
- });
68
- test('admin-save-entity help prints row-operation next step', async () => {
69
- const out = await executeCLI('admin', ['entity', 'admin-save-entity', '--help'], undefined, async () => new Response('{}'));
53
+ test('admin table update-schema help uses table nouns and body-json', async () => {
54
+ const out = await executeCLI('admin', ['table', 'update-schema', '--help'], undefined, async () => new Response('{}'));
70
55
  assert.equal(out.kind, 'help');
71
- assert.match(out.text, /switch to arcubase for row operations/);
72
- assert.match(out.text, /arcubase rows insert-entity/);
73
- assert.match(out.text, /arcubase rows query-entity/);
74
- });
75
- test('wrong admin workflow command points to arcubase row command', async () => {
76
- await assert.rejects(() => executeCLI('admin', ['workflow', 'insert-entity'], env, async () => new Response('{}')), (error) => {
77
- assert.equal(error.code, 'UNKNOWN_COMMAND');
78
- assert.equal(error.details?.reason, 'workflow insert-entity is not a valid command group; use arcubase rows for row operations');
79
- assert.equal(error.details?.hint, 'use: arcubase rows insert-entity');
80
- assert.ok((error.details?.suggestions ?? []).includes('arcubase rows insert-entity'));
81
- return true;
82
- });
56
+ assert.match(out.text, /body: .*--body-file or --body-json/);
57
+ assert.match(out.text, /path flags: --app-id, --table-id/);
58
+ assert.doesNotMatch(out.text, /--entity-id/);
59
+ assert.doesNotMatch(out.text, /admin-save-entity/);
83
60
  });
@@ -26,7 +26,7 @@ test('upload returns file field value array for row payloads', async () => {
26
26
  const result = await executeCLI('user', ['upload', sourceFile], env, async (input, init) => {
27
27
  const url = String(input);
28
28
  calls.push({ url, method: init?.method });
29
- if (url === 'https://arcubase.example.com/upload/token') {
29
+ if (url === 'https://arcubase.example.com/api/upload/token') {
30
30
  return new Response(JSON.stringify({
31
31
  data: {
32
32
  id: 123456,
@@ -48,7 +48,7 @@ test('upload returns file field value array for row payloads', async () => {
48
48
  });
49
49
  assert.equal(result.kind, 'result');
50
50
  assert.deepEqual(calls, [
51
- { url: 'https://arcubase.example.com/upload/token', method: 'POST' },
51
+ { url: 'https://arcubase.example.com/api/upload/token', method: 'POST' },
52
52
  { url: 'https://uploads.example.com', method: 'POST' },
53
53
  ]);
54
54
  assert.deepEqual(result.data, [
@@ -68,7 +68,7 @@ test('upload supports s3-post-policy tokens', async () => {
68
68
  const result = await executeCLI('user', ['upload', sourceFile], env, async (input, init) => {
69
69
  const url = String(input);
70
70
  calls.push({ url, method: init?.method });
71
- if (url === 'https://arcubase.example.com/upload/token') {
71
+ if (url === 'https://arcubase.example.com/api/upload/token') {
72
72
  return new Response(JSON.stringify({
73
73
  data: {
74
74
  id: 654321,
@@ -92,7 +92,7 @@ test('upload supports s3-post-policy tokens', async () => {
92
92
  });
93
93
  assert.equal(result.kind, 'result');
94
94
  assert.deepEqual(calls, [
95
- { url: 'https://arcubase.example.com/upload/token', method: 'POST' },
95
+ { url: 'https://arcubase.example.com/api/upload/token', method: 'POST' },
96
96
  { url: 'https://uploads.example.com/private-bucket', method: 'POST' },
97
97
  ]);
98
98
  assert.deepEqual(result.data, [
@@ -10,16 +10,6 @@ test('EntitySaveReqVO schema exists', () => {
10
10
  test('EntityQueryReqVO schema exists', () => {
11
11
  assert.ok(getBodySchema('EntityQueryReqVO'));
12
12
  });
13
- test('inline request type schema exists', () => {
14
- assert.ok(getBodySchema('{ name: string }'));
15
- });
16
- test('intersection request type schema exists', () => {
17
- assert.ok(getBodySchema('EntityImportReqVO & EntityImportActionVO'));
18
- });
19
- test('manual notification override schema exists', () => {
20
- assert.ok(getBodySchema('EntityUpdateNotificationsReqVO'));
21
- assert.equal(getUnsupportedBodySchemaReason('EntityUpdateNotificationsReqVO'), null);
22
- });
23
13
  test('unknown request type has no schema and no unsupported reason', () => {
24
14
  assert.equal(getBodySchema('DefinitelyMissingReqVO'), null);
25
15
  assert.equal(getUnsupportedBodySchemaReason('DefinitelyMissingReqVO'), null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carthooks/arcubase-cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Arcubase runtime CLI for admin and user command execution",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,7 +25,6 @@ Do not start from raw HTTP methods or paths. Start from the CLI command.
25
25
 
26
26
  Use `arcubase-admin` for:
27
27
 
28
- - app discovery
29
28
  - app creation
30
29
  - entity shell creation
31
30
  - entity schema save
@@ -34,12 +33,11 @@ Use `arcubase-admin` for:
34
33
  Common commands:
35
34
 
36
35
  ```bash
37
- arcubase-admin app inventory
38
36
  arcubase-admin app create-app-by-tenants --body-file create-app.json
39
37
  arcubase-admin app create-entity --id <app_id> --body-file create-entity.json
40
- arcubase-admin entity admin-get-entity-info --app-id <app_id> --entity-id <entity_id>
41
- arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file save-entity.json
42
- arcubase-admin entity-tags get-selection-tags --appId <app_id> --entityId <entity_id> --body-file get-tags.json
38
+ arcubase-admin entity admin-get-entity-info --app-id <app_id> --table-id <table_id>
39
+ arcubase-admin entity admin-save-entity --app-id <app_id> --table-id <table_id> --body-file save-entity.json
40
+ arcubase-admin entity-tags get-selection-tags --appId <app_id> --entityId <table_id> --body-file get-tags.json
43
41
  ```
44
42
 
45
43
  Use `arcubase` for:
@@ -56,23 +54,20 @@ Use `arcubase` for:
56
54
  Common commands:
57
55
 
58
56
  ```bash
59
- arcubase rows insert-entity --app-id <app_id> --entity-id <entity_id> --body-file insert.json
60
- arcubase rows query-entity --app-id <app_id> --entity-id <entity_id> --body-file query.json
61
- arcubase rows update-entity-row --app-id <app_id> --entity-id <entity_id> --row-id <row_id> --body-file update.json
62
- arcubase rows delete-entity-row --app-id <app_id> --entity-id <entity_id> --body-file delete.json
63
- arcubase rows restore-entity-row --app-id <app_id> --entity-id <entity_id> --body-file restore.json
64
- arcubase rows query-entity-selection --app-id <app_id> --entity-id <entity_id> --action archive --body-file selection.json
65
- arcubase entity update-entity-bulk --app-id <app_id> --entity-id <entity_id> --body-file bulk-update.json
66
- arcubase entity invoke-entity-batch-operator --app-id <app_id> --entity-id <entity_id> --body-file invoke-batch-operator.json
57
+ arcubase row create --app-id <app_id> --table-id <table_id> --body-file insert.json
58
+ arcubase row query --app-id <app_id> --table-id <table_id> --body-file query.json
59
+ arcubase row update --app-id <app_id> --table-id <table_id> --row-id <row_id> --body-file update.json
60
+ arcubase row delete --app-id <app_id> --table-id <table_id> --body-file delete.json
61
+ arcubase row selection-action --app-id <app_id> --table-id <table_id> --action archive --body-file selection.json
62
+ arcubase row bulk-update --app-id <app_id> --table-id <table_id> --body-file bulk-update.json
67
63
  ```
68
64
 
69
65
  Hard rule:
70
66
 
71
- - all Arcubase work starts by identifying the target app
72
67
  - `arcubase-admin` stops at schema save
73
68
  - all row operations must switch to `arcubase`
74
- - do not use `arcubase-admin` for row insertion or row queries
75
- - do not ask the user for `entity_id` when creating a new table
69
+ - do not use `arcubase-admin row create`
70
+ - do not use `arcubase-admin row query`
76
71
 
77
72
  ## Required file inputs
78
73
 
@@ -89,9 +84,9 @@ Use `--query-file` when the command needs query-string parameters that do not be
89
84
  Current important example:
90
85
 
91
86
  ```bash
92
- arcubase rows query-entity \
87
+ arcubase row query \
93
88
  --app-id <app_id> \
94
- --entity-id <entity_id> \
89
+ --table-id <table_id> \
95
90
  --query-file archived-query.json \
96
91
  --body-file archived-body.json
97
92
  ```
@@ -137,16 +132,10 @@ When a command is tied to a common task, `--help` should print:
137
132
 
138
133
  If you need to create a table:
139
134
 
140
- 1. read `app-discovery.md`
141
- 2. read `table-lifecycle.md`
142
- 3. read `entity-schema.md`
143
- 4. read `entity-schema/README.md`
144
- 5. open the exact field-type page you need
145
-
146
- If you need to find an existing app or choose the right app:
147
-
148
- 1. read `app-discovery.md`
149
- 2. run `arcubase-admin app inventory`
135
+ 1. read `table-lifecycle.md`
136
+ 2. read `entity-schema.md`
137
+ 3. read `entity-schema/README.md`
138
+ 4. open the exact field-type page you need
150
139
 
151
140
  If you need row CRUD:
152
141
 
@@ -167,8 +156,6 @@ If you need search, selection, tags, bulk update, or batch operator:
167
156
 
168
157
  ## Covered now
169
158
 
170
- - `app-discovery.md`
171
- - resolve the target app before asking the user for ids
172
159
  - `table-lifecycle.md`
173
160
  - app shell, entity shell, schema save, readiness probe
174
161
  - `entity-schema.md`
@@ -187,3 +174,6 @@ If you need search, selection, tags, bulk update, or batch operator:
187
174
  - business-shaped schema and payload templates
188
175
 
189
176
  ## Reserved expansion
177
+
178
+ - `workflow/README.md`
179
+ - reserved for future workflow-specific CLI docs
@@ -5,7 +5,7 @@ Use this directory while building `save-entity.json` for:
5
5
  ```bash
6
6
  arcubase-admin entity admin-save-entity \
7
7
  --app-id <app_id> \
8
- --entity-id <entity_id> \
8
+ --table-id <table_id> \
9
9
  --body-file save-entity.json
10
10
  ```
11
11
 
@@ -16,7 +16,7 @@ arcubase-admin entity admin-save-entity \
16
16
  ```bash
17
17
  arcubase-admin entity admin-get-entity-info \
18
18
  --app-id <app_id> \
19
- --entity-id <entity_id>
19
+ --table-id <table_id>
20
20
  ```
21
21
 
22
22
  2. build the top-level save payload with:
@@ -53,9 +53,8 @@ If you need row payloads, read:
53
53
 
54
54
  Current important row rules:
55
55
 
56
- - row delete / restore uses:
57
- - `arcubase rows delete-entity-row`
58
- - `arcubase rows restore-entity-row`
56
+ - row delete uses:
57
+ - `arcubase row delete`
59
58
  - `selection.type = "ids"`
60
59
  - `subform` row values use:
61
60
  - `[{ "id": 0, "fields": { ... } }]`
@@ -25,7 +25,7 @@ Relation picker field.
25
25
  "structure": "multiple",
26
26
  "relation": {
27
27
  "app_id": 1,
28
- "entity_id": 2,
28
+ "table_id": 2,
29
29
  "type": "entity",
30
30
  "show_fields": [1001],
31
31
  "queryFields": [1001],
@@ -45,7 +45,7 @@ Relation picker field.
45
45
  - `backfill`
46
46
  - `addValue`
47
47
  - `relation.app_id`
48
- - `relation.entity_id`
48
+ - `relation.table_id`
49
49
  - `relation.type`
50
50
  - `relation.show_fields`
51
51
  - `relation.queryFields`
@@ -55,7 +55,7 @@ Relation picker field.
55
55
 
56
56
  ## Constraints
57
57
 
58
- - `relation.app_id` and `relation.entity_id` are required
58
+ - `relation.app_id` and `relation.table_id` are required
59
59
  - `relation.show_fields` should be explicit
60
60
  - `relation.sorts` should include at least one default sort
61
61
  - row CRUD may store an empty array when no linked record is selected
@@ -15,7 +15,7 @@ Selection-query field based on relation config.
15
15
  "addValue": true,
16
16
  "relation": {
17
17
  "app_id": 1,
18
- "entity_id": 2,
18
+ "table_id": 2,
19
19
  "type": "entity",
20
20
  "show_fields": [1001],
21
21
  "queryFields": [1001],
@@ -32,7 +32,7 @@ Selection-query field based on relation config.
32
32
  - `structure`
33
33
  - `addValue`
34
34
  - `relation.app_id`
35
- - `relation.entity_id`
35
+ - `relation.table_id`
36
36
  - `relation.type`
37
37
  - `relation.show_fields`
38
38
  - `relation.queryFields`
@@ -41,7 +41,7 @@ Selection-query field based on relation config.
41
41
 
42
42
  ## Constraints
43
43
 
44
- - `relation.app_id` and `relation.entity_id` are required
44
+ - `relation.app_id` and `relation.table_id` are required
45
45
  - `relation.type` must be explicit; use `entity`
46
46
  - `relation.show_fields` should be explicit
47
47
  - `relation.queryFields` should be explicit in manual mode
@@ -14,7 +14,7 @@ Entity relation field.
14
14
  "placeholder": "",
15
15
  "relation": {
16
16
  "app_id": 1,
17
- "entity_id": 2,
17
+ "table_id": 2,
18
18
  "type": "entity",
19
19
  "show_fields": [1001],
20
20
  "queryFields": [1001],
@@ -33,7 +33,7 @@ Entity relation field.
33
33
  - `structure`
34
34
  - `addValue`
35
35
  - `relation.app_id`
36
- - `relation.entity_id`
36
+ - `relation.table_id`
37
37
  - `relation.type`
38
38
  - `relation.show_fields`
39
39
  - `relation.queryFields`
@@ -44,7 +44,7 @@ Entity relation field.
44
44
 
45
45
  ## Constraints
46
46
 
47
- - `relation.app_id` and `relation.entity_id` are required
47
+ - `relation.app_id` and `relation.table_id` are required
48
48
  - `relation.show_fields` should be explicit
49
49
  - `relation.sorts` should include at least one default sort
50
50
  - In the current direct-write path, `mode` common values:
@@ -12,7 +12,7 @@ Derived field that reads a target value through an existing relation field.
12
12
  "options": {
13
13
  "relation": {
14
14
  "app_id": 1,
15
- "entity_id": 2,
15
+ "table_id": 2,
16
16
  "type": "entity"
17
17
  }
18
18
  }
@@ -22,7 +22,7 @@ Derived field that reads a target value through an existing relation field.
22
22
  ## Available options
23
23
 
24
24
  - `relation.app_id`
25
- - `relation.entity_id`
25
+ - `relation.table_id`
26
26
  - `relation.type`
27
27
  - `relation.show_fields`
28
28
  - `relation.queryFields`
@@ -33,6 +33,6 @@ Derived field that reads a target value through an existing relation field.
33
33
  ## Constraints
34
34
 
35
35
  - `options.relation` is required
36
- - `relation.app_id` and `relation.entity_id` are required
36
+ - `relation.app_id` and `relation.table_id` are required
37
37
  - use `relation.type = "entity"` in the current direct-write path
38
38
  - do not send empty `options`
@@ -43,8 +43,8 @@ Subform field.
43
43
 
44
44
  For row commands such as:
45
45
 
46
- - `arcubase rows insert-entity`
47
- - `arcubase rows update-entity-row`
46
+ - `arcubase row create`
47
+ - `arcubase row update`
48
48
 
49
49
  the current writable row shape is:
50
50
 
@@ -7,7 +7,7 @@ Primary command:
7
7
  ```bash
8
8
  arcubase-admin entity admin-save-entity \
9
9
  --app-id <app_id> \
10
- --entity-id <entity_id> \
10
+ --table-id <table_id> \
11
11
  --body-file save-entity.json
12
12
  ```
13
13
 
@@ -16,7 +16,7 @@ Before writing `save-entity.json`, always fetch the current shell:
16
16
  ```bash
17
17
  arcubase-admin entity admin-get-entity-info \
18
18
  --app-id <app_id> \
19
- --entity-id <entity_id>
19
+ --table-id <table_id>
20
20
  ```
21
21
 
22
22
  If you already know the field type you want, go to:
@@ -30,7 +30,7 @@ The current direct-write path is:
30
30
  1. create the entity shell
31
31
  2. fetch the current shell
32
32
  3. save the full schema
33
- 4. probe rows with `arcubase rows query-entity`
33
+ 4. probe rows with `arcubase row query`
34
34
 
35
35
  Do not treat shell creation as “table created”.
36
36
 
@@ -180,7 +180,7 @@ Also:
180
180
  Do not call schema creation successful until:
181
181
 
182
182
  1. `arcubase-admin entity admin-save-entity ...` succeeds without top-level `error`
183
- 2. `arcubase rows query-entity ...` succeeds against the saved table
183
+ 2. `arcubase row query ...` succeeds against the saved table
184
184
 
185
185
  If row probing still fails, the table is not ready.
186
186
 
@@ -16,14 +16,14 @@ These examples are not raw tenant exports.
16
16
 
17
17
  - Keep table names and field names in English.
18
18
  - Remove company-specific words.
19
- - Remove region-specific words when they are not essential to the business process.
19
+ - Remove region-specific words when they are not essential to the workflow.
20
20
  - Prefer neutral names such as `sku_code`, `sales_order`, `goods_receipt`, and `stock_issue`.
21
21
  - When a save payload needs shell values, replace placeholder tokens such as `__APP_ID__`, `__ENTITY_ID__`, and `__SCHEMA_VERSION__` from the current shell returned by:
22
22
 
23
23
  ```bash
24
24
  arcubase-admin entity admin-get-entity-info \
25
25
  --app-id <app_id> \
26
- --entity-id <entity_id>
26
+ --table-id <table_id>
27
27
  ```
28
28
 
29
29
  ## Available example sets
@@ -1,6 +1,6 @@
1
1
  # OMS Example 01
2
2
 
3
- This example set models a compact order-management example.
3
+ This example set models a compact order-management workflow.
4
4
 
5
5
  It is intentionally generic:
6
6
 
@@ -70,7 +70,7 @@ This example rewrites them into generic names such as:
70
70
  - `sales-order.selection.condition.json`
71
71
  - `sales-order.bulk-update.json`
72
72
 
73
- ## Save sequence
73
+ ## Save workflow
74
74
 
75
75
  For every `*.schema.json` file:
76
76
 
@@ -126,30 +126,30 @@ arcubase-admin app create-entity --id <app_id> --body-file purchase-order.create
126
126
  Fetch the shell:
127
127
 
128
128
  ```bash
129
- arcubase-admin entity admin-get-entity-info --app-id <app_id> --entity-id <entity_id>
129
+ arcubase-admin entity admin-get-entity-info --app-id <app_id> --table-id <table_id>
130
130
  ```
131
131
 
132
132
  Save the schema:
133
133
 
134
134
  ```bash
135
- arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file sales-order.schema.json
136
- arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file item-master.schema.json
137
- arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file goods-receipt.schema.json
138
- arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file stock-issue.schema.json
139
- arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file picking-list.schema.json
140
- arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file purchase-order.schema.json
135
+ arcubase-admin entity admin-save-entity --app-id <app_id> --table-id <table_id> --body-file sales-order.schema.json
136
+ arcubase-admin entity admin-save-entity --app-id <app_id> --table-id <table_id> --body-file item-master.schema.json
137
+ arcubase-admin entity admin-save-entity --app-id <app_id> --table-id <table_id> --body-file goods-receipt.schema.json
138
+ arcubase-admin entity admin-save-entity --app-id <app_id> --table-id <table_id> --body-file stock-issue.schema.json
139
+ arcubase-admin entity admin-save-entity --app-id <app_id> --table-id <table_id> --body-file picking-list.schema.json
140
+ arcubase-admin entity admin-save-entity --app-id <app_id> --table-id <table_id> --body-file purchase-order.schema.json
141
141
  ```
142
142
 
143
143
  Insert one row:
144
144
 
145
145
  ```bash
146
- arcubase rows insert-entity --app-id <app_id> --entity-id <entity_id> --body-file sales-order.row.insert.json
146
+ arcubase row create --app-id <app_id> --table-id <table_id> --body-file sales-order.row.insert.json
147
147
  ```
148
148
 
149
149
  Query rows:
150
150
 
151
151
  ```bash
152
- arcubase rows query-entity --app-id <app_id> --entity-id <entity_id> --body-file sales-order.query.json
152
+ arcubase row query --app-id <app_id> --table-id <table_id> --body-file sales-order.query.json
153
153
  ```
154
154
 
155
155
  ## Placeholder rules
@@ -170,7 +170,7 @@ When you replace them, keep these fields as JSON numbers:
170
170
  - `id`
171
171
  - `schema_version`
172
172
  - relation `app_id`
173
- - relation `entity_id`
173
+ - relation `table_id`
174
174
 
175
175
  Do not leave the replaced values as JSON strings.
176
176
 
@@ -76,4 +76,4 @@ Purpose:
76
76
  - country-specific code naming
77
77
  - tenant-specific internal labels
78
78
  - region-specific channel names
79
- - company-specific process terms
79
+ - company-specific workflow terms
@@ -7,9 +7,9 @@ Use this page for direct row operations with `arcubase`.
7
7
  Command:
8
8
 
9
9
  ```bash
10
- arcubase rows insert-entity \
10
+ arcubase row create \
11
11
  --app-id <app_id> \
12
- --entity-id <entity_id> \
12
+ --table-id <table_id> \
13
13
  --body-file insert.json
14
14
  ```
15
15
 
@@ -46,9 +46,9 @@ The returned value is the new `row_id`.
46
46
  Command:
47
47
 
48
48
  ```bash
49
- arcubase rows query-entity \
49
+ arcubase row query \
50
50
  --app-id <app_id> \
51
- --entity-id <entity_id> \
51
+ --table-id <table_id> \
52
52
  --body-file query.json
53
53
  ```
54
54
 
@@ -85,9 +85,9 @@ Typical row shape:
85
85
  Command:
86
86
 
87
87
  ```bash
88
- arcubase rows get-entity-row \
88
+ arcubase workflow get-entity-row \
89
89
  --app-id <app_id> \
90
- --entity-id <entity_id> \
90
+ --table-id <table_id> \
91
91
  --row-id <row_id>
92
92
  ```
93
93
 
@@ -98,9 +98,9 @@ Use this when you already know the row id and want the full record payload.
98
98
  Command:
99
99
 
100
100
  ```bash
101
- arcubase rows update-entity-row \
101
+ arcubase row update \
102
102
  --app-id <app_id> \
103
- --entity-id <entity_id> \
103
+ --table-id <table_id> \
104
104
  --row-id <row_id> \
105
105
  --body-file update.json
106
106
  ```
@@ -139,9 +139,9 @@ The update command returns `true`, not the updated row body.
139
139
  Command:
140
140
 
141
141
  ```bash
142
- arcubase rows delete-entity-row \
142
+ arcubase row delete \
143
143
  --app-id <app_id> \
144
- --entity-id <entity_id> \
144
+ --table-id <table_id> \
145
145
  --body-file delete.json
146
146
  ```
147
147
 
@@ -164,25 +164,4 @@ Rules:
164
164
 
165
165
  ## Restore rows
166
166
 
167
- Command:
168
-
169
- ```bash
170
- arcubase rows restore-entity-row \
171
- --app-id <app_id> \
172
- --entity-id <entity_id> \
173
- --body-file restore.json
174
- ```
175
-
176
- Minimal `restore.json`:
177
-
178
- ```json
179
- {
180
- "selection": {
181
- "type": "ids",
182
- "ids": [4000000046],
183
- "length": 1
184
- }
185
- }
186
- ```
187
-
188
- The same `selection` rules apply as delete.
167
+ `row restore` is not part of the reset CLI white list.