@seedprotocol/sdk 0.7.9-next.1177.ga3e08ed → 0.7.9-next.1306.g4ff6582
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/BaseFileManager-BAlySv8w.js +650 -0
- package/dist/BaseFileManager-BAlySv8w.js.map +1 -0
- package/dist/{Item-0oDoTPhi.js → Item-Bf4kWKpH.js} +5647 -6573
- package/dist/Item-Bf4kWKpH.js.map +1 -0
- package/dist/{ModelProperty-i5flwzQG.js → ModelProperty-BlaEgb_U.js} +345 -709
- package/dist/ModelProperty-BlaEgb_U.js.map +1 -0
- package/dist/Schema-J_1f6p0c.js +1456 -0
- package/dist/Schema-J_1f6p0c.js.map +1 -0
- package/dist/{SchemaValidationService-DnGKel4V.js → SchemaValidationService-CnmKyzR-.js} +6 -9
- package/dist/{SchemaValidationService-DnGKel4V.js.map → SchemaValidationService-CnmKyzR-.js.map} +1 -1
- package/dist/{configurePlatform-CrMafpMW.js → configurePlatform-CiOJ1R3q.js} +3 -12
- package/dist/configurePlatform-CiOJ1R3q.js.map +1 -0
- package/dist/db/drizzle/0025_add_metadata_retract.sql +1 -0
- package/dist/db/drizzle/0026_add_content_hash_to_schemas.sql +1 -0
- package/dist/db/drizzle/0027_link_metadata_property_ids.sql +74 -0
- package/dist/db/drizzle/0028_add_definition_to_properties.sql +17 -0
- package/dist/db/drizzle/0029_dedupe_chain_uids_add_unique_indexes.sql +120 -0
- package/dist/db/drizzle/meta/0025_snapshot.json +1652 -0
- package/dist/db/drizzle/meta/0026_snapshot.json +1659 -0
- package/dist/db/drizzle/meta/0027_snapshot.json +1659 -0
- package/dist/db/drizzle/meta/0028_snapshot.json +1666 -0
- package/dist/db/drizzle/meta/0029_snapshot.json +1691 -0
- package/dist/db/drizzle/meta/_journal.json +36 -1
- package/dist/{detachRowsBeforeDelete-DXFYSHRR.js → detachRowsBeforeDelete-sEaUwlOU.js} +2 -13
- package/dist/{detachRowsBeforeDelete-DXFYSHRR.js.map → detachRowsBeforeDelete-sEaUwlOU.js.map} +1 -1
- package/dist/dist/{index-Dx_GTdyQ.d.ts → BaseFileManager-BAlySv8w.d.ts} +1424 -2696
- package/dist/dist/BaseFileManager-BAlySv8w.d.ts.map +1 -0
- package/dist/dist/{configurePlatform-CrMafpMW.d.ts → configurePlatform-CiOJ1R3q.d.ts} +1 -1
- package/dist/dist/configurePlatform-CiOJ1R3q.d.ts.map +1 -0
- package/dist/dist/{index-PbnKw2es.d.ts → index-D0V-mjCV.d.ts} +56 -1
- package/dist/dist/{index-PbnKw2es.d.ts.map → index-D0V-mjCV.d.ts.map} +1 -1
- package/dist/dist/{index.node-CzMwMr_d.d.ts → index.node-CYPemH-t.d.ts} +225 -5
- package/dist/dist/{index.node-CzMwMr_d.d.ts.map → index.node-CYPemH-t.d.ts.map} +1 -1
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/eas-wB_fQ8Tc.js +32 -0
- package/dist/eas-wB_fQ8Tc.js.map +1 -0
- package/dist/errors-DLSoqSHG.js +6550 -0
- package/dist/errors-DLSoqSHG.js.map +1 -0
- package/dist/getPublishPayload-BnIwpwz1.js +760 -0
- package/dist/getPublishPayload-BnIwpwz1.js.map +1 -0
- package/dist/getPublishPendingDiff-D6_-A5ns.js +125 -0
- package/dist/getPublishPendingDiff-D6_-A5ns.js.map +1 -0
- package/dist/getPublishUploads-sS6JfPgz.js +783 -0
- package/dist/getPublishUploads-sS6JfPgz.js.map +1 -0
- package/dist/{index-DJmWkVIK.js → index-BVBmz_cc.js} +11 -14
- package/dist/index-BVBmz_cc.js.map +1 -0
- package/dist/index-CYGWPoOx.js +27 -0
- package/dist/index-CYGWPoOx.js.map +1 -0
- package/dist/{index-PbnKw2es.js → index-D0V-mjCV.js} +2 -2
- package/dist/index-D0V-mjCV.js.map +1 -0
- package/dist/index-DmTtj1nk.js +817 -0
- package/dist/index-DmTtj1nk.js.map +1 -0
- package/dist/{index.browser-i9uPJice.js → index.browser-CUmBVYen.js} +436 -379
- package/dist/index.browser-CUmBVYen.js.map +1 -0
- package/dist/{index.node-CzMwMr_d.js → index.node-CYPemH-t.js} +10 -10
- package/dist/index.node-CYPemH-t.js.map +1 -0
- package/dist/main.js +23 -1105
- package/dist/main.js.map +1 -1
- package/dist/modelPropertyRecordSchemas-C7UgA5TH.js +48 -0
- package/dist/modelPropertyRecordSchemas-C7UgA5TH.js.map +1 -0
- package/dist/node.js +14 -18
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +8 -13
- package/dist/platform.browser.js.map +1 -1
- package/dist/platform.node.js +6 -16
- package/dist/platform.node.js.map +1 -1
- package/dist/property-BxUYznH0.js +87 -0
- package/dist/property-BxUYznH0.js.map +1 -0
- package/dist/publishGraph-EcB40Uii.js +311 -0
- package/dist/publishGraph-EcB40Uii.js.map +1 -0
- package/dist/readHtmlBodyForStorageSeed-D6KPtWoR.js +110 -0
- package/dist/readHtmlBodyForStorageSeed-D6KPtWoR.js.map +1 -0
- package/dist/seedSchema/MetadataSchema.ts +3 -0
- package/dist/seedSchema/ModelSchema.ts +4 -0
- package/dist/seedSchema/ModelSchemaSchema.ts +5 -2
- package/dist/seedSchema/PendingWriteSchema.ts +4 -1
- package/dist/seedSchema/SchemaSchema.ts +3 -0
- package/dist/seedSchema/SeedSchema.ts +8 -2
- package/dist/seedSchema/VersionSchema.ts +7 -2
- package/dist/seedSchema/attestedUid.ts +10 -0
- package/dist/src/Item/Item.d.ts +32 -30
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Item/loadItem.d.ts +12 -0
- package/dist/src/Item/loadItem.d.ts.map +1 -0
- package/dist/src/Item/service/itemMachineSingle.d.ts +2 -13
- package/dist/src/Item/service/itemMachineSingle.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts +98 -41
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/loadProperty.d.ts +11 -0
- package/dist/src/ItemProperty/loadProperty.d.ts.map +1 -0
- package/dist/src/ItemProperty/propertyWrite.d.ts +54 -0
- package/dist/src/ItemProperty/propertyWrite.d.ts.map +1 -0
- package/dist/src/ItemProperty/{service/actors/saveValueToDb/rowContext.d.ts → rowContext.d.ts} +1 -1
- package/dist/src/ItemProperty/rowContext.d.ts.map +1 -0
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts +6 -0
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/modelPropertyRecordSchemas.d.ts +5 -15
- package/dist/src/ItemProperty/service/actors/modelPropertyRecordSchemas.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts +3 -46
- package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
- package/dist/src/Model/Model.d.ts +26 -56
- package/dist/src/Model/Model.d.ts.map +1 -1
- package/dist/src/Model/createModelProperties.d.ts +10 -0
- package/dist/src/Model/createModelProperties.d.ts.map +1 -0
- package/dist/src/Model/loadModel.d.ts +13 -0
- package/dist/src/Model/loadModel.d.ts.map +1 -0
- package/dist/src/Model/service/actors/validateModel.d.ts.map +1 -1
- package/dist/src/Model/service/modelMachine.d.ts +5 -114
- package/dist/src/Model/service/modelMachine.d.ts.map +1 -1
- package/dist/src/ModelProperty/ModelProperty.d.ts +44 -37
- package/dist/src/ModelProperty/ModelProperty.d.ts.map +1 -1
- package/dist/src/ModelProperty/service/actors/compareAndMarkDraft.d.ts.map +1 -1
- package/dist/src/ModelProperty/service/actors/validateProperty.d.ts.map +1 -1
- package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts +6 -77
- package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts.map +1 -1
- package/dist/src/Schema/Schema.d.ts +36 -37
- package/dist/src/Schema/Schema.d.ts.map +1 -1
- package/dist/src/Schema/loadOrCreateSchema.d.ts +21 -0
- package/dist/src/Schema/loadOrCreateSchema.d.ts.map +1 -0
- package/dist/src/Schema/service/schemaMachine.d.ts +7 -125
- package/dist/src/Schema/service/schemaMachine.d.ts.map +1 -1
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/browser/db/changeFeed.d.ts +2 -18
- package/dist/src/browser/db/changeFeed.d.ts.map +1 -1
- package/dist/src/browser/db/drizzleFiles.d.ts +7 -2
- package/dist/src/browser/db/drizzleFiles.d.ts.map +1 -1
- package/dist/src/browser/workers/filesDownload.d.ts.map +1 -1
- package/dist/src/browser/workers/imageResize.d.ts.map +1 -1
- package/dist/src/client/ClientManager.d.ts +90 -57
- package/dist/src/client/ClientManager.d.ts.map +1 -1
- package/dist/src/client/actors/addModelsToDb.d.ts +9 -7
- package/dist/src/client/actors/addModelsToDb.d.ts.map +1 -1
- package/dist/src/client/actors/dbInit.d.ts +3 -3
- package/dist/src/client/actors/dbInit.d.ts.map +1 -1
- package/dist/src/client/actors/fileSystemInit.d.ts +3 -3
- package/dist/src/client/actors/fileSystemInit.d.ts.map +1 -1
- package/dist/src/client/actors/platformClassesInit.d.ts +10 -5
- package/dist/src/client/actors/platformClassesInit.d.ts.map +1 -1
- package/dist/src/client/actors/processSchemaFiles.d.ts +18 -3
- package/dist/src/client/actors/processSchemaFiles.d.ts.map +1 -1
- package/dist/src/client/actors/saveConfig.d.ts +6 -3
- package/dist/src/client/actors/saveConfig.d.ts.map +1 -1
- package/dist/src/client/clientManagerMachine.d.ts +22 -20
- package/dist/src/client/clientManagerMachine.d.ts.map +1 -1
- package/dist/src/client/constants.d.ts +1 -9
- package/dist/src/client/constants.d.ts.map +1 -1
- package/dist/src/client/readiness.d.ts +26 -0
- package/dist/src/client/readiness.d.ts.map +1 -0
- package/dist/src/db/read/currentPropertyRow.d.ts +61 -0
- package/dist/src/db/read/currentPropertyRow.d.ts.map +1 -0
- package/dist/src/db/read/findSeedRow.d.ts +20 -0
- package/dist/src/db/read/findSeedRow.d.ts.map +1 -0
- package/dist/src/db/read/findSeedRowsByUid.d.ts +4 -1
- package/dist/src/db/read/findSeedRowsByUid.d.ts.map +1 -1
- package/dist/src/db/read/getAttesterForSeed.d.ts +1 -1
- package/dist/src/db/read/getAttesterForSeed.d.ts.map +1 -1
- package/dist/src/db/read/getItemData.d.ts.map +1 -1
- package/dist/src/db/read/getItemProperties.d.ts +5 -0
- package/dist/src/db/read/getItemProperties.d.ts.map +1 -1
- package/dist/src/db/read/getMetadataAttestationUidsForSeedUid.d.ts.map +1 -1
- package/dist/src/db/read/getModelSchemas.d.ts +0 -7
- package/dist/src/db/read/getModelSchemas.d.ts.map +1 -1
- package/dist/src/db/read/getModelsData.d.ts.map +1 -1
- package/dist/src/db/read/getPropertyClear.d.ts +49 -0
- package/dist/src/db/read/getPropertyClear.d.ts.map +1 -0
- package/dist/src/db/read/getPublishPayload.d.ts +35 -40
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPendingDiff.d.ts +7 -2
- package/dist/src/db/read/getPublishPendingDiff.d.ts.map +1 -1
- package/dist/src/db/read/getPublishUploads.d.ts +59 -28
- package/dist/src/db/read/getPublishUploads.d.ts.map +1 -1
- package/dist/src/db/read/getSchemaUidForModel.d.ts.map +1 -1
- package/dist/src/db/read/getSeedPublishState.d.ts.map +1 -1
- package/dist/src/db/read/getSeedPublisher.d.ts.map +1 -1
- package/dist/src/db/read/getVersionsForSeedUid.d.ts.map +1 -1
- package/dist/src/db/read/isSeedRevoked.d.ts.map +1 -1
- package/dist/src/db/read/localModelSchemaLookups.d.ts +8 -0
- package/dist/src/db/read/localModelSchemaLookups.d.ts.map +1 -0
- package/dist/src/db/read/metadataProperty.d.ts +104 -0
- package/dist/src/db/read/metadataProperty.d.ts.map +1 -0
- package/dist/src/db/read/publishGraph.d.ts +148 -0
- package/dist/src/db/read/publishGraph.d.ts.map +1 -0
- package/dist/src/db/read/resolveModelRecord.d.ts +26 -2
- package/dist/src/db/read/resolveModelRecord.d.ts.map +1 -1
- package/dist/src/db/read/resolveRelatedSeedRef.d.ts +1 -7
- package/dist/src/db/read/resolveRelatedSeedRef.d.ts.map +1 -1
- package/dist/src/db/read/subqueries/metadataLatest.d.ts +3 -1
- package/dist/src/db/read/subqueries/metadataLatest.d.ts.map +1 -1
- package/dist/src/db/read/summarizePublishWork.d.ts +18 -5
- package/dist/src/db/read/summarizePublishWork.d.ts.map +1 -1
- package/dist/src/db/write/applyPropertyAttestationUidsFromPublish.d.ts +20 -21
- package/dist/src/db/write/applyPropertyAttestationUidsFromPublish.d.ts.map +1 -1
- package/dist/src/db/write/createMetadata.d.ts.map +1 -1
- package/dist/src/db/write/createNewItem.d.ts.map +1 -1
- package/dist/src/db/write/createSeeds.d.ts +5 -1
- package/dist/src/db/write/createSeeds.d.ts.map +1 -1
- package/dist/src/db/write/definitions.d.ts +127 -0
- package/dist/src/db/write/definitions.d.ts.map +1 -0
- package/dist/src/db/write/markPropertyAttestationsRetracted.d.ts +11 -0
- package/dist/src/db/write/markPropertyAttestationsRetracted.d.ts.map +1 -0
- package/dist/src/db/write/mergeChainRows.d.ts +22 -0
- package/dist/src/db/write/mergeChainRows.d.ts.map +1 -0
- package/dist/src/db/write/saveDefinition.d.ts +29 -0
- package/dist/src/db/write/saveDefinition.d.ts.map +1 -0
- package/dist/src/db/write/updateItemPropertyValue.d.ts +2 -0
- package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
- package/dist/src/db/write/updateSeedUid.d.ts +4 -2
- package/dist/src/db/write/updateSeedUid.d.ts.map +1 -1
- package/dist/src/db/write/updateVersionUid.d.ts +12 -4
- package/dist/src/db/write/updateVersionUid.d.ts.map +1 -1
- package/dist/src/db/write/writeModelUids.d.ts +10 -0
- package/dist/src/db/write/writeModelUids.d.ts.map +1 -0
- package/dist/src/eas.d.ts +8 -6
- package/dist/src/eas.d.ts.map +1 -1
- package/dist/src/events/files/download.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/helpers/arweaveContentTags.d.ts +1 -1
- package/dist/src/helpers/arweaveContentTags.d.ts.map +1 -1
- package/dist/src/helpers/compareMetadataRowsLatestFirst.d.ts +27 -12
- package/dist/src/helpers/compareMetadataRowsLatestFirst.d.ts.map +1 -1
- package/dist/src/helpers/constants.d.ts +5 -2
- package/dist/src/helpers/constants.d.ts.map +1 -1
- package/dist/src/helpers/dataUrl.d.ts +10 -0
- package/dist/src/helpers/dataUrl.d.ts.map +1 -0
- package/dist/src/helpers/db.d.ts +54 -105
- package/dist/src/helpers/db.d.ts.map +1 -1
- package/dist/src/helpers/ensureImageLocal.d.ts.map +1 -1
- package/dist/src/helpers/entity/contextUpdate.d.ts +20 -0
- package/dist/src/helpers/entity/contextUpdate.d.ts.map +1 -0
- package/dist/src/helpers/entity/draftSaveErrors.d.ts +5 -0
- package/dist/src/helpers/entity/draftSaveErrors.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityCache.d.ts +65 -3
- package/dist/src/helpers/entity/entityCache.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityCommon.d.ts +0 -22
- package/dist/src/helpers/entity/entityCommon.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityLifecycle.d.ts +75 -0
- package/dist/src/helpers/entity/entityLifecycle.d.ts.map +1 -0
- package/dist/src/helpers/entity/entityLiveQuery.d.ts +1 -23
- package/dist/src/helpers/entity/entityLiveQuery.d.ts.map +1 -1
- package/dist/src/helpers/htmlEmbeddedDataUriPublish.d.ts +4 -9
- package/dist/src/helpers/htmlEmbeddedDataUriPublish.d.ts.map +1 -1
- package/dist/src/helpers/index.d.ts +2 -24
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/localImageBlobUrl.d.ts +7 -0
- package/dist/src/helpers/localImageBlobUrl.d.ts.map +1 -0
- package/dist/src/helpers/mediaRef.d.ts +3 -70
- package/dist/src/helpers/mediaRef.d.ts.map +1 -1
- package/dist/src/helpers/metadataPropertyNames.d.ts +34 -21
- package/dist/src/helpers/metadataPropertyNames.d.ts.map +1 -1
- package/dist/src/helpers/mimeTypes.d.ts +2 -1
- package/dist/src/helpers/mimeTypes.d.ts.map +1 -1
- package/dist/src/helpers/model.d.ts.map +1 -1
- package/dist/src/helpers/ownership.d.ts.map +1 -1
- package/dist/src/helpers/property.d.ts +21 -26
- package/dist/src/helpers/property.d.ts.map +1 -1
- package/dist/src/helpers/propertyDefinition.d.ts +59 -0
- package/dist/src/helpers/propertyDefinition.d.ts.map +1 -0
- package/dist/src/helpers/readHtmlBodyForStorageSeed.d.ts.map +1 -1
- package/dist/src/helpers/relationSeedRef.d.ts +0 -7
- package/dist/src/helpers/relationSeedRef.d.ts.map +1 -1
- package/dist/src/helpers/schema.d.ts +24 -38
- package/dist/src/helpers/schema.d.ts.map +1 -1
- package/dist/src/helpers/schemaApply.d.ts +135 -0
- package/dist/src/helpers/schemaApply.d.ts.map +1 -0
- package/dist/src/helpers/tabEvents.d.ts.map +1 -1
- package/dist/src/helpers/updateSchema.d.ts +2 -18
- package/dist/src/helpers/updateSchema.d.ts.map +1 -1
- package/dist/src/imports/index.d.ts +1 -1
- package/dist/src/imports/index.d.ts.map +1 -1
- package/dist/src/imports/json.d.ts +8 -78
- package/dist/src/imports/json.d.ts.map +1 -1
- package/dist/src/index.d.ts +16 -14
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IItem.d.ts +5 -0
- package/dist/src/interfaces/IItem.d.ts.map +1 -1
- package/dist/src/interfaces/IItemProperty.d.ts +13 -7
- package/dist/src/interfaces/IItemProperty.d.ts.map +1 -1
- package/dist/src/node/db/Db.d.ts.map +1 -1
- package/dist/src/node/index.d.ts +3 -2
- package/dist/src/node/index.d.ts.map +1 -1
- package/dist/src/outbox/conflicts.d.ts +2 -0
- package/dist/src/outbox/conflicts.d.ts.map +1 -1
- package/dist/src/outbox/itemAppliers.d.ts +70 -14
- package/dist/src/outbox/itemAppliers.d.ts.map +1 -1
- package/dist/src/outbox/outbox.d.ts +14 -3
- package/dist/src/outbox/outbox.d.ts.map +1 -1
- package/dist/src/outbox/pendingValues.d.ts +3 -1
- package/dist/src/outbox/pendingValues.d.ts.map +1 -1
- package/dist/src/outbox/storageValueRow.d.ts +7 -0
- package/dist/src/outbox/storageValueRow.d.ts.map +1 -0
- package/dist/src/platform/configurePlatform.d.ts.map +1 -1
- package/dist/src/platform/index.browser.d.ts.map +1 -1
- package/dist/src/platform/index.node.d.ts.map +1 -1
- package/dist/src/seedSchema/MetadataSchema.d.ts +17 -0
- package/dist/src/seedSchema/MetadataSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/ModelSchema.d.ts +19 -0
- package/dist/src/seedSchema/ModelSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/ModelSchemaSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/PendingWriteSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/SchemaSchema.d.ts +19 -0
- package/dist/src/seedSchema/SchemaSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/SeedSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/VersionSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/attestedUid.d.ts +9 -0
- package/dist/src/seedSchema/attestedUid.d.ts.map +1 -0
- package/dist/src/storageValue/content.d.ts +45 -0
- package/dist/src/storageValue/content.d.ts.map +1 -0
- package/dist/src/storageValue/findFile.d.ts +7 -0
- package/dist/src/storageValue/findFile.d.ts.map +1 -0
- package/dist/src/storageValue/resolve.d.ts +71 -0
- package/dist/src/storageValue/resolve.d.ts.map +1 -0
- package/dist/src/storageValue/save.d.ts +24 -0
- package/dist/src/storageValue/save.d.ts.map +1 -0
- package/dist/src/storageValue/stage.d.ts +22 -0
- package/dist/src/storageValue/stage.d.ts.map +1 -0
- package/dist/src/types/db.d.ts +0 -14
- package/dist/src/types/db.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +3 -3
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/machines.d.ts +1 -1
- package/dist/src/types/machines.d.ts.map +1 -1
- package/dist/src/types/property.d.ts +9 -16
- package/dist/src/types/property.d.ts.map +1 -1
- package/dist/src/types/publish.d.ts +1 -1
- package/dist/src/types/publish.d.ts.map +1 -1
- package/dist/{syncDbWithEas-DUu_wjUG.js → syncDbWithEas-CA7PvBgu.js} +142 -168
- package/dist/syncDbWithEas-CA7PvBgu.js.map +1 -0
- package/dist/tabEvents-CaVmngqr.js +3804 -0
- package/dist/tabEvents-CaVmngqr.js.map +1 -0
- package/dist/{tolerantWebAccess-DecKDGen.js → tolerantWebAccess-BJqViq08.js} +10 -15
- package/dist/{tolerantWebAccess-DecKDGen.js.map → tolerantWebAccess-BJqViq08.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-4gO9Hfn2.js → updateSeedRevokedAt-BL9Bg-G7.js} +30 -4
- package/dist/updateSeedRevokedAt-BL9Bg-G7.js.map +1 -0
- package/package.json +6 -6
- package/dist/ClientManager-GZfXErDX.js +0 -5279
- package/dist/ClientManager-GZfXErDX.js.map +0 -1
- package/dist/Item-0oDoTPhi.js.map +0 -1
- package/dist/ModelProperty-i5flwzQG.js.map +0 -1
- package/dist/Schema-PFZwG9Nl.js +0 -4370
- package/dist/Schema-PFZwG9Nl.js.map +0 -1
- package/dist/backfillMetadataPropertyIds-BbxgavEQ.js +0 -72
- package/dist/backfillMetadataPropertyIds-BbxgavEQ.js.map +0 -1
- package/dist/changeFeed-DKdVlUmt.js +0 -726
- package/dist/changeFeed-DKdVlUmt.js.map +0 -1
- package/dist/configurePlatform-CrMafpMW.js.map +0 -1
- package/dist/dist/ClientManager-GZfXErDX.d.ts +0 -952
- package/dist/dist/ClientManager-GZfXErDX.d.ts.map +0 -1
- package/dist/dist/Item-0oDoTPhi.d.ts +0 -1076
- package/dist/dist/Item-0oDoTPhi.d.ts.map +0 -1
- package/dist/dist/ModelProperty-i5flwzQG.d.ts +0 -315
- package/dist/dist/ModelProperty-i5flwzQG.d.ts.map +0 -1
- package/dist/dist/Schema-PFZwG9Nl.d.ts +0 -432
- package/dist/dist/Schema-PFZwG9Nl.d.ts.map +0 -1
- package/dist/dist/SchemaValidationService-DnGKel4V.d.ts +0 -118
- package/dist/dist/SchemaValidationService-DnGKel4V.d.ts.map +0 -1
- package/dist/dist/backfillMetadataPropertyIds-BbxgavEQ.d.ts +0 -7
- package/dist/dist/backfillMetadataPropertyIds-BbxgavEQ.d.ts.map +0 -1
- package/dist/dist/changeFeed-DKdVlUmt.d.ts +0 -160
- package/dist/dist/changeFeed-DKdVlUmt.d.ts.map +0 -1
- package/dist/dist/configurePlatform-CrMafpMW.d.ts.map +0 -1
- package/dist/dist/detachRowsBeforeDelete-DXFYSHRR.d.ts +0 -13
- package/dist/dist/detachRowsBeforeDelete-DXFYSHRR.d.ts.map +0 -1
- package/dist/dist/eas-dyepi5jz.d.ts +0 -12
- package/dist/dist/eas-dyepi5jz.d.ts.map +0 -1
- package/dist/dist/errors-C1qUEZ7A.d.ts +0 -25
- package/dist/dist/errors-C1qUEZ7A.d.ts.map +0 -1
- package/dist/dist/errors-D1zHAqjr.d.ts +0 -515
- package/dist/dist/errors-D1zHAqjr.d.ts.map +0 -1
- package/dist/dist/eventBus-7vxTCc3a.d.ts +0 -18
- package/dist/dist/eventBus-7vxTCc3a.d.ts.map +0 -1
- package/dist/dist/findSeedRowsByUid-CT3sOXXw.d.ts +0 -13
- package/dist/dist/findSeedRowsByUid-CT3sOXXw.d.ts.map +0 -1
- package/dist/dist/getItem-Bhjecbia.d.ts +0 -6
- package/dist/dist/getItem-Bhjecbia.d.ts.map +0 -1
- package/dist/dist/getPublishPayload-DH4rMqXG.d.ts +0 -47
- package/dist/dist/getPublishPayload-DH4rMqXG.d.ts.map +0 -1
- package/dist/dist/getPublishUploads-BzUIDA2G.d.ts +0 -89
- package/dist/dist/getPublishUploads-BzUIDA2G.d.ts.map +0 -1
- package/dist/dist/index-CkYb3wcU.d.ts +0 -14
- package/dist/dist/index-CkYb3wcU.d.ts.map +0 -1
- package/dist/dist/index-DJmWkVIK.d.ts +0 -6
- package/dist/dist/index-DJmWkVIK.d.ts.map +0 -1
- package/dist/dist/index-Dx_GTdyQ.d.ts.map +0 -1
- package/dist/dist/index.browser-i9uPJice.d.ts +0 -9908
- package/dist/dist/index.browser-i9uPJice.d.ts.map +0 -1
- package/dist/dist/mimeTypes-C9r76DCH.d.ts +0 -30
- package/dist/dist/mimeTypes-C9r76DCH.d.ts.map +0 -1
- package/dist/dist/model-oHA3YhOd.d.ts +0 -6
- package/dist/dist/model-oHA3YhOd.d.ts.map +0 -1
- package/dist/dist/modelPropertyRecordSchemas-C5lW9aA-.d.ts +0 -7
- package/dist/dist/modelPropertyRecordSchemas-C5lW9aA-.d.ts.map +0 -1
- package/dist/dist/platform.browser.d.ts +0 -3
- package/dist/dist/platform.browser.d.ts.map +0 -1
- package/dist/dist/property-BwYtg5Q_.d.ts +0 -37
- package/dist/dist/property-BwYtg5Q_.d.ts.map +0 -1
- package/dist/dist/propertyValidationRules-CyHdpcPP.d.ts +0 -13
- package/dist/dist/propertyValidationRules-CyHdpcPP.d.ts.map +0 -1
- package/dist/dist/publishDraftGraph-C5F6b7GK.d.ts +0 -93
- package/dist/dist/publishDraftGraph-C5F6b7GK.d.ts.map +0 -1
- package/dist/dist/resolveModelForSyncedSeed-4gO9Hfn2.d.ts +0 -21
- package/dist/dist/resolveModelForSyncedSeed-4gO9Hfn2.d.ts.map +0 -1
- package/dist/dist/syncDbWithEas-DUu_wjUG.d.ts +0 -13
- package/dist/dist/syncDbWithEas-DUu_wjUG.d.ts.map +0 -1
- package/dist/dist/tolerantWebAccess-DecKDGen.d.ts +0 -113
- package/dist/dist/tolerantWebAccess-DecKDGen.d.ts.map +0 -1
- package/dist/dist/updateSeedRevokedAt-CP606vKs.d.ts +0 -11
- package/dist/dist/updateSeedRevokedAt-CP606vKs.d.ts.map +0 -1
- package/dist/eas-dyepi5jz.js +0 -67
- package/dist/eas-dyepi5jz.js.map +0 -1
- package/dist/errors-D1zHAqjr.js +0 -4006
- package/dist/errors-D1zHAqjr.js.map +0 -1
- package/dist/eventBus-7vxTCc3a.js +0 -64
- package/dist/eventBus-7vxTCc3a.js.map +0 -1
- package/dist/findSeedRowsByUid-CT3sOXXw.js +0 -47
- package/dist/findSeedRowsByUid-CT3sOXXw.js.map +0 -1
- package/dist/getItem-Bhjecbia.js +0 -45
- package/dist/getItem-Bhjecbia.js.map +0 -1
- package/dist/getPublishPayload-DH4rMqXG.js +0 -1634
- package/dist/getPublishPayload-DH4rMqXG.js.map +0 -1
- package/dist/getPublishUploads-BzUIDA2G.js +0 -1080
- package/dist/getPublishUploads-BzUIDA2G.js.map +0 -1
- package/dist/index-CkYb3wcU.js +0 -29
- package/dist/index-CkYb3wcU.js.map +0 -1
- package/dist/index-DJmWkVIK.js.map +0 -1
- package/dist/index-Dx_GTdyQ.js +0 -4745
- package/dist/index-Dx_GTdyQ.js.map +0 -1
- package/dist/index-PbnKw2es.js.map +0 -1
- package/dist/index.browser-i9uPJice.js.map +0 -1
- package/dist/index.node-CzMwMr_d.js.map +0 -1
- package/dist/mimeTypes-C9r76DCH.js +0 -209
- package/dist/mimeTypes-C9r76DCH.js.map +0 -1
- package/dist/model-oHA3YhOd.js +0 -29
- package/dist/model-oHA3YhOd.js.map +0 -1
- package/dist/modelPropertyRecordSchemas-C5lW9aA-.js +0 -94
- package/dist/modelPropertyRecordSchemas-C5lW9aA-.js.map +0 -1
- package/dist/property-BwYtg5Q_.js +0 -289
- package/dist/property-BwYtg5Q_.js.map +0 -1
- package/dist/propertyValidationRules-CyHdpcPP.js +0 -73
- package/dist/propertyValidationRules-CyHdpcPP.js.map +0 -1
- package/dist/publishDraftGraph-C5F6b7GK.js +0 -505
- package/dist/publishDraftGraph-C5F6b7GK.js.map +0 -1
- package/dist/resolveModelForSyncedSeed-4gO9Hfn2.js.map +0 -1
- package/dist/src/Item/service/actors/loadOrCreateItem.d.ts +0 -5
- package/dist/src/Item/service/actors/loadOrCreateItem.d.ts.map +0 -1
- package/dist/src/Item/service/actors/waitForDb.d.ts +0 -4
- package/dist/src/Item/service/actors/waitForDb.d.ts.map +0 -1
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts +0 -5
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts +0 -5
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/index.d.ts +0 -6
- package/dist/src/ItemProperty/service/actors/saveValueToDb/index.d.ts.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/rowContext.d.ts.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts +0 -24
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveHtml.d.ts +0 -5
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveHtml.d.ts.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts +0 -5
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts +0 -10
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/storageValue.d.ts +0 -22
- package/dist/src/ItemProperty/service/actors/saveValueToDb/storageValue.d.ts.map +0 -1
- package/dist/src/ItemProperty/service/actors/waitForDb.d.ts +0 -4
- package/dist/src/ItemProperty/service/actors/waitForDb.d.ts.map +0 -1
- package/dist/src/Model/service/actors/createModelProperties.d.ts +0 -9
- package/dist/src/Model/service/actors/createModelProperties.d.ts.map +0 -1
- package/dist/src/Model/service/actors/loadOrCreateModel.d.ts +0 -5
- package/dist/src/Model/service/actors/loadOrCreateModel.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/checkExistingSchema.d.ts +0 -5
- package/dist/src/Schema/service/actors/checkExistingSchema.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/createModelInstances.d.ts +0 -11
- package/dist/src/Schema/service/actors/createModelInstances.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/createPropertyInstances.d.ts +0 -12
- package/dist/src/Schema/service/actors/createPropertyInstances.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/validateSchema.d.ts +0 -5
- package/dist/src/Schema/service/actors/validateSchema.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/verifyModelInstancesInCache.d.ts +0 -6
- package/dist/src/Schema/service/actors/verifyModelInstancesInCache.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/verifyModelsInDb.d.ts +0 -7
- package/dist/src/Schema/service/actors/verifyModelsInDb.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/verifyPropertiesInDb.d.ts +0 -8
- package/dist/src/Schema/service/actors/verifyPropertiesInDb.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/verifyPropertyInstancesInCache.d.ts +0 -6
- package/dist/src/Schema/service/actors/verifyPropertyInstancesInCache.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/verifySchemaInDb.d.ts +0 -7
- package/dist/src/Schema/service/actors/verifySchemaInDb.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/writeModelsToDb.d.ts +0 -9
- package/dist/src/Schema/service/actors/writeModelsToDb.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/writePropertiesToDb.d.ts +0 -10
- package/dist/src/Schema/service/actors/writePropertiesToDb.d.ts.map +0 -1
- package/dist/src/Schema/service/actors/writeSchemaToDb.d.ts +0 -11
- package/dist/src/Schema/service/actors/writeSchemaToDb.d.ts.map +0 -1
- package/dist/src/browser/helpers/ArweaveClient.d.ts +0 -14
- package/dist/src/browser/helpers/ArweaveClient.d.ts.map +0 -1
- package/dist/src/browser/helpers/EasClient.d.ts +0 -10
- package/dist/src/browser/helpers/EasClient.d.ts.map +0 -1
- package/dist/src/browser/helpers/QueryClient.d.ts +0 -9
- package/dist/src/browser/helpers/QueryClient.d.ts.map +0 -1
- package/dist/src/client/actors/addModelsToStore.d.ts +0 -4
- package/dist/src/client/actors/addModelsToStore.d.ts.map +0 -1
- package/dist/src/db/backfillMetadataPropertyIds.d.ts +0 -7
- package/dist/src/db/backfillMetadataPropertyIds.d.ts.map +0 -1
- package/dist/src/db/read/getItem.d.ts +0 -3
- package/dist/src/db/read/getItem.d.ts.map +0 -1
- package/dist/src/db/read/getPropertyData.d.ts +0 -4
- package/dist/src/db/read/getPropertyData.d.ts.map +0 -1
- package/dist/src/db/read/getRelatedItemsForPublish.d.ts +0 -10
- package/dist/src/db/read/getRelatedItemsForPublish.d.ts.map +0 -1
- package/dist/src/db/read/getSeedData.d.ts +0 -12
- package/dist/src/db/read/getSeedData.d.ts.map +0 -1
- package/dist/src/db/read/itemLoads.d.ts +0 -20
- package/dist/src/db/read/itemLoads.d.ts.map +0 -1
- package/dist/src/db/read/publishDraftGraph.d.ts +0 -64
- package/dist/src/db/read/publishDraftGraph.d.ts.map +0 -1
- package/dist/src/db/write/linkModelToSchema.d.ts +0 -12
- package/dist/src/db/write/linkModelToSchema.d.ts.map +0 -1
- package/dist/src/helpers/ArweaveClient/BaseArweaveClient.d.ts +0 -2
- package/dist/src/helpers/ArweaveClient/BaseArweaveClient.d.ts.map +0 -1
- package/dist/src/helpers/ArweaveClient/arweaveL1UploadApi.d.ts +0 -2
- package/dist/src/helpers/ArweaveClient/arweaveL1UploadApi.d.ts.map +0 -1
- package/dist/src/helpers/ArweaveClient/selectReadGateway.d.ts +0 -2
- package/dist/src/helpers/ArweaveClient/selectReadGateway.d.ts.map +0 -1
- package/dist/src/helpers/ArweaveClient/uploadApiVerification.d.ts +0 -2
- package/dist/src/helpers/ArweaveClient/uploadApiVerification.d.ts.map +0 -1
- package/dist/src/helpers/EasClient/BaseEasClient.d.ts +0 -2
- package/dist/src/helpers/EasClient/BaseEasClient.d.ts.map +0 -1
- package/dist/src/helpers/QueryClient/BaseQueryClient.d.ts +0 -2
- package/dist/src/helpers/QueryClient/BaseQueryClient.d.ts.map +0 -1
- package/dist/src/helpers/easUid.d.ts +0 -2
- package/dist/src/helpers/easUid.d.ts.map +0 -1
- package/dist/src/helpers/entity/entityDestroy.d.ts +0 -49
- package/dist/src/helpers/entity/entityDestroy.d.ts.map +0 -1
- package/dist/src/helpers/entity/entityFind.d.ts +0 -52
- package/dist/src/helpers/entity/entityFind.d.ts.map +0 -1
- package/dist/src/helpers/entity/entityState.d.ts +0 -28
- package/dist/src/helpers/entity/entityState.d.ts.map +0 -1
- package/dist/src/helpers/entity/entityUnload.d.ts +0 -56
- package/dist/src/helpers/entity/entityUnload.d.ts.map +0 -1
- package/dist/src/helpers/entity/evictionEpoch.d.ts +0 -43
- package/dist/src/helpers/entity/evictionEpoch.d.ts.map +0 -1
- package/dist/src/helpers/entity/index.d.ts +0 -12
- package/dist/src/helpers/entity/index.d.ts.map +0 -1
- package/dist/src/helpers/gateway/gatewayState.d.ts +0 -2
- package/dist/src/helpers/gateway/gatewayState.d.ts.map +0 -1
- package/dist/src/helpers/gateway/resolveSeedGatewayEndpoints.d.ts +0 -2
- package/dist/src/helpers/gateway/resolveSeedGatewayEndpoints.d.ts.map +0 -1
- package/dist/src/helpers/gateway/seedGatewayConfig.d.ts +0 -2
- package/dist/src/helpers/gateway/seedGatewayConfig.d.ts.map +0 -1
- package/dist/src/helpers/getSchemaForItemProperty.d.ts +0 -15
- package/dist/src/helpers/getSchemaForItemProperty.d.ts.map +0 -1
- package/dist/src/helpers/getSegmentedItemProperties.d.ts +0 -10
- package/dist/src/helpers/getSegmentedItemProperties.d.ts.map +0 -1
- package/dist/src/helpers/isSqliteUniqueConstraintError.d.ts +0 -7
- package/dist/src/helpers/isSqliteUniqueConstraintError.d.ts.map +0 -1
- package/dist/src/helpers/propertyValidationRules.d.ts +0 -20
- package/dist/src/helpers/propertyValidationRules.d.ts.map +0 -1
- package/dist/src/helpers/propertyWriteTickets.d.ts +0 -11
- package/dist/src/helpers/propertyWriteTickets.d.ts.map +0 -1
- package/dist/src/helpers/reconcilePropertyDraftRows.d.ts +0 -10
- package/dist/src/helpers/reconcilePropertyDraftRows.d.ts.map +0 -1
- package/dist/src/helpers/waitForEntityIdle.d.ts +0 -21
- package/dist/src/helpers/waitForEntityIdle.d.ts.map +0 -1
- package/dist/src/interfaces/IQueryClient.d.ts +0 -15
- package/dist/src/interfaces/IQueryClient.d.ts.map +0 -1
- package/dist/src/node/helpers/ArweaveClient.d.ts +0 -5
- package/dist/src/node/helpers/ArweaveClient.d.ts.map +0 -1
- package/dist/src/node/helpers/EasClient.d.ts +0 -5
- package/dist/src/node/helpers/EasClient.d.ts.map +0 -1
- package/dist/src/node/helpers/QueryClient.d.ts +0 -5
- package/dist/src/node/helpers/QueryClient.d.ts.map +0 -1
- package/dist/src/services/write/actors/validateEntity.d.ts +0 -6
- package/dist/src/services/write/actors/validateEntity.d.ts.map +0 -1
- package/dist/src/services/write/actors/writeToDatabase.d.ts +0 -14
- package/dist/src/services/write/actors/writeToDatabase.d.ts.map +0 -1
- package/dist/src/services/write/writeProcessMachine.d.ts +0 -56
- package/dist/src/services/write/writeProcessMachine.d.ts.map +0 -1
- package/dist/src/stores/eas.d.ts +0 -2
- package/dist/src/stores/eas.d.ts.map +0 -1
- package/dist/src/types/arweave.d.ts +0 -57
- package/dist/src/types/arweave.d.ts.map +0 -1
- package/dist/src/types/gateway.d.ts +0 -2
- package/dist/src/types/gateway.d.ts.map +0 -1
- package/dist/syncDbWithEas-DUu_wjUG.js.map +0 -1
- package/dist/updateSeedRevokedAt-CP606vKs.js +0 -31
- package/dist/updateSeedRevokedAt-CP606vKs.js.map +0 -1
|
@@ -1,1076 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Metadata rows of a seed numbered per property_name in reader order (`rowNum = 1` is the value to
|
|
3
|
-
* show): live rows before revoked ones, then newest first. See `compareMetadataRowsLatestFirst`.
|
|
4
|
-
*/
|
|
5
|
-
declare function getMetadataLatest({ seedLocalId, seedUid }: {
|
|
6
|
-
seedLocalId: any;
|
|
7
|
-
seedUid: any;
|
|
8
|
-
}): any;
|
|
9
|
-
/**
|
|
10
|
-
* Assemble flat ItemData for Item / liveQuery / draft-head authoring.
|
|
11
|
-
*
|
|
12
|
-
* For **published chain JSON** (Seed → latest attested Version → properties),
|
|
13
|
-
* prefer `getPublishedSeedRecord` from `@seedprotocol/sdk` or
|
|
14
|
-
* `getSeed` / `queryBySchema` from `@seedprotocol/query`. This function remains
|
|
15
|
-
* the correct path for local-head / draft-wins property selection used by Item.
|
|
16
|
-
*/
|
|
17
|
-
declare function getItemData({ modelName, seedLocalId, seedUid, }: {
|
|
18
|
-
modelName: any;
|
|
19
|
-
seedLocalId: any;
|
|
20
|
-
seedUid: any;
|
|
21
|
-
}): Promise<any>;
|
|
22
|
-
/**
|
|
23
|
-
* Wait for an entity's state machine to reach 'idle' state
|
|
24
|
-
* @param entity - Entity instance with getService() method
|
|
25
|
-
* @param options - Configuration options
|
|
26
|
-
* @returns Promise that resolves when entity reaches idle, or rejects on error/timeout
|
|
27
|
-
*/
|
|
28
|
-
declare function waitForEntityIdle(entity: any, options?: {}): Promise<void>;
|
|
29
|
-
/** Sort comparator: live before revoked; then larger time first; on tie, larger localId (lexicographic) first. */
|
|
30
|
-
declare function compareMetadataRowsLatestFirst(a: any, b: any): number;
|
|
31
|
-
/**
|
|
32
|
-
* EAS schema UID of a model's seeds: the in-memory cache, then `model_uids` (written from EAS by
|
|
33
|
-
* startup and sync), then EAS itself. The DB comes before EAS so creating items and saving
|
|
34
|
-
* images, files and Html bodies works offline. A failed EAS request (offline) counts as "no UID":
|
|
35
|
-
* the seed is created without one and publish looks it up again.
|
|
36
|
-
*/
|
|
37
|
-
declare function getEasSchemaUidForModel(modelName: any): Promise<any>;
|
|
38
|
-
/**
|
|
39
|
-
* Latest version row for the seed (by `LATEST_VERSION_ORDER_SQL`) whose uid is a real EAS
|
|
40
|
-
* attestation id.
|
|
41
|
-
* Skips legacy 'NULL' / ZERO_BYTES32 placeholders, non-bytes32 strings, and revoked versions
|
|
42
|
-
* (`revoked_at` set): after a full unpublish the seed has no published version.
|
|
43
|
-
*/
|
|
44
|
-
declare function getLatestPublishedVersionRow(seedLocalId: any): Promise<{
|
|
45
|
-
uid: any;
|
|
46
|
-
localId: any;
|
|
47
|
-
attestationCreatedAt: any;
|
|
48
|
-
} | null>;
|
|
49
|
-
/**
|
|
50
|
-
* Parse List property values persisted as strings (JSON array or legacy comma-separated ids).
|
|
51
|
-
*/
|
|
52
|
-
declare function parseListPropertyValueFromStorage(raw: any): any;
|
|
53
|
-
/** Splits `values` into chunks of at most `size` (one empty list gives no chunks). */
|
|
54
|
-
declare function chunkValues(values: any, size?: number): any[];
|
|
55
|
-
/**
|
|
56
|
-
* Rows per multi-row INSERT into `table` so the statement binds at most
|
|
57
|
-
* {@link SQLITE_DEFAULT_MAX_VARIABLE_NUMBER} parameters even with every column set.
|
|
58
|
-
*/
|
|
59
|
-
declare function rowsPerInsert(table: any): number;
|
|
60
|
-
declare class Item {
|
|
61
|
-
/** Prefer local id so list rows (local + uid) resolve the same cache entry as early draft loads. */
|
|
62
|
-
static findItemInstanceCacheEntryByProps(props: any): any;
|
|
63
|
-
static findItemInstanceCacheEntryById(id: any): any;
|
|
64
|
-
static collectInstanceCacheKeysForInstance(instance: any): any[];
|
|
65
|
-
static registerItemInInstanceCache(instance: any): void;
|
|
66
|
-
/**
|
|
67
|
-
* Wraps a new instance in its reactive proxy: tracked names read from and write to the actor's
|
|
68
|
-
* context, and the model's property names (`item.title`, or `item.html` for `htmlId`) read and
|
|
69
|
-
* write their ItemProperty's value.
|
|
70
|
-
*/
|
|
71
|
-
static wrapInProxy(instance: any): any;
|
|
72
|
-
/**
|
|
73
|
-
* Sets a tracked context property from the proxy. Setting `seedUid` to a different uid means a
|
|
74
|
-
* new seed attestation (publishing again after unpublish): the revocation belonged to the old
|
|
75
|
-
* one, so `revokedAt` is cleared, and the instance cache's uid alias moves to the new uid.
|
|
76
|
-
*/
|
|
77
|
-
static sendTrackedPropertyUpdate(target: any, prop: any, value: any): void;
|
|
78
|
-
/** Drops one holder's reference. Returns true while other holders still have the instance. */
|
|
79
|
-
static releaseItemInstanceCacheHold(instance: any): boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Idle, and not the shell the item machine can be in when it reaches `idle` before
|
|
82
|
-
* `propertyInstances` is merged (an item with a version but no property instances yet).
|
|
83
|
-
*/
|
|
84
|
-
static isItemSnapshotReadyForRead(snap: any): boolean;
|
|
85
|
-
/**
|
|
86
|
-
* The cached Item for a seedLocalId or seedUid, in any state, without taking a hold. For SDK code
|
|
87
|
-
* that reads or messages the item and doesn't hand it to a caller.
|
|
88
|
-
*/
|
|
89
|
-
static peek(id: any): any;
|
|
90
|
-
/**
|
|
91
|
-
* The cached Item for a seedLocalId or seedUid when it can be read right now: idle and hydrated,
|
|
92
|
-
* so at least what `Item.find()` would wait for. Otherwise undefined. Unlike `getById`, it takes
|
|
93
|
-
* no cache hold, so React hooks can call it during render.
|
|
94
|
-
*/
|
|
95
|
-
static peekReady(id: any): any;
|
|
96
|
-
/**
|
|
97
|
-
* Item machine can reach `idle` before `propertyInstances` is merged (race) or while
|
|
98
|
-
* child ItemProperty actors are still hydrating. useItems / Item.all must not return that shell.
|
|
99
|
-
*/
|
|
100
|
-
static waitForItemInstanceReadyForRead(item: any, readyTimeout: any): Promise<void>;
|
|
101
|
-
static itemCacheEntryLooksUnhydratedAfterIdle(instance: any, props: any): boolean;
|
|
102
|
-
static create(props: any, options: any): Promise<any>;
|
|
103
|
-
/**
|
|
104
|
-
* Stops a just-created item and deletes what create wrote: a `discard` outbox op (ADR 0019),
|
|
105
|
-
* applied after the item's other pending ops, hard-deletes the draft and the storage seeds its
|
|
106
|
-
* rows point at; their files go once it has applied.
|
|
107
|
-
*/
|
|
108
|
-
static discardCreatedItem(item: any, seedLocalId: any): Promise<void>;
|
|
109
|
-
/**
|
|
110
|
-
* Run each File/Image/Html/ItemStorage initial value through its ItemProperty save pipeline (sequentially, to
|
|
111
|
-
* avoid SQLite write contention). Rejects on the first failure, with ItemCreateValidationError when the
|
|
112
|
-
* value breaks its property's rules and ItemCreateError otherwise; Item.create then removes the item.
|
|
113
|
-
*/
|
|
114
|
-
static savePipelineValues(item: any, pipelineValues: any, timeout: any): Promise<void>;
|
|
115
|
-
static waitForPropertyInstance(item: any, propertyName: any, timeout: any): Promise<any>;
|
|
116
|
-
/**
|
|
117
|
-
* Get Item instance by ID from cache
|
|
118
|
-
* The ID can be either seedUid or seedLocalId
|
|
119
|
-
* @param id - seedUid or seedLocalId
|
|
120
|
-
* @returns Cached Item instance or null if not found
|
|
121
|
-
*/
|
|
122
|
-
static getById(id: any): any;
|
|
123
|
-
/**
|
|
124
|
-
* Drop cached Item instances for the given seed local ids / uids without soft-deleting DB rows.
|
|
125
|
-
* Used by local purge (`removeLocalCopiesForAddresses`) before hard-deleting rows.
|
|
126
|
-
*/
|
|
127
|
-
static dropCachedInstancesForSeedIds(ids: any): void;
|
|
128
|
-
/**
|
|
129
|
-
* Create Item instance by ID (queries database if not in cache)
|
|
130
|
-
* The ID can be either seedUid or seedLocalId
|
|
131
|
-
* @param id - seedUid or seedLocalId
|
|
132
|
-
* @param modelName - Optional model name for querying
|
|
133
|
-
* @param idKind - 'localId' when the id was given as a seedLocalId: looked up as one first
|
|
134
|
-
* @returns Item instance or undefined if not found
|
|
135
|
-
*/
|
|
136
|
-
static createById(id: any, modelName: any, idKind: any): Promise<any>;
|
|
137
|
-
static find({ modelName, seedLocalId, seedUid, waitForReady, readyTimeout, }: {
|
|
138
|
-
modelName: any;
|
|
139
|
-
seedLocalId: any;
|
|
140
|
-
seedUid: any;
|
|
141
|
-
waitForReady?: boolean | undefined;
|
|
142
|
-
readyTimeout?: number | undefined;
|
|
143
|
-
}): Promise<any>;
|
|
144
|
-
static all(modelName: any, deleted: any, options: any): Promise<any[]>;
|
|
145
|
-
/**
|
|
146
|
-
* After EAS sync writes metadata for the latest version, merge new property instances and
|
|
147
|
-
* re-run DB hydration on cached Items. Item liveQuery watches seeds/versions, not metadata,
|
|
148
|
-
* and useItems may not invalidate when the seed set is unchanged.
|
|
149
|
-
*/
|
|
150
|
-
static rehydrateCachedItemsFromDbAfterEasSync(): Promise<void>;
|
|
151
|
-
/** Throws ItemCreateValidationError for unknown keys and values that break their property's rules. */
|
|
152
|
-
static assertValidCreateValues(props: any, propertyNames: any, dataTypeByPropertyName: any, skipKeys: any): Promise<void>;
|
|
153
|
-
/**
|
|
154
|
-
* Set `publisher` on loaded Items for these seeds (after claimUnpublishedDrafts stamped
|
|
155
|
-
* their rows). Items that aren't loaded read it from the DB when they load.
|
|
156
|
-
*/
|
|
157
|
-
static setPublisherForCachedSeeds(seedLocalIds: any, publisher: any): void;
|
|
158
|
-
static publish(item: any, options: any): Promise<void>;
|
|
159
|
-
constructor(initialValues: any);
|
|
160
|
-
_propertiesSubject: BehaviorSubject<{}>;
|
|
161
|
-
subscribe: (callback: any) => import("xstate").Subscription;
|
|
162
|
-
getService: () => import("xstate").Actor<import("xstate").StateMachine<{}, import("xstate").AnyEventObject, {
|
|
163
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>> | undefined;
|
|
164
|
-
}, {
|
|
165
|
-
src: "waitForDb";
|
|
166
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
167
|
-
id: string | undefined;
|
|
168
|
-
} | {
|
|
169
|
-
src: "loadOrCreateItem";
|
|
170
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
171
|
-
id: string | undefined;
|
|
172
|
-
} | {
|
|
173
|
-
src: "runPublish";
|
|
174
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
175
|
-
id: string | undefined;
|
|
176
|
-
}, never, never, never, "error" | "idle" | "loading" | "waitingForDb" | "publishing", string, {}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
177
|
-
id: any;
|
|
178
|
-
states: {
|
|
179
|
-
readonly idle: {};
|
|
180
|
-
readonly publishing: {};
|
|
181
|
-
readonly waitingForDb: {};
|
|
182
|
-
readonly loading: {};
|
|
183
|
-
readonly error: {};
|
|
184
|
-
};
|
|
185
|
-
}, import("xstate").MetaObject>>;
|
|
186
|
-
/**
|
|
187
|
-
* The item's unresolved conflicts, one per property: local edits that were kept over a value
|
|
188
|
-
* sync wrote while they were pending (ADR 0019). Each property's is also on `property.conflict`.
|
|
189
|
-
*/
|
|
190
|
-
conflicts: () => Promise<any[]>;
|
|
191
|
-
getEditedProperties: () => Promise<any>;
|
|
192
|
-
unpublish: () => Promise<void>;
|
|
193
|
-
/**
|
|
194
|
-
* Upload this item's files to Arweave and write its attestations to EAS.
|
|
195
|
-
*
|
|
196
|
-
* Requires @seedprotocol/publish. Its `initPublish()` (or `<PublishProvider config>`)
|
|
197
|
-
* registers the PublishExecutor this delegates to; without it, publish() throws
|
|
198
|
-
* PUBLISH_NOT_CONFIGURED_MESSAGE. `options` are passed to that package unchanged (its
|
|
199
|
-
* CreatePublishOptions: signers, Arweave tags, `publishMode`, `onPublished`, ...).
|
|
200
|
-
*
|
|
201
|
-
* Resolves when the publish has finished, and rejects with the publish package's error
|
|
202
|
-
* if it failed. Throws OwnershipError if none of the client's addresses own the item.
|
|
203
|
-
*/
|
|
204
|
-
publish: (options: any) => Promise<any>;
|
|
205
|
-
getPublishUploads: (options: any) => Promise<any[]>;
|
|
206
|
-
getPublishPayload: (uploadedTransactions: any, options: any) => Promise<any>;
|
|
207
|
-
persistSeedUid: (publisher: any, attestationCreatedAtMs: any) => Promise<void>;
|
|
208
|
-
_storageTransactionId: any;
|
|
209
|
-
_service: import("xstate").Actor<import("xstate").StateMachine<{}, import("xstate").AnyEventObject, {
|
|
210
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>> | undefined;
|
|
211
|
-
}, {
|
|
212
|
-
src: "waitForDb";
|
|
213
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
214
|
-
id: string | undefined;
|
|
215
|
-
} | {
|
|
216
|
-
src: "loadOrCreateItem";
|
|
217
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
218
|
-
id: string | undefined;
|
|
219
|
-
} | {
|
|
220
|
-
src: "runPublish";
|
|
221
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
222
|
-
id: string | undefined;
|
|
223
|
-
}, never, never, never, "error" | "idle" | "loading" | "waitingForDb" | "publishing", string, {}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
224
|
-
id: any;
|
|
225
|
-
states: {
|
|
226
|
-
readonly idle: {};
|
|
227
|
-
readonly publishing: {};
|
|
228
|
-
readonly waitingForDb: {};
|
|
229
|
-
readonly loading: {};
|
|
230
|
-
readonly error: {};
|
|
231
|
-
};
|
|
232
|
-
}, import("xstate").MetaObject>>;
|
|
233
|
-
_subscription: import("xstate").Subscription;
|
|
234
|
-
/**
|
|
235
|
-
* The ItemProperty a model property name reads and writes on the item: by its name, or by its
|
|
236
|
-
* storage name (`html` finds `htmlId` and the other way round). Internal names don't resolve.
|
|
237
|
-
*/
|
|
238
|
-
_findPropertyInstance(propertyName: any): any;
|
|
239
|
-
/** Every name `_findPropertyInstance` resolves: the stored names and their schema names. */
|
|
240
|
-
_propertyInstanceNames(): any[];
|
|
241
|
-
/**
|
|
242
|
-
* Writes an assigned seed uid to the item's seed row, so later loads and getPublishPayload see it.
|
|
243
|
-
* Writes run one after another per item, so the last assignment is the one that stays.
|
|
244
|
-
*/
|
|
245
|
-
_persistSeedUid(seedUid: any): void;
|
|
246
|
-
_createPropertyInstance(props: any): void;
|
|
247
|
-
get serviceContext(): {};
|
|
248
|
-
/**
|
|
249
|
-
* Get snapshot context from the service
|
|
250
|
-
* Used by the reactive proxy to read tracked properties
|
|
251
|
-
*/
|
|
252
|
-
_getSnapshotContext(): {};
|
|
253
|
-
get seedLocalId(): any;
|
|
254
|
-
get seedUid(): any;
|
|
255
|
-
get schemaUid(): any;
|
|
256
|
-
get latestVersionUid(): any;
|
|
257
|
-
get latestVersionLocalId(): any;
|
|
258
|
-
get modelName(): any;
|
|
259
|
-
get publisher(): any;
|
|
260
|
-
get revokedAt(): any;
|
|
261
|
-
get isRevoked(): boolean;
|
|
262
|
-
/**
|
|
263
|
-
* Returns model property names from the Model cache (for use in constructor when
|
|
264
|
-
* property instances are not yet available). Returns [] if modelName is missing
|
|
265
|
-
* or Model is not in cache. Pass schemaName when available so the correct model
|
|
266
|
-
* is resolved (cache is keyed by schemaName:modelName).
|
|
267
|
-
*/
|
|
268
|
-
_getModelPropertyNames(schemaName: any): any[];
|
|
269
|
-
/**
|
|
270
|
-
* Helper method to get model schema keys for filtering properties
|
|
271
|
-
* Since properties are loaded from metadata (which already corresponds to the model),
|
|
272
|
-
* we can infer schema keys from the property instances themselves
|
|
273
|
-
* This makes Item independent from Model
|
|
274
|
-
*/
|
|
275
|
-
_getModelSchemaKeys(): any[];
|
|
276
|
-
_getSchemaKeysFromPropertyInstances(propertyInstances: any): any[];
|
|
277
|
-
/**
|
|
278
|
-
* Helper method to determine if a property key is a model-specific property
|
|
279
|
-
* (as opposed to an internal/common property)
|
|
280
|
-
*
|
|
281
|
-
* Uses the same transformation as _getSchemaKeysFromPropertyInstances so that
|
|
282
|
-
* Map keys (e.g. "authorId", "tagIds") are correctly matched to schema keys
|
|
283
|
-
* (e.g. "author", "tags").
|
|
284
|
-
*/
|
|
285
|
-
_isModelProperty(key: any, modelSchemaKeys: any): any;
|
|
286
|
-
/**
|
|
287
|
-
* Returns only properties that are defined in the Model's schema
|
|
288
|
-
* (excludes internal/common properties)
|
|
289
|
-
*/
|
|
290
|
-
get properties(): any[];
|
|
291
|
-
/**
|
|
292
|
-
* Returns only internal/common properties that are shared across all Items
|
|
293
|
-
* (e.g., seedLocalId, seedUid, createdAt, etc.)
|
|
294
|
-
*/
|
|
295
|
-
get internalProperties(): {
|
|
296
|
-
[k: string]: any;
|
|
297
|
-
};
|
|
298
|
-
/**
|
|
299
|
-
* Returns all properties (both model-specific and internal)
|
|
300
|
-
* Useful for backward compatibility or debugging
|
|
301
|
-
*/
|
|
302
|
-
get allProperties(): {};
|
|
303
|
-
get attestationCreatedAt(): any;
|
|
304
|
-
get versionsCount(): any;
|
|
305
|
-
get lastVersionPublishedAt(): any;
|
|
306
|
-
get createdAt(): any;
|
|
307
|
-
/**
|
|
308
|
-
* Set up liveQuery subscription to watch for item and version changes in the database
|
|
309
|
-
* This enables cross-instance synchronization (e.g., changes in other tabs/windows)
|
|
310
|
-
*/
|
|
311
|
-
_setupLiveQuerySubscription(): void;
|
|
312
|
-
/**
|
|
313
|
-
* Releases this holder's reference. Item.create, Item.find and createById return the same cached
|
|
314
|
-
* instance to every caller, so the instance is stopped only when the last holder unloads it.
|
|
315
|
-
*/
|
|
316
|
-
unload(): void;
|
|
317
|
-
/**
|
|
318
|
-
* Destroy the item: soft delete in DB, remove from caches, clean up subscriptions, stop service.
|
|
319
|
-
*/
|
|
320
|
-
destroy(): Promise<void>;
|
|
321
|
-
}
|
|
322
|
-
declare namespace Item {
|
|
323
|
-
let instanceCache: Map<any, any>;
|
|
324
|
-
let CREATE_METADATA_KEYS: Set<string>;
|
|
325
|
-
}
|
|
326
|
-
declare function getGetAdditionalSyncAddresses(): any;
|
|
327
|
-
/**
|
|
328
|
-
* True when a version row's attestation was revoked (`versions.revoked_at` set). 0 counts as
|
|
329
|
-
* "not revoked", like `seeds.revoked_at`.
|
|
330
|
-
*/
|
|
331
|
-
declare function isVersionRevoked(revokedAt: any): boolean;
|
|
332
|
-
/**
|
|
333
|
-
* Whether an actor has been stopped (unload, destroy, or Schema eviction). Async work started by an
|
|
334
|
-
* entity (DB lookups, retry timers) must check this before sending, since a stopped actor ignores
|
|
335
|
-
* events and XState warns about every one of them.
|
|
336
|
-
*/
|
|
337
|
-
declare function isActorStopped(actor: any): boolean;
|
|
338
|
-
/**
|
|
339
|
-
* Canonical "latest metadata row first" ordering, the one readers use to pick a property's value
|
|
340
|
-
* from its rows across versions:
|
|
341
|
-
*
|
|
342
|
-
* 1. Live rows (`revoked_at IS NULL`) before revoked ones. A synced row with `revoked_at` set is
|
|
343
|
-
* kept only because every attestation of that property on its version is revoked (ADR 0006);
|
|
344
|
-
* it must not hide a live value from another version, but is still the value to show when no
|
|
345
|
-
* live row is left (an unpublished item keeps its last values). Local drafts (no uid) are live.
|
|
346
|
-
* 2. Newest first: `COALESCE(attestation_created_at, created_at)`.
|
|
347
|
-
* 3. Tie-break on `local_id`, descending.
|
|
348
|
-
*
|
|
349
|
-
* {@link METADATA_LATEST_FIRST_ORDER_SQL} is the same ordering in SQL. SQL that can't take a
|
|
350
|
-
* fragment (e.g. liveQuery tagged templates, where every interpolation is a bound value) spells it
|
|
351
|
-
* out; keep those in sync.
|
|
352
|
-
*/
|
|
353
|
-
declare const METADATA_LATEST_FIRST_ORDER_SQL: "(revoked_at IS NOT NULL), COALESCE(attestation_created_at, created_at) DESC, local_id DESC";
|
|
354
|
-
/**
|
|
355
|
-
* Default readyTimeout for create/find/all with waitForReady. Loads that touch OPFS and the DB can take
|
|
356
|
-
* several seconds on slow devices and CI runners; a load that is really stuck still errors.
|
|
357
|
-
*/
|
|
358
|
-
declare const DEFAULT_READY_TIMEOUT_MS: 15000;
|
|
359
|
-
/** How long a deferred op waits before the drainer tries it again. */
|
|
360
|
-
declare const OUTBOX_DEFER_MS: 50;
|
|
361
|
-
/**
|
|
362
|
-
* Creates a reactive Proxy that intercepts property access and assignment
|
|
363
|
-
* to read from and write to an actor service's context.
|
|
364
|
-
*
|
|
365
|
-
* This enables automatic React re-renders when properties change, as the
|
|
366
|
-
* React hooks subscribe to the actor service which gets updated when properties
|
|
367
|
-
* are set via the proxy.
|
|
368
|
-
*
|
|
369
|
-
* @param config Configuration object
|
|
370
|
-
* @returns A proxied instance that behaves like the original but with reactive properties
|
|
371
|
-
*
|
|
372
|
-
* @note TypeScript's Proxy type doesn't automatically preserve method signatures,
|
|
373
|
-
* so we use Proxied<T> to ensure all methods and properties are recognized.
|
|
374
|
-
* The Proxy implementation preserves all methods via Reflect.get, so this is safe.
|
|
375
|
-
*/
|
|
376
|
-
declare function createReactiveProxy(config: any): any;
|
|
377
|
-
/**
|
|
378
|
-
* Common getters and utilities for entity classes
|
|
379
|
-
* These work with any entity that has a getService() method returning an XState actor
|
|
380
|
-
*/
|
|
381
|
-
/**
|
|
382
|
-
* Get the current state value from an entity's service
|
|
383
|
-
*/
|
|
384
|
-
/**
|
|
385
|
-
* Whether two references are the same entity: an instance and its reactive proxy are different
|
|
386
|
-
* objects that share one actor.
|
|
387
|
-
*/
|
|
388
|
-
declare function sameEntity(a: any, b: any): boolean;
|
|
389
|
-
/**
|
|
390
|
-
* Generic find implementation for entities
|
|
391
|
-
*
|
|
392
|
-
* @param config - Find configuration with lookup methods
|
|
393
|
-
* @param params - Find parameters (id, name, or other entity-specific params)
|
|
394
|
-
* @param options - Find options (waitForReady, readyTimeout)
|
|
395
|
-
* @returns Entity instance if found, undefined otherwise
|
|
396
|
-
*/
|
|
397
|
-
declare function findEntity(config: any, params: any, options?: {}): Promise<any>;
|
|
398
|
-
/**
|
|
399
|
-
* Remove the instance from all given caches by key, without refCount (always delete).
|
|
400
|
-
* Works for both entry caches and index caches since the operation is only delete(key).
|
|
401
|
-
*/
|
|
402
|
-
declare function forceRemoveFromCaches(instance: any, config: any): void;
|
|
403
|
-
/**
|
|
404
|
-
* Run the service event sequence and stop the service:
|
|
405
|
-
* destroyStarted -> doDestroy -> (destroyError on failure) -> stop.
|
|
406
|
-
* A doDestroy failure is recorded on the service (destroyError) and rethrown, so destroy()
|
|
407
|
-
* rejects instead of resolving with the rows still in the DB.
|
|
408
|
-
* Event names must match what the entity machines expect.
|
|
409
|
-
*/
|
|
410
|
-
declare function runDestroyLifecycle(instance: any, config: any): Promise<void>;
|
|
411
|
-
/** {@link LATEST_VERSION_ORDER_SQL} for a Drizzle `orderBy`. */
|
|
412
|
-
declare function latestVersionOrder(): import("drizzle-orm").SQL<unknown>;
|
|
413
|
-
/**
|
|
414
|
-
* A metadata row holds published content when it has a valid EAS attestation uid, or when sync
|
|
415
|
-
* derived it from one (ItemStorage rows from a storage_transaction_id attestation: no uid of their
|
|
416
|
-
* own, `derivedFromUid` set). Anything else is a local edit (or a row awaiting its uid backfill).
|
|
417
|
-
*/
|
|
418
|
-
declare function isPublishedMetadataRow(row: any): boolean;
|
|
419
|
-
declare var ClientManagerState: any;
|
|
420
|
-
declare var MachineIds: any;
|
|
421
|
-
declare const PUBLISH_NOT_CONFIGURED_MESSAGE: "Publishing is not configured. item.publish() needs @seedprotocol/publish: call initPublish() from it, or mount <PublishProvider config={...}>, before publishing.";
|
|
422
|
-
/**
|
|
423
|
-
* Writes a new item (ADR 0019): its seed, first version and a row per property go in one outbox op
|
|
424
|
-
* applied in one transaction, so a failure leaves nothing behind. ItemStorage initial values are
|
|
425
|
-
* staged first and moved into the item's files when the op applies.
|
|
426
|
-
*/
|
|
427
|
-
declare function createNewItem({ modelName, modelFileId, ...propertyData }: {
|
|
428
|
-
[x: string]: any;
|
|
429
|
-
modelName: any;
|
|
430
|
-
modelFileId: any;
|
|
431
|
-
}): Promise<{
|
|
432
|
-
modelName: any;
|
|
433
|
-
seedLocalId: string;
|
|
434
|
-
versionLocalId: any;
|
|
435
|
-
}>;
|
|
436
|
-
declare function getGetPublisherForNewSeeds(): any;
|
|
437
|
-
/**
|
|
438
|
-
* Appends one op and waits until it settles: its applier's result once applied, or `superseded`
|
|
439
|
-
* when a newer op of its property replaced it. Rejects with OutboxOpFailedError when it fails.
|
|
440
|
-
*/
|
|
441
|
-
declare function appendOutboxOpAndWait(input: any): Promise<{
|
|
442
|
-
superseded: boolean;
|
|
443
|
-
result?: undefined;
|
|
444
|
-
} | {
|
|
445
|
-
superseded: boolean;
|
|
446
|
-
result: any;
|
|
447
|
-
}>;
|
|
448
|
-
declare function getPublishExecutor(): any;
|
|
449
|
-
declare function getRevokeExecutor(): any;
|
|
450
|
-
/** @deprecated See UploadExecutor. */
|
|
451
|
-
declare function getUploadExecutor(): any;
|
|
452
|
-
/**
|
|
453
|
-
* Per-seed version aggregates plus the latest version row: the first live version by
|
|
454
|
-
* `LATEST_VERSION_ORDER_SQL`.
|
|
455
|
-
*
|
|
456
|
-
* Revoked versions (`revoked_at` set) are never the latest version and don't count toward
|
|
457
|
-
* `lastVersionPublishedAt`. `versionsCount` and `lastLocalUpdateAt` still cover every version row,
|
|
458
|
-
* so a fully unpublished seed (every version revoked) keeps its row here, with null
|
|
459
|
-
* `latestVersionUid` / `latestVersionLocalId` / `lastVersionPublishedAt`.
|
|
460
|
-
*
|
|
461
|
-
* For `publishedVersionUid` / `publishedVersionLocalId` on list rows, see `getItemsData`
|
|
462
|
-
* (batched resolution aligned with `getLatestPublishedVersionRow`).
|
|
463
|
-
*/
|
|
464
|
-
declare function getVersionData$1(): any;
|
|
465
|
-
/**
|
|
466
|
-
* Local draft that has never been attested: no publisher, no real uid, no attestationRaw.
|
|
467
|
-
*/
|
|
468
|
-
declare function isLocalUnsealedDraft(row: any): boolean;
|
|
469
|
-
/**
|
|
470
|
-
* Shared ownership predicate.
|
|
471
|
-
* - A local unsealed draft (never given a publisher) is owned whatever the owned addresses are:
|
|
472
|
-
* it belongs to no wallet yet, and the next wallet to connect claims it (claimUnpublishedDrafts).
|
|
473
|
-
* - Any other row is owned when its publisher (or attester) is in the owned addresses.
|
|
474
|
-
*/
|
|
475
|
-
declare function isSeedRowOwned(row: any, ownedAddresses: any): boolean;
|
|
476
|
-
/** SQL form of {@link isLocalUnsealedDraft} on `seeds`. */
|
|
477
|
-
declare function localUnsealedDraftSql(): import("drizzle-orm").SQL<unknown> | undefined;
|
|
478
|
-
/**
|
|
479
|
-
* @deprecated Matches `seeds.publisher` only. Use {@link ownedSeedsSql}, which agrees
|
|
480
|
-
* with {@link isSeedRowOwned} (empty owned → local unsealed drafts; attester fallback).
|
|
481
|
-
*/
|
|
482
|
-
declare function ownedPublisherSql(ownedAddresses: any): import("drizzle-orm").SQL<any>;
|
|
483
|
-
/**
|
|
484
|
-
* SQL for `addressFilter: 'owned'`: a row passes exactly when {@link isSeedRowOwned} is true.
|
|
485
|
-
* - Local unsealed drafts always pass.
|
|
486
|
-
* - Otherwise `lower(trim(publisher))` is in the owned set, or, when publisher is blank, the
|
|
487
|
-
* `attestationRaw.attester` ({@link resolvePublisherFromSeedRow}). `json_valid` guards
|
|
488
|
-
* `json_extract`, which throws on malformed JSON.
|
|
489
|
-
*/
|
|
490
|
-
declare function ownedSeedsSql(ownedAddresses: any): import("drizzle-orm").SQL<unknown> | undefined;
|
|
491
|
-
/** The row readers show for each property name (first by {@link compareMetadataRowsLatestFirst}). */
|
|
492
|
-
declare function pickLatestMetadataRowPerProperty(rows: any): any[];
|
|
493
|
-
/** SQL form of {@link isPlaceholderUid}: null, `''`, `'NULL'`, or zero bytes32 (trimmed, any case). */
|
|
494
|
-
declare function placeholderUidSql(column: any): import("drizzle-orm").SQL<unknown> | undefined;
|
|
495
|
-
declare const propertyMachine: import("xstate").StateMachine<{}, import("xstate").AnyEventObject, {
|
|
496
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>> | undefined;
|
|
497
|
-
}, {
|
|
498
|
-
src: "waitForDb";
|
|
499
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
500
|
-
id: string | undefined;
|
|
501
|
-
} | {
|
|
502
|
-
src: "loadOrCreateProperty";
|
|
503
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
504
|
-
id: string | undefined;
|
|
505
|
-
} | {
|
|
506
|
-
src: "hydrateFromDb";
|
|
507
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
508
|
-
id: string | undefined;
|
|
509
|
-
} | {
|
|
510
|
-
src: "initialize";
|
|
511
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
512
|
-
id: string | undefined;
|
|
513
|
-
} | {
|
|
514
|
-
src: "resolveRelatedValue";
|
|
515
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
516
|
-
id: string | undefined;
|
|
517
|
-
} | {
|
|
518
|
-
src: "analyzeInput";
|
|
519
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
520
|
-
id: string | undefined;
|
|
521
|
-
} | {
|
|
522
|
-
src: "saveImage";
|
|
523
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
524
|
-
id: string | undefined;
|
|
525
|
-
} | {
|
|
526
|
-
src: "saveFile";
|
|
527
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
528
|
-
id: string | undefined;
|
|
529
|
-
} | {
|
|
530
|
-
src: "saveHtml";
|
|
531
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
532
|
-
id: string | undefined;
|
|
533
|
-
} | {
|
|
534
|
-
src: "saveItemStorage";
|
|
535
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
536
|
-
id: string | undefined;
|
|
537
|
-
}, never, {
|
|
538
|
-
type: "propertyMachineIsIdle";
|
|
539
|
-
params: import("xstate").NonReducibleUnknown;
|
|
540
|
-
}, never, "error" | "idle" | "loading" | "waitingForDb" | "hydratingFromDb" | "initializing" | "resolvingRelatedValue" | {
|
|
541
|
-
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "savingItemStorage";
|
|
542
|
-
}, string, {}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
543
|
-
id: "itemProperty";
|
|
544
|
-
states: {
|
|
545
|
-
readonly idle: {};
|
|
546
|
-
readonly waitingForDb: {};
|
|
547
|
-
readonly loading: {};
|
|
548
|
-
readonly error: {};
|
|
549
|
-
readonly hydratingFromDb: {};
|
|
550
|
-
readonly initializing: {};
|
|
551
|
-
readonly resolvingRelatedValue: {};
|
|
552
|
-
readonly saving: {
|
|
553
|
-
states: {
|
|
554
|
-
readonly analyzingInput: {};
|
|
555
|
-
readonly savingImage: {};
|
|
556
|
-
readonly savingFile: {};
|
|
557
|
-
readonly savingHtml: {};
|
|
558
|
-
readonly savingItemStorage: {};
|
|
559
|
-
readonly doneSaving: {};
|
|
560
|
-
};
|
|
561
|
-
};
|
|
562
|
-
};
|
|
563
|
-
}, import("xstate").MetaObject>;
|
|
564
|
-
/**
|
|
565
|
-
* SQL for an address list on `publisher`. Empty list → no rows (`1=0`).
|
|
566
|
-
* Compares `lower(publisher)` so checksummed rows match persisted lowercase addresses.
|
|
567
|
-
* Used for `addressFilter: 'watched'`; `'owned'` uses {@link ownedSeedsSql}.
|
|
568
|
-
*/
|
|
569
|
-
declare function publisherInAddressListSql(column: any, addresses: any): import("drizzle-orm").SQL<any>;
|
|
570
|
-
/** Case-insensitive membership in the persisted owned set. */
|
|
571
|
-
declare function publisherIsInOwnedSet(publisher: any, ownedAddresses: any): boolean;
|
|
572
|
-
declare function setAdditionalSyncAddresses(getter: any): void;
|
|
573
|
-
declare function setGetPublisherForNewSeeds(getter: any): void;
|
|
574
|
-
declare function setPublishExecutor(executor: any): void;
|
|
575
|
-
declare function setRevokeExecutor(executor: any): void;
|
|
576
|
-
/** @deprecated See UploadExecutor. */
|
|
577
|
-
declare function setUploadExecutor(executor: any): void;
|
|
578
|
-
/**
|
|
579
|
-
* Per-instance state for an entity (liveQuery subscriptions and the like), keyed by the entity's
|
|
580
|
-
* actor. An entity's raw instance and its reactive proxy are different objects that share one
|
|
581
|
-
* actor. State set from the constructor (`this` = raw instance) must be found again from methods
|
|
582
|
-
* called on the proxy (`this` = proxy), so a WeakMap keyed by the instance misses there.
|
|
583
|
-
*
|
|
584
|
-
* `getService()` must return the actor before the first `set`.
|
|
585
|
-
*/
|
|
586
|
-
declare class ActorKeyedState {
|
|
587
|
-
states: WeakMap<object, any>;
|
|
588
|
-
get(instance: any): any;
|
|
589
|
-
set(instance: any, state: any): this;
|
|
590
|
-
delete(instance: any): boolean;
|
|
591
|
-
has(instance: any): boolean;
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* Shared helpers for entity destroy operations.
|
|
595
|
-
* Used by Schema, Model, ModelProperty, Item, and ItemProperty destroy() methods.
|
|
596
|
-
*/
|
|
597
|
-
/**
|
|
598
|
-
* Unsubscribe the entity's liveQueries and any extra subscription (e.g. Item/ItemProperty
|
|
599
|
-
* _subscription), and drop its instance state. Swallows errors so one failure doesn't block the rest.
|
|
600
|
-
*/
|
|
601
|
-
declare function clearDestroySubscriptions(instance: any, config: any): void;
|
|
602
|
-
/**
|
|
603
|
-
* Release one reference to a cached entity instance. When none remain, remove it from the
|
|
604
|
-
* caches, clean up its subscriptions and stop its service
|
|
605
|
-
*
|
|
606
|
-
* @param instance - Entity instance to unload
|
|
607
|
-
* @param config - Unload configuration
|
|
608
|
-
*/
|
|
609
|
-
declare function unloadEntity(instance: any, config: any): void;
|
|
610
|
-
declare var ClientManagerEvents: any;
|
|
611
|
-
/**
|
|
612
|
-
* The publisher a seed's version and property rows take: the seed's own (its `publisher`, else the
|
|
613
|
-
* attester of its stored attestation). Undefined for a draft that belongs to no wallet yet; those
|
|
614
|
-
* rows are then claimed together with their seed (claimUnpublishedDrafts).
|
|
615
|
-
*/
|
|
616
|
-
declare function getSeedPublisher(seedLocalId: any, db?: any): Promise<any>;
|
|
617
|
-
/** Html, Image, File and Relation rows are stored as `<name>Id`; match either spelling. */
|
|
618
|
-
declare function propertyNameVariants(name: any): any[];
|
|
619
|
-
declare function createSeed({ type, seedUid, modelFileId }: {
|
|
620
|
-
type: any;
|
|
621
|
-
seedUid: any;
|
|
622
|
-
modelFileId: any;
|
|
623
|
-
}, options?: {}): Promise<any>;
|
|
624
|
-
declare function createMetadata(metadataValues: any, propertyRecordSchema: any, options: any): Promise<any>;
|
|
625
|
-
declare function updateItemPropertyValue({ localId: localIdParam, propertyName, newValue, seedUid, seedLocalId, modelName, refSeedType, refResolvedValue, refResolvedDisplayValue, versionLocalId, versionUid, schemaUid, localStorageDir, dataType, refValueType, }: {
|
|
626
|
-
localId: any;
|
|
627
|
-
propertyName: any;
|
|
628
|
-
newValue: any;
|
|
629
|
-
seedUid: any;
|
|
630
|
-
seedLocalId: any;
|
|
631
|
-
modelName: any;
|
|
632
|
-
refSeedType: any;
|
|
633
|
-
refResolvedValue: any;
|
|
634
|
-
refResolvedDisplayValue: any;
|
|
635
|
-
versionLocalId: any;
|
|
636
|
-
versionUid: any;
|
|
637
|
-
schemaUid: any;
|
|
638
|
-
localStorageDir: any;
|
|
639
|
-
dataType: any;
|
|
640
|
-
refValueType: any;
|
|
641
|
-
}, options?: {}): Promise<{
|
|
642
|
-
localId: any;
|
|
643
|
-
uid: any;
|
|
644
|
-
schemaUid: any;
|
|
645
|
-
} | undefined>;
|
|
646
|
-
/** Resolve publisher from seed row: `publisher` column, else `attestationRaw.attester`. */
|
|
647
|
-
declare function resolvePublisherFromSeedRow(row: any): any;
|
|
648
|
-
declare var getPropertyData$1: Readonly<{
|
|
649
|
-
__proto__: null;
|
|
650
|
-
getPropertyData: ({ propertyName, seedLocalId, seedUid, modelName, }: {
|
|
651
|
-
propertyName: any;
|
|
652
|
-
seedLocalId: any;
|
|
653
|
-
seedUid: any;
|
|
654
|
-
modelName: any;
|
|
655
|
-
}) => Promise<any>;
|
|
656
|
-
}>;
|
|
657
|
-
declare var Item$1: Readonly<{
|
|
658
|
-
__proto__: null;
|
|
659
|
-
Item: typeof Item;
|
|
660
|
-
}>;
|
|
661
|
-
/**
|
|
662
|
-
* Resolves once the op is applied, or superseded by a newer op that applied; rejects with
|
|
663
|
-
* OutboxOpFailedError when it, or the op that superseded it, failed.
|
|
664
|
-
*/
|
|
665
|
-
declare function waitForOutboxOp(opId: any): Promise<any>;
|
|
666
|
-
/** Appends one op and tells the leader to drain. Returns the op id. */
|
|
667
|
-
declare function appendOutboxOp(input: any): Promise<string>;
|
|
668
|
-
/** Attempts before a retryable error fails the op. */
|
|
669
|
-
declare const OUTBOX_MAX_ATTEMPTS: 8;
|
|
670
|
-
/** Applied and superseded ops are kept this long, then pruned. */
|
|
671
|
-
declare const OUTBOX_PRUNE_AFTER_MS: number;
|
|
672
|
-
/** Failed ops are kept longer, so a refused write can still be looked into. */
|
|
673
|
-
declare const OUTBOX_PRUNE_FAILED_AFTER_MS: number;
|
|
674
|
-
/** The status of each op, by id; ops not found are left out. */
|
|
675
|
-
declare function getOutboxOps(opIds: any): Promise<any>;
|
|
676
|
-
/** Waits before each retry of an op that failed with a retryable error; the last is reused. */
|
|
677
|
-
declare const OUTBOX_RETRY_DELAYS_MS: number[];
|
|
678
|
-
/**
|
|
679
|
-
* An op that can't apply yet for a reason that will pass without counting as a failure: an applier's
|
|
680
|
-
* `around` found a lock held. The drainer sets the op (and its property's queue) aside for
|
|
681
|
-
* OUTBOX_DEFER_MS and goes on with other ops; its attempts aren't counted.
|
|
682
|
-
*/
|
|
683
|
-
declare class OutboxOpDeferredError extends Error {
|
|
684
|
-
constructor(message: any);
|
|
685
|
-
}
|
|
686
|
-
/** Rejects `waitForOutboxOp` for an op that failed, or that a failed op superseded. */
|
|
687
|
-
declare class OutboxOpFailedError extends Error {
|
|
688
|
-
constructor(opId: any, message: any, errorName?: null);
|
|
689
|
-
opId: any;
|
|
690
|
-
errorName: any;
|
|
691
|
-
code: string;
|
|
692
|
-
}
|
|
693
|
-
/** An op that can never apply (a broken rule, an item the client doesn't own). Not retried. */
|
|
694
|
-
declare class OutboxOpRejectedError extends Error {
|
|
695
|
-
constructor(message: any, options: any);
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* Applies every pending op that is due, in order. Exported for tests and for code that must see
|
|
699
|
-
* the outbox applied before it continues; normally the leader drains on its own.
|
|
700
|
-
*/
|
|
701
|
-
declare function drainOutbox(): Promise<void>;
|
|
702
|
-
/**
|
|
703
|
-
* The value an item property will have once its pending `set` ops apply, in its stored string form.
|
|
704
|
-
* Undefined when its newest pending value op is not a `set`, or it has none.
|
|
705
|
-
*/
|
|
706
|
-
declare function getPendingSetValue(seedLocalId: any, propertyName: any): Promise<any>;
|
|
707
|
-
/** An op's stored value, decoded. */
|
|
708
|
-
declare function outboxOpValue(op: any): any;
|
|
709
|
-
/** What an applied op's applier returned, decoded. */
|
|
710
|
-
declare function outboxOpResult(op: any): any;
|
|
711
|
-
/**
|
|
712
|
-
* Deletes settled ops older than their retention: applied and superseded ops after
|
|
713
|
-
* OUTBOX_PRUNE_AFTER_MS, failed ones after OUTBOX_PRUNE_FAILED_AFTER_MS. An applied op with an
|
|
714
|
-
* unresolved conflict stays until the conflict is resolved. Pending ops are never pruned. The
|
|
715
|
-
* leader runs it after a drain, at most hourly. Returns how many ops it deleted.
|
|
716
|
-
*/
|
|
717
|
-
declare function pruneOutbox(now?: number): Promise<any>;
|
|
718
|
-
declare class ItemProperty {
|
|
719
|
-
static create(props: any, options: any): any;
|
|
720
|
-
/**
|
|
721
|
-
* Wraps a new instance in its reactive proxy: tracked names read from and write to the actor's
|
|
722
|
-
* context, and assigning `value` also sends it to the actor before the setter runs.
|
|
723
|
-
*/
|
|
724
|
-
static wrapInProxy(instance: any): any;
|
|
725
|
-
/**
|
|
726
|
-
* The cached ItemProperty when it can be read right now (idle, not saving), the state
|
|
727
|
-
* `ItemProperty.find()` waits for. Otherwise undefined. Unlike `find`, it takes no cache hold, so
|
|
728
|
-
* React hooks can call it during render.
|
|
729
|
-
*/
|
|
730
|
-
static peekReady({ propertyName, seedLocalId, seedUid, }: {
|
|
731
|
-
propertyName: any;
|
|
732
|
-
seedLocalId: any;
|
|
733
|
-
seedUid: any;
|
|
734
|
-
}): any;
|
|
735
|
-
/** Takes a hold on the instance it returns: release it with `unload()`. */
|
|
736
|
-
static find({ propertyName, seedLocalId, seedUid, modelName: modelNameOption, waitForReady, readyTimeout, hold, }: {
|
|
737
|
-
propertyName: any;
|
|
738
|
-
seedLocalId: any;
|
|
739
|
-
seedUid: any;
|
|
740
|
-
modelName: any;
|
|
741
|
-
waitForReady?: boolean | undefined;
|
|
742
|
-
readyTimeout?: number | undefined;
|
|
743
|
-
hold: any;
|
|
744
|
-
}): Promise<any>;
|
|
745
|
-
/**
|
|
746
|
-
* Get all ItemProperty instances for an item.
|
|
747
|
-
* Loads property data via getItemProperties, creates instances via create, optionally waits for idle.
|
|
748
|
-
* Takes a hold on each instance, as `create` does.
|
|
749
|
-
*/
|
|
750
|
-
static all(params: any, options: any): Promise<any[]>;
|
|
751
|
-
/**
|
|
752
|
-
* @internal Takes one more hold on a cached, running instance, released with `unload()`. False
|
|
753
|
-
* (and no hold) when the instance isn't cached or was stopped.
|
|
754
|
-
*/
|
|
755
|
-
static retain(instance: any): boolean;
|
|
756
|
-
/**
|
|
757
|
-
* Stops an item's cached properties that nobody holds. Internal lookups cache a property without
|
|
758
|
-
* a hold for the item to take; one that finished after the item stopped (a liveQuery handler's
|
|
759
|
-
* find, say) never got that hold and would otherwise keep running. Called when the item stops.
|
|
760
|
-
*/
|
|
761
|
-
static unloadUnheldForItem(seedIds: any): void;
|
|
762
|
-
static cacheKey(seedLocalIdOrUid: any, propertyName: any): string;
|
|
763
|
-
/**
|
|
764
|
-
* Drops an item's properties from the instance cache, under every key they're cached by. A dropped
|
|
765
|
-
* instance someone still holds keeps running but is detached: it doesn't re-key itself into the
|
|
766
|
-
* cache when its context changes, so the next lookup creates a fresh instance.
|
|
767
|
-
*/
|
|
768
|
-
static clearInstanceCacheForItem(seedLocalIdOrUid: any): void;
|
|
769
|
-
constructor(initialValues: any);
|
|
770
|
-
_isRelation: boolean;
|
|
771
|
-
_isList: boolean;
|
|
772
|
-
find: typeof ItemProperty.find;
|
|
773
|
-
_constructedPropertyName: any;
|
|
774
|
-
_dataType: any;
|
|
775
|
-
_alias: any;
|
|
776
|
-
_subject: BehaviorSubject<any>;
|
|
777
|
-
_service: import("xstate").Actor<import("xstate").StateMachine<{}, import("xstate").AnyEventObject, {
|
|
778
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>> | undefined;
|
|
779
|
-
}, {
|
|
780
|
-
src: "waitForDb";
|
|
781
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
782
|
-
id: string | undefined;
|
|
783
|
-
} | {
|
|
784
|
-
src: "loadOrCreateProperty";
|
|
785
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
786
|
-
id: string | undefined;
|
|
787
|
-
} | {
|
|
788
|
-
src: "hydrateFromDb";
|
|
789
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
790
|
-
id: string | undefined;
|
|
791
|
-
} | {
|
|
792
|
-
src: "initialize";
|
|
793
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
794
|
-
id: string | undefined;
|
|
795
|
-
} | {
|
|
796
|
-
src: "resolveRelatedValue";
|
|
797
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
798
|
-
id: string | undefined;
|
|
799
|
-
} | {
|
|
800
|
-
src: "analyzeInput";
|
|
801
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
802
|
-
id: string | undefined;
|
|
803
|
-
} | {
|
|
804
|
-
src: "saveImage";
|
|
805
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
806
|
-
id: string | undefined;
|
|
807
|
-
} | {
|
|
808
|
-
src: "saveFile";
|
|
809
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
810
|
-
id: string | undefined;
|
|
811
|
-
} | {
|
|
812
|
-
src: "saveHtml";
|
|
813
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
814
|
-
id: string | undefined;
|
|
815
|
-
} | {
|
|
816
|
-
src: "saveItemStorage";
|
|
817
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
818
|
-
id: string | undefined;
|
|
819
|
-
}, never, {
|
|
820
|
-
type: "propertyMachineIsIdle";
|
|
821
|
-
params: import("xstate").NonReducibleUnknown;
|
|
822
|
-
}, never, "error" | "idle" | "loading" | "waitingForDb" | "hydratingFromDb" | "initializing" | "resolvingRelatedValue" | {
|
|
823
|
-
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "savingItemStorage";
|
|
824
|
-
}, string, {}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
825
|
-
id: "itemProperty";
|
|
826
|
-
states: {
|
|
827
|
-
readonly idle: {};
|
|
828
|
-
readonly waitingForDb: {};
|
|
829
|
-
readonly loading: {};
|
|
830
|
-
readonly error: {};
|
|
831
|
-
readonly hydratingFromDb: {};
|
|
832
|
-
readonly initializing: {};
|
|
833
|
-
readonly resolvingRelatedValue: {};
|
|
834
|
-
readonly saving: {
|
|
835
|
-
states: {
|
|
836
|
-
readonly analyzingInput: {};
|
|
837
|
-
readonly savingImage: {};
|
|
838
|
-
readonly savingFile: {};
|
|
839
|
-
readonly savingHtml: {};
|
|
840
|
-
readonly savingItemStorage: {};
|
|
841
|
-
readonly doneSaving: {};
|
|
842
|
-
};
|
|
843
|
-
};
|
|
844
|
-
};
|
|
845
|
-
}, import("xstate").MetaObject>>;
|
|
846
|
-
_subscription: import("xstate").Subscription;
|
|
847
|
-
_schemaUid: any;
|
|
848
|
-
/**
|
|
849
|
-
* Set up liveQuery subscription to watch for metadata changes in the database
|
|
850
|
-
* This enables cross-instance synchronization (e.g., changes in other tabs/windows)
|
|
851
|
-
*/
|
|
852
|
-
_setupLiveQuerySubscription(): void;
|
|
853
|
-
/**
|
|
854
|
-
* Set up liveQuery subscription to watch for property schema changes in the properties table.
|
|
855
|
-
* When ModelProperty dataType (or other schema fields) changes in the database, ItemProperty
|
|
856
|
-
* receives the update and refreshes its propertyRecordSchema.
|
|
857
|
-
*/
|
|
858
|
-
_setupPropertySchemaLiveQuery(): void;
|
|
859
|
-
getService(): import("xstate").Actor<import("xstate").StateMachine<{}, import("xstate").AnyEventObject, {
|
|
860
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>> | undefined;
|
|
861
|
-
}, {
|
|
862
|
-
src: "waitForDb";
|
|
863
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
864
|
-
id: string | undefined;
|
|
865
|
-
} | {
|
|
866
|
-
src: "loadOrCreateProperty";
|
|
867
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
868
|
-
id: string | undefined;
|
|
869
|
-
} | {
|
|
870
|
-
src: "hydrateFromDb";
|
|
871
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
872
|
-
id: string | undefined;
|
|
873
|
-
} | {
|
|
874
|
-
src: "initialize";
|
|
875
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
876
|
-
id: string | undefined;
|
|
877
|
-
} | {
|
|
878
|
-
src: "resolveRelatedValue";
|
|
879
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
880
|
-
id: string | undefined;
|
|
881
|
-
} | {
|
|
882
|
-
src: "analyzeInput";
|
|
883
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
884
|
-
id: string | undefined;
|
|
885
|
-
} | {
|
|
886
|
-
src: "saveImage";
|
|
887
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
888
|
-
id: string | undefined;
|
|
889
|
-
} | {
|
|
890
|
-
src: "saveFile";
|
|
891
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
892
|
-
id: string | undefined;
|
|
893
|
-
} | {
|
|
894
|
-
src: "saveHtml";
|
|
895
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
896
|
-
id: string | undefined;
|
|
897
|
-
} | {
|
|
898
|
-
src: "saveItemStorage";
|
|
899
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
900
|
-
id: string | undefined;
|
|
901
|
-
}, never, {
|
|
902
|
-
type: "propertyMachineIsIdle";
|
|
903
|
-
params: import("xstate").NonReducibleUnknown;
|
|
904
|
-
}, never, "error" | "idle" | "loading" | "waitingForDb" | "hydratingFromDb" | "initializing" | "resolvingRelatedValue" | {
|
|
905
|
-
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "savingItemStorage";
|
|
906
|
-
}, string, {}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
907
|
-
id: "itemProperty";
|
|
908
|
-
states: {
|
|
909
|
-
readonly idle: {};
|
|
910
|
-
readonly waitingForDb: {};
|
|
911
|
-
readonly loading: {};
|
|
912
|
-
readonly error: {};
|
|
913
|
-
readonly hydratingFromDb: {};
|
|
914
|
-
readonly initializing: {};
|
|
915
|
-
readonly resolvingRelatedValue: {};
|
|
916
|
-
readonly saving: {
|
|
917
|
-
states: {
|
|
918
|
-
readonly analyzingInput: {};
|
|
919
|
-
readonly savingImage: {};
|
|
920
|
-
readonly savingFile: {};
|
|
921
|
-
readonly savingHtml: {};
|
|
922
|
-
readonly savingItemStorage: {};
|
|
923
|
-
readonly doneSaving: {};
|
|
924
|
-
};
|
|
925
|
-
};
|
|
926
|
-
};
|
|
927
|
-
}, import("xstate").MetaObject>>;
|
|
928
|
-
_getSnapshot(): import("xstate").MachineSnapshot<{}, import("xstate").AnyEventObject, {
|
|
929
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>> | undefined;
|
|
930
|
-
}, "error" | "idle" | "loading" | "waitingForDb" | "hydratingFromDb" | "initializing" | "resolvingRelatedValue" | {
|
|
931
|
-
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "savingItemStorage";
|
|
932
|
-
}, string, import("xstate").NonReducibleUnknown, import("xstate").MetaObject, {
|
|
933
|
-
id: "itemProperty";
|
|
934
|
-
states: {
|
|
935
|
-
readonly idle: {};
|
|
936
|
-
readonly waitingForDb: {};
|
|
937
|
-
readonly loading: {};
|
|
938
|
-
readonly error: {};
|
|
939
|
-
readonly hydratingFromDb: {};
|
|
940
|
-
readonly initializing: {};
|
|
941
|
-
readonly resolvingRelatedValue: {};
|
|
942
|
-
readonly saving: {
|
|
943
|
-
states: {
|
|
944
|
-
readonly analyzingInput: {};
|
|
945
|
-
readonly savingImage: {};
|
|
946
|
-
readonly savingFile: {};
|
|
947
|
-
readonly savingHtml: {};
|
|
948
|
-
readonly savingItemStorage: {};
|
|
949
|
-
readonly doneSaving: {};
|
|
950
|
-
};
|
|
951
|
-
};
|
|
952
|
-
};
|
|
953
|
-
}>;
|
|
954
|
-
_getSnapshotContext(): {};
|
|
955
|
-
get localId(): any;
|
|
956
|
-
get uid(): any;
|
|
957
|
-
get seedLocalId(): any;
|
|
958
|
-
get seedUid(): any;
|
|
959
|
-
get schemaUid(): any;
|
|
960
|
-
get propertyName(): any;
|
|
961
|
-
/** DB / EAS / metadata column name (e.g. authorIdentityIds). Use for storage; prefer `propertyName` for public API. */
|
|
962
|
-
get storagePropertyName(): any;
|
|
963
|
-
get modelName(): any;
|
|
964
|
-
get propertyDef(): any;
|
|
965
|
-
get localStorageDir(): any;
|
|
966
|
-
get refResolvedValue(): any;
|
|
967
|
-
get localStoragePath(): string | undefined;
|
|
968
|
-
get versionLocalId(): any;
|
|
969
|
-
get status(): "error" | "idle" | "loading" | "waitingForDb" | "hydratingFromDb" | "initializing" | "resolvingRelatedValue" | {
|
|
970
|
-
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "savingItemStorage";
|
|
971
|
-
};
|
|
972
|
-
/** Validation errors from last failed save (enum, pattern, minLength, maxLength). Cleared when the next save starts. */
|
|
973
|
-
get saveValidationErrors(): any;
|
|
974
|
-
get alias(): any;
|
|
975
|
-
/**
|
|
976
|
-
* The unresolved conflict between this property's last local edit and a value sync wrote while
|
|
977
|
-
* the edit was pending (ADR 0019): the local edit was kept, and `remoteValue` is what sync wrote.
|
|
978
|
-
* Null when there is none. Cleared by the next edit or `resolveConflict`.
|
|
979
|
-
*/
|
|
980
|
-
get conflict(): any;
|
|
981
|
-
/**
|
|
982
|
-
* Settles `conflict`. `'local'` keeps the local edit. `'remote'` drops the local draft, so the
|
|
983
|
-
* synced value shows again (and publish has nothing to send for this property).
|
|
984
|
-
*/
|
|
985
|
-
resolveConflict(choice: any): Promise<void>;
|
|
986
|
-
set value(value: any);
|
|
987
|
-
get value(): any;
|
|
988
|
-
/**
|
|
989
|
-
* Shows `value` at once and saves it; `await property.save()` to wait for the result. Unlike
|
|
990
|
-
* assigning `property.value`, it saves even when `value` is already in context.
|
|
991
|
-
*
|
|
992
|
-
* @param options.before - The values to restore if the save is refused or fails. Defaults to what
|
|
993
|
-
* showed before the first `showValue` since the last save, else the current context.
|
|
994
|
-
*/
|
|
995
|
-
setValue(value: any, options?: {}): void;
|
|
996
|
-
_unsavedBefore: {
|
|
997
|
-
propertyValue: any;
|
|
998
|
-
renderValue: any;
|
|
999
|
-
} | undefined;
|
|
1000
|
-
_pendingSchemaSave: Promise<boolean> | undefined;
|
|
1001
|
-
/**
|
|
1002
|
-
* Shows `value` without saving it, for input that saves later (a debounced text field). The next
|
|
1003
|
-
* `setValue` or assignment saves, and if that save is refused or fails, the property goes back to
|
|
1004
|
-
* what showed before the first `showValue`.
|
|
1005
|
-
*/
|
|
1006
|
-
showValue(value: any): void;
|
|
1007
|
-
get published(): boolean;
|
|
1008
|
-
subscribe(callback: any): import("xstate").Subscription;
|
|
1009
|
-
save(): Promise<void>;
|
|
1010
|
-
/**
|
|
1011
|
-
* Every cache key holding this instance: its item's local id and seed uid, and the name it had
|
|
1012
|
-
* before a rename (List of relation). They share one entry.
|
|
1013
|
-
*/
|
|
1014
|
-
_cacheKeys(): any[];
|
|
1015
|
-
unload(): void;
|
|
1016
|
-
/**
|
|
1017
|
-
* Destroy the item property: remove from caches, delete its metadata rows (every version of
|
|
1018
|
-
* this item's value) from the DB, remove it from the parent Item, and stop the service.
|
|
1019
|
-
* Throws OwnershipError if none of the client's addresses own the item.
|
|
1020
|
-
*/
|
|
1021
|
-
destroy(): Promise<void>;
|
|
1022
|
-
_destroyRows(context: any): Promise<void>;
|
|
1023
|
-
}
|
|
1024
|
-
declare namespace ItemProperty {
|
|
1025
|
-
let instanceCache_1: Map<any, any>;
|
|
1026
|
-
export { instanceCache_1 as instanceCache };
|
|
1027
|
-
}
|
|
1028
|
-
/** Registers the applier for one op kind; returns a function that removes it. */
|
|
1029
|
-
declare function registerOutboxApplier(kind: any, applier: any): () => void;
|
|
1030
|
-
/**
|
|
1031
|
-
* Starts draining in this tab once it is the leader, resuming ops left pending (a reload, a closed
|
|
1032
|
-
* leader tab), and listens for other tabs' nudges and settled ops. Safe to call more than once.
|
|
1033
|
-
*/
|
|
1034
|
-
declare function startOutbox(): void;
|
|
1035
|
-
/** Thrown by ItemProperty.save() when the value failed validation (enum, pattern, minLength, maxLength). */
|
|
1036
|
-
declare class ItemPropertySaveValidationError extends Error {
|
|
1037
|
-
constructor(message: any, validationErrors: any);
|
|
1038
|
-
validationErrors: any;
|
|
1039
|
-
}
|
|
1040
|
-
/**
|
|
1041
|
-
* Thrown by write operations (save, destroy, publish, unpublish) on an item none
|
|
1042
|
-
* of the client's addresses own. See isItemOwned for what counts as owned.
|
|
1043
|
-
*/
|
|
1044
|
-
declare class OwnershipError extends Error {
|
|
1045
|
-
constructor(message?: string);
|
|
1046
|
-
}
|
|
1047
|
-
/**
|
|
1048
|
-
* Throws OwnershipError if the item is not owned. Use before write operations
|
|
1049
|
-
* (publish, save, destroy).
|
|
1050
|
-
*/
|
|
1051
|
-
declare function assertItemOwned(item: any): Promise<void>;
|
|
1052
|
-
/**
|
|
1053
|
-
* Resolves once every op pending when it was called has settled (applied, superseded or failed),
|
|
1054
|
-
* so a reader of `metadata` sees every edit made before. Publish waits on this before it reads.
|
|
1055
|
-
*/
|
|
1056
|
-
declare function waitForPendingOutboxOps(): Promise<void>;
|
|
1057
|
-
/**
|
|
1058
|
-
* Checks if the current user owns the item: its publisher is in the persisted owned addresses,
|
|
1059
|
-
* or it's a local unsealed draft (no publisher, no real uid, no attestationRaw). Such a draft
|
|
1060
|
-
* was made with no wallet connected and is editable until `claimUnpublishedDrafts`, which
|
|
1061
|
-
* connecting a wallet calls, gives it that wallet as publisher.
|
|
1062
|
-
*
|
|
1063
|
-
* Does not include `getAdditionalSyncAddresses` (those are extra EAS indexers,
|
|
1064
|
-
* not wallets the user controls).
|
|
1065
|
-
*/
|
|
1066
|
-
declare function isItemOwned(item: any): Promise<boolean>;
|
|
1067
|
-
/** Runs `write` once per chunk of `values`, one after another (deletes / updates with an `IN` list). */
|
|
1068
|
-
declare function writeInBatches(values: any, write: any, size?: number): Promise<void>;
|
|
1069
|
-
/**
|
|
1070
|
-
* Runs `query` once per chunk of `values` (see {@link chunkValues}), one after another, and
|
|
1071
|
-
* concatenates the rows. Use it for `inArray(column, values)` reads whose list can be large.
|
|
1072
|
-
*/
|
|
1073
|
-
declare function selectInBatches(values: any, query: any, size?: number): Promise<any[]>;
|
|
1074
|
-
import { BehaviorSubject } from 'rxjs';
|
|
1075
|
-
export { getMetadataLatest as $, getItemData as A, waitForEntityIdle as B, compareMetadataRowsLatestFirst as C, getEasSchemaUidForModel as D, getLatestPublishedVersionRow as E, parseListPropertyValueFromStorage as F, chunkValues as G, rowsPerInsert as H, Item as I, getGetAdditionalSyncAddresses as J, isVersionRevoked as K, isActorStopped as L, METADATA_LATEST_FIRST_ORDER_SQL as M, DEFAULT_READY_TIMEOUT_MS as N, OUTBOX_DEFER_MS as O, createReactiveProxy as P, sameEntity as Q, findEntity as R, forceRemoveFromCaches as S, runDestroyLifecycle as T, latestVersionOrder as U, isPublishedMetadataRow as V, ClientManagerState as W, MachineIds as X, PUBLISH_NOT_CONFIGURED_MESSAGE as Y, createNewItem as Z, getGetPublisherForNewSeeds as _, appendOutboxOpAndWait as a, getPublishExecutor as a0, getRevokeExecutor as a1, getUploadExecutor as a2, getVersionData$1 as a3, isLocalUnsealedDraft as a4, isSeedRowOwned as a5, localUnsealedDraftSql as a6, ownedPublisherSql as a7, ownedSeedsSql as a8, pickLatestMetadataRowPerProperty as a9, placeholderUidSql as aa, propertyMachine as ab, publisherInAddressListSql as ac, publisherIsInOwnedSet as ad, setAdditionalSyncAddresses as ae, setGetPublisherForNewSeeds as af, setPublishExecutor as ag, setRevokeExecutor as ah, setUploadExecutor as ai, ActorKeyedState as aj, clearDestroySubscriptions as ak, unloadEntity as al, ClientManagerEvents as am, getSeedPublisher as an, propertyNameVariants as ao, createSeed as ap, createMetadata as aq, updateItemPropertyValue as ar, resolvePublisherFromSeedRow as as, getPropertyData$1 as at, Item$1 as au, waitForOutboxOp as b, appendOutboxOp as c, OUTBOX_MAX_ATTEMPTS as d, OUTBOX_PRUNE_AFTER_MS as e, OUTBOX_PRUNE_FAILED_AFTER_MS as f, getOutboxOps as g, OUTBOX_RETRY_DELAYS_MS as h, OutboxOpDeferredError as i, OutboxOpFailedError as j, OutboxOpRejectedError as k, drainOutbox as l, getPendingSetValue as m, outboxOpValue as n, outboxOpResult as o, pruneOutbox as p, ItemProperty as q, registerOutboxApplier as r, startOutbox as s, ItemPropertySaveValidationError as t, OwnershipError as u, assertItemOwned as v, waitForPendingOutboxOps as w, isItemOwned as x, writeInBatches as y, selectInBatches as z };
|
|
1076
|
-
//# sourceMappingURL=Item-0oDoTPhi.d.ts.map
|