@@ -57,7 +57,7 @@ export const createWorkspace = (queryClient: QueryClient) => {
57
57
type AutoCreateWorkspaceOptions = {
58
58
organizationId : string ;
59
59
templateName : string ;
60
- name : string ;
60
+ workspaceName : string ;
61
61
/**
62
62
* If provided, the auto-create workspace feature will attempt to find a
63
63
* matching workspace. If found, it will return the existing workspace instead
@@ -66,7 +66,7 @@ type AutoCreateWorkspaceOptions = {
66
66
* multiple values are returned, the first one will be returned.
67
67
*/
68
68
match : string | null ;
69
- versionId ?: string ;
69
+ templateVersionId ?: string ;
70
70
buildParameters ?: WorkspaceBuildParameter [ ] ;
71
71
} ;
72
72
@@ -75,8 +75,8 @@ export const autoCreateWorkspace = (queryClient: QueryClient) => {
75
75
mutationFn : async ( {
76
76
organizationId,
77
77
templateName,
78
- name ,
79
- versionId ,
78
+ workspaceName ,
79
+ templateVersionId ,
80
80
buildParameters,
81
81
match,
82
82
} : AutoCreateWorkspaceOptions ) => {
@@ -91,8 +91,8 @@ export const autoCreateWorkspace = (queryClient: QueryClient) => {
91
91
92
92
let templateVersionParameters ;
93
93
94
- if ( versionId ) {
95
- templateVersionParameters = { template_version_id : versionId } ;
94
+ if ( templateVersionId ) {
95
+ templateVersionParameters = { template_version_id : templateVersionId } ;
96
96
} else {
97
97
const template = await API . getTemplateByName (
98
98
organizationId ,
@@ -103,7 +103,7 @@ export const autoCreateWorkspace = (queryClient: QueryClient) => {
103
103
104
104
return API . createWorkspace ( organizationId , "me" , {
105
105
...templateVersionParameters ,
106
- name,
106
+ name : workspaceName ,
107
107
rich_parameter_values : buildParameters ,
108
108
} ) ;
109
109
} ,
0 commit comments