@tellescope/schema 1.3.48 → 1.4.1
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/lib/cjs/schema.d.ts +30 -17
- package/lib/cjs/schema.d.ts.map +1 -1
- package/lib/cjs/schema.js +179 -132
- package/lib/cjs/schema.js.map +1 -1
- package/lib/esm/schema.d.ts +30 -17
- package/lib/esm/schema.d.ts.map +1 -1
- package/lib/esm/schema.js +84 -37
- package/lib/esm/schema.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/schema.ts +121 -48
package/lib/cjs/schema.js
CHANGED
|
@@ -60,11 +60,11 @@ var BuiltInFields = {
|
|
|
60
60
|
readonly: true,
|
|
61
61
|
},
|
|
62
62
|
businessId: {
|
|
63
|
-
validator: validation_1.
|
|
63
|
+
validator: validation_1.mongoIdStringRequired,
|
|
64
64
|
readonly: true,
|
|
65
65
|
},
|
|
66
66
|
creator: {
|
|
67
|
-
validator: validation_1.
|
|
67
|
+
validator: validation_1.mongoIdStringRequired,
|
|
68
68
|
readonly: true,
|
|
69
69
|
},
|
|
70
70
|
updatedAt: {
|
|
@@ -77,6 +77,7 @@ exports.build_schema = build_schema;
|
|
|
77
77
|
exports.schema = (0, exports.build_schema)({
|
|
78
78
|
endusers: {
|
|
79
79
|
info: {
|
|
80
|
+
description: "Used to represent patients or other endusers. See Users for managing your team member's accounts.",
|
|
80
81
|
sideEffects: {
|
|
81
82
|
create: [sideEffects.handleJourneyStateChange],
|
|
82
83
|
update: [sideEffects.handleJourneyStateChange],
|
|
@@ -130,7 +131,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
130
131
|
initializer: function (e) { return !!e.email; },
|
|
131
132
|
redactions: ['enduser'],
|
|
132
133
|
}, phone: {
|
|
133
|
-
validator: validation_1.
|
|
134
|
+
validator: validation_1.phoneValidatorOptional,
|
|
134
135
|
examples: ['+14155555555'],
|
|
135
136
|
redactions: ['enduser'],
|
|
136
137
|
}, phoneConsent: {
|
|
@@ -195,7 +196,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
195
196
|
onDependencyDelete: 'unset',
|
|
196
197
|
},
|
|
197
198
|
]
|
|
198
|
-
} }),
|
|
199
|
+
}, state: { validator: validation_1.stateValidator } }),
|
|
199
200
|
customActions: {
|
|
200
201
|
add_to_journey: {
|
|
201
202
|
op: "custom", access: 'update', method: "post",
|
|
@@ -204,7 +205,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
204
205
|
description: "Adds (or restarts) endusers in a journey",
|
|
205
206
|
parameters: {
|
|
206
207
|
enduserIds: { validator: validation_1.listOfMongoIdStringValidator, required: true },
|
|
207
|
-
journeyId: { validator: validation_1.
|
|
208
|
+
journeyId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
208
209
|
},
|
|
209
210
|
returns: {}
|
|
210
211
|
},
|
|
@@ -214,7 +215,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
214
215
|
path: '/set-enduser-password',
|
|
215
216
|
description: "Sets (or resets) an enduser's password. Minimum length 8 characters.",
|
|
216
217
|
parameters: {
|
|
217
|
-
id: { validator: validation_1.
|
|
218
|
+
id: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
218
219
|
password: { validator: validation_1.stringValidator100, required: true },
|
|
219
220
|
},
|
|
220
221
|
returns: {} //authToken: { validator: stringValidator5000 } },
|
|
@@ -225,7 +226,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
225
226
|
path: '/enduser-is-authenticated',
|
|
226
227
|
description: "Checks the validity of an enduser's authToken",
|
|
227
228
|
parameters: {
|
|
228
|
-
id: { validator: validation_1.
|
|
229
|
+
id: { validator: validation_1.mongoIdStringRequired },
|
|
229
230
|
authToken: { validator: validation_1.stringValidator5000, required: true },
|
|
230
231
|
},
|
|
231
232
|
returns: {
|
|
@@ -251,7 +252,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
251
252
|
path: '/generate-enduser-auth-token',
|
|
252
253
|
description: "Generates an authToken for use by an enduser. Useful for integrating a 3rd-party authentication process or creating a session for an enduser without a set password in Tellescope.",
|
|
253
254
|
parameters: {
|
|
254
|
-
id: { validator: validation_1.
|
|
255
|
+
id: { validator: validation_1.mongoIdStringRequired },
|
|
255
256
|
externalId: { validator: validation_1.stringValidator250 },
|
|
256
257
|
email: { validator: validation_1.emailValidator },
|
|
257
258
|
phone: { validator: validation_1.phoneValidator },
|
|
@@ -290,7 +291,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
290
291
|
description: "Generates an authentication token for access to enduser-facing endpoints",
|
|
291
292
|
enduserOnly: true,
|
|
292
293
|
parameters: {
|
|
293
|
-
id: { validator: validation_1.
|
|
294
|
+
id: { validator: validation_1.mongoIdStringRequired },
|
|
294
295
|
phone: { validator: validation_1.phoneValidator },
|
|
295
296
|
email: { validator: validation_1.emailValidator },
|
|
296
297
|
password: { validator: validation_1.stringValidator100, required: true },
|
|
@@ -321,7 +322,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
321
322
|
description: "Sends a password reset email",
|
|
322
323
|
parameters: {
|
|
323
324
|
email: { validator: validation_1.emailValidator, required: true },
|
|
324
|
-
businessId: { validator: validation_1.
|
|
325
|
+
businessId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
325
326
|
},
|
|
326
327
|
returns: {},
|
|
327
328
|
},
|
|
@@ -333,7 +334,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
333
334
|
parameters: {
|
|
334
335
|
resetToken: { validator: validation_1.stringValidator250, required: true },
|
|
335
336
|
newPassword: { validator: validation_1.passwordValidator, required: true },
|
|
336
|
-
businessId: { validator: validation_1.
|
|
337
|
+
businessId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
337
338
|
},
|
|
338
339
|
returns: {},
|
|
339
340
|
},
|
|
@@ -344,7 +345,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
344
345
|
sideEffects: { create: [sideEffects.updateEnduserStatus], createMany: [sideEffects.updateEnduserStatus] },
|
|
345
346
|
},
|
|
346
347
|
fields: __assign(__assign({}, BuiltInFields), { journeyId: {
|
|
347
|
-
validator: validation_1.
|
|
348
|
+
validator: validation_1.mongoIdStringRequired,
|
|
348
349
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
349
350
|
required: true,
|
|
350
351
|
dependencies: [{
|
|
@@ -354,7 +355,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
354
355
|
onDependencyDelete: 'delete',
|
|
355
356
|
}]
|
|
356
357
|
}, enduserId: {
|
|
357
|
-
validator: validation_1.
|
|
358
|
+
validator: validation_1.mongoIdStringRequired,
|
|
358
359
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
359
360
|
required: true,
|
|
360
361
|
dependencies: [{
|
|
@@ -388,7 +389,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
388
389
|
parameters: {},
|
|
389
390
|
returns: {
|
|
390
391
|
id: {
|
|
391
|
-
validator: validation_1.
|
|
392
|
+
validator: validation_1.mongoIdStringRequired,
|
|
392
393
|
},
|
|
393
394
|
key: {
|
|
394
395
|
validator: validation_1.stringValidator,
|
|
@@ -453,7 +454,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
453
454
|
engagement_events: {
|
|
454
455
|
info: {},
|
|
455
456
|
fields: __assign(__assign({}, BuiltInFields), { enduserId: {
|
|
456
|
-
validator: validation_1.
|
|
457
|
+
validator: validation_1.mongoIdStringRequired,
|
|
457
458
|
required: true,
|
|
458
459
|
updatesDisabled: true,
|
|
459
460
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
@@ -519,27 +520,27 @@ exports.schema = (0, exports.build_schema)({
|
|
|
519
520
|
],
|
|
520
521
|
} }),
|
|
521
522
|
customActions: {
|
|
522
|
-
update_state: {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
},
|
|
523
|
+
// update_state: {
|
|
524
|
+
// op: 'custom', access: 'update', method: "patch",
|
|
525
|
+
// name: 'Update State',
|
|
526
|
+
// path: '/journey/:id/state/:name',
|
|
527
|
+
// description: "Updates a state in a journey. Endusers and automations are updated automatically.",
|
|
528
|
+
// parameters: {
|
|
529
|
+
// id: { validator: mongoIdStringValidator },
|
|
530
|
+
// name: { validator: stringValidator100 },
|
|
531
|
+
// updates: { validator: journeyStateUpdateValidator, required: true },
|
|
532
|
+
// },
|
|
533
|
+
// returns: {
|
|
534
|
+
// updated: { validator: 'journey' as any }
|
|
535
|
+
// },
|
|
536
|
+
// },
|
|
536
537
|
delete_states: {
|
|
537
538
|
op: 'custom', access: 'update', method: "delete",
|
|
538
539
|
name: 'Delete States',
|
|
539
540
|
path: '/journey/:id/states',
|
|
540
541
|
description: "Deletes states in a journey. Endusers and automations are updated automatically.",
|
|
541
542
|
parameters: {
|
|
542
|
-
id: { validator: validation_1.
|
|
543
|
+
id: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
543
544
|
states: { validator: validation_1.listOfStringsValidator, required: true },
|
|
544
545
|
},
|
|
545
546
|
returns: { updated: 'journey' },
|
|
@@ -560,7 +561,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
560
561
|
}, dueDate: {
|
|
561
562
|
validator: validation_1.dateValidator,
|
|
562
563
|
}, assignedTo: {
|
|
563
|
-
validator: validation_1.
|
|
564
|
+
validator: validation_1.mongoIdStringRequired,
|
|
564
565
|
dependencies: [{
|
|
565
566
|
dependsOn: ['users'],
|
|
566
567
|
dependencyField: '_id',
|
|
@@ -568,7 +569,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
568
569
|
onDependencyDelete: 'unset',
|
|
569
570
|
}]
|
|
570
571
|
}, enduserId: {
|
|
571
|
-
validator: validation_1.
|
|
572
|
+
validator: validation_1.mongoIdStringRequired,
|
|
572
573
|
dependencies: [{
|
|
573
574
|
dependsOn: ['endusers'],
|
|
574
575
|
dependencyField: '_id',
|
|
@@ -627,7 +628,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
627
628
|
examples: [true],
|
|
628
629
|
initializer: function () { return false; },
|
|
629
630
|
}, enduserId: {
|
|
630
|
-
validator: validation_1.
|
|
631
|
+
validator: validation_1.mongoIdStringRequired,
|
|
631
632
|
required: true,
|
|
632
633
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
633
634
|
dependencies: [{
|
|
@@ -637,7 +638,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
637
638
|
onDependencyDelete: 'delete',
|
|
638
639
|
}]
|
|
639
640
|
}, userId: {
|
|
640
|
-
validator: validation_1.
|
|
641
|
+
validator: validation_1.mongoIdStringRequired,
|
|
641
642
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
642
643
|
updatesDisabled: true,
|
|
643
644
|
initializer: function (a, s) { return s.id; },
|
|
@@ -692,7 +693,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
692
693
|
readonly: true,
|
|
693
694
|
}, readBy: {
|
|
694
695
|
validator: validation_1.idStringToDateValidator,
|
|
695
|
-
}, templateId: { validator: validation_1.
|
|
696
|
+
}, templateId: { validator: validation_1.mongoIdStringRequired }, automationStepId: { validator: validation_1.mongoIdStringRequired } }),
|
|
696
697
|
customActions: {
|
|
697
698
|
sync_integrations: {
|
|
698
699
|
op: "custom", access: 'read', method: "post",
|
|
@@ -754,7 +755,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
754
755
|
readonly: true,
|
|
755
756
|
examples: [{ 0: new Date() }]
|
|
756
757
|
}, enduserId: {
|
|
757
|
-
validator: validation_1.
|
|
758
|
+
validator: validation_1.mongoIdStringRequired,
|
|
758
759
|
required: true,
|
|
759
760
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
760
761
|
updatesDisabled: true,
|
|
@@ -765,7 +766,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
765
766
|
onDependencyDelete: 'delete',
|
|
766
767
|
}]
|
|
767
768
|
}, userId: {
|
|
768
|
-
validator: validation_1.
|
|
769
|
+
validator: validation_1.mongoIdStringRequired,
|
|
769
770
|
initializer: function (a, s) { return s.id; },
|
|
770
771
|
updatesDisabled: true,
|
|
771
772
|
dependencies: [{
|
|
@@ -790,7 +791,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
790
791
|
readonly: true,
|
|
791
792
|
}, readBy: {
|
|
792
793
|
validator: validation_1.idStringToDateValidator,
|
|
793
|
-
}, templateId: { validator: validation_1.
|
|
794
|
+
}, templateId: { validator: validation_1.mongoIdStringRequired }, automationStepId: { validator: validation_1.mongoIdStringRequired } }),
|
|
794
795
|
customActions: {},
|
|
795
796
|
},
|
|
796
797
|
chat_rooms: {
|
|
@@ -832,11 +833,11 @@ exports.schema = (0, exports.build_schema)({
|
|
|
832
833
|
initializer: function () { return ''; },
|
|
833
834
|
readonly: true,
|
|
834
835
|
}, recentSender: {
|
|
835
|
-
validator: validation_1.
|
|
836
|
+
validator: validation_1.mongoIdStringRequired,
|
|
836
837
|
initializer: function () { return ''; },
|
|
837
838
|
readonly: true,
|
|
838
839
|
}, ticketId: {
|
|
839
|
-
validator: validation_1.
|
|
840
|
+
validator: validation_1.mongoIdStringRequired,
|
|
840
841
|
}, endedAt: {
|
|
841
842
|
validator: validation_1.dateValidator,
|
|
842
843
|
}, tags: {
|
|
@@ -852,7 +853,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
852
853
|
name: 'Join chat room',
|
|
853
854
|
path: '/join-chat-room',
|
|
854
855
|
description: "Allows a user to join a chat room with no other users, for use in accepting support chats.",
|
|
855
|
-
parameters: { id: { validator: validation_1.
|
|
856
|
+
parameters: { id: { validator: validation_1.mongoIdStringRequired, required: true } },
|
|
856
857
|
returns: {
|
|
857
858
|
room: { validator: 'Room' },
|
|
858
859
|
} // add room eventually, when validator defined
|
|
@@ -862,7 +863,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
862
863
|
name: 'Mark Read',
|
|
863
864
|
path: '/mark-chat-room-read',
|
|
864
865
|
description: "Marks the conversation read by the authenticated user",
|
|
865
|
-
parameters: { id: { validator: validation_1.
|
|
866
|
+
parameters: { id: { validator: validation_1.mongoIdStringRequired, required: true } },
|
|
866
867
|
returns: {
|
|
867
868
|
updated: { validator: 'Room' },
|
|
868
869
|
} // add room eventually, when validator defined
|
|
@@ -872,10 +873,10 @@ exports.schema = (0, exports.build_schema)({
|
|
|
872
873
|
name: 'Attendee display info',
|
|
873
874
|
path: '/chat-room-display-info',
|
|
874
875
|
description: "Returns an object which maps userIds/enduserIds to display information. Includes the roomId as the 'id' field.",
|
|
875
|
-
parameters: { id: { validator: validation_1.
|
|
876
|
+
parameters: { id: { validator: validation_1.mongoIdStringRequired, required: true } },
|
|
876
877
|
returns: {
|
|
877
878
|
display_info: { validator: validation_1.meetingDisplayInfoValidator, required: true },
|
|
878
|
-
id: { validator: validation_1.
|
|
879
|
+
id: { validator: validation_1.mongoIdStringRequired },
|
|
879
880
|
}
|
|
880
881
|
},
|
|
881
882
|
},
|
|
@@ -900,7 +901,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
900
901
|
enduserActions: { create: {}, read: {}, readMany: {} },
|
|
901
902
|
customActions: {},
|
|
902
903
|
fields: __assign(__assign({}, BuiltInFields), { roomId: {
|
|
903
|
-
validator: validation_1.
|
|
904
|
+
validator: validation_1.mongoIdStringRequired,
|
|
904
905
|
required: true,
|
|
905
906
|
updatesDisabled: true,
|
|
906
907
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
@@ -915,7 +916,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
915
916
|
readonly: true,
|
|
916
917
|
examples: [{ 0: new Date() }]
|
|
917
918
|
}, senderId: {
|
|
918
|
-
validator: validation_1.
|
|
919
|
+
validator: validation_1.mongoIdStringRequired,
|
|
919
920
|
readonly: true,
|
|
920
921
|
initializer: function (a, s) { return s.id; },
|
|
921
922
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
@@ -930,7 +931,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
930
931
|
required: true,
|
|
931
932
|
examples: ["Message"]
|
|
932
933
|
}, html: { validator: validation_1.stringValidator5000 }, replyId: {
|
|
933
|
-
validator: validation_1.
|
|
934
|
+
validator: validation_1.mongoIdStringRequired,
|
|
934
935
|
updatesDisabled: true,
|
|
935
936
|
dependencies: [{
|
|
936
937
|
dependsOn: ['chats'],
|
|
@@ -942,14 +943,17 @@ exports.schema = (0, exports.build_schema)({
|
|
|
942
943
|
validator: validation_1.idStringToDateValidator,
|
|
943
944
|
}, attachments: {
|
|
944
945
|
validator: validation_1.listOfChatAttachmentsValidator,
|
|
945
|
-
}, templateId: { validator: validation_1.
|
|
946
|
+
}, templateId: { validator: validation_1.mongoIdStringRequired }, automationStepId: { validator: validation_1.mongoIdStringRequired } }),
|
|
946
947
|
},
|
|
947
948
|
users: {
|
|
948
|
-
info: {
|
|
949
|
+
info: {
|
|
950
|
+
description: "Used to represent your team member accounts. See Endusers for representing patients and other types of stakeholders.",
|
|
951
|
+
},
|
|
949
952
|
constraints: {
|
|
950
953
|
unique: ['username'],
|
|
951
954
|
globalUnique: ['email', 'phone'],
|
|
952
|
-
relationship: [
|
|
955
|
+
relationship: [
|
|
956
|
+
{
|
|
953
957
|
explanation: "Only admin users can update others' profiles",
|
|
954
958
|
evaluate: function (_a, _, session) {
|
|
955
959
|
var _b;
|
|
@@ -960,7 +964,22 @@ exports.schema = (0, exports.build_schema)({
|
|
|
960
964
|
return;
|
|
961
965
|
return "Only admin users can update others' profiles";
|
|
962
966
|
}
|
|
963
|
-
}
|
|
967
|
+
}, {
|
|
968
|
+
explanation: "Only admin users can update user roles",
|
|
969
|
+
evaluate: function (_a, _, session, method, _b) {
|
|
970
|
+
var _c;
|
|
971
|
+
var roles = _a.roles;
|
|
972
|
+
var updates = _b.updates;
|
|
973
|
+
if ((_c = session === null || session === void 0 ? void 0 : session.roles) === null || _c === void 0 ? void 0 : _c.includes('Admin'))
|
|
974
|
+
return; // admin can do this
|
|
975
|
+
if (method === 'create')
|
|
976
|
+
return; // create already admin restricted
|
|
977
|
+
if (!(updates === null || updates === void 0 ? void 0 : updates.roles))
|
|
978
|
+
return; // roles not provided
|
|
979
|
+
return "Only admin users can update others' profiles";
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
],
|
|
964
983
|
},
|
|
965
984
|
defaultActions: {
|
|
966
985
|
create: { adminOnly: true }, createMany: { adminOnly: true }, delete: { adminOnly: true },
|
|
@@ -974,7 +993,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
974
993
|
path: '/generate-auth-token',
|
|
975
994
|
description: "Generates an authToken for a user or enduser. Useful for integrating a 3rd-party authentication process.",
|
|
976
995
|
parameters: {
|
|
977
|
-
id: { validator: validation_1.
|
|
996
|
+
id: { validator: validation_1.mongoIdStringRequired },
|
|
978
997
|
externalId: { validator: validation_1.stringValidator250 },
|
|
979
998
|
email: { validator: validation_1.emailValidator },
|
|
980
999
|
phone: { validator: validation_1.phoneValidator },
|
|
@@ -1053,7 +1072,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1053
1072
|
}, lname: {
|
|
1054
1073
|
validator: validation_1.nameValidator,
|
|
1055
1074
|
}, suffixes: { validator: validation_1.listOfStringsValidatorEmptyOk }, organization: {
|
|
1056
|
-
validator: validation_1.
|
|
1075
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1057
1076
|
updatesDisabled: true,
|
|
1058
1077
|
}, orgEmail: {
|
|
1059
1078
|
validator: validation_1.emailValidator,
|
|
@@ -1062,10 +1081,9 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1062
1081
|
validator: validation_1.accountTypeValidator,
|
|
1063
1082
|
}, roles: {
|
|
1064
1083
|
validator: validation_1.listOfStringsValidator,
|
|
1065
|
-
updatesDisabled: true,
|
|
1066
1084
|
redactions: ['enduser'],
|
|
1067
1085
|
}, acknowledgedIntegrations: { validator: validation_1.dateValidator }, skills: {
|
|
1068
|
-
validator: validation_1.
|
|
1086
|
+
validator: validation_1.listOfStringsValidatorEmptyOk,
|
|
1069
1087
|
}, verifiedEmail: {
|
|
1070
1088
|
updatesDisabled: true,
|
|
1071
1089
|
validator: validation_1.booleanValidator,
|
|
@@ -1086,7 +1104,9 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1086
1104
|
onDependencyDelete: 'unset',
|
|
1087
1105
|
},
|
|
1088
1106
|
]
|
|
1089
|
-
}
|
|
1107
|
+
}, credentialedStates: {
|
|
1108
|
+
validator: validation_1.stateCredentialsValidator,
|
|
1109
|
+
}, timezone: { validator: validation_1.timezoneValidator }, weeklyAvailabilities: { validator: validation_1.weeklyAvailabilitiesValidator } })
|
|
1090
1110
|
},
|
|
1091
1111
|
templates: {
|
|
1092
1112
|
info: {},
|
|
@@ -1135,7 +1155,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1135
1155
|
validator: validation_1.fileTypeValidator,
|
|
1136
1156
|
required: true
|
|
1137
1157
|
}, enduserId: {
|
|
1138
|
-
validator: validation_1.
|
|
1158
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1139
1159
|
}, secureName: {
|
|
1140
1160
|
validator: validation_1.stringValidator250,
|
|
1141
1161
|
readonly: true,
|
|
@@ -1163,7 +1183,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1163
1183
|
publicRead: { validator: validation_1.booleanValidator },
|
|
1164
1184
|
publicName: { validator: validation_1.stringValidator5000 },
|
|
1165
1185
|
enduserId: {
|
|
1166
|
-
validator: validation_1.
|
|
1186
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1167
1187
|
dependencies: [{
|
|
1168
1188
|
dependsOn: ['endusers'],
|
|
1169
1189
|
dependencyField: '_id',
|
|
@@ -1225,7 +1245,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1225
1245
|
required: true,
|
|
1226
1246
|
examples: ["Ticket Name"],
|
|
1227
1247
|
}, enduserId: {
|
|
1228
|
-
validator: validation_1.
|
|
1248
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1229
1249
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1230
1250
|
dependencies: [{
|
|
1231
1251
|
dependsOn: ['endusers'],
|
|
@@ -1234,19 +1254,19 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1234
1254
|
onDependencyDelete: 'setNull',
|
|
1235
1255
|
}]
|
|
1236
1256
|
}, automationStepId: {
|
|
1237
|
-
validator: validation_1.
|
|
1257
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1238
1258
|
}, closedForReason: {
|
|
1239
1259
|
validator: validation_1.stringValidator,
|
|
1240
1260
|
}, closeReasons: {
|
|
1241
1261
|
validator: validation_1.listOfStringsValidatorEmptyOk,
|
|
1242
1262
|
}, chatRoomId: {
|
|
1243
|
-
validator: validation_1.
|
|
1263
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1244
1264
|
}, dueDateInMS: {
|
|
1245
1265
|
validator: validation_1.nonNegNumberValidator,
|
|
1246
1266
|
}, closedAt: {
|
|
1247
1267
|
validator: validation_1.dateValidator,
|
|
1248
1268
|
}, owner: {
|
|
1249
|
-
validator: validation_1.
|
|
1269
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1250
1270
|
}, message: {
|
|
1251
1271
|
validator: validation_1.stringValidator5000,
|
|
1252
1272
|
examples: ["Message"],
|
|
@@ -1274,7 +1294,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1274
1294
|
op: "read", access: 'read', method: "get",
|
|
1275
1295
|
description: "Get a meeting",
|
|
1276
1296
|
parameters: {
|
|
1277
|
-
id: { validator: validation_1.
|
|
1297
|
+
id: { validator: validation_1.mongoIdStringRequired },
|
|
1278
1298
|
},
|
|
1279
1299
|
returns: 'meeting',
|
|
1280
1300
|
},
|
|
@@ -1288,7 +1308,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1288
1308
|
publicRead: { validator: validation_1.booleanValidator },
|
|
1289
1309
|
},
|
|
1290
1310
|
returns: {
|
|
1291
|
-
id: { validator: validation_1.
|
|
1311
|
+
id: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1292
1312
|
meeting: { validator: validation_1.meetingInfoValidator, required: true },
|
|
1293
1313
|
host: { validator: validation_1.attendeeValidator, required: true },
|
|
1294
1314
|
},
|
|
@@ -1299,8 +1319,8 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1299
1319
|
path: '/send-meeting-invite',
|
|
1300
1320
|
description: "Sends a meeting invite via email to the given enduser",
|
|
1301
1321
|
parameters: {
|
|
1302
|
-
meetingId: { validator: validation_1.
|
|
1303
|
-
enduserId: { validator: validation_1.
|
|
1322
|
+
meetingId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1323
|
+
enduserId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1304
1324
|
},
|
|
1305
1325
|
returns: {},
|
|
1306
1326
|
},
|
|
@@ -1309,7 +1329,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1309
1329
|
name: "End Meeting",
|
|
1310
1330
|
path: '/end-meeting',
|
|
1311
1331
|
description: "Ends a video meeting",
|
|
1312
|
-
parameters: { id: { validator: validation_1.
|
|
1332
|
+
parameters: { id: { validator: validation_1.mongoIdStringRequired, required: true } },
|
|
1313
1333
|
returns: {},
|
|
1314
1334
|
},
|
|
1315
1335
|
add_attendees_to_meeting: {
|
|
@@ -1318,7 +1338,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1318
1338
|
path: '/add-attendees-to-meeting',
|
|
1319
1339
|
description: "Adds other attendees to a meeting",
|
|
1320
1340
|
parameters: {
|
|
1321
|
-
id: { validator: validation_1.
|
|
1341
|
+
id: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1322
1342
|
attendees: { validator: validation_1.listOfUserIndentitiesValidator, required: true },
|
|
1323
1343
|
},
|
|
1324
1344
|
returns: {},
|
|
@@ -1329,7 +1349,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1329
1349
|
path: '/attendee-info',
|
|
1330
1350
|
description: "Gets meeting info for the current user, and details about other attendees",
|
|
1331
1351
|
parameters: {
|
|
1332
|
-
id: { validator: validation_1.
|
|
1352
|
+
id: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1333
1353
|
},
|
|
1334
1354
|
returns: {
|
|
1335
1355
|
attendee: { validator: validation_1.attendeeValidator, required: true },
|
|
@@ -1350,10 +1370,10 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1350
1370
|
path: '/start-meeting-for-event',
|
|
1351
1371
|
description: "Generates an video meeting room",
|
|
1352
1372
|
parameters: {
|
|
1353
|
-
calendarEventId: { validator: validation_1.
|
|
1373
|
+
calendarEventId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1354
1374
|
},
|
|
1355
1375
|
returns: {
|
|
1356
|
-
id: { validator: validation_1.
|
|
1376
|
+
id: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1357
1377
|
meeting: { validator: validation_1.meetingInfoValidator, required: true },
|
|
1358
1378
|
host: { validator: validation_1.attendeeValidator, required: true },
|
|
1359
1379
|
},
|
|
@@ -1364,10 +1384,10 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1364
1384
|
path: '/join-meeting-for-event',
|
|
1365
1385
|
description: "Generates an video meeting room",
|
|
1366
1386
|
parameters: {
|
|
1367
|
-
calendarEventId: { validator: validation_1.
|
|
1387
|
+
calendarEventId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1368
1388
|
},
|
|
1369
1389
|
returns: {
|
|
1370
|
-
id: { validator: validation_1.
|
|
1390
|
+
id: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1371
1391
|
meeting: { validator: validation_1.meetingInfoValidator, required: true },
|
|
1372
1392
|
attendee: { validator: validation_1.attendeeValidator, required: true },
|
|
1373
1393
|
},
|
|
@@ -1397,7 +1417,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1397
1417
|
customActions: {},
|
|
1398
1418
|
enduserActions: {},
|
|
1399
1419
|
fields: __assign(__assign({}, BuiltInFields), { enduserId: {
|
|
1400
|
-
validator: validation_1.
|
|
1420
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1401
1421
|
required: true,
|
|
1402
1422
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1403
1423
|
dependencies: [{
|
|
@@ -1407,7 +1427,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1407
1427
|
onDependencyDelete: 'delete',
|
|
1408
1428
|
}]
|
|
1409
1429
|
}, ticketId: {
|
|
1410
|
-
validator: validation_1.
|
|
1430
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1411
1431
|
}, text: {
|
|
1412
1432
|
validator: validation_1.stringValidator5000,
|
|
1413
1433
|
examples: ["Text"],
|
|
@@ -1453,7 +1473,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1453
1473
|
customActions: {},
|
|
1454
1474
|
enduserActions: { read: {}, readMany: {} },
|
|
1455
1475
|
fields: __assign(__assign({}, BuiltInFields), { formId: {
|
|
1456
|
-
validator: validation_1.
|
|
1476
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1457
1477
|
required: true,
|
|
1458
1478
|
dependencies: [
|
|
1459
1479
|
{
|
|
@@ -1483,7 +1503,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1483
1503
|
relationship: [],
|
|
1484
1504
|
},
|
|
1485
1505
|
fields: __assign(__assign({}, BuiltInFields), { formId: {
|
|
1486
|
-
validator: validation_1.
|
|
1506
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1487
1507
|
required: true,
|
|
1488
1508
|
dependencies: [
|
|
1489
1509
|
{
|
|
@@ -1495,7 +1515,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1495
1515
|
],
|
|
1496
1516
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1497
1517
|
}, enduserId: {
|
|
1498
|
-
validator: validation_1.
|
|
1518
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1499
1519
|
dependencies: [{
|
|
1500
1520
|
dependsOn: ['endusers'],
|
|
1501
1521
|
dependencyField: '_id',
|
|
@@ -1518,9 +1538,9 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1518
1538
|
name: 'Prepare Form Response',
|
|
1519
1539
|
description: "Generates an access code that allows an enduser to submit a form response.",
|
|
1520
1540
|
parameters: {
|
|
1521
|
-
formId: { validator: validation_1.
|
|
1522
|
-
enduserId: { validator: validation_1.
|
|
1523
|
-
automationStepId: { validator: validation_1.
|
|
1541
|
+
formId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1542
|
+
enduserId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1543
|
+
automationStepId: { validator: validation_1.mongoIdStringRequired },
|
|
1524
1544
|
expireAt: { validator: validation_1.dateValidator },
|
|
1525
1545
|
},
|
|
1526
1546
|
returns: {
|
|
@@ -1537,7 +1557,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1537
1557
|
parameters: {
|
|
1538
1558
|
accessCode: { validator: validation_1.stringValidator250, required: true },
|
|
1539
1559
|
responses: { validator: validation_1.formResponsesValidator, required: true },
|
|
1540
|
-
automationStepId: { validator: validation_1.
|
|
1560
|
+
automationStepId: { validator: validation_1.mongoIdStringRequired },
|
|
1541
1561
|
},
|
|
1542
1562
|
returns: {
|
|
1543
1563
|
formResponse: 'form response',
|
|
@@ -1566,8 +1586,8 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1566
1586
|
description: "Generates a session for filling out a public form.",
|
|
1567
1587
|
parameters: {
|
|
1568
1588
|
email: { validator: validation_1.emailValidator, required: true },
|
|
1569
|
-
formId: { validator: validation_1.
|
|
1570
|
-
businessId: { validator: validation_1.
|
|
1589
|
+
formId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1590
|
+
businessId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1571
1591
|
phone: { validator: validation_1.phoneValidator },
|
|
1572
1592
|
fname: { validator: validation_1.nameValidator },
|
|
1573
1593
|
lname: { validator: validation_1.nameValidator },
|
|
@@ -1642,7 +1662,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1642
1662
|
path: '/send-calendar-event-reminder-webhook',
|
|
1643
1663
|
description: "Sends a webhook with the calendar reminder format, useful for testing integrations",
|
|
1644
1664
|
parameters: {
|
|
1645
|
-
id: { validator: validation_1.
|
|
1665
|
+
id: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1646
1666
|
},
|
|
1647
1667
|
returns: {},
|
|
1648
1668
|
},
|
|
@@ -1669,22 +1689,53 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1669
1689
|
},
|
|
1670
1690
|
defaultActions: constants_1.DEFAULT_OPERATIONS,
|
|
1671
1691
|
customActions: {
|
|
1672
|
-
|
|
1692
|
+
get_events_for_user: {
|
|
1673
1693
|
op: "custom", access: 'read', method: "get",
|
|
1674
|
-
name: 'Get
|
|
1675
|
-
path: '/
|
|
1676
|
-
description: "
|
|
1694
|
+
name: 'Get Events for User (Including Integrations)',
|
|
1695
|
+
path: '/events-for-user',
|
|
1696
|
+
description: "Combines internal and external events, formatted as a Tellescope events",
|
|
1677
1697
|
parameters: {
|
|
1678
|
-
userId: { validator: validation_1.
|
|
1698
|
+
userId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1679
1699
|
from: { validator: validation_1.dateValidator, required: true },
|
|
1700
|
+
to: { validator: validation_1.dateValidator },
|
|
1680
1701
|
limit: { validator: validation_1.nonNegNumberValidator },
|
|
1681
1702
|
},
|
|
1682
1703
|
returns: {
|
|
1683
1704
|
events: { validator: 'calendar_events' }
|
|
1684
1705
|
},
|
|
1685
1706
|
},
|
|
1707
|
+
get_appointment_availability: {
|
|
1708
|
+
op: "custom", access: 'read', method: "get",
|
|
1709
|
+
name: 'Get Appointment Availability for a Calendar Event Type',
|
|
1710
|
+
path: '/calendar-availability',
|
|
1711
|
+
description: "Gets availability blocks for different users based on their internal and external calendars",
|
|
1712
|
+
parameters: {
|
|
1713
|
+
calendarEventTemplateId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1714
|
+
from: { validator: validation_1.dateValidator, required: true },
|
|
1715
|
+
restrictedByState: { validator: validation_1.booleanValidator },
|
|
1716
|
+
to: { validator: validation_1.dateValidator },
|
|
1717
|
+
limit: { validator: validation_1.nonNegNumberValidator },
|
|
1718
|
+
},
|
|
1719
|
+
returns: {
|
|
1720
|
+
availabilityBlocks: { validator: validation_1.availabilityBlocksValidator, required: true }
|
|
1721
|
+
},
|
|
1722
|
+
},
|
|
1723
|
+
book_appointment: {
|
|
1724
|
+
op: "custom", access: 'create', method: "post",
|
|
1725
|
+
name: 'Book Appointment',
|
|
1726
|
+
path: '/book-appointment',
|
|
1727
|
+
description: "Books an appointment with a given user if available",
|
|
1728
|
+
parameters: {
|
|
1729
|
+
calendarEventTemplateId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1730
|
+
userId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1731
|
+
startTime: { validator: validation_1.dateValidator, required: true },
|
|
1732
|
+
},
|
|
1733
|
+
returns: {
|
|
1734
|
+
createdEvent: { validator: 'calenar_event' },
|
|
1735
|
+
},
|
|
1736
|
+
},
|
|
1686
1737
|
},
|
|
1687
|
-
enduserActions: { read: {}, readMany: {} },
|
|
1738
|
+
enduserActions: { read: {}, readMany: {}, get_appointment_availability: {}, book_appointment: {} },
|
|
1688
1739
|
fields: __assign(__assign({}, BuiltInFields), { title: {
|
|
1689
1740
|
validator: validation_1.stringValidator250,
|
|
1690
1741
|
required: true,
|
|
@@ -1697,8 +1748,8 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1697
1748
|
validator: validation_1.nonNegNumberValidator,
|
|
1698
1749
|
examples: [100],
|
|
1699
1750
|
required: true,
|
|
1700
|
-
}, type: { validator: validation_1.stringValidator100 }, description: { validator: validation_1.stringValidator5000 }, meetingId: { validator: validation_1.
|
|
1701
|
-
validator: validation_1.
|
|
1751
|
+
}, type: { validator: validation_1.stringValidator100 }, description: { validator: validation_1.stringValidator5000 }, meetingId: { validator: validation_1.mongoIdStringRequired, readonly: true }, meetingStatus: { validator: validation_1.meetingStatusValidator }, chatRoomId: {
|
|
1752
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1702
1753
|
dependencies: [{
|
|
1703
1754
|
dependsOn: ['chat_rooms'],
|
|
1704
1755
|
dependencyField: '_id',
|
|
@@ -1706,7 +1757,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1706
1757
|
onDependencyDelete: 'setNull',
|
|
1707
1758
|
}]
|
|
1708
1759
|
}, carePlanId: {
|
|
1709
|
-
validator: validation_1.
|
|
1760
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1710
1761
|
dependencies: [{
|
|
1711
1762
|
dependsOn: ['care_plans'],
|
|
1712
1763
|
dependencyField: '_id',
|
|
@@ -1720,14 +1771,14 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1720
1771
|
validator: validation_1.listOfCalendarEventRemindersValidator,
|
|
1721
1772
|
initializer: function () { return []; },
|
|
1722
1773
|
}, templateId: {
|
|
1723
|
-
validator: validation_1.
|
|
1774
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1724
1775
|
dependencies: [{
|
|
1725
1776
|
dependsOn: ['calendar_event_templates'],
|
|
1726
1777
|
dependencyField: '_id',
|
|
1727
1778
|
relationship: 'foreignKey',
|
|
1728
|
-
onDependencyDelete: '
|
|
1779
|
+
onDependencyDelete: 'nop',
|
|
1729
1780
|
}]
|
|
1730
|
-
}, publicRead: { validator: validation_1.booleanValidator }, enableVideoCall: { validator: validation_1.booleanValidator }, fields: { validator: validation_1.fieldsValidator }, numRSVPs: { validator: validation_1.nonNegNumberValidator }, image: { validator: validation_1.stringValidator5000 }, sharedContentIds: { validator: validation_1.listOfMongoIdStringValidatorEmptyOk }, enduserFormResponses: { validator: validation_1.enduserFormResponsesForEventValidator }, enduserTasks: { validator: validation_1.enduserTasksForEventValidator } })
|
|
1781
|
+
}, publicRead: { validator: validation_1.booleanValidator }, enableVideoCall: { validator: validation_1.booleanValidator }, fields: { validator: validation_1.fieldsValidator }, numRSVPs: { validator: validation_1.nonNegNumberValidator }, image: { validator: validation_1.stringValidator5000 }, sharedContentIds: { validator: validation_1.listOfMongoIdStringValidatorEmptyOk }, enduserFormResponses: { validator: validation_1.enduserFormResponsesForEventValidator }, enduserTasks: { validator: validation_1.enduserTasksForEventValidator }, location: { validator: validation_1.stringValidator1000 }, phone: { validator: validation_1.stringValidator100 } })
|
|
1731
1782
|
},
|
|
1732
1783
|
calendar_event_templates: {
|
|
1733
1784
|
info: {},
|
|
@@ -1764,7 +1815,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1764
1815
|
defaultActions: __assign(__assign({}, constants_1.DEFAULT_OPERATIONS), { update: { creatorOnly: true }, delete: { creatorOnly: true } }),
|
|
1765
1816
|
enduserActions: { create: {}, read: {}, readMany: {}, update: {}, delete: {} },
|
|
1766
1817
|
fields: __assign(__assign({}, BuiltInFields), { eventId: {
|
|
1767
|
-
validator: validation_1.
|
|
1818
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1768
1819
|
required: true,
|
|
1769
1820
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1770
1821
|
dependencies: [{
|
|
@@ -1801,7 +1852,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1801
1852
|
customActions: {},
|
|
1802
1853
|
enduserActions: {},
|
|
1803
1854
|
fields: __assign(__assign({}, BuiltInFields), { journeyId: {
|
|
1804
|
-
validator: validation_1.
|
|
1855
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1805
1856
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1806
1857
|
required: true,
|
|
1807
1858
|
dependencies: [{
|
|
@@ -1847,7 +1898,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1847
1898
|
fields: __assign(__assign({}, BuiltInFields), { cancelConditions: {
|
|
1848
1899
|
validator: validation_1.cancelConditionsValidator,
|
|
1849
1900
|
}, automationStepId: {
|
|
1850
|
-
validator: validation_1.
|
|
1901
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1851
1902
|
required: true,
|
|
1852
1903
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1853
1904
|
dependencies: [{
|
|
@@ -1857,7 +1908,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1857
1908
|
onDependencyDelete: 'nop', // worth keeping as a log of some automated action, even if the automation itself is no longer active
|
|
1858
1909
|
}]
|
|
1859
1910
|
}, enduserId: {
|
|
1860
|
-
validator: validation_1.
|
|
1911
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1861
1912
|
required: true,
|
|
1862
1913
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1863
1914
|
dependencies: [{
|
|
@@ -1867,7 +1918,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1867
1918
|
onDependencyDelete: 'delete',
|
|
1868
1919
|
}]
|
|
1869
1920
|
}, journeyId: {
|
|
1870
|
-
validator: validation_1.
|
|
1921
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1871
1922
|
required: true,
|
|
1872
1923
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1873
1924
|
dependencies: [{
|
|
@@ -1914,7 +1965,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1914
1965
|
customActions: {},
|
|
1915
1966
|
enduserActions: {},
|
|
1916
1967
|
fields: __assign(__assign({}, BuiltInFields), { userId: {
|
|
1917
|
-
validator: validation_1.
|
|
1968
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1918
1969
|
required: true,
|
|
1919
1970
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1920
1971
|
// dependencies: [{
|
|
@@ -1928,7 +1979,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1928
1979
|
required: true,
|
|
1929
1980
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1930
1981
|
}, resourceId: {
|
|
1931
|
-
validator: validation_1.
|
|
1982
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1932
1983
|
required: true,
|
|
1933
1984
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1934
1985
|
}, action: {
|
|
@@ -1954,7 +2005,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1954
2005
|
path: '/send-user-email-notification',
|
|
1955
2006
|
description: "Sends an email notification to a team member (user)",
|
|
1956
2007
|
parameters: {
|
|
1957
|
-
userId: { validator: validation_1.
|
|
2008
|
+
userId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
1958
2009
|
message: { validator: validation_1.stringValidator5000, required: true },
|
|
1959
2010
|
subject: { validator: validation_1.stringValidator250 },
|
|
1960
2011
|
},
|
|
@@ -1963,7 +2014,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
1963
2014
|
},
|
|
1964
2015
|
enduserActions: {},
|
|
1965
2016
|
fields: __assign(__assign({}, BuiltInFields), { userId: {
|
|
1966
|
-
validator: validation_1.
|
|
2017
|
+
validator: validation_1.mongoIdStringRequired,
|
|
1967
2018
|
required: true,
|
|
1968
2019
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
1969
2020
|
dependencies: [{
|
|
@@ -2000,7 +2051,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2000
2051
|
}],
|
|
2001
2052
|
}, enduserId: {
|
|
2002
2053
|
required: true,
|
|
2003
|
-
validator: validation_1.
|
|
2054
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2004
2055
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2005
2056
|
dependencies: [{
|
|
2006
2057
|
dependsOn: ['endusers'],
|
|
@@ -2074,7 +2125,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2074
2125
|
customActions: {},
|
|
2075
2126
|
enduserActions: { create: {}, read: {}, readMany: {}, update: { creatorOnly: true }, delete: { creatorOnly: true } },
|
|
2076
2127
|
fields: __assign(__assign({}, BuiltInFields), { forumId: {
|
|
2077
|
-
validator: validation_1.
|
|
2128
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2078
2129
|
required: true,
|
|
2079
2130
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2080
2131
|
dependencies: [{
|
|
@@ -2126,7 +2177,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2126
2177
|
customActions: {},
|
|
2127
2178
|
enduserActions: { create: {}, read: {}, readMany: {}, delete: { creatorOnly: true } },
|
|
2128
2179
|
fields: __assign(__assign({}, BuiltInFields), { forumId: {
|
|
2129
|
-
validator: validation_1.
|
|
2180
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2130
2181
|
required: true,
|
|
2131
2182
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2132
2183
|
dependencies: [{
|
|
@@ -2136,7 +2187,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2136
2187
|
onDependencyDelete: 'delete',
|
|
2137
2188
|
}]
|
|
2138
2189
|
}, postId: {
|
|
2139
|
-
validator: validation_1.
|
|
2190
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2140
2191
|
required: true,
|
|
2141
2192
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2142
2193
|
dependencies: [{
|
|
@@ -2146,7 +2197,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2146
2197
|
onDependencyDelete: 'delete',
|
|
2147
2198
|
}]
|
|
2148
2199
|
}, threadId: {
|
|
2149
|
-
validator: validation_1.
|
|
2200
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2150
2201
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2151
2202
|
initializer: function (s) { var _a; return (_a = s.replyTo) !== null && _a !== void 0 ? _a : ''; },
|
|
2152
2203
|
dependencies: [{
|
|
@@ -2156,7 +2207,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2156
2207
|
onDependencyDelete: 'nop',
|
|
2157
2208
|
}]
|
|
2158
2209
|
}, replyTo: {
|
|
2159
|
-
validator: validation_1.
|
|
2210
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2160
2211
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2161
2212
|
dependencies: [{
|
|
2162
2213
|
dependsOn: ['post_comments'],
|
|
@@ -2195,8 +2246,8 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2195
2246
|
path: '/post-like',
|
|
2196
2247
|
description: "Likes a post",
|
|
2197
2248
|
parameters: {
|
|
2198
|
-
postId: { validator: validation_1.
|
|
2199
|
-
forumId: { validator: validation_1.
|
|
2249
|
+
postId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
2250
|
+
forumId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
2200
2251
|
},
|
|
2201
2252
|
returns: {} //authToken: { validator: stringValidator5000 } },
|
|
2202
2253
|
},
|
|
@@ -2206,8 +2257,8 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2206
2257
|
path: '/unlike-forum-post',
|
|
2207
2258
|
description: "Removes a like for a given forum post",
|
|
2208
2259
|
parameters: {
|
|
2209
|
-
postId: { validator: validation_1.
|
|
2210
|
-
forumId: { validator: validation_1.
|
|
2260
|
+
postId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
2261
|
+
forumId: { validator: validation_1.mongoIdStringRequired, required: true },
|
|
2211
2262
|
},
|
|
2212
2263
|
returns: {} //authToken: { validator: stringValidator5000 } },
|
|
2213
2264
|
},
|
|
@@ -2230,7 +2281,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2230
2281
|
// ],
|
|
2231
2282
|
// },
|
|
2232
2283
|
forumId: {
|
|
2233
|
-
validator: validation_1.
|
|
2284
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2234
2285
|
required: true,
|
|
2235
2286
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2236
2287
|
dependencies: [{
|
|
@@ -2240,7 +2291,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2240
2291
|
onDependencyDelete: 'delete',
|
|
2241
2292
|
}]
|
|
2242
2293
|
}, postId: {
|
|
2243
|
-
validator: validation_1.
|
|
2294
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2244
2295
|
required: true,
|
|
2245
2296
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2246
2297
|
dependencies: [{
|
|
@@ -2264,7 +2315,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2264
2315
|
defaultActions: { create: {}, read: {}, readMany: {}, delete: { creatorOnly: true } },
|
|
2265
2316
|
enduserActions: { create: {}, read: {}, readMany: {}, delete: {} },
|
|
2266
2317
|
fields: __assign(__assign({}, BuiltInFields), { forumId: {
|
|
2267
|
-
validator: validation_1.
|
|
2318
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2268
2319
|
required: true,
|
|
2269
2320
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2270
2321
|
dependencies: [{
|
|
@@ -2274,7 +2325,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2274
2325
|
onDependencyDelete: 'delete',
|
|
2275
2326
|
}]
|
|
2276
2327
|
}, postId: {
|
|
2277
|
-
validator: validation_1.
|
|
2328
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2278
2329
|
required: true,
|
|
2279
2330
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2280
2331
|
dependencies: [{
|
|
@@ -2284,7 +2335,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2284
2335
|
onDependencyDelete: 'delete',
|
|
2285
2336
|
}]
|
|
2286
2337
|
}, commentId: {
|
|
2287
|
-
validator: validation_1.
|
|
2338
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2288
2339
|
required: true,
|
|
2289
2340
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2290
2341
|
dependencies: [{
|
|
@@ -2311,7 +2362,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2311
2362
|
path: '/organization-theme',
|
|
2312
2363
|
description: "Gets theme information for an organization",
|
|
2313
2364
|
parameters: {
|
|
2314
|
-
businessId: { validator: validation_1.
|
|
2365
|
+
businessId: { validator: validation_1.mongoIdStringRequired },
|
|
2315
2366
|
},
|
|
2316
2367
|
returns: {
|
|
2317
2368
|
theme: { validator: validation_1.organizationThemeValidator, required: true },
|
|
@@ -2326,7 +2377,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2326
2377
|
validator: validation_1.stringValidator100,
|
|
2327
2378
|
required: true,
|
|
2328
2379
|
examples: ["subdomain"],
|
|
2329
|
-
}, subscriptionExpiresAt: { validator: validation_1.dateValidator }, subscriptionPeriod: { validator: validation_1.numberValidator }, logoVersion: { validator: validation_1.numberValidator }, faviconVersion: { validator: validation_1.numberValidator }, roles: { validator: validation_1.
|
|
2380
|
+
}, subscriptionExpiresAt: { validator: validation_1.dateValidator }, subscriptionPeriod: { validator: validation_1.numberValidator }, logoVersion: { validator: validation_1.numberValidator }, faviconVersion: { validator: validation_1.numberValidator }, roles: { validator: validation_1.listOfStringsValidatorEmptyOk }, skills: { validator: validation_1.listOfStringsValidator }, themeColor: { validator: validation_1.stringValidator100 }, customPortalURL: { validator: validation_1.stringValidator250 }, portalSettings: { validator: validation_1.portalSettingsValidator } }),
|
|
2330
2381
|
},
|
|
2331
2382
|
databases: {
|
|
2332
2383
|
info: {},
|
|
@@ -2361,7 +2412,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2361
2412
|
customActions: {},
|
|
2362
2413
|
enduserActions: {},
|
|
2363
2414
|
fields: __assign(__assign({}, BuiltInFields), { databaseId: {
|
|
2364
|
-
validator: validation_1.
|
|
2415
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2365
2416
|
required: true,
|
|
2366
2417
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2367
2418
|
dependencies: [{
|
|
@@ -2407,7 +2458,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2407
2458
|
required: true,
|
|
2408
2459
|
examples: [[]],
|
|
2409
2460
|
validator: validation_1.portalBlocksValidator,
|
|
2410
|
-
}, disabled: { validator: validation_1.booleanValidator } }),
|
|
2461
|
+
}, disabled: { validator: validation_1.booleanValidator }, mobileBottomNavigationPosition: { validator: validation_1.nonNegNumberValidator } }),
|
|
2411
2462
|
},
|
|
2412
2463
|
enduser_tasks: {
|
|
2413
2464
|
info: {},
|
|
@@ -2426,7 +2477,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2426
2477
|
required: true,
|
|
2427
2478
|
examples: ['Example Title']
|
|
2428
2479
|
}, enduserId: {
|
|
2429
|
-
validator: validation_1.
|
|
2480
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2430
2481
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2431
2482
|
required: true,
|
|
2432
2483
|
dependencies: [{
|
|
@@ -2435,11 +2486,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2435
2486
|
relationship: 'foreignKey',
|
|
2436
2487
|
onDependencyDelete: 'delete',
|
|
2437
2488
|
}]
|
|
2438
|
-
}, completedAt: {
|
|
2439
|
-
validator: validation_1.dateValidator,
|
|
2440
|
-
}, description: {
|
|
2441
|
-
validator: validation_1.stringValidator1000,
|
|
2442
|
-
} }),
|
|
2489
|
+
}, completedAt: { validator: validation_1.dateValidator }, description: { validator: validation_1.stringValidator1000 } }),
|
|
2443
2490
|
},
|
|
2444
2491
|
care_plans: {
|
|
2445
2492
|
info: {},
|
|
@@ -2458,7 +2505,7 @@ exports.schema = (0, exports.build_schema)({
|
|
|
2458
2505
|
required: true,
|
|
2459
2506
|
examples: ['Example Title']
|
|
2460
2507
|
}, enduserId: {
|
|
2461
|
-
validator: validation_1.
|
|
2508
|
+
validator: validation_1.mongoIdStringRequired,
|
|
2462
2509
|
examples: [constants_1.PLACEHOLDER_ID],
|
|
2463
2510
|
required: true,
|
|
2464
2511
|
dependencies: [{
|