@proteos/sdk 0.54.1 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-QUCSWC3M.cjs → chunk-3UBIL3WV.cjs} +37 -2
- package/dist/chunk-3UBIL3WV.cjs.map +1 -0
- package/dist/{chunk-B2EZDFFH.js → chunk-WJYUQBEG.js} +34 -3
- package/dist/chunk-WJYUQBEG.js.map +1 -0
- package/dist/index.cjs +139 -117
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +251 -39
- package/dist/index.d.ts +251 -39
- package/dist/index.js +24 -2
- package/dist/index.js.map +1 -1
- package/dist/meta/index.cjs +91 -75
- package/dist/meta/index.d.cts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/meta/index.js +1 -1
- package/dist/{types-6-ywikNl.d.cts → types-CylP2A4p.d.cts} +23 -1
- package/dist/{types-6-ywikNl.d.ts → types-CylP2A4p.d.ts} +23 -1
- package/package.json +1 -1
- package/src/agent/index.ts +42 -6
- package/src/agent/model-types.ts +193 -0
- package/src/agent/models.ts +67 -0
- package/src/index.ts +20 -1
- package/src/meta/index.ts +6 -0
- package/src/meta/record-title.ts +50 -0
- package/src/workflow/types.ts +3 -1
- package/dist/chunk-B2EZDFFH.js.map +0 -1
- package/dist/chunk-QUCSWC3M.cjs.map +0 -1
|
@@ -1317,6 +1317,37 @@ var PageLayoutSchema = z.object({
|
|
|
1317
1317
|
side_panel: PageLayoutSidePanelSchema.optional(),
|
|
1318
1318
|
style: PageStyleSchema.optional()
|
|
1319
1319
|
});
|
|
1320
|
+
|
|
1321
|
+
// src/meta/record-title.ts
|
|
1322
|
+
var RECORD_TITLE_FIELD = "record_title";
|
|
1323
|
+
function isReservedAttributeName(name) {
|
|
1324
|
+
return name === RECORD_TITLE_FIELD;
|
|
1325
|
+
}
|
|
1326
|
+
function isTitleQueryable(template) {
|
|
1327
|
+
if (!template?.includes("{{")) return false;
|
|
1328
|
+
if (template.includes("{%") || template.includes("%}")) return false;
|
|
1329
|
+
let rest = template;
|
|
1330
|
+
while (rest !== "") {
|
|
1331
|
+
const open = rest.indexOf("{{");
|
|
1332
|
+
if (open < 0) return !rest.includes("}}");
|
|
1333
|
+
if (rest.slice(0, open).includes("}}")) return false;
|
|
1334
|
+
rest = rest.slice(open + 2);
|
|
1335
|
+
const close = rest.indexOf("}}");
|
|
1336
|
+
if (close < 0) return false;
|
|
1337
|
+
if (!/^[a-z][a-z0-9_]*$/.test(rest.slice(0, close).trim())) return false;
|
|
1338
|
+
rest = rest.slice(close + 2);
|
|
1339
|
+
}
|
|
1340
|
+
return true;
|
|
1341
|
+
}
|
|
1342
|
+
function titleTemplateVariables(template) {
|
|
1343
|
+
if (!template || !isTitleQueryable(template)) return [];
|
|
1344
|
+
const out = [];
|
|
1345
|
+
for (const match of template.matchAll(/\{\{\s*([a-z][a-z0-9_]*)\s*\}\}/g)) {
|
|
1346
|
+
const name = match[1];
|
|
1347
|
+
if (name && !out.includes(name)) out.push(name);
|
|
1348
|
+
}
|
|
1349
|
+
return out;
|
|
1350
|
+
}
|
|
1320
1351
|
var ResponseMetaSchema = z.object({
|
|
1321
1352
|
page: z.number(),
|
|
1322
1353
|
page_size: z.number(),
|
|
@@ -1833,6 +1864,6 @@ var MetaClient = class {
|
|
|
1833
1864
|
}
|
|
1834
1865
|
};
|
|
1835
1866
|
|
|
1836
|
-
export { AppConfigurationSchema, AppHomeSchema, AppSchema, AttributeSchema, AuditFieldsSchema, BUILT_IN_CONTROLS, CURRENT_USER_DEFAULT, ColumnSchema, ComponentSchema, ContactAddressAttributeMetaSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntityContactBindingSchema, EntityExtensionSchema, EntitySchema, EntityWithSchemaSchema, ExtensionPositionSchema, FileAttributeMetaSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, LayoutElementSchema, LayoutElementType, LayoutTabSchema, ListExtensionColumnPlacementSchema, ListExtensionSchema, ListSchema, ListViewSchema, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, MenuConfigurationExtensionPlacementSchema, MenuConfigurationExtensionPositionSchema, MenuConfigurationExtensionSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PAGE_BACKGROUND_TOKENS, PAGE_EXTENSION_ANCHOR_MAIN, PAGE_EXTENSION_ANCHOR_SIDE_PANEL, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageExtensionPlacementSchema, PageExtensionSchema, PageIterator, PageLayoutSchema, PageLayoutSidePanelSchema, PageSchema, PageStyleSchema, PrincipalRefSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SizeValueSchema, SortConfigSchema, UserAttributeMetaSchema, UserRefSchema, VariableSchema, acceptsCurrentUserDefault, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isBuiltInControl, isCurrentUserDefault, isPlatformAttributeName, localeNumberSeparators, lookupCompatibleControls, lookupControls, lookupPrimaryControl, parseAmount, parseContactAddressMeta, parseCurrencyMeta, parseFileMeta, parsePrincipalMeta, parseRelationMeta, parseUserMeta, platformAttributes };
|
|
1837
|
-
//# sourceMappingURL=chunk-
|
|
1838
|
-
//# sourceMappingURL=chunk-
|
|
1867
|
+
export { AppConfigurationSchema, AppHomeSchema, AppSchema, AttributeSchema, AuditFieldsSchema, BUILT_IN_CONTROLS, CURRENT_USER_DEFAULT, ColumnSchema, ComponentSchema, ContactAddressAttributeMetaSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntityContactBindingSchema, EntityExtensionSchema, EntitySchema, EntityWithSchemaSchema, ExtensionPositionSchema, FileAttributeMetaSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, LayoutElementSchema, LayoutElementType, LayoutTabSchema, ListExtensionColumnPlacementSchema, ListExtensionSchema, ListSchema, ListViewSchema, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, MenuConfigurationExtensionPlacementSchema, MenuConfigurationExtensionPositionSchema, MenuConfigurationExtensionSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PAGE_BACKGROUND_TOKENS, PAGE_EXTENSION_ANCHOR_MAIN, PAGE_EXTENSION_ANCHOR_SIDE_PANEL, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageExtensionPlacementSchema, PageExtensionSchema, PageIterator, PageLayoutSchema, PageLayoutSidePanelSchema, PageSchema, PageStyleSchema, PrincipalRefSchema, RECORD_TITLE_FIELD, RelationAttributeMetaSchema, ResponseMetaSchema, SizeValueSchema, SortConfigSchema, UserAttributeMetaSchema, UserRefSchema, VariableSchema, acceptsCurrentUserDefault, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isBuiltInControl, isCurrentUserDefault, isPlatformAttributeName, isReservedAttributeName, isTitleQueryable, localeNumberSeparators, lookupCompatibleControls, lookupControls, lookupPrimaryControl, parseAmount, parseContactAddressMeta, parseCurrencyMeta, parseFileMeta, parsePrincipalMeta, parseRelationMeta, parseUserMeta, platformAttributes, titleTemplateVariables };
|
|
1868
|
+
//# sourceMappingURL=chunk-WJYUQBEG.js.map
|
|
1869
|
+
//# sourceMappingURL=chunk-WJYUQBEG.js.map
|