@@ -15,6 +15,7 @@ import LanguageTabs from '@site/src/components/LanguageTabs';
15
15
import ProtocolTabs from '@site/src /components/ProtocolTabs';
16
16
import PkgInstall from '@site/src /components/PkgInstall';
17
17
import TypeScriptEditor from '@site/src /components/TypeScriptEditor';
18
+ import Link from '@docusaurus/Link ';
18
19
19
20
# Define Resources
20
21
@@ -34,7 +35,26 @@ values={[
34
35
] }>
35
36
<TabItem value =" rest " >
36
37
37
- <PkgInstall pkgs =" @data-client/rest " />
38
+ <PkgInstall pkgs =" @data-client/rest " />
39
+
40
+ <p >
41
+ <center >
42
+ <Link className =" button button--secondary button--sm " to =" https://chatgpt.com/g/g-682609591fe48191a6850901521b4e4b-typescript-rest-codegen " ><img src="/img/gpt.svg" alt="Codegen GPT" style={{
43
+ height: '1em', // Match font size
44
+ verticalAlign: '-0.125em', // Fine-tune: try -0.125em or 'middle'
45
+ display: 'inline', // Inline with text
46
+ }}
47
+ /> Codegen</Link >  ;
48
+ <Link className =" button button--secondary button--sm " to =" https://github.com/reactive/data-client/blob/master/.github/instructions/rest.instructions.md " ><img src="/img/copilot.svg" alt="Github Copilot" style={{
49
+ height: '1em', // Match font size
50
+ verticalAlign: '-0.125em', // Fine-tune: try -0.125em or 'middle'
51
+ display: 'inline', // Inline with text
52
+ }}
53
+ /> Instructions</Link >
54
+ </center >
55
+ </p >
56
+
57
+
38
58
39
59
[ resource()] ( /rest/api/resource ) constructs a namespace of [ RestEndpoints] ( /rest/api/RestEndpoint )
40
60
@@ -84,10 +104,10 @@ TodoResource.delete({ id: 5 });
84
104
85
105
</TypeScriptEditor >
86
106
87
- </TabItem >
88
- <TabItem value =" gql " >
107
+ </TabItem >
108
+ <TabItem value =" gql " >
89
109
90
- <PkgInstall pkgs =" @data-client/graphql " />
110
+ <PkgInstall pkgs =" @data-client/graphql " />
91
111
92
112
[ GQLEndpoint] ( /graphql/api/GQLEndpoint ) helps quickly defined [ queries] ( /graphql/api/GQLEndpoint#query ) and [ mutations] ( /graphql/api/GQLEndpoint#mutate )
93
113
@@ -133,10 +153,10 @@ export const TodoResource = {
133
153
134
154
</TypeScriptEditor >
135
155
136
- </TabItem >
137
- <TabItem value =" other " >
156
+ </TabItem >
157
+ <TabItem value =" other " >
138
158
139
- <PkgInstall pkgs =" @data-client/endpoint " />
159
+ <PkgInstall pkgs =" @data-client/endpoint " />
140
160
141
161
Pre-existing TypeScript definitions can be used in <abbr title =" Reactive Data Client " >Data Client</abbr > with
142
162
[ Endpoint] ( /rest/api/Endpoint ) and [ EntityMixin] ( /rest/api/EntityMixin ) .
@@ -226,7 +246,7 @@ export const TodoResource = {
226
246
227
247
</TypeScriptEditor >
228
248
229
- </TabItem >
249
+ </TabItem >
230
250
</Tabs >
231
251
232
252
<!--
0 commit comments