@proteos/sdk 0.85.0 → 0.86.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-Z773P4RO.cjs → chunk-4BBHU3XA.cjs} +36 -86
- package/dist/chunk-4BBHU3XA.cjs.map +1 -0
- package/dist/{chunk-C5642XOH.js → chunk-KX4VIMIJ.js} +36 -86
- package/dist/chunk-KX4VIMIJ.js.map +1 -0
- package/dist/index.cjs +247 -175
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -21
- package/dist/index.d.ts +47 -21
- package/dist/index.js +125 -53
- package/dist/index.js.map +1 -1
- package/dist/meta/index.cjs +96 -96
- package/dist/meta/index.js +1 -1
- package/package.json +3 -3
- package/src/agent/mcp-servers.ts +0 -1
- package/src/agent/prompts.ts +0 -1
- package/src/agent/skills.ts +4 -2
- package/src/agent/tools.ts +0 -1
- package/src/auth/shares.ts +7 -2
- package/src/auth/types.ts +12 -0
- package/src/connector/index.ts +26 -7
- package/src/conversation/index.ts +8 -3
- package/src/conversation/types.ts +15 -0
- package/src/events/index.ts +8 -6
- package/src/index.ts +2 -0
- package/src/knowledge/index.ts +3 -5
- package/src/meta/index.ts +7 -7
- package/src/meta/layout/control-registry.json +24 -82
- package/src/meta/list-extensions.ts +1 -3
- package/src/meta/page-extensions.ts +2 -4
- package/src/meta/types.ts +10 -2
- package/src/scheduling/index.ts +105 -24
- package/src/storage/files.ts +1 -4
- package/src/workflow/types.ts +2 -2
- package/dist/chunk-C5642XOH.js.map +0 -1
- package/dist/chunk-Z773P4RO.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuditFieldsSchema, FileRefSchema, PrincipalRefSchema, AttributeSchema, UserRefSchema, PageIterator } from './chunk-
|
|
2
|
-
export { AppConfigurationSchema, AppHomeSchema, AppSchema, AttributeSchema, AuditFieldsSchema, CURRENT_USER, CURRENT_USER_DEFAULT, ColumnSchema, ComponentSchema, ContactAddressAttributeMetaSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntityContactBindingSchema, EntityExtensionSchema, EntitySchema, EntityWithSchemaSchema, ExtensionPositionSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, ListExtensionColumnPlacementSchema, ListExtensionSchema, ListSchema, ListViewSchema, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, MenuConfigurationExtensionPlacementSchema, MenuConfigurationExtensionPositionSchema, MenuConfigurationExtensionSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PAGE_ACTION_MATCH_MAX_LIMIT, PAGE_EXTENSION_ANCHOR_MAIN, PAGE_EXTENSION_ANCHOR_SIDE_PANEL, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionMatchSchema, PageActionSchema, PageExtensionPlacementSchema, PageExtensionSchema, PageIterator, PageLayoutSchema, PageSchema, RecordPageBindingSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SortConfigSchema, TriggerPageBindingSchema, UserRefSchema, VariableSchema, acceptsCurrentUserDefault, allCurrencyCodes, bundleVersionOf, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isCurrentUser, isCurrentUserDefault, isPlatformAttributeName, localeNumberSeparators, parseAmount, parseContactAddressMeta, parseCurrencyMeta, parseFileMeta, parseRelationMeta, platformAttributes } from './chunk-
|
|
1
|
+
import { AuditFieldsSchema, FileRefSchema, PrincipalRefSchema, AttributeSchema, UserRefSchema, PageIterator } from './chunk-KX4VIMIJ.js';
|
|
2
|
+
export { AppConfigurationSchema, AppHomeSchema, AppSchema, AttributeSchema, AuditFieldsSchema, CURRENT_USER, CURRENT_USER_DEFAULT, ColumnSchema, ComponentSchema, ContactAddressAttributeMetaSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntityContactBindingSchema, EntityExtensionSchema, EntitySchema, EntityWithSchemaSchema, ExtensionPositionSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, ListExtensionColumnPlacementSchema, ListExtensionSchema, ListSchema, ListViewSchema, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, MenuConfigurationExtensionPlacementSchema, MenuConfigurationExtensionPositionSchema, MenuConfigurationExtensionSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PAGE_ACTION_MATCH_MAX_LIMIT, PAGE_EXTENSION_ANCHOR_MAIN, PAGE_EXTENSION_ANCHOR_SIDE_PANEL, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionMatchSchema, PageActionSchema, PageExtensionPlacementSchema, PageExtensionSchema, PageIterator, PageLayoutSchema, PageSchema, RecordPageBindingSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SortConfigSchema, TriggerPageBindingSchema, UserRefSchema, VariableSchema, acceptsCurrentUserDefault, allCurrencyCodes, bundleVersionOf, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isCurrentUser, isCurrentUserDefault, isPlatformAttributeName, localeNumberSeparators, parseAmount, parseContactAddressMeta, parseCurrencyMeta, parseFileMeta, parseRelationMeta, platformAttributes } from './chunk-KX4VIMIJ.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { fetchEventSource } from '@microsoft/fetch-event-source';
|
|
5
5
|
|
|
@@ -702,7 +702,12 @@ var PLATFORM_ENTITY_SERVICE = {
|
|
|
702
702
|
conversations: "/conversations",
|
|
703
703
|
connections: "/conversations"
|
|
704
704
|
};
|
|
705
|
-
var SERVICES_WITH_SHARING = /* @__PURE__ */ new Set([
|
|
705
|
+
var SERVICES_WITH_SHARING = /* @__PURE__ */ new Set([
|
|
706
|
+
"/data",
|
|
707
|
+
"/knowledge",
|
|
708
|
+
"/agents",
|
|
709
|
+
"/conversations"
|
|
710
|
+
]);
|
|
706
711
|
var DEFAULT_SERVICE = "/data";
|
|
707
712
|
function shareRouteFor(entitySlug) {
|
|
708
713
|
const service = PLATFORM_ENTITY_SERVICE[entitySlug] ?? DEFAULT_SERVICE;
|
|
@@ -1096,7 +1101,9 @@ var ProfileSchema = AuditFieldsSchema.extend({
|
|
|
1096
1101
|
description: z.string(),
|
|
1097
1102
|
module_slug: z.string(),
|
|
1098
1103
|
default_app_slug: z.string(),
|
|
1099
|
-
app_slugs: z.array(z.string())
|
|
1104
|
+
app_slugs: z.array(z.string()),
|
|
1105
|
+
// Optional for responses from servers that predate the column.
|
|
1106
|
+
platform_features: z.array(z.string()).default([])
|
|
1100
1107
|
});
|
|
1101
1108
|
var UserProfileAssignmentSchema = AuditFieldsSchema.extend({
|
|
1102
1109
|
id: z.string(),
|
|
@@ -1628,7 +1635,10 @@ var ConnectorCatalogServiceImpl = class {
|
|
|
1628
1635
|
return this.client.requestWithQuery("GET", `${CONNECTOR_BASE_PATH}/connectors`, query);
|
|
1629
1636
|
}
|
|
1630
1637
|
get(key) {
|
|
1631
|
-
return this.client.request(
|
|
1638
|
+
return this.client.request(
|
|
1639
|
+
"GET",
|
|
1640
|
+
`${CONNECTOR_BASE_PATH}/connectors/${encodeURIComponent(key)}`
|
|
1641
|
+
);
|
|
1632
1642
|
}
|
|
1633
1643
|
async listMethods(key) {
|
|
1634
1644
|
const connector = await this.get(key);
|
|
@@ -1644,22 +1654,38 @@ var ConnectorConnectionServiceImpl = class {
|
|
|
1644
1654
|
return this.client.requestWithQuery("GET", `${CONNECTOR_BASE_PATH}/connections`, query);
|
|
1645
1655
|
}
|
|
1646
1656
|
get(id) {
|
|
1647
|
-
return this.client.request(
|
|
1657
|
+
return this.client.request(
|
|
1658
|
+
"GET",
|
|
1659
|
+
`${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}`
|
|
1660
|
+
);
|
|
1648
1661
|
}
|
|
1649
1662
|
create(request) {
|
|
1650
1663
|
return this.client.request("POST", `${CONNECTOR_BASE_PATH}/connections`, request);
|
|
1651
1664
|
}
|
|
1652
1665
|
update(id, request) {
|
|
1653
|
-
return this.client.request(
|
|
1666
|
+
return this.client.request(
|
|
1667
|
+
"PATCH",
|
|
1668
|
+
`${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}`,
|
|
1669
|
+
request
|
|
1670
|
+
);
|
|
1654
1671
|
}
|
|
1655
1672
|
async delete(id) {
|
|
1656
|
-
await this.client.request(
|
|
1673
|
+
await this.client.request(
|
|
1674
|
+
"DELETE",
|
|
1675
|
+
`${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}`
|
|
1676
|
+
);
|
|
1657
1677
|
}
|
|
1658
1678
|
install(id) {
|
|
1659
|
-
return this.client.request(
|
|
1679
|
+
return this.client.request(
|
|
1680
|
+
"POST",
|
|
1681
|
+
`${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}/install`
|
|
1682
|
+
);
|
|
1660
1683
|
}
|
|
1661
1684
|
token(id) {
|
|
1662
|
-
return this.client.request(
|
|
1685
|
+
return this.client.request(
|
|
1686
|
+
"POST",
|
|
1687
|
+
`${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}/token`
|
|
1688
|
+
);
|
|
1663
1689
|
}
|
|
1664
1690
|
async invokeMethod(id, method, params = {}) {
|
|
1665
1691
|
const response = await this.client.request(
|
|
@@ -2157,8 +2183,12 @@ var ConversationServiceImpl = class {
|
|
|
2157
2183
|
`${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(id)}/read`
|
|
2158
2184
|
);
|
|
2159
2185
|
}
|
|
2160
|
-
unreadCounts() {
|
|
2161
|
-
return this.client.
|
|
2186
|
+
unreadCounts(query) {
|
|
2187
|
+
return this.client.requestWithQuery(
|
|
2188
|
+
"GET",
|
|
2189
|
+
`${CONVERSATION_BASE_PATH}/conversations/unread-counts`,
|
|
2190
|
+
query
|
|
2191
|
+
);
|
|
2162
2192
|
}
|
|
2163
2193
|
};
|
|
2164
2194
|
var MessageServiceImpl = class {
|
|
@@ -3353,11 +3383,7 @@ var TopicServiceImpl = class {
|
|
|
3353
3383
|
return response.data ?? [];
|
|
3354
3384
|
}
|
|
3355
3385
|
async events(topic, options = {}) {
|
|
3356
|
-
const response = await this.client.requestWithQuery(
|
|
3357
|
-
"GET",
|
|
3358
|
-
`${EVENTS_BASE_PATH}/topics/${encodeURIComponent(topic)}/events`,
|
|
3359
|
-
options
|
|
3360
|
-
);
|
|
3386
|
+
const response = await this.client.requestWithQuery("GET", `${EVENTS_BASE_PATH}/topics/${encodeURIComponent(topic)}/events`, options);
|
|
3361
3387
|
return response.data ?? [];
|
|
3362
3388
|
}
|
|
3363
3389
|
async *tail(topic, options = {}) {
|
|
@@ -3680,9 +3706,9 @@ var NodeServiceImpl = class {
|
|
|
3680
3706
|
}
|
|
3681
3707
|
};
|
|
3682
3708
|
|
|
3683
|
-
// src/knowledge/
|
|
3684
|
-
var
|
|
3685
|
-
var
|
|
3709
|
+
// src/knowledge/record-links.ts
|
|
3710
|
+
var RECORD_LINKS_BASE_PATH = "/knowledge/v1/record-links";
|
|
3711
|
+
var RecordLinkServiceImpl = class {
|
|
3686
3712
|
constructor(client) {
|
|
3687
3713
|
this.client = client;
|
|
3688
3714
|
}
|
|
@@ -3693,27 +3719,24 @@ var SpaceServiceImpl = class {
|
|
|
3693
3719
|
async listPage(options = {}) {
|
|
3694
3720
|
return this.client.requestWithQuery(
|
|
3695
3721
|
"GET",
|
|
3696
|
-
|
|
3722
|
+
RECORD_LINKS_BASE_PATH,
|
|
3697
3723
|
options
|
|
3698
3724
|
);
|
|
3699
3725
|
}
|
|
3700
|
-
async get(
|
|
3701
|
-
return this.client.request("GET", `${
|
|
3726
|
+
async get(id) {
|
|
3727
|
+
return this.client.request("GET", `${RECORD_LINKS_BASE_PATH}/${id}`);
|
|
3702
3728
|
}
|
|
3703
3729
|
async create(request) {
|
|
3704
|
-
return this.client.request("POST",
|
|
3705
|
-
}
|
|
3706
|
-
async update(slug, request) {
|
|
3707
|
-
return this.client.request("PATCH", `${SPACES_BASE_PATH}/${slug}`, request);
|
|
3730
|
+
return this.client.request("POST", RECORD_LINKS_BASE_PATH, request);
|
|
3708
3731
|
}
|
|
3709
|
-
async delete(
|
|
3710
|
-
await this.client.request("DELETE", `${
|
|
3732
|
+
async delete(id) {
|
|
3733
|
+
await this.client.request("DELETE", `${RECORD_LINKS_BASE_PATH}/${id}`);
|
|
3711
3734
|
}
|
|
3712
3735
|
};
|
|
3713
3736
|
|
|
3714
|
-
// src/knowledge/
|
|
3715
|
-
var
|
|
3716
|
-
var
|
|
3737
|
+
// src/knowledge/spaces.ts
|
|
3738
|
+
var SPACES_BASE_PATH = "/knowledge/v1/spaces";
|
|
3739
|
+
var SpaceServiceImpl = class {
|
|
3717
3740
|
constructor(client) {
|
|
3718
3741
|
this.client = client;
|
|
3719
3742
|
}
|
|
@@ -3724,18 +3747,21 @@ var RecordLinkServiceImpl = class {
|
|
|
3724
3747
|
async listPage(options = {}) {
|
|
3725
3748
|
return this.client.requestWithQuery(
|
|
3726
3749
|
"GET",
|
|
3727
|
-
|
|
3750
|
+
SPACES_BASE_PATH,
|
|
3728
3751
|
options
|
|
3729
3752
|
);
|
|
3730
3753
|
}
|
|
3731
|
-
async get(
|
|
3732
|
-
return this.client.request("GET", `${
|
|
3754
|
+
async get(slug) {
|
|
3755
|
+
return this.client.request("GET", `${SPACES_BASE_PATH}/${slug}`);
|
|
3733
3756
|
}
|
|
3734
3757
|
async create(request) {
|
|
3735
|
-
return this.client.request("POST",
|
|
3758
|
+
return this.client.request("POST", SPACES_BASE_PATH, request);
|
|
3736
3759
|
}
|
|
3737
|
-
async
|
|
3738
|
-
|
|
3760
|
+
async update(slug, request) {
|
|
3761
|
+
return this.client.request("PATCH", `${SPACES_BASE_PATH}/${slug}`, request);
|
|
3762
|
+
}
|
|
3763
|
+
async delete(slug) {
|
|
3764
|
+
await this.client.request("DELETE", `${SPACES_BASE_PATH}/${slug}`);
|
|
3739
3765
|
}
|
|
3740
3766
|
};
|
|
3741
3767
|
var UNASSIGNED_SPACE_SLUG = "__unassigned__";
|
|
@@ -4035,7 +4061,11 @@ var CalendarEventTypeServiceImpl = class {
|
|
|
4035
4061
|
}
|
|
4036
4062
|
client;
|
|
4037
4063
|
list(query = {}) {
|
|
4038
|
-
return this.client.requestWithQuery(
|
|
4064
|
+
return this.client.requestWithQuery(
|
|
4065
|
+
"GET",
|
|
4066
|
+
`${SCHEDULING_BASE_PATH}/calendar-event-types`,
|
|
4067
|
+
query
|
|
4068
|
+
);
|
|
4039
4069
|
}
|
|
4040
4070
|
get(key) {
|
|
4041
4071
|
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/calendar-event-types/${encode2(key)}`);
|
|
@@ -4124,20 +4154,35 @@ var SchedulingLinkServiceImpl = class {
|
|
|
4124
4154
|
return this.client.request("POST", `${SCHEDULING_BASE_PATH}/scheduling-links`, request);
|
|
4125
4155
|
}
|
|
4126
4156
|
update(key, request) {
|
|
4127
|
-
return this.client.request(
|
|
4157
|
+
return this.client.request(
|
|
4158
|
+
"PATCH",
|
|
4159
|
+
`${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}`,
|
|
4160
|
+
request
|
|
4161
|
+
);
|
|
4128
4162
|
}
|
|
4129
4163
|
async delete(key) {
|
|
4130
4164
|
await this.client.request("DELETE", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}`);
|
|
4131
4165
|
}
|
|
4132
4166
|
getPage(key, contactId) {
|
|
4133
4167
|
const suffix = contactId ? `?contact_id=${encode2(contactId)}` : "";
|
|
4134
|
-
return this.client.request(
|
|
4168
|
+
return this.client.request(
|
|
4169
|
+
"GET",
|
|
4170
|
+
`${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}/page${suffix}`
|
|
4171
|
+
);
|
|
4135
4172
|
}
|
|
4136
4173
|
getSlots(key, query) {
|
|
4137
|
-
return this.client.requestWithQuery(
|
|
4174
|
+
return this.client.requestWithQuery(
|
|
4175
|
+
"GET",
|
|
4176
|
+
`${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}/slots`,
|
|
4177
|
+
query
|
|
4178
|
+
);
|
|
4138
4179
|
}
|
|
4139
4180
|
book(key, request) {
|
|
4140
|
-
return this.client.request(
|
|
4181
|
+
return this.client.request(
|
|
4182
|
+
"POST",
|
|
4183
|
+
`${SCHEDULING_BASE_PATH}/scheduling-links/${encode2(key)}/calendar-events`,
|
|
4184
|
+
request
|
|
4185
|
+
);
|
|
4141
4186
|
}
|
|
4142
4187
|
};
|
|
4143
4188
|
var PublicSchedulingServiceImpl = class {
|
|
@@ -4150,25 +4195,55 @@ var PublicSchedulingServiceImpl = class {
|
|
|
4150
4195
|
}
|
|
4151
4196
|
getLink(orgId, key, contactId) {
|
|
4152
4197
|
const suffix = contactId ? `?contact_id=${encode2(contactId)}` : "";
|
|
4153
|
-
return this.client.request(
|
|
4198
|
+
return this.client.request(
|
|
4199
|
+
"GET",
|
|
4200
|
+
`${this.base(orgId)}/links/${encode2(key)}${suffix}`,
|
|
4201
|
+
void 0,
|
|
4202
|
+
{ skipAuth: true }
|
|
4203
|
+
);
|
|
4154
4204
|
}
|
|
4155
4205
|
getSlots(orgId, key, query) {
|
|
4156
4206
|
const params = new URLSearchParams({ from: query.from, to: query.to, timezone: query.timezone });
|
|
4157
4207
|
if (query.host_user_id) params.set("host_user_id", query.host_user_id);
|
|
4158
4208
|
if (query.type_key) params.set("type_key", query.type_key);
|
|
4159
|
-
return this.client.request(
|
|
4209
|
+
return this.client.request(
|
|
4210
|
+
"GET",
|
|
4211
|
+
`${this.base(orgId)}/links/${encode2(key)}/slots?${params.toString()}`,
|
|
4212
|
+
void 0,
|
|
4213
|
+
{ skipAuth: true }
|
|
4214
|
+
);
|
|
4160
4215
|
}
|
|
4161
4216
|
book(orgId, key, request) {
|
|
4162
|
-
return this.client.request(
|
|
4217
|
+
return this.client.request(
|
|
4218
|
+
"POST",
|
|
4219
|
+
`${this.base(orgId)}/links/${encode2(key)}/calendar-events`,
|
|
4220
|
+
request,
|
|
4221
|
+
{ skipAuth: true }
|
|
4222
|
+
);
|
|
4163
4223
|
}
|
|
4164
4224
|
getEvent(orgId, id, token) {
|
|
4165
|
-
return this.client.request(
|
|
4225
|
+
return this.client.request(
|
|
4226
|
+
"GET",
|
|
4227
|
+
`${this.base(orgId)}/calendar-events/${encode2(id)}?token=${encode2(token)}`,
|
|
4228
|
+
void 0,
|
|
4229
|
+
{ skipAuth: true }
|
|
4230
|
+
);
|
|
4166
4231
|
}
|
|
4167
4232
|
cancel(orgId, id, request) {
|
|
4168
|
-
return this.client.request(
|
|
4233
|
+
return this.client.request(
|
|
4234
|
+
"POST",
|
|
4235
|
+
`${this.base(orgId)}/calendar-events/${encode2(id)}/cancel`,
|
|
4236
|
+
request,
|
|
4237
|
+
{ skipAuth: true }
|
|
4238
|
+
);
|
|
4169
4239
|
}
|
|
4170
4240
|
reschedule(orgId, id, request) {
|
|
4171
|
-
return this.client.request(
|
|
4241
|
+
return this.client.request(
|
|
4242
|
+
"POST",
|
|
4243
|
+
`${this.base(orgId)}/calendar-events/${encode2(id)}/reschedule`,
|
|
4244
|
+
request,
|
|
4245
|
+
{ skipAuth: true }
|
|
4246
|
+
);
|
|
4172
4247
|
}
|
|
4173
4248
|
};
|
|
4174
4249
|
|
|
@@ -4219,10 +4294,7 @@ var FileServiceImpl = class {
|
|
|
4219
4294
|
}
|
|
4220
4295
|
async update(id, metadata, file) {
|
|
4221
4296
|
const formData = new FormData();
|
|
4222
|
-
formData.append(
|
|
4223
|
-
"metadata",
|
|
4224
|
-
new Blob([JSON.stringify(metadata)], { type: "application/json" })
|
|
4225
|
-
);
|
|
4297
|
+
formData.append("metadata", new Blob([JSON.stringify(metadata)], { type: "application/json" }));
|
|
4226
4298
|
if (file) formData.append("file", file, metadata.name ?? file.name);
|
|
4227
4299
|
const response = await this.client.requestMultipart(
|
|
4228
4300
|
"PATCH",
|