@glissandoo/lib 1.3.23 → 1.4.2

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.
@@ -3,6 +3,7 @@ export declare enum FbFunctionName {
3
3
  UserGetToken = "user-getToken",
4
4
  UserOnCreate = "user-onCreate",
5
5
  UserOnUpdate = "user-onUpdate",
6
+ JWTGenerate = "jwt-generate",
6
7
  GroupPublish = "group-publish",
7
8
  GroupEdit = "group-edit",
8
9
  GroupRemove = "group-remove",
@@ -75,6 +76,8 @@ export declare enum FbFunctionName {
75
76
  PartnershipEdit = "partnership-edit",
76
77
  PartnershipGetBalance = "partnership-getBalance",
77
78
  PartnershipOnUpdate = "partnership-onUpdate",
79
+ PartnershipGetMandateRequest = "partnership-getMandateRequest",
80
+ PartnershipOnMandateCreated = "partnership-onMandateCreated",
78
81
  PartnershipPlanAdd = "partnershipPlan-add",
79
82
  PartnershipPlanEdit = "partnershipPlan-edit",
80
83
  PartnershipPlanRemove = "partnershipPlan-remove",
@@ -7,6 +7,7 @@ var FbFunctionName;
7
7
  FbFunctionName["UserGetToken"] = "user-getToken";
8
8
  FbFunctionName["UserOnCreate"] = "user-onCreate";
9
9
  FbFunctionName["UserOnUpdate"] = "user-onUpdate";
10
+ FbFunctionName["JWTGenerate"] = "jwt-generate";
10
11
  FbFunctionName["GroupPublish"] = "group-publish";
11
12
  FbFunctionName["GroupEdit"] = "group-edit";
12
13
  FbFunctionName["GroupRemove"] = "group-remove";
@@ -79,6 +80,8 @@ var FbFunctionName;
79
80
  FbFunctionName["PartnershipEdit"] = "partnership-edit";
80
81
  FbFunctionName["PartnershipGetBalance"] = "partnership-getBalance";
81
82
  FbFunctionName["PartnershipOnUpdate"] = "partnership-onUpdate";
83
+ FbFunctionName["PartnershipGetMandateRequest"] = "partnership-getMandateRequest";
84
+ FbFunctionName["PartnershipOnMandateCreated"] = "partnership-onMandateCreated";
82
85
  FbFunctionName["PartnershipPlanAdd"] = "partnershipPlan-add";
83
86
  FbFunctionName["PartnershipPlanEdit"] = "partnershipPlan-edit";
84
87
  FbFunctionName["PartnershipPlanRemove"] = "partnershipPlan-remove";
@@ -0,0 +1,7 @@
1
+ export declare namespace JWTFbFunctionsTypes {
2
+ interface GenerateParams {
3
+ payload: Record<string | number | symbol, unknown>;
4
+ expiresIn?: number | string | undefined;
5
+ }
6
+ type GenerateResult = string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,6 +13,7 @@ const regionByFunctions = {
13
13
  [index_1.FbFunctionName.UserGetToken]: GCloudRegions.EuropeWest6,
14
14
  [index_1.FbFunctionName.UserOnCreate]: GCloudRegions.UsCentral1,
15
15
  [index_1.FbFunctionName.UserOnUpdate]: GCloudRegions.UsCentral1,
16
+ [index_1.FbFunctionName.JWTGenerate]: GCloudRegions.EuropeWest6,
16
17
  [index_1.FbFunctionName.GroupPublish]: GCloudRegions.EuropeWest6,
17
18
  [index_1.FbFunctionName.GroupEdit]: GCloudRegions.EuropeWest6,
18
19
  [index_1.FbFunctionName.GroupRemove]: GCloudRegions.UsCentral1,
@@ -85,6 +86,8 @@ const regionByFunctions = {
85
86
  [index_1.FbFunctionName.PartnershipEdit]: GCloudRegions.EuropeWest6,
86
87
  [index_1.FbFunctionName.PartnershipGetBalance]: GCloudRegions.EuropeWest6,
87
88
  [index_1.FbFunctionName.PartnershipOnUpdate]: GCloudRegions.EuropeWest6,
89
+ [index_1.FbFunctionName.PartnershipGetMandateRequest]: GCloudRegions.EuropeWest6,
90
+ [index_1.FbFunctionName.PartnershipOnMandateCreated]: GCloudRegions.EuropeWest6,
88
91
  [index_1.FbFunctionName.PartnershipPlanAdd]: GCloudRegions.EuropeWest6,
89
92
  [index_1.FbFunctionName.PartnershipPlanEdit]: GCloudRegions.EuropeWest6,
90
93
  [index_1.FbFunctionName.PartnershipPlanRemove]: GCloudRegions.EuropeWest6,
@@ -14,5 +14,6 @@ export default class Partnership extends PartnershipBasic<PartnershipData> {
14
14
  get isDeleted(): boolean;
15
15
  get isActive(): boolean;
16
16
  get federationIds(): string[];
17
+ get gocardlessCustomerId(): string | null;
17
18
  isAdmin(userId: string): boolean;
18
19
  }
@@ -48,6 +48,9 @@ class Partnership extends basic_1.default {
48
48
  get federationIds() {
49
49
  return this.data.federationIds || [];
50
50
  }
51
+ get gocardlessCustomerId() {
52
+ return this.data.gocardlessCustomerId || null;
53
+ }
51
54
  isAdmin(userId) {
52
55
  return this.admins.includes(userId);
53
56
  }
@@ -33,5 +33,6 @@ export interface PartnershipData extends PartnershipBasicData {
33
33
  verifiedAt: Timestamp | null;
34
34
  deletedAt: Timestamp | null;
35
35
  federationIds: string[];
36
+ gocardlessCustomerId: string | null;
36
37
  readonly createdAt: Timestamp;
37
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.3.23",
3
+ "version": "1.4.2",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -10,11 +10,12 @@
10
10
  "test": "echo \"Error: no test specified\" && exit 1",
11
11
  "format": "prettier --write \"src/**/*.ts\"",
12
12
  "lint": "eslint --ext .ts ./src",
13
- "prepare": "rm -rf /lib && npm run build",
13
+ "prepare": "rm -rf ./lib && npm run build",
14
14
  "preversion": "npm run lint",
15
15
  "version": "npm run format && git add -A src && ./publish.sh",
16
16
  "postversion": "git push && git push --tags",
17
- "publish:beta": "npm publish --tag beta"
17
+ "publish:beta": "npm publish --tag beta",
18
+ "link": "cp package.json ./lib && cd ./lib && npm link"
18
19
  },
19
20
  "author": "Glissandoo",
20
21
  "license": "ISC",