@nuffieldtechnologies/rugged-schema-types 2.1.17 → 2.1.19

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.
package/index.ts CHANGED
@@ -1,36 +1,36 @@
1
- import * as TimeStamps from './schemas/timestamps'
2
- import * as Events from './schemas/events'
3
- import * as TemplateInfo from './schemas/template-info'
4
- import * as UserSchemas from './schemas/user'
5
- import * as Roles from './schemas/roles'
6
- import * as FormShemas from './schemas/form'
7
- import * as OrganisationSchemas from './schemas/organisation'
8
- import * as TaskIdentifiers from './schemas/task-identifiers'
9
- import * as TaskOldSchemas from './schemas/task-old'
10
- import * as TaskSchemas from './schemas/task'
11
-
12
- export const Task = TimeStamps._TimeStamps + Events._Event + Events._Events + TemplateInfo._TemplateInfo + TaskSchemas._TaskInfo + TaskSchemas._Task + TaskIdentifiers._TaskIdentifiers;
13
- export const TaskInput = TimeStamps._TimeStampsInput + Events._EventInput + Events._EventsInput + TemplateInfo._TemplateInfoInput + TaskSchemas._TaskInfoInput + TaskSchemas._TaskInput + TaskIdentifiers._TaskIdentifiersInput;
14
- export const TaskFilter = TaskSchemas._TaskFilter;
15
- export const Tasks = Task + TaskInput + TaskFilter + TaskOldSchemas._TaskOld;
16
- export const AllTaskFields = TaskSchemas._AllTaskFields;
17
-
18
- export const User = Roles._Roles + UserSchemas._User;
19
- export const UserInput = Roles._RolesInput + UserSchemas._UserInput;
20
- export const Users = User + UserInput;
21
- export const AllUserFields = UserSchemas._AllUserFields;
22
- export const AllRolesFields = Roles._AllRolesFields;
23
-
24
- export const Form = FormShemas._Form;
25
- export const FormInput = FormShemas._FormInput;
26
- export const FormFilter = FormShemas._FormFilter;
27
- export const Forms = Form + FormInput + FormFilter;
28
- export const AllFormFields = FormShemas._AllFormFields;
29
-
30
- export const Organisation = OrganisationSchemas._Organisation;
31
- export const OrganisationInput = OrganisationSchemas._OrganisationInput;
32
- export const Organisations = Organisation + OrganisationInput;
33
- export const AllOrganisationFields = OrganisationSchemas._AllOrganisationFields;
34
-
35
- export const All = Tasks + Users + Forms + Organisations;
36
- export default All;
1
+ import * as TimeStamps from './schemas/timestamps'
2
+ import * as Events from './schemas/events'
3
+ import * as TemplateInfo from './schemas/template-info'
4
+ import * as UserSchemas from './schemas/user'
5
+ import * as Roles from './schemas/roles'
6
+ import * as FormShemas from './schemas/form'
7
+ import * as OrganisationSchemas from './schemas/organisation'
8
+ import * as TaskIdentifiers from './schemas/task-identifiers'
9
+ import * as TaskOldSchemas from './schemas/task-old'
10
+ import * as TaskSchemas from './schemas/task'
11
+
12
+ export const Task = TimeStamps._TimeStamps + Events._Event + Events._Events + TemplateInfo._TemplateInfo + TaskSchemas._TaskInfo + TaskSchemas._Task + TaskIdentifiers._TaskIdentifiers;
13
+ export const TaskInput = TimeStamps._TimeStampsInput + Events._EventInput + Events._EventsInput + TemplateInfo._TemplateInfoInput + TaskSchemas._TaskInfoInput + TaskSchemas._TaskInput + TaskIdentifiers._TaskIdentifiersInput;
14
+ export const TaskFilter = TaskSchemas._TaskFilter;
15
+ export const Tasks = Task + TaskInput + TaskFilter + TaskOldSchemas._TaskOld;
16
+ export const AllTaskFields = TaskSchemas._AllTaskFields;
17
+
18
+ export const User = Roles._Roles + UserSchemas._User;
19
+ export const UserInput = Roles._RolesInput + UserSchemas._UserInput;
20
+ export const Users = User + UserInput;
21
+ export const AllUserFields = UserSchemas._AllUserFields;
22
+ export const AllRolesFields = Roles._AllRolesFields;
23
+
24
+ export const Form = FormShemas._Form;
25
+ export const FormInput = FormShemas._FormInput;
26
+ export const FormFilter = FormShemas._FormFilter;
27
+ export const Forms = Form + FormInput + FormFilter;
28
+ export const AllFormFields = FormShemas._AllFormFields;
29
+
30
+ export const Organisation = OrganisationSchemas._Organisation;
31
+ export const OrganisationInput = OrganisationSchemas._OrganisationInput;
32
+ export const Organisations = Organisation + OrganisationInput;
33
+ export const AllOrganisationFields = OrganisationSchemas._AllOrganisationFields;
34
+
35
+ export const All = Tasks + Users + Forms + Organisations;
36
+ export default All;
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
- {
2
- "name": "@nuffieldtechnologies/rugged-schema-types",
3
- "version": "2.1.17",
4
- "description": "Graphql schema for rugged data",
5
- "main": "dist/index.js",
6
- "keywords": [
7
- "graphql",
8
- "schema"
9
- ],
10
- "devDependencies": {
11
- "@types/chai": "^4.3.4",
12
- "@types/mocha": "^10.0.1",
13
- "chai": "^4.3.7",
14
- "mocha": "^10.2.0",
15
- "ts-node": "^10.9.1",
16
- "@typescript-eslint/eslint-plugin": "^5.48.2",
17
- "@typescript-eslint/parser": "^5.48.2",
18
- "eslint": "^8.32.0",
19
- "typescript": "^4.9.4"
20
- },
21
- "author": "Tom Edge",
22
- "license": "UNLICENSED",
23
- "scripts": {
24
- "test": "echo \"Error: no test specified\" && exit 1",
25
- "lint": "eslint --fix './**/*.ts'",
26
- "prebuild": "npm run lint",
27
- "build": "tsc",
28
- "push": "npm run build && npm publish"
29
- }
30
- }
1
+ {
2
+ "name": "@nuffieldtechnologies/rugged-schema-types",
3
+ "version": "2.1.19",
4
+ "description": "Graphql schema for rugged data",
5
+ "main": "dist/index.js",
6
+ "keywords": [
7
+ "graphql",
8
+ "schema"
9
+ ],
10
+ "devDependencies": {
11
+ "@types/chai": "^4.3.4",
12
+ "@types/mocha": "^10.0.1",
13
+ "chai": "^4.3.7",
14
+ "mocha": "^10.2.0",
15
+ "ts-node": "^10.9.1",
16
+ "@typescript-eslint/eslint-plugin": "^5.48.2",
17
+ "@typescript-eslint/parser": "^5.48.2",
18
+ "eslint": "^8.32.0",
19
+ "typescript": "^4.9.4"
20
+ },
21
+ "author": "Tom Edge",
22
+ "license": "UNLICENSED",
23
+ "scripts": {
24
+ "test": "echo \"Error: no test specified\" && exit 1",
25
+ "lint": "eslint --fix './**/*.ts'",
26
+ "prebuild": "npm run lint",
27
+ "build": "tsc",
28
+ "push": "npm run build && npm publish"
29
+ }
30
+ }
package/schemas/events.ts CHANGED
@@ -1,49 +1,49 @@
1
- export const _Event = `
2
- type Event {
3
- appVersion: String,
4
- at: Float,
5
- atForHumans: String,
6
- device: String,
7
- deviceModel: String,
8
- osVersion: String,
9
- user: String,
10
- userEmail: String
11
- }
12
- `
13
-
14
- export const _EventInput = `
15
- input EventInput {
16
- appVersion: String,
17
- at: Float,
18
- atForHumans: String,
19
- device: String,
20
- deviceModel: String,
21
- osVersion: String,
22
- user: String,
23
- userEmail: String
24
- }
25
- `;
26
-
27
- export const _Events = `
28
- type Events {
29
- started: Event,
30
- updated: Event,
31
- upgraded: Event,
32
- processed: Event,
33
- submitted: Event,
34
- discarded: Event,
35
- }
36
- `;
37
-
38
- export const _EventsInput = `
39
- input EventsInput {
40
- started: EventInput,
41
- updated: EventInput,
42
- upgraded: EventInput,
43
- processed: EventInput,
44
- submitted: EventInput,
45
- discarded: EventInput,
46
- }
47
- `;
48
-
1
+ export const _Event = `
2
+ type Event {
3
+ appVersion: String,
4
+ at: Float,
5
+ atForHumans: String,
6
+ device: String,
7
+ deviceModel: String,
8
+ osVersion: String,
9
+ user: String,
10
+ userEmail: String
11
+ }
12
+ `
13
+
14
+ export const _EventInput = `
15
+ input EventInput {
16
+ appVersion: String,
17
+ at: Float,
18
+ atForHumans: String,
19
+ device: String,
20
+ deviceModel: String,
21
+ osVersion: String,
22
+ user: String,
23
+ userEmail: String
24
+ }
25
+ `;
26
+
27
+ export const _Events = `
28
+ type Events {
29
+ started: Event,
30
+ updated: Event,
31
+ upgraded: Event,
32
+ processed: Event,
33
+ submitted: Event,
34
+ discarded: Event,
35
+ }
36
+ `;
37
+
38
+ export const _EventsInput = `
39
+ input EventsInput {
40
+ started: EventInput,
41
+ updated: EventInput,
42
+ upgraded: EventInput,
43
+ processed: EventInput,
44
+ submitted: EventInput,
45
+ discarded: EventInput,
46
+ }
47
+ `;
48
+
49
49
  export const _AllEventFields = `{appVersion, at, atForHumans, device, deviceModel, osVersion, user, userEmail}`;
package/schemas/form.ts CHANGED
@@ -1,49 +1,49 @@
1
- export const _FormInput = `
2
-
3
- input ParamInput {
4
- name: String
5
- value: String
6
- }
7
-
8
- input FormInput {
9
- id: ID
10
- name: String
11
- key: String
12
- definition: String
13
- version: String
14
- status: String
15
- updated: String
16
- params: [ParamInput]
17
- resources: String
18
- body: String
19
- }
20
- `;
21
-
22
- export const _Form = `
23
-
24
- type Param {
25
- name: String
26
- value: String
27
- }
28
-
29
- type Form {
30
- id: ID
31
- name: String
32
- key: String
33
- definition: String
34
- version: String
35
- status: String
36
- updated: String
37
- params: [Param]
38
- resources: String
39
- body: String
40
- }
41
- `;
42
-
43
- export const _FormFilter = `
44
- input FormFilter {
45
- status: String
46
- }
47
- `;
48
-
1
+ export const _FormInput = `
2
+
3
+ input ParamInput {
4
+ name: String
5
+ value: String
6
+ }
7
+
8
+ input FormInput {
9
+ id: ID
10
+ name: String
11
+ key: String
12
+ definition: String
13
+ version: String
14
+ status: String
15
+ updated: String
16
+ params: [ParamInput]
17
+ resources: String
18
+ body: String
19
+ }
20
+ `;
21
+
22
+ export const _Form = `
23
+
24
+ type Param {
25
+ name: String
26
+ value: String
27
+ }
28
+
29
+ type Form {
30
+ id: ID
31
+ name: String
32
+ key: String
33
+ definition: String
34
+ version: String
35
+ status: String
36
+ updated: String
37
+ params: [Param]
38
+ resources: String
39
+ body: String
40
+ }
41
+ `;
42
+
43
+ export const _FormFilter = `
44
+ input FormFilter {
45
+ status: String
46
+ }
47
+ `;
48
+
49
49
  export const _AllFormFields = `{id, name, key, definition, status, updated, params {name, value}, resources, body}`;
@@ -1,17 +1,17 @@
1
- export const _OrganisationInput = `
2
- input OrganisationInput {
3
- id: ID
4
- name: String
5
- logoUrl: String
6
- }
7
- `;
8
-
9
- export const _Organisation = `
10
- type Organisation {
11
- id: ID
12
- name: String
13
- logoUrl: String
14
- }
15
- `;
16
-
1
+ export const _OrganisationInput = `
2
+ input OrganisationInput {
3
+ id: ID
4
+ name: String
5
+ logoUrl: String
6
+ }
7
+ `;
8
+
9
+ export const _Organisation = `
10
+ type Organisation {
11
+ id: ID
12
+ name: String
13
+ logoUrl: String
14
+ }
15
+ `;
16
+
17
17
  export const _AllOrganisationFields = `{id, name, logoUrl}`;
package/schemas/roles.ts CHANGED
@@ -1,20 +1,20 @@
1
- export const _Roles = `
2
- type Roles {
3
- user: Boolean
4
- admin: Boolean
5
- api: Boolean
6
- uber: Boolean
7
- super: Boolean
8
- legacyPush: Boolean
9
- }
10
- `;
11
-
12
- export const _RolesInput = `
13
- input RolesInput {
14
- user: Boolean
15
- admin: Boolean
16
- api: Boolean
17
- }
18
- `;
19
-
1
+ export const _Roles = `
2
+ type Roles {
3
+ user: Boolean
4
+ admin: Boolean
5
+ api: Boolean
6
+ uber: Boolean
7
+ super: Boolean
8
+ legacyPush: Boolean
9
+ }
10
+ `;
11
+
12
+ export const _RolesInput = `
13
+ input RolesInput {
14
+ user: Boolean
15
+ admin: Boolean
16
+ api: Boolean
17
+ }
18
+ `;
19
+
20
20
  export const _AllRolesFields = `{user, admin, api, uber, super, legacyPush}`;
@@ -1,13 +1,13 @@
1
- export const _TaskIdentifiers = `
2
- type TaskIdentifiers {
3
- primary: String
4
- secondary: String
5
- }
6
- `;
7
-
8
- export const _TaskIdentifiersInput = `
9
- input TaskIdentifiersInput {
10
- primary: String
11
- secondary: String
12
- }
1
+ export const _TaskIdentifiers = `
2
+ type TaskIdentifiers {
3
+ primary: String
4
+ secondary: String
5
+ }
6
+ `;
7
+
8
+ export const _TaskIdentifiersInput = `
9
+ input TaskIdentifiersInput {
10
+ primary: String
11
+ secondary: String
12
+ }
13
13
  `;
@@ -1,20 +1,20 @@
1
- export const _TaskOld = `
2
- type TaskOld {
3
- id: ID,
4
- name: String
5
- definition: String
6
- user: ID
7
- userEmail: String
8
- form: ID
9
- organisation: ID
10
- timestamps: TimeStamps
11
- events: Events
12
- template: TemplateInfo
13
- identifiers: TaskIdentifiers
14
- status: String
15
- fails: [String]
16
- reportUrl: String
17
- data: String
18
- refNo: String
19
- }
1
+ export const _TaskOld = `
2
+ type TaskOld {
3
+ id: ID,
4
+ name: String
5
+ definition: String
6
+ user: ID
7
+ userEmail: String
8
+ form: ID
9
+ organisation: ID
10
+ timestamps: TimeStamps
11
+ events: Events
12
+ template: TemplateInfo
13
+ identifiers: TaskIdentifiers
14
+ status: String
15
+ fails: [String]
16
+ reportUrl: String
17
+ data: String
18
+ refNo: String
19
+ }
20
20
  `;
package/schemas/task.ts CHANGED
@@ -1,70 +1,76 @@
1
- import * as Events from './events'
2
-
3
- export const _Task = `
4
- type Task {
5
- collections: String
6
- fields: String
7
- info: TaskInfo
8
- sections: String
9
- }
10
- `;
11
-
12
- export const _TaskInfo = `
13
- type TaskInfo {
14
- status: String
15
- statusBeforeEdit: String
16
- rootEntityId: String
17
- rootEntityName: String
18
- rootEntityAncestry: String
19
- id: String
20
- refNo: String
21
- name: String
22
- events: Events
23
- identifiers: TaskIdentifiers
24
- template: TemplateInfo
25
- userIds: String
26
- users: String
27
- timestamps: TimeStamps
28
- }
29
- `;
30
-
31
- export const _TaskInput = `
32
- input TaskInput {
33
- collections: String
34
- fields: String
35
- info: TaskInfoInput
36
- sections: String
37
- }
38
- `;
39
-
40
- export const _TaskInfoInput = `
41
- input TaskInfoInput {
42
- status: String
43
- statusBeforeEdit: String
44
- rootEntityId: String
45
- rootEntityAncestry: String
46
- id: String
47
- refNo: String
48
- name: String
49
- events: EventsInput
50
- identifiers: TaskIdentifiersInput
51
- template: TemplateInfoInput
52
- userIds: String
53
- users: String
54
- timestamps: TimeStampsInput
55
- }
56
- `;
57
-
58
- export const _TaskFilter = `
59
- input TaskFilter {
60
- users: [ID]
61
- userEmails: [String]
62
- rootEntityIds: [String]
63
- entityIds: [String]
64
- forms: [ID]
65
- after: String
66
- before: String
67
- }
68
- `;
69
-
70
- export const _AllTaskFields = `{collections, fields, info {status, id, rootEntityId, rootEntityName, rootEntityAncestry, name, refNo, userIds, users, timestamps {started, updated, submitted, processed, upgraded, discarded}, events {started ${Events._AllEventFields}, updated ${Events._AllEventFields}, submitted ${Events._AllEventFields}, discarded ${Events._AllEventFields}, processed ${Events._AllEventFields}, upgraded ${Events._AllEventFields}}, template { name, shortName, type, id, version}, identifiers { primary, secondary}}, sections}`;
1
+ import * as Events from './events'
2
+
3
+ export const _Task = `
4
+ type Task {
5
+ collections: String
6
+ fields: String
7
+ info: TaskInfo
8
+ sections: String
9
+ }
10
+ `;
11
+
12
+ export const _TaskInfo = `
13
+ type TaskInfo {
14
+ status: String
15
+ statusBeforeEdit: String
16
+ rootEntityId: String
17
+ rootEntityName: String
18
+ rootEntityAncestry: String
19
+ id: String
20
+ refNo: String
21
+ tags: String[]
22
+ workflowStep: String
23
+ workflow: String
24
+ name: String
25
+ events: Events
26
+ identifiers: TaskIdentifiers
27
+ template: TemplateInfo
28
+ userIds: String
29
+ users: String
30
+ timestamps: TimeStamps
31
+ }
32
+ `;
33
+
34
+ export const _TaskInput = `
35
+ input TaskInput {
36
+ collections: String
37
+ fields: String
38
+ info: TaskInfoInput
39
+ sections: String
40
+ }
41
+ `;
42
+
43
+ export const _TaskInfoInput = `
44
+ input TaskInfoInput {
45
+ status: String
46
+ statusBeforeEdit: String
47
+ rootEntityId: String
48
+ rootEntityAncestry: String
49
+ id: String
50
+ refNo: String
51
+ tags: String[]
52
+ workflowStep: String
53
+ workflow: String
54
+ name: String
55
+ events: EventsInput
56
+ identifiers: TaskIdentifiersInput
57
+ template: TemplateInfoInput
58
+ userIds: String
59
+ users: String
60
+ timestamps: TimeStampsInput
61
+ }
62
+ `;
63
+
64
+ export const _TaskFilter = `
65
+ input TaskFilter {
66
+ users: [ID]
67
+ userEmails: [String]
68
+ rootEntityIds: [String]
69
+ entityIds: [String]
70
+ forms: [ID]
71
+ after: String
72
+ before: String
73
+ }
74
+ `;
75
+
76
+ export const _AllTaskFields = `{collections, fields, info {status, id, rootEntityId, rootEntityName, rootEntityAncestry, name, refNo, tags, workflowStep, workflow, userIds, users, timestamps {started, updated, submitted, processed, upgraded, discarded}, events {started ${Events._AllEventFields}, updated ${Events._AllEventFields}, submitted ${Events._AllEventFields}, discarded ${Events._AllEventFields}, processed ${Events._AllEventFields}, upgraded ${Events._AllEventFields}}, template { name, shortName, type, id, version}, identifiers { primary, secondary}}, sections}`;
@@ -1,19 +1,19 @@
1
- export const _TemplateInfo = `
2
- type TemplateInfo {
3
- name: String,
4
- shortName: String,
5
- type: String,
6
- id: String
7
- version: String
8
- }
9
- `;
10
-
11
- export const _TemplateInfoInput = `
12
- input TemplateInfoInput {
13
- name: String,
14
- shortName: String,
15
- type: String,
16
- id: String
17
- version: String
18
- }
1
+ export const _TemplateInfo = `
2
+ type TemplateInfo {
3
+ name: String,
4
+ shortName: String,
5
+ type: String,
6
+ id: String
7
+ version: String
8
+ }
9
+ `;
10
+
11
+ export const _TemplateInfoInput = `
12
+ input TemplateInfoInput {
13
+ name: String,
14
+ shortName: String,
15
+ type: String,
16
+ id: String
17
+ version: String
18
+ }
19
19
  `;