@pushwoosh/rpc-gateway-ai-assistant 0.1.239 → 0.1.241

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/data.js CHANGED
@@ -116,6 +116,10 @@ export const data = {
116
116
  "color": {
117
117
  "type": "string",
118
118
  "optional": true
119
+ },
120
+ "letterSpacing": {
121
+ "type": "number",
122
+ "optional": true
119
123
  }
120
124
  }
121
125
  },
@@ -364,6 +368,10 @@ export const data = {
364
368
  },
365
369
  "mobileAlign": {
366
370
  "type": "pushwoosh.aibuilder.v1.TextAlign"
371
+ },
372
+ "letterSpacing": {
373
+ "type": "number",
374
+ "optional": true
367
375
  }
368
376
  }
369
377
  },
@@ -1406,6 +1414,30 @@ export const data = {
1406
1414
  "response": "pushwoosh.aigen.v1.AiGenConvertUnlayerResponse",
1407
1415
  "method": "post",
1408
1416
  "path": "/api/v1/aigen/convert-unlayer"
1417
+ },
1418
+ "GenerateMediaImage": {
1419
+ "request": "pushwoosh.aigen.v1.AiGenMediaImageRequest",
1420
+ "response": "pushwoosh.aigen.v1.AiGenMediaImageResponse",
1421
+ "method": "post",
1422
+ "path": "/api/v1/aigen/media-image"
1423
+ },
1424
+ "SearchStockPhotos": {
1425
+ "request": "pushwoosh.aigen.v1.AiGenStockSearchRequest",
1426
+ "response": "pushwoosh.aigen.v1.AiGenStockSearchResponse",
1427
+ "method": "post",
1428
+ "path": "/api/v1/aigen/stock-search"
1429
+ },
1430
+ "ImportStockPhoto": {
1431
+ "request": "pushwoosh.aigen.v1.AiGenStockImportRequest",
1432
+ "response": "pushwoosh.aigen.v1.AiGenStockImportResponse",
1433
+ "method": "post",
1434
+ "path": "/api/v1/aigen/stock-import"
1435
+ },
1436
+ "GenerateImageAlt": {
1437
+ "request": "pushwoosh.aigen.v1.AiGenImageAltRequest",
1438
+ "response": "pushwoosh.aigen.v1.AiGenImageAltResponse",
1439
+ "method": "post",
1440
+ "path": "/api/v1/aigen/image-alt"
1409
1441
  }
1410
1442
  }
1411
1443
  },
@@ -1874,6 +1906,172 @@ export const data = {
1874
1906
  }
1875
1907
  }
1876
1908
  },
1909
+ "pushwoosh.aigen.v1.AiGenMediaImageRequest": {
1910
+ "type": "I",
1911
+ "fields": {
1912
+ "application": {
1913
+ "type": "string"
1914
+ },
1915
+ "prompt": {
1916
+ "type": "string"
1917
+ },
1918
+ "aspectRatio": {
1919
+ "type": "string"
1920
+ }
1921
+ }
1922
+ },
1923
+ "pushwoosh.aigen.v1.AiGenMediaImageResponse": {
1924
+ "type": "I",
1925
+ "fields": {
1926
+ "url": {
1927
+ "type": "string"
1928
+ },
1929
+ "mediaUuid": {
1930
+ "type": "string"
1931
+ },
1932
+ "width": {
1933
+ "type": "number"
1934
+ },
1935
+ "height": {
1936
+ "type": "number"
1937
+ }
1938
+ }
1939
+ },
1940
+ "pushwoosh.aigen.v1.StockProvider": {
1941
+ "type": "E",
1942
+ "values": [
1943
+ "STOCK_PROVIDER_UNSPECIFIED",
1944
+ "STOCK_PROVIDER_PEXELS"
1945
+ ]
1946
+ },
1947
+ "pushwoosh.aigen.v1.AiGenStockSearchRequest": {
1948
+ "type": "I",
1949
+ "fields": {
1950
+ "application": {
1951
+ "type": "string"
1952
+ },
1953
+ "query": {
1954
+ "type": "string"
1955
+ },
1956
+ "page": {
1957
+ "type": "number"
1958
+ },
1959
+ "provider": {
1960
+ "type": "pushwoosh.aigen.v1.StockProvider"
1961
+ }
1962
+ }
1963
+ },
1964
+ "pushwoosh.aigen.v1.StockPhoto": {
1965
+ "type": "I",
1966
+ "fields": {
1967
+ "id": {
1968
+ "type": "string"
1969
+ },
1970
+ "thumbUrl": {
1971
+ "type": "string"
1972
+ },
1973
+ "width": {
1974
+ "type": "number"
1975
+ },
1976
+ "height": {
1977
+ "type": "number"
1978
+ },
1979
+ "photographer": {
1980
+ "type": "string"
1981
+ },
1982
+ "photographerUrl": {
1983
+ "type": "string"
1984
+ },
1985
+ "avgColor": {
1986
+ "type": "string"
1987
+ },
1988
+ "alt": {
1989
+ "type": "string"
1990
+ }
1991
+ }
1992
+ },
1993
+ "pushwoosh.aigen.v1.AiGenStockSearchResponse": {
1994
+ "type": "I",
1995
+ "fields": {
1996
+ "photos": {
1997
+ "type": "pushwoosh.aigen.v1.StockPhoto",
1998
+ "array": true
1999
+ },
2000
+ "total": {
2001
+ "type": "number"
2002
+ },
2003
+ "page": {
2004
+ "type": "number"
2005
+ },
2006
+ "provider": {
2007
+ "type": "pushwoosh.aigen.v1.StockProvider"
2008
+ }
2009
+ }
2010
+ },
2011
+ "pushwoosh.aigen.v1.AiGenStockImportRequest": {
2012
+ "type": "I",
2013
+ "fields": {
2014
+ "application": {
2015
+ "type": "string"
2016
+ },
2017
+ "provider": {
2018
+ "type": "pushwoosh.aigen.v1.StockProvider"
2019
+ },
2020
+ "photoId": {
2021
+ "type": "string"
2022
+ }
2023
+ }
2024
+ },
2025
+ "pushwoosh.aigen.v1.AiGenStockImportResponse": {
2026
+ "type": "I",
2027
+ "fields": {
2028
+ "url": {
2029
+ "type": "string"
2030
+ },
2031
+ "mediaUuid": {
2032
+ "type": "string"
2033
+ },
2034
+ "width": {
2035
+ "type": "number"
2036
+ },
2037
+ "height": {
2038
+ "type": "number"
2039
+ },
2040
+ "alt": {
2041
+ "type": "string"
2042
+ }
2043
+ }
2044
+ },
2045
+ "pushwoosh.aigen.v1.AiGenImageAltRequest": {
2046
+ "type": "I",
2047
+ "fields": {
2048
+ "application": {
2049
+ "type": "string"
2050
+ },
2051
+ "imageUrl": {
2052
+ "type": "string"
2053
+ },
2054
+ "llmProvider": {
2055
+ "type": "string",
2056
+ "optional": true
2057
+ },
2058
+ "llmModel": {
2059
+ "type": "string",
2060
+ "optional": true
2061
+ },
2062
+ "language": {
2063
+ "type": "string"
2064
+ }
2065
+ }
2066
+ },
2067
+ "pushwoosh.aigen.v1.AiGenImageAltResponse": {
2068
+ "type": "I",
2069
+ "fields": {
2070
+ "alt": {
2071
+ "type": "string"
2072
+ }
2073
+ }
2074
+ },
1877
2075
  "pushwoosh.accounts.assistant.v1.Role": {
1878
2076
  "type": "E",
1879
2077
  "values": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-gateway-ai-assistant",
3
- "version": "0.1.239",
3
+ "version": "0.1.241",
4
4
  "description": "AI Assistant api gateway HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -167,6 +167,12 @@ export type TextVariantStyle = {
167
167
  * variant colours are user preferences, round-tripped verbatim.
168
168
  */
169
169
  color?: string;
170
+ /**
171
+ * Letter spacing (CSS letter-spacing) in px; fractional and negative
172
+ * values are meaningful ("-0.2" tightens display type). Unset = normal.
173
+ * Client-managed typography, round-tripped verbatim like font_family.
174
+ */
175
+ letterSpacing?: number;
170
176
  };
171
177
  export type ColorSchemeItem = {
172
178
  color: string;
@@ -408,6 +414,12 @@ export type TextBlock = {
408
414
  mobileFontSize?: number;
409
415
  /** Mobile alignment override. UNSPECIFIED = inherit `align` (explicit LEFT survives). Client-managed. */
410
416
  mobileAlign: TextAlign;
417
+ /**
418
+ * Per-item letter-spacing override in px (fractional/negative meaningful;
419
+ * explicit 0 = "normal", overriding a variant's tracking). Unset = inherit
420
+ * TextVariantStyle.letter_spacing. Client-managed, like font_size.
421
+ */
422
+ letterSpacing?: number;
411
423
  };
412
424
  export type ButtonActionHref = {
413
425
  url: string;
@@ -6,6 +6,10 @@ import { ColorSchemeItem as pushwoosh_aibuilder_v1_ColorSchemeItem } from './pus
6
6
  import { AiBuilderBlock as pushwoosh_aibuilder_v1_AiBuilderBlock } from './pushwoosh_aibuilder_v1';
7
7
  export type AiGenService_ExtractStyle = RpcMethod<AiGenExtractStyleRequest, AiGenExtractStyleResponse>;
8
8
  export type AiGenService_ConvertUnlayer = RpcMethod<AiGenConvertUnlayerRequest, AiGenConvertUnlayerResponse>;
9
+ export type AiGenService_GenerateMediaImage = RpcMethod<AiGenMediaImageRequest, AiGenMediaImageResponse>;
10
+ export type AiGenService_SearchStockPhotos = RpcMethod<AiGenStockSearchRequest, AiGenStockSearchResponse>;
11
+ export type AiGenService_ImportStockPhoto = RpcMethod<AiGenStockImportRequest, AiGenStockImportResponse>;
12
+ export type AiGenService_GenerateImageAlt = RpcMethod<AiGenImageAltRequest, AiGenImageAltResponse>;
9
13
  /**
10
14
  * AiGenService unifies document create / edit / per-block regeneration and
11
15
  * targeted block insertion into a single streaming RPC. Dispatch rules:
@@ -73,6 +77,34 @@ export interface AiGenService {
73
77
  * document validation. Unary; the result is document-sized.
74
78
  */
75
79
  ConvertUnlayer: AiGenService_ConvertUnlayer;
80
+ /**
81
+ * GenerateMediaImage generates ONE image from a prompt and stores it in
82
+ * the application's media library — the media-gallery "Generate" tab.
83
+ * Same generator the streaming pipeline uses (Gemini image model, cheap
84
+ * quality tier); the response carries the stored file's URL and uuid,
85
+ * ready to insert as ContentImage.src / media_uuid.
86
+ */
87
+ GenerateMediaImage: AiGenService_GenerateMediaImage;
88
+ /**
89
+ * SearchStockPhotos proxies a stock-photo search (Pexels) — the API key
90
+ * stays server-side and the browser never talks to the provider. Results
91
+ * are preview-only: thumbnails for the picker plus the attribution the
92
+ * provider requires. Inserting a photo goes through ImportStockPhoto.
93
+ */
94
+ SearchStockPhotos: AiGenService_SearchStockPhotos;
95
+ /**
96
+ * ImportStockPhoto copies one stock photo into the application's media
97
+ * library: the server resolves the photo by id at the provider, downloads
98
+ * the bytes itself (never a client-supplied URL — SSRF stays impossible)
99
+ * and uploads them to media storage with a provenance description.
100
+ */
101
+ ImportStockPhoto: AiGenService_ImportStockPhoto;
102
+ /**
103
+ * GenerateImageAlt writes alt text for an existing image: the server
104
+ * fetches the image (media-library / stock hosts only), shows it to a
105
+ * vision-capable model and returns one concise accessibility-grade alt.
106
+ */
107
+ GenerateImageAlt: AiGenService_GenerateImageAlt;
76
108
  }
77
109
  export type AiGenBlockTypeHint = 'AI_GEN_BLOCK_TYPE_HINT_UNSPECIFIED' | 'AI_GEN_BLOCK_TYPE_HINT_CARD' | 'AI_GEN_BLOCK_TYPE_HINT_COLUMNS'
78
110
  /** Top-level free-form Content block. Allowed in WEB_POPUP only. */
@@ -621,3 +653,90 @@ export type AiGenConvertUnlayerResponse = {
621
653
  */
622
654
  warnings: string[];
623
655
  };
656
+ export type AiGenMediaImageRequest = {
657
+ application: string;
658
+ /** Image generation prompt; required, capped server-side. */
659
+ prompt: string;
660
+ /**
661
+ * Gemini ImageConfig aspect ratio ("1:1", "16:9", "21:9", "3:4", ...).
662
+ * Empty = the generator default.
663
+ */
664
+ aspectRatio: string;
665
+ };
666
+ export type AiGenMediaImageResponse = {
667
+ /** The stored media file, ready for ContentImage.src / media_uuid. */
668
+ url: string;
669
+ mediaUuid: string;
670
+ width: number;
671
+ height: number;
672
+ };
673
+ /**
674
+ * StockProvider names the upstream catalog. Only Pexels for now; the enum
675
+ * exists so a second provider (Pixabay) is a value, not a schema break.
676
+ */
677
+ export type StockProvider =
678
+ /** treated as PEXELS */
679
+ 'STOCK_PROVIDER_UNSPECIFIED' | 'STOCK_PROVIDER_PEXELS';
680
+ export type AiGenStockSearchRequest = {
681
+ application: string;
682
+ query: string;
683
+ /** 1-based page, provider-side pagination; 0 = first page. */
684
+ page: number;
685
+ provider: StockProvider;
686
+ };
687
+ /**
688
+ * One search hit: enough for the picker tile + the provider's required
689
+ * attribution. No full-size URLs — the import round-trips by id.
690
+ */
691
+ export type StockPhoto = {
692
+ id: string;
693
+ /** Preview for the picker grid (provider CDN, display-only). */
694
+ thumbUrl: string;
695
+ width: number;
696
+ height: number;
697
+ photographer: string;
698
+ /** Photographer / photo page at the provider — the attribution link. */
699
+ photographerUrl: string;
700
+ /** Average color for grid placeholders ("#aabbcc"); may be empty. */
701
+ avgColor: string;
702
+ alt: string;
703
+ };
704
+ export type AiGenStockSearchResponse = {
705
+ photos: StockPhoto[];
706
+ total: number;
707
+ page: number;
708
+ provider: StockProvider;
709
+ };
710
+ export type AiGenStockImportRequest = {
711
+ application: string;
712
+ provider: StockProvider;
713
+ /** Provider photo id from a SearchStockPhotos hit. */
714
+ photoId: string;
715
+ };
716
+ export type AiGenStockImportResponse = {
717
+ url: string;
718
+ mediaUuid: string;
719
+ width: number;
720
+ height: number;
721
+ /** Alt suggested by the provider's metadata; may be empty. */
722
+ alt: string;
723
+ };
724
+ export type AiGenImageAltRequest = {
725
+ application: string;
726
+ /**
727
+ * Image to describe. Must live on an allowlisted host (the application's
728
+ * media storage or a stock CDN) — the server refuses to fetch elsewhere.
729
+ */
730
+ imageUrl: string;
731
+ /** Dev-only LLM override, same semantics as AiGenRequest.llm_provider. */
732
+ llmProvider?: string;
733
+ llmModel?: string;
734
+ /**
735
+ * Optional language for the alt text (ISO code); empty = the image's
736
+ * dominant/default language, typically English.
737
+ */
738
+ language: string;
739
+ };
740
+ export type AiGenImageAltResponse = {
741
+ alt: string;
742
+ };