@collective-intelligence/external-apps-server-sdk 0.3.2 → 0.3.3
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/README.md +10 -2
- package/dist/admin.d.ts +3 -3
- package/dist/chunks/{index-vf83jqc8.js → index-hzx6hj46.js} +2 -2
- package/dist/effect.d.ts +270 -2
- package/dist/effect.js +1 -1
- package/dist/index.d.ts +270 -2
- package/dist/index.js +1 -1
- package/docs/guide/ai/index.md +36 -17
- package/docs/guide/ai/studio.md +245 -0
- package/docs/guide/data/connectors.md +81 -18
- package/docs/guide/data/datasets.md +6 -17
- package/docs/guide/data/documents.md +235 -0
- package/docs/guide/data/index.md +62 -0
- package/docs/guide/data/knowledge.md +21 -18
- package/docs/guide/develop/extensions.md +15 -14
- package/docs/guide/develop/external-apps.md +48 -14
- package/docs/guide/develop/infrastructure.md +135 -0
- package/docs/guide/develop/sdks.md +2 -2
- package/docs/guide/index.md +11 -7
- package/docs/guide/platform/access.md +82 -17
- package/docs/guide/platform/architecture.md +27 -18
- package/docs/guide/platform/entrypoints.md +125 -48
- package/docs/guide/scenarios/index.md +69 -46
- package/docs/guide/template/index.md +22 -9
- package/docs/guide/template/state-machines.md +1 -1
- package/package.json +4 -4
package/dist/effect.d.ts
CHANGED
|
@@ -272,6 +272,47 @@ export interface GatewayKernel {
|
|
|
272
272
|
readonly handle: (request: Request) => Promise<Response>;
|
|
273
273
|
readonly manifest: DefinedGateway["manifest"];
|
|
274
274
|
}
|
|
275
|
+
export type Suspend1 = {
|
|
276
|
+
fieldId: string;
|
|
277
|
+
kind: "predicate";
|
|
278
|
+
operator: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "is_null" | "is_not_null" | "contains" | "starts_with";
|
|
279
|
+
values: Array<{
|
|
280
|
+
kind: "null";
|
|
281
|
+
} | {
|
|
282
|
+
kind: "boolean";
|
|
283
|
+
value: boolean;
|
|
284
|
+
} | {
|
|
285
|
+
kind: "string";
|
|
286
|
+
value: string;
|
|
287
|
+
} | {
|
|
288
|
+
kind: "int64";
|
|
289
|
+
value: string;
|
|
290
|
+
} | {
|
|
291
|
+
kind: "float64";
|
|
292
|
+
value: number;
|
|
293
|
+
} | {
|
|
294
|
+
kind: "decimal";
|
|
295
|
+
value: string;
|
|
296
|
+
} | {
|
|
297
|
+
kind: "date";
|
|
298
|
+
value: string;
|
|
299
|
+
} | {
|
|
300
|
+
kind: "timestamp";
|
|
301
|
+
value: string;
|
|
302
|
+
} | {
|
|
303
|
+
kind: "duration";
|
|
304
|
+
value: string;
|
|
305
|
+
} | {
|
|
306
|
+
kind: "json";
|
|
307
|
+
value: unknown;
|
|
308
|
+
}>;
|
|
309
|
+
} | {
|
|
310
|
+
filters: Array<Suspend1>;
|
|
311
|
+
kind: "and" | "or";
|
|
312
|
+
} | {
|
|
313
|
+
filter: Suspend1;
|
|
314
|
+
kind: "not";
|
|
315
|
+
};
|
|
275
316
|
export type AccessExplanation = {
|
|
276
317
|
cut: {
|
|
277
318
|
credential: {
|
|
@@ -379,6 +420,191 @@ export type AccessExplanation = {
|
|
|
379
420
|
}>;
|
|
380
421
|
recordId: string;
|
|
381
422
|
schemaId: string;
|
|
423
|
+
} | {
|
|
424
|
+
datasetId: string;
|
|
425
|
+
kind: "dataset";
|
|
426
|
+
admitted: true;
|
|
427
|
+
audienceEntry: {
|
|
428
|
+
kind: "organization";
|
|
429
|
+
} | {
|
|
430
|
+
kind: "user";
|
|
431
|
+
userId: string;
|
|
432
|
+
} | {
|
|
433
|
+
coverage: "direct" | "inherited";
|
|
434
|
+
groupId: string;
|
|
435
|
+
kind: "group";
|
|
436
|
+
} | {
|
|
437
|
+
kind: "profile";
|
|
438
|
+
profileId: string;
|
|
439
|
+
} | {
|
|
440
|
+
applicationId: string;
|
|
441
|
+
kind: "application";
|
|
442
|
+
} | {
|
|
443
|
+
applicationId: string;
|
|
444
|
+
kind: "anonymous";
|
|
445
|
+
} | {
|
|
446
|
+
capabilityId: string;
|
|
447
|
+
kind: "capability";
|
|
448
|
+
mode: "manage" | "on" | "read";
|
|
449
|
+
};
|
|
450
|
+
policies: Array<{
|
|
451
|
+
grants: Array<{
|
|
452
|
+
grantId: string;
|
|
453
|
+
profileId: string;
|
|
454
|
+
}>;
|
|
455
|
+
policy: {
|
|
456
|
+
fqn: string;
|
|
457
|
+
id: string;
|
|
458
|
+
kind: "dataset_data_policy";
|
|
459
|
+
} | {
|
|
460
|
+
id: string;
|
|
461
|
+
kind: "core_admin" | "core_default" | "core_tenant";
|
|
462
|
+
};
|
|
463
|
+
}>;
|
|
464
|
+
readableFields: Array<string> | null;
|
|
465
|
+
rowRule: {
|
|
466
|
+
kind: "all";
|
|
467
|
+
} | {
|
|
468
|
+
filter: Suspend1;
|
|
469
|
+
kind: "filter";
|
|
470
|
+
};
|
|
471
|
+
} | {
|
|
472
|
+
datasetId: string;
|
|
473
|
+
kind: "dataset";
|
|
474
|
+
admitted: false;
|
|
475
|
+
reason: "not_in_audience";
|
|
476
|
+
} | {
|
|
477
|
+
datasetId: string;
|
|
478
|
+
kind: "dataset";
|
|
479
|
+
admitted: false;
|
|
480
|
+
audienceEntry: {
|
|
481
|
+
kind: "organization";
|
|
482
|
+
} | {
|
|
483
|
+
kind: "user";
|
|
484
|
+
userId: string;
|
|
485
|
+
} | {
|
|
486
|
+
coverage: "direct" | "inherited";
|
|
487
|
+
groupId: string;
|
|
488
|
+
kind: "group";
|
|
489
|
+
} | {
|
|
490
|
+
kind: "profile";
|
|
491
|
+
profileId: string;
|
|
492
|
+
} | {
|
|
493
|
+
applicationId: string;
|
|
494
|
+
kind: "application";
|
|
495
|
+
} | {
|
|
496
|
+
applicationId: string;
|
|
497
|
+
kind: "anonymous";
|
|
498
|
+
} | {
|
|
499
|
+
capabilityId: string;
|
|
500
|
+
kind: "capability";
|
|
501
|
+
mode: "manage" | "on" | "read";
|
|
502
|
+
};
|
|
503
|
+
reason: "no_active_revision" | "no_policy";
|
|
504
|
+
} | {
|
|
505
|
+
datasetId: string;
|
|
506
|
+
kind: "dataset";
|
|
507
|
+
admitted: false;
|
|
508
|
+
audienceEntry: {
|
|
509
|
+
kind: "organization";
|
|
510
|
+
} | {
|
|
511
|
+
kind: "user";
|
|
512
|
+
userId: string;
|
|
513
|
+
} | {
|
|
514
|
+
coverage: "direct" | "inherited";
|
|
515
|
+
groupId: string;
|
|
516
|
+
kind: "group";
|
|
517
|
+
} | {
|
|
518
|
+
kind: "profile";
|
|
519
|
+
profileId: string;
|
|
520
|
+
} | {
|
|
521
|
+
applicationId: string;
|
|
522
|
+
kind: "application";
|
|
523
|
+
} | {
|
|
524
|
+
applicationId: string;
|
|
525
|
+
kind: "anonymous";
|
|
526
|
+
} | {
|
|
527
|
+
capabilityId: string;
|
|
528
|
+
kind: "capability";
|
|
529
|
+
mode: "manage" | "on" | "read";
|
|
530
|
+
};
|
|
531
|
+
reason: "not_lowerable";
|
|
532
|
+
refusal: {
|
|
533
|
+
detail: string;
|
|
534
|
+
policyId: string;
|
|
535
|
+
reason: "operator" | "json_field" | "unknown_field" | "literal_type" | "operand" | "value_limit";
|
|
536
|
+
};
|
|
537
|
+
} | {
|
|
538
|
+
collectionId: string;
|
|
539
|
+
kind: "collection";
|
|
540
|
+
admitted: true;
|
|
541
|
+
audienceEntry: {
|
|
542
|
+
kind: "organization";
|
|
543
|
+
} | {
|
|
544
|
+
kind: "user";
|
|
545
|
+
userId: string;
|
|
546
|
+
} | {
|
|
547
|
+
coverage: "direct" | "inherited";
|
|
548
|
+
groupId: string;
|
|
549
|
+
kind: "group";
|
|
550
|
+
} | {
|
|
551
|
+
kind: "profile";
|
|
552
|
+
profileId: string;
|
|
553
|
+
} | {
|
|
554
|
+
applicationId: string;
|
|
555
|
+
kind: "application";
|
|
556
|
+
} | {
|
|
557
|
+
applicationId: string;
|
|
558
|
+
kind: "anonymous";
|
|
559
|
+
} | {
|
|
560
|
+
capabilityId: string;
|
|
561
|
+
kind: "capability";
|
|
562
|
+
mode: "manage" | "on" | "read";
|
|
563
|
+
};
|
|
564
|
+
opens: {
|
|
565
|
+
kind: "all";
|
|
566
|
+
} | {
|
|
567
|
+
folderIds: Array<string>;
|
|
568
|
+
kind: "folders";
|
|
569
|
+
};
|
|
570
|
+
policies: Array<{
|
|
571
|
+
folderId: string | null;
|
|
572
|
+
id: string;
|
|
573
|
+
kind: "core_admin" | "core_default" | "core_tenant" | "document_data_policy";
|
|
574
|
+
}>;
|
|
575
|
+
} | {
|
|
576
|
+
collectionId: string;
|
|
577
|
+
kind: "collection";
|
|
578
|
+
admitted: false;
|
|
579
|
+
reason: "not_in_audience";
|
|
580
|
+
} | {
|
|
581
|
+
collectionId: string;
|
|
582
|
+
kind: "collection";
|
|
583
|
+
admitted: false;
|
|
584
|
+
audienceEntry: {
|
|
585
|
+
kind: "organization";
|
|
586
|
+
} | {
|
|
587
|
+
kind: "user";
|
|
588
|
+
userId: string;
|
|
589
|
+
} | {
|
|
590
|
+
coverage: "direct" | "inherited";
|
|
591
|
+
groupId: string;
|
|
592
|
+
kind: "group";
|
|
593
|
+
} | {
|
|
594
|
+
kind: "profile";
|
|
595
|
+
profileId: string;
|
|
596
|
+
} | {
|
|
597
|
+
applicationId: string;
|
|
598
|
+
kind: "application";
|
|
599
|
+
} | {
|
|
600
|
+
applicationId: string;
|
|
601
|
+
kind: "anonymous";
|
|
602
|
+
} | {
|
|
603
|
+
capabilityId: string;
|
|
604
|
+
kind: "capability";
|
|
605
|
+
mode: "manage" | "on" | "read";
|
|
606
|
+
};
|
|
607
|
+
reason: "no_policy";
|
|
382
608
|
};
|
|
383
609
|
};
|
|
384
610
|
export type AccessExplainRequest = {
|
|
@@ -404,6 +630,12 @@ export type AccessExplainRequest = {
|
|
|
404
630
|
kind: "record";
|
|
405
631
|
operation: "read" | "write";
|
|
406
632
|
recordId: string;
|
|
633
|
+
} | {
|
|
634
|
+
datasetId: string;
|
|
635
|
+
kind: "dataset";
|
|
636
|
+
} | {
|
|
637
|
+
collectionId: string;
|
|
638
|
+
kind: "collection";
|
|
407
639
|
};
|
|
408
640
|
};
|
|
409
641
|
export type AccessGrantAxis = {
|
|
@@ -720,6 +952,20 @@ export type AccessMemberPage = {
|
|
|
720
952
|
items: Array<AccessMember>;
|
|
721
953
|
next: string | null;
|
|
722
954
|
};
|
|
955
|
+
export type AccessMemberHoldersRequest = {
|
|
956
|
+
axis: string;
|
|
957
|
+
profile: string | {
|
|
958
|
+
id: string;
|
|
959
|
+
};
|
|
960
|
+
value: {
|
|
961
|
+
knowledgeEntity: {
|
|
962
|
+
field: string;
|
|
963
|
+
value: string;
|
|
964
|
+
};
|
|
965
|
+
} | string;
|
|
966
|
+
after?: string;
|
|
967
|
+
limit?: number;
|
|
968
|
+
};
|
|
723
969
|
export type ExternalApplicationsGetContextErrors = {
|
|
724
970
|
/**
|
|
725
971
|
* Error
|
|
@@ -826,6 +1072,7 @@ export type ApplicationAccessMembersListData = {
|
|
|
826
1072
|
after?: string;
|
|
827
1073
|
email?: string;
|
|
828
1074
|
limit?: string;
|
|
1075
|
+
name?: string;
|
|
829
1076
|
};
|
|
830
1077
|
url: "/application/v1/access/members";
|
|
831
1078
|
};
|
|
@@ -839,6 +1086,16 @@ export type ApplicationAccessMembersCreateData = {
|
|
|
839
1086
|
query?: never;
|
|
840
1087
|
url: "/application/v1/access/members";
|
|
841
1088
|
};
|
|
1089
|
+
export type ApplicationAccessMembersListHoldersData = {
|
|
1090
|
+
body: AccessMemberHoldersRequest;
|
|
1091
|
+
headers: {
|
|
1092
|
+
authorization?: string;
|
|
1093
|
+
"x-organization-id": string;
|
|
1094
|
+
};
|
|
1095
|
+
path?: never;
|
|
1096
|
+
query?: never;
|
|
1097
|
+
url: "/application/v1/access/members/holders";
|
|
1098
|
+
};
|
|
842
1099
|
export type ApplicationAccessMembersDeleteData = {
|
|
843
1100
|
body?: never;
|
|
844
1101
|
headers: {
|
|
@@ -1996,6 +2253,7 @@ declare const createApplicationAccessApi: (client: Client$1) => {
|
|
|
1996
2253
|
members: {
|
|
1997
2254
|
create: (options: EndpointOptions<Options$1<ApplicationAccessMembersCreateData, false, unknown>>) => Promise<AccessMemberCreated>;
|
|
1998
2255
|
get: (options: EndpointOptions<Options$1<ApplicationAccessMembersGetData, false, unknown>>) => Promise<AccessMember>;
|
|
2256
|
+
holders: (options: EndpointOptions<Options$1<ApplicationAccessMembersListHoldersData, false, unknown>>) => Promise<AccessMemberPage>;
|
|
1999
2257
|
list: (options: EndpointOptions<Options$1<ApplicationAccessMembersListData, false, unknown>>) => Promise<AccessMemberPage>;
|
|
2000
2258
|
remove: (options: EndpointOptions<Options$1<ApplicationAccessMembersDeleteData, false, unknown>>) => Promise<void>;
|
|
2001
2259
|
resume: (options: EndpointOptions<Options$1<ApplicationAccessMembersResumeData, false, unknown>>) => Promise<void>;
|
|
@@ -2175,8 +2433,9 @@ export interface ServerAccessService {
|
|
|
2175
2433
|
/**
|
|
2176
2434
|
* Members and guests. `create` needs `admin.grants` at manage and Grant
|
|
2177
2435
|
* Authority over each grant; reads need `admin.users` at read for
|
|
2178
|
-
* members and `admin.guests` at read for guests;
|
|
2179
|
-
*
|
|
2436
|
+
* members and `admin.guests` at read for guests; `holders` also needs
|
|
2437
|
+
* `admin.grants` at read; changes need the same at manage. An app server
|
|
2438
|
+
* sees and changes only the guests it created.
|
|
2180
2439
|
*/
|
|
2181
2440
|
readonly members: Readonly<{
|
|
2182
2441
|
create: Method<WithBody<Api["members"]["create"]>, Api["members"]["create"]>;
|
|
@@ -2185,6 +2444,15 @@ export interface ServerAccessService {
|
|
|
2185
2444
|
email: string;
|
|
2186
2445
|
}>, ServerAccessMember | null>;
|
|
2187
2446
|
get: Method<WithPath<Api["members"]["get"]>, Api["members"]["get"]>;
|
|
2447
|
+
/**
|
|
2448
|
+
* The members that hold the profile (FQN or `{ id }`) on the Axis Value
|
|
2449
|
+
* of the Grant Axis `axis` (its slug) or on a value below it, through
|
|
2450
|
+
* their own or a Group grant; a grant above the value holds nothing
|
|
2451
|
+
* there. A suspended member is listed with `suspended: true`. A page in
|
|
2452
|
+
* user id order; pass `next` as `after` for the next.
|
|
2453
|
+
*/
|
|
2454
|
+
holders: Method<WithBody<Api["members"]["holders"]>, Api["members"]["holders"]>;
|
|
2455
|
+
/** A page of members, by `email`, or by a `name` that holds the text without case; pass `next` as `after` for the next. */
|
|
2188
2456
|
list: Method<ServerAccessContext & QueryOf<Api["members"]["list"]>, Api["members"]["list"]>;
|
|
2189
2457
|
remove: Method<WithPath<Api["members"]["remove"]>, Api["members"]["remove"]>;
|
|
2190
2458
|
resume: Method<WithPath<Api["members"]["resume"]>, Api["members"]["resume"]>;
|