Skip to content

add missing entries for ember-data 3.28 #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"data": {
"id": "ember-data-3.28.13-@ember-data/adapter/error",
"type": "class",
"attributes": {
"name": "@ember-data/adapter/error",
"shortname": "@ember-data/adapter/error",
"classitems": [],
"plugins": [],
"extensions": [],
"plugin_for": [],
"extension_for": [],
"module": "@ember-data/adapter/error",
"namespace": "",
"methods": [
{
"file": "../store/addon/-private/system/errors-utils.js",
"line": 12,
"description": "<html><head></head><body><p>Convert an hash of errors into an array with errors in JSON-API format.</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n</pre></td>\n <td class=\"code\"><pre>import DS from <span class=\"string\">&apos;ember-data&apos;</span>;\n\nconst { errorsHashToArray } = DS;\n\nlet errors = {\n base: <span class=\"string\">&apos;Invalid attributes on saving this record&apos;</span>,\n name: <span class=\"string\">&apos;Must be present&apos;</span>,\n age: [<span class=\"string\">&apos;Must be present&apos;</span>, <span class=\"string\">&apos;Must be a number&apos;</span>]\n};\nlet errorsArray = errorsHashToArray(errors);\n<span class=\"regexp\">//</span> [\n<span class=\"regexp\">//</span> {\n<span class=\"regexp\">//</span> title: <span class=\"string\">&quot;Invalid Document&quot;</span>,\n<span class=\"regexp\">//</span> detail: <span class=\"string\">&quot;Invalid attributes on saving this record&quot;</span>,\n<span class=\"regexp\">//</span> source: { pointer: <span class=\"string\">&quot;/data&quot;</span> }\n<span class=\"regexp\">//</span> },\n<span class=\"regexp\">//</span> {\n<span class=\"regexp\">//</span> title: <span class=\"string\">&quot;Invalid Attribute&quot;</span>,\n<span class=\"regexp\">//</span> detail: <span class=\"string\">&quot;Must be present&quot;</span>,\n<span class=\"regexp\">//</span> source: { pointer: <span class=\"string\">&quot;/data/attributes/name&quot;</span> }\n<span class=\"regexp\">//</span> },\n<span class=\"regexp\">//</span> {\n<span class=\"regexp\">//</span> title: <span class=\"string\">&quot;Invalid Attribute&quot;</span>,\n<span class=\"regexp\">//</span> detail: <span class=\"string\">&quot;Must be present&quot;</span>,\n<span class=\"regexp\">//</span> source: { pointer: <span class=\"string\">&quot;/data/attributes/age&quot;</span> }\n<span class=\"regexp\">//</span> },\n<span class=\"regexp\">//</span> {\n<span class=\"regexp\">//</span> title: <span class=\"string\">&quot;Invalid Attribute&quot;</span>,\n<span class=\"regexp\">//</span> detail: <span class=\"string\">&quot;Must be a number&quot;</span>,\n<span class=\"regexp\">//</span> source: { pointer: <span class=\"string\">&quot;/data/attributes/age&quot;</span> }\n<span class=\"regexp\">//</span> }\n<span class=\"regexp\">//</span> ]</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
"itemtype": "method",
"name": "errorsHashToArray",
"static": 1,
"access": "public",
"tagname": "",
"params": [
{
"name": "errors",
"description": "hash with errors as properties",
"type": "Object"
}
],
"return": {
"description": "array of errors in JSON-API format",
"type": "Array"
},
"class": "@ember-data/adapter/error",
"module": "@ember-data/adapter/error"
},
{
"file": "../store/addon/-private/system/errors-utils.js",
"line": 82,
"description": "<html><head></head><body><p>Convert an array of errors in JSON-API format into an object.</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n</pre></td>\n <td class=\"code\"><pre>import DS from <span class=\"string\">&apos;ember-data&apos;</span>;\n\nconst { errorsArrayToHash } = DS;\n\nlet errorsArray = [\n {\n title: <span class=\"string\">&apos;Invalid Attribute&apos;</span>,\n detail: <span class=\"string\">&apos;Must be present&apos;</span>,\n source: { pointer: <span class=\"string\">&apos;/data/attributes/name&apos;</span> }\n },\n {\n title: <span class=\"string\">&apos;Invalid Attribute&apos;</span>,\n detail: <span class=\"string\">&apos;Must be present&apos;</span>,\n source: { pointer: <span class=\"string\">&apos;/data/attributes/age&apos;</span> }\n },\n {\n title: <span class=\"string\">&apos;Invalid Attribute&apos;</span>,\n detail: <span class=\"string\">&apos;Must be a number&apos;</span>,\n source: { pointer: <span class=\"string\">&apos;/data/attributes/age&apos;</span> }\n }\n];\n\nlet errors = errorsArrayToHash(errorsArray);\n<span class=\"regexp\">//</span> {\n<span class=\"regexp\">//</span> <span class=\"string\">&quot;name&quot;</span>: [<span class=\"string\">&quot;Must be present&quot;</span>],\n<span class=\"regexp\">//</span> <span class=\"string\">&quot;age&quot;</span>: [<span class=\"string\">&quot;Must be present&quot;</span>, <span class=\"string\">&quot;must be a number&quot;</span>]\n<span class=\"regexp\">//</span> }</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
"itemtype": "method",
"name": "errorsArrayToHash",
"static": 1,
"access": "public",
"tagname": "",
"params": [
{
"name": "errors",
"description": "array of errors in JSON-API format",
"type": "Array"
}
],
"return": {
"description": "",
"type": "Object"
},
"class": "@ember-data/adapter/error",
"module": "@ember-data/adapter/error"
}
],
"events": [],
"properties": []
},
"relationships": {
"parent-class": {
"data": null
},
"descendants": {
"data": []
},
"module": {
"data": {
"id": "ember-data-3.28.13-@ember-data/adapter/error",
"type": "module"
}
},
"project-version": {
"data": {
"id": "ember-data-3.28.13",
"type": "project-version"
}
}
}
}
}
Loading