Skip to content
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
52 changes: 52 additions & 0 deletions src/api/customProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,55 @@ export const fetchCustomProperties = async (
},
})
}

export const createCustomProperty = async (
token: string,
project_id: string,
data: {
name: string
key: string
type: 'String' | 'Boolean' | 'Number'
propertyKey: string
},
) => {
return apiClient.post(`${BASE_URL}`, data, {
headers: buildHeaders(token),
params: {
project: project_id,
},
})
}

export const updateCustomProperty = async (
token: string,
project_id: string,
key: string,
data: {
name?: string
key?: string
propertyKey?: string
type?: 'String' | 'Boolean' | 'Number'
},
) => {
return apiClient.patch(`${BASE_URL}/:key`, data, {
headers: buildHeaders(token),
params: {
project: project_id,
key,
},
})
}

export const deleteCustomProperty = async (
token: string,
project_id: string,
key: string,
) => {
return apiClient.delete(`${BASE_URL}/:key`, undefined, {
headers: buildHeaders(token),
params: {
project: project_id,
key,
},
})
}
6 changes: 6 additions & 0 deletions src/mcp/tools/commonSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ export const PROJECT_KEY_PROPERTY = {
'The project key (unique, immutable, max 100 characters, pattern: ^[a-z0-9-_.]+$)',
}

export const CUSTOM_PROPERTY_KEY_PROPERTY = {
type: 'string' as const,
description:
'The custom property key (unique, immutable, max 100 characters, pattern: ^[a-z0-9-_.]+$)',
}

// Filter type definitions based on DevCycle API swagger schemas

export const ALL_FILTER_SCHEMA = {
Expand Down
Loading