@proteos/sdk 0.45.0 → 0.46.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-33EULWIM.cjs → chunk-F5DHWOGW.cjs} +195 -27
- package/dist/chunk-F5DHWOGW.cjs.map +1 -0
- package/dist/{chunk-IGIAJVX6.js → chunk-Y4CEHIRX.js} +191 -28
- package/dist/chunk-Y4CEHIRX.js.map +1 -0
- package/dist/index.cjs +428 -178
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +643 -11
- package/dist/index.d.ts +643 -11
- package/dist/index.js +330 -96
- package/dist/index.js.map +1 -1
- package/dist/meta/index.cjs +69 -53
- 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-BTdBFq34.d.cts → types-D1PRIsSO.d.cts} +406 -14
- package/dist/{types-BTdBFq34.d.ts → types-D1PRIsSO.d.ts} +406 -14
- package/package.json +1 -1
- package/src/auth/index.ts +58 -1
- package/src/auth/me.ts +14 -1
- package/src/auth/platform-entities.ts +27 -0
- package/src/auth/roles.ts +3 -1
- package/src/auth/shares.ts +181 -0
- package/src/auth/teams.ts +135 -0
- package/src/auth/types.ts +192 -4
- package/src/auth/user-role-assignments.ts +65 -0
- package/src/index.ts +36 -0
- package/src/knowledge/graph.ts +6 -2
- package/src/knowledge/index.ts +15 -0
- package/src/knowledge/nodes.ts +4 -1
- package/src/knowledge/spaces.ts +86 -0
- package/src/knowledge/types.ts +89 -0
- package/src/meta/index.ts +11 -0
- package/src/meta/layout/control-registry.json +151 -26
- package/src/meta/types.ts +186 -4
- package/src/workflow/types.ts +20 -3
- package/dist/chunk-33EULWIM.cjs.map +0 -1
- package/dist/chunk-IGIAJVX6.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkF5DHWOGW_cjs = require('./chunk-F5DHWOGW.cjs');
|
|
4
4
|
var zod = require('zod');
|
|
5
5
|
var fetchEventSource = require('@microsoft/fetch-event-source');
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ var AgentServiceImpl = class {
|
|
|
12
12
|
}
|
|
13
13
|
client;
|
|
14
14
|
list(options = {}) {
|
|
15
|
-
return new
|
|
15
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
16
16
|
}
|
|
17
17
|
async listPage(options = {}) {
|
|
18
18
|
return this.client.requestWithQuery("GET", AGENTS_BASE_PATH, options);
|
|
@@ -39,7 +39,7 @@ var McpServerServiceImpl = class {
|
|
|
39
39
|
}
|
|
40
40
|
client;
|
|
41
41
|
list(options = {}) {
|
|
42
|
-
return new
|
|
42
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
43
43
|
}
|
|
44
44
|
async listPage(options = {}) {
|
|
45
45
|
return this.client.requestWithQuery(
|
|
@@ -107,7 +107,7 @@ var PromptServiceImpl = class {
|
|
|
107
107
|
}
|
|
108
108
|
client;
|
|
109
109
|
list(options = {}) {
|
|
110
|
-
return new
|
|
110
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
111
111
|
}
|
|
112
112
|
async listPage(options = {}) {
|
|
113
113
|
return this.client.requestWithQuery("GET", PROMPTS_BASE_PATH, options);
|
|
@@ -161,7 +161,7 @@ var SessionServiceImpl = class {
|
|
|
161
161
|
}
|
|
162
162
|
client;
|
|
163
163
|
list(options = {}) {
|
|
164
|
-
return new
|
|
164
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
165
165
|
}
|
|
166
166
|
async listPage(options = {}) {
|
|
167
167
|
return this.client.requestWithQuery("GET", SESSIONS_BASE_PATH, options);
|
|
@@ -251,7 +251,7 @@ var SkillServiceImpl = class {
|
|
|
251
251
|
}
|
|
252
252
|
client;
|
|
253
253
|
list(options = {}) {
|
|
254
|
-
return new
|
|
254
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
255
255
|
}
|
|
256
256
|
async listPage(options = {}) {
|
|
257
257
|
return this.client.requestWithQuery("GET", SKILLS_BASE_PATH, options);
|
|
@@ -308,7 +308,7 @@ var ToolServiceImpl = class {
|
|
|
308
308
|
}
|
|
309
309
|
client;
|
|
310
310
|
list(options = {}) {
|
|
311
|
-
return new
|
|
311
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
312
312
|
}
|
|
313
313
|
async listPage(options = {}) {
|
|
314
314
|
return this.client.requestWithQuery("GET", TOOLS_BASE_PATH, options);
|
|
@@ -349,7 +349,7 @@ var ToolsetServiceImpl = class {
|
|
|
349
349
|
}
|
|
350
350
|
client;
|
|
351
351
|
list(options = {}) {
|
|
352
|
-
return new
|
|
352
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
353
353
|
}
|
|
354
354
|
async listPage(options = {}) {
|
|
355
355
|
return this.client.requestWithQuery("GET", TOOLSETS_BASE_PATH, options);
|
|
@@ -420,6 +420,9 @@ var MeServiceImpl = class {
|
|
|
420
420
|
async get() {
|
|
421
421
|
return this.client.request("GET", ME_BASE_PATH);
|
|
422
422
|
}
|
|
423
|
+
async update(request) {
|
|
424
|
+
return this.client.request("PATCH", ME_BASE_PATH, request);
|
|
425
|
+
}
|
|
423
426
|
async organizations() {
|
|
424
427
|
const response = await this.client.request(
|
|
425
428
|
"GET",
|
|
@@ -437,7 +440,7 @@ var OrganizationServiceImpl = class {
|
|
|
437
440
|
}
|
|
438
441
|
client;
|
|
439
442
|
list(options = {}) {
|
|
440
|
-
return new
|
|
443
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
441
444
|
}
|
|
442
445
|
async listPage(options = {}) {
|
|
443
446
|
return this.client.requestWithQuery(
|
|
@@ -468,7 +471,7 @@ var RoleServiceImpl = class {
|
|
|
468
471
|
}
|
|
469
472
|
client;
|
|
470
473
|
list(options = {}) {
|
|
471
|
-
return new
|
|
474
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
472
475
|
}
|
|
473
476
|
async listPage(options = {}) {
|
|
474
477
|
return this.client.requestWithQuery("GET", ROLES_BASE_PATH, options);
|
|
@@ -489,7 +492,7 @@ var RoleServiceImpl = class {
|
|
|
489
492
|
await this.client.request("DELETE", `${ROLES_BASE_PATH}/${slug}`);
|
|
490
493
|
}
|
|
491
494
|
getPermissions(roleSlug, options = {}) {
|
|
492
|
-
return new
|
|
495
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.fetchPermissionsPage(roleSlug, opts), options);
|
|
493
496
|
}
|
|
494
497
|
async assignPermission(roleSlug, request) {
|
|
495
498
|
return this.client.request(
|
|
@@ -513,6 +516,222 @@ var RoleServiceImpl = class {
|
|
|
513
516
|
}
|
|
514
517
|
};
|
|
515
518
|
|
|
519
|
+
// src/errors.ts
|
|
520
|
+
var ErrorCode = {
|
|
521
|
+
NOT_FOUND: "not_found",
|
|
522
|
+
UNAUTHORIZED: "unauthorized",
|
|
523
|
+
FORBIDDEN: "forbidden",
|
|
524
|
+
BAD_REQUEST: "bad_request",
|
|
525
|
+
CONFLICT: "conflict",
|
|
526
|
+
INTERNAL_SERVER_ERROR: "internal_server_error",
|
|
527
|
+
INVALID_PAYLOAD: "invalid_payload",
|
|
528
|
+
INVALID_PERSONA: "invalid_persona"
|
|
529
|
+
};
|
|
530
|
+
var ProteosError = class extends Error {
|
|
531
|
+
/** HTTP status code of the response */
|
|
532
|
+
httpStatus;
|
|
533
|
+
/** API error code (e.g., 'not_found', 'unauthorized') */
|
|
534
|
+
code;
|
|
535
|
+
constructor(message, httpStatus, code) {
|
|
536
|
+
super(message);
|
|
537
|
+
this.name = "ProteosError";
|
|
538
|
+
this.httpStatus = httpStatus;
|
|
539
|
+
this.code = code;
|
|
540
|
+
const v8Capture = Error.captureStackTrace;
|
|
541
|
+
if (v8Capture) v8Capture(this, this.constructor);
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Returns a formatted string representation of the error.
|
|
545
|
+
*/
|
|
546
|
+
toString() {
|
|
547
|
+
return `${this.code}: ${this.message} (HTTP ${this.httpStatus})`;
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
function isProteosError(error) {
|
|
551
|
+
return error instanceof ProteosError;
|
|
552
|
+
}
|
|
553
|
+
function isNotFound(error) {
|
|
554
|
+
return isProteosError(error) && error.httpStatus === 404;
|
|
555
|
+
}
|
|
556
|
+
function isUnauthorized(error) {
|
|
557
|
+
return isProteosError(error) && error.httpStatus === 401;
|
|
558
|
+
}
|
|
559
|
+
function isForbidden(error) {
|
|
560
|
+
return isProteosError(error) && error.httpStatus === 403;
|
|
561
|
+
}
|
|
562
|
+
function isBadRequest(error) {
|
|
563
|
+
return isProteosError(error) && error.httpStatus === 400;
|
|
564
|
+
}
|
|
565
|
+
function isConflict(error) {
|
|
566
|
+
return isProteosError(error) && error.httpStatus === 409;
|
|
567
|
+
}
|
|
568
|
+
function getDefaultErrorCode(httpStatus) {
|
|
569
|
+
switch (httpStatus) {
|
|
570
|
+
case 400:
|
|
571
|
+
return ErrorCode.BAD_REQUEST;
|
|
572
|
+
case 401:
|
|
573
|
+
return ErrorCode.UNAUTHORIZED;
|
|
574
|
+
case 403:
|
|
575
|
+
return ErrorCode.FORBIDDEN;
|
|
576
|
+
case 404:
|
|
577
|
+
return ErrorCode.NOT_FOUND;
|
|
578
|
+
case 409:
|
|
579
|
+
return ErrorCode.CONFLICT;
|
|
580
|
+
default:
|
|
581
|
+
return ErrorCode.INTERNAL_SERVER_ERROR;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
async function parseErrorResponse(response) {
|
|
585
|
+
const httpStatus = response.status;
|
|
586
|
+
let code = getDefaultErrorCode(httpStatus);
|
|
587
|
+
let message = "Unknown error";
|
|
588
|
+
try {
|
|
589
|
+
const body = await response.text();
|
|
590
|
+
try {
|
|
591
|
+
const json = JSON.parse(body);
|
|
592
|
+
if (json.code) {
|
|
593
|
+
code = json.code;
|
|
594
|
+
}
|
|
595
|
+
if (json.message) {
|
|
596
|
+
message = json.message;
|
|
597
|
+
} else {
|
|
598
|
+
message = body || `HTTP ${httpStatus}`;
|
|
599
|
+
}
|
|
600
|
+
} catch {
|
|
601
|
+
message = body.trim() || `HTTP ${httpStatus}`;
|
|
602
|
+
}
|
|
603
|
+
} catch {
|
|
604
|
+
message = `HTTP ${httpStatus}`;
|
|
605
|
+
}
|
|
606
|
+
return new ProteosError(message, httpStatus, code);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
// src/auth/shares.ts
|
|
610
|
+
var PLATFORM_ENTITY_SERVICE = {
|
|
611
|
+
// Agent suite (agent-service)
|
|
612
|
+
agents: "/agents",
|
|
613
|
+
prompts: "/agents",
|
|
614
|
+
skills: "/agents",
|
|
615
|
+
tools: "/agents",
|
|
616
|
+
toolsets: "/agents",
|
|
617
|
+
"mcp-servers": "/agents",
|
|
618
|
+
// Knowledge (knowledge-service)
|
|
619
|
+
"knowledge-spaces": "/knowledge",
|
|
620
|
+
"knowledge-nodes": "/knowledge",
|
|
621
|
+
// Conversations (conversation-service)
|
|
622
|
+
conversations: "/conversations",
|
|
623
|
+
connections: "/conversations"
|
|
624
|
+
};
|
|
625
|
+
var SERVICES_WITH_SHARING = /* @__PURE__ */ new Set(["/data", "/knowledge"]);
|
|
626
|
+
var DEFAULT_SERVICE = "/data";
|
|
627
|
+
function shareRouteFor(entitySlug) {
|
|
628
|
+
const service = PLATFORM_ENTITY_SERVICE[entitySlug] ?? DEFAULT_SERVICE;
|
|
629
|
+
if (!SERVICES_WITH_SHARING.has(service)) {
|
|
630
|
+
throw new ProteosError(
|
|
631
|
+
`Sharing is not available for '${entitySlug}' yet \u2014 ${service.slice(1)}-service does not serve a share endpoint.`,
|
|
632
|
+
501,
|
|
633
|
+
"sharing_not_supported"
|
|
634
|
+
);
|
|
635
|
+
}
|
|
636
|
+
return `${service}/v1/shares`;
|
|
637
|
+
}
|
|
638
|
+
function isShareable(entitySlug) {
|
|
639
|
+
const service = PLATFORM_ENTITY_SERVICE[entitySlug] ?? DEFAULT_SERVICE;
|
|
640
|
+
return SERVICES_WITH_SHARING.has(service);
|
|
641
|
+
}
|
|
642
|
+
var ShareServiceImpl = class {
|
|
643
|
+
constructor(client) {
|
|
644
|
+
this.client = client;
|
|
645
|
+
}
|
|
646
|
+
client;
|
|
647
|
+
async share(entitySlug, recordId, principal, permission) {
|
|
648
|
+
await this.client.request("POST", shareRouteFor(entitySlug), {
|
|
649
|
+
entity_slug: entitySlug,
|
|
650
|
+
record_id: recordId,
|
|
651
|
+
principal,
|
|
652
|
+
permission
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
async unshare(entitySlug, recordId, principal, permission) {
|
|
656
|
+
await this.client.request("DELETE", shareRouteFor(entitySlug), {
|
|
657
|
+
entity_slug: entitySlug,
|
|
658
|
+
record_id: recordId,
|
|
659
|
+
principal,
|
|
660
|
+
permission
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
async listShares(entitySlug, recordId) {
|
|
664
|
+
const query = new URLSearchParams({ entity_slug: entitySlug, record_id: recordId });
|
|
665
|
+
const response = await this.client.request(
|
|
666
|
+
"GET",
|
|
667
|
+
`${shareRouteFor(entitySlug)}?${query.toString()}`
|
|
668
|
+
);
|
|
669
|
+
return response.shares ?? [];
|
|
670
|
+
}
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
// src/auth/teams.ts
|
|
674
|
+
var TEAMS_BASE_PATH = "/accounts/v1/teams";
|
|
675
|
+
var TeamServiceImpl = class {
|
|
676
|
+
constructor(client) {
|
|
677
|
+
this.client = client;
|
|
678
|
+
}
|
|
679
|
+
client;
|
|
680
|
+
list(options = {}) {
|
|
681
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
682
|
+
}
|
|
683
|
+
async listPage(options = {}) {
|
|
684
|
+
return this.client.requestWithQuery("GET", TEAMS_BASE_PATH, options);
|
|
685
|
+
}
|
|
686
|
+
async get(slug) {
|
|
687
|
+
return this.client.request("GET", `${TEAMS_BASE_PATH}/${slug}`);
|
|
688
|
+
}
|
|
689
|
+
async create(request) {
|
|
690
|
+
return this.client.request("POST", TEAMS_BASE_PATH, request);
|
|
691
|
+
}
|
|
692
|
+
async update(slug, request) {
|
|
693
|
+
return this.client.request("PATCH", `${TEAMS_BASE_PATH}/${slug}`, request);
|
|
694
|
+
}
|
|
695
|
+
async delete(slug) {
|
|
696
|
+
await this.client.request("DELETE", `${TEAMS_BASE_PATH}/${slug}`);
|
|
697
|
+
}
|
|
698
|
+
getMembers(slug, options = {}) {
|
|
699
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.fetchMembersPage(slug, opts), options);
|
|
700
|
+
}
|
|
701
|
+
async addMember(slug, request) {
|
|
702
|
+
return this.client.request("POST", `${TEAMS_BASE_PATH}/${slug}/members`, request);
|
|
703
|
+
}
|
|
704
|
+
async removeMember(slug, userId) {
|
|
705
|
+
await this.client.request("DELETE", `${TEAMS_BASE_PATH}/${slug}/members/${userId}`);
|
|
706
|
+
}
|
|
707
|
+
async fetchMembersPage(slug, options) {
|
|
708
|
+
return this.client.requestWithQuery(
|
|
709
|
+
"GET",
|
|
710
|
+
`${TEAMS_BASE_PATH}/${slug}/members`,
|
|
711
|
+
options
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
|
|
716
|
+
// src/auth/user-role-assignments.ts
|
|
717
|
+
var USER_ROLE_ASSIGNMENTS_BASE_PATH = "/accounts/v1/user-role-assignments";
|
|
718
|
+
var UserRoleAssignmentServiceImpl = class {
|
|
719
|
+
constructor(client) {
|
|
720
|
+
this.client = client;
|
|
721
|
+
}
|
|
722
|
+
client;
|
|
723
|
+
list(options = {}) {
|
|
724
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
725
|
+
}
|
|
726
|
+
async listPage(options = {}) {
|
|
727
|
+
return this.client.requestWithQuery(
|
|
728
|
+
"GET",
|
|
729
|
+
USER_ROLE_ASSIGNMENTS_BASE_PATH,
|
|
730
|
+
options
|
|
731
|
+
);
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
|
|
516
735
|
// src/auth/users.ts
|
|
517
736
|
var USERS_BASE_PATH = "/accounts/v1/users";
|
|
518
737
|
var UserServiceImpl = class {
|
|
@@ -521,7 +740,7 @@ var UserServiceImpl = class {
|
|
|
521
740
|
}
|
|
522
741
|
client;
|
|
523
742
|
list(options = {}) {
|
|
524
|
-
return new
|
|
743
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
525
744
|
}
|
|
526
745
|
async listPage(options = {}) {
|
|
527
746
|
return this.client.requestWithQuery("GET", USERS_BASE_PATH, options);
|
|
@@ -536,7 +755,7 @@ var UserServiceImpl = class {
|
|
|
536
755
|
return this.client.request("PATCH", `${USERS_BASE_PATH}/${id}`, request);
|
|
537
756
|
}
|
|
538
757
|
getRoles(userId, options = {}) {
|
|
539
|
-
return new
|
|
758
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.fetchRolesPage(userId, opts), options);
|
|
540
759
|
}
|
|
541
760
|
async assignRole(userId, request) {
|
|
542
761
|
return this.client.request(
|
|
@@ -582,6 +801,12 @@ var PLATFORM_ENTITIES = [
|
|
|
582
801
|
{ slug: "roles", name: "Roles" },
|
|
583
802
|
{ slug: "user-role-assignments", name: "User Role Assignments" },
|
|
584
803
|
{ slug: "role-entity-permissions", name: "Role Entity Permissions" },
|
|
804
|
+
// Teams are the org's structure and a principal that can hold access anywhere
|
|
805
|
+
// a user can. Membership is a separate slug: seeing the org chart and changing
|
|
806
|
+
// who is in it are different decisions, and membership is what moves access.
|
|
807
|
+
{ slug: "teams", name: "Teams" },
|
|
808
|
+
{ slug: "team-members", name: "Team Members" },
|
|
809
|
+
// The share audit trail — a distinct grant from the resources it references.
|
|
585
810
|
// Schema / content (metadata-service)
|
|
586
811
|
{ slug: "entities", name: "Entities" },
|
|
587
812
|
{ slug: "pages", name: "Pages" },
|
|
@@ -607,6 +832,7 @@ var PLATFORM_ENTITIES = [
|
|
|
607
832
|
{ slug: "knowledge-nodes", name: "Knowledge Nodes" },
|
|
608
833
|
{ slug: "knowledge-links", name: "Knowledge Links" },
|
|
609
834
|
{ slug: "knowledge-labels", name: "Knowledge Labels" },
|
|
835
|
+
{ slug: "knowledge-spaces", name: "Knowledge Spaces" },
|
|
610
836
|
// Agent suite (agent-service)
|
|
611
837
|
{ slug: "agents", name: "Agents" },
|
|
612
838
|
{ slug: "prompts", name: "Prompts" },
|
|
@@ -630,6 +856,17 @@ var PLATFORM_ENTITIES = [
|
|
|
630
856
|
{ slug: "glossary-terms", name: "Glossary Terms" },
|
|
631
857
|
// Mistranscribed terms proposed by the post-transcription review pass.
|
|
632
858
|
{ slug: "mistranscribed-terms", name: "Mistranscribed Terms" },
|
|
859
|
+
// The person-level identity layer (contacts + addresses + merges + consent +
|
|
860
|
+
// erasure) — one grant governs the whole aggregate.
|
|
861
|
+
{ slug: "contacts", name: "Contacts" },
|
|
862
|
+
// Ingest-time filter rules + their drop-audit events.
|
|
863
|
+
{ slug: "conversation-filters", name: "Conversation Filters" },
|
|
864
|
+
// The org's conversation taxonomy (read by the pre-summary classifier).
|
|
865
|
+
{ slug: "conversation-types", name: "Conversation Types" },
|
|
866
|
+
// Generic org-shared audience taxonomy; membership lives on the contact.
|
|
867
|
+
{ slug: "contact-groups", name: "Contact Groups" },
|
|
868
|
+
// Tone-of-voice synthesis: per-user setups + generated instruction profiles.
|
|
869
|
+
{ slug: "tone-profiles", name: "Tone Profiles" },
|
|
633
870
|
// Connectors (connector-service). `connections` above is shared; this is the
|
|
634
871
|
// manifest catalog.
|
|
635
872
|
{ slug: "connectors", name: "Connectors" }
|
|
@@ -637,30 +874,32 @@ var PLATFORM_ENTITIES = [
|
|
|
637
874
|
var PLATFORM_ENTITY_SLUGS = PLATFORM_ENTITIES.map(
|
|
638
875
|
(entity) => entity.slug
|
|
639
876
|
);
|
|
877
|
+
var SCOPED_PLATFORM_ENTITY_SLUGS = ["knowledge-nodes"];
|
|
640
878
|
function isPlatformEntity(slug) {
|
|
641
879
|
return PLATFORM_ENTITY_SLUGS.includes(slug);
|
|
642
880
|
}
|
|
643
|
-
var RoleEntityPermissionSchema =
|
|
881
|
+
var RoleEntityPermissionSchema = chunkF5DHWOGW_cjs.AuditFieldsSchema.extend({
|
|
644
882
|
id: zod.z.string(),
|
|
645
883
|
role_slug: zod.z.string(),
|
|
646
884
|
entity_slug: zod.z.string(),
|
|
647
|
-
permission: zod.z.enum(["read", "write", "delete"])
|
|
885
|
+
permission: zod.z.enum(["read", "write", "delete", "read_scoped", "write_scoped", "delete_scoped"])
|
|
648
886
|
});
|
|
649
|
-
var UserRoleAssignmentSchema =
|
|
887
|
+
var UserRoleAssignmentSchema = chunkF5DHWOGW_cjs.AuditFieldsSchema.extend({
|
|
650
888
|
id: zod.z.string(),
|
|
651
889
|
user_id: zod.z.string(),
|
|
652
890
|
role_slug: zod.z.string(),
|
|
653
891
|
org_id: zod.z.string()
|
|
654
892
|
});
|
|
655
|
-
var UserSchema =
|
|
893
|
+
var UserSchema = chunkF5DHWOGW_cjs.AuditFieldsSchema.extend({
|
|
656
894
|
id: zod.z.string(),
|
|
657
895
|
email: zod.z.string(),
|
|
658
896
|
given_name: zod.z.string(),
|
|
659
897
|
family_name: zod.z.string(),
|
|
660
898
|
external_id: zod.z.string(),
|
|
661
|
-
default_org_id: zod.z.string()
|
|
899
|
+
default_org_id: zod.z.string(),
|
|
900
|
+
profile_image: chunkF5DHWOGW_cjs.FileRefSchema.nullish()
|
|
662
901
|
});
|
|
663
|
-
|
|
902
|
+
chunkF5DHWOGW_cjs.AuditFieldsSchema.extend({
|
|
664
903
|
id: zod.z.string(),
|
|
665
904
|
user_id: zod.z.string(),
|
|
666
905
|
org_id: zod.z.string(),
|
|
@@ -670,17 +909,37 @@ chunk33EULWIM_cjs.AuditFieldsSchema.extend({
|
|
|
670
909
|
expires_at: zod.z.string().nullable(),
|
|
671
910
|
last_used_at: zod.z.string().nullable()
|
|
672
911
|
});
|
|
673
|
-
var RoleSchema =
|
|
912
|
+
var RoleSchema = chunkF5DHWOGW_cjs.AuditFieldsSchema.extend({
|
|
674
913
|
slug: zod.z.string(),
|
|
675
914
|
name: zod.z.string(),
|
|
676
915
|
org_id: zod.z.string(),
|
|
677
916
|
description: zod.z.string()
|
|
678
917
|
});
|
|
679
|
-
|
|
918
|
+
chunkF5DHWOGW_cjs.AuditFieldsSchema.extend({
|
|
919
|
+
slug: zod.z.string(),
|
|
920
|
+
name: zod.z.string(),
|
|
921
|
+
org_id: zod.z.string(),
|
|
922
|
+
description: zod.z.string(),
|
|
923
|
+
parent_team_slug: zod.z.string()
|
|
924
|
+
});
|
|
925
|
+
chunkF5DHWOGW_cjs.AuditFieldsSchema.extend({
|
|
926
|
+
id: zod.z.string(),
|
|
927
|
+
org_id: zod.z.string(),
|
|
928
|
+
team_slug: zod.z.string(),
|
|
929
|
+
user_id: zod.z.string()
|
|
930
|
+
});
|
|
931
|
+
var OrganizationSchema = chunkF5DHWOGW_cjs.AuditFieldsSchema.extend({
|
|
680
932
|
id: zod.z.string(),
|
|
681
933
|
name: zod.z.string(),
|
|
682
934
|
description: zod.z.string()
|
|
683
935
|
});
|
|
936
|
+
var SharePermissionSchema = zod.z.enum(["read", "write", "delete"]);
|
|
937
|
+
zod.z.object({
|
|
938
|
+
entity_slug: zod.z.string(),
|
|
939
|
+
record_id: zod.z.string(),
|
|
940
|
+
principal: chunkF5DHWOGW_cjs.PrincipalRefSchema,
|
|
941
|
+
permission: SharePermissionSchema
|
|
942
|
+
});
|
|
684
943
|
|
|
685
944
|
// src/auth/index.ts
|
|
686
945
|
var AccountClient = class {
|
|
@@ -696,10 +955,28 @@ var AccountClient = class {
|
|
|
696
955
|
* Service for managing roles and their entity permissions.
|
|
697
956
|
*/
|
|
698
957
|
roles;
|
|
958
|
+
/**
|
|
959
|
+
* Service for the org-wide user-role-assignment listing ("who holds which
|
|
960
|
+
* role" in one request).
|
|
961
|
+
*/
|
|
962
|
+
userRoleAssignments;
|
|
699
963
|
/**
|
|
700
964
|
* Service for managing organizations.
|
|
701
965
|
*/
|
|
702
966
|
organizations;
|
|
967
|
+
/**
|
|
968
|
+
* Service for managing teams and their membership.
|
|
969
|
+
*/
|
|
970
|
+
teams;
|
|
971
|
+
/**
|
|
972
|
+
* Service for sharing individual resources with a principal.
|
|
973
|
+
*
|
|
974
|
+
* Lives here rather than on the owning resource's client because sharing is
|
|
975
|
+
* ONE concept across every resource type — a deal, a conversation, a
|
|
976
|
+
* knowledge space. Callers name an entity; which service handles the write is
|
|
977
|
+
* the SDK's problem, so centralizing it server-side later moves no caller.
|
|
978
|
+
*/
|
|
979
|
+
shares;
|
|
703
980
|
/**
|
|
704
981
|
* Creates a new AccountClient instance.
|
|
705
982
|
*
|
|
@@ -709,100 +986,13 @@ var AccountClient = class {
|
|
|
709
986
|
this.me = new MeServiceImpl(client);
|
|
710
987
|
this.users = new UserServiceImpl(client);
|
|
711
988
|
this.roles = new RoleServiceImpl(client);
|
|
989
|
+
this.userRoleAssignments = new UserRoleAssignmentServiceImpl(client);
|
|
712
990
|
this.organizations = new OrganizationServiceImpl(client);
|
|
991
|
+
this.teams = new TeamServiceImpl(client);
|
|
992
|
+
this.shares = new ShareServiceImpl(client);
|
|
713
993
|
}
|
|
714
994
|
};
|
|
715
995
|
|
|
716
|
-
// src/errors.ts
|
|
717
|
-
var ErrorCode = {
|
|
718
|
-
NOT_FOUND: "not_found",
|
|
719
|
-
UNAUTHORIZED: "unauthorized",
|
|
720
|
-
FORBIDDEN: "forbidden",
|
|
721
|
-
BAD_REQUEST: "bad_request",
|
|
722
|
-
CONFLICT: "conflict",
|
|
723
|
-
INTERNAL_SERVER_ERROR: "internal_server_error",
|
|
724
|
-
INVALID_PAYLOAD: "invalid_payload",
|
|
725
|
-
INVALID_PERSONA: "invalid_persona"
|
|
726
|
-
};
|
|
727
|
-
var ProteosError = class extends Error {
|
|
728
|
-
/** HTTP status code of the response */
|
|
729
|
-
httpStatus;
|
|
730
|
-
/** API error code (e.g., 'not_found', 'unauthorized') */
|
|
731
|
-
code;
|
|
732
|
-
constructor(message, httpStatus, code) {
|
|
733
|
-
super(message);
|
|
734
|
-
this.name = "ProteosError";
|
|
735
|
-
this.httpStatus = httpStatus;
|
|
736
|
-
this.code = code;
|
|
737
|
-
const v8Capture = Error.captureStackTrace;
|
|
738
|
-
if (v8Capture) v8Capture(this, this.constructor);
|
|
739
|
-
}
|
|
740
|
-
/**
|
|
741
|
-
* Returns a formatted string representation of the error.
|
|
742
|
-
*/
|
|
743
|
-
toString() {
|
|
744
|
-
return `${this.code}: ${this.message} (HTTP ${this.httpStatus})`;
|
|
745
|
-
}
|
|
746
|
-
};
|
|
747
|
-
function isProteosError(error) {
|
|
748
|
-
return error instanceof ProteosError;
|
|
749
|
-
}
|
|
750
|
-
function isNotFound(error) {
|
|
751
|
-
return isProteosError(error) && error.httpStatus === 404;
|
|
752
|
-
}
|
|
753
|
-
function isUnauthorized(error) {
|
|
754
|
-
return isProteosError(error) && error.httpStatus === 401;
|
|
755
|
-
}
|
|
756
|
-
function isForbidden(error) {
|
|
757
|
-
return isProteosError(error) && error.httpStatus === 403;
|
|
758
|
-
}
|
|
759
|
-
function isBadRequest(error) {
|
|
760
|
-
return isProteosError(error) && error.httpStatus === 400;
|
|
761
|
-
}
|
|
762
|
-
function isConflict(error) {
|
|
763
|
-
return isProteosError(error) && error.httpStatus === 409;
|
|
764
|
-
}
|
|
765
|
-
function getDefaultErrorCode(httpStatus) {
|
|
766
|
-
switch (httpStatus) {
|
|
767
|
-
case 400:
|
|
768
|
-
return ErrorCode.BAD_REQUEST;
|
|
769
|
-
case 401:
|
|
770
|
-
return ErrorCode.UNAUTHORIZED;
|
|
771
|
-
case 403:
|
|
772
|
-
return ErrorCode.FORBIDDEN;
|
|
773
|
-
case 404:
|
|
774
|
-
return ErrorCode.NOT_FOUND;
|
|
775
|
-
case 409:
|
|
776
|
-
return ErrorCode.CONFLICT;
|
|
777
|
-
default:
|
|
778
|
-
return ErrorCode.INTERNAL_SERVER_ERROR;
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
async function parseErrorResponse(response) {
|
|
782
|
-
const httpStatus = response.status;
|
|
783
|
-
let code = getDefaultErrorCode(httpStatus);
|
|
784
|
-
let message = "Unknown error";
|
|
785
|
-
try {
|
|
786
|
-
const body = await response.text();
|
|
787
|
-
try {
|
|
788
|
-
const json = JSON.parse(body);
|
|
789
|
-
if (json.code) {
|
|
790
|
-
code = json.code;
|
|
791
|
-
}
|
|
792
|
-
if (json.message) {
|
|
793
|
-
message = json.message;
|
|
794
|
-
} else {
|
|
795
|
-
message = body || `HTTP ${httpStatus}`;
|
|
796
|
-
}
|
|
797
|
-
} catch {
|
|
798
|
-
message = body.trim() || `HTTP ${httpStatus}`;
|
|
799
|
-
}
|
|
800
|
-
} catch {
|
|
801
|
-
message = `HTTP ${httpStatus}`;
|
|
802
|
-
}
|
|
803
|
-
return new ProteosError(message, httpStatus, code);
|
|
804
|
-
}
|
|
805
|
-
|
|
806
996
|
// src/http/query-params.ts
|
|
807
997
|
function toQueryParams(obj) {
|
|
808
998
|
const params = new URLSearchParams();
|
|
@@ -1985,7 +2175,7 @@ var RecordServiceImpl = class {
|
|
|
1985
2175
|
}
|
|
1986
2176
|
client;
|
|
1987
2177
|
list(entitySlug, options = {}) {
|
|
1988
|
-
return new
|
|
2178
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(entitySlug, opts), options);
|
|
1989
2179
|
}
|
|
1990
2180
|
async listPage(entitySlug, options = {}) {
|
|
1991
2181
|
return this.client.requestWithQuery(
|
|
@@ -2018,7 +2208,7 @@ var RecordServiceImpl = class {
|
|
|
2018
2208
|
);
|
|
2019
2209
|
}
|
|
2020
2210
|
listPublic(orgId, entitySlug, options = {}) {
|
|
2021
|
-
return new
|
|
2211
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPublicPage(orgId, entitySlug, opts), options);
|
|
2022
2212
|
}
|
|
2023
2213
|
async listPublicPage(orgId, entitySlug, options = {}) {
|
|
2024
2214
|
return this.client.requestWithQuery(
|
|
@@ -2177,7 +2367,7 @@ var ActionServiceImpl = class {
|
|
|
2177
2367
|
}
|
|
2178
2368
|
client;
|
|
2179
2369
|
list(options = {}) {
|
|
2180
|
-
return new
|
|
2370
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2181
2371
|
}
|
|
2182
2372
|
async listPage(options = {}) {
|
|
2183
2373
|
return this.client.requestWithQuery("GET", ACTIONS_BASE_PATH, options);
|
|
@@ -2212,7 +2402,7 @@ var ActionServiceImpl = class {
|
|
|
2212
2402
|
}
|
|
2213
2403
|
};
|
|
2214
2404
|
var ActionScopeSchema = zod.z.enum(["entity", "global"]);
|
|
2215
|
-
var ActionSchema =
|
|
2405
|
+
var ActionSchema = chunkF5DHWOGW_cjs.AuditFieldsSchema.extend({
|
|
2216
2406
|
slug: zod.z.string(),
|
|
2217
2407
|
org_id: zod.z.string(),
|
|
2218
2408
|
module_slug: zod.z.string(),
|
|
@@ -2221,8 +2411,8 @@ var ActionSchema = chunk33EULWIM_cjs.AuditFieldsSchema.extend({
|
|
|
2221
2411
|
name: zod.z.string(),
|
|
2222
2412
|
is_active: zod.z.boolean(),
|
|
2223
2413
|
file_id: zod.z.string(),
|
|
2224
|
-
params: zod.z.array(
|
|
2225
|
-
returns: zod.z.array(
|
|
2414
|
+
params: zod.z.array(chunkF5DHWOGW_cjs.AttributeSchema),
|
|
2415
|
+
returns: zod.z.array(chunkF5DHWOGW_cjs.AttributeSchema)
|
|
2226
2416
|
});
|
|
2227
2417
|
|
|
2228
2418
|
// src/functions/index.ts
|
|
@@ -2245,6 +2435,9 @@ var GraphServiceImpl = class {
|
|
|
2245
2435
|
if (options.label_ids && options.label_ids.length > 0) {
|
|
2246
2436
|
query.label_ids = options.label_ids.join(",");
|
|
2247
2437
|
}
|
|
2438
|
+
if (options.space_slugs && options.space_slugs.length > 0) {
|
|
2439
|
+
query.space_slugs = options.space_slugs.join(",");
|
|
2440
|
+
}
|
|
2248
2441
|
return this.client.requestWithQuery("GET", GRAPH_BASE_PATH, query);
|
|
2249
2442
|
}
|
|
2250
2443
|
};
|
|
@@ -2257,7 +2450,7 @@ var LabelServiceImpl = class {
|
|
|
2257
2450
|
}
|
|
2258
2451
|
client;
|
|
2259
2452
|
list(options = {}) {
|
|
2260
|
-
return new
|
|
2453
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2261
2454
|
}
|
|
2262
2455
|
async listPage(options = {}) {
|
|
2263
2456
|
return this.client.requestWithQuery(
|
|
@@ -2288,7 +2481,7 @@ var LinkServiceImpl = class {
|
|
|
2288
2481
|
}
|
|
2289
2482
|
client;
|
|
2290
2483
|
list(options = {}) {
|
|
2291
|
-
return new
|
|
2484
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2292
2485
|
}
|
|
2293
2486
|
async listPage(options = {}) {
|
|
2294
2487
|
return this.client.requestWithQuery("GET", LINKS_BASE_PATH, options);
|
|
@@ -2315,14 +2508,17 @@ var NodeServiceImpl = class {
|
|
|
2315
2508
|
}
|
|
2316
2509
|
client;
|
|
2317
2510
|
list(options = {}) {
|
|
2318
|
-
return new
|
|
2511
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2319
2512
|
}
|
|
2320
2513
|
async listPage(options = {}) {
|
|
2321
|
-
const { label_ids, ...rest } = options;
|
|
2514
|
+
const { label_ids, space_slugs, ...rest } = options;
|
|
2322
2515
|
const query = { ...rest };
|
|
2323
2516
|
if (label_ids && label_ids.length > 0) {
|
|
2324
2517
|
query.label_ids = label_ids.join(",");
|
|
2325
2518
|
}
|
|
2519
|
+
if (space_slugs && space_slugs.length > 0) {
|
|
2520
|
+
query.space_slugs = space_slugs.join(",");
|
|
2521
|
+
}
|
|
2326
2522
|
return this.client.requestWithQuery(
|
|
2327
2523
|
"GET",
|
|
2328
2524
|
NODES_BASE_PATH,
|
|
@@ -2401,6 +2597,37 @@ var NodeServiceImpl = class {
|
|
|
2401
2597
|
}
|
|
2402
2598
|
};
|
|
2403
2599
|
|
|
2600
|
+
// src/knowledge/spaces.ts
|
|
2601
|
+
var SPACES_BASE_PATH = "/knowledge/v1/spaces";
|
|
2602
|
+
var SpaceServiceImpl = class {
|
|
2603
|
+
constructor(client) {
|
|
2604
|
+
this.client = client;
|
|
2605
|
+
}
|
|
2606
|
+
client;
|
|
2607
|
+
list(options = {}) {
|
|
2608
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2609
|
+
}
|
|
2610
|
+
async listPage(options = {}) {
|
|
2611
|
+
return this.client.requestWithQuery(
|
|
2612
|
+
"GET",
|
|
2613
|
+
SPACES_BASE_PATH,
|
|
2614
|
+
options
|
|
2615
|
+
);
|
|
2616
|
+
}
|
|
2617
|
+
async get(slug) {
|
|
2618
|
+
return this.client.request("GET", `${SPACES_BASE_PATH}/${slug}`);
|
|
2619
|
+
}
|
|
2620
|
+
async create(request) {
|
|
2621
|
+
return this.client.request("POST", SPACES_BASE_PATH, request);
|
|
2622
|
+
}
|
|
2623
|
+
async update(slug, request) {
|
|
2624
|
+
return this.client.request("PATCH", `${SPACES_BASE_PATH}/${slug}`, request);
|
|
2625
|
+
}
|
|
2626
|
+
async delete(slug) {
|
|
2627
|
+
await this.client.request("DELETE", `${SPACES_BASE_PATH}/${slug}`);
|
|
2628
|
+
}
|
|
2629
|
+
};
|
|
2630
|
+
|
|
2404
2631
|
// src/knowledge/record-links.ts
|
|
2405
2632
|
var RECORD_LINKS_BASE_PATH = "/knowledge/v1/record-links";
|
|
2406
2633
|
var RecordLinkServiceImpl = class {
|
|
@@ -2409,7 +2636,7 @@ var RecordLinkServiceImpl = class {
|
|
|
2409
2636
|
}
|
|
2410
2637
|
client;
|
|
2411
2638
|
list(options = {}) {
|
|
2412
|
-
return new
|
|
2639
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2413
2640
|
}
|
|
2414
2641
|
async listPage(options = {}) {
|
|
2415
2642
|
return this.client.requestWithQuery(
|
|
@@ -2428,6 +2655,7 @@ var RecordLinkServiceImpl = class {
|
|
|
2428
2655
|
await this.client.request("DELETE", `${RECORD_LINKS_BASE_PATH}/${id}`);
|
|
2429
2656
|
}
|
|
2430
2657
|
};
|
|
2658
|
+
var UNASSIGNED_SPACE_SLUG = "__unassigned__";
|
|
2431
2659
|
var KnowledgeNodeMetadataSchema = zod.z.object({
|
|
2432
2660
|
id: zod.z.string(),
|
|
2433
2661
|
org_id: zod.z.string(),
|
|
@@ -2441,7 +2669,7 @@ var KnowledgeNodeMetadataSchema = zod.z.object({
|
|
|
2441
2669
|
summary: zod.z.string().nullish(),
|
|
2442
2670
|
valid_from: zod.z.string().nullish(),
|
|
2443
2671
|
valid_until: zod.z.string().nullish()
|
|
2444
|
-
}).merge(
|
|
2672
|
+
}).merge(chunkF5DHWOGW_cjs.AuditFieldsSchema);
|
|
2445
2673
|
var KnowledgeNodeSchema = KnowledgeNodeMetadataSchema.extend({
|
|
2446
2674
|
content: zod.z.string()
|
|
2447
2675
|
});
|
|
@@ -2465,7 +2693,7 @@ var KnowledgeLinkSchema = zod.z.object({
|
|
|
2465
2693
|
"superseded_by"
|
|
2466
2694
|
]),
|
|
2467
2695
|
description: zod.z.string().nullish()
|
|
2468
|
-
}).merge(
|
|
2696
|
+
}).merge(chunkF5DHWOGW_cjs.AuditFieldsSchema);
|
|
2469
2697
|
var KnowledgeRecordLinkSchema = zod.z.object({
|
|
2470
2698
|
id: zod.z.string(),
|
|
2471
2699
|
org_id: zod.z.string(),
|
|
@@ -2473,7 +2701,7 @@ var KnowledgeRecordLinkSchema = zod.z.object({
|
|
|
2473
2701
|
entity_slug: zod.z.string(),
|
|
2474
2702
|
record_id: zod.z.string(),
|
|
2475
2703
|
created_at: zod.z.string(),
|
|
2476
|
-
created_by:
|
|
2704
|
+
created_by: chunkF5DHWOGW_cjs.UserRefSchema
|
|
2477
2705
|
});
|
|
2478
2706
|
var KnowledgeLabelSchema = zod.z.object({
|
|
2479
2707
|
id: zod.z.string(),
|
|
@@ -2483,13 +2711,13 @@ var KnowledgeLabelSchema = zod.z.object({
|
|
|
2483
2711
|
description: zod.z.string().nullish(),
|
|
2484
2712
|
color: zod.z.string().nullish(),
|
|
2485
2713
|
icon: zod.z.string().nullish()
|
|
2486
|
-
}).merge(
|
|
2714
|
+
}).merge(chunkF5DHWOGW_cjs.AuditFieldsSchema);
|
|
2487
2715
|
var KnowledgeNodeLabelSchema = zod.z.object({
|
|
2488
2716
|
org_id: zod.z.string(),
|
|
2489
2717
|
node_id: zod.z.string(),
|
|
2490
2718
|
label_id: zod.z.string(),
|
|
2491
2719
|
created_at: zod.z.string(),
|
|
2492
|
-
created_by:
|
|
2720
|
+
created_by: chunkF5DHWOGW_cjs.UserRefSchema
|
|
2493
2721
|
});
|
|
2494
2722
|
var NodeNeighborhoodSchema = zod.z.object({
|
|
2495
2723
|
nodes: zod.z.array(
|
|
@@ -2518,6 +2746,11 @@ var KnowledgeClient = class {
|
|
|
2518
2746
|
/** Node→record edges (links to data-service records): `knowledge.recordLinks`. */
|
|
2519
2747
|
recordLinks;
|
|
2520
2748
|
labels;
|
|
2749
|
+
/**
|
|
2750
|
+
* Knowledge spaces — the containers nodes live in: `knowledge.spaces`.
|
|
2751
|
+
* Access to a space is granted through `auth.shares`, not here.
|
|
2752
|
+
*/
|
|
2753
|
+
spaces;
|
|
2521
2754
|
/** Whole-org graph bulk read (radiant graph view): `knowledge.graph.get()`. */
|
|
2522
2755
|
graph;
|
|
2523
2756
|
constructor(client) {
|
|
@@ -2525,6 +2758,7 @@ var KnowledgeClient = class {
|
|
|
2525
2758
|
this.links = new LinkServiceImpl(client);
|
|
2526
2759
|
this.recordLinks = new RecordLinkServiceImpl(client);
|
|
2527
2760
|
this.labels = new LabelServiceImpl(client);
|
|
2761
|
+
this.spaces = new SpaceServiceImpl(client);
|
|
2528
2762
|
this.graph = new GraphServiceImpl(client);
|
|
2529
2763
|
}
|
|
2530
2764
|
};
|
|
@@ -2670,7 +2904,7 @@ var ExecutionServiceImpl = class {
|
|
|
2670
2904
|
}
|
|
2671
2905
|
client;
|
|
2672
2906
|
list(options = {}) {
|
|
2673
|
-
return new
|
|
2907
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2674
2908
|
}
|
|
2675
2909
|
async listPage(options = {}) {
|
|
2676
2910
|
return this.client.requestWithQuery(
|
|
@@ -2729,7 +2963,7 @@ var WorkflowServiceImpl = class {
|
|
|
2729
2963
|
}
|
|
2730
2964
|
client;
|
|
2731
2965
|
list(options = {}) {
|
|
2732
|
-
return new
|
|
2966
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2733
2967
|
}
|
|
2734
2968
|
async listPage(options = {}) {
|
|
2735
2969
|
return this.client.requestWithQuery("GET", WORKFLOWS_BASE_PATH2, options);
|
|
@@ -2767,7 +3001,7 @@ var WorkflowServiceImpl = class {
|
|
|
2767
3001
|
return this.client.request("POST", `${WORKFLOWS_BASE_PATH2}/${key}/unpause`, {});
|
|
2768
3002
|
}
|
|
2769
3003
|
listVersions(key, options = {}) {
|
|
2770
|
-
return new
|
|
3004
|
+
return new chunkF5DHWOGW_cjs.PageIterator((opts) => this.listVersionsPage(key, opts), options);
|
|
2771
3005
|
}
|
|
2772
3006
|
async listVersionsPage(key, options = {}) {
|
|
2773
3007
|
return this.client.requestWithQuery(
|
|
@@ -2812,195 +3046,207 @@ var WorkflowClient = class {
|
|
|
2812
3046
|
|
|
2813
3047
|
Object.defineProperty(exports, "AppSchema", {
|
|
2814
3048
|
enumerable: true,
|
|
2815
|
-
get: function () { return
|
|
3049
|
+
get: function () { return chunkF5DHWOGW_cjs.AppSchema; }
|
|
2816
3050
|
});
|
|
2817
3051
|
Object.defineProperty(exports, "AttributeSchema", {
|
|
2818
3052
|
enumerable: true,
|
|
2819
|
-
get: function () { return
|
|
3053
|
+
get: function () { return chunkF5DHWOGW_cjs.AttributeSchema; }
|
|
2820
3054
|
});
|
|
2821
3055
|
Object.defineProperty(exports, "AuditFieldsSchema", {
|
|
2822
3056
|
enumerable: true,
|
|
2823
|
-
get: function () { return
|
|
3057
|
+
get: function () { return chunkF5DHWOGW_cjs.AuditFieldsSchema; }
|
|
3058
|
+
});
|
|
3059
|
+
Object.defineProperty(exports, "CURRENT_USER_DEFAULT", {
|
|
3060
|
+
enumerable: true,
|
|
3061
|
+
get: function () { return chunkF5DHWOGW_cjs.CURRENT_USER_DEFAULT; }
|
|
2824
3062
|
});
|
|
2825
3063
|
Object.defineProperty(exports, "ColumnSchema", {
|
|
2826
3064
|
enumerable: true,
|
|
2827
|
-
get: function () { return
|
|
3065
|
+
get: function () { return chunkF5DHWOGW_cjs.ColumnSchema; }
|
|
2828
3066
|
});
|
|
2829
3067
|
Object.defineProperty(exports, "ComponentSchema", {
|
|
2830
3068
|
enumerable: true,
|
|
2831
|
-
get: function () { return
|
|
3069
|
+
get: function () { return chunkF5DHWOGW_cjs.ComponentSchema; }
|
|
2832
3070
|
});
|
|
2833
3071
|
Object.defineProperty(exports, "CurrencyAttributeMetaSchema", {
|
|
2834
3072
|
enumerable: true,
|
|
2835
|
-
get: function () { return
|
|
3073
|
+
get: function () { return chunkF5DHWOGW_cjs.CurrencyAttributeMetaSchema; }
|
|
2836
3074
|
});
|
|
2837
3075
|
Object.defineProperty(exports, "DEFAULT_PAGE_SIZE", {
|
|
2838
3076
|
enumerable: true,
|
|
2839
|
-
get: function () { return
|
|
3077
|
+
get: function () { return chunkF5DHWOGW_cjs.DEFAULT_PAGE_SIZE; }
|
|
2840
3078
|
});
|
|
2841
3079
|
Object.defineProperty(exports, "DONE", {
|
|
2842
3080
|
enumerable: true,
|
|
2843
|
-
get: function () { return
|
|
3081
|
+
get: function () { return chunkF5DHWOGW_cjs.DONE; }
|
|
2844
3082
|
});
|
|
2845
3083
|
Object.defineProperty(exports, "DesignReferenceSchema", {
|
|
2846
3084
|
enumerable: true,
|
|
2847
|
-
get: function () { return
|
|
3085
|
+
get: function () { return chunkF5DHWOGW_cjs.DesignReferenceSchema; }
|
|
2848
3086
|
});
|
|
2849
3087
|
Object.defineProperty(exports, "EntitySchema", {
|
|
2850
3088
|
enumerable: true,
|
|
2851
|
-
get: function () { return
|
|
3089
|
+
get: function () { return chunkF5DHWOGW_cjs.EntitySchema; }
|
|
2852
3090
|
});
|
|
2853
3091
|
Object.defineProperty(exports, "EntityWithSchemaSchema", {
|
|
2854
3092
|
enumerable: true,
|
|
2855
|
-
get: function () { return
|
|
3093
|
+
get: function () { return chunkF5DHWOGW_cjs.EntityWithSchemaSchema; }
|
|
2856
3094
|
});
|
|
2857
3095
|
Object.defineProperty(exports, "FileRefSchema", {
|
|
2858
3096
|
enumerable: true,
|
|
2859
|
-
get: function () { return
|
|
3097
|
+
get: function () { return chunkF5DHWOGW_cjs.FileRefSchema; }
|
|
2860
3098
|
});
|
|
2861
3099
|
Object.defineProperty(exports, "FilterElementSchema", {
|
|
2862
3100
|
enumerable: true,
|
|
2863
|
-
get: function () { return
|
|
3101
|
+
get: function () { return chunkF5DHWOGW_cjs.FilterElementSchema; }
|
|
2864
3102
|
});
|
|
2865
3103
|
Object.defineProperty(exports, "FilterGroupSchema", {
|
|
2866
3104
|
enumerable: true,
|
|
2867
|
-
get: function () { return
|
|
3105
|
+
get: function () { return chunkF5DHWOGW_cjs.FilterGroupSchema; }
|
|
2868
3106
|
});
|
|
2869
3107
|
Object.defineProperty(exports, "ListSchema", {
|
|
2870
3108
|
enumerable: true,
|
|
2871
|
-
get: function () { return
|
|
3109
|
+
get: function () { return chunkF5DHWOGW_cjs.ListSchema; }
|
|
2872
3110
|
});
|
|
2873
3111
|
Object.defineProperty(exports, "ListViewSchema", {
|
|
2874
3112
|
enumerable: true,
|
|
2875
|
-
get: function () { return
|
|
3113
|
+
get: function () { return chunkF5DHWOGW_cjs.ListViewSchema; }
|
|
2876
3114
|
});
|
|
2877
3115
|
Object.defineProperty(exports, "MenuConfigurationSchema", {
|
|
2878
3116
|
enumerable: true,
|
|
2879
|
-
get: function () { return
|
|
3117
|
+
get: function () { return chunkF5DHWOGW_cjs.MenuConfigurationSchema; }
|
|
2880
3118
|
});
|
|
2881
3119
|
Object.defineProperty(exports, "MenuItemSchema", {
|
|
2882
3120
|
enumerable: true,
|
|
2883
|
-
get: function () { return
|
|
3121
|
+
get: function () { return chunkF5DHWOGW_cjs.MenuItemSchema; }
|
|
2884
3122
|
});
|
|
2885
3123
|
Object.defineProperty(exports, "MenuItemType", {
|
|
2886
3124
|
enumerable: true,
|
|
2887
|
-
get: function () { return
|
|
3125
|
+
get: function () { return chunkF5DHWOGW_cjs.MenuItemType; }
|
|
2888
3126
|
});
|
|
2889
3127
|
Object.defineProperty(exports, "MetaClient", {
|
|
2890
3128
|
enumerable: true,
|
|
2891
|
-
get: function () { return
|
|
3129
|
+
get: function () { return chunkF5DHWOGW_cjs.MetaClient; }
|
|
2892
3130
|
});
|
|
2893
3131
|
Object.defineProperty(exports, "ModuleSchema", {
|
|
2894
3132
|
enumerable: true,
|
|
2895
|
-
get: function () { return
|
|
3133
|
+
get: function () { return chunkF5DHWOGW_cjs.ModuleSchema; }
|
|
2896
3134
|
});
|
|
2897
3135
|
Object.defineProperty(exports, "OnDeleteActionSchema", {
|
|
2898
3136
|
enumerable: true,
|
|
2899
|
-
get: function () { return
|
|
3137
|
+
get: function () { return chunkF5DHWOGW_cjs.OnDeleteActionSchema; }
|
|
2900
3138
|
});
|
|
2901
3139
|
Object.defineProperty(exports, "PLATFORM_ATTRIBUTE_NAMES", {
|
|
2902
3140
|
enumerable: true,
|
|
2903
|
-
get: function () { return
|
|
3141
|
+
get: function () { return chunkF5DHWOGW_cjs.PLATFORM_ATTRIBUTE_NAMES; }
|
|
2904
3142
|
});
|
|
2905
3143
|
Object.defineProperty(exports, "PLATFORM_USER_ID", {
|
|
2906
3144
|
enumerable: true,
|
|
2907
|
-
get: function () { return
|
|
3145
|
+
get: function () { return chunkF5DHWOGW_cjs.PLATFORM_USER_ID; }
|
|
2908
3146
|
});
|
|
2909
3147
|
Object.defineProperty(exports, "PageActionSchema", {
|
|
2910
3148
|
enumerable: true,
|
|
2911
|
-
get: function () { return
|
|
3149
|
+
get: function () { return chunkF5DHWOGW_cjs.PageActionSchema; }
|
|
2912
3150
|
});
|
|
2913
3151
|
Object.defineProperty(exports, "PageIterator", {
|
|
2914
3152
|
enumerable: true,
|
|
2915
|
-
get: function () { return
|
|
3153
|
+
get: function () { return chunkF5DHWOGW_cjs.PageIterator; }
|
|
2916
3154
|
});
|
|
2917
3155
|
Object.defineProperty(exports, "PageLayoutSchema", {
|
|
2918
3156
|
enumerable: true,
|
|
2919
|
-
get: function () { return
|
|
3157
|
+
get: function () { return chunkF5DHWOGW_cjs.PageLayoutSchema; }
|
|
2920
3158
|
});
|
|
2921
3159
|
Object.defineProperty(exports, "PageSchema", {
|
|
2922
3160
|
enumerable: true,
|
|
2923
|
-
get: function () { return
|
|
3161
|
+
get: function () { return chunkF5DHWOGW_cjs.PageSchema; }
|
|
2924
3162
|
});
|
|
2925
3163
|
Object.defineProperty(exports, "RelationAttributeMetaSchema", {
|
|
2926
3164
|
enumerable: true,
|
|
2927
|
-
get: function () { return
|
|
3165
|
+
get: function () { return chunkF5DHWOGW_cjs.RelationAttributeMetaSchema; }
|
|
2928
3166
|
});
|
|
2929
3167
|
Object.defineProperty(exports, "ResponseMetaSchema", {
|
|
2930
3168
|
enumerable: true,
|
|
2931
|
-
get: function () { return
|
|
3169
|
+
get: function () { return chunkF5DHWOGW_cjs.ResponseMetaSchema; }
|
|
2932
3170
|
});
|
|
2933
3171
|
Object.defineProperty(exports, "SortConfigSchema", {
|
|
2934
3172
|
enumerable: true,
|
|
2935
|
-
get: function () { return
|
|
3173
|
+
get: function () { return chunkF5DHWOGW_cjs.SortConfigSchema; }
|
|
2936
3174
|
});
|
|
2937
3175
|
Object.defineProperty(exports, "UserRefSchema", {
|
|
2938
3176
|
enumerable: true,
|
|
2939
|
-
get: function () { return
|
|
3177
|
+
get: function () { return chunkF5DHWOGW_cjs.UserRefSchema; }
|
|
2940
3178
|
});
|
|
2941
3179
|
Object.defineProperty(exports, "VariableSchema", {
|
|
2942
3180
|
enumerable: true,
|
|
2943
|
-
get: function () { return
|
|
3181
|
+
get: function () { return chunkF5DHWOGW_cjs.VariableSchema; }
|
|
3182
|
+
});
|
|
3183
|
+
Object.defineProperty(exports, "acceptsCurrentUserDefault", {
|
|
3184
|
+
enumerable: true,
|
|
3185
|
+
get: function () { return chunkF5DHWOGW_cjs.acceptsCurrentUserDefault; }
|
|
2944
3186
|
});
|
|
2945
3187
|
Object.defineProperty(exports, "allCurrencyCodes", {
|
|
2946
3188
|
enumerable: true,
|
|
2947
|
-
get: function () { return
|
|
3189
|
+
get: function () { return chunkF5DHWOGW_cjs.allCurrencyCodes; }
|
|
2948
3190
|
});
|
|
2949
3191
|
Object.defineProperty(exports, "createIterator", {
|
|
2950
3192
|
enumerable: true,
|
|
2951
|
-
get: function () { return
|
|
3193
|
+
get: function () { return chunkF5DHWOGW_cjs.createIterator; }
|
|
2952
3194
|
});
|
|
2953
3195
|
Object.defineProperty(exports, "createListResultSchema", {
|
|
2954
3196
|
enumerable: true,
|
|
2955
|
-
get: function () { return
|
|
3197
|
+
get: function () { return chunkF5DHWOGW_cjs.createListResultSchema; }
|
|
2956
3198
|
});
|
|
2957
3199
|
Object.defineProperty(exports, "currencyLabel", {
|
|
2958
3200
|
enumerable: true,
|
|
2959
|
-
get: function () { return
|
|
3201
|
+
get: function () { return chunkF5DHWOGW_cjs.currencyLabel; }
|
|
2960
3202
|
});
|
|
2961
3203
|
Object.defineProperty(exports, "currencySymbol", {
|
|
2962
3204
|
enumerable: true,
|
|
2963
|
-
get: function () { return
|
|
3205
|
+
get: function () { return chunkF5DHWOGW_cjs.currencySymbol; }
|
|
2964
3206
|
});
|
|
2965
3207
|
Object.defineProperty(exports, "currencySymbolSide", {
|
|
2966
3208
|
enumerable: true,
|
|
2967
|
-
get: function () { return
|
|
3209
|
+
get: function () { return chunkF5DHWOGW_cjs.currencySymbolSide; }
|
|
2968
3210
|
});
|
|
2969
3211
|
Object.defineProperty(exports, "formatAmount", {
|
|
2970
3212
|
enumerable: true,
|
|
2971
|
-
get: function () { return
|
|
3213
|
+
get: function () { return chunkF5DHWOGW_cjs.formatAmount; }
|
|
2972
3214
|
});
|
|
2973
3215
|
Object.defineProperty(exports, "formatMoney", {
|
|
2974
3216
|
enumerable: true,
|
|
2975
|
-
get: function () { return
|
|
3217
|
+
get: function () { return chunkF5DHWOGW_cjs.formatMoney; }
|
|
3218
|
+
});
|
|
3219
|
+
Object.defineProperty(exports, "isCurrentUserDefault", {
|
|
3220
|
+
enumerable: true,
|
|
3221
|
+
get: function () { return chunkF5DHWOGW_cjs.isCurrentUserDefault; }
|
|
2976
3222
|
});
|
|
2977
3223
|
Object.defineProperty(exports, "isPlatformAttributeName", {
|
|
2978
3224
|
enumerable: true,
|
|
2979
|
-
get: function () { return
|
|
3225
|
+
get: function () { return chunkF5DHWOGW_cjs.isPlatformAttributeName; }
|
|
2980
3226
|
});
|
|
2981
3227
|
Object.defineProperty(exports, "localeNumberSeparators", {
|
|
2982
3228
|
enumerable: true,
|
|
2983
|
-
get: function () { return
|
|
3229
|
+
get: function () { return chunkF5DHWOGW_cjs.localeNumberSeparators; }
|
|
2984
3230
|
});
|
|
2985
3231
|
Object.defineProperty(exports, "parseAmount", {
|
|
2986
3232
|
enumerable: true,
|
|
2987
|
-
get: function () { return
|
|
3233
|
+
get: function () { return chunkF5DHWOGW_cjs.parseAmount; }
|
|
2988
3234
|
});
|
|
2989
3235
|
Object.defineProperty(exports, "parseCurrencyMeta", {
|
|
2990
3236
|
enumerable: true,
|
|
2991
|
-
get: function () { return
|
|
3237
|
+
get: function () { return chunkF5DHWOGW_cjs.parseCurrencyMeta; }
|
|
2992
3238
|
});
|
|
2993
3239
|
Object.defineProperty(exports, "parseFileMeta", {
|
|
2994
3240
|
enumerable: true,
|
|
2995
|
-
get: function () { return
|
|
3241
|
+
get: function () { return chunkF5DHWOGW_cjs.parseFileMeta; }
|
|
2996
3242
|
});
|
|
2997
3243
|
Object.defineProperty(exports, "parseRelationMeta", {
|
|
2998
3244
|
enumerable: true,
|
|
2999
|
-
get: function () { return
|
|
3245
|
+
get: function () { return chunkF5DHWOGW_cjs.parseRelationMeta; }
|
|
3000
3246
|
});
|
|
3001
3247
|
Object.defineProperty(exports, "platformAttributes", {
|
|
3002
3248
|
enumerable: true,
|
|
3003
|
-
get: function () { return
|
|
3249
|
+
get: function () { return chunkF5DHWOGW_cjs.platformAttributes; }
|
|
3004
3250
|
});
|
|
3005
3251
|
exports.AccountClient = AccountClient;
|
|
3006
3252
|
exports.ActionSchema = ActionSchema;
|
|
@@ -3035,7 +3281,9 @@ exports.ProteosClient = ProteosClient;
|
|
|
3035
3281
|
exports.ProteosError = ProteosError;
|
|
3036
3282
|
exports.RoleEntityPermissionSchema = RoleEntityPermissionSchema;
|
|
3037
3283
|
exports.RoleSchema = RoleSchema;
|
|
3284
|
+
exports.SCOPED_PLATFORM_ENTITY_SLUGS = SCOPED_PLATFORM_ENTITY_SLUGS;
|
|
3038
3285
|
exports.StorageClient = StorageClient;
|
|
3286
|
+
exports.UNASSIGNED_SPACE_SLUG = UNASSIGNED_SPACE_SLUG;
|
|
3039
3287
|
exports.UserRoleAssignmentSchema = UserRoleAssignmentSchema;
|
|
3040
3288
|
exports.UserSchema = UserSchema;
|
|
3041
3289
|
exports.WorkflowClient = WorkflowClient;
|
|
@@ -3047,9 +3295,11 @@ exports.isForbidden = isForbidden;
|
|
|
3047
3295
|
exports.isNotFound = isNotFound;
|
|
3048
3296
|
exports.isPlatformEntity = isPlatformEntity;
|
|
3049
3297
|
exports.isProteosError = isProteosError;
|
|
3298
|
+
exports.isShareable = isShareable;
|
|
3050
3299
|
exports.isUnauthorized = isUnauthorized;
|
|
3051
3300
|
exports.parseErrorResponse = parseErrorResponse;
|
|
3052
3301
|
exports.resolveOptions = resolveOptions;
|
|
3302
|
+
exports.shareRouteFor = shareRouteFor;
|
|
3053
3303
|
exports.toQueryParams = toQueryParams;
|
|
3054
3304
|
exports.toQueryString = toQueryString;
|
|
3055
3305
|
//# sourceMappingURL=index.cjs.map
|