@wix/bex-utils 2.78.0 → 2.79.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.
Files changed (75) hide show
  1. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/builders.impl.d.ts +22 -0
  2. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/builders.impl.js +275 -0
  3. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/builders.impl.js.map +1 -0
  4. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/http.impl.d.ts +50 -0
  5. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/http.impl.js +250 -0
  6. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/http.impl.js.map +1 -0
  7. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/meta.impl.d.ts +16 -0
  8. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/meta.impl.js +81 -0
  9. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/meta.impl.js.map +1 -0
  10. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/client/proto-generated.d.ts +7116 -0
  11. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/client/proto-generated.js +2 -0
  12. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/proto-generated.d.ts +3557 -0
  13. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/proto-generated.js +1 -0
  14. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/server/proto-generated.d.ts +7113 -0
  15. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/server/proto-generated.js +2 -0
  16. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/rpc.impl.d.ts +59 -0
  17. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/rpc.impl.js +109 -0
  18. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/rpc.impl.js.map +1 -0
  19. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/types.impl.d.ts +343 -0
  20. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/types.impl.js +42 -0
  21. package/@wix/ambassador-dealer-v1-offer-event/build/cjs/types.impl.js.map +1 -0
  22. package/@wix/ambassador-dealer-v1-offer-event/build/es/builders.impl.d.ts +22 -0
  23. package/@wix/ambassador-dealer-v1-offer-event/build/es/builders.impl.js +239 -0
  24. package/@wix/ambassador-dealer-v1-offer-event/build/es/builders.impl.js.map +1 -0
  25. package/@wix/ambassador-dealer-v1-offer-event/build/es/http.impl.d.ts +50 -0
  26. package/@wix/ambassador-dealer-v1-offer-event/build/es/http.impl.js +244 -0
  27. package/@wix/ambassador-dealer-v1-offer-event/build/es/http.impl.js.map +1 -0
  28. package/@wix/ambassador-dealer-v1-offer-event/build/es/meta.impl.d.ts +16 -0
  29. package/@wix/ambassador-dealer-v1-offer-event/build/es/meta.impl.js +56 -0
  30. package/@wix/ambassador-dealer-v1-offer-event/build/es/meta.impl.js.map +1 -0
  31. package/@wix/ambassador-dealer-v1-offer-event/build/es/rpc.impl.d.ts +59 -0
  32. package/@wix/ambassador-dealer-v1-offer-event/build/es/rpc.impl.js +84 -0
  33. package/@wix/ambassador-dealer-v1-offer-event/build/es/rpc.impl.js.map +1 -0
  34. package/@wix/ambassador-dealer-v1-offer-event/build/es/types.impl.d.ts +343 -0
  35. package/@wix/ambassador-dealer-v1-offer-event/build/es/types.impl.js +39 -0
  36. package/@wix/ambassador-dealer-v1-offer-event/build/es/types.impl.js.map +1 -0
  37. package/@wix/ambassador-dealer-v1-offer-event/builders/package.json +7 -0
  38. package/@wix/ambassador-dealer-v1-offer-event/http/package.json +7 -0
  39. package/@wix/ambassador-dealer-v1-offer-event/meta/package.json +7 -0
  40. package/@wix/ambassador-dealer-v1-offer-event/package.json +52 -0
  41. package/@wix/ambassador-dealer-v1-offer-event/rpc/package.json +6 -0
  42. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/action_payload.proto +33 -0
  43. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/annotations.proto +451 -0
  44. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/api_errors.proto +142 -0
  45. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/callback.proto +163 -0
  46. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/context.proto +19 -0
  47. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/entity.proto +127 -0
  48. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/errors.proto +127 -0
  49. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/idempotency.proto +25 -0
  50. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/permissions.proto +46 -0
  51. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/sla.proto +24 -0
  52. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/subscription.proto +32 -0
  53. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/validations.proto +142 -0
  54. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/address.proto +148 -0
  55. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/bulk.proto +53 -0
  56. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/identification.proto +40 -0
  57. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/image.proto +8 -0
  58. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/media.proto +280 -0
  59. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/money.proto +32 -0
  60. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/pageurl.proto +32 -0
  61. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/paging.proto +121 -0
  62. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/query.proto +799 -0
  63. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/sorting.proto +36 -0
  64. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/spi.proto +85 -0
  65. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/tags.proto +55 -0
  66. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/wixlink.proto +203 -0
  67. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/dealerOfferEvents/api/v1/dealer-offer-events.proto +211 -0
  68. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/dealerOfferEvents/api/v1/event.proto +131 -0
  69. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/graphql/definitions.proto +13 -0
  70. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/http/field_mask.proto +46 -0
  71. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/sdk/definitions.proto +191 -0
  72. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/spi/definitions.proto +187 -0
  73. package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/spi/http_error_status.proto +24 -0
  74. package/@wix/ambassador-dealer-v1-offer-event/types/package.json +7 -0
  75. package/package.json +4 -3
@@ -0,0 +1,2 @@
1
+ const wrapper = require('../proto-generated');
2
+ module.exports = {services: wrapper, requests: wrapper, responses: wrapper};
@@ -0,0 +1,59 @@
1
+ import { ListEventsSummaryRequest, ListEventsSummaryResponse, QueryEventsRequest, QueryEventsResponse, ReportEventRequest, ReportEventResponse } from './types.impl';
2
+ import * as wrapper from './proto/proto-generated';
3
+ declare const DealerOfferEventsService: typeof wrapper.wix.dealerOfferEvents.api.v1.DealerOfferEventsService;
4
+ export declare type RequestOptions<T = any, U = any> = {
5
+ _?: T;
6
+ requestData: any;
7
+ serviceArtifactId: string;
8
+ serviceProtoClass: U;
9
+ methodName: string;
10
+ };
11
+ /**
12
+ * Report an event for a Dealer Offer for a specific user identity and metasite.
13
+ * required fields: event.type, event.offer_id and event.real_estate_id (placementId) in addition - some of the event types require specific payload.
14
+ * For example MAIN_CTA_CLICK needs to be reported with main_cta_click payload that contains additional data on the event such as target_url.
15
+ * VIEW event does not require any additional information.
16
+ *
17
+ * Identity and metasite are taken implicitly from request by default - NO NEED TO PASS SUCH INFO.
18
+ * If an event is reported from metasite(BM/EDITOR), MAKE SURE request is sent with an authorization header.
19
+ *
20
+ * For some EDGE CASES - privileged apps with DEALER.OFFER_EVENTS_EXPLICIT_CONTEXT can report on behalf of user and fill identity(user_id and msid) fields.
21
+ */
22
+ export declare function reportEvent(payload: ReportEventRequest): RequestOptions<ReportEventResponse, typeof DealerOfferEventsService>;
23
+ /**
24
+ * return list of offer events summary for a bulk of offer ids.
25
+ * a summary response contains last event happened for each event type or event counts.
26
+ * - you have to provide field masks for all the event types you want to get for each offer.
27
+ * BY DEFAULT Summaries will be filtered by the implicit identity and metasite in the request.
28
+ *
29
+ * FOR SOME EDGE CASES - special permission DEALER.OFFER_EVENTS_EXPLICIT_CONTEXT is required in order to pass explicit identity and metasite filter.
30
+ *
31
+ * You can request event summary data for specific offers or specific campaigns.
32
+ *
33
+ * In case campaign level events summary requested, cumulative data is returned:
34
+ * — events counters are a sum of all campaign's offer events counters
35
+ * — lastEvent for campaign is the lastEvent of the "latest" offer within campaign
36
+ * — etc.
37
+ *
38
+ * If summary_filter.placement_id is set, then only offers belonging to campaign & placement is counted
39
+ * for campaign level summary
40
+ *
41
+ * If offer_ids is empty — you get empty result.events_summary
42
+ * If campaign_ids empty — you get empty result.campaign_events_summary
43
+ */
44
+ export declare function listEventsSummary(payload: ListEventsSummaryRequest): RequestOptions<ListEventsSummaryResponse, typeof DealerOfferEventsService>;
45
+ /**
46
+ * ONLY SUPPORTED FOR EVENT TYPE AGENT_MARK - USER JOURNEY USE CASES
47
+ * Returns list of offer events for given filters.
48
+ * Filters: offer_id (required), event_type (required, only AGENT_MARK); siteId is taken implicitly
49
+ * from aspects, so they must be server signed with siteId.
50
+ * Supported `paging`. Events limit by default is 200.
51
+ * Not supported 'sort`, `fields` and `fieldsets`. Events are sorted in descending order by creation_date.
52
+ *
53
+ * Query examples:
54
+ * query: { filter: { offer_id: <uuid> }, event_type: 'AGENT_MARK'}}
55
+ * query: { filter: { offer_id: { $in: [<uuid1>, <uuid2>] }, event_type: 'AGENT_MARK'}}
56
+ * query: { filter: { offer_id: { $in: [<uuid1>, <uuid2>] }, event_type: 'AGENT_MARK'}, paging: { offset: 10, limit: 100 } }
57
+ */
58
+ export declare function queryEvents(payload: QueryEventsRequest): RequestOptions<QueryEventsResponse, typeof DealerOfferEventsService>;
59
+ export {};
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.queryEvents = exports.listEventsSummary = exports.reportEvent = void 0;
23
+ var wrapper = __importStar(require("./proto/proto-generated"));
24
+ var DealerOfferEventsService = wrapper.wix.dealerOfferEvents.api.v1.DealerOfferEventsService;
25
+ /**
26
+ * Report an event for a Dealer Offer for a specific user identity and metasite.
27
+ * required fields: event.type, event.offer_id and event.real_estate_id (placementId) in addition - some of the event types require specific payload.
28
+ * For example MAIN_CTA_CLICK needs to be reported with main_cta_click payload that contains additional data on the event such as target_url.
29
+ * VIEW event does not require any additional information.
30
+ *
31
+ * Identity and metasite are taken implicitly from request by default - NO NEED TO PASS SUCH INFO.
32
+ * If an event is reported from metasite(BM/EDITOR), MAKE SURE request is sent with an authorization header.
33
+ *
34
+ * For some EDGE CASES - privileged apps with DEALER.OFFER_EVENTS_EXPLICIT_CONTEXT can report on behalf of user and fill identity(user_id and msid) fields.
35
+ */
36
+ function reportEvent(payload) {
37
+ var serviceArtifactId = 'com.wixpress.dealer-offer-events-service';
38
+ var serviceProtoClass = DealerOfferEventsService;
39
+ var methodName = 'reportEvent';
40
+ var requestData = payload;
41
+ return {
42
+ serviceProtoClass: serviceProtoClass,
43
+ serviceArtifactId: serviceArtifactId,
44
+ methodName: methodName,
45
+ requestData: requestData,
46
+ };
47
+ }
48
+ exports.reportEvent = reportEvent;
49
+ /**
50
+ * return list of offer events summary for a bulk of offer ids.
51
+ * a summary response contains last event happened for each event type or event counts.
52
+ * - you have to provide field masks for all the event types you want to get for each offer.
53
+ * BY DEFAULT Summaries will be filtered by the implicit identity and metasite in the request.
54
+ *
55
+ * FOR SOME EDGE CASES - special permission DEALER.OFFER_EVENTS_EXPLICIT_CONTEXT is required in order to pass explicit identity and metasite filter.
56
+ *
57
+ * You can request event summary data for specific offers or specific campaigns.
58
+ *
59
+ * In case campaign level events summary requested, cumulative data is returned:
60
+ * — events counters are a sum of all campaign's offer events counters
61
+ * — lastEvent for campaign is the lastEvent of the "latest" offer within campaign
62
+ * — etc.
63
+ *
64
+ * If summary_filter.placement_id is set, then only offers belonging to campaign & placement is counted
65
+ * for campaign level summary
66
+ *
67
+ * If offer_ids is empty — you get empty result.events_summary
68
+ * If campaign_ids empty — you get empty result.campaign_events_summary
69
+ */
70
+ function listEventsSummary(payload) {
71
+ var serviceArtifactId = 'com.wixpress.dealer-offer-events-service';
72
+ var serviceProtoClass = DealerOfferEventsService;
73
+ var methodName = 'listEventsSummary';
74
+ var requestData = payload;
75
+ return {
76
+ serviceProtoClass: serviceProtoClass,
77
+ serviceArtifactId: serviceArtifactId,
78
+ methodName: methodName,
79
+ requestData: requestData,
80
+ };
81
+ }
82
+ exports.listEventsSummary = listEventsSummary;
83
+ /**
84
+ * ONLY SUPPORTED FOR EVENT TYPE AGENT_MARK - USER JOURNEY USE CASES
85
+ * Returns list of offer events for given filters.
86
+ * Filters: offer_id (required), event_type (required, only AGENT_MARK); siteId is taken implicitly
87
+ * from aspects, so they must be server signed with siteId.
88
+ * Supported `paging`. Events limit by default is 200.
89
+ * Not supported 'sort`, `fields` and `fieldsets`. Events are sorted in descending order by creation_date.
90
+ *
91
+ * Query examples:
92
+ * query: { filter: { offer_id: <uuid> }, event_type: 'AGENT_MARK'}}
93
+ * query: { filter: { offer_id: { $in: [<uuid1>, <uuid2>] }, event_type: 'AGENT_MARK'}}
94
+ * query: { filter: { offer_id: { $in: [<uuid1>, <uuid2>] }, event_type: 'AGENT_MARK'}, paging: { offset: 10, limit: 100 } }
95
+ */
96
+ function queryEvents(payload) {
97
+ var serviceArtifactId = 'com.wixpress.dealer-offer-events-service';
98
+ var serviceProtoClass = DealerOfferEventsService;
99
+ var methodName = 'queryEvents';
100
+ var requestData = payload;
101
+ return {
102
+ serviceProtoClass: serviceProtoClass,
103
+ serviceArtifactId: serviceArtifactId,
104
+ methodName: methodName,
105
+ requestData: requestData,
106
+ };
107
+ }
108
+ exports.queryEvents = queryEvents;
109
+ //# sourceMappingURL=rpc.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc.impl.js","sourceRoot":"","sources":["../../rpc.impl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQA,+DAAmD;AAEnD,IAAM,wBAAwB,GAC5B,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,wBAAwB,CAAC;AAUhE;;;;;;;;;;GAUG;AACH,SAAgB,WAAW,CACzB,OAA2B;IAE3B,IAAM,iBAAiB,GAAW,0CAA0C,CAAC;IAC7E,IAAM,iBAAiB,GACrB,wBAAwB,CAAC;IAC3B,IAAM,UAAU,GAAW,aAAa,CAAC;IACzC,IAAM,WAAW,GAAuB,OAAO,CAAC;IAChD,OAAO;QACL,iBAAiB,mBAAA;QACjB,iBAAiB,mBAAA;QACjB,UAAU,YAAA;QACV,WAAW,aAAA;KACZ,CAAC;AACJ,CAAC;AAdD,kCAcC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,iBAAiB,CAC/B,OAAiC;IAEjC,IAAM,iBAAiB,GAAW,0CAA0C,CAAC;IAC7E,IAAM,iBAAiB,GACrB,wBAAwB,CAAC;IAC3B,IAAM,UAAU,GAAW,mBAAmB,CAAC;IAC/C,IAAM,WAAW,GAA6B,OAAO,CAAC;IACtD,OAAO;QACL,iBAAiB,mBAAA;QACjB,iBAAiB,mBAAA;QACjB,UAAU,YAAA;QACV,WAAW,aAAA;KACZ,CAAC;AACJ,CAAC;AAdD,8CAcC;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,WAAW,CACzB,OAA2B;IAE3B,IAAM,iBAAiB,GAAW,0CAA0C,CAAC;IAC7E,IAAM,iBAAiB,GACrB,wBAAwB,CAAC;IAC3B,IAAM,UAAU,GAAW,aAAa,CAAC;IACzC,IAAM,WAAW,GAAuB,OAAO,CAAC;IAChD,OAAO;QACL,iBAAiB,mBAAA;QACjB,iBAAiB,mBAAA;QACjB,UAAU,YAAA;QACV,WAAW,aAAA;KACZ,CAAC;AACJ,CAAC;AAdD,kCAcC"}
@@ -0,0 +1,343 @@
1
+ export interface OfferEvent extends OfferEventPayloadOneOf {
2
+ /** a payload when event type is AGENT_MARK */
3
+ agentMark?: AgentMarkedPayload;
4
+ /**
5
+ * a payload when event type is MAIN_CTA_CLICK
6
+ * currently will not be returned as part of summary response
7
+ */
8
+ mainCtaClick?: CTAClickPayload;
9
+ /**
10
+ * a payload when event type is SECONDARY_CTA_CLICK
11
+ * currently will not be returned as part of summary response
12
+ */
13
+ secondaryCtaClick?: CTAClickPayload;
14
+ /**
15
+ * unique guid
16
+ * @format GUID
17
+ */
18
+ offerId?: string;
19
+ /**
20
+ * the direct user recieved the offer - returned only for AGENT_MARK summary/query
21
+ * OPTIONAL - NOT RECOMMENDED to pass in report event.
22
+ * @format GUID
23
+ */
24
+ userId?: string | null;
25
+ /**
26
+ * the target account context recieved the offer
27
+ * OPTIONAL - NOT RECOMMENDED to pass in report event.
28
+ * @format GUID
29
+ */
30
+ targetAccountId?: string | null;
31
+ /**
32
+ * returned only for AGENT_MARK summary/query
33
+ * OPTIONAL - NOT RECOMMENDED to pass in report event.
34
+ * @format GUID
35
+ */
36
+ loggedInAccountId?: string | null;
37
+ /**
38
+ * the site context recieved the offer
39
+ * OPTIONAL - NOT RECOMMENDED to pass in report event.
40
+ * @format GUID
41
+ */
42
+ siteId?: string | null;
43
+ /**
44
+ * returned only for AGENT_MARK summary/query
45
+ * @format GUID
46
+ * @readonly
47
+ */
48
+ eventId?: string | null;
49
+ /**
50
+ * creation timestamp
51
+ * @readonly
52
+ */
53
+ createdAt?: Date | null;
54
+ /**
55
+ * for some of the event types a payload should be passed
56
+ * for example if u pass MAIN_CTA_CLICK then main_cta_click payload should also be passed with target_url
57
+ */
58
+ type?: EventType;
59
+ /** currently will not be returned as part of summary/query response */
60
+ realEstateId?: string | null;
61
+ /**
62
+ * URL of a web page which is initial cause/source of the event (if available)
63
+ * if left blank and grpc endpoint is exposed over http rest - taken from HTTP referrer header
64
+ * currently will not be returned as part of summary response - not supported for AGENT_MARK
65
+ */
66
+ httpReferrer?: string | null;
67
+ /**
68
+ * Some external asset guid. Can be the banner/LB campaign creative guid, but isn't specific to LB/banner assets.
69
+ * currently will not be returned as part of summary response - not supported for AGENT_MARK
70
+ * @format GUID
71
+ */
72
+ assetId?: string | null;
73
+ /**
74
+ * For placements that are used in multiple platforms simultaneously, pass the information of where this interaction happened.
75
+ * standard platforms for bi: BUSINESS_MANAGER, EDITORX, EDITORX, ADI, OWNER_APP
76
+ */
77
+ platform?: PlatformEnum;
78
+ }
79
+ /** @oneof */
80
+ export interface OfferEventPayloadOneOf {
81
+ /** a payload when event type is AGENT_MARK */
82
+ agentMark?: AgentMarkedPayload;
83
+ /**
84
+ * a payload when event type is MAIN_CTA_CLICK
85
+ * currently will not be returned as part of summary response
86
+ */
87
+ mainCtaClick?: CTAClickPayload;
88
+ /**
89
+ * a payload when event type is SECONDARY_CTA_CLICK
90
+ * currently will not be returned as part of summary response
91
+ */
92
+ secondaryCtaClick?: CTAClickPayload;
93
+ }
94
+ export declare enum EventType {
95
+ UNKNOWN = "UNKNOWN",
96
+ VIEW = "VIEW",
97
+ MAIN_CTA_CLICK = "MAIN_CTA_CLICK",
98
+ SECONDARY_CTA_CLICK = "SECONDARY_CTA_CLICK",
99
+ AGENT_MARK = "AGENT_MARK",
100
+ SKIP = "SKIP",
101
+ UNSKIP = "UNSKIP",
102
+ CLOSE = "CLOSE",
103
+ SHOW_LATER = "SHOW_LATER"
104
+ }
105
+ export interface AgentMarkedPayload {
106
+ /**
107
+ * id of related agent
108
+ * @format GUID
109
+ */
110
+ agentId?: string | null;
111
+ /** Offer status */
112
+ status?: AgentOfferStatusEnum;
113
+ }
114
+ export declare enum AgentOfferStatusEnum {
115
+ NOT_STARTED = "NOT_STARTED",
116
+ SUGGESTED = "SUGGESTED",
117
+ REJECTED = "REJECTED",
118
+ REQUESTED = "REQUESTED",
119
+ ALREADY_COMPLETED = "ALREADY_COMPLETED",
120
+ NOT_RELEVANT = "NOT_RELEVANT",
121
+ PAUSED = "PAUSED"
122
+ }
123
+ export interface CTAClickPayload {
124
+ /**
125
+ * destination url of the cta if available (i.e. CTA href etc.)
126
+ * in some cases Cta is not url - therfore a simple string can be passed
127
+ */
128
+ targetUrl?: string | null;
129
+ }
130
+ export declare enum PlatformEnum {
131
+ UNKNOWN = "UNKNOWN",
132
+ BUSINESS_MANAGER = "BUSINESS_MANAGER",
133
+ EDITORX = "EDITORX",
134
+ EDITOR = "EDITOR",
135
+ ADI = "ADI",
136
+ OWNER_APP = "OWNER_APP",
137
+ BRANDED_APP = "BRANDED_APP",
138
+ DEV_CENTER = "DEV_CENTER"
139
+ }
140
+ export interface ReportEventRequest {
141
+ /** Event properties container */
142
+ event?: OfferEvent;
143
+ /**
144
+ * Deviant Art specific use-case: signed jwt token with uuid of deviant art user in wix bi infra
145
+ * @maxLength 4096
146
+ */
147
+ deviantArtUserId?: string | null;
148
+ }
149
+ export interface ReportEventResponse {
150
+ }
151
+ export interface ListEventsSummaryRequest {
152
+ /**
153
+ * each element in response.eventsSummary is a summary of offerId
154
+ * @format GUID
155
+ */
156
+ offerIds?: string[];
157
+ /**
158
+ * each element in response.campaignEventsSummary is a summary of corresponding campaignId
159
+ * @format GUID
160
+ */
161
+ campaignIds?: string[];
162
+ /**
163
+ * applied to each requested offer or each offer within requested campaigns
164
+ * all fields are optional - if not passing fields mask then no summary will be returned
165
+ */
166
+ summaryFilter?: SummaryFilter;
167
+ }
168
+ export interface SummaryFilter {
169
+ /**
170
+ * OPNIONAL - only events reported with this user id will be taken into account - supported by AGENT_MARK only
171
+ * @format GUID
172
+ */
173
+ userId?: string | null;
174
+ /**
175
+ * OPNIONAL - only events reported with this account id will be taken into account
176
+ * @format GUID
177
+ */
178
+ targetAccountId?: string | null;
179
+ /**
180
+ * OPNIONAL - only events reported with this site id will be taken into account
181
+ * @format GUID
182
+ */
183
+ siteId?: string | null;
184
+ /**
185
+ * which placement offers take into account in campaign scope (applicable only for campaign_ids requests)
186
+ * @format GUID
187
+ */
188
+ placementId?: string | null;
189
+ /**
190
+ * Array of strings that will determine which events will be included in EventsSummary response
191
+ * In the format of EventsSummary fields "<event_usecase>.<event_type>"
192
+ *
193
+ * Possible values for VIEW events:
194
+ * - lastEvent.VIEW
195
+ * - eventsCount.VIEW
196
+ * Possible values for MAIN_CTA_CLICK events:
197
+ * * get last main cta click of any action type:
198
+ * - lastEvent.MAIN_CTA_CLICK
199
+ * - eventsCount.MAIN_CTA_CLICK
200
+ *
201
+ * Possible values for AGENT_MARK events:
202
+ * * get last event of any status:
203
+ * - lastEvent.AGENT_MARK
204
+ *
205
+ *
206
+ * For example:
207
+ * "lastEvent.VIEW,lastEvent.AGENT_MARK,eventsCount.MAIN_CTA_CLICK"
208
+ *
209
+ * will result in (if CLOSE event exists for given offer/user/metasite)
210
+ * {
211
+ * lastEvent: {
212
+ * VIEW: {...(OfferEvent data)},
213
+ * AGENT_MARK: {...(OfferEvent data)}
214
+ * },
215
+ * eventsCount:{ MAIN_CTA_CLICK: { totalCount: 20 }}
216
+ * }
217
+ */
218
+ fieldMask?: string[];
219
+ }
220
+ export interface ListEventsSummaryResponse {
221
+ /** list of event summaries for requested offer ids, will be empty if only campaign events requested */
222
+ eventsSummary?: EventsSummary[];
223
+ /** list of event summaries for requested campaign ids, will be empty if only offer events requested */
224
+ campaignEventsSummary?: EventsSummary[];
225
+ }
226
+ export interface EventsSummary {
227
+ /**
228
+ * If set - means this summary is about the offer
229
+ * @format GUID
230
+ */
231
+ offerId?: string | null;
232
+ /**
233
+ * If set - means this summary is about the campaign
234
+ * @format GUID
235
+ */
236
+ campaignId?: string | null;
237
+ /**
238
+ * Campaign summary: Last event per type among all offers within campaign (+ placement if filter specified)
239
+ * Offer summary: Last event per type for given offer
240
+ *
241
+ * key is a value from EventType enum
242
+ * OfferEvent enity eill be returned partailly dependeing on event type - see details on entity
243
+ */
244
+ lastEvent?: Record<string, OfferEvent>;
245
+ /**
246
+ * Campaign summary: cumulative counters for all offer events of the same type within this campaign (+ placement if filter specified)
247
+ * Offer summary: event counts per type for given offer
248
+ *
249
+ * key is a value from EventType enum
250
+ */
251
+ eventsCount?: Record<string, EventCounts>;
252
+ }
253
+ export interface EventCounts {
254
+ /** counter */
255
+ totalCount?: number | null;
256
+ }
257
+ export interface QueryEventsRequest {
258
+ /**
259
+ * Query examples:
260
+ * query: { filter: { offer_id: <uuid> }, event_type: 'AGENT_MARK'}}
261
+ * query: { filter: { offer_id: { $in: [<uuid1>, <uuid2>] }, event_type: 'AGENT_MARK'}}
262
+ * query: { filter: { offer_id: { $in: [<uuid1>, <uuid2>] }, event_type: 'AGENT_MARK'}, paging: { offset: 10, limit: 100 } }
263
+ */
264
+ query: Query;
265
+ }
266
+ export interface Query {
267
+ /**
268
+ * Filter object in the following format:
269
+ * `"filter" : {
270
+ * "fieldName1": "value1",
271
+ * "fieldName2":{"$operator":"value2"}
272
+ * }`
273
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
274
+ */
275
+ filter?: any;
276
+ /**
277
+ * Sort object in the following format:
278
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
279
+ */
280
+ sort?: Sorting[];
281
+ /** Paging options to limit and skip the number of items. */
282
+ paging?: Paging;
283
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
284
+ fields?: string[];
285
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
286
+ fieldsets?: string[];
287
+ }
288
+ export interface Sorting {
289
+ /**
290
+ * Name of the field to sort by.
291
+ * @maxLength 512
292
+ */
293
+ fieldName?: string;
294
+ /** Sort order. */
295
+ order?: SortOrder;
296
+ /**
297
+ * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
298
+ * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
299
+ *
300
+ * If multiple filters are provided, they are combined with AND operator.
301
+ *
302
+ * Example:
303
+ * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
304
+ * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
305
+ * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
306
+ * @internal
307
+ * @maxSize 10
308
+ */
309
+ selectItemsBy?: Record<string, any>[] | null;
310
+ }
311
+ export declare enum SortOrder {
312
+ ASC = "ASC",
313
+ DESC = "DESC"
314
+ }
315
+ export interface Paging {
316
+ /** Number of items to load. */
317
+ limit?: number | null;
318
+ /** Number of items to skip in the current sort order. */
319
+ offset?: number | null;
320
+ }
321
+ export interface QueryEventsResponse {
322
+ /** List of offer events */
323
+ events?: OfferEvent[];
324
+ /** result paging status */
325
+ pagingMetadata?: PagingMetadata;
326
+ }
327
+ export interface PagingMetadata {
328
+ /** Number of items returned in the response. */
329
+ count?: number | null;
330
+ /** Offset that was requested. */
331
+ offset?: number | null;
332
+ /** Total number of items that match the query. */
333
+ total?: number | null;
334
+ /** Flag that indicates the server failed to calculate the `total` field. */
335
+ tooManyToCount?: boolean | null;
336
+ /**
337
+ * Indicates if there are more results after the current page.
338
+ * If `true`, another page of results can be retrieved.
339
+ * If `false`, this is the last page.
340
+ * @internal
341
+ */
342
+ hasNext?: boolean | null;
343
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SortOrder = exports.PlatformEnum = exports.AgentOfferStatusEnum = exports.EventType = void 0;
4
+ var EventType;
5
+ (function (EventType) {
6
+ EventType["UNKNOWN"] = "UNKNOWN";
7
+ EventType["VIEW"] = "VIEW";
8
+ EventType["MAIN_CTA_CLICK"] = "MAIN_CTA_CLICK";
9
+ EventType["SECONDARY_CTA_CLICK"] = "SECONDARY_CTA_CLICK";
10
+ EventType["AGENT_MARK"] = "AGENT_MARK";
11
+ EventType["SKIP"] = "SKIP";
12
+ EventType["UNSKIP"] = "UNSKIP";
13
+ EventType["CLOSE"] = "CLOSE";
14
+ EventType["SHOW_LATER"] = "SHOW_LATER";
15
+ })(EventType = exports.EventType || (exports.EventType = {}));
16
+ var AgentOfferStatusEnum;
17
+ (function (AgentOfferStatusEnum) {
18
+ AgentOfferStatusEnum["NOT_STARTED"] = "NOT_STARTED";
19
+ AgentOfferStatusEnum["SUGGESTED"] = "SUGGESTED";
20
+ AgentOfferStatusEnum["REJECTED"] = "REJECTED";
21
+ AgentOfferStatusEnum["REQUESTED"] = "REQUESTED";
22
+ AgentOfferStatusEnum["ALREADY_COMPLETED"] = "ALREADY_COMPLETED";
23
+ AgentOfferStatusEnum["NOT_RELEVANT"] = "NOT_RELEVANT";
24
+ AgentOfferStatusEnum["PAUSED"] = "PAUSED";
25
+ })(AgentOfferStatusEnum = exports.AgentOfferStatusEnum || (exports.AgentOfferStatusEnum = {}));
26
+ var PlatformEnum;
27
+ (function (PlatformEnum) {
28
+ PlatformEnum["UNKNOWN"] = "UNKNOWN";
29
+ PlatformEnum["BUSINESS_MANAGER"] = "BUSINESS_MANAGER";
30
+ PlatformEnum["EDITORX"] = "EDITORX";
31
+ PlatformEnum["EDITOR"] = "EDITOR";
32
+ PlatformEnum["ADI"] = "ADI";
33
+ PlatformEnum["OWNER_APP"] = "OWNER_APP";
34
+ PlatformEnum["BRANDED_APP"] = "BRANDED_APP";
35
+ PlatformEnum["DEV_CENTER"] = "DEV_CENTER";
36
+ })(PlatformEnum = exports.PlatformEnum || (exports.PlatformEnum = {}));
37
+ var SortOrder;
38
+ (function (SortOrder) {
39
+ SortOrder["ASC"] = "ASC";
40
+ SortOrder["DESC"] = "DESC";
41
+ })(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
42
+ //# sourceMappingURL=types.impl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.impl.js","sourceRoot":"","sources":["../../types.impl.ts"],"names":[],"mappings":";;;AA+FA,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,0BAAa,CAAA;IACb,8CAAiC,CAAA;IACjC,wDAA2C,CAAA;IAC3C,sCAAyB,CAAA;IACzB,0BAAa,CAAA;IACb,8BAAiB,CAAA;IACjB,4BAAe,CAAA;IACf,sCAAyB,CAAA;AAC3B,CAAC,EAVW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAUpB;AAYD,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,mDAA2B,CAAA;IAC3B,+CAAuB,CAAA;IACvB,6CAAqB,CAAA;IACrB,+CAAuB,CAAA;IACvB,+DAAuC,CAAA;IACvC,qDAA6B,CAAA;IAC7B,yCAAiB,CAAA;AACnB,CAAC,EARW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAQ/B;AAUD,IAAY,YASX;AATD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,qDAAqC,CAAA;IACrC,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,2BAAW,CAAA;IACX,uCAAuB,CAAA;IACvB,2CAA2B,CAAA;IAC3B,yCAAyB,CAAA;AAC3B,CAAC,EATW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QASvB;AAsLD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}
@@ -0,0 +1,22 @@
1
+ import { Paging, PagingMetadata, Query, Sorting, SortOrder, AgentMarkedPayload, AgentOfferStatusEnum, CTAClickPayload, EventCounts, EventsSummary, EventType, ListEventsSummaryRequest, ListEventsSummaryResponse, OfferEvent, QueryEventsRequest, QueryEventsResponse, ReportEventRequest, ReportEventResponse, SummaryFilter, PlatformEnum } from './types.impl';
2
+ export declare function aOfferEvent(overrideObject?: Partial<OfferEvent>): OfferEvent;
3
+ export declare function aEventType(enumFirstItem?: EventType): EventType;
4
+ export declare function aAgentMarkedPayload(overrideObject?: Partial<AgentMarkedPayload>): AgentMarkedPayload;
5
+ export declare function aAgentOfferStatusEnum(enumFirstItem?: AgentOfferStatusEnum): AgentOfferStatusEnum;
6
+ export declare function aCTAClickPayload(overrideObject?: Partial<CTAClickPayload>): CTAClickPayload;
7
+ export declare function aPlatformEnum(enumFirstItem?: PlatformEnum): PlatformEnum;
8
+ export declare function aReportEventRequest(overrideObject?: Partial<ReportEventRequest>): ReportEventRequest;
9
+ export declare function aReportEventResponse(overrideObject?: Partial<ReportEventResponse>): ReportEventResponse;
10
+ export declare function aListEventsSummaryRequest(overrideObject?: Partial<ListEventsSummaryRequest>): ListEventsSummaryRequest;
11
+ export declare function aSummaryFilter(overrideObject?: Partial<SummaryFilter>): SummaryFilter;
12
+ export declare function aListEventsSummaryResponse(overrideObject?: Partial<ListEventsSummaryResponse>): ListEventsSummaryResponse;
13
+ export declare function aEventsSummary(overrideObject?: Partial<EventsSummary>): EventsSummary;
14
+ export declare function aEventCounts(overrideObject?: Partial<EventCounts>): EventCounts;
15
+ export declare function aQueryEventsRequest(overrideObject?: Partial<QueryEventsRequest>): QueryEventsRequest;
16
+ export declare function aQuery(overrideObject?: Partial<Query>): Query;
17
+ export declare function aSorting(overrideObject?: Partial<Sorting>): Sorting;
18
+ export declare function aSortOrder(enumFirstItem?: SortOrder): SortOrder;
19
+ export declare function aPaging(overrideObject?: Partial<Paging>): Paging;
20
+ export declare function aQueryEventsResponse(overrideObject?: Partial<QueryEventsResponse>): QueryEventsResponse;
21
+ export declare function aPagingMetadata(overrideObject?: Partial<PagingMetadata>): PagingMetadata;
22
+ export * from '@wix/metro-common-builders';