@cofondateurauchomage/libs 1.1.152 → 1.1.153

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IBlogHtmlArticle, IContact, INewsletter, IProject, IProspect, IReactionStatus, IUser, TPlan, TPlanOption, TVisibility } from "./db.model";
2
- export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "createUser" | "updateUser" | "deleteUser" | "updateVisibility" | "addStripeId" | "updatePlan" | "updateMetaStripe" | "addStatsAssociation" | "updateNewsletter" | "createProspect" | "getProspect" | "updateProspect" | "createReaction" | "deleteReaction" | "createBlogHtmlArticle";
2
+ export type CloudFunctionNames = "createProject" | "updateProject" | "deleteProject" | "createUser" | "updateUser" | "deleteUser" | "updateVisibility" | "addStripeId" | "updatePlan" | "updateMetaStripe" | "addStatsAssociation" | "updateNewsletter" | "createProspect" | "getProspect" | "updateProspect" | "createReaction" | "deleteReaction" | "createBlogHtmlArticle" | "syncCrmProfiles";
3
3
  export type RouteNames = "checkout_session" | "delete_customer" | "portal_session" | "webhook";
4
4
  export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
5
5
  createProject: Omit<IProject, "id" | "plan" | "visibility" | "clicks" | "creationDate" | "lastConnection" | "stripeId" | "referrer" | "postedOnLinkedInAt"> & IContact & {
@@ -53,6 +53,8 @@ export type BodyForO<O extends CloudFunctionNames | RouteNames> = {
53
53
  createBlogHtmlArticle: Omit<IBlogHtmlArticle, "date"> & {
54
54
  apiSecretKey: string;
55
55
  };
56
+ /** Admin-only: rebuild all `crm_profiles` from source collections. */
57
+ syncCrmProfiles: Record<string, never>;
56
58
  checkout_session: {
57
59
  customer: {
58
60
  email: string;
@@ -100,6 +102,13 @@ export type ResponseForO<O extends CloudFunctionNames | RouteNames> = {
100
102
  createReaction: WriteResult;
101
103
  deleteReaction: WriteResult;
102
104
  createBlogHtmlArticle: WriteResult;
105
+ syncCrmProfiles: {
106
+ users: number;
107
+ projects: number;
108
+ prospects: number;
109
+ synced: number;
110
+ failed: number;
111
+ };
103
112
  checkout_session: {
104
113
  sessionId: string;
105
114
  };
@@ -233,6 +233,7 @@ const schemasForAllRoutes = {
233
233
  content: zod_1.z.string(),
234
234
  toc: zod_1.z.string().optional(),
235
235
  }),
236
+ syncCrmProfiles: zod_1.z.object({}),
236
237
  checkout_session: zod_1.z.object({
237
238
  customer: zod_1.z.object({
238
239
  email: zod_1.z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cofondateurauchomage/libs",
3
- "version": "1.1.152",
3
+ "version": "1.1.153",
4
4
  "description": "",
5
5
  "main": "build/index",
6
6
  "scripts": {