mindgraph 0.15.0 → 0.15.1
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/index.d.mts +37 -9
- package/dist/index.d.ts +37 -9
- package/dist/index.js +9 -1
- package/dist/index.mjs +9 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1627,7 +1627,7 @@ interface ProposalEdits {
|
|
|
1627
1627
|
}
|
|
1628
1628
|
interface ProposeOntologySchemaRequest {
|
|
1629
1629
|
description?: string;
|
|
1630
|
-
template_hint?: "client_services" | "healthcare" | "supply_chain" | "research_intel" | "custom";
|
|
1630
|
+
template_hint?: "client_services" | "healthcare" | "supply_chain" | "research_intel" | "product_intelligence" | "investment_dealflow" | "custom";
|
|
1631
1631
|
source_uids?: string[];
|
|
1632
1632
|
source_documents?: Array<{
|
|
1633
1633
|
content: string;
|
|
@@ -1681,8 +1681,14 @@ interface StructuredOntologyQueryRequest {
|
|
|
1681
1681
|
offset?: number;
|
|
1682
1682
|
};
|
|
1683
1683
|
aggregate?: {
|
|
1684
|
-
op: "count" | "customer_demand_rank";
|
|
1684
|
+
op: "count" | "customer_demand_rank" | "weighted_scorecard";
|
|
1685
1685
|
group_by?: string;
|
|
1686
|
+
criteria?: Array<{
|
|
1687
|
+
field: string;
|
|
1688
|
+
weight: number;
|
|
1689
|
+
direction: "higher_is_better" | "lower_is_better";
|
|
1690
|
+
}>;
|
|
1691
|
+
missing?: "exclude_candidate" | "zero";
|
|
1686
1692
|
};
|
|
1687
1693
|
}
|
|
1688
1694
|
interface StructuredOntologyQueryResponse {
|
|
@@ -1791,9 +1797,28 @@ interface CreateDomainObjectRequest {
|
|
|
1791
1797
|
aliases?: string[];
|
|
1792
1798
|
identity?: Record<string, unknown>;
|
|
1793
1799
|
confidence?: number;
|
|
1794
|
-
/** Skip the same-type + same-name
|
|
1800
|
+
/** Skip the same-type + same-name guard. Schema identity is still enforced. */
|
|
1795
1801
|
allow_duplicate?: boolean;
|
|
1796
1802
|
}
|
|
1803
|
+
interface UpdateDomainObjectRequest {
|
|
1804
|
+
canonical_name?: string;
|
|
1805
|
+
/** Field patch. Use `unset_fields` rather than null to remove a field. */
|
|
1806
|
+
fields?: Record<string, unknown>;
|
|
1807
|
+
unset_fields?: string[];
|
|
1808
|
+
/** Additive aliases; existing aliases and source provenance are preserved. */
|
|
1809
|
+
aliases?: string[];
|
|
1810
|
+
confidence?: number;
|
|
1811
|
+
/** Optimistic-concurrency guard from the current object's `version`. */
|
|
1812
|
+
expected_version: number;
|
|
1813
|
+
/** Human-readable reason retained in the ontology proposal audit ledger. */
|
|
1814
|
+
reason: string;
|
|
1815
|
+
}
|
|
1816
|
+
interface DomainObjectMutationResponse {
|
|
1817
|
+
uid: string;
|
|
1818
|
+
proposal_id: string;
|
|
1819
|
+
/** Present on update responses. */
|
|
1820
|
+
version?: number;
|
|
1821
|
+
}
|
|
1797
1822
|
interface ExtractOntologyRequest {
|
|
1798
1823
|
ontology_schema_id: string;
|
|
1799
1824
|
source_uids: string[];
|
|
@@ -2413,12 +2438,15 @@ declare class MindGraph {
|
|
|
2413
2438
|
/**
|
|
2414
2439
|
* Create a domain object by hand (auto-approved). Returns the created node
|
|
2415
2440
|
* uid + the audit proposal id. Throws 409 if an object of the same type +
|
|
2416
|
-
* canonical_name already exists, unless `allow_duplicate` is set.
|
|
2441
|
+
* canonical_name already exists, unless `allow_duplicate` is set. The
|
|
2442
|
+
* schema's identity key is always enforced.
|
|
2417
2443
|
*/
|
|
2418
|
-
createDomainObject(req: CreateDomainObjectRequest): Promise<
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2444
|
+
createDomainObject(req: CreateDomainObjectRequest): Promise<DomainObjectMutationResponse>;
|
|
2445
|
+
/**
|
|
2446
|
+
* Schema-validated authored update with optimistic concurrency. Identity
|
|
2447
|
+
* fields are immutable; create and explicitly merge when identity changes.
|
|
2448
|
+
*/
|
|
2449
|
+
updateDomainObject(uid: string, req: UpdateDomainObjectRequest): Promise<DomainObjectMutationResponse>;
|
|
2422
2450
|
linkDomainObjects(req: LinkDomainObjectsRequest): Promise<{
|
|
2423
2451
|
edge_uid: string;
|
|
2424
2452
|
}>;
|
|
@@ -2427,4 +2455,4 @@ declare class MindGraph {
|
|
|
2427
2455
|
}>;
|
|
2428
2456
|
}
|
|
2429
2457
|
|
|
2430
|
-
export { type AggregatePoint, type AnalogyCandidate, type AppendSeriesResponse, type ArgumentRequest, type ArticleResult, type BatchAggregateSeriesResponse, type BatchLatestSeriesResponse, type BatchRequest, type BelievedBy, type CanonicalAttachmentAuthority, type CanonicalAttachmentBinding, type CanonicalAttachmentDirection, type CaptureRequest, type ClaimHub, type ClearResponse, type ClusterClaimSample, type ClusteredClaimHub, type CommitmentRequest, type ConceptCluster, type CreateOntologySchemaRequest, type CreateSeriesResponse, type DecayRequest, type DeleteSeriesResponse, type DeliberationRequest, type DialecticalPair, type DistillRequest, type DocumentRef, type EnrichedSearchResponse, type EntityBridge, type EntityRequest, type EpistemicCounts, type EventProps, type EvolveRequest, type ExecutionRequest, type FieldDefinition, type FieldSemantic, type FieldSemanticKind, type FiscalYearEnd, type GovernanceRequest, type GovernanceTarget, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type ListArticlesResponse, type ListSeriesResponse, type MeasurementPoint, type MemoryConfigRequest, type MemorySyncRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type NormativeKind, type ObjectBacking, type OntologicalBaseKind, type OntologyDuplicateAudit, type OntologyObjectType, type OntologyObjectTypeInput, type OntologyPredicateOperator, type OntologyProposal, type OntologyQueryPredicate, type OntologyRelationType, type OntologyRelationTypeInput, type OntologySchema, type OntologySchemaDetail, type OntologySeriesBinding, type OntologyToolDescriptor, type OrganizationProps, type Participant, type ParticipantSlotKind, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type ProposalEdits, type PurgeRequest, type RankedClaimHub, type RelatedDomainObjectsRequest, type RelationBacking, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SemanticDependence, type SemanticEvidenceRef, type SemanticEvidenceSourceKind, type SemanticGeneratorRef, type SemanticIdentityMode, type SemanticMatch, type SemanticMatchAlternative, type SemanticMatchStatus, type SemanticModifier, type SemanticModifierMatch, type SemanticNegativeControl, type SemanticParticipantSlot, type SemanticRelationKind, type SemanticReviewDecision, type SemanticRigidity, type SemanticRuntimeTemplate, type SemanticSignal, type SemanticSignalKind, type SemanticTemplateRef, type SemanticTemporalMode, type SemanticTenantBindings, type SemanticValidationAuthoringMode, type SemanticValidationMode, type SeriesAggregateResponse, type SeriesBacking, type SeriesContextAnnotation, type SeriesLatestResponse, type SeriesNode, type SeriesProps, type SeriesRequest, type SeriesWindowResponse, type SessionRequest, type SignalsQuery, type SignalsResponse, type SkillDistillProps, type SkillDistillRequest, type SourceChunk, type StructureRequest, type StructuredOntologyQueryRequest, type StructuredOntologyQueryResponse, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest, type UpdateOntologySchemaRequest };
|
|
2458
|
+
export { type AggregatePoint, type AnalogyCandidate, type AppendSeriesResponse, type ArgumentRequest, type ArticleResult, type BatchAggregateSeriesResponse, type BatchLatestSeriesResponse, type BatchRequest, type BelievedBy, type CanonicalAttachmentAuthority, type CanonicalAttachmentBinding, type CanonicalAttachmentDirection, type CaptureRequest, type ClaimHub, type ClearResponse, type ClusterClaimSample, type ClusteredClaimHub, type CommitmentRequest, type ConceptCluster, type CreateDomainObjectRequest, type CreateOntologySchemaRequest, type CreateSeriesResponse, type DecayRequest, type DeleteSeriesResponse, type DeliberationRequest, type DialecticalPair, type DistillRequest, type DocumentRef, type DomainObject, type DomainObjectMutationResponse, type EnrichedSearchResponse, type EntityBridge, type EntityRequest, type EpistemicCounts, type EventProps, type EvolveRequest, type ExecutionRequest, type FieldDefinition, type FieldSemantic, type FieldSemanticKind, type FiscalYearEnd, type GovernanceRequest, type GovernanceTarget, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type ListArticlesResponse, type ListSeriesResponse, type MeasurementPoint, type MemoryConfigRequest, type MemorySyncRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type NormativeKind, type ObjectBacking, type OntologicalBaseKind, type OntologyDuplicateAudit, type OntologyObjectType, type OntologyObjectTypeInput, type OntologyPredicateOperator, type OntologyProposal, type OntologyQueryPredicate, type OntologyRelationType, type OntologyRelationTypeInput, type OntologySchema, type OntologySchemaDetail, type OntologySeriesBinding, type OntologyToolDescriptor, type OrganizationProps, type Participant, type ParticipantSlotKind, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type ProposalEdits, type PurgeRequest, type RankedClaimHub, type RelatedDomainObjectsRequest, type RelationBacking, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SemanticDependence, type SemanticEvidenceRef, type SemanticEvidenceSourceKind, type SemanticGeneratorRef, type SemanticIdentityMode, type SemanticMatch, type SemanticMatchAlternative, type SemanticMatchStatus, type SemanticModifier, type SemanticModifierMatch, type SemanticNegativeControl, type SemanticParticipantSlot, type SemanticRelationKind, type SemanticReviewDecision, type SemanticRigidity, type SemanticRuntimeTemplate, type SemanticSignal, type SemanticSignalKind, type SemanticTemplateRef, type SemanticTemporalMode, type SemanticTenantBindings, type SemanticValidationAuthoringMode, type SemanticValidationMode, type SeriesAggregateResponse, type SeriesBacking, type SeriesContextAnnotation, type SeriesLatestResponse, type SeriesNode, type SeriesProps, type SeriesRequest, type SeriesWindowResponse, type SessionRequest, type SignalsQuery, type SignalsResponse, type SkillDistillProps, type SkillDistillRequest, type SourceChunk, type StructureRequest, type StructuredOntologyQueryRequest, type StructuredOntologyQueryResponse, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest, type UpdateDomainObjectRequest, type UpdateOntologySchemaRequest };
|
package/dist/index.d.ts
CHANGED
|
@@ -1627,7 +1627,7 @@ interface ProposalEdits {
|
|
|
1627
1627
|
}
|
|
1628
1628
|
interface ProposeOntologySchemaRequest {
|
|
1629
1629
|
description?: string;
|
|
1630
|
-
template_hint?: "client_services" | "healthcare" | "supply_chain" | "research_intel" | "custom";
|
|
1630
|
+
template_hint?: "client_services" | "healthcare" | "supply_chain" | "research_intel" | "product_intelligence" | "investment_dealflow" | "custom";
|
|
1631
1631
|
source_uids?: string[];
|
|
1632
1632
|
source_documents?: Array<{
|
|
1633
1633
|
content: string;
|
|
@@ -1681,8 +1681,14 @@ interface StructuredOntologyQueryRequest {
|
|
|
1681
1681
|
offset?: number;
|
|
1682
1682
|
};
|
|
1683
1683
|
aggregate?: {
|
|
1684
|
-
op: "count" | "customer_demand_rank";
|
|
1684
|
+
op: "count" | "customer_demand_rank" | "weighted_scorecard";
|
|
1685
1685
|
group_by?: string;
|
|
1686
|
+
criteria?: Array<{
|
|
1687
|
+
field: string;
|
|
1688
|
+
weight: number;
|
|
1689
|
+
direction: "higher_is_better" | "lower_is_better";
|
|
1690
|
+
}>;
|
|
1691
|
+
missing?: "exclude_candidate" | "zero";
|
|
1686
1692
|
};
|
|
1687
1693
|
}
|
|
1688
1694
|
interface StructuredOntologyQueryResponse {
|
|
@@ -1791,9 +1797,28 @@ interface CreateDomainObjectRequest {
|
|
|
1791
1797
|
aliases?: string[];
|
|
1792
1798
|
identity?: Record<string, unknown>;
|
|
1793
1799
|
confidence?: number;
|
|
1794
|
-
/** Skip the same-type + same-name
|
|
1800
|
+
/** Skip the same-type + same-name guard. Schema identity is still enforced. */
|
|
1795
1801
|
allow_duplicate?: boolean;
|
|
1796
1802
|
}
|
|
1803
|
+
interface UpdateDomainObjectRequest {
|
|
1804
|
+
canonical_name?: string;
|
|
1805
|
+
/** Field patch. Use `unset_fields` rather than null to remove a field. */
|
|
1806
|
+
fields?: Record<string, unknown>;
|
|
1807
|
+
unset_fields?: string[];
|
|
1808
|
+
/** Additive aliases; existing aliases and source provenance are preserved. */
|
|
1809
|
+
aliases?: string[];
|
|
1810
|
+
confidence?: number;
|
|
1811
|
+
/** Optimistic-concurrency guard from the current object's `version`. */
|
|
1812
|
+
expected_version: number;
|
|
1813
|
+
/** Human-readable reason retained in the ontology proposal audit ledger. */
|
|
1814
|
+
reason: string;
|
|
1815
|
+
}
|
|
1816
|
+
interface DomainObjectMutationResponse {
|
|
1817
|
+
uid: string;
|
|
1818
|
+
proposal_id: string;
|
|
1819
|
+
/** Present on update responses. */
|
|
1820
|
+
version?: number;
|
|
1821
|
+
}
|
|
1797
1822
|
interface ExtractOntologyRequest {
|
|
1798
1823
|
ontology_schema_id: string;
|
|
1799
1824
|
source_uids: string[];
|
|
@@ -2413,12 +2438,15 @@ declare class MindGraph {
|
|
|
2413
2438
|
/**
|
|
2414
2439
|
* Create a domain object by hand (auto-approved). Returns the created node
|
|
2415
2440
|
* uid + the audit proposal id. Throws 409 if an object of the same type +
|
|
2416
|
-
* canonical_name already exists, unless `allow_duplicate` is set.
|
|
2441
|
+
* canonical_name already exists, unless `allow_duplicate` is set. The
|
|
2442
|
+
* schema's identity key is always enforced.
|
|
2417
2443
|
*/
|
|
2418
|
-
createDomainObject(req: CreateDomainObjectRequest): Promise<
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2444
|
+
createDomainObject(req: CreateDomainObjectRequest): Promise<DomainObjectMutationResponse>;
|
|
2445
|
+
/**
|
|
2446
|
+
* Schema-validated authored update with optimistic concurrency. Identity
|
|
2447
|
+
* fields are immutable; create and explicitly merge when identity changes.
|
|
2448
|
+
*/
|
|
2449
|
+
updateDomainObject(uid: string, req: UpdateDomainObjectRequest): Promise<DomainObjectMutationResponse>;
|
|
2422
2450
|
linkDomainObjects(req: LinkDomainObjectsRequest): Promise<{
|
|
2423
2451
|
edge_uid: string;
|
|
2424
2452
|
}>;
|
|
@@ -2427,4 +2455,4 @@ declare class MindGraph {
|
|
|
2427
2455
|
}>;
|
|
2428
2456
|
}
|
|
2429
2457
|
|
|
2430
|
-
export { type AggregatePoint, type AnalogyCandidate, type AppendSeriesResponse, type ArgumentRequest, type ArticleResult, type BatchAggregateSeriesResponse, type BatchLatestSeriesResponse, type BatchRequest, type BelievedBy, type CanonicalAttachmentAuthority, type CanonicalAttachmentBinding, type CanonicalAttachmentDirection, type CaptureRequest, type ClaimHub, type ClearResponse, type ClusterClaimSample, type ClusteredClaimHub, type CommitmentRequest, type ConceptCluster, type CreateOntologySchemaRequest, type CreateSeriesResponse, type DecayRequest, type DeleteSeriesResponse, type DeliberationRequest, type DialecticalPair, type DistillRequest, type DocumentRef, type EnrichedSearchResponse, type EntityBridge, type EntityRequest, type EpistemicCounts, type EventProps, type EvolveRequest, type ExecutionRequest, type FieldDefinition, type FieldSemantic, type FieldSemanticKind, type FiscalYearEnd, type GovernanceRequest, type GovernanceTarget, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type ListArticlesResponse, type ListSeriesResponse, type MeasurementPoint, type MemoryConfigRequest, type MemorySyncRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type NormativeKind, type ObjectBacking, type OntologicalBaseKind, type OntologyDuplicateAudit, type OntologyObjectType, type OntologyObjectTypeInput, type OntologyPredicateOperator, type OntologyProposal, type OntologyQueryPredicate, type OntologyRelationType, type OntologyRelationTypeInput, type OntologySchema, type OntologySchemaDetail, type OntologySeriesBinding, type OntologyToolDescriptor, type OrganizationProps, type Participant, type ParticipantSlotKind, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type ProposalEdits, type PurgeRequest, type RankedClaimHub, type RelatedDomainObjectsRequest, type RelationBacking, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SemanticDependence, type SemanticEvidenceRef, type SemanticEvidenceSourceKind, type SemanticGeneratorRef, type SemanticIdentityMode, type SemanticMatch, type SemanticMatchAlternative, type SemanticMatchStatus, type SemanticModifier, type SemanticModifierMatch, type SemanticNegativeControl, type SemanticParticipantSlot, type SemanticRelationKind, type SemanticReviewDecision, type SemanticRigidity, type SemanticRuntimeTemplate, type SemanticSignal, type SemanticSignalKind, type SemanticTemplateRef, type SemanticTemporalMode, type SemanticTenantBindings, type SemanticValidationAuthoringMode, type SemanticValidationMode, type SeriesAggregateResponse, type SeriesBacking, type SeriesContextAnnotation, type SeriesLatestResponse, type SeriesNode, type SeriesProps, type SeriesRequest, type SeriesWindowResponse, type SessionRequest, type SignalsQuery, type SignalsResponse, type SkillDistillProps, type SkillDistillRequest, type SourceChunk, type StructureRequest, type StructuredOntologyQueryRequest, type StructuredOntologyQueryResponse, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest, type UpdateOntologySchemaRequest };
|
|
2458
|
+
export { type AggregatePoint, type AnalogyCandidate, type AppendSeriesResponse, type ArgumentRequest, type ArticleResult, type BatchAggregateSeriesResponse, type BatchLatestSeriesResponse, type BatchRequest, type BelievedBy, type CanonicalAttachmentAuthority, type CanonicalAttachmentBinding, type CanonicalAttachmentDirection, type CaptureRequest, type ClaimHub, type ClearResponse, type ClusterClaimSample, type ClusteredClaimHub, type CommitmentRequest, type ConceptCluster, type CreateDomainObjectRequest, type CreateOntologySchemaRequest, type CreateSeriesResponse, type DecayRequest, type DeleteSeriesResponse, type DeliberationRequest, type DialecticalPair, type DistillRequest, type DocumentRef, type DomainObject, type DomainObjectMutationResponse, type EnrichedSearchResponse, type EntityBridge, type EntityRequest, type EpistemicCounts, type EventProps, type EvolveRequest, type ExecutionRequest, type FieldDefinition, type FieldSemantic, type FieldSemanticKind, type FiscalYearEnd, type GovernanceRequest, type GovernanceTarget, type GraphEdge, type GraphNode, type IngestChunkRequest, type IngestChunkResponse, type IngestDocumentRequest, type IngestDocumentResponse, type IngestSessionRequest, type InquiryRequest, type Job, type ListArticlesResponse, type ListSeriesResponse, type MeasurementPoint, type MemoryConfigRequest, type MemorySyncRequest, MindGraph, type MindGraphConfig, MindGraphError, type NationProps, type NormativeKind, type ObjectBacking, type OntologicalBaseKind, type OntologyDuplicateAudit, type OntologyObjectType, type OntologyObjectTypeInput, type OntologyPredicateOperator, type OntologyProposal, type OntologyQueryPredicate, type OntologyRelationType, type OntologyRelationTypeInput, type OntologySchema, type OntologySchemaDetail, type OntologySeriesBinding, type OntologyToolDescriptor, type OrganizationProps, type Participant, type ParticipantSlotKind, type PathStep, type PersonProps, type PlaceProps, type PlanRequest, type ProcedureRequest, type ProposalEdits, type PurgeRequest, type RankedClaimHub, type RelatedDomainObjectsRequest, type RelationBacking, type RetrieveContextRequest, type RetrieveContextResponse, type RetrieveRequest, type RiskRequest, type SearchChunk, type SearchResult, type SemanticDependence, type SemanticEvidenceRef, type SemanticEvidenceSourceKind, type SemanticGeneratorRef, type SemanticIdentityMode, type SemanticMatch, type SemanticMatchAlternative, type SemanticMatchStatus, type SemanticModifier, type SemanticModifierMatch, type SemanticNegativeControl, type SemanticParticipantSlot, type SemanticRelationKind, type SemanticReviewDecision, type SemanticRigidity, type SemanticRuntimeTemplate, type SemanticSignal, type SemanticSignalKind, type SemanticTemplateRef, type SemanticTemporalMode, type SemanticTenantBindings, type SemanticValidationAuthoringMode, type SemanticValidationMode, type SeriesAggregateResponse, type SeriesBacking, type SeriesContextAnnotation, type SeriesLatestResponse, type SeriesNode, type SeriesProps, type SeriesRequest, type SeriesWindowResponse, type SessionRequest, type SignalsQuery, type SignalsResponse, type SkillDistillProps, type SkillDistillRequest, type SourceChunk, type StructureRequest, type StructuredOntologyQueryRequest, type StructuredOntologyQueryResponse, type SynthesisJobResponse, type TextSelector, type TheorySupportGap, type TraverseRequest, type UpdateDomainObjectRequest, type UpdateOntologySchemaRequest };
|
package/dist/index.js
CHANGED
|
@@ -949,11 +949,19 @@ var MindGraph = class {
|
|
|
949
949
|
/**
|
|
950
950
|
* Create a domain object by hand (auto-approved). Returns the created node
|
|
951
951
|
* uid + the audit proposal id. Throws 409 if an object of the same type +
|
|
952
|
-
* canonical_name already exists, unless `allow_duplicate` is set.
|
|
952
|
+
* canonical_name already exists, unless `allow_duplicate` is set. The
|
|
953
|
+
* schema's identity key is always enforced.
|
|
953
954
|
*/
|
|
954
955
|
async createDomainObject(req) {
|
|
955
956
|
return this.post("/v1/ontology/objects", req);
|
|
956
957
|
}
|
|
958
|
+
/**
|
|
959
|
+
* Schema-validated authored update with optimistic concurrency. Identity
|
|
960
|
+
* fields are immutable; create and explicitly merge when identity changes.
|
|
961
|
+
*/
|
|
962
|
+
async updateDomainObject(uid, req) {
|
|
963
|
+
return this.patch(`/v1/ontology/objects/${seg(uid)}`, req);
|
|
964
|
+
}
|
|
957
965
|
async linkDomainObjects(req) {
|
|
958
966
|
return this.post("/ontology/relation", { action: "create", ...req });
|
|
959
967
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -922,11 +922,19 @@ var MindGraph = class {
|
|
|
922
922
|
/**
|
|
923
923
|
* Create a domain object by hand (auto-approved). Returns the created node
|
|
924
924
|
* uid + the audit proposal id. Throws 409 if an object of the same type +
|
|
925
|
-
* canonical_name already exists, unless `allow_duplicate` is set.
|
|
925
|
+
* canonical_name already exists, unless `allow_duplicate` is set. The
|
|
926
|
+
* schema's identity key is always enforced.
|
|
926
927
|
*/
|
|
927
928
|
async createDomainObject(req) {
|
|
928
929
|
return this.post("/v1/ontology/objects", req);
|
|
929
930
|
}
|
|
931
|
+
/**
|
|
932
|
+
* Schema-validated authored update with optimistic concurrency. Identity
|
|
933
|
+
* fields are immutable; create and explicitly merge when identity changes.
|
|
934
|
+
*/
|
|
935
|
+
async updateDomainObject(uid, req) {
|
|
936
|
+
return this.patch(`/v1/ontology/objects/${seg(uid)}`, req);
|
|
937
|
+
}
|
|
930
938
|
async linkDomainObjects(req) {
|
|
931
939
|
return this.post("/ontology/relation", { action: "create", ...req });
|
|
932
940
|
}
|