@opengeni/sdk 2.5.0-canary.2 → 3.1.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/README.md +54 -0
- package/dist/accounts.d.ts +149 -0
- package/dist/accounts.js +295 -0
- package/dist/accounts.js.map +1 -0
- package/dist/artifact-client.d.ts +3 -3
- package/dist/artifacts.js +4 -3
- package/dist/browser.d.ts +6 -0
- package/dist/browser.js +30 -0
- package/dist/browser.js.map +1 -0
- package/dist/{chunk-7VERSV47.js → chunk-7ZXBPJZP.js} +90 -75
- package/dist/chunk-7ZXBPJZP.js.map +1 -0
- package/dist/chunk-TX3EIENU.js +79 -0
- package/dist/chunk-TX3EIENU.js.map +1 -0
- package/dist/{chunk-UP2PIWU2.js → chunk-VUQZAB3O.js} +5 -5
- package/dist/chunk-VUQZAB3O.js.map +1 -0
- package/dist/{chunk-ERPT45NP.js → chunk-YTAWBDO2.js} +2 -2
- package/dist/chunk-YTAWBDO2.js.map +1 -0
- package/dist/client.d.ts +25 -21
- package/dist/core.d.ts +2 -1
- package/dist/core.js +6 -5
- package/dist/document-authority-client.d.ts +29 -0
- package/dist/document-authority.d.ts +2 -0
- package/dist/document-authority.js +11 -0
- package/dist/document-authority.js.map +1 -0
- package/dist/editable-artifacts.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -21
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +143 -2
- package/package.json +14 -2
- package/src/accounts.ts +425 -0
- package/src/artifact-client.ts +3 -3
- package/src/browser.ts +21 -0
- package/src/client.ts +156 -108
- package/src/core.ts +2 -1
- package/src/document-authority-client.ts +116 -0
- package/src/document-authority.ts +17 -0
- package/src/index.ts +19 -0
- package/src/types.ts +186 -2
- package/dist/chunk-7VERSV47.js.map +0 -1
- package/dist/chunk-ERPT45NP.js.map +0 -1
- package/dist/chunk-UP2PIWU2.js.map +0 -1
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
OPENGENI_API_CONTRACT_REVISION,
|
|
6
6
|
OPENGENI_CORRELATION_HEADER,
|
|
7
7
|
RETAINED_OUTPUT_MAX_PAGE_BYTES
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YTAWBDO2.js";
|
|
9
9
|
import {
|
|
10
10
|
OpenGeniInteractionClient
|
|
11
11
|
} from "./chunk-GW3EJ2GP.js";
|
|
@@ -989,10 +989,13 @@ var OpenGeniClient = class {
|
|
|
989
989
|
request
|
|
990
990
|
);
|
|
991
991
|
}
|
|
992
|
-
async getNewSessionDraft(workspaceId) {
|
|
992
|
+
async getNewSessionDraft(workspaceId, options = {}) {
|
|
993
993
|
return await this.requestJson(
|
|
994
994
|
"GET",
|
|
995
|
-
`/v1/workspaces/${workspaceId}/new-session-draft
|
|
995
|
+
`/v1/workspaces/${workspaceId}/new-session-draft`,
|
|
996
|
+
void 0,
|
|
997
|
+
{},
|
|
998
|
+
options
|
|
996
999
|
);
|
|
997
1000
|
}
|
|
998
1001
|
async saveNewSessionDraft(workspaceId, request) {
|
|
@@ -1137,7 +1140,10 @@ var OpenGeniClient = class {
|
|
|
1137
1140
|
}
|
|
1138
1141
|
/** Compact, bounded workspace agent hierarchy page. */
|
|
1139
1142
|
async listAgentTopology(workspaceId, options = {}) {
|
|
1140
|
-
const
|
|
1143
|
+
const query = options.query?.trim() || options.search?.trim();
|
|
1144
|
+
if (query && options.subject) {
|
|
1145
|
+
throw new TypeError("listAgentTopology query cannot be combined with an exact subject");
|
|
1146
|
+
}
|
|
1141
1147
|
return await this.requestJson(
|
|
1142
1148
|
"GET",
|
|
1143
1149
|
`/v1/workspaces/${workspaceId}/agent-topology`,
|
|
@@ -1145,8 +1151,18 @@ var OpenGeniClient = class {
|
|
|
1145
1151
|
{
|
|
1146
1152
|
...options.limit !== void 0 ? { limit: String(options.limit) } : {},
|
|
1147
1153
|
...options.parentSessionId === void 0 ? {} : { parentSessionId: options.parentSessionId ?? "null" },
|
|
1154
|
+
...options.rootSessionId ? { rootSessionId: options.rootSessionId } : {},
|
|
1148
1155
|
...options.cursor ? { cursor: options.cursor } : {},
|
|
1149
|
-
...
|
|
1156
|
+
...query ? { query } : {},
|
|
1157
|
+
...options.statuses?.length ? { statuses: options.statuses.join(",") } : {},
|
|
1158
|
+
...options.activeOnly !== void 0 ? { activeOnly: options.activeOnly ? "true" : "false" } : {},
|
|
1159
|
+
...options.recentHours !== void 0 ? { recentHours: String(options.recentHours) } : {},
|
|
1160
|
+
...options.subject ? {
|
|
1161
|
+
subjectNamespace: options.subject.namespace,
|
|
1162
|
+
subjectType: options.subject.type,
|
|
1163
|
+
subjectKey: options.subject.canonicalKey
|
|
1164
|
+
} : {},
|
|
1165
|
+
...options.claimLimit !== void 0 ? { claimLimit: String(options.claimLimit) } : {}
|
|
1150
1166
|
}
|
|
1151
1167
|
);
|
|
1152
1168
|
}
|
|
@@ -3088,6 +3104,61 @@ var OpenGeniClient = class {
|
|
|
3088
3104
|
request
|
|
3089
3105
|
);
|
|
3090
3106
|
}
|
|
3107
|
+
async getOrganizationRecovery(organizationId) {
|
|
3108
|
+
return await this.requestJson(
|
|
3109
|
+
"GET",
|
|
3110
|
+
`/v1/organizations/${organizationId}/recovery`
|
|
3111
|
+
);
|
|
3112
|
+
}
|
|
3113
|
+
async configureOrganizationRecoveryPolicy(organizationId, request) {
|
|
3114
|
+
return await this.requestJson(
|
|
3115
|
+
"PUT",
|
|
3116
|
+
`/v1/organizations/${organizationId}/recovery/policy`,
|
|
3117
|
+
request
|
|
3118
|
+
);
|
|
3119
|
+
}
|
|
3120
|
+
async acceptOrganizationRecoveryCustody(organizationId, request) {
|
|
3121
|
+
return await this.requestJson(
|
|
3122
|
+
"POST",
|
|
3123
|
+
`/v1/organizations/${organizationId}/recovery/policy/accept`,
|
|
3124
|
+
request
|
|
3125
|
+
);
|
|
3126
|
+
}
|
|
3127
|
+
async disableOrganizationRecoveryPolicy(organizationId, request) {
|
|
3128
|
+
return await this.requestJson(
|
|
3129
|
+
"POST",
|
|
3130
|
+
`/v1/organizations/${organizationId}/recovery/policy/disable`,
|
|
3131
|
+
request
|
|
3132
|
+
);
|
|
3133
|
+
}
|
|
3134
|
+
async startOrganizationRecoveryOperation(organizationId, request) {
|
|
3135
|
+
return await this.requestJson(
|
|
3136
|
+
"POST",
|
|
3137
|
+
`/v1/organizations/${organizationId}/recovery/operations`,
|
|
3138
|
+
request
|
|
3139
|
+
);
|
|
3140
|
+
}
|
|
3141
|
+
async approveOrganizationRecoveryOperation(organizationId, recoveryOperationId, request) {
|
|
3142
|
+
return await this.requestJson(
|
|
3143
|
+
"POST",
|
|
3144
|
+
`/v1/organizations/${organizationId}/recovery/operations/${recoveryOperationId}/approve`,
|
|
3145
|
+
request
|
|
3146
|
+
);
|
|
3147
|
+
}
|
|
3148
|
+
async cancelOrganizationRecoveryOperation(organizationId, recoveryOperationId, request) {
|
|
3149
|
+
return await this.requestJson(
|
|
3150
|
+
"POST",
|
|
3151
|
+
`/v1/organizations/${organizationId}/recovery/operations/${recoveryOperationId}/cancel`,
|
|
3152
|
+
request
|
|
3153
|
+
);
|
|
3154
|
+
}
|
|
3155
|
+
async executeOrganizationRecoveryOperation(organizationId, recoveryOperationId, request) {
|
|
3156
|
+
return await this.requestJson(
|
|
3157
|
+
"POST",
|
|
3158
|
+
`/v1/organizations/${organizationId}/recovery/operations/${recoveryOperationId}/execute`,
|
|
3159
|
+
request
|
|
3160
|
+
);
|
|
3161
|
+
}
|
|
3091
3162
|
async listWorkspaces() {
|
|
3092
3163
|
return await this.requestJson("GET", "/v1/workspaces");
|
|
3093
3164
|
}
|
|
@@ -3539,6 +3610,14 @@ var OpenGeniClient = class {
|
|
|
3539
3610
|
`/v1/workspaces/${workspaceId}/variable-sets`
|
|
3540
3611
|
);
|
|
3541
3612
|
}
|
|
3613
|
+
/** Resolve only caller-supplied attachment ids without enumerating the catalog. */
|
|
3614
|
+
async resolveVariableSetAttachments(workspaceId, request) {
|
|
3615
|
+
return await this.requestJson(
|
|
3616
|
+
"POST",
|
|
3617
|
+
`/v1/workspaces/${workspaceId}/variable-sets/resolve-attachments`,
|
|
3618
|
+
request
|
|
3619
|
+
);
|
|
3620
|
+
}
|
|
3542
3621
|
async createVariableSet(workspaceId, request) {
|
|
3543
3622
|
return await this.requestJson(
|
|
3544
3623
|
"POST",
|
|
@@ -3834,10 +3913,13 @@ var OpenGeniClient = class {
|
|
|
3834
3913
|
async (signal) => await this.completeFileUpload(workspaceId, upload.uploadId, { signal })
|
|
3835
3914
|
);
|
|
3836
3915
|
}
|
|
3837
|
-
async getFile(workspaceId, fileId) {
|
|
3916
|
+
async getFile(workspaceId, fileId, options = {}) {
|
|
3838
3917
|
return await this.requestJson(
|
|
3839
3918
|
"GET",
|
|
3840
|
-
`/v1/workspaces/${workspaceId}/files/${fileId}
|
|
3919
|
+
`/v1/workspaces/${workspaceId}/files/${fileId}`,
|
|
3920
|
+
void 0,
|
|
3921
|
+
{},
|
|
3922
|
+
options
|
|
3841
3923
|
);
|
|
3842
3924
|
}
|
|
3843
3925
|
/** Read provider-neutral retained evidence metadata; never returns a storage location. */
|
|
@@ -4120,73 +4202,6 @@ var OpenGeniClient = class {
|
|
|
4120
4202
|
request
|
|
4121
4203
|
);
|
|
4122
4204
|
}
|
|
4123
|
-
/**
|
|
4124
|
-
* Atomically reclassify a Document's authority and every indexed chunk.
|
|
4125
|
-
* The operation is replay-safe and rejects a stale expected authority tuple.
|
|
4126
|
-
*/
|
|
4127
|
-
async reclassifyDocumentAuthority(workspaceId, documentId, request) {
|
|
4128
|
-
return await this.requestJson(
|
|
4129
|
-
"POST",
|
|
4130
|
-
`/v1/workspaces/${workspaceId}/documents/${documentId}/authority-reclassifications`,
|
|
4131
|
-
request
|
|
4132
|
-
);
|
|
4133
|
-
}
|
|
4134
|
-
/** List the current actor's durable authority-reclassification receipts. */
|
|
4135
|
-
async listDocumentAuthorityReclassifications(workspaceId, documentId, options = {}) {
|
|
4136
|
-
const params = new URLSearchParams();
|
|
4137
|
-
if (options.limit !== void 0) params.set("limit", String(options.limit));
|
|
4138
|
-
if (options.cursor) params.set("cursor", options.cursor);
|
|
4139
|
-
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
4140
|
-
return await this.requestJson(
|
|
4141
|
-
"GET",
|
|
4142
|
-
`/v1/workspaces/${workspaceId}/documents/${documentId}/authority-reclassifications${query}`
|
|
4143
|
-
);
|
|
4144
|
-
}
|
|
4145
|
-
/**
|
|
4146
|
-
* Advance one resumable, organization-scoped Default collection backfill.
|
|
4147
|
-
* Reusing an operation ID is idempotent; keep the run ID across batches.
|
|
4148
|
-
*/
|
|
4149
|
-
async runDocumentDefaultCollectionBackfill(workspaceId, request) {
|
|
4150
|
-
return await this.requestJson(
|
|
4151
|
-
"POST",
|
|
4152
|
-
`/v1/workspaces/${workspaceId}/document-default-collection-backfills`,
|
|
4153
|
-
request
|
|
4154
|
-
);
|
|
4155
|
-
}
|
|
4156
|
-
/** List organization-scoped Default collection backfill runs (organization admin only). */
|
|
4157
|
-
async listDocumentDefaultCollectionBackfillRuns(workspaceId, options = {}) {
|
|
4158
|
-
const params = new URLSearchParams();
|
|
4159
|
-
if (options.limit !== void 0) params.set("limit", String(options.limit));
|
|
4160
|
-
if (options.cursor) params.set("cursor", options.cursor);
|
|
4161
|
-
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
4162
|
-
return await this.requestJson(
|
|
4163
|
-
"GET",
|
|
4164
|
-
`/v1/workspaces/${workspaceId}/document-default-collection-backfills${query}`
|
|
4165
|
-
);
|
|
4166
|
-
}
|
|
4167
|
-
/** Read bounded operation and workspace receipts for one Default-collection backfill run. */
|
|
4168
|
-
async getDocumentDefaultCollectionBackfillAudit(workspaceId, runId, options = {}) {
|
|
4169
|
-
const params = new URLSearchParams();
|
|
4170
|
-
if (options.limit !== void 0) params.set("limit", String(options.limit));
|
|
4171
|
-
if (options.operationCursor) params.set("operationCursor", options.operationCursor);
|
|
4172
|
-
if (options.receiptCursor) params.set("receiptCursor", options.receiptCursor);
|
|
4173
|
-
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
4174
|
-
return await this.requestJson(
|
|
4175
|
-
"GET",
|
|
4176
|
-
`/v1/workspaces/${workspaceId}/document-default-collection-backfills/${runId}${query}`
|
|
4177
|
-
);
|
|
4178
|
-
}
|
|
4179
|
-
/** List organization-wide Document authority changes (organization admin only). */
|
|
4180
|
-
async listOrganizationDocumentAuthorityReclassifications(workspaceId, options = {}) {
|
|
4181
|
-
const params = new URLSearchParams();
|
|
4182
|
-
if (options.limit !== void 0) params.set("limit", String(options.limit));
|
|
4183
|
-
if (options.cursor) params.set("cursor", options.cursor);
|
|
4184
|
-
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
4185
|
-
return await this.requestJson(
|
|
4186
|
-
"GET",
|
|
4187
|
-
`/v1/workspaces/${workspaceId}/document-authority-reclassifications${query}`
|
|
4188
|
-
);
|
|
4189
|
-
}
|
|
4190
4205
|
/** Retry indexing for a failed document. */
|
|
4191
4206
|
async reindexDocument(workspaceId, baseId, documentId) {
|
|
4192
4207
|
return await this.requestJson(
|
|
@@ -5463,4 +5478,4 @@ export {
|
|
|
5463
5478
|
parseMediaGenerationResult,
|
|
5464
5479
|
OpenGeniClient
|
|
5465
5480
|
};
|
|
5466
|
-
//# sourceMappingURL=chunk-
|
|
5481
|
+
//# sourceMappingURL=chunk-7ZXBPJZP.js.map
|