@cakemail-org/ui-components-v2 2.2.120 → 2.2.122

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.
@@ -55,7 +55,7 @@ export type TTimeseriesPointBreakdown = {
55
55
  };
56
56
  export type TEventTimeseries = {
57
57
  granularity: string;
58
- event_type?: string | null;
58
+ event_type?: string | string[] | null;
59
59
  breakdown?: string | null;
60
60
  series: Array<TTimeseriesPoint | TTimeseriesPointBreakdown>;
61
61
  };
package/dist/cjs/index.js CHANGED
@@ -11449,12 +11449,18 @@ exports.EEventSortField = void 0;
11449
11449
  })(exports.EEventSortField || (exports.EEventSortField = {}));
11450
11450
 
11451
11451
  var eventsBaseUrl = uiKitConfig.GATEWAY_PROXY + "/events";
11452
+ var MULTI_VALUE_QUERY_FIELDS = ["eventType", "entityId"];
11453
+ function serializeMultiValueQueryFields(query) {
11454
+ MULTI_VALUE_QUERY_FIELDS.forEach(function (field) {
11455
+ if (Array.isArray(query[field])) {
11456
+ query[field] = query[field].join(",");
11457
+ }
11458
+ });
11459
+ }
11452
11460
  function buildEventQuery(options) {
11453
11461
  if (options === void 0) { options = {}; }
11454
11462
  var query = __assign({}, options);
11455
- if (Array.isArray(query.eventType)) {
11456
- query.eventType = query.eventType.join(",");
11457
- }
11463
+ serializeMultiValueQueryFields(query);
11458
11464
  if (query.properties && typeof query.properties === "object") {
11459
11465
  query.properties = JSON.stringify(query.properties);
11460
11466
  }
@@ -33,8 +33,10 @@ export type TEventDateRangeParams = {
33
33
  fromDate?: string;
34
34
  toDate?: string;
35
35
  };
36
+ export type TMultiValueEntityId = string | Array<string>;
37
+ export type TMultiValueEventType = ETrackedEventType | string | Array<ETrackedEventType | string>;
36
38
  export type TEventEntityFilterParams = {
37
- entityId?: string;
39
+ entityId?: TMultiValueEntityId;
38
40
  entityType?: ETrackedEntityType | string;
39
41
  };
40
42
  export type TEventAttributionFilterParams = {
@@ -52,7 +54,7 @@ export type TEventLineageParams = {
52
54
  };
53
55
  export type TEventCommonFilterParams = TEventDateRangeParams & TEventEntityFilterParams & TEventAttributionFilterParams & TEventLineageParams;
54
56
  export type TListEvents = TEventCommonFilterParams & {
55
- eventType?: ETrackedEventType | string | Array<ETrackedEventType | string>;
57
+ eventType?: TMultiValueEventType;
56
58
  sortBy?: EEventSortField | string;
57
59
  sortOrder?: "asc" | "desc";
58
60
  properties?: string | Record<string, unknown>;
@@ -66,18 +68,18 @@ export type TGetEventSummary = TEventCommonFilterParams & {
66
68
  useImpersonationTree?: boolean;
67
69
  };
68
70
  export type TGetEventTimeseries = TEventCommonFilterParams & {
69
- eventType?: ETrackedEventType | string;
71
+ eventType?: TMultiValueEventType;
70
72
  granularity?: EEventTimeseriesGranularity | string;
71
73
  breakdown?: EEventBreakdownDimension | string;
72
74
  useImpersonationTree?: boolean;
73
75
  };
74
76
  export type TGetEventBreakdown = TEventCommonFilterParams & {
75
77
  dimension: EEventBreakdownDimension | string;
76
- eventType?: ETrackedEventType | string;
78
+ eventType?: TMultiValueEventType;
77
79
  useImpersonationTree?: boolean;
78
80
  };
79
81
  export type TGetEventPropertyKeys = TEventDateRangeParams & TEventEntityFilterParams & TEventLineageParams & {
80
- eventType?: ETrackedEventType | string;
82
+ eventType?: TMultiValueEventType;
81
83
  search?: string;
82
84
  email?: string;
83
85
  useImpersonationTree?: boolean;
@@ -55,7 +55,7 @@ export type TTimeseriesPointBreakdown = {
55
55
  };
56
56
  export type TEventTimeseries = {
57
57
  granularity: string;
58
- event_type?: string | null;
58
+ event_type?: string | string[] | null;
59
59
  breakdown?: string | null;
60
60
  series: Array<TTimeseriesPoint | TTimeseriesPointBreakdown>;
61
61
  };
package/dist/esm/index.js CHANGED
@@ -11429,12 +11429,18 @@ var EEventSortField;
11429
11429
  })(EEventSortField || (EEventSortField = {}));
11430
11430
 
11431
11431
  var eventsBaseUrl = uiKitConfig.GATEWAY_PROXY + "/events";
11432
+ var MULTI_VALUE_QUERY_FIELDS = ["eventType", "entityId"];
11433
+ function serializeMultiValueQueryFields(query) {
11434
+ MULTI_VALUE_QUERY_FIELDS.forEach(function (field) {
11435
+ if (Array.isArray(query[field])) {
11436
+ query[field] = query[field].join(",");
11437
+ }
11438
+ });
11439
+ }
11432
11440
  function buildEventQuery(options) {
11433
11441
  if (options === void 0) { options = {}; }
11434
11442
  var query = __assign({}, options);
11435
- if (Array.isArray(query.eventType)) {
11436
- query.eventType = query.eventType.join(",");
11437
- }
11443
+ serializeMultiValueQueryFields(query);
11438
11444
  if (query.properties && typeof query.properties === "object") {
11439
11445
  query.properties = JSON.stringify(query.properties);
11440
11446
  }
@@ -33,8 +33,10 @@ export type TEventDateRangeParams = {
33
33
  fromDate?: string;
34
34
  toDate?: string;
35
35
  };
36
+ export type TMultiValueEntityId = string | Array<string>;
37
+ export type TMultiValueEventType = ETrackedEventType | string | Array<ETrackedEventType | string>;
36
38
  export type TEventEntityFilterParams = {
37
- entityId?: string;
39
+ entityId?: TMultiValueEntityId;
38
40
  entityType?: ETrackedEntityType | string;
39
41
  };
40
42
  export type TEventAttributionFilterParams = {
@@ -52,7 +54,7 @@ export type TEventLineageParams = {
52
54
  };
53
55
  export type TEventCommonFilterParams = TEventDateRangeParams & TEventEntityFilterParams & TEventAttributionFilterParams & TEventLineageParams;
54
56
  export type TListEvents = TEventCommonFilterParams & {
55
- eventType?: ETrackedEventType | string | Array<ETrackedEventType | string>;
57
+ eventType?: TMultiValueEventType;
56
58
  sortBy?: EEventSortField | string;
57
59
  sortOrder?: "asc" | "desc";
58
60
  properties?: string | Record<string, unknown>;
@@ -66,18 +68,18 @@ export type TGetEventSummary = TEventCommonFilterParams & {
66
68
  useImpersonationTree?: boolean;
67
69
  };
68
70
  export type TGetEventTimeseries = TEventCommonFilterParams & {
69
- eventType?: ETrackedEventType | string;
71
+ eventType?: TMultiValueEventType;
70
72
  granularity?: EEventTimeseriesGranularity | string;
71
73
  breakdown?: EEventBreakdownDimension | string;
72
74
  useImpersonationTree?: boolean;
73
75
  };
74
76
  export type TGetEventBreakdown = TEventCommonFilterParams & {
75
77
  dimension: EEventBreakdownDimension | string;
76
- eventType?: ETrackedEventType | string;
78
+ eventType?: TMultiValueEventType;
77
79
  useImpersonationTree?: boolean;
78
80
  };
79
81
  export type TGetEventPropertyKeys = TEventDateRangeParams & TEventEntityFilterParams & TEventLineageParams & {
80
- eventType?: ETrackedEventType | string;
82
+ eventType?: TMultiValueEventType;
81
83
  search?: string;
82
84
  email?: string;
83
85
  useImpersonationTree?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cakemail-org/ui-components-v2",
3
- "version": "2.2.120",
3
+ "version": "2.2.122",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -17,8 +17,7 @@
17
17
  "dev": "rollup -c --bundleConfigAsCjs --watch",
18
18
  "test": "jest",
19
19
  "storybook": "storybook dev -p 6006",
20
- "build-storybook": "storybook buloadingild",
21
- "publish": "npm run build && npm publish"
20
+ "build-storybook": "storybook buloadingild"
22
21
  },
23
22
  "author": "",
24
23
  "license": "ISC",
@@ -93,4 +92,4 @@
93
92
  "overrides": {
94
93
  "storybook": "$storybook"
95
94
  }
96
- }
95
+ }