feed-common 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [1.2.0](https://github.com/advertikon/package-maxify-feed-common/compare/v1.1.2...v1.2.0) (2024-02-25)
2
+
3
+
4
+ ### Features
5
+
6
+ * add maxProducts to CompanyStats ([b9e2617](https://github.com/advertikon/package-maxify-feed-common/commit/b9e2617b2e29bb05e47f5a372815447306b56164))
7
+
8
+ ## [1.1.2](https://github.com/advertikon/package-maxify-feed-common/compare/v1.1.1...v1.1.2) (2024-02-16)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add company stuff ([4bc7e37](https://github.com/advertikon/package-maxify-feed-common/commit/4bc7e37368afce41b988b90db52b0e9d8576cf3c))
14
+
1
15
  ## [1.1.1](https://github.com/advertikon/package-maxify-feed-common/compare/v1.1.0...v1.1.1) (2024-02-12)
2
16
 
3
17
 
@@ -1,7 +1,7 @@
1
1
  export type ServerSideEvent = {
2
2
  shop: string;
3
3
  eventID: string;
4
- type: "progress" | "schedule";
4
+ type: 'progress' | 'schedule';
5
5
  name: string;
6
6
  status?: boolean;
7
7
  };
@@ -12,6 +12,9 @@ export type ServerSideProgressEvent = ServerSideEvent & {
12
12
  export type ServerSideScheduleEvent = ServerSideEvent;
13
13
  export type CompanyStats = {
14
14
  totalProductsCount: number;
15
+ syncedProductsCount: number;
16
+ limits: AppLimits;
17
+ maxProducts: number;
15
18
  profilesStats: {
16
19
  count: number;
17
20
  errors: number;
@@ -27,4 +30,8 @@ export type SubscriptionPlan = {
27
30
  profiles: number;
28
31
  price: number;
29
32
  };
33
+ export type AppLimits = {
34
+ products: number;
35
+ profiles: number;
36
+ };
30
37
  //# sourceMappingURL=company.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"company.types.d.ts","sourceRoot":"","sources":["../../src/types/company.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAA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AAM,YAAY,GAAG;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,SAAS,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA"}
@@ -8,7 +8,7 @@ export function makeSubscriptionCode(plan) {
8
8
  return `${plan.code}${plan.level}`;
9
9
  }
10
10
  export function makeSubscriptionName(plan) {
11
- return `${makeSubscriptionCode(plan)} (up to ${plan.products})`;
11
+ return makeSubscriptionCode(plan);
12
12
  }
13
13
  export function extractSubscriptionCode(subscription) {
14
14
  return subscription.name?.match(/^G\d+/i)?.[0] ?? null;
@@ -1 +1 @@
1
- {"version":3,"file":"company.js","sourceRoot":"","sources":["../../src/utils/company.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,yBAAyB,CACvC,KAAsB;IAEtB,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,KAAsB;IAEtB,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAE,IAAsB;IAC1D,OAAO,GAAG,IAAI,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;AAC3D,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAE,IAAmB;IAItD,MAAM,KAAK,GAAG,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACrC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACzD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feed-common",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Maxify feed common library",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  export type ServerSideEvent = {
2
2
  shop: string;
3
3
  eventID: string;
4
- type: "progress" | "schedule";
4
+ type: 'progress' | 'schedule';
5
5
  name: string;
6
6
  status?: boolean;
7
7
  };
@@ -15,6 +15,9 @@ export type ServerSideScheduleEvent = ServerSideEvent;
15
15
 
16
16
  export type CompanyStats = {
17
17
  totalProductsCount: number;
18
+ syncedProductsCount: number;
19
+ limits: AppLimits;
20
+ maxProducts: number;
18
21
  profilesStats: {
19
22
  count: number;
20
23
  errors: number;
@@ -31,3 +34,5 @@ export type SubscriptionPlan = {
31
34
  profiles: number;
32
35
  price: number;
33
36
  };
37
+
38
+ export type AppLimits = { products: number; profiles: number }
@@ -23,7 +23,7 @@ export function makeSubscriptionCode (plan: SubscriptionPlan) {
23
23
  }
24
24
 
25
25
  export function makeSubscriptionName (plan: SubscriptionPlan) {
26
- return `${makeSubscriptionCode(plan)} (up to ${plan.products})`;
26
+ return makeSubscriptionCode(plan);
27
27
  }
28
28
 
29
29
  export function extractSubscriptionCode (subscription: ShopifyRecurringCharge) {