@proteos/sdk 0.45.0 → 0.47.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-IGIAJVX6.js → chunk-5KEJKXO5.js} +220 -34
- package/dist/chunk-5KEJKXO5.js.map +1 -0
- package/dist/{chunk-33EULWIM.cjs → chunk-Z7LC3GGU.cjs} +224 -33
- package/dist/chunk-Z7LC3GGU.cjs.map +1 -0
- package/dist/index.cjs +437 -179
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +659 -18
- package/dist/index.d.ts +659 -18
- package/dist/index.js +339 -97
- 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-oECz4xTQ.d.cts} +578 -32
- package/dist/{types-BTdBFq34.d.ts → types-oECz4xTQ.d.ts} +578 -32
- 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/functions/actions.ts +29 -0
- package/src/functions/types.ts +6 -4
- 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 +154 -27
- package/src/meta/layout/elements.ts +86 -0
- package/src/meta/layout/index.ts +2 -0
- package/src/meta/types.ts +245 -17
- 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 chunkZ7LC3GGU_cjs = require('./chunk-Z7LC3GGU.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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 = chunkZ7LC3GGU_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 = chunkZ7LC3GGU_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 = chunkZ7LC3GGU_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: chunkZ7LC3GGU_cjs.FileRefSchema.nullish()
|
|
662
901
|
});
|
|
663
|
-
|
|
902
|
+
chunkZ7LC3GGU_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 = chunkZ7LC3GGU_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
|
+
chunkZ7LC3GGU_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
|
+
chunkZ7LC3GGU_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 = chunkZ7LC3GGU_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: chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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 chunkZ7LC3GGU_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);
|
|
@@ -2210,9 +2400,17 @@ var ActionServiceImpl = class {
|
|
|
2210
2400
|
);
|
|
2211
2401
|
return response.result;
|
|
2212
2402
|
}
|
|
2403
|
+
async invokeBatch(entitySlug, slug, recordIds, params) {
|
|
2404
|
+
const response = await this.client.request(
|
|
2405
|
+
"POST",
|
|
2406
|
+
`/functions/v1/entities/${entitySlug}/actions/${slug}/invoke`,
|
|
2407
|
+
{ record_ids: recordIds, params }
|
|
2408
|
+
);
|
|
2409
|
+
return response.result;
|
|
2410
|
+
}
|
|
2213
2411
|
};
|
|
2214
|
-
var ActionScopeSchema = zod.z.enum(["entity", "global"]);
|
|
2215
|
-
var ActionSchema =
|
|
2412
|
+
var ActionScopeSchema = zod.z.enum(["entity", "entity_batch", "global"]);
|
|
2413
|
+
var ActionSchema = chunkZ7LC3GGU_cjs.AuditFieldsSchema.extend({
|
|
2216
2414
|
slug: zod.z.string(),
|
|
2217
2415
|
org_id: zod.z.string(),
|
|
2218
2416
|
module_slug: zod.z.string(),
|
|
@@ -2221,8 +2419,8 @@ var ActionSchema = chunk33EULWIM_cjs.AuditFieldsSchema.extend({
|
|
|
2221
2419
|
name: zod.z.string(),
|
|
2222
2420
|
is_active: zod.z.boolean(),
|
|
2223
2421
|
file_id: zod.z.string(),
|
|
2224
|
-
params: zod.z.array(
|
|
2225
|
-
returns: zod.z.array(
|
|
2422
|
+
params: zod.z.array(chunkZ7LC3GGU_cjs.AttributeSchema),
|
|
2423
|
+
returns: zod.z.array(chunkZ7LC3GGU_cjs.AttributeSchema)
|
|
2226
2424
|
});
|
|
2227
2425
|
|
|
2228
2426
|
// src/functions/index.ts
|
|
@@ -2245,6 +2443,9 @@ var GraphServiceImpl = class {
|
|
|
2245
2443
|
if (options.label_ids && options.label_ids.length > 0) {
|
|
2246
2444
|
query.label_ids = options.label_ids.join(",");
|
|
2247
2445
|
}
|
|
2446
|
+
if (options.space_slugs && options.space_slugs.length > 0) {
|
|
2447
|
+
query.space_slugs = options.space_slugs.join(",");
|
|
2448
|
+
}
|
|
2248
2449
|
return this.client.requestWithQuery("GET", GRAPH_BASE_PATH, query);
|
|
2249
2450
|
}
|
|
2250
2451
|
};
|
|
@@ -2257,7 +2458,7 @@ var LabelServiceImpl = class {
|
|
|
2257
2458
|
}
|
|
2258
2459
|
client;
|
|
2259
2460
|
list(options = {}) {
|
|
2260
|
-
return new
|
|
2461
|
+
return new chunkZ7LC3GGU_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2261
2462
|
}
|
|
2262
2463
|
async listPage(options = {}) {
|
|
2263
2464
|
return this.client.requestWithQuery(
|
|
@@ -2288,7 +2489,7 @@ var LinkServiceImpl = class {
|
|
|
2288
2489
|
}
|
|
2289
2490
|
client;
|
|
2290
2491
|
list(options = {}) {
|
|
2291
|
-
return new
|
|
2492
|
+
return new chunkZ7LC3GGU_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2292
2493
|
}
|
|
2293
2494
|
async listPage(options = {}) {
|
|
2294
2495
|
return this.client.requestWithQuery("GET", LINKS_BASE_PATH, options);
|
|
@@ -2315,14 +2516,17 @@ var NodeServiceImpl = class {
|
|
|
2315
2516
|
}
|
|
2316
2517
|
client;
|
|
2317
2518
|
list(options = {}) {
|
|
2318
|
-
return new
|
|
2519
|
+
return new chunkZ7LC3GGU_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2319
2520
|
}
|
|
2320
2521
|
async listPage(options = {}) {
|
|
2321
|
-
const { label_ids, ...rest } = options;
|
|
2522
|
+
const { label_ids, space_slugs, ...rest } = options;
|
|
2322
2523
|
const query = { ...rest };
|
|
2323
2524
|
if (label_ids && label_ids.length > 0) {
|
|
2324
2525
|
query.label_ids = label_ids.join(",");
|
|
2325
2526
|
}
|
|
2527
|
+
if (space_slugs && space_slugs.length > 0) {
|
|
2528
|
+
query.space_slugs = space_slugs.join(",");
|
|
2529
|
+
}
|
|
2326
2530
|
return this.client.requestWithQuery(
|
|
2327
2531
|
"GET",
|
|
2328
2532
|
NODES_BASE_PATH,
|
|
@@ -2401,6 +2605,37 @@ var NodeServiceImpl = class {
|
|
|
2401
2605
|
}
|
|
2402
2606
|
};
|
|
2403
2607
|
|
|
2608
|
+
// src/knowledge/spaces.ts
|
|
2609
|
+
var SPACES_BASE_PATH = "/knowledge/v1/spaces";
|
|
2610
|
+
var SpaceServiceImpl = class {
|
|
2611
|
+
constructor(client) {
|
|
2612
|
+
this.client = client;
|
|
2613
|
+
}
|
|
2614
|
+
client;
|
|
2615
|
+
list(options = {}) {
|
|
2616
|
+
return new chunkZ7LC3GGU_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2617
|
+
}
|
|
2618
|
+
async listPage(options = {}) {
|
|
2619
|
+
return this.client.requestWithQuery(
|
|
2620
|
+
"GET",
|
|
2621
|
+
SPACES_BASE_PATH,
|
|
2622
|
+
options
|
|
2623
|
+
);
|
|
2624
|
+
}
|
|
2625
|
+
async get(slug) {
|
|
2626
|
+
return this.client.request("GET", `${SPACES_BASE_PATH}/${slug}`);
|
|
2627
|
+
}
|
|
2628
|
+
async create(request) {
|
|
2629
|
+
return this.client.request("POST", SPACES_BASE_PATH, request);
|
|
2630
|
+
}
|
|
2631
|
+
async update(slug, request) {
|
|
2632
|
+
return this.client.request("PATCH", `${SPACES_BASE_PATH}/${slug}`, request);
|
|
2633
|
+
}
|
|
2634
|
+
async delete(slug) {
|
|
2635
|
+
await this.client.request("DELETE", `${SPACES_BASE_PATH}/${slug}`);
|
|
2636
|
+
}
|
|
2637
|
+
};
|
|
2638
|
+
|
|
2404
2639
|
// src/knowledge/record-links.ts
|
|
2405
2640
|
var RECORD_LINKS_BASE_PATH = "/knowledge/v1/record-links";
|
|
2406
2641
|
var RecordLinkServiceImpl = class {
|
|
@@ -2409,7 +2644,7 @@ var RecordLinkServiceImpl = class {
|
|
|
2409
2644
|
}
|
|
2410
2645
|
client;
|
|
2411
2646
|
list(options = {}) {
|
|
2412
|
-
return new
|
|
2647
|
+
return new chunkZ7LC3GGU_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2413
2648
|
}
|
|
2414
2649
|
async listPage(options = {}) {
|
|
2415
2650
|
return this.client.requestWithQuery(
|
|
@@ -2428,6 +2663,7 @@ var RecordLinkServiceImpl = class {
|
|
|
2428
2663
|
await this.client.request("DELETE", `${RECORD_LINKS_BASE_PATH}/${id}`);
|
|
2429
2664
|
}
|
|
2430
2665
|
};
|
|
2666
|
+
var UNASSIGNED_SPACE_SLUG = "__unassigned__";
|
|
2431
2667
|
var KnowledgeNodeMetadataSchema = zod.z.object({
|
|
2432
2668
|
id: zod.z.string(),
|
|
2433
2669
|
org_id: zod.z.string(),
|
|
@@ -2441,7 +2677,7 @@ var KnowledgeNodeMetadataSchema = zod.z.object({
|
|
|
2441
2677
|
summary: zod.z.string().nullish(),
|
|
2442
2678
|
valid_from: zod.z.string().nullish(),
|
|
2443
2679
|
valid_until: zod.z.string().nullish()
|
|
2444
|
-
}).merge(
|
|
2680
|
+
}).merge(chunkZ7LC3GGU_cjs.AuditFieldsSchema);
|
|
2445
2681
|
var KnowledgeNodeSchema = KnowledgeNodeMetadataSchema.extend({
|
|
2446
2682
|
content: zod.z.string()
|
|
2447
2683
|
});
|
|
@@ -2465,7 +2701,7 @@ var KnowledgeLinkSchema = zod.z.object({
|
|
|
2465
2701
|
"superseded_by"
|
|
2466
2702
|
]),
|
|
2467
2703
|
description: zod.z.string().nullish()
|
|
2468
|
-
}).merge(
|
|
2704
|
+
}).merge(chunkZ7LC3GGU_cjs.AuditFieldsSchema);
|
|
2469
2705
|
var KnowledgeRecordLinkSchema = zod.z.object({
|
|
2470
2706
|
id: zod.z.string(),
|
|
2471
2707
|
org_id: zod.z.string(),
|
|
@@ -2473,7 +2709,7 @@ var KnowledgeRecordLinkSchema = zod.z.object({
|
|
|
2473
2709
|
entity_slug: zod.z.string(),
|
|
2474
2710
|
record_id: zod.z.string(),
|
|
2475
2711
|
created_at: zod.z.string(),
|
|
2476
|
-
created_by:
|
|
2712
|
+
created_by: chunkZ7LC3GGU_cjs.UserRefSchema
|
|
2477
2713
|
});
|
|
2478
2714
|
var KnowledgeLabelSchema = zod.z.object({
|
|
2479
2715
|
id: zod.z.string(),
|
|
@@ -2483,13 +2719,13 @@ var KnowledgeLabelSchema = zod.z.object({
|
|
|
2483
2719
|
description: zod.z.string().nullish(),
|
|
2484
2720
|
color: zod.z.string().nullish(),
|
|
2485
2721
|
icon: zod.z.string().nullish()
|
|
2486
|
-
}).merge(
|
|
2722
|
+
}).merge(chunkZ7LC3GGU_cjs.AuditFieldsSchema);
|
|
2487
2723
|
var KnowledgeNodeLabelSchema = zod.z.object({
|
|
2488
2724
|
org_id: zod.z.string(),
|
|
2489
2725
|
node_id: zod.z.string(),
|
|
2490
2726
|
label_id: zod.z.string(),
|
|
2491
2727
|
created_at: zod.z.string(),
|
|
2492
|
-
created_by:
|
|
2728
|
+
created_by: chunkZ7LC3GGU_cjs.UserRefSchema
|
|
2493
2729
|
});
|
|
2494
2730
|
var NodeNeighborhoodSchema = zod.z.object({
|
|
2495
2731
|
nodes: zod.z.array(
|
|
@@ -2518,6 +2754,11 @@ var KnowledgeClient = class {
|
|
|
2518
2754
|
/** Node→record edges (links to data-service records): `knowledge.recordLinks`. */
|
|
2519
2755
|
recordLinks;
|
|
2520
2756
|
labels;
|
|
2757
|
+
/**
|
|
2758
|
+
* Knowledge spaces — the containers nodes live in: `knowledge.spaces`.
|
|
2759
|
+
* Access to a space is granted through `auth.shares`, not here.
|
|
2760
|
+
*/
|
|
2761
|
+
spaces;
|
|
2521
2762
|
/** Whole-org graph bulk read (radiant graph view): `knowledge.graph.get()`. */
|
|
2522
2763
|
graph;
|
|
2523
2764
|
constructor(client) {
|
|
@@ -2525,6 +2766,7 @@ var KnowledgeClient = class {
|
|
|
2525
2766
|
this.links = new LinkServiceImpl(client);
|
|
2526
2767
|
this.recordLinks = new RecordLinkServiceImpl(client);
|
|
2527
2768
|
this.labels = new LabelServiceImpl(client);
|
|
2769
|
+
this.spaces = new SpaceServiceImpl(client);
|
|
2528
2770
|
this.graph = new GraphServiceImpl(client);
|
|
2529
2771
|
}
|
|
2530
2772
|
};
|
|
@@ -2670,7 +2912,7 @@ var ExecutionServiceImpl = class {
|
|
|
2670
2912
|
}
|
|
2671
2913
|
client;
|
|
2672
2914
|
list(options = {}) {
|
|
2673
|
-
return new
|
|
2915
|
+
return new chunkZ7LC3GGU_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2674
2916
|
}
|
|
2675
2917
|
async listPage(options = {}) {
|
|
2676
2918
|
return this.client.requestWithQuery(
|
|
@@ -2729,7 +2971,7 @@ var WorkflowServiceImpl = class {
|
|
|
2729
2971
|
}
|
|
2730
2972
|
client;
|
|
2731
2973
|
list(options = {}) {
|
|
2732
|
-
return new
|
|
2974
|
+
return new chunkZ7LC3GGU_cjs.PageIterator((opts) => this.listPage(opts), options);
|
|
2733
2975
|
}
|
|
2734
2976
|
async listPage(options = {}) {
|
|
2735
2977
|
return this.client.requestWithQuery("GET", WORKFLOWS_BASE_PATH2, options);
|
|
@@ -2767,7 +3009,7 @@ var WorkflowServiceImpl = class {
|
|
|
2767
3009
|
return this.client.request("POST", `${WORKFLOWS_BASE_PATH2}/${key}/unpause`, {});
|
|
2768
3010
|
}
|
|
2769
3011
|
listVersions(key, options = {}) {
|
|
2770
|
-
return new
|
|
3012
|
+
return new chunkZ7LC3GGU_cjs.PageIterator((opts) => this.listVersionsPage(key, opts), options);
|
|
2771
3013
|
}
|
|
2772
3014
|
async listVersionsPage(key, options = {}) {
|
|
2773
3015
|
return this.client.requestWithQuery(
|
|
@@ -2812,195 +3054,207 @@ var WorkflowClient = class {
|
|
|
2812
3054
|
|
|
2813
3055
|
Object.defineProperty(exports, "AppSchema", {
|
|
2814
3056
|
enumerable: true,
|
|
2815
|
-
get: function () { return
|
|
3057
|
+
get: function () { return chunkZ7LC3GGU_cjs.AppSchema; }
|
|
2816
3058
|
});
|
|
2817
3059
|
Object.defineProperty(exports, "AttributeSchema", {
|
|
2818
3060
|
enumerable: true,
|
|
2819
|
-
get: function () { return
|
|
3061
|
+
get: function () { return chunkZ7LC3GGU_cjs.AttributeSchema; }
|
|
2820
3062
|
});
|
|
2821
3063
|
Object.defineProperty(exports, "AuditFieldsSchema", {
|
|
2822
3064
|
enumerable: true,
|
|
2823
|
-
get: function () { return
|
|
3065
|
+
get: function () { return chunkZ7LC3GGU_cjs.AuditFieldsSchema; }
|
|
3066
|
+
});
|
|
3067
|
+
Object.defineProperty(exports, "CURRENT_USER_DEFAULT", {
|
|
3068
|
+
enumerable: true,
|
|
3069
|
+
get: function () { return chunkZ7LC3GGU_cjs.CURRENT_USER_DEFAULT; }
|
|
2824
3070
|
});
|
|
2825
3071
|
Object.defineProperty(exports, "ColumnSchema", {
|
|
2826
3072
|
enumerable: true,
|
|
2827
|
-
get: function () { return
|
|
3073
|
+
get: function () { return chunkZ7LC3GGU_cjs.ColumnSchema; }
|
|
2828
3074
|
});
|
|
2829
3075
|
Object.defineProperty(exports, "ComponentSchema", {
|
|
2830
3076
|
enumerable: true,
|
|
2831
|
-
get: function () { return
|
|
3077
|
+
get: function () { return chunkZ7LC3GGU_cjs.ComponentSchema; }
|
|
2832
3078
|
});
|
|
2833
3079
|
Object.defineProperty(exports, "CurrencyAttributeMetaSchema", {
|
|
2834
3080
|
enumerable: true,
|
|
2835
|
-
get: function () { return
|
|
3081
|
+
get: function () { return chunkZ7LC3GGU_cjs.CurrencyAttributeMetaSchema; }
|
|
2836
3082
|
});
|
|
2837
3083
|
Object.defineProperty(exports, "DEFAULT_PAGE_SIZE", {
|
|
2838
3084
|
enumerable: true,
|
|
2839
|
-
get: function () { return
|
|
3085
|
+
get: function () { return chunkZ7LC3GGU_cjs.DEFAULT_PAGE_SIZE; }
|
|
2840
3086
|
});
|
|
2841
3087
|
Object.defineProperty(exports, "DONE", {
|
|
2842
3088
|
enumerable: true,
|
|
2843
|
-
get: function () { return
|
|
3089
|
+
get: function () { return chunkZ7LC3GGU_cjs.DONE; }
|
|
2844
3090
|
});
|
|
2845
3091
|
Object.defineProperty(exports, "DesignReferenceSchema", {
|
|
2846
3092
|
enumerable: true,
|
|
2847
|
-
get: function () { return
|
|
3093
|
+
get: function () { return chunkZ7LC3GGU_cjs.DesignReferenceSchema; }
|
|
2848
3094
|
});
|
|
2849
3095
|
Object.defineProperty(exports, "EntitySchema", {
|
|
2850
3096
|
enumerable: true,
|
|
2851
|
-
get: function () { return
|
|
3097
|
+
get: function () { return chunkZ7LC3GGU_cjs.EntitySchema; }
|
|
2852
3098
|
});
|
|
2853
3099
|
Object.defineProperty(exports, "EntityWithSchemaSchema", {
|
|
2854
3100
|
enumerable: true,
|
|
2855
|
-
get: function () { return
|
|
3101
|
+
get: function () { return chunkZ7LC3GGU_cjs.EntityWithSchemaSchema; }
|
|
2856
3102
|
});
|
|
2857
3103
|
Object.defineProperty(exports, "FileRefSchema", {
|
|
2858
3104
|
enumerable: true,
|
|
2859
|
-
get: function () { return
|
|
3105
|
+
get: function () { return chunkZ7LC3GGU_cjs.FileRefSchema; }
|
|
2860
3106
|
});
|
|
2861
3107
|
Object.defineProperty(exports, "FilterElementSchema", {
|
|
2862
3108
|
enumerable: true,
|
|
2863
|
-
get: function () { return
|
|
3109
|
+
get: function () { return chunkZ7LC3GGU_cjs.FilterElementSchema; }
|
|
2864
3110
|
});
|
|
2865
3111
|
Object.defineProperty(exports, "FilterGroupSchema", {
|
|
2866
3112
|
enumerable: true,
|
|
2867
|
-
get: function () { return
|
|
3113
|
+
get: function () { return chunkZ7LC3GGU_cjs.FilterGroupSchema; }
|
|
2868
3114
|
});
|
|
2869
3115
|
Object.defineProperty(exports, "ListSchema", {
|
|
2870
3116
|
enumerable: true,
|
|
2871
|
-
get: function () { return
|
|
3117
|
+
get: function () { return chunkZ7LC3GGU_cjs.ListSchema; }
|
|
2872
3118
|
});
|
|
2873
3119
|
Object.defineProperty(exports, "ListViewSchema", {
|
|
2874
3120
|
enumerable: true,
|
|
2875
|
-
get: function () { return
|
|
3121
|
+
get: function () { return chunkZ7LC3GGU_cjs.ListViewSchema; }
|
|
2876
3122
|
});
|
|
2877
3123
|
Object.defineProperty(exports, "MenuConfigurationSchema", {
|
|
2878
3124
|
enumerable: true,
|
|
2879
|
-
get: function () { return
|
|
3125
|
+
get: function () { return chunkZ7LC3GGU_cjs.MenuConfigurationSchema; }
|
|
2880
3126
|
});
|
|
2881
3127
|
Object.defineProperty(exports, "MenuItemSchema", {
|
|
2882
3128
|
enumerable: true,
|
|
2883
|
-
get: function () { return
|
|
3129
|
+
get: function () { return chunkZ7LC3GGU_cjs.MenuItemSchema; }
|
|
2884
3130
|
});
|
|
2885
3131
|
Object.defineProperty(exports, "MenuItemType", {
|
|
2886
3132
|
enumerable: true,
|
|
2887
|
-
get: function () { return
|
|
3133
|
+
get: function () { return chunkZ7LC3GGU_cjs.MenuItemType; }
|
|
2888
3134
|
});
|
|
2889
3135
|
Object.defineProperty(exports, "MetaClient", {
|
|
2890
3136
|
enumerable: true,
|
|
2891
|
-
get: function () { return
|
|
3137
|
+
get: function () { return chunkZ7LC3GGU_cjs.MetaClient; }
|
|
2892
3138
|
});
|
|
2893
3139
|
Object.defineProperty(exports, "ModuleSchema", {
|
|
2894
3140
|
enumerable: true,
|
|
2895
|
-
get: function () { return
|
|
3141
|
+
get: function () { return chunkZ7LC3GGU_cjs.ModuleSchema; }
|
|
2896
3142
|
});
|
|
2897
3143
|
Object.defineProperty(exports, "OnDeleteActionSchema", {
|
|
2898
3144
|
enumerable: true,
|
|
2899
|
-
get: function () { return
|
|
3145
|
+
get: function () { return chunkZ7LC3GGU_cjs.OnDeleteActionSchema; }
|
|
2900
3146
|
});
|
|
2901
3147
|
Object.defineProperty(exports, "PLATFORM_ATTRIBUTE_NAMES", {
|
|
2902
3148
|
enumerable: true,
|
|
2903
|
-
get: function () { return
|
|
3149
|
+
get: function () { return chunkZ7LC3GGU_cjs.PLATFORM_ATTRIBUTE_NAMES; }
|
|
2904
3150
|
});
|
|
2905
3151
|
Object.defineProperty(exports, "PLATFORM_USER_ID", {
|
|
2906
3152
|
enumerable: true,
|
|
2907
|
-
get: function () { return
|
|
3153
|
+
get: function () { return chunkZ7LC3GGU_cjs.PLATFORM_USER_ID; }
|
|
2908
3154
|
});
|
|
2909
3155
|
Object.defineProperty(exports, "PageActionSchema", {
|
|
2910
3156
|
enumerable: true,
|
|
2911
|
-
get: function () { return
|
|
3157
|
+
get: function () { return chunkZ7LC3GGU_cjs.PageActionSchema; }
|
|
2912
3158
|
});
|
|
2913
3159
|
Object.defineProperty(exports, "PageIterator", {
|
|
2914
3160
|
enumerable: true,
|
|
2915
|
-
get: function () { return
|
|
3161
|
+
get: function () { return chunkZ7LC3GGU_cjs.PageIterator; }
|
|
2916
3162
|
});
|
|
2917
3163
|
Object.defineProperty(exports, "PageLayoutSchema", {
|
|
2918
3164
|
enumerable: true,
|
|
2919
|
-
get: function () { return
|
|
3165
|
+
get: function () { return chunkZ7LC3GGU_cjs.PageLayoutSchema; }
|
|
2920
3166
|
});
|
|
2921
3167
|
Object.defineProperty(exports, "PageSchema", {
|
|
2922
3168
|
enumerable: true,
|
|
2923
|
-
get: function () { return
|
|
3169
|
+
get: function () { return chunkZ7LC3GGU_cjs.PageSchema; }
|
|
2924
3170
|
});
|
|
2925
3171
|
Object.defineProperty(exports, "RelationAttributeMetaSchema", {
|
|
2926
3172
|
enumerable: true,
|
|
2927
|
-
get: function () { return
|
|
3173
|
+
get: function () { return chunkZ7LC3GGU_cjs.RelationAttributeMetaSchema; }
|
|
2928
3174
|
});
|
|
2929
3175
|
Object.defineProperty(exports, "ResponseMetaSchema", {
|
|
2930
3176
|
enumerable: true,
|
|
2931
|
-
get: function () { return
|
|
3177
|
+
get: function () { return chunkZ7LC3GGU_cjs.ResponseMetaSchema; }
|
|
2932
3178
|
});
|
|
2933
3179
|
Object.defineProperty(exports, "SortConfigSchema", {
|
|
2934
3180
|
enumerable: true,
|
|
2935
|
-
get: function () { return
|
|
3181
|
+
get: function () { return chunkZ7LC3GGU_cjs.SortConfigSchema; }
|
|
2936
3182
|
});
|
|
2937
3183
|
Object.defineProperty(exports, "UserRefSchema", {
|
|
2938
3184
|
enumerable: true,
|
|
2939
|
-
get: function () { return
|
|
3185
|
+
get: function () { return chunkZ7LC3GGU_cjs.UserRefSchema; }
|
|
2940
3186
|
});
|
|
2941
3187
|
Object.defineProperty(exports, "VariableSchema", {
|
|
2942
3188
|
enumerable: true,
|
|
2943
|
-
get: function () { return
|
|
3189
|
+
get: function () { return chunkZ7LC3GGU_cjs.VariableSchema; }
|
|
3190
|
+
});
|
|
3191
|
+
Object.defineProperty(exports, "acceptsCurrentUserDefault", {
|
|
3192
|
+
enumerable: true,
|
|
3193
|
+
get: function () { return chunkZ7LC3GGU_cjs.acceptsCurrentUserDefault; }
|
|
2944
3194
|
});
|
|
2945
3195
|
Object.defineProperty(exports, "allCurrencyCodes", {
|
|
2946
3196
|
enumerable: true,
|
|
2947
|
-
get: function () { return
|
|
3197
|
+
get: function () { return chunkZ7LC3GGU_cjs.allCurrencyCodes; }
|
|
2948
3198
|
});
|
|
2949
3199
|
Object.defineProperty(exports, "createIterator", {
|
|
2950
3200
|
enumerable: true,
|
|
2951
|
-
get: function () { return
|
|
3201
|
+
get: function () { return chunkZ7LC3GGU_cjs.createIterator; }
|
|
2952
3202
|
});
|
|
2953
3203
|
Object.defineProperty(exports, "createListResultSchema", {
|
|
2954
3204
|
enumerable: true,
|
|
2955
|
-
get: function () { return
|
|
3205
|
+
get: function () { return chunkZ7LC3GGU_cjs.createListResultSchema; }
|
|
2956
3206
|
});
|
|
2957
3207
|
Object.defineProperty(exports, "currencyLabel", {
|
|
2958
3208
|
enumerable: true,
|
|
2959
|
-
get: function () { return
|
|
3209
|
+
get: function () { return chunkZ7LC3GGU_cjs.currencyLabel; }
|
|
2960
3210
|
});
|
|
2961
3211
|
Object.defineProperty(exports, "currencySymbol", {
|
|
2962
3212
|
enumerable: true,
|
|
2963
|
-
get: function () { return
|
|
3213
|
+
get: function () { return chunkZ7LC3GGU_cjs.currencySymbol; }
|
|
2964
3214
|
});
|
|
2965
3215
|
Object.defineProperty(exports, "currencySymbolSide", {
|
|
2966
3216
|
enumerable: true,
|
|
2967
|
-
get: function () { return
|
|
3217
|
+
get: function () { return chunkZ7LC3GGU_cjs.currencySymbolSide; }
|
|
2968
3218
|
});
|
|
2969
3219
|
Object.defineProperty(exports, "formatAmount", {
|
|
2970
3220
|
enumerable: true,
|
|
2971
|
-
get: function () { return
|
|
3221
|
+
get: function () { return chunkZ7LC3GGU_cjs.formatAmount; }
|
|
2972
3222
|
});
|
|
2973
3223
|
Object.defineProperty(exports, "formatMoney", {
|
|
2974
3224
|
enumerable: true,
|
|
2975
|
-
get: function () { return
|
|
3225
|
+
get: function () { return chunkZ7LC3GGU_cjs.formatMoney; }
|
|
3226
|
+
});
|
|
3227
|
+
Object.defineProperty(exports, "isCurrentUserDefault", {
|
|
3228
|
+
enumerable: true,
|
|
3229
|
+
get: function () { return chunkZ7LC3GGU_cjs.isCurrentUserDefault; }
|
|
2976
3230
|
});
|
|
2977
3231
|
Object.defineProperty(exports, "isPlatformAttributeName", {
|
|
2978
3232
|
enumerable: true,
|
|
2979
|
-
get: function () { return
|
|
3233
|
+
get: function () { return chunkZ7LC3GGU_cjs.isPlatformAttributeName; }
|
|
2980
3234
|
});
|
|
2981
3235
|
Object.defineProperty(exports, "localeNumberSeparators", {
|
|
2982
3236
|
enumerable: true,
|
|
2983
|
-
get: function () { return
|
|
3237
|
+
get: function () { return chunkZ7LC3GGU_cjs.localeNumberSeparators; }
|
|
2984
3238
|
});
|
|
2985
3239
|
Object.defineProperty(exports, "parseAmount", {
|
|
2986
3240
|
enumerable: true,
|
|
2987
|
-
get: function () { return
|
|
3241
|
+
get: function () { return chunkZ7LC3GGU_cjs.parseAmount; }
|
|
2988
3242
|
});
|
|
2989
3243
|
Object.defineProperty(exports, "parseCurrencyMeta", {
|
|
2990
3244
|
enumerable: true,
|
|
2991
|
-
get: function () { return
|
|
3245
|
+
get: function () { return chunkZ7LC3GGU_cjs.parseCurrencyMeta; }
|
|
2992
3246
|
});
|
|
2993
3247
|
Object.defineProperty(exports, "parseFileMeta", {
|
|
2994
3248
|
enumerable: true,
|
|
2995
|
-
get: function () { return
|
|
3249
|
+
get: function () { return chunkZ7LC3GGU_cjs.parseFileMeta; }
|
|
2996
3250
|
});
|
|
2997
3251
|
Object.defineProperty(exports, "parseRelationMeta", {
|
|
2998
3252
|
enumerable: true,
|
|
2999
|
-
get: function () { return
|
|
3253
|
+
get: function () { return chunkZ7LC3GGU_cjs.parseRelationMeta; }
|
|
3000
3254
|
});
|
|
3001
3255
|
Object.defineProperty(exports, "platformAttributes", {
|
|
3002
3256
|
enumerable: true,
|
|
3003
|
-
get: function () { return
|
|
3257
|
+
get: function () { return chunkZ7LC3GGU_cjs.platformAttributes; }
|
|
3004
3258
|
});
|
|
3005
3259
|
exports.AccountClient = AccountClient;
|
|
3006
3260
|
exports.ActionSchema = ActionSchema;
|
|
@@ -3035,7 +3289,9 @@ exports.ProteosClient = ProteosClient;
|
|
|
3035
3289
|
exports.ProteosError = ProteosError;
|
|
3036
3290
|
exports.RoleEntityPermissionSchema = RoleEntityPermissionSchema;
|
|
3037
3291
|
exports.RoleSchema = RoleSchema;
|
|
3292
|
+
exports.SCOPED_PLATFORM_ENTITY_SLUGS = SCOPED_PLATFORM_ENTITY_SLUGS;
|
|
3038
3293
|
exports.StorageClient = StorageClient;
|
|
3294
|
+
exports.UNASSIGNED_SPACE_SLUG = UNASSIGNED_SPACE_SLUG;
|
|
3039
3295
|
exports.UserRoleAssignmentSchema = UserRoleAssignmentSchema;
|
|
3040
3296
|
exports.UserSchema = UserSchema;
|
|
3041
3297
|
exports.WorkflowClient = WorkflowClient;
|
|
@@ -3047,9 +3303,11 @@ exports.isForbidden = isForbidden;
|
|
|
3047
3303
|
exports.isNotFound = isNotFound;
|
|
3048
3304
|
exports.isPlatformEntity = isPlatformEntity;
|
|
3049
3305
|
exports.isProteosError = isProteosError;
|
|
3306
|
+
exports.isShareable = isShareable;
|
|
3050
3307
|
exports.isUnauthorized = isUnauthorized;
|
|
3051
3308
|
exports.parseErrorResponse = parseErrorResponse;
|
|
3052
3309
|
exports.resolveOptions = resolveOptions;
|
|
3310
|
+
exports.shareRouteFor = shareRouteFor;
|
|
3053
3311
|
exports.toQueryParams = toQueryParams;
|
|
3054
3312
|
exports.toQueryString = toQueryString;
|
|
3055
3313
|
//# sourceMappingURL=index.cjs.map
|