@posiwise/app-config-service 0.0.106 → 0.0.109

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.
@@ -1,347 +1,378 @@
1
- import * as rxjs from 'rxjs';
2
- import { BehaviorSubject } from 'rxjs';
3
- import { HttpClient } from '@angular/common/http';
4
- import { Router } from '@angular/router';
5
- import * as i0 from '@angular/core';
6
-
1
+ import { HttpClient } from "@angular/common/http";
2
+ import { Router } from "@angular/router";
3
+ import { BehaviorSubject } from "rxjs";
4
+ import * as i0 from "@angular/core";
5
+ import { InjectionToken } from "@angular/core";
7
6
  interface Company {
8
- logos?: {
9
- main?: {
10
- url?: string;
11
- };
7
+ logos?: {
8
+ main?: {
9
+ url?: string;
12
10
  };
13
- name?: string;
14
- number?: string;
15
- state?: string;
16
- street?: string;
17
- email?: string;
18
- city?: string;
19
- city_code?: string;
11
+ };
12
+ name?: string;
13
+ number?: string;
14
+ state?: string;
15
+ street?: string;
16
+ email?: string;
17
+ support_email?: string;
18
+ city?: string;
19
+ city_code?: string;
20
20
  }
21
21
  interface ColorCodes {
22
- titles?: string;
23
- first?: string;
24
- text?: string;
25
- dashboard_bg?: string;
22
+ titles?: string;
23
+ first?: string;
24
+ text?: string;
25
+ dashboard_bg?: string;
26
26
  }
27
27
  interface Links {
28
- integrations_api?: string;
29
- frontend_link?: string;
30
- socket_link?: string;
31
- main_api?: string;
32
- products_api?: string;
33
- brain_api?: string;
34
- cloudolive_api?: string;
35
- /**
36
- * Dedicated WebSocket host for the Brain chat push socket (ticket #45).
37
- * Browsers open the WS here; serves /brain-api/v1/ws on an internet-facing
38
- * ALB. Distinct from the api-gateway-routed `brain_api` URL, which strips
39
- * the WebSocket `Upgrade` header. Surfaced from main-api as
40
- * `links.mcp_socket_link`, sourced from `endpoints.brain_api.websocket_url`.
41
- * e.g. `https://brain-api-websocket.dev.posiwise.com/brain-api/v1/`.
42
- * Null when brain-api WebSocket endpoint is not configured for the environment.
43
- */
44
- mcp_socket_link?: string | null;
45
- /** Null when Kinesis WebSocket is not configured for the environment. */
46
- kinesis_socket_link?: string | null;
47
- /**
48
- * Dedicated WebSocket host for the Voice Chat surface on posiwise-voice-api
49
- * (ticket #58). Browsers open the WS here; serves /voice-api/v1/converse on
50
- * an internet-facing ALB. Distinct from the api-gateway-routed `voice_api`
51
- * URL (when defined), which strips the WebSocket `Upgrade` header. Surfaced
52
- * from main-api as `links.voice_socket_link`, sourced from
53
- * `endpoints.voice_api.websocket_url` in the voice-api Vault config.
54
- * e.g. `https://voice-api-websocket.dev.posiwise.com/voice-api/v1/`.
55
- * Null when voice-api WebSocket endpoint is not configured for the env —
56
- * the Voice Chat button stays hidden client-side until this is set.
57
- */
58
- voice_socket_link?: string | null;
59
- [key: string]: string | null | undefined;
28
+ integrations_api?: string;
29
+ frontend_link?: string;
30
+ socket_link?: string;
31
+ main_api?: string;
32
+ products_api?: string;
33
+ brain_api?: string;
34
+ cloudolive_api?: string;
35
+ /**
36
+ * Dedicated WebSocket host for the Brain chat push socket (ticket #45).
37
+ * Browsers open the WS here; serves /brain-api/v1/ws on an internet-facing
38
+ * ALB. Distinct from the api-gateway-routed `brain_api` URL, which strips
39
+ * the WebSocket `Upgrade` header. Surfaced from main-api as
40
+ * `links.mcp_socket_link`, sourced from `endpoints.brain_api.websocket_url`.
41
+ * e.g. `https://brain-api-websocket.dev.posiwise.com/brain-api/v1/`.
42
+ * Null when brain-api WebSocket endpoint is not configured for the environment.
43
+ */
44
+ mcp_socket_link?: string | null;
45
+ /** Null when Kinesis WebSocket is not configured for the environment. */
46
+ kinesis_socket_link?: string | null;
47
+ /**
48
+ * Dedicated WebSocket host for the Voice Chat surface on posiwise-voice-api
49
+ * (ticket #58). Browsers open the WS here; serves /voice-api/v1/converse on
50
+ * an internet-facing ALB. Distinct from the api-gateway-routed `voice_api`
51
+ * URL (when defined), which strips the WebSocket `Upgrade` header. Surfaced
52
+ * from main-api as `links.voice_socket_link`, sourced from
53
+ * `endpoints.voice_api.websocket_url` in the voice-api Vault config.
54
+ * e.g. `https://voice-api-websocket.dev.posiwise.com/voice-api/v1/`.
55
+ * Null when voice-api WebSocket endpoint is not configured for the env —
56
+ * the Voice Chat button stays hidden client-side until this is set.
57
+ */
58
+ voice_socket_link?: string | null;
59
+ [key: string]: string | null | undefined;
60
60
  }
61
61
  interface Integrations {
62
- google_api_key: string;
63
- google_analytics?: string;
64
- sentry_config?: SentryConfig;
62
+ google_api_key: string;
63
+ google_analytics?: string;
64
+ sentry_config?: SentryConfig;
65
65
  }
66
66
  interface SentryConfig {
67
- dsn: string;
68
- environment?: string;
69
- [key: string]: unknown;
67
+ dsn: string;
68
+ environment?: string;
69
+ [key: string]: unknown;
70
70
  }
71
71
  interface DecryptedData {
72
- integrations: Integrations;
73
- social_login_enabled?: boolean;
74
- oauth_login?: unknown;
75
- company?: Company;
76
- color_codes?: ColorCodes;
77
- links?: Links;
78
- url?: string;
79
- host_name?: string;
72
+ integrations: Integrations;
73
+ social_login_enabled?: boolean;
74
+ oauth_login?: unknown;
75
+ company?: Company;
76
+ color_codes?: ColorCodes;
77
+ links?: Links;
78
+ url?: string;
79
+ host_name?: string;
80
+ }
81
+ interface ApiResponse {
82
+ type?: string;
83
+ integrations: {
84
+ google_api_key: string;
85
+ };
86
+ social_login_enabled: boolean;
87
+ oauth_login: {
88
+ clientId: string;
89
+ clientSecret?: string;
90
+ redirectUri: string;
91
+ scopes?: string[];
92
+ authorizationEndpoint: string;
93
+ tokenEndpoint?: string;
94
+ userInfoEndpoint?: string;
95
+ responseType: string;
96
+ grantType?: string;
97
+ state?: string;
98
+ } | null;
80
99
  }
81
-
82
- declare class AppConfigService {
83
- private readonly api;
84
- private readonly router;
85
- private decryptedData;
86
- private googleApiKey;
87
- protected appConfigSubject$: BehaviorSubject<DecryptedData>;
88
- appConfig$: rxjs.Observable<DecryptedData>;
89
- constructor(api: HttpClient, router: Router);
90
- load(environment: any): Promise<unknown>;
91
- getGoogleApiKey(): string;
92
- static ɵfac: i0.ɵɵFactoryDeclaration<AppConfigService, never>;
93
- static ɵprov: i0.ɵɵInjectableDeclaration<AppConfigService>;
100
+ export declare class AppConfigService {
101
+ private readonly api;
102
+ private readonly router;
103
+ private readonly platformId?;
104
+ private readonly serverConfig?;
105
+ private decryptedData;
106
+ private googleApiKey;
107
+ protected appConfigSubject$: BehaviorSubject<DecryptedData>;
108
+ appConfig$: import("rxjs").Observable<DecryptedData>;
109
+ constructor(api: HttpClient, router: Router, platformId?: object, serverConfig?: Partial<DecryptedData> | null);
110
+ load(environment: any): Promise<unknown>;
111
+ /** True on platform-server; also true where no window exists (e.g. a bare `new` in a spec). */
112
+ private isServerRender;
113
+ getGoogleApiKey(): string;
114
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppConfigService, [null, null, {
115
+ optional: true;
116
+ }, {
117
+ optional: true;
118
+ }]>;
119
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
94
120
  }
95
-
96
- declare class AppConfigServiceStub extends AppConfigService {
97
- commonConfigFields: {
121
+ export declare class AppConfigServiceStub extends AppConfigService {
122
+ commonConfigFields: {
123
+ join_message: any;
124
+ product_id: number;
125
+ image: {
126
+ url: string;
127
+ };
128
+ image2: {
129
+ url: string;
130
+ };
131
+ image_bg: {
132
+ url: string;
133
+ };
134
+ image_bg2: {
135
+ url: string;
136
+ };
137
+ video_url: string;
138
+ book_demo_url: any;
139
+ source_id: any;
140
+ pdf_source_id: any;
141
+ pdf_image: {
142
+ url: string;
143
+ };
144
+ pdf_download_text: string;
145
+ cta_iframe: string;
146
+ cs_cta_iframe: string;
147
+ trial_cta_iframe: string;
148
+ };
149
+ config: {
150
+ links: {
151
+ frontend_link: string;
152
+ socket_link: string;
153
+ main_api: string;
154
+ products_api: string;
155
+ integrations_api: string;
156
+ cloudolive_api: string;
157
+ mcp_socket_link: string;
158
+ };
159
+ url: string;
160
+ company: {
161
+ number: string;
162
+ name: string;
163
+ keywords: string;
164
+ street: string;
165
+ city: string;
166
+ city_code: string;
167
+ state: string;
168
+ phone_number: string;
169
+ description: string;
170
+ email: string;
171
+ website: string;
172
+ blog_product_key: string;
173
+ logos: {
174
+ header_squared_main: {
175
+ url: any;
176
+ version_200x200: {
177
+ url: any;
178
+ };
179
+ version_100x100: {
180
+ url: any;
181
+ };
182
+ version_50x50: {
183
+ url: any;
184
+ };
185
+ };
186
+ header_squared_dark: {
187
+ url: any;
188
+ version_200x200: {
189
+ url: any;
190
+ };
191
+ version_100x100: {
192
+ url: any;
193
+ };
194
+ version_50x50: {
195
+ url: any;
196
+ };
197
+ };
198
+ header_squared_contrast: {
199
+ url: any;
200
+ version_200x200: {
201
+ url: any;
202
+ };
203
+ version_100x100: {
204
+ url: any;
205
+ };
206
+ version_50x50: {
207
+ url: any;
208
+ };
209
+ };
210
+ main: {
211
+ url: string;
212
+ };
213
+ main_dark: {
214
+ url: string;
215
+ version_100x100: {
216
+ url: string;
217
+ };
218
+ };
219
+ main_contrast: {
220
+ url: string;
221
+ };
222
+ };
223
+ };
224
+ main_app_title: string;
225
+ favicon_path: string;
226
+ twitter_seo: {
227
+ card: string;
228
+ site: string;
229
+ creator: string;
230
+ };
231
+ color_codes: {
232
+ first: string;
233
+ second: string;
234
+ third: string;
235
+ titles: string;
236
+ text: string;
237
+ tabs_bg: string;
238
+ tabs_text: string;
239
+ sidebar_bg: string;
240
+ sidebar_text: string;
241
+ };
242
+ social: {
243
+ linkedin_url: string;
244
+ twitter_url: string;
245
+ facebook_url: string;
246
+ youtube_url: string;
247
+ };
248
+ can_register_through_main_page: boolean;
249
+ is_product_domain: boolean;
250
+ social_login_enabled: boolean;
251
+ main_tos_id: number;
252
+ crm: {
253
+ subscription_id: number;
254
+ source_id: number;
255
+ product_id: number;
256
+ };
257
+ master_subscription: {
258
+ subscription_id: number;
259
+ product_id: number;
260
+ };
261
+ signup_config: {
262
+ coming_soon: {
98
263
  join_message: any;
99
264
  product_id: number;
100
265
  image: {
101
- url: string;
266
+ url: string;
102
267
  };
103
268
  image2: {
104
- url: string;
269
+ url: string;
105
270
  };
106
271
  image_bg: {
107
- url: string;
272
+ url: string;
108
273
  };
109
274
  image_bg2: {
110
- url: string;
275
+ url: string;
111
276
  };
112
277
  video_url: string;
113
278
  book_demo_url: any;
114
279
  source_id: any;
115
280
  pdf_source_id: any;
116
281
  pdf_image: {
117
- url: string;
282
+ url: string;
118
283
  };
119
284
  pdf_download_text: string;
120
285
  cta_iframe: string;
121
286
  cs_cta_iframe: string;
122
287
  trial_cta_iframe: string;
123
- };
124
- config: {
125
- links: {
126
- frontend_link: string;
127
- socket_link: string;
128
- main_api: string;
129
- products_api: string;
130
- integrations_api: string;
131
- cloudolive_api: string;
132
- mcp_socket_link: string;
288
+ };
289
+ freemium: {
290
+ join_message: any;
291
+ product_id: number;
292
+ image: {
293
+ url: string;
133
294
  };
134
- url: string;
135
- company: {
136
- number: string;
137
- name: string;
138
- keywords: string;
139
- street: string;
140
- city: string;
141
- city_code: string;
142
- state: string;
143
- phone_number: string;
144
- description: string;
145
- email: string;
146
- website: string;
147
- blog_product_key: string;
148
- logos: {
149
- header_squared_main: {
150
- url: any;
151
- version_200x200: {
152
- url: any;
153
- };
154
- version_100x100: {
155
- url: any;
156
- };
157
- version_50x50: {
158
- url: any;
159
- };
160
- };
161
- header_squared_dark: {
162
- url: any;
163
- version_200x200: {
164
- url: any;
165
- };
166
- version_100x100: {
167
- url: any;
168
- };
169
- version_50x50: {
170
- url: any;
171
- };
172
- };
173
- header_squared_contrast: {
174
- url: any;
175
- version_200x200: {
176
- url: any;
177
- };
178
- version_100x100: {
179
- url: any;
180
- };
181
- version_50x50: {
182
- url: any;
183
- };
184
- };
185
- main: {
186
- url: string;
187
- };
188
- main_dark: {
189
- url: string;
190
- version_100x100: {
191
- url: string;
192
- };
193
- };
194
- main_contrast: {
195
- url: string;
196
- };
197
- };
295
+ image2: {
296
+ url: string;
198
297
  };
199
- main_app_title: string;
200
- favicon_path: string;
201
- twitter_seo: {
202
- card: string;
203
- site: string;
204
- creator: string;
298
+ image_bg: {
299
+ url: string;
205
300
  };
206
- color_codes: {
207
- first: string;
208
- second: string;
209
- third: string;
210
- titles: string;
211
- text: string;
212
- tabs_bg: string;
213
- tabs_text: string;
214
- sidebar_bg: string;
215
- sidebar_text: string;
301
+ image_bg2: {
302
+ url: string;
216
303
  };
217
- social: {
218
- linkedin_url: string;
219
- twitter_url: string;
220
- facebook_url: string;
221
- youtube_url: string;
304
+ video_url: string;
305
+ book_demo_url: any;
306
+ source_id: any;
307
+ pdf_source_id: any;
308
+ pdf_image: {
309
+ url: string;
222
310
  };
223
- can_register_through_main_page: boolean;
224
- is_product_domain: boolean;
225
- social_login_enabled: boolean;
226
- main_tos_id: number;
227
- crm: {
228
- subscription_id: number;
229
- source_id: number;
230
- product_id: number;
311
+ pdf_download_text: string;
312
+ cta_iframe: string;
313
+ cs_cta_iframe: string;
314
+ trial_cta_iframe: string;
315
+ };
316
+ trial: {
317
+ join_message: any;
318
+ product_id: number;
319
+ image: {
320
+ url: string;
231
321
  };
232
- master_subscription: {
233
- subscription_id: number;
234
- product_id: number;
322
+ image2: {
323
+ url: string;
235
324
  };
236
- signup_config: {
237
- coming_soon: {
238
- join_message: any;
239
- product_id: number;
240
- image: {
241
- url: string;
242
- };
243
- image2: {
244
- url: string;
245
- };
246
- image_bg: {
247
- url: string;
248
- };
249
- image_bg2: {
250
- url: string;
251
- };
252
- video_url: string;
253
- book_demo_url: any;
254
- source_id: any;
255
- pdf_source_id: any;
256
- pdf_image: {
257
- url: string;
258
- };
259
- pdf_download_text: string;
260
- cta_iframe: string;
261
- cs_cta_iframe: string;
262
- trial_cta_iframe: string;
263
- };
264
- freemium: {
265
- join_message: any;
266
- product_id: number;
267
- image: {
268
- url: string;
269
- };
270
- image2: {
271
- url: string;
272
- };
273
- image_bg: {
274
- url: string;
275
- };
276
- image_bg2: {
277
- url: string;
278
- };
279
- video_url: string;
280
- book_demo_url: any;
281
- source_id: any;
282
- pdf_source_id: any;
283
- pdf_image: {
284
- url: string;
285
- };
286
- pdf_download_text: string;
287
- cta_iframe: string;
288
- cs_cta_iframe: string;
289
- trial_cta_iframe: string;
290
- };
291
- trial: {
292
- join_message: any;
293
- product_id: number;
294
- image: {
295
- url: string;
296
- };
297
- image2: {
298
- url: string;
299
- };
300
- image_bg: {
301
- url: string;
302
- };
303
- image_bg2: {
304
- url: string;
305
- };
306
- video_url: string;
307
- book_demo_url: any;
308
- source_id: any;
309
- pdf_source_id: any;
310
- pdf_image: {
311
- url: string;
312
- };
313
- pdf_download_text: string;
314
- cta_iframe: string;
315
- cs_cta_iframe: string;
316
- trial_cta_iframe: string;
317
- };
325
+ image_bg: {
326
+ url: string;
318
327
  };
319
- integrations: {
320
- sentry_config: {
321
- dsn: string;
322
- };
323
- drift_code: string;
324
- fb_app_id: string;
325
- captcha_key: string;
326
- captcha_key_V2: string;
327
- google_analytics: string;
328
- google_api_key: string;
328
+ image_bg2: {
329
+ url: string;
329
330
  };
330
- oauth_login: {
331
- google: {
332
- client_id: string;
333
- };
334
- facebook: {
335
- client_id: string;
336
- };
337
- linkedin: {
338
- client_id: string;
339
- };
331
+ video_url: string;
332
+ book_demo_url: any;
333
+ source_id: any;
334
+ pdf_source_id: any;
335
+ pdf_image: {
336
+ url: string;
340
337
  };
338
+ pdf_download_text: string;
339
+ cta_iframe: string;
340
+ cs_cta_iframe: string;
341
+ trial_cta_iframe: string;
342
+ };
343
+ };
344
+ integrations: {
345
+ sentry_config: {
346
+ dsn: string;
347
+ };
348
+ drift_code: string;
349
+ fb_app_id: string;
350
+ captcha_key: string;
351
+ captcha_key_V2: string;
352
+ google_analytics: string;
353
+ google_api_key: string;
354
+ };
355
+ oauth_login: {
356
+ google: {
357
+ client_id: string;
358
+ };
359
+ facebook: {
360
+ client_id: string;
361
+ };
362
+ linkedin: {
363
+ client_id: string;
364
+ };
341
365
  };
342
- load(): Promise<unknown>;
343
- static ɵfac: i0.ɵɵFactoryDeclaration<AppConfigServiceStub, never>;
344
- static ɵprov: i0.ɵɵInjectableDeclaration<AppConfigServiceStub>;
366
+ };
367
+ load(): Promise<unknown>;
368
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppConfigServiceStub, never>;
369
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
345
370
  }
346
-
347
- export { AppConfigService, AppConfigServiceStub };
371
+ /**
372
+ * Domain metadata for a server render (SSR/prerender).
373
+ *
374
+ * In the browser, server_cicd.js delivers the config as an encrypted window.config.
375
+ * A server render has no window, so the renderer passes the same metadata here
376
+ * instead, as plain data that never leaves the build process.
377
+ */
378
+ export declare const SERVER_DOMAIN_CONFIG: InjectionToken<Partial<DecryptedData>>;