@adspireai/adspire-node-sdk 1.0.317 → 1.0.318

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.
@@ -0,0 +1,430 @@
1
+ import { z } from 'zod';
2
+ export declare const BrandChannelSchema: z.ZodObject<{
3
+ platform: z.ZodString;
4
+ url: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type KafkaBrandChannel = z.infer<typeof BrandChannelSchema>;
7
+ export declare const ProductVariantSchema: z.ZodObject<{
8
+ sku: z.ZodString;
9
+ title: z.ZodString;
10
+ price: z.ZodString;
11
+ inventory_qty: z.ZodNumber;
12
+ }, z.core.$strip>;
13
+ export type ProductVariant = z.infer<typeof ProductVariantSchema>;
14
+ export declare const PriceRangeSchema: z.ZodObject<{
15
+ min: z.ZodString;
16
+ max: z.ZodString;
17
+ currency: z.ZodString;
18
+ }, z.core.$strip>;
19
+ export type PriceRange = z.infer<typeof PriceRangeSchema>;
20
+ export declare const ProductSchema: z.ZodObject<{
21
+ product_id: z.ZodString;
22
+ title: z.ZodString;
23
+ handle: z.ZodString;
24
+ product_type: z.ZodString;
25
+ vendor: z.ZodString;
26
+ status: z.ZodString;
27
+ price_range: z.ZodObject<{
28
+ min: z.ZodString;
29
+ max: z.ZodString;
30
+ currency: z.ZodString;
31
+ }, z.core.$strip>;
32
+ variants: z.ZodArray<z.ZodObject<{
33
+ sku: z.ZodString;
34
+ title: z.ZodString;
35
+ price: z.ZodString;
36
+ inventory_qty: z.ZodNumber;
37
+ }, z.core.$strip>>;
38
+ tags: z.ZodArray<z.ZodString>;
39
+ }, z.core.$strip>;
40
+ export type Product = z.infer<typeof ProductSchema>;
41
+ export declare const ServiceOfferingSchema: z.ZodObject<{
42
+ service_id: z.ZodString;
43
+ name: z.ZodString;
44
+ description: z.ZodString;
45
+ is_active: z.ZodBoolean;
46
+ }, z.core.$strip>;
47
+ export type ServiceOffering = z.infer<typeof ServiceOfferingSchema>;
48
+ export declare const ProjectSchema: z.ZodObject<{
49
+ project_id: z.ZodString;
50
+ name: z.ZodString;
51
+ status: z.ZodString;
52
+ start_date: z.ZodString;
53
+ description: z.ZodString;
54
+ }, z.core.$strip>;
55
+ export type Project = z.infer<typeof ProjectSchema>;
56
+ export declare const BrandOfferingsDataSchema: z.ZodObject<{
57
+ product_catalog: z.ZodArray<z.ZodObject<{
58
+ product_id: z.ZodString;
59
+ title: z.ZodString;
60
+ handle: z.ZodString;
61
+ product_type: z.ZodString;
62
+ vendor: z.ZodString;
63
+ status: z.ZodString;
64
+ price_range: z.ZodObject<{
65
+ min: z.ZodString;
66
+ max: z.ZodString;
67
+ currency: z.ZodString;
68
+ }, z.core.$strip>;
69
+ variants: z.ZodArray<z.ZodObject<{
70
+ sku: z.ZodString;
71
+ title: z.ZodString;
72
+ price: z.ZodString;
73
+ inventory_qty: z.ZodNumber;
74
+ }, z.core.$strip>>;
75
+ tags: z.ZodArray<z.ZodString>;
76
+ }, z.core.$strip>>;
77
+ service_offerings: z.ZodArray<z.ZodObject<{
78
+ service_id: z.ZodString;
79
+ name: z.ZodString;
80
+ description: z.ZodString;
81
+ is_active: z.ZodBoolean;
82
+ }, z.core.$strip>>;
83
+ projects: z.ZodArray<z.ZodObject<{
84
+ project_id: z.ZodString;
85
+ name: z.ZodString;
86
+ status: z.ZodString;
87
+ start_date: z.ZodString;
88
+ description: z.ZodString;
89
+ }, z.core.$strip>>;
90
+ }, z.core.$strip>;
91
+ export type BrandOfferingsData = z.infer<typeof BrandOfferingsDataSchema>;
92
+ export declare const kafkaEventSchemas: {
93
+ readonly 'brand.created': z.ZodObject<{
94
+ uuid: z.ZodString;
95
+ actor: z.ZodString;
96
+ source: z.ZodOptional<z.ZodString>;
97
+ event_version: z.ZodOptional<z.ZodString>;
98
+ timestamp: z.ZodOptional<z.ZodString>;
99
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
100
+ type: z.ZodLiteral<"brand.created">;
101
+ data: z.ZodObject<{
102
+ name: z.ZodString;
103
+ laravel_model_id: z.ZodNumber;
104
+ laravel_model_class: z.ZodString;
105
+ website: z.ZodOptional<z.ZodString>;
106
+ address: z.ZodOptional<z.ZodString>;
107
+ city: z.ZodOptional<z.ZodString>;
108
+ phone: z.ZodOptional<z.ZodString>;
109
+ email: z.ZodOptional<z.ZodString>;
110
+ country: z.ZodOptional<z.ZodString>;
111
+ industry: z.ZodOptional<z.ZodString>;
112
+ channels: z.ZodOptional<z.ZodArray<z.ZodObject<{
113
+ platform: z.ZodString;
114
+ url: z.ZodString;
115
+ }, z.core.$strip>>>;
116
+ }, z.core.$strip>;
117
+ }, z.core.$strip>;
118
+ readonly 'brand.updated': z.ZodObject<{
119
+ uuid: z.ZodString;
120
+ actor: z.ZodString;
121
+ source: z.ZodOptional<z.ZodString>;
122
+ event_version: z.ZodOptional<z.ZodString>;
123
+ timestamp: z.ZodOptional<z.ZodString>;
124
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
125
+ type: z.ZodLiteral<"brand.updated">;
126
+ brandId: z.ZodNumber;
127
+ }, z.core.$strip>;
128
+ readonly 'brand.prompt_added': z.ZodObject<{
129
+ uuid: z.ZodString;
130
+ actor: z.ZodString;
131
+ source: z.ZodOptional<z.ZodString>;
132
+ event_version: z.ZodOptional<z.ZodString>;
133
+ timestamp: z.ZodOptional<z.ZodString>;
134
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
135
+ type: z.ZodLiteral<"brand.prompt_added">;
136
+ brandId: z.ZodNumber;
137
+ prompt: z.ZodString;
138
+ }, z.core.$strip>;
139
+ readonly 'brand.color_added': z.ZodObject<{
140
+ uuid: z.ZodString;
141
+ actor: z.ZodString;
142
+ source: z.ZodOptional<z.ZodString>;
143
+ event_version: z.ZodOptional<z.ZodString>;
144
+ timestamp: z.ZodOptional<z.ZodString>;
145
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
146
+ type: z.ZodLiteral<"brand.color_added">;
147
+ brandId: z.ZodNumber;
148
+ }, z.core.$strip>;
149
+ readonly 'brand.typography_added': z.ZodObject<{
150
+ uuid: z.ZodString;
151
+ actor: z.ZodString;
152
+ source: z.ZodOptional<z.ZodString>;
153
+ event_version: z.ZodOptional<z.ZodString>;
154
+ timestamp: z.ZodOptional<z.ZodString>;
155
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
156
+ type: z.ZodLiteral<"brand.typography_added">;
157
+ brandId: z.ZodNumber;
158
+ }, z.core.$strip>;
159
+ readonly 'brand.asset_created': z.ZodObject<{
160
+ uuid: z.ZodString;
161
+ actor: z.ZodString;
162
+ source: z.ZodOptional<z.ZodString>;
163
+ event_version: z.ZodOptional<z.ZodString>;
164
+ timestamp: z.ZodOptional<z.ZodString>;
165
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
166
+ type: z.ZodLiteral<"brand.asset_created">;
167
+ brandId: z.ZodNumber;
168
+ }, z.core.$strip>;
169
+ readonly 'brand.asset_updated': z.ZodObject<{
170
+ uuid: z.ZodString;
171
+ actor: z.ZodString;
172
+ source: z.ZodOptional<z.ZodString>;
173
+ event_version: z.ZodOptional<z.ZodString>;
174
+ timestamp: z.ZodOptional<z.ZodString>;
175
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
176
+ type: z.ZodLiteral<"brand.asset_updated">;
177
+ brandId: z.ZodNumber;
178
+ }, z.core.$strip>;
179
+ readonly 'brand.asset_deleted': z.ZodObject<{
180
+ uuid: z.ZodString;
181
+ actor: z.ZodString;
182
+ source: z.ZodOptional<z.ZodString>;
183
+ event_version: z.ZodOptional<z.ZodString>;
184
+ timestamp: z.ZodOptional<z.ZodString>;
185
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
186
+ type: z.ZodLiteral<"brand.asset_deleted">;
187
+ brandId: z.ZodNumber;
188
+ }, z.core.$strip>;
189
+ readonly 'brand.graph_updated': z.ZodObject<{
190
+ uuid: z.ZodString;
191
+ actor: z.ZodString;
192
+ source: z.ZodOptional<z.ZodString>;
193
+ event_version: z.ZodOptional<z.ZodString>;
194
+ timestamp: z.ZodOptional<z.ZodString>;
195
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
196
+ type: z.ZodLiteral<"brand.graph_updated">;
197
+ brandId: z.ZodNumber;
198
+ }, z.core.$strip>;
199
+ readonly 'brand_identity.updated': z.ZodObject<{
200
+ uuid: z.ZodString;
201
+ actor: z.ZodString;
202
+ source: z.ZodOptional<z.ZodString>;
203
+ event_version: z.ZodOptional<z.ZodString>;
204
+ timestamp: z.ZodOptional<z.ZodString>;
205
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
206
+ type: z.ZodLiteral<"brand_identity.updated">;
207
+ laravel_model_id: z.ZodNumber;
208
+ data: z.ZodObject<{
209
+ voice_guidelines: z.ZodNullable<z.ZodString>;
210
+ tone_rules: z.ZodNullable<z.ZodString>;
211
+ audience: z.ZodNullable<z.ZodString>;
212
+ hard_constraints: z.ZodArray<z.ZodString>;
213
+ visual_assets: z.ZodObject<{
214
+ colors: z.ZodArray<z.ZodString>;
215
+ background: z.ZodNullable<z.ZodString>;
216
+ text: z.ZodNullable<z.ZodString>;
217
+ typography: z.ZodObject<{
218
+ heading: z.ZodNullable<z.ZodString>;
219
+ paragraph: z.ZodNullable<z.ZodString>;
220
+ }, z.core.$strip>;
221
+ logos: z.ZodArray<z.ZodObject<{
222
+ type: z.ZodEnum<{
223
+ url: "url";
224
+ svg: "svg";
225
+ }>;
226
+ value: z.ZodString;
227
+ }, z.core.$strip>>;
228
+ }, z.core.$strip>;
229
+ messaging_frameworks: z.ZodRecord<z.ZodString, z.ZodUnknown>;
230
+ }, z.core.$strip>;
231
+ }, z.core.$strip>;
232
+ readonly 'company_info.updated': z.ZodObject<{
233
+ uuid: z.ZodString;
234
+ actor: z.ZodString;
235
+ source: z.ZodOptional<z.ZodString>;
236
+ event_version: z.ZodOptional<z.ZodString>;
237
+ timestamp: z.ZodOptional<z.ZodString>;
238
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
239
+ type: z.ZodLiteral<"company_info.updated">;
240
+ laravel_model_id: z.ZodNumber;
241
+ data: z.ZodObject<{
242
+ basic_details: z.ZodRecord<z.ZodString, z.ZodUnknown>;
243
+ industry_categories: z.ZodArray<z.ZodString>;
244
+ market_position: z.ZodNullable<z.ZodString>;
245
+ taglines: z.ZodArray<z.ZodString>;
246
+ value_prop: z.ZodNullable<z.ZodString>;
247
+ mission_vision: z.ZodNullable<z.ZodString>;
248
+ key_people: z.ZodArray<z.ZodObject<{
249
+ name: z.ZodString;
250
+ role: z.ZodString;
251
+ }, z.core.$strip>>;
252
+ brand_promises: z.ZodArray<z.ZodString>;
253
+ }, z.core.$strip>;
254
+ }, z.core.$strip>;
255
+ readonly 'offerings.updated': z.ZodObject<{
256
+ uuid: z.ZodString;
257
+ actor: z.ZodString;
258
+ source: z.ZodOptional<z.ZodString>;
259
+ event_version: z.ZodOptional<z.ZodString>;
260
+ timestamp: z.ZodOptional<z.ZodString>;
261
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
262
+ type: z.ZodLiteral<"offerings.updated">;
263
+ laravel_model_id: z.ZodNumber;
264
+ data: z.ZodObject<{
265
+ product_catalog: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
266
+ service_offerings: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
267
+ projects: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
268
+ sub_brands: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
269
+ }, z.core.$strip>;
270
+ }, z.core.$strip>;
271
+ readonly 'brand.offerings.updated': z.ZodObject<{
272
+ uuid: z.ZodString;
273
+ type: z.ZodLiteral<"brand.offerings.updated">;
274
+ source: z.ZodString;
275
+ version: z.ZodString;
276
+ timestamp: z.ZodString;
277
+ laravel_model_id: z.ZodNumber;
278
+ actor: z.ZodString;
279
+ data: z.ZodObject<{
280
+ product_catalog: z.ZodArray<z.ZodObject<{
281
+ product_id: z.ZodString;
282
+ title: z.ZodString;
283
+ handle: z.ZodString;
284
+ product_type: z.ZodString;
285
+ vendor: z.ZodString;
286
+ status: z.ZodString;
287
+ price_range: z.ZodObject<{
288
+ min: z.ZodString;
289
+ max: z.ZodString;
290
+ currency: z.ZodString;
291
+ }, z.core.$strip>;
292
+ variants: z.ZodArray<z.ZodObject<{
293
+ sku: z.ZodString;
294
+ title: z.ZodString;
295
+ price: z.ZodString;
296
+ inventory_qty: z.ZodNumber;
297
+ }, z.core.$strip>>;
298
+ tags: z.ZodArray<z.ZodString>;
299
+ }, z.core.$strip>>;
300
+ service_offerings: z.ZodArray<z.ZodObject<{
301
+ service_id: z.ZodString;
302
+ name: z.ZodString;
303
+ description: z.ZodString;
304
+ is_active: z.ZodBoolean;
305
+ }, z.core.$strip>>;
306
+ projects: z.ZodArray<z.ZodObject<{
307
+ project_id: z.ZodString;
308
+ name: z.ZodString;
309
+ status: z.ZodString;
310
+ start_date: z.ZodString;
311
+ description: z.ZodString;
312
+ }, z.core.$strip>>;
313
+ }, z.core.$strip>;
314
+ }, z.core.$strip>;
315
+ readonly 'social_proof.updated': z.ZodObject<{
316
+ uuid: z.ZodString;
317
+ actor: z.ZodString;
318
+ source: z.ZodOptional<z.ZodString>;
319
+ event_version: z.ZodOptional<z.ZodString>;
320
+ timestamp: z.ZodOptional<z.ZodString>;
321
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
322
+ type: z.ZodLiteral<"social_proof.updated">;
323
+ laravel_model_id: z.ZodNumber;
324
+ data: z.ZodObject<{
325
+ testimonials: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
326
+ case_studies: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
327
+ }, z.core.$strip>;
328
+ }, z.core.$strip>;
329
+ readonly 'brand_team_structure.updated': z.ZodObject<{
330
+ uuid: z.ZodString;
331
+ actor: z.ZodString;
332
+ source: z.ZodOptional<z.ZodString>;
333
+ event_version: z.ZodOptional<z.ZodString>;
334
+ timestamp: z.ZodOptional<z.ZodString>;
335
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
336
+ type: z.ZodLiteral<"brand_team_structure.updated">;
337
+ laravel_model_id: z.ZodNumber;
338
+ data: z.ZodObject<{
339
+ key_stakeholders: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
340
+ approval_chains: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
341
+ }, z.core.$strip>;
342
+ }, z.core.$strip>;
343
+ readonly 'brand_competitors.updated': z.ZodObject<{
344
+ uuid: z.ZodString;
345
+ actor: z.ZodString;
346
+ source: z.ZodOptional<z.ZodString>;
347
+ event_version: z.ZodOptional<z.ZodString>;
348
+ timestamp: z.ZodOptional<z.ZodString>;
349
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
350
+ type: z.ZodLiteral<"brand_competitors.updated">;
351
+ laravel_model_id: z.ZodNumber;
352
+ data: z.ZodObject<{
353
+ direct_competitors: z.ZodArray<z.ZodString>;
354
+ indirect_competitors: z.ZodArray<z.ZodString>;
355
+ competitive_positioning: z.ZodNullable<z.ZodString>;
356
+ }, z.core.$strip>;
357
+ }, z.core.$strip>;
358
+ readonly 'brand_content_strategy.updated': z.ZodObject<{
359
+ uuid: z.ZodString;
360
+ actor: z.ZodString;
361
+ source: z.ZodOptional<z.ZodString>;
362
+ event_version: z.ZodOptional<z.ZodString>;
363
+ timestamp: z.ZodOptional<z.ZodString>;
364
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
365
+ type: z.ZodLiteral<"brand_content_strategy.updated">;
366
+ laravel_model_id: z.ZodNumber;
367
+ data: z.ZodObject<{
368
+ channel_preferences: z.ZodArray<z.ZodString>;
369
+ content_types: z.ZodArray<z.ZodString>;
370
+ performance_metrics: z.ZodRecord<z.ZodString, z.ZodUnknown>;
371
+ }, z.core.$strip>;
372
+ }, z.core.$strip>;
373
+ readonly 'brand_assets.updated': z.ZodObject<{
374
+ uuid: z.ZodString;
375
+ actor: z.ZodString;
376
+ source: z.ZodOptional<z.ZodString>;
377
+ event_version: z.ZodOptional<z.ZodString>;
378
+ timestamp: z.ZodOptional<z.ZodString>;
379
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
380
+ type: z.ZodLiteral<"brand_assets.updated">;
381
+ laravel_model_id: z.ZodNumber;
382
+ data: z.ZodObject<{
383
+ copy_blocks: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
384
+ templates: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
385
+ }, z.core.$strip>;
386
+ }, z.core.$strip>;
387
+ readonly 'brand_social_channels.updated': z.ZodObject<{
388
+ uuid: z.ZodString;
389
+ actor: z.ZodString;
390
+ source: z.ZodOptional<z.ZodString>;
391
+ event_version: z.ZodOptional<z.ZodString>;
392
+ timestamp: z.ZodOptional<z.ZodString>;
393
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
394
+ type: z.ZodLiteral<"brand_social_channels.updated">;
395
+ laravel_model_id: z.ZodNumber;
396
+ data: z.ZodObject<{
397
+ channels: z.ZodArray<z.ZodObject<{
398
+ platform: z.ZodString;
399
+ url: z.ZodString;
400
+ }, z.core.$strip>>;
401
+ }, z.core.$strip>;
402
+ }, z.core.$strip>;
403
+ };
404
+ export type KafkaEventType = keyof typeof kafkaEventSchemas;
405
+ export type KafkaEventPayload<T extends KafkaEventType> = z.infer<(typeof kafkaEventSchemas)[T]>;
406
+ export type KafkaEvent = {
407
+ [K in KafkaEventType]: KafkaEventPayload<K>;
408
+ }[KafkaEventType];
409
+ export type BrandOfferingsConnectorUpdatedEvent = KafkaEventPayload<'brand.offerings.updated'>;
410
+ export declare function validateKafkaEvent(body: unknown): {
411
+ success: true;
412
+ data: KafkaEvent;
413
+ } | {
414
+ success: false;
415
+ error: string;
416
+ };
417
+ export interface KafkaEventMeta {
418
+ source: string;
419
+ occurred_at: Date;
420
+ topic: string;
421
+ partition: number;
422
+ offset: string;
423
+ }
424
+ export interface BrandDTO {
425
+ id: number;
426
+ name: string;
427
+ laravel_model_id: number | null;
428
+ laravel_model_class: string | null;
429
+ created_at: Date;
430
+ }
@@ -0,0 +1,266 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.kafkaEventSchemas = exports.BrandOfferingsDataSchema = exports.ProjectSchema = exports.ServiceOfferingSchema = exports.ProductSchema = exports.PriceRangeSchema = exports.ProductVariantSchema = exports.BrandChannelSchema = void 0;
4
+ exports.validateKafkaEvent = validateKafkaEvent;
5
+ // Single source of truth for the Kafka event contract shared between
6
+ // adspire-kafka-api (producer/validator) and adspire-brand-worker (consumer).
7
+ // NOTE: lives outside src/ on purpose — @hey-api/openapi-ts clears the whole
8
+ // `output: 'src'` directory on every `generate` run, which would silently
9
+ // delete this file if it lived there. Compiled separately (see
10
+ // tsconfig.shared.json / package.json build script) into the same dist/.
11
+ // Import via the `/events` subpath, e.g. `@adspire-ai/adspire-node-sdk/dist/events`.
12
+ const zod_1 = require("zod");
13
+ exports.BrandChannelSchema = zod_1.z.object({
14
+ platform: zod_1.z.string(),
15
+ url: zod_1.z.string()
16
+ });
17
+ // Envelope for events published by the Laravel backend directly to Kafka.
18
+ // Not runtime-validated anywhere today, so this reflects the shape the
19
+ // consumer (adspire-brand-worker) has always expected.
20
+ const InternalEventEnvelopeSchema = zod_1.z.object({
21
+ uuid: zod_1.z.string(),
22
+ actor: zod_1.z.string(), // system or user
23
+ source: zod_1.z.string().optional(), // e.g. 'shopify', 'admin-ui', 'internal-script'
24
+ event_version: zod_1.z.string().optional(), // producer-side schema version, informational
25
+ timestamp: zod_1.z.string().optional(), // producer-side ISO timestamp, informational
26
+ metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional() // free-form provenance
27
+ });
28
+ const brandCreatedSchema = InternalEventEnvelopeSchema.extend({
29
+ type: zod_1.z.literal('brand.created'),
30
+ data: zod_1.z.object({
31
+ name: zod_1.z.string(),
32
+ laravel_model_id: zod_1.z.number(),
33
+ laravel_model_class: zod_1.z.string(),
34
+ website: zod_1.z.string().optional(),
35
+ address: zod_1.z.string().optional(),
36
+ city: zod_1.z.string().optional(),
37
+ phone: zod_1.z.string().optional(),
38
+ email: zod_1.z.string().optional(),
39
+ country: zod_1.z.string().optional(),
40
+ industry: zod_1.z.string().optional(),
41
+ channels: zod_1.z.array(exports.BrandChannelSchema).optional()
42
+ })
43
+ });
44
+ const brandUpdatedSchema = InternalEventEnvelopeSchema.extend({
45
+ type: zod_1.z.literal('brand.updated'),
46
+ brandId: zod_1.z.number()
47
+ });
48
+ const brandPromptAddedSchema = InternalEventEnvelopeSchema.extend({
49
+ type: zod_1.z.literal('brand.prompt_added'),
50
+ brandId: zod_1.z.number(),
51
+ prompt: zod_1.z.string()
52
+ });
53
+ const brandColorAddedSchema = InternalEventEnvelopeSchema.extend({
54
+ type: zod_1.z.literal('brand.color_added'),
55
+ brandId: zod_1.z.number()
56
+ });
57
+ const brandTypographyAddedSchema = InternalEventEnvelopeSchema.extend({
58
+ type: zod_1.z.literal('brand.typography_added'),
59
+ brandId: zod_1.z.number()
60
+ });
61
+ const brandAssetCreatedSchema = InternalEventEnvelopeSchema.extend({
62
+ type: zod_1.z.literal('brand.asset_created'),
63
+ brandId: zod_1.z.number()
64
+ });
65
+ const brandAssetUpdatedSchema = InternalEventEnvelopeSchema.extend({
66
+ type: zod_1.z.literal('brand.asset_updated'),
67
+ brandId: zod_1.z.number()
68
+ });
69
+ const brandAssetDeletedSchema = InternalEventEnvelopeSchema.extend({
70
+ type: zod_1.z.literal('brand.asset_deleted'),
71
+ brandId: zod_1.z.number()
72
+ });
73
+ const brandGraphUpdatedSchema = InternalEventEnvelopeSchema.extend({
74
+ type: zod_1.z.literal('brand.graph_updated'),
75
+ brandId: zod_1.z.number()
76
+ });
77
+ // =========================
78
+ // Brand graph form events.
79
+ // One per FE form / DB table. laravel_model_id resolves to internal brands.id,
80
+ // and "data" carries the full current state of that table — these are
81
+ // full-snapshot updates, not partial patches.
82
+ // =========================
83
+ const brandIdentityUpdatedSchema = InternalEventEnvelopeSchema.extend({
84
+ type: zod_1.z.literal('brand_identity.updated'),
85
+ laravel_model_id: zod_1.z.number(),
86
+ data: zod_1.z.object({
87
+ voice_guidelines: zod_1.z.string().nullable(),
88
+ tone_rules: zod_1.z.string().nullable(),
89
+ audience: zod_1.z.string().nullable(),
90
+ hard_constraints: zod_1.z.array(zod_1.z.string()),
91
+ visual_assets: zod_1.z.object({
92
+ colors: zod_1.z.array(zod_1.z.string()), // hex
93
+ background: zod_1.z.string().nullable(), // hex
94
+ text: zod_1.z.string().nullable(), // hex
95
+ typography: zod_1.z.object({
96
+ heading: zod_1.z.string().nullable(),
97
+ paragraph: zod_1.z.string().nullable()
98
+ }),
99
+ logos: zod_1.z.array(zod_1.z.object({ type: zod_1.z.enum(['url', 'svg']), value: zod_1.z.string() }))
100
+ }),
101
+ messaging_frameworks: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())
102
+ })
103
+ });
104
+ const companyInfoUpdatedSchema = InternalEventEnvelopeSchema.extend({
105
+ type: zod_1.z.literal('company_info.updated'),
106
+ laravel_model_id: zod_1.z.number(),
107
+ data: zod_1.z.object({
108
+ basic_details: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
109
+ industry_categories: zod_1.z.array(zod_1.z.string()),
110
+ market_position: zod_1.z.string().nullable(),
111
+ taglines: zod_1.z.array(zod_1.z.string()),
112
+ value_prop: zod_1.z.string().nullable(),
113
+ mission_vision: zod_1.z.string().nullable(),
114
+ key_people: zod_1.z.array(zod_1.z.object({ name: zod_1.z.string(), role: zod_1.z.string() })),
115
+ brand_promises: zod_1.z.array(zod_1.z.string())
116
+ })
117
+ });
118
+ const offeringsUpdatedSchema = InternalEventEnvelopeSchema.extend({
119
+ type: zod_1.z.literal('offerings.updated'),
120
+ laravel_model_id: zod_1.z.number(),
121
+ data: zod_1.z.object({
122
+ product_catalog: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())),
123
+ service_offerings: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())),
124
+ projects: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())),
125
+ sub_brands: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()))
126
+ })
127
+ });
128
+ // Canonical schema for the connector-sourced "brand.offerings.updated" event.
129
+ // This is the only Kafka event validated at ingress (adspire-kafka-api), so its
130
+ // wire shape (`version` instead of `event_version`, no `metadata`) is authoritative.
131
+ exports.ProductVariantSchema = zod_1.z.object({
132
+ sku: zod_1.z.string().min(1),
133
+ title: zod_1.z.string().min(1),
134
+ price: zod_1.z.string().regex(/^\d+(\.\d{1,2})?$/),
135
+ inventory_qty: zod_1.z.number().int().nonnegative()
136
+ });
137
+ exports.PriceRangeSchema = zod_1.z.object({
138
+ min: zod_1.z.string().regex(/^\d+(\.\d{1,2})?$/),
139
+ max: zod_1.z.string().regex(/^\d+(\.\d{1,2})?$/),
140
+ currency: zod_1.z.string().length(3)
141
+ });
142
+ exports.ProductSchema = zod_1.z.object({
143
+ product_id: zod_1.z.string().min(1),
144
+ title: zod_1.z.string().min(1),
145
+ handle: zod_1.z.string().min(1),
146
+ product_type: zod_1.z.string().min(1),
147
+ vendor: zod_1.z.string().min(1),
148
+ status: zod_1.z.string().min(1),
149
+ price_range: exports.PriceRangeSchema,
150
+ variants: zod_1.z.array(exports.ProductVariantSchema),
151
+ tags: zod_1.z.array(zod_1.z.string())
152
+ });
153
+ exports.ServiceOfferingSchema = zod_1.z.object({
154
+ service_id: zod_1.z.string().min(1),
155
+ name: zod_1.z.string().min(1),
156
+ description: zod_1.z.string(),
157
+ is_active: zod_1.z.boolean()
158
+ });
159
+ exports.ProjectSchema = zod_1.z.object({
160
+ project_id: zod_1.z.string().min(1),
161
+ name: zod_1.z.string().min(1),
162
+ status: zod_1.z.string().min(1),
163
+ start_date: zod_1.z.string().date(),
164
+ description: zod_1.z.string()
165
+ });
166
+ exports.BrandOfferingsDataSchema = zod_1.z.object({
167
+ product_catalog: zod_1.z.array(exports.ProductSchema),
168
+ service_offerings: zod_1.z.array(exports.ServiceOfferingSchema),
169
+ projects: zod_1.z.array(exports.ProjectSchema)
170
+ });
171
+ const brandOfferingsConnectorUpdatedSchema = zod_1.z.object({
172
+ uuid: zod_1.z.string().min(1),
173
+ type: zod_1.z.literal('brand.offerings.updated'),
174
+ source: zod_1.z.string().min(1),
175
+ version: zod_1.z.string().min(1),
176
+ timestamp: zod_1.z.string().datetime(),
177
+ laravel_model_id: zod_1.z.number().int().positive(),
178
+ actor: zod_1.z.string().min(1), // e.g. 'connector:shopify', 'connector:woocommerce'
179
+ data: exports.BrandOfferingsDataSchema
180
+ });
181
+ const socialProofUpdatedSchema = InternalEventEnvelopeSchema.extend({
182
+ type: zod_1.z.literal('social_proof.updated'),
183
+ laravel_model_id: zod_1.z.number(),
184
+ data: zod_1.z.object({
185
+ testimonials: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())),
186
+ case_studies: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()))
187
+ })
188
+ });
189
+ const teamStructureUpdatedSchema = InternalEventEnvelopeSchema.extend({
190
+ type: zod_1.z.literal('brand_team_structure.updated'),
191
+ laravel_model_id: zod_1.z.number(),
192
+ data: zod_1.z.object({
193
+ key_stakeholders: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())),
194
+ approval_chains: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()))
195
+ })
196
+ });
197
+ const competitorsUpdatedSchema = InternalEventEnvelopeSchema.extend({
198
+ type: zod_1.z.literal('brand_competitors.updated'),
199
+ laravel_model_id: zod_1.z.number(),
200
+ data: zod_1.z.object({
201
+ direct_competitors: zod_1.z.array(zod_1.z.string()),
202
+ indirect_competitors: zod_1.z.array(zod_1.z.string()),
203
+ competitive_positioning: zod_1.z.string().nullable()
204
+ })
205
+ });
206
+ const contentStrategyUpdatedSchema = InternalEventEnvelopeSchema.extend({
207
+ type: zod_1.z.literal('brand_content_strategy.updated'),
208
+ laravel_model_id: zod_1.z.number(),
209
+ data: zod_1.z.object({
210
+ channel_preferences: zod_1.z.array(zod_1.z.string()),
211
+ content_types: zod_1.z.array(zod_1.z.string()),
212
+ performance_metrics: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())
213
+ })
214
+ });
215
+ const assetsUpdatedSchema = InternalEventEnvelopeSchema.extend({
216
+ type: zod_1.z.literal('brand_assets.updated'),
217
+ laravel_model_id: zod_1.z.number(),
218
+ data: zod_1.z.object({
219
+ copy_blocks: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())),
220
+ templates: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()))
221
+ })
222
+ });
223
+ const socialChannelsUpdatedSchema = InternalEventEnvelopeSchema.extend({
224
+ type: zod_1.z.literal('brand_social_channels.updated'),
225
+ laravel_model_id: zod_1.z.number(),
226
+ data: zod_1.z.object({
227
+ channels: zod_1.z.array(exports.BrandChannelSchema)
228
+ })
229
+ });
230
+ exports.kafkaEventSchemas = {
231
+ 'brand.created': brandCreatedSchema,
232
+ 'brand.updated': brandUpdatedSchema,
233
+ 'brand.prompt_added': brandPromptAddedSchema,
234
+ 'brand.color_added': brandColorAddedSchema,
235
+ 'brand.typography_added': brandTypographyAddedSchema,
236
+ 'brand.asset_created': brandAssetCreatedSchema,
237
+ 'brand.asset_updated': brandAssetUpdatedSchema,
238
+ 'brand.asset_deleted': brandAssetDeletedSchema,
239
+ 'brand.graph_updated': brandGraphUpdatedSchema,
240
+ 'brand_identity.updated': brandIdentityUpdatedSchema,
241
+ 'company_info.updated': companyInfoUpdatedSchema,
242
+ 'offerings.updated': offeringsUpdatedSchema,
243
+ 'brand.offerings.updated': brandOfferingsConnectorUpdatedSchema,
244
+ 'social_proof.updated': socialProofUpdatedSchema,
245
+ 'brand_team_structure.updated': teamStructureUpdatedSchema,
246
+ 'brand_competitors.updated': competitorsUpdatedSchema,
247
+ 'brand_content_strategy.updated': contentStrategyUpdatedSchema,
248
+ 'brand_assets.updated': assetsUpdatedSchema,
249
+ 'brand_social_channels.updated': socialChannelsUpdatedSchema
250
+ };
251
+ function validateKafkaEvent(body) {
252
+ if (typeof body !== 'object' || body === null || !('type' in body)) {
253
+ return { success: false, error: 'Missing event type' };
254
+ }
255
+ const type = body.type;
256
+ if (typeof type !== 'string' || !(type in exports.kafkaEventSchemas)) {
257
+ return { success: false, error: `Unsupported event type: ${String(type)}` };
258
+ }
259
+ const schema = exports.kafkaEventSchemas[type];
260
+ const result = schema.safeParse(body);
261
+ if (!result.success) {
262
+ return { success: false, error: result.error.message };
263
+ }
264
+ return { success: true, data: result.data };
265
+ }
266
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../shared/events.ts"],"names":[],"mappings":";;;AAwSA,gDAqBC;AA7TD,qEAAqE;AACrE,8EAA8E;AAC9E,6EAA6E;AAC7E,0EAA0E;AAC1E,+DAA+D;AAC/D,yEAAyE;AACzE,qFAAqF;AACrF,6BAAuB;AAEV,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAA;AAMF,0EAA0E;AAC1E,uEAAuE;AACvE,uDAAuD;AACvD,MAAM,2BAA2B,GAAG,OAA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,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,2BAA2B,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAA;IAC7E,CAAC;IAED,MAAM,MAAM,GAAG,yBAAiB,CAAC,IAAsB,CAAC,CAAA;IACxD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;IAErC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAA;IACxD,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAkB,EAAE,CAAA;AAC3D,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './types.gen';
2
2
  export * from './sdk.gen';
3
+ export * from './events';
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  // This file is auto-generated by @hey-api/openapi-ts
18
18
  __exportStar(require("./types.gen"), exports);
19
19
  __exportStar(require("./sdk.gen"), exports);
20
- //# sourceMappingURL=index.js.map
20
+ __exportStar(require("./events"), exports);
21
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adspireai/adspire-node-sdk",
3
- "version": "1.0.317",
3
+ "version": "1.0.318",
4
4
  "description": "Official Node.js SDK for AdspireAI API",
5
5
  "main": "dist-public/index.js",
6
6
  "types": "dist-public/index.d.ts",
@@ -44,6 +44,7 @@
44
44
  "registry": "https://registry.npmjs.org"
45
45
  },
46
46
  "dependencies": {
47
- "semver": "^7.7.2"
47
+ "semver": "^7.7.2",
48
+ "zod": "^4.4.3"
48
49
  }
49
50
  }