feed-common 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [1.1.2](https://github.com/advertikon/package-maxify-feed-common/compare/v1.1.1...v1.1.2) (2024-02-16)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* add company stuff ([4bc7e37](https://github.com/advertikon/package-maxify-feed-common/commit/4bc7e37368afce41b988b90db52b0e9d8576cf3c))
|
7
|
+
|
1
8
|
## [1.1.1](https://github.com/advertikon/package-maxify-feed-common/compare/v1.1.0...v1.1.1) (2024-02-12)
|
2
9
|
|
3
10
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
export type ServerSideEvent = {
|
2
2
|
shop: string;
|
3
3
|
eventID: string;
|
4
|
-
type:
|
4
|
+
type: 'progress' | 'schedule';
|
5
5
|
name: string;
|
6
6
|
status?: boolean;
|
7
7
|
};
|
@@ -12,6 +12,8 @@ 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;
|
15
17
|
profilesStats: {
|
16
18
|
count: number;
|
17
19
|
errors: number;
|
@@ -27,4 +29,8 @@ export type SubscriptionPlan = {
|
|
27
29
|
profiles: number;
|
28
30
|
price: number;
|
29
31
|
};
|
32
|
+
export type AppLimits = {
|
33
|
+
products: number;
|
34
|
+
profiles: number;
|
35
|
+
};
|
30
36
|
//# 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,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,UAAU,GA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3B,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"}
|
package/dist/utils/company.js
CHANGED
@@ -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
|
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,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAE,IAAsB;IACxD,OAAO,
|
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,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAE,IAAsB;IACxD,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAE,YAAoC;IACzE,OAAO,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;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,7 +1,7 @@
|
|
1
1
|
export type ServerSideEvent = {
|
2
2
|
shop: string;
|
3
3
|
eventID: string;
|
4
|
-
type:
|
4
|
+
type: 'progress' | 'schedule';
|
5
5
|
name: string;
|
6
6
|
status?: boolean;
|
7
7
|
};
|
@@ -15,6 +15,8 @@ export type ServerSideScheduleEvent = ServerSideEvent;
|
|
15
15
|
|
16
16
|
export type CompanyStats = {
|
17
17
|
totalProductsCount: number;
|
18
|
+
syncedProductsCount: number;
|
19
|
+
limits: AppLimits;
|
18
20
|
profilesStats: {
|
19
21
|
count: number;
|
20
22
|
errors: number;
|
@@ -31,3 +33,5 @@ export type SubscriptionPlan = {
|
|
31
33
|
profiles: number;
|
32
34
|
price: number;
|
33
35
|
};
|
36
|
+
|
37
|
+
export type AppLimits = { products: number; profiles: number }
|
package/src/utils/company.ts
CHANGED
@@ -23,7 +23,7 @@ export function makeSubscriptionCode (plan: SubscriptionPlan) {
|
|
23
23
|
}
|
24
24
|
|
25
25
|
export function makeSubscriptionName (plan: SubscriptionPlan) {
|
26
|
-
return
|
26
|
+
return makeSubscriptionCode(plan);
|
27
27
|
}
|
28
28
|
|
29
29
|
export function extractSubscriptionCode (subscription: ShopifyRecurringCharge) {
|