@notifi-network/notifi-graphql
Advanced tools
Comparing version 0.90.1 to 0.90.2
@@ -45,3 +45,3 @@ "use strict"; | ||
// package.json | ||
var version = "0.90.1"; | ||
var version = "0.90.2"; | ||
@@ -432,2 +432,3 @@ // ../../node_modules/tslib/tslib.es6.js | ||
genericMessage: message | ||
genericMessageHtml: messageHtml | ||
eventDetailsJson | ||
@@ -537,2 +538,3 @@ action { | ||
genericMessage: message | ||
genericMessageHtml: messageHtml | ||
eventDetailsJson | ||
@@ -1599,4 +1601,8 @@ action { | ||
if (!this._dataplaneClient) { | ||
throw new Error("The publishFusionMessage API cannot be called if NotifiService was not initialized with a NotifiDataplaneClient"); | ||
throw new Error( | ||
"The publishFusionMessage API cannot be called if NotifiService was not initialized with a NotifiDataplaneClient" | ||
); | ||
} | ||
if (!this._jwt) | ||
throw new Error("NotifiService is not authenticated (Missing JWT token)"); | ||
return this._dataplaneClient.publishFusionMessage(this._jwt, variables); | ||
@@ -1603,0 +1609,0 @@ } |
@@ -90,2 +90,3 @@ import { gql } from 'graphql-request'; | ||
genericMessage: message | ||
genericMessageHtml: messageHtml | ||
eventDetailsJson | ||
@@ -92,0 +93,0 @@ action { |
@@ -97,2 +97,3 @@ import { gql } from 'graphql-request'; | ||
genericMessage: message | ||
genericMessageHtml: messageHtml | ||
eventDetailsJson | ||
@@ -99,0 +100,0 @@ action { |
@@ -0,3 +1,5 @@ | ||
import { NotifiDataplaneClient } from '@notifi-network/notifi-dataplane'; | ||
import { GraphQLClient } from 'graphql-request'; | ||
import { NotifiDataplaneClient } from '@notifi-network/notifi-dataplane'; | ||
import { FusionMessage } from 'notifi-dataplane/lib/types/FusionMessage'; | ||
import { PublishFusionMessageResponse } from 'notifi-dataplane/lib/types/PublishFusionMessageResponse'; | ||
import { v4 as uuid } from 'uuid'; | ||
@@ -9,63 +11,62 @@ | ||
import type * as Operations from './operations'; | ||
import { FusionMessage } from 'notifi-dataplane/lib/types/FusionMessage'; | ||
import { PublishFusionMessageResponse } from 'notifi-dataplane/lib/types/PublishFusionMessageResponse'; | ||
export class NotifiService | ||
implements | ||
Operations.AddSourceToSourceGroupService, | ||
Operations.BeginLogInByTransactionService, | ||
Operations.BroadcastMessageService, | ||
Operations.CompleteLogInByTransactionService, | ||
Operations.ConnectWalletService, | ||
Operations.CreateAlertService, | ||
Operations.CreateDirectPushAlertService, | ||
Operations.CreateEmailTargetService, | ||
Operations.CreateSmsTargetService, | ||
Operations.CreateSourceService, | ||
Operations.CreateSourceGroupService, | ||
Operations.CreateSupportConversationService, | ||
Operations.CreateTargetGroupService, | ||
Operations.CreateTelegramTargetService, | ||
Operations.CreateTenantUserService, | ||
Operations.CreateWebhookTargetService, | ||
Operations.DeleteAlertService, | ||
Operations.DeleteUserAlertService, | ||
Operations.DeleteSourceGroupService, | ||
Operations.DeleteTargetGroupService, | ||
Operations.DeleteWebhookTargetService, | ||
Operations.FetchDataService, | ||
Operations.FindTenantConfigService, | ||
Operations.GetAlertsService, | ||
Operations.GetConfigurationForDappService, | ||
Operations.GetConversationMessagesService, | ||
Operations.GetConnectedWalletsService, | ||
Operations.GetEmailTargetsService, | ||
Operations.GetFiltersService, | ||
Operations.GetFusionNotificationHistoryService, | ||
Operations.GetNotificationHistoryService, | ||
Operations.GetSmsTargetsService, | ||
Operations.GetSourceConnectionService, | ||
Operations.GetSourceGroupsService, | ||
Operations.GetSourcesService, | ||
Operations.GetTargetGroupsService, | ||
Operations.GetTelegramTargetsService, | ||
Operations.GetTenantConnectedWalletsService, | ||
Operations.GetTenantUserService, | ||
Operations.GetTopicsService, | ||
Operations.GetWebhookTargetsService, | ||
Operations.LogInFromDappService, | ||
Operations.LogInFromServiceService, | ||
Operations.RefreshAuthorizationService, | ||
Operations.RemoveSourceFromSourceGroupService, | ||
Operations.SendConversationMessageService, | ||
Operations.SendEmailTargetVerificationRequestService, | ||
Operations.SendMessageService, | ||
Operations.UpdateSourceGroupService, | ||
Operations.UpdateTargetGroupService, | ||
Operations.CreateDiscordTargetService, | ||
Operations.GetDiscordTargetsService, | ||
Operations.GetUnreadNotificationHistoryCountService, | ||
Operations.MarkFusionNotificationHistoryAsReadService, | ||
Operations.UpdateUserSettingsService, | ||
Operations.GetUserSettingsService { | ||
Operations.AddSourceToSourceGroupService, | ||
Operations.BeginLogInByTransactionService, | ||
Operations.BroadcastMessageService, | ||
Operations.CompleteLogInByTransactionService, | ||
Operations.ConnectWalletService, | ||
Operations.CreateAlertService, | ||
Operations.CreateDirectPushAlertService, | ||
Operations.CreateEmailTargetService, | ||
Operations.CreateSmsTargetService, | ||
Operations.CreateSourceService, | ||
Operations.CreateSourceGroupService, | ||
Operations.CreateSupportConversationService, | ||
Operations.CreateTargetGroupService, | ||
Operations.CreateTelegramTargetService, | ||
Operations.CreateTenantUserService, | ||
Operations.CreateWebhookTargetService, | ||
Operations.DeleteAlertService, | ||
Operations.DeleteUserAlertService, | ||
Operations.DeleteSourceGroupService, | ||
Operations.DeleteTargetGroupService, | ||
Operations.DeleteWebhookTargetService, | ||
Operations.FetchDataService, | ||
Operations.FindTenantConfigService, | ||
Operations.GetAlertsService, | ||
Operations.GetConfigurationForDappService, | ||
Operations.GetConversationMessagesService, | ||
Operations.GetConnectedWalletsService, | ||
Operations.GetEmailTargetsService, | ||
Operations.GetFiltersService, | ||
Operations.GetFusionNotificationHistoryService, | ||
Operations.GetNotificationHistoryService, | ||
Operations.GetSmsTargetsService, | ||
Operations.GetSourceConnectionService, | ||
Operations.GetSourceGroupsService, | ||
Operations.GetSourcesService, | ||
Operations.GetTargetGroupsService, | ||
Operations.GetTelegramTargetsService, | ||
Operations.GetTenantConnectedWalletsService, | ||
Operations.GetTenantUserService, | ||
Operations.GetTopicsService, | ||
Operations.GetWebhookTargetsService, | ||
Operations.LogInFromDappService, | ||
Operations.LogInFromServiceService, | ||
Operations.RefreshAuthorizationService, | ||
Operations.RemoveSourceFromSourceGroupService, | ||
Operations.SendConversationMessageService, | ||
Operations.SendEmailTargetVerificationRequestService, | ||
Operations.SendMessageService, | ||
Operations.UpdateSourceGroupService, | ||
Operations.UpdateTargetGroupService, | ||
Operations.CreateDiscordTargetService, | ||
Operations.GetDiscordTargetsService, | ||
Operations.GetUnreadNotificationHistoryCountService, | ||
Operations.MarkFusionNotificationHistoryAsReadService, | ||
Operations.UpdateUserSettingsService, | ||
Operations.GetUserSettingsService | ||
{ | ||
private _jwt: string | undefined; | ||
@@ -75,3 +76,6 @@ private _typedClient: ReturnType<typeof getSdk>; | ||
constructor(graphQLClient: GraphQLClient, dataplaneClient?: NotifiDataplaneClient) { | ||
constructor( | ||
graphQLClient: GraphQLClient, | ||
dataplaneClient?: NotifiDataplaneClient, | ||
) { | ||
this._typedClient = getSdk(graphQLClient); | ||
@@ -468,5 +472,10 @@ this._dataplaneClient = dataplaneClient; | ||
if (!this._dataplaneClient) { | ||
throw new Error("The publishFusionMessage API cannot be called if NotifiService was not initialized with a NotifiDataplaneClient"); | ||
throw new Error( | ||
'The publishFusionMessage API cannot be called if NotifiService was not initialized with a NotifiDataplaneClient', | ||
); | ||
} | ||
return this._dataplaneClient.publishFusionMessage(this._jwt!, variables); | ||
if (!this._jwt) | ||
throw new Error('NotifiService is not authenticated (Missing JWT token)'); | ||
return this._dataplaneClient.publishFusionMessage(this._jwt, variables); | ||
} | ||
@@ -473,0 +482,0 @@ |
{ | ||
"name": "@notifi-network/notifi-graphql", | ||
"version": "0.90.1", | ||
"version": "0.90.2", | ||
"description": "The GraphQL API for Notifi", | ||
@@ -35,3 +35,3 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"@notifi-network/notifi-dataplane": "^0.90.1", | ||
"@notifi-network/notifi-dataplane": "^0.90.2", | ||
"graphql": "^16.6.0", | ||
@@ -48,3 +48,3 @@ "graphql-request": "^6.0.0", | ||
}, | ||
"gitHead": "52b730a1209af38c60ac5208871397ce859de9df" | ||
"gitHead": "565f9b0cdcd4eb40512b8116253a2fa9fe22a9ff" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
557910
13145