@snugdesk/whatsapp-widget 0.2.1 → 0.2.3

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.

Potentially problematic release.


This version of @snugdesk/whatsapp-widget might be problematic. Click here for more details.

package/index.d.ts CHANGED
@@ -153,24 +153,28 @@ type S3ObjectInput = {
153
153
  location: string;
154
154
  };
155
155
 
156
- interface AppSyncGraphqlConfig {
157
- endpoint: string;
158
- region: string;
156
+ interface AmplifyConfig {
157
+ aws_project_region: string;
158
+ aws_appsync_graphqlEndpoint: string;
159
+ aws_appsync_region: string;
160
+ aws_appsync_authenticationType: string;
161
+ aws_appsync_apiKey?: string;
159
162
  }
160
- declare const APPSYNC_GRAPHQL_CONFIG: InjectionToken<AppSyncGraphqlConfig>;
161
- declare function provideAppSyncConfig(config: AppSyncGraphqlConfig): ValueProvider;
163
+ declare const AMPLIFY_CONFIG: InjectionToken<AmplifyConfig>;
164
+ declare function provideAmplifyConfig(config: AmplifyConfig): ValueProvider;
162
165
  declare class AppSyncGraphqlService {
163
166
  private readonly authenticationService;
164
167
  private configured;
165
168
  private authMode;
166
- private readonly config;
167
- constructor(config: AppSyncGraphqlConfig | null, authenticationService: SnugdeskAuthenticationService);
169
+ private readonly amplifyConfig?;
170
+ constructor(amplifyConfig: AmplifyConfig | null, authenticationService: SnugdeskAuthenticationService);
168
171
  query<T>(statement: string, variables?: Record<string, unknown>): Promise<GraphQLResult<T>>;
169
172
  mutate<T>(statement: string, variables?: Record<string, unknown>): Promise<GraphQLResult<T>>;
170
173
  subscribe<T>(statement: string, variables?: Record<string, unknown>): Observable<GraphQLResult<T>>;
171
174
  private ensureConfigured;
172
175
  private getHostConfig;
173
176
  private normalizeAuthMode;
177
+ private getAuthModeFromConfig;
174
178
  private buildAuthHeaders;
175
179
  private getToken;
176
180
  static ɵfac: i0.ɵɵFactoryDeclaration<AppSyncGraphqlService, [{ optional: true; }, null]>;
@@ -1686,5 +1690,5 @@ declare class WhatsAppWidgetModule {
1686
1690
  static ɵinj: i0.ɵɵInjectorDeclaration<WhatsAppWidgetModule>;
1687
1691
  }
1688
1692
 
1689
- export { APPSYNC_GRAPHQL_CONFIG, AppSyncGraphqlService, CustomError, LocationInputComponent, PhoneInputComponent, WhatsAppContactCreateComponent, WhatsAppContactListComponent, WhatsAppConversationsComponent, WhatsAppMessageItemComponent, WhatsAppMessagesComponent, WhatsAppTemplatePreviewComponent, WhatsAppTemplatesComponent, WhatsAppTextFormatterPipe, WhatsAppWidgetComponent, WhatsAppWidgetModule, provideAppSyncConfig };
1690
- export type { AppSyncGraphqlConfig, PhoneNumber };
1693
+ export { AMPLIFY_CONFIG, AppSyncGraphqlService, CustomError, LocationInputComponent, PhoneInputComponent, WhatsAppContactCreateComponent, WhatsAppContactListComponent, WhatsAppConversationsComponent, WhatsAppMessageItemComponent, WhatsAppMessagesComponent, WhatsAppTemplatePreviewComponent, WhatsAppTemplatesComponent, WhatsAppTextFormatterPipe, WhatsAppWidgetComponent, WhatsAppWidgetModule, provideAmplifyConfig };
1694
+ export type { AmplifyConfig, PhoneNumber };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snugdesk/whatsapp-widget",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "WhatsApp widget for Angular Apps - Powered by Snugdesk",
5
5
  "peerDependencies": {
6
6
  "@angular/animations": ">=17.0.0",