@qaecy/cue-sdk 0.0.54 → 0.0.57

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/index.d.ts CHANGED
@@ -3,7 +3,8 @@ export { CueGis } from './lib/gis';
3
3
  export { CueStorage } from './lib/storage';
4
4
  export type { StorageBucket } from './lib/storage';
5
5
  export type { GisBBox, GisCategoryDescriptor, GisFeature, GisFeaturesMap, FeatureCategory } from './lib/gis';
6
- export { CueAuth } from './lib/auth';
6
+ export { CueAuth, CueAuthError } from './lib/auth';
7
+ export type { CueActionCodeInfo, CueActionOperation } from './lib/auth';
7
8
  export { CueSignUp, CueRequestError } from './lib/signup';
8
9
  export type { OrgSignUpPayload, OrgSignUpPlan } from './lib/signup';
9
10
  export { CueApi } from './lib/api';
@@ -27,7 +28,7 @@ export { CueProjects } from './lib/project';
27
28
  export type { ProjectUpdate } from './lib/project';
28
29
  export { CueProfile } from './lib/profile';
29
30
  export { CueAdmin } from './lib/admin';
30
- export type { AdminOrgSearchResult, AdminUserSearchResult, AdminProjectSearchResult, AdminUserOrgSummary, AdminUserProjectSummary, AdminUserDetail, AdminDeletedUserOrgRef, AdminDeletedUserProjectRef, AdminDeletedUserSummary, AdminRestoreUserResult, } from './lib/models';
31
+ export type { AdminOrgSearchResult, AdminUserSearchResult, AdminProjectSearchResult, AdminUserOrgSummary, AdminUserProjectSummary, AdminUserDetail, AdminDeletedUserOrgRef, AdminDeletedUserProjectRef, AdminDeletedUserSummary, AdminRestoreUserResult, TransferProjectRequest, TransferProjectResult, ProjectOwnershipPeriod, } from './lib/models';
31
32
  export { CuePrivileges, REQUIRED_ROLES } from './lib/privileges';
32
33
  export type { UserProjectRole, Privileges } from './lib/privileges';
33
34
  export { CueSignal, cueComputed } from './lib/signal';
@@ -36,7 +37,7 @@ export { CueCache } from './lib/cache';
36
37
  export type { QueryCacheEntry } from './lib/cache';
37
38
  export { CueCurrency, SUPPORTED_CURRENCIES, BASE_CURRENCY } from './lib/currency';
38
39
  export type { SupportedCurrency, CurrencyRates } from './lib/currency';
39
- export type { CueSdkConfig, SsoProvider, PasswordCredentials, SearchRequest, SearchResponse, SearchSource, SearchOptions, ProjectData, ProjectSettings, QleverStats, CreateProjectOptions, SyncOptions, SyncResult, SyncPreview, ScanOutputRecord, UnitCreditMap, UnitsConsumedDto, OrgCreditsDto, OrgPlanSummary, MonthlyConsumptionDto, ProjectConsumptionReportDto, OrgConsumptionReportDto, FileTypeConsumptionDto, FileTypeBreakdownDto, RouteTrafficDto, DayTrafficDto, MonthTrafficDto, TrafficReportDto, ViewUsageDto, DayUsageDto, MonthUsageDto, UsageReportDto, OrganizationData, OrgMember, ProfileSSOAccount, APIKeyInfo, APIKeyDoc, ProjectDoc, OrganizationDoc, UserDoc, UserSettings, CustomAppRecord, CustomAppWithHtml, CreateCustomAppOptions, UpdateCustomAppOptions, RDFWritingDoc, ProcessingStatus, ProcessingStage, DocumentProcessingStage, DocumentProgress, ProjectProcessingSummary, MyProcessingStatus, DocumentReprocessJob, ReprocessJobStatus, ViewDefinition, QueryCache, LangMap, CategoryDef, RelationshipDef, EntityCoreData, EntityRelationship, EntityRelationships, MapGeometry, EntityDetailedData, ProjectEntitiesData, SummaryGraphData, PrototypeCategoryCount, PrototypeSummary, PrototypeProperty, PrototypeInstance, EntityAtExpressId, EntityModelLocation, ModelExpressIds, PrototypeCategoryExpressIds, DocumentInfo, DocumentSummary, ProjectDocumentsData, } from './lib/models';
40
+ export type { CueSdkConfig, SsoProvider, PasswordCredentials, SearchRequest, SearchResponse, SearchSource, SearchOptions, ProjectData, ProjectSettings, QleverStats, CreateProjectOptions, SyncOptions, SyncResult, SyncPreview, ScanOutputRecord, UnitCreditMap, UnitsConsumedDto, OrgCredits, OrgCreditsDto, OrgPlanSummary, MonthlyConsumptionDto, ProjectConsumptionReportDto, OrgConsumptionReportDto, FileTypeConsumptionDto, FileTypeBreakdownDto, RouteTrafficDto, DayTrafficDto, MonthTrafficDto, TrafficReportDto, ViewUsageDto, DayUsageDto, MonthUsageDto, UsageReportDto, OrganizationData, OrgMember, ProfileSSOAccount, APIKeyInfo, APIKeyDoc, ProjectDoc, OrganizationDoc, UserDoc, UserSettings, CustomAppRecord, CustomAppWithHtml, CreateCustomAppOptions, UpdateCustomAppOptions, RDFWritingDoc, ProcessingStatus, ProcessingStage, DocumentProcessingStage, DocumentStageCounts, DocumentProgress, ProjectProcessingSummary, MyProcessingStatus, DocumentReprocessJob, ReprocessJobStatus, ReprocessDocumentOptions, ReprocessAccepted, ReprocessPlan, EntityMentionInput, EntityMentionDeletion, SelectorInput, ContentCategoryChange, EditResult, BatchEditResult, ViewDefinition, QueryCache, LangMap, CategoryDef, RelationshipDef, EntityCoreData, EntityRelationship, EntityRelationships, MapGeometry, EntityDetailedData, ProjectEntitiesData, SummaryGraphData, PrototypeCategoryCount, PrototypeSummary, PrototypeProperty, PrototypeInstance, EntityAtExpressId, EntityModelLocation, ModelExpressIds, PrototypeCategoryExpressIds, DocumentInfo, DocumentSummary, ProjectDocumentsData, } from './lib/models';
40
41
  export type { AuthStateListener, Unsubscribe } from './lib/auth';
41
42
  export { CueTables } from './lib/tables';
42
43
  export type { ProjectTable } from './lib/tables';
@@ -48,8 +49,10 @@ export { CueDataSources } from './lib/data-sources';
48
49
  export type { DataSourceRecord, XToRdfConfig, RmlXToRdfConfig, GraphXToRdfConfig, TypeMappingConfiguration, UploadDataSourceMode, UploadDataSourceResult, } from './lib/data-sources';
49
50
  export { CueGisSources } from './lib/gis-sources';
50
51
  export type { GisSourceRecord, GisSourceUploadFormat, GisSourceCrs } from './lib/gis-sources';
52
+ export { CueEdits } from './lib/edits';
53
+ export { isReprocessPlan } from './lib/models';
51
54
  export { CueSemanticTemplate } from './lib/semantic-template';
52
- export type { MutationResult as SemanticTemplateMutationResult, BatchMutationResult as SemanticTemplateBatchMutationResult, ContentCategoryInput, EntityCategoryInput, EntityRelationshipInput, SchemaSource, } from './lib/semantic-template';
55
+ export type { MutationResult as SemanticTemplateMutationResult, BatchMutationResult as SemanticTemplateBatchMutationResult, ContentCategoryInput, EntityCategoryInput, EntityRelationshipInput, SchemaSource, RenameCanonicalInput, RenameCanonicalResult, } from './lib/semantic-template';
53
56
  export { CueSchemaSuggestion } from './lib/schema-suggestion';
54
57
  export { ENDPOINT_SCHEMA_SUGGESTION_FROM_PROSE, ENDPOINT_SCHEMA_SUGGESTION_CATALOGS, } from './lib/schema-suggestion';
55
58
  export type { SuggestSchemaFromProseRequest, SuggestSchemaFromProseResponse, SchemaSuggestionUsage, } from './lib/schema-suggestion';
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as C, C as u, a as i, b as r, c as o, d as t, e as S, f as n, g as c, h as E, i as m, j as p, k as A, l, m as P, n as R, o as _, p as I, q as d, r as g, s as T, t as D, u as O, v as N, w as U, x as G, y as h, z as f, A as j, D as v, E as x, F as M, G as y, H as B, I as F, J as L, K as H, L as b, M as K, N as q, O as w, P as Q, Q as V, R as W, S as X, T as Y, U as k, V as z, W as J, X as Z, Y as $, Z as ee, _ as ae, $ as se, a0 as Ce, a1 as ue, a2 as ie, a3 as re } from "./document-filter-BSiwWQ5L.js";
1
+ import { B as C, C as u, a as i, b as r, c as o, d as t, e as n, f as S, g as c, h as E, i as m, j as p, k as A, l, m as P, n as R, o as _, p as d, q as I, r as g, s as T, t as D, u as O, v as N, w as U, x as h, y as G, z as f, A as j, D as v, E as x, F as M, G as y, H as B, I as F, J as L, K as H, L as b, M as K, N as q, O as w, P as Q, Q as V, R as W, S as X, T as Y, U as k, V as z, W as J, X as Z, Y as $, Z as aa, _ as ea, $ as sa, a0 as Ca, a1 as ua, a2 as ia, a3 as ra, a4 as oa, a5 as ta, a6 as na } from "./models-DCFnaBFw.js";
2
2
  import "uuid";
3
3
  export {
4
4
  C as BASE_CURRENCY,
@@ -7,56 +7,59 @@ export {
7
7
  r as CatalogKind,
8
8
  o as Cue,
9
9
  t as CueAdmin,
10
- S as CueApi,
11
- n as CueAppData,
10
+ n as CueApi,
11
+ S as CueAppData,
12
12
  c as CueApps,
13
13
  E as CueAuth,
14
- m as CueCache,
15
- p as CueContexts,
16
- A as CueCurrency,
17
- l as CueDataSources,
18
- P as CueDmsApi,
19
- R as CueDocumentFilter,
20
- _ as CueExtraction,
21
- I as CueGis,
22
- d as CueGisSources,
23
- g as CueIndexApi,
24
- T as CueLlmTools,
25
- D as CueMcp,
26
- O as CuePrivileges,
27
- N as CueProcessingApi,
28
- U as CueProfile,
29
- G as CueProjectDocuments,
30
- h as CueProjectEntities,
31
- f as CueProjectSchema,
32
- j as CueProjectView,
33
- v as CueProjects,
34
- x as CueRequestError,
35
- M as CueSchemaSuggestion,
36
- y as CueSemanticTemplate,
37
- B as CueSignUp,
38
- F as CueSignal,
39
- L as CueStorage,
40
- H as CueSyncApi,
41
- b as CueTables,
42
- K as CueUserSettings,
43
- q as DEFAULT_SCHEMA_BASE,
44
- w as ENDPOINT_SCHEMA_SUGGESTION_CATALOGS,
45
- Q as ENDPOINT_SCHEMA_SUGGESTION_FROM_PROSE,
46
- V as EmbeddingBasis,
47
- W as NumeralRole,
48
- X as Provenance,
49
- Y as REQUIRED_ROLES,
50
- k as ResolutionIdentity,
51
- z as SUPPORTED_CURRENCIES,
52
- J as SchemaTermKind,
53
- Z as configureScanWasm,
54
- $ as cueComputed,
55
- ee as deriveIri,
56
- ae as expandCurie,
57
- se as isCurie,
58
- Ce as rdfBase,
59
- ue as resolveIri,
60
- ie as resolveRef,
61
- re as schemaGraphIri
14
+ m as CueAuthError,
15
+ p as CueCache,
16
+ A as CueContexts,
17
+ l as CueCurrency,
18
+ P as CueDataSources,
19
+ R as CueDmsApi,
20
+ _ as CueDocumentFilter,
21
+ d as CueEdits,
22
+ I as CueExtraction,
23
+ g as CueGis,
24
+ T as CueGisSources,
25
+ D as CueIndexApi,
26
+ O as CueLlmTools,
27
+ N as CueMcp,
28
+ U as CuePrivileges,
29
+ h as CueProcessingApi,
30
+ G as CueProfile,
31
+ f as CueProjectDocuments,
32
+ j as CueProjectEntities,
33
+ v as CueProjectSchema,
34
+ x as CueProjectView,
35
+ M as CueProjects,
36
+ y as CueRequestError,
37
+ B as CueSchemaSuggestion,
38
+ F as CueSemanticTemplate,
39
+ L as CueSignUp,
40
+ H as CueSignal,
41
+ b as CueStorage,
42
+ K as CueSyncApi,
43
+ q as CueTables,
44
+ w as CueUserSettings,
45
+ Q as DEFAULT_SCHEMA_BASE,
46
+ V as ENDPOINT_SCHEMA_SUGGESTION_CATALOGS,
47
+ W as ENDPOINT_SCHEMA_SUGGESTION_FROM_PROSE,
48
+ X as EmbeddingBasis,
49
+ Y as NumeralRole,
50
+ k as Provenance,
51
+ z as REQUIRED_ROLES,
52
+ J as ResolutionIdentity,
53
+ Z as SUPPORTED_CURRENCIES,
54
+ $ as SchemaTermKind,
55
+ aa as configureScanWasm,
56
+ ea as cueComputed,
57
+ sa as deriveIri,
58
+ Ca as expandCurie,
59
+ ua as isCurie,
60
+ ia as isReprocessPlan,
61
+ ra as rdfBase,
62
+ oa as resolveIri,
63
+ ta as resolveRef,
64
+ na as schemaGraphIri
62
65
  };
package/lib/admin.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CueAuth } from './auth';
2
- import { AdminDeletedOrganizationSummary, AdminDeletedUserSummary, AdminOrganization, AdminOrgSearchResult, AdminOrphanedOrganization, AdminOrphanedProject, AdminOrphanedUser, AdminProjectSearchResult, AdminRestoreOrganizationResult, AdminRestoreUserResult, AdminUserDetail, AdminUserSearchResult, OrganizationData, ProjectData } from './models';
2
+ import { AdminDeletedOrganizationSummary, AdminDeletedUserSummary, AdminOrganization, AdminOrgSearchResult, AdminOrphanedOrganization, AdminOrphanedProject, AdminOrphanedUser, AdminProjectSearchResult, AdminRestoreOrganizationResult, AdminRestoreUserResult, AdminUserDetail, AdminUserSearchResult, OrganizationData, ProjectData, TransferProjectRequest, TransferProjectResult } from './models';
3
3
  /**
4
4
  * Cross-organisation lookup for platform superadmins.
5
5
  *
@@ -10,7 +10,7 @@ import { AdminDeletedOrganizationSummary, AdminDeletedUserSummary, AdminOrganiza
10
10
  *
11
11
  * Search is substring matching done server-side over a capped scan (Firestore
12
12
  * has no substring index), so results are best-effort rather than exhaustive on
13
- * very large collections — see the service-side notes in `data-views`.
13
+ * very large collections — see the service-side notes in `writers-cue-bff`'s read side.
14
14
  *
15
15
  * @example
16
16
  * ```ts
@@ -54,6 +54,18 @@ export declare class CueAdmin {
54
54
  * teardown, not normal superadmin use, since a hard delete cannot be undone.
55
55
  */
56
56
  deleteUser(uid: string, hard?: boolean): Promise<void>;
57
+ /**
58
+ * Overwrites a user's display name (Auth `displayName` and profile doc) — e.g.
59
+ * for accounts created before a name was required. Any user, any org.
60
+ */
61
+ renameUser(uid: string, name: string): Promise<void>;
62
+ /**
63
+ * Hands a project to another organisation. Consumption up to now stays on the
64
+ * current owner's balance; only later uploads count against the new one.
65
+ * Members and roles are unchanged. Throws a `CueRequestError` with status 409
66
+ * when the project no longer belongs to `expectedCurrentOrganizationID`.
67
+ */
68
+ transferProject(projectId: string, request: TransferProjectRequest): Promise<TransferProjectResult>;
57
69
  /**
58
70
  * Undoes `deleteUser`: recreates the Auth account (same uid) and profile doc,
59
71
  * and re-grants the recorded org/project roles where those still exist.
package/lib/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CueBlobStorage } from '../../databases/src/index';
2
2
  import { CueAuth } from './auth';
3
- import { SearchRequest, SearchResponse, ShaclValidationReport, UnitsConsumedDto } from './models';
3
+ import { ReprocessAccepted, ReprocessDocumentOptions, ReprocessPlan, SearchRequest, SearchResponse, ShaclValidationReport, UnitsConsumedDto } from './models';
4
4
  import { CueProjects } from './project';
5
5
  import { CueSyncApi } from './sync';
6
6
  import { CueTables } from './tables';
@@ -18,6 +18,7 @@ import { CueDataSources } from './data-sources';
18
18
  import { CueGisSources } from './gis-sources';
19
19
  import { CueSchemaSuggestion } from './schema-suggestion';
20
20
  import { CueSemanticTemplate } from './semantic-template';
21
+ import { CueEdits } from './edits';
21
22
  export interface PutAlternativeRepresentationResult {
22
23
  success: boolean;
23
24
  contentIRI: string;
@@ -61,6 +62,8 @@ export declare class CueApi {
61
62
  readonly semanticTemplate: CueSemanticTemplate;
62
63
  /** Prose into a proposed `ProjectSchema`, selected from the published term catalogues. */
63
64
  readonly schemaSuggestion: CueSchemaSuggestion;
65
+ /** Hand-made graph edits from the document viewer — entity mentions, selectors, content categories. */
66
+ readonly edits: CueEdits;
64
67
  /** Active language used for language-sensitive SPARQL queries across all project classes. */
65
68
  language: string;
66
69
  /** Updates the active language. All project classes (`CueProjectSchema`, `CueProjectDocuments`, `CueProjectEntities`) read this at query time. */
@@ -134,4 +137,13 @@ export declare class CueApi {
134
137
  processorId?: string;
135
138
  comment?: string;
136
139
  }): Promise<PutAlternativeRepresentationResult>;
140
+ /**
141
+ * Purges everything derived from a document and republishes its initial
142
+ * processing event (superadmin only).
143
+ *
144
+ * Answers 202 with a process id; progress arrives on the project's
145
+ * processing-status socket as a `reprocessJobs` entry with the same id. With
146
+ * `dryRun`, nothing is mutated and the resolved plan comes back instead.
147
+ */
148
+ reprocessDocument(projectId: string, documentUUID: string, options?: ReprocessDocumentOptions): Promise<ReprocessAccepted | ReprocessPlan>;
137
149
  }
package/lib/apps.d.ts CHANGED
@@ -19,6 +19,12 @@ export declare class CueApps {
19
19
  create(options: CreateCustomAppOptions): Promise<CustomAppRecord>;
20
20
  /** Update an existing custom app. Only the original author or an organization admin may do this. */
21
21
  update(id: string, options: UpdateCustomAppOptions): Promise<CustomAppRecord>;
22
+ /**
23
+ * Copy a custom app into another organization, e.g. after moving a project there. The caller
24
+ * must belong to both organizations (superadmins always may). Repeating the call returns the
25
+ * earlier copy instead of making another.
26
+ */
27
+ copy(id: string, organizationID: string): Promise<CustomAppRecord>;
22
28
  /** Delete a custom app. Only the original author or an organization admin may do this. */
23
29
  remove(id: string): Promise<void>;
24
30
  }
package/lib/auth.d.ts CHANGED
@@ -2,8 +2,29 @@ import { Auth, User } from 'firebase/auth';
2
2
  import { FirebaseApp } from 'firebase/app';
3
3
  import { CueEndpoints, PasswordCredentials, SsoProvider } from './models';
4
4
  import { ReadonlySignal } from './signal';
5
+ /** What an email action link (`/auth/action?mode=…&oobCode=…`) does. */
6
+ export type CueActionOperation = 'resetPassword' | 'verifyEmail' | 'changeEmail' | 'recoverEmail' | 'other';
7
+ export interface CueActionCodeInfo {
8
+ operation: CueActionOperation;
9
+ /** The account's address — for `changeEmail` the NEW one, for `recoverEmail` the restored one. */
10
+ email: string;
11
+ /** For `changeEmail` and `recoverEmail`: the address being replaced. */
12
+ previousEmail?: string;
13
+ }
5
14
  export type AuthStateListener = (user: User | null) => void;
6
15
  export type Unsubscribe = () => void;
16
+ /**
17
+ * Error thrown by sign-in and password reset. `message` is safe to show to the
18
+ * user; `code` is Firebase's (e.g. 'auth/invalid-credential') when it came from
19
+ * Firebase, or 'cue/sso-no-account' | 'cue/sso-unconfirmed' when the backend
20
+ * refused an SSO sign-in. UIs should translate by `code`, not show `message`.
21
+ * The original error is kept as `cause`.
22
+ */
23
+ export declare class CueAuthError extends Error {
24
+ readonly code?: string | undefined;
25
+ readonly cause?: unknown | undefined;
26
+ constructor(message: string, code?: string | undefined, cause?: unknown | undefined);
27
+ }
7
28
  export declare class CueAuth {
8
29
  private readonly _auth;
9
30
  private readonly _endpoints;
@@ -29,6 +50,15 @@ export declare class CueAuth {
29
50
  signIn(provider: SsoProvider): Promise<User>;
30
51
  /** Sign in with email and password */
31
52
  signIn(provider: 'password', credentials: PasswordCredentials): Promise<User>;
53
+ /**
54
+ * Sign in with Google tokens obtained outside Firebase's popup, e.g. by the desktop app
55
+ * through the gateway's OAuth pages in the system browser (Google refuses OAuth inside
56
+ * embedded webviews). Same checks as the popup: the backend confirms the SSO sign-in.
57
+ */
58
+ signInWithGoogleTokens(tokens: {
59
+ idToken?: string;
60
+ accessToken?: string;
61
+ }): Promise<User>;
32
62
  /**
33
63
  * Initiate a redirect-based sign-in (mobile / iframe contexts where popups
34
64
  * are blocked). Call `checkRedirectResult()` on the next page load to
@@ -42,9 +72,9 @@ export declare class CueAuth {
42
72
  */
43
73
  checkRedirectResult(): Promise<User | null>;
44
74
  /**
45
- * SSO may sign in to an existing account but never create one. Firebase
46
- * creates the account before we can object, so the backend checks it
47
- * afterwards and deletes it if it is a fresh sign-up; we sign out and throw.
75
+ * Lets the backend see every SSO sign-in: a first-time user gets a profile
76
+ * without an organisation. A 403 (older backends refused SSO sign-ups and
77
+ * deleted the account) signs out and throws.
48
78
  * Fails closed: if the check cannot be made, the session is dropped.
49
79
  */
50
80
  private _confirmSsoSignIn;
@@ -68,6 +98,24 @@ export declare class CueAuth {
68
98
  * restored auth state.
69
99
  */
70
100
  mintAppSessionToken(): Promise<string>;
101
+ /**
102
+ * Send a password-reset email (through the Cue backend, in the Cue layout).
103
+ * The backend answers the same for unknown addresses, so callers should word
104
+ * their confirmation as "if an account exists…".
105
+ */
106
+ resetPassword(email: string): Promise<void>;
107
+ /** Reads an email action link's code without using it up. */
108
+ inspectActionCode(code: string): Promise<CueActionCodeInfo>;
109
+ /** Uses a verify-email, change-email or recover-email code. */
110
+ applyActionCode(code: string): Promise<void>;
111
+ /** Sets a new password with a reset code from a password-reset email. */
112
+ confirmPasswordReset(code: string, newPassword: string): Promise<void>;
113
+ /**
114
+ * Re-reads the signed-in user from Firebase and refreshes the token, e.g. so
115
+ * `emailVerified` is current after a verification link was used. Resolves to
116
+ * the fresh `emailVerified`, or false when signed out.
117
+ */
118
+ refreshUser(): Promise<boolean>;
71
119
  /** Sign out the current user */
72
120
  signOut(): Promise<void>;
73
121
  /** Currently signed-in user, or null if not authenticated */
@@ -309,7 +309,7 @@ export interface SheetFileLinkage {
309
309
  * self-describing: what a stored mapping does to its input is not the query alone, and neither a
310
310
  * human reading the config nor a future engine should have to know about an implicit post-pass.
311
311
  * Order is significant. An absent `postProcessing` means "the default for this config type" —
312
- * see `_postProcessingSteps` in writers-commands' data-sources.service.ts, which is also where the legacy
312
+ * see `_postProcessingSteps` in writers-cue-bff's data-sources.service.ts, which is also where the legacy
313
313
  * behaviour for configs saved before this field existed is pinned down.
314
314
  */
315
315
  export type XToRdfPostProcessingStep = MintCanonicalEntitiesStep;
@@ -382,8 +382,8 @@ export interface DataSourceProgressEvent {
382
382
  * re-applied to every subsequent data upload. Uploaded data's derived triples
383
383
  * land in the data source's own named graph.
384
384
  *
385
- * Mutations (create/update/delete/uploadData) go through writers-commands and
386
- * require the syncer role; reads (list/get) go through data-views.
385
+ * Mutations (create/update/delete/uploadData) require the syncer role; reads
386
+ * (list/get) need only membership. Both go to `writers-cue-bff`.
387
387
  *
388
388
  * Exposed as `cue.api.dataSources`.
389
389
  */
@@ -426,7 +426,21 @@ export declare class CueDataSources {
426
426
  * built from the stream's `error` line (a non-2xx HTTP status, e.g. an auth/guard rejection
427
427
  * before the handler even runs, is still thrown from `response.ok` as before).
428
428
  */
429
+ /**
430
+ * Where an API client posts a data source's files directly (multipart `files` plus `mode`),
431
+ * for showing to users who script uploads with an API key. `uploadData` itself stages
432
+ * through storage instead, to stay under the request-size limit.
433
+ */
434
+ uploadEndpointUrl(id: string): string;
429
435
  uploadData(projectId: string, id: string, files: Blob[], mode: UploadDataSourceMode, onProgress?: (event: DataSourceProgressEvent) => void): Promise<UploadDataSourceResult>;
436
+ /**
437
+ * Same as `uploadData`, but over the source file(s) the data source's config already stores
438
+ * (`config.sourceFiles`, persisted by `DataSourceHandlers.uploadSourceFile` when the mapping was
439
+ * saved) — nothing is uploaded. What a mapping edit wants: the file it was built from is already
440
+ * in storage, so sending it back up only costs the transfer. Refused for a data source that
441
+ * stores no source file. Same NDJSON progress stream and `{added, removed}` result.
442
+ */
443
+ uploadDataFromSource(projectId: string, id: string, mode: UploadDataSourceMode, onProgress?: (event: DataSourceProgressEvent) => void): Promise<UploadDataSourceResult>;
430
444
  /**
431
445
  * Re-runs a data source that has no uploaded input — today only a `files` config, whose input is
432
446
  * the project's own file locations. This is how "new files have arrived since this ran" is
@@ -453,7 +467,7 @@ export declare class CueDataSources {
453
467
  }>;
454
468
  /**
455
469
  * Uploads every file straight to the raw bucket's `${projectId}/_tmp-uploads/` prefix (server
456
- * deletes each one right after processing it — see writers-commands' `_withTempFiles`), so
470
+ * deletes each one right after processing it — see writers-cue-bff's `_withTempFiles`), so
457
471
  * `uploadData`/`previewTransform`'s own request only ever carries small JSON references —
458
472
  * bytes never cross Cloud Run's request-size cap, no matter how large the file. Reports
459
473
  * upload-byte progress through `onProgress` as `phase: 'uploading'`, aggregated across every
package/lib/edits.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { CueAuth } from './auth';
2
+ import { BatchEditResult, ContentCategoryChange, EditResult, EntityMentionDeletion, EntityMentionInput, SelectorInput } from './models';
3
+ /**
4
+ * Hand-made edits to a project's graph — the annotations a user adds or removes
5
+ * in the document viewer. Each call is one ledger commit on the service side.
6
+ * Writes need the `member` role on the project.
7
+ */
8
+ export declare class CueEdits {
9
+ private readonly _auth;
10
+ private readonly _gatewayUrl;
11
+ constructor(_auth: CueAuth, _gatewayUrl: string);
12
+ /** Creates entity mentions in one batch. */
13
+ createEntityMentions(projectId: string, items: EntityMentionInput[], batchComment?: string): Promise<BatchEditResult>;
14
+ /** Deletes entity mentions in one batch. */
15
+ deleteEntityMentions(projectId: string, items: EntityMentionDeletion[], batchComment?: string): Promise<BatchEditResult>;
16
+ /** Creates selectors (the text spans mentions point at) in one batch. */
17
+ createSelectors(projectId: string, items: SelectorInput[], batchComment?: string): Promise<BatchEditResult>;
18
+ /** Replaces a document's content categories: `existingValues` out, `newValues` in. */
19
+ changeContentCategory(projectId: string, change: ContentCategoryChange): Promise<EditResult>;
20
+ private _send;
21
+ }
@@ -31,8 +31,8 @@ export interface GisSourceRecord {
31
31
  * every other (WFS-backed) category. Reprojection to WGS84 (from LV95/LV03) happens server-side
32
32
  * at upload time — `featureCollection` is always WGS84.
33
33
  *
34
- * Mutations (create/update/delete) go through writers-commands and require the syncer role;
35
- * reads (list/get) go through data-views.
34
+ * Mutations (create/update/delete) require the syncer role; reads (list/get) need only
35
+ * membership. Both go to `writers-cue-bff`.
36
36
  *
37
37
  * Exposed as `cue.api.gisSources`.
38
38
  */