File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import {
1414} from './{{ fileName }} '
1515{{ /each }}
1616
17- export class SeamHttpEndpoints {
17+ export class {{ className }} {
1818 {{> route-class-methods }}
1919
2020 {{ #each endpoints }}
@@ -36,8 +36,8 @@ export class SeamHttpEndpoints {
3636 {{ /each }}
3737}
3838
39- export type SeamHttpEndpointQueryPaths = {{ #each endpointReadPaths }} '{{ . }} ' {{ #unless @last }} | {{ /unless }}{{ /each }}
39+ export type {{ typeNamePrefix }} QueryPaths = {{ #each endpointReadPaths }} '{{ . }} ' {{ #unless @last }} | {{ /unless }}{{ /each }}
4040
41- export type SeamHttpEndpointPaginatedQueryPaths = {{ #each endpointPaginatedPaths }} '{{ . }} ' {{ #unless @last }} | {{ /unless }}{{ /each }}
41+ export type {{ typeNamePrefix }} PaginatedQueryPaths = {{ #each endpointPaginatedPaths }} '{{ . }} ' {{ #unless @last }} | {{ /unless }}{{ /each }}
4242
43- export type SeamHttpEndpointMutationPaths = {{ #each endpointWritePaths }} '{{ . }} ' {{ #unless @last }} | {{ /unless }}{{ /each }}
43+ export type {{ typeNamePrefix }} MutationPaths = {{ #each endpointWritePaths }} '{{ . }} ' {{ #unless @last }} | {{ /unless }}{{ /each }}
Original file line number Diff line number Diff line change 99
1010export interface EndpointsLayoutContext {
1111 className : string
12+ typeNamePrefix : string
1213 endpoints : EndpointLayoutContext [ ]
1314 endpointReadPaths : string [ ]
1415 endpointPaginatedPaths : string [ ]
@@ -28,6 +29,7 @@ export const setEndpointsLayoutContext = (
2829 routes : Route [ ] ,
2930) : void => {
3031 file . className = getClassName ( 'Endpoints' )
32+ file . typeNamePrefix = getClassName ( 'Endpoint' )
3133 file . skipClientSessionImport = true
3234 file . endpoints = routes . flatMap ( ( route ) =>
3335 route . endpoints . map ( ( endpoint ) =>
You can’t perform that action at this time.
0 commit comments