@glissandoo/lib 1.37.4 → 1.38.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.
@@ -38,7 +38,6 @@ export declare enum FbFunctionName {
38
38
  FederationPartnershipSendInvitationToJoinEmail = "federationPartnership-sendInvitationToJoinEmail",
39
39
  FederationRemove = "federation-remove",
40
40
  FederationRemoveAdmin = "federation-removeAdmin",
41
- GCEventsOnCreate = "gcEvents-onCreate",
42
41
  GroupChangeStatus = "group-changeStatus",
43
42
  GroupCronSatistactionIndexWeekly = "group-cronSatistactionIndexWeekly",
44
43
  GroupEdit = "group-edit",
@@ -100,5 +99,6 @@ export declare enum FbFunctionName {
100
99
  UserRemove = "user-remove",
101
100
  WebhookStripe = "webhook-stripe",
102
101
  WebhookGocardless = "webhook-gocardless",
103
- WebhookMessagebird = "webhook-messagebird"
102
+ WebhookMessagebird = "webhook-messagebird",
103
+ WebhookEventOnCreate = "webhookEvent-onCreate"
104
104
  }
@@ -42,7 +42,6 @@ var FbFunctionName;
42
42
  FbFunctionName["FederationPartnershipSendInvitationToJoinEmail"] = "federationPartnership-sendInvitationToJoinEmail";
43
43
  FbFunctionName["FederationRemove"] = "federation-remove";
44
44
  FbFunctionName["FederationRemoveAdmin"] = "federation-removeAdmin";
45
- FbFunctionName["GCEventsOnCreate"] = "gcEvents-onCreate";
46
45
  FbFunctionName["GroupChangeStatus"] = "group-changeStatus";
47
46
  FbFunctionName["GroupCronSatistactionIndexWeekly"] = "group-cronSatistactionIndexWeekly";
48
47
  FbFunctionName["GroupEdit"] = "group-edit";
@@ -105,4 +104,5 @@ var FbFunctionName;
105
104
  FbFunctionName["WebhookStripe"] = "webhook-stripe";
106
105
  FbFunctionName["WebhookGocardless"] = "webhook-gocardless";
107
106
  FbFunctionName["WebhookMessagebird"] = "webhook-messagebird";
107
+ FbFunctionName["WebhookEventOnCreate"] = "webhookEvent-onCreate";
108
108
  })(FbFunctionName = exports.FbFunctionName || (exports.FbFunctionName = {}));
@@ -17,7 +17,6 @@ const regionByFunctions = {
17
17
  [index_1.FbFunctionName.UserOnLogin]: GCloudRegions.EuropeWest6,
18
18
  [index_1.FbFunctionName.UserOnSignUp]: GCloudRegions.EuropeWest6,
19
19
  [index_1.FbFunctionName.JWTGenerate]: GCloudRegions.EuropeWest6,
20
- [index_1.FbFunctionName.GCEventsOnCreate]: GCloudRegions.EuropeWest6,
21
20
  [index_1.FbFunctionName.GroupPublish]: GCloudRegions.EuropeWest6,
22
21
  [index_1.FbFunctionName.GroupEdit]: GCloudRegions.EuropeWest6,
23
22
  [index_1.FbFunctionName.GroupRemove]: GCloudRegions.UsCentral1,
@@ -112,6 +111,7 @@ const regionByFunctions = {
112
111
  [index_1.FbFunctionName.WebhookStripe]: GCloudRegions.EuropeWest6,
113
112
  [index_1.FbFunctionName.WebhookGocardless]: GCloudRegions.EuropeWest6,
114
113
  [index_1.FbFunctionName.WebhookMessagebird]: GCloudRegions.EuropeWest6,
114
+ [index_1.FbFunctionName.WebhookEventOnCreate]: GCloudRegions.EuropeWest6,
115
115
  };
116
116
  const getFunctionRegion = (fn) => regionByFunctions[fn] || defaultRegion;
117
117
  exports.getFunctionRegion = getFunctionRegion;
@@ -26,5 +26,6 @@ export declare enum CollectionNames {
26
26
  PartnershipPlans = "plans",
27
27
  Payment = "payment",
28
28
  Federation = "federation",
29
- FederationPartnerships = "partnerships"
29
+ FederationPartnerships = "partnerships",
30
+ WebhookEvent = "webhookEvent"
30
31
  }
@@ -31,4 +31,5 @@ var CollectionNames;
31
31
  CollectionNames["Payment"] = "payment";
32
32
  CollectionNames["Federation"] = "federation";
33
33
  CollectionNames["FederationPartnerships"] = "partnerships";
34
+ CollectionNames["WebhookEvent"] = "webhookEvent";
34
35
  })(CollectionNames = exports.CollectionNames || (exports.CollectionNames = {}));
@@ -0,0 +1,9 @@
1
+ import { DocumentSnapshot } from '../../types/firestore';
2
+ import Model from '../Model';
3
+ import { BaseWebhookEventData } from './types';
4
+ export default class WebhookEvent extends Model<BaseWebhookEventData> {
5
+ constructor(doc: DocumentSnapshot);
6
+ get originalId(): string;
7
+ get body(): unknown;
8
+ get source(): import("./types").WebhookEventSource;
9
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const Model_1 = __importDefault(require("../Model"));
7
+ class WebhookEvent extends Model_1.default {
8
+ constructor(doc) {
9
+ super(doc);
10
+ }
11
+ get originalId() {
12
+ return this.data.originalId;
13
+ }
14
+ get body() {
15
+ return this.data.body;
16
+ }
17
+ get source() {
18
+ return this.data.source;
19
+ }
20
+ }
21
+ exports.default = WebhookEvent;
@@ -0,0 +1,10 @@
1
+ export declare enum WebhookEventSource {
2
+ stripe = "stripe",
3
+ messageBird = "messageBird",
4
+ gocardless = "gocardless"
5
+ }
6
+ export interface BaseWebhookEventData {
7
+ originalId: string;
8
+ body: unknown;
9
+ source: WebhookEventSource;
10
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebhookEventSource = void 0;
4
+ var WebhookEventSource;
5
+ (function (WebhookEventSource) {
6
+ WebhookEventSource["stripe"] = "stripe";
7
+ WebhookEventSource["messageBird"] = "messageBird";
8
+ WebhookEventSource["gocardless"] = "gocardless";
9
+ })(WebhookEventSource = exports.WebhookEventSource || (exports.WebhookEventSource = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.37.4",
3
+ "version": "1.38.1",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",