entropic-bond 1.50.0 → 1.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/auth/auth-mock.d.ts +22 -0
- package/lib/auth/auth-mock.spec.d.ts +1 -0
- package/lib/auth/auth.d.ts +131 -0
- package/lib/auth/user-auth-types.d.ts +19 -0
- package/lib/cloud-functions/cloud-functions-mock.d.ts +11 -0
- package/lib/cloud-functions/cloud-functions-mock.spec.d.ts +1 -0
- package/lib/cloud-functions/cloud-functions.d.ts +19 -0
- package/lib/cloud-storage/cloud-storage.d.ts +24 -0
- package/lib/cloud-storage/cloud-storage.spec.d.ts +1 -0
- package/lib/cloud-storage/mock-cloud-storage.d.ts +20 -0
- package/lib/cloud-storage/stored-file.d.ts +39 -0
- package/lib/entropic-bond.js +1667 -0
- package/lib/entropic-bond.umd.cjs +7 -0
- package/lib/index.d.ts +19 -0
- package/lib/observable/observable.d.ts +52 -0
- package/lib/observable/observable.spec.d.ts +1 -0
- package/lib/persistent/entropic-component.d.ts +76 -0
- package/lib/persistent/entropic-component.spec.d.ts +1 -0
- package/lib/persistent/persistent.d.ts +281 -0
- package/lib/persistent/persistent.spec.d.ts +67 -0
- package/lib/server-auth/server-auth-mock.d.ts +12 -0
- package/lib/server-auth/server-auth-mock.spec.d.ts +1 -0
- package/lib/server-auth/server-auth.d.ts +24 -0
- package/lib/store/data-source.d.ts +137 -0
- package/lib/store/json-data-source.d.ts +68 -0
- package/lib/store/json-data-source.spec.d.ts +1 -0
- package/lib/store/mocks/test-user.d.ts +49 -0
- package/lib/store/model.d.ts +238 -0
- package/lib/store/model.spec.d.ts +1 -0
- package/lib/store/store.d.ts +62 -0
- package/lib/store/store.spec.d.ts +1 -0
- package/lib/types/utility-types.d.ts +45 -0
- package/lib/types/utility-types.spec.d.ts +1 -0
- package/lib/utils/test-utils/test-person.d.ts +33 -0
- package/{src/utils/utils.ts → lib/utils/utils.d.ts} +10 -34
- package/lib/utils/utils.spec.d.ts +1 -0
- package/package.json +4 -1
- package/.github/workflows/release.yml +0 -26
- package/CHANGELOG.md +0 -1151
- package/docs/.nojekyll +0 -1
- package/docs/README.md +0 -94
- package/docs/classes/Auth.md +0 -391
- package/docs/classes/AuthMock.md +0 -278
- package/docs/classes/AuthService.md +0 -188
- package/docs/classes/CloudFunctions.md +0 -123
- package/docs/classes/CloudFunctionsMock.md +0 -97
- package/docs/classes/CloudStorage.md +0 -215
- package/docs/classes/DataSource.md +0 -248
- package/docs/classes/EntropicComponent.md +0 -666
- package/docs/classes/JsonDataSource.md +0 -328
- package/docs/classes/MockCloudStorage.md +0 -279
- package/docs/classes/Model.md +0 -274
- package/docs/classes/Observable.md +0 -120
- package/docs/classes/Persistent.md +0 -420
- package/docs/classes/ServerAuth.md +0 -211
- package/docs/classes/ServerAuthMock.md +0 -176
- package/docs/classes/ServerAuthService.md +0 -130
- package/docs/classes/Store.md +0 -218
- package/docs/classes/StoredFile.md +0 -636
- package/docs/enums/StoredFileEvent.md +0 -41
- package/docs/interfaces/AuthError.md +0 -30
- package/docs/interfaces/CloudFunctionsService.md +0 -69
- package/docs/interfaces/Collection.md +0 -13
- package/docs/interfaces/CustomCredentials.md +0 -7
- package/docs/interfaces/DocumentReference.md +0 -49
- package/docs/interfaces/JsonRawData.md +0 -7
- package/docs/interfaces/SignData.md +0 -63
- package/docs/interfaces/StoreParams.md +0 -52
- package/docs/interfaces/StoredFileChange.md +0 -41
- package/docs/interfaces/UploadControl.md +0 -90
- package/docs/interfaces/UserCredentials.md +0 -113
- package/docs/interfaces/Values.md +0 -17
- package/docs/modules.md +0 -1273
- package/src/auth/auth-mock.spec.ts +0 -168
- package/src/auth/auth-mock.ts +0 -129
- package/src/auth/auth.ts +0 -185
- package/src/auth/user-auth-types.ts +0 -21
- package/src/cloud-functions/cloud-functions-mock.spec.ts +0 -136
- package/src/cloud-functions/cloud-functions-mock.ts +0 -23
- package/src/cloud-functions/cloud-functions.ts +0 -83
- package/src/cloud-storage/cloud-storage.spec.ts +0 -207
- package/src/cloud-storage/cloud-storage.ts +0 -60
- package/src/cloud-storage/mock-cloud-storage.ts +0 -72
- package/src/cloud-storage/stored-file.ts +0 -102
- package/src/index.ts +0 -19
- package/src/observable/observable.spec.ts +0 -105
- package/src/observable/observable.ts +0 -67
- package/src/persistent/entropic-component.spec.ts +0 -143
- package/src/persistent/entropic-component.ts +0 -135
- package/src/persistent/persistent.spec.ts +0 -828
- package/src/persistent/persistent.ts +0 -650
- package/src/server-auth/server-auth-mock.spec.ts +0 -53
- package/src/server-auth/server-auth-mock.ts +0 -45
- package/src/server-auth/server-auth.ts +0 -49
- package/src/store/data-source.ts +0 -186
- package/src/store/json-data-source.spec.ts +0 -100
- package/src/store/json-data-source.ts +0 -256
- package/src/store/mocks/mock-data.json +0 -155
- package/src/store/mocks/test-user.ts +0 -122
- package/src/store/model.spec.ts +0 -659
- package/src/store/model.ts +0 -462
- package/src/store/store.spec.ts +0 -30
- package/src/store/store.ts +0 -113
- package/src/types/utility-types.spec.ts +0 -117
- package/src/types/utility-types.ts +0 -116
- package/src/utils/test-utils/test-person.ts +0 -44
- package/src/utils/utils.spec.ts +0 -95
- package/tsconfig-build.json +0 -7
- package/tsconfig-cjs.json +0 -9
- package/tsconfig.json +0 -33
- package/vite.config.ts +0 -22
|
@@ -1,636 +0,0 @@
|
|
|
1
|
-
[entropic-bond](../README.md) / [Exports](../modules.md) / StoredFile
|
|
2
|
-
|
|
3
|
-
# Class: StoredFile
|
|
4
|
-
|
|
5
|
-
A class that provides several methods to serialize and deserialize objects.
|
|
6
|
-
|
|
7
|
-
## Hierarchy
|
|
8
|
-
|
|
9
|
-
- [`Persistent`](Persistent.md)
|
|
10
|
-
|
|
11
|
-
↳ **`StoredFile`**
|
|
12
|
-
|
|
13
|
-
## Table of contents
|
|
14
|
-
|
|
15
|
-
### Constructors
|
|
16
|
-
|
|
17
|
-
- [constructor](StoredFile.md#constructor)
|
|
18
|
-
|
|
19
|
-
### Accessors
|
|
20
|
-
|
|
21
|
-
- [className](StoredFile.md#classname)
|
|
22
|
-
- [id](StoredFile.md#id)
|
|
23
|
-
- [originalFileName](StoredFile.md#originalfilename)
|
|
24
|
-
- [provider](StoredFile.md#provider)
|
|
25
|
-
- [url](StoredFile.md#url)
|
|
26
|
-
|
|
27
|
-
### Methods
|
|
28
|
-
|
|
29
|
-
- [beforeSerialize](StoredFile.md#beforeserialize)
|
|
30
|
-
- [clone](StoredFile.md#clone)
|
|
31
|
-
- [delete](StoredFile.md#delete)
|
|
32
|
-
- [fromObject](StoredFile.md#fromobject)
|
|
33
|
-
- [getPersistentProperties](StoredFile.md#getpersistentproperties)
|
|
34
|
-
- [onChange](StoredFile.md#onchange)
|
|
35
|
-
- [onSerialized](StoredFile.md#onserialized)
|
|
36
|
-
- [save](StoredFile.md#save)
|
|
37
|
-
- [setDataToStore](StoredFile.md#setdatatostore)
|
|
38
|
-
- [setId](StoredFile.md#setid)
|
|
39
|
-
- [toObject](StoredFile.md#toobject)
|
|
40
|
-
- [uploadControl](StoredFile.md#uploadcontrol)
|
|
41
|
-
- [annotations](StoredFile.md#annotations)
|
|
42
|
-
- [classFactory](StoredFile.md#classfactory)
|
|
43
|
-
- [classesExtending](StoredFile.md#classesextending)
|
|
44
|
-
- [createInstance](StoredFile.md#createinstance)
|
|
45
|
-
- [registerFactory](StoredFile.md#registerfactory)
|
|
46
|
-
- [registeredClasses](StoredFile.md#registeredclasses)
|
|
47
|
-
|
|
48
|
-
## Constructors
|
|
49
|
-
|
|
50
|
-
### constructor
|
|
51
|
-
|
|
52
|
-
• **new StoredFile**(`id?`)
|
|
53
|
-
|
|
54
|
-
Returns a new instance of Persistent class.
|
|
55
|
-
|
|
56
|
-
#### Parameters
|
|
57
|
-
|
|
58
|
-
| Name | Type |
|
|
59
|
-
| :------ | :------ |
|
|
60
|
-
| `id` | `string` |
|
|
61
|
-
|
|
62
|
-
#### Inherited from
|
|
63
|
-
|
|
64
|
-
[Persistent](Persistent.md).[constructor](Persistent.md#constructor)
|
|
65
|
-
|
|
66
|
-
#### Defined in
|
|
67
|
-
|
|
68
|
-
[persistent/persistent.ts:124](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L124)
|
|
69
|
-
|
|
70
|
-
## Accessors
|
|
71
|
-
|
|
72
|
-
### className
|
|
73
|
-
|
|
74
|
-
• `get` **className**(): `string`
|
|
75
|
-
|
|
76
|
-
Gets the class name of this instance.
|
|
77
|
-
|
|
78
|
-
#### Returns
|
|
79
|
-
|
|
80
|
-
`string`
|
|
81
|
-
|
|
82
|
-
#### Inherited from
|
|
83
|
-
|
|
84
|
-
Persistent.className
|
|
85
|
-
|
|
86
|
-
#### Defined in
|
|
87
|
-
|
|
88
|
-
[persistent/persistent.ts:131](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L131)
|
|
89
|
-
|
|
90
|
-
___
|
|
91
|
-
|
|
92
|
-
### id
|
|
93
|
-
|
|
94
|
-
• `get` **id**(): `string`
|
|
95
|
-
|
|
96
|
-
Returns the id of this instance.
|
|
97
|
-
|
|
98
|
-
#### Returns
|
|
99
|
-
|
|
100
|
-
`string`
|
|
101
|
-
|
|
102
|
-
the id of this instance
|
|
103
|
-
|
|
104
|
-
#### Inherited from
|
|
105
|
-
|
|
106
|
-
Persistent.id
|
|
107
|
-
|
|
108
|
-
#### Defined in
|
|
109
|
-
|
|
110
|
-
[persistent/persistent.ts:147](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L147)
|
|
111
|
-
|
|
112
|
-
___
|
|
113
|
-
|
|
114
|
-
### originalFileName
|
|
115
|
-
|
|
116
|
-
• `get` **originalFileName**(): `string`
|
|
117
|
-
|
|
118
|
-
#### Returns
|
|
119
|
-
|
|
120
|
-
`string`
|
|
121
|
-
|
|
122
|
-
#### Defined in
|
|
123
|
-
|
|
124
|
-
[cloud-storage/stored-file.ts:81](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L81)
|
|
125
|
-
|
|
126
|
-
___
|
|
127
|
-
|
|
128
|
-
### provider
|
|
129
|
-
|
|
130
|
-
• `get` **provider**(): [`CloudStorage`](CloudStorage.md)
|
|
131
|
-
|
|
132
|
-
#### Returns
|
|
133
|
-
|
|
134
|
-
[`CloudStorage`](CloudStorage.md)
|
|
135
|
-
|
|
136
|
-
#### Defined in
|
|
137
|
-
|
|
138
|
-
[cloud-storage/stored-file.ts:54](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L54)
|
|
139
|
-
|
|
140
|
-
• `set` **provider**(`value`): `void`
|
|
141
|
-
|
|
142
|
-
#### Parameters
|
|
143
|
-
|
|
144
|
-
| Name | Type |
|
|
145
|
-
| :------ | :------ |
|
|
146
|
-
| `value` | [`CloudStorage`](CloudStorage.md) |
|
|
147
|
-
|
|
148
|
-
#### Returns
|
|
149
|
-
|
|
150
|
-
`void`
|
|
151
|
-
|
|
152
|
-
#### Defined in
|
|
153
|
-
|
|
154
|
-
[cloud-storage/stored-file.ts:49](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L49)
|
|
155
|
-
|
|
156
|
-
___
|
|
157
|
-
|
|
158
|
-
### url
|
|
159
|
-
|
|
160
|
-
• `get` **url**(): `string`
|
|
161
|
-
|
|
162
|
-
#### Returns
|
|
163
|
-
|
|
164
|
-
`string`
|
|
165
|
-
|
|
166
|
-
#### Defined in
|
|
167
|
-
|
|
168
|
-
[cloud-storage/stored-file.ts:66](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L66)
|
|
169
|
-
|
|
170
|
-
## Methods
|
|
171
|
-
|
|
172
|
-
### beforeSerialize
|
|
173
|
-
|
|
174
|
-
▸ `Protected` **beforeSerialize**(): `void`
|
|
175
|
-
|
|
176
|
-
This method is called by the persistence engine before the instance is
|
|
177
|
-
serialized.
|
|
178
|
-
|
|
179
|
-
#### Returns
|
|
180
|
-
|
|
181
|
-
`void`
|
|
182
|
-
|
|
183
|
-
#### Inherited from
|
|
184
|
-
|
|
185
|
-
[Persistent](Persistent.md).[beforeSerialize](Persistent.md#beforeserialize)
|
|
186
|
-
|
|
187
|
-
#### Defined in
|
|
188
|
-
|
|
189
|
-
[persistent/persistent.ts:161](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L161)
|
|
190
|
-
|
|
191
|
-
___
|
|
192
|
-
|
|
193
|
-
### clone
|
|
194
|
-
|
|
195
|
-
▸ **clone**(`instance`): `void`
|
|
196
|
-
|
|
197
|
-
Copy the persistent properties of the given instance to this instance.
|
|
198
|
-
The property `id` will be ignored.
|
|
199
|
-
Only the properties that are not null or undefined will be copied.
|
|
200
|
-
|
|
201
|
-
**`See`**
|
|
202
|
-
|
|
203
|
-
- fromObject
|
|
204
|
-
- toObject
|
|
205
|
-
|
|
206
|
-
#### Parameters
|
|
207
|
-
|
|
208
|
-
| Name | Type | Description |
|
|
209
|
-
| :------ | :------ | :------ |
|
|
210
|
-
| `instance` | [`Persistent`](Persistent.md) | the instance to be copied |
|
|
211
|
-
|
|
212
|
-
#### Returns
|
|
213
|
-
|
|
214
|
-
`void`
|
|
215
|
-
|
|
216
|
-
this instance
|
|
217
|
-
|
|
218
|
-
#### Inherited from
|
|
219
|
-
|
|
220
|
-
[Persistent](Persistent.md).[clone](Persistent.md#clone)
|
|
221
|
-
|
|
222
|
-
#### Defined in
|
|
223
|
-
|
|
224
|
-
[persistent/persistent.ts:183](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L183)
|
|
225
|
-
|
|
226
|
-
___
|
|
227
|
-
|
|
228
|
-
### delete
|
|
229
|
-
|
|
230
|
-
▸ **delete**(): `Promise`<`void`\>
|
|
231
|
-
|
|
232
|
-
#### Returns
|
|
233
|
-
|
|
234
|
-
`Promise`<`void`\>
|
|
235
|
-
|
|
236
|
-
#### Defined in
|
|
237
|
-
|
|
238
|
-
[cloud-storage/stored-file.ts:41](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L41)
|
|
239
|
-
|
|
240
|
-
___
|
|
241
|
-
|
|
242
|
-
### fromObject
|
|
243
|
-
|
|
244
|
-
▸ **fromObject**(`obj`): [`StoredFile`](StoredFile.md)
|
|
245
|
-
|
|
246
|
-
Initializes the persistent properties of this instance from the properties
|
|
247
|
-
of given object.
|
|
248
|
-
|
|
249
|
-
**`See`**
|
|
250
|
-
|
|
251
|
-
- clone
|
|
252
|
-
- toObject
|
|
253
|
-
|
|
254
|
-
#### Parameters
|
|
255
|
-
|
|
256
|
-
| Name | Type | Description |
|
|
257
|
-
| :------ | :------ | :------ |
|
|
258
|
-
| `obj` | [`PersistentObject`](../modules.md#persistentobject)<[`StoredFile`](StoredFile.md)\> | the object to be copied |
|
|
259
|
-
|
|
260
|
-
#### Returns
|
|
261
|
-
|
|
262
|
-
[`StoredFile`](StoredFile.md)
|
|
263
|
-
|
|
264
|
-
this instance
|
|
265
|
-
|
|
266
|
-
#### Inherited from
|
|
267
|
-
|
|
268
|
-
[Persistent](Persistent.md).[fromObject](Persistent.md#fromobject)
|
|
269
|
-
|
|
270
|
-
#### Defined in
|
|
271
|
-
|
|
272
|
-
[persistent/persistent.ts:197](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L197)
|
|
273
|
-
|
|
274
|
-
___
|
|
275
|
-
|
|
276
|
-
### getPersistentProperties
|
|
277
|
-
|
|
278
|
-
▸ **getPersistentProperties**(): readonly `PersistentProperty`[]
|
|
279
|
-
|
|
280
|
-
Returns an array of the persistent properties of this instance.
|
|
281
|
-
|
|
282
|
-
#### Returns
|
|
283
|
-
|
|
284
|
-
readonly `PersistentProperty`[]
|
|
285
|
-
|
|
286
|
-
an array of the persistent properties of this instance
|
|
287
|
-
|
|
288
|
-
#### Inherited from
|
|
289
|
-
|
|
290
|
-
[Persistent](Persistent.md).[getPersistentProperties](Persistent.md#getpersistentproperties)
|
|
291
|
-
|
|
292
|
-
#### Defined in
|
|
293
|
-
|
|
294
|
-
[persistent/persistent.ts:167](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L167)
|
|
295
|
-
|
|
296
|
-
___
|
|
297
|
-
|
|
298
|
-
### onChange
|
|
299
|
-
|
|
300
|
-
▸ **onChange**(`listenerCallback`): [`Unsubscriber`](../modules.md#unsubscriber)
|
|
301
|
-
|
|
302
|
-
#### Parameters
|
|
303
|
-
|
|
304
|
-
| Name | Type |
|
|
305
|
-
| :------ | :------ |
|
|
306
|
-
| `listenerCallback` | [`Callback`](../modules.md#callback)<[`StoredFileChange`](../interfaces/StoredFileChange.md)\> |
|
|
307
|
-
|
|
308
|
-
#### Returns
|
|
309
|
-
|
|
310
|
-
[`Unsubscriber`](../modules.md#unsubscriber)
|
|
311
|
-
|
|
312
|
-
#### Defined in
|
|
313
|
-
|
|
314
|
-
[cloud-storage/stored-file.ts:85](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L85)
|
|
315
|
-
|
|
316
|
-
___
|
|
317
|
-
|
|
318
|
-
### onSerialized
|
|
319
|
-
|
|
320
|
-
▸ `Protected` **onSerialized**(): `void`
|
|
321
|
-
|
|
322
|
-
This method is called by the persistence engine when the instance has been
|
|
323
|
-
just serialized. It is called after the properties are initialized.
|
|
324
|
-
|
|
325
|
-
#### Returns
|
|
326
|
-
|
|
327
|
-
`void`
|
|
328
|
-
|
|
329
|
-
#### Inherited from
|
|
330
|
-
|
|
331
|
-
[Persistent](Persistent.md).[onSerialized](Persistent.md#onserialized)
|
|
332
|
-
|
|
333
|
-
#### Defined in
|
|
334
|
-
|
|
335
|
-
[persistent/persistent.ts:155](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L155)
|
|
336
|
-
|
|
337
|
-
___
|
|
338
|
-
|
|
339
|
-
### save
|
|
340
|
-
|
|
341
|
-
▸ **save**(`«destructured»?`): `Promise`<`void`\>
|
|
342
|
-
|
|
343
|
-
#### Parameters
|
|
344
|
-
|
|
345
|
-
| Name | Type |
|
|
346
|
-
| :------ | :------ |
|
|
347
|
-
| `«destructured»` | [`StoreParams`](../interfaces/StoreParams.md) |
|
|
348
|
-
|
|
349
|
-
#### Returns
|
|
350
|
-
|
|
351
|
-
`Promise`<`void`\>
|
|
352
|
-
|
|
353
|
-
#### Defined in
|
|
354
|
-
|
|
355
|
-
[cloud-storage/stored-file.ts:22](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L22)
|
|
356
|
-
|
|
357
|
-
___
|
|
358
|
-
|
|
359
|
-
### setDataToStore
|
|
360
|
-
|
|
361
|
-
▸ **setDataToStore**(`data`): [`StoredFile`](StoredFile.md)
|
|
362
|
-
|
|
363
|
-
#### Parameters
|
|
364
|
-
|
|
365
|
-
| Name | Type |
|
|
366
|
-
| :------ | :------ |
|
|
367
|
-
| `data` | [`StorableData`](../modules.md#storabledata) |
|
|
368
|
-
|
|
369
|
-
#### Returns
|
|
370
|
-
|
|
371
|
-
[`StoredFile`](StoredFile.md)
|
|
372
|
-
|
|
373
|
-
#### Defined in
|
|
374
|
-
|
|
375
|
-
[cloud-storage/stored-file.ts:70](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L70)
|
|
376
|
-
|
|
377
|
-
___
|
|
378
|
-
|
|
379
|
-
### setId
|
|
380
|
-
|
|
381
|
-
▸ `Protected` **setId**(`value`): `void`
|
|
382
|
-
|
|
383
|
-
Sets the id of this instance.
|
|
384
|
-
|
|
385
|
-
#### Parameters
|
|
386
|
-
|
|
387
|
-
| Name | Type | Description |
|
|
388
|
-
| :------ | :------ | :------ |
|
|
389
|
-
| `value` | `string` | the id of this instance |
|
|
390
|
-
|
|
391
|
-
#### Returns
|
|
392
|
-
|
|
393
|
-
`void`
|
|
394
|
-
|
|
395
|
-
#### Inherited from
|
|
396
|
-
|
|
397
|
-
[Persistent](Persistent.md).[setId](Persistent.md#setid)
|
|
398
|
-
|
|
399
|
-
#### Defined in
|
|
400
|
-
|
|
401
|
-
[persistent/persistent.ts:139](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L139)
|
|
402
|
-
|
|
403
|
-
___
|
|
404
|
-
|
|
405
|
-
### toObject
|
|
406
|
-
|
|
407
|
-
▸ **toObject**(): [`PersistentObject`](../modules.md#persistentobject)<[`StoredFile`](StoredFile.md)\>
|
|
408
|
-
|
|
409
|
-
Returns a plain object representation of this instance.
|
|
410
|
-
Only the properties that are not null or undefined will be copied.
|
|
411
|
-
|
|
412
|
-
**`See`**
|
|
413
|
-
|
|
414
|
-
- fromObject
|
|
415
|
-
- clone
|
|
416
|
-
|
|
417
|
-
#### Returns
|
|
418
|
-
|
|
419
|
-
[`PersistentObject`](../modules.md#persistentobject)<[`StoredFile`](StoredFile.md)\>
|
|
420
|
-
|
|
421
|
-
a plain object representation of this instance
|
|
422
|
-
|
|
423
|
-
#### Inherited from
|
|
424
|
-
|
|
425
|
-
[Persistent](Persistent.md).[toObject](Persistent.md#toobject)
|
|
426
|
-
|
|
427
|
-
#### Defined in
|
|
428
|
-
|
|
429
|
-
[persistent/persistent.ts:225](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L225)
|
|
430
|
-
|
|
431
|
-
___
|
|
432
|
-
|
|
433
|
-
### uploadControl
|
|
434
|
-
|
|
435
|
-
▸ **uploadControl**(): [`UploadControl`](../interfaces/UploadControl.md)
|
|
436
|
-
|
|
437
|
-
#### Returns
|
|
438
|
-
|
|
439
|
-
[`UploadControl`](../interfaces/UploadControl.md)
|
|
440
|
-
|
|
441
|
-
#### Defined in
|
|
442
|
-
|
|
443
|
-
[cloud-storage/stored-file.ts:37](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L37)
|
|
444
|
-
|
|
445
|
-
___
|
|
446
|
-
|
|
447
|
-
### annotations
|
|
448
|
-
|
|
449
|
-
▸ `Static` **annotations**(`className`): `unknown`
|
|
450
|
-
|
|
451
|
-
Returns the annotation associated with a registered class
|
|
452
|
-
|
|
453
|
-
**`Throws`**
|
|
454
|
-
|
|
455
|
-
an error if the class is not registered
|
|
456
|
-
|
|
457
|
-
**`See`**
|
|
458
|
-
|
|
459
|
-
registerFactory
|
|
460
|
-
|
|
461
|
-
#### Parameters
|
|
462
|
-
|
|
463
|
-
| Name | Type | Description |
|
|
464
|
-
| :------ | :------ | :------ |
|
|
465
|
-
| `className` | `string` \| [`Persistent`](Persistent.md) \| [`PersistentConstructor`](../modules.md#persistentconstructor) | the name of the class to be retrieved |
|
|
466
|
-
|
|
467
|
-
#### Returns
|
|
468
|
-
|
|
469
|
-
`unknown`
|
|
470
|
-
|
|
471
|
-
the annotation associated with the class
|
|
472
|
-
|
|
473
|
-
#### Inherited from
|
|
474
|
-
|
|
475
|
-
[Persistent](Persistent.md).[annotations](Persistent.md#annotations)
|
|
476
|
-
|
|
477
|
-
#### Defined in
|
|
478
|
-
|
|
479
|
-
[persistent/persistent.ts:111](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L111)
|
|
480
|
-
|
|
481
|
-
___
|
|
482
|
-
|
|
483
|
-
### classFactory
|
|
484
|
-
|
|
485
|
-
▸ `Static` **classFactory**(`className`): [`PersistentConstructor`](../modules.md#persistentconstructor)
|
|
486
|
-
|
|
487
|
-
Returns the constructor of a registered class
|
|
488
|
-
|
|
489
|
-
**`Throws`**
|
|
490
|
-
|
|
491
|
-
an error if the class is not registered
|
|
492
|
-
|
|
493
|
-
**`See`**
|
|
494
|
-
|
|
495
|
-
- registerFactory
|
|
496
|
-
- registeredClasses
|
|
497
|
-
- classesExtending
|
|
498
|
-
- annotations
|
|
499
|
-
|
|
500
|
-
#### Parameters
|
|
501
|
-
|
|
502
|
-
| Name | Type | Description |
|
|
503
|
-
| :------ | :------ | :------ |
|
|
504
|
-
| `className` | `string` | the name of the class to be retrieved |
|
|
505
|
-
|
|
506
|
-
#### Returns
|
|
507
|
-
|
|
508
|
-
[`PersistentConstructor`](../modules.md#persistentconstructor)
|
|
509
|
-
|
|
510
|
-
the constructor of the class
|
|
511
|
-
|
|
512
|
-
#### Inherited from
|
|
513
|
-
|
|
514
|
-
[Persistent](Persistent.md).[classFactory](Persistent.md#classfactory)
|
|
515
|
-
|
|
516
|
-
#### Defined in
|
|
517
|
-
|
|
518
|
-
[persistent/persistent.ts:76](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L76)
|
|
519
|
-
|
|
520
|
-
___
|
|
521
|
-
|
|
522
|
-
### classesExtending
|
|
523
|
-
|
|
524
|
-
▸ `Static` **classesExtending**(`derivedFrom`): `string`[]
|
|
525
|
-
|
|
526
|
-
Returns the names of all registered classes that extend a given class
|
|
527
|
-
|
|
528
|
-
**`See`**
|
|
529
|
-
|
|
530
|
-
- registerFactory
|
|
531
|
-
- classFactory
|
|
532
|
-
|
|
533
|
-
#### Parameters
|
|
534
|
-
|
|
535
|
-
| Name | Type | Description |
|
|
536
|
-
| :------ | :------ | :------ |
|
|
537
|
-
| `derivedFrom` | `Function` \| [`PersistentConstructor`](../modules.md#persistentconstructor) | the class to be extended |
|
|
538
|
-
|
|
539
|
-
#### Returns
|
|
540
|
-
|
|
541
|
-
`string`[]
|
|
542
|
-
|
|
543
|
-
the names of all registered classes that extend the given class
|
|
544
|
-
|
|
545
|
-
#### Inherited from
|
|
546
|
-
|
|
547
|
-
[Persistent](Persistent.md).[classesExtending](Persistent.md#classesextending)
|
|
548
|
-
|
|
549
|
-
#### Defined in
|
|
550
|
-
|
|
551
|
-
[persistent/persistent.ts:98](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L98)
|
|
552
|
-
|
|
553
|
-
___
|
|
554
|
-
|
|
555
|
-
### createInstance
|
|
556
|
-
|
|
557
|
-
▸ `Static` **createInstance**<`T`\>(`obj`): `T`
|
|
558
|
-
|
|
559
|
-
#### Type parameters
|
|
560
|
-
|
|
561
|
-
| Name | Type |
|
|
562
|
-
| :------ | :------ |
|
|
563
|
-
| `T` | extends [`Persistent`](Persistent.md)<`T`\> |
|
|
564
|
-
|
|
565
|
-
#### Parameters
|
|
566
|
-
|
|
567
|
-
| Name | Type |
|
|
568
|
-
| :------ | :------ |
|
|
569
|
-
| `obj` | `string` \| [`PersistentObject`](../modules.md#persistentobject)<`T`\> |
|
|
570
|
-
|
|
571
|
-
#### Returns
|
|
572
|
-
|
|
573
|
-
`T`
|
|
574
|
-
|
|
575
|
-
#### Inherited from
|
|
576
|
-
|
|
577
|
-
[Persistent](Persistent.md).[createInstance](Persistent.md#createinstance)
|
|
578
|
-
|
|
579
|
-
#### Defined in
|
|
580
|
-
|
|
581
|
-
[persistent/persistent.ts:384](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L384)
|
|
582
|
-
|
|
583
|
-
___
|
|
584
|
-
|
|
585
|
-
### registerFactory
|
|
586
|
-
|
|
587
|
-
▸ `Static` **registerFactory**(`className`, `factory`, `annotation?`): `void`
|
|
588
|
-
|
|
589
|
-
Registers a class to be used by the persistence engine.
|
|
590
|
-
|
|
591
|
-
#### Parameters
|
|
592
|
-
|
|
593
|
-
| Name | Type | Description |
|
|
594
|
-
| :------ | :------ | :------ |
|
|
595
|
-
| `className` | `string` | the name of the class to be registered |
|
|
596
|
-
| `factory` | [`PersistentConstructor`](../modules.md#persistentconstructor) | the constructor of the registered class |
|
|
597
|
-
| `annotation?` | `unknown` | an annotation associated with the class |
|
|
598
|
-
|
|
599
|
-
#### Returns
|
|
600
|
-
|
|
601
|
-
`void`
|
|
602
|
-
|
|
603
|
-
#### Inherited from
|
|
604
|
-
|
|
605
|
-
[Persistent](Persistent.md).[registerFactory](Persistent.md#registerfactory)
|
|
606
|
-
|
|
607
|
-
#### Defined in
|
|
608
|
-
|
|
609
|
-
[persistent/persistent.ts:62](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L62)
|
|
610
|
-
|
|
611
|
-
___
|
|
612
|
-
|
|
613
|
-
### registeredClasses
|
|
614
|
-
|
|
615
|
-
▸ `Static` **registeredClasses**(): `string`[]
|
|
616
|
-
|
|
617
|
-
Returns the names of all registered classes
|
|
618
|
-
|
|
619
|
-
**`See`**
|
|
620
|
-
|
|
621
|
-
- registerFactory
|
|
622
|
-
- classFactory
|
|
623
|
-
|
|
624
|
-
#### Returns
|
|
625
|
-
|
|
626
|
-
`string`[]
|
|
627
|
-
|
|
628
|
-
the names of all registered classes
|
|
629
|
-
|
|
630
|
-
#### Inherited from
|
|
631
|
-
|
|
632
|
-
[Persistent](Persistent.md).[registeredClasses](Persistent.md#registeredclasses)
|
|
633
|
-
|
|
634
|
-
#### Defined in
|
|
635
|
-
|
|
636
|
-
[persistent/persistent.ts:87](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/persistent/persistent.ts#L87)
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
[entropic-bond](../README.md) / [Exports](../modules.md) / StoredFileEvent
|
|
2
|
-
|
|
3
|
-
# Enumeration: StoredFileEvent
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
6
|
-
|
|
7
|
-
### Enumeration Members
|
|
8
|
-
|
|
9
|
-
- [deleted](StoredFileEvent.md#deleted)
|
|
10
|
-
- [pendingDataSet](StoredFileEvent.md#pendingdataset)
|
|
11
|
-
- [stored](StoredFileEvent.md#stored)
|
|
12
|
-
|
|
13
|
-
## Enumeration Members
|
|
14
|
-
|
|
15
|
-
### deleted
|
|
16
|
-
|
|
17
|
-
• **deleted** = ``2``
|
|
18
|
-
|
|
19
|
-
#### Defined in
|
|
20
|
-
|
|
21
|
-
[cloud-storage/stored-file.ts:5](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L5)
|
|
22
|
-
|
|
23
|
-
___
|
|
24
|
-
|
|
25
|
-
### pendingDataSet
|
|
26
|
-
|
|
27
|
-
• **pendingDataSet** = ``1``
|
|
28
|
-
|
|
29
|
-
#### Defined in
|
|
30
|
-
|
|
31
|
-
[cloud-storage/stored-file.ts:5](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L5)
|
|
32
|
-
|
|
33
|
-
___
|
|
34
|
-
|
|
35
|
-
### stored
|
|
36
|
-
|
|
37
|
-
• **stored** = ``0``
|
|
38
|
-
|
|
39
|
-
#### Defined in
|
|
40
|
-
|
|
41
|
-
[cloud-storage/stored-file.ts:5](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/cloud-storage/stored-file.ts#L5)
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
[entropic-bond](../README.md) / [Exports](../modules.md) / AuthError
|
|
2
|
-
|
|
3
|
-
# Interface: AuthError
|
|
4
|
-
|
|
5
|
-
## Table of contents
|
|
6
|
-
|
|
7
|
-
### Properties
|
|
8
|
-
|
|
9
|
-
- [code](AuthError.md#code)
|
|
10
|
-
- [message](AuthError.md#message)
|
|
11
|
-
|
|
12
|
-
## Properties
|
|
13
|
-
|
|
14
|
-
### code
|
|
15
|
-
|
|
16
|
-
• **code**: [`AuthErrorCode`](../modules.md#autherrorcode)
|
|
17
|
-
|
|
18
|
-
#### Defined in
|
|
19
|
-
|
|
20
|
-
[auth/auth.ts:21](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/auth/auth.ts#L21)
|
|
21
|
-
|
|
22
|
-
___
|
|
23
|
-
|
|
24
|
-
### message
|
|
25
|
-
|
|
26
|
-
• **message**: `string`
|
|
27
|
-
|
|
28
|
-
#### Defined in
|
|
29
|
-
|
|
30
|
-
[auth/auth.ts:22](https://github.com/entropic-bond/entropic-bond/blob/c9dd385/src/auth/auth.ts#L22)
|