@commercetools/tools-core 0.0.1 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/index.cjs +11290 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +889 -0
  4. package/dist/index.d.ts +889 -5
  5. package/dist/index.js +7137 -1
  6. package/package.json +16 -11
  7. package/dist/decorators/test/tool.decorator.test.d.ts +0 -1
  8. package/dist/decorators/tool.decorator.d.ts +0 -26
  9. package/dist/handlers/base.handler.d.ts +0 -34
  10. package/dist/handlers/commercetools.handler.d.ts +0 -16
  11. package/dist/handlers/test/base.handler.test.d.ts +0 -1
  12. package/dist/handlers/test/commercetools.handler.test.d.ts +0 -1
  13. package/dist/handlers/test/fixtures.d.ts +0 -24
  14. package/dist/resources/customer/customer.handler.d.ts +0 -22
  15. package/dist/resources/customer/customer.prompt.d.ts +0 -4
  16. package/dist/resources/customer/customer.schema.d.ts +0 -281
  17. package/dist/resources/customer/test/customer.hander.test.d.ts +0 -1
  18. package/dist/resources/customer/test/fixtures.d.ts +0 -2
  19. package/dist/resources/project/project.handler.d.ts +0 -26
  20. package/dist/resources/project/project.prompt.d.ts +0 -2
  21. package/dist/resources/project/project.schema.d.ts +0 -454
  22. package/dist/resources/project/test/fixtures.d.ts +0 -2
  23. package/dist/resources/project/test/project.handler.test.d.ts +0 -1
  24. package/dist/shared/client/client.base.d.ts +0 -9
  25. package/dist/shared/client/sdk.commercetools.d.ts +0 -31
  26. package/dist/shared/errors/tool.error.d.ts +0 -34
  27. package/dist/shared/index.d.ts +0 -5
  28. package/dist/shared/types/interface.d.ts +0 -57
  29. package/dist/shared/types/types.d.ts +0 -4
  30. package/dist/utils/constants.d.ts +0 -1
@@ -0,0 +1,889 @@
1
+ import * as _commercetools_platform_sdk from '@commercetools/platform-sdk';
2
+ import { ApiRoot, ByProjectKeyRequestBuilder, AttributeGroup, AttributeGroupPagedQueryResponse, Category, CategoryPagedQueryResponse, Cart, CartPagedQueryResponse, Channel, ChannelPagedQueryResponse, CustomObject, CustomObjectPagedQueryResponse, Customer, CustomerPagedQueryResponse, CustomerSignInResult, CustomerGroup, CustomerGroupPagedQueryResponse, CustomerPagedSearchResponse, DiscountCode, DiscountCodePagedQueryResponse, Extension, ExtensionPagedQueryResponse, InventoryEntry, InventoryPagedQueryResponse, Message, MessagePagedQueryResponse, ProductDiscount, ProductDiscountPagedQueryResponse, ProductProjection, ProductProjectionPagedSearchResponse, ProductPagedSearchResponse, ProductSelection, ProductSelectionPagedQueryResponse, ProductTailoring, ProductTailoringPagedQueryResponse, ProductType, ProductTypePagedQueryResponse, Product, ProductPagedQueryResponse, Project, Review, ReviewPagedQueryResponse, StandalonePrice, StandalonePricePagedQueryResponse, State, StatePagedQueryResponse, Store, StorePagedQueryResponse, Subscription, SubscriptionPagedQueryResponse, TaxCategory, TaxCategoryPagedQueryResponse, Type, TypePagedQueryResponse, Zone, ZonePagedQueryResponse } from '@commercetools/platform-sdk';
3
+ import { Client } from '@commercetools/ts-client';
4
+
5
+ /**
6
+ * Pure TypeScript type representing parameter schemas
7
+ * This type is used to provide type information without requiring Zod as a dependency
8
+ * for consuming applications.
9
+ *
10
+ * Each operation's schema is represented as a Record<string, unknown>,
11
+ * which is a pure TypeScript type that doesn't require Zod.
12
+ *
13
+ * The actual validation is performed using Zod schemas internally,
14
+ * but the type definition doesn't expose Zod types.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * // In a consuming application (no Zod dependency needed):
19
+ * interface MyResourceSchema extends ResourceSchema {
20
+ * read: { id?: string; limit?: number };
21
+ * create: { name: string; email: string };
22
+ * update: { id: string; name?: string };
23
+ * delete: { id: string };
24
+ * }
25
+ * ```
26
+ */
27
+ interface ResourceSchema {
28
+ read: Record<string, unknown>;
29
+ create: Record<string, unknown>;
30
+ update: Record<string, unknown>;
31
+ delete: Record<string, unknown>;
32
+ }
33
+ /**
34
+ * Internal type for schemas that support validation via a parse method
35
+ * This allows ResourceMetadata to work with Zod schemas internally
36
+ * without exposing Zod types to consuming applications.
37
+ *
38
+ * The parse method signature matches Zod's parse method, but the type
39
+ * itself doesn't require Zod as a dependency.
40
+ */
41
+ interface ValidatableSchema {
42
+ parse: (data: unknown) => unknown;
43
+ }
44
+ /**
45
+ * Internal type for resource schemas that support validation
46
+ * Used internally by ResourceMetadata for validation purposes.
47
+ * Consuming applications only see ResourceSchema (pure TypeScript types).
48
+ */
49
+ interface ValidatableResourceSchema {
50
+ read: ValidatableSchema;
51
+ create: ValidatableSchema;
52
+ update: ValidatableSchema;
53
+ delete: ValidatableSchema;
54
+ }
55
+ interface ResourceMetadata {
56
+ namespace: string;
57
+ description: string;
58
+ toolNamePrefix?: string;
59
+ /**
60
+ * Resource schemas for validation and type information.
61
+ *
62
+ * Internally, these are Zod schemas that support validation via `.parse()`.
63
+ * However, the type definition uses ValidatableResourceSchema which doesn't
64
+ * expose Zod types, allowing consuming applications to use this package
65
+ * without requiring Zod as a dependency.
66
+ *
67
+ * For type information, use ResourceSchema instead.
68
+ */
69
+ schemas: ValidatableResourceSchema;
70
+ }
71
+ interface ToolExecutionContext<TConfig = unknown> {
72
+ authToken: string;
73
+ configuration: TConfig;
74
+ toolName: string;
75
+ parameters: Record<string, unknown>;
76
+ sessionId?: string;
77
+ }
78
+ interface ToolHandler$1<TConfig> {
79
+ execute(context: ToolExecutionContext<TConfig>): Promise<unknown>;
80
+ }
81
+ /**
82
+ * Factory interface for creating API clients
83
+ * Allows dependency injection and testing
84
+ */
85
+ interface IApiClientFactory<TConfig = unknown> {
86
+ createApiClient(configuration: TConfig, authToken: string): ApiRoot;
87
+ }
88
+ /**
89
+ * Default Configuration interface for backward compatibility
90
+ * This can be extended or replaced in consuming packages
91
+ */
92
+ interface Configuration<T = Record<string, unknown>> {
93
+ tools: string[];
94
+ projectKey: string;
95
+ correlationId: string;
96
+ metadata?: T;
97
+ }
98
+ /**
99
+ * Constructor type
100
+ * Note: BaseResourceHandler is defined in @core package to avoid circular dependencies
101
+ */
102
+ interface IConstructor<T = unknown> {
103
+ new (...args: IApiClientFactory<Configuration>[]): T;
104
+ }
105
+ interface IErrorConstructor extends ErrorConstructor {
106
+ captureStackTrace: (...args: unknown[]) => void;
107
+ }
108
+
109
+ type ToolOperation = 'read' | 'create' | 'update' | 'delete';
110
+ type ApiRootFn = (client: Client, baseUri?: string) => ApiRoot;
111
+
112
+ /**
113
+ * Structured error for tool execution failures
114
+ * Provides context and debugging information
115
+ * Generic over configuration type to support custom configs
116
+ */
117
+ declare class ToolExecutionError<TConfig extends Configuration> extends Error {
118
+ readonly toolName: string;
119
+ readonly operation: string;
120
+ readonly projectKey: string;
121
+ readonly sessionId?: string;
122
+ readonly parameters: Record<string, unknown>;
123
+ readonly originalError: unknown;
124
+ readonly timestamp: Date;
125
+ constructor(message: string, context: ToolExecutionContext<TConfig>, originalError?: unknown);
126
+ /**
127
+ * Extract operation from tool name
128
+ */
129
+ private extractOperation;
130
+ /**
131
+ * Get error details for logging/debugging
132
+ */
133
+ toJSON(): {
134
+ name: string;
135
+ message: string;
136
+ toolName: string;
137
+ operation: string;
138
+ projectKey: string;
139
+ sessionId: string;
140
+ parameters: Record<string, unknown>;
141
+ timestamp: string;
142
+ originalError: unknown;
143
+ stack: string;
144
+ };
145
+ }
146
+
147
+ /**
148
+ * Commercetools API Client
149
+ * Creates and manages commercetools SDK client instances
150
+ *
151
+ * Note: This class uses the full Configuration type internally for backward compatibility,
152
+ * but can accept any config that extends CommercetoolsConfig
153
+ */
154
+ declare class CommercetoolsAPIClient {
155
+ private client;
156
+ private apiRoot;
157
+ private configuration;
158
+ private authToken?;
159
+ constructor(configuration: Configuration, authToken?: string);
160
+ /**
161
+ * Get the API root instance
162
+ */
163
+ getApiRoot(fn?: ApiRootFn, baseUri?: string): ApiRoot;
164
+ /**
165
+ * Get the client instance
166
+ */
167
+ getClient(): Client;
168
+ /**
169
+ * Construct an apiRoot
170
+ */
171
+ contructApiRoot(client: Client, fn: (client: Client, baseUri?: string) => ApiRoot, baseUri?: string): ApiRoot;
172
+ /**
173
+ * Create commercetools client
174
+ */
175
+ private createClient;
176
+ }
177
+
178
+ /**
179
+ * Default implementation of API client factory
180
+ * Generic over configuration type to support custom configs
181
+ */
182
+ declare class ApiClientFactory<TConfig extends Configuration = Configuration> implements IApiClientFactory<TConfig> {
183
+ createApiClient(configuration: TConfig, authToken: string): _commercetools_platform_sdk.ApiRoot;
184
+ getApiRoot(configuration: TConfig, authToken: string): CommercetoolsAPIClient;
185
+ }
186
+
187
+ /**
188
+ * Generic base handler - NO API client logic
189
+ * Only handles tool routing, validation, and naming
190
+ */
191
+ declare abstract class BaseResourceHandler<TConfig = unknown> implements ToolHandler$1<TConfig> {
192
+ protected abstract readonly metadata: ResourceMetadata;
193
+ abstract read(context: ToolExecutionContext<TConfig>): Promise<unknown>;
194
+ abstract create(context: ToolExecutionContext<TConfig>): Promise<unknown>;
195
+ abstract update(context: ToolExecutionContext<TConfig>): Promise<unknown>;
196
+ abstract delete(context: ToolExecutionContext<TConfig>): Promise<unknown>;
197
+ protected getToolName(operation: ToolOperation): string;
198
+ protected getOperation(toolName: string): ToolOperation | null;
199
+ execute(context: ToolExecutionContext<TConfig>): Promise<unknown>;
200
+ getAllToolNames(): string[];
201
+ getToolDefinition(operation: ToolOperation): {
202
+ name: string;
203
+ description: string;
204
+ inputSchema: ValidatableSchema;
205
+ };
206
+ getAllToolDefinitions(): {
207
+ name: string;
208
+ description: string;
209
+ inputSchema: ValidatableSchema;
210
+ }[];
211
+ }
212
+
213
+ /**
214
+ * Decorator to automatically register a tool handler
215
+ *
216
+ * Usage:
217
+ * ```typescript
218
+ * @ToolHandler()
219
+ * export class CustomerHandler extends BaseResourceHandler {
220
+ * // ...
221
+ * }
222
+ * ```
223
+ *
224
+ * The handler will be automatically discovered and registered
225
+ * when the module is loaded.
226
+ */
227
+ declare function ToolHandler(): <T extends IConstructor<BaseResourceHandler<Configuration<Record<string, unknown>>>>>(constructor: T) => T;
228
+ /**
229
+ * Get all handlers registered via decorator
230
+ * This is called by ToolDiscovery to register all decorated handlers
231
+ */
232
+ declare function getDecoratorRegisteredHandlers(): BaseResourceHandler<Configuration>[];
233
+
234
+ /**
235
+ * Commercetools-specific resource handler
236
+ * Extends BaseResourceHandler with commercetools API client functionality
237
+ * This is an abstract class - subclasses must implement the CRUD methods
238
+ *
239
+ * @template TConfig - Configuration type that must extend Configuration (requires projectKey)
240
+ *
241
+ * Example usage:
242
+ * ```typescript
243
+ * // Using default Configuration
244
+ * export class CustomersHandler extends CommercetoolsResourceHandler { ... }
245
+ *
246
+ * // Using custom config type
247
+ * interface MyCustomConfig extends Configuration {
248
+ * projectKey: string;
249
+ * customField: string;
250
+ * }
251
+ * export class CustomersHandler extends CommercetoolsResourceHandler<MyCustomConfig> { ... }
252
+ * ```
253
+ */
254
+ declare abstract class CommercetoolsResourceHandler<TConfig extends Configuration = Configuration> extends BaseResourceHandler<TConfig> {
255
+ protected apiClientFactory: IApiClientFactory<TConfig>;
256
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
257
+ /**
258
+ * Get the API root instance for commercetools
259
+ */
260
+ protected getApiRoot(context: ToolExecutionContext<TConfig>): ApiRoot;
261
+ }
262
+
263
+ declare class AttributeGroupsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
264
+ protected readonly metadata: ResourceMetadata;
265
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
266
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
267
+ name: string;
268
+ description: string;
269
+ inputSchema: ValidatableSchema;
270
+ };
271
+ protected getAttributeGroupsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyAttributeGroupsRequestBuilder;
272
+ read(context: ToolExecutionContext<TConfig>): Promise<AttributeGroup | AttributeGroupPagedQueryResponse>;
273
+ create(context: ToolExecutionContext<TConfig>): Promise<AttributeGroup>;
274
+ update(context: ToolExecutionContext<TConfig>): Promise<AttributeGroup>;
275
+ delete(context: ToolExecutionContext<TConfig>): Promise<AttributeGroup>;
276
+ }
277
+ declare function readAttributeGroups<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<AttributeGroup | AttributeGroupPagedQueryResponse>;
278
+ declare function createAttributeGroups<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<AttributeGroup>;
279
+ declare function updateAttributeGroups<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<AttributeGroup>;
280
+ declare function deleteAttributeGroups<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<AttributeGroup>;
281
+
282
+ /**
283
+ * Categories Resource Handler
284
+ * Generic over configuration type - defaults to CommercetoolsConfig
285
+ */
286
+ declare class CategoriesHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
287
+ protected readonly metadata: ResourceMetadata;
288
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
289
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
290
+ name: string;
291
+ description: string;
292
+ inputSchema: ValidatableSchema;
293
+ };
294
+ protected getCategoriesApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyCategoriesRequestBuilder;
295
+ read(context: ToolExecutionContext<TConfig>): Promise<Category | CategoryPagedQueryResponse>;
296
+ create(context: ToolExecutionContext<TConfig>): Promise<Category>;
297
+ update(context: ToolExecutionContext<TConfig>): Promise<Category>;
298
+ delete(context: ToolExecutionContext<TConfig>): Promise<Category>;
299
+ }
300
+ declare function readCategories<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Category | CategoryPagedQueryResponse>;
301
+ declare function createCategories<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Category>;
302
+ declare function updateCategories<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Category>;
303
+ declare function deleteCategories<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Category>;
304
+
305
+ /**
306
+ * Carts Resource Handler
307
+ * Store-aware: supports storeKey for store-specific carts.
308
+ */
309
+ declare class CartsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
310
+ protected readonly metadata: ResourceMetadata;
311
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
312
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
313
+ name: string;
314
+ description: string;
315
+ inputSchema: ValidatableSchema;
316
+ };
317
+ protected getCartsApi(api: ByProjectKeyRequestBuilder, storeKey?: string): _commercetools_platform_sdk.ByProjectKeyInStoreKeyByStoreKeyCartsRequestBuilder | _commercetools_platform_sdk.ByProjectKeyCartsRequestBuilder;
318
+ read(context: ToolExecutionContext<TConfig>): Promise<Cart | CartPagedQueryResponse>;
319
+ create(context: ToolExecutionContext<TConfig>): Promise<Cart>;
320
+ update(context: ToolExecutionContext<TConfig>): Promise<Cart>;
321
+ delete(context: ToolExecutionContext<TConfig>): Promise<Cart>;
322
+ }
323
+ declare function readCarts<TConfig extends Configuration = Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Cart | CartPagedQueryResponse>;
324
+ declare function createCarts<TConfig extends Configuration = Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Cart>;
325
+ declare function updateCarts<TConfig extends Configuration = Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Cart>;
326
+ declare function deleteCarts<TConfig extends Configuration = Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Cart>;
327
+
328
+ declare class ChannelsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
329
+ protected readonly metadata: ResourceMetadata;
330
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
331
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
332
+ name: string;
333
+ description: any;
334
+ inputSchema: ValidatableSchema;
335
+ };
336
+ protected getChannelsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyChannelsRequestBuilder;
337
+ read(context: ToolExecutionContext<TConfig>): Promise<Channel | ChannelPagedQueryResponse>;
338
+ create(context: ToolExecutionContext<TConfig>): Promise<Channel>;
339
+ update(context: ToolExecutionContext<TConfig>): Promise<Channel>;
340
+ delete(context: ToolExecutionContext<TConfig>): Promise<Channel>;
341
+ }
342
+ declare function readChannels<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Channel | ChannelPagedQueryResponse>;
343
+ declare function createChannels<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Channel>;
344
+ declare function updateChannels<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Channel>;
345
+ declare function deleteChannels<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Channel>;
346
+
347
+ declare class CustomObjectsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
348
+ protected readonly metadata: ResourceMetadata;
349
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
350
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
351
+ name: string;
352
+ description: string;
353
+ inputSchema: ValidatableSchema;
354
+ };
355
+ protected getCustomObjectsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyCustomObjectsRequestBuilder;
356
+ read(context: ToolExecutionContext<TConfig>): Promise<CustomObject | CustomObjectPagedQueryResponse>;
357
+ create(context: ToolExecutionContext<TConfig>): Promise<CustomObject>;
358
+ update(context: ToolExecutionContext<TConfig>): Promise<CustomObject>;
359
+ delete(context: ToolExecutionContext<TConfig>): Promise<CustomObject>;
360
+ }
361
+ declare function readCustomObjects<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<CustomObject | CustomObjectPagedQueryResponse>;
362
+ declare function createCustomObjects<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<CustomObject>;
363
+ declare function updateCustomObjects<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<CustomObject>;
364
+ declare function deleteCustomObjects<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<CustomObject>;
365
+
366
+ /**
367
+ * Customers Resource Handler
368
+ * Generic over configuration type - defaults to CommercetoolsConfig
369
+ *
370
+ * Usage with default config:
371
+ * ```typescript
372
+ * const handler = new CustomersHandler();
373
+ * ```
374
+ *
375
+ * Usage with custom config:
376
+ * ```typescript
377
+ * interface MyConfig extends CommercetoolsConfig {
378
+ * projectKey: string;
379
+ * customField: string;
380
+ * }
381
+ * const handler = new CustomersHandler<MyConfig>();
382
+ * ```
383
+ */
384
+ declare class CustomersHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
385
+ protected readonly metadata: ResourceMetadata;
386
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
387
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
388
+ name: string;
389
+ description: string;
390
+ inputSchema: ValidatableSchema;
391
+ };
392
+ protected getCustomersApi(api: ByProjectKeyRequestBuilder, storeKey?: string): _commercetools_platform_sdk.ByProjectKeyInStoreKeyByStoreKeyCustomersRequestBuilder | _commercetools_platform_sdk.ByProjectKeyCustomersRequestBuilder;
393
+ read(context: ToolExecutionContext<TConfig>): Promise<Customer | CustomerPagedQueryResponse>;
394
+ create(context: ToolExecutionContext<TConfig>): Promise<CustomerSignInResult>;
395
+ update(context: ToolExecutionContext<TConfig>): Promise<Customer>;
396
+ delete(context: ToolExecutionContext<TConfig>): Promise<Customer>;
397
+ }
398
+ declare function readCustomers<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Customer | CustomerPagedQueryResponse>;
399
+ declare function createCustomers<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<CustomerSignInResult>;
400
+ declare function updateCustomers<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Customer>;
401
+ declare function deleteCustomers<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Customer>;
402
+
403
+ /**
404
+ * Customer Groups Resource Handler
405
+ */
406
+ declare class CustomerGroupsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
407
+ protected readonly metadata: ResourceMetadata;
408
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
409
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
410
+ name: string;
411
+ description: string;
412
+ inputSchema: ValidatableSchema;
413
+ };
414
+ protected getCustomerGroupsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyCustomerGroupsRequestBuilder;
415
+ read(context: ToolExecutionContext<TConfig>): Promise<CustomerGroup | CustomerGroupPagedQueryResponse>;
416
+ create(context: ToolExecutionContext<TConfig>): Promise<CustomerGroup>;
417
+ update(context: ToolExecutionContext<TConfig>): Promise<CustomerGroup>;
418
+ delete(context: ToolExecutionContext<TConfig>): Promise<CustomerGroup>;
419
+ }
420
+ declare function readCustomerGroups<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<CustomerGroup | CustomerGroupPagedQueryResponse>;
421
+ declare function createCustomerGroups<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<CustomerGroup>;
422
+ declare function updateCustomerGroups<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<CustomerGroup>;
423
+ declare function deleteCustomerGroups<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<CustomerGroup>;
424
+
425
+ /**
426
+ * Customer Search Resource Handler
427
+ * Search-only: POST to customers/search. Create/update/delete are not supported.
428
+ * See: https://docs.commercetools.com/api/projects/customer-search
429
+ */
430
+ declare class CustomerSearchHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
431
+ protected readonly metadata: ResourceMetadata;
432
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
433
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
434
+ name: string;
435
+ description: string;
436
+ inputSchema: ValidatableSchema;
437
+ };
438
+ protected getCustomerSearchApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyCustomersSearchRequestBuilder;
439
+ read(context: ToolExecutionContext<TConfig>): Promise<CustomerPagedSearchResponse>;
440
+ create(context: ToolExecutionContext<TConfig>): Promise<never>;
441
+ update(context: ToolExecutionContext<TConfig>): Promise<never>;
442
+ delete(context: ToolExecutionContext<TConfig>): Promise<never>;
443
+ }
444
+ declare function readCustomerSearch<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<CustomerPagedSearchResponse>;
445
+ declare function createCustomerSearch<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
446
+ declare function updateCustomerSearch<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
447
+ declare function deleteCustomerSearch<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
448
+
449
+ /**
450
+ * Discount Codes Resource Handler
451
+ * Generic over configuration type - defaults to CommercetoolsConfig
452
+ */
453
+ declare class DiscountCodesHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
454
+ protected readonly metadata: ResourceMetadata;
455
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
456
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
457
+ name: string;
458
+ description: string;
459
+ inputSchema: ValidatableSchema;
460
+ };
461
+ protected getDiscountCodesApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyDiscountCodesRequestBuilder;
462
+ read(context: ToolExecutionContext<TConfig>): Promise<DiscountCode | DiscountCodePagedQueryResponse>;
463
+ create(context: ToolExecutionContext<TConfig>): Promise<DiscountCode>;
464
+ update(context: ToolExecutionContext<TConfig>): Promise<DiscountCode>;
465
+ delete(context: ToolExecutionContext<TConfig>): Promise<DiscountCode>;
466
+ }
467
+ declare function readDiscountCodes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<DiscountCode | DiscountCodePagedQueryResponse>;
468
+ declare function createDiscountCodes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<DiscountCode>;
469
+ declare function updateDiscountCodes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<DiscountCode>;
470
+ declare function deleteDiscountCodes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<DiscountCode>;
471
+
472
+ /**
473
+ * Extensions Resource Handler
474
+ * Generic over configuration type - defaults to CommercetoolsConfig
475
+ */
476
+ declare class ExtensionsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
477
+ protected readonly metadata: ResourceMetadata;
478
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
479
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
480
+ name: string;
481
+ description: string;
482
+ inputSchema: ValidatableSchema;
483
+ };
484
+ protected getExtensionsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyExtensionsRequestBuilder;
485
+ read(context: ToolExecutionContext<TConfig>): Promise<Extension | ExtensionPagedQueryResponse>;
486
+ create(context: ToolExecutionContext<TConfig>): Promise<Extension>;
487
+ update(context: ToolExecutionContext<TConfig>): Promise<Extension>;
488
+ delete(context: ToolExecutionContext<TConfig>): Promise<Extension>;
489
+ }
490
+ declare function readExtensions<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Extension | ExtensionPagedQueryResponse>;
491
+ declare function createExtensions<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Extension>;
492
+ declare function updateExtensions<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Extension>;
493
+ declare function deleteExtensions<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Extension>;
494
+
495
+ /**
496
+ * Inventory Resource Handler
497
+ * Generic over configuration type - defaults to CommercetoolsConfig
498
+ */
499
+ declare class InventoryHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
500
+ protected readonly metadata: ResourceMetadata;
501
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
502
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
503
+ name: string;
504
+ description: string;
505
+ inputSchema: ValidatableSchema;
506
+ };
507
+ protected getInventoryApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyInventoryRequestBuilder;
508
+ read(context: ToolExecutionContext<TConfig>): Promise<InventoryEntry | InventoryPagedQueryResponse>;
509
+ create(context: ToolExecutionContext<TConfig>): Promise<InventoryEntry>;
510
+ update(context: ToolExecutionContext<TConfig>): Promise<InventoryEntry>;
511
+ delete(context: ToolExecutionContext<TConfig>): Promise<InventoryEntry>;
512
+ }
513
+ declare function readInventory<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<InventoryEntry | InventoryPagedQueryResponse>;
514
+ declare function createInventory<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<InventoryEntry>;
515
+ declare function updateInventory<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<InventoryEntry>;
516
+ declare function deleteInventory<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<InventoryEntry>;
517
+
518
+ declare class MessagesHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
519
+ protected readonly metadata: ResourceMetadata;
520
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
521
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
522
+ name: string;
523
+ description: string;
524
+ inputSchema: ValidatableSchema;
525
+ };
526
+ protected getMessagesApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyMessagesRequestBuilder;
527
+ read(context: ToolExecutionContext<TConfig>): Promise<Message | MessagePagedQueryResponse>;
528
+ create(_context: ToolExecutionContext<TConfig>): Promise<never>;
529
+ update(_context: ToolExecutionContext<TConfig>): Promise<never>;
530
+ delete(_context: ToolExecutionContext<TConfig>): Promise<never>;
531
+ }
532
+ declare function readMessages<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Message | MessagePagedQueryResponse>;
533
+ declare function createMessages<TConfig extends Configuration>(_context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
534
+ declare function updateMessages<TConfig extends Configuration>(_context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
535
+ declare function deleteMessages<TConfig extends Configuration>(_context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
536
+
537
+ /**
538
+ * Product Discounts Resource Handler
539
+ * Generic over configuration type - defaults to CommercetoolsConfig
540
+ */
541
+ declare class ProductDiscountsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
542
+ protected readonly metadata: ResourceMetadata;
543
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
544
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
545
+ name: string;
546
+ description: string;
547
+ inputSchema: ValidatableSchema;
548
+ };
549
+ protected getProductDiscountsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyProductDiscountsRequestBuilder;
550
+ read(context: ToolExecutionContext<TConfig>): Promise<ProductDiscount | ProductDiscountPagedQueryResponse>;
551
+ create(context: ToolExecutionContext<TConfig>): Promise<ProductDiscount>;
552
+ update(context: ToolExecutionContext<TConfig>): Promise<ProductDiscount>;
553
+ delete(context: ToolExecutionContext<TConfig>): Promise<ProductDiscount>;
554
+ }
555
+ declare function readProductDiscounts<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductDiscount | ProductDiscountPagedQueryResponse>;
556
+ declare function createProductDiscounts<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductDiscount>;
557
+ declare function updateProductDiscounts<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductDiscount>;
558
+ declare function deleteProductDiscounts<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductDiscount>;
559
+
560
+ declare class ProductProjectionsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
561
+ protected readonly metadata: ResourceMetadata;
562
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
563
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
564
+ name: string;
565
+ description: string;
566
+ inputSchema: ValidatableSchema;
567
+ };
568
+ protected getProductProjectionsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyProductProjectionsRequestBuilder;
569
+ read(context: ToolExecutionContext<TConfig>): Promise<ProductProjection | ProductProjectionPagedSearchResponse>;
570
+ create(_context: ToolExecutionContext<TConfig>): Promise<never>;
571
+ update(_context: ToolExecutionContext<TConfig>): Promise<never>;
572
+ delete(_context: ToolExecutionContext<TConfig>): Promise<never>;
573
+ }
574
+ declare function readProductProjections<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductProjection | ProductProjectionPagedSearchResponse>;
575
+ declare function createProductProjections<TConfig extends Configuration>(_context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
576
+ declare function updateProductProjections<TConfig extends Configuration>(_context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
577
+ declare function deleteProductProjections<TConfig extends Configuration>(_context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
578
+
579
+ /**
580
+ * Product Search Resource Handler
581
+ * Generic over configuration type - defaults to CommercetoolsConfig
582
+ */
583
+ declare class ProductSearchHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
584
+ protected readonly metadata: ResourceMetadata;
585
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
586
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
587
+ name: string;
588
+ description: string;
589
+ inputSchema: ValidatableSchema;
590
+ };
591
+ protected getProductSearchApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyProductsSearchRequestBuilder;
592
+ read(context: ToolExecutionContext<TConfig>): Promise<ProductPagedSearchResponse>;
593
+ create(context: ToolExecutionContext<TConfig>): Promise<never>;
594
+ update(context: ToolExecutionContext<TConfig>): Promise<never>;
595
+ delete(context: ToolExecutionContext<TConfig>): Promise<never>;
596
+ }
597
+ declare function readProductSearch<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductPagedSearchResponse>;
598
+ declare function createProductSearch<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
599
+ declare function updateProductSearch<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
600
+ declare function deleteProductSearch<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<never>;
601
+
602
+ /**
603
+ * Product Selections Resource Handler
604
+ * Generic over configuration type - defaults to CommercetoolsConfig
605
+ */
606
+ declare class ProductSelectionsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
607
+ protected readonly metadata: ResourceMetadata;
608
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
609
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
610
+ name: string;
611
+ description: string;
612
+ inputSchema: ValidatableSchema;
613
+ };
614
+ protected getProductSelectionsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyProductSelectionsRequestBuilder;
615
+ read(context: ToolExecutionContext<TConfig>): Promise<ProductSelection | ProductSelectionPagedQueryResponse>;
616
+ create(context: ToolExecutionContext<TConfig>): Promise<ProductSelection>;
617
+ update(context: ToolExecutionContext<TConfig>): Promise<ProductSelection>;
618
+ delete(context: ToolExecutionContext<TConfig>): Promise<ProductSelection>;
619
+ }
620
+ declare function readProductSelections<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductSelection | ProductSelectionPagedQueryResponse>;
621
+ declare function createProductSelections<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductSelection>;
622
+ declare function updateProductSelections<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductSelection>;
623
+ declare function deleteProductSelections<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductSelection>;
624
+
625
+ /**
626
+ * Product Tailoring Resource Handler
627
+ * Generic over configuration type - defaults to CommercetoolsConfig
628
+ */
629
+ declare class ProductTailoringHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
630
+ protected readonly metadata: ResourceMetadata;
631
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
632
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
633
+ name: string;
634
+ description: string;
635
+ inputSchema: ValidatableSchema;
636
+ };
637
+ protected getProductTailoringApi(api: ByProjectKeyRequestBuilder, storeKey?: string): _commercetools_platform_sdk.ByProjectKeyInStoreKeyByStoreKeyProductTailoringRequestBuilder | _commercetools_platform_sdk.ByProjectKeyProductTailoringRequestBuilder;
638
+ read(context: ToolExecutionContext<TConfig>): Promise<ProductTailoring | ProductTailoringPagedQueryResponse>;
639
+ create(context: ToolExecutionContext<TConfig>): Promise<ProductTailoring>;
640
+ update(context: ToolExecutionContext<TConfig>): Promise<ProductTailoring>;
641
+ delete(context: ToolExecutionContext<TConfig>): Promise<ProductTailoring>;
642
+ }
643
+ declare function readProductTailoring<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductTailoring | ProductTailoringPagedQueryResponse>;
644
+ declare function createProductTailoring<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductTailoring>;
645
+ declare function updateProductTailoring<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductTailoring>;
646
+ declare function deleteProductTailoring<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductTailoring>;
647
+
648
+ /**
649
+ * Product Types Resource Handler
650
+ * Generic over configuration type - defaults to CommercetoolsConfig
651
+ */
652
+ declare class ProductTypesHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
653
+ protected readonly metadata: ResourceMetadata;
654
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
655
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
656
+ name: string;
657
+ description: string;
658
+ inputSchema: ValidatableSchema;
659
+ };
660
+ protected getProductTypesApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyProductTypesRequestBuilder;
661
+ read(context: ToolExecutionContext<TConfig>): Promise<ProductType | ProductTypePagedQueryResponse>;
662
+ create(context: ToolExecutionContext<TConfig>): Promise<ProductType>;
663
+ update(context: ToolExecutionContext<TConfig>): Promise<ProductType>;
664
+ delete(context: ToolExecutionContext<TConfig>): Promise<ProductType>;
665
+ }
666
+ declare function readProductTypes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductType | ProductTypePagedQueryResponse>;
667
+ declare function createProductTypes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductType>;
668
+ declare function updateProductTypes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductType>;
669
+ declare function deleteProductTypes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<ProductType>;
670
+
671
+ /**
672
+ * Products Resource Handler
673
+ * Generic over configuration type - defaults to CommercetoolsConfig
674
+ */
675
+ declare class ProductsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
676
+ protected readonly metadata: ResourceMetadata;
677
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
678
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
679
+ name: string;
680
+ description: string;
681
+ inputSchema: ValidatableSchema;
682
+ };
683
+ protected getProductsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyProductsRequestBuilder;
684
+ read(context: ToolExecutionContext<TConfig>): Promise<Product | ProductPagedQueryResponse>;
685
+ create(context: ToolExecutionContext<TConfig>): Promise<Product>;
686
+ update(context: ToolExecutionContext<TConfig>): Promise<Product>;
687
+ delete(context: ToolExecutionContext<TConfig>): Promise<Product>;
688
+ }
689
+ declare function readProducts<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Product | ProductPagedQueryResponse>;
690
+ declare function createProducts<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Product>;
691
+ declare function updateProducts<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Product>;
692
+ declare function deleteProducts<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Product>;
693
+
694
+ /**
695
+ * Project Resource Handler
696
+ * Handles project read and update operations
697
+ * Generic over configuration type - defaults to Configuration
698
+ *
699
+ * Automatically discovered via @ToolHandler() decorator
700
+ */
701
+ declare class ProjectHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
702
+ protected readonly metadata: ResourceMetadata;
703
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
704
+ getToolDefinition(operation: 'read' | 'update'): {
705
+ name: string;
706
+ description: string;
707
+ inputSchema: ValidatableSchema;
708
+ };
709
+ read(context: ToolExecutionContext<TConfig>): Promise<Project>;
710
+ update(context: ToolExecutionContext<TConfig>): Promise<Project>;
711
+ create(_context: ToolExecutionContext<TConfig>): Promise<never>;
712
+ delete(_context: ToolExecutionContext<TConfig>): Promise<never>;
713
+ }
714
+ declare function readProject<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Project>;
715
+ declare function updateProject<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Project>;
716
+
717
+ /**
718
+ * Reviews Resource Handler
719
+ * Generic over configuration type - defaults to CommercetoolsConfig
720
+ */
721
+ declare class ReviewsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
722
+ protected readonly metadata: ResourceMetadata;
723
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
724
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
725
+ name: string;
726
+ description: string;
727
+ inputSchema: ValidatableSchema;
728
+ };
729
+ protected getReviewsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyReviewsRequestBuilder;
730
+ read(context: ToolExecutionContext<TConfig>): Promise<Review | ReviewPagedQueryResponse>;
731
+ create(context: ToolExecutionContext<TConfig>): Promise<Review>;
732
+ update(context: ToolExecutionContext<TConfig>): Promise<Review>;
733
+ delete(context: ToolExecutionContext<TConfig>): Promise<Review>;
734
+ }
735
+ declare function readReviews<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Review | ReviewPagedQueryResponse>;
736
+ declare function createReviews<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Review>;
737
+ declare function updateReviews<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Review>;
738
+ declare function deleteReviews<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Review>;
739
+
740
+ declare class StandalonePricesHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
741
+ protected readonly metadata: ResourceMetadata;
742
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
743
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
744
+ name: string;
745
+ description: string;
746
+ inputSchema: ValidatableSchema;
747
+ };
748
+ protected getStandalonePricesApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyStandalonePricesRequestBuilder;
749
+ read(context: ToolExecutionContext<TConfig>): Promise<StandalonePrice | StandalonePricePagedQueryResponse>;
750
+ create(context: ToolExecutionContext<TConfig>): Promise<StandalonePrice>;
751
+ update(context: ToolExecutionContext<TConfig>): Promise<StandalonePrice>;
752
+ delete(context: ToolExecutionContext<TConfig>): Promise<StandalonePrice>;
753
+ }
754
+ declare function readStandalonePrices<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<StandalonePrice | StandalonePricePagedQueryResponse>;
755
+ declare function createStandalonePrices<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<StandalonePrice>;
756
+ declare function updateStandalonePrices<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<StandalonePrice>;
757
+ declare function deleteStandalonePrices<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<StandalonePrice>;
758
+
759
+ declare class StatesHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
760
+ protected readonly metadata: ResourceMetadata;
761
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
762
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
763
+ name: string;
764
+ description: string;
765
+ inputSchema: ValidatableSchema;
766
+ };
767
+ protected getStatesApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyStatesRequestBuilder;
768
+ read(context: ToolExecutionContext<TConfig>): Promise<State | StatePagedQueryResponse>;
769
+ create(context: ToolExecutionContext<TConfig>): Promise<State>;
770
+ update(context: ToolExecutionContext<TConfig>): Promise<State>;
771
+ delete(context: ToolExecutionContext<TConfig>): Promise<State>;
772
+ }
773
+ declare function readStates<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<State | StatePagedQueryResponse>;
774
+ declare function createStates<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<State>;
775
+ declare function updateStates<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<State>;
776
+ declare function deleteStates<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<State>;
777
+
778
+ declare class StoresHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
779
+ protected readonly metadata: ResourceMetadata;
780
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
781
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
782
+ name: string;
783
+ description: string;
784
+ inputSchema: ValidatableSchema;
785
+ };
786
+ protected getStoresApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyStoresRequestBuilder;
787
+ read(context: ToolExecutionContext<TConfig>): Promise<Store | StorePagedQueryResponse>;
788
+ create(context: ToolExecutionContext<TConfig>): Promise<Store>;
789
+ update(context: ToolExecutionContext<TConfig>): Promise<Store>;
790
+ delete(context: ToolExecutionContext<TConfig>): Promise<Store>;
791
+ }
792
+ declare function readStores<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Store | StorePagedQueryResponse>;
793
+ declare function createStores<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Store>;
794
+ declare function updateStores<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Store>;
795
+ declare function deleteStores<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Store>;
796
+
797
+ declare class SubscriptionsHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
798
+ protected readonly metadata: ResourceMetadata;
799
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
800
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
801
+ name: string;
802
+ description: string;
803
+ inputSchema: ValidatableSchema;
804
+ };
805
+ protected getSubscriptionsApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeySubscriptionsRequestBuilder;
806
+ read(context: ToolExecutionContext<TConfig>): Promise<Subscription | SubscriptionPagedQueryResponse>;
807
+ create(context: ToolExecutionContext<TConfig>): Promise<Subscription>;
808
+ update(context: ToolExecutionContext<TConfig>): Promise<Subscription>;
809
+ delete(context: ToolExecutionContext<TConfig>): Promise<Subscription>;
810
+ }
811
+ declare function readSubscriptions<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Subscription | SubscriptionPagedQueryResponse>;
812
+ declare function createSubscriptions<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Subscription>;
813
+ declare function updateSubscriptions<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Subscription>;
814
+ declare function deleteSubscriptions<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Subscription>;
815
+
816
+ /**
817
+ * Tax Categories Resource Handler
818
+ * Generic over configuration type - defaults to CommercetoolsConfig
819
+ */
820
+ declare class TaxCategoriesHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
821
+ protected readonly metadata: ResourceMetadata;
822
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
823
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
824
+ name: string;
825
+ description: string;
826
+ inputSchema: ValidatableSchema;
827
+ };
828
+ protected getTaxCategoriesApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyTaxCategoriesRequestBuilder;
829
+ read(context: ToolExecutionContext<TConfig>): Promise<TaxCategory | TaxCategoryPagedQueryResponse>;
830
+ create(context: ToolExecutionContext<TConfig>): Promise<TaxCategory>;
831
+ update(context: ToolExecutionContext<TConfig>): Promise<TaxCategory>;
832
+ delete(context: ToolExecutionContext<TConfig>): Promise<TaxCategory>;
833
+ }
834
+ declare function readTaxCategories<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<TaxCategory | TaxCategoryPagedQueryResponse>;
835
+ declare function createTaxCategories<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<TaxCategory>;
836
+ declare function updateTaxCategories<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<TaxCategory>;
837
+ declare function deleteTaxCategories<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<TaxCategory>;
838
+
839
+ /**
840
+ * Types Resource Handler
841
+ * Generic over configuration type - defaults to CommercetoolsConfig
842
+ */
843
+ declare class TypesHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
844
+ protected readonly metadata: ResourceMetadata;
845
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
846
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
847
+ name: string;
848
+ description: string;
849
+ inputSchema: ValidatableSchema;
850
+ };
851
+ protected getTypesApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyTypesRequestBuilder;
852
+ read(context: ToolExecutionContext<TConfig>): Promise<Type | TypePagedQueryResponse>;
853
+ create(context: ToolExecutionContext<TConfig>): Promise<Type>;
854
+ update(context: ToolExecutionContext<TConfig>): Promise<Type>;
855
+ delete(context: ToolExecutionContext<TConfig>): Promise<Type>;
856
+ }
857
+ declare function readTypes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Type | TypePagedQueryResponse>;
858
+ declare function createTypes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Type>;
859
+ declare function updateTypes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Type>;
860
+ declare function deleteTypes<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Type>;
861
+
862
+ /**
863
+ * Zones Resource Handler
864
+ * Generic over configuration type - defaults to CommercetoolsConfig
865
+ */
866
+ declare class ZonesHandler<TConfig extends Configuration = Configuration> extends CommercetoolsResourceHandler<TConfig> {
867
+ protected readonly metadata: ResourceMetadata;
868
+ constructor(apiClientFactory?: IApiClientFactory<TConfig>);
869
+ getToolDefinition(operation: 'read' | 'create' | 'update' | 'delete'): {
870
+ name: string;
871
+ description: string;
872
+ inputSchema: ValidatableSchema;
873
+ };
874
+ protected getZonesApi(api: ByProjectKeyRequestBuilder): _commercetools_platform_sdk.ByProjectKeyZonesRequestBuilder;
875
+ read(context: ToolExecutionContext<TConfig>): Promise<Zone | ZonePagedQueryResponse>;
876
+ create(context: ToolExecutionContext<TConfig>): Promise<Zone>;
877
+ update(context: ToolExecutionContext<TConfig>): Promise<Zone>;
878
+ delete(context: ToolExecutionContext<TConfig>): Promise<Zone>;
879
+ }
880
+ declare function readZones<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Zone | ZonePagedQueryResponse>;
881
+ declare function createZones<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Zone>;
882
+ declare function updateZones<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Zone>;
883
+ declare function deleteZones<TConfig extends Configuration>(context: ToolExecutionContext<TConfig>, apiClientFactory?: IApiClientFactory<TConfig>): Promise<Zone>;
884
+
885
+ declare const TOOL_NAME_PREFIX = "";
886
+ declare const OPERATIONS: string[];
887
+ declare const DEFAULT_API_URL = "https://api.europe-west1.gcp.commercetools.com";
888
+
889
+ export { ApiClientFactory, type ApiRootFn, AttributeGroupsHandler, BaseResourceHandler, CartsHandler, CategoriesHandler, ChannelsHandler, CommercetoolsAPIClient, type Configuration, CustomObjectsHandler, CustomerGroupsHandler, CustomerSearchHandler, CustomersHandler, DEFAULT_API_URL, DiscountCodesHandler, ExtensionsHandler, type IApiClientFactory, type IConstructor, type IErrorConstructor, InventoryHandler, MessagesHandler, OPERATIONS, ProductDiscountsHandler, ProductProjectionsHandler, ProductSearchHandler, ProductSelectionsHandler, ProductTailoringHandler, ProductTypesHandler, ProductsHandler, ProjectHandler, type ResourceMetadata, type ResourceSchema, ReviewsHandler, StandalonePricesHandler, StatesHandler, StoresHandler, SubscriptionsHandler, TOOL_NAME_PREFIX, TaxCategoriesHandler, type ToolExecutionContext, ToolExecutionError, ToolHandler, type ToolOperation, TypesHandler, type ValidatableResourceSchema, type ValidatableSchema, ZonesHandler, createAttributeGroups, createCarts, createCategories, createChannels, createCustomObjects, createCustomerGroups, createCustomerSearch, createCustomers, createDiscountCodes, createExtensions, createInventory, createMessages, createProductDiscounts, createProductProjections, createProductSearch, createProductSelections, createProductTailoring, createProductTypes, createProducts, createReviews, createStandalonePrices, createStates, createStores, createSubscriptions, createTaxCategories, createTypes, createZones, deleteAttributeGroups, deleteCarts, deleteCategories, deleteChannels, deleteCustomObjects, deleteCustomerGroups, deleteCustomerSearch, deleteCustomers, deleteDiscountCodes, deleteExtensions, deleteInventory, deleteMessages, deleteProductDiscounts, deleteProductProjections, deleteProductSearch, deleteProductSelections, deleteProductTailoring, deleteProductTypes, deleteProducts, deleteReviews, deleteStandalonePrices, deleteStates, deleteStores, deleteSubscriptions, deleteTaxCategories, deleteTypes, deleteZones, getDecoratorRegisteredHandlers, readAttributeGroups, readCarts, readCategories, readChannels, readCustomObjects, readCustomerGroups, readCustomerSearch, readCustomers, readDiscountCodes, readExtensions, readInventory, readMessages, readProductDiscounts, readProductProjections, readProductSearch, readProductSelections, readProductTailoring, readProductTypes, readProducts, readProject, readReviews, readStandalonePrices, readStates, readStores, readSubscriptions, readTaxCategories, readTypes, readZones, updateAttributeGroups, updateCarts, updateCategories, updateChannels, updateCustomObjects, updateCustomerGroups, updateCustomerSearch, updateCustomers, updateDiscountCodes, updateExtensions, updateInventory, updateMessages, updateProductDiscounts, updateProductProjections, updateProductSearch, updateProductSelections, updateProductTailoring, updateProductTypes, updateProducts, updateProject, updateReviews, updateStandalonePrices, updateStates, updateStores, updateSubscriptions, updateTaxCategories, updateTypes, updateZones };