-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathData Structures.txt
More file actions
80 lines (68 loc) · 1.25 KB
/
Data Structures.txt
File metadata and controls
80 lines (68 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Nabis wants to put metrc child package tags
- regulator: {
array<{
id: metrcId1
parent: undefined / null
kind?: 'batch'
},
{
id: metrcId2 (childpackage )
parent: metrcId1
kind?: 'transfer'
}
{
id: metrcId3 (childpackage2 )
parent: metrcId2
kind?: 'transfer'
}>
}
- case {
id: id
eaches: idarray
verbs:
{
get
}
}
- sku {
id: id
bunch of random detail fields
}
- batch {
batchId
}
- each {
regulator
}
endpoints:
/each {
get(id) {
regulatorEvents { array of regulator entries }
caseId: Id
}
put regulatorEvents (id, metrctag) {
regulatorEvent: { kind, id, parent(maybe) }
} return 201
}
/case {
get (id) {
regulatorEvents { array of regulator entries }
eachIds: idArray
}
put regulatorEvents (id, metrctag) {
regulatorEvent: { kind, id, parent(maybe) }
} return 201
put (move eaches) {
eaches: IdArray (unassign eaches from existing case and assign to a new case)
} return caseId
}
/regulator {
get(metrcId) {
// TBD
eaches {}
case: {}
}
}
/product (each or case) {
joins each, sku, batch
}