@collective-intelligence/external-apps-server-sdk 0.1.8 → 0.1.9
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 +77 -0
- package/dist/admin.d.ts +75 -13
- package/dist/express.d.ts +5 -1
- package/dist/gateway/contracts.d.ts +5 -1
- package/dist/gateway.d.ts +5 -1
- package/dist/gateway.js +2 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +2 -2
- package/dist/knowledge-sources/payload.d.ts +5 -1
- package/dist/knowledge-sources/strapi.d.ts +5 -1
- package/dist/persistence/drizzle.d.ts +3 -1
- package/dist/persistence/drizzle.js +3 -2
- package/dist/resources.d.ts +26 -4
- package/dist/resources.js +1 -1
- package/dist/runtime/effect.d.ts +24 -4
- package/dist/runtime/effect.js +2 -1
- package/dist/runtime/express.d.ts +5 -1
- package/dist/runtime/nestjs.d.ts +24 -4
- package/dist/runtime/nestjs.js +1 -1
- package/dist/runtime/next.d.ts +24 -4
- package/dist/runtime/next.js +1 -1
- package/dist/runtime/web.d.ts +5 -1
- package/dist/runtime/web.js +1 -1
- package/dist/tools/ai-sdk.js +2 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -415,7 +415,25 @@ interface MemberUserPage {
|
|
|
415
415
|
pageSize: number;
|
|
416
416
|
totalItems: number;
|
|
417
417
|
}
|
|
418
|
+
declare const storageFileIdBrand: unique symbol;
|
|
419
|
+
/** A durable private file of the application's Organization. */
|
|
420
|
+
type StorageFileId = string & Readonly<{
|
|
421
|
+
[storageFileIdBrand]: "StorageFileId";
|
|
422
|
+
}>;
|
|
423
|
+
/**
|
|
424
|
+
* One file of up to 10 MiB, base64-encoded. CI accepts the content types
|
|
425
|
+
* `application/pdf`, `image/jpeg` and `image/png`.
|
|
426
|
+
*/
|
|
427
|
+
interface DurableFileUpload {
|
|
428
|
+
contentBase64: string;
|
|
429
|
+
contentType: string;
|
|
430
|
+
fileName: string;
|
|
431
|
+
sizeBytes: number;
|
|
432
|
+
}
|
|
418
433
|
export type ExternalApplicationServiceOperationRequest = {
|
|
434
|
+
input: DurableFileUpload;
|
|
435
|
+
operationId: "files_upload";
|
|
436
|
+
} | {
|
|
419
437
|
input: {
|
|
420
438
|
email: string;
|
|
421
439
|
name: string;
|
|
@@ -459,7 +477,9 @@ export type ExternalApplicationServiceOperationRequest = {
|
|
|
459
477
|
export interface UserCompanyLinks {
|
|
460
478
|
entityIds: string[];
|
|
461
479
|
}
|
|
462
|
-
export type ExternalApplicationServiceOperationSuccess = EnvelopeSuccess<"
|
|
480
|
+
export type ExternalApplicationServiceOperationSuccess = EnvelopeSuccess<"files_upload", {
|
|
481
|
+
storageFileId: StorageFileId;
|
|
482
|
+
}> | EnvelopeSuccess<"members_create_or_get", MemberUser & {
|
|
463
483
|
outcome: MemberUserResolution;
|
|
464
484
|
}> | EnvelopeSuccess<"members_get", MemberUser> | EnvelopeSuccess<"members_list", MemberUserPage> | EnvelopeSuccess<"members_update", MemberUser> | EnvelopeSuccess<"members_remove", {
|
|
465
485
|
userId: string;
|
|
@@ -731,6 +751,17 @@ export interface ServerClient {
|
|
|
731
751
|
continue: ServerOperationMethod<"conversations_continue">;
|
|
732
752
|
history: ServerOperationMethod<"conversations_history">;
|
|
733
753
|
}>;
|
|
754
|
+
/**
|
|
755
|
+
* Durable private files of the application's Organization. `upload` stores
|
|
756
|
+
* one PDF, JPEG or PNG of up to 10 MiB with no expiry and returns its
|
|
757
|
+
* `storageFileId`; a `workflows.invoke` input can name it, and the nodes of
|
|
758
|
+
* the run read the file. Needs the `ai:attachments` scope and confidential
|
|
759
|
+
* credentials. Unlike `attachments.upload`, the file belongs to no run and
|
|
760
|
+
* does not expire after 24 hours.
|
|
761
|
+
*/
|
|
762
|
+
readonly files: Readonly<{
|
|
763
|
+
upload: ServerOperationMethod<"files_upload">;
|
|
764
|
+
}>;
|
|
734
765
|
readonly knowledge: Readonly<{
|
|
735
766
|
autocomplete: ServerOperationMethod<"knowledge_autocomplete">;
|
|
736
767
|
createEntity: ServerOperationMethod<"knowledge_create_entity">;
|
|
@@ -854,6 +885,7 @@ export declare const exchangeMemberSession: (request: MemberSessionExchangeReque
|
|
|
854
885
|
export declare const uuidV7: () => string;
|
|
855
886
|
|
|
856
887
|
export {
|
|
888
|
+
DurableFileUpload as ServerDurableFileUpload,
|
|
857
889
|
MemberSessionExchangeError$1 as MemberSessionExchangeError,
|
|
858
890
|
MemberUser as ServerMemberUser,
|
|
859
891
|
MemberUserPage as ServerMemberUserPage,
|
|
@@ -864,6 +896,7 @@ export {
|
|
|
864
896
|
MessageSendFailure as ServerMessageSendFailure,
|
|
865
897
|
MessageSendResult as ServerMessageSendResult,
|
|
866
898
|
MessageTarget as ServerMessageTarget,
|
|
899
|
+
StorageFileId as ServerStorageFileId,
|
|
867
900
|
};
|
|
868
901
|
|
|
869
902
|
export {};
|