@credo-ts/didcomm-push-notifications 0.0.1
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/LICENSE +202 -0
- package/README.md +23 -0
- package/build/fcm/DidCommPushNotificationsFcmApi.d.ts +40 -0
- package/build/fcm/DidCommPushNotificationsFcmApi.js +75 -0
- package/build/fcm/DidCommPushNotificationsFcmApi.js.map +1 -0
- package/build/fcm/DidCommPushNotificationsFcmModule.d.ts +10 -0
- package/build/fcm/DidCommPushNotificationsFcmModule.js +31 -0
- package/build/fcm/DidCommPushNotificationsFcmModule.js.map +1 -0
- package/build/fcm/PushNotificationsFcmApi.d.ts +40 -0
- package/build/fcm/PushNotificationsFcmApi.js +75 -0
- package/build/fcm/PushNotificationsFcmApi.js.map +1 -0
- package/build/fcm/PushNotificationsFcmModule.d.ts +10 -0
- package/build/fcm/PushNotificationsFcmModule.js +31 -0
- package/build/fcm/PushNotificationsFcmModule.js.map +1 -0
- package/build/fcm/errors/DidCommPushNotificationsFcmProblemReportError.d.ts +19 -0
- package/build/fcm/errors/DidCommPushNotificationsFcmProblemReportError.js +18 -0
- package/build/fcm/errors/DidCommPushNotificationsFcmProblemReportError.js.map +1 -0
- package/build/fcm/errors/DidCommPushNotificationsFcmProblemReportReason.d.ts +11 -0
- package/build/fcm/errors/DidCommPushNotificationsFcmProblemReportReason.js +13 -0
- package/build/fcm/errors/DidCommPushNotificationsFcmProblemReportReason.js.map +1 -0
- package/build/fcm/errors/PushNotificationsFcmProblemReportError.d.ts +19 -0
- package/build/fcm/errors/PushNotificationsFcmProblemReportError.js +18 -0
- package/build/fcm/errors/PushNotificationsFcmProblemReportError.js.map +1 -0
- package/build/fcm/errors/PushNotificationsFcmProblemReportReason.d.ts +11 -0
- package/build/fcm/errors/PushNotificationsFcmProblemReportReason.js +13 -0
- package/build/fcm/errors/PushNotificationsFcmProblemReportReason.js.map +1 -0
- package/build/fcm/errors/index.d.ts +2 -0
- package/build/fcm/errors/index.js +3 -0
- package/build/fcm/errors/index.js.map +1 -0
- package/build/fcm/handlers/DidCommPushNotificationsFcmDeviceInfoHandler.d.ts +13 -0
- package/build/fcm/handlers/DidCommPushNotificationsFcmDeviceInfoHandler.js +18 -0
- package/build/fcm/handlers/DidCommPushNotificationsFcmDeviceInfoHandler.js.map +1 -0
- package/build/fcm/handlers/DidCommPushNotificationsFcmProblemReportHandler.d.ts +13 -0
- package/build/fcm/handlers/DidCommPushNotificationsFcmProblemReportHandler.js +18 -0
- package/build/fcm/handlers/DidCommPushNotificationsFcmProblemReportHandler.js.map +1 -0
- package/build/fcm/handlers/DidCommPushNotificationsFcmSetDeviceInfoHandler.d.ts +17 -0
- package/build/fcm/handlers/DidCommPushNotificationsFcmSetDeviceInfoHandler.js +20 -0
- package/build/fcm/handlers/DidCommPushNotificationsFcmSetDeviceInfoHandler.js.map +1 -0
- package/build/fcm/handlers/PushNotificationsFcmDeviceInfoHandler.d.ts +13 -0
- package/build/fcm/handlers/PushNotificationsFcmDeviceInfoHandler.js +18 -0
- package/build/fcm/handlers/PushNotificationsFcmDeviceInfoHandler.js.map +1 -0
- package/build/fcm/handlers/PushNotificationsFcmProblemReportHandler.d.ts +13 -0
- package/build/fcm/handlers/PushNotificationsFcmProblemReportHandler.js +18 -0
- package/build/fcm/handlers/PushNotificationsFcmProblemReportHandler.js.map +1 -0
- package/build/fcm/handlers/PushNotificationsFcmSetDeviceInfoHandler.d.ts +17 -0
- package/build/fcm/handlers/PushNotificationsFcmSetDeviceInfoHandler.js +20 -0
- package/build/fcm/handlers/PushNotificationsFcmSetDeviceInfoHandler.js.map +1 -0
- package/build/fcm/handlers/index.d.ts +3 -0
- package/build/fcm/handlers/index.js +4 -0
- package/build/fcm/handlers/index.js.map +1 -0
- package/build/fcm/index.d.ts +5 -0
- package/build/fcm/index.js +6 -0
- package/build/fcm/index.js.map +1 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmDeviceInfoMessage.d.ts +20 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmDeviceInfoMessage.js +48 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmDeviceInfoMessage.js.map +1 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmGetDeviceInfoMessage.d.ts +15 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmGetDeviceInfoMessage.js +30 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmGetDeviceInfoMessage.js.map +1 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmProblemReportMessage.d.ts +11 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmProblemReportMessage.js +26 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmProblemReportMessage.js.map +1 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmSetDeviceInfoMessage.d.ts +18 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmSetDeviceInfoMessage.js +46 -0
- package/build/fcm/messages/DidCommPushNotificationsFcmSetDeviceInfoMessage.js.map +1 -0
- package/build/fcm/messages/PushNotificationsFcmDeviceInfoMessage.d.ts +20 -0
- package/build/fcm/messages/PushNotificationsFcmDeviceInfoMessage.js +48 -0
- package/build/fcm/messages/PushNotificationsFcmDeviceInfoMessage.js.map +1 -0
- package/build/fcm/messages/PushNotificationsFcmGetDeviceInfoMessage.d.ts +15 -0
- package/build/fcm/messages/PushNotificationsFcmGetDeviceInfoMessage.js +30 -0
- package/build/fcm/messages/PushNotificationsFcmGetDeviceInfoMessage.js.map +1 -0
- package/build/fcm/messages/PushNotificationsFcmProblemReportMessage.d.ts +11 -0
- package/build/fcm/messages/PushNotificationsFcmProblemReportMessage.js +26 -0
- package/build/fcm/messages/PushNotificationsFcmProblemReportMessage.js.map +1 -0
- package/build/fcm/messages/PushNotificationsFcmSetDeviceInfoMessage.d.ts +18 -0
- package/build/fcm/messages/PushNotificationsFcmSetDeviceInfoMessage.js +46 -0
- package/build/fcm/messages/PushNotificationsFcmSetDeviceInfoMessage.js.map +1 -0
- package/build/fcm/messages/index.d.ts +4 -0
- package/build/fcm/messages/index.js +5 -0
- package/build/fcm/messages/index.js.map +1 -0
- package/build/fcm/models/DidCommFcmDeviceInfo.d.ts +4 -0
- package/build/fcm/models/DidCommFcmDeviceInfo.js +2 -0
- package/build/fcm/models/DidCommFcmDeviceInfo.js.map +1 -0
- package/build/fcm/models/DidCommPushNotificationsFcmRole.d.ts +10 -0
- package/build/fcm/models/DidCommPushNotificationsFcmRole.js +12 -0
- package/build/fcm/models/DidCommPushNotificationsFcmRole.js.map +1 -0
- package/build/fcm/models/FcmDeviceInfo.d.ts +4 -0
- package/build/fcm/models/FcmDeviceInfo.js +2 -0
- package/build/fcm/models/FcmDeviceInfo.js.map +1 -0
- package/build/fcm/models/PushNotificationsFcmRole.d.ts +10 -0
- package/build/fcm/models/PushNotificationsFcmRole.js +12 -0
- package/build/fcm/models/PushNotificationsFcmRole.js.map +1 -0
- package/build/fcm/models/index.d.ts +2 -0
- package/build/fcm/models/index.js +3 -0
- package/build/fcm/models/index.js.map +1 -0
- package/build/fcm/repository/DidCommPushNotificationsFcmRecord.d.ts +26 -0
- package/build/fcm/repository/DidCommPushNotificationsFcmRecord.js +23 -0
- package/build/fcm/repository/DidCommPushNotificationsFcmRecord.js.map +1 -0
- package/build/fcm/repository/DidCommPushNotificationsFcmRepository.d.ts +5 -0
- package/build/fcm/repository/DidCommPushNotificationsFcmRepository.js +26 -0
- package/build/fcm/repository/DidCommPushNotificationsFcmRepository.js.map +1 -0
- package/build/fcm/repository/PushNotificationsFcmRecord.d.ts +26 -0
- package/build/fcm/repository/PushNotificationsFcmRecord.js +23 -0
- package/build/fcm/repository/PushNotificationsFcmRecord.js.map +1 -0
- package/build/fcm/repository/PushNotificationsFcmRepository.d.ts +5 -0
- package/build/fcm/repository/PushNotificationsFcmRepository.js +26 -0
- package/build/fcm/repository/PushNotificationsFcmRepository.js.map +1 -0
- package/build/fcm/repository/index.d.ts +2 -0
- package/build/fcm/repository/index.js +3 -0
- package/build/fcm/repository/index.js.map +1 -0
- package/build/fcm/services/DidCommPushNotificationsFcmService.d.ts +19 -0
- package/build/fcm/services/DidCommPushNotificationsFcmService.js +93 -0
- package/build/fcm/services/DidCommPushNotificationsFcmService.js.map +1 -0
- package/build/fcm/services/PushNotificationsFcmService.d.ts +19 -0
- package/build/fcm/services/PushNotificationsFcmService.js +93 -0
- package/build/fcm/services/PushNotificationsFcmService.js.map +1 -0
- package/build/fcm/services/index.d.ts +1 -0
- package/build/fcm/services/index.js +2 -0
- package/build/fcm/services/index.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +2 -0
- package/build/index.js.map +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DidCommProblemReportErrorOptions } from '@credo-ts/didcomm';
|
|
2
|
+
import { DidCommProblemReportError } from '@credo-ts/didcomm';
|
|
3
|
+
import { PushNotificationsFcmProblemReportMessage } from '../messages/index.js';
|
|
4
|
+
import type { PushNotificationsFcmProblemReportReason } from './PushNotificationsFcmProblemReportReason.js';
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
interface PushNotificationsFcmProblemReportErrorOptions extends DidCommProblemReportErrorOptions {
|
|
9
|
+
problemCode: PushNotificationsFcmProblemReportReason;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare class PushNotificationsFcmProblemReportError extends DidCommProblemReportError {
|
|
15
|
+
message: string;
|
|
16
|
+
problemReport: PushNotificationsFcmProblemReportMessage;
|
|
17
|
+
constructor(message: string, { problemCode }: PushNotificationsFcmProblemReportErrorOptions);
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DidCommProblemReportError } from '@credo-ts/didcomm';
|
|
2
|
+
import { PushNotificationsFcmProblemReportMessage } from '../messages/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export class PushNotificationsFcmProblemReportError extends DidCommProblemReportError {
|
|
7
|
+
constructor(message, { problemCode }) {
|
|
8
|
+
super(message, { problemCode });
|
|
9
|
+
this.message = message;
|
|
10
|
+
this.problemReport = new PushNotificationsFcmProblemReportMessage({
|
|
11
|
+
description: {
|
|
12
|
+
en: message,
|
|
13
|
+
code: problemCode,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=PushNotificationsFcmProblemReportError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PushNotificationsFcmProblemReportError.js","sourceRoot":"","sources":["../../../src/fcm/errors/PushNotificationsFcmProblemReportError.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC7D,OAAO,EAAE,wCAAwC,EAAE,MAAM,sBAAsB,CAAA;AAU/E;;GAEG;AACH,MAAM,OAAO,sCAAuC,SAAQ,yBAAyB;IAGnF,YACS,OAAe,EACtB,EAAE,WAAW,EAAiD;QAE9D,KAAK,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,CAAC,CAAA;QAHxB,YAAO,GAAP,OAAO,CAAQ;QAItB,IAAI,CAAC,aAAa,GAAG,IAAI,wCAAwC,CAAC;YAChE,WAAW,EAAE;gBACX,EAAE,EAAE,OAAO;gBACX,IAAI,EAAE,WAAW;aAClB;SACF,CAAC,CAAA;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Push Notification FCM errors discussed in RFC 0734.
|
|
3
|
+
*
|
|
4
|
+
* @see https://github.com/hyperledger/aries-rfcs/tree/main/features/0734-push-notifications-fcm#set-device-info
|
|
5
|
+
* @see https://github.com/hyperledger/aries-rfcs/tree/main/features/0734-push-notifications-fcm#device-info
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare enum PushNotificationsFcmProblemReportReason {
|
|
9
|
+
MissingValue = "missing-value",
|
|
10
|
+
NotRegistered = "not-registered-for-push-notifications"
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Push Notification FCM errors discussed in RFC 0734.
|
|
3
|
+
*
|
|
4
|
+
* @see https://github.com/hyperledger/aries-rfcs/tree/main/features/0734-push-notifications-fcm#set-device-info
|
|
5
|
+
* @see https://github.com/hyperledger/aries-rfcs/tree/main/features/0734-push-notifications-fcm#device-info
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export var PushNotificationsFcmProblemReportReason;
|
|
9
|
+
(function (PushNotificationsFcmProblemReportReason) {
|
|
10
|
+
PushNotificationsFcmProblemReportReason["MissingValue"] = "missing-value";
|
|
11
|
+
PushNotificationsFcmProblemReportReason["NotRegistered"] = "not-registered-for-push-notifications";
|
|
12
|
+
})(PushNotificationsFcmProblemReportReason || (PushNotificationsFcmProblemReportReason = {}));
|
|
13
|
+
//# sourceMappingURL=PushNotificationsFcmProblemReportReason.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PushNotificationsFcmProblemReportReason.js","sourceRoot":"","sources":["../../../src/fcm/errors/PushNotificationsFcmProblemReportReason.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,uCAGX;AAHD,WAAY,uCAAuC;IACjD,yEAA8B,CAAA;IAC9B,kGAAuD,CAAA;AACzD,CAAC,EAHW,uCAAuC,KAAvC,uCAAuC,QAGlD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fcm/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,oDAAoD,CAAA;AAClE,cAAc,qDAAqD,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '@credo-ts/didcomm';
|
|
2
|
+
import { DidCommPushNotificationsFcmDeviceInfoMessage } from '../messages/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handler for incoming fcm push notification device info messages
|
|
5
|
+
*/
|
|
6
|
+
export declare class DidCommPushNotificationsFcmDeviceInfoHandler implements DidCommMessageHandler {
|
|
7
|
+
supportedMessages: (typeof DidCommPushNotificationsFcmDeviceInfoMessage)[];
|
|
8
|
+
/**
|
|
9
|
+
/* We don't really need to do anything with this at the moment
|
|
10
|
+
/* The result can be hooked into through the generic message processed event
|
|
11
|
+
*/
|
|
12
|
+
handle(inboundMessage: DidCommMessageHandlerInboundMessage<DidCommPushNotificationsFcmDeviceInfoHandler>): Promise<undefined>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DidCommPushNotificationsFcmDeviceInfoMessage } from '../messages/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Handler for incoming fcm push notification device info messages
|
|
4
|
+
*/
|
|
5
|
+
export class DidCommPushNotificationsFcmDeviceInfoHandler {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.supportedMessages = [DidCommPushNotificationsFcmDeviceInfoMessage];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
/* We don't really need to do anything with this at the moment
|
|
11
|
+
/* The result can be hooked into through the generic message processed event
|
|
12
|
+
*/
|
|
13
|
+
async handle(inboundMessage) {
|
|
14
|
+
inboundMessage.assertReadyConnection();
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=DidCommPushNotificationsFcmDeviceInfoHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommPushNotificationsFcmDeviceInfoHandler.js","sourceRoot":"","sources":["../../../src/fcm/handlers/DidCommPushNotificationsFcmDeviceInfoHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4CAA4C,EAAE,MAAM,sBAAsB,CAAA;AAEnF;;GAEG;AACH,MAAM,OAAO,4CAA4C;IAAzD;QACS,sBAAiB,GAAG,CAAC,4CAA4C,CAAC,CAAA;IAY3E,CAAC;IAVC;;;OAGG;IACI,KAAK,CAAC,MAAM,CACjB,cAAiG;QAEjG,cAAc,CAAC,qBAAqB,EAAE,CAAA;QACtC,OAAO,SAAS,CAAA;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '@credo-ts/didcomm';
|
|
2
|
+
import { DidCommPushNotificationsFcmProblemReportMessage } from '../messages/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handler for incoming push notification problem report messages
|
|
5
|
+
*/
|
|
6
|
+
export declare class DidCommPushNotificationsFcmProblemReportHandler implements DidCommMessageHandler {
|
|
7
|
+
supportedMessages: (typeof DidCommPushNotificationsFcmProblemReportMessage)[];
|
|
8
|
+
/**
|
|
9
|
+
/* We don't really need to do anything with this at the moment
|
|
10
|
+
/* The result can be hooked into through the generic message processed event
|
|
11
|
+
*/
|
|
12
|
+
handle(inboundMessage: DidCommMessageHandlerInboundMessage<DidCommPushNotificationsFcmProblemReportHandler>): Promise<undefined>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DidCommPushNotificationsFcmProblemReportMessage } from '../messages/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Handler for incoming push notification problem report messages
|
|
4
|
+
*/
|
|
5
|
+
export class DidCommPushNotificationsFcmProblemReportHandler {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.supportedMessages = [DidCommPushNotificationsFcmProblemReportMessage];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
/* We don't really need to do anything with this at the moment
|
|
11
|
+
/* The result can be hooked into through the generic message processed event
|
|
12
|
+
*/
|
|
13
|
+
async handle(inboundMessage) {
|
|
14
|
+
inboundMessage.assertReadyConnection();
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=DidCommPushNotificationsFcmProblemReportHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommPushNotificationsFcmProblemReportHandler.js","sourceRoot":"","sources":["../../../src/fcm/handlers/DidCommPushNotificationsFcmProblemReportHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,+CAA+C,EAAE,MAAM,sBAAsB,CAAA;AAEtF;;GAEG;AACH,MAAM,OAAO,+CAA+C;IAA5D;QACS,sBAAiB,GAAG,CAAC,+CAA+C,CAAC,CAAA;IAY9E,CAAC;IAVC;;;OAGG;IACI,KAAK,CAAC,MAAM,CACjB,cAAoG;QAEpG,cAAc,CAAC,qBAAqB,EAAE,CAAA;QACtC,OAAO,SAAS,CAAA;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '@credo-ts/didcomm';
|
|
2
|
+
import { DidCommPushNotificationsFcmSetDeviceInfoMessage } from '../messages/index.js';
|
|
3
|
+
import type { DidCommPushNotificationsFcmService } from '../services/DidCommPushNotificationsFcmService.js';
|
|
4
|
+
/**
|
|
5
|
+
* Handler for incoming push notification device info messages
|
|
6
|
+
*/
|
|
7
|
+
export declare class DidCommPushNotificationsFcmSetDeviceInfoHandler implements DidCommMessageHandler {
|
|
8
|
+
private pushNotificationsFcmService;
|
|
9
|
+
supportedMessages: (typeof DidCommPushNotificationsFcmSetDeviceInfoMessage)[];
|
|
10
|
+
constructor(pushNotificationsFcmService: DidCommPushNotificationsFcmService);
|
|
11
|
+
/**
|
|
12
|
+
/* Only perform checks about message fields
|
|
13
|
+
/*
|
|
14
|
+
/* The result can be hooked into through the generic message processed event
|
|
15
|
+
*/
|
|
16
|
+
handle(inboundMessage: DidCommMessageHandlerInboundMessage<DidCommPushNotificationsFcmSetDeviceInfoHandler>): Promise<undefined>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DidCommPushNotificationsFcmSetDeviceInfoMessage } from '../messages/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Handler for incoming push notification device info messages
|
|
4
|
+
*/
|
|
5
|
+
export class DidCommPushNotificationsFcmSetDeviceInfoHandler {
|
|
6
|
+
constructor(pushNotificationsFcmService) {
|
|
7
|
+
this.supportedMessages = [DidCommPushNotificationsFcmSetDeviceInfoMessage];
|
|
8
|
+
this.pushNotificationsFcmService = pushNotificationsFcmService;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
/* Only perform checks about message fields
|
|
12
|
+
/*
|
|
13
|
+
/* The result can be hooked into through the generic message processed event
|
|
14
|
+
*/
|
|
15
|
+
async handle(inboundMessage) {
|
|
16
|
+
await this.pushNotificationsFcmService.processSetDeviceInfo(inboundMessage);
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=DidCommPushNotificationsFcmSetDeviceInfoHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommPushNotificationsFcmSetDeviceInfoHandler.js","sourceRoot":"","sources":["../../../src/fcm/handlers/DidCommPushNotificationsFcmSetDeviceInfoHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,+CAA+C,EAAE,MAAM,sBAAsB,CAAA;AAGtF;;GAEG;AACH,MAAM,OAAO,+CAA+C;IAI1D,YAAmB,2BAA+D;QAF3E,sBAAiB,GAAG,CAAC,+CAA+C,CAAC,CAAA;QAG1E,IAAI,CAAC,2BAA2B,GAAG,2BAA2B,CAAA;IAChE,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CACjB,cAAoG;QAEpG,MAAM,IAAI,CAAC,2BAA2B,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAA;QAC3E,OAAO,SAAS,CAAA;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '@credo-ts/didcomm';
|
|
2
|
+
import { PushNotificationsFcmDeviceInfoMessage } from '../messages/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handler for incoming fcm push notification device info messages
|
|
5
|
+
*/
|
|
6
|
+
export declare class PushNotificationsFcmDeviceInfoHandler implements DidCommMessageHandler {
|
|
7
|
+
supportedMessages: (typeof PushNotificationsFcmDeviceInfoMessage)[];
|
|
8
|
+
/**
|
|
9
|
+
/* We don't really need to do anything with this at the moment
|
|
10
|
+
/* The result can be hooked into through the generic message processed event
|
|
11
|
+
*/
|
|
12
|
+
handle(inboundMessage: DidCommMessageHandlerInboundMessage<PushNotificationsFcmDeviceInfoHandler>): Promise<undefined>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PushNotificationsFcmDeviceInfoMessage } from '../messages/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Handler for incoming fcm push notification device info messages
|
|
4
|
+
*/
|
|
5
|
+
export class PushNotificationsFcmDeviceInfoHandler {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.supportedMessages = [PushNotificationsFcmDeviceInfoMessage];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
/* We don't really need to do anything with this at the moment
|
|
11
|
+
/* The result can be hooked into through the generic message processed event
|
|
12
|
+
*/
|
|
13
|
+
async handle(inboundMessage) {
|
|
14
|
+
inboundMessage.assertReadyConnection();
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=PushNotificationsFcmDeviceInfoHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PushNotificationsFcmDeviceInfoHandler.js","sourceRoot":"","sources":["../../../src/fcm/handlers/PushNotificationsFcmDeviceInfoHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qCAAqC,EAAE,MAAM,sBAAsB,CAAA;AAE5E;;GAEG;AACH,MAAM,OAAO,qCAAqC;IAAlD;QACS,sBAAiB,GAAG,CAAC,qCAAqC,CAAC,CAAA;IAUpE,CAAC;IARC;;;OAGG;IACI,KAAK,CAAC,MAAM,CAAC,cAA0F;QAC5G,cAAc,CAAC,qBAAqB,EAAE,CAAA;QACtC,OAAO,SAAS,CAAA;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '@credo-ts/didcomm';
|
|
2
|
+
import { PushNotificationsFcmProblemReportMessage } from '../messages/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Handler for incoming push notification problem report messages
|
|
5
|
+
*/
|
|
6
|
+
export declare class PushNotificationsFcmProblemReportHandler implements DidCommMessageHandler {
|
|
7
|
+
supportedMessages: (typeof PushNotificationsFcmProblemReportMessage)[];
|
|
8
|
+
/**
|
|
9
|
+
/* We don't really need to do anything with this at the moment
|
|
10
|
+
/* The result can be hooked into through the generic message processed event
|
|
11
|
+
*/
|
|
12
|
+
handle(inboundMessage: DidCommMessageHandlerInboundMessage<PushNotificationsFcmProblemReportHandler>): Promise<undefined>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PushNotificationsFcmProblemReportMessage } from '../messages/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Handler for incoming push notification problem report messages
|
|
4
|
+
*/
|
|
5
|
+
export class PushNotificationsFcmProblemReportHandler {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.supportedMessages = [PushNotificationsFcmProblemReportMessage];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
/* We don't really need to do anything with this at the moment
|
|
11
|
+
/* The result can be hooked into through the generic message processed event
|
|
12
|
+
*/
|
|
13
|
+
async handle(inboundMessage) {
|
|
14
|
+
inboundMessage.assertReadyConnection();
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=PushNotificationsFcmProblemReportHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PushNotificationsFcmProblemReportHandler.js","sourceRoot":"","sources":["../../../src/fcm/handlers/PushNotificationsFcmProblemReportHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wCAAwC,EAAE,MAAM,sBAAsB,CAAA;AAE/E;;GAEG;AACH,MAAM,OAAO,wCAAwC;IAArD;QACS,sBAAiB,GAAG,CAAC,wCAAwC,CAAC,CAAA;IAUvE,CAAC;IARC;;;OAGG;IACI,KAAK,CAAC,MAAM,CAAC,cAA6F;QAC/G,cAAc,CAAC,qBAAqB,EAAE,CAAA;QACtC,OAAO,SAAS,CAAA;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DidCommMessageHandler, DidCommMessageHandlerInboundMessage } from '@credo-ts/didcomm';
|
|
2
|
+
import { PushNotificationsFcmSetDeviceInfoMessage } from '../messages/index.js';
|
|
3
|
+
import type { PushNotificationsFcmService } from '../services/PushNotificationsFcmService.js';
|
|
4
|
+
/**
|
|
5
|
+
* Handler for incoming push notification device info messages
|
|
6
|
+
*/
|
|
7
|
+
export declare class PushNotificationsFcmSetDeviceInfoHandler implements DidCommMessageHandler {
|
|
8
|
+
private pushNotificationsFcmService;
|
|
9
|
+
supportedMessages: (typeof PushNotificationsFcmSetDeviceInfoMessage)[];
|
|
10
|
+
constructor(pushNotificationsFcmService: PushNotificationsFcmService);
|
|
11
|
+
/**
|
|
12
|
+
/* Only perform checks about message fields
|
|
13
|
+
/*
|
|
14
|
+
/* The result can be hooked into through the generic message processed event
|
|
15
|
+
*/
|
|
16
|
+
handle(inboundMessage: DidCommMessageHandlerInboundMessage<PushNotificationsFcmSetDeviceInfoHandler>): Promise<undefined>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PushNotificationsFcmSetDeviceInfoMessage } from '../messages/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Handler for incoming push notification device info messages
|
|
4
|
+
*/
|
|
5
|
+
export class PushNotificationsFcmSetDeviceInfoHandler {
|
|
6
|
+
constructor(pushNotificationsFcmService) {
|
|
7
|
+
this.supportedMessages = [PushNotificationsFcmSetDeviceInfoMessage];
|
|
8
|
+
this.pushNotificationsFcmService = pushNotificationsFcmService;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
/* Only perform checks about message fields
|
|
12
|
+
/*
|
|
13
|
+
/* The result can be hooked into through the generic message processed event
|
|
14
|
+
*/
|
|
15
|
+
async handle(inboundMessage) {
|
|
16
|
+
await this.pushNotificationsFcmService.processSetDeviceInfo(inboundMessage);
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=PushNotificationsFcmSetDeviceInfoHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PushNotificationsFcmSetDeviceInfoHandler.js","sourceRoot":"","sources":["../../../src/fcm/handlers/PushNotificationsFcmSetDeviceInfoHandler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wCAAwC,EAAE,MAAM,sBAAsB,CAAA;AAG/E;;GAEG;AACH,MAAM,OAAO,wCAAwC;IAInD,YAAmB,2BAAwD;QAFpE,sBAAiB,GAAG,CAAC,wCAAwC,CAAC,CAAA;QAGnE,IAAI,CAAC,2BAA2B,GAAG,2BAA2B,CAAA;IAChE,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,cAA6F;QAC/G,MAAM,IAAI,CAAC,2BAA2B,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAA;QAC3E,OAAO,SAAS,CAAA;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { DidCommPushNotificationsFcmDeviceInfoHandler } from './DidCommPushNotificationsFcmDeviceInfoHandler.js';
|
|
2
|
+
export { DidCommPushNotificationsFcmProblemReportHandler } from './DidCommPushNotificationsFcmProblemReportHandler.js';
|
|
3
|
+
export { DidCommPushNotificationsFcmSetDeviceInfoHandler } from './DidCommPushNotificationsFcmSetDeviceInfoHandler.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { DidCommPushNotificationsFcmDeviceInfoHandler } from './DidCommPushNotificationsFcmDeviceInfoHandler.js';
|
|
2
|
+
export { DidCommPushNotificationsFcmProblemReportHandler } from './DidCommPushNotificationsFcmProblemReportHandler.js';
|
|
3
|
+
export { DidCommPushNotificationsFcmSetDeviceInfoHandler } from './DidCommPushNotificationsFcmSetDeviceInfoHandler.js';
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/fcm/handlers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4CAA4C,EAAE,MAAM,mDAAmD,CAAA;AAChH,OAAO,EAAE,+CAA+C,EAAE,MAAM,sDAAsD,CAAA;AACtH,OAAO,EAAE,+CAA+C,EAAE,MAAM,sDAAsD,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DidCommPushNotificationsFcmApi as PushNotificationsFcmApi } from './DidCommPushNotificationsFcmApi.js';
|
|
2
|
+
export { DidCommPushNotificationsFcmModule as PushNotificationsFcmModule } from './DidCommPushNotificationsFcmModule.js';
|
|
3
|
+
export * from './messages/index.js';
|
|
4
|
+
export * from './models/index.js';
|
|
5
|
+
export * from './repository/index.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { DidCommPushNotificationsFcmApi as PushNotificationsFcmApi } from './DidCommPushNotificationsFcmApi.js';
|
|
2
|
+
export { DidCommPushNotificationsFcmModule as PushNotificationsFcmModule } from './DidCommPushNotificationsFcmModule.js';
|
|
3
|
+
export * from './messages/index.js';
|
|
4
|
+
export * from './models/index.js';
|
|
5
|
+
export * from './repository/index.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fcm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,IAAI,uBAAuB,EAAE,MAAM,qCAAqC,CAAA;AAC/G,OAAO,EAAE,iCAAiC,IAAI,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACxH,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DidCommMessage } from '@credo-ts/didcomm';
|
|
2
|
+
import type { DidCommFcmDeviceInfo } from '../models/index.js';
|
|
3
|
+
interface DidCommPushNotificationsFcmDeviceInfoOptions extends DidCommFcmDeviceInfo {
|
|
4
|
+
id?: string;
|
|
5
|
+
threadId: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Message to send the fcm device information from another agent for push notifications
|
|
9
|
+
* This is used as a response for the `get-device-info` message
|
|
10
|
+
*
|
|
11
|
+
* @see https://github.com/hyperledger/aries-rfcs/tree/main/features/0734-push-notifications-fcm#device-info
|
|
12
|
+
*/
|
|
13
|
+
export declare class DidCommPushNotificationsFcmDeviceInfoMessage extends DidCommMessage {
|
|
14
|
+
constructor(options: DidCommPushNotificationsFcmDeviceInfoOptions);
|
|
15
|
+
deviceToken: string | null;
|
|
16
|
+
devicePlatform: string | null;
|
|
17
|
+
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
18
|
+
readonly type: string;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DidCommMessage, IsValidMessageType, parseMessageType } from '@credo-ts/didcomm';
|
|
11
|
+
import { Expose } from 'class-transformer';
|
|
12
|
+
import { IsString, ValidateIf } from 'class-validator';
|
|
13
|
+
/**
|
|
14
|
+
* Message to send the fcm device information from another agent for push notifications
|
|
15
|
+
* This is used as a response for the `get-device-info` message
|
|
16
|
+
*
|
|
17
|
+
* @see https://github.com/hyperledger/aries-rfcs/tree/main/features/0734-push-notifications-fcm#device-info
|
|
18
|
+
*/
|
|
19
|
+
export class DidCommPushNotificationsFcmDeviceInfoMessage extends DidCommMessage {
|
|
20
|
+
constructor(options) {
|
|
21
|
+
super();
|
|
22
|
+
this.type = DidCommPushNotificationsFcmDeviceInfoMessage.type.messageTypeUri;
|
|
23
|
+
if (options) {
|
|
24
|
+
this.id = options.id ?? this.generateId();
|
|
25
|
+
this.setThread({ threadId: options.threadId });
|
|
26
|
+
this.deviceToken = options.deviceToken;
|
|
27
|
+
this.devicePlatform = options.devicePlatform;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
DidCommPushNotificationsFcmDeviceInfoMessage.type = parseMessageType('https://didcomm.org/push-notifications-fcm/1.0/device-info');
|
|
32
|
+
__decorate([
|
|
33
|
+
Expose({ name: 'device_token' }),
|
|
34
|
+
IsString(),
|
|
35
|
+
ValidateIf((_, value) => value !== null),
|
|
36
|
+
__metadata("design:type", Object)
|
|
37
|
+
], DidCommPushNotificationsFcmDeviceInfoMessage.prototype, "deviceToken", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
Expose({ name: 'device_platform' }),
|
|
40
|
+
IsString(),
|
|
41
|
+
ValidateIf((_, value) => value !== null),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], DidCommPushNotificationsFcmDeviceInfoMessage.prototype, "devicePlatform", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
IsValidMessageType(DidCommPushNotificationsFcmDeviceInfoMessage.type),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], DidCommPushNotificationsFcmDeviceInfoMessage.prototype, "type", void 0);
|
|
48
|
+
//# sourceMappingURL=DidCommPushNotificationsFcmDeviceInfoMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommPushNotificationsFcmDeviceInfoMessage.js","sourceRoot":"","sources":["../../../src/fcm/messages/DidCommPushNotificationsFcmDeviceInfoMessage.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACxF,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAQtD;;;;;GAKG;AACH,MAAM,OAAO,4CAA6C,SAAQ,cAAc;IAC9E,YAAmB,OAAqD;QACtE,KAAK,EAAE,CAAA;QAuBO,SAAI,GAAG,4CAA4C,CAAC,IAAI,CAAC,cAAc,CAAA;QArBrF,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;YAC9C,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;YACtC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAA;QAC9C,CAAC;IACH,CAAC;;AAYsB,iDAAI,GAAG,gBAAgB,CAAC,4DAA4D,CAAC,AAAjF,CAAiF;AAPrG;IAHN,MAAM,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;IAChC,QAAQ,EAAE;IACV,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;;iFACP;AAK3B;IAHN,MAAM,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IACnC,QAAQ,EAAE;IACV,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;;oFACJ;AAKrB;IADf,kBAAkB,CAAC,4CAA4C,CAAC,IAAI,CAAC;;0EACiB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DidCommMessage } from '@credo-ts/didcomm';
|
|
2
|
+
interface PushNotificationsFcmGetDeviceInfoOptions {
|
|
3
|
+
id?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Message to get fcm the device information from another agent for push notifications
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/hyperledger/aries-rfcs/tree/main/features/0734-push-notifications-fcm#get-device-info
|
|
9
|
+
*/
|
|
10
|
+
export declare class DidCommPushNotificationsFcmGetDeviceInfoMessage extends DidCommMessage {
|
|
11
|
+
constructor(options: PushNotificationsFcmGetDeviceInfoOptions);
|
|
12
|
+
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
13
|
+
readonly type: string;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DidCommMessage, IsValidMessageType, parseMessageType } from '@credo-ts/didcomm';
|
|
11
|
+
/**
|
|
12
|
+
* Message to get fcm the device information from another agent for push notifications
|
|
13
|
+
*
|
|
14
|
+
* @see https://github.com/hyperledger/aries-rfcs/tree/main/features/0734-push-notifications-fcm#get-device-info
|
|
15
|
+
*/
|
|
16
|
+
export class DidCommPushNotificationsFcmGetDeviceInfoMessage extends DidCommMessage {
|
|
17
|
+
constructor(options) {
|
|
18
|
+
super();
|
|
19
|
+
this.type = DidCommPushNotificationsFcmGetDeviceInfoMessage.type.messageTypeUri;
|
|
20
|
+
if (options) {
|
|
21
|
+
this.id = options.id ?? this.generateId();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
DidCommPushNotificationsFcmGetDeviceInfoMessage.type = parseMessageType('https://didcomm.org/push-notifications-fcm/1.0/get-device-info');
|
|
26
|
+
__decorate([
|
|
27
|
+
IsValidMessageType(DidCommPushNotificationsFcmGetDeviceInfoMessage.type),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], DidCommPushNotificationsFcmGetDeviceInfoMessage.prototype, "type", void 0);
|
|
30
|
+
//# sourceMappingURL=DidCommPushNotificationsFcmGetDeviceInfoMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommPushNotificationsFcmGetDeviceInfoMessage.js","sourceRoot":"","sources":["../../../src/fcm/messages/DidCommPushNotificationsFcmGetDeviceInfoMessage.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAMxF;;;;GAIG;AACH,MAAM,OAAO,+CAAgD,SAAQ,cAAc;IACjF,YAAmB,OAAiD;QAClE,KAAK,EAAE,CAAA;QASO,SAAI,GAAG,+CAA+C,CAAC,IAAI,CAAC,cAAc,CAAA;QAPxF,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;QAC3C,CAAC;IACH,CAAC;;AACsB,oDAAI,GAAG,gBAAgB,CAAC,gEAAgE,CAAC,AAArF,CAAqF;AAGhG;IADf,kBAAkB,CAAC,+CAA+C,CAAC,IAAI,CAAC;;6EACiB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DidCommProblemReportMessageOptions } from '@credo-ts/didcomm';
|
|
2
|
+
import { DidCommProblemReportMessage } from '@credo-ts/didcomm';
|
|
3
|
+
export type DidCommPushNotificationsFcmProblemReportMessageOptions = DidCommProblemReportMessageOptions;
|
|
4
|
+
/**
|
|
5
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0035-report-problem/README.md
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class DidCommPushNotificationsFcmProblemReportMessage extends DidCommProblemReportMessage {
|
|
9
|
+
readonly type: string;
|
|
10
|
+
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
11
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DidCommProblemReportMessage, IsValidMessageType, parseMessageType } from '@credo-ts/didcomm';
|
|
11
|
+
/**
|
|
12
|
+
* @see https://github.com/hyperledger/aries-rfcs/blob/main/features/0035-report-problem/README.md
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export class DidCommPushNotificationsFcmProblemReportMessage extends DidCommProblemReportMessage {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.type = DidCommPushNotificationsFcmProblemReportMessage.type.messageTypeUri;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
DidCommPushNotificationsFcmProblemReportMessage.type = parseMessageType('https://didcomm.org/push-notifications-fcm/1.0/problem-report');
|
|
22
|
+
__decorate([
|
|
23
|
+
IsValidMessageType(DidCommPushNotificationsFcmProblemReportMessage.type),
|
|
24
|
+
__metadata("design:type", Object)
|
|
25
|
+
], DidCommPushNotificationsFcmProblemReportMessage.prototype, "type", void 0);
|
|
26
|
+
//# sourceMappingURL=DidCommPushNotificationsFcmProblemReportMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommPushNotificationsFcmProblemReportMessage.js","sourceRoot":"","sources":["../../../src/fcm/messages/DidCommPushNotificationsFcmProblemReportMessage.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAIrG;;;GAGG;AACH,MAAM,OAAO,+CAAgD,SAAQ,2BAA2B;IAAhG;;QAEkB,SAAI,GAAG,+CAA+C,CAAC,IAAI,CAAC,cAAc,CAAA;IAE5F,CAAC;;AADwB,oDAAI,GAAG,gBAAgB,CAAC,+DAA+D,CAAC,AAApF,CAAoF;AAD/F;IADf,kBAAkB,CAAC,+CAA+C,CAAC,IAAI,CAAC;;6EACiB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DidCommMessage } from '@credo-ts/didcomm';
|
|
2
|
+
import type { DidCommFcmDeviceInfo } from '../models/index.js';
|
|
3
|
+
interface DidCommPushNotificationsFcmSetDeviceInfoOptions extends DidCommFcmDeviceInfo {
|
|
4
|
+
id?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Message to set the fcm device information at another agent for push notifications
|
|
8
|
+
*
|
|
9
|
+
* @see https://github.com/hyperledger/aries-rfcs/tree/main/features/0734-push-notifications-fcm#set-device-info
|
|
10
|
+
*/
|
|
11
|
+
export declare class DidCommPushNotificationsFcmSetDeviceInfoMessage extends DidCommMessage {
|
|
12
|
+
constructor(options: DidCommPushNotificationsFcmSetDeviceInfoOptions);
|
|
13
|
+
deviceToken: string | null;
|
|
14
|
+
devicePlatform: string | null;
|
|
15
|
+
static readonly type: import("@credo-ts/didcomm").ParsedMessageType;
|
|
16
|
+
readonly type: string;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { DidCommMessage, IsValidMessageType, parseMessageType } from '@credo-ts/didcomm';
|
|
11
|
+
import { Expose } from 'class-transformer';
|
|
12
|
+
import { IsString, ValidateIf } from 'class-validator';
|
|
13
|
+
/**
|
|
14
|
+
* Message to set the fcm device information at another agent for push notifications
|
|
15
|
+
*
|
|
16
|
+
* @see https://github.com/hyperledger/aries-rfcs/tree/main/features/0734-push-notifications-fcm#set-device-info
|
|
17
|
+
*/
|
|
18
|
+
export class DidCommPushNotificationsFcmSetDeviceInfoMessage extends DidCommMessage {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
super();
|
|
21
|
+
this.type = DidCommPushNotificationsFcmSetDeviceInfoMessage.type.messageTypeUri;
|
|
22
|
+
if (options) {
|
|
23
|
+
this.id = options.id ?? this.generateId();
|
|
24
|
+
this.deviceToken = options.deviceToken;
|
|
25
|
+
this.devicePlatform = options.devicePlatform;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
DidCommPushNotificationsFcmSetDeviceInfoMessage.type = parseMessageType('https://didcomm.org/push-notifications-fcm/1.0/set-device-info');
|
|
30
|
+
__decorate([
|
|
31
|
+
Expose({ name: 'device_token' }),
|
|
32
|
+
IsString(),
|
|
33
|
+
ValidateIf((_, value) => value !== null),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], DidCommPushNotificationsFcmSetDeviceInfoMessage.prototype, "deviceToken", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
Expose({ name: 'device_platform' }),
|
|
38
|
+
IsString(),
|
|
39
|
+
ValidateIf((_, value) => value !== null),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], DidCommPushNotificationsFcmSetDeviceInfoMessage.prototype, "devicePlatform", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
IsValidMessageType(DidCommPushNotificationsFcmSetDeviceInfoMessage.type),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], DidCommPushNotificationsFcmSetDeviceInfoMessage.prototype, "type", void 0);
|
|
46
|
+
//# sourceMappingURL=DidCommPushNotificationsFcmSetDeviceInfoMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DidCommPushNotificationsFcmSetDeviceInfoMessage.js","sourceRoot":"","sources":["../../../src/fcm/messages/DidCommPushNotificationsFcmSetDeviceInfoMessage.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACxF,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAOtD;;;;GAIG;AACH,MAAM,OAAO,+CAAgD,SAAQ,cAAc;IACjF,YAAmB,OAAwD;QACzE,KAAK,EAAE,CAAA;QAsBO,SAAI,GAAG,+CAA+C,CAAC,IAAI,CAAC,cAAc,CAAA;QApBxF,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAA;YACzC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;YACtC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAA;QAC9C,CAAC;IACH,CAAC;;AAYsB,oDAAI,GAAG,gBAAgB,CAAC,gEAAgE,CAAC,AAArF,CAAqF;AAPzG;IAHN,MAAM,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;IAChC,QAAQ,EAAE;IACV,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;;oFACP;AAK3B;IAHN,MAAM,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IACnC,QAAQ,EAAE;IACV,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;;uFACJ;AAKrB;IADf,kBAAkB,CAAC,+CAA+C,CAAC,IAAI,CAAC;;6EACiB"}
|