@genesislcap/foundation-state-machine 14.71.1-auth-mf.3 → 14.71.1-auth-mf.6

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 (35) hide show
  1. package/dist/dts/core/actions.d.ts +1 -1
  2. package/dist/dts/core/actions.d.ts.map +1 -1
  3. package/dist/dts/core/errors.d.ts +2 -2
  4. package/dist/dts/core/errors.d.ts.map +1 -1
  5. package/dist/dts/core/machine.d.ts +28 -1
  6. package/dist/dts/core/machine.d.ts.map +1 -1
  7. package/dist/dts/core/state.d.ts.map +1 -1
  8. package/dist/dts/machines/fetch/errors.d.ts +15 -3
  9. package/dist/dts/machines/fetch/errors.d.ts.map +1 -1
  10. package/dist/esm/core/actions.js +2 -5
  11. package/dist/esm/core/machine.js +39 -12
  12. package/dist/esm/core/state.js +18 -6
  13. package/dist/esm/machines/fetch/errors.js +12 -0
  14. package/dist/foundation-state-machine.api.json +419 -12
  15. package/dist/foundation-state-machine.d.ts +47 -6
  16. package/docs/api/foundation-state-machine.abstractmachine.getmetavaluesbykey.md +28 -0
  17. package/docs/api/foundation-state-machine.abstractmachine.md +3 -0
  18. package/docs/api/foundation-state-machine.abstractmachine.meta.md +13 -0
  19. package/docs/api/foundation-state-machine.abstractmachine.snapshot.md +13 -0
  20. package/docs/api/foundation-state-machine.apierror.isunauthorized.md +16 -0
  21. package/docs/api/foundation-state-machine.apierror.md +6 -0
  22. package/docs/api/foundation-state-machine.escalateerror.md +1 -1
  23. package/docs/api/foundation-state-machine.isapierror.md +3 -1
  24. package/docs/api/foundation-state-machine.isgenesisservererror.md +1 -1
  25. package/docs/api/foundation-state-machine.ismappingerror.md +1 -1
  26. package/docs/api/foundation-state-machine.isnetworkerror.md +1 -1
  27. package/docs/api/foundation-state-machine.isnotfounderror.md +1 -1
  28. package/docs/api/foundation-state-machine.isunauthorizederror.md +13 -0
  29. package/docs/api/foundation-state-machine.machine.getmetavaluesbykey.md +28 -0
  30. package/docs/api/foundation-state-machine.machine.md +3 -0
  31. package/docs/api/foundation-state-machine.machine.meta.md +13 -0
  32. package/docs/api/foundation-state-machine.machine.snapshot.md +13 -0
  33. package/docs/api/foundation-state-machine.md +3 -2
  34. package/docs/api-report.md +22 -6
  35. package/package.json +6 -6
@@ -732,6 +732,75 @@
732
732
  "isAbstract": true,
733
733
  "name": "getFromContainer"
734
734
  },
735
+ {
736
+ "kind": "Method",
737
+ "canonicalReference": "@genesislcap/foundation-state-machine!AbstractMachine#getMetaValuesByKey:member(1)",
738
+ "docComment": "/**\n * Get `meta` values by key.\n *\n * @remarks\n *\n * Meta is cumulative across all state nodes represented by the state value.\n *\n * @param key - A key within the `meta` object. Defaults to `content`.\n */\n",
739
+ "excerptTokens": [
740
+ {
741
+ "kind": "Content",
742
+ "text": "getMetaValuesByKey<T = "
743
+ },
744
+ {
745
+ "kind": "Content",
746
+ "text": "string"
747
+ },
748
+ {
749
+ "kind": "Content",
750
+ "text": ">(key?: "
751
+ },
752
+ {
753
+ "kind": "Content",
754
+ "text": "string"
755
+ },
756
+ {
757
+ "kind": "Content",
758
+ "text": "): "
759
+ },
760
+ {
761
+ "kind": "Content",
762
+ "text": "T[]"
763
+ },
764
+ {
765
+ "kind": "Content",
766
+ "text": ";"
767
+ }
768
+ ],
769
+ "typeParameters": [
770
+ {
771
+ "typeParameterName": "T",
772
+ "constraintTokenRange": {
773
+ "startIndex": 0,
774
+ "endIndex": 0
775
+ },
776
+ "defaultTypeTokenRange": {
777
+ "startIndex": 1,
778
+ "endIndex": 2
779
+ }
780
+ }
781
+ ],
782
+ "isStatic": false,
783
+ "returnTypeTokenRange": {
784
+ "startIndex": 5,
785
+ "endIndex": 6
786
+ },
787
+ "releaseTag": "Public",
788
+ "isProtected": false,
789
+ "overloadIndex": 1,
790
+ "parameters": [
791
+ {
792
+ "parameterName": "key",
793
+ "parameterTypeTokenRange": {
794
+ "startIndex": 3,
795
+ "endIndex": 4
796
+ },
797
+ "isOptional": true
798
+ }
799
+ ],
800
+ "isOptional": false,
801
+ "isAbstract": false,
802
+ "name": "getMetaValuesByKey"
803
+ },
735
804
  {
736
805
  "kind": "Method",
737
806
  "canonicalReference": "@genesislcap/foundation-state-machine!AbstractMachine#hasTag:member(1)",
@@ -877,6 +946,41 @@
877
946
  "isAbstract": false,
878
947
  "name": "matches"
879
948
  },
949
+ {
950
+ "kind": "Property",
951
+ "canonicalReference": "@genesislcap/foundation-state-machine!AbstractMachine#meta:member",
952
+ "docComment": "/**\n * The `meta` from the current `state`.\n */\n",
953
+ "excerptTokens": [
954
+ {
955
+ "kind": "Content",
956
+ "text": "meta: "
957
+ },
958
+ {
959
+ "kind": "Reference",
960
+ "text": "Record",
961
+ "canonicalReference": "!Record:type"
962
+ },
963
+ {
964
+ "kind": "Content",
965
+ "text": "<string, any>"
966
+ },
967
+ {
968
+ "kind": "Content",
969
+ "text": ";"
970
+ }
971
+ ],
972
+ "isReadonly": false,
973
+ "isOptional": false,
974
+ "releaseTag": "Public",
975
+ "name": "meta",
976
+ "propertyTypeTokenRange": {
977
+ "startIndex": 1,
978
+ "endIndex": 3
979
+ },
980
+ "isStatic": false,
981
+ "isProtected": false,
982
+ "isAbstract": false
983
+ },
880
984
  {
881
985
  "kind": "Property",
882
986
  "canonicalReference": "@genesislcap/foundation-state-machine!AbstractMachine#onSendEvent:member",
@@ -1047,6 +1151,41 @@
1047
1151
  "isAbstract": false,
1048
1152
  "name": "send"
1049
1153
  },
1154
+ {
1155
+ "kind": "Property",
1156
+ "canonicalReference": "@genesislcap/foundation-state-machine!AbstractMachine#snapshot:member",
1157
+ "docComment": "/**\n * The last `snapshot` from the actor.\n */\n",
1158
+ "excerptTokens": [
1159
+ {
1160
+ "kind": "Content",
1161
+ "text": "snapshot: "
1162
+ },
1163
+ {
1164
+ "kind": "Reference",
1165
+ "text": "State",
1166
+ "canonicalReference": "xstate!State:class"
1167
+ },
1168
+ {
1169
+ "kind": "Content",
1170
+ "text": "<TContext, TEvent, TActor, TResolvedTypesMeta>"
1171
+ },
1172
+ {
1173
+ "kind": "Content",
1174
+ "text": ";"
1175
+ }
1176
+ ],
1177
+ "isReadonly": false,
1178
+ "isOptional": false,
1179
+ "releaseTag": "Public",
1180
+ "name": "snapshot",
1181
+ "propertyTypeTokenRange": {
1182
+ "startIndex": 1,
1183
+ "endIndex": 3
1184
+ },
1185
+ "isStatic": false,
1186
+ "isProtected": false,
1187
+ "isAbstract": false
1188
+ },
1050
1189
  {
1051
1190
  "kind": "Method",
1052
1191
  "canonicalReference": "@genesislcap/foundation-state-machine!AbstractMachine#start:member(1)",
@@ -1364,6 +1503,37 @@
1364
1503
  "isProtected": false,
1365
1504
  "isAbstract": false
1366
1505
  },
1506
+ {
1507
+ "kind": "Method",
1508
+ "canonicalReference": "@genesislcap/foundation-state-machine!APIError#isUnauthorized:member(1)",
1509
+ "docComment": "/**\n * @public\n */\n",
1510
+ "excerptTokens": [
1511
+ {
1512
+ "kind": "Content",
1513
+ "text": "isUnauthorized(): "
1514
+ },
1515
+ {
1516
+ "kind": "Content",
1517
+ "text": "boolean"
1518
+ },
1519
+ {
1520
+ "kind": "Content",
1521
+ "text": ";"
1522
+ }
1523
+ ],
1524
+ "isStatic": false,
1525
+ "returnTypeTokenRange": {
1526
+ "startIndex": 1,
1527
+ "endIndex": 2
1528
+ },
1529
+ "releaseTag": "Public",
1530
+ "isProtected": false,
1531
+ "overloadIndex": 1,
1532
+ "parameters": [],
1533
+ "isOptional": false,
1534
+ "isAbstract": false,
1535
+ "name": "isUnauthorized"
1536
+ },
1367
1537
  {
1368
1538
  "kind": "Property",
1369
1539
  "canonicalReference": "@genesislcap/foundation-state-machine!APIError#status:member",
@@ -2158,7 +2328,7 @@
2158
2328
  {
2159
2329
  "kind": "Variable",
2160
2330
  "canonicalReference": "@genesislcap/foundation-state-machine!escalateError:var",
2161
- "docComment": "/**\n * Escalate error action.\n *\n * @remarks\n *\n * Guard this call with a parent check to avoid warnings when there's no parent.\n *\n * @public\n */\n",
2331
+ "docComment": "/**\n * Escalate context error action.\n *\n * @remarks\n *\n * Guard this call with a parent check to avoid warnings when there's no parent.\n *\n * @public\n */\n",
2162
2332
  "excerptTokens": [
2163
2333
  {
2164
2334
  "kind": "Content",
@@ -3410,7 +3580,7 @@
3410
3580
  {
3411
3581
  "kind": "Variable",
3412
3582
  "canonicalReference": "@genesislcap/foundation-state-machine!isAPIError:var",
3413
- "docComment": "/**\n * @param error - An error.\n *\n * @public\n */\n",
3583
+ "docComment": "/**\n * isAPIError.\n *\n * @param error - An error.\n *\n * @public\n */\n",
3414
3584
  "excerptTokens": [
3415
3585
  {
3416
3586
  "kind": "Content",
@@ -3418,7 +3588,21 @@
3418
3588
  },
3419
3589
  {
3420
3590
  "kind": "Content",
3421
- "text": "(error: unknown) => boolean"
3591
+ "text": "(error: unknown) => "
3592
+ },
3593
+ {
3594
+ "kind": "Reference",
3595
+ "text": "error",
3596
+ "canonicalReference": "@genesislcap/foundation-state-machine!~error"
3597
+ },
3598
+ {
3599
+ "kind": "Content",
3600
+ "text": " is "
3601
+ },
3602
+ {
3603
+ "kind": "Reference",
3604
+ "text": "APIError",
3605
+ "canonicalReference": "@genesislcap/foundation-state-machine!APIError:class"
3422
3606
  }
3423
3607
  ],
3424
3608
  "fileUrlPath": "src/machines/fetch/errors.ts",
@@ -3427,7 +3611,7 @@
3427
3611
  "name": "isAPIError",
3428
3612
  "variableTypeTokenRange": {
3429
3613
  "startIndex": 1,
3430
- "endIndex": 2
3614
+ "endIndex": 5
3431
3615
  }
3432
3616
  },
3433
3617
  {
@@ -3650,7 +3834,21 @@
3650
3834
  },
3651
3835
  {
3652
3836
  "kind": "Content",
3653
- "text": "(error: unknown) => boolean"
3837
+ "text": "(error: unknown) => "
3838
+ },
3839
+ {
3840
+ "kind": "Reference",
3841
+ "text": "error",
3842
+ "canonicalReference": "@genesislcap/foundation-state-machine!~error"
3843
+ },
3844
+ {
3845
+ "kind": "Content",
3846
+ "text": " is "
3847
+ },
3848
+ {
3849
+ "kind": "Reference",
3850
+ "text": "GenesisServerError",
3851
+ "canonicalReference": "@genesislcap/foundation-state-machine!GenesisServerError:class"
3654
3852
  }
3655
3853
  ],
3656
3854
  "fileUrlPath": "src/core/errors.ts",
@@ -3659,7 +3857,7 @@
3659
3857
  "name": "isGenesisServerError",
3660
3858
  "variableTypeTokenRange": {
3661
3859
  "startIndex": 1,
3662
- "endIndex": 2
3860
+ "endIndex": 5
3663
3861
  }
3664
3862
  },
3665
3863
  {
@@ -3673,7 +3871,21 @@
3673
3871
  },
3674
3872
  {
3675
3873
  "kind": "Content",
3676
- "text": "(error: unknown) => boolean"
3874
+ "text": "(error: unknown) => "
3875
+ },
3876
+ {
3877
+ "kind": "Reference",
3878
+ "text": "error",
3879
+ "canonicalReference": "@genesislcap/foundation-state-machine!~error"
3880
+ },
3881
+ {
3882
+ "kind": "Content",
3883
+ "text": " is "
3884
+ },
3885
+ {
3886
+ "kind": "Reference",
3887
+ "text": "MappingError",
3888
+ "canonicalReference": "@genesislcap/foundation-state-machine!MappingError:class"
3677
3889
  }
3678
3890
  ],
3679
3891
  "fileUrlPath": "src/core/errors.ts",
@@ -3682,7 +3894,7 @@
3682
3894
  "name": "isMappingError",
3683
3895
  "variableTypeTokenRange": {
3684
3896
  "startIndex": 1,
3685
- "endIndex": 2
3897
+ "endIndex": 5
3686
3898
  }
3687
3899
  },
3688
3900
  {
@@ -3696,7 +3908,21 @@
3696
3908
  },
3697
3909
  {
3698
3910
  "kind": "Content",
3699
- "text": "(error: unknown) => boolean"
3911
+ "text": "(error: unknown) => "
3912
+ },
3913
+ {
3914
+ "kind": "Reference",
3915
+ "text": "error",
3916
+ "canonicalReference": "@genesislcap/foundation-state-machine!~error"
3917
+ },
3918
+ {
3919
+ "kind": "Content",
3920
+ "text": " is "
3921
+ },
3922
+ {
3923
+ "kind": "Reference",
3924
+ "text": "NetworkError",
3925
+ "canonicalReference": "@genesislcap/foundation-state-machine!NetworkError:class"
3700
3926
  }
3701
3927
  ],
3702
3928
  "fileUrlPath": "src/machines/fetch/errors.ts",
@@ -3705,7 +3931,7 @@
3705
3931
  "name": "isNetworkError",
3706
3932
  "variableTypeTokenRange": {
3707
3933
  "startIndex": 1,
3708
- "endIndex": 2
3934
+ "endIndex": 5
3709
3935
  }
3710
3936
  },
3711
3937
  {
@@ -3719,7 +3945,21 @@
3719
3945
  },
3720
3946
  {
3721
3947
  "kind": "Content",
3722
- "text": "(error: {\n status?: number;\n}) => boolean"
3948
+ "text": "(error: {\n status?: number;\n}) => "
3949
+ },
3950
+ {
3951
+ "kind": "Reference",
3952
+ "text": "error",
3953
+ "canonicalReference": "@genesislcap/foundation-state-machine!~error"
3954
+ },
3955
+ {
3956
+ "kind": "Content",
3957
+ "text": " is "
3958
+ },
3959
+ {
3960
+ "kind": "Reference",
3961
+ "text": "APIError",
3962
+ "canonicalReference": "@genesislcap/foundation-state-machine!APIError:class"
3723
3963
  }
3724
3964
  ],
3725
3965
  "fileUrlPath": "src/machines/fetch/errors.ts",
@@ -3728,7 +3968,7 @@
3728
3968
  "name": "isNotFoundError",
3729
3969
  "variableTypeTokenRange": {
3730
3970
  "startIndex": 1,
3731
- "endIndex": 2
3971
+ "endIndex": 5
3732
3972
  }
3733
3973
  },
3734
3974
  {
@@ -3777,6 +4017,43 @@
3777
4017
  "endIndex": 2
3778
4018
  }
3779
4019
  },
4020
+ {
4021
+ "kind": "Variable",
4022
+ "canonicalReference": "@genesislcap/foundation-state-machine!isUnauthorizedError:var",
4023
+ "docComment": "/**\n * @param error - An error.\n *\n * @public\n */\n",
4024
+ "excerptTokens": [
4025
+ {
4026
+ "kind": "Content",
4027
+ "text": "isUnauthorizedError: "
4028
+ },
4029
+ {
4030
+ "kind": "Content",
4031
+ "text": "(error: {\n status?: number;\n}) => "
4032
+ },
4033
+ {
4034
+ "kind": "Reference",
4035
+ "text": "error",
4036
+ "canonicalReference": "@genesislcap/foundation-state-machine!~error"
4037
+ },
4038
+ {
4039
+ "kind": "Content",
4040
+ "text": " is "
4041
+ },
4042
+ {
4043
+ "kind": "Reference",
4044
+ "text": "APIError",
4045
+ "canonicalReference": "@genesislcap/foundation-state-machine!APIError:class"
4046
+ }
4047
+ ],
4048
+ "fileUrlPath": "src/machines/fetch/errors.ts",
4049
+ "isReadonly": true,
4050
+ "releaseTag": "Public",
4051
+ "name": "isUnauthorizedError",
4052
+ "variableTypeTokenRange": {
4053
+ "startIndex": 1,
4054
+ "endIndex": 5
4055
+ }
4056
+ },
3780
4057
  {
3781
4058
  "kind": "Variable",
3782
4059
  "canonicalReference": "@genesislcap/foundation-state-machine!logger:var",
@@ -4330,6 +4607,72 @@
4330
4607
  "parameters": [],
4331
4608
  "name": "getFromContainer"
4332
4609
  },
4610
+ {
4611
+ "kind": "MethodSignature",
4612
+ "canonicalReference": "@genesislcap/foundation-state-machine!Machine#getMetaValuesByKey:member(1)",
4613
+ "docComment": "/**\n * Get `meta` values by key.\n *\n * @remarks\n *\n * Meta is cumulative across all state nodes represented by the state value.\n *\n * @param key - A key within the `meta` object. Defaults to `content`.\n */\n",
4614
+ "excerptTokens": [
4615
+ {
4616
+ "kind": "Content",
4617
+ "text": "getMetaValuesByKey<T = "
4618
+ },
4619
+ {
4620
+ "kind": "Content",
4621
+ "text": "string"
4622
+ },
4623
+ {
4624
+ "kind": "Content",
4625
+ "text": ">(key?: "
4626
+ },
4627
+ {
4628
+ "kind": "Content",
4629
+ "text": "string"
4630
+ },
4631
+ {
4632
+ "kind": "Content",
4633
+ "text": "): "
4634
+ },
4635
+ {
4636
+ "kind": "Content",
4637
+ "text": "T[]"
4638
+ },
4639
+ {
4640
+ "kind": "Content",
4641
+ "text": ";"
4642
+ }
4643
+ ],
4644
+ "isOptional": false,
4645
+ "returnTypeTokenRange": {
4646
+ "startIndex": 5,
4647
+ "endIndex": 6
4648
+ },
4649
+ "releaseTag": "Public",
4650
+ "overloadIndex": 1,
4651
+ "parameters": [
4652
+ {
4653
+ "parameterName": "key",
4654
+ "parameterTypeTokenRange": {
4655
+ "startIndex": 3,
4656
+ "endIndex": 4
4657
+ },
4658
+ "isOptional": true
4659
+ }
4660
+ ],
4661
+ "typeParameters": [
4662
+ {
4663
+ "typeParameterName": "T",
4664
+ "constraintTokenRange": {
4665
+ "startIndex": 0,
4666
+ "endIndex": 0
4667
+ },
4668
+ "defaultTypeTokenRange": {
4669
+ "startIndex": 1,
4670
+ "endIndex": 2
4671
+ }
4672
+ }
4673
+ ],
4674
+ "name": "getMetaValuesByKey"
4675
+ },
4333
4676
  {
4334
4677
  "kind": "MethodSignature",
4335
4678
  "canonicalReference": "@genesislcap/foundation-state-machine!Machine#hasTag:member(1)",
@@ -4466,6 +4809,38 @@
4466
4809
  ],
4467
4810
  "name": "matches"
4468
4811
  },
4812
+ {
4813
+ "kind": "PropertySignature",
4814
+ "canonicalReference": "@genesislcap/foundation-state-machine!Machine#meta:member",
4815
+ "docComment": "/**\n * The `meta` from the current `state`.\n */\n",
4816
+ "excerptTokens": [
4817
+ {
4818
+ "kind": "Content",
4819
+ "text": "readonly meta: "
4820
+ },
4821
+ {
4822
+ "kind": "Reference",
4823
+ "text": "Record",
4824
+ "canonicalReference": "!Record:type"
4825
+ },
4826
+ {
4827
+ "kind": "Content",
4828
+ "text": "<string, any>"
4829
+ },
4830
+ {
4831
+ "kind": "Content",
4832
+ "text": ";"
4833
+ }
4834
+ ],
4835
+ "isReadonly": true,
4836
+ "isOptional": false,
4837
+ "releaseTag": "Public",
4838
+ "name": "meta",
4839
+ "propertyTypeTokenRange": {
4840
+ "startIndex": 1,
4841
+ "endIndex": 3
4842
+ }
4843
+ },
4469
4844
  {
4470
4845
  "kind": "MethodSignature",
4471
4846
  "canonicalReference": "@genesislcap/foundation-state-machine!Machine#onSendEvent:member(1)",
@@ -4638,6 +5013,38 @@
4638
5013
  ],
4639
5014
  "name": "send"
4640
5015
  },
5016
+ {
5017
+ "kind": "PropertySignature",
5018
+ "canonicalReference": "@genesislcap/foundation-state-machine!Machine#snapshot:member",
5019
+ "docComment": "/**\n * The last `snapshot` from the actor.\n */\n",
5020
+ "excerptTokens": [
5021
+ {
5022
+ "kind": "Content",
5023
+ "text": "readonly snapshot: "
5024
+ },
5025
+ {
5026
+ "kind": "Reference",
5027
+ "text": "State",
5028
+ "canonicalReference": "xstate!State:class"
5029
+ },
5030
+ {
5031
+ "kind": "Content",
5032
+ "text": "<TContext, TEvent, TActor, TResolvedTypesMeta>"
5033
+ },
5034
+ {
5035
+ "kind": "Content",
5036
+ "text": ";"
5037
+ }
5038
+ ],
5039
+ "isReadonly": true,
5040
+ "isOptional": false,
5041
+ "releaseTag": "Public",
5042
+ "name": "snapshot",
5043
+ "propertyTypeTokenRange": {
5044
+ "startIndex": 1,
5045
+ "endIndex": 3
5046
+ }
5047
+ },
4641
5048
  {
4642
5049
  "kind": "MethodSignature",
4643
5050
  "canonicalReference": "@genesislcap/foundation-state-machine!Machine#start:member(1)",