@eide/foir-cli 0.1.11 → 0.1.12

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 +1 @@
1
- {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/codegen/generators/documents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAuFlE"}
1
+ {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/codegen/generators/documents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAiGlE"}
@@ -17,19 +17,32 @@ fragment ${typeName}Fields on Record {
17
17
  naturalKey
18
18
  data
19
19
  metadata
20
- versionNumber
21
20
  publishedVersionNumber
22
- publishStatus
21
+ publishedAt
22
+ versionNumber
23
+ changeDescription
23
24
  createdAt
24
25
  updatedAt
25
26
  }
26
27
 
27
- query Get${typeName}($id: ID, $naturalKey: String, $preview: Boolean) {
28
- record(modelKey: "${model.key}", id: $id, naturalKey: $naturalKey, preview: $preview) {
28
+ query Get${typeName}($id: ID!, $locale: String, $preview: Boolean) {
29
+ record(id: $id) {
30
+ ...${typeName}Fields
31
+ resolved(locale: $locale, preview: $preview) {
32
+ content
33
+ record { id modelKey naturalKey }
34
+ version { id versionNumber }
35
+ }
36
+ }
37
+ }
38
+
39
+ query Get${typeName}ByKey($naturalKey: String!, $locale: String, $preview: Boolean) {
40
+ recordByKey(modelKey: "${model.key}", naturalKey: $naturalKey) {
29
41
  ...${typeName}Fields
30
- resolved {
42
+ resolved(locale: $locale, preview: $preview) {
43
+ content
31
44
  record { id modelKey naturalKey }
32
- content { fields { key type label value } }
45
+ version { id versionNumber }
33
46
  }
34
47
  }
35
48
  }
@@ -39,7 +52,6 @@ query List${pluralName}(
39
52
  $offset: Int
40
53
  $filters: [FilterInput!]
41
54
  $sort: SortInput
42
- $preview: Boolean
43
55
  ) {
44
56
  records(
45
57
  modelKey: "${model.key}"
@@ -47,45 +59,43 @@ query List${pluralName}(
47
59
  offset: $offset
48
60
  filters: $filters
49
61
  sort: $sort
50
- preview: $preview
51
62
  ) {
52
63
  items {
53
64
  ...${typeName}Fields
54
65
  }
55
66
  total
56
- hasMore
57
67
  }
58
68
  }
59
69
 
60
- mutation Create${typeName}($data: JSON!) {
61
- createRecord(modelKey: "${model.key}", data: $data) {
62
- ...${typeName}Fields
70
+ mutation Create${typeName}($input: CreateRecordInput!) {
71
+ createRecord(input: $input) {
72
+ record {
73
+ ...${typeName}Fields
74
+ }
63
75
  }
64
76
  }
65
77
 
66
- mutation Update${typeName}($id: ID!, $data: JSON!) {
67
- updateRecord(modelKey: "${model.key}", id: $id, data: $data) {
68
- ...${typeName}Fields
78
+ mutation Update${typeName}($input: UpdateRecordInput!) {
79
+ updateRecord(input: $input) {
80
+ record {
81
+ ...${typeName}Fields
82
+ }
83
+ matched
69
84
  }
70
85
  }
71
86
 
72
87
  mutation Delete${typeName}($id: ID!) {
73
- deleteRecord(modelKey: "${model.key}", id: $id) {
74
- success
75
- message
88
+ deleteRecord(id: $id) {
89
+ id
76
90
  }
77
91
  }
78
92
 
79
- mutation Publish${typeName}($id: ID!, $versionId: ID) {
80
- publishVersion(modelKey: "${model.key}", id: $id, versionId: $versionId) {
81
- ...${typeName}Fields
82
- }
93
+ mutation Publish${typeName}Version($versionId: ID!) {
94
+ publishVersion(versionId: $versionId)
83
95
  }
84
96
 
85
97
  mutation Unpublish${typeName}($id: ID!) {
86
- unpublishRecord(modelKey: "${model.key}", id: $id) {
87
- ...${typeName}Fields
88
- }
98
+ unpublishRecord(id: $id)
89
99
  }
90
100
  ${model.config.sharing?.enabled ? generateSharingOperations(model.key, typeName, pluralName) : ''}`;
91
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eide/foir-cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Universal platform CLI for EIDE — scriptable, composable resource management",
5
5
  "type": "module",
6
6
  "publishConfig": {