@glissandoo/lib 1.33.0 → 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,46 +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",
85
77
  PartnershipPublish = "partnership-publish",
86
78
  PartnershipCreate = "partnership-create",
87
79
  PartnershipRemove = "partnership-remove",
88
80
  PartnershipEdit = "partnership-edit",
89
- PartnershipGetBalance = "partnership-getBalance",
90
81
  PartnershipGetMandateRequest = "partnership-getMandateRequest",
91
82
  PartnershipGroupAdd = "partnershipGroup-add",
92
83
  PartnershipGroupSetPlan = "partnershipGroup-setPlan",
93
84
  PartnershipGroupRemove = "partnershipGroup-remove",
94
- PartnershipOnMandateCreated = "partnership-onMandateCreated",
95
85
  PartnershipOnUpdate = "partnership-onUpdate",
96
- PartnershipPlanAdd = "partnershipPlan-add",
97
- PartnershipPlanEdit = "partnershipPlan-edit",
98
- PartnershipPlanOnUpdate = "partnershipPlan-onUpdate",
99
- PartnershipPlanRemove = "partnershipPlan-remove",
100
86
  PartnershipRemoveAdmin = "partnership-removeAdmin",
101
87
  PartnershipStripeSession = "partnership-stripeSession",
88
+ PartnershipStripeBillingPortal = "partnership-stripeBillingPortal",
102
89
  ReminderEvening = "reminder-evening",
103
90
  ReminderMorning = "reminder-morning",
104
91
  ReminderRollCall = "reminder-rollCall",
105
92
  ReminderBiweeklyEventsEmail = "reminder-biweeklyEventsEmail",
106
- SubscriptionAdd = "subscription-add",
107
- SubscriptionCancel = "subscription-cancel",
108
- SubscriptionPaymentSchedule = "subscription-paymentSchedule",
109
- SubscriptionResume = "subscription-resume",
110
93
  UserOnCreateDoc = "user-onCreateDoc",
111
94
  UserOnLogin = "user-onLogin",
112
95
  UserOnSignUp = "user-onSignUp",
113
96
  UserOnUpdate = "user-onUpdate",
114
97
  UserRegister = "user-register",
115
98
  UserRemove = "user-remove",
116
- WebhookLemonway = "webhook-lemonway",
117
- WebhookStripe = "webhook-stripe"
99
+ WebhookStripe = "webhook-stripe",
100
+ WebhookGocardless = "webhook-gocardless"
118
101
  }
@@ -77,46 +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";
89
81
  FbFunctionName["PartnershipPublish"] = "partnership-publish";
90
82
  FbFunctionName["PartnershipCreate"] = "partnership-create";
91
83
  FbFunctionName["PartnershipRemove"] = "partnership-remove";
92
84
  FbFunctionName["PartnershipEdit"] = "partnership-edit";
93
- FbFunctionName["PartnershipGetBalance"] = "partnership-getBalance";
94
85
  FbFunctionName["PartnershipGetMandateRequest"] = "partnership-getMandateRequest";
95
86
  FbFunctionName["PartnershipGroupAdd"] = "partnershipGroup-add";
96
87
  FbFunctionName["PartnershipGroupSetPlan"] = "partnershipGroup-setPlan";
97
88
  FbFunctionName["PartnershipGroupRemove"] = "partnershipGroup-remove";
98
- FbFunctionName["PartnershipOnMandateCreated"] = "partnership-onMandateCreated";
99
89
  FbFunctionName["PartnershipOnUpdate"] = "partnership-onUpdate";
100
- FbFunctionName["PartnershipPlanAdd"] = "partnershipPlan-add";
101
- FbFunctionName["PartnershipPlanEdit"] = "partnershipPlan-edit";
102
- FbFunctionName["PartnershipPlanOnUpdate"] = "partnershipPlan-onUpdate";
103
- FbFunctionName["PartnershipPlanRemove"] = "partnershipPlan-remove";
104
90
  FbFunctionName["PartnershipRemoveAdmin"] = "partnership-removeAdmin";
105
91
  FbFunctionName["PartnershipStripeSession"] = "partnership-stripeSession";
92
+ FbFunctionName["PartnershipStripeBillingPortal"] = "partnership-stripeBillingPortal";
106
93
  FbFunctionName["ReminderEvening"] = "reminder-evening";
107
94
  FbFunctionName["ReminderMorning"] = "reminder-morning";
108
95
  FbFunctionName["ReminderRollCall"] = "reminder-rollCall";
109
96
  FbFunctionName["ReminderBiweeklyEventsEmail"] = "reminder-biweeklyEventsEmail";
110
- FbFunctionName["SubscriptionAdd"] = "subscription-add";
111
- FbFunctionName["SubscriptionCancel"] = "subscription-cancel";
112
- FbFunctionName["SubscriptionPaymentSchedule"] = "subscription-paymentSchedule";
113
- FbFunctionName["SubscriptionResume"] = "subscription-resume";
114
97
  FbFunctionName["UserOnCreateDoc"] = "user-onCreateDoc";
115
98
  FbFunctionName["UserOnLogin"] = "user-onLogin";
116
99
  FbFunctionName["UserOnSignUp"] = "user-onSignUp";
117
100
  FbFunctionName["UserOnUpdate"] = "user-onUpdate";
118
101
  FbFunctionName["UserRegister"] = "user-register";
119
102
  FbFunctionName["UserRemove"] = "user-remove";
120
- FbFunctionName["WebhookLemonway"] = "webhook-lemonway";
121
103
  FbFunctionName["WebhookStripe"] = "webhook-stripe";
104
+ FbFunctionName["WebhookGocardless"] = "webhook-gocardless";
122
105
  })(FbFunctionName = exports.FbFunctionName || (exports.FbFunctionName = {}));
@@ -1,30 +1,23 @@
1
1
  import { PlanPeriod, PlansGroup } from '../helpers/plans';
2
- import { BasicAddressData } from '../models/Partner/types';
3
2
  export declare namespace PartnershipFbFunctionsTypes {
4
3
  interface PublishParams {
5
4
  partnershipId: string;
6
- groupId: string;
5
+ country: string;
7
6
  displayName: string;
8
7
  howDidYouHearAboutUs: string;
9
- address: BasicAddressData;
10
- CIF: string;
8
+ CIF: string | null;
11
9
  }
12
10
  type PublishResult = void;
13
11
  interface CreateParams {
14
12
  partnershipId: string;
15
13
  displayName: string;
16
- photoURL: string;
17
- email: string;
18
- phone: string | null;
19
- address: BasicAddressData;
20
- gocardlessCustomerId: string | null;
21
- CIF: string | null;
22
- howDidYouHearAboutUs: string | null;
23
14
  }
24
15
  type CreateResult = void;
25
- type EditParams = Partial<CreateParams> & {
16
+ interface EditParams {
26
17
  partnershipId: string;
27
- };
18
+ howDidYouHearAboutUs: string;
19
+ gocardlessCustomerId: string;
20
+ }
28
21
  type EditResult = void;
29
22
  interface RemoveParams {
30
23
  partnershipId: string;
@@ -53,4 +46,10 @@ export declare namespace PartnershipFbFunctionsTypes {
53
46
  interface StripeSessionResult {
54
47
  url: string;
55
48
  }
49
+ interface StripeBillingPortalParams {
50
+ partnershipId: string;
51
+ }
52
+ interface StripeBillingPortalResult {
53
+ url: string;
54
+ }
56
55
  }
@@ -84,32 +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,
98
87
  [index_1.FbFunctionName.PartnershipPublish]: GCloudRegions.EuropeWest6,
99
88
  [index_1.FbFunctionName.PartnershipCreate]: GCloudRegions.EuropeWest6,
100
89
  [index_1.FbFunctionName.PartnershipEdit]: GCloudRegions.EuropeWest6,
101
90
  [index_1.FbFunctionName.PartnershipRemove]: GCloudRegions.EuropeWest6,
102
- [index_1.FbFunctionName.PartnershipGetBalance]: GCloudRegions.EuropeWest6,
103
91
  [index_1.FbFunctionName.PartnershipOnUpdate]: GCloudRegions.EuropeWest6,
104
92
  [index_1.FbFunctionName.PartnershipAddConfirmedAdmin]: GCloudRegions.EuropeWest6,
105
93
  [index_1.FbFunctionName.PartnershipRemoveAdmin]: GCloudRegions.EuropeWest6,
106
94
  [index_1.FbFunctionName.PartnershipStripeSession]: GCloudRegions.EuropeWest6,
95
+ [index_1.FbFunctionName.PartnershipStripeBillingPortal]: GCloudRegions.EuropeWest6,
107
96
  [index_1.FbFunctionName.PartnershipGetMandateRequest]: GCloudRegions.EuropeWest6,
108
- [index_1.FbFunctionName.PartnershipOnMandateCreated]: GCloudRegions.EuropeWest6,
109
- [index_1.FbFunctionName.PartnershipPlanAdd]: GCloudRegions.EuropeWest6,
110
- [index_1.FbFunctionName.PartnershipPlanEdit]: GCloudRegions.EuropeWest6,
111
- [index_1.FbFunctionName.PartnershipPlanRemove]: GCloudRegions.EuropeWest6,
112
- [index_1.FbFunctionName.PartnershipPlanOnUpdate]: GCloudRegions.EuropeWest6,
113
97
  [index_1.FbFunctionName.PartnershipGroupAdd]: GCloudRegions.EuropeWest6,
114
98
  [index_1.FbFunctionName.PartnershipGroupSetPlan]: GCloudRegions.EuropeWest6,
115
99
  [index_1.FbFunctionName.PartnershipGroupRemove]: GCloudRegions.EuropeWest6,
@@ -123,9 +107,8 @@ const regionByFunctions = {
123
107
  [index_1.FbFunctionName.ReminderMorning]: GCloudRegions.EuropeWest1,
124
108
  [index_1.FbFunctionName.ReminderRollCall]: GCloudRegions.EuropeWest1,
125
109
  [index_1.FbFunctionName.ReminderBiweeklyEventsEmail]: GCloudRegions.EuropeWest6,
126
- [index_1.FbFunctionName.SubscriptionPaymentSchedule]: GCloudRegions.EuropeWest6,
127
- [index_1.FbFunctionName.WebhookLemonway]: GCloudRegions.EuropeWest6,
128
110
  [index_1.FbFunctionName.WebhookStripe]: GCloudRegions.EuropeWest6,
111
+ [index_1.FbFunctionName.WebhookGocardless]: GCloudRegions.EuropeWest6,
129
112
  };
130
113
  const getFunctionRegion = (fn) => regionByFunctions[fn] || defaultRegion;
131
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 = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.33.0",
3
+ "version": "1.34.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",