@rocketmakers/orbit-notify-firebase 2.0.0-beta.5 → 2.0.0-beta.8

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.
Files changed (74) hide show
  1. package/lib/_tests_/manualTest/index.test.d.ts +2 -0
  2. package/lib/_tests_/manualTest/index.test.d.ts.map +1 -0
  3. package/lib/_tests_/manualTest/index.test.js +7 -0
  4. package/lib/_tests_/manualTest/index.test.js.map +1 -0
  5. package/lib/_tests_/manualTest/sendNotification.d.ts +2 -0
  6. package/lib/_tests_/manualTest/sendNotification.d.ts.map +1 -0
  7. package/lib/_tests_/manualTest/sendNotification.js +47 -0
  8. package/lib/_tests_/manualTest/sendNotification.js.map +1 -0
  9. package/lib/_tests_/manualTest/serviceInstance.d.ts +9 -0
  10. package/lib/_tests_/manualTest/serviceInstance.d.ts.map +1 -0
  11. package/lib/_tests_/manualTest/serviceInstance.js +26 -0
  12. package/lib/_tests_/manualTest/serviceInstance.js.map +1 -0
  13. package/lib/_tests_/unit/validation/index.test.d.ts +2 -0
  14. package/lib/_tests_/unit/validation/index.test.d.ts.map +1 -0
  15. package/lib/_tests_/unit/validation/index.test.js +7 -0
  16. package/lib/_tests_/unit/validation/index.test.js.map +1 -0
  17. package/lib/_tests_/unit/validation/mockedService.d.ts +13 -0
  18. package/lib/_tests_/unit/validation/mockedService.d.ts.map +1 -0
  19. package/lib/_tests_/unit/validation/mockedService.js +20 -0
  20. package/lib/_tests_/unit/validation/mockedService.js.map +1 -0
  21. package/lib/_tests_/unit/validation/sendNotification.d.ts +2 -0
  22. package/lib/_tests_/unit/validation/sendNotification.d.ts.map +1 -0
  23. package/lib/_tests_/unit/validation/sendNotification.js +39 -0
  24. package/lib/_tests_/unit/validation/sendNotification.js.map +1 -0
  25. package/lib/_tests_/validation/index.test.d.ts +2 -0
  26. package/lib/_tests_/validation/index.test.d.ts.map +1 -0
  27. package/lib/_tests_/validation/index.test.js +7 -0
  28. package/lib/_tests_/validation/index.test.js.map +1 -0
  29. package/lib/_tests_/validation/mockedService.d.ts +14 -0
  30. package/lib/_tests_/validation/mockedService.d.ts.map +1 -0
  31. package/lib/_tests_/validation/mockedService.js +20 -0
  32. package/lib/_tests_/validation/mockedService.js.map +1 -0
  33. package/lib/_tests_/validation/sendNotification.d.ts +2 -0
  34. package/lib/_tests_/validation/sendNotification.d.ts.map +1 -0
  35. package/lib/_tests_/validation/sendNotification.js +39 -0
  36. package/lib/_tests_/validation/sendNotification.js.map +1 -0
  37. package/lib/config/environment.generated.d.ts +7 -0
  38. package/lib/config/environment.generated.d.ts.map +1 -0
  39. package/lib/config/environment.generated.js +25 -0
  40. package/lib/config/environment.generated.js.map +1 -0
  41. package/lib/config/index.d.ts +7 -0
  42. package/lib/config/index.d.ts.map +1 -0
  43. package/lib/config/index.js +5 -0
  44. package/lib/config/index.js.map +1 -0
  45. package/lib/index.d.ts +5 -0
  46. package/lib/index.d.ts.map +1 -0
  47. package/lib/index.js +8 -0
  48. package/lib/index.js.map +1 -0
  49. package/lib/ioc/index.d.ts +3 -0
  50. package/lib/ioc/index.d.ts.map +1 -0
  51. package/lib/ioc/index.js +6 -0
  52. package/lib/ioc/index.js.map +1 -0
  53. package/lib/ioc/register.d.ts +8 -0
  54. package/lib/ioc/register.d.ts.map +1 -0
  55. package/lib/ioc/register.js +31 -0
  56. package/lib/ioc/register.js.map +1 -0
  57. package/lib/ioc/types.d.ts +7 -0
  58. package/lib/ioc/types.d.ts.map +1 -0
  59. package/lib/ioc/types.js +3 -0
  60. package/lib/ioc/types.js.map +1 -0
  61. package/lib/services/firebaseService.d.ts +32 -0
  62. package/lib/services/firebaseService.d.ts.map +1 -0
  63. package/lib/services/firebaseService.js +93 -0
  64. package/lib/services/firebaseService.js.map +1 -0
  65. package/lib/services/index.d.ts +2 -0
  66. package/lib/services/index.d.ts.map +1 -0
  67. package/lib/services/index.js +5 -0
  68. package/lib/services/index.js.map +1 -0
  69. package/lib/tsconfig.tsbuildinfo +1 -0
  70. package/lib/validation/index.d.ts +15 -0
  71. package/lib/validation/index.d.ts.map +1 -0
  72. package/lib/validation/index.js +24 -0
  73. package/lib/validation/index.js.map +1 -0
  74. package/package.json +8 -8
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Validation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const orbit_core_1 = require("@rocketmakers/orbit-core");
6
+ var Validation;
7
+ (function (Validation) {
8
+ function sendNotification(firebaseDeviceToken, layoutId, templateName, payload) {
9
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
+ return {
11
+ validatedDeviceToken: yield (0, orbit_core_1.validate)(orbit_core_1.CommonValidators.string(true).minLength(1).build(), firebaseDeviceToken),
12
+ validatedLayoutId: yield (0, orbit_core_1.validate)(orbit_core_1.CommonValidators.opaque(true).minLength(1).build(), layoutId),
13
+ validatedTemplateName: yield (0, orbit_core_1.validate)(orbit_core_1.CommonValidators.string(true).minLength(1).build(), templateName),
14
+ validatedPayload: yield (0, orbit_core_1.validate)(orbit_core_1.CommonValidators.objectMandatory({
15
+ data: orbit_core_1.CommonValidators.any(true),
16
+ title: orbit_core_1.CommonValidators.string(false),
17
+ imageUrl: orbit_core_1.CommonValidators.string(false),
18
+ }).build(), payload),
19
+ };
20
+ });
21
+ }
22
+ Validation.sendNotification = sendNotification;
23
+ })(Validation = exports.Validation || (exports.Validation = {}));
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":";;;;AAAA,yDAAsE;AAItE,IAAiB,UAAU,CAqB1B;AArBD,WAAiB,UAAU;IACzB,SAAsB,gBAAgB,CACpC,mBAA2B,EAC3B,QAAkB,EAClB,YAAoB,EACpB,OAAmC;;YAEnC,OAAO;gBACL,oBAAoB,EAAE,MAAM,IAAA,qBAAQ,EAAC,6BAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,mBAAmB,CAAC;gBAC7G,iBAAiB,EAAE,MAAM,IAAA,qBAAQ,EAAC,6BAAgB,CAAC,MAAM,CAAW,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,QAAQ,CAAC;gBACzG,qBAAqB,EAAE,MAAM,IAAA,qBAAQ,EAAC,6BAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,YAAY,CAAC;gBACvG,gBAAgB,EAAE,MAAM,IAAA,qBAAQ,EAC9B,6BAAgB,CAAC,eAAe,CAAC;oBAC/B,IAAI,EAAE,6BAAgB,CAAC,GAAG,CAAC,IAAI,CAAC;oBAChC,KAAK,EAAE,6BAAgB,CAAC,MAAM,CAAC,KAAK,CAAC;oBACrC,QAAQ,EAAE,6BAAgB,CAAC,MAAM,CAAC,KAAK,CAAC;iBACzC,CAAC,CAAC,KAAK,EAAE,EACV,OAAO,CACR;aACF,CAAC;QACJ,CAAC;KAAA;IAnBqB,2BAAgB,mBAmBrC,CAAA;AACH,CAAC,EArBgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAqB1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocketmakers/orbit-notify-firebase",
3
- "version": "2.0.0-beta.5",
3
+ "version": "2.0.0-beta.8",
4
4
  "description": "> TODO: description",
5
5
  "author": "Product team <product-team@rocketmakers.com>",
6
6
  "homepage": "https://gitlab.com/rocketmakers/microservices/orbit-packages#readme",
@@ -37,16 +37,16 @@
37
37
  "@rocketmakers/environment": "0.3.10",
38
38
  "@rocketmakers/ioc": "0.3.3",
39
39
  "@rocketmakers/log": "^0.1.0",
40
- "@rocketmakers/orbit-core": "^2.0.0-beta.5",
41
- "@rocketmakers/orbit-notify-core": "^2.0.0-beta.5",
42
- "@rocketmakers/orbit-template-core": "^2.0.0-beta.5",
43
- "@rocketmakers/orbit-template-http-repository": "^2.0.0-beta.5",
44
- "@rocketmakers/orbit-template-service": "^2.0.0-beta.5",
40
+ "@rocketmakers/orbit-core": "^2.0.0-beta.8",
41
+ "@rocketmakers/orbit-notify-core": "^2.0.0-beta.8",
42
+ "@rocketmakers/orbit-template-core": "^2.0.0-beta.8",
43
+ "@rocketmakers/orbit-template-http-repository": "^2.0.0-beta.8",
44
+ "@rocketmakers/orbit-template-service": "^2.0.0-beta.8",
45
45
  "@rocketmakers/shell-commands": "5.0.1",
46
46
  "firebase-admin": "^9.12.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@rocketmakers/orbit-testing-core": "^2.0.0-beta.5"
49
+ "@rocketmakers/orbit-testing-core": "^2.0.0-beta.8"
50
50
  },
51
- "gitHead": "02a5cafdc1e285697ea35093f51303802c34eda7"
51
+ "gitHead": "305bc1581dab7e8d1d44be7db1fb6e5e163fc87b"
52
52
  }