@cofondateurauchomage/libs 1.1.147 → 1.1.149
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.
- package/build/api.d.ts +4 -4
- package/build/db.model.d.ts +39 -14
- package/build/db.model.js +0 -1
- package/package.json +1 -1
package/build/api.d.ts
CHANGED
|
@@ -2,18 +2,18 @@ import { IBlogHtmlArticle, IContact, INewsletter, IProject, IProspect, IReaction
|
|
|
2
2
|
export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "createUser" | "updateUser" | "deleteUser" | "updateVisibility" | "addStripeId" | "updatePlan" | "updateMetaStripe" | "addStatsAssociation" | "updateNewsletter" | "createProspect" | "getProspect" | "updateProspect" | "createReaction" | "deleteReaction" | "createBlogHtmlArticle";
|
|
3
3
|
export type RouteNames = "checkout_session" | "delete_customer" | "portal_session" | "webhook";
|
|
4
4
|
export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
|
|
5
|
-
createProject: Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer" | "postedOnLinkedInAt"
|
|
5
|
+
createProject: Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer" | "postedOnLinkedInAt"> & IContact & {
|
|
6
6
|
newsletterMarketing?: boolean;
|
|
7
7
|
emailProspect: string;
|
|
8
8
|
};
|
|
9
9
|
deleteProject: {};
|
|
10
|
-
updateProject: Partial<Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer" | "postedOnLinkedInAt" | "partner_swanbase" | "partner_iii"
|
|
11
|
-
createUser: Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer"
|
|
10
|
+
updateProject: Partial<Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer" | "postedOnLinkedInAt" | "partner_swanbase" | "partner_iii"> & Omit<IContact, "email">>;
|
|
11
|
+
createUser: Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer"> & IContact & {
|
|
12
12
|
newsletterMarketing?: boolean;
|
|
13
13
|
emailProspect: string;
|
|
14
14
|
};
|
|
15
15
|
deleteUser: {};
|
|
16
|
-
updateUser: Partial<Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer"
|
|
16
|
+
updateUser: Partial<Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer"> & Omit<IContact, "email">>;
|
|
17
17
|
updateVisibility: {
|
|
18
18
|
visibility: TVisibility;
|
|
19
19
|
};
|
package/build/db.model.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export declare enum Collections {
|
|
|
9
9
|
reactions = "reactions",
|
|
10
10
|
visits = "visits",
|
|
11
11
|
blogHtmlArticles = "blog_html_articles",
|
|
12
|
-
stripe_metas = "stripe_metas",
|
|
13
12
|
crm_profiles = "crm_profiles"
|
|
14
13
|
}
|
|
15
14
|
export type TSkill = "Sales" | "Operation" | "Design" | "Marketing" | "Produit" | "Tech" | "Growth" | "Finance";
|
|
@@ -47,8 +46,6 @@ export interface IUser {
|
|
|
47
46
|
photo?: string;
|
|
48
47
|
id: string;
|
|
49
48
|
plan: TPlan;
|
|
50
|
-
complimentaryProGrantedAt?: number;
|
|
51
|
-
complimentaryProRevokedAt?: number;
|
|
52
49
|
visibility: TVisibility;
|
|
53
50
|
clicks: IClicks;
|
|
54
51
|
creationDate: number;
|
|
@@ -76,8 +73,6 @@ export interface IProject {
|
|
|
76
73
|
logo?: string;
|
|
77
74
|
id: string;
|
|
78
75
|
plan: TPlan;
|
|
79
|
-
complimentaryProGrantedAt?: number;
|
|
80
|
-
complimentaryProRevokedAt?: number;
|
|
81
76
|
visibility: TVisibility;
|
|
82
77
|
clicks: IClicks;
|
|
83
78
|
creationDate: number;
|
|
@@ -88,6 +83,9 @@ export interface IProject {
|
|
|
88
83
|
partner_swanbase?: boolean;
|
|
89
84
|
partner_iii?: boolean;
|
|
90
85
|
}
|
|
86
|
+
export type IProspect = Partial<Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "lastConnection" | "stripeId" | "photo" | 'availability'>> & Partial<Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "lastConnection" | "stripeId" | "logo" | "postedOnLinkedInAt" | 'ambitions' | 'productTypes' | 'industries'>> & Partial<IContact> & {
|
|
87
|
+
email: string;
|
|
88
|
+
};
|
|
91
89
|
export interface IStripeMeta {
|
|
92
90
|
stripeId?: string;
|
|
93
91
|
/** First successful invoice payment tied to subscriptions (unix ms). */
|
|
@@ -104,15 +102,44 @@ export interface IStripeMeta {
|
|
|
104
102
|
subscriptionCancellationFeedback?: string;
|
|
105
103
|
subscriptionCancellationComment?: string;
|
|
106
104
|
}
|
|
107
|
-
/**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
/** CRM mirror of `prospects/{id}` without heavy assets or long text fields. */
|
|
106
|
+
type ICrmProspectProfileSnapshot = Omit<IProspect, "motivations" | "bestStrength" | "partner" | "business" | "description" | "status_detail">;
|
|
107
|
+
/** CRM mirror of `users/{id}` without heavy assets or long text fields. */
|
|
108
|
+
type ICrmUserProfileSnapshot = Omit<IUser, "photo" | "motivations" | "bestStrength" | "partner" | "business">;
|
|
109
|
+
/** CRM mirror of `projects/{id}` without heavy assets or long text fields. */
|
|
110
|
+
type ICrmProjectProfileSnapshot = Omit<IProject, "logo" | "description" | "partner" | "status_detail">;
|
|
111
|
+
/** CRM pipeline column; computed server-side from profile + billing state. */
|
|
112
|
+
export type TCrmPipelineBucket = "lead" | "inscrit" | "pro" | "ancien_pro";
|
|
113
|
+
interface ICrmProfileBase {
|
|
114
|
+
pipelineBucket: TCrmPipelineBucket;
|
|
113
115
|
lastTeamCallAt?: number;
|
|
114
116
|
foundPartner?: boolean;
|
|
115
117
|
}
|
|
118
|
+
export interface ICrmProfileProspect extends ICrmProfileBase {
|
|
119
|
+
type: "prospect";
|
|
120
|
+
profile: ICrmProspectProfileSnapshot;
|
|
121
|
+
}
|
|
122
|
+
export interface ICrmProfileUser extends ICrmProfileBase {
|
|
123
|
+
type: "user";
|
|
124
|
+
profile: ICrmUserProfileSnapshot;
|
|
125
|
+
contact: IContact;
|
|
126
|
+
stripeMeta?: IStripeMeta;
|
|
127
|
+
complimentaryProGrantedAt?: number;
|
|
128
|
+
complimentaryProRevokedAt?: number;
|
|
129
|
+
}
|
|
130
|
+
export interface ICrmProfileProject extends ICrmProfileBase {
|
|
131
|
+
type: "project";
|
|
132
|
+
profile: ICrmProjectProfileSnapshot;
|
|
133
|
+
contact: IContact;
|
|
134
|
+
stripeMeta?: IStripeMeta;
|
|
135
|
+
complimentaryProGrantedAt?: number;
|
|
136
|
+
complimentaryProRevokedAt?: number;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* CRM document: denormalized pipeline card + team state.
|
|
140
|
+
* Document id = canonicalId: `prospect:{docId}` | `user:{docId}` | `project:{docId}`.
|
|
141
|
+
*/
|
|
142
|
+
export type ICrmProfile = ICrmProfileProspect | ICrmProfileUser | ICrmProfileProject;
|
|
116
143
|
export interface ICrmNote {
|
|
117
144
|
text: string;
|
|
118
145
|
createdAt: number;
|
|
@@ -145,9 +172,6 @@ export interface INotification {
|
|
|
145
172
|
body?: string;
|
|
146
173
|
link?: string;
|
|
147
174
|
}
|
|
148
|
-
export type IProspect = Partial<Omit<IUser, "id" | "plan" | "visibility" | "clicks" | "lastConnection" | "stripeId" | "photo" | 'availability' | "complimentaryProGrantedAt" | "complimentaryProRevokedAt">> & Partial<Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "lastConnection" | "stripeId" | "logo" | "postedOnLinkedInAt" | 'ambitions' | 'productTypes' | 'industries' | "complimentaryProGrantedAt" | "complimentaryProRevokedAt">> & Partial<IContact> & {
|
|
149
|
-
email: string;
|
|
150
|
-
};
|
|
151
175
|
export type IReactionStatus = "like" | "dislike";
|
|
152
176
|
export interface IReaction {
|
|
153
177
|
fromUserId: string;
|
|
@@ -166,3 +190,4 @@ export interface IBlogHtmlArticle {
|
|
|
166
190
|
content: string;
|
|
167
191
|
toc?: string;
|
|
168
192
|
}
|
|
193
|
+
export {};
|
package/build/db.model.js
CHANGED
|
@@ -13,6 +13,5 @@ var Collections;
|
|
|
13
13
|
Collections["reactions"] = "reactions";
|
|
14
14
|
Collections["visits"] = "visits";
|
|
15
15
|
Collections["blogHtmlArticles"] = "blog_html_articles";
|
|
16
|
-
Collections["stripe_metas"] = "stripe_metas";
|
|
17
16
|
Collections["crm_profiles"] = "crm_profiles";
|
|
18
17
|
})(Collections || (exports.Collections = Collections = {}));
|