@warp-drive/legacy 5.9.0-alpha.21 → 5.9.0-alpha.22
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/-private-DQ6Iap2t.js +193 -0
- package/dist/-private-DQ6Iap2t.js.map +1 -0
- package/dist/-private-DccRZQsm.js +904 -0
- package/dist/-private-DccRZQsm.js.map +1 -0
- package/dist/adapter/-private.d.ts +33 -0
- package/dist/adapter/-private.d.ts.map +1 -0
- package/dist/adapter/-private.js +3 -1
- package/dist/adapter/error.d.ts +2 -0
- package/dist/adapter/error.js +422 -453
- package/dist/adapter/error.js.map +1 -0
- package/{declarations → dist}/adapter/json-api.d.ts +30 -29
- package/dist/adapter/json-api.d.ts.map +1 -0
- package/dist/adapter/json-api.js +265 -143
- package/dist/adapter/json-api.js.map +1 -0
- package/dist/adapter/rest.d.ts +2 -0
- package/dist/adapter/rest.js +937 -1136
- package/dist/adapter/rest.js.map +1 -0
- package/dist/adapter-CARrK3-8.d.ts +784 -0
- package/dist/adapter-CARrK3-8.d.ts.map +1 -0
- package/dist/adapter-XgLAkYVs.js +1130 -0
- package/dist/adapter-XgLAkYVs.js.map +1 -0
- package/dist/adapter.d.ts +2 -0
- package/dist/adapter.js +1 -1248
- package/dist/compat/-private.d.ts +2 -0
- package/dist/compat/-private.js +3 -1
- package/dist/compat/builders.d.ts +169 -0
- package/dist/compat/builders.d.ts.map +1 -0
- package/dist/compat/builders.js +205 -245
- package/dist/compat/builders.js.map +1 -0
- package/dist/compat/extensions.d.ts +2 -0
- package/dist/compat/extensions.js +265 -304
- package/dist/compat/extensions.js.map +1 -0
- package/dist/compat/utils.d.ts +151 -0
- package/dist/compat/utils.d.ts.map +1 -0
- package/dist/compat/utils.js +187 -206
- package/dist/compat/utils.js.map +1 -0
- package/dist/compat-BbNNmTM-.d.ts +1386 -0
- package/dist/compat-BbNNmTM-.d.ts.map +1 -0
- package/dist/compat-g__Pfy2S.js +734 -0
- package/dist/compat-g__Pfy2S.js.map +1 -0
- package/dist/compat.d.ts +2 -0
- package/dist/compat.js +1 -1036
- package/dist/error-CzkyXr1Q.d.ts +435 -0
- package/dist/error-CzkyXr1Q.d.ts.map +1 -0
- package/dist/errors-LQhmDVdd.js +2134 -0
- package/dist/errors-LQhmDVdd.js.map +1 -0
- package/dist/extensions-DumNm4dA.d.ts +102 -0
- package/dist/extensions-DumNm4dA.d.ts.map +1 -0
- package/dist/index.d.ts +243 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +267 -339
- package/dist/index.js.map +1 -0
- package/dist/json-BXNPTlcH.js +1106 -0
- package/dist/json-BXNPTlcH.js.map +1 -0
- package/dist/model/-private.d.ts +3 -0
- package/dist/model/-private.js +3 -1
- package/dist/model/migration-support.d.ts +335 -0
- package/dist/model/migration-support.d.ts.map +1 -0
- package/dist/model/migration-support.js +504 -575
- package/dist/model/migration-support.js.map +1 -0
- package/dist/model-62hn5_PD.d.ts +3107 -0
- package/dist/model-62hn5_PD.d.ts.map +1 -0
- package/dist/model-BtIEHqYZ.js +683 -0
- package/dist/model-BtIEHqYZ.js.map +1 -0
- package/dist/model-fragments-Dpn9285r.js +334 -0
- package/dist/model-fragments-Dpn9285r.js.map +1 -0
- package/dist/model-fragments.d.ts +294 -0
- package/dist/model-fragments.d.ts.map +1 -0
- package/dist/model-fragments.js +2 -94
- package/dist/model.d.ts +404 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +3 -670
- package/{declarations/adapter/rest.d.ts → dist/rest-0NhtexIq.d.ts} +183 -173
- package/dist/rest-0NhtexIq.d.ts.map +1 -0
- package/dist/runtime-BPCpkOf1-BgO3Lyjx.js +53 -0
- package/dist/runtime-BPCpkOf1-BgO3Lyjx.js.map +1 -0
- package/dist/schema-provider-DsKuB5Wb.js +1929 -0
- package/dist/schema-provider-DsKuB5Wb.js.map +1 -0
- package/{declarations → dist}/serializer/json-api.d.ts +3 -0
- package/dist/serializer/json-api.d.ts.map +1 -0
- package/dist/serializer/json-api.js +527 -519
- package/dist/serializer/json-api.js.map +1 -0
- package/{declarations → dist}/serializer/json.d.ts +3 -0
- package/dist/serializer/json.d.ts.map +1 -0
- package/dist/serializer/json.js +3 -6
- package/{declarations/serializer/-private/embedded-records-mixin.d.ts → dist/serializer/rest.d.ts} +56 -1
- package/dist/serializer/rest.d.ts.map +1 -0
- package/dist/serializer/rest.js +958 -1199
- package/dist/serializer/rest.js.map +1 -0
- package/dist/serializer/transform.d.ts +313 -0
- package/dist/serializer/transform.d.ts.map +1 -0
- package/dist/serializer/transform.js +283 -308
- package/dist/serializer/transform.js.map +1 -0
- package/dist/serializer.d.ts +151 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/serializer.js +205 -205
- package/dist/serializer.js.map +1 -0
- package/dist/store-C4qYzXei.js +473 -0
- package/dist/store-C4qYzXei.js.map +1 -0
- package/dist/store.d.ts +13 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +1 -641
- package/dist/unpkg/dev/-private-CrEyBE-B.js +189 -0
- package/dist/unpkg/dev/-private-CrEyBE-B.js.map +1 -0
- package/dist/unpkg/dev/-private-vOhxVExH.js +896 -0
- package/dist/unpkg/dev/-private-vOhxVExH.js.map +1 -0
- package/dist/unpkg/dev/adapter/-private.js +3 -1
- package/dist/unpkg/dev/adapter/error.js +421 -452
- package/dist/unpkg/dev/adapter/error.js.map +1 -0
- package/dist/unpkg/dev/adapter/json-api.js +239 -257
- package/dist/unpkg/dev/adapter/json-api.js.map +1 -0
- package/dist/unpkg/dev/adapter/rest.js +935 -1134
- package/dist/unpkg/dev/adapter/rest.js.map +1 -0
- package/dist/unpkg/dev/adapter-Cw0uSl8d.js +1129 -0
- package/dist/unpkg/dev/adapter-Cw0uSl8d.js.map +1 -0
- package/dist/unpkg/dev/adapter.js +1 -1247
- package/dist/unpkg/dev/compat/-private.js +3 -1
- package/dist/unpkg/dev/compat/builders.js +204 -247
- package/dist/unpkg/dev/compat/builders.js.map +1 -0
- package/dist/unpkg/dev/compat/extensions.js +264 -303
- package/dist/unpkg/dev/compat/extensions.js.map +1 -0
- package/dist/unpkg/dev/compat/utils.js +186 -205
- package/dist/unpkg/dev/compat/utils.js.map +1 -0
- package/dist/unpkg/dev/compat-CeyxXB7K.js +825 -0
- package/dist/unpkg/dev/compat-CeyxXB7K.js.map +1 -0
- package/dist/unpkg/dev/compat.js +1 -1178
- package/dist/unpkg/dev/errors-1javxsPo.js +2127 -0
- package/dist/unpkg/dev/errors-1javxsPo.js.map +1 -0
- package/dist/unpkg/dev/index.js +266 -344
- package/dist/unpkg/dev/index.js.map +1 -0
- package/dist/unpkg/dev/json-DDJji3V3.js +1104 -0
- package/dist/unpkg/dev/json-DDJji3V3.js.map +1 -0
- package/dist/unpkg/dev/model/-private.js +3 -1
- package/dist/unpkg/dev/model/migration-support.js +481 -549
- package/dist/unpkg/dev/model/migration-support.js.map +1 -0
- package/dist/unpkg/dev/model-C9Xb1R1x.js +655 -0
- package/dist/unpkg/dev/model-C9Xb1R1x.js.map +1 -0
- package/dist/unpkg/dev/model-fragments-Dpn9285r.js +334 -0
- package/dist/unpkg/dev/model-fragments-Dpn9285r.js.map +1 -0
- package/dist/unpkg/dev/model-fragments.js +2 -94
- package/dist/unpkg/dev/model.js +3 -681
- package/dist/unpkg/dev/runtime-BPCpkOf1-BgO3Lyjx.js +53 -0
- package/dist/unpkg/dev/runtime-BPCpkOf1-BgO3Lyjx.js.map +1 -0
- package/dist/unpkg/dev/schema-provider-Dy6c1J5f.js +1834 -0
- package/dist/unpkg/dev/schema-provider-Dy6c1J5f.js.map +1 -0
- package/dist/unpkg/dev/serializer/json-api.js +514 -634
- package/dist/unpkg/dev/serializer/json-api.js.map +1 -0
- package/dist/unpkg/dev/serializer/json.js +3 -4
- package/dist/unpkg/dev/serializer/rest.js +954 -1196
- package/dist/unpkg/dev/serializer/rest.js.map +1 -0
- package/dist/unpkg/dev/serializer/transform.js +283 -308
- package/dist/unpkg/dev/serializer/transform.js.map +1 -0
- package/dist/unpkg/dev/serializer.js +205 -205
- package/dist/unpkg/dev/serializer.js.map +1 -0
- package/dist/unpkg/dev/store-D_V8-HQl.js +472 -0
- package/dist/unpkg/dev/store-D_V8-HQl.js.map +1 -0
- package/dist/unpkg/dev/store.js +1 -649
- package/dist/unpkg/dev/util-dSKEgQDp.js +12 -0
- package/dist/unpkg/dev/util-dSKEgQDp.js.map +1 -0
- package/dist/unpkg/dev/utils-DYC9utVJ.js +11 -0
- package/dist/unpkg/dev/utils-DYC9utVJ.js.map +1 -0
- package/dist/unpkg/dev-deprecated/-private-CrEyBE-B.js +189 -0
- package/dist/unpkg/dev-deprecated/-private-CrEyBE-B.js.map +1 -0
- package/dist/unpkg/dev-deprecated/-private-vOhxVExH.js +896 -0
- package/dist/unpkg/dev-deprecated/-private-vOhxVExH.js.map +1 -0
- package/dist/unpkg/dev-deprecated/adapter/-private.js +3 -1
- package/dist/unpkg/dev-deprecated/adapter/error.js +421 -452
- package/dist/unpkg/dev-deprecated/adapter/error.js.map +1 -0
- package/dist/unpkg/dev-deprecated/adapter/json-api.js +239 -257
- package/dist/unpkg/dev-deprecated/adapter/json-api.js.map +1 -0
- package/dist/unpkg/dev-deprecated/adapter/rest.js +935 -1134
- package/dist/unpkg/dev-deprecated/adapter/rest.js.map +1 -0
- package/dist/unpkg/dev-deprecated/adapter-Cw0uSl8d.js +1129 -0
- package/dist/unpkg/dev-deprecated/adapter-Cw0uSl8d.js.map +1 -0
- package/dist/unpkg/dev-deprecated/adapter.js +1 -1247
- package/dist/unpkg/dev-deprecated/compat/-private.js +3 -1
- package/dist/unpkg/dev-deprecated/compat/builders.js +204 -247
- package/dist/unpkg/dev-deprecated/compat/builders.js.map +1 -0
- package/dist/unpkg/dev-deprecated/compat/extensions.js +264 -303
- package/dist/unpkg/dev-deprecated/compat/extensions.js.map +1 -0
- package/dist/unpkg/dev-deprecated/compat/utils.js +186 -205
- package/dist/unpkg/dev-deprecated/compat/utils.js.map +1 -0
- package/dist/unpkg/dev-deprecated/compat-DmAgB2NS.js +825 -0
- package/dist/unpkg/dev-deprecated/compat-DmAgB2NS.js.map +1 -0
- package/dist/unpkg/dev-deprecated/compat.js +1 -1178
- package/dist/unpkg/dev-deprecated/errors-C4_aOhY5.js +2128 -0
- package/dist/unpkg/dev-deprecated/errors-C4_aOhY5.js.map +1 -0
- package/dist/unpkg/dev-deprecated/index.js +266 -343
- package/dist/unpkg/dev-deprecated/index.js.map +1 -0
- package/dist/unpkg/dev-deprecated/json-DDJji3V3.js +1104 -0
- package/dist/unpkg/dev-deprecated/json-DDJji3V3.js.map +1 -0
- package/dist/unpkg/dev-deprecated/model/-private.js +3 -1
- package/dist/unpkg/dev-deprecated/model/migration-support.js +492 -566
- package/dist/unpkg/dev-deprecated/model/migration-support.js.map +1 -0
- package/dist/unpkg/dev-deprecated/model-CvSMYkgs.js +660 -0
- package/dist/unpkg/dev-deprecated/model-CvSMYkgs.js.map +1 -0
- package/dist/unpkg/dev-deprecated/model-fragments-Dpn9285r.js +334 -0
- package/dist/unpkg/dev-deprecated/model-fragments-Dpn9285r.js.map +1 -0
- package/dist/unpkg/dev-deprecated/model-fragments.js +2 -94
- package/dist/unpkg/dev-deprecated/model.js +3 -685
- package/dist/unpkg/dev-deprecated/runtime-BPCpkOf1-BgO3Lyjx.js +53 -0
- package/dist/unpkg/dev-deprecated/runtime-BPCpkOf1-BgO3Lyjx.js.map +1 -0
- package/dist/unpkg/dev-deprecated/schema-provider-Cqttza94.js +1835 -0
- package/dist/unpkg/dev-deprecated/schema-provider-Cqttza94.js.map +1 -0
- package/dist/unpkg/dev-deprecated/serializer/json-api.js +514 -634
- package/dist/unpkg/dev-deprecated/serializer/json-api.js.map +1 -0
- package/dist/unpkg/dev-deprecated/serializer/json.js +3 -4
- package/dist/unpkg/dev-deprecated/serializer/rest.js +954 -1196
- package/dist/unpkg/dev-deprecated/serializer/rest.js.map +1 -0
- package/dist/unpkg/dev-deprecated/serializer/transform.js +283 -308
- package/dist/unpkg/dev-deprecated/serializer/transform.js.map +1 -0
- package/dist/unpkg/dev-deprecated/serializer.js +205 -205
- package/dist/unpkg/dev-deprecated/serializer.js.map +1 -0
- package/dist/unpkg/dev-deprecated/store-BX7GvXC_.js +472 -0
- package/dist/unpkg/dev-deprecated/store-BX7GvXC_.js.map +1 -0
- package/dist/unpkg/dev-deprecated/store.js +1 -649
- package/dist/unpkg/dev-deprecated/util-9mgEBJ3W.js +18 -0
- package/dist/unpkg/dev-deprecated/util-9mgEBJ3W.js.map +1 -0
- package/dist/unpkg/dev-deprecated/utils-Cl86-e7F.js +17 -0
- package/dist/unpkg/dev-deprecated/utils-Cl86-e7F.js.map +1 -0
- package/dist/unpkg/prod/-private-B4bxoTuK.js +160 -0
- package/dist/unpkg/prod/-private-B4bxoTuK.js.map +1 -0
- package/dist/unpkg/prod/-private-SfXkkHKd.js +745 -0
- package/dist/unpkg/prod/-private-SfXkkHKd.js.map +1 -0
- package/dist/unpkg/prod/adapter/-private.js +3 -1
- package/dist/unpkg/prod/adapter/error.js +418 -447
- package/dist/unpkg/prod/adapter/error.js.map +1 -0
- package/dist/unpkg/prod/adapter/json-api.js +236 -252
- package/dist/unpkg/prod/adapter/json-api.js.map +1 -0
- package/dist/unpkg/prod/adapter/rest.js +911 -1097
- package/dist/unpkg/prod/adapter/rest.js.map +1 -0
- package/dist/unpkg/prod/adapter-Wnk7jizX.js +1111 -0
- package/dist/unpkg/prod/adapter-Wnk7jizX.js.map +1 -0
- package/dist/unpkg/prod/adapter.js +1 -1214
- package/dist/unpkg/prod/compat/-private.js +3 -1
- package/dist/unpkg/prod/compat/builders.js +165 -182
- package/dist/unpkg/prod/compat/builders.js.map +1 -0
- package/dist/unpkg/prod/compat/extensions.js +252 -283
- package/dist/unpkg/prod/compat/extensions.js.map +1 -0
- package/dist/unpkg/prod/compat/utils.js +183 -200
- package/dist/unpkg/prod/compat/utils.js.map +1 -0
- package/dist/unpkg/prod/compat-CJ87MzDn.js +547 -0
- package/dist/unpkg/prod/compat-CJ87MzDn.js.map +1 -0
- package/dist/unpkg/prod/compat.js +1 -742
- package/dist/unpkg/prod/errors-Co7YWHoA.js +1977 -0
- package/dist/unpkg/prod/errors-Co7YWHoA.js.map +1 -0
- package/dist/unpkg/prod/index.js +245 -308
- package/dist/unpkg/prod/index.js.map +1 -0
- package/dist/unpkg/prod/json-BD1kRTfB.js +1080 -0
- package/dist/unpkg/prod/json-BD1kRTfB.js.map +1 -0
- package/dist/unpkg/prod/model/-private.js +3 -1
- package/dist/unpkg/prod/model/migration-support.js +477 -542
- package/dist/unpkg/prod/model/migration-support.js.map +1 -0
- package/dist/unpkg/prod/model-BzoOmtka.js +603 -0
- package/dist/unpkg/prod/model-BzoOmtka.js.map +1 -0
- package/dist/unpkg/prod/model-fragments-Dpn9285r.js +334 -0
- package/dist/unpkg/prod/model-fragments-Dpn9285r.js.map +1 -0
- package/dist/unpkg/prod/model-fragments.js +2 -94
- package/dist/unpkg/prod/model.js +3 -596
- package/dist/unpkg/prod/runtime-BPCpkOf1-BgO3Lyjx.js +53 -0
- package/dist/unpkg/prod/runtime-BPCpkOf1-BgO3Lyjx.js.map +1 -0
- package/dist/unpkg/prod/schema-provider-CKZcqWyP.js +1622 -0
- package/dist/unpkg/prod/schema-provider-CKZcqWyP.js.map +1 -0
- package/dist/unpkg/prod/serializer/json-api.js +497 -592
- package/dist/unpkg/prod/serializer/json-api.js.map +1 -0
- package/dist/unpkg/prod/serializer/json.js +3 -4
- package/dist/unpkg/prod/serializer/rest.js +938 -1166
- package/dist/unpkg/prod/serializer/rest.js.map +1 -0
- package/dist/unpkg/prod/serializer/transform.js +283 -308
- package/dist/unpkg/prod/serializer/transform.js.map +1 -0
- package/dist/unpkg/prod/serializer.js +205 -205
- package/dist/unpkg/prod/serializer.js.map +1 -0
- package/dist/unpkg/prod/store-RGGc1ilN.js +392 -0
- package/dist/unpkg/prod/store-RGGc1ilN.js.map +1 -0
- package/dist/unpkg/prod/store.js +1 -517
- package/dist/unpkg/prod/util-dSKEgQDp.js +12 -0
- package/dist/unpkg/prod/util-dSKEgQDp.js.map +1 -0
- package/dist/unpkg/prod/utils-DYC9utVJ.js +11 -0
- package/dist/unpkg/prod/utils-DYC9utVJ.js.map +1 -0
- package/dist/unpkg/prod-deprecated/-private-B4bxoTuK.js +160 -0
- package/dist/unpkg/prod-deprecated/-private-B4bxoTuK.js.map +1 -0
- package/dist/unpkg/prod-deprecated/-private-SfXkkHKd.js +745 -0
- package/dist/unpkg/prod-deprecated/-private-SfXkkHKd.js.map +1 -0
- package/dist/unpkg/prod-deprecated/adapter/-private.js +3 -1
- package/dist/unpkg/prod-deprecated/adapter/error.js +418 -447
- package/dist/unpkg/prod-deprecated/adapter/error.js.map +1 -0
- package/dist/unpkg/prod-deprecated/adapter/json-api.js +236 -252
- package/dist/unpkg/prod-deprecated/adapter/json-api.js.map +1 -0
- package/dist/unpkg/prod-deprecated/adapter/rest.js +911 -1097
- package/dist/unpkg/prod-deprecated/adapter/rest.js.map +1 -0
- package/{declarations/adapter.d.ts → dist/unpkg/prod-deprecated/adapter-Wnk7jizX.js} +445 -110
- package/dist/unpkg/prod-deprecated/adapter-Wnk7jizX.js.map +1 -0
- package/dist/unpkg/prod-deprecated/adapter.js +1 -1214
- package/dist/unpkg/prod-deprecated/compat/-private.js +3 -1
- package/dist/unpkg/prod-deprecated/compat/builders.js +165 -182
- package/dist/unpkg/prod-deprecated/compat/builders.js.map +1 -0
- package/dist/unpkg/prod-deprecated/compat/extensions.js +252 -283
- package/dist/unpkg/prod-deprecated/compat/extensions.js.map +1 -0
- package/dist/unpkg/prod-deprecated/compat/utils.js +183 -200
- package/dist/unpkg/prod-deprecated/compat/utils.js.map +1 -0
- package/dist/unpkg/prod-deprecated/compat-CJ87MzDn.js +547 -0
- package/dist/unpkg/prod-deprecated/compat-CJ87MzDn.js.map +1 -0
- package/dist/unpkg/prod-deprecated/compat.js +1 -742
- package/dist/unpkg/prod-deprecated/errors-C-opde61.js +1978 -0
- package/dist/unpkg/prod-deprecated/errors-C-opde61.js.map +1 -0
- package/dist/unpkg/prod-deprecated/index.js +245 -307
- package/dist/unpkg/prod-deprecated/index.js.map +1 -0
- package/dist/unpkg/prod-deprecated/json-BD1kRTfB.js +1080 -0
- package/dist/unpkg/prod-deprecated/json-BD1kRTfB.js.map +1 -0
- package/dist/unpkg/prod-deprecated/model/-private.js +3 -1
- package/dist/unpkg/prod-deprecated/model/migration-support.js +488 -559
- package/dist/unpkg/prod-deprecated/model/migration-support.js.map +1 -0
- package/dist/unpkg/prod-deprecated/model-C0bTXzGn.js +604 -0
- package/dist/unpkg/prod-deprecated/model-C0bTXzGn.js.map +1 -0
- package/dist/unpkg/prod-deprecated/model-fragments-Dpn9285r.js +334 -0
- package/dist/unpkg/prod-deprecated/model-fragments-Dpn9285r.js.map +1 -0
- package/dist/unpkg/prod-deprecated/model-fragments.js +2 -94
- package/dist/unpkg/prod-deprecated/model.js +3 -599
- package/dist/unpkg/prod-deprecated/runtime-BPCpkOf1-BgO3Lyjx.js +53 -0
- package/dist/unpkg/prod-deprecated/runtime-BPCpkOf1-BgO3Lyjx.js.map +1 -0
- package/dist/unpkg/prod-deprecated/schema-provider-lH3qP5tw.js +1635 -0
- package/dist/unpkg/prod-deprecated/schema-provider-lH3qP5tw.js.map +1 -0
- package/dist/unpkg/prod-deprecated/serializer/json-api.js +497 -592
- package/dist/unpkg/prod-deprecated/serializer/json-api.js.map +1 -0
- package/dist/unpkg/prod-deprecated/serializer/json.js +3 -4
- package/dist/unpkg/prod-deprecated/serializer/rest.js +938 -1166
- package/dist/unpkg/prod-deprecated/serializer/rest.js.map +1 -0
- package/dist/unpkg/prod-deprecated/serializer/transform.js +283 -308
- package/dist/unpkg/prod-deprecated/serializer/transform.js.map +1 -0
- package/dist/unpkg/prod-deprecated/serializer.js +205 -205
- package/dist/unpkg/prod-deprecated/serializer.js.map +1 -0
- package/dist/unpkg/prod-deprecated/store-0L2CkYzh.js +392 -0
- package/dist/unpkg/prod-deprecated/store-0L2CkYzh.js.map +1 -0
- package/dist/unpkg/prod-deprecated/store.js +1 -517
- package/dist/unpkg/prod-deprecated/util-CQQdHX3n.js +14 -0
- package/dist/unpkg/prod-deprecated/util-CQQdHX3n.js.map +1 -0
- package/dist/unpkg/prod-deprecated/utils-BMI_JwFP.js +13 -0
- package/dist/unpkg/prod-deprecated/utils-BMI_JwFP.js.map +1 -0
- package/dist/util-Bnx8nm-D.js +29 -0
- package/dist/util-Bnx8nm-D.js.map +1 -0
- package/dist/utils-ZAytYep8.js +28 -0
- package/dist/utils-ZAytYep8.js.map +1 -0
- package/package.json +13 -13
- package/declarations/adapter/-private/build-url-mixin.d.ts +0 -189
- package/declarations/adapter/-private/fastboot-interface.d.ts +0 -8
- package/declarations/adapter/-private/utils/continue-on-reject.d.ts +0 -1
- package/declarations/adapter/-private/utils/determine-body-promise.d.ts +0 -4
- package/declarations/adapter/-private/utils/fetch.d.ts +0 -8
- package/declarations/adapter/-private/utils/parse-response-headers.d.ts +0 -1
- package/declarations/adapter/-private/utils/serialize-into-hash.d.ts +0 -6
- package/declarations/adapter/-private/utils/serialize-query-params.d.ts +0 -5
- package/declarations/adapter/-private.d.ts +0 -5
- package/declarations/adapter/error.d.ts +0 -431
- package/declarations/compat/-private.d.ts +0 -13
- package/declarations/compat/builders/find-all.d.ts +0 -34
- package/declarations/compat/builders/find-record.d.ts +0 -56
- package/declarations/compat/builders/query.d.ts +0 -66
- package/declarations/compat/builders/save-record.d.ts +0 -34
- package/declarations/compat/builders/utils.d.ts +0 -3
- package/declarations/compat/builders.d.ts +0 -14
- package/declarations/compat/extensions.d.ts +0 -99
- package/declarations/compat/legacy-network-handler/fetch-manager.d.ts +0 -55
- package/declarations/compat/legacy-network-handler/identifier-has-id.d.ts +0 -2
- package/declarations/compat/legacy-network-handler/legacy-data-fetch.d.ts +0 -11
- package/declarations/compat/legacy-network-handler/legacy-data-utils.d.ts +0 -5
- package/declarations/compat/legacy-network-handler/legacy-network-handler.d.ts +0 -9
- package/declarations/compat/legacy-network-handler/minimum-adapter-interface.d.ts +0 -528
- package/declarations/compat/legacy-network-handler/minimum-serializer-interface.d.ts +0 -220
- package/declarations/compat/legacy-network-handler/serializer-response.d.ts +0 -6
- package/declarations/compat/legacy-network-handler/snapshot-record-array.d.ts +0 -110
- package/declarations/compat/legacy-network-handler/snapshot.d.ts +0 -255
- package/declarations/compat/utils.d.ts +0 -148
- package/declarations/compat.d.ts +0 -189
- package/declarations/index.d.ts +0 -244
- package/declarations/model/-private/attr.d.ts +0 -191
- package/declarations/model/-private/belongs-to.d.ts +0 -195
- package/declarations/model/-private/debug/assert-polymorphic-type.d.ts +0 -5
- package/declarations/model/-private/errors.d.ts +0 -289
- package/declarations/model/-private/has-many.d.ts +0 -162
- package/declarations/model/-private/hooks.d.ts +0 -36
- package/declarations/model/-private/legacy-relationships-support.d.ts +0 -47
- package/declarations/model/-private/model-for-mixin.d.ts +0 -3
- package/declarations/model/-private/model-methods.d.ts +0 -39
- package/declarations/model/-private/model.d.ts +0 -1279
- package/declarations/model/-private/notify-changes.d.ts +0 -4
- package/declarations/model/-private/promise-belongs-to.d.ts +0 -40
- package/declarations/model/-private/promise-many-array.d.ts +0 -130
- package/declarations/model/-private/record-state.d.ts +0 -58
- package/declarations/model/-private/references/belongs-to.d.ts +0 -488
- package/declarations/model/-private/references/has-many.d.ts +0 -498
- package/declarations/model/-private/schema-provider.d.ts +0 -66
- package/declarations/model/-private/type-utils.d.ts +0 -57
- package/declarations/model/-private/util.d.ts +0 -5
- package/declarations/model/-private.d.ts +0 -8
- package/declarations/model/migration-support.d.ts +0 -306
- package/declarations/model-fragments/extensions/fragment-array.d.ts +0 -54
- package/declarations/model-fragments/extensions/fragment.d.ts +0 -50
- package/declarations/model-fragments/hooks/model-for.d.ts +0 -27
- package/declarations/model-fragments/index.d.ts +0 -13
- package/declarations/model-fragments/instance-initializers/fragment-extensions.d.ts +0 -15
- package/declarations/model-fragments/utilities/with-array-defaults.d.ts +0 -56
- package/declarations/model-fragments/utilities/with-fragment-array-defaults.d.ts +0 -38
- package/declarations/model-fragments/utilities/with-fragment-defaults.d.ts +0 -34
- package/declarations/model-fragments/utilities/with-legacy.d.ts +0 -11
- package/declarations/model-fragments.d.ts +0 -9
- package/declarations/model.d.ts +0 -49
- package/declarations/serializer/-private/transforms/boolean.d.ts +0 -60
- package/declarations/serializer/-private/transforms/date.d.ts +0 -42
- package/declarations/serializer/-private/transforms/number.d.ts +0 -42
- package/declarations/serializer/-private/transforms/string.d.ts +0 -42
- package/declarations/serializer/-private/transforms/transform.d.ts +0 -118
- package/declarations/serializer/-private/utils.d.ts +0 -27
- package/declarations/serializer/rest.d.ts +0 -51
- package/declarations/serializer/transform.d.ts +0 -5
- package/declarations/serializer.d.ts +0 -252
- package/declarations/store/-private.d.ts +0 -223
- package/declarations/store.d.ts +0 -10
- package/dist/-private-BG3bMiKp.js +0 -1211
- package/dist/errors-DZKA206g.js +0 -2589
- package/dist/hooks-BvOqJBei.js +0 -105
- package/dist/json-DU8m1pGf.js +0 -1336
- package/dist/model-for-CXkJw59V.js +0 -297
- package/dist/runtime-BPCpkOf1-BKOwiRJp.js +0 -65
- package/dist/schema-provider-DtPOp0d7.js +0 -2382
- package/dist/serialize-into-hash-DPZYoF-i.js +0 -261
- package/dist/unpkg/dev/-private-DtjBbEgy.js +0 -1206
- package/dist/unpkg/dev/errors-DngRU-If.js +0 -2585
- package/dist/unpkg/dev/hooks-UuiLxWxS.js +0 -104
- package/dist/unpkg/dev/json-K2Y9z6MN.js +0 -1333
- package/dist/unpkg/dev/model-for-CXkJw59V.js +0 -297
- package/dist/unpkg/dev/runtime-BPCpkOf1-BKOwiRJp.js +0 -65
- package/dist/unpkg/dev/schema-provider-0D7f-QOn.js +0 -2272
- package/dist/unpkg/dev/serialize-into-hash-B2xDbuo5.js +0 -259
- package/dist/unpkg/dev/util-DvanW33H.js +0 -20
- package/dist/unpkg/dev/utils-BhvS1iTS.js +0 -8
- package/dist/unpkg/dev-deprecated/-private-DtjBbEgy.js +0 -1206
- package/dist/unpkg/dev-deprecated/errors-Bzidntpi.js +0 -2588
- package/dist/unpkg/dev-deprecated/hooks-DVXhMW14.js +0 -104
- package/dist/unpkg/dev-deprecated/json-K2Y9z6MN.js +0 -1333
- package/dist/unpkg/dev-deprecated/model-for-CXkJw59V.js +0 -297
- package/dist/unpkg/dev-deprecated/runtime-BPCpkOf1-BKOwiRJp.js +0 -65
- package/dist/unpkg/dev-deprecated/schema-provider-ZwO5_fZw.js +0 -2292
- package/dist/unpkg/dev-deprecated/serialize-into-hash-B2xDbuo5.js +0 -259
- package/dist/unpkg/dev-deprecated/util-CWr5WQOT.js +0 -24
- package/dist/unpkg/dev-deprecated/utils-C9PJehtL.js +0 -12
- package/dist/unpkg/prod/-private-BdyZaGEh.js +0 -971
- package/dist/unpkg/prod/errors-B-PWeYlW.js +0 -2337
- package/dist/unpkg/prod/hooks-Bx-zBziU.js +0 -72
- package/dist/unpkg/prod/json-Qewu-UN9.js +0 -1300
- package/dist/unpkg/prod/model-for-CXkJw59V.js +0 -297
- package/dist/unpkg/prod/runtime-BPCpkOf1-BKOwiRJp.js +0 -65
- package/dist/unpkg/prod/schema-provider-BgRqk8i9.js +0 -1951
- package/dist/unpkg/prod/serialize-into-hash-DGlzQteF.js +0 -215
- package/dist/unpkg/prod/util-DvanW33H.js +0 -20
- package/dist/unpkg/prod/utils-BhvS1iTS.js +0 -8
- package/dist/unpkg/prod-deprecated/-private-BdyZaGEh.js +0 -971
- package/dist/unpkg/prod-deprecated/errors-Dl2J9d1D.js +0 -2340
- package/dist/unpkg/prod-deprecated/hooks-Cm60wWTf.js +0 -72
- package/dist/unpkg/prod-deprecated/json-Qewu-UN9.js +0 -1300
- package/dist/unpkg/prod-deprecated/model-for-CXkJw59V.js +0 -297
- package/dist/unpkg/prod-deprecated/runtime-BPCpkOf1-BKOwiRJp.js +0 -65
- package/dist/unpkg/prod-deprecated/schema-provider-Dh6tRqVI.js +0 -1980
- package/dist/unpkg/prod-deprecated/serialize-into-hash-DGlzQteF.js +0 -215
- package/dist/unpkg/prod-deprecated/util-B6cn-i93.js +0 -23
- package/dist/unpkg/prod-deprecated/utils-BUWwQwCh.js +0 -11
- package/dist/util-Dul6TZts.js +0 -35
- package/dist/utils-Cqw9eRj5.js +0 -23
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { TransformName } from "@warp-drive/core/types/symbols";
|
|
2
|
-
export interface BooleanTransform {
|
|
3
|
-
/**
|
|
4
|
-
* see {@link TransformName}
|
|
5
|
-
*/
|
|
6
|
-
[TransformName]: "boolean";
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
The `BooleanTransform` class is used to serialize and deserialize
|
|
10
|
-
boolean attributes on Ember Data record objects. This transform is
|
|
11
|
-
used when `'boolean'` is passed as the type parameter to the
|
|
12
|
-
{@link attr}function.
|
|
13
|
-
|
|
14
|
-
Usage
|
|
15
|
-
|
|
16
|
-
```js [app/models/user.js]
|
|
17
|
-
import { Model, attr } from '@warp-drive/legacy/model';
|
|
18
|
-
|
|
19
|
-
export default class UserModel extends Model {
|
|
20
|
-
@attr('boolean') isAdmin;
|
|
21
|
-
@attr('string') name;
|
|
22
|
-
@attr('string') email;
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
By default, the boolean transform only allows for values of `true` or
|
|
27
|
-
`false`. You can opt into allowing `null` values for
|
|
28
|
-
boolean attributes via `attr('boolean', { allowNull: true })`
|
|
29
|
-
|
|
30
|
-
```js [app/models/user.js]
|
|
31
|
-
import { Model, attr } from '@warp-drive/legacy/model';
|
|
32
|
-
|
|
33
|
-
export default class UserModel extends Model {
|
|
34
|
-
@attr('string') email;
|
|
35
|
-
@attr('string') username;
|
|
36
|
-
@attr('boolean', { allowNull: true }) wantsWeeklyEmail;
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
@public
|
|
41
|
-
*/
|
|
42
|
-
export declare class BooleanTransform {
|
|
43
|
-
/**
|
|
44
|
-
* Converts a serialized (raw payload) value into a `boolean` (or `null`
|
|
45
|
-
* when `allowNull` is set and the value is nullish).
|
|
46
|
-
*/
|
|
47
|
-
deserialize(serialized: boolean | null | number | string, options?: {
|
|
48
|
-
allowNull?: boolean;
|
|
49
|
-
}): boolean | null;
|
|
50
|
-
/**
|
|
51
|
-
* Converts a `boolean` attribute value into its serialized (raw payload) form.
|
|
52
|
-
*/
|
|
53
|
-
serialize(deserialized: boolean | null, options?: {
|
|
54
|
-
allowNull?: boolean;
|
|
55
|
-
}): boolean | null;
|
|
56
|
-
/**
|
|
57
|
-
* Creates a new instance of this transform.
|
|
58
|
-
*/
|
|
59
|
-
static create(): BooleanTransform;
|
|
60
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { TransformName } from "@warp-drive/core/types/symbols";
|
|
2
|
-
export interface DateTransform {
|
|
3
|
-
/**
|
|
4
|
-
* see {@link TransformName}
|
|
5
|
-
*/
|
|
6
|
-
[TransformName]: "date";
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
The `DateTransform` class is used to serialize and deserialize
|
|
10
|
-
date attributes on Ember Data record objects. This transform is used
|
|
11
|
-
when `'date'` is passed as the type parameter to the
|
|
12
|
-
{@link attr} function. It uses the [`ISO 8601`](https://en.wikipedia.org/wiki/ISO_8601)
|
|
13
|
-
standard.
|
|
14
|
-
|
|
15
|
-
```js [app/models/score.js]
|
|
16
|
-
import Model, { attr, belongsTo } from '@warp-drive/legacy/model';
|
|
17
|
-
|
|
18
|
-
export default class ScoreModel extends Model {
|
|
19
|
-
@attr('number') value;
|
|
20
|
-
@belongsTo('player') player;
|
|
21
|
-
@attr('date') date;
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
@public
|
|
26
|
-
*/
|
|
27
|
-
export declare class DateTransform {
|
|
28
|
-
/**
|
|
29
|
-
* Converts a serialized (raw payload) `ISO 8601` string, epoch number,
|
|
30
|
-
* or nullish value into a `Date` (or `null`/`undefined`).
|
|
31
|
-
*/
|
|
32
|
-
deserialize(serialized: string | number | null, _options?: Record<string, unknown>): Date | null;
|
|
33
|
-
/**
|
|
34
|
-
* Converts a `Date` attribute value into an `ISO 8601` string, or `null`
|
|
35
|
-
* if the value is not a valid `Date`.
|
|
36
|
-
*/
|
|
37
|
-
serialize(date: Date, _options?: Record<string, unknown>): string | null;
|
|
38
|
-
/**
|
|
39
|
-
* Creates a new instance of this transform.
|
|
40
|
-
*/
|
|
41
|
-
static create(): DateTransform;
|
|
42
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { TransformName } from "@warp-drive/core/types/symbols";
|
|
2
|
-
export interface NumberTransform {
|
|
3
|
-
/**
|
|
4
|
-
* see {@link TransformName}
|
|
5
|
-
*/
|
|
6
|
-
[TransformName]: "number";
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
The `NumberTransform` class is used to serialize and deserialize
|
|
10
|
-
numeric attributes on Ember Data record objects. This transform is
|
|
11
|
-
used when `number` is passed as the type parameter to the
|
|
12
|
-
{@link attr} function.
|
|
13
|
-
|
|
14
|
-
Usage
|
|
15
|
-
|
|
16
|
-
```js [app/models/score.js]
|
|
17
|
-
import Model, { attr, belongsTo } from '@warp-drive/legacy/model';
|
|
18
|
-
|
|
19
|
-
export default class ScoreModel extends Model {
|
|
20
|
-
@attr('number') value;
|
|
21
|
-
@belongsTo('player') player;
|
|
22
|
-
@attr('date') date;
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
@public
|
|
27
|
-
*/
|
|
28
|
-
export declare class NumberTransform {
|
|
29
|
-
/**
|
|
30
|
-
* Converts a serialized (raw payload) value into a `number`, or `null`
|
|
31
|
-
* if the value is empty, nullish, or not a valid number.
|
|
32
|
-
*/
|
|
33
|
-
deserialize(serialized: string | number | null | undefined, _options?: Record<string, unknown>): number | null;
|
|
34
|
-
/**
|
|
35
|
-
* Converts a `number` attribute value into its serialized (raw payload) form.
|
|
36
|
-
*/
|
|
37
|
-
serialize(deserialized: string | number | null | undefined, _options?: Record<string, unknown>): number | null;
|
|
38
|
-
/**
|
|
39
|
-
* Creates a new instance of this transform.
|
|
40
|
-
*/
|
|
41
|
-
static create(): NumberTransform;
|
|
42
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { TransformName } from "@warp-drive/core/types/symbols";
|
|
2
|
-
export interface StringTransform {
|
|
3
|
-
/**
|
|
4
|
-
* see {@link TransformName}
|
|
5
|
-
*/
|
|
6
|
-
[TransformName]: "string";
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
The `StringTransform` class is used to serialize and deserialize
|
|
10
|
-
string attributes on Ember Data record objects. This transform is
|
|
11
|
-
used when `string` is passed as the type parameter to the
|
|
12
|
-
{@link attr} function.
|
|
13
|
-
|
|
14
|
-
Usage
|
|
15
|
-
|
|
16
|
-
```js [app/models/user.js]
|
|
17
|
-
import Model, { attr, belongsTo } from '@warp-drive/legacy/model';
|
|
18
|
-
|
|
19
|
-
export default class UserModel extends Model {
|
|
20
|
-
@attr('boolean') isAdmin;
|
|
21
|
-
@attr('string') name;
|
|
22
|
-
@attr('string') email;
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
@public
|
|
27
|
-
*/
|
|
28
|
-
export declare class StringTransform {
|
|
29
|
-
/**
|
|
30
|
-
* Converts a serialized (raw payload) value into a `string`, or `null`
|
|
31
|
-
* if the value is falsy (and not an empty string).
|
|
32
|
-
*/
|
|
33
|
-
deserialize(serialized: unknown, _options?: Record<string, unknown>): string | null;
|
|
34
|
-
/**
|
|
35
|
-
* Converts a `string` attribute value into its serialized (raw payload) form.
|
|
36
|
-
*/
|
|
37
|
-
serialize(deserialized: unknown, _options?: Record<string, unknown>): string | null;
|
|
38
|
-
/**
|
|
39
|
-
* Creates a new instance of this transform.
|
|
40
|
-
*/
|
|
41
|
-
static create(): StringTransform;
|
|
42
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import EmberObject from "@ember/object";
|
|
2
|
-
import type { LegacyAttributeField } from "@warp-drive/core/types/schema/fields";
|
|
3
|
-
export interface Transform {
|
|
4
|
-
/**
|
|
5
|
-
When given a deserialized value from a record attribute this
|
|
6
|
-
method must return the serialized value.
|
|
7
|
-
|
|
8
|
-
Example
|
|
9
|
-
|
|
10
|
-
```javascript
|
|
11
|
-
serialize(deserialized, options) {
|
|
12
|
-
return deserialized ? null : Number(deserialized);
|
|
13
|
-
}
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
@public
|
|
17
|
-
@param deserialized The deserialized value
|
|
18
|
-
@param options hash of options passed to `attr`
|
|
19
|
-
@return The serialized value
|
|
20
|
-
*/
|
|
21
|
-
serialize(value: unknown, options: LegacyAttributeField["options"]): unknown;
|
|
22
|
-
/**
|
|
23
|
-
When given a serialized value from a JSON object this method must
|
|
24
|
-
return the deserialized value for the record attribute.
|
|
25
|
-
|
|
26
|
-
Example
|
|
27
|
-
|
|
28
|
-
```javascript
|
|
29
|
-
deserialize(serialized, options) {
|
|
30
|
-
return empty(serialized) ? null : Number(serialized);
|
|
31
|
-
}
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
@public
|
|
35
|
-
@param serialized The serialized value
|
|
36
|
-
@param options hash of options passed to `attr`
|
|
37
|
-
@return The deserialized value
|
|
38
|
-
*/
|
|
39
|
-
deserialize(value: unknown, options: LegacyAttributeField["options"]): unknown;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
The `Transform` class is used to serialize and deserialize model
|
|
43
|
-
attributes when they are saved or loaded from an
|
|
44
|
-
adapter. Subclassing `Transform` is useful for creating custom
|
|
45
|
-
attributes. All subclasses of `Transform` must implement a
|
|
46
|
-
`serialize` and a `deserialize` method.
|
|
47
|
-
|
|
48
|
-
Example
|
|
49
|
-
|
|
50
|
-
```js [app/transforms/temperature.js]
|
|
51
|
-
|
|
52
|
-
// Converts centigrade in the JSON to fahrenheit in the app
|
|
53
|
-
export default class TemperatureTransform {
|
|
54
|
-
deserialize(serialized, options) {
|
|
55
|
-
return (serialized * 1.8) + 32;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
serialize(deserialized, options) {
|
|
59
|
-
return (deserialized - 32) / 1.8;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
static create() {
|
|
63
|
-
return new this();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Usage
|
|
69
|
-
|
|
70
|
-
```js [app/models/requirement.js]
|
|
71
|
-
import { Model, attr } from '@warp-drive/legacy/model';
|
|
72
|
-
|
|
73
|
-
export default class RequirementModel extends Model {
|
|
74
|
-
@attr('string') name;
|
|
75
|
-
@attr('temperature') temperature;
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
The options passed into the `attr` function when the attribute is
|
|
80
|
-
declared on the model is also available in the transform.
|
|
81
|
-
|
|
82
|
-
```js [app/models/post.js]
|
|
83
|
-
import { Model, attr } from '@warp-drive/legacy/model';
|
|
84
|
-
|
|
85
|
-
export default class PostModel extends Model {
|
|
86
|
-
@attr('string') title;
|
|
87
|
-
@attr('markdown', {
|
|
88
|
-
markdown: {
|
|
89
|
-
gfm: false,
|
|
90
|
-
sanitize: true
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
markdown;
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
```js [app/transforms/markdown.js]
|
|
98
|
-
export default class MarkdownTransform {
|
|
99
|
-
serialize(deserialized, options) {
|
|
100
|
-
return deserialized.raw;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
deserialize(serialized, options) {
|
|
104
|
-
let markdownOptions = options.markdown || {};
|
|
105
|
-
|
|
106
|
-
return marked(serialized, markdownOptions);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
static create() {
|
|
110
|
-
return new this();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
@class Transform
|
|
116
|
-
@public
|
|
117
|
-
*/
|
|
118
|
-
export declare const Transform: typeof EmberObject;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Store } from "@warp-drive/core";
|
|
2
|
-
import type { LegacyBelongsToField, LegacyHasManyField, LegacyRelationshipField } from "@warp-drive/core/types/schema/fields";
|
|
3
|
-
type Coercable = string | number | boolean | null | undefined | symbol;
|
|
4
|
-
export declare function coerceId(id: Coercable): string | null;
|
|
5
|
-
/**
|
|
6
|
-
Given the name of a relationship on a resource `type`, determines the
|
|
7
|
-
inverse relationship field (if any) using only the schema service.
|
|
8
|
-
|
|
9
|
-
Unlike `Model.inverseFor`, this does not require `type` to be backed by
|
|
10
|
-
a `Model` class, so it works for both `Model`-based and schema-only
|
|
11
|
-
(e.g. `withDefaults` migration-support) resources.
|
|
12
|
-
|
|
13
|
-
@private
|
|
14
|
-
*/
|
|
15
|
-
export declare function inverseForRelationship(store: Store, type: string, name: string): LegacyRelationshipField | null;
|
|
16
|
-
/**
|
|
17
|
-
Given a relationship field on a resource `type`, determines the
|
|
18
|
-
cardinality of the relationship using only the schema service.
|
|
19
|
-
|
|
20
|
-
Unlike `Model.determineRelationshipType`, this does not require `type`
|
|
21
|
-
to be backed by a `Model` class, so it works for both `Model`-based and
|
|
22
|
-
schema-only (e.g. `withDefaults` migration-support) resources.
|
|
23
|
-
|
|
24
|
-
@private
|
|
25
|
-
*/
|
|
26
|
-
export declare function determineRelationshipType(store: Store, type: string, knownSide: LegacyBelongsToField | LegacyHasManyField): "oneToOne" | "oneToMany" | "manyToOne" | "manyToMany" | "oneToNone" | "manyToNone";
|
|
27
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* :::danger
|
|
3
|
-
⚠️ **This is LEGACY documentation** for a feature that is no longer encouraged to be used.
|
|
4
|
-
If starting a new app or thinking of implementing a new adapter, consider writing a
|
|
5
|
-
{@link Handler} instead to be used with the {@link RequestManager}
|
|
6
|
-
:::
|
|
7
|
-
|
|
8
|
-
Normally, applications will use the `RESTSerializer` by implementing
|
|
9
|
-
the `normalize` method.
|
|
10
|
-
|
|
11
|
-
This allows you to do whatever kind of munging you need and is
|
|
12
|
-
especially useful if your server is inconsistent and you need to
|
|
13
|
-
do munging differently for many different kinds of responses.
|
|
14
|
-
|
|
15
|
-
See the `normalize` documentation for more information.
|
|
16
|
-
|
|
17
|
-
## Across the Board Normalization
|
|
18
|
-
|
|
19
|
-
There are also a number of hooks that you might find useful to define
|
|
20
|
-
across-the-board rules for your payload. These rules will be useful
|
|
21
|
-
if your server is consistent, or if you're building an adapter for
|
|
22
|
-
an infrastructure service, like Firebase, and want to encode service
|
|
23
|
-
conventions.
|
|
24
|
-
|
|
25
|
-
For example, if all of your keys are underscored and all-caps, but
|
|
26
|
-
otherwise consistent with the names you use in your models, you
|
|
27
|
-
can implement across-the-board rules for how to convert an attribute
|
|
28
|
-
name in your model to a key in your JSON.
|
|
29
|
-
|
|
30
|
-
```js [app/serializers/application.js]
|
|
31
|
-
import { RESTSerializer } from '@warp-drive/legacy/serializer/rest';
|
|
32
|
-
import { underscore } from '<app-name>/utils/string-utils';
|
|
33
|
-
|
|
34
|
-
export default class ApplicationSerializer extends RESTSerializer {
|
|
35
|
-
keyForAttribute(attr, method) {
|
|
36
|
-
return underscore(attr).toUpperCase();
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
You can also implement `keyForRelationship`, which takes the name
|
|
42
|
-
of the relationship as the first parameter, the kind of
|
|
43
|
-
relationship (`hasMany` or `belongsTo`) as the second parameter, and
|
|
44
|
-
the method (`serialize` or `deserialize`) as the third parameter.
|
|
45
|
-
|
|
46
|
-
@class RESTSerializer
|
|
47
|
-
@public
|
|
48
|
-
*/
|
|
49
|
-
declare const RESTSerializer: any;
|
|
50
|
-
export { EmbeddedRecordsMixin } from "./-private/embedded-records-mixin.js";
|
|
51
|
-
export { RESTSerializer };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { Transform } from "./-private/transforms/transform.js";
|
|
2
|
-
export { BooleanTransform } from "./-private/transforms/boolean.js";
|
|
3
|
-
export { DateTransform } from "./-private/transforms/date.js";
|
|
4
|
-
export { NumberTransform } from "./-private/transforms/number.js";
|
|
5
|
-
export { StringTransform } from "./-private/transforms/string.js";
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
## Overview
|
|
3
|
-
|
|
4
|
-
:::danger
|
|
5
|
-
⚠️ **This is LEGACY documentation** for a feature that is no longer encouraged to be used.
|
|
6
|
-
If starting a new app or thinking of implementing a new serializer, consider writing a
|
|
7
|
-
{@link Handler} instead to be used with the {@link RequestManager}
|
|
8
|
-
:::
|
|
9
|
-
|
|
10
|
-
In order to properly manage and present your data, WarpDrive
|
|
11
|
-
needs to understand the structure of data it receives.
|
|
12
|
-
|
|
13
|
-
`Serializers` convert data between the server's API format and
|
|
14
|
-
the format WarpDrive understands.
|
|
15
|
-
|
|
16
|
-
Data received from an API response is **normalized** into
|
|
17
|
-
[{json:api}](https://jsonapi.org/) (the format used internally
|
|
18
|
-
by WarpDrive), while data sent to an API is **serialized**
|
|
19
|
-
into the format the API expects.
|
|
20
|
-
|
|
21
|
-
### Implementing a Serializer
|
|
22
|
-
|
|
23
|
-
There are only two required serializer methods, one for
|
|
24
|
-
normalizing data from the server API format into {json:api}, and
|
|
25
|
-
another for serializing records via `Snapshots` into the expected
|
|
26
|
-
server API format.
|
|
27
|
-
|
|
28
|
-
To implement a serializer, export a class that conforms to the structure
|
|
29
|
-
described by {@link MinimumSerializerInterface}
|
|
30
|
-
from the `app/serializers/` directory. An example is below.
|
|
31
|
-
|
|
32
|
-
```ts
|
|
33
|
-
import EmberObject from '@ember/object';
|
|
34
|
-
|
|
35
|
-
export default class ApplicationSerializer extends EmberObject {
|
|
36
|
-
normalizeResponse(store, schema, rawPayload) {
|
|
37
|
-
return rawPayload;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
serialize(snapshot, options) {
|
|
41
|
-
const serializedResource = {
|
|
42
|
-
id: snapshot.id,
|
|
43
|
-
type: snapshot.modelName,
|
|
44
|
-
attributes: snapshot.attributes()
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return serializedResource;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
### Serializer Resolution
|
|
54
|
-
|
|
55
|
-
`store.serializerFor(name)` will lookup serializers defined in
|
|
56
|
-
`app/serializers/` and return an instance. If no serializer is found, an
|
|
57
|
-
error will be thrown.
|
|
58
|
-
|
|
59
|
-
`serializerFor` first attempts to find a serializer with an exact match on `name`,
|
|
60
|
-
then falls back to checking for the presence of a serializer named `application`.
|
|
61
|
-
|
|
62
|
-
```ts
|
|
63
|
-
store.serializerFor('author');
|
|
64
|
-
|
|
65
|
-
// lookup paths (in order) =>
|
|
66
|
-
// app/serializers/author.js
|
|
67
|
-
// app/serializers/application.js
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Most requests in `@warp-drive/legacy` are made with respect to a particular `type` (or `modelName`)
|
|
71
|
-
(e.g., "get me the full collection of **books**" or "get me the **employee** whose id is 37"). We
|
|
72
|
-
refer to this as the **primary** resource `type`.
|
|
73
|
-
|
|
74
|
-
Typically `serializerFor` will be used to find a serializer with a name matching that of the primary
|
|
75
|
-
resource `type` for the request, falling back to the `application` serializer for those types that
|
|
76
|
-
do not have a defined serializer. This is often described as a `per-model` or `per-type` strategy
|
|
77
|
-
for defining serializers. However, because APIs rarely format payloads per-type but rather
|
|
78
|
-
per-API-version, this may not be a desired strategy.
|
|
79
|
-
|
|
80
|
-
It is recommended that applications define only a single `application` adapter and serializer
|
|
81
|
-
where possible.
|
|
82
|
-
|
|
83
|
-
If you have multiple API formats and the per-type strategy is not viable, one strategy is to
|
|
84
|
-
write an `application` adapter and serializer that make use of `options` to specify the desired
|
|
85
|
-
format when making a request.
|
|
86
|
-
|
|
87
|
-
### Using a Serializer
|
|
88
|
-
|
|
89
|
-
Any serializer in `app/serializers/` can be looked up by `name` using `store.serializerFor(name)`.
|
|
90
|
-
|
|
91
|
-
### Default Serializers
|
|
92
|
-
|
|
93
|
-
For applications whose APIs are *very close to* or *exactly* the **REST** format or **JSON:API**
|
|
94
|
-
format the `@warp-drive/legacy/serializer` package contains implementations these applications can
|
|
95
|
-
extend. It also contains a simple `JSONSerializer` for serializing to/from very basic JSON objects.
|
|
96
|
-
|
|
97
|
-
Many applications will find writing their own serializer to be more performant and less
|
|
98
|
-
complex than extending these classes even when their API format is very close to that expected
|
|
99
|
-
by these serializers.
|
|
100
|
-
|
|
101
|
-
It is recommended that apps write their own serializer to best suit the needs of their API and
|
|
102
|
-
application.
|
|
103
|
-
|
|
104
|
-
@module
|
|
105
|
-
*/
|
|
106
|
-
import EmberObject from "@ember/object";
|
|
107
|
-
import type { Store } from "@warp-drive/core";
|
|
108
|
-
import type { ModelSchema } from "@warp-drive/core/types";
|
|
109
|
-
import type { EmptyResourceDocument, SingleResourceDocument } from "@warp-drive/core/types/spec/json-api-raw";
|
|
110
|
-
/**
|
|
111
|
-
> ⚠️ CAUTION you likely want the docs for {@link MinimumSerializerInterface}
|
|
112
|
-
> as extending this abstract class is unnecessary.
|
|
113
|
-
|
|
114
|
-
`Serializer` is an abstract base class that you may override in your
|
|
115
|
-
application to customize it for your backend. The minimum set of methods
|
|
116
|
-
that you should implement is:
|
|
117
|
-
|
|
118
|
-
* `normalizeResponse()`
|
|
119
|
-
* `serialize()`
|
|
120
|
-
|
|
121
|
-
And you can optionally override the following methods:
|
|
122
|
-
|
|
123
|
-
* `normalize()`
|
|
124
|
-
|
|
125
|
-
For an example implementation, see the included {@link JSONSerializer}.
|
|
126
|
-
|
|
127
|
-
@class Serializer
|
|
128
|
-
@public
|
|
129
|
-
*/
|
|
130
|
-
export declare class Serializer extends EmberObject {
|
|
131
|
-
/**
|
|
132
|
-
The `store` property is the application's `store` that contains
|
|
133
|
-
all records. It can be used to look up serializers for other model
|
|
134
|
-
types that may be nested inside the payload response.
|
|
135
|
-
|
|
136
|
-
Example:
|
|
137
|
-
|
|
138
|
-
```js
|
|
139
|
-
Serializer.extend({
|
|
140
|
-
extractRelationship(relationshipModelName, relationshipHash) {
|
|
141
|
-
let modelClass = this.store.modelFor(relationshipModelName);
|
|
142
|
-
let relationshipSerializer = this.store.serializerFor(relationshipModelName);
|
|
143
|
-
return relationshipSerializer.normalize(modelClass, relationshipHash);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
@public
|
|
149
|
-
*/
|
|
150
|
-
store: Store;
|
|
151
|
-
/**
|
|
152
|
-
The `normalizeResponse` method is used to normalize a payload from the
|
|
153
|
-
server to a JSON-API Document.
|
|
154
|
-
|
|
155
|
-
http://jsonapi.org/format/#document-structure
|
|
156
|
-
|
|
157
|
-
Example:
|
|
158
|
-
|
|
159
|
-
```js
|
|
160
|
-
Serializer.extend({
|
|
161
|
-
normalizeResponse(store, primaryModelClass, payload, id, requestType) {
|
|
162
|
-
if (requestType === 'findRecord') {
|
|
163
|
-
return this.normalize(primaryModelClass, payload);
|
|
164
|
-
} else {
|
|
165
|
-
return payload.reduce(function(documentHash, item) {
|
|
166
|
-
let { data, included } = this.normalize(primaryModelClass, item);
|
|
167
|
-
documentHash.included.push(...included);
|
|
168
|
-
documentHash.data.push(data);
|
|
169
|
-
return documentHash;
|
|
170
|
-
}, { data: [], included: [] })
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
@since 1.13.0
|
|
177
|
-
@public
|
|
178
|
-
@param {Store} store
|
|
179
|
-
@param {Model} primaryModelClass
|
|
180
|
-
@param {Object} payload
|
|
181
|
-
@param {String|Number} id
|
|
182
|
-
@param {String} requestType
|
|
183
|
-
@return {Object} JSON-API Document
|
|
184
|
-
*/
|
|
185
|
-
/**
|
|
186
|
-
The `serialize` method is used when a record is saved in order to convert
|
|
187
|
-
the record into the form that your external data source expects.
|
|
188
|
-
|
|
189
|
-
`serialize` takes an optional `options` hash with a single option:
|
|
190
|
-
|
|
191
|
-
- `includeId`: If this is `true`, `serialize` should include the ID
|
|
192
|
-
in the serialized object it builds.
|
|
193
|
-
|
|
194
|
-
Example:
|
|
195
|
-
|
|
196
|
-
```js
|
|
197
|
-
Serializer.extend({
|
|
198
|
-
serialize(snapshot, options) {
|
|
199
|
-
let json = {
|
|
200
|
-
id: snapshot.id
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
snapshot.eachAttribute((key, attribute) => {
|
|
204
|
-
json[key] = snapshot.attr(key);
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
snapshot.eachRelationship((key, relationship) => {
|
|
208
|
-
if (relationship.kind === 'belongsTo') {
|
|
209
|
-
json[key] = snapshot.belongsTo(key, { id: true });
|
|
210
|
-
} else if (relationship.kind === 'hasMany') {
|
|
211
|
-
json[key] = snapshot.hasMany(key, { ids: true });
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
return json;
|
|
216
|
-
},
|
|
217
|
-
});
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
@public
|
|
221
|
-
@param {Snapshot} snapshot
|
|
222
|
-
@param {Object} [options]
|
|
223
|
-
@return {Object}
|
|
224
|
-
*/
|
|
225
|
-
/**
|
|
226
|
-
The `normalize` method is used to convert a payload received from your
|
|
227
|
-
external data source into the normalized form `store.push()` expects. You
|
|
228
|
-
should override this method, munge the hash and return the normalized
|
|
229
|
-
payload.
|
|
230
|
-
|
|
231
|
-
Example:
|
|
232
|
-
|
|
233
|
-
```js
|
|
234
|
-
Serializer.extend({
|
|
235
|
-
normalize(modelClass, resourceHash) {
|
|
236
|
-
let data = {
|
|
237
|
-
id: resourceHash.id,
|
|
238
|
-
type: modelClass.modelName,
|
|
239
|
-
attributes: resourceHash
|
|
240
|
-
};
|
|
241
|
-
return { data: data };
|
|
242
|
-
}
|
|
243
|
-
})
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
@public
|
|
247
|
-
@param _typeClass - the model class the hash is being normalized for
|
|
248
|
-
@param hash - the raw payload hash to normalize
|
|
249
|
-
@return the normalized resource document
|
|
250
|
-
*/
|
|
251
|
-
normalize(_typeClass: ModelSchema, hash: Record<string, unknown>): SingleResourceDocument | EmptyResourceDocument;
|
|
252
|
-
}
|