@glissandoo/lib 1.32.13 → 1.34.0

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.
@@ -73,45 +73,29 @@ export declare enum FbFunctionName {
73
73
  MiscScheduledFirestoreExport = "misc-scheduledFirestoreExport",
74
74
  MiscValidateUsername = "misc-validateUsername",
75
75
  NotificationMarkAllAsReaded = "notification-markAllAsReaded",
76
- PartnerAdd = "partner-add",
77
- PartnerEdit = "partner-edit",
78
- PartnerGetByToken = "partner-getByToken",
79
- PartnerOnUpdate = "partner-onUpdate",
80
- PartnerRemove = "partner-remove",
81
- PartnerSendVerification = "partner-sendVerification",
82
- PartnerValidate = "partner-validate",
83
- PartnerValidateIBAN = "partner-validateIBAN",
84
76
  PartnershipAddConfirmedAdmin = "partnership-addConfirmedAdmin",
77
+ PartnershipPublish = "partnership-publish",
85
78
  PartnershipCreate = "partnership-create",
86
79
  PartnershipRemove = "partnership-remove",
87
80
  PartnershipEdit = "partnership-edit",
88
- PartnershipGetBalance = "partnership-getBalance",
89
81
  PartnershipGetMandateRequest = "partnership-getMandateRequest",
90
82
  PartnershipGroupAdd = "partnershipGroup-add",
91
83
  PartnershipGroupSetPlan = "partnershipGroup-setPlan",
92
84
  PartnershipGroupRemove = "partnershipGroup-remove",
93
- PartnershipOnMandateCreated = "partnership-onMandateCreated",
94
85
  PartnershipOnUpdate = "partnership-onUpdate",
95
- PartnershipPlanAdd = "partnershipPlan-add",
96
- PartnershipPlanEdit = "partnershipPlan-edit",
97
- PartnershipPlanOnUpdate = "partnershipPlan-onUpdate",
98
- PartnershipPlanRemove = "partnershipPlan-remove",
99
86
  PartnershipRemoveAdmin = "partnership-removeAdmin",
100
87
  PartnershipStripeSession = "partnership-stripeSession",
88
+ PartnershipStripeBillingPortal = "partnership-stripeBillingPortal",
101
89
  ReminderEvening = "reminder-evening",
102
90
  ReminderMorning = "reminder-morning",
103
91
  ReminderRollCall = "reminder-rollCall",
104
92
  ReminderBiweeklyEventsEmail = "reminder-biweeklyEventsEmail",
105
- SubscriptionAdd = "subscription-add",
106
- SubscriptionCancel = "subscription-cancel",
107
- SubscriptionPaymentSchedule = "subscription-paymentSchedule",
108
- SubscriptionResume = "subscription-resume",
109
93
  UserOnCreateDoc = "user-onCreateDoc",
110
94
  UserOnLogin = "user-onLogin",
111
95
  UserOnSignUp = "user-onSignUp",
112
96
  UserOnUpdate = "user-onUpdate",
113
97
  UserRegister = "user-register",
114
98
  UserRemove = "user-remove",
115
- WebhookLemonway = "webhook-lemonway",
116
- WebhookStripe = "webhook-stripe"
99
+ WebhookStripe = "webhook-stripe",
100
+ WebhookGocardless = "webhook-gocardless"
117
101
  }
@@ -77,45 +77,29 @@ var FbFunctionName;
77
77
  FbFunctionName["MiscScheduledFirestoreExport"] = "misc-scheduledFirestoreExport";
78
78
  FbFunctionName["MiscValidateUsername"] = "misc-validateUsername";
79
79
  FbFunctionName["NotificationMarkAllAsReaded"] = "notification-markAllAsReaded";
80
- FbFunctionName["PartnerAdd"] = "partner-add";
81
- FbFunctionName["PartnerEdit"] = "partner-edit";
82
- FbFunctionName["PartnerGetByToken"] = "partner-getByToken";
83
- FbFunctionName["PartnerOnUpdate"] = "partner-onUpdate";
84
- FbFunctionName["PartnerRemove"] = "partner-remove";
85
- FbFunctionName["PartnerSendVerification"] = "partner-sendVerification";
86
- FbFunctionName["PartnerValidate"] = "partner-validate";
87
- FbFunctionName["PartnerValidateIBAN"] = "partner-validateIBAN";
88
80
  FbFunctionName["PartnershipAddConfirmedAdmin"] = "partnership-addConfirmedAdmin";
81
+ FbFunctionName["PartnershipPublish"] = "partnership-publish";
89
82
  FbFunctionName["PartnershipCreate"] = "partnership-create";
90
83
  FbFunctionName["PartnershipRemove"] = "partnership-remove";
91
84
  FbFunctionName["PartnershipEdit"] = "partnership-edit";
92
- FbFunctionName["PartnershipGetBalance"] = "partnership-getBalance";
93
85
  FbFunctionName["PartnershipGetMandateRequest"] = "partnership-getMandateRequest";
94
86
  FbFunctionName["PartnershipGroupAdd"] = "partnershipGroup-add";
95
87
  FbFunctionName["PartnershipGroupSetPlan"] = "partnershipGroup-setPlan";
96
88
  FbFunctionName["PartnershipGroupRemove"] = "partnershipGroup-remove";
97
- FbFunctionName["PartnershipOnMandateCreated"] = "partnership-onMandateCreated";
98
89
  FbFunctionName["PartnershipOnUpdate"] = "partnership-onUpdate";
99
- FbFunctionName["PartnershipPlanAdd"] = "partnershipPlan-add";
100
- FbFunctionName["PartnershipPlanEdit"] = "partnershipPlan-edit";
101
- FbFunctionName["PartnershipPlanOnUpdate"] = "partnershipPlan-onUpdate";
102
- FbFunctionName["PartnershipPlanRemove"] = "partnershipPlan-remove";
103
90
  FbFunctionName["PartnershipRemoveAdmin"] = "partnership-removeAdmin";
104
91
  FbFunctionName["PartnershipStripeSession"] = "partnership-stripeSession";
92
+ FbFunctionName["PartnershipStripeBillingPortal"] = "partnership-stripeBillingPortal";
105
93
  FbFunctionName["ReminderEvening"] = "reminder-evening";
106
94
  FbFunctionName["ReminderMorning"] = "reminder-morning";
107
95
  FbFunctionName["ReminderRollCall"] = "reminder-rollCall";
108
96
  FbFunctionName["ReminderBiweeklyEventsEmail"] = "reminder-biweeklyEventsEmail";
109
- FbFunctionName["SubscriptionAdd"] = "subscription-add";
110
- FbFunctionName["SubscriptionCancel"] = "subscription-cancel";
111
- FbFunctionName["SubscriptionPaymentSchedule"] = "subscription-paymentSchedule";
112
- FbFunctionName["SubscriptionResume"] = "subscription-resume";
113
97
  FbFunctionName["UserOnCreateDoc"] = "user-onCreateDoc";
114
98
  FbFunctionName["UserOnLogin"] = "user-onLogin";
115
99
  FbFunctionName["UserOnSignUp"] = "user-onSignUp";
116
100
  FbFunctionName["UserOnUpdate"] = "user-onUpdate";
117
101
  FbFunctionName["UserRegister"] = "user-register";
118
102
  FbFunctionName["UserRemove"] = "user-remove";
119
- FbFunctionName["WebhookLemonway"] = "webhook-lemonway";
120
103
  FbFunctionName["WebhookStripe"] = "webhook-stripe";
104
+ FbFunctionName["WebhookGocardless"] = "webhook-gocardless";
121
105
  })(FbFunctionName = exports.FbFunctionName || (exports.FbFunctionName = {}));
@@ -1,18 +1,23 @@
1
1
  import { PlanPeriod, PlansGroup } from '../helpers/plans';
2
- import { BasicAddressData } from '../models/Partner/types';
3
2
  export declare namespace PartnershipFbFunctionsTypes {
4
- interface CreateParams {
5
- displayName: string;
6
- photoURL: string;
7
- email: string;
8
- phone: string | null;
9
- address: BasicAddressData;
3
+ interface PublishParams {
10
4
  partnershipId: string;
11
- gocardlessCustomerId: string | null;
5
+ country: string;
6
+ displayName: string;
7
+ howDidYouHearAboutUs: string;
12
8
  CIF: string | null;
13
9
  }
10
+ type PublishResult = void;
11
+ interface CreateParams {
12
+ partnershipId: string;
13
+ displayName: string;
14
+ }
14
15
  type CreateResult = void;
15
- type EditParams = CreateParams;
16
+ interface EditParams {
17
+ partnershipId: string;
18
+ howDidYouHearAboutUs: string;
19
+ gocardlessCustomerId: string;
20
+ }
16
21
  type EditResult = void;
17
22
  interface RemoveParams {
18
23
  partnershipId: string;
@@ -41,4 +46,10 @@ export declare namespace PartnershipFbFunctionsTypes {
41
46
  interface StripeSessionResult {
42
47
  url: string;
43
48
  }
49
+ interface StripeBillingPortalParams {
50
+ partnershipId: string;
51
+ }
52
+ interface StripeBillingPortalResult {
53
+ url: string;
54
+ }
44
55
  }
@@ -84,31 +84,16 @@ const regionByFunctions = {
84
84
  [index_1.FbFunctionName.FederationGetConfederation]: GCloudRegions.EuropeWest6,
85
85
  [index_1.FbFunctionName.MiscValidateUsername]: GCloudRegions.UsCentral1,
86
86
  [index_1.FbFunctionName.NotificationMarkAllAsReaded]: GCloudRegions.UsCentral1,
87
- [index_1.FbFunctionName.PartnerAdd]: GCloudRegions.EuropeWest6,
88
- [index_1.FbFunctionName.PartnerEdit]: GCloudRegions.EuropeWest6,
89
- [index_1.FbFunctionName.PartnerRemove]: GCloudRegions.EuropeWest6,
90
- [index_1.FbFunctionName.PartnerOnUpdate]: GCloudRegions.EuropeWest6,
91
- [index_1.FbFunctionName.PartnerGetByToken]: GCloudRegions.EuropeWest6,
92
- [index_1.FbFunctionName.PartnerValidate]: GCloudRegions.EuropeWest6,
93
- [index_1.FbFunctionName.PartnerValidateIBAN]: GCloudRegions.EuropeWest6,
94
- [index_1.FbFunctionName.PartnerSendVerification]: GCloudRegions.EuropeWest6,
95
- [index_1.FbFunctionName.SubscriptionAdd]: GCloudRegions.EuropeWest6,
96
- [index_1.FbFunctionName.SubscriptionCancel]: GCloudRegions.EuropeWest6,
97
- [index_1.FbFunctionName.SubscriptionResume]: GCloudRegions.EuropeWest6,
87
+ [index_1.FbFunctionName.PartnershipPublish]: GCloudRegions.EuropeWest6,
98
88
  [index_1.FbFunctionName.PartnershipCreate]: GCloudRegions.EuropeWest6,
99
89
  [index_1.FbFunctionName.PartnershipEdit]: GCloudRegions.EuropeWest6,
100
90
  [index_1.FbFunctionName.PartnershipRemove]: GCloudRegions.EuropeWest6,
101
- [index_1.FbFunctionName.PartnershipGetBalance]: GCloudRegions.EuropeWest6,
102
91
  [index_1.FbFunctionName.PartnershipOnUpdate]: GCloudRegions.EuropeWest6,
103
92
  [index_1.FbFunctionName.PartnershipAddConfirmedAdmin]: GCloudRegions.EuropeWest6,
104
93
  [index_1.FbFunctionName.PartnershipRemoveAdmin]: GCloudRegions.EuropeWest6,
105
94
  [index_1.FbFunctionName.PartnershipStripeSession]: GCloudRegions.EuropeWest6,
95
+ [index_1.FbFunctionName.PartnershipStripeBillingPortal]: GCloudRegions.EuropeWest6,
106
96
  [index_1.FbFunctionName.PartnershipGetMandateRequest]: GCloudRegions.EuropeWest6,
107
- [index_1.FbFunctionName.PartnershipOnMandateCreated]: GCloudRegions.EuropeWest6,
108
- [index_1.FbFunctionName.PartnershipPlanAdd]: GCloudRegions.EuropeWest6,
109
- [index_1.FbFunctionName.PartnershipPlanEdit]: GCloudRegions.EuropeWest6,
110
- [index_1.FbFunctionName.PartnershipPlanRemove]: GCloudRegions.EuropeWest6,
111
- [index_1.FbFunctionName.PartnershipPlanOnUpdate]: GCloudRegions.EuropeWest6,
112
97
  [index_1.FbFunctionName.PartnershipGroupAdd]: GCloudRegions.EuropeWest6,
113
98
  [index_1.FbFunctionName.PartnershipGroupSetPlan]: GCloudRegions.EuropeWest6,
114
99
  [index_1.FbFunctionName.PartnershipGroupRemove]: GCloudRegions.EuropeWest6,
@@ -122,9 +107,8 @@ const regionByFunctions = {
122
107
  [index_1.FbFunctionName.ReminderMorning]: GCloudRegions.EuropeWest1,
123
108
  [index_1.FbFunctionName.ReminderRollCall]: GCloudRegions.EuropeWest1,
124
109
  [index_1.FbFunctionName.ReminderBiweeklyEventsEmail]: GCloudRegions.EuropeWest6,
125
- [index_1.FbFunctionName.SubscriptionPaymentSchedule]: GCloudRegions.EuropeWest6,
126
- [index_1.FbFunctionName.WebhookLemonway]: GCloudRegions.EuropeWest6,
127
110
  [index_1.FbFunctionName.WebhookStripe]: GCloudRegions.EuropeWest6,
111
+ [index_1.FbFunctionName.WebhookGocardless]: GCloudRegions.EuropeWest6,
128
112
  };
129
113
  const getFunctionRegion = (fn) => regionByFunctions[fn] || defaultRegion;
130
114
  exports.getFunctionRegion = getFunctionRegion;
@@ -0,0 +1 @@
1
+ export declare const EUCountries: string[];
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EUCountries = void 0;
4
+ exports.EUCountries = [
5
+ 'DE',
6
+ 'AT',
7
+ 'BE',
8
+ 'BG',
9
+ 'CY',
10
+ 'HR',
11
+ 'DK',
12
+ 'SK',
13
+ 'SI',
14
+ 'ES',
15
+ 'EE',
16
+ 'FI',
17
+ 'FR',
18
+ 'GR',
19
+ 'HU',
20
+ 'IE',
21
+ 'IT',
22
+ 'LV',
23
+ 'LT',
24
+ 'LU',
25
+ 'MT',
26
+ 'NL',
27
+ 'PL',
28
+ 'PT',
29
+ 'CZ',
30
+ 'RO',
31
+ 'SE',
32
+ ];
@@ -45,5 +45,6 @@ export declare enum HttpsErrorMessages {
45
45
  Unauthorized = "error.auth.noValid",
46
46
  InvalidMethod = "error.method.noValid",
47
47
  NoFile = "error.file.noExists",
48
- Default = "error.default"
48
+ Default = "error.default",
49
+ InvalidVATID = "error.vatid.noValid"
49
50
  }
package/helpers/errors.js CHANGED
@@ -50,4 +50,5 @@ var HttpsErrorMessages;
50
50
  HttpsErrorMessages["InvalidMethod"] = "error.method.noValid";
51
51
  HttpsErrorMessages["NoFile"] = "error.file.noExists";
52
52
  HttpsErrorMessages["Default"] = "error.default";
53
+ HttpsErrorMessages["InvalidVATID"] = "error.vatid.noValid";
53
54
  })(HttpsErrorMessages = exports.HttpsErrorMessages || (exports.HttpsErrorMessages = {}));
@@ -1,5 +1,5 @@
1
1
  import { AdminItem } from '../../helpers/types';
2
- import { Timestamp } from '../../types/firestore';
2
+ import { DocumentReference, Timestamp } from '../../types/firestore';
3
3
  import { BasicAddressData } from '../Partner/types';
4
4
  export declare enum PartnershipRoles {
5
5
  Admin = "admin"
@@ -43,4 +43,5 @@ export interface PartnershipData extends PartnershipBasicData {
43
43
  }[];
44
44
  howDidYouHearAboutUs: string | null;
45
45
  readonly createdAt: Timestamp;
46
+ readonly createdBy: DocumentReference;
46
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.32.13",
3
+ "version": "1.34.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",