feed-common 1.0.1 → 1.0.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.0.2](https://github.com/advertikon/package-maxify-feed-common/compare/v1.0.1...v1.0.2) (2024-02-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * some changes ([e984a10](https://github.com/advertikon/package-maxify-feed-common/commit/e984a10d9816044b53ea894c881526a7af59ca40))
7
+
1
8
  ## [1.0.1](https://github.com/advertikon/package-maxify-feed-common/compare/v1.0.0...v1.0.1) (2024-01-30)
2
9
 
3
10
 
@@ -1,8 +1,8 @@
1
1
  export declare enum GmcProductSyncStatus {
2
2
  REJECTED = "rejected",
3
3
  APPROVED = "approved",
4
- WARINING = "warning",
5
- SYNC_SHEDULED = "sync_sheduled"
4
+ WARNING = "warning",
5
+ SYNC_SCHEDULED = "sync_scheduled"
6
6
  }
7
7
  export declare enum GoogleAccountStatus {
8
8
  ENABLED = "ENABLED",
@@ -2,8 +2,8 @@ export var GmcProductSyncStatus;
2
2
  (function (GmcProductSyncStatus) {
3
3
  GmcProductSyncStatus["REJECTED"] = "rejected";
4
4
  GmcProductSyncStatus["APPROVED"] = "approved";
5
- GmcProductSyncStatus["WARINING"] = "warning";
6
- GmcProductSyncStatus["SYNC_SHEDULED"] = "sync_sheduled";
5
+ GmcProductSyncStatus["WARNING"] = "warning";
6
+ GmcProductSyncStatus["SYNC_SCHEDULED"] = "sync_scheduled";
7
7
  })(GmcProductSyncStatus || (GmcProductSyncStatus = {}));
8
8
  export var GoogleAccountStatus;
9
9
  (function (GoogleAccountStatus) {
@@ -1 +1 @@
1
- {"version":3,"file":"google.constants.js","sourceRoot":"","sources":["../../src/constants/google.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;IACrB,4CAAoB,CAAA;IACpB,uDAA+B,CAAA;AACjC,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B"}
1
+ {"version":3,"file":"google.constants.js","sourceRoot":"","sources":["../../src/constants/google.constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,yDAAiC,CAAA;AACnC,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACvB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B"}
package/dist/index.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from './types/company.types.js';
7
7
  export * from './utils/gmc.js';
8
8
  export * from './utils/profile.js';
9
9
  export * from './utils/utils.js';
10
+ export * from './utils/company.js';
package/dist/index.js CHANGED
@@ -7,4 +7,5 @@ export * from './types/company.types.js';
7
7
  export * from './utils/gmc.js';
8
8
  export * from './utils/profile.js';
9
9
  export * from './utils/utils.js';
10
+ export * from './utils/company.js';
10
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
@@ -1,9 +1,11 @@
1
- export type CompanyActionProgress = {
2
- progress: number;
3
- totalCount: number;
4
- name: 'shopify' | 'gmc' | 'issues' | 'shopify-collection';
1
+ export type ServerSideEvent = {
2
+ shop: string;
5
3
  threadId: string;
4
+ type: 'progress' | 'schedule';
5
+ name: string;
6
6
  };
7
- export type CompanyActivity = CompanyActionProgress & {
8
- shop: string;
7
+ export type ServerSideProgressEvent = ServerSideEvent & {
8
+ progress: number;
9
+ totalCount: number;
9
10
  };
11
+ export type ServerSideScheduleEvent = ServerSideEvent;
@@ -0,0 +1,3 @@
1
+ import { ServerSideEvent, ServerSideProgressEvent, ServerSideScheduleEvent } from '../types/company.types.js';
2
+ export declare function isServerSideProgressEvent(event: ServerSideEvent): event is ServerSideProgressEvent;
3
+ export declare function isServerSideScheduleEvent(event: ServerSideEvent): event is ServerSideScheduleEvent;
@@ -0,0 +1,7 @@
1
+ export function isServerSideProgressEvent(event) {
2
+ return event.type === 'progress';
3
+ }
4
+ export function isServerSideScheduleEvent(event) {
5
+ return event.type === 'schedule';
6
+ }
7
+ //# sourceMappingURL=company.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company.js","sourceRoot":"","sources":["../../src/utils/company.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,yBAAyB,CAAE,KAAsB;IAC7D,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAE,KAAsB;IAC7D,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACrC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feed-common",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Maxify feed common library",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,8 +1,8 @@
1
1
  export enum GmcProductSyncStatus {
2
2
  REJECTED = 'rejected',
3
3
  APPROVED = 'approved',
4
- WARINING = 'warning',
5
- SYNC_SHEDULED = 'sync_sheduled',
4
+ WARNING = 'warning',
5
+ SYNC_SCHEDULED = 'sync_scheduled',
6
6
  }
7
7
 
8
8
  export enum GoogleAccountStatus {
package/src/index.ts CHANGED
@@ -8,4 +8,5 @@ export * from './types/company.types.js';
8
8
 
9
9
  export * from './utils/gmc.js';
10
10
  export * from './utils/profile.js';
11
- export * from './utils/utils.js';
11
+ export * from './utils/utils.js';
12
+ export * from './utils/company.js';
@@ -1,10 +1,8 @@
1
- export type CompanyActionProgress = {
1
+ export type ServerSideEvent = {shop: string; threadId: string; type: 'progress'|'schedule', name: string};
2
+
3
+ export type ServerSideProgressEvent = ServerSideEvent & {
2
4
  progress: number;
3
5
  totalCount: number;
4
- name: 'shopify' | 'gmc' | 'issues' | 'shopify-collection';
5
- threadId: string;
6
6
  };
7
7
 
8
- export type CompanyActivity = CompanyActionProgress & {
9
- shop: string;
10
- };
8
+ export type ServerSideScheduleEvent = ServerSideEvent;
@@ -0,0 +1,9 @@
1
+ import { ServerSideEvent, ServerSideProgressEvent, ServerSideScheduleEvent } from '../types/company.types.js';
2
+
3
+ export function isServerSideProgressEvent (event: ServerSideEvent): event is ServerSideProgressEvent {
4
+ return event.type === 'progress';
5
+ }
6
+
7
+ export function isServerSideScheduleEvent (event: ServerSideEvent): event is ServerSideScheduleEvent {
8
+ return event.type === 'schedule';
9
+ }
@@ -1,9 +0,0 @@
1
- rm -R /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/dist/
2
- rm -R /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/src/
3
- cp -R dist/ /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/
4
- cp -R src/ /var/www/html/shopify/maxify-feed-express/server/node_modules/feed-common/
5
-
6
- rm -R /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/dist/
7
- rm -R /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/src/
8
- cp -R dist/ /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/
9
- cp -R src/ /var/www/html/shopify/maxify-feed-express/front/node_modules/feed-common/