@conduitplatform/grpc-sdk 0.17.0-alpha.2 → 0.17.0-alpha.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.
- package/dist/index.cjs +17 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -12
- package/dist/index.d.ts +10 -12
- package/dist/index.esm.js +17 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +16 -16
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
2
|
import { CompatServiceDefinition, Channel, Client } from 'nice-grpc';
|
|
3
3
|
import { EventEmitter } from 'events';
|
|
4
|
-
import {
|
|
4
|
+
import { status, Metadata } from '@grpc/grpc-js';
|
|
5
5
|
export * from '@grpc/grpc-js';
|
|
6
6
|
import { RedisOptions, ClusterOptions, Redis, Cluster } from 'ioredis';
|
|
7
7
|
import { Lock } from '@sesamecare-oss/redlock';
|
|
@@ -3058,17 +3058,15 @@ declare class PushNotifications extends ConduitModule<typeof CommunicationsDefin
|
|
|
3058
3058
|
getNotificationTokens(userId: string): Promise<any[]>;
|
|
3059
3059
|
sendNotification(sendTo: string, title: string, body?: string, data?: string, platform?: string, doNotStore?: boolean, isSilent?: boolean): Promise<SendNotificationResponse>;
|
|
3060
3060
|
sendNotification(sendTo: string, title: string, options?: SendNotificationOptions): Promise<SendNotificationResponse>;
|
|
3061
|
-
sendManyNotifications(notifications:
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
}
|
|
3071
|
-
]): Promise<SendNotificationResponse>;
|
|
3061
|
+
sendManyNotifications(notifications: {
|
|
3062
|
+
sendTo: string;
|
|
3063
|
+
title: string;
|
|
3064
|
+
body?: string;
|
|
3065
|
+
data?: string;
|
|
3066
|
+
platform?: string;
|
|
3067
|
+
doNotStore?: boolean;
|
|
3068
|
+
isSilent?: boolean;
|
|
3069
|
+
}[]): Promise<SendNotificationResponse>;
|
|
3072
3070
|
sendNotificationToManyDevices(sendTo: string[], title: string, body?: string, data?: string, platform?: string, doNotStore?: boolean, isSilent?: boolean): Promise<SendNotificationResponse>;
|
|
3073
3071
|
sendNotificationToManyDevices(sendTo: string[], title: string, options?: SendNotificationOptions): Promise<SendNotificationResponse>;
|
|
3074
3072
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
2
|
import { CompatServiceDefinition, Channel, Client } from 'nice-grpc';
|
|
3
3
|
import { EventEmitter } from 'events';
|
|
4
|
-
import {
|
|
4
|
+
import { status, Metadata } from '@grpc/grpc-js';
|
|
5
5
|
export * from '@grpc/grpc-js';
|
|
6
6
|
import { RedisOptions, ClusterOptions, Redis, Cluster } from 'ioredis';
|
|
7
7
|
import { Lock } from '@sesamecare-oss/redlock';
|
|
@@ -3058,17 +3058,15 @@ declare class PushNotifications extends ConduitModule<typeof CommunicationsDefin
|
|
|
3058
3058
|
getNotificationTokens(userId: string): Promise<any[]>;
|
|
3059
3059
|
sendNotification(sendTo: string, title: string, body?: string, data?: string, platform?: string, doNotStore?: boolean, isSilent?: boolean): Promise<SendNotificationResponse>;
|
|
3060
3060
|
sendNotification(sendTo: string, title: string, options?: SendNotificationOptions): Promise<SendNotificationResponse>;
|
|
3061
|
-
sendManyNotifications(notifications:
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
}
|
|
3071
|
-
]): Promise<SendNotificationResponse>;
|
|
3061
|
+
sendManyNotifications(notifications: {
|
|
3062
|
+
sendTo: string;
|
|
3063
|
+
title: string;
|
|
3064
|
+
body?: string;
|
|
3065
|
+
data?: string;
|
|
3066
|
+
platform?: string;
|
|
3067
|
+
doNotStore?: boolean;
|
|
3068
|
+
isSilent?: boolean;
|
|
3069
|
+
}[]): Promise<SendNotificationResponse>;
|
|
3072
3070
|
sendNotificationToManyDevices(sendTo: string[], title: string, body?: string, data?: string, platform?: string, doNotStore?: boolean, isSilent?: boolean): Promise<SendNotificationResponse>;
|
|
3073
3071
|
sendNotificationToManyDevices(sendTo: string[], title: string, options?: SendNotificationOptions): Promise<SendNotificationResponse>;
|
|
3074
3072
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -16011,6 +16011,10 @@ var ConduitModule = class {
|
|
|
16011
16011
|
this._serviceUrl = _serviceUrl;
|
|
16012
16012
|
this._grpcToken = _grpcToken;
|
|
16013
16013
|
}
|
|
16014
|
+
_clientName;
|
|
16015
|
+
_serviceName;
|
|
16016
|
+
_serviceUrl;
|
|
16017
|
+
_grpcToken;
|
|
16014
16018
|
channel;
|
|
16015
16019
|
protoPath;
|
|
16016
16020
|
type;
|
|
@@ -16195,6 +16199,7 @@ var Storage = class extends ConduitModule {
|
|
|
16195
16199
|
this.moduleName = moduleName;
|
|
16196
16200
|
this.initializeClient(StorageDefinition);
|
|
16197
16201
|
}
|
|
16202
|
+
moduleName;
|
|
16198
16203
|
getFile(id, userIdOrOptions, scope) {
|
|
16199
16204
|
const options = normalizeAuthzOptions(userIdOrOptions, scope);
|
|
16200
16205
|
return this.client.getFile({ id, ...options });
|
|
@@ -16303,6 +16308,7 @@ var Router = class extends ConduitModule {
|
|
|
16303
16308
|
this.moduleName = moduleName;
|
|
16304
16309
|
this.initializeClient(RouterDefinition);
|
|
16305
16310
|
}
|
|
16311
|
+
moduleName;
|
|
16306
16312
|
register(paths, url) {
|
|
16307
16313
|
const request = {
|
|
16308
16314
|
routes: paths,
|
|
@@ -16329,6 +16335,7 @@ var Email = class extends ConduitModule {
|
|
|
16329
16335
|
this.moduleName = moduleName;
|
|
16330
16336
|
this.initializeClient(CommunicationsDefinition);
|
|
16331
16337
|
}
|
|
16338
|
+
moduleName;
|
|
16332
16339
|
registerTemplate(template) {
|
|
16333
16340
|
return this.client.registerTemplate({
|
|
16334
16341
|
name: template.name,
|
|
@@ -16394,6 +16401,7 @@ var DatabaseProvider = class extends ConduitModule {
|
|
|
16394
16401
|
this.moduleName = moduleName;
|
|
16395
16402
|
this.initializeClient(DatabaseProviderDefinition);
|
|
16396
16403
|
}
|
|
16404
|
+
moduleName;
|
|
16397
16405
|
getSchema(schemaName) {
|
|
16398
16406
|
return this.client.getSchema({ schemaName }).then((res) => {
|
|
16399
16407
|
return {
|
|
@@ -16683,6 +16691,7 @@ var Config = class extends ConduitModule {
|
|
|
16683
16691
|
this._serviceHealthStatusGetter = serviceHealthStatusGetter;
|
|
16684
16692
|
this.emitter.setMaxListeners(150);
|
|
16685
16693
|
}
|
|
16694
|
+
url;
|
|
16686
16695
|
emitter = new EventEmitter2();
|
|
16687
16696
|
coreLive = false;
|
|
16688
16697
|
_serviceHealthStatusGetter;
|
|
@@ -16806,6 +16815,7 @@ var Core = class extends ConduitModule {
|
|
|
16806
16815
|
this.moduleName = moduleName;
|
|
16807
16816
|
this.initializeClient(CoreDefinition);
|
|
16808
16817
|
}
|
|
16818
|
+
moduleName;
|
|
16809
16819
|
};
|
|
16810
16820
|
|
|
16811
16821
|
// src/modules/admin/index.ts
|
|
@@ -16815,6 +16825,7 @@ var Admin = class extends ConduitModule {
|
|
|
16815
16825
|
this.moduleName = moduleName;
|
|
16816
16826
|
this.initializeClient(AdminDefinition);
|
|
16817
16827
|
}
|
|
16828
|
+
moduleName;
|
|
16818
16829
|
register(paths, serverUrl) {
|
|
16819
16830
|
const request = {
|
|
16820
16831
|
routes: paths,
|
|
@@ -16839,6 +16850,7 @@ var PushNotifications = class extends ConduitModule {
|
|
|
16839
16850
|
this.moduleName = moduleName;
|
|
16840
16851
|
this.initializeClient(CommunicationsDefinition);
|
|
16841
16852
|
}
|
|
16853
|
+
moduleName;
|
|
16842
16854
|
sendNotificationToken(token, platform, userId) {
|
|
16843
16855
|
return this.client.setNotificationToken({
|
|
16844
16856
|
token,
|
|
@@ -16897,6 +16909,7 @@ var SMS = class extends ConduitModule {
|
|
|
16897
16909
|
this.moduleName = moduleName;
|
|
16898
16910
|
this.initializeClient(CommunicationsDefinition);
|
|
16899
16911
|
}
|
|
16912
|
+
moduleName;
|
|
16900
16913
|
sendSms(to, message) {
|
|
16901
16914
|
return this.client.sendSms({ to, message });
|
|
16902
16915
|
}
|
|
@@ -16915,6 +16928,7 @@ var Chat = class extends ConduitModule {
|
|
|
16915
16928
|
this.moduleName = moduleName;
|
|
16916
16929
|
this.initializeClient(ChatDefinition);
|
|
16917
16930
|
}
|
|
16931
|
+
moduleName;
|
|
16918
16932
|
sendMessage(messageData) {
|
|
16919
16933
|
return this.client.sendMessage(messageData);
|
|
16920
16934
|
}
|
|
@@ -16933,6 +16947,7 @@ var Authorization = class extends ConduitModule {
|
|
|
16933
16947
|
this.moduleName = moduleName;
|
|
16934
16948
|
this.initializeClient(AuthorizationDefinition);
|
|
16935
16949
|
}
|
|
16950
|
+
moduleName;
|
|
16936
16951
|
defineResource(data) {
|
|
16937
16952
|
return this.client.defineResource(data);
|
|
16938
16953
|
}
|
|
@@ -16981,6 +16996,7 @@ var Authentication = class extends ConduitModule {
|
|
|
16981
16996
|
this.moduleName = moduleName;
|
|
16982
16997
|
this.initializeClient(AuthenticationDefinition);
|
|
16983
16998
|
}
|
|
16999
|
+
moduleName;
|
|
16984
17000
|
userLogin(userId, clientId) {
|
|
16985
17001
|
return this.client.userLogin({ userId, clientId });
|
|
16986
17002
|
}
|
|
@@ -17051,6 +17067,7 @@ var Communications = class extends ConduitModule {
|
|
|
17051
17067
|
this.moduleName = moduleName;
|
|
17052
17068
|
this.initializeClient(CommunicationsDefinition);
|
|
17053
17069
|
}
|
|
17070
|
+
moduleName;
|
|
17054
17071
|
// Legacy Email methods
|
|
17055
17072
|
registerTemplate(template) {
|
|
17056
17073
|
return this.client.registerTemplate({
|