@ddd-qc/profiles-dvm 0.33.0 → 0.33.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.proxy.d.ts","sourceRoot":"","sources":["../../src/bindings/profiles.proxy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAqB,OAAO,EAAgB,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EA8BP,MAAM,IAAI,QAAQ,EASjB,MAAM,mBAAmB,CAAC;AAK3B,KAAK,UAAU,GAAG,UAAU,CAAC;AAkC7B,OAAO,EAAC,gBAAgB,IAAI,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAMtD,qBAAa,aAAc,SAAQ,SAAS;IAC1C,gBAAyB,iBAAiB,cAAc;IACxD,gBAAyB,QAAQ,WAAyB;IAC1D,gBAAyB,WAAW,6BAAmC;IACvE,gBAAyB,UAAU,cAAmC;IAEhE,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIlD,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;IAIlD,YAAY,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAI3D,YAAY,IAAI,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAIxC,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAI5D,oBAAoB,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;CAG/D"}
1
+ {"version":3,"file":"profiles.proxy.d.ts","sourceRoot":"","sources":["../../src/bindings/profiles.proxy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAq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SAAS;aACjB,sBAAiB,GAAG,UAAU,CAAC;aAC/B,aAAQ,GAAG,qBAAqB,CAAC;aACjC,gBAAW,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;aAC9C,eAAU,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAEtE,KAAK,CAAC,aAAa,CAAC,OAAgB;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAAgB;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,cAAsB;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,KAAiB;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,KAAW;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;IACrD,CAAC","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {EntryTypes, Signal, Profile, ZomeFnInput, } from './profiles.types';\n// @ts-ignore\nimport {\n/** api/common.ts */\n// @ts-ignore\nWebsocketConnectionOptions, WsClientOptions, HolochainError, CloneIdHelper,\n/** types.ts */\n// @ts-ignore\nKitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, HoloHashed, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedAction, SignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nChainOpType, DhtOp, WarrantOp, ChainOp, Warrant, ChainIntegrityWarrant, ValidationType, ActionHashAndSig,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\n// YamlProperties\nZomes, WasmCode, CapGrantInfo, PeerMetaInfo, DisabledAppReason, AppStatus, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, MemproofMap, RoleSettingsMap, RoleSettings, DnaModifiersOpt, DnaModifiers, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, AppStatusFilter, AppInterfaceInfo, AgentInfoSigned, ZomeLocation, DnaManifest,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile, DnaDef,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\n/** User defined external dependencies */\n// @ts-ignore\nimport {ProfilesLinkType as LinkTypes} from \"./profiles.integrity\"\n\nimport {ZomeProxy} from '@ddd-qc/lit-happ';\nimport {profilesFunctionNames} from './profiles.fn';\nimport {ProfilesUnitEnum} from './profiles.integrity';\nimport {ProfilesLinkType} from './profiles.integrity';\n\n/**\n *\n */\nexport class ProfilesProxy extends ZomeProxy {\n static override readonly DEFAULT_ZOME_NAME = \"profiles\";\n static override readonly FN_NAMES = profilesFunctionNames;\n static override readonly ENTRY_TYPES = Object.values(ProfilesUnitEnum);\n static override readonly LINK_TYPES = Object.values(ProfilesLinkType);\n \n async createProfile(profile: Profile): Promise<HcRecord> {\n return this.call('create_profile', profile);\n }\n\n async updateProfile(profile: Profile): Promise<HcRecord> {\n return this.call('update_profile', profile);\n }\n\n async searchAgents(nicknameFilter: string): Promise<AgentArray[]> {\n return this.call('search_agents', nicknameFilter);\n }\n\n async getMyProfile(): Promise<HcRecord | null> {\n return this.call('get_my_profile', null);\n }\n\n async getAgentProfile(input: AgentArray): Promise<HcRecord | null> {\n return this.call('get_agent_profile', input);\n }\n\n async getAgentsWithProfile(input: void): Promise<AgentArray[]> {\n return this.call('get_agents_with_profile', input);\n }\n}\n"]}
1
+ {"version":3,"file":"profiles.proxy.js","sourceRoot":"","sources":["../../src/bindings/profiles.proxy.ts"],"names":[],"mappings":"AAwFA,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,qBAAqB,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAKtD,MAAM,OAAO,aAAc,SAAQ,SAAS;aACjB,sBAAiB,GAAG,UAAU,CAAC;aAC/B,aAAQ,GAAG,qBAAqB,CAAC;aACjC,gBAAW,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;aAC9C,eAAU,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAEtE,KAAK,CAAC,aAAa,CAAC,OAAgB;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAAgB;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,cAAsB;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,KAAiB;QACrC,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,KAAW;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;IACrD,CAAC","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {EntryTypes, Signal, Profile, ZomeFnInput, } from './profiles.types';\n// @ts-ignore\nimport {\n/** api/common.ts */\n// @ts-ignore\nWebsocketConnectionOptions, WsClientOptions, HolochainError, CloneIdHelper,\n/** types.ts */\n// @ts-ignore\nKitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, HoloHashed, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedAction, SignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nChainOpType, DhtOp, WarrantOp, ChainOp, Warrant, ChainIntegrityWarrant, ValidationType, ActionHashAndSig,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\n// YamlProperties\nZomes, WasmCode, CapGrantInfo, PeerMetaInfo, DisabledAppReason, AppStatus, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, MemproofMap, RoleSettingsMap, RoleSettings, DnaModifiersOpt, DnaModifiers, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, AppStatusFilter, AppInterfaceInfo, AgentInfoSigned, ZomeLocation, DnaManifest,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile,\n/** entry */\n// @ts-ignore\nEntryDefLocation, EntryDefLocationType, AppEntryDefLocation, GetOptions, GetStrategy,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\n/** User defined external dependencies */\n// @ts-ignore\nimport {ProfilesLinkType as LinkTypes} from \"./profiles.integrity\"\n\nimport {ZomeProxy} from '@ddd-qc/lit-happ';\nimport {profilesFunctionNames} from './profiles.fn';\nimport {ProfilesUnitEnum} from './profiles.integrity';\nimport {ProfilesLinkType} from './profiles.integrity';\n\n/**\n *\n */\nexport class ProfilesProxy extends ZomeProxy {\n static override readonly DEFAULT_ZOME_NAME = \"profiles\";\n static override readonly FN_NAMES = profilesFunctionNames;\n static override readonly ENTRY_TYPES = Object.values(ProfilesUnitEnum);\n static override readonly LINK_TYPES = Object.values(ProfilesLinkType);\n \n async createProfile(profile: Profile): Promise<HcRecord> {\n return this.call('create_profile', profile);\n }\n\n async updateProfile(profile: Profile): Promise<HcRecord> {\n return this.call('update_profile', profile);\n }\n\n async searchAgents(nicknameFilter: string): Promise<AgentArray[]> {\n return this.call('search_agents', nicknameFilter);\n }\n\n async getMyProfile(): Promise<HcRecord | null> {\n return this.call('get_my_profile', null);\n }\n\n async getAgentProfile(input: AgentArray): Promise<HcRecord | null> {\n return this.call('get_agent_profile', input);\n }\n\n async getAgentsWithProfile(input: void): Promise<AgentArray[]> {\n return this.call('get_agents_with_profile', input);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.types.d.ts","sourceRoot":"","sources":["../../src/bindings/profiles.types.ts"],"names":[],"mappings":"AAGA,OAAO,EASO,kBAAkB,EA8B/B,MAAM,mBAAmB,CAAC;AAuC3B,OAAO,EAAC,gBAAgB,IAAI,SAAS,EAAC,MAAM,sBAAsB,CAAA;AAElE,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,KAAK,EAAE,CAAC,CAAA;IACR,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,aAAa,CAAA;IACnB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AACD,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,aAAa,CAAA;IACnB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AACD,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,cAAc,CAAA;IACpB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,EAAE,UAAU,CAAA;CACtB,CAAA;AACD,MAA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BAAkB,CAAA;IAC1B,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,SAAS,EAAE,SAAS,CAAA;CACrB,CAAA;AACD,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,cAAc,CAAA;IACpB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,EAAE,UAAU,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,cAAc,CAAA;IACpB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,EAAE,UAAU,CAAA;IACrB,kBAAkB,EAAE,UAAU,CAAA;CAC/B,CAAA;AACD,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,cAAc,CAAA;IACpB,MAAM,EAAE,kBAAkB,CAAA;IAC1B,kBAAkB,EAAE,UAAU,CAAA;CAC/B,CAAA;AACD,MAAM,MAAM,MAAM,GACd,wBAAwB,GACxB,wBAAwB,GACxB,yBAAyB,GACzB,yBAAyB,GACzB,yBAAyB,CAAC;AAQ9B,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B;AAED,oBAAY,cAAc;IACzB,OAAO,YAAY;CACnB;AACD,MAAM,MAAM,UAAU,GACnB;IAAC,IAAI,EAAE;QAAC,OAAO,EAAE,IAAI,CAAA;KAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.types.js","sourceRoot":"","sources":["../../src/bindings/profiles.types.ts"],"names":[],"mappings":"AAqIA,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACzB,qCAAmB,CAAA;AACpB,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {\n/** api/common.ts */\n// @ts-ignore\nWebsocketConnectionOptions, WsClientOptions, HolochainError, CloneIdHelper,\n/** types.ts */\n// @ts-ignore\nKitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, HoloHashed, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedAction, SignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nChainOpType, DhtOp, WarrantOp, ChainOp, Warrant, ChainIntegrityWarrant, ValidationType, ActionHashAndSig,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\n// YamlProperties\nZomes, WasmCode, CapGrantInfo, PeerMetaInfo, DisabledAppReason, AppStatus, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, MemproofMap, RoleSettingsMap, RoleSettings, DnaModifiersOpt, DnaModifiers, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, AppStatusFilter, AppInterfaceInfo, AgentInfoSigned, ZomeLocation, DnaManifest,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile, DnaDef,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\n/** User defined external dependencies */\n// @ts-ignore\nimport {ProfilesLinkType as LinkTypes} from \"./profiles.integrity\"\n\nexport interface ZomeFnInput<T> {\n input: T\n local?: boolean\n}\n\nexport type SignalVariantLinkCreated = {\n type: \"LinkCreated\"\n action: SignedActionHashed\n link_type: LinkTypes\n}\nexport type SignalVariantLinkDeleted = {\n type: \"LinkDeleted\"\n action: SignedActionHashed\n create_link_action: SignedActionHashed\n link_type: LinkTypes\n}\nexport type SignalVariantEntryCreated = {\n type: \"EntryCreated\"\n action: SignedActionHashed\n app_entry: EntryTypes\n}\nexport type SignalVariantEntryUpdated = {\n type: \"EntryUpdated\"\n action: SignedActionHashed\n app_entry: EntryTypes\n original_app_entry: EntryTypes\n}\nexport type SignalVariantEntryDeleted = {\n type: \"EntryDeleted\"\n action: SignedActionHashed\n original_app_entry: EntryTypes\n}\nexport type Signal =\n | SignalVariantLinkCreated\n | SignalVariantLinkDeleted\n | SignalVariantEntryCreated\n | SignalVariantEntryUpdated\n | SignalVariantEntryDeleted;\n\n/**\n * Profile entry definition.\n * \n * The profile must include at a minimum the nickname of the agent\n * in order to be able to search for agents by nickname.\n */\nexport interface Profile {\n nickname: string\n fields: Record<string, string>\n}\n\nexport enum EntryTypesType {\n\tProfile = 'Profile',\n}\nexport type EntryTypes = \n | {type: {Profile: null}, content: Profile}\n\n"]}
1
+ {"version":3,"file":"profiles.types.js","sourceRoot":"","sources":["../../src/bindings/profiles.types.ts"],"names":[],"mappings":"AAwIA,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACzB,qCAAmB,CAAA;AACpB,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {\n/** api/common.ts */\n// @ts-ignore\nWebsocketConnectionOptions, WsClientOptions, HolochainError, CloneIdHelper,\n/** types.ts */\n// @ts-ignore\nKitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, HoloHashed, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedAction, SignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nChainOpType, DhtOp, WarrantOp, ChainOp, Warrant, ChainIntegrityWarrant, ValidationType, ActionHashAndSig,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\n// YamlProperties\nZomes, WasmCode, CapGrantInfo, PeerMetaInfo, DisabledAppReason, AppStatus, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, MemproofMap, RoleSettingsMap, RoleSettings, DnaModifiersOpt, DnaModifiers, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, AppStatusFilter, AppInterfaceInfo, AgentInfoSigned, ZomeLocation, DnaManifest,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile,\n/** entry */\n// @ts-ignore\nEntryDefLocation, EntryDefLocationType, AppEntryDefLocation, GetOptions, GetStrategy,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\n/** User defined external dependencies */\n// @ts-ignore\nimport {ProfilesLinkType as LinkTypes} from \"./profiles.integrity\"\n\nexport interface ZomeFnInput<T> {\n input: T\n local?: boolean\n}\n\nexport type SignalVariantLinkCreated = {\n type: \"LinkCreated\"\n action: SignedActionHashed\n link_type: LinkTypes\n}\nexport type SignalVariantLinkDeleted = {\n type: \"LinkDeleted\"\n action: SignedActionHashed\n create_link_action: SignedActionHashed\n link_type: LinkTypes\n}\nexport type SignalVariantEntryCreated = {\n type: \"EntryCreated\"\n action: SignedActionHashed\n app_entry: EntryTypes\n}\nexport type SignalVariantEntryUpdated = {\n type: \"EntryUpdated\"\n action: SignedActionHashed\n app_entry: EntryTypes\n original_app_entry: EntryTypes\n}\nexport type SignalVariantEntryDeleted = {\n type: \"EntryDeleted\"\n action: SignedActionHashed\n original_app_entry: EntryTypes\n}\nexport type Signal =\n | SignalVariantLinkCreated\n | SignalVariantLinkDeleted\n | SignalVariantEntryCreated\n | SignalVariantEntryUpdated\n | SignalVariantEntryDeleted;\n\n/**\n * Profile entry definition.\n * \n * The profile must include at a minimum the nickname of the agent\n * in order to be able to search for agents by nickname.\n */\nexport interface Profile {\n nickname: string\n fields: Record<string, string>\n}\n\nexport enum EntryTypesType {\n\tProfile = 'Profile',\n}\nexport type EntryTypes = \n | {type: {Profile: null}, content: Profile}\n\n"]}
@@ -1,6 +1,7 @@
1
1
  import { Profile } from './profilesAlt.types';
2
2
  type AgentArray = Uint8Array;
3
3
  type ActionArray = Uint8Array;
4
+ import { GetStrategy } from '@holochain-open-dev/core-types';
4
5
  import { ZomeProxy } from '@ddd-qc/lit-happ';
5
6
  import { ProfilesAltUnitEnum } from './profilesAlt.integrity';
6
7
  import { ProfilesAltLinkType } from './profilesAlt.integrity';
@@ -13,7 +14,7 @@ export declare class ProfilesAltProxy extends ZomeProxy {
13
14
  updateProfile(pair: [Profile, AgentArray]): Promise<ActionArray>;
14
15
  searchAgents(nicknameFilter: string): Promise<AgentArray[]>;
15
16
  findProfile(agentPubKey: AgentArray): Promise<[ActionArray, Profile] | null>;
16
- probeProfiles(): Promise<void>;
17
+ probeProfiles(strategy: GetStrategy): Promise<void>;
17
18
  }
18
19
  export {};
19
20
  //# sourceMappingURL=profilesAlt.proxy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"profilesAlt.proxy.d.ts","sourceRoot":"","sources":["../../src/bindings/profilesAlt.proxy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,OAAO,EAAG,MAAM,qBAAqB,CAAC;AA8C1D,KAAK,UAAU,GAAG,UAAU,CAAC;AAQ7B,KAAK,WAAW,GAAG,UAAU,CAAC;AAwB9B,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAK5D,qBAAa,gBAAiB,SAAQ,SAAS;IAC7C,gBAAyB,iBAAiB,cAAc;IACxD,gBAAyB,QAAQ,WAA4B;IAC7D,gBAAyB,WAAW,gCAAsC;IAC1E,gBAAyB,UAAU,wBAAsC;IAEnE,aAAa,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAIhE,aAAa,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAIhE,YAAY,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAI3D,WAAW,CAAC,WAAW,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAI5E,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
1
+ {"version":3,"file":"profilesAlt.proxy.d.ts","sourceRoot":"","sources":["../../src/bindings/profilesAlt.proxy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,OAAO,EAAG,MAAM,qBAAqB,CAAC;AA8C1D,KAAK,UAAU,GAAG,UAAU,CAAC;AAQ7B,KAAK,WAAW,GAAG,UAAU,CAAC;AAS9B,OAAO,EASkE,WAAW,EAOnF,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAK5D,qBAAa,gBAAiB,SAAQ,SAAS;IAC7C,gBAAyB,iBAAiB,cAAc;IACxD,gBAAyB,QAAQ,WAA4B;IAC7D,gBAAyB,WAAW,gCAAsC;IAC1E,gBAAyB,UAAU,wBAAsC;IAEnE,aAAa,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAIhE,aAAa,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAIhE,YAAY,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAI3D,WAAW,CAAC,WAAW,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAI5E,aAAa,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAG1D"}
@@ -19,8 +19,8 @@ export class ProfilesAltProxy extends ZomeProxy {
19
19
  async findProfile(agentPubKey) {
20
20
  return this.call('find_profile', agentPubKey);
21
21
  }
22
- async probeProfiles() {
23
- return this.callBlocking('probe_profiles', null);
22
+ async probeProfiles(strategy) {
23
+ return this.callBlocking('probe_profiles', strategy);
24
24
  }
25
25
  }
26
26
  //# sourceMappingURL=profilesAlt.proxy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"profilesAlt.proxy.js","sourceRoot":"","sources":["../../src/bindings/profilesAlt.proxy.ts"],"names":[],"mappings":"AAiFA,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,wBAAwB,EAAC,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAK5D,MAAM,OAAO,gBAAiB,SAAQ,SAAS;aACpB,sBAAiB,GAAG,UAAU,CAAC;aAC/B,aAAQ,GAAG,wBAAwB,CAAC;aACpC,gBAAW,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;aACjD,eAAU,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAEzE,KAAK,CAAC,aAAa,CAAC,IAA2B;QAC7C,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAA2B;QAC7C,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,cAAsB;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,WAAuB;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {EntryTypes, Profile, } from './profilesAlt.types';\n// @ts-ignore\nimport {\n/** api/common.ts */\n// @ts-ignore\nWebsocketConnectionOptions, WsClientOptions, HolochainError, CloneIdHelper,\n/** types.ts */\n// @ts-ignore\nKitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, HoloHashed, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedAction, SignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nChainOpType, DhtOp, WarrantOp, ChainOp, Warrant, ChainIntegrityWarrant, ValidationType, ActionHashAndSig,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\n// YamlProperties\nZomes, WasmCode, CapGrantInfo, PeerMetaInfo, DisabledAppReason, AppStatus, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, MemproofMap, RoleSettingsMap, RoleSettings, DnaModifiersOpt, DnaModifiers, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, AppStatusFilter, AppInterfaceInfo, AgentInfoSigned, ZomeLocation, DnaManifest,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile, DnaDef,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\nimport {ZomeProxy} from '@ddd-qc/lit-happ';\nimport {profilesAltFunctionNames} from './profilesAlt.fn';\nimport {ProfilesAltUnitEnum} from './profilesAlt.integrity';\nimport {ProfilesAltLinkType} from './profilesAlt.integrity';\n\n/**\n *\n */\nexport class ProfilesAltProxy extends ZomeProxy {\n static override readonly DEFAULT_ZOME_NAME = \"profiles\";\n static override readonly FN_NAMES = profilesAltFunctionNames;\n static override readonly ENTRY_TYPES = Object.values(ProfilesAltUnitEnum);\n static override readonly LINK_TYPES = Object.values(ProfilesAltLinkType);\n \n async createProfile(pair: [Profile, AgentArray]): Promise<ActionArray> {\n return this.callBlocking('create_profile', pair);\n }\n\n async updateProfile(pair: [Profile, AgentArray]): Promise<ActionArray> {\n return this.callBlocking('update_profile', pair);\n }\n\n async searchAgents(nicknameFilter: string): Promise<AgentArray[]> {\n return this.call('search_agents', nicknameFilter);\n }\n\n async findProfile(agentPubKey: AgentArray): Promise<[ActionArray, Profile] | null> {\n return this.call('find_profile', agentPubKey);\n }\n\n async probeProfiles(): Promise<void> {\n return this.callBlocking('probe_profiles', null);\n }\n}\n"]}
1
+ {"version":3,"file":"profilesAlt.proxy.js","sourceRoot":"","sources":["../../src/bindings/profilesAlt.proxy.ts"],"names":[],"mappings":"AAoFA,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,wBAAwB,EAAC,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAC,mBAAmB,EAAC,MAAM,yBAAyB,CAAC;AAK5D,MAAM,OAAO,gBAAiB,SAAQ,SAAS;aACpB,sBAAiB,GAAG,UAAU,CAAC;aAC/B,aAAQ,GAAG,wBAAwB,CAAC;aACpC,gBAAW,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;aACjD,eAAU,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;IAEzE,KAAK,CAAC,aAAa,CAAC,IAA2B;QAC7C,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAA2B;QAC7C,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,cAAsB;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,WAAuB;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,QAAqB;QACvC,OAAO,IAAI,CAAC,YAAY,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IACvD,CAAC","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {EntryTypes, Profile, } from './profilesAlt.types';\n// @ts-ignore\nimport {\n/** api/common.ts */\n// @ts-ignore\nWebsocketConnectionOptions, WsClientOptions, HolochainError, CloneIdHelper,\n/** types.ts */\n// @ts-ignore\nKitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, HoloHashed, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedAction, SignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nChainOpType, DhtOp, WarrantOp, ChainOp, Warrant, ChainIntegrityWarrant, ValidationType, ActionHashAndSig,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\n// YamlProperties\nZomes, WasmCode, CapGrantInfo, PeerMetaInfo, DisabledAppReason, AppStatus, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, MemproofMap, RoleSettingsMap, RoleSettings, DnaModifiersOpt, DnaModifiers, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, AppStatusFilter, AppInterfaceInfo, AgentInfoSigned, ZomeLocation, DnaManifest,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile,\n/** entry */\n// @ts-ignore\nEntryDefLocation, EntryDefLocationType, AppEntryDefLocation, GetOptions, GetStrategy,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\nimport {ZomeProxy} from '@ddd-qc/lit-happ';\nimport {profilesAltFunctionNames} from './profilesAlt.fn';\nimport {ProfilesAltUnitEnum} from './profilesAlt.integrity';\nimport {ProfilesAltLinkType} from './profilesAlt.integrity';\n\n/**\n *\n */\nexport class ProfilesAltProxy extends ZomeProxy {\n static override readonly DEFAULT_ZOME_NAME = \"profiles\";\n static override readonly FN_NAMES = profilesAltFunctionNames;\n static override readonly ENTRY_TYPES = Object.values(ProfilesAltUnitEnum);\n static override readonly LINK_TYPES = Object.values(ProfilesAltLinkType);\n \n async createProfile(pair: [Profile, AgentArray]): Promise<ActionArray> {\n return this.callBlocking('create_profile', pair);\n }\n\n async updateProfile(pair: [Profile, AgentArray]): Promise<ActionArray> {\n return this.callBlocking('update_profile', pair);\n }\n\n async searchAgents(nicknameFilter: string): Promise<AgentArray[]> {\n return this.call('search_agents', nicknameFilter);\n }\n\n async findProfile(agentPubKey: AgentArray): Promise<[ActionArray, Profile] | null> {\n return this.call('find_profile', agentPubKey);\n }\n\n async probeProfiles(strategy: GetStrategy): Promise<void> {\n return this.callBlocking('probe_profiles', strategy);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"profilesAlt.types.d.ts","sourceRoot":"","sources":["../../src/bindings/profilesAlt.types.ts"],"names":[],"mappings":"AAqFA,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B;AAED,oBAAY,cAAc;IACzB,OAAO,YAAY;CACnB;AACD,MAAM,MAAM,UAAU,GACnB;IAAC,IAAI,EAAE;QAAC,OAAO,EAAE,IAAI,CAAA;KAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAAA"}
1
+ {"version":3,"file":"profilesAlt.types.d.ts","sourceRoot":"","sources":["../../src/bindings/profilesAlt.types.ts"],"names":[],"mappings":"AAwFA,MAAM,WAAW,OAAO;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B;AAED,oBAAY,cAAc;IACzB,OAAO,YAAY;CACnB;AACD,MAAM,MAAM,UAAU,GACnB;IAAC,IAAI,EAAE;QAAC,OAAO,EAAE,IAAI,CAAA;KAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"profilesAlt.types.js","sourceRoot":"","sources":["../../src/bindings/profilesAlt.types.ts"],"names":[],"mappings":"AA0FA,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACzB,qCAAmB,CAAA;AACpB,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {\n/** api/common.ts */\n// @ts-ignore\nWebsocketConnectionOptions, WsClientOptions, HolochainError, CloneIdHelper,\n/** types.ts */\n// @ts-ignore\nKitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, HoloHashed, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedAction, SignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nChainOpType, DhtOp, WarrantOp, ChainOp, Warrant, ChainIntegrityWarrant, ValidationType, ActionHashAndSig,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\n// YamlProperties\nZomes, WasmCode, CapGrantInfo, PeerMetaInfo, DisabledAppReason, AppStatus, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, MemproofMap, RoleSettingsMap, RoleSettings, DnaModifiersOpt, DnaModifiers, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, AppStatusFilter, AppInterfaceInfo, AgentInfoSigned, ZomeLocation, DnaManifest,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile, DnaDef,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\n/**\n * Profile entry definition.\n * \n * The profile must include at a minimum the nickname of the agent\n * in order to be able to search for agents by nickname.\n */\nexport interface Profile {\n nickname: string\n fields: Record<string, string>\n}\n\nexport enum EntryTypesType {\n\tProfile = 'Profile',\n}\nexport type EntryTypes = \n | {type: {Profile: null}, content: Profile}\n\n"]}
1
+ {"version":3,"file":"profilesAlt.types.js","sourceRoot":"","sources":["../../src/bindings/profilesAlt.types.ts"],"names":[],"mappings":"AA6FA,MAAM,CAAN,IAAY,cAEX;AAFD,WAAY,cAAc;IACzB,qCAAmB,CAAA;AACpB,CAAC,EAFW,cAAc,KAAd,cAAc,QAEzB","sourcesContent":["/* This file is generated by zits. Do not edit manually */\n\n// @ts-ignore\nimport {\n/** api/common.ts */\n// @ts-ignore\nWebsocketConnectionOptions, WsClientOptions, HolochainError, CloneIdHelper,\n/** types.ts */\n// @ts-ignore\nKitsuneAgent, KitsuneSpace, HoloHashB64, AgentPubKeyB64, DnaHashB64, WasmHashB64, EntryHashB64, ActionHashB64, AnyDhtHashB64, InstalledAppId, Signature, CellId, DnaProperties, RoleName, InstalledCell, Timestamp, HoloHashed, FetchPoolInfo,\n/** hdk/action.ts */\n// @ts-ignore\nSignedAction, SignedActionHashed, RegisterAgentActivity, ActionHashed, ActionType, Action, NewEntryAction, Dna, AgentValidationPkg, InitZomesComplete, CreateLink, DeleteLink, OpenChain, CloseChain, Update, Delete, Create,\n/** hdk/capabilities.ts */\n// @ts-ignore\nCapSecret, CapClaim, GrantedFunctionsType, GrantedFunctions, ZomeCallCapGrant, CapAccess, CapGrant,\n///** hdk/countersigning.ts */\n//CounterSigningSessionData,\n//PreflightRequest,\n//CounterSigningSessionTimes,\n//ActionBase,\n//CounterSigningAgents,\n//PreflightBytes,\n//Role,\n//CountersigningAgentState,\n/** hdk/dht-ops.ts */\n// @ts-ignore\nChainOpType, DhtOp, WarrantOp, ChainOp, Warrant, ChainIntegrityWarrant, ValidationType, ActionHashAndSig,\n/** hdk/entry.ts */\n// @ts-ignore\nEntryVisibility, AppEntryDef, EntryType, EntryContent, Entry,\n/** hdk/record.ts */\n// @ts-ignore\nRecord as HcRecord, RecordEntry as HcRecordEntry,\n/** hdk/link.ts */\n//AnyLinkableHash,\n// @ts-ignore\nZomeIndex, LinkType, LinkTag, RateWeight, RateBucketId, RateUnits, Link,\n/** api/admin/types.ts */\n// @ts-ignore\n// YamlProperties\nZomes, WasmCode, CapGrantInfo, PeerMetaInfo, DisabledAppReason, AppStatus, StemCell, ProvisionedCell, ClonedCell, CellType, CellInfo, AppInfo, MembraneProof, MemproofMap, RoleSettingsMap, RoleSettings, DnaModifiersOpt, DnaModifiers, FunctionName, ZomeName, ZomeDefinition, IntegrityZome, CoordinatorZome, DnaDefinition, ResourceBytes, ResourceMap, CellProvisioningStrategy, CellProvisioning, DnaVersionSpec, DnaVersionFlexible, AppRoleDnaManifest, AppRoleManifest, AppManifest, AppBundle, AppBundleSource, NetworkSeed, AppStatusFilter, AppInterfaceInfo, AgentInfoSigned, ZomeLocation, DnaManifest,\n} from '@holochain/client';\n\n\n/// Simple Hashes\n// @ts-ignore\ntype AgentArray = Uint8Array;\n// @ts-ignore\ntype DnaArray = Uint8Array;\n// @ts-ignore\ntype WasmArray = Uint8Array;\n// @ts-ignore\ntype EntryArray = Uint8Array;\n// @ts-ignore\ntype ActionArray = Uint8Array;\n// @ts-ignore\ntype AnyDhtArray = Uint8Array;\n// @ts-ignore\ntype AnyLinkableArray = Uint8Array;\n// @ts-ignore\ntype ExternalArray = Uint8Array;\n\n// @ts-ignore\nimport {\n/** Common */\n// @ts-ignore\nDhtOpHashB64, DhtOpHash,\n/** DnaFile */\n// @ts-ignore\nDnaFile,\n/** entry */\n// @ts-ignore\nEntryDefLocation, EntryDefLocationType, AppEntryDefLocation, GetOptions, GetStrategy,\n/** entry-details */\n// @ts-ignore\nEntryDetails, RecordDetails, Details, DetailsType, EntryDhtStatus,\n/** Validation */\n// @ts-ignore\nValidationStatus, ValidationReceipt,\n} from '@holochain-open-dev/core-types';\n\n/**\n * Profile entry definition.\n * \n * The profile must include at a minimum the nickname of the agent\n * in order to be able to search for agents by nickname.\n */\nexport interface Profile {\n nickname: string\n fields: Record<string, string>\n}\n\nexport enum EntryTypesType {\n\tProfile = 'Profile',\n}\nexport type EntryTypes = \n | {type: {Profile: null}, content: Profile}\n\n"]}
@@ -5,7 +5,7 @@ export declare class EditProfile extends LitElement {
5
5
  profile: Profile | undefined;
6
6
  fireSaveProfile(formFields: Record<string, string>): Promise<void>;
7
7
  handleLangChange(_e: any): Promise<void>;
8
- render(): import("lit-html").TemplateResult<1>;
8
+ render(): import("lit").TemplateResult<1>;
9
9
  static styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
10
10
  }
11
11
  //# sourceMappingURL=edit-profile.d.ts.map
@@ -9,7 +9,7 @@ export type ProfilesPerspective = {
9
9
  export declare class ProfilesZvm extends ZomeViewModel {
10
10
  static readonly ZOME_PROXY: typeof ProfilesProxy;
11
11
  get zomeProxy(): ProfilesProxy;
12
- initializePerspectiveOnline(): Promise<void>;
12
+ initializePerspectiveFromNetwork(): Promise<void>;
13
13
  probeAllInner(): void;
14
14
  get perspective(): ProfilesPerspective;
15
15
  private _profiles;
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.zvm.d.ts","sourceRoot":"","sources":["../src/profiles.zvm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAC,cAAc,EAA2C,MAAM,mBAAmB,CAAC;AAC3F,OAAO,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAC;AAKxD,MAAM,MAAM,mBAAmB,GAAG;IAEhC,QAAQ,EAAE,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IAK1C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC1C,CAAA;AAMD,qBAAa,WAAY,SAAQ,aAAa;IAE5C,gBAAyB,UAAU,uBAAiB;IACpD,IAAI,SAAS,IAAI,aAAa,CAA2C;IAI1D,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC;IAKlD,aAAa;IAOtB,IAAI,WAAW,IAAI,mBAAmB,CAOrC;IAED,OAAO,CAAC,SAAS,CAAu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AAiB;IACpD,IAAI,SAAS,IAAI,aAAa,CAA2C;IAI1D,gCAAgC,IAAI,OAAO,CAAC,IAAI,CAAC;IAKvD,aAAa;IAQtB,IAAI,WAAW,IAAI,mBAAmB,CAOrC;IAED,OAAO,CAAC,SAAS,CAAuC;IAExD,OAAO,CAAC,SAAS,CAAsC;IAGvD,YAAY,IAAI,OAAO,GAAG,SAAS;IAEnC,UAAU,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,GAAG,SAAS;IAItD,SAAS,IAAI,cAAc,EAAE;IAE7B,QAAQ,IAAI,MAAM,EAAE;IAIpB,iBAAiB,IAAI,MAAM;IAO3B,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAUjD,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE;IAYzC,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IAsBlE,YAAY,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO;IAQlD,YAAY,CAAC,SAAS,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAiBrE,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAOhD,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAKvD"}
@@ -10,11 +10,12 @@ export class ProfilesZvm extends ZomeViewModel {
10
10
  }
11
11
  static { this.ZOME_PROXY = ProfilesProxy; }
12
12
  get zomeProxy() { return this._zomeProxy; }
13
- async initializePerspectiveOnline() {
13
+ async initializePerspectiveFromNetwork() {
14
14
  await this.probeAllProfiles();
15
15
  }
16
16
  probeAllInner() {
17
- this.probeAllProfiles();
17
+ this.probeAllProfiles()
18
+ .then((res) => console.trace("probeAllProfiles() finished: ", res.length));
18
19
  }
19
20
  get perspective() {
20
21
  const pers = {
@@ -1 +1 @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AI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC","sourcesContent":["import {ZomeViewModel} from \"@ddd-qc/lit-happ\";\nimport {Profile} from \"./bindings/profiles.types\";\nimport {AgentPubKeyB64, decodeHashFromBase64, encodeHashToBase64} from \"@holochain/client\";\nimport {ProfilesProxy} from \"./bindings/profiles.proxy\";\nimport {decode} from \"@msgpack/msgpack\";\n\n\n/** */\nexport type ProfilesPerspective = {\n /* AgentPubKeyB64 -> Profile */\n profiles: Record<AgentPubKeyB64, Profile>,\n ///* AgentPubKeyB64 -> Profile hash */\n //profile_ahs: Record<AgentPubKeyB64, ActionHashB64>,\n\n /** Nickname -> AgentPubKeyB64 */\n reversed: Record<string, AgentPubKeyB64>,\n}\n\n\n/**\n *\n */\nexport class ProfilesZvm extends ZomeViewModel {\n\n static override readonly ZOME_PROXY = ProfilesProxy;\n get zomeProxy(): ProfilesProxy {return this._zomeProxy as ProfilesProxy;}\n\n\n /** */\n override async initializePerspectiveOnline(): Promise<void> {\n await this.probeAllProfiles();\n }\n\n /** */\n override probeAllInner() {\n this.probeAllProfiles();\n }\n\n /** -- Perspective -- */\n\n /* */\n get perspective(): ProfilesPerspective {\n const pers: ProfilesPerspective = {\n profiles: this._profiles,\n reversed: this._reversed,\n //profile_ahs: this._profile_ahs,\n };\n return pers;\n }\n\n private _profiles: Record<AgentPubKeyB64, Profile> = {};\n //private _profile_ahs: Record<AgentPubKeyB64, ActionHashB64> = {};\n private _reversed: Record<string, AgentPubKeyB64> = {};\n\n\n getMyProfile(): Profile | undefined { return this._profiles[this.cell.address.agentId.b64] }\n\n getProfile(agent: AgentPubKeyB64): Profile | undefined {return this._profiles[agent]}\n\n //getProfileHash(agent: AgentPubKeyB64): ActionHashB64 | undefined {return this._profile_ahs[agent]}\n\n getAgents(): AgentPubKeyB64[] { return Object.keys(this._profiles)}\n\n getNames(): string[] { return Object.keys(this._reversed)}\n\n\n /** Dump perspective as JSON */\n exportPerspective(): string {\n //console.log(\"exportPerspective()\", perspMat);\n return JSON.stringify(this._profiles, null, 2);\n }\n\n\n /** */\n importPerspective(json: string, _mapping?: Object) {\n const profiles = JSON.parse(json) as Record<AgentPubKeyB64, Profile>;\n for (const [pubKey, profileMat] of Object.entries(profiles)) {\n this.storeProfile(pubKey, profileMat);\n }\n }\n\n /** -- Methods -- */\n\n /* */\n findProfiles(names: string[]): AgentPubKeyB64[] {\n let res: AgentPubKeyB64[] = []\n for (const name of names) {\n if (this._reversed[name]) {\n res.push(this._reversed[name]!)\n }\n }\n return res;\n }\n\n\n /** */\n async probeAllProfiles(): Promise<Record<AgentPubKeyB64, Profile>> {\n let allAgents;\n /** Attempt a retry on fail as this can create an entry (path anchor) and generate a 'head has moved' error */\n try {\n allAgents = await this.zomeProxy.getAgentsWithProfile();\n } catch(e) {\n allAgents = await this.zomeProxy.getAgentsWithProfile();\n }\n for (const agentPubKey of allAgents) {\n const maybeProfile = await this.zomeProxy.getAgentProfile(agentPubKey);\n if (!maybeProfile) {\n continue;\n }\n const profile: Profile = decode((maybeProfile.entry as any).Present.entry) as Profile;\n this.storeProfile(encodeHashToBase64(agentPubKey), profile);\n }\n this.notifySubscribers();\n return this._profiles;\n }\n\n\n /** */\n storeProfile(pubKeyB64: AgentPubKeyB64, profile: Profile) {\n this._profiles[pubKeyB64] = profile;\n this._reversed[profile.nickname] = pubKeyB64;\n this.notifySubscribers();\n }\n\n\n /** */\n async probeProfile(pubKeyB64: AgentPubKeyB64): Promise<Profile | undefined> {\n const maybeProfile = await this.zomeProxy.getAgentProfile(decodeHashFromBase64(pubKeyB64));\n console.log(\"probeProfile() maybeProfile\", maybeProfile);\n if (!maybeProfile) {\n return;\n }\n // const profileEntry: any = decode((maybeProfile.entry as any).Present.entry);\n // console.log(\"probeProfile() profileEntry\", profileEntry);\n //const profile: Profile = decode(profileEntry.record.entry.Present.entry) as Profile;\n const profile: Profile = decode((maybeProfile.entry as any).Present.entry) as Profile;\n console.log(\"probeProfile() profile\", profile);\n this.storeProfile(pubKeyB64, profile);\n return profile;\n }\n\n\n /** */\n async createMyProfile(profile: Profile): Promise<void> {\n /*const record =*/ await this.zomeProxy.createProfile(profile);\n this.storeProfile(this.cell.address.agentId.b64, profile);\n }\n\n\n /** */\n async updateMyProfile(profile: Profile): Promise<void> {\n /*const record =*/ await this.zomeProxy.updateProfile(profile);\n this.storeProfile(this.cell.address.agentId.b64, profile);\n }\n\n}\n"]}
1
+ {"version":3,"file":"profiles.zvm.js","sourceRoot":"","sources":["../src/profiles.zvm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAiB,oBAAoB,EAAE,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AAC3F,OAAO,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAkBxC,MAAM,OAAO,WAAY,SAAQ,aAAa;IAA9C;;QA6BU,cAAS,GAAoC,EAAE,CAAC;QAEhD,cAAS,GAAmC,EAAE,CAAC;IAuGzD,CAAC;aApI0B,eAAU,GAAG,aAAa,AAAhB,CAAiB;IACpD,IAAI,SAAS,KAAmB,OAAO,IAAI,CAAC,UAA2B,CAAC,CAAA,CAAC;IAIhE,KAAK,CAAC,gCAAgC;QAC7C,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAChC,CAAC;IAGQ,aAAa;QACpB,IAAI,CAAC,gBAAgB,EAAE;aAClB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;IAChF,CAAC;IAKD,IAAI,WAAW;QACb,MAAM,IAAI,GAAwB;YAChC,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,QAAQ,EAAE,IAAI,CAAC,SAAS;SAEzB,CAAC;Q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OAAO,CAAC,CAAC;QACtC,OAAO,OAAO,CAAC;IACjB,CAAC;IAID,KAAK,CAAC,eAAe,CAAC,OAAgB;QACjB,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC/D,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAID,KAAK,CAAC,eAAe,CAAC,OAAgB;QACjB,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC/D,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC","sourcesContent":["import {ZomeViewModel} from \"@ddd-qc/lit-happ\";\nimport {Profile} from \"./bindings/profiles.types\";\nimport {AgentPubKeyB64, decodeHashFromBase64, encodeHashToBase64} from \"@holochain/client\";\nimport {ProfilesProxy} from \"./bindings/profiles.proxy\";\nimport {decode} from \"@msgpack/msgpack\";\n\n\n/** */\nexport type ProfilesPerspective = {\n /* AgentPubKeyB64 -> Profile */\n profiles: Record<AgentPubKeyB64, Profile>,\n ///* AgentPubKeyB64 -> Profile hash */\n //profile_ahs: Record<AgentPubKeyB64, ActionHashB64>,\n\n /** Nickname -> AgentPubKeyB64 */\n reversed: Record<string, AgentPubKeyB64>,\n}\n\n\n/**\n *\n */\nexport class ProfilesZvm extends ZomeViewModel {\n\n static override readonly ZOME_PROXY = ProfilesProxy;\n get zomeProxy(): ProfilesProxy {return this._zomeProxy as ProfilesProxy;}\n\n\n /** */\n override async initializePerspectiveFromNetwork(): Promise<void> {\n await this.probeAllProfiles();\n }\n\n /** */\n override probeAllInner() {\n this.probeAllProfiles()\n .then((res) => console.trace(\"probeAllProfiles() finished: \", res.length))\n }\n\n /** -- Perspective -- */\n\n /* */\n get perspective(): ProfilesPerspective {\n const pers: ProfilesPerspective = {\n profiles: this._profiles,\n reversed: this._reversed,\n //profile_ahs: this._profile_ahs,\n };\n return pers;\n }\n\n private _profiles: Record<AgentPubKeyB64, Profile> = {};\n //private _profile_ahs: Record<AgentPubKeyB64, ActionHashB64> = {};\n private _reversed: Record<string, AgentPubKeyB64> = {};\n\n\n getMyProfile(): Profile | undefined { return this._profiles[this.cell.address.agentId.b64] }\n\n getProfile(agent: AgentPubKeyB64): Profile | undefined {return this._profiles[agent]}\n\n //getProfileHash(agent: AgentPubKeyB64): ActionHashB64 | undefined {return this._profile_ahs[agent]}\n\n getAgents(): AgentPubKeyB64[] { return Object.keys(this._profiles)}\n\n getNames(): string[] { return Object.keys(this._reversed)}\n\n\n /** Dump perspective as JSON */\n exportPerspective(): string {\n //console.log(\"exportPerspective()\", perspMat);\n return JSON.stringify(this._profiles, null, 2);\n }\n\n\n /** */\n importPerspective(json: string, _mapping?: Object) {\n const profiles = JSON.parse(json) as Record<AgentPubKeyB64, Profile>;\n for (const [pubKey, profileMat] of Object.entries(profiles)) {\n this.storeProfile(pubKey, profileMat);\n }\n }\n\n /** -- Methods -- */\n\n /* */\n findProfiles(names: string[]): AgentPubKeyB64[] {\n let res: AgentPubKeyB64[] = []\n for (const name of names) {\n if (this._reversed[name]) {\n res.push(this._reversed[name]!)\n }\n }\n return res;\n }\n\n\n /** */\n async probeAllProfiles(): Promise<Record<AgentPubKeyB64, Profile>> {\n let allAgents;\n /** Attempt a retry on fail as this can create an entry (path anchor) and generate a 'head has moved' error */\n try {\n allAgents = await this.zomeProxy.getAgentsWithProfile();\n } catch(e) {\n allAgents = await this.zomeProxy.getAgentsWithProfile();\n }\n for (const agentPubKey of allAgents) {\n const maybeProfile = await this.zomeProxy.getAgentProfile(agentPubKey);\n if (!maybeProfile) {\n continue;\n }\n const profile: Profile = decode((maybeProfile.entry as any).Present.entry) as Profile;\n this.storeProfile(encodeHashToBase64(agentPubKey), profile);\n }\n this.notifySubscribers();\n return this._profiles;\n }\n\n\n /** */\n storeProfile(pubKeyB64: AgentPubKeyB64, profile: Profile) {\n this._profiles[pubKeyB64] = profile;\n this._reversed[profile.nickname] = pubKeyB64;\n this.notifySubscribers();\n }\n\n\n /** */\n async probeProfile(pubKeyB64: AgentPubKeyB64): Promise<Profile | undefined> {\n const maybeProfile = await this.zomeProxy.getAgentProfile(decodeHashFromBase64(pubKeyB64));\n console.log(\"probeProfile() maybeProfile\", maybeProfile);\n if (!maybeProfile) {\n return;\n }\n // const profileEntry: any = decode((maybeProfile.entry as any).Present.entry);\n // console.log(\"probeProfile() profileEntry\", profileEntry);\n //const profile: Profile = decode(profileEntry.record.entry.Present.entry) as Profile;\n const profile: Profile = decode((maybeProfile.entry as any).Present.entry) as Profile;\n console.log(\"probeProfile() profile\", profile);\n this.storeProfile(pubKeyB64, profile);\n return profile;\n }\n\n\n /** */\n async createMyProfile(profile: Profile): Promise<void> {\n /*const record =*/ await this.zomeProxy.createProfile(profile);\n this.storeProfile(this.cell.address.agentId.b64, profile);\n }\n\n\n /** */\n async updateMyProfile(profile: Profile): Promise<void> {\n /*const record =*/ await this.zomeProxy.updateProfile(profile);\n this.storeProfile(this.cell.address.agentId.b64, profile);\n }\n\n}\n"]}
@@ -3,19 +3,20 @@ import { Profile } from "./bindings/profiles.types";
3
3
  import { ProfilesAltProxy } from "./bindings/profilesAlt.proxy";
4
4
  import { EntryPulseMat } from "@ddd-qc/lit-happ/dist/ZomeViewModelWithSignals";
5
5
  import { ProfilesAltPerspective } from "./profilesAlt.perspective";
6
+ import { GetStrategy } from "@holochain-open-dev/core-types";
6
7
  export declare class ProfilesAltZvm extends ZomeViewModelWithSignals {
7
8
  static readonly ZOME_PROXY: typeof ProfilesAltProxy;
8
9
  get zomeProxy(): ProfilesAltProxy;
9
10
  comparable(): Object;
10
11
  hasChanged(): boolean;
11
- initializePerspectiveOnline(): Promise<void>;
12
+ initializePerspectiveFromNetwork(): Promise<void>;
12
13
  probeAllInner(): void;
13
14
  get perspective(): ProfilesAltPerspective;
14
15
  private _perspective;
15
16
  getMyProfile(): Profile | undefined;
16
17
  handleLinkPulse(pulse: LinkPulseMat, _from: AgentId): Promise<void>;
17
18
  handleEntryPulse(pulse: EntryPulseMat, _from: AgentId): Promise<void>;
18
- probeAllProfiles(): Promise<void>;
19
+ probeAllProfiles(strategy: GetStrategy): Promise<void>;
19
20
  findProfile(agentId: AgentId): Promise<Profile | undefined>;
20
21
  createMyProfile(profile: Profile): Promise<void>;
21
22
  updateMyProfile(profile: Profile): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"profilesAlt.zvm.d.ts","sourceRoot":"","sources":["../src/profilesAlt.zvm.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,EAEP,YAAY,EAEZ,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAC,OAAO,EAAC,MAAM,2BAA2B,CAAC;AAElD,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,aAAa,EAAC,MAAM,gDAAgD,CAAC;AAG7E,OAAO,EAEL,sBAAsB,EAGvB,MAAM,2BAA2B,CAAC;AAMnC,qBAAa,cAAe,SAAQ,wBAAwB;IAI1D,gBAAyB,UAAU,0BAAoB;IACvD,IAAI,SAAS,IAAI,gBAAgB,CAA8C;IAItE,UAAU,IAAI,MAAM;IASpB,UAAU,IAAI,OAAO;IAaf,2BAA2B,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlD,aAAa;IAMtB,IAAI,WAAW,IAAI,sBAAsB,CAExC;IAKD,OAAO,CAAC,YAAY,CAAsE;IAK1F,YAAY,IAAI,OAAO,GAAG,SAAS;IASpB,eAAe,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BnE,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO;IAe9D,gBAAgB;IAQhB,WAAW,CAAC,OA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e,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BnE,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO;IAe9D,gBAAgB,CAAC,QAAQ,EAAE,WAAW;IAQtC,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC;IAgB3D,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAMhD,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAMhD,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAMhE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAQtE,MAAM,IAAI,MAAM;IAOhB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO;CAoBzC"}
@@ -4,6 +4,7 @@ import { ProfilesAltProxy } from "./bindings/profilesAlt.proxy";
4
4
  import { ProfilesLinkType } from "./bindings/profiles.integrity";
5
5
  import { ProfilesAltUnitEnum } from "./bindings/profilesAlt.integrity";
6
6
  import { ProfilesAltPerspectiveMutable } from "./profilesAlt.perspective";
7
+ import { GetStrategy } from "@holochain-open-dev/core-types";
7
8
  export class ProfilesAltZvm extends ZomeViewModelWithSignals {
8
9
  constructor() {
9
10
  super(...arguments);
@@ -33,11 +34,11 @@ export class ProfilesAltZvm extends ZomeViewModelWithSignals {
33
34
  }
34
35
  return false;
35
36
  }
36
- async initializePerspectiveOnline() {
37
- await this.probeAllProfiles();
37
+ async initializePerspectiveFromNetwork() {
38
+ await this.probeAllProfiles(GetStrategy.Network);
38
39
  }
39
40
  probeAllInner() {
40
- this.probeAllProfiles();
41
+ this.probeAllProfiles(GetStrategy.Network);
41
42
  }
42
43
  get perspective() {
43
44
  return this._perspective.readonly;
@@ -82,9 +83,9 @@ export class ProfilesAltZvm extends ZomeViewModelWithSignals {
82
83
  break;
83
84
  }
84
85
  }
85
- async probeAllProfiles() {
86
+ async probeAllProfiles(strategy) {
86
87
  try {
87
- await this.zomeProxy.probeProfiles();
88
+ await this.zomeProxy.probeProfiles(strategy);
88
89
  }
89
90
  catch (e) { }
90
91
  }
@@ -1 +1 @@
1
- {"version":3,"file":"profilesAlt.zvm.js","sourceRoot":"","sources":["../src/profilesAlt.zvm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EAAE,aAAa,EAEtB,eAAe,EACf,wBAAwB,EACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAGL,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AAMnC,MAAM,OAAO,cAAe,SAAQ,wBAAwB;IAA5D;;QAkDU,iBAAY,GAAkC,IAAI,6BAA6B,EAAE,CAAC;IAqI5F,CAAC;aAnL0B,eAAU,GAAG,gBAAgB,AAAnB,CAAoB;IACvD,IAAI,SAAS,KAAsB,OAAO,IAAI,CAAC,UAA8B,CAAC,CAAA,CAAC;IAItE,UAAU;QACjB,MAAM,GAAG,GAA0B;YACjC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI;YACnD,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CA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I,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;IAID,MAAM,CAAC,IAAY,EAAE,UAAmB;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAwB,CAAC;QACxE,IAAI,UAAU,EAAE;YACd,KAAK,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,EAAE;gBAC9D,OAAO,CAAC,GAAG,CAAC,yCAAyC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACxF,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACpD,IAAI,KAAK,EAAE;oBACC,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;iBAChD;qBAAM;oBACL,IAAI,KAAK,IAAI,OAAO,EAAE;wBACpB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;qBACtC;iBACF;aACF;YACD,OAAO;SACR;QAED,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACpC,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC","sourcesContent":["import {\n ActionId,\n AgentId,\n EntryId, holoIdReviver,\n LinkPulseMat,\n StateChangeType,\n ZomeViewModelWithSignals\n} from \"@ddd-qc/lit-happ\";\nimport {Profile} from \"./bindings/profiles.types\";\nimport {decode} from \"@msgpack/msgpack\";\nimport {ProfilesAltProxy} from \"./bindings/profilesAlt.proxy\";\nimport {EntryPulseMat} from \"@ddd-qc/lit-happ/dist/ZomeViewModelWithSignals\";\nimport {ProfilesLinkType} from \"./bindings/profiles.integrity\";\nimport {ProfilesAltUnitEnum} from \"./bindings/profilesAlt.integrity\";\nimport {\n ProfilesAltComparable,\n ProfilesAltPerspective,\n ProfilesAltPerspectiveMutable,\n ProfilesAltSnapshot\n} from \"./profilesAlt.perspective\";\n\n\n/**\n *\n */\nexport class ProfilesAltZvm extends ZomeViewModelWithSignals {\n\n /** -- Concret -- */\n\n static override readonly ZOME_PROXY = ProfilesAltProxy;\n get zomeProxy(): ProfilesAltProxy {return this._zomeProxy as ProfilesAltProxy;}\n\n\n /** */\n override comparable(): Object {\n const res: ProfilesAltComparable = {\n profileCount: this._perspective.profileByAgent.size,\n profiles: Array.from(this.perspective.profiles.values()).map((pair) => pair[0]),\n };\n return res;\n }\n\n /* */\n override hasChanged(): boolean {\n const current = this.comparable() as ProfilesAltComparable;\n const prev = this._previousPerspective as ProfilesAltComparable;\n if (!prev) { return true }\n if (current.profileCount != prev.profileCount) return true;\n for (let i = 0; i < current.profileCount; i+= 1) {\n if (JSON.stringify(current.profiles[i]) != JSON.stringify(prev.profiles[i])) { return true }\n }\n return false;\n }\n\n\n /** */\n override async initializePerspectiveOnline(): Promise<void> {\n await this.probeAllProfiles();\n }\n\n\n /** */\n override probeAllInner() {\n this.probeAllProfiles();\n }\n\n\n /* */\n get perspective(): ProfilesAltPerspective {\n return this._perspective.readonly;\n }\n\n\n /** -- */\n\n private _perspective: ProfilesAltPerspectiveMutable = new ProfilesAltPerspectiveMutable();\n\n\n /** -- Getters -- */\n\n getMyProfile(): Profile | undefined {\n return this._perspective.getProfile(this.cell.address.agentId);\n }\n\n\n\n /** -- Signals -- */\n\n /** */\n override async handleLinkPulse(pulse: LinkPulseMat, _from: AgentId): Promise<void> {\n switch (pulse.link_type) {\n case ProfilesLinkType.PrefixPath:\n case ProfilesLinkType.PathToAgent: {\n const agentEh = new EntryId(pulse.target.b64);\n const agentId = AgentId.from(agentEh);\n if (pulse.state != StateChangeType.Delete) {\n await this.findProfile(agentId);\n }\n }\n break;\n case ProfilesLinkType.AgentToProfile: {\n const agentEh = new EntryId(pulse.base.b64); // Make sure it's an EntryHash\n const agentId = AgentId.from(agentEh);\n const profileAh = ActionId.from(pulse.target);\n if (pulse.state == StateChangeType.Delete) {\n this._perspective.unstoreAgentProfile(agentId, profileAh)\n } else {\n this._perspective.storeAgentProfile(agentId, profileAh)\n }\n }\n break;\n }\n }\n\n\n /** */\n override async handleEntryPulse(pulse: EntryPulseMat, _from: AgentId) {\n switch (pulse.entryType) {\n case ProfilesAltUnitEnum.Profile:\n const profile = decode(pulse.bytes) as Profile;\n if (pulse.state != StateChangeType.Delete) {\n this._perspective.storeProfile(pulse.ah, profile, pulse.ts);\n }\n break;\n }\n }\n\n\n /** -- Methods -- */\n\n /** */\n async probeAllProfiles()/*: Promise<Record<AgentPubKeyB64, ProfileMat>>*/ {\n try {\n await this.zomeProxy.probeProfiles();\n } catch(e) {}\n }\n\n\n /** */\n async findProfile(agentId: AgentId): Promise<Profile | undefined> {\n try {\n const maybeProfilePair = await this.zomeProxy.findProfile(agentId.hash);\n console.log(\"findProfile()\", agentId, maybeProfilePair);\n if (!maybeProfilePair) {\n return;\n }\n return maybeProfilePair[1];\n } catch(e) {\n return undefined;\n }\n return undefined;\n }\n\n\n /** */\n async createMyProfile(profile: Profile): Promise<void> {\n await this.zomeProxy.createProfile([profile, this.cell.address.agentId.hash]);\n }\n\n\n /** */\n async updateMyProfile(profile: Profile): Promise<void> {\n await this.zomeProxy.updateProfile([profile, this.cell.address.agentId.hash]);\n }\n\n\n /** */\n async createProfile(profile: Profile, agentId: AgentId): Promise<void> {\n await this.zomeProxy.createProfile([profile, agentId.hash]);\n }\n\n\n /** */\n async updateProfile(profile: Profile, agentId: AgentId): Promise<void> {\n await this.zomeProxy.updateProfile([profile, agentId.hash]);\n }\n\n\n /** -- Import / Export -- */\n\n /** Dump perspective as JSON */\n export(): string {\n const snapshot = this._perspective.makeSnapshot();\n return JSON.stringify(snapshot, null, 2);\n }\n\n\n /** */\n import(json: string, canPublish: boolean) {\n const snapshot = JSON.parse(json, holoIdReviver) as ProfilesAltSnapshot;\n if (canPublish) {\n for (const [agentId, _profileAh, profile, _ts] of snapshot.all) {\n console.log(\"ProfilesAltZvm.import() publish profile\", agentId.short, profile.nickname);\n const maybe = this._perspective.getProfile(agentId);\n if (maybe) {\n /*await*/ this.createProfile(profile, agentId);\n } else {\n if (maybe != profile) {\n this.updateProfile(profile, agentId);\n }\n }\n }\n return;\n }\n /** */\n this._perspective.restore(snapshot);\n this.notifySubscribers();\n }\n}\n"]}
1
+ {"version":3,"file":"profilesAlt.zvm.js","sourceRoot":"","sources":["../src/profilesAlt.zvm.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,OAAO,EACP,OAAO,EACP,aAAa,EAEb,eAAe,EACf,wBAAwB,EAC3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAGH,6BAA6B,EAEhC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAC,WAAW,EAAC,MAAM,gCAAgC,CAAC;AAM3D,MAAM,OAAO,cAAe,SAAQ,wBAAwB;IAA5D;;QAkDU,iBAAY,GAAkC,IAAI,6BAA6B,EAAE,CAAC;IAqI5F,CAAC;aAnL0B,eAAU,GAAG,gBAAgB,AAAnB,CAAoB;IACvD,IAAI,SAAS,KAAsB,OAAO,IAAI,CAAC,UAA8B,CAAC,CAAA,CAAC;IAItE,UAAU;QACjB,MAAM,GAAG,GAA0B;YACjC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI;YACnD,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CA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IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,CAAC;IAMD,MAAM;QACJ,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;IAID,MAAM,CAAC,IAAY,EAAE,UAAmB;QACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAwB,CAAC;QACxE,IAAI,UAAU,EAAE;YACd,KAAK,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,CAAC,IAAI,QAAQ,CAAC,GAAG,EAAE;gBAC9D,OAAO,CAAC,GAAG,CAAC,yCAAyC,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACxF,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACpD,IAAI,KAAK,EAAE;oBACC,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;iBAChD;qBAAM;oBACL,IAAI,KAAK,IAAI,OAAO,EAAE;wBACpB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;qBACtC;iBACF;aACF;YACD,OAAO;SACR;QAED,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACpC,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC","sourcesContent":["import {\n ActionId,\n AgentId,\n EntryId,\n holoIdReviver,\n LinkPulseMat,\n StateChangeType,\n ZomeViewModelWithSignals\n} from \"@ddd-qc/lit-happ\";\nimport {Profile} from \"./bindings/profiles.types\";\nimport {decode} from \"@msgpack/msgpack\";\nimport {ProfilesAltProxy} from \"./bindings/profilesAlt.proxy\";\nimport {EntryPulseMat} from \"@ddd-qc/lit-happ/dist/ZomeViewModelWithSignals\";\nimport {ProfilesLinkType} from \"./bindings/profiles.integrity\";\nimport {ProfilesAltUnitEnum} from \"./bindings/profilesAlt.integrity\";\nimport {\n ProfilesAltComparable,\n ProfilesAltPerspective,\n ProfilesAltPerspectiveMutable,\n ProfilesAltSnapshot\n} from \"./profilesAlt.perspective\";\nimport {GetStrategy} from \"@holochain-open-dev/core-types\";\n\n\n/**\n *\n */\nexport class ProfilesAltZvm extends ZomeViewModelWithSignals {\n\n /** -- Concret -- */\n\n static override readonly ZOME_PROXY = ProfilesAltProxy;\n get zomeProxy(): ProfilesAltProxy {return this._zomeProxy as ProfilesAltProxy;}\n\n\n /** */\n override comparable(): Object {\n const res: ProfilesAltComparable = {\n profileCount: this._perspective.profileByAgent.size,\n profiles: Array.from(this.perspective.profiles.values()).map((pair) => pair[0]),\n };\n return res;\n }\n\n /* */\n override hasChanged(): boolean {\n const current = this.comparable() as ProfilesAltComparable;\n const prev = this._previousPerspective as ProfilesAltComparable;\n if (!prev) { return true }\n if (current.profileCount != prev.profileCount) return true;\n for (let i = 0; i < current.profileCount; i+= 1) {\n if (JSON.stringify(current.profiles[i]) != JSON.stringify(prev.profiles[i])) { return true }\n }\n return false;\n }\n\n\n /** */\n override async initializePerspectiveFromNetwork(): Promise<void> {\n await this.probeAllProfiles(GetStrategy.Network);\n }\n\n\n /** */\n override probeAllInner() {\n this.probeAllProfiles(GetStrategy.Network);\n }\n\n\n /* */\n get perspective(): ProfilesAltPerspective {\n return this._perspective.readonly;\n }\n\n\n /** -- */\n\n private _perspective: ProfilesAltPerspectiveMutable = new ProfilesAltPerspectiveMutable();\n\n\n /** -- Getters -- */\n\n getMyProfile(): Profile | undefined {\n return this._perspective.getProfile(this.cell.address.agentId);\n }\n\n\n\n /** -- Signals -- */\n\n /** */\n override async handleLinkPulse(pulse: LinkPulseMat, _from: AgentId): Promise<void> {\n switch (pulse.link_type) {\n case ProfilesLinkType.PrefixPath:\n case ProfilesLinkType.PathToAgent: {\n const agentEh = new EntryId(pulse.target.b64);\n const agentId = AgentId.from(agentEh);\n if (pulse.state != StateChangeType.Delete) {\n await this.findProfile(agentId);\n }\n }\n break;\n case ProfilesLinkType.AgentToProfile: {\n const agentEh = new EntryId(pulse.base.b64); // Make sure it's an EntryHash\n const agentId = AgentId.from(agentEh);\n const profileAh = ActionId.from(pulse.target);\n if (pulse.state == StateChangeType.Delete) {\n this._perspective.unstoreAgentProfile(agentId, profileAh)\n } else {\n this._perspective.storeAgentProfile(agentId, profileAh)\n }\n }\n break;\n }\n }\n\n\n /** */\n override async handleEntryPulse(pulse: EntryPulseMat, _from: AgentId) {\n switch (pulse.entryType) {\n case ProfilesAltUnitEnum.Profile:\n const profile = decode(pulse.bytes) as Profile;\n if (pulse.state != StateChangeType.Delete) {\n this._perspective.storeProfile(pulse.ah, profile, pulse.ts);\n }\n break;\n }\n }\n\n\n /** -- Methods -- */\n\n /** */\n async probeAllProfiles(strategy: GetStrategy)/*: Promise<Record<AgentPubKeyB64, ProfileMat>>*/ {\n try {\n await this.zomeProxy.probeProfiles(strategy);\n } catch(e) {}\n }\n\n\n /** */\n async findProfile(agentId: AgentId): Promise<Profile | undefined> {\n try {\n const maybeProfilePair = await this.zomeProxy.findProfile(agentId.hash);\n console.log(\"findProfile()\", agentId, maybeProfilePair);\n if (!maybeProfilePair) {\n return;\n }\n return maybeProfilePair[1];\n } catch(e) {\n return undefined;\n }\n return undefined;\n }\n\n\n /** */\n async createMyProfile(profile: Profile): Promise<void> {\n await this.zomeProxy.createProfile([profile, this.cell.address.agentId.hash]);\n }\n\n\n /** */\n async updateMyProfile(profile: Profile): Promise<void> {\n await this.zomeProxy.updateProfile([profile, this.cell.address.agentId.hash]);\n }\n\n\n /** */\n async createProfile(profile: Profile, agentId: AgentId): Promise<void> {\n await this.zomeProxy.createProfile([profile, agentId.hash]);\n }\n\n\n /** */\n async updateProfile(profile: Profile, agentId: AgentId): Promise<void> {\n await this.zomeProxy.updateProfile([profile, agentId.hash]);\n }\n\n\n /** -- Import / Export -- */\n\n /** Dump perspective as JSON */\n export(): string {\n const snapshot = this._perspective.makeSnapshot();\n return JSON.stringify(snapshot, null, 2);\n }\n\n\n /** */\n import(json: string, canPublish: boolean) {\n const snapshot = JSON.parse(json, holoIdReviver) as ProfilesAltSnapshot;\n if (canPublish) {\n for (const [agentId, _profileAh, profile, _ts] of snapshot.all) {\n console.log(\"ProfilesAltZvm.import() publish profile\", agentId.short, profile.nickname);\n const maybe = this._perspective.getProfile(agentId);\n if (maybe) {\n /*await*/ this.createProfile(profile, agentId);\n } else {\n if (maybe != profile) {\n this.updateProfile(profile, agentId);\n }\n }\n }\n return;\n }\n /** */\n this._perspective.restore(snapshot);\n this.notifySubscribers();\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-qc/profiles-dvm",
3
- "version": "0.33.0",
3
+ "version": "0.33.2",
4
4
  "description": "DnaViewModel implementation for the Profiles zome.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "scripts": {
12
12
  "ci:tsc": "tsc --version",
13
- "lint" : "eslint --ext .ts .",
13
+ "lint" : "eslint --ext .ts ",
14
14
  "build" : "rm -rf dist && tsc",
15
15
  "build:watch": "tsc -w --preserveWatchOutput"
16
16
  },
@@ -23,7 +23,7 @@
23
23
  "bugs": {
24
24
  "url": "https://github.com/ddd-mtl/lit-happ/issues"
25
25
  },
26
- "homepage": "https://github.com/ddd-mtl/lit-happ/blob/main/packages/profiles-dvm/",
26
+ "homepage": "https://github.com/ddd-mtl/lit-happ/blob/main/dvms/profiles/",
27
27
  "devDependencies": {
28
28
  "@types/node": "^20.8.9",
29
29
  "tslib": "^2.4.0",