Skip to content

Commit af1ec56

Browse files
committed
Fix type errors
1 parent 3447abf commit af1ec56

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/index.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,43 @@ export const createTools = (apiKey: string) => {
1515
return {
1616
listProviders: tool({
1717
description: 'List all providers',
18-
parameters: z.object({}),
18+
inputSchema: z.object({}),
1919
execute: async (_input, { abortSignal }) => {
2020
return sdk(abortSignal).listProviders();
2121
},
2222
}),
2323
createProvider: tool({
2424
description: 'Create a new provider',
25-
parameters: UgSchema.CreateProviderSchema,
25+
inputSchema: UgSchema.CreateProviderSchema,
2626
execute: async (args, { abortSignal }) => {
2727
return sdk(abortSignal).createProvider(args);
2828
},
2929
}),
3030
getProvider: tool({
3131
description: 'Get a provider by ID',
32-
parameters: z.object({ id: UgSchema.ProviderIdSchema }),
32+
inputSchema: z.object({ id: UgSchema.ProviderIdSchema }),
3333
execute: async ({ id }, { abortSignal }) => {
3434
return sdk(abortSignal).getProvider(id);
3535
},
3636
}),
3737
deleteProvider: tool({
3838
description: 'Delete a provider',
39-
parameters: z.object({ id: UgSchema.ProviderIdSchema }),
39+
inputSchema: z.object({ id: UgSchema.ProviderIdSchema }),
4040
execute: async ({ id }, { abortSignal }) => {
4141
await sdk(abortSignal).deleteProvider(id);
4242
return `Provider ${id} deleted`;
4343
},
4444
}),
4545
listClients: tool({
4646
description: 'List all clients',
47-
parameters: z.object({ providerId: UgSchema.ProviderIdSchema }),
47+
inputSchema: z.object({ providerId: UgSchema.ProviderIdSchema }),
4848
execute: async ({ providerId }, { abortSignal }) => {
4949
return sdk(abortSignal).listClients(providerId);
5050
},
5151
}),
5252
createClient: tool({
5353
description: 'Create a new client for a provider',
54-
parameters: z.object({
54+
inputSchema: z.object({
5555
providerId: UgSchema.ProviderIdSchema,
5656
...UgSchema.CreateClientSchema.shape,
5757
}),
@@ -61,7 +61,7 @@ export const createTools = (apiKey: string) => {
6161
}),
6262
getClient: tool({
6363
description: 'Get client details by provider and client ID',
64-
parameters: z.object({
64+
inputSchema: z.object({
6565
providerId: UgSchema.ProviderIdSchema,
6666
clientId: UgSchema.ClientIdSchema,
6767
}),
@@ -71,7 +71,7 @@ export const createTools = (apiKey: string) => {
7171
}),
7272
deleteClient: tool({
7373
description: 'Delete a client from a provider',
74-
parameters: z.object({
74+
inputSchema: z.object({
7575
providerId: UgSchema.ProviderIdSchema,
7676
clientId: UgSchema.ClientIdSchema,
7777
}),
@@ -82,14 +82,14 @@ export const createTools = (apiKey: string) => {
8282
}),
8383
listDomains: tool({
8484
description: 'List all domains for a provider',
85-
parameters: z.object({ providerId: UgSchema.ProviderIdSchema }),
85+
inputSchema: z.object({ providerId: UgSchema.ProviderIdSchema }),
8686
execute: async ({ providerId }, { abortSignal }) => {
8787
return sdk(abortSignal).listDomains(providerId);
8888
},
8989
}),
9090
addDomain: tool({
9191
description: 'Add a new domain for a provider',
92-
parameters: z.object({
92+
inputSchema: z.object({
9393
providerId: UgSchema.ProviderIdSchema,
9494
domain: UgSchema.AddDomainSchema.shape.domain,
9595
}),
@@ -99,7 +99,7 @@ export const createTools = (apiKey: string) => {
9999
}),
100100
getDomain: tool({
101101
description: 'Get a domain by provider and domain ID',
102-
parameters: z.object({
102+
inputSchema: z.object({
103103
providerId: UgSchema.ProviderIdSchema,
104104
domainId: UgSchema.DomainIdSchema,
105105
}),
@@ -109,7 +109,7 @@ export const createTools = (apiKey: string) => {
109109
}),
110110
deleteDomain: tool({
111111
description: 'Delete a domain by provider and domain ID',
112-
parameters: z.object({
112+
inputSchema: z.object({
113113
providerId: UgSchema.ProviderIdSchema,
114114
domainId: UgSchema.DomainIdSchema,
115115
}),
@@ -120,7 +120,7 @@ export const createTools = (apiKey: string) => {
120120
}),
121121
verifyDomain: tool({
122122
description: 'Verify a domain by provider and domain ID',
123-
parameters: z.object({
123+
inputSchema: z.object({
124124
providerId: UgSchema.ProviderIdSchema,
125125
domainId: UgSchema.DomainIdSchema,
126126
}),
@@ -130,7 +130,7 @@ export const createTools = (apiKey: string) => {
130130
}),
131131
createAccessToken: tool({
132132
description: 'Create a new access token for a client',
133-
parameters: z.object({
133+
inputSchema: z.object({
134134
providerId: UgSchema.ProviderIdSchema,
135135
clientId: UgSchema.ClientIdSchema,
136136
...UgSchema.CreateTokenSchema.shape,
@@ -141,43 +141,43 @@ export const createTools = (apiKey: string) => {
141141
}),
142142
listTenants: tool({
143143
description: 'List all tenants',
144-
parameters: z.object({}),
144+
inputSchema: z.object({}),
145145
execute: async (_input, { abortSignal }) => {
146146
return sdk(abortSignal).listTenants();
147147
},
148148
}),
149149
createTenant: tool({
150150
description: 'Create a new tenant',
151-
parameters: UgSchema.CreateTenantSchema,
151+
inputSchema: UgSchema.CreateTenantSchema,
152152
execute: async (payload, { abortSignal }) => {
153153
return sdk(abortSignal).createTenant(payload);
154154
},
155155
}),
156156
getTenant: tool({
157157
description: 'Get a tenant by ID',
158-
parameters: z.object({ id: UgSchema.TenantIdSchema }),
158+
inputSchema: z.object({ id: UgSchema.TenantIdSchema }),
159159
execute: async ({ id }, { abortSignal }) => {
160160
return sdk(abortSignal).getTenant(id);
161161
},
162162
}),
163163
deleteTenant: tool({
164164
description: 'Delete a tenant',
165-
parameters: z.object({ id: UgSchema.TenantIdSchema }),
165+
inputSchema: z.object({ id: UgSchema.TenantIdSchema }),
166166
execute: async ({ id }, { abortSignal }) => {
167167
await sdk(abortSignal).deleteTenant(id);
168168
return `Tenant ${id} deleted`;
169169
},
170170
}),
171171
listTenantProviders: tool({
172172
description: 'List all providers for a tenant',
173-
parameters: z.object({ tenantId: UgSchema.TenantIdSchema }),
173+
inputSchema: z.object({ tenantId: UgSchema.TenantIdSchema }),
174174
execute: async ({ tenantId }, { abortSignal }) => {
175175
return sdk(abortSignal).listTenantProviders(tenantId);
176176
},
177177
}),
178178
createTenantProvider: tool({
179179
description: 'Create a new provider for a tenant',
180-
parameters: z.object({
180+
inputSchema: z.object({
181181
tenantId: UgSchema.TenantIdSchema,
182182
...UgSchema.CreateTenantProviderSchema.shape,
183183
}),
@@ -187,7 +187,7 @@ export const createTools = (apiKey: string) => {
187187
}),
188188
getTenantProvider: tool({
189189
description: 'Get a provider for a tenant',
190-
parameters: z.object({
190+
inputSchema: z.object({
191191
tenantId: UgSchema.TenantIdSchema,
192192
providerId: UgSchema.TenantProviderIdSchema,
193193
}),
@@ -197,7 +197,7 @@ export const createTools = (apiKey: string) => {
197197
}),
198198
deleteTenantProvider: tool({
199199
description: 'Delete a provider for a tenant',
200-
parameters: z.object({
200+
inputSchema: z.object({
201201
tenantId: UgSchema.TenantIdSchema,
202202
providerId: UgSchema.TenantProviderIdSchema,
203203
}),
@@ -208,7 +208,7 @@ export const createTools = (apiKey: string) => {
208208
}),
209209
listTenantProviderPolicies: tool({
210210
description: 'List all policies for a tenant provider',
211-
parameters: z.object({
211+
inputSchema: z.object({
212212
tenantId: UgSchema.TenantIdSchema,
213213
providerId: UgSchema.TenantProviderIdSchema,
214214
}),
@@ -218,7 +218,7 @@ export const createTools = (apiKey: string) => {
218218
}),
219219
createTenantProviderPolicy: tool({
220220
description: 'Create a new policy for a tenant provider',
221-
parameters: z.object({
221+
inputSchema: z.object({
222222
tenantId: UgSchema.TenantIdSchema,
223223
providerId: UgSchema.TenantProviderIdSchema,
224224
...UgSchema.CreateTenantProviderPolicySchema.shape,
@@ -229,7 +229,7 @@ export const createTools = (apiKey: string) => {
229229
}),
230230
getTenantProviderPolicy: tool({
231231
description: 'Get a policy for a tenant provider',
232-
parameters: z.object({
232+
inputSchema: z.object({
233233
tenantId: UgSchema.TenantIdSchema,
234234
providerId: UgSchema.TenantProviderIdSchema,
235235
policyId: UgSchema.TenantProviderPolicyIdSchema,
@@ -240,7 +240,7 @@ export const createTools = (apiKey: string) => {
240240
}),
241241
deleteTenantProviderPolicy: tool({
242242
description: 'Delete a policy for a tenant provider',
243-
parameters: z.object({
243+
inputSchema: z.object({
244244
tenantId: UgSchema.TenantIdSchema,
245245
providerId: UgSchema.TenantProviderIdSchema,
246246
policyId: UgSchema.TenantProviderPolicyIdSchema,
@@ -252,7 +252,7 @@ export const createTools = (apiKey: string) => {
252252
}),
253253
validateAccessToken: tool({
254254
description: 'Validate an access token',
255-
parameters: z.object({
255+
inputSchema: z.object({
256256
tenantId: UgSchema.TenantIdSchema,
257257
policyId: UgSchema.TenantProviderPolicyIdSchema,
258258
accessToken: z.string(),

0 commit comments

Comments
 (0)