@arrai-innovations/reactive-helpers 13.1.0 → 14.0.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.
Files changed (51) hide show
  1. package/README.md +11 -1
  2. package/config/listCrud.js +4 -1
  3. package/config/objectCrud.js +10 -4
  4. package/docs/README.md +1 -1
  5. package/docs/config/listCrud.md +20 -2
  6. package/docs/config/objectCrud.md +51 -15
  7. package/docs/use/list.md +6 -0
  8. package/docs/use/listCalculated.md +58 -39
  9. package/docs/use/listFilter.md +57 -39
  10. package/docs/use/listInstance.md +29 -11
  11. package/docs/use/listRelated.md +47 -28
  12. package/docs/use/listSearch.md +40 -28
  13. package/docs/use/listSort.md +58 -39
  14. package/docs/use/listSubscription.md +8 -2
  15. package/docs/use/object.md +28 -14
  16. package/docs/use/objectCalculated.md +26 -13
  17. package/docs/use/objectInstance.md +49 -24
  18. package/docs/use/objectRelated.md +27 -14
  19. package/docs/use/objectSubscription.md +18 -9
  20. package/docs/use/paginatedListInstance.md +8 -2
  21. package/docs/use/search.md +8 -2
  22. package/docs/utils/{getFakeId.md → getFakePk.md} +7 -7
  23. package/index.js +1 -1
  24. package/package.json +1 -1
  25. package/tests/unit/use/listCalculated.spec.js +4 -4
  26. package/tests/unit/use/listFilter.spec.js +10 -9
  27. package/tests/unit/use/listInstance.spec.js +147 -23
  28. package/tests/unit/use/listRelated.spec.js +5 -5
  29. package/tests/unit/use/listSearch.spec.js +14 -12
  30. package/tests/unit/use/listSort.spec.js +8 -1
  31. package/tests/unit/use/listSubscription.spec.js +119 -10
  32. package/tests/unit/use/objectInstance.spec.js +575 -46
  33. package/tests/unit/use/objectSubscription.spec.js +152 -23
  34. package/tests/unit/use/search.spec.js +11 -11
  35. package/use/list.js +1 -0
  36. package/use/listCalculated.js +3 -2
  37. package/use/listFilter.js +9 -9
  38. package/use/listInstance.js +39 -28
  39. package/use/listKeys.js +4 -3
  40. package/use/listRelated.js +23 -22
  41. package/use/listSearch.js +37 -33
  42. package/use/listSort.js +1 -0
  43. package/use/listSubscription.js +25 -15
  44. package/use/object.js +8 -13
  45. package/use/objectCalculated.js +2 -1
  46. package/use/objectInstance.js +29 -14
  47. package/use/objectRelated.js +3 -2
  48. package/use/objectSubscription.js +31 -11
  49. package/use/paginatedListInstance.js +1 -1
  50. package/use/search.js +13 -4
  51. package/utils/{getFakeId.js → getFakePk.js} +4 -4
@@ -64,7 +64,7 @@ The calculated objects.
64
64
 
65
65
  ###### Index Signature
66
66
 
67
- \[`id`: `string`\]: `object`
67
+ \[`pk`: `string`\]: `object`
68
68
 
69
69
  ###### calculatedObjectsParentStateObjectsWatchRunning
70
70
 
@@ -130,15 +130,15 @@ Indicates if an error occurred during the last operation.
130
130
 
131
131
  Function to determine if an item should be excluded based on custom logic.
132
132
 
133
- ###### fkForIdAndRule
133
+ ###### fkForPkAndRule
134
134
 
135
- > **fkForIdAndRule**: `object`
135
+ > **fkForPkAndRule**: `object`
136
136
 
137
- Maintains computed references to the foreign keys for each object ID and rule, crucial for navigating complex data relationships.
137
+ Maintains computed references to the foreign keys for each object pk and rule, crucial for navigating complex data relationships.
138
138
 
139
139
  ###### Index Signature
140
140
 
141
- \[`id`: `string`\]: `object`
141
+ \[`pk`: `string`\]: `object`
142
142
 
143
143
  ###### inResults
144
144
 
@@ -170,21 +170,21 @@ Arguments passed to the server for listing operations.
170
170
 
171
171
  Indicates if the list is currently loading.
172
172
 
173
- ###### objAndKeyForIdAndRule
173
+ ###### objAndKeyForPkAndRule
174
174
 
175
- > **objAndKeyForIdAndRule**: `object`
175
+ > **objAndKeyForPkAndRule**: `object`
176
176
 
177
- Maps each object ID and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
177
+ Maps each object pk and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
178
178
 
179
179
  ###### Index Signature
180
180
 
181
- \[`id`: `string`\]: `object`
181
+ \[`pk`: `string`\]: `object`
182
182
 
183
183
  ###### objects
184
184
 
185
- > **objects**: [`ObjectsById`](listInstance.md#objectsbyid)
185
+ > **objects**: [`ObjectsByPk`](listInstance.md#objectsbypk)
186
186
 
187
- The list objects stored by their IDs.
187
+ The list objects stored by their pks.
188
188
 
189
189
  ###### objectsInOrder
190
190
 
@@ -210,15 +210,21 @@ The order of objects in the list.
210
210
 
211
211
  Flag indicating if the order watch is active.
212
212
 
213
+ ###### pkKey
214
+
215
+ > **pkKey**: `string`
216
+
217
+ The primary key field for the list objects.
218
+
213
219
  ###### relatedObjects
214
220
 
215
221
  > **relatedObjects**: `object`
216
222
 
217
- Stores computed references to related objects, allowing for dynamic access based on object ID and specific rules.
223
+ Stores computed references to related objects, allowing for dynamic access based on object pk and specific rules.
218
224
 
219
225
  ###### Index Signature
220
226
 
221
- \[`id`: `string`\]: `object`
227
+ \[`pk`: `string`\]: `object`
222
228
 
223
229
  ###### relatedObjectsParentStateObjectsWatchRunning
224
230
 
@@ -370,7 +376,7 @@ The calculated objects.
370
376
 
371
377
  ###### Index Signature
372
378
 
373
- \[`id`: `string`\]: `object`
379
+ \[`pk`: `string`\]: `object`
374
380
 
375
381
  ###### calculatedObjectsParentStateObjectsWatchRunning
376
382
 
@@ -448,15 +454,15 @@ Indicates if an error occurred during the last operation.
448
454
 
449
455
  Function to determine if an item should be excluded based on custom logic.
450
456
 
451
- ###### fkForIdAndRule
457
+ ###### fkForPkAndRule
452
458
 
453
- > **fkForIdAndRule**: `object`
459
+ > **fkForPkAndRule**: `object`
454
460
 
455
- Maintains computed references to the foreign keys for each object ID and rule, crucial for navigating complex data relationships.
461
+ Maintains computed references to the foreign keys for each object pk and rule, crucial for navigating complex data relationships.
456
462
 
457
463
  ###### Index Signature
458
464
 
459
- \[`id`: `string`\]: `object`
465
+ \[`pk`: `string`\]: `object`
460
466
 
461
467
  ###### inResults
462
468
 
@@ -488,15 +494,15 @@ Arguments passed to the server for listing operations.
488
494
 
489
495
  Indicates if the list is currently loading.
490
496
 
491
- ###### objAndKeyForIdAndRule
497
+ ###### objAndKeyForPkAndRule
492
498
 
493
- > **objAndKeyForIdAndRule**: `object`
499
+ > **objAndKeyForPkAndRule**: `object`
494
500
 
495
- Maps each object ID and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
501
+ Maps each object pk and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
496
502
 
497
503
  ###### Index Signature
498
504
 
499
- \[`id`: `string`\]: `object`
505
+ \[`pk`: `string`\]: `object`
500
506
 
501
507
  ###### objectIndexes
502
508
 
@@ -506,7 +512,7 @@ Indexes built for quick search across objects based on rules.
506
512
 
507
513
  ###### objects
508
514
 
509
- > **objects**: [`ObjectsById`](listInstance.md#objectsbyid)
515
+ > **objects**: [`ObjectsByPk`](listInstance.md#objectsbypk)
510
516
 
511
517
  Currently filtered objects based on the search.
512
518
 
@@ -526,7 +532,7 @@ Flag indicating if the object watch is active.
526
532
 
527
533
  > **order**: `string`[]
528
534
 
529
- The current sort order of object IDs after search have been applied.
535
+ The current sort order of object pks after search have been applied.
530
536
 
531
537
  ###### orderWatchRunning
532
538
 
@@ -534,15 +540,21 @@ The current sort order of object IDs after search have been applied.
534
540
 
535
541
  Flag indicating if the order watch is active.
536
542
 
543
+ ###### pkKey
544
+
545
+ > **pkKey**: `string`
546
+
547
+ The primary key field for the list objects.
548
+
537
549
  ###### relatedObjects
538
550
 
539
551
  > **relatedObjects**: `object`
540
552
 
541
- Stores computed references to related objects, allowing for dynamic access based on object ID and specific rules.
553
+ Stores computed references to related objects, allowing for dynamic access based on object pk and specific rules.
542
554
 
543
555
  ###### Index Signature
544
556
 
545
- \[`id`: `string`\]: `object`
557
+ \[`pk`: `string`\]: `object`
546
558
 
547
559
  ###### relatedObjectsParentStateObjectsWatchRunning
548
560
 
@@ -739,7 +751,7 @@ Indexes built for quick search across objects based on rules.
739
751
 
740
752
  ##### objects
741
753
 
742
- > **objects**: [`ObjectsById`](listInstance.md#objectsbyid)
754
+ > **objects**: [`ObjectsByPk`](listInstance.md#objectsbypk)
743
755
 
744
756
  Currently filtered objects based on the search.
745
757
 
@@ -753,7 +765,7 @@ The list of objects sorted according to the current search criteria.
753
765
 
754
766
  > **order**: `ComputedRef`\<`string`[]\>
755
767
 
756
- The current sort order of object IDs after search have been applied.
768
+ The current sort order of object pks after search have been applied.
757
769
 
758
770
  ##### running
759
771
 
@@ -38,7 +38,7 @@ The calculated objects.
38
38
 
39
39
  ###### Index Signature
40
40
 
41
- \[`id`: `string`\]: `object`
41
+ \[`pk`: `string`\]: `object`
42
42
 
43
43
  ###### calculatedObjectsParentStateObjectsWatchRunning
44
44
 
@@ -116,15 +116,15 @@ Indicates if an error occurred during the last operation.
116
116
 
117
117
  Function to determine if an item should be excluded based on custom logic.
118
118
 
119
- ###### fkForIdAndRule
119
+ ###### fkForPkAndRule
120
120
 
121
- > **fkForIdAndRule**: `object`
121
+ > **fkForPkAndRule**: `object`
122
122
 
123
- Maintains computed references to the foreign keys for each object ID and rule, crucial for navigating complex data relationships.
123
+ Maintains computed references to the foreign keys for each object pk and rule, crucial for navigating complex data relationships.
124
124
 
125
125
  ###### Index Signature
126
126
 
127
- \[`id`: `string`\]: `object`
127
+ \[`pk`: `string`\]: `object`
128
128
 
129
129
  ###### inResults
130
130
 
@@ -156,15 +156,15 @@ Arguments passed to the server for listing operations.
156
156
 
157
157
  Indicates if the list is currently loading.
158
158
 
159
- ###### objAndKeyForIdAndRule
159
+ ###### objAndKeyForPkAndRule
160
160
 
161
- > **objAndKeyForIdAndRule**: `object`
161
+ > **objAndKeyForPkAndRule**: `object`
162
162
 
163
- Maps each object ID and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
163
+ Maps each object pk and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
164
164
 
165
165
  ###### Index Signature
166
166
 
167
- \[`id`: `string`\]: `object`
167
+ \[`pk`: `string`\]: `object`
168
168
 
169
169
  ###### objectIndexes
170
170
 
@@ -174,9 +174,9 @@ Indexes built for quick search across objects based on rules.
174
174
 
175
175
  ###### objects
176
176
 
177
- > **objects**: [`ObjectsById`](listInstance.md#objectsbyid)
177
+ > **objects**: [`ObjectsByPk`](listInstance.md#objectsbypk)
178
178
 
179
- The list objects stored by their IDs.
179
+ The list objects stored by their pks.
180
180
 
181
181
  ###### objectsInOrder
182
182
 
@@ -202,15 +202,21 @@ The order of objects in the list.
202
202
 
203
203
  Flag indicating if the order watch is active.
204
204
 
205
+ ###### pkKey
206
+
207
+ > **pkKey**: `string`
208
+
209
+ The primary key field for the list objects.
210
+
205
211
  ###### relatedObjects
206
212
 
207
213
  > **relatedObjects**: `object`
208
214
 
209
- Stores computed references to related objects, allowing for dynamic access based on object ID and specific rules.
215
+ Stores computed references to related objects, allowing for dynamic access based on object pk and specific rules.
210
216
 
211
217
  ###### Index Signature
212
218
 
213
- \[`id`: `string`\]: `object`
219
+ \[`pk`: `string`\]: `object`
214
220
 
215
221
  ###### relatedObjectsParentStateObjectsWatchRunning
216
222
 
@@ -339,7 +345,7 @@ The calculated objects.
339
345
 
340
346
  ###### Index Signature
341
347
 
342
- \[`id`: `string`\]: `object`
348
+ \[`pk`: `string`\]: `object`
343
349
 
344
350
  ###### calculatedObjectsParentStateObjectsWatchRunning
345
351
 
@@ -417,15 +423,15 @@ Indicates if an error occurred during the last operation.
417
423
 
418
424
  Function to determine if an item should be excluded based on custom logic.
419
425
 
420
- ###### fkForIdAndRule
426
+ ###### fkForPkAndRule
421
427
 
422
- > **fkForIdAndRule**: `object`
428
+ > **fkForPkAndRule**: `object`
423
429
 
424
- Maintains computed references to the foreign keys for each object ID and rule, crucial for navigating complex data relationships.
430
+ Maintains computed references to the foreign keys for each object pk and rule, crucial for navigating complex data relationships.
425
431
 
426
432
  ###### Index Signature
427
433
 
428
- \[`id`: `string`\]: `object`
434
+ \[`pk`: `string`\]: `object`
429
435
 
430
436
  ###### inResults
431
437
 
@@ -457,15 +463,15 @@ Arguments passed to the server for listing operations.
457
463
 
458
464
  Indicates if the list is currently loading.
459
465
 
460
- ###### objAndKeyForIdAndRule
466
+ ###### objAndKeyForPkAndRule
461
467
 
462
- > **objAndKeyForIdAndRule**: `object`
468
+ > **objAndKeyForPkAndRule**: `object`
463
469
 
464
- Maps each object ID and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
470
+ Maps each object pk and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
465
471
 
466
472
  ###### Index Signature
467
473
 
468
- \[`id`: `string`\]: `object`
474
+ \[`pk`: `string`\]: `object`
469
475
 
470
476
  ###### objectIndexes
471
477
 
@@ -475,9 +481,9 @@ Indexes built for quick search across objects based on rules.
475
481
 
476
482
  ###### objects
477
483
 
478
- > **objects**: [`ObjectsById`](listInstance.md#objectsbyid)
484
+ > **objects**: [`ObjectsByPk`](listInstance.md#objectsbypk)
479
485
 
480
- The list objects stored by their IDs.
486
+ The list objects stored by their pks.
481
487
 
482
488
  ###### objectsInOrder
483
489
 
@@ -503,15 +509,21 @@ The order of objects in the list.
503
509
 
504
510
  Flag indicating if the order watch is active.
505
511
 
512
+ ###### pkKey
513
+
514
+ > **pkKey**: `string`
515
+
516
+ The primary key field for the list objects.
517
+
506
518
  ###### relatedObjects
507
519
 
508
520
  > **relatedObjects**: `object`
509
521
 
510
- Stores computed references to related objects, allowing for dynamic access based on object ID and specific rules.
522
+ Stores computed references to related objects, allowing for dynamic access based on object pk and specific rules.
511
523
 
512
524
  ###### Index Signature
513
525
 
514
- \[`id`: `string`\]: `object`
526
+ \[`pk`: `string`\]: `object`
515
527
 
516
528
  ###### relatedObjectsParentStateObjectsWatchRunning
517
529
 
@@ -622,7 +634,7 @@ The calculated objects.
622
634
 
623
635
  ###### Index Signature
624
636
 
625
- \[`id`: `string`\]: `object`
637
+ \[`pk`: `string`\]: `object`
626
638
 
627
639
  ###### calculatedObjectsParentStateObjectsWatchRunning
628
640
 
@@ -700,15 +712,15 @@ Indicates if an error occurred during the last operation.
700
712
 
701
713
  Function to determine if an item should be excluded based on custom logic.
702
714
 
703
- ###### fkForIdAndRule
715
+ ###### fkForPkAndRule
704
716
 
705
- > **fkForIdAndRule**: `object`
717
+ > **fkForPkAndRule**: `object`
706
718
 
707
- Maintains computed references to the foreign keys for each object ID and rule, crucial for navigating complex data relationships.
719
+ Maintains computed references to the foreign keys for each object pk and rule, crucial for navigating complex data relationships.
708
720
 
709
721
  ###### Index Signature
710
722
 
711
- \[`id`: `string`\]: `object`
723
+ \[`pk`: `string`\]: `object`
712
724
 
713
725
  ###### inResults
714
726
 
@@ -740,15 +752,15 @@ Arguments passed to the server for listing operations.
740
752
 
741
753
  Indicates if the list is currently loading.
742
754
 
743
- ###### objAndKeyForIdAndRule
755
+ ###### objAndKeyForPkAndRule
744
756
 
745
- > **objAndKeyForIdAndRule**: `object`
757
+ > **objAndKeyForPkAndRule**: `object`
746
758
 
747
- Maps each object ID and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
759
+ Maps each object pk and rule to a tuple consisting of the related object and its respective key, facilitating direct data manipulation.
748
760
 
749
761
  ###### Index Signature
750
762
 
751
- \[`id`: `string`\]: `object`
763
+ \[`pk`: `string`\]: `object`
752
764
 
753
765
  ###### objectIndexes
754
766
 
@@ -758,9 +770,9 @@ Indexes built for quick search across objects based on rules.
758
770
 
759
771
  ###### objects
760
772
 
761
- > **objects**: [`ObjectsById`](listInstance.md#objectsbyid)
773
+ > **objects**: [`ObjectsByPk`](listInstance.md#objectsbypk)
762
774
 
763
- The list objects stored by their IDs.
775
+ The list objects stored by their pks.
764
776
 
765
777
  ###### objectsInOrder
766
778
 
@@ -804,15 +816,21 @@ Flag indicating if the order watch is active.
804
816
 
805
817
  Flag to indicate if there are pending reactive effects needing resolution.
806
818
 
819
+ ###### pkKey
820
+
821
+ > **pkKey**: `string`
822
+
823
+ The primary key field for the list objects.
824
+
807
825
  ###### relatedObjects
808
826
 
809
827
  > **relatedObjects**: `object`
810
828
 
811
- Stores computed references to related objects, allowing for dynamic access based on object ID and specific rules.
829
+ Stores computed references to related objects, allowing for dynamic access based on object pk and specific rules.
812
830
 
813
831
  ###### Index Signature
814
832
 
815
- \[`id`: `string`\]: `object`
833
+ \[`pk`: `string`\]: `object`
816
834
 
817
835
  ###### relatedObjectsParentStateObjectsWatchRunning
818
836
 
@@ -1100,6 +1118,7 @@ import { useListSort, useListInstance } from '@arrai-innovations/reactive-helper
1100
1118
  const listInstanceProps = reactive({
1101
1119
  crudArgs: {},
1102
1120
  listArgs: {},
1121
+ pkKey: 'id',
1103
1122
  retrieveArgs: {},
1104
1123
  intendToList: true,
1105
1124
  });
@@ -166,9 +166,9 @@ Indicates if the list is currently loading.
166
166
 
167
167
  ###### objects
168
168
 
169
- > **objects**: [`ObjectsById`](listInstance.md#objectsbyid)
169
+ > **objects**: [`ObjectsByPk`](listInstance.md#objectsbypk)
170
170
 
171
- The list objects stored by their IDs.
171
+ The list objects stored by their pks.
172
172
 
173
173
  ###### objectsInOrder
174
174
 
@@ -182,6 +182,12 @@ The objects in the order specified by the list.
182
182
 
183
183
  The order of objects in the list.
184
184
 
185
+ ###### pkKey
186
+
187
+ > **pkKey**: `string`
188
+
189
+ The primary key field for the list objects.
190
+
185
191
  ###### retrieveArgs
186
192
 
187
193
  > **retrieveArgs**: `any`
@@ -126,12 +126,6 @@ A function to be used instead of the default crud update function.
126
126
 
127
127
  [`ResponseData`](../config/objectCrud.md#responsedata)
128
128
 
129
- ###### id
130
-
131
- > **id**: `string`
132
-
133
- The id of the object.
134
-
135
129
  ###### intendToRetrieve
136
130
 
137
131
  > **intendToRetrieve**: `boolean`
@@ -144,6 +138,18 @@ Whether the object intends to retrieve.
144
138
 
145
139
  Whether the object intends to subscribe.
146
140
 
141
+ ###### pk
142
+
143
+ > **pk**: `string`
144
+
145
+ The pk of the object, optional to support creating new objects.
146
+
147
+ ###### pkKey
148
+
149
+ > **pkKey**: `string`
150
+
151
+ The pk key of the object.
152
+
147
153
  ###### relatedObjectRules
148
154
 
149
155
  > **relatedObjectRules**: [`ObjectRelatedRawRules`](objectRelated.md#objectrelatedrawrules)
@@ -322,12 +328,6 @@ The error.
322
328
 
323
329
  Whether the object errored.
324
330
 
325
- ###### id
326
-
327
- > **id**: `string`
328
-
329
- The id of the object.
330
-
331
331
  ###### intendToRetrieve
332
332
 
333
333
  > **intendToRetrieve**: `boolean`
@@ -358,6 +358,18 @@ The object.
358
358
 
359
359
  Whether the parent state object watch is running.
360
360
 
361
+ ###### pk
362
+
363
+ > **pk**: `string`
364
+
365
+ The pk of the object.
366
+
367
+ ###### pkKey
368
+
369
+ > **pkKey**: `string`
370
+
371
+ The pk key of the object.
372
+
361
373
  ###### relatedObject
362
374
 
363
375
  > **relatedObject**: `object`
@@ -540,7 +552,7 @@ const someOtherObjectsSource = reactive({
540
552
  const props = defineProps({
541
553
  app: { type: String, required: true },
542
554
  model: { type: String, required: true },
543
- id: { type: String, default: "" },
555
+ pk: { type: String, default: "" },
544
556
  });
545
557
 
546
558
  const objectProps = reactive({
@@ -548,6 +560,8 @@ const objectProps = reactive({
548
560
  app: toRef(props, "app"),
549
561
  model: toRef(props, "model"),
550
562
  },
563
+ pk: toRef(props, "pk"),
564
+ pkKey: 'id',
551
565
  retrieveArgs: {
552
566
  fields: ['foo', 'bar'],
553
567
  },
@@ -579,7 +593,7 @@ const objectProps = reactive({
579
593
  intendToRetrieve: false,
580
594
  intendToSubscribe: false,
581
595
  });
582
- objectProps.intendToRetrieve = objectProps.intendToSubscribe = computed(()=> !!props.id);
596
+ objectProps.intendToRetrieve = objectProps.intendToSubscribe = computed(()=> !!props.pk);
583
597
  const objectManager = useObject(objectProps);
584
598
  // objectManager.state.object comes back from the server (via configured crud retrieve function)
585
599
  // { id: 2, name: 'two', foo: 'bar', some_objects_id: 2, some_objects_list_ids: ['1','2','3'] }
@@ -138,12 +138,6 @@ The error.
138
138
 
139
139
  Whether the object errored.
140
140
 
141
- ###### id
142
-
143
- > **id**: `string`
144
-
145
- The id of the object.
146
-
147
141
  ###### intendToRetrieve
148
142
 
149
143
  > **intendToRetrieve**: `boolean`
@@ -174,6 +168,18 @@ The object.
174
168
 
175
169
  Whether the parent state object watch is running.
176
170
 
171
+ ###### pk
172
+
173
+ > **pk**: `string`
174
+
175
+ The pk of the object.
176
+
177
+ ###### pkKey
178
+
179
+ > **pkKey**: `string`
180
+
181
+ The pk key of the object.
182
+
177
183
  ###### relatedObject
178
184
 
179
185
  > **relatedObject**: `object`
@@ -386,12 +392,6 @@ The error.
386
392
 
387
393
  Whether the object errored.
388
394
 
389
- ###### id
390
-
391
- > **id**: `string`
392
-
393
- The id of the object.
394
-
395
395
  ###### intendToRetrieve
396
396
 
397
397
  > **intendToRetrieve**: `boolean`
@@ -422,6 +422,18 @@ The object.
422
422
 
423
423
  Whether the parent state object watch is running.
424
424
 
425
+ ###### pk
426
+
427
+ > **pk**: `string`
428
+
429
+ The pk of the object.
430
+
431
+ ###### pkKey
432
+
433
+ > **pkKey**: `string`
434
+
435
+ The pk key of the object.
436
+
425
437
  ###### relatedObject
426
438
 
427
439
  > **relatedObject**: `object`
@@ -655,7 +667,8 @@ const objectSubscriptionProps = reactive({
655
667
  // whatever object subscription props you need to work with your crud implementation
656
668
  crudArgs: {},
657
669
  retrieveArgs: {},
658
- id: '1',
670
+ pk: '1',
671
+ pkKey: 'id',
659
672
  intendToRetrieve: true,
660
673
  };
661
674
  const objectSubscription = useObjectSubscription(objectSubscriptionProps);