@sprucelabs/spruce-core-schemas 29.0.0 → 29.0.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/build/.spruce/schemas/core.schemas.types.d.ts +147 -158
- package/build/.spruce/schemas/spruce/v2020_07_22/feedItem.schema.js +2 -2
- package/build/esm/.spruce/schemas/core.schemas.types.d.ts +147 -158
- package/build/esm/.spruce/schemas/spruce/v2020_07_22/feedItem.schema.js +2 -2
- package/build/esm/schemas/v2020_07_22/choice.builder.d.ts +14 -0
- package/build/esm/schemas/v2020_07_22/choice.builder.js +14 -0
- package/build/esm/schemas/v2020_07_22/feed.builder.d.ts +10 -0
- package/build/esm/schemas/v2020_07_22/feed.builder.js +2 -1
- package/build/esm/schemas/v2020_07_22/message.builder.js +2 -13
- package/build/schemas/v2020_07_22/choice.builder.d.ts +14 -0
- package/build/schemas/v2020_07_22/choice.builder.js +16 -0
- package/build/schemas/v2020_07_22/feed.builder.d.ts +10 -0
- package/build/schemas/v2020_07_22/feed.builder.js +2 -1
- package/build/schemas/v2020_07_22/message.builder.js +2 -13
- package/package.json +1 -1
- package/build/.spruce/schemas/spruce/v2020_07_22/choices.schema.d.ts +0 -3
- package/build/.spruce/schemas/spruce/v2020_07_22/choices.schema.js +0 -11
- package/build/esm/.spruce/schemas/spruce/v2020_07_22/choices.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/spruce/v2020_07_22/choices.schema.js +0 -9
|
@@ -114,130 +114,6 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
114
114
|
}
|
|
115
115
|
type SkillEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.SkillSchema>;
|
|
116
116
|
}
|
|
117
|
-
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
118
|
-
interface SendMessage {
|
|
119
|
-
'dateSent'?: number | undefined | null;
|
|
120
|
-
'target': SpruceSchemas.Spruce.v2020_07_22.MessageTarget;
|
|
121
|
-
'errors'?: string[] | undefined | null;
|
|
122
|
-
'classification': ("auth" | "transactional" | "promotional" | "incoming");
|
|
123
|
-
'status'?: ("pending" | "processing" | "sent" | "failed" | "ignored") | undefined | null;
|
|
124
|
-
'body': string;
|
|
125
|
-
'context'?: (Record<string, any>) | undefined | null;
|
|
126
|
-
'topicId'?: string | undefined | null;
|
|
127
|
-
'links'?: SpruceSchemas.Spruce.v2020_07_22.Link[] | undefined | null;
|
|
128
|
-
'choices'?: SpruceSchemas.Spruce.v2020_07_22.Choice[] | undefined | null;
|
|
129
|
-
}
|
|
130
|
-
interface SendMessageSchema extends SpruceSchema.Schema {
|
|
131
|
-
id: 'sendMessage';
|
|
132
|
-
version: 'v2020_07_22';
|
|
133
|
-
namespace: 'Spruce';
|
|
134
|
-
name: '';
|
|
135
|
-
moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas';
|
|
136
|
-
fields: {
|
|
137
|
-
/** . */
|
|
138
|
-
'dateSent': {
|
|
139
|
-
type: 'number';
|
|
140
|
-
options: undefined;
|
|
141
|
-
};
|
|
142
|
-
/** . */
|
|
143
|
-
'target': {
|
|
144
|
-
type: 'schema';
|
|
145
|
-
isRequired: true;
|
|
146
|
-
options: {
|
|
147
|
-
schema: SpruceSchemas.Spruce.v2020_07_22.MessageTargetSchema;
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
/** . */
|
|
151
|
-
'errors': {
|
|
152
|
-
type: 'text';
|
|
153
|
-
isPrivate: true;
|
|
154
|
-
isArray: true;
|
|
155
|
-
options: undefined;
|
|
156
|
-
};
|
|
157
|
-
/** . */
|
|
158
|
-
'classification': {
|
|
159
|
-
type: 'select';
|
|
160
|
-
isRequired: true;
|
|
161
|
-
options: {
|
|
162
|
-
choices: [{
|
|
163
|
-
"value": "auth";
|
|
164
|
-
"label": "Auth";
|
|
165
|
-
}, {
|
|
166
|
-
"value": "transactional";
|
|
167
|
-
"label": "transactional";
|
|
168
|
-
}, {
|
|
169
|
-
"value": "promotional";
|
|
170
|
-
"label": "Promotional";
|
|
171
|
-
}, {
|
|
172
|
-
"value": "incoming";
|
|
173
|
-
"label": "incoming";
|
|
174
|
-
}];
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
/** . */
|
|
178
|
-
'status': {
|
|
179
|
-
type: 'select';
|
|
180
|
-
isPrivate: true;
|
|
181
|
-
defaultValue: "pending";
|
|
182
|
-
options: {
|
|
183
|
-
choices: [{
|
|
184
|
-
"value": "pending";
|
|
185
|
-
"label": "Pending";
|
|
186
|
-
}, {
|
|
187
|
-
"value": "processing";
|
|
188
|
-
"label": "Processing";
|
|
189
|
-
}, {
|
|
190
|
-
"value": "sent";
|
|
191
|
-
"label": "Sent";
|
|
192
|
-
}, {
|
|
193
|
-
"value": "failed";
|
|
194
|
-
"label": "Failed";
|
|
195
|
-
}, {
|
|
196
|
-
"value": "ignored";
|
|
197
|
-
"label": "Ignored";
|
|
198
|
-
}];
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
/** . */
|
|
202
|
-
'body': {
|
|
203
|
-
type: 'text';
|
|
204
|
-
isRequired: true;
|
|
205
|
-
options: undefined;
|
|
206
|
-
};
|
|
207
|
-
/** . */
|
|
208
|
-
'context': {
|
|
209
|
-
type: 'raw';
|
|
210
|
-
isPrivate: true;
|
|
211
|
-
options: {
|
|
212
|
-
valueType: `Record<string, any>`;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
/** . */
|
|
216
|
-
'topicId': {
|
|
217
|
-
type: 'id';
|
|
218
|
-
options: undefined;
|
|
219
|
-
};
|
|
220
|
-
/** . */
|
|
221
|
-
'links': {
|
|
222
|
-
type: 'schema';
|
|
223
|
-
isArray: true;
|
|
224
|
-
minArrayLength: 0;
|
|
225
|
-
options: {
|
|
226
|
-
schema: SpruceSchemas.Spruce.v2020_07_22.LinkSchema;
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
/** . */
|
|
230
|
-
'choices': {
|
|
231
|
-
type: 'schema';
|
|
232
|
-
isArray: true;
|
|
233
|
-
options: {
|
|
234
|
-
schema: SpruceSchemas.Spruce.v2020_07_22.ChoiceSchema;
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
type SendMessageEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.SendMessageSchema>;
|
|
240
|
-
}
|
|
241
117
|
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
242
118
|
/** Every role in Spruce inherits from 5 bases. Anon, Logged in (person not associated with any org), Org Owner, Group Manager, Manager, Teammate, and Guest. */
|
|
243
119
|
interface Role {
|
|
@@ -616,34 +492,6 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
616
492
|
}
|
|
617
493
|
type OrganizationEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.OrganizationSchema>;
|
|
618
494
|
}
|
|
619
|
-
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
620
|
-
interface Choice {
|
|
621
|
-
'value': string;
|
|
622
|
-
'label': string;
|
|
623
|
-
}
|
|
624
|
-
interface ChoiceSchema extends SpruceSchema.Schema {
|
|
625
|
-
id: 'choice';
|
|
626
|
-
version: 'v2020_07_22';
|
|
627
|
-
namespace: 'Spruce';
|
|
628
|
-
name: '';
|
|
629
|
-
moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas';
|
|
630
|
-
fields: {
|
|
631
|
-
/** . */
|
|
632
|
-
'value': {
|
|
633
|
-
type: 'text';
|
|
634
|
-
isRequired: true;
|
|
635
|
-
options: undefined;
|
|
636
|
-
};
|
|
637
|
-
/** . */
|
|
638
|
-
'label': {
|
|
639
|
-
type: 'text';
|
|
640
|
-
isRequired: true;
|
|
641
|
-
options: undefined;
|
|
642
|
-
};
|
|
643
|
-
};
|
|
644
|
-
}
|
|
645
|
-
type ChoiceEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.ChoiceSchema>;
|
|
646
|
-
}
|
|
647
495
|
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
648
496
|
interface MessageSource {
|
|
649
497
|
'locationId'?: string | undefined | null;
|
|
@@ -744,6 +592,130 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
744
592
|
}
|
|
745
593
|
type MessageTargetEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.MessageTargetSchema>;
|
|
746
594
|
}
|
|
595
|
+
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
596
|
+
interface SendMessage {
|
|
597
|
+
'dateSent'?: number | undefined | null;
|
|
598
|
+
'target': SpruceSchemas.Spruce.v2020_07_22.MessageTarget;
|
|
599
|
+
'errors'?: string[] | undefined | null;
|
|
600
|
+
'classification': ("auth" | "transactional" | "promotional" | "incoming");
|
|
601
|
+
'status'?: ("pending" | "processing" | "sent" | "failed" | "ignored") | undefined | null;
|
|
602
|
+
'body': string;
|
|
603
|
+
'context'?: (Record<string, any>) | undefined | null;
|
|
604
|
+
'topicId'?: string | undefined | null;
|
|
605
|
+
'links'?: SpruceSchemas.Spruce.v2020_07_22.Link[] | undefined | null;
|
|
606
|
+
'choices'?: SpruceSchemas.Spruce.v2020_07_22.Choice[] | undefined | null;
|
|
607
|
+
}
|
|
608
|
+
interface SendMessageSchema extends SpruceSchema.Schema {
|
|
609
|
+
id: 'sendMessage';
|
|
610
|
+
version: 'v2020_07_22';
|
|
611
|
+
namespace: 'Spruce';
|
|
612
|
+
name: '';
|
|
613
|
+
moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas';
|
|
614
|
+
fields: {
|
|
615
|
+
/** . */
|
|
616
|
+
'dateSent': {
|
|
617
|
+
type: 'number';
|
|
618
|
+
options: undefined;
|
|
619
|
+
};
|
|
620
|
+
/** . */
|
|
621
|
+
'target': {
|
|
622
|
+
type: 'schema';
|
|
623
|
+
isRequired: true;
|
|
624
|
+
options: {
|
|
625
|
+
schema: SpruceSchemas.Spruce.v2020_07_22.MessageTargetSchema;
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
/** . */
|
|
629
|
+
'errors': {
|
|
630
|
+
type: 'text';
|
|
631
|
+
isPrivate: true;
|
|
632
|
+
isArray: true;
|
|
633
|
+
options: undefined;
|
|
634
|
+
};
|
|
635
|
+
/** . */
|
|
636
|
+
'classification': {
|
|
637
|
+
type: 'select';
|
|
638
|
+
isRequired: true;
|
|
639
|
+
options: {
|
|
640
|
+
choices: [{
|
|
641
|
+
"value": "auth";
|
|
642
|
+
"label": "Auth";
|
|
643
|
+
}, {
|
|
644
|
+
"value": "transactional";
|
|
645
|
+
"label": "transactional";
|
|
646
|
+
}, {
|
|
647
|
+
"value": "promotional";
|
|
648
|
+
"label": "Promotional";
|
|
649
|
+
}, {
|
|
650
|
+
"value": "incoming";
|
|
651
|
+
"label": "incoming";
|
|
652
|
+
}];
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
/** . */
|
|
656
|
+
'status': {
|
|
657
|
+
type: 'select';
|
|
658
|
+
isPrivate: true;
|
|
659
|
+
defaultValue: "pending";
|
|
660
|
+
options: {
|
|
661
|
+
choices: [{
|
|
662
|
+
"value": "pending";
|
|
663
|
+
"label": "Pending";
|
|
664
|
+
}, {
|
|
665
|
+
"value": "processing";
|
|
666
|
+
"label": "Processing";
|
|
667
|
+
}, {
|
|
668
|
+
"value": "sent";
|
|
669
|
+
"label": "Sent";
|
|
670
|
+
}, {
|
|
671
|
+
"value": "failed";
|
|
672
|
+
"label": "Failed";
|
|
673
|
+
}, {
|
|
674
|
+
"value": "ignored";
|
|
675
|
+
"label": "Ignored";
|
|
676
|
+
}];
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
/** . */
|
|
680
|
+
'body': {
|
|
681
|
+
type: 'text';
|
|
682
|
+
isRequired: true;
|
|
683
|
+
options: undefined;
|
|
684
|
+
};
|
|
685
|
+
/** . */
|
|
686
|
+
'context': {
|
|
687
|
+
type: 'raw';
|
|
688
|
+
isPrivate: true;
|
|
689
|
+
options: {
|
|
690
|
+
valueType: `Record<string, any>`;
|
|
691
|
+
};
|
|
692
|
+
};
|
|
693
|
+
/** . */
|
|
694
|
+
'topicId': {
|
|
695
|
+
type: 'id';
|
|
696
|
+
options: undefined;
|
|
697
|
+
};
|
|
698
|
+
/** . */
|
|
699
|
+
'links': {
|
|
700
|
+
type: 'schema';
|
|
701
|
+
isArray: true;
|
|
702
|
+
minArrayLength: 0;
|
|
703
|
+
options: {
|
|
704
|
+
schema: SpruceSchemas.Spruce.v2020_07_22.LinkSchema;
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
/** . */
|
|
708
|
+
'choices': {
|
|
709
|
+
type: 'schema';
|
|
710
|
+
isArray: true;
|
|
711
|
+
options: {
|
|
712
|
+
schema: SpruceSchemas.Spruce.v2020_07_22.ChoiceSchema;
|
|
713
|
+
};
|
|
714
|
+
};
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
type SendMessageEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.SendMessageSchema>;
|
|
718
|
+
}
|
|
747
719
|
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
748
720
|
/** A discrete communication between two humans or a human and a machine. */
|
|
749
721
|
interface Message {
|
|
@@ -1182,15 +1154,32 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
1182
1154
|
type LinkEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.LinkSchema>;
|
|
1183
1155
|
}
|
|
1184
1156
|
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
1185
|
-
interface
|
|
1157
|
+
interface Choice {
|
|
1158
|
+
'value': string;
|
|
1159
|
+
'label': string;
|
|
1186
1160
|
}
|
|
1187
|
-
interface
|
|
1188
|
-
id: '
|
|
1161
|
+
interface ChoiceSchema extends SpruceSchema.Schema {
|
|
1162
|
+
id: 'choice';
|
|
1189
1163
|
version: 'v2020_07_22';
|
|
1190
1164
|
namespace: 'Spruce';
|
|
1191
1165
|
name: '';
|
|
1166
|
+
moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas';
|
|
1167
|
+
fields: {
|
|
1168
|
+
/** . */
|
|
1169
|
+
'value': {
|
|
1170
|
+
type: 'text';
|
|
1171
|
+
isRequired: true;
|
|
1172
|
+
options: undefined;
|
|
1173
|
+
};
|
|
1174
|
+
/** . */
|
|
1175
|
+
'label': {
|
|
1176
|
+
type: 'text';
|
|
1177
|
+
isRequired: true;
|
|
1178
|
+
options: undefined;
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1192
1181
|
}
|
|
1193
|
-
type
|
|
1182
|
+
type ChoiceEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.ChoiceSchema>;
|
|
1194
1183
|
}
|
|
1195
1184
|
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
1196
1185
|
interface FeedItem {
|
|
@@ -1203,7 +1192,7 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
1203
1192
|
'source'?: (Record<string, any>) | undefined | null;
|
|
1204
1193
|
'fromCasualName': string;
|
|
1205
1194
|
'avatar'?: SpruceSchema.ImageFieldValue | undefined | null;
|
|
1206
|
-
'choices'?: SpruceSchemas.Spruce.v2020_07_22.
|
|
1195
|
+
'choices'?: SpruceSchemas.Spruce.v2020_07_22.Choice[] | undefined | null;
|
|
1207
1196
|
'links'?: SpruceSchemas.Spruce.v2020_07_22.Link[] | undefined | null;
|
|
1208
1197
|
}
|
|
1209
1198
|
interface FeedItemSchema extends SpruceSchema.Schema {
|
|
@@ -1271,7 +1260,7 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
1271
1260
|
type: 'schema';
|
|
1272
1261
|
isArray: true;
|
|
1273
1262
|
options: {
|
|
1274
|
-
schema: SpruceSchemas.Spruce.v2020_07_22.
|
|
1263
|
+
schema: SpruceSchemas.Spruce.v2020_07_22.ChoiceSchema;
|
|
1275
1264
|
};
|
|
1276
1265
|
};
|
|
1277
1266
|
/** . */
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const schema_1 = require("@sprucelabs/schema");
|
|
7
|
-
const
|
|
7
|
+
const choice_schema_1 = __importDefault(require("./choice.schema"));
|
|
8
8
|
const link_schema_1 = __importDefault(require("./link.schema"));
|
|
9
9
|
const feedItemSchema = {
|
|
10
10
|
id: 'feedItem',
|
|
@@ -66,7 +66,7 @@ const feedItemSchema = {
|
|
|
66
66
|
'choices': {
|
|
67
67
|
type: 'schema',
|
|
68
68
|
isArray: true,
|
|
69
|
-
options: { schema:
|
|
69
|
+
options: { schema: choice_schema_1.default, }
|
|
70
70
|
},
|
|
71
71
|
/** . */
|
|
72
72
|
'links': {
|
|
@@ -114,130 +114,6 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
114
114
|
}
|
|
115
115
|
type SkillEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.SkillSchema>;
|
|
116
116
|
}
|
|
117
|
-
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
118
|
-
interface SendMessage {
|
|
119
|
-
'dateSent'?: number | undefined | null;
|
|
120
|
-
'target': SpruceSchemas.Spruce.v2020_07_22.MessageTarget;
|
|
121
|
-
'errors'?: string[] | undefined | null;
|
|
122
|
-
'classification': ("auth" | "transactional" | "promotional" | "incoming");
|
|
123
|
-
'status'?: ("pending" | "processing" | "sent" | "failed" | "ignored") | undefined | null;
|
|
124
|
-
'body': string;
|
|
125
|
-
'context'?: (Record<string, any>) | undefined | null;
|
|
126
|
-
'topicId'?: string | undefined | null;
|
|
127
|
-
'links'?: SpruceSchemas.Spruce.v2020_07_22.Link[] | undefined | null;
|
|
128
|
-
'choices'?: SpruceSchemas.Spruce.v2020_07_22.Choice[] | undefined | null;
|
|
129
|
-
}
|
|
130
|
-
interface SendMessageSchema extends SpruceSchema.Schema {
|
|
131
|
-
id: 'sendMessage';
|
|
132
|
-
version: 'v2020_07_22';
|
|
133
|
-
namespace: 'Spruce';
|
|
134
|
-
name: '';
|
|
135
|
-
moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas';
|
|
136
|
-
fields: {
|
|
137
|
-
/** . */
|
|
138
|
-
'dateSent': {
|
|
139
|
-
type: 'number';
|
|
140
|
-
options: undefined;
|
|
141
|
-
};
|
|
142
|
-
/** . */
|
|
143
|
-
'target': {
|
|
144
|
-
type: 'schema';
|
|
145
|
-
isRequired: true;
|
|
146
|
-
options: {
|
|
147
|
-
schema: SpruceSchemas.Spruce.v2020_07_22.MessageTargetSchema;
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
|
-
/** . */
|
|
151
|
-
'errors': {
|
|
152
|
-
type: 'text';
|
|
153
|
-
isPrivate: true;
|
|
154
|
-
isArray: true;
|
|
155
|
-
options: undefined;
|
|
156
|
-
};
|
|
157
|
-
/** . */
|
|
158
|
-
'classification': {
|
|
159
|
-
type: 'select';
|
|
160
|
-
isRequired: true;
|
|
161
|
-
options: {
|
|
162
|
-
choices: [{
|
|
163
|
-
"value": "auth";
|
|
164
|
-
"label": "Auth";
|
|
165
|
-
}, {
|
|
166
|
-
"value": "transactional";
|
|
167
|
-
"label": "transactional";
|
|
168
|
-
}, {
|
|
169
|
-
"value": "promotional";
|
|
170
|
-
"label": "Promotional";
|
|
171
|
-
}, {
|
|
172
|
-
"value": "incoming";
|
|
173
|
-
"label": "incoming";
|
|
174
|
-
}];
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
/** . */
|
|
178
|
-
'status': {
|
|
179
|
-
type: 'select';
|
|
180
|
-
isPrivate: true;
|
|
181
|
-
defaultValue: "pending";
|
|
182
|
-
options: {
|
|
183
|
-
choices: [{
|
|
184
|
-
"value": "pending";
|
|
185
|
-
"label": "Pending";
|
|
186
|
-
}, {
|
|
187
|
-
"value": "processing";
|
|
188
|
-
"label": "Processing";
|
|
189
|
-
}, {
|
|
190
|
-
"value": "sent";
|
|
191
|
-
"label": "Sent";
|
|
192
|
-
}, {
|
|
193
|
-
"value": "failed";
|
|
194
|
-
"label": "Failed";
|
|
195
|
-
}, {
|
|
196
|
-
"value": "ignored";
|
|
197
|
-
"label": "Ignored";
|
|
198
|
-
}];
|
|
199
|
-
};
|
|
200
|
-
};
|
|
201
|
-
/** . */
|
|
202
|
-
'body': {
|
|
203
|
-
type: 'text';
|
|
204
|
-
isRequired: true;
|
|
205
|
-
options: undefined;
|
|
206
|
-
};
|
|
207
|
-
/** . */
|
|
208
|
-
'context': {
|
|
209
|
-
type: 'raw';
|
|
210
|
-
isPrivate: true;
|
|
211
|
-
options: {
|
|
212
|
-
valueType: `Record<string, any>`;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
/** . */
|
|
216
|
-
'topicId': {
|
|
217
|
-
type: 'id';
|
|
218
|
-
options: undefined;
|
|
219
|
-
};
|
|
220
|
-
/** . */
|
|
221
|
-
'links': {
|
|
222
|
-
type: 'schema';
|
|
223
|
-
isArray: true;
|
|
224
|
-
minArrayLength: 0;
|
|
225
|
-
options: {
|
|
226
|
-
schema: SpruceSchemas.Spruce.v2020_07_22.LinkSchema;
|
|
227
|
-
};
|
|
228
|
-
};
|
|
229
|
-
/** . */
|
|
230
|
-
'choices': {
|
|
231
|
-
type: 'schema';
|
|
232
|
-
isArray: true;
|
|
233
|
-
options: {
|
|
234
|
-
schema: SpruceSchemas.Spruce.v2020_07_22.ChoiceSchema;
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
type SendMessageEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.SendMessageSchema>;
|
|
240
|
-
}
|
|
241
117
|
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
242
118
|
/** Every role in Spruce inherits from 5 bases. Anon, Logged in (person not associated with any org), Org Owner, Group Manager, Manager, Teammate, and Guest. */
|
|
243
119
|
interface Role {
|
|
@@ -616,34 +492,6 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
616
492
|
}
|
|
617
493
|
type OrganizationEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.OrganizationSchema>;
|
|
618
494
|
}
|
|
619
|
-
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
620
|
-
interface Choice {
|
|
621
|
-
'value': string;
|
|
622
|
-
'label': string;
|
|
623
|
-
}
|
|
624
|
-
interface ChoiceSchema extends SpruceSchema.Schema {
|
|
625
|
-
id: 'choice';
|
|
626
|
-
version: 'v2020_07_22';
|
|
627
|
-
namespace: 'Spruce';
|
|
628
|
-
name: '';
|
|
629
|
-
moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas';
|
|
630
|
-
fields: {
|
|
631
|
-
/** . */
|
|
632
|
-
'value': {
|
|
633
|
-
type: 'text';
|
|
634
|
-
isRequired: true;
|
|
635
|
-
options: undefined;
|
|
636
|
-
};
|
|
637
|
-
/** . */
|
|
638
|
-
'label': {
|
|
639
|
-
type: 'text';
|
|
640
|
-
isRequired: true;
|
|
641
|
-
options: undefined;
|
|
642
|
-
};
|
|
643
|
-
};
|
|
644
|
-
}
|
|
645
|
-
type ChoiceEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.ChoiceSchema>;
|
|
646
|
-
}
|
|
647
495
|
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
648
496
|
interface MessageSource {
|
|
649
497
|
'locationId'?: string | undefined | null;
|
|
@@ -744,6 +592,130 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
744
592
|
}
|
|
745
593
|
type MessageTargetEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.MessageTargetSchema>;
|
|
746
594
|
}
|
|
595
|
+
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
596
|
+
interface SendMessage {
|
|
597
|
+
'dateSent'?: number | undefined | null;
|
|
598
|
+
'target': SpruceSchemas.Spruce.v2020_07_22.MessageTarget;
|
|
599
|
+
'errors'?: string[] | undefined | null;
|
|
600
|
+
'classification': ("auth" | "transactional" | "promotional" | "incoming");
|
|
601
|
+
'status'?: ("pending" | "processing" | "sent" | "failed" | "ignored") | undefined | null;
|
|
602
|
+
'body': string;
|
|
603
|
+
'context'?: (Record<string, any>) | undefined | null;
|
|
604
|
+
'topicId'?: string | undefined | null;
|
|
605
|
+
'links'?: SpruceSchemas.Spruce.v2020_07_22.Link[] | undefined | null;
|
|
606
|
+
'choices'?: SpruceSchemas.Spruce.v2020_07_22.Choice[] | undefined | null;
|
|
607
|
+
}
|
|
608
|
+
interface SendMessageSchema extends SpruceSchema.Schema {
|
|
609
|
+
id: 'sendMessage';
|
|
610
|
+
version: 'v2020_07_22';
|
|
611
|
+
namespace: 'Spruce';
|
|
612
|
+
name: '';
|
|
613
|
+
moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas';
|
|
614
|
+
fields: {
|
|
615
|
+
/** . */
|
|
616
|
+
'dateSent': {
|
|
617
|
+
type: 'number';
|
|
618
|
+
options: undefined;
|
|
619
|
+
};
|
|
620
|
+
/** . */
|
|
621
|
+
'target': {
|
|
622
|
+
type: 'schema';
|
|
623
|
+
isRequired: true;
|
|
624
|
+
options: {
|
|
625
|
+
schema: SpruceSchemas.Spruce.v2020_07_22.MessageTargetSchema;
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
/** . */
|
|
629
|
+
'errors': {
|
|
630
|
+
type: 'text';
|
|
631
|
+
isPrivate: true;
|
|
632
|
+
isArray: true;
|
|
633
|
+
options: undefined;
|
|
634
|
+
};
|
|
635
|
+
/** . */
|
|
636
|
+
'classification': {
|
|
637
|
+
type: 'select';
|
|
638
|
+
isRequired: true;
|
|
639
|
+
options: {
|
|
640
|
+
choices: [{
|
|
641
|
+
"value": "auth";
|
|
642
|
+
"label": "Auth";
|
|
643
|
+
}, {
|
|
644
|
+
"value": "transactional";
|
|
645
|
+
"label": "transactional";
|
|
646
|
+
}, {
|
|
647
|
+
"value": "promotional";
|
|
648
|
+
"label": "Promotional";
|
|
649
|
+
}, {
|
|
650
|
+
"value": "incoming";
|
|
651
|
+
"label": "incoming";
|
|
652
|
+
}];
|
|
653
|
+
};
|
|
654
|
+
};
|
|
655
|
+
/** . */
|
|
656
|
+
'status': {
|
|
657
|
+
type: 'select';
|
|
658
|
+
isPrivate: true;
|
|
659
|
+
defaultValue: "pending";
|
|
660
|
+
options: {
|
|
661
|
+
choices: [{
|
|
662
|
+
"value": "pending";
|
|
663
|
+
"label": "Pending";
|
|
664
|
+
}, {
|
|
665
|
+
"value": "processing";
|
|
666
|
+
"label": "Processing";
|
|
667
|
+
}, {
|
|
668
|
+
"value": "sent";
|
|
669
|
+
"label": "Sent";
|
|
670
|
+
}, {
|
|
671
|
+
"value": "failed";
|
|
672
|
+
"label": "Failed";
|
|
673
|
+
}, {
|
|
674
|
+
"value": "ignored";
|
|
675
|
+
"label": "Ignored";
|
|
676
|
+
}];
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
/** . */
|
|
680
|
+
'body': {
|
|
681
|
+
type: 'text';
|
|
682
|
+
isRequired: true;
|
|
683
|
+
options: undefined;
|
|
684
|
+
};
|
|
685
|
+
/** . */
|
|
686
|
+
'context': {
|
|
687
|
+
type: 'raw';
|
|
688
|
+
isPrivate: true;
|
|
689
|
+
options: {
|
|
690
|
+
valueType: `Record<string, any>`;
|
|
691
|
+
};
|
|
692
|
+
};
|
|
693
|
+
/** . */
|
|
694
|
+
'topicId': {
|
|
695
|
+
type: 'id';
|
|
696
|
+
options: undefined;
|
|
697
|
+
};
|
|
698
|
+
/** . */
|
|
699
|
+
'links': {
|
|
700
|
+
type: 'schema';
|
|
701
|
+
isArray: true;
|
|
702
|
+
minArrayLength: 0;
|
|
703
|
+
options: {
|
|
704
|
+
schema: SpruceSchemas.Spruce.v2020_07_22.LinkSchema;
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
/** . */
|
|
708
|
+
'choices': {
|
|
709
|
+
type: 'schema';
|
|
710
|
+
isArray: true;
|
|
711
|
+
options: {
|
|
712
|
+
schema: SpruceSchemas.Spruce.v2020_07_22.ChoiceSchema;
|
|
713
|
+
};
|
|
714
|
+
};
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
type SendMessageEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.SendMessageSchema>;
|
|
718
|
+
}
|
|
747
719
|
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
748
720
|
/** A discrete communication between two humans or a human and a machine. */
|
|
749
721
|
interface Message {
|
|
@@ -1182,15 +1154,32 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
1182
1154
|
type LinkEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.LinkSchema>;
|
|
1183
1155
|
}
|
|
1184
1156
|
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
1185
|
-
interface
|
|
1157
|
+
interface Choice {
|
|
1158
|
+
'value': string;
|
|
1159
|
+
'label': string;
|
|
1186
1160
|
}
|
|
1187
|
-
interface
|
|
1188
|
-
id: '
|
|
1161
|
+
interface ChoiceSchema extends SpruceSchema.Schema {
|
|
1162
|
+
id: 'choice';
|
|
1189
1163
|
version: 'v2020_07_22';
|
|
1190
1164
|
namespace: 'Spruce';
|
|
1191
1165
|
name: '';
|
|
1166
|
+
moduleToImportFromWhenRemote: '@sprucelabs/spruce-core-schemas';
|
|
1167
|
+
fields: {
|
|
1168
|
+
/** . */
|
|
1169
|
+
'value': {
|
|
1170
|
+
type: 'text';
|
|
1171
|
+
isRequired: true;
|
|
1172
|
+
options: undefined;
|
|
1173
|
+
};
|
|
1174
|
+
/** . */
|
|
1175
|
+
'label': {
|
|
1176
|
+
type: 'text';
|
|
1177
|
+
isRequired: true;
|
|
1178
|
+
options: undefined;
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1192
1181
|
}
|
|
1193
|
-
type
|
|
1182
|
+
type ChoiceEntity = SchemaEntity<SpruceSchemas.Spruce.v2020_07_22.ChoiceSchema>;
|
|
1194
1183
|
}
|
|
1195
1184
|
export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
1196
1185
|
interface FeedItem {
|
|
@@ -1203,7 +1192,7 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
1203
1192
|
'source'?: (Record<string, any>) | undefined | null;
|
|
1204
1193
|
'fromCasualName': string;
|
|
1205
1194
|
'avatar'?: SpruceSchema.ImageFieldValue | undefined | null;
|
|
1206
|
-
'choices'?: SpruceSchemas.Spruce.v2020_07_22.
|
|
1195
|
+
'choices'?: SpruceSchemas.Spruce.v2020_07_22.Choice[] | undefined | null;
|
|
1207
1196
|
'links'?: SpruceSchemas.Spruce.v2020_07_22.Link[] | undefined | null;
|
|
1208
1197
|
}
|
|
1209
1198
|
interface FeedItemSchema extends SpruceSchema.Schema {
|
|
@@ -1271,7 +1260,7 @@ export declare namespace SpruceSchemas.Spruce.v2020_07_22 {
|
|
|
1271
1260
|
type: 'schema';
|
|
1272
1261
|
isArray: true;
|
|
1273
1262
|
options: {
|
|
1274
|
-
schema: SpruceSchemas.Spruce.v2020_07_22.
|
|
1263
|
+
schema: SpruceSchemas.Spruce.v2020_07_22.ChoiceSchema;
|
|
1275
1264
|
};
|
|
1276
1265
|
};
|
|
1277
1266
|
/** . */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
-
import
|
|
2
|
+
import choiceSchema_v2020_07_22 from './choice.schema.js';
|
|
3
3
|
import linkSchema_v2020_07_22 from './link.schema.js';
|
|
4
4
|
const feedItemSchema = {
|
|
5
5
|
id: 'feedItem',
|
|
@@ -61,7 +61,7 @@ const feedItemSchema = {
|
|
|
61
61
|
'choices': {
|
|
62
62
|
type: 'schema',
|
|
63
63
|
isArray: true,
|
|
64
|
-
options: { schema:
|
|
64
|
+
options: { schema: choiceSchema_v2020_07_22, }
|
|
65
65
|
},
|
|
66
66
|
/** . */
|
|
67
67
|
'links': {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildSchema } from '@sprucelabs/schema';
|
|
2
|
+
import choiceBuilder from './choice.builder.js';
|
|
2
3
|
import linkBuilder from './link.builder.js';
|
|
3
4
|
const feedItemSchema = buildSchema({
|
|
4
5
|
id: 'feedItem',
|
|
@@ -44,7 +45,7 @@ const feedItemSchema = buildSchema({
|
|
|
44
45
|
type: 'schema',
|
|
45
46
|
isArray: true,
|
|
46
47
|
options: {
|
|
47
|
-
schemaId:
|
|
48
|
+
schemaId: choiceBuilder,
|
|
48
49
|
},
|
|
49
50
|
},
|
|
50
51
|
links: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildSchema } from '@sprucelabs/schema';
|
|
2
|
+
import choiceBuilder from './choice.builder.js';
|
|
2
3
|
import linkBuilder from './link.builder.js';
|
|
3
4
|
const eventTargetFields = {
|
|
4
5
|
locationId: {
|
|
@@ -142,19 +143,7 @@ export default buildSchema({
|
|
|
142
143
|
type: 'schema',
|
|
143
144
|
isArray: true,
|
|
144
145
|
options: {
|
|
145
|
-
schema:
|
|
146
|
-
id: 'choice',
|
|
147
|
-
fields: {
|
|
148
|
-
value: {
|
|
149
|
-
type: 'text',
|
|
150
|
-
isRequired: true,
|
|
151
|
-
},
|
|
152
|
-
label: {
|
|
153
|
-
type: 'text',
|
|
154
|
-
isRequired: true,
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
},
|
|
146
|
+
schema: choiceBuilder,
|
|
158
147
|
},
|
|
159
148
|
},
|
|
160
149
|
},
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
4
|
+
exports.default = (0, schema_1.buildSchema)({
|
|
5
|
+
id: 'choice',
|
|
6
|
+
fields: {
|
|
7
|
+
value: {
|
|
8
|
+
type: 'text',
|
|
9
|
+
isRequired: true,
|
|
10
|
+
},
|
|
11
|
+
label: {
|
|
12
|
+
type: 'text',
|
|
13
|
+
isRequired: true,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
});
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const schema_1 = require("@sprucelabs/schema");
|
|
7
|
+
const choice_builder_1 = __importDefault(require("./choice.builder"));
|
|
7
8
|
const link_builder_1 = __importDefault(require("./link.builder"));
|
|
8
9
|
const feedItemSchema = (0, schema_1.buildSchema)({
|
|
9
10
|
id: 'feedItem',
|
|
@@ -49,7 +50,7 @@ const feedItemSchema = (0, schema_1.buildSchema)({
|
|
|
49
50
|
type: 'schema',
|
|
50
51
|
isArray: true,
|
|
51
52
|
options: {
|
|
52
|
-
schemaId:
|
|
53
|
+
schemaId: choice_builder_1.default,
|
|
53
54
|
},
|
|
54
55
|
},
|
|
55
56
|
links: {
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.messageSourceSchema = exports.messageTargetSchema = void 0;
|
|
7
7
|
const schema_1 = require("@sprucelabs/schema");
|
|
8
|
+
const choice_builder_1 = __importDefault(require("./choice.builder"));
|
|
8
9
|
const link_builder_1 = __importDefault(require("./link.builder"));
|
|
9
10
|
const eventTargetFields = {
|
|
10
11
|
locationId: {
|
|
@@ -148,19 +149,7 @@ exports.default = (0, schema_1.buildSchema)({
|
|
|
148
149
|
type: 'schema',
|
|
149
150
|
isArray: true,
|
|
150
151
|
options: {
|
|
151
|
-
schema:
|
|
152
|
-
id: 'choice',
|
|
153
|
-
fields: {
|
|
154
|
-
value: {
|
|
155
|
-
type: 'text',
|
|
156
|
-
isRequired: true,
|
|
157
|
-
},
|
|
158
|
-
label: {
|
|
159
|
-
type: 'text',
|
|
160
|
-
isRequired: true,
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
},
|
|
152
|
+
schema: choice_builder_1.default,
|
|
164
153
|
},
|
|
165
154
|
},
|
|
166
155
|
},
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const schema_1 = require("@sprucelabs/schema");
|
|
4
|
-
const choicesSchema = {
|
|
5
|
-
id: 'choices',
|
|
6
|
-
version: 'v2020_07_22',
|
|
7
|
-
namespace: 'Spruce',
|
|
8
|
-
name: '',
|
|
9
|
-
};
|
|
10
|
-
schema_1.SchemaRegistry.getInstance().trackSchema(choicesSchema);
|
|
11
|
-
exports.default = choicesSchema;
|