@xyo-network/archivist-model 3.0.7 → 3.0.8
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/neutral/Config.d.ts +23 -0
- package/dist/neutral/Config.d.ts.map +1 -0
- package/dist/neutral/EventData.d.ts +5 -0
- package/dist/neutral/EventData.d.ts.map +1 -0
- package/dist/neutral/EventModels/Cleared.d.ts +7 -0
- package/dist/neutral/EventModels/Cleared.d.ts.map +1 -0
- package/dist/neutral/EventModels/Deleted.d.ts +10 -0
- package/dist/neutral/EventModels/Deleted.d.ts.map +1 -0
- package/dist/neutral/EventModels/Inserted.d.ts +10 -0
- package/dist/neutral/EventModels/Inserted.d.ts.map +1 -0
- package/dist/neutral/EventModels/index.d.ts +4 -0
- package/dist/neutral/EventModels/index.d.ts.map +1 -0
- package/dist/neutral/IndexDescription.d.ts +12 -0
- package/dist/neutral/IndexDescription.d.ts.map +1 -0
- package/dist/neutral/Instance.d.ts +10 -0
- package/dist/neutral/Instance.d.ts.map +1 -0
- package/dist/neutral/Labels.d.ts +5 -0
- package/dist/neutral/Labels.d.ts.map +1 -0
- package/dist/neutral/Module.d.ts +6 -0
- package/dist/neutral/Module.d.ts.map +1 -0
- package/dist/neutral/NextOptions.d.ts +9 -0
- package/dist/neutral/NextOptions.d.ts.map +1 -0
- package/dist/neutral/Params.d.ts +5 -0
- package/dist/neutral/Params.d.ts.map +1 -0
- package/dist/neutral/Queries/All.d.ts +7 -0
- package/dist/neutral/Queries/All.d.ts.map +1 -0
- package/dist/neutral/Queries/Clear.d.ts +7 -0
- package/dist/neutral/Queries/Clear.d.ts.map +1 -0
- package/dist/neutral/Queries/Commit.d.ts +7 -0
- package/dist/neutral/Queries/Commit.d.ts.map +1 -0
- package/dist/neutral/Queries/Delete.d.ts +9 -0
- package/dist/neutral/Queries/Delete.d.ts.map +1 -0
- package/dist/neutral/Queries/Get.d.ts +9 -0
- package/dist/neutral/Queries/Get.d.ts.map +1 -0
- package/dist/neutral/Queries/Insert.d.ts +7 -0
- package/dist/neutral/Queries/Insert.d.ts.map +1 -0
- package/dist/neutral/Queries/Next.d.ts +6 -0
- package/dist/neutral/Queries/Next.d.ts.map +1 -0
- package/dist/neutral/Queries/index.d.ts +18 -0
- package/dist/neutral/Queries/index.d.ts.map +1 -0
- package/dist/neutral/QueryFunctions.d.ts +23 -0
- package/dist/neutral/QueryFunctions.d.ts.map +1 -0
- package/dist/neutral/RawQueryFunctions.d.ts +16 -0
- package/dist/neutral/RawQueryFunctions.d.ts.map +1 -0
- package/dist/neutral/attachable/AttachableInstance.d.ts +14 -0
- package/dist/neutral/attachable/AttachableInstance.d.ts.map +1 -0
- package/dist/neutral/attachable/asAttachableInstance.d.ts +65 -0
- package/dist/neutral/attachable/asAttachableInstance.d.ts.map +1 -0
- package/dist/neutral/attachable/index.d.ts +4 -0
- package/dist/neutral/attachable/index.d.ts.map +1 -0
- package/dist/neutral/attachable/isAttachableInstance.d.ts +5 -0
- package/dist/neutral/attachable/isAttachableInstance.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +14 -436
- package/dist/neutral/index.d.ts.map +1 -0
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/typeChecks.d.ts +205 -0
- package/dist/neutral/typeChecks.d.ts.map +1 -0
- package/package.json +10 -10
- package/src/EventData.ts +3 -1
- package/src/Module.ts +3 -1
- package/src/typeChecks.ts +3 -1
- package/xy.config.ts +1 -3
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,436 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
interface ClearedEventData<T extends Module = Module> extends EventData {
|
|
16
|
-
cleared: ClearedEventArgs<T>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type DeletedEventArgs<T extends Module = Module> = ModuleEventArgs<T, {
|
|
20
|
-
hashes: Hash[];
|
|
21
|
-
}>;
|
|
22
|
-
interface DeletedEventData<T extends Module = Module> extends EventData {
|
|
23
|
-
deleted: DeletedEventArgs<T>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
type InsertedEventArgs<T extends Module = Module> = ModuleEventArgs<T, {
|
|
27
|
-
payloads: WithMeta<Payload>[];
|
|
28
|
-
}>;
|
|
29
|
-
interface InsertedEventData<T extends Module = Module> extends EventData {
|
|
30
|
-
inserted: InsertedEventArgs<T>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
interface ArchivistModuleEventData extends InsertedEventData, DeletedEventData, ClearedEventData, ModuleEventData {
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
type IndexDirection = -1 | 1;
|
|
37
|
-
type IndexDescription = {
|
|
38
|
-
key: {
|
|
39
|
-
[key: string]: IndexDirection;
|
|
40
|
-
} | Map<string, IndexDirection>;
|
|
41
|
-
multiEntry?: boolean;
|
|
42
|
-
name?: string;
|
|
43
|
-
unique?: boolean;
|
|
44
|
-
};
|
|
45
|
-
declare const IndexSeparator = "-";
|
|
46
|
-
declare const buildStandardIndexName: (index: IndexDescription) => string;
|
|
47
|
-
|
|
48
|
-
interface ArchivistParents {
|
|
49
|
-
commit?: Address[];
|
|
50
|
-
read?: Address[];
|
|
51
|
-
write?: Address[];
|
|
52
|
-
}
|
|
53
|
-
interface ArchivistStorage {
|
|
54
|
-
indexes?: IndexDescription[];
|
|
55
|
-
}
|
|
56
|
-
declare const ArchivistConfigSchema: "network.xyo.archivist.config";
|
|
57
|
-
type ArchivistConfigSchema = typeof ArchivistConfigSchema;
|
|
58
|
-
type ArchivistConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends string | void = void> = ModuleConfig<WithAdditional<{
|
|
59
|
-
parents?: ArchivistParents;
|
|
60
|
-
requireAllParents?: boolean;
|
|
61
|
-
schema: TConfig extends Payload ? TConfig['schema'] : ArchivistConfigSchema;
|
|
62
|
-
storage?: ArchivistStorage;
|
|
63
|
-
storeParentReads?: boolean;
|
|
64
|
-
}, TConfig>, TSchema>;
|
|
65
|
-
|
|
66
|
-
interface ArchivistModule<TParams extends ModuleParams<AnyConfigSchema<ArchivistConfig>> = ModuleParams<AnyConfigSchema<ArchivistConfig>>, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends Module<TParams, TEventData> {
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
type ArchivistParams<TConfig extends AnyConfigSchema<ArchivistConfig> = AnyConfigSchema<ArchivistConfig>, TAdditionalParams extends EmptyObject | undefined = undefined> = ModuleParams<TConfig, TAdditionalParams>;
|
|
70
|
-
|
|
71
|
-
interface NextOptions<TId = string> {
|
|
72
|
-
limit?: number;
|
|
73
|
-
offset?: TId;
|
|
74
|
-
order?: 'asc' | 'desc';
|
|
75
|
-
}
|
|
76
|
-
interface ArchivistNextOptions extends NextOptions<Hash> {
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
interface ReadArchivist<TReadResponse, TId = string> {
|
|
80
|
-
all(): PromisableArray<TReadResponse>;
|
|
81
|
-
get(ids: TId[]): PromisableArray<TReadResponse>;
|
|
82
|
-
next(options?: NextOptions<TId>): PromisableArray<TReadResponse>;
|
|
83
|
-
}
|
|
84
|
-
interface WriteArchivist<TReadResponse, TWriteResponse = TReadResponse, TWrite = TReadResponse, TId = string> {
|
|
85
|
-
clear(): Promisable<void>;
|
|
86
|
-
delete(ids: TId[]): PromisableArray<TId>;
|
|
87
|
-
insert(item: TWrite[]): PromisableArray<TWriteResponse>;
|
|
88
|
-
}
|
|
89
|
-
interface StashArchivist<TWriteResponse> {
|
|
90
|
-
commit(): PromisableArray<TWriteResponse>;
|
|
91
|
-
}
|
|
92
|
-
interface Archivist<TReadResponse extends Payload = Payload, TWriteResponse extends Payload = Payload, TWrite extends Payload = TReadResponse & Payload, TId = Hash> extends ReadArchivist<WithMeta<TReadResponse>, TId>, WriteArchivist<WithMeta<TReadResponse>, WithMeta<TWriteResponse>, TWrite, TId>, StashArchivist<WithMeta<TWriteResponse>> {
|
|
93
|
-
}
|
|
94
|
-
interface ArchivistQueryFunctions<TReadResponse extends Payload = Payload, TWriteResponse extends Payload = Payload, TWrite extends Payload = TReadResponse & Payload, TId = Hash> extends Archivist<TReadResponse, TWriteResponse, TWrite, TId>, ModuleQueryFunctions {
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
interface ArchivistRawQueryFunctions {
|
|
98
|
-
allQuery(account?: AccountInstance): Promisable<ModuleQueryResult>;
|
|
99
|
-
clearQuery(account?: AccountInstance): Promisable<ModuleQueryResult>;
|
|
100
|
-
commitQuery(account?: AccountInstance): Promisable<ModuleQueryResult>;
|
|
101
|
-
deleteQuery(hashes: Hash[], account?: AccountInstance): Promisable<ModuleQueryResult>;
|
|
102
|
-
getQuery(hashes: Hash[], account?: AccountInstance): Promisable<ModuleQueryResult>;
|
|
103
|
-
insertQuery(payloads: Payload[], account?: AccountInstance): Promisable<ModuleQueryResult>;
|
|
104
|
-
nextQuery(options?: ArchivistNextOptions, account?: AccountInstance): Promisable<ModuleQueryResult>;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
interface ArchivistInstance<TParams extends ArchivistParams = ArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData, TPayload extends Payload = Payload> extends ArchivistModule<TParams, TEventData>, ArchivistQueryFunctions<TPayload, WithMeta<TPayload>>, ModuleInstance<TParams, TEventData>, ArchivistRawQueryFunctions {
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
interface AttachableArchivistInstance<TParams extends ArchivistParams = ArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData, TPayload extends Payload = Payload> extends ArchivistModule<TParams, TEventData>, AttachableModuleInstance<TParams, TEventData>, ArchivistInstance<TParams, TEventData, TPayload> {
|
|
111
|
-
}
|
|
112
|
-
type AttachableArchivistInstanceTypeCheck<T extends AttachableArchivistInstance = AttachableArchivistInstance> = TypeCheck<T>;
|
|
113
|
-
declare class IsAttachableArchivistInstanceFactory<T extends AttachableArchivistInstance = AttachableArchivistInstance> extends IsObjectFactory<T> {
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
declare const asAttachableArchivistInstance: {
|
|
117
|
-
<TType extends AttachableArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
118
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
119
|
-
addToResolvers?: boolean;
|
|
120
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
121
|
-
allowNameResolution?: boolean;
|
|
122
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
123
|
-
parents?: ArchivistParents;
|
|
124
|
-
requireAllParents?: boolean;
|
|
125
|
-
schema: "network.xyo.archivist.config";
|
|
126
|
-
storage?: ArchivistStorage;
|
|
127
|
-
storeParentReads?: boolean;
|
|
128
|
-
}, "schema"> & {
|
|
129
|
-
schema: "network.xyo.archivist.config";
|
|
130
|
-
}, "schema"> & {
|
|
131
|
-
schema: string;
|
|
132
|
-
};
|
|
133
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
134
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
135
|
-
}, ArchivistModuleEventData, {
|
|
136
|
-
schema: string;
|
|
137
|
-
} & _xyo_network_payload_model.PayloadFields>>(value: _xylabs_promise.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
138
|
-
<TType extends AttachableArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
139
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
140
|
-
addToResolvers?: boolean;
|
|
141
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
142
|
-
allowNameResolution?: boolean;
|
|
143
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
144
|
-
parents?: ArchivistParents;
|
|
145
|
-
requireAllParents?: boolean;
|
|
146
|
-
schema: "network.xyo.archivist.config";
|
|
147
|
-
storage?: ArchivistStorage;
|
|
148
|
-
storeParentReads?: boolean;
|
|
149
|
-
}, "schema"> & {
|
|
150
|
-
schema: "network.xyo.archivist.config";
|
|
151
|
-
}, "schema"> & {
|
|
152
|
-
schema: string;
|
|
153
|
-
};
|
|
154
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
155
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
156
|
-
}, ArchivistModuleEventData, {
|
|
157
|
-
schema: string;
|
|
158
|
-
} & _xyo_network_payload_model.PayloadFields>>(value: _xylabs_promise.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<AttachableArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
159
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
160
|
-
addToResolvers?: boolean;
|
|
161
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
162
|
-
allowNameResolution?: boolean;
|
|
163
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
164
|
-
parents?: ArchivistParents;
|
|
165
|
-
requireAllParents?: boolean;
|
|
166
|
-
schema: "network.xyo.archivist.config";
|
|
167
|
-
storage?: ArchivistStorage;
|
|
168
|
-
storeParentReads?: boolean;
|
|
169
|
-
}, "schema"> & {
|
|
170
|
-
schema: "network.xyo.archivist.config";
|
|
171
|
-
}, "schema"> & {
|
|
172
|
-
schema: string;
|
|
173
|
-
};
|
|
174
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
175
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
176
|
-
}, ArchivistModuleEventData, {
|
|
177
|
-
schema: string;
|
|
178
|
-
} & _xyo_network_payload_model.PayloadFields>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
declare const requiredAttachableArchivistInstanceFunctions: ObjectTypeShape;
|
|
182
|
-
declare const isAttachableArchivistInstance: TypeCheck<AttachableArchivistInstance>;
|
|
183
|
-
|
|
184
|
-
interface ArchivistLabels extends Labels {
|
|
185
|
-
'network.xyo.archivist.persistence.scope': 'memory' | 'thread' | 'process' | 'device' | 'network';
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
type ArchivistAllQuerySchema = 'network.xyo.query.archivist.all';
|
|
189
|
-
declare const ArchivistAllQuerySchema: ArchivistAllQuerySchema;
|
|
190
|
-
type ArchivistAllQuery = Query<{
|
|
191
|
-
schema: ArchivistAllQuerySchema;
|
|
192
|
-
}>;
|
|
193
|
-
|
|
194
|
-
type ArchivistClearQuerySchema = 'network.xyo.query.archivist.clear';
|
|
195
|
-
declare const ArchivistClearQuerySchema: ArchivistClearQuerySchema;
|
|
196
|
-
type ArchivistClearQuery = Query<{
|
|
197
|
-
schema: ArchivistClearQuerySchema;
|
|
198
|
-
}>;
|
|
199
|
-
|
|
200
|
-
type ArchivistCommitQuerySchema = 'network.xyo.query.archivist.commit';
|
|
201
|
-
declare const ArchivistCommitQuerySchema: ArchivistCommitQuerySchema;
|
|
202
|
-
type ArchivistCommitQuery = Query<{
|
|
203
|
-
schema: ArchivistCommitQuerySchema;
|
|
204
|
-
}>;
|
|
205
|
-
|
|
206
|
-
type ArchivistDeleteQuerySchema = 'network.xyo.query.archivist.delete';
|
|
207
|
-
declare const ArchivistDeleteQuerySchema: ArchivistDeleteQuerySchema;
|
|
208
|
-
type ArchivistDeleteQuery = Query<{
|
|
209
|
-
hashes: Hash[];
|
|
210
|
-
schema: ArchivistDeleteQuerySchema;
|
|
211
|
-
}>;
|
|
212
|
-
|
|
213
|
-
type ArchivistGetQuerySchema = 'network.xyo.query.archivist.get';
|
|
214
|
-
declare const ArchivistGetQuerySchema: ArchivistGetQuerySchema;
|
|
215
|
-
type ArchivistGetQuery = Query<{
|
|
216
|
-
hashes: Hash[];
|
|
217
|
-
schema: ArchivistGetQuerySchema;
|
|
218
|
-
}>;
|
|
219
|
-
|
|
220
|
-
type ArchivistInsertQuerySchema = 'network.xyo.query.archivist.insert';
|
|
221
|
-
declare const ArchivistInsertQuerySchema: ArchivistInsertQuerySchema;
|
|
222
|
-
type ArchivistInsertQuery = Query<{
|
|
223
|
-
schema: ArchivistInsertQuerySchema;
|
|
224
|
-
}>;
|
|
225
|
-
|
|
226
|
-
type ArchivistNextQuerySchema = 'network.xyo.query.archivist.next';
|
|
227
|
-
declare const ArchivistNextQuerySchema: ArchivistNextQuerySchema;
|
|
228
|
-
type ArchivistNextQuery = Query<ArchivistNextOptions, ArchivistNextQuerySchema>;
|
|
229
|
-
|
|
230
|
-
type ArchivistQueries = ArchivistAllQuery | ArchivistClearQuery | ArchivistCommitQuery | ArchivistDeleteQuery | ArchivistGetQuery | ArchivistInsertQuery | ArchivistNextQuery;
|
|
231
|
-
type ArchivistModuleQueries = ModuleQueries | ArchivistQueries;
|
|
232
|
-
|
|
233
|
-
declare const isArchivistInstance: _xylabs_object.TypeCheck<ArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
234
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
235
|
-
addToResolvers?: boolean;
|
|
236
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
237
|
-
allowNameResolution?: boolean;
|
|
238
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
239
|
-
parents?: ArchivistParents;
|
|
240
|
-
requireAllParents?: boolean;
|
|
241
|
-
schema: "network.xyo.archivist.config";
|
|
242
|
-
storage?: ArchivistStorage;
|
|
243
|
-
storeParentReads?: boolean;
|
|
244
|
-
}, "schema"> & {
|
|
245
|
-
schema: "network.xyo.archivist.config";
|
|
246
|
-
}, "schema"> & {
|
|
247
|
-
schema: string;
|
|
248
|
-
};
|
|
249
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
250
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
251
|
-
}, ArchivistModuleEventData, {
|
|
252
|
-
schema: string;
|
|
253
|
-
} & _xyo_network_payload_model.PayloadFields>>;
|
|
254
|
-
declare const isArchivistModule: _xyo_network_module_model.ModuleTypeCheck<ArchivistModule<_xylabs_object.BaseParamsFields & {
|
|
255
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
256
|
-
addToResolvers?: boolean;
|
|
257
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
258
|
-
allowNameResolution?: boolean;
|
|
259
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
260
|
-
parents?: ArchivistParents;
|
|
261
|
-
requireAllParents?: boolean;
|
|
262
|
-
schema: "network.xyo.archivist.config";
|
|
263
|
-
storage?: ArchivistStorage;
|
|
264
|
-
storeParentReads?: boolean;
|
|
265
|
-
}, "schema"> & {
|
|
266
|
-
schema: "network.xyo.archivist.config";
|
|
267
|
-
}, "schema"> & {
|
|
268
|
-
schema: string;
|
|
269
|
-
};
|
|
270
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
271
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
272
|
-
}, ArchivistModuleEventData>>;
|
|
273
|
-
declare const asArchivistModule: {
|
|
274
|
-
<TType extends ArchivistModule<_xylabs_object.BaseParamsFields & {
|
|
275
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
276
|
-
addToResolvers?: boolean;
|
|
277
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
278
|
-
allowNameResolution?: boolean;
|
|
279
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
280
|
-
parents?: ArchivistParents;
|
|
281
|
-
requireAllParents?: boolean;
|
|
282
|
-
schema: "network.xyo.archivist.config";
|
|
283
|
-
storage?: ArchivistStorage;
|
|
284
|
-
storeParentReads?: boolean;
|
|
285
|
-
}, "schema"> & {
|
|
286
|
-
schema: "network.xyo.archivist.config";
|
|
287
|
-
}, "schema"> & {
|
|
288
|
-
schema: string;
|
|
289
|
-
};
|
|
290
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
291
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
292
|
-
}, ArchivistModuleEventData>>(value: _xylabs_promise.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
293
|
-
<TType extends ArchivistModule<_xylabs_object.BaseParamsFields & {
|
|
294
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
295
|
-
addToResolvers?: boolean;
|
|
296
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
297
|
-
allowNameResolution?: boolean;
|
|
298
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
299
|
-
parents?: ArchivistParents;
|
|
300
|
-
requireAllParents?: boolean;
|
|
301
|
-
schema: "network.xyo.archivist.config";
|
|
302
|
-
storage?: ArchivistStorage;
|
|
303
|
-
storeParentReads?: boolean;
|
|
304
|
-
}, "schema"> & {
|
|
305
|
-
schema: "network.xyo.archivist.config";
|
|
306
|
-
}, "schema"> & {
|
|
307
|
-
schema: string;
|
|
308
|
-
};
|
|
309
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
310
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
311
|
-
}, ArchivistModuleEventData>>(value: _xylabs_promise.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<ArchivistModule<_xylabs_object.BaseParamsFields & {
|
|
312
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
313
|
-
addToResolvers?: boolean;
|
|
314
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
315
|
-
allowNameResolution?: boolean;
|
|
316
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
317
|
-
parents?: ArchivistParents;
|
|
318
|
-
requireAllParents?: boolean;
|
|
319
|
-
schema: "network.xyo.archivist.config";
|
|
320
|
-
storage?: ArchivistStorage;
|
|
321
|
-
storeParentReads?: boolean;
|
|
322
|
-
}, "schema"> & {
|
|
323
|
-
schema: "network.xyo.archivist.config";
|
|
324
|
-
}, "schema"> & {
|
|
325
|
-
schema: string;
|
|
326
|
-
};
|
|
327
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
328
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
329
|
-
}, ArchivistModuleEventData>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
330
|
-
};
|
|
331
|
-
declare const asArchivistInstance: {
|
|
332
|
-
<TType extends ArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
333
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
334
|
-
addToResolvers?: boolean;
|
|
335
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
336
|
-
allowNameResolution?: boolean;
|
|
337
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
338
|
-
parents?: ArchivistParents;
|
|
339
|
-
requireAllParents?: boolean;
|
|
340
|
-
schema: "network.xyo.archivist.config";
|
|
341
|
-
storage?: ArchivistStorage;
|
|
342
|
-
storeParentReads?: boolean;
|
|
343
|
-
}, "schema"> & {
|
|
344
|
-
schema: "network.xyo.archivist.config";
|
|
345
|
-
}, "schema"> & {
|
|
346
|
-
schema: string;
|
|
347
|
-
};
|
|
348
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
349
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
350
|
-
}, ArchivistModuleEventData, {
|
|
351
|
-
schema: string;
|
|
352
|
-
} & _xyo_network_payload_model.PayloadFields>>(value: _xylabs_promise.AnyNonPromise, config?: _xylabs_object.TypeCheckConfig): TType | undefined;
|
|
353
|
-
<TType extends ArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
354
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
355
|
-
addToResolvers?: boolean;
|
|
356
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
357
|
-
allowNameResolution?: boolean;
|
|
358
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
359
|
-
parents?: ArchivistParents;
|
|
360
|
-
requireAllParents?: boolean;
|
|
361
|
-
schema: "network.xyo.archivist.config";
|
|
362
|
-
storage?: ArchivistStorage;
|
|
363
|
-
storeParentReads?: boolean;
|
|
364
|
-
}, "schema"> & {
|
|
365
|
-
schema: "network.xyo.archivist.config";
|
|
366
|
-
}, "schema"> & {
|
|
367
|
-
schema: string;
|
|
368
|
-
};
|
|
369
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
370
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
371
|
-
}, ArchivistModuleEventData, {
|
|
372
|
-
schema: string;
|
|
373
|
-
} & _xyo_network_payload_model.PayloadFields>>(value: _xylabs_promise.AnyNonPromise, assert: _xylabs_object.StringOrAlertFunction<ArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
374
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
375
|
-
addToResolvers?: boolean;
|
|
376
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
377
|
-
allowNameResolution?: boolean;
|
|
378
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
379
|
-
parents?: ArchivistParents;
|
|
380
|
-
requireAllParents?: boolean;
|
|
381
|
-
schema: "network.xyo.archivist.config";
|
|
382
|
-
storage?: ArchivistStorage;
|
|
383
|
-
storeParentReads?: boolean;
|
|
384
|
-
}, "schema"> & {
|
|
385
|
-
schema: "network.xyo.archivist.config";
|
|
386
|
-
}, "schema"> & {
|
|
387
|
-
schema: string;
|
|
388
|
-
};
|
|
389
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
390
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
391
|
-
}, ArchivistModuleEventData, {
|
|
392
|
-
schema: string;
|
|
393
|
-
} & _xyo_network_payload_model.PayloadFields>>, config?: _xylabs_object.TypeCheckConfig): TType;
|
|
394
|
-
};
|
|
395
|
-
declare const withArchivistModule: <R>(mod: any, closure: (mod: ArchivistModule<_xylabs_object.BaseParamsFields & {
|
|
396
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
397
|
-
addToResolvers?: boolean;
|
|
398
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
399
|
-
allowNameResolution?: boolean;
|
|
400
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
401
|
-
parents?: ArchivistParents;
|
|
402
|
-
requireAllParents?: boolean;
|
|
403
|
-
schema: "network.xyo.archivist.config";
|
|
404
|
-
storage?: ArchivistStorage;
|
|
405
|
-
storeParentReads?: boolean;
|
|
406
|
-
}, "schema"> & {
|
|
407
|
-
schema: "network.xyo.archivist.config";
|
|
408
|
-
}, "schema"> & {
|
|
409
|
-
schema: string;
|
|
410
|
-
};
|
|
411
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
412
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
413
|
-
}, ArchivistModuleEventData>) => R) => R | undefined;
|
|
414
|
-
declare const withArchivistInstance: <R>(mod: any, closure: (mod: ArchivistInstance<_xylabs_object.BaseParamsFields & {
|
|
415
|
-
account?: _xyo_network_account_model.AccountInstance | "random";
|
|
416
|
-
addToResolvers?: boolean;
|
|
417
|
-
additionalSigners?: _xyo_network_account_model.AccountInstance[];
|
|
418
|
-
allowNameResolution?: boolean;
|
|
419
|
-
config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
|
|
420
|
-
parents?: ArchivistParents;
|
|
421
|
-
requireAllParents?: boolean;
|
|
422
|
-
schema: "network.xyo.archivist.config";
|
|
423
|
-
storage?: ArchivistStorage;
|
|
424
|
-
storeParentReads?: boolean;
|
|
425
|
-
}, "schema"> & {
|
|
426
|
-
schema: "network.xyo.archivist.config";
|
|
427
|
-
}, "schema"> & {
|
|
428
|
-
schema: string;
|
|
429
|
-
};
|
|
430
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
431
|
-
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
432
|
-
}, ArchivistModuleEventData, {
|
|
433
|
-
schema: string;
|
|
434
|
-
} & _xyo_network_payload_model.PayloadFields>) => R) => R | undefined;
|
|
435
|
-
|
|
436
|
-
export { type Archivist, type ArchivistAllQuery, ArchivistAllQuerySchema, type ArchivistClearQuery, ArchivistClearQuerySchema, type ArchivistCommitQuery, ArchivistCommitQuerySchema, type ArchivistConfig, ArchivistConfigSchema, type ArchivistDeleteQuery, ArchivistDeleteQuerySchema, type ArchivistGetQuery, ArchivistGetQuerySchema, type ArchivistInsertQuery, ArchivistInsertQuerySchema, type ArchivistInstance, type ArchivistLabels, type ArchivistModule, type ArchivistModuleEventData, type ArchivistModuleQueries, type ArchivistNextOptions, type ArchivistNextQuery, ArchivistNextQuerySchema, type ArchivistParams, type ArchivistParents, type ArchivistQueries, type ArchivistQueryFunctions, type ArchivistRawQueryFunctions, type ArchivistStorage, type AttachableArchivistInstance, type AttachableArchivistInstanceTypeCheck, type IndexDescription, type IndexDirection, IndexSeparator, IsAttachableArchivistInstanceFactory, type NextOptions, type ReadArchivist, type StashArchivist, type WriteArchivist, asArchivistInstance, asArchivistModule, asAttachableArchivistInstance, buildStandardIndexName, isArchivistInstance, isArchivistModule, isAttachableArchivistInstance, requiredAttachableArchivistInstanceFunctions, withArchivistInstance, withArchivistModule };
|
|
1
|
+
export * from './attachable/index.ts';
|
|
2
|
+
export * from './Config.ts';
|
|
3
|
+
export * from './EventData.ts';
|
|
4
|
+
export * from './IndexDescription.ts';
|
|
5
|
+
export * from './Instance.ts';
|
|
6
|
+
export * from './Labels.ts';
|
|
7
|
+
export * from './Module.ts';
|
|
8
|
+
export * from './NextOptions.ts';
|
|
9
|
+
export * from './Params.ts';
|
|
10
|
+
export * from './Queries/index.ts';
|
|
11
|
+
export * from './QueryFunctions.ts';
|
|
12
|
+
export * from './RawQueryFunctions.ts';
|
|
13
|
+
export * from './typeChecks.ts';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,uBAAuB,CAAA;AACrC,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/All.ts","../../src/Queries/Clear.ts","../../src/Queries/Commit.ts","../../src/Queries/Delete.ts","../../src/Queries/Get.ts","../../src/Queries/Insert.ts","../../src/Queries/Next.ts","../../src/attachable/AttachableInstance.ts","../../src/Config.ts","../../src/IndexDescription.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/object'\n\nimport { isAttachableArchivistInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableArchivistInstance = AsObjectFactory.create(isAttachableArchivistInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isArchivistInstance } from '../typeChecks.ts'\nimport type { AttachableArchivistInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableArchivistInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableArchivistInstance>()\n\nexport const isAttachableArchivistInstance: TypeCheck<AttachableArchivistInstance> = factory.create(requiredAttachableArchivistInstanceFunctions, [\n isArchivistInstance,\n isAttachableModuleInstance,\n])\n","import { AsObjectFactory } from '@xylabs/object'\nimport { IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory } from '@xyo-network/module-model'\n\nimport type { ArchivistInstance } from './Instance.ts'\nimport type { ArchivistModule } from './Module.ts'\nimport { ArchivistGetQuerySchema } from './Queries/index.ts'\n\nexport const isArchivistInstance = new IsInstanceFactory<ArchivistInstance>().create({ get: 'function' }, [isModuleInstance])\nexport const isArchivistModule = new IsModuleFactory<ArchivistModule>().create([ArchivistGetQuerySchema])\n\nexport const asArchivistModule = AsObjectFactory.create(isArchivistModule)\nexport const asArchivistInstance = AsObjectFactory.create(isArchivistInstance)\nexport const withArchivistModule = WithFactory.create(isArchivistModule)\nexport const withArchivistInstance = WithFactory.create(isArchivistInstance)\n","import type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistAllQuerySchema = 'network.xyo.query.archivist.all'\nexport const ArchivistAllQuerySchema: ArchivistAllQuerySchema = 'network.xyo.query.archivist.all'\n\nexport type ArchivistAllQuery = Query<{\n schema: ArchivistAllQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistClearQuerySchema = 'network.xyo.query.archivist.clear'\nexport const ArchivistClearQuerySchema: ArchivistClearQuerySchema = 'network.xyo.query.archivist.clear'\n\nexport type ArchivistClearQuery = Query<{\n schema: ArchivistClearQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistCommitQuerySchema = 'network.xyo.query.archivist.commit'\nexport const ArchivistCommitQuerySchema: ArchivistCommitQuerySchema = 'network.xyo.query.archivist.commit'\n\nexport type ArchivistCommitQuery = Query<{\n schema: ArchivistCommitQuerySchema\n}>\n","import type { Hash } from '@xylabs/hex'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistDeleteQuerySchema = 'network.xyo.query.archivist.delete'\nexport const ArchivistDeleteQuerySchema: ArchivistDeleteQuerySchema = 'network.xyo.query.archivist.delete'\n\nexport type ArchivistDeleteQuery = Query<{\n hashes: Hash[]\n schema: ArchivistDeleteQuerySchema\n}>\n","import type { Hash } from '@xylabs/hex'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistGetQuerySchema = 'network.xyo.query.archivist.get'\nexport const ArchivistGetQuerySchema: ArchivistGetQuerySchema = 'network.xyo.query.archivist.get'\n\nexport type ArchivistGetQuery = Query<{\n hashes: Hash[]\n schema: ArchivistGetQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistInsertQuerySchema = 'network.xyo.query.archivist.insert'\nexport const ArchivistInsertQuerySchema: ArchivistInsertQuerySchema = 'network.xyo.query.archivist.insert'\n\nexport type ArchivistInsertQuery = Query<{\n schema: ArchivistInsertQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nimport type { ArchivistNextOptions } from '../NextOptions.ts'\n\nexport type ArchivistNextQuerySchema = 'network.xyo.query.archivist.next'\nexport const ArchivistNextQuerySchema: ArchivistNextQuerySchema = 'network.xyo.query.archivist.next'\n\nexport type ArchivistNextQuery = Query<ArchivistNextOptions, ArchivistNextQuerySchema>\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport type { AttachableModuleInstance } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport type { ArchivistModuleEventData } from '../EventData.ts'\nimport type { ArchivistInstance } from '../Instance.ts'\nimport type { ArchivistModule } from '../Module.ts'\nimport type { ArchivistParams } from '../Params.ts'\n\nexport interface AttachableArchivistInstance<\n TParams extends ArchivistParams = ArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n TPayload extends Payload = Payload,\n> extends ArchivistModule<TParams, TEventData>,\n AttachableModuleInstance<TParams, TEventData>,\n ArchivistInstance<TParams, TEventData, TPayload> {}\n\nexport type AttachableArchivistInstanceTypeCheck<T extends AttachableArchivistInstance = AttachableArchivistInstance> = TypeCheck<T>\n\nexport class IsAttachableArchivistInstanceFactory<T extends AttachableArchivistInstance = AttachableArchivistInstance> extends IsObjectFactory<T> {}\n","import type { Address } from '@xylabs/hex'\nimport type { EmptyObject, WithAdditional } from '@xylabs/object'\nimport type { ModuleConfig } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport type { IndexDescription } from './IndexDescription.ts'\n\nexport interface ArchivistParents {\n commit?: Address[]\n read?: Address[]\n write?: Address[]\n}\n\nexport interface ArchivistStorage {\n /** The indexes to create on the object store */\n indexes?: IndexDescription[]\n}\n\nexport const ArchivistConfigSchema = 'network.xyo.archivist.config' as const\nexport type ArchivistConfigSchema = typeof ArchivistConfigSchema\n\nexport type ArchivistConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n /** @field address of one or more parent archivists to read from */\n parents?: ArchivistParents\n /** @field fail if some parents can not be resolved (true if unspecified) */\n requireAllParents?: boolean\n schema: TConfig extends Payload ? TConfig['schema'] : ArchivistConfigSchema\n /** @field storage configuration */\n storage?: ArchivistStorage\n /** @field should child store all reads from parents? */\n storeParentReads?: boolean\n },\n TConfig\n >,\n TSchema\n>\n","/**\n * The index direction (1 for ascending, -1 for descending)\n */\nexport type IndexDirection = -1 | 1\n\n/**\n * Description of index(es) to be created on a store\n */\nexport type IndexDescription = {\n /**\n * The key(s) to index\n */\n key:\n | {\n [key: string]: IndexDirection\n }\n | Map<string, IndexDirection>\n /**\n * Is the indexed value an array\n */\n multiEntry?: boolean\n /**\n * The name of the index\n */\n name?: string\n /**\n * If true, the index must enforce uniqueness on the key\n */\n unique?: boolean\n}\n\nexport const IndexSeparator = '-'\n\n/**\n * Given an index description, this will build the index\n * name in standard form\n * @param index The index description\n * @returns The index name in standard form\n */\nexport const buildStandardIndexName = (index: IndexDescription) => {\n const { key, unique } = index\n const prefix = unique ? 'UX' : 'IX'\n const indexKeys = Object.keys(key)\n return `${prefix}_${indexKeys.join(IndexSeparator)}`\n}\n"],"mappings":";;;;AAAA,SAASA,mBAAAA,wBAAuB;;;ACChC,SAASC,uBAAuB;AAChC,SAASC,kCAAkC;;;ACF3C,SAASC,uBAAuB;AAChC,SAASC,mBAAmBC,iBAAiBC,kBAAkBC,mBAAmB;;;ACE3E,IAAMC,0BAAmD;;;ACAzD,IAAMC,4BAAuD;;;ACA7D,IAAMC,6BAAyD;;;ACC/D,IAAMC,6BAAyD;;;ACA/D,IAAMC,0BAAmD;;;ACDzD,IAAMC,6BAAyD;;;ACE/D,IAAMC,2BAAqD;;;APE3D,IAAMC,sBAAsB,IAAIC,kBAAAA,EAAuCC,OAAO;EAAEC,KAAK;AAAW,GAAG;EAACC;CAAiB;AACrH,IAAMC,oBAAoB,IAAIC,gBAAAA,EAAmCJ,OAAO;EAACK;CAAwB;AAEjG,IAAMC,oBAAoBC,gBAAgBP,OAAOG,iBAAAA;AACjD,IAAMK,sBAAsBD,gBAAgBP,OAAOF,mBAAAA;AACnD,IAAMW,sBAAsBC,YAAYV,OAAOG,iBAAAA;AAC/C,IAAMQ,wBAAwBD,YAAYV,OAAOF,mBAAAA;;;ADNjD,IAAMc,+CAAgE,CAAC;AAG9E,IAAMC,UAAU,IAAIC,gBAAAA;AAEb,IAAMC,gCAAwEF,QAAQG,OAAOJ,8CAA8C;EAChJK;EACAC;CACD;;;ADXM,IAAMC,gCAAgCC,iBAAgBC,OAAOC,6BAAAA;;;AUHpE,SAASC,mBAAAA,wBAAuB;AAmBzB,IAAMC,uCAAN,cAAwHC,iBAAAA;EAnB/H,OAmB+HA;;;AAAoB;;;ACF5I,IAAMC,wBAAwB;;;ACa9B,IAAMC,iBAAiB;AAQvB,IAAMC,yBAAyB,wBAACC,UAAAA;AACrC,QAAM,EAAEC,KAAKC,OAAM,IAAKF;AACxB,QAAMG,SAASD,SAAS,OAAO;AAC/B,QAAME,YAAYC,OAAOC,KAAKL,GAAAA;AAC9B,SAAO,GAAGE,MAAAA,IAAUC,UAAUG,KAAKT,cAAAA,CAAAA;AACrC,GALsC;","names":["AsObjectFactory","IsObjectFactory","isAttachableModuleInstance","AsObjectFactory","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","ArchivistAllQuerySchema","ArchivistClearQuerySchema","ArchivistCommitQuerySchema","ArchivistDeleteQuerySchema","ArchivistGetQuerySchema","ArchivistInsertQuerySchema","ArchivistNextQuerySchema","isArchivistInstance","IsInstanceFactory","create","get","isModuleInstance","isArchivistModule","IsModuleFactory","ArchivistGetQuerySchema","asArchivistModule","AsObjectFactory","asArchivistInstance","withArchivistModule","WithFactory","withArchivistInstance","requiredAttachableArchivistInstanceFunctions","factory","IsObjectFactory","isAttachableArchivistInstance","create","isArchivistInstance","isAttachableModuleInstance","asAttachableArchivistInstance","AsObjectFactory","create","isAttachableArchivistInstance","IsObjectFactory","IsAttachableArchivistInstanceFactory","IsObjectFactory","ArchivistConfigSchema","IndexSeparator","buildStandardIndexName","index","key","unique","prefix","indexKeys","Object","keys","join"]}
|
|
1
|
+
{"version":3,"sources":["../../src/attachable/asAttachableInstance.ts","../../src/attachable/isAttachableInstance.ts","../../src/typeChecks.ts","../../src/Queries/All.ts","../../src/Queries/Clear.ts","../../src/Queries/Commit.ts","../../src/Queries/Delete.ts","../../src/Queries/Get.ts","../../src/Queries/Insert.ts","../../src/Queries/Next.ts","../../src/attachable/AttachableInstance.ts","../../src/Config.ts","../../src/IndexDescription.ts"],"sourcesContent":["import { AsObjectFactory } from '@xylabs/object'\n\nimport { isAttachableArchivistInstance } from './isAttachableInstance.ts'\n\nexport const asAttachableArchivistInstance = AsObjectFactory.create(isAttachableArchivistInstance)\n","import type { ObjectTypeShape, TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport { isAttachableModuleInstance } from '@xyo-network/module-model'\n\nimport { isArchivistInstance } from '../typeChecks.ts'\nimport type { AttachableArchivistInstance } from './AttachableInstance.ts'\n\nexport const requiredAttachableArchivistInstanceFunctions: ObjectTypeShape = {}\n\n// we do not use IsInstanceFactory here to prevent a cycle\nconst factory = new IsObjectFactory<AttachableArchivistInstance>()\n\nexport const isAttachableArchivistInstance: TypeCheck<AttachableArchivistInstance> = factory.create(requiredAttachableArchivistInstanceFunctions, [\n isArchivistInstance,\n isAttachableModuleInstance,\n])\n","import { AsObjectFactory } from '@xylabs/object'\nimport {\n IsInstanceFactory, IsModuleFactory, isModuleInstance, WithFactory,\n} from '@xyo-network/module-model'\n\nimport type { ArchivistInstance } from './Instance.ts'\nimport type { ArchivistModule } from './Module.ts'\nimport { ArchivistGetQuerySchema } from './Queries/index.ts'\n\nexport const isArchivistInstance = new IsInstanceFactory<ArchivistInstance>().create({ get: 'function' }, [isModuleInstance])\nexport const isArchivistModule = new IsModuleFactory<ArchivistModule>().create([ArchivistGetQuerySchema])\n\nexport const asArchivistModule = AsObjectFactory.create(isArchivistModule)\nexport const asArchivistInstance = AsObjectFactory.create(isArchivistInstance)\nexport const withArchivistModule = WithFactory.create(isArchivistModule)\nexport const withArchivistInstance = WithFactory.create(isArchivistInstance)\n","import type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistAllQuerySchema = 'network.xyo.query.archivist.all'\nexport const ArchivistAllQuerySchema: ArchivistAllQuerySchema = 'network.xyo.query.archivist.all'\n\nexport type ArchivistAllQuery = Query<{\n schema: ArchivistAllQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistClearQuerySchema = 'network.xyo.query.archivist.clear'\nexport const ArchivistClearQuerySchema: ArchivistClearQuerySchema = 'network.xyo.query.archivist.clear'\n\nexport type ArchivistClearQuery = Query<{\n schema: ArchivistClearQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistCommitQuerySchema = 'network.xyo.query.archivist.commit'\nexport const ArchivistCommitQuerySchema: ArchivistCommitQuerySchema = 'network.xyo.query.archivist.commit'\n\nexport type ArchivistCommitQuery = Query<{\n schema: ArchivistCommitQuerySchema\n}>\n","import type { Hash } from '@xylabs/hex'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistDeleteQuerySchema = 'network.xyo.query.archivist.delete'\nexport const ArchivistDeleteQuerySchema: ArchivistDeleteQuerySchema = 'network.xyo.query.archivist.delete'\n\nexport type ArchivistDeleteQuery = Query<{\n hashes: Hash[]\n schema: ArchivistDeleteQuerySchema\n}>\n","import type { Hash } from '@xylabs/hex'\nimport type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistGetQuerySchema = 'network.xyo.query.archivist.get'\nexport const ArchivistGetQuerySchema: ArchivistGetQuerySchema = 'network.xyo.query.archivist.get'\n\nexport type ArchivistGetQuery = Query<{\n hashes: Hash[]\n schema: ArchivistGetQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nexport type ArchivistInsertQuerySchema = 'network.xyo.query.archivist.insert'\nexport const ArchivistInsertQuerySchema: ArchivistInsertQuerySchema = 'network.xyo.query.archivist.insert'\n\nexport type ArchivistInsertQuery = Query<{\n schema: ArchivistInsertQuerySchema\n}>\n","import type { Query } from '@xyo-network/payload-model'\n\nimport type { ArchivistNextOptions } from '../NextOptions.ts'\n\nexport type ArchivistNextQuerySchema = 'network.xyo.query.archivist.next'\nexport const ArchivistNextQuerySchema: ArchivistNextQuerySchema = 'network.xyo.query.archivist.next'\n\nexport type ArchivistNextQuery = Query<ArchivistNextOptions, ArchivistNextQuerySchema>\n","import type { TypeCheck } from '@xylabs/object'\nimport { IsObjectFactory } from '@xylabs/object'\nimport type { AttachableModuleInstance } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport type { ArchivistModuleEventData } from '../EventData.ts'\nimport type { ArchivistInstance } from '../Instance.ts'\nimport type { ArchivistModule } from '../Module.ts'\nimport type { ArchivistParams } from '../Params.ts'\n\nexport interface AttachableArchivistInstance<\n TParams extends ArchivistParams = ArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n TPayload extends Payload = Payload,\n> extends ArchivistModule<TParams, TEventData>,\n AttachableModuleInstance<TParams, TEventData>,\n ArchivistInstance<TParams, TEventData, TPayload> {}\n\nexport type AttachableArchivistInstanceTypeCheck<T extends AttachableArchivistInstance = AttachableArchivistInstance> = TypeCheck<T>\n\nexport class IsAttachableArchivistInstanceFactory<T extends AttachableArchivistInstance = AttachableArchivistInstance> extends IsObjectFactory<T> {}\n","import type { Address } from '@xylabs/hex'\nimport type { EmptyObject, WithAdditional } from '@xylabs/object'\nimport type { ModuleConfig } from '@xyo-network/module-model'\nimport type { Payload } from '@xyo-network/payload-model'\n\nimport type { IndexDescription } from './IndexDescription.ts'\n\nexport interface ArchivistParents {\n commit?: Address[]\n read?: Address[]\n write?: Address[]\n}\n\nexport interface ArchivistStorage {\n /** The indexes to create on the object store */\n indexes?: IndexDescription[]\n}\n\nexport const ArchivistConfigSchema = 'network.xyo.archivist.config' as const\nexport type ArchivistConfigSchema = typeof ArchivistConfigSchema\n\nexport type ArchivistConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends string | void = void> = ModuleConfig<\n WithAdditional<\n {\n /** @field address of one or more parent archivists to read from */\n parents?: ArchivistParents\n /** @field fail if some parents can not be resolved (true if unspecified) */\n requireAllParents?: boolean\n schema: TConfig extends Payload ? TConfig['schema'] : ArchivistConfigSchema\n /** @field storage configuration */\n storage?: ArchivistStorage\n /** @field should child store all reads from parents? */\n storeParentReads?: boolean\n },\n TConfig\n >,\n TSchema\n>\n","/**\n * The index direction (1 for ascending, -1 for descending)\n */\nexport type IndexDirection = -1 | 1\n\n/**\n * Description of index(es) to be created on a store\n */\nexport type IndexDescription = {\n /**\n * The key(s) to index\n */\n key:\n | {\n [key: string]: IndexDirection\n }\n | Map<string, IndexDirection>\n /**\n * Is the indexed value an array\n */\n multiEntry?: boolean\n /**\n * The name of the index\n */\n name?: string\n /**\n * If true, the index must enforce uniqueness on the key\n */\n unique?: boolean\n}\n\nexport const IndexSeparator = '-'\n\n/**\n * Given an index description, this will build the index\n * name in standard form\n * @param index The index description\n * @returns The index name in standard form\n */\nexport const buildStandardIndexName = (index: IndexDescription) => {\n const { key, unique } = index\n const prefix = unique ? 'UX' : 'IX'\n const indexKeys = Object.keys(key)\n return `${prefix}_${indexKeys.join(IndexSeparator)}`\n}\n"],"mappings":";;;;AAAA,SAASA,mBAAAA,wBAAuB;;;ACChC,SAASC,uBAAuB;AAChC,SAASC,kCAAkC;;;ACF3C,SAASC,uBAAuB;AAChC,SACEC,mBAAmBC,iBAAiBC,kBAAkBC,mBACjD;;;ACAA,IAAMC,0BAAmD;;;ACAzD,IAAMC,4BAAuD;;;ACA7D,IAAMC,6BAAyD;;;ACC/D,IAAMC,6BAAyD;;;ACA/D,IAAMC,0BAAmD;;;ACDzD,IAAMC,6BAAyD;;;ACE/D,IAAMC,2BAAqD;;;API3D,IAAMC,sBAAsB,IAAIC,kBAAAA,EAAuCC,OAAO;EAAEC,KAAK;AAAW,GAAG;EAACC;CAAiB;AACrH,IAAMC,oBAAoB,IAAIC,gBAAAA,EAAmCJ,OAAO;EAACK;CAAwB;AAEjG,IAAMC,oBAAoBC,gBAAgBP,OAAOG,iBAAAA;AACjD,IAAMK,sBAAsBD,gBAAgBP,OAAOF,mBAAAA;AACnD,IAAMW,sBAAsBC,YAAYV,OAAOG,iBAAAA;AAC/C,IAAMQ,wBAAwBD,YAAYV,OAAOF,mBAAAA;;;ADRjD,IAAMc,+CAAgE,CAAC;AAG9E,IAAMC,UAAU,IAAIC,gBAAAA;AAEb,IAAMC,gCAAwEF,QAAQG,OAAOJ,8CAA8C;EAChJK;EACAC;CACD;;;ADXM,IAAMC,gCAAgCC,iBAAgBC,OAAOC,6BAAAA;;;AUHpE,SAASC,mBAAAA,wBAAuB;AAmBzB,IAAMC,uCAAN,cAAwHC,iBAAAA;EAnB/H,OAmB+HA;;;AAAoB;;;ACF5I,IAAMC,wBAAwB;;;ACa9B,IAAMC,iBAAiB;AAQvB,IAAMC,yBAAyB,wBAACC,UAAAA;AACrC,QAAM,EAAEC,KAAKC,OAAM,IAAKF;AACxB,QAAMG,SAASD,SAAS,OAAO;AAC/B,QAAME,YAAYC,OAAOC,KAAKL,GAAAA;AAC9B,SAAO,GAAGE,MAAAA,IAAUC,UAAUG,KAAKT,cAAAA,CAAAA;AACrC,GALsC;","names":["AsObjectFactory","IsObjectFactory","isAttachableModuleInstance","AsObjectFactory","IsInstanceFactory","IsModuleFactory","isModuleInstance","WithFactory","ArchivistAllQuerySchema","ArchivistClearQuerySchema","ArchivistCommitQuerySchema","ArchivistDeleteQuerySchema","ArchivistGetQuerySchema","ArchivistInsertQuerySchema","ArchivistNextQuerySchema","isArchivistInstance","IsInstanceFactory","create","get","isModuleInstance","isArchivistModule","IsModuleFactory","ArchivistGetQuerySchema","asArchivistModule","AsObjectFactory","asArchivistInstance","withArchivistModule","WithFactory","withArchivistInstance","requiredAttachableArchivistInstanceFunctions","factory","IsObjectFactory","isAttachableArchivistInstance","create","isArchivistInstance","isAttachableModuleInstance","asAttachableArchivistInstance","AsObjectFactory","create","isAttachableArchivistInstance","IsObjectFactory","IsAttachableArchivistInstanceFactory","IsObjectFactory","ArchivistConfigSchema","IndexSeparator","buildStandardIndexName","index","key","unique","prefix","indexKeys","Object","keys","join"]}
|