feed-common 1.1.2 → 1.3.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [1.3.0](https://github.com/advertikon/package-maxify-feed-common/compare/v1.2.0...v1.3.0) (2024-04-14)
2
+
3
+
4
+ ### Features
5
+
6
+ * add ShopifySubscriptionInfo type ([ea7284f](https://github.com/advertikon/package-maxify-feed-common/commit/ea7284f655f8d5e0c2936b0c2aaee19e324945c5))
7
+
8
+ # [1.2.0](https://github.com/advertikon/package-maxify-feed-common/compare/v1.1.2...v1.2.0) (2024-02-25)
9
+
10
+
11
+ ### Features
12
+
13
+ * add maxProducts to CompanyStats ([b9e2617](https://github.com/advertikon/package-maxify-feed-common/commit/b9e2617b2e29bb05e47f5a372815447306b56164))
14
+
1
15
  ## [1.1.2](https://github.com/advertikon/package-maxify-feed-common/compare/v1.1.1...v1.1.2) (2024-02-16)
2
16
 
3
17
 
@@ -1,7 +1,8 @@
1
+ import { ShopifyRecurringCharge } from "./shopify.types";
1
2
  export type ServerSideEvent = {
2
3
  shop: string;
3
4
  eventID: string;
4
- type: 'progress' | 'schedule';
5
+ type: "progress" | "schedule";
5
6
  name: string;
6
7
  status?: boolean;
7
8
  };
@@ -10,10 +11,12 @@ export type ServerSideProgressEvent = ServerSideEvent & {
10
11
  totalCount: number;
11
12
  };
12
13
  export type ServerSideScheduleEvent = ServerSideEvent;
14
+ export type ShopifySubscriptionInfo = Pick<ShopifyRecurringCharge, "id" | "name" | "price" | "status" | "crated_at" | "updated_at" | "activated_on" | "trial_days" | "trial_ends_on" | "test">;
13
15
  export type CompanyStats = {
14
16
  totalProductsCount: number;
15
17
  syncedProductsCount: number;
16
18
  limits: AppLimits;
19
+ maxProducts: number;
17
20
  profilesStats: {
18
21
  count: number;
19
22
  errors: number;
@@ -21,6 +24,7 @@ export type CompanyStats = {
21
24
  profileId: string;
22
25
  profile: string;
23
26
  }[];
27
+ subscription: ShopifySubscriptionInfo;
24
28
  };
25
29
  export type SubscriptionPlan = {
26
30
  code: string;
@@ -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,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,eAAe,CAAC;AAEtD,MAAM,MAAM,YAAY,GAAG;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,SAAS,CAAC;IAClB,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"}
1
+ {"version":3,"file":"company.types.d.ts","sourceRoot":"","sources":["../../src/types/company.types.ts"],"names":[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AAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feed-common",
3
- "version": "1.1.2",
3
+ "version": "1.3.0",
4
4
  "description": "Maxify feed common library",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,7 +1,10 @@
1
+ /* eslint-disable quotes */
2
+ import { ShopifyRecurringCharge } from "./shopify.types";
3
+
1
4
  export type ServerSideEvent = {
2
5
  shop: string;
3
6
  eventID: string;
4
- type: 'progress' | 'schedule';
7
+ type: "progress" | "schedule";
5
8
  name: string;
6
9
  status?: boolean;
7
10
  };
@@ -13,10 +16,25 @@ export type ServerSideProgressEvent = ServerSideEvent & {
13
16
 
14
17
  export type ServerSideScheduleEvent = ServerSideEvent;
15
18
 
19
+ export type ShopifySubscriptionInfo = Pick<
20
+ ShopifyRecurringCharge,
21
+ | "id"
22
+ | "name"
23
+ | "price"
24
+ | "status"
25
+ | "crated_at"
26
+ | "updated_at"
27
+ | "activated_on"
28
+ | "trial_days"
29
+ | "trial_ends_on"
30
+ | "test"
31
+ >;
32
+
16
33
  export type CompanyStats = {
17
34
  totalProductsCount: number;
18
35
  syncedProductsCount: number;
19
36
  limits: AppLimits;
37
+ maxProducts: number;
20
38
  profilesStats: {
21
39
  count: number;
22
40
  errors: number;
@@ -24,6 +42,7 @@ export type CompanyStats = {
24
42
  profileId: string;
25
43
  profile: string;
26
44
  }[];
45
+ subscription: ShopifySubscriptionInfo;
27
46
  };
28
47
 
29
48
  export type SubscriptionPlan = {
@@ -34,4 +53,4 @@ export type SubscriptionPlan = {
34
53
  price: number;
35
54
  };
36
55
 
37
- export type AppLimits = { products: number; profiles: number }
56
+ export type AppLimits = { products: number; profiles: number };