@bigfootai/bigfoot-types 2.1.0 → 2.2.0

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 (3) hide show
  1. package/model.js +164 -0
  2. package/package.json +6 -3
  3. package/tsconfig.json +3 -6
package/model.js ADDED
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Table = exports.FieldVariation = exports.FieldType = exports.Template = exports.Thread = exports.ExternalTask = exports.EventStatus = exports.Conference = exports.Task = exports.Block = exports.Note = exports.Person = exports.Domain = exports.Tenant = exports.BusinessObject = exports.Tag = exports.Primitive = exports.RecurrenceRFC = exports.InviteStatus = exports.SharingApproach = exports.StepStatus = exports.TaskStatus = exports.SharingLevel = exports.TagType = exports.BlockType = exports.BusinessObjectType = void 0;
4
+ const uuid_1 = require("uuid");
5
+ /*
6
+ These are the core primitives of our model. These represent the entities that show
7
+ up in our Graph QL CRUD operations and set out the fundamental building blocks of
8
+ the platform.
9
+ */
10
+ // CORE START
11
+ var BusinessObjectType;
12
+ (function (BusinessObjectType) {
13
+ BusinessObjectType["Event"] = "event";
14
+ BusinessObjectType["Task"] = "task";
15
+ BusinessObjectType["Document"] = "document";
16
+ BusinessObjectType["Record"] = "record";
17
+ BusinessObjectType["Conference"] = "conference";
18
+ BusinessObjectType["Message"] = "message";
19
+ BusinessObjectType["Website"] = "website";
20
+ })(BusinessObjectType || (exports.BusinessObjectType = BusinessObjectType = {}));
21
+ var BlockType;
22
+ (function (BlockType) {
23
+ BlockType["Section"] = "section";
24
+ BlockType["Task"] = "task";
25
+ BlockType["Data"] = "data";
26
+ })(BlockType || (exports.BlockType = BlockType = {}));
27
+ var TagType;
28
+ (function (TagType) {
29
+ TagType["Person"] = "person";
30
+ TagType["Topic"] = "topic";
31
+ })(TagType || (exports.TagType = TagType = {}));
32
+ var SharingLevel;
33
+ (function (SharingLevel) {
34
+ SharingLevel[SharingLevel["ReadOnly"] = 0] = "ReadOnly";
35
+ SharingLevel[SharingLevel["Editor"] = 1] = "Editor";
36
+ SharingLevel[SharingLevel["Owner"] = 2] = "Owner";
37
+ })(SharingLevel || (exports.SharingLevel = SharingLevel = {}));
38
+ var TaskStatus;
39
+ (function (TaskStatus) {
40
+ TaskStatus[TaskStatus["NotStarted"] = 0] = "NotStarted";
41
+ TaskStatus[TaskStatus["InProgress"] = 1] = "InProgress";
42
+ TaskStatus[TaskStatus["Completed"] = 10] = "Completed";
43
+ })(TaskStatus || (exports.TaskStatus = TaskStatus = {}));
44
+ var StepStatus;
45
+ (function (StepStatus) {
46
+ StepStatus[StepStatus["NotStarted"] = 0] = "NotStarted";
47
+ StepStatus[StepStatus["Completed"] = 10] = "Completed";
48
+ })(StepStatus || (exports.StepStatus = StepStatus = {}));
49
+ var SharingApproach;
50
+ (function (SharingApproach) {
51
+ SharingApproach[SharingApproach["Inline"] = 0] = "Inline";
52
+ SharingApproach[SharingApproach["Explicit"] = 1] = "Explicit";
53
+ SharingApproach[SharingApproach["Automated"] = 2] = "Automated";
54
+ })(SharingApproach || (exports.SharingApproach = SharingApproach = {}));
55
+ var InviteStatus;
56
+ (function (InviteStatus) {
57
+ InviteStatus[InviteStatus["NotInvited"] = 0] = "NotInvited";
58
+ InviteStatus[InviteStatus["InviteSent"] = 1] = "InviteSent";
59
+ InviteStatus[InviteStatus["InviteAccepted"] = 2] = "InviteAccepted";
60
+ })(InviteStatus || (exports.InviteStatus = InviteStatus = {}));
61
+ var RecurrenceRFC;
62
+ (function (RecurrenceRFC) {
63
+ RecurrenceRFC["FREQ"] = "FREQ";
64
+ RecurrenceRFC["UNTIL"] = "UNTIL";
65
+ RecurrenceRFC["COUNT"] = "COUNT";
66
+ RecurrenceRFC["INTERVAL"] = "INTERVAL";
67
+ RecurrenceRFC["BYDAY"] = "BYDAY";
68
+ RecurrenceRFC["BYMONTH"] = "BYMONTH";
69
+ RecurrenceRFC["BYMONTHDAY"] = "BYMONTHDAY";
70
+ RecurrenceRFC["BYYEARDAY"] = "BYYEARDAY";
71
+ RecurrenceRFC["BYWEEKNO"] = "BYWEEKNO";
72
+ RecurrenceRFC["BYHOUR"] = "BYHOUR";
73
+ RecurrenceRFC["BYMINUTE"] = "BYMINUTE";
74
+ RecurrenceRFC["BYSECOND"] = "BYSECOND";
75
+ RecurrenceRFC["MONDAY"] = "MO";
76
+ RecurrenceRFC["TUESDAY"] = "TU";
77
+ RecurrenceRFC["WEDNESDAY"] = "WE";
78
+ RecurrenceRFC["THURSDAY"] = "TH";
79
+ RecurrenceRFC["FRIDAY"] = "FR";
80
+ RecurrenceRFC["SATURDAY"] = "SA";
81
+ RecurrenceRFC["SUNDAY"] = "SU";
82
+ })(RecurrenceRFC || (exports.RecurrenceRFC = RecurrenceRFC = {}));
83
+ class Primitive {
84
+ constructor() {
85
+ this._id = (0, uuid_1.v4)();
86
+ const now = Date.now();
87
+ this.dateCreated = now;
88
+ this.dateUpdated = now;
89
+ }
90
+ }
91
+ exports.Primitive = Primitive;
92
+ class Tag extends Primitive {
93
+ }
94
+ exports.Tag = Tag;
95
+ class BusinessObject extends Primitive {
96
+ }
97
+ exports.BusinessObject = BusinessObject;
98
+ class Tenant extends Primitive {
99
+ }
100
+ exports.Tenant = Tenant;
101
+ class Domain extends Primitive {
102
+ }
103
+ exports.Domain = Domain;
104
+ class Person extends Tag {
105
+ }
106
+ exports.Person = Person;
107
+ class Note extends Primitive {
108
+ }
109
+ exports.Note = Note;
110
+ class Block extends Note {
111
+ }
112
+ exports.Block = Block;
113
+ class Task extends Block {
114
+ }
115
+ exports.Task = Task;
116
+ class Conference extends BusinessObject {
117
+ }
118
+ exports.Conference = Conference;
119
+ //// CONFERENCE END
120
+ //// EVENT START
121
+ var EventStatus;
122
+ (function (EventStatus) {
123
+ EventStatus["Confirmed"] = "confirmed";
124
+ EventStatus["Tentative"] = "tentative";
125
+ EventStatus["Cancelled"] = "cancelled";
126
+ })(EventStatus || (exports.EventStatus = EventStatus = {}));
127
+ //// EVENT END
128
+ //// EXTERNAL TASK START
129
+ class ExternalTask extends BusinessObject {
130
+ }
131
+ exports.ExternalTask = ExternalTask;
132
+ //// EXTERNAL TASK END
133
+ //// MESSAGING START
134
+ class Thread extends BusinessObject {
135
+ }
136
+ exports.Thread = Thread;
137
+ class Template extends BusinessObject {
138
+ }
139
+ exports.Template = Template;
140
+ //// FOR DOCUMENTS END
141
+ //// FOR RECORDS START
142
+ var FieldType;
143
+ (function (FieldType) {
144
+ FieldType["Text"] = "input";
145
+ FieldType["Select"] = "select";
146
+ FieldType["Checkbox"] = "checkbox";
147
+ FieldType["Identifier"] = "identifier";
148
+ })(FieldType || (exports.FieldType = FieldType = {}));
149
+ var FieldVariation;
150
+ (function (FieldVariation) {
151
+ FieldVariation["Multi"] = "multi";
152
+ FieldVariation["Password"] = "password";
153
+ FieldVariation["Email"] = "email";
154
+ FieldVariation["Date"] = "date";
155
+ FieldVariation["Currency"] = "currency";
156
+ FieldVariation["DateTime"] = "datetime";
157
+ FieldVariation["Phone"] = "phone";
158
+ FieldVariation["Url"] = "url";
159
+ })(FieldVariation || (exports.FieldVariation = FieldVariation = {}));
160
+ class Table extends BusinessObject {
161
+ }
162
+ exports.Table = Table;
163
+ //// FOR RECORDS END
164
+ // METADATA OBJECTS END
package/package.json CHANGED
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "2.1.0",
4
+ "version": "2.2.0",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
- "main": "index.js",
6
+ "main": "model.js",
7
7
  "license": "ISC",
8
8
  "repository": "Notify-AI/bigfoot-types",
9
9
  "dependencies": {
10
10
  "uuid": "^9.0.1"
11
11
  },
12
12
  "devDependencies": {
13
- "ts-node": "^10.9.2"
13
+ "@types/node": "^20.11.16",
14
+ "ts-node": "^10.9.2",
15
+ "tslib": "^2.6.2",
16
+ "typescript": "^5.3.3"
14
17
  }
15
18
  }
package/tsconfig.json CHANGED
@@ -1,12 +1,9 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2020",
4
- "module": "ESNext",
4
+ "module": "Node16",
5
5
  "skipLibCheck": true,
6
-
7
- /* Linting */
8
- "noUnusedLocals": true,
9
- "noUnusedParameters": true,
10
- "noFallthroughCasesInSwitch": true
6
+ "resolveJsonModule": true,
7
+ "moduleResolution": "Node16"
11
8
  }
12
9
  }