@nuffieldtechnologies/rugged-schema-types 1.0.1 → 1.0.3

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/dist/index.js ADDED
@@ -0,0 +1,276 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.All = exports.AllOrganisationFields = exports.Organisations = exports.OrganisationInput = exports.Organisation = exports.AllFormFields = exports.Forms = exports.FormFilter = exports.FormInput = exports.Form = exports.AllRolesFields = exports.AllUserFields = exports.Users = exports.UserInput = exports.User = exports.AllTaskFields = exports.Tasks = exports.TaskFilter = exports.TaskInput = exports.Task = void 0;
4
+ const _TimeStamps = `
5
+ type TimeStamps {
6
+ started: String,
7
+ updated: String,
8
+ submitted: String,
9
+ processed: String,
10
+ upgraded: String
11
+ }
12
+ `;
13
+ const _TimeStampsInput = `
14
+ input TimeStampsInput {
15
+ started: String,
16
+ updated: String,
17
+ submitted: String,
18
+ processed: String,
19
+ upgraded: String
20
+ }
21
+ `;
22
+ const _Event = `
23
+ type Event {
24
+ appVersion: String,
25
+ at: Float,
26
+ atForHumans: String,
27
+ device: String,
28
+ deviceModel: String,
29
+ osVersion: String,
30
+ user: String,
31
+ userEmail: String
32
+ }
33
+ `;
34
+ const _EventInput = `
35
+ input EventInput {
36
+ appVersion: String,
37
+ at: Float,
38
+ atForHumans: String,
39
+ device: String,
40
+ deviceModel: String,
41
+ osVersion: String,
42
+ user: String,
43
+ userEmail: String
44
+ }
45
+ `;
46
+ const _Events = `
47
+ type Events {
48
+ started: Event,
49
+ updated: Event,
50
+ submitted: Event,
51
+ discarded: Event,
52
+ }
53
+ `;
54
+ const _EventsInput = `
55
+ input EventsInput {
56
+ started: EventInput,
57
+ updated: EventInput,
58
+ submitted: EventInput,
59
+ discarded: EventInput,
60
+ }
61
+ `;
62
+ const _TemplateInfo = `
63
+ type TemplateInfo {
64
+ name: String,
65
+ type: String,
66
+ id: String
67
+ version: String
68
+ }
69
+ `;
70
+ const _TemplateInfoInput = `
71
+ input TemplateInfoInput {
72
+ name: String,
73
+ type: String,
74
+ id: String
75
+ version: String
76
+ }
77
+ `;
78
+ const _TaskIdentifiers = `
79
+ type TaskIdentifiers {
80
+ primary: String
81
+ secondary: String
82
+ }
83
+ `;
84
+ const _TaskIdentifiersInput = `
85
+ input TaskIdentifiersInput {
86
+ primary: String
87
+ secondary: String
88
+ }
89
+ `;
90
+ const _Task = `
91
+ type Task {
92
+ id: ID,
93
+ name: String
94
+ definition: String
95
+ user: ID
96
+ userEmail: String
97
+ form: ID
98
+ organisation: ID
99
+ timestamps: TimeStamps
100
+ events: Events
101
+ template: TemplateInfo
102
+ identifiers: TaskIdentifiers
103
+ status: String
104
+ fails: [String]
105
+ reportUrl: String
106
+ data: String
107
+ refNo: String
108
+ }
109
+ `;
110
+ const _AllEventFields = `{appVersion, at, atForHumans, device, deviceModel, osVersion, user, userEmail}`;
111
+ const _AllTaskFields = `{id, name, definition, user, userEmail, form, id, organisation, timestamps {started, updated, submitted, processed, upgraded} events {started ${_AllEventFields}, updated ${_AllEventFields}, submitted ${_AllEventFields}, discarded ${_AllEventFields}} , template { type, id, version}, identifiers { primary, secondary}, status, fails, reportUrl, data, refNo}`;
112
+ const _TaskInput = `
113
+ input TaskInput {
114
+ # The name of the task. TODO does this actually exist?
115
+ name: String,
116
+
117
+ # A short description of the task
118
+ description: String
119
+
120
+ # The definition of the task
121
+ definition: String!,
122
+
123
+ # The id of the user who submitted the task TODO is this right?
124
+ user: ID
125
+
126
+ # The email of the user who submitted the task
127
+ userEmail: String,
128
+
129
+ form: ID
130
+ id: ID
131
+ organisation: ID
132
+ status: String
133
+ fails: [String]
134
+ reportUrl: String
135
+ timestamps: TimeStampsInput
136
+ events: EventsInput
137
+ template: TemplateInfoInput
138
+ identifiers: TaskIdentifiersInput
139
+ data: String
140
+
141
+ #A unique identifier for the task that is intended to be human-readable.
142
+ refNo: String
143
+ }
144
+ `;
145
+ const _TaskFilter = `
146
+ input TaskFilter {
147
+ users: [ID]
148
+ userEmails: [String]
149
+ forms: [ID]
150
+ after: String
151
+ before: String
152
+ },
153
+ `;
154
+ const _Roles = `
155
+ type Roles {
156
+ user: Boolean
157
+ admin: Boolean
158
+ api: Boolean
159
+ uber: Boolean
160
+ super: Boolean
161
+ legacyPush: Boolean
162
+ }
163
+ `;
164
+ const _RolesInput = `
165
+ input RolesInput {
166
+ user: Boolean
167
+ admin: Boolean
168
+ api: Boolean
169
+ }
170
+ `;
171
+ const _User = `
172
+ type User {
173
+ id: ID
174
+ organisation: ID
175
+ firebaseId: ID
176
+ name: String
177
+ email: String
178
+ roles: Roles
179
+ permissions: String
180
+ }
181
+ `;
182
+ const _UserInput = `
183
+ input UserInput {
184
+ id: ID
185
+ organisation: ID
186
+ firebaseId: ID
187
+ name: String
188
+ email: String
189
+ roles: RolesInput
190
+ }
191
+ `;
192
+ const _AllRolesFields = `{user, admin, api, uber, super, legacyPush}`;
193
+ const _AllUserFields = `{id, organisation, name, email, roles ${_AllRolesFields}, permissions}`;
194
+ const _FormInput = `
195
+
196
+ input ParamInput {
197
+ name: String
198
+ value: String
199
+ }
200
+
201
+ input FormInput {
202
+ id: ID
203
+ name: String
204
+ key: String
205
+ definition: String
206
+ version: String
207
+ status: String
208
+ updated: String
209
+ params: [ParamInput]
210
+ resources: String
211
+ body: String
212
+ }
213
+ `;
214
+ const _FormFilter = `
215
+ input FormFilter {
216
+ status: String
217
+ }
218
+ `;
219
+ const _Form = `
220
+
221
+ type Param {
222
+ name: String
223
+ value: String
224
+ }
225
+
226
+ type Form {
227
+ id: ID
228
+ name: String
229
+ key: String
230
+ definition: String
231
+ version: String
232
+ status: String
233
+ updated: String
234
+ params: [Param]
235
+ resources: String
236
+ body: String
237
+ }
238
+ `;
239
+ const _AllFormFields = `{id, name, key, definition, status, updated, params {name, value}, resources, body}`;
240
+ const _OrganisationInput = `
241
+ input OrganisationInput {
242
+ id: ID
243
+ name: String
244
+ logoUrl: String
245
+ }
246
+ `;
247
+ const _Organisation = `
248
+ type Organisation {
249
+ id: ID
250
+ name: String
251
+ logoUrl: String
252
+ }
253
+ `;
254
+ const _AllOrganisationFields = `{id, name, logoUrl}`;
255
+ exports.Task = _TimeStamps + _Event + _Events + _TemplateInfo + _Task + _TaskIdentifiers;
256
+ exports.TaskInput = _TimeStampsInput + _EventInput + _EventsInput + _TemplateInfoInput + _TaskInput + _TaskIdentifiersInput;
257
+ exports.TaskFilter = _TaskFilter;
258
+ exports.Tasks = exports.Task + exports.TaskInput + exports.TaskFilter;
259
+ exports.AllTaskFields = _AllTaskFields;
260
+ exports.User = _Roles + _User;
261
+ exports.UserInput = _RolesInput + _UserInput;
262
+ exports.Users = exports.User + exports.UserInput;
263
+ exports.AllUserFields = _AllUserFields;
264
+ exports.AllRolesFields = _AllRolesFields;
265
+ exports.Form = _Form;
266
+ exports.FormInput = _FormInput;
267
+ exports.FormFilter = _FormFilter;
268
+ exports.Forms = exports.Form + exports.FormInput + exports.FormFilter;
269
+ exports.AllFormFields = _AllFormFields;
270
+ exports.Organisation = _Organisation;
271
+ exports.OrganisationInput = _OrganisationInput;
272
+ exports.Organisations = exports.Organisation + exports.OrganisationInput;
273
+ exports.AllOrganisationFields = _AllOrganisationFields;
274
+ exports.All = exports.Tasks + exports.Users + exports.Forms + exports.Organisations;
275
+ exports.default = exports.All;
276
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,MAAM,WAAW,GAAG;;;;;;;;CAQnB,CAAC;AACF,MAAM,gBAAgB,GAAG;;;;;;;;CAQxB,CAAC;AAEF,MAAM,MAAM,GAAG;;;;;;;;;;;CAWd,CAAA;AAED,MAAM,WAAW,GAAG;;;;;;;;;;;CAWnB,CAAC;AAEF,MAAM,OAAO,GAAG;;;;;;;CAOf,CAAC;AAEF,MAAM,YAAY,GAAG;;;;;;;CAOpB,CAAC;AAEF,MAA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YAAY,GAAG,kBAAkB,GAAG,UAAU,GAAG,qBAAqB,CAAC;AACpH,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,KAAK,GAAG,YAAI,GAAG,iBAAS,GAAG,kBAAU,CAAC;AACtC,QAAA,aAAa,GAAG,cAAc,CAAC;AAE/B,QAAA,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC;AACtB,QAAA,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AACrC,QAAA,KAAK,GAAG,YAAI,GAAG,iBAAS,CAAC;AACzB,QAAA,aAAa,GAAG,cAAc,CAAC;AAC/B,QAAA,cAAc,GAAG,eAAe,CAAC;AAEjC,QAAA,IAAI,GAAG,KAAK,CAAC;AACb,QAAA,SAAS,GAAG,UAAU,CAAC;AACvB,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,KAAK,GAAG,YAAI,GAAG,iBAAS,GAAG,kBAAU,CAAC;AACtC,QAAA,aAAa,GAAG,cAAc,CAAC;AAE/B,QAAA,YAAY,GAAG,aAAa,CAAC;AAC7B,QAAA,iBAAiB,GAAG,kBAAkB,CAAC;AACvC,QAAA,aAAa,GAAG,oBAAY,GAAG,yBAAiB,CAAC;AACjD,QAAA,qBAAqB,GAAG,sBAAsB,CAAC;AAE/C,QAAA,GAAG,GAAG,aAAK,GAAG,aAAK,GAAG,aAAK,GAAG,qBAAa,CAAC;AACzD,kBAAe,WAAG,CAAC"}
package/index.ts CHANGED
@@ -116,7 +116,7 @@ const _Task = `
116
116
 
117
117
  const _AllEventFields = `{appVersion, at, atForHumans, device, deviceModel, osVersion, user, userEmail}`;
118
118
 
119
- const _AllTaskFields = `{id, name, definition, user, userEmail, form, id, organisation, timestamps {started, updated, submitted, processed, upgraded} events {started ${_AllEventFields}, updated ${_AllEventFields}, submitted ${_AllEventFields}, discarded ${_AllEventFields}} , template { type, id, version}, identifiers { primary, secondary}, status, fails, reportUrl, data}`;
119
+ const _AllTaskFields = `{id, name, definition, user, userEmail, form, id, organisation, timestamps {started, updated, submitted, processed, upgraded} events {started ${_AllEventFields}, updated ${_AllEventFields}, submitted ${_AllEventFields}, discarded ${_AllEventFields}} , template { type, id, version}, identifiers { primary, secondary}, status, fails, reportUrl, data, refNo}`;
120
120
 
121
121
  const _TaskInput = `
122
122
  input TaskInput {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuffieldtechnologies/rugged-schema-types",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Graphql schema for rugged data",
5
5
  "main": "dist/index.js",
6
6
  "keywords": [