@pushwoosh/rpc-gateway-ai-assistant 0.1.186 → 0.1.188
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/commonTypes.d.ts +0 -8
- package/data.js +61 -4
- package/package.json +1 -1
- package/pushwoosh_aibuilder_v1.d.ts +17 -0
- package/pushwoosh_aigen_v1.d.ts +66 -0
- package/pushwoosh_templates_v1.d.ts +4 -4
- package/pushwoosh_vibeml_v1.d.ts +30 -13
package/commonTypes.d.ts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
export type Duration = number;
|
|
2
|
-
/** Arbitrary JSON value (google.protobuf.Value). */
|
|
3
|
-
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
4
|
-
[key: string]: JsonValue;
|
|
5
|
-
};
|
|
6
|
-
/** Arbitrary JSON object (google.protobuf.Struct). */
|
|
7
|
-
export type JsonObject = {
|
|
8
|
-
[key: string]: JsonValue;
|
|
9
|
-
};
|
|
10
2
|
export type RpcMethod<Req, Res> = ((request: Req) => Promise<Res>) & {
|
|
11
3
|
safe(request: Req): Promise<[{
|
|
12
4
|
error: unknown;
|
package/data.js
CHANGED
|
@@ -390,6 +390,10 @@ export const data = {
|
|
|
390
390
|
},
|
|
391
391
|
"list": {
|
|
392
392
|
"type": "pushwoosh.aibuilder.v1.List"
|
|
393
|
+
},
|
|
394
|
+
"margin": {
|
|
395
|
+
"type": "pushwoosh.aibuilder.v1.EdgeInsets",
|
|
396
|
+
"optional": true
|
|
393
397
|
}
|
|
394
398
|
},
|
|
395
399
|
"oneofs": {
|
|
@@ -449,6 +453,10 @@ export const data = {
|
|
|
449
453
|
},
|
|
450
454
|
"origHeight": {
|
|
451
455
|
"type": "number"
|
|
456
|
+
},
|
|
457
|
+
"margin": {
|
|
458
|
+
"type": "pushwoosh.aibuilder.v1.EdgeInsets",
|
|
459
|
+
"optional": true
|
|
452
460
|
}
|
|
453
461
|
}
|
|
454
462
|
},
|
|
@@ -867,6 +875,12 @@ export const data = {
|
|
|
867
875
|
"response": "pushwoosh.aigen.v1.AiGenExtractStyleResponse",
|
|
868
876
|
"method": "post",
|
|
869
877
|
"path": "/api/v1/aigen/extract-style"
|
|
878
|
+
},
|
|
879
|
+
"ConvertUnlayer": {
|
|
880
|
+
"request": "pushwoosh.aigen.v1.AiGenConvertUnlayerRequest",
|
|
881
|
+
"response": "pushwoosh.aigen.v1.AiGenConvertUnlayerResponse",
|
|
882
|
+
"method": "post",
|
|
883
|
+
"path": "/api/v1/aigen/convert-unlayer"
|
|
870
884
|
}
|
|
871
885
|
}
|
|
872
886
|
},
|
|
@@ -1293,6 +1307,41 @@ export const data = {
|
|
|
1293
1307
|
}
|
|
1294
1308
|
}
|
|
1295
1309
|
},
|
|
1310
|
+
"pushwoosh.aigen.v1.AiGenConvertUnlayerRequest": {
|
|
1311
|
+
"type": "I",
|
|
1312
|
+
"fields": {
|
|
1313
|
+
"editorConfig": {
|
|
1314
|
+
"type": "object"
|
|
1315
|
+
},
|
|
1316
|
+
"localizationData": {
|
|
1317
|
+
"type": "object"
|
|
1318
|
+
},
|
|
1319
|
+
"language": {
|
|
1320
|
+
"type": "string"
|
|
1321
|
+
},
|
|
1322
|
+
"application": {
|
|
1323
|
+
"type": "string"
|
|
1324
|
+
},
|
|
1325
|
+
"templateName": {
|
|
1326
|
+
"type": "string"
|
|
1327
|
+
},
|
|
1328
|
+
"subject": {
|
|
1329
|
+
"type": "string"
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
"pushwoosh.aigen.v1.AiGenConvertUnlayerResponse": {
|
|
1334
|
+
"type": "I",
|
|
1335
|
+
"fields": {
|
|
1336
|
+
"document": {
|
|
1337
|
+
"type": "pushwoosh.aibuilder.v1.AiBuilderDocument"
|
|
1338
|
+
},
|
|
1339
|
+
"warnings": {
|
|
1340
|
+
"type": "string",
|
|
1341
|
+
"array": true
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1296
1345
|
"pushwoosh.accounts.assistant.v1.Role": {
|
|
1297
1346
|
"type": "E",
|
|
1298
1347
|
"values": [
|
|
@@ -1873,7 +1922,7 @@ export const data = {
|
|
|
1873
1922
|
"optional": true
|
|
1874
1923
|
},
|
|
1875
1924
|
"template": {
|
|
1876
|
-
"type": "
|
|
1925
|
+
"type": "object"
|
|
1877
1926
|
},
|
|
1878
1927
|
"categories": {
|
|
1879
1928
|
"type": "string",
|
|
@@ -2008,7 +2057,7 @@ export const data = {
|
|
|
2008
2057
|
"optional": true
|
|
2009
2058
|
},
|
|
2010
2059
|
"template": {
|
|
2011
|
-
"type": "
|
|
2060
|
+
"type": "object"
|
|
2012
2061
|
},
|
|
2013
2062
|
"categories": {
|
|
2014
2063
|
"type": "string",
|
|
@@ -2042,7 +2091,7 @@ export const data = {
|
|
|
2042
2091
|
"optional": true
|
|
2043
2092
|
},
|
|
2044
2093
|
"template": {
|
|
2045
|
-
"type": "
|
|
2094
|
+
"type": "object"
|
|
2046
2095
|
},
|
|
2047
2096
|
"updateCategories": {
|
|
2048
2097
|
"type": "boolean"
|
|
@@ -2608,7 +2657,8 @@ export const data = {
|
|
|
2608
2657
|
"type": "I",
|
|
2609
2658
|
"fields": {
|
|
2610
2659
|
"image": {
|
|
2611
|
-
"type": "pushwoosh.vibeml.v1.VibeReferenceImage"
|
|
2660
|
+
"type": "pushwoosh.vibeml.v1.VibeReferenceImage",
|
|
2661
|
+
"optional": true
|
|
2612
2662
|
},
|
|
2613
2663
|
"application": {
|
|
2614
2664
|
"type": "string"
|
|
@@ -2619,6 +2669,13 @@ export const data = {
|
|
|
2619
2669
|
"llmModel": {
|
|
2620
2670
|
"type": "string",
|
|
2621
2671
|
"optional": true
|
|
2672
|
+
},
|
|
2673
|
+
"sources": {
|
|
2674
|
+
"type": "pushwoosh.vibeml.v1.VibeSource",
|
|
2675
|
+
"array": true
|
|
2676
|
+
},
|
|
2677
|
+
"description": {
|
|
2678
|
+
"type": "string"
|
|
2622
2679
|
}
|
|
2623
2680
|
}
|
|
2624
2681
|
},
|
package/package.json
CHANGED
|
@@ -364,6 +364,15 @@ export type ContentItem_item_list = {
|
|
|
364
364
|
};
|
|
365
365
|
export type ContentItem_item = ContentItem_item_text | ContentItem_item_buttonGroup | ContentItem_item_list;
|
|
366
366
|
export type ContentItem = {
|
|
367
|
+
/**
|
|
368
|
+
* Client-managed margin around this single item (outer box of the
|
|
369
|
+
* element, CSS margin semantics). Unset = the client applies its default
|
|
370
|
+
* inter-item gap; set (even to zeros) = the client uses exactly this and
|
|
371
|
+
* skips the default gap. Written by importers (e.g. the Unlayer
|
|
372
|
+
* converter maps each widget's containerPadding here) and by the editor;
|
|
373
|
+
* never exposed to the LLM, round-tripped verbatim by the backend.
|
|
374
|
+
*/
|
|
375
|
+
margin?: EdgeInsets;
|
|
367
376
|
item: ContentItem_item;
|
|
368
377
|
};
|
|
369
378
|
export type Content = {
|
|
@@ -389,6 +398,14 @@ export type Image = {
|
|
|
389
398
|
mediaUuid: string;
|
|
390
399
|
origWidth: number;
|
|
391
400
|
origHeight: number;
|
|
401
|
+
/**
|
|
402
|
+
* Client-managed outer margin of the image within its slot (card TOP
|
|
403
|
+
* image, column image). Same semantics as ContentItem.margin: written by
|
|
404
|
+
* importers / the editor, never exposed to the LLM, round-tripped
|
|
405
|
+
* verbatim. Layouts without a discrete image box (BACKGROUND, LEFT/RIGHT
|
|
406
|
+
* fills) may ignore it.
|
|
407
|
+
*/
|
|
408
|
+
margin?: EdgeInsets;
|
|
392
409
|
};
|
|
393
410
|
export type AiBuilderCard = {
|
|
394
411
|
layout: CardLayout;
|
package/pushwoosh_aigen_v1.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { TextVariantStyle as pushwoosh_aibuilder_v1_TextVariantStyle } from './p
|
|
|
5
5
|
import { ColorSchemeItem as pushwoosh_aibuilder_v1_ColorSchemeItem } from './pushwoosh_aibuilder_v1';
|
|
6
6
|
import { AiBuilderBlock as pushwoosh_aibuilder_v1_AiBuilderBlock } from './pushwoosh_aibuilder_v1';
|
|
7
7
|
export type AiGenService_ExtractStyle = RpcMethod<AiGenExtractStyleRequest, AiGenExtractStyleResponse>;
|
|
8
|
+
export type AiGenService_ConvertUnlayer = RpcMethod<AiGenConvertUnlayerRequest, AiGenConvertUnlayerResponse>;
|
|
8
9
|
/**
|
|
9
10
|
* AiGenService unifies document create / edit / per-block regeneration and
|
|
10
11
|
* targeted block insertion into a single streaming RPC. Dispatch rules:
|
|
@@ -58,6 +59,20 @@ export interface AiGenService {
|
|
|
58
59
|
* design screenshot. Unary; the result is small.
|
|
59
60
|
*/
|
|
60
61
|
ExtractStyle: AiGenService_ExtractStyle;
|
|
62
|
+
/**
|
|
63
|
+
* ConvertUnlayer deterministically converts an Unlayer email-template
|
|
64
|
+
* design (the `editorConfig` JSON stored in EmailContent.Unlayer) into
|
|
65
|
+
* an AiBuilderDocument, so templates built in the Unlayer block editor
|
|
66
|
+
* can be opened in the AI builder. No LLM involved — the mapping is
|
|
67
|
+
* pure and repeatable, and the same call can back a bulk migration.
|
|
68
|
+
*
|
|
69
|
+
* Unlayer widgets with no AiBuilderDocument equivalent (countdown
|
|
70
|
+
* timers, custom tools, raw HTML) become Placeholder blocks the AI can
|
|
71
|
+
* materialise on a follow-up edit; every such lossy step is reported
|
|
72
|
+
* in `warnings`. The returned document always passes the EMAIL-mode
|
|
73
|
+
* document validation. Unary; the result is document-sized.
|
|
74
|
+
*/
|
|
75
|
+
ConvertUnlayer: AiGenService_ConvertUnlayer;
|
|
61
76
|
}
|
|
62
77
|
export type AiGenBlockTypeHint = 'AI_GEN_BLOCK_TYPE_HINT_UNSPECIFIED' | 'AI_GEN_BLOCK_TYPE_HINT_CARD' | 'AI_GEN_BLOCK_TYPE_HINT_COLUMNS'
|
|
63
78
|
/** Top-level free-form Content block. Allowed in WEB_POPUP only. */
|
|
@@ -535,3 +550,54 @@ export type AiGenExtractStyleResponse = {
|
|
|
535
550
|
*/
|
|
536
551
|
typographyNotes: string;
|
|
537
552
|
};
|
|
553
|
+
export type AiGenConvertUnlayerRequest = {
|
|
554
|
+
/**
|
|
555
|
+
* The Unlayer design JSON (EmailContent.Unlayer.editor_config): the
|
|
556
|
+
* object carrying body.rows[].columns[].contents[]. Required.
|
|
557
|
+
*/
|
|
558
|
+
editorConfig: object;
|
|
559
|
+
/**
|
|
560
|
+
* Unlayer localization placeholders. Accepts either the per-language
|
|
561
|
+
* map {"<lang>": {"<path>": "<value>"}} stored alongside the design in
|
|
562
|
+
* EmailContent.Unlayer.localization_data, or an already-flat
|
|
563
|
+
* {"<path>": "<value>"} map. Values are substituted into the design's
|
|
564
|
+
* {{path|type|fallback}} tokens during conversion. Optional — without
|
|
565
|
+
* it tokens resolve to their inline fallbacks.
|
|
566
|
+
*/
|
|
567
|
+
localizationData: object;
|
|
568
|
+
/**
|
|
569
|
+
* Language key to resolve localized values with when localization_data
|
|
570
|
+
* is per-language. Empty → "default", falling back to the first
|
|
571
|
+
* language present.
|
|
572
|
+
*/
|
|
573
|
+
language: string;
|
|
574
|
+
/**
|
|
575
|
+
* Application code. Required by the server's application-scoping
|
|
576
|
+
* middleware (same as the other AiGen RPCs); the converter itself does
|
|
577
|
+
* not use it.
|
|
578
|
+
*/
|
|
579
|
+
application: string;
|
|
580
|
+
/**
|
|
581
|
+
* Optional document metadata carried into the result verbatim: the
|
|
582
|
+
* template name (Meta.template_name) and the email subject
|
|
583
|
+
* (EmailSettings.subject). Both live outside editor_config on the
|
|
584
|
+
* stored EmailTemplate, so the caller supplies them.
|
|
585
|
+
*/
|
|
586
|
+
templateName: string;
|
|
587
|
+
subject: string;
|
|
588
|
+
};
|
|
589
|
+
export type AiGenConvertUnlayerResponse = {
|
|
590
|
+
/**
|
|
591
|
+
* The converted document. Complete and EMAIL-mode valid; block ids are
|
|
592
|
+
* deterministic ("u<row>-<n>") so repeated conversions of the same
|
|
593
|
+
* design yield the same document.
|
|
594
|
+
*/
|
|
595
|
+
document: pushwoosh_aibuilder_v1_AiBuilderDocument;
|
|
596
|
+
/**
|
|
597
|
+
* Human-readable notes about content that could not be mapped 1:1 —
|
|
598
|
+
* unsupported widgets replaced with placeholders, dropped image links,
|
|
599
|
+
* per-column backgrounds, and similar. Order follows document order.
|
|
600
|
+
* Empty when the conversion was lossless.
|
|
601
|
+
*/
|
|
602
|
+
warnings: string[];
|
|
603
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RpcMethod
|
|
1
|
+
import { RpcMethod } from './commonTypes';
|
|
2
2
|
export type TemplatesService_List = RpcMethod<ListRequest, ListResponse>;
|
|
3
3
|
export type TemplatesService_Get = RpcMethod<GetRequest, GetResponse>;
|
|
4
4
|
export type TemplatesService_Create = RpcMethod<CreateRequest, CreateResponse>;
|
|
@@ -46,7 +46,7 @@ export type Template = {
|
|
|
46
46
|
* The template document itself: any valid JSON object, opaque to this
|
|
47
47
|
* service.
|
|
48
48
|
*/
|
|
49
|
-
template:
|
|
49
|
+
template: object;
|
|
50
50
|
/** Category tags attached to this template. Order is not significant. */
|
|
51
51
|
categories: string[];
|
|
52
52
|
/** Creation timestamp. */
|
|
@@ -113,7 +113,7 @@ export type CreateRequest = {
|
|
|
113
113
|
/** Optional free-form description. */
|
|
114
114
|
description?: string;
|
|
115
115
|
/** The template document: any valid JSON object. */
|
|
116
|
-
template:
|
|
116
|
+
template: object;
|
|
117
117
|
/** Category tags to attach. May be empty. */
|
|
118
118
|
categories: string[];
|
|
119
119
|
};
|
|
@@ -134,7 +134,7 @@ export type UpdateRequest = {
|
|
|
134
134
|
* New template document (any valid JSON object). Only applied when set
|
|
135
135
|
* (message presence).
|
|
136
136
|
*/
|
|
137
|
-
template:
|
|
137
|
+
template: object;
|
|
138
138
|
/**
|
|
139
139
|
* Controls how categories is applied (PATCH semantics):
|
|
140
140
|
* - true → replace categories with the provided list
|
package/pushwoosh_vibeml_v1.d.ts
CHANGED
|
@@ -411,20 +411,24 @@ export interface VibeMlService {
|
|
|
411
411
|
*/
|
|
412
412
|
Restyle: VibeMlService_Restyle;
|
|
413
413
|
/**
|
|
414
|
-
* ExtractTheme samples a brand theme
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
414
|
+
* ExtractTheme samples a brand theme — the full role-keyed palette plus
|
|
415
|
+
* body/heading font stacks — from any mix of brand materials: an image, a
|
|
416
|
+
* brand-book PDF, HTML/markdown/text sources, and/or a written brand
|
|
417
|
+
* description. At least one input (image, source or description) is
|
|
418
|
+
* required; any combination is allowed — files with a description, files
|
|
419
|
+
* alone, or a description alone. Returned as a VibeTheme ready to seed a
|
|
420
|
+
* Generate request. Pure extractor — materials in, theme out, no document.
|
|
418
421
|
*
|
|
419
422
|
* The model MUST return every palette role (background, surface, text,
|
|
420
423
|
* text-secondary, accent, text-on-accent, border, link) and both font
|
|
421
|
-
* families — even when the
|
|
424
|
+
* families — even when the materials give no clear typographic signal it
|
|
422
425
|
* picks reasonable stacks rather than leaving them empty.
|
|
423
426
|
*
|
|
424
|
-
*
|
|
425
|
-
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
427
|
+
* When an image is attached the chosen model must be vision-capable; a
|
|
428
|
+
* PDF source requires a document-capable provider (claude/openai/gemini).
|
|
429
|
+
* Since llm_model is a client override and capability can't be derived
|
|
430
|
+
* from a model name, there is no up-front vision check: a non-vision
|
|
431
|
+
* model fails at the upstream call. Unary; the result is small.
|
|
428
432
|
*/
|
|
429
433
|
ExtractTheme: VibeMlService_ExtractTheme;
|
|
430
434
|
}
|
|
@@ -596,18 +600,31 @@ export type VibeReferenceImage = {
|
|
|
596
600
|
};
|
|
597
601
|
export type VibeMlExtractThemeRequest = {
|
|
598
602
|
/**
|
|
599
|
-
*
|
|
600
|
-
* be
|
|
603
|
+
* An image to sample the theme from (screenshot, logo, moodboard).
|
|
604
|
+
* Optional — one of image / sources / description must be present. When
|
|
605
|
+
* set, the selected model must be vision-capable.
|
|
601
606
|
*/
|
|
602
|
-
image
|
|
607
|
+
image?: VibeReferenceImage;
|
|
603
608
|
/** Application code, for account/app scoping middleware and logging. */
|
|
604
609
|
application: string;
|
|
605
610
|
/**
|
|
606
611
|
* Provider/model, same semantics as on Generate: llm_provider is
|
|
607
|
-
* REQUIRED, llm_model optional.
|
|
612
|
+
* REQUIRED, llm_model optional.
|
|
608
613
|
*/
|
|
609
614
|
llmProvider: string;
|
|
610
615
|
llmModel?: string;
|
|
616
|
+
/**
|
|
617
|
+
* Brand materials to sample the theme from: a brand-book PDF, an HTML
|
|
618
|
+
* page, markdown or plain text. Same shape, formats and limits as
|
|
619
|
+
* Generate's sources (PDF needs a document-capable provider). Optional.
|
|
620
|
+
*/
|
|
621
|
+
sources: VibeSource[];
|
|
622
|
+
/**
|
|
623
|
+
* A written brand description ("dark green, minimalist, premium outdoor
|
|
624
|
+
* brand") the model derives the palette from. Optional; may accompany or
|
|
625
|
+
* replace the image/sources.
|
|
626
|
+
*/
|
|
627
|
+
description: string;
|
|
611
628
|
};
|
|
612
629
|
export type VibeMlExtractThemeResponse = {
|
|
613
630
|
/**
|