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