@scout9/app 1.0.0-alpha.0.8.7 → 1.0.0-alpha.0.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_rollupPluginBabelHelpers-606d8129.cjs +635 -0
- package/dist/{dev-5557cad7.cjs → dev-c58715b1.cjs} +204 -203
- package/dist/{index-a444f2c0.cjs → index-9c237a7b.cjs} +112 -112
- package/dist/index.cjs +5 -4
- package/dist/{macros-f62cceac.cjs → macros-9ad79144.cjs} +4 -2
- package/dist/{multipart-parser-92961749.cjs → multipart-parser-ec335b80.cjs} +5 -4
- package/dist/schemas.cjs +2 -1
- package/dist/spirits.cjs +1098 -2
- package/dist/testing-tools.cjs +4 -3
- package/package.json +1 -1
- package/src/public.d.ts +5 -0
- package/src/runtime/schemas/entity.js +1 -0
- package/src/testing-tools/spirits.js +63 -44
- package/types/index.d.ts +32 -27
- package/types/index.d.ts.map +1 -1
- package/dist/spirits-011bdf25.cjs +0 -1716
package/dist/testing-tools.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var dev = require("./dev-
|
|
6
|
-
require("./
|
|
5
|
+
var dev = require("./dev-c58715b1.cjs");
|
|
6
|
+
require("./_rollupPluginBabelHelpers-606d8129.cjs");
|
|
7
7
|
require('util');
|
|
8
8
|
require('stream');
|
|
9
9
|
require('path');
|
|
@@ -24,11 +24,12 @@ require('node:url');
|
|
|
24
24
|
require('node:events');
|
|
25
25
|
require('node:stream');
|
|
26
26
|
require('node:string_decoder');
|
|
27
|
-
require("./macros-
|
|
27
|
+
require("./macros-9ad79144.cjs");
|
|
28
28
|
require('node:readline');
|
|
29
29
|
require('node:process');
|
|
30
30
|
require('node:os');
|
|
31
31
|
require('fs/promises');
|
|
32
|
+
require("./spirits.cjs");
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
|
package/package.json
CHANGED
package/src/public.d.ts
CHANGED
|
@@ -516,6 +516,11 @@ export type EntityConfigurationBase = {
|
|
|
516
516
|
*/
|
|
517
517
|
id?: string;
|
|
518
518
|
|
|
519
|
+
/**
|
|
520
|
+
* What type of entity this represents
|
|
521
|
+
*/
|
|
522
|
+
type: 'reference' | 'entity';
|
|
523
|
+
|
|
519
524
|
/**
|
|
520
525
|
* The corpus definitions used to compute embeddings for NLP models.
|
|
521
526
|
*/
|
|
@@ -41,6 +41,7 @@ const _EntityConfigurationSchema = z.object({
|
|
|
41
41
|
definitions: z.array(EntityConfigurationDefinitionSchema).optional(),
|
|
42
42
|
training: z.array(EntityConfigurationTrainingSchema).optional(),
|
|
43
43
|
tests: z.array(EntityConfigurationTestSchema).optional(),
|
|
44
|
+
type: z.enum(['entity', 'reference']).describe('What type of entity this represents')
|
|
44
45
|
}, {description: 'full entity NLP configuration file used for training/tuning its corresponding NLP model(s)'}).strict();
|
|
45
46
|
|
|
46
47
|
export const EntityConfigurationSchema = _EntityConfigurationSchema.superRefine((data, ctx) => {
|
|
@@ -142,7 +142,7 @@ export const Spirits = {
|
|
|
142
142
|
messages: messagesBefore,
|
|
143
143
|
conversation: conversationBefore
|
|
144
144
|
} = input;
|
|
145
|
-
let {conversation, messages, context, message} = input;
|
|
145
|
+
let { conversation, messages, context, message } = input;
|
|
146
146
|
|
|
147
147
|
// Storing post process events here
|
|
148
148
|
const followup = [];
|
|
@@ -177,7 +177,7 @@ export const Spirits = {
|
|
|
177
177
|
const lockConversation = (_conversation, reason) => {
|
|
178
178
|
return updateConversation(
|
|
179
179
|
_conversation,
|
|
180
|
-
{locked: true, lockedReason: conversation.lockedReason || reason || 'Unknown'}
|
|
180
|
+
{ locked: true, lockedReason: conversation.lockedReason || reason || 'Unknown' }
|
|
181
181
|
);
|
|
182
182
|
};
|
|
183
183
|
|
|
@@ -333,7 +333,7 @@ export const Spirits = {
|
|
|
333
333
|
'Updated conversation intent',
|
|
334
334
|
'info',
|
|
335
335
|
'UPDATE_CONVERSATION',
|
|
336
|
-
{intent: parsePayload.intent, intentScore: parsePayload?.intentScore || 0}
|
|
336
|
+
{ intent: parsePayload.intent, intentScore: parsePayload?.intentScore || 0 }
|
|
337
337
|
);
|
|
338
338
|
}
|
|
339
339
|
const oldKeyCount = Object.keys(context).length;
|
|
@@ -345,7 +345,7 @@ export const Spirits = {
|
|
|
345
345
|
conversation.locked = false;
|
|
346
346
|
conversation.lockAttempts = 0;
|
|
347
347
|
conversation.lockedReason = '';
|
|
348
|
-
progress('Reset lock', 'info', 'UPDATE_CONVERSATION', {locked: false, lockAttempts: 0, lockedReason: ''});
|
|
348
|
+
progress('Reset lock', 'info', 'UPDATE_CONVERSATION', { locked: false, lockAttempts: 0, lockedReason: '' });
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
const noNewContext = Object.keys(parsePayload.context).length === 0;
|
|
@@ -370,7 +370,7 @@ export const Spirits = {
|
|
|
370
370
|
|
|
371
371
|
// 3. Run the contextualizer
|
|
372
372
|
progress('Running contextualizer', 'info', 'SET_PROCESSING', 'system');
|
|
373
|
-
const newContextMessages = await contextualizer({conversation, messages});
|
|
373
|
+
const newContextMessages = await contextualizer({ conversation, messages });
|
|
374
374
|
for (const contextMessage of newContextMessages) {
|
|
375
375
|
if (!messages.find(mes => mes.content === contextMessage.content)) {
|
|
376
376
|
messages.push(contextMessage);
|
|
@@ -418,7 +418,7 @@ export const Spirits = {
|
|
|
418
418
|
conversation.lockAttempts = 0;
|
|
419
419
|
conversation.locked = false;
|
|
420
420
|
conversation.lockedReason = '';
|
|
421
|
-
progress('Reset lock', 'info', 'UPDATE_CONVERSATION', {lockAttempts: 0, locked: false, lockedReason: ''});
|
|
421
|
+
progress('Reset lock', 'info', 'UPDATE_CONVERSATION', { lockAttempts: 0, locked: false, lockedReason: '' });
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
let resettedIntent = false;
|
|
@@ -451,7 +451,7 @@ export const Spirits = {
|
|
|
451
451
|
const slots = {};
|
|
452
452
|
const map = [];
|
|
453
453
|
for (let i = 0; i < anticipate.length; i++) {
|
|
454
|
-
const {keywords, ..._slot} = anticipate[i];
|
|
454
|
+
const { keywords, ..._slot } = anticipate[i];
|
|
455
455
|
const slotId = `${i}`;
|
|
456
456
|
slots[slotId] = _slot;
|
|
457
457
|
map.push({
|
|
@@ -499,7 +499,7 @@ export const Spirits = {
|
|
|
499
499
|
_forward = forward;
|
|
500
500
|
_forwardNote = forwardNote;
|
|
501
501
|
if (typeof forward === 'string') {
|
|
502
|
-
updateConversation(conversation, {forwarded: forward});
|
|
502
|
+
updateConversation(conversation, { forwarded: forward });
|
|
503
503
|
messages.push({
|
|
504
504
|
id: idGenerator('sys'),
|
|
505
505
|
role: 'system',
|
|
@@ -508,7 +508,7 @@ export const Spirits = {
|
|
|
508
508
|
});
|
|
509
509
|
progress(`Forwarded to "${forward}"`, 'info', 'ADD_MESSAGE', messages[messages.length - 1]);
|
|
510
510
|
} else if (typeof forward === 'boolean') {
|
|
511
|
-
updateConversation(conversation, {forwarded: conversation.$agent});
|
|
511
|
+
updateConversation(conversation, { forwarded: conversation.$agent });
|
|
512
512
|
messages.push({
|
|
513
513
|
id: idGenerator('sys'),
|
|
514
514
|
role: 'system',
|
|
@@ -530,7 +530,7 @@ export const Spirits = {
|
|
|
530
530
|
'ADD_MESSAGE',
|
|
531
531
|
messages[messages.length - 1]
|
|
532
532
|
);
|
|
533
|
-
updateConversation(conversation, {forwarded: forward.to});
|
|
533
|
+
updateConversation(conversation, { forwarded: forward.to });
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
|
|
@@ -622,7 +622,7 @@ export const Spirits = {
|
|
|
622
622
|
'Reset conversation intent',
|
|
623
623
|
'info',
|
|
624
624
|
'UPDATE_CONVERSATION',
|
|
625
|
-
{intent: null, intentScore: null, locked: false, lockAttempts: 0, lockedReason: ''}
|
|
625
|
+
{ intent: null, intentScore: null, locked: false, lockAttempts: 0, lockedReason: '' }
|
|
626
626
|
);
|
|
627
627
|
}
|
|
628
628
|
|
|
@@ -652,7 +652,7 @@ export const Spirits = {
|
|
|
652
652
|
'Generated response',
|
|
653
653
|
'failed',
|
|
654
654
|
undefined,
|
|
655
|
-
{error: generatorPayload.errors?.join('\n\n') || 'Unknown Reason'}
|
|
655
|
+
{ error: generatorPayload.errors?.join('\n\n') || 'Unknown Reason' }
|
|
656
656
|
);
|
|
657
657
|
console.error(
|
|
658
658
|
`Locking conversation, api returned send false: ${generatorPayload.messages}`,
|
|
@@ -667,40 +667,59 @@ export const Spirits = {
|
|
|
667
667
|
// Check if already had message
|
|
668
668
|
const agentMessages = messages.filter(m => m.role === 'agent');
|
|
669
669
|
const lastAgentMessage = agentMessages[agentMessages.length - 1];
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
670
|
+
|
|
671
|
+
// Build addedMessages from generatorPayload.messages
|
|
672
|
+
const addedMessages = (generatorPayload?.messages ?? [])
|
|
673
|
+
.map((message) => {
|
|
674
|
+
// Normalize time → ISO string
|
|
675
|
+
const t = message.time;
|
|
676
|
+
let isoTime;
|
|
677
|
+
|
|
678
|
+
if (typeof t === "string") {
|
|
679
|
+
isoTime = t;
|
|
680
|
+
} else if (t instanceof Date) {
|
|
681
|
+
isoTime = t.toISOString();
|
|
682
|
+
} else if (t && typeof t.toDate === "function") {
|
|
683
|
+
// Firestore Timestamp
|
|
684
|
+
isoTime = t.toDate().toISOString();
|
|
685
|
+
} else {
|
|
686
|
+
progress(
|
|
687
|
+
`Message "${message.content}" wasn't given a usable timestamp (${JSON.stringify(
|
|
688
|
+
t
|
|
689
|
+
)}), defaulting to now`
|
|
690
|
+
);
|
|
691
|
+
isoTime = new Date().toISOString();
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
// Base fields we guarantee
|
|
695
|
+
const base = {
|
|
696
|
+
role: message.role,
|
|
697
|
+
content: message.content,
|
|
698
|
+
id: idGenerator(message.role),
|
|
699
|
+
time: isoTime,
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
// Copy any other non-nullish fields without overwriting base
|
|
703
|
+
return Object.entries(message).reduce((acc, [key, value]) => {
|
|
704
|
+
if (!Object.prototype.hasOwnProperty.call(acc, key) && value != null) {
|
|
705
|
+
acc[key] = value;
|
|
706
|
+
}
|
|
707
|
+
return acc;
|
|
708
|
+
}, base);
|
|
709
|
+
})
|
|
710
|
+
// De-dupe by content (change the key if you want stricter uniqueness)
|
|
711
|
+
.reduce(
|
|
712
|
+
(acc, msg) => {
|
|
713
|
+
const key = String(msg.content); // e.g. `${msg.role}::${msg.content}` for stronger uniqueness
|
|
714
|
+
if (!acc.seen.has(key)) {
|
|
715
|
+
acc.seen.add(key);
|
|
716
|
+
acc.items.push(msg);
|
|
687
717
|
}
|
|
718
|
+
return acc;
|
|
719
|
+
},
|
|
720
|
+
{ seen: new Set(), items: [] }
|
|
721
|
+
).items;
|
|
688
722
|
|
|
689
|
-
return ({
|
|
690
|
-
id: idGenerator(message.role),
|
|
691
|
-
content: message.content,
|
|
692
|
-
role: message.role,
|
|
693
|
-
time,
|
|
694
|
-
entities: message.entities ?? {},
|
|
695
|
-
context: message.context ?? {},
|
|
696
|
-
mediaUrls: message.mediaUrls
|
|
697
|
-
});
|
|
698
|
-
})
|
|
699
|
-
]
|
|
700
|
-
.reduce((accumulator, message) => {
|
|
701
|
-
if (!accumulator.find(m => m.content === message.content)) accumulator.push(message);
|
|
702
|
-
return accumulator;
|
|
703
|
-
}, []);
|
|
704
723
|
|
|
705
724
|
if (lastAgentMessage && lastAgentMessage.content && addedMessages.some((message) => message.content === lastAgentMessage.content)) {
|
|
706
725
|
// Error should not have happened
|
package/types/index.d.ts
CHANGED
|
@@ -459,6 +459,11 @@ declare module '@scout9/app' {
|
|
|
459
459
|
*/
|
|
460
460
|
id?: string;
|
|
461
461
|
|
|
462
|
+
/**
|
|
463
|
+
* What type of entity this represents
|
|
464
|
+
*/
|
|
465
|
+
type: 'reference' | 'entity';
|
|
466
|
+
|
|
462
467
|
/**
|
|
463
468
|
* The corpus definitions used to compute embeddings for NLP models.
|
|
464
469
|
*/
|
|
@@ -1721,7 +1726,7 @@ declare module '@scout9/app/schemas' {
|
|
|
1721
1726
|
} | undefined;
|
|
1722
1727
|
}>, "many">;
|
|
1723
1728
|
entities: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
1724
|
-
type: z.
|
|
1729
|
+
type: z.ZodEnum<["entity", "reference"]>;
|
|
1725
1730
|
id: z.ZodOptional<z.ZodString>;
|
|
1726
1731
|
model: z.ZodOptional<z.ZodAny>;
|
|
1727
1732
|
references: z.ZodOptional<z.ZodString>;
|
|
@@ -1798,6 +1803,7 @@ declare module '@scout9/app/schemas' {
|
|
|
1798
1803
|
DELETE?: boolean | undefined;
|
|
1799
1804
|
}>>;
|
|
1800
1805
|
}, "strict", z.ZodTypeAny, {
|
|
1806
|
+
type: "entity" | "reference";
|
|
1801
1807
|
entity: string;
|
|
1802
1808
|
entities: string[];
|
|
1803
1809
|
api: {
|
|
@@ -1808,7 +1814,6 @@ declare module '@scout9/app/schemas' {
|
|
|
1808
1814
|
PATCH?: boolean | undefined;
|
|
1809
1815
|
DELETE?: boolean | undefined;
|
|
1810
1816
|
} | null;
|
|
1811
|
-
type?: "entity" | "reference" | undefined;
|
|
1812
1817
|
id?: string | undefined;
|
|
1813
1818
|
model?: any;
|
|
1814
1819
|
references?: string | undefined;
|
|
@@ -1829,6 +1834,7 @@ declare module '@scout9/app/schemas' {
|
|
|
1829
1834
|
};
|
|
1830
1835
|
}[] | undefined;
|
|
1831
1836
|
}, {
|
|
1837
|
+
type: "entity" | "reference";
|
|
1832
1838
|
entity: string;
|
|
1833
1839
|
entities: string[];
|
|
1834
1840
|
api: {
|
|
@@ -1839,7 +1845,6 @@ declare module '@scout9/app/schemas' {
|
|
|
1839
1845
|
PATCH?: boolean | undefined;
|
|
1840
1846
|
DELETE?: boolean | undefined;
|
|
1841
1847
|
} | null;
|
|
1842
|
-
type?: "entity" | "reference" | undefined;
|
|
1843
1848
|
id?: string | undefined;
|
|
1844
1849
|
model?: any;
|
|
1845
1850
|
references?: string | undefined;
|
|
@@ -1860,6 +1865,7 @@ declare module '@scout9/app/schemas' {
|
|
|
1860
1865
|
};
|
|
1861
1866
|
}[] | undefined;
|
|
1862
1867
|
}>, {
|
|
1868
|
+
type: "entity" | "reference";
|
|
1863
1869
|
entity: string;
|
|
1864
1870
|
entities: string[];
|
|
1865
1871
|
api: {
|
|
@@ -1870,7 +1876,6 @@ declare module '@scout9/app/schemas' {
|
|
|
1870
1876
|
PATCH?: boolean | undefined;
|
|
1871
1877
|
DELETE?: boolean | undefined;
|
|
1872
1878
|
} | null;
|
|
1873
|
-
type?: "entity" | "reference" | undefined;
|
|
1874
1879
|
id?: string | undefined;
|
|
1875
1880
|
model?: any;
|
|
1876
1881
|
references?: string | undefined;
|
|
@@ -1891,6 +1896,7 @@ declare module '@scout9/app/schemas' {
|
|
|
1891
1896
|
};
|
|
1892
1897
|
}[] | undefined;
|
|
1893
1898
|
}, {
|
|
1899
|
+
type: "entity" | "reference";
|
|
1894
1900
|
entity: string;
|
|
1895
1901
|
entities: string[];
|
|
1896
1902
|
api: {
|
|
@@ -1901,7 +1907,6 @@ declare module '@scout9/app/schemas' {
|
|
|
1901
1907
|
PATCH?: boolean | undefined;
|
|
1902
1908
|
DELETE?: boolean | undefined;
|
|
1903
1909
|
} | null;
|
|
1904
|
-
type?: "entity" | "reference" | undefined;
|
|
1905
1910
|
id?: string | undefined;
|
|
1906
1911
|
model?: any;
|
|
1907
1912
|
references?: string | undefined;
|
|
@@ -2005,6 +2010,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2005
2010
|
} | undefined;
|
|
2006
2011
|
}[];
|
|
2007
2012
|
entities: {
|
|
2013
|
+
type: "entity" | "reference";
|
|
2008
2014
|
entity: string;
|
|
2009
2015
|
entities: string[];
|
|
2010
2016
|
api: {
|
|
@@ -2015,7 +2021,6 @@ declare module '@scout9/app/schemas' {
|
|
|
2015
2021
|
PATCH?: boolean | undefined;
|
|
2016
2022
|
DELETE?: boolean | undefined;
|
|
2017
2023
|
} | null;
|
|
2018
|
-
type?: "entity" | "reference" | undefined;
|
|
2019
2024
|
id?: string | undefined;
|
|
2020
2025
|
model?: any;
|
|
2021
2026
|
references?: string | undefined;
|
|
@@ -2135,6 +2140,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2135
2140
|
} | undefined;
|
|
2136
2141
|
}[];
|
|
2137
2142
|
entities: {
|
|
2143
|
+
type: "entity" | "reference";
|
|
2138
2144
|
entity: string;
|
|
2139
2145
|
entities: string[];
|
|
2140
2146
|
api: {
|
|
@@ -2145,7 +2151,6 @@ declare module '@scout9/app/schemas' {
|
|
|
2145
2151
|
PATCH?: boolean | undefined;
|
|
2146
2152
|
DELETE?: boolean | undefined;
|
|
2147
2153
|
} | null;
|
|
2148
|
-
type?: "entity" | "reference" | undefined;
|
|
2149
2154
|
id?: string | undefined;
|
|
2150
2155
|
model?: any;
|
|
2151
2156
|
references?: string | undefined;
|
|
@@ -2228,7 +2233,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2228
2233
|
export const EntityConfigurationSchema: z.ZodEffects<z.ZodObject<{
|
|
2229
2234
|
id: z.ZodOptional<z.ZodString>;
|
|
2230
2235
|
model: z.ZodOptional<z.ZodAny>;
|
|
2231
|
-
type: z.
|
|
2236
|
+
type: z.ZodEnum<["entity", "reference"]>;
|
|
2232
2237
|
references: z.ZodOptional<z.ZodString>;
|
|
2233
2238
|
definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2234
2239
|
utterance: z.ZodOptional<z.ZodString>;
|
|
@@ -2279,9 +2284,9 @@ declare module '@scout9/app/schemas' {
|
|
|
2279
2284
|
};
|
|
2280
2285
|
}>, "many">>;
|
|
2281
2286
|
}, "strict", z.ZodTypeAny, {
|
|
2287
|
+
type: "entity" | "reference";
|
|
2282
2288
|
id?: string | undefined;
|
|
2283
2289
|
model?: any;
|
|
2284
|
-
type?: "entity" | "reference" | undefined;
|
|
2285
2290
|
references?: string | undefined;
|
|
2286
2291
|
definitions?: {
|
|
2287
2292
|
value: string;
|
|
@@ -2300,9 +2305,9 @@ declare module '@scout9/app/schemas' {
|
|
|
2300
2305
|
};
|
|
2301
2306
|
}[] | undefined;
|
|
2302
2307
|
}, {
|
|
2308
|
+
type: "entity" | "reference";
|
|
2303
2309
|
id?: string | undefined;
|
|
2304
2310
|
model?: any;
|
|
2305
|
-
type?: "entity" | "reference" | undefined;
|
|
2306
2311
|
references?: string | undefined;
|
|
2307
2312
|
definitions?: {
|
|
2308
2313
|
value: string;
|
|
@@ -2321,9 +2326,9 @@ declare module '@scout9/app/schemas' {
|
|
|
2321
2326
|
};
|
|
2322
2327
|
}[] | undefined;
|
|
2323
2328
|
}>, {
|
|
2329
|
+
type: "entity" | "reference";
|
|
2324
2330
|
id?: string | undefined;
|
|
2325
2331
|
model?: any;
|
|
2326
|
-
type?: "entity" | "reference" | undefined;
|
|
2327
2332
|
references?: string | undefined;
|
|
2328
2333
|
definitions?: {
|
|
2329
2334
|
value: string;
|
|
@@ -2342,9 +2347,9 @@ declare module '@scout9/app/schemas' {
|
|
|
2342
2347
|
};
|
|
2343
2348
|
}[] | undefined;
|
|
2344
2349
|
}, {
|
|
2350
|
+
type: "entity" | "reference";
|
|
2345
2351
|
id?: string | undefined;
|
|
2346
2352
|
model?: any;
|
|
2347
|
-
type?: "entity" | "reference" | undefined;
|
|
2348
2353
|
references?: string | undefined;
|
|
2349
2354
|
definitions?: {
|
|
2350
2355
|
value: string;
|
|
@@ -2366,7 +2371,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2366
2371
|
export const EntitiesRootConfigurationSchema: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
2367
2372
|
id: z.ZodOptional<z.ZodString>;
|
|
2368
2373
|
model: z.ZodOptional<z.ZodAny>;
|
|
2369
|
-
type: z.
|
|
2374
|
+
type: z.ZodEnum<["entity", "reference"]>;
|
|
2370
2375
|
references: z.ZodOptional<z.ZodString>;
|
|
2371
2376
|
definitions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2372
2377
|
utterance: z.ZodOptional<z.ZodString>;
|
|
@@ -2417,9 +2422,9 @@ declare module '@scout9/app/schemas' {
|
|
|
2417
2422
|
};
|
|
2418
2423
|
}>, "many">>;
|
|
2419
2424
|
}, "strict", z.ZodTypeAny, {
|
|
2425
|
+
type: "entity" | "reference";
|
|
2420
2426
|
id?: string | undefined;
|
|
2421
2427
|
model?: any;
|
|
2422
|
-
type?: "entity" | "reference" | undefined;
|
|
2423
2428
|
references?: string | undefined;
|
|
2424
2429
|
definitions?: {
|
|
2425
2430
|
value: string;
|
|
@@ -2438,9 +2443,9 @@ declare module '@scout9/app/schemas' {
|
|
|
2438
2443
|
};
|
|
2439
2444
|
}[] | undefined;
|
|
2440
2445
|
}, {
|
|
2446
|
+
type: "entity" | "reference";
|
|
2441
2447
|
id?: string | undefined;
|
|
2442
2448
|
model?: any;
|
|
2443
|
-
type?: "entity" | "reference" | undefined;
|
|
2444
2449
|
references?: string | undefined;
|
|
2445
2450
|
definitions?: {
|
|
2446
2451
|
value: string;
|
|
@@ -2459,9 +2464,9 @@ declare module '@scout9/app/schemas' {
|
|
|
2459
2464
|
};
|
|
2460
2465
|
}[] | undefined;
|
|
2461
2466
|
}>, {
|
|
2467
|
+
type: "entity" | "reference";
|
|
2462
2468
|
id?: string | undefined;
|
|
2463
2469
|
model?: any;
|
|
2464
|
-
type?: "entity" | "reference" | undefined;
|
|
2465
2470
|
references?: string | undefined;
|
|
2466
2471
|
definitions?: {
|
|
2467
2472
|
value: string;
|
|
@@ -2480,9 +2485,9 @@ declare module '@scout9/app/schemas' {
|
|
|
2480
2485
|
};
|
|
2481
2486
|
}[] | undefined;
|
|
2482
2487
|
}, {
|
|
2488
|
+
type: "entity" | "reference";
|
|
2483
2489
|
id?: string | undefined;
|
|
2484
2490
|
model?: any;
|
|
2485
|
-
type?: "entity" | "reference" | undefined;
|
|
2486
2491
|
references?: string | undefined;
|
|
2487
2492
|
definitions?: {
|
|
2488
2493
|
value: string;
|
|
@@ -2505,7 +2510,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2505
2510
|
* @TODO why type extend not valid?
|
|
2506
2511
|
*/
|
|
2507
2512
|
export const EntityRootProjectConfigurationSchema: z.ZodEffects<z.ZodObject<{
|
|
2508
|
-
type: z.
|
|
2513
|
+
type: z.ZodEnum<["entity", "reference"]>;
|
|
2509
2514
|
id: z.ZodOptional<z.ZodString>;
|
|
2510
2515
|
model: z.ZodOptional<z.ZodAny>;
|
|
2511
2516
|
references: z.ZodOptional<z.ZodString>;
|
|
@@ -2582,6 +2587,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2582
2587
|
DELETE?: boolean | undefined;
|
|
2583
2588
|
}>>;
|
|
2584
2589
|
}, "strict", z.ZodTypeAny, {
|
|
2590
|
+
type: "entity" | "reference";
|
|
2585
2591
|
entity: string;
|
|
2586
2592
|
entities: string[];
|
|
2587
2593
|
api: {
|
|
@@ -2592,7 +2598,6 @@ declare module '@scout9/app/schemas' {
|
|
|
2592
2598
|
PATCH?: boolean | undefined;
|
|
2593
2599
|
DELETE?: boolean | undefined;
|
|
2594
2600
|
} | null;
|
|
2595
|
-
type?: "entity" | "reference" | undefined;
|
|
2596
2601
|
id?: string | undefined;
|
|
2597
2602
|
model?: any;
|
|
2598
2603
|
references?: string | undefined;
|
|
@@ -2613,6 +2618,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2613
2618
|
};
|
|
2614
2619
|
}[] | undefined;
|
|
2615
2620
|
}, {
|
|
2621
|
+
type: "entity" | "reference";
|
|
2616
2622
|
entity: string;
|
|
2617
2623
|
entities: string[];
|
|
2618
2624
|
api: {
|
|
@@ -2623,7 +2629,6 @@ declare module '@scout9/app/schemas' {
|
|
|
2623
2629
|
PATCH?: boolean | undefined;
|
|
2624
2630
|
DELETE?: boolean | undefined;
|
|
2625
2631
|
} | null;
|
|
2626
|
-
type?: "entity" | "reference" | undefined;
|
|
2627
2632
|
id?: string | undefined;
|
|
2628
2633
|
model?: any;
|
|
2629
2634
|
references?: string | undefined;
|
|
@@ -2644,6 +2649,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2644
2649
|
};
|
|
2645
2650
|
}[] | undefined;
|
|
2646
2651
|
}>, {
|
|
2652
|
+
type: "entity" | "reference";
|
|
2647
2653
|
entity: string;
|
|
2648
2654
|
entities: string[];
|
|
2649
2655
|
api: {
|
|
@@ -2654,7 +2660,6 @@ declare module '@scout9/app/schemas' {
|
|
|
2654
2660
|
PATCH?: boolean | undefined;
|
|
2655
2661
|
DELETE?: boolean | undefined;
|
|
2656
2662
|
} | null;
|
|
2657
|
-
type?: "entity" | "reference" | undefined;
|
|
2658
2663
|
id?: string | undefined;
|
|
2659
2664
|
model?: any;
|
|
2660
2665
|
references?: string | undefined;
|
|
@@ -2675,6 +2680,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2675
2680
|
};
|
|
2676
2681
|
}[] | undefined;
|
|
2677
2682
|
}, {
|
|
2683
|
+
type: "entity" | "reference";
|
|
2678
2684
|
entity: string;
|
|
2679
2685
|
entities: string[];
|
|
2680
2686
|
api: {
|
|
@@ -2685,7 +2691,6 @@ declare module '@scout9/app/schemas' {
|
|
|
2685
2691
|
PATCH?: boolean | undefined;
|
|
2686
2692
|
DELETE?: boolean | undefined;
|
|
2687
2693
|
} | null;
|
|
2688
|
-
type?: "entity" | "reference" | undefined;
|
|
2689
2694
|
id?: string | undefined;
|
|
2690
2695
|
model?: any;
|
|
2691
2696
|
references?: string | undefined;
|
|
@@ -2707,7 +2712,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2707
2712
|
}[] | undefined;
|
|
2708
2713
|
}>;
|
|
2709
2714
|
export const EntitiesRootProjectConfigurationSchema: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
2710
|
-
type: z.
|
|
2715
|
+
type: z.ZodEnum<["entity", "reference"]>;
|
|
2711
2716
|
id: z.ZodOptional<z.ZodString>;
|
|
2712
2717
|
model: z.ZodOptional<z.ZodAny>;
|
|
2713
2718
|
references: z.ZodOptional<z.ZodString>;
|
|
@@ -2784,6 +2789,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2784
2789
|
DELETE?: boolean | undefined;
|
|
2785
2790
|
}>>;
|
|
2786
2791
|
}, "strict", z.ZodTypeAny, {
|
|
2792
|
+
type: "entity" | "reference";
|
|
2787
2793
|
entity: string;
|
|
2788
2794
|
entities: string[];
|
|
2789
2795
|
api: {
|
|
@@ -2794,7 +2800,6 @@ declare module '@scout9/app/schemas' {
|
|
|
2794
2800
|
PATCH?: boolean | undefined;
|
|
2795
2801
|
DELETE?: boolean | undefined;
|
|
2796
2802
|
} | null;
|
|
2797
|
-
type?: "entity" | "reference" | undefined;
|
|
2798
2803
|
id?: string | undefined;
|
|
2799
2804
|
model?: any;
|
|
2800
2805
|
references?: string | undefined;
|
|
@@ -2815,6 +2820,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2815
2820
|
};
|
|
2816
2821
|
}[] | undefined;
|
|
2817
2822
|
}, {
|
|
2823
|
+
type: "entity" | "reference";
|
|
2818
2824
|
entity: string;
|
|
2819
2825
|
entities: string[];
|
|
2820
2826
|
api: {
|
|
@@ -2825,7 +2831,6 @@ declare module '@scout9/app/schemas' {
|
|
|
2825
2831
|
PATCH?: boolean | undefined;
|
|
2826
2832
|
DELETE?: boolean | undefined;
|
|
2827
2833
|
} | null;
|
|
2828
|
-
type?: "entity" | "reference" | undefined;
|
|
2829
2834
|
id?: string | undefined;
|
|
2830
2835
|
model?: any;
|
|
2831
2836
|
references?: string | undefined;
|
|
@@ -2846,6 +2851,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2846
2851
|
};
|
|
2847
2852
|
}[] | undefined;
|
|
2848
2853
|
}>, {
|
|
2854
|
+
type: "entity" | "reference";
|
|
2849
2855
|
entity: string;
|
|
2850
2856
|
entities: string[];
|
|
2851
2857
|
api: {
|
|
@@ -2856,7 +2862,6 @@ declare module '@scout9/app/schemas' {
|
|
|
2856
2862
|
PATCH?: boolean | undefined;
|
|
2857
2863
|
DELETE?: boolean | undefined;
|
|
2858
2864
|
} | null;
|
|
2859
|
-
type?: "entity" | "reference" | undefined;
|
|
2860
2865
|
id?: string | undefined;
|
|
2861
2866
|
model?: any;
|
|
2862
2867
|
references?: string | undefined;
|
|
@@ -2877,6 +2882,7 @@ declare module '@scout9/app/schemas' {
|
|
|
2877
2882
|
};
|
|
2878
2883
|
}[] | undefined;
|
|
2879
2884
|
}, {
|
|
2885
|
+
type: "entity" | "reference";
|
|
2880
2886
|
entity: string;
|
|
2881
2887
|
entities: string[];
|
|
2882
2888
|
api: {
|
|
@@ -2887,7 +2893,6 @@ declare module '@scout9/app/schemas' {
|
|
|
2887
2893
|
PATCH?: boolean | undefined;
|
|
2888
2894
|
DELETE?: boolean | undefined;
|
|
2889
2895
|
} | null;
|
|
2890
|
-
type?: "entity" | "reference" | undefined;
|
|
2891
2896
|
id?: string | undefined;
|
|
2892
2897
|
model?: any;
|
|
2893
2898
|
references?: string | undefined;
|