@gpt-platform/client 0.10.4 → 0.11.0

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 (155) hide show
  1. package/dist/_internal/client/client.gen.d.ts +3 -0
  2. package/dist/_internal/client/client.gen.d.ts.map +1 -0
  3. package/dist/_internal/client/index.d.ts +9 -0
  4. package/dist/_internal/client/index.d.ts.map +1 -0
  5. package/dist/_internal/client/types.gen.d.ts +118 -0
  6. package/dist/_internal/client/types.gen.d.ts.map +1 -0
  7. package/dist/_internal/client/utils.gen.d.ts +34 -0
  8. package/dist/_internal/client/utils.gen.d.ts.map +1 -0
  9. package/dist/_internal/client.gen.d.ts +13 -0
  10. package/dist/_internal/client.gen.d.ts.map +1 -0
  11. package/dist/_internal/core/auth.gen.d.ts +19 -0
  12. package/dist/_internal/core/auth.gen.d.ts.map +1 -0
  13. package/dist/_internal/core/bodySerializer.gen.d.ts +26 -0
  14. package/dist/_internal/core/bodySerializer.gen.d.ts.map +1 -0
  15. package/dist/_internal/core/params.gen.d.ts +44 -0
  16. package/dist/_internal/core/params.gen.d.ts.map +1 -0
  17. package/dist/_internal/core/pathSerializer.gen.d.ts +34 -0
  18. package/dist/_internal/core/pathSerializer.gen.d.ts.map +1 -0
  19. package/dist/_internal/core/queryKeySerializer.gen.d.ts +19 -0
  20. package/dist/_internal/core/queryKeySerializer.gen.d.ts.map +1 -0
  21. package/dist/_internal/core/serverSentEvents.gen.d.ts +72 -0
  22. package/dist/_internal/core/serverSentEvents.gen.d.ts.map +1 -0
  23. package/dist/_internal/core/types.gen.d.ts +79 -0
  24. package/dist/_internal/core/types.gen.d.ts.map +1 -0
  25. package/dist/_internal/core/utils.gen.d.ts +20 -0
  26. package/dist/_internal/core/utils.gen.d.ts.map +1 -0
  27. package/dist/_internal/index.d.ts +3 -0
  28. package/dist/_internal/index.d.ts.map +1 -0
  29. package/dist/_internal/sdk.gen.d.ts +7053 -0
  30. package/dist/_internal/sdk.gen.d.ts.map +1 -0
  31. package/dist/_internal/types.gen.d.ts +146633 -0
  32. package/dist/_internal/types.gen.d.ts.map +1 -0
  33. package/dist/base-client.d.ts +199 -0
  34. package/dist/base-client.d.ts.map +1 -0
  35. package/dist/errors/index.d.ts +128 -0
  36. package/dist/errors/index.d.ts.map +1 -0
  37. package/dist/events.d.ts +69 -0
  38. package/dist/events.d.ts.map +1 -0
  39. package/dist/execution-events.d.ts +95 -0
  40. package/dist/execution-events.d.ts.map +1 -0
  41. package/dist/gpt-client.d.ts +2175 -0
  42. package/dist/gpt-client.d.ts.map +1 -0
  43. package/dist/index.d.ts +51 -30308
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +775 -14
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +775 -14
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/json-api.d.ts +26 -0
  50. package/dist/json-api.d.ts.map +1 -0
  51. package/dist/logging.d.ts +22 -0
  52. package/dist/logging.d.ts.map +1 -0
  53. package/dist/namespace-types.d.ts +79 -0
  54. package/dist/namespace-types.d.ts.map +1 -0
  55. package/dist/namespaces/access-grants.d.ts +71 -0
  56. package/dist/namespaces/access-grants.d.ts.map +1 -0
  57. package/dist/namespaces/agents.d.ts +1406 -0
  58. package/dist/namespaces/agents.d.ts.map +1 -0
  59. package/dist/namespaces/ai.d.ts +407 -0
  60. package/dist/namespaces/ai.d.ts.map +1 -0
  61. package/dist/namespaces/audit.d.ts +83 -0
  62. package/dist/namespaces/audit.d.ts.map +1 -0
  63. package/dist/namespaces/billing.d.ts +854 -0
  64. package/dist/namespaces/billing.d.ts.map +1 -0
  65. package/dist/namespaces/campaigns.d.ts +973 -0
  66. package/dist/namespaces/campaigns.d.ts.map +1 -0
  67. package/dist/namespaces/catalog.d.ts +964 -0
  68. package/dist/namespaces/catalog.d.ts.map +1 -0
  69. package/dist/namespaces/channels.d.ts +162 -0
  70. package/dist/namespaces/channels.d.ts.map +1 -0
  71. package/dist/namespaces/clinical.d.ts +2443 -0
  72. package/dist/namespaces/clinical.d.ts.map +1 -0
  73. package/dist/namespaces/communication.d.ts +439 -0
  74. package/dist/namespaces/communication.d.ts.map +1 -0
  75. package/dist/namespaces/compliance.d.ts +2310 -0
  76. package/dist/namespaces/compliance.d.ts.map +1 -0
  77. package/dist/namespaces/connectors.d.ts +1368 -0
  78. package/dist/namespaces/connectors.d.ts.map +1 -0
  79. package/dist/namespaces/content.d.ts +188 -0
  80. package/dist/namespaces/content.d.ts.map +1 -0
  81. package/dist/namespaces/crawler.d.ts +408 -0
  82. package/dist/namespaces/crawler.d.ts.map +1 -0
  83. package/dist/namespaces/crm-clusters.d.ts +31 -0
  84. package/dist/namespaces/crm-clusters.d.ts.map +1 -0
  85. package/dist/namespaces/crm.d.ts +1539 -0
  86. package/dist/namespaces/crm.d.ts.map +1 -0
  87. package/dist/namespaces/documents.d.ts +136 -0
  88. package/dist/namespaces/documents.d.ts.map +1 -0
  89. package/dist/namespaces/email.d.ts +550 -0
  90. package/dist/namespaces/email.d.ts.map +1 -0
  91. package/dist/namespaces/extraction.d.ts +1249 -0
  92. package/dist/namespaces/extraction.d.ts.map +1 -0
  93. package/dist/namespaces/identity.d.ts +411 -0
  94. package/dist/namespaces/identity.d.ts.map +1 -0
  95. package/dist/namespaces/imports.d.ts +177 -0
  96. package/dist/namespaces/imports.d.ts.map +1 -0
  97. package/dist/namespaces/index.d.ts +119 -0
  98. package/dist/namespaces/index.d.ts.map +1 -0
  99. package/dist/namespaces/memory.d.ts +105 -0
  100. package/dist/namespaces/memory.d.ts.map +1 -0
  101. package/dist/namespaces/models.d.ts +75 -0
  102. package/dist/namespaces/models.d.ts.map +1 -0
  103. package/dist/namespaces/permissions.d.ts +75 -0
  104. package/dist/namespaces/permissions.d.ts.map +1 -0
  105. package/dist/namespaces/pipeline-executions.d.ts +130 -0
  106. package/dist/namespaces/pipeline-executions.d.ts.map +1 -0
  107. package/dist/namespaces/pipelines.d.ts +120 -0
  108. package/dist/namespaces/pipelines.d.ts.map +1 -0
  109. package/dist/namespaces/platform.d.ts +1430 -0
  110. package/dist/namespaces/platform.d.ts.map +1 -0
  111. package/dist/namespaces/portal.d.ts +198 -0
  112. package/dist/namespaces/portal.d.ts.map +1 -0
  113. package/dist/namespaces/projects.d.ts +553 -0
  114. package/dist/namespaces/projects.d.ts.map +1 -0
  115. package/dist/namespaces/roles.d.ts +65 -0
  116. package/dist/namespaces/roles.d.ts.map +1 -0
  117. package/dist/namespaces/scheduling.d.ts +944 -0
  118. package/dist/namespaces/scheduling.d.ts.map +1 -0
  119. package/dist/namespaces/search.d.ts +224 -0
  120. package/dist/namespaces/search.d.ts.map +1 -0
  121. package/dist/namespaces/session-notes.d.ts +67 -0
  122. package/dist/namespaces/session-notes.d.ts.map +1 -0
  123. package/dist/namespaces/social.d.ts +330 -0
  124. package/dist/namespaces/social.d.ts.map +1 -0
  125. package/dist/namespaces/storage.d.ts +378 -0
  126. package/dist/namespaces/storage.d.ts.map +1 -0
  127. package/dist/namespaces/support.d.ts +427 -0
  128. package/dist/namespaces/support.d.ts.map +1 -0
  129. package/dist/namespaces/threads.d.ts +596 -0
  130. package/dist/namespaces/threads.d.ts.map +1 -0
  131. package/dist/namespaces/training.d.ts +358 -0
  132. package/dist/namespaces/training.d.ts.map +1 -0
  133. package/dist/namespaces/voice.d.ts +752 -0
  134. package/dist/namespaces/voice.d.ts.map +1 -0
  135. package/dist/namespaces/watcher.d.ts +425 -0
  136. package/dist/namespaces/watcher.d.ts.map +1 -0
  137. package/dist/namespaces/webhooks-ns.d.ts +3 -0
  138. package/dist/namespaces/webhooks-ns.d.ts.map +1 -0
  139. package/dist/pagination.d.ts +57 -0
  140. package/dist/pagination.d.ts.map +1 -0
  141. package/dist/request-builder.d.ts +95 -0
  142. package/dist/request-builder.d.ts.map +1 -0
  143. package/dist/security.d.ts +32 -0
  144. package/dist/security.d.ts.map +1 -0
  145. package/dist/streaming.d.ts +135 -0
  146. package/dist/streaming.d.ts.map +1 -0
  147. package/dist/utils/retry.d.ts +63 -0
  148. package/dist/utils/retry.d.ts.map +1 -0
  149. package/dist/version.d.ts +5 -0
  150. package/dist/version.d.ts.map +1 -0
  151. package/dist/webhook-signature.d.ts +109 -0
  152. package/dist/webhook-signature.d.ts.map +1 -0
  153. package/llms.txt +40 -1
  154. package/package.json +286 -36
  155. package/dist/index.d.mts +0 -30308
@@ -0,0 +1,964 @@
1
+ import type { CatalogProduct, CatalogProductVariant, CatalogTaxonomy, CatalogTaxonomyNode, CatalogOptionType, CatalogOptionValue, CatalogView, CatalogPriceList, CatalogPriceListEntry } from "../_internal/types.gen";
2
+ /** Attributes accepted when creating a new catalog product. */
3
+ export type CreateCatalogProductAttributes = {
4
+ workspace_id: string;
5
+ name: string;
6
+ application_id?: string;
7
+ description?: string;
8
+ short_description?: string;
9
+ slug?: string;
10
+ status?: "draft" | "active" | "archived" | "discontinued";
11
+ base_price?: string;
12
+ currency?: string;
13
+ sku?: string;
14
+ media?: Record<string, unknown>[];
15
+ properties?: Record<string, unknown>;
16
+ [key: string]: unknown;
17
+ };
18
+ /** Attributes accepted when updating an existing catalog product (PATCH semantics). */
19
+ export type UpdateCatalogProductAttributes = {
20
+ name?: string;
21
+ description?: string;
22
+ short_description?: string;
23
+ slug?: string;
24
+ status?: "draft" | "active" | "archived" | "discontinued";
25
+ base_price?: string;
26
+ currency?: string;
27
+ sku?: string;
28
+ media?: Record<string, unknown>[];
29
+ properties?: Record<string, unknown>;
30
+ ai_description?: string;
31
+ [key: string]: unknown;
32
+ };
33
+ /** Attributes accepted when creating a new product variant. */
34
+ export type CreateCatalogProductVariantAttributes = {
35
+ product_id: string;
36
+ workspace_id?: string;
37
+ sku?: string;
38
+ price_override?: string;
39
+ properties?: Record<string, unknown>;
40
+ status?: "active" | "archived" | "discontinued";
41
+ position?: number;
42
+ media?: Record<string, unknown>[];
43
+ [key: string]: unknown;
44
+ };
45
+ /** Attributes accepted when updating an existing product variant (PATCH semantics). */
46
+ export type UpdateCatalogProductVariantAttributes = {
47
+ sku?: string;
48
+ price_override?: string;
49
+ properties?: Record<string, unknown>;
50
+ status?: "active" | "archived" | "discontinued";
51
+ position?: number;
52
+ media?: Record<string, unknown>[];
53
+ [key: string]: unknown;
54
+ };
55
+ /** Attributes accepted when creating a new taxonomy. */
56
+ export type CreateCatalogTaxonomyAttributes = {
57
+ application_id: string;
58
+ name: string;
59
+ workspace_id?: string;
60
+ slug?: string;
61
+ scope?: "application" | "workspace";
62
+ is_hierarchical?: boolean;
63
+ is_required?: boolean;
64
+ max_depth?: number;
65
+ ai_managed?: boolean;
66
+ [key: string]: unknown;
67
+ };
68
+ /** Attributes accepted when updating an existing taxonomy (PATCH semantics). */
69
+ export type UpdateCatalogTaxonomyAttributes = {
70
+ name?: string;
71
+ slug?: string;
72
+ is_hierarchical?: boolean;
73
+ is_required?: boolean;
74
+ max_depth?: number;
75
+ ai_managed?: boolean;
76
+ [key: string]: unknown;
77
+ };
78
+ /** Attributes accepted when creating a new taxonomy node. */
79
+ export type CreateCatalogTaxonomyNodeAttributes = {
80
+ taxonomy_id: string;
81
+ name: string;
82
+ parent_id?: string;
83
+ slug?: string;
84
+ position?: number;
85
+ description?: string;
86
+ [key: string]: unknown;
87
+ };
88
+ /** Attributes accepted when updating an existing taxonomy node (PATCH semantics). */
89
+ export type UpdateCatalogTaxonomyNodeAttributes = {
90
+ name?: string;
91
+ parent_id?: string;
92
+ slug?: string;
93
+ position?: number;
94
+ description?: string;
95
+ [key: string]: unknown;
96
+ };
97
+ /** Attributes accepted when creating a new option type. */
98
+ export type CreateCatalogOptionTypeAttributes = {
99
+ application_id: string;
100
+ name: string;
101
+ display_name?: string;
102
+ presentation?: string;
103
+ position?: number;
104
+ [key: string]: unknown;
105
+ };
106
+ /** Attributes accepted when updating an existing option type (PATCH semantics). */
107
+ export type UpdateCatalogOptionTypeAttributes = {
108
+ name?: string;
109
+ display_name?: string;
110
+ presentation?: string;
111
+ position?: number;
112
+ [key: string]: unknown;
113
+ };
114
+ /** Attributes accepted when creating a new option value. */
115
+ export type CreateCatalogOptionValueAttributes = {
116
+ option_type_id: string;
117
+ name: string;
118
+ display_name?: string;
119
+ position?: number;
120
+ [key: string]: unknown;
121
+ };
122
+ /** Attributes accepted when updating an existing option value (PATCH semantics). */
123
+ export type UpdateCatalogOptionValueAttributes = {
124
+ name?: string;
125
+ display_name?: string;
126
+ position?: number;
127
+ [key: string]: unknown;
128
+ };
129
+ /** Attributes accepted when creating a new catalog view. */
130
+ export type CreateCatalogViewAttributes = {
131
+ workspace_id: string;
132
+ name: string;
133
+ slug?: string;
134
+ description?: string;
135
+ channel_target?: string;
136
+ max_items?: number;
137
+ price_list_id?: string;
138
+ [key: string]: unknown;
139
+ };
140
+ /** Attributes accepted when updating an existing catalog view (PATCH semantics). */
141
+ export type UpdateCatalogViewAttributes = {
142
+ name?: string;
143
+ slug?: string;
144
+ description?: string;
145
+ channel_target?: string;
146
+ max_items?: number;
147
+ price_list_id?: string;
148
+ [key: string]: unknown;
149
+ };
150
+ /** Attributes accepted when creating a new price list. */
151
+ export type CreateCatalogPriceListAttributes = {
152
+ application_id: string;
153
+ name: string;
154
+ workspace_id?: string;
155
+ slug?: string;
156
+ currency?: string;
157
+ priority?: number;
158
+ [key: string]: unknown;
159
+ };
160
+ /** Attributes accepted when updating an existing price list (PATCH semantics). */
161
+ export type UpdateCatalogPriceListAttributes = {
162
+ name?: string;
163
+ slug?: string;
164
+ currency?: string;
165
+ priority?: number;
166
+ [key: string]: unknown;
167
+ };
168
+ /** Attributes accepted when creating a new price list entry. */
169
+ export type CreateCatalogPriceListEntryAttributes = {
170
+ price_list_id: string;
171
+ product_id?: string;
172
+ variant_id?: string;
173
+ price: string;
174
+ strategy?: "fixed" | "percentage" | "tiered";
175
+ tiers?: Record<string, unknown>[];
176
+ [key: string]: unknown;
177
+ };
178
+ /** Attributes accepted when updating an existing price list entry (PATCH semantics). */
179
+ export type UpdateCatalogPriceListEntryAttributes = {
180
+ price?: string;
181
+ strategy?: "fixed" | "percentage" | "tiered";
182
+ tiers?: Record<string, unknown>[];
183
+ [key: string]: unknown;
184
+ };
185
+ import type { RequestOptions } from "../base-client";
186
+ import { RequestBuilder } from "../request-builder";
187
+ /**
188
+ * Catalog namespace for products, inventory, pricing, and taxonomy.
189
+ *
190
+ * Provides sub-namespaces for managing the full product catalog hierarchy:
191
+ * products (the root sellable items), variants (SKU-level differentiation
192
+ * by size/color/etc.), taxonomies (hierarchical category trees scoped to an
193
+ * application), taxonomy nodes (individual categories within a tree),
194
+ * option types, option values, catalog views, price lists, and price list entries.
195
+ *
196
+ * @example
197
+ * ```typescript
198
+ * const client = new GptClient({ apiKey: 'sk_app_...' });
199
+ *
200
+ * // List all products in a workspace
201
+ * const products = await client.catalog.products.list('ws_abc123');
202
+ *
203
+ * // Fetch a product and its variants
204
+ * const product = await client.catalog.products.get('prod_xyz');
205
+ * const variants = await client.catalog.variants.listByProduct(product.id);
206
+ * ```
207
+ */
208
+ export declare function createCatalogNamespace(rb: RequestBuilder): {
209
+ /**
210
+ * Products — product catalog management.
211
+ *
212
+ * Products are the top-level sellable items in the catalog. Each product
213
+ * can have zero or more variants representing SKU-level differentiation
214
+ * (e.g. size S/M/L, color red/blue). Products are scoped to a workspace.
215
+ */
216
+ products: {
217
+ /**
218
+ * List all products belonging to a workspace.
219
+ *
220
+ * Returns a paginated array of products. Use `page` and `pageSize` to
221
+ * walk through large catalogs.
222
+ *
223
+ * @param workspaceId - The ID of the workspace whose products to list.
224
+ * @param options - Optional pagination controls (`page`, `pageSize`) and
225
+ * request-level overrides (headers, signal, etc.).
226
+ * @returns A promise that resolves to an array of {@link CatalogProduct} records.
227
+ *
228
+ * @example
229
+ * ```typescript
230
+ * const products = await client.catalog.products.list('ws_abc123', {
231
+ * page: 1,
232
+ * pageSize: 20,
233
+ * });
234
+ * ```
235
+ */
236
+ list: (workspaceId: string, options?: {
237
+ page?: number;
238
+ pageSize?: number;
239
+ } & RequestOptions) => Promise<CatalogProduct[]>;
240
+ /**
241
+ * Fetch a single product by its unique ID.
242
+ *
243
+ * @param id - The unique identifier of the product to retrieve.
244
+ * @param options - Optional request-level overrides.
245
+ * @returns A promise that resolves to the matching {@link CatalogProduct}.
246
+ *
247
+ * @example
248
+ * ```typescript
249
+ * const product = await client.catalog.products.get('prod_abc123');
250
+ * console.log(product.attributes.name);
251
+ * ```
252
+ */
253
+ get: (id: string, options?: RequestOptions) => Promise<CatalogProduct>;
254
+ /**
255
+ * Create a new product in the catalog.
256
+ *
257
+ * @param attributes - Product attributes. Must include `workspace_id` and `name`.
258
+ * `base_price` is a decimal string (e.g. `'29.99'`).
259
+ * @param options - Optional request-level overrides.
260
+ * @returns A promise that resolves to the newly created {@link CatalogProduct}.
261
+ *
262
+ * @example
263
+ * ```typescript
264
+ * const product = await client.catalog.products.create({
265
+ * workspace_id: 'ws_abc123',
266
+ * name: 'Classic Tote Bag',
267
+ * description: 'Durable canvas tote in multiple colors.',
268
+ * base_price: '29.99',
269
+ * currency: 'USD',
270
+ * sku: 'TOTE-001',
271
+ * });
272
+ * ```
273
+ */
274
+ create: (attributes: CreateCatalogProductAttributes, options?: RequestOptions) => Promise<CatalogProduct>;
275
+ /**
276
+ * Update an existing product's attributes (PATCH semantics).
277
+ *
278
+ * @param id - The unique identifier of the product to update.
279
+ * @param attributes - Key/value map of attributes to change.
280
+ * @param options - Optional request-level overrides.
281
+ * @returns A promise that resolves to the updated {@link CatalogProduct}.
282
+ *
283
+ * @example
284
+ * ```typescript
285
+ * const updated = await client.catalog.products.update('prod_abc123', {
286
+ * base_price: '34.99',
287
+ * description: 'Now available in a wider colour range.',
288
+ * });
289
+ * ```
290
+ */
291
+ update: (id: string, attributes: UpdateCatalogProductAttributes, options?: RequestOptions) => Promise<CatalogProduct>;
292
+ /**
293
+ * Permanently delete a product from the catalog.
294
+ *
295
+ * @param id - The unique identifier of the product to delete.
296
+ * @param options - Optional request-level overrides.
297
+ * @returns A promise that resolves to `true` on successful deletion.
298
+ *
299
+ * @example
300
+ * ```typescript
301
+ * await client.catalog.products.delete('prod_abc123');
302
+ * ```
303
+ */
304
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
305
+ };
306
+ /**
307
+ * Variants — product variants (SKUs).
308
+ *
309
+ * A variant represents a specific, purchasable version of a product
310
+ * differentiated by one or more options such as size, colour, or material.
311
+ */
312
+ variants: {
313
+ /**
314
+ * Fetch a single product variant by its unique ID.
315
+ *
316
+ * @param id - The unique identifier of the variant to retrieve.
317
+ * @param options - Optional request-level overrides.
318
+ * @returns A promise that resolves to the matching {@link CatalogProductVariant}.
319
+ *
320
+ * @example
321
+ * ```typescript
322
+ * const variant = await client.catalog.variants.get('var_abc123');
323
+ * console.log(variant.attributes.sku);
324
+ * ```
325
+ */
326
+ get: (id: string, options?: RequestOptions) => Promise<CatalogProductVariant>;
327
+ /**
328
+ * List all variants that belong to a specific product.
329
+ *
330
+ * @param productId - The ID of the parent product whose variants to list.
331
+ * @param options - Optional pagination and request-level overrides.
332
+ * @returns A promise that resolves to an array of {@link CatalogProductVariant} records.
333
+ *
334
+ * @example
335
+ * ```typescript
336
+ * const variants = await client.catalog.variants.listByProduct('prod_abc123', {
337
+ * page: 1,
338
+ * pageSize: 50,
339
+ * });
340
+ * ```
341
+ */
342
+ listByProduct: (productId: string, options?: {
343
+ page?: number;
344
+ pageSize?: number;
345
+ } & RequestOptions) => Promise<CatalogProductVariant[]>;
346
+ /**
347
+ * Create a new variant for a product.
348
+ *
349
+ * @param attributes - Variant attributes. Must include `product_id`.
350
+ * `price_override` is a decimal string (e.g. `'34.99'`).
351
+ * @param options - Optional request-level overrides.
352
+ * @returns A promise that resolves to the newly created {@link CatalogProductVariant}.
353
+ *
354
+ * @example
355
+ * ```typescript
356
+ * const variant = await client.catalog.variants.create({
357
+ * product_id: 'prod_abc123',
358
+ * sku: 'TOTE-RED-M',
359
+ * price_override: '34.99',
360
+ * status: 'active',
361
+ * });
362
+ * ```
363
+ */
364
+ create: (attributes: CreateCatalogProductVariantAttributes, options?: RequestOptions) => Promise<CatalogProductVariant>;
365
+ /**
366
+ * Update an existing product variant's attributes (PATCH semantics).
367
+ *
368
+ * @param id - The unique identifier of the variant to update.
369
+ * @param attributes - Key/value map of attributes to change.
370
+ * @param options - Optional request-level overrides.
371
+ * @returns A promise that resolves to the updated {@link CatalogProductVariant}.
372
+ *
373
+ * @example
374
+ * ```typescript
375
+ * const variant = await client.catalog.variants.update('var_abc123', {
376
+ * price_override: '39.99',
377
+ * });
378
+ * ```
379
+ */
380
+ update: (id: string, attributes: UpdateCatalogProductVariantAttributes, options?: RequestOptions) => Promise<CatalogProductVariant>;
381
+ /**
382
+ * Permanently delete a product variant.
383
+ *
384
+ * @param id - The unique identifier of the variant to delete.
385
+ * @param options - Optional request-level overrides.
386
+ * @returns A promise that resolves to `true` on successful deletion.
387
+ *
388
+ * @example
389
+ * ```typescript
390
+ * await client.catalog.variants.delete('var_abc123');
391
+ * ```
392
+ */
393
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
394
+ };
395
+ /**
396
+ * Option Types — product option definitions (e.g. Size, Color).
397
+ *
398
+ * Option types are application-scoped definitions for variant differentiation.
399
+ * Each option type has option values (e.g. Size has S, M, L, XL).
400
+ */
401
+ optionTypes: {
402
+ /**
403
+ * List all option types defined for an application.
404
+ *
405
+ * @param applicationId - The ID of the application whose option types to list.
406
+ * @param options - Optional pagination and request-level overrides.
407
+ * @returns A promise that resolves to an array of {@link CatalogOptionType} records.
408
+ *
409
+ * @example
410
+ * ```typescript
411
+ * const types = await client.catalog.optionTypes.listByApplication('app_abc');
412
+ * ```
413
+ */
414
+ listByApplication: (applicationId: string, options?: {
415
+ page?: number;
416
+ pageSize?: number;
417
+ } & RequestOptions) => Promise<CatalogOptionType[]>;
418
+ /**
419
+ * Fetch a single option type by its unique ID.
420
+ *
421
+ * @param id - The unique identifier of the option type.
422
+ * @param options - Optional request-level overrides.
423
+ * @returns A promise that resolves to the matching {@link CatalogOptionType}.
424
+ *
425
+ * @example
426
+ * ```typescript
427
+ * const optionType = await client.catalog.optionTypes.get('ot_abc123');
428
+ * ```
429
+ */
430
+ get: (id: string, options?: RequestOptions) => Promise<CatalogOptionType>;
431
+ /**
432
+ * Create a new option type for an application.
433
+ *
434
+ * @param attributes - Option type attributes. Must include `application_id` and `name`.
435
+ * @param options - Optional request-level overrides.
436
+ * @returns A promise that resolves to the newly created {@link CatalogOptionType}.
437
+ *
438
+ * @example
439
+ * ```typescript
440
+ * const sizeType = await client.catalog.optionTypes.create({
441
+ * application_id: 'app_abc',
442
+ * name: 'size',
443
+ * display_name: 'Size',
444
+ * });
445
+ * ```
446
+ */
447
+ create: (attributes: CreateCatalogOptionTypeAttributes, options?: RequestOptions) => Promise<CatalogOptionType>;
448
+ /**
449
+ * Update an existing option type (PATCH semantics).
450
+ *
451
+ * @param id - The unique identifier of the option type to update.
452
+ * @param attributes - Key/value map of attributes to change.
453
+ * @param options - Optional request-level overrides.
454
+ * @returns A promise that resolves to the updated {@link CatalogOptionType}.
455
+ *
456
+ * @example
457
+ * ```typescript
458
+ * const updated = await client.catalog.optionTypes.update('ot_abc123', {
459
+ * display_name: 'Shoe Size',
460
+ * });
461
+ * ```
462
+ */
463
+ update: (id: string, attributes: UpdateCatalogOptionTypeAttributes, options?: RequestOptions) => Promise<CatalogOptionType>;
464
+ /**
465
+ * Permanently delete an option type.
466
+ *
467
+ * @param id - The unique identifier of the option type to delete.
468
+ * @param options - Optional request-level overrides.
469
+ * @returns A promise that resolves to `true` on successful deletion.
470
+ *
471
+ * @example
472
+ * ```typescript
473
+ * await client.catalog.optionTypes.delete('ot_abc123');
474
+ * ```
475
+ */
476
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
477
+ };
478
+ /**
479
+ * Option Values — individual values within an option type (e.g. "Small", "Red").
480
+ */
481
+ optionValues: {
482
+ /**
483
+ * List all option values for an option type.
484
+ *
485
+ * @param optionTypeId - The ID of the option type whose values to list.
486
+ * @param options - Optional pagination and request-level overrides.
487
+ * @returns A promise that resolves to an array of {@link CatalogOptionValue} records.
488
+ *
489
+ * @example
490
+ * ```typescript
491
+ * const values = await client.catalog.optionValues.listByOptionType('ot_abc123');
492
+ * ```
493
+ */
494
+ listByOptionType: (optionTypeId: string, options?: {
495
+ page?: number;
496
+ pageSize?: number;
497
+ } & RequestOptions) => Promise<CatalogOptionValue[]>;
498
+ /**
499
+ * Fetch a single option value by its unique ID.
500
+ *
501
+ * @param id - The unique identifier of the option value.
502
+ * @param options - Optional request-level overrides.
503
+ * @returns A promise that resolves to the matching {@link CatalogOptionValue}.
504
+ *
505
+ * @example
506
+ * ```typescript
507
+ * const value = await client.catalog.optionValues.get('ov_abc123');
508
+ * ```
509
+ */
510
+ get: (id: string, options?: RequestOptions) => Promise<CatalogOptionValue>;
511
+ /**
512
+ * Create a new option value within an option type.
513
+ *
514
+ * @param attributes - Option value attributes. Must include `option_type_id` and `name`.
515
+ * @param options - Optional request-level overrides.
516
+ * @returns A promise that resolves to the newly created {@link CatalogOptionValue}.
517
+ *
518
+ * @example
519
+ * ```typescript
520
+ * const small = await client.catalog.optionValues.create({
521
+ * option_type_id: 'ot_abc123',
522
+ * name: 'small',
523
+ * display_name: 'S',
524
+ * });
525
+ * ```
526
+ */
527
+ create: (attributes: CreateCatalogOptionValueAttributes, options?: RequestOptions) => Promise<CatalogOptionValue>;
528
+ /**
529
+ * Update an existing option value (PATCH semantics).
530
+ *
531
+ * @param id - The unique identifier of the option value to update.
532
+ * @param attributes - Key/value map of attributes to change.
533
+ * @param options - Optional request-level overrides.
534
+ * @returns A promise that resolves to the updated {@link CatalogOptionValue}.
535
+ *
536
+ * @example
537
+ * ```typescript
538
+ * const updated = await client.catalog.optionValues.update('ov_abc123', {
539
+ * display_name: 'Small (S)',
540
+ * });
541
+ * ```
542
+ */
543
+ update: (id: string, attributes: UpdateCatalogOptionValueAttributes, options?: RequestOptions) => Promise<CatalogOptionValue>;
544
+ /**
545
+ * Permanently delete an option value.
546
+ *
547
+ * @param id - The unique identifier of the option value to delete.
548
+ * @param options - Optional request-level overrides.
549
+ * @returns A promise that resolves to `true` on successful deletion.
550
+ *
551
+ * @example
552
+ * ```typescript
553
+ * await client.catalog.optionValues.delete('ov_abc123');
554
+ * ```
555
+ */
556
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
557
+ };
558
+ /**
559
+ * Taxonomies — product classification trees.
560
+ *
561
+ * A taxonomy is a named hierarchical category system scoped to an
562
+ * application. Taxonomies are the containers; individual categories
563
+ * within them are managed via {@link taxonomyNodes}.
564
+ */
565
+ taxonomies: {
566
+ /**
567
+ * List all taxonomies defined for an application.
568
+ *
569
+ * @param applicationId - The ID of the application whose taxonomies to list.
570
+ * @param options - Optional pagination and request-level overrides.
571
+ * @returns A promise that resolves to an array of {@link CatalogTaxonomy} records.
572
+ *
573
+ * @example
574
+ * ```typescript
575
+ * const taxonomies = await client.catalog.taxonomies.listByApplication('app_abc123');
576
+ * ```
577
+ */
578
+ listByApplication: (applicationId: string, options?: {
579
+ page?: number;
580
+ pageSize?: number;
581
+ } & RequestOptions) => Promise<CatalogTaxonomy[]>;
582
+ /**
583
+ * Fetch a single taxonomy by its unique ID.
584
+ *
585
+ * @param id - The unique identifier of the taxonomy to retrieve.
586
+ * @param options - Optional request-level overrides.
587
+ * @returns A promise that resolves to the matching {@link CatalogTaxonomy}.
588
+ *
589
+ * @example
590
+ * ```typescript
591
+ * const taxonomy = await client.catalog.taxonomies.get('tax_abc123');
592
+ * ```
593
+ */
594
+ get: (id: string, options?: RequestOptions) => Promise<CatalogTaxonomy>;
595
+ /**
596
+ * Create a new taxonomy for an application.
597
+ *
598
+ * @param attributes - Taxonomy attributes. Must include `application_id` and `name`.
599
+ * @param options - Optional request-level overrides.
600
+ * @returns A promise that resolves to the newly created {@link CatalogTaxonomy}.
601
+ *
602
+ * @example
603
+ * ```typescript
604
+ * const taxonomy = await client.catalog.taxonomies.create({
605
+ * application_id: 'app_abc123',
606
+ * name: 'Product Categories',
607
+ * is_hierarchical: true,
608
+ * max_depth: 5,
609
+ * });
610
+ * ```
611
+ */
612
+ create: (attributes: CreateCatalogTaxonomyAttributes, options?: RequestOptions) => Promise<CatalogTaxonomy>;
613
+ /**
614
+ * Update an existing taxonomy's attributes (PATCH semantics).
615
+ *
616
+ * @param id - The unique identifier of the taxonomy to update.
617
+ * @param attributes - Key/value map of attributes to change.
618
+ * @param options - Optional request-level overrides.
619
+ * @returns A promise that resolves to the updated {@link CatalogTaxonomy}.
620
+ *
621
+ * @example
622
+ * ```typescript
623
+ * const taxonomy = await client.catalog.taxonomies.update('tax_abc123', {
624
+ * name: 'Catalog Categories',
625
+ * });
626
+ * ```
627
+ */
628
+ update: (id: string, attributes: UpdateCatalogTaxonomyAttributes, options?: RequestOptions) => Promise<CatalogTaxonomy>;
629
+ /**
630
+ * Permanently delete a taxonomy and all of its nodes.
631
+ *
632
+ * @param id - The unique identifier of the taxonomy to delete.
633
+ * @param options - Optional request-level overrides.
634
+ * @returns A promise that resolves to `true` on successful deletion.
635
+ *
636
+ * @example
637
+ * ```typescript
638
+ * await client.catalog.taxonomies.delete('tax_abc123');
639
+ * ```
640
+ */
641
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
642
+ };
643
+ /**
644
+ * Taxonomy nodes — individual nodes within a taxonomy tree.
645
+ *
646
+ * Each node represents a single category (e.g. "T-Shirts") within a
647
+ * taxonomy. Nodes can be nested by setting `parent_id`.
648
+ */
649
+ taxonomyNodes: {
650
+ /**
651
+ * List all nodes that belong to a specific taxonomy.
652
+ *
653
+ * @param taxonomyId - The ID of the taxonomy whose nodes to list.
654
+ * @param options - Optional pagination and request-level overrides.
655
+ * @returns A promise that resolves to an array of {@link CatalogTaxonomyNode} records.
656
+ *
657
+ * @example
658
+ * ```typescript
659
+ * const nodes = await client.catalog.taxonomyNodes.listByTaxonomy('tax_abc123');
660
+ * const roots = nodes.filter((n) => !n.attributes.parent_id);
661
+ * ```
662
+ */
663
+ listByTaxonomy: (taxonomyId: string, options?: {
664
+ page?: number;
665
+ pageSize?: number;
666
+ } & RequestOptions) => Promise<CatalogTaxonomyNode[]>;
667
+ /**
668
+ * Fetch a single taxonomy node by its unique ID.
669
+ *
670
+ * @param id - The unique identifier of the node to retrieve.
671
+ * @param options - Optional request-level overrides.
672
+ * @returns A promise that resolves to the matching {@link CatalogTaxonomyNode}.
673
+ *
674
+ * @example
675
+ * ```typescript
676
+ * const node = await client.catalog.taxonomyNodes.get('node_abc123');
677
+ * ```
678
+ */
679
+ get: (id: string, options?: RequestOptions) => Promise<CatalogTaxonomyNode>;
680
+ /**
681
+ * Create a new node within a taxonomy.
682
+ *
683
+ * @param attributes - Node attributes. Must include `taxonomy_id` and `name`.
684
+ * Set `parent_id` to nest under an existing node.
685
+ * @param options - Optional request-level overrides.
686
+ * @returns A promise that resolves to the newly created {@link CatalogTaxonomyNode}.
687
+ *
688
+ * @example
689
+ * ```typescript
690
+ * const tops = await client.catalog.taxonomyNodes.create({
691
+ * taxonomy_id: 'tax_abc123',
692
+ * name: 'Tops',
693
+ * parent_id: clothing.id,
694
+ * });
695
+ * ```
696
+ */
697
+ create: (attributes: CreateCatalogTaxonomyNodeAttributes, options?: RequestOptions) => Promise<CatalogTaxonomyNode>;
698
+ /**
699
+ * Update an existing taxonomy node (PATCH semantics).
700
+ *
701
+ * @param id - The unique identifier of the node to update.
702
+ * @param attributes - Key/value map of attributes to change.
703
+ * @param options - Optional request-level overrides.
704
+ * @returns A promise that resolves to the updated {@link CatalogTaxonomyNode}.
705
+ *
706
+ * @example
707
+ * ```typescript
708
+ * const node = await client.catalog.taxonomyNodes.update('node_abc123', {
709
+ * name: 'Apparel',
710
+ * });
711
+ * ```
712
+ */
713
+ update: (id: string, attributes: UpdateCatalogTaxonomyNodeAttributes, options?: RequestOptions) => Promise<CatalogTaxonomyNode>;
714
+ /**
715
+ * Permanently delete a taxonomy node.
716
+ *
717
+ * @param id - The unique identifier of the node to delete.
718
+ * @param options - Optional request-level overrides.
719
+ * @returns A promise that resolves to `true` on successful deletion.
720
+ *
721
+ * @example
722
+ * ```typescript
723
+ * await client.catalog.taxonomyNodes.delete('node_abc123');
724
+ * ```
725
+ */
726
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
727
+ };
728
+ /**
729
+ * Catalog Views — composable, rule-based product lenses.
730
+ *
731
+ * Views filter and sort products for specific channels or use cases.
732
+ */
733
+ views: {
734
+ /**
735
+ * List all catalog views in a workspace.
736
+ *
737
+ * @param workspaceId - The ID of the workspace whose views to list.
738
+ * @param options - Optional pagination and request-level overrides.
739
+ * @returns A promise that resolves to an array of {@link CatalogView} records.
740
+ *
741
+ * @example
742
+ * ```typescript
743
+ * const views = await client.catalog.views.listByWorkspace('ws_abc123');
744
+ * ```
745
+ */
746
+ listByWorkspace: (workspaceId: string, options?: {
747
+ page?: number;
748
+ pageSize?: number;
749
+ } & RequestOptions) => Promise<CatalogView[]>;
750
+ /**
751
+ * Fetch a single catalog view by its unique ID.
752
+ *
753
+ * @param id - The unique identifier of the view.
754
+ * @param options - Optional request-level overrides.
755
+ * @returns A promise that resolves to the matching {@link CatalogView}.
756
+ *
757
+ * @example
758
+ * ```typescript
759
+ * const view = await client.catalog.views.get('cv_abc123');
760
+ * ```
761
+ */
762
+ get: (id: string, options?: RequestOptions) => Promise<CatalogView>;
763
+ /**
764
+ * Create a new catalog view.
765
+ *
766
+ * @param attributes - View attributes. Must include `workspace_id` and `name`.
767
+ * @param options - Optional request-level overrides.
768
+ * @returns A promise that resolves to the newly created {@link CatalogView}.
769
+ *
770
+ * @example
771
+ * ```typescript
772
+ * const view = await client.catalog.views.create({
773
+ * workspace_id: 'ws_abc123',
774
+ * name: 'Featured Products',
775
+ * channel_target: 'web',
776
+ * max_items: 20,
777
+ * });
778
+ * ```
779
+ */
780
+ create: (attributes: CreateCatalogViewAttributes, options?: RequestOptions) => Promise<CatalogView>;
781
+ /**
782
+ * Update an existing catalog view (PATCH semantics).
783
+ *
784
+ * @param id - The unique identifier of the view to update.
785
+ * @param attributes - Key/value map of attributes to change.
786
+ * @param options - Optional request-level overrides.
787
+ * @returns A promise that resolves to the updated {@link CatalogView}.
788
+ *
789
+ * @example
790
+ * ```typescript
791
+ * const view = await client.catalog.views.update('cv_abc123', {
792
+ * max_items: 50,
793
+ * });
794
+ * ```
795
+ */
796
+ update: (id: string, attributes: UpdateCatalogViewAttributes, options?: RequestOptions) => Promise<CatalogView>;
797
+ /**
798
+ * Permanently delete a catalog view.
799
+ *
800
+ * @param id - The unique identifier of the view to delete.
801
+ * @param options - Optional request-level overrides.
802
+ * @returns A promise that resolves to `true` on successful deletion.
803
+ *
804
+ * @example
805
+ * ```typescript
806
+ * await client.catalog.views.delete('cv_abc123');
807
+ * ```
808
+ */
809
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
810
+ };
811
+ /**
812
+ * Price Lists — named price configurations.
813
+ *
814
+ * Price lists are application-scoped and define pricing for products/variants
815
+ * with fixed, percentage, or tiered strategies.
816
+ */
817
+ priceLists: {
818
+ /**
819
+ * List all price lists for an application.
820
+ *
821
+ * @param applicationId - The ID of the application whose price lists to list.
822
+ * @param options - Optional pagination and request-level overrides.
823
+ * @returns A promise that resolves to an array of {@link CatalogPriceList} records.
824
+ *
825
+ * @example
826
+ * ```typescript
827
+ * const lists = await client.catalog.priceLists.listByApplication('app_abc');
828
+ * ```
829
+ */
830
+ listByApplication: (applicationId: string, options?: {
831
+ page?: number;
832
+ pageSize?: number;
833
+ } & RequestOptions) => Promise<CatalogPriceList[]>;
834
+ /**
835
+ * Fetch a single price list by its unique ID.
836
+ *
837
+ * @param id - The unique identifier of the price list.
838
+ * @param options - Optional request-level overrides.
839
+ * @returns A promise that resolves to the matching {@link CatalogPriceList}.
840
+ *
841
+ * @example
842
+ * ```typescript
843
+ * const list = await client.catalog.priceLists.get('pl_abc123');
844
+ * ```
845
+ */
846
+ get: (id: string, options?: RequestOptions) => Promise<CatalogPriceList>;
847
+ /**
848
+ * Create a new price list for an application.
849
+ *
850
+ * @param attributes - Price list attributes. Must include `application_id` and `name`.
851
+ * @param options - Optional request-level overrides.
852
+ * @returns A promise that resolves to the newly created {@link CatalogPriceList}.
853
+ *
854
+ * @example
855
+ * ```typescript
856
+ * const list = await client.catalog.priceLists.create({
857
+ * application_id: 'app_abc',
858
+ * name: 'Wholesale Pricing',
859
+ * currency: 'USD',
860
+ * });
861
+ * ```
862
+ */
863
+ create: (attributes: CreateCatalogPriceListAttributes, options?: RequestOptions) => Promise<CatalogPriceList>;
864
+ /**
865
+ * Update an existing price list (PATCH semantics).
866
+ *
867
+ * @param id - The unique identifier of the price list to update.
868
+ * @param attributes - Key/value map of attributes to change.
869
+ * @param options - Optional request-level overrides.
870
+ * @returns A promise that resolves to the updated {@link CatalogPriceList}.
871
+ *
872
+ * @example
873
+ * ```typescript
874
+ * const list = await client.catalog.priceLists.update('pl_abc123', {
875
+ * name: 'VIP Pricing',
876
+ * });
877
+ * ```
878
+ */
879
+ update: (id: string, attributes: UpdateCatalogPriceListAttributes, options?: RequestOptions) => Promise<CatalogPriceList>;
880
+ /**
881
+ * Permanently delete a price list.
882
+ *
883
+ * @param id - The unique identifier of the price list to delete.
884
+ * @param options - Optional request-level overrides.
885
+ * @returns A promise that resolves to `true` on successful deletion.
886
+ *
887
+ * @example
888
+ * ```typescript
889
+ * await client.catalog.priceLists.delete('pl_abc123');
890
+ * ```
891
+ */
892
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
893
+ };
894
+ /**
895
+ * Price List Entries — individual pricing rules within a price list.
896
+ */
897
+ priceListEntries: {
898
+ /**
899
+ * List all entries in a price list.
900
+ *
901
+ * @param priceListId - The ID of the price list whose entries to list.
902
+ * @param options - Optional pagination and request-level overrides.
903
+ * @returns A promise that resolves to an array of {@link CatalogPriceListEntry} records.
904
+ *
905
+ * @example
906
+ * ```typescript
907
+ * const entries = await client.catalog.priceListEntries.listByPriceList('pl_abc');
908
+ * ```
909
+ */
910
+ listByPriceList: (priceListId: string, options?: {
911
+ page?: number;
912
+ pageSize?: number;
913
+ } & RequestOptions) => Promise<CatalogPriceListEntry[]>;
914
+ /**
915
+ * Create a new entry in a price list.
916
+ *
917
+ * @param attributes - Entry attributes. Must include `price_list_id` and `price`.
918
+ * Include either `product_id` or `variant_id` to target pricing.
919
+ * @param options - Optional request-level overrides.
920
+ * @returns A promise that resolves to the newly created {@link CatalogPriceListEntry}.
921
+ *
922
+ * @example
923
+ * ```typescript
924
+ * const entry = await client.catalog.priceListEntries.create({
925
+ * price_list_id: 'pl_abc',
926
+ * product_id: 'prod_xyz',
927
+ * price: '24.99',
928
+ * strategy: 'fixed',
929
+ * });
930
+ * ```
931
+ */
932
+ create: (attributes: CreateCatalogPriceListEntryAttributes, options?: RequestOptions) => Promise<CatalogPriceListEntry>;
933
+ /**
934
+ * Update an existing price list entry (PATCH semantics).
935
+ *
936
+ * @param id - The unique identifier of the entry to update.
937
+ * @param attributes - Key/value map of attributes to change.
938
+ * @param options - Optional request-level overrides.
939
+ * @returns A promise that resolves to the updated {@link CatalogPriceListEntry}.
940
+ *
941
+ * @example
942
+ * ```typescript
943
+ * const entry = await client.catalog.priceListEntries.update('ple_abc', {
944
+ * price: '19.99',
945
+ * });
946
+ * ```
947
+ */
948
+ update: (id: string, attributes: UpdateCatalogPriceListEntryAttributes, options?: RequestOptions) => Promise<CatalogPriceListEntry>;
949
+ /**
950
+ * Permanently delete a price list entry.
951
+ *
952
+ * @param id - The unique identifier of the entry to delete.
953
+ * @param options - Optional request-level overrides.
954
+ * @returns A promise that resolves to `true` on successful deletion.
955
+ *
956
+ * @example
957
+ * ```typescript
958
+ * await client.catalog.priceListEntries.delete('ple_abc');
959
+ * ```
960
+ */
961
+ delete: (id: string, options?: RequestOptions) => Promise<true>;
962
+ };
963
+ };
964
+ //# sourceMappingURL=catalog.d.ts.map