@glissandoo/lib 1.33.0 → 1.35.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,30 @@ 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",
81
+ PartnershipGetInvoices = "partnership-getInvoices",
90
82
  PartnershipGetMandateRequest = "partnership-getMandateRequest",
91
83
  PartnershipGroupAdd = "partnershipGroup-add",
92
84
  PartnershipGroupSetPlan = "partnershipGroup-setPlan",
93
85
  PartnershipGroupRemove = "partnershipGroup-remove",
94
- PartnershipOnMandateCreated = "partnership-onMandateCreated",
95
86
  PartnershipOnUpdate = "partnership-onUpdate",
96
- PartnershipPlanAdd = "partnershipPlan-add",
97
- PartnershipPlanEdit = "partnershipPlan-edit",
98
- PartnershipPlanOnUpdate = "partnershipPlan-onUpdate",
99
- PartnershipPlanRemove = "partnershipPlan-remove",
100
87
  PartnershipRemoveAdmin = "partnership-removeAdmin",
101
88
  PartnershipStripeSession = "partnership-stripeSession",
89
+ PartnershipStripeBillingPortal = "partnership-stripeBillingPortal",
102
90
  ReminderEvening = "reminder-evening",
103
91
  ReminderMorning = "reminder-morning",
104
92
  ReminderRollCall = "reminder-rollCall",
105
93
  ReminderBiweeklyEventsEmail = "reminder-biweeklyEventsEmail",
106
- SubscriptionAdd = "subscription-add",
107
- SubscriptionCancel = "subscription-cancel",
108
- SubscriptionPaymentSchedule = "subscription-paymentSchedule",
109
- SubscriptionResume = "subscription-resume",
110
94
  UserOnCreateDoc = "user-onCreateDoc",
111
95
  UserOnLogin = "user-onLogin",
112
96
  UserOnSignUp = "user-onSignUp",
113
97
  UserOnUpdate = "user-onUpdate",
114
98
  UserRegister = "user-register",
115
99
  UserRemove = "user-remove",
116
- WebhookLemonway = "webhook-lemonway",
117
- WebhookStripe = "webhook-stripe"
100
+ WebhookStripe = "webhook-stripe",
101
+ WebhookGocardless = "webhook-gocardless"
118
102
  }
@@ -77,46 +77,30 @@ 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";
85
+ FbFunctionName["PartnershipGetInvoices"] = "partnership-getInvoices";
94
86
  FbFunctionName["PartnershipGetMandateRequest"] = "partnership-getMandateRequest";
95
87
  FbFunctionName["PartnershipGroupAdd"] = "partnershipGroup-add";
96
88
  FbFunctionName["PartnershipGroupSetPlan"] = "partnershipGroup-setPlan";
97
89
  FbFunctionName["PartnershipGroupRemove"] = "partnershipGroup-remove";
98
- FbFunctionName["PartnershipOnMandateCreated"] = "partnership-onMandateCreated";
99
90
  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
91
  FbFunctionName["PartnershipRemoveAdmin"] = "partnership-removeAdmin";
105
92
  FbFunctionName["PartnershipStripeSession"] = "partnership-stripeSession";
93
+ FbFunctionName["PartnershipStripeBillingPortal"] = "partnership-stripeBillingPortal";
106
94
  FbFunctionName["ReminderEvening"] = "reminder-evening";
107
95
  FbFunctionName["ReminderMorning"] = "reminder-morning";
108
96
  FbFunctionName["ReminderRollCall"] = "reminder-rollCall";
109
97
  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
98
  FbFunctionName["UserOnCreateDoc"] = "user-onCreateDoc";
115
99
  FbFunctionName["UserOnLogin"] = "user-onLogin";
116
100
  FbFunctionName["UserOnSignUp"] = "user-onSignUp";
117
101
  FbFunctionName["UserOnUpdate"] = "user-onUpdate";
118
102
  FbFunctionName["UserRegister"] = "user-register";
119
103
  FbFunctionName["UserRemove"] = "user-remove";
120
- FbFunctionName["WebhookLemonway"] = "webhook-lemonway";
121
104
  FbFunctionName["WebhookStripe"] = "webhook-stripe";
105
+ FbFunctionName["WebhookGocardless"] = "webhook-gocardless";
122
106
  })(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,24 @@ 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
+ }
55
+ interface GetInvoicesParams {
56
+ partnershipId: string;
57
+ }
58
+ interface InvoiceItem {
59
+ id: string;
60
+ amount: number;
61
+ currency: string;
62
+ created: number;
63
+ number: string;
64
+ link: string | null;
65
+ }
66
+ interface GetInvoicesResult {
67
+ invoices: InvoiceItem[];
68
+ }
56
69
  }
@@ -84,32 +84,17 @@ 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,
96
+ [index_1.FbFunctionName.PartnershipGetInvoices]: GCloudRegions.EuropeWest6,
107
97
  [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
98
  [index_1.FbFunctionName.PartnershipGroupAdd]: GCloudRegions.EuropeWest6,
114
99
  [index_1.FbFunctionName.PartnershipGroupSetPlan]: GCloudRegions.EuropeWest6,
115
100
  [index_1.FbFunctionName.PartnershipGroupRemove]: GCloudRegions.EuropeWest6,
@@ -123,9 +108,8 @@ const regionByFunctions = {
123
108
  [index_1.FbFunctionName.ReminderMorning]: GCloudRegions.EuropeWest1,
124
109
  [index_1.FbFunctionName.ReminderRollCall]: GCloudRegions.EuropeWest1,
125
110
  [index_1.FbFunctionName.ReminderBiweeklyEventsEmail]: GCloudRegions.EuropeWest6,
126
- [index_1.FbFunctionName.SubscriptionPaymentSchedule]: GCloudRegions.EuropeWest6,
127
- [index_1.FbFunctionName.WebhookLemonway]: GCloudRegions.EuropeWest6,
128
111
  [index_1.FbFunctionName.WebhookStripe]: GCloudRegions.EuropeWest6,
112
+ [index_1.FbFunctionName.WebhookGocardless]: GCloudRegions.EuropeWest6,
129
113
  };
130
114
  const getFunctionRegion = (fn) => regionByFunctions[fn] || defaultRegion;
131
115
  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.35.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",