@rocketmakers/orbit-notify-firebase 2.0.0-beta.1 → 2.0.0-beta.10

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 (94) hide show
  1. package/README.md +8 -7
  2. package/lib/_tests_/manualTest/index.test.d.ts.map +1 -1
  3. package/lib/_tests_/manualTest/index.test.js +1 -1
  4. package/lib/_tests_/manualTest/index.test.js.map +1 -1
  5. package/lib/_tests_/manualTest/sendNotification.d.ts.map +1 -1
  6. package/lib/_tests_/manualTest/sendNotification.js +2 -6
  7. package/lib/_tests_/manualTest/sendNotification.js.map +1 -1
  8. package/lib/_tests_/manualTest/serviceInstance.d.ts +3 -3
  9. package/lib/_tests_/manualTest/serviceInstance.d.ts.map +1 -1
  10. package/lib/_tests_/manualTest/serviceInstance.js +7 -6
  11. package/lib/_tests_/manualTest/serviceInstance.js.map +1 -1
  12. package/lib/_tests_/unit/validation/index.test.d.ts.map +1 -1
  13. package/lib/_tests_/unit/validation/index.test.js +1 -1
  14. package/lib/_tests_/unit/validation/index.test.js.map +1 -1
  15. package/lib/_tests_/unit/validation/mockedService.d.ts +1 -1
  16. package/lib/_tests_/unit/validation/mockedService.d.ts.map +1 -1
  17. package/lib/_tests_/unit/validation/mockedService.js +3 -3
  18. package/lib/_tests_/unit/validation/mockedService.js.map +1 -1
  19. package/lib/_tests_/unit/validation/sendNotification.d.ts.map +1 -1
  20. package/lib/_tests_/unit/validation/sendNotification.js +8 -9
  21. package/lib/_tests_/unit/validation/sendNotification.js.map +1 -1
  22. package/lib/_tests_/validation/index.test.d.ts +2 -0
  23. package/lib/_tests_/validation/index.test.d.ts.map +1 -0
  24. package/lib/_tests_/validation/index.test.js +7 -0
  25. package/lib/_tests_/validation/index.test.js.map +1 -0
  26. package/lib/_tests_/validation/mockedService.d.ts +14 -0
  27. package/lib/_tests_/validation/mockedService.d.ts.map +1 -0
  28. package/lib/_tests_/validation/mockedService.js +20 -0
  29. package/lib/_tests_/validation/mockedService.js.map +1 -0
  30. package/lib/_tests_/validation/sendNotification.d.ts +2 -0
  31. package/lib/_tests_/validation/sendNotification.d.ts.map +1 -0
  32. package/lib/_tests_/validation/sendNotification.js +39 -0
  33. package/lib/_tests_/validation/sendNotification.js.map +1 -0
  34. package/lib/{src/config → config}/environment.generated.d.ts +1 -1
  35. package/lib/config/environment.generated.d.ts.map +1 -0
  36. package/lib/{src/config → config}/environment.generated.js +8 -11
  37. package/lib/config/environment.generated.js.map +1 -0
  38. package/lib/{src/config → config}/index.d.ts +0 -0
  39. package/lib/config/index.d.ts.map +1 -0
  40. package/lib/{src/config → config}/index.js +0 -0
  41. package/lib/config/index.js.map +1 -0
  42. package/lib/{src/index.d.ts → index.d.ts} +0 -0
  43. package/lib/index.d.ts.map +1 -0
  44. package/lib/{src/index.js → index.js} +0 -0
  45. package/lib/index.js.map +1 -0
  46. package/lib/{src/ioc → ioc}/index.d.ts +0 -0
  47. package/lib/ioc/index.d.ts.map +1 -0
  48. package/lib/{src/ioc → ioc}/index.js +0 -0
  49. package/lib/ioc/index.js.map +1 -0
  50. package/lib/ioc/register.d.ts +8 -0
  51. package/lib/ioc/register.d.ts.map +1 -0
  52. package/lib/ioc/register.js +31 -0
  53. package/lib/ioc/register.js.map +1 -0
  54. package/lib/{src/ioc → ioc}/types.d.ts +0 -3
  55. package/lib/ioc/types.d.ts.map +1 -0
  56. package/lib/{src/ioc → ioc}/types.js +0 -0
  57. package/lib/{src/ioc → ioc}/types.js.map +1 -1
  58. package/lib/{src/services → services}/firebaseService.d.ts +6 -3
  59. package/lib/services/firebaseService.d.ts.map +1 -0
  60. package/lib/{src/services → services}/firebaseService.js +28 -13
  61. package/lib/services/firebaseService.js.map +1 -0
  62. package/lib/{src/services → services}/index.d.ts +0 -0
  63. package/lib/services/index.d.ts.map +1 -0
  64. package/lib/{src/services → services}/index.js +0 -0
  65. package/lib/services/index.js.map +1 -0
  66. package/lib/tsconfig.tsbuildinfo +1 -11730
  67. package/lib/{src/validation → validation}/index.d.ts +1 -1
  68. package/lib/validation/index.d.ts.map +1 -0
  69. package/lib/{src/validation → validation}/index.js +4 -4
  70. package/lib/validation/index.js.map +1 -0
  71. package/package.json +17 -18
  72. package/lib/src/config/environment.generated.d.ts.map +0 -1
  73. package/lib/src/config/environment.generated.js.map +0 -1
  74. package/lib/src/config/index.d.ts.map +0 -1
  75. package/lib/src/config/index.js.map +0 -1
  76. package/lib/src/index.d.ts.map +0 -1
  77. package/lib/src/index.js.map +0 -1
  78. package/lib/src/ioc/container.d.ts +0 -13
  79. package/lib/src/ioc/container.d.ts.map +0 -1
  80. package/lib/src/ioc/container.js +0 -7
  81. package/lib/src/ioc/container.js.map +0 -1
  82. package/lib/src/ioc/index.d.ts.map +0 -1
  83. package/lib/src/ioc/index.js.map +0 -1
  84. package/lib/src/ioc/register.d.ts +0 -3
  85. package/lib/src/ioc/register.d.ts.map +0 -1
  86. package/lib/src/ioc/register.js +0 -27
  87. package/lib/src/ioc/register.js.map +0 -1
  88. package/lib/src/ioc/types.d.ts.map +0 -1
  89. package/lib/src/services/firebaseService.d.ts.map +0 -1
  90. package/lib/src/services/firebaseService.js.map +0 -1
  91. package/lib/src/services/index.d.ts.map +0 -1
  92. package/lib/src/services/index.js.map +0 -1
  93. package/lib/src/validation/index.d.ts.map +0 -1
  94. package/lib/src/validation/index.js.map +0 -1
package/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Exposes a service class that manages sending firebase push notifications.
4
4
 
5
+ ### Environment config
6
+
7
+ Once installed as a dependency, any env vars required by this package will be listed as properties of the `@rocketmakers/environment` generated class found at `node_modules/@rocketmakers/orbit-notify-firebase/lib/config/environment.generated.d.ts`.
8
+
5
9
  ### Implementation
6
10
 
7
11
  When using `@rocketmakers/orbit-notify-firebase` there are two options to register service classes with your ioc framework.
@@ -16,15 +20,12 @@ You can bootstrap notify-firebase service classes using the exposed `registerFir
16
20
 
17
21
  ```typescript
18
22
  // Register core types and services from @rocketmakers/orbit-core
19
- registerCoreIoC();
23
+ const coreContainer = registerCoreIoC(logger);
20
24
 
21
25
  // Register anonymous notification template repository, template service and firebase service
22
- registerFirebaseIoC({
23
- firebaseClientEmail,
24
- firebasePrivateKey,
25
- firebaseProjectId,
26
- rootTemplateRepoUrl,
27
- });
26
+ const firebaseServiceContainer = await registerFirebaseIoC(coreContainer);
27
+
28
+ await firebaseServiceContainer.get('firebaseTemplateService').initCache();
28
29
  ```
29
30
 
30
31
  Details on template repository setup can be found in the `@rocketmakers/orbit-template-http-repository` documentation.
@@ -1 +1 @@
1
- {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../_tests_/manualTest/index.test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/_tests_/manualTest/index.test.ts"],"names":[],"mappings":""}
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const sendNotification_1 = require("./sendNotification");
4
4
  describe('FirebaseService - manual', () => {
5
- sendNotification_1.sendNotificationTests();
5
+ (0, sendNotification_1.sendNotificationTests)();
6
6
  });
7
7
  //# sourceMappingURL=index.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../_tests_/manualTest/index.test.ts"],"names":[],"mappings":";;AAAA,yDAA2D;AAE3D,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,wCAAqB,EAAE,CAAC;AAC1B,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/_tests_/manualTest/index.test.ts"],"names":[],"mappings":";;AAAA,yDAA2D;AAE3D,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,IAAA,wCAAqB,GAAE,CAAC;AAC1B,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sendNotification.d.ts","sourceRoot":"","sources":["../../../_tests_/manualTest/sendNotification.ts"],"names":[],"mappings":"AAwDA,wBAAgB,qBAAqB,SAUpC"}
1
+ {"version":3,"file":"sendNotification.d.ts","sourceRoot":"","sources":["../../../src/_tests_/manualTest/sendNotification.ts"],"names":[],"mappings":"AAkDA,wBAAgB,qBAAqB,SAQpC"}
@@ -2,15 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sendNotificationTests = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const chai = require("chai");
6
- const chai_1 = require("chai");
7
- const chaiAsPromised = require("chai-as-promised");
8
5
  const FirebaseAdmin = require("firebase-admin");
9
6
  const orbit_core_1 = require("@rocketmakers/orbit-core");
10
7
  const serviceInstance_1 = require("./serviceInstance");
11
8
  function send() {
12
9
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
- const { firebaseService, templateService } = serviceInstance_1.getServiceInstance();
10
+ const { firebaseService, templateService } = (0, serviceInstance_1.getServiceInstance)();
14
11
  const layoutId = 'login';
15
12
  const payload = {
16
13
  name: 'product team',
@@ -40,10 +37,9 @@ function send() {
40
37
  }
41
38
  function sendNotificationTests() {
42
39
  describe('sendNotification', () => {
43
- chai.use(chaiAsPromised);
44
40
  it('can send notification', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
45
41
  const res = yield send();
46
- chai_1.expect(res).to.eql(true);
42
+ expect(res).toEqual(true);
47
43
  }));
48
44
  });
49
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sendNotification.js","sourceRoot":"","sources":["../../../_tests_/manualTest/sendNotification.ts"],"names":[],"mappings":";;;;AAEA,6BAA6B;AAE7B,+BAA8B;AAC9B,mDAAmD;AACnD,gDAAgD;AAChD,yDAAgE;AAGhE,uDAAuD;AASvD,SAAe,IAAI;;QAIjB,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,GAAG,oCAAkB,EAAE,CAAC;QAElE,MAAM,QAAQ,GAAG,OAAmB,CAAC;QACrC,MAAM,OAAO,GAAkB;YAC7B,IAAI,EAAE,cAAc;YACpB,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AAQ,GAAG,OAAmB,CAAC;QACrC,MAAM,OAAO,GAAkB;YAC7B,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE,sBAAsB;YAChC,aAAa,EAAE,2BAA2B;YAC1C,QAAQ,EAAE,QAAQ;SACnB,CAAC;QAGF,MAAM,eAAe,CAAC,SAAS,EAAE,CAAC;QAElC,MAAM,OAAO,GAAG,IAAI,iCAAoB,EAAE,CAAC,QAAQ,EAAE,CAAC;QACtD,MAAM,mBAAmB,GAAG,MAAM,aAAa,CAAC,IAAI,EAAE,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAGlF,IAAI;YACF,OAAO,eAAe,CAAC,gBAAgB,CAAgB;gBACrD,mBAAmB;gBACnB,QAAQ;gBACR,YAAY,EAAE,KAAK;gBACnB,OAAO,EAAE;oBACP,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,WAAW;oBAClB,QAAQ,EAAE,iCAAiC;iBAC5C;aACF,CAAC,CAAC;SACJ;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;SACxB;IACH,CAAC;CAAA;AAED,SAAgB,qBAAqB;IACnC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,EAAE,CAAC,uBAAuB,EAAE,GAAS,EAAE;YACrC,MAAM,GAAG,GAAG,MAAM,IAAI,EAAE,CAAC;YAEzB,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AARD,sDAQC"}
@@ -1,8 +1,8 @@
1
- import { AnonHttpRepository } from '@rocketmakers/orbit-template-http-repository';
1
+ import { TemplateRepository } from '@rocketmakers/orbit-template-http-repository';
2
2
  import { TemplateService } from '@rocketmakers/orbit-template-service';
3
- import { FirebaseService } from '../../src';
3
+ import { FirebaseService } from '../../services';
4
4
  export declare function getServiceInstance(): {
5
- templateRepo: AnonHttpRepository;
5
+ templateRepo: TemplateRepository;
6
6
  templateService: TemplateService;
7
7
  firebaseService: FirebaseService;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"serviceInstance.d.ts","sourceRoot":"","sources":["../../../_tests_/manualTest/serviceInstance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAI5C,wBAAgB,kBAAkB;;;;EAoBjC"}
1
+ {"version":3,"file":"serviceInstance.d.ts","sourceRoot":"","sources":["../../../src/_tests_/manualTest/serviceInstance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAmB,MAAM,8CAA8C,CAAC;AAInG,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAIjD,wBAAgB,kBAAkB;;;;EAwBjC"}
@@ -2,10 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getServiceInstance = void 0;
4
4
  const orbit_template_http_repository_1 = require("@rocketmakers/orbit-template-http-repository");
5
+ const orbit_core_1 = require("@rocketmakers/orbit-core");
5
6
  const logger_1 = require("@rocketmakers/shell-commands/lib/logger");
6
7
  const orbit_template_service_1 = require("@rocketmakers/orbit-template-service");
7
- const src_1 = require("../../src");
8
- const logger = logger_1.createLogger('sendgrid-service-manual-test');
8
+ const services_1 = require("../../services");
9
+ const logger = (0, logger_1.createLogger)('sendgrid-service-manual-test');
9
10
  function getServiceInstance() {
10
11
  const templateGitlabUrl = process.env.TEMPLATES_URL;
11
12
  const serviceAccount = {
@@ -14,11 +15,11 @@ function getServiceInstance() {
14
15
  client_email: 'firebase-adminsdk-s5pgs@manual-tester.iam.gserviceaccount.com',
15
16
  };
16
17
  if (!templateGitlabUrl) {
17
- throw new Error('Template gitlab root url must be provided for manual testing through the env variable: TEMPLATES_URL');
18
+ throw new orbit_core_1.ConfigurationError('Template gitlab root url must be provided for manual testing through the env variable: TEMPLATES_URL');
18
19
  }
19
- const templateRepo = new orbit_template_http_repository_1.AnonHttpRepository(templateGitlabUrl, 'sendgrid', logger);
20
- const templateService = new orbit_template_service_1.TemplateService(templateRepo);
21
- const firebaseService = new src_1.FirebaseService(templateService, serviceAccount, logger);
20
+ const templateRepo = new orbit_template_http_repository_1.TemplateRepository(logger, 'firebase', new orbit_template_http_repository_1.AnonHttpFetcher(new URL(templateGitlabUrl)));
21
+ const templateService = new orbit_template_service_1.TemplateService(templateRepo, logger);
22
+ const firebaseService = new services_1.FirebaseService(templateService, serviceAccount, logger);
22
23
  return { templateRepo, templateService, firebaseService };
23
24
  }
24
25
  exports.getServiceInstance = getServiceInstance;
@@ -1 +1 @@
1
- {"version":3,"file":"serviceInstance.js","sourceRoot":"","sources":["../../../_tests_/manualTest/serviceInstance.ts"],"names":[],"mappings":";;;AAAA,iGAAkF;AAClF,oEAAuE;AACvE,iFAAuE;AACvE,mCAA4C;AAE5C,MAAM,MAAM,GAAG,qBAAY,CAAC,8BAA8B,CAAC,CAAC;AAE5D,SAAgB,kBAAkB;IAChC,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IAEpD,MAAM,cAAc,GAAG;QACrB,UAAU,EAAE,eAAe;QAC3B,WAAW,EACT,ssDAAssD;QACxsD,YAAY,EAAE,+DAA+D;KAC9E,CAAC;IAEF,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,KAAK,CACb,sGAAsG,CACvG,CAAC;KACH;IAED,MAAM,YAAY,GAAG,IAAI,mDAAkB,CAAC,iBAA2B,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAC7F,MAAM,eAAe,GAAG,IAAI,wCAAe,CAAC,YAAY,CAAC,CAAC;IAC1D,MAAM,eAAe,GAAG,IAAI,qBAAe,CAAC,eAAe,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;IACrF,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;AAC5D,CAAC;AApBD,gDAoBC"}
1
+ {"version":3,"file":"serviceInstance.js","sourceRoot":"","sources":["../../../src/_tests_/manualTest/serviceInstance.ts"],"names":[],"mappings":";;;AAAA,iGAAmG;AACnG,yDAA8D;AAC9D,oEAAuE;AAEvE,iFAAuE;AACvE,6CAAiD;AAEjD,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,8BAA8B,CAAC,CAAC;AAE5D,SAAgB,kBAAkB;IAChC,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IAEpD,MAAM,cAAc,GAAG;QACrB,UAAU,EAAE,eAAe;QAC3B,WAAW,EACT,ssDAAssD;QACxsD,YAAY,EAAE,+DAA+D;KAC9E,CAAC;IAEF,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,+BAAkB,CAC1B,sGAAsG,CACvG,CAAC;KACH;IAED,MAAM,YAAY,GAAG,IAAI,mDAAkB,CACzC,MAAM,EACN,UAA+B,EAC/B,IAAI,gDAAe,CAAC,IAAI,GAAG,CAAC,iBAA2B,CAAC,CAAC,CAC1D,CAAC;IACF,MAAM,eAAe,GAAG,IAAI,wCAAe,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAClE,MAAM,eAAe,GAAG,IAAI,0BAAe,CAAC,eAAe,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;IACrF,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;AAC5D,CAAC;AAxBD,gDAwBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../_tests_/unit/validation/index.test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../src/_tests_/unit/validation/index.test.ts"],"names":[],"mappings":""}
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const sendNotification_1 = require("./sendNotification");
4
4
  describe('FirebaseService - validation', () => {
5
- sendNotification_1.sendNotificationTests();
5
+ (0, sendNotification_1.sendNotificationTests)();
6
6
  });
7
7
  //# sourceMappingURL=index.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../../_tests_/unit/validation/index.test.ts"],"names":[],"mappings":";;AAAA,yDAA2D;AAE3D,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,wCAAqB,EAAE,CAAC;AAC1B,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../../src/_tests_/unit/validation/index.test.ts"],"names":[],"mappings":";;AAAA,yDAA2D;AAE3D,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,IAAA,wCAAqB,GAAE,CAAC;AAC1B,CAAC,CAAC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  import * as TypeMoq from 'typemoq';
3
3
  import { TemplateService } from '@rocketmakers/orbit-template-service';
4
4
  import { Logger } from '@rocketmakers/shell-commands/lib/logger';
5
- import { FirebaseService, IGoogleServiceAccount } from '../../../src';
5
+ import { FirebaseService, IGoogleServiceAccount } from '../../..';
6
6
  export declare class MockedFirebaseService {
7
7
  mockedTemplateService: TypeMoq.IMock<TemplateService>;
8
8
  serviceAccount: IGoogleServiceAccount;
@@ -1 +1 @@
1
- {"version":3,"file":"mockedService.d.ts","sourceRoot":"","sources":["../../../../_tests_/unit/validation/mockedService.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAgB,MAAM,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEtE,qBAAa,qBAAqB;IACzB,qBAAqB,EAAE,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAEtD,cAAc,EAAE,qBAAqB,CAAC;IAEtC,OAAO,EAAE,eAAe,CAAC;IAEzB,MAAM,EAAE,MAAM,CAAC;;CAavB"}
1
+ {"version":3,"file":"mockedService.d.ts","sourceRoot":"","sources":["../../../../src/_tests_/unit/validation/mockedService.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAgB,MAAM,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAElE,qBAAa,qBAAqB;IACzB,qBAAqB,EAAE,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAEtD,cAAc,EAAE,qBAAqB,CAAC;IAEtC,OAAO,EAAE,eAAe,CAAC;IAEzB,MAAM,EAAE,MAAM,CAAC;;CAavB"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MockedFirebaseService = void 0;
4
4
  const TypeMoq = require("typemoq");
5
5
  const logger_1 = require("@rocketmakers/shell-commands/lib/logger");
6
- const src_1 = require("../../../src");
6
+ const __1 = require("../../..");
7
7
  class MockedFirebaseService {
8
8
  constructor() {
9
9
  this.mockedTemplateService = TypeMoq.Mock.ofType();
@@ -12,8 +12,8 @@ class MockedFirebaseService {
12
12
  private_key: 'my-super-cool-key',
13
13
  client_email: 'firebase-adminsdk-s5pgs@manual-tester.iam.gserviceaccount.com',
14
14
  };
15
- this.logger = logger_1.createLogger('firebase-service-tests');
16
- this.service = new src_1.FirebaseService(this.mockedTemplateService.object, this.serviceAccount, this.logger);
15
+ this.logger = (0, logger_1.createLogger)('firebase-service-tests');
16
+ this.service = new __1.FirebaseService(this.mockedTemplateService.object, this.serviceAccount, this.logger, true);
17
17
  }
18
18
  }
19
19
  exports.MockedFirebaseService = MockedFirebaseService;
@@ -1 +1 @@
1
- {"version":3,"file":"mockedService.js","sourceRoot":"","sources":["../../../../_tests_/unit/validation/mockedService.ts"],"names":[],"mappings":";;;AACA,mCAAmC;AAEnC,oEAA+E;AAC/E,sCAAsE;AAEtE,MAAa,qBAAqB;IAShC;QACE,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAmB,CAAC;QACpE,IAAI,CAAC,cAAc,GAAG;YACpB,UAAU,EAAE,eAAe;YAC3B,WAAW,EAAE,mBAAmB;YAChC,YAAY,EAAE,+DAA+D;SAC9E,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,qBAAY,CAAC,wBAAwB,CAAC,CAAC;QAErD,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAe,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1G,CAAC;CACF;AApBD,sDAoBC"}
1
+ {"version":3,"file":"mockedService.js","sourceRoot":"","sources":["../../../../src/_tests_/unit/validation/mockedService.ts"],"names":[],"mappings":";;;AACA,mCAAmC;AAEnC,oEAA+E;AAC/E,gCAAkE;AAElE,MAAa,qBAAqB;IAShC;QACE,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAmB,CAAC;QACpE,IAAI,CAAC,cAAc,GAAG;YACpB,UAAU,EAAE,eAAe;YAC3B,WAAW,EAAE,mBAAmB;YAChC,YAAY,EAAE,+DAA+D;SAC9E,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAA,qBAAY,EAAC,wBAAwB,CAAC,CAAC;QAErD,IAAI,CAAC,OAAO,GAAG,IAAI,mBAAe,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChH,CAAC;CACF;AApBD,sDAoBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sendNotification.d.ts","sourceRoot":"","sources":["../../../../_tests_/unit/validation/sendNotification.ts"],"names":[],"mappings":"AAWA,wBAAgB,qBAAqB,SA0CpC"}
1
+ {"version":3,"file":"sendNotification.d.ts","sourceRoot":"","sources":["../../../../src/_tests_/unit/validation/sendNotification.ts"],"names":[],"mappings":"AAKA,wBAAgB,qBAAqB,SAoCpC"}
@@ -2,15 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sendNotificationTests = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const chai = require("chai");
6
- const chai_1 = require("chai");
7
- const chaiAsPromised = require("chai-as-promised");
8
5
  const orbit_testing_core_1 = require("@rocketmakers/orbit-testing-core");
9
- const orbit_core_1 = require("@rocketmakers/orbit-core");
10
6
  const mockedService_1 = require("./mockedService");
11
7
  function sendNotificationTests() {
12
8
  describe('sendNotification', () => {
13
- chai.use(chaiAsPromised);
14
9
  function setupBaseValidMock() {
15
10
  const mock = new mockedService_1.MockedFirebaseService();
16
11
  const firebaseDeviceToken = 'MY-COOL-DEVICE';
@@ -22,16 +17,20 @@ function sendNotificationTests() {
22
17
  orbit_testing_core_1.invalidValues.forEach((val) => tslib_1.__awaiter(this, void 0, void 0, function* () {
23
18
  const { mock, firebaseDeviceToken, layoutId, templateName, payload } = setupBaseValidMock();
24
19
  it(`throws validation error when '${val}' is provided as deviceToken`, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
25
- chai_1.expect(mock.service.sendNotification({ firebaseDeviceToken: val, layoutId, templateName, payload })).to.eventually.be.rejectedWith(orbit_core_1.ValidationError);
20
+ const res = yield mock.service.sendNotification({ firebaseDeviceToken: val, layoutId, templateName, payload });
21
+ expect(res.kind).toEqual('ValidationError');
26
22
  }));
27
23
  it(`throws validation error when '${val}' is provided as layout id`, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
28
- chai_1.expect(mock.service.sendNotification({ firebaseDeviceToken, layoutId: val, templateName, payload })).to.eventually.be.rejectedWith(orbit_core_1.ValidationError);
24
+ const res = yield mock.service.sendNotification({ firebaseDeviceToken, layoutId: val, templateName, payload });
25
+ expect(res.kind).toEqual('ValidationError');
29
26
  }));
30
27
  it(`throws validation error when '${val}' is provided as template name`, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
31
- chai_1.expect(mock.service.sendNotification({ firebaseDeviceToken, layoutId, templateName: val, payload })).to.eventually.be.rejectedWith(orbit_core_1.ValidationError);
28
+ const res = yield mock.service.sendNotification({ firebaseDeviceToken, layoutId, templateName: val, payload });
29
+ expect(res.kind).toEqual('ValidationError');
32
30
  }));
33
31
  it(`throws validation error when '${val}' is provided as payload`, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
34
- chai_1.expect(mock.service.sendNotification({ firebaseDeviceToken, layoutId, templateName, payload: val })).to.eventually.be.rejectedWith(orbit_core_1.ValidationError);
32
+ const res = yield mock.service.sendNotification({ firebaseDeviceToken, layoutId, templateName, payload: val });
33
+ expect(res.kind).toEqual('ValidationError');
35
34
  }));
36
35
  }));
37
36
  });
@@ -1 +1 @@
1
- {"version":3,"file":"sendNotification.js","sourceRoot":"","sources":["../../../../_tests_/unit/validation/sendNotification.ts"],"names":[],"mappings":";;;;AAEA,6BAA6B;AAE7B,+BAA8B;AAC9B,mDAAmD;AACnD,yEAAiE;AAEjE,yDAA2D;AAC3D,mDAAwD;AAExD,SAAgB,qBAAqB;IACnC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAEzB,SAAS,kBAAkB;YACzB,MAAM,IAAI,GAAG,IAAI,qCAAqB,EAAE,CAAC;YACzC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;YAC7C,MAAM,QAAQ,GAAG,gBAA4B,CAAC;YAC9C,MAAM,YAAY,GAAG,kBAAk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AAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AApCD,sDAoCC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/_tests_/validation/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const sendNotification_1 = require("./sendNotification");
4
+ describe('FirebaseService - validation', () => {
5
+ (0, sendNotification_1.sendNotificationTests)();
6
+ });
7
+ //# sourceMappingURL=index.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/_tests_/validation/index.test.ts"],"names":[],"mappings":";;AAAA,yDAA2D;AAE3D,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC5C,IAAA,wCAAqB,GAAE,CAAC;AAC1B,CAAC,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="bunyan" />
2
+ import * as TypeMoq from 'typemoq';
3
+ import { TemplateService } from '@rocketmakers/orbit-template-service';
4
+ import { Logger } from '@rocketmakers/shell-commands/lib/logger';
5
+ import { IGoogleServiceAccount } from '../../config';
6
+ import { FirebaseService } from '../../services';
7
+ export declare class MockedFirebaseService {
8
+ mockedTemplateService: TypeMoq.IMock<TemplateService>;
9
+ serviceAccount: IGoogleServiceAccount;
10
+ service: FirebaseService;
11
+ logger: Logger;
12
+ constructor();
13
+ }
14
+ //# sourceMappingURL=mockedService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockedService.d.ts","sourceRoot":"","sources":["../../../src/_tests_/validation/mockedService.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAgB,MAAM,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,qBAAa,qBAAqB;IACzB,qBAAqB,EAAE,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAEtD,cAAc,EAAE,qBAAqB,CAAC;IAEtC,OAAO,EAAE,eAAe,CAAC;IAEzB,MAAM,EAAE,MAAM,CAAC;;CAavB"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MockedFirebaseService = void 0;
4
+ const TypeMoq = require("typemoq");
5
+ const logger_1 = require("@rocketmakers/shell-commands/lib/logger");
6
+ const services_1 = require("../../services");
7
+ class MockedFirebaseService {
8
+ constructor() {
9
+ this.mockedTemplateService = TypeMoq.Mock.ofType();
10
+ this.serviceAccount = {
11
+ project_id: 'manual-tester',
12
+ private_key: 'my-super-cool-key',
13
+ client_email: 'firebase-adminsdk-s5pgs@manual-tester.iam.gserviceaccount.com',
14
+ };
15
+ this.logger = (0, logger_1.createLogger)('firebase-service-tests');
16
+ this.service = new services_1.FirebaseService(this.mockedTemplateService.object, this.serviceAccount, this.logger, true);
17
+ }
18
+ }
19
+ exports.MockedFirebaseService = MockedFirebaseService;
20
+ //# sourceMappingURL=mockedService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockedService.js","sourceRoot":"","sources":["../../../src/_tests_/validation/mockedService.ts"],"names":[],"mappings":";;;AACA,mCAAmC;AAEnC,oEAA+E;AAE/E,6CAAiD;AAEjD,MAAa,qBAAqB;IAShC;QACE,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,EAAmB,CAAC;QACpE,IAAI,CAAC,cAAc,GAAG;YACpB,UAAU,EAAE,eAAe;YAC3B,WAAW,EAAE,mBAAmB;YAChC,YAAY,EAAE,+DAA+D;SAC9E,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAA,qBAAY,EAAC,wBAAwB,CAAC,CAAC;QAErD,IAAI,CAAC,OAAO,GAAG,IAAI,0BAAe,CAAC,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAChH,CAAC;CACF;AApBD,sDAoBC"}
@@ -0,0 +1,2 @@
1
+ export declare function sendNotificationTests(): void;
2
+ //# sourceMappingURL=sendNotification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendNotification.d.ts","sourceRoot":"","sources":["../../../src/_tests_/validation/sendNotification.ts"],"names":[],"mappings":"AAKA,wBAAgB,qBAAqB,SAoCpC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sendNotificationTests = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const orbit_testing_core_1 = require("@rocketmakers/orbit-testing-core");
6
+ const mockedService_1 = require("./mockedService");
7
+ function sendNotificationTests() {
8
+ describe('sendNotification', () => {
9
+ function setupBaseValidMock() {
10
+ const mock = new mockedService_1.MockedFirebaseService();
11
+ const firebaseDeviceToken = 'MY-COOL-DEVICE';
12
+ const layoutId = 'MY-COOL-LAYOUT';
13
+ const templateName = 'MY-COOL-TEMPLATE';
14
+ const payload = { data: { name: 'TIM' } };
15
+ return { mock, firebaseDeviceToken, layoutId, templateName, payload };
16
+ }
17
+ orbit_testing_core_1.invalidValues.forEach((val) => tslib_1.__awaiter(this, void 0, void 0, function* () {
18
+ const { mock, firebaseDeviceToken, layoutId, templateName, payload } = setupBaseValidMock();
19
+ it(`throws validation error when '${val}' is provided as deviceToken`, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
20
+ const res = yield mock.service.sendNotification({ firebaseDeviceToken: val, layoutId, templateName, payload });
21
+ expect(res.kind).toEqual('ValidationError');
22
+ }));
23
+ it(`throws validation error when '${val}' is provided as layout id`, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
24
+ const res = yield mock.service.sendNotification({ firebaseDeviceToken, layoutId: val, templateName, payload });
25
+ expect(res.kind).toEqual('ValidationError');
26
+ }));
27
+ it(`throws validation error when '${val}' is provided as template name`, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
28
+ const res = yield mock.service.sendNotification({ firebaseDeviceToken, layoutId, templateName: val, payload });
29
+ expect(res.kind).toEqual('ValidationError');
30
+ }));
31
+ it(`throws validation error when '${val}' is provided as payload`, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
32
+ const res = yield mock.service.sendNotification({ firebaseDeviceToken, layoutId, templateName, payload: val });
33
+ expect(res.kind).toEqual('ValidationError');
34
+ }));
35
+ }));
36
+ });
37
+ }
38
+ exports.sendNotificationTests = sendNotificationTests;
39
+ //# sourceMappingURL=sendNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendNotification.js","sourceRoot":"","sources":["../../../src/_tests_/validation/sendNotification.ts"],"names":[],"mappings":";;;;AACA,yEAAiE;AAEjE,mDAAwD;AAExD,SAAgB,qBAAqB;IACnC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,SAAS,kBAAkB;YACzB,MAAM,IAAI,GAAG,IAAI,qCAAqB,EAAE,CAAC;YACzC,MAAM,mBAAmB,GAAG,gBAAgB,CAAC;YAC7C,MAAM,QAAQ,GAAG,gBAA4B,CAAC;YAC9C,MAAM,YAAY,GAAG,kBAAkB,CAAC;YACxC,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAE1C,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;QACxE,CAAC;QAED,kCAAa,CAAC,OAAO,CAAC,CAAM,GAAG,EAAC,EAAE;YAChC,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,YAAY,E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gBAC/G,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;YAC9C,CAAC,CAAA,CAAC,CAAC;QACL,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AApCD,sDAoCC"}
@@ -1,4 +1,4 @@
1
- export declare class DefaultEnvironment {
1
+ export declare class FirebaseEnvironment {
2
2
  firebaseClientEmail: string;
3
3
  firebasePrivateKey: string;
4
4
  firebaseProjectId: string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.generated.d.ts","sourceRoot":"","sources":["../../src/config/environment.generated.ts"],"names":[],"mappings":"AAOA,qBAAa,mBAAmB;IAG5B,mBAAmB,EAAG,MAAM,CAAC;IAG7B,kBAAkB,EAAG,MAAM,CAAC;IAG5B,iBAAiB,EAAG,MAAM,CAAC;IAG3B,mBAAmB,EAAG,MAAM,CAAC;CAChC"}
@@ -1,28 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DefaultEnvironment = void 0;
3
+ exports.FirebaseEnvironment = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const environment_1 = require("@rocketmakers/environment");
6
- let DefaultEnvironment = class DefaultEnvironment {
7
- };
6
+ class FirebaseEnvironment {
7
+ }
8
8
  tslib_1.__decorate([
9
9
  environment_1.environmentVariable.string('FIREBASE_CLIENT_EMAIL'),
10
10
  tslib_1.__metadata("design:type", String)
11
- ], DefaultEnvironment.prototype, "firebaseClientEmail", void 0);
11
+ ], FirebaseEnvironment.prototype, "firebaseClientEmail", void 0);
12
12
  tslib_1.__decorate([
13
13
  environment_1.environmentVariable.string('FIREBASE_PRIVATE_KEY'),
14
14
  tslib_1.__metadata("design:type", String)
15
- ], DefaultEnvironment.prototype, "firebasePrivateKey", void 0);
15
+ ], FirebaseEnvironment.prototype, "firebasePrivateKey", void 0);
16
16
  tslib_1.__decorate([
17
17
  environment_1.environmentVariable.string('FIREBASE_PROJECT_ID'),
18
18
  tslib_1.__metadata("design:type", String)
19
- ], DefaultEnvironment.prototype, "firebaseProjectId", void 0);
19
+ ], FirebaseEnvironment.prototype, "firebaseProjectId", void 0);
20
20
  tslib_1.__decorate([
21
21
  environment_1.environmentVariable.string('ROOT_TEMPLATE_REPO_URL'),
22
22
  tslib_1.__metadata("design:type", String)
23
- ], DefaultEnvironment.prototype, "rootTemplateRepoUrl", void 0);
24
- DefaultEnvironment = tslib_1.__decorate([
25
- environment_1.environmentVariable.namespace('DEFAULT')
26
- ], DefaultEnvironment);
27
- exports.DefaultEnvironment = DefaultEnvironment;
23
+ ], FirebaseEnvironment.prototype, "rootTemplateRepoUrl", void 0);
24
+ exports.FirebaseEnvironment = FirebaseEnvironment;
28
25
  //# sourceMappingURL=environment.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.generated.js","sourceRoot":"","sources":["../../src/config/environment.generated.ts"],"names":[],"mappings":";;;;AAKA,2DAAgE;AAEhE,MAAa,mBAAmB;CAa/B;AAVG;IADC,iCAAmB,CAAC,MAAM,CAAC,uBAAuB,CAAC;;gEACvB;AAG7B;IADC,iCAAmB,CAAC,MAAM,CAAC,sBAAsB,CAAC;;+DACvB;AAG5B;IADC,iCAAmB,CAAC,MAAM,CAAC,qBAAqB,CAAC;;8DACvB;AAG3B;IADC,iCAAmB,CAAC,MAAM,CAAC,wBAAwB,CAAC;;gEACxB;AAZjC,kDAaC"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AAExC,MAAM,WAAW,qBAAqB;IAEpC,UAAU,EAAE,MAAM,CAAC;IAEnB,WAAW,EAAE,MAAM,CAAC;IAEpB,YAAY,EAAE,MAAM,CAAC;CACtB"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;AAAA,kEAAwC"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAIA,mDAAyB;AACzB,gDAAsB;AACtB,qDAA2B;AAC3B,uDAA6B"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ioc/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
File without changes
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ioc/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B;AAC3B,kDAAwB"}
@@ -0,0 +1,8 @@
1
+ import { TemplateServiceIoC } from '@rocketmakers/orbit-template-service';
2
+ import { IContainer } from '@rocketmakers/ioc';
3
+ import { ICoreContainerTypes } from '@rocketmakers/orbit-core';
4
+ import { IServicesContainerTypes } from './types';
5
+ declare type ServiceName = 'firebase';
6
+ export declare function registerFirebaseIoC(container: IContainer<ICoreContainerTypes>): Promise<IContainer<IServicesContainerTypes & TemplateServiceIoC<ServiceName>>>;
7
+ export {};
8
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/ioc/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAGtG,OAAO,EAAE,UAAU,EAAY,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAIlD,aAAK,WAAW,GAAG,UAAU,CAAC;AAqC9B,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,UAAU,CAAC,mBAAmB,CAAC,GACzC,OAAO,CAAC,UAAU,CAAC,uBAAuB,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,CA4BhF"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerFirebaseIoC = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const orbit_template_service_1 = require("@rocketmakers/orbit-template-service");
6
+ const orbit_template_http_repository_1 = require("@rocketmakers/orbit-template-http-repository");
7
+ const environment_1 = require("@rocketmakers/environment");
8
+ const ioc_1 = require("@rocketmakers/ioc");
9
+ const services_1 = require("../services");
10
+ const config_1 = require("../config");
11
+ function registerFirebaseIoC(container) {
12
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+ const env = yield (0, environment_1.readFromEnvironment)(config_1.FirebaseEnvironment);
14
+ const serviceName = 'firebase';
15
+ const templateRepoContainer = yield (0, orbit_template_http_repository_1.registerTemplateRepositoryIoC)(serviceName, container);
16
+ const templateServicesContainer = (0, orbit_template_service_1.registerTemplateServiceIoC)(serviceName, templateRepoContainer);
17
+ const { firebaseClientEmail, firebasePrivateKey, firebaseProjectId } = env;
18
+ return (0, ioc_1.register)({
19
+ firebaseNotifyConfig: builder => builder.constant({
20
+ client_email: firebaseClientEmail,
21
+ private_key: firebasePrivateKey,
22
+ project_id: firebaseProjectId,
23
+ }),
24
+ firebaseService: builder => builder
25
+ .class(services_1.FirebaseService, ['firebaseTemplateService', 'firebaseNotifyConfig', 'logger'])
26
+ .inSingletonScope(),
27
+ }, templateServicesContainer);
28
+ });
29
+ }
30
+ exports.registerFirebaseIoC = registerFirebaseIoC;
31
+ //# sourceMappingURL=register.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/ioc/register.ts"],"names":[],"mappings":";;;;AAAA,iFAAsG;AACtG,iGAA6F;AAC7F,2DAAgE;AAChE,2CAAyD;AAGzD,0CAA8C;AAC9C,sCAAgD;AAuChD,SAAsB,mBAAmB,CACvC,SAA0C;;QAE1C,MAAM,GAAG,GAAG,MAAM,IAAA,iCAAmB,EAAC,4BAAmB,CAAC,CAAC;QAE3D,MAAM,WAAW,GAAgB,UAAU,CAAC;QAE5C,MAAM,qBAAqB,GAAG,MAAM,IAAA,8DAA6B,EAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAG1F,MAAM,yBAAyB,GAAG,IAAA,mDAA0B,EAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC;QAEjG,MAAM,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,GAAG,GAAG,CAAC;QAE3E,OAAO,IAAA,cAAQ,EACb;YACE,oBAAoB,EAAE,OAAO,CAAC,EAAE,CAC9B,OAAO,CAAC,QAAQ,CAAC;gBACf,YAAY,EAAE,mBAAmB;gBACjC,WAAW,EAAE,kBAAkB;gBAC/B,UAAU,EAAE,iBAAiB;aAC9B,CAAC;YAEJ,eAAe,EAAE,OAAO,CAAC,EAAE,CACzB,OAAO;iBACJ,KAAK,CAAC,0BAAe,EAAE,CAAC,yBAAyB,EAAE,sBAAsB,EAAE,QAAQ,CAAC,CAAC;iBACrF,gBAAgB,EAAE;SACxB,EACD,yBAAyB,CAC1B,CAAC;IACJ,CAAC;CAAA;AA9BD,kDA8BC"}
@@ -1,10 +1,7 @@
1
- /// <reference types="bunyan" />
2
- import { Logger } from '@rocketmakers/log';
3
1
  import { FirebaseService } from '../services';
4
2
  import { IGoogleServiceAccount } from '..';
5
3
  export interface IServicesContainerTypes {
6
4
  firebaseNotifyConfig: IGoogleServiceAccount;
7
- logger: Logger;
8
5
  firebaseService: FirebaseService;
9
6
  }
10
7
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/ioc/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAE3C,MAAM,WAAW,uBAAuB;IAEtC,oBAAoB,EAAE,qBAAqB,CAAC;IAG5C,eAAe,EAAE,eAAe,CAAC;CAClC"}
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/ioc/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/ioc/types.ts"],"names":[],"mappings":""}
@@ -1,5 +1,7 @@
1
1
  /// <reference types="bunyan" />
2
2
  import { Logger } from '@rocketmakers/log';
3
+ import { IOrbitResponse } from '@rocketmakers/orbit-core';
4
+ import { ITemplateNotFound, ILayoutNotFound } from '@rocketmakers/orbit-template-core';
3
5
  import { TemplateService } from '@rocketmakers/orbit-template-service';
4
6
  import { IGoogleServiceAccount } from '..';
5
7
  export declare namespace FirebaseServiceParams {
@@ -16,14 +18,15 @@ export interface IFirebasePayload<TPayloadData> {
16
18
  imageUrl?: string;
17
19
  }
18
20
  export interface IFirebaseService {
19
- sendNotification<TPayloadData>(params: FirebaseServiceParams.ISendNotification<TPayloadData>): Promise<boolean>;
21
+ sendNotification<TPayloadData>(params: FirebaseServiceParams.ISendNotification<TPayloadData>): IOrbitResponse<boolean, ITemplateNotFound | ILayoutNotFound>;
20
22
  }
21
23
  export declare class FirebaseService implements IFirebaseService {
22
24
  private templateService;
23
25
  private serviceAccount;
24
26
  private logger;
27
+ private isTestInstance;
25
28
  private app;
26
- constructor(templateService: TemplateService, serviceAccount: IGoogleServiceAccount, logger: Logger);
27
- sendNotification<TPayloadData>(params: FirebaseServiceParams.ISendNotification<TPayloadData>): Promise<boolean>;
29
+ constructor(templateService: TemplateService, serviceAccount: IGoogleServiceAccount, logger: Logger, isTestInstance?: boolean);
30
+ sendNotification<TPayloadData>(params: FirebaseServiceParams.ISendNotification<TPayloadData>): IOrbitResponse<boolean, ITemplateNotFound | ILayoutNotFound>;
28
31
  }
29
32
  //# sourceMappingURL=firebaseService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"firebaseService.d.ts","sourceRoot":"","sources":["../../src/services/firebaseService.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAwC,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAY,iBAAiB,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACjG,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,OAAO,EAAc,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAEvD,yBAAiB,qBAAqB,CAAC;IACrC,UAAiB,iBAAiB,CAAC,YAAY;QAC7C,mBAAmB,EAAE,MAAM,CAAC;QAC5B,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;KACzC;CACF;AAED,MAAM,WAAW,gBAAgB,CAAC,YAAY;IAC5C,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAM/B,gBAAgB,CAAC,YAAY,EAC3B,MAAM,EAAE,qBAAqB,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAC5D,cAAc,CAAC,OAAO,EAAE,iBAAiB,GAAG,eAAe,CAAC,CAAC;CACjE;AAED,qBAAa,eAAgB,YAAW,gBAAgB;IAIpD,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,cAAc;IANxB,OAAO,CAAC,GAAG,CAAwB;gBAGzB,eAAe,EAAE,eAAe,EAChC,cA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