@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.
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/builders.impl.d.ts +22 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/builders.impl.js +275 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/builders.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/http.impl.d.ts +50 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/http.impl.js +250 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/http.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/meta.impl.d.ts +16 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/meta.impl.js +81 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/meta.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/client/proto-generated.d.ts +7116 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/client/proto-generated.js +2 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/proto-generated.d.ts +3557 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/proto-generated.js +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/server/proto-generated.d.ts +7113 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/proto/server/proto-generated.js +2 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/rpc.impl.d.ts +59 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/rpc.impl.js +109 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/rpc.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/types.impl.d.ts +343 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/types.impl.js +42 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/cjs/types.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/builders.impl.d.ts +22 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/builders.impl.js +239 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/builders.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/http.impl.d.ts +50 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/http.impl.js +244 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/http.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/meta.impl.d.ts +16 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/meta.impl.js +56 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/meta.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/rpc.impl.d.ts +59 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/rpc.impl.js +84 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/rpc.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/types.impl.d.ts +343 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/types.impl.js +39 -0
- package/@wix/ambassador-dealer-v1-offer-event/build/es/types.impl.js.map +1 -0
- package/@wix/ambassador-dealer-v1-offer-event/builders/package.json +7 -0
- package/@wix/ambassador-dealer-v1-offer-event/http/package.json +7 -0
- package/@wix/ambassador-dealer-v1-offer-event/meta/package.json +7 -0
- package/@wix/ambassador-dealer-v1-offer-event/package.json +52 -0
- package/@wix/ambassador-dealer-v1-offer-event/rpc/package.json +6 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/action_payload.proto +33 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/annotations.proto +451 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/api_errors.proto +142 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/callback.proto +163 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/context.proto +19 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/entity.proto +127 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/errors.proto +127 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/idempotency.proto +25 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/permissions.proto +46 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/sla.proto +24 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/subscription.proto +32 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/api/validations.proto +142 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/address.proto +148 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/bulk.proto +53 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/identification.proto +40 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/image.proto +8 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/media.proto +280 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/money.proto +32 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/pageurl.proto +32 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/paging.proto +121 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/query.proto +799 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/sorting.proto +36 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/spi.proto +85 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/tags.proto +55 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/common/wixlink.proto +203 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/dealerOfferEvents/api/v1/dealer-offer-events.proto +211 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/dealerOfferEvents/api/v1/event.proto +131 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/graphql/definitions.proto +13 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/http/field_mask.proto +46 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/sdk/definitions.proto +191 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/spi/definitions.proto +187 -0
- package/@wix/ambassador-dealer-v1-offer-event/src/main/proto/wix/spi/http_error_status.proto +24 -0
- package/@wix/ambassador-dealer-v1-offer-event/types/package.json +7 -0
- package/package.json +4 -3
|
@@ -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,84 @@
|
|
|
1
|
+
import * as wrapper from './proto/proto-generated';
|
|
2
|
+
var DealerOfferEventsService = wrapper.wix.dealerOfferEvents.api.v1.DealerOfferEventsService;
|
|
3
|
+
/**
|
|
4
|
+
* Report an event for a Dealer Offer for a specific user identity and metasite.
|
|
5
|
+
* required fields: event.type, event.offer_id and event.real_estate_id (placementId) in addition - some of the event types require specific payload.
|
|
6
|
+
* 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.
|
|
7
|
+
* VIEW event does not require any additional information.
|
|
8
|
+
*
|
|
9
|
+
* Identity and metasite are taken implicitly from request by default - NO NEED TO PASS SUCH INFO.
|
|
10
|
+
* If an event is reported from metasite(BM/EDITOR), MAKE SURE request is sent with an authorization header.
|
|
11
|
+
*
|
|
12
|
+
* 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.
|
|
13
|
+
*/
|
|
14
|
+
export function reportEvent(payload) {
|
|
15
|
+
var serviceArtifactId = 'com.wixpress.dealer-offer-events-service';
|
|
16
|
+
var serviceProtoClass = DealerOfferEventsService;
|
|
17
|
+
var methodName = 'reportEvent';
|
|
18
|
+
var requestData = payload;
|
|
19
|
+
return {
|
|
20
|
+
serviceProtoClass: serviceProtoClass,
|
|
21
|
+
serviceArtifactId: serviceArtifactId,
|
|
22
|
+
methodName: methodName,
|
|
23
|
+
requestData: requestData,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* return list of offer events summary for a bulk of offer ids.
|
|
28
|
+
* a summary response contains last event happened for each event type or event counts.
|
|
29
|
+
* - you have to provide field masks for all the event types you want to get for each offer.
|
|
30
|
+
* BY DEFAULT Summaries will be filtered by the implicit identity and metasite in the request.
|
|
31
|
+
*
|
|
32
|
+
* FOR SOME EDGE CASES - special permission DEALER.OFFER_EVENTS_EXPLICIT_CONTEXT is required in order to pass explicit identity and metasite filter.
|
|
33
|
+
*
|
|
34
|
+
* You can request event summary data for specific offers or specific campaigns.
|
|
35
|
+
*
|
|
36
|
+
* In case campaign level events summary requested, cumulative data is returned:
|
|
37
|
+
* — events counters are a sum of all campaign's offer events counters
|
|
38
|
+
* — lastEvent for campaign is the lastEvent of the "latest" offer within campaign
|
|
39
|
+
* — etc.
|
|
40
|
+
*
|
|
41
|
+
* If summary_filter.placement_id is set, then only offers belonging to campaign & placement is counted
|
|
42
|
+
* for campaign level summary
|
|
43
|
+
*
|
|
44
|
+
* If offer_ids is empty — you get empty result.events_summary
|
|
45
|
+
* If campaign_ids empty — you get empty result.campaign_events_summary
|
|
46
|
+
*/
|
|
47
|
+
export function listEventsSummary(payload) {
|
|
48
|
+
var serviceArtifactId = 'com.wixpress.dealer-offer-events-service';
|
|
49
|
+
var serviceProtoClass = DealerOfferEventsService;
|
|
50
|
+
var methodName = 'listEventsSummary';
|
|
51
|
+
var requestData = payload;
|
|
52
|
+
return {
|
|
53
|
+
serviceProtoClass: serviceProtoClass,
|
|
54
|
+
serviceArtifactId: serviceArtifactId,
|
|
55
|
+
methodName: methodName,
|
|
56
|
+
requestData: requestData,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* ONLY SUPPORTED FOR EVENT TYPE AGENT_MARK - USER JOURNEY USE CASES
|
|
61
|
+
* Returns list of offer events for given filters.
|
|
62
|
+
* Filters: offer_id (required), event_type (required, only AGENT_MARK); siteId is taken implicitly
|
|
63
|
+
* from aspects, so they must be server signed with siteId.
|
|
64
|
+
* Supported `paging`. Events limit by default is 200.
|
|
65
|
+
* Not supported 'sort`, `fields` and `fieldsets`. Events are sorted in descending order by creation_date.
|
|
66
|
+
*
|
|
67
|
+
* Query examples:
|
|
68
|
+
* query: { filter: { offer_id: <uuid> }, event_type: 'AGENT_MARK'}}
|
|
69
|
+
* query: { filter: { offer_id: { $in: [<uuid1>, <uuid2>] }, event_type: 'AGENT_MARK'}}
|
|
70
|
+
* query: { filter: { offer_id: { $in: [<uuid1>, <uuid2>] }, event_type: 'AGENT_MARK'}, paging: { offset: 10, limit: 100 } }
|
|
71
|
+
*/
|
|
72
|
+
export function queryEvents(payload) {
|
|
73
|
+
var serviceArtifactId = 'com.wixpress.dealer-offer-events-service';
|
|
74
|
+
var serviceProtoClass = DealerOfferEventsService;
|
|
75
|
+
var methodName = 'queryEvents';
|
|
76
|
+
var requestData = payload;
|
|
77
|
+
return {
|
|
78
|
+
serviceProtoClass: serviceProtoClass,
|
|
79
|
+
serviceArtifactId: serviceArtifactId,
|
|
80
|
+
methodName: methodName,
|
|
81
|
+
requestData: requestData,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=rpc.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.impl.js","sourceRoot":"","sources":["../../rpc.impl.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,OAAO,MAAM,yBAAyB,CAAC;AAEnD,IAAM,wBAAwB,GAC5B,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,wBAAwB,CAAC;AAUhE;;;;;;;;;;GAUG;AACH,MAAM,UAAU,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;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,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;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,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"}
|
|
@@ -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,39 @@
|
|
|
1
|
+
export var EventType;
|
|
2
|
+
(function (EventType) {
|
|
3
|
+
EventType["UNKNOWN"] = "UNKNOWN";
|
|
4
|
+
EventType["VIEW"] = "VIEW";
|
|
5
|
+
EventType["MAIN_CTA_CLICK"] = "MAIN_CTA_CLICK";
|
|
6
|
+
EventType["SECONDARY_CTA_CLICK"] = "SECONDARY_CTA_CLICK";
|
|
7
|
+
EventType["AGENT_MARK"] = "AGENT_MARK";
|
|
8
|
+
EventType["SKIP"] = "SKIP";
|
|
9
|
+
EventType["UNSKIP"] = "UNSKIP";
|
|
10
|
+
EventType["CLOSE"] = "CLOSE";
|
|
11
|
+
EventType["SHOW_LATER"] = "SHOW_LATER";
|
|
12
|
+
})(EventType || (EventType = {}));
|
|
13
|
+
export var AgentOfferStatusEnum;
|
|
14
|
+
(function (AgentOfferStatusEnum) {
|
|
15
|
+
AgentOfferStatusEnum["NOT_STARTED"] = "NOT_STARTED";
|
|
16
|
+
AgentOfferStatusEnum["SUGGESTED"] = "SUGGESTED";
|
|
17
|
+
AgentOfferStatusEnum["REJECTED"] = "REJECTED";
|
|
18
|
+
AgentOfferStatusEnum["REQUESTED"] = "REQUESTED";
|
|
19
|
+
AgentOfferStatusEnum["ALREADY_COMPLETED"] = "ALREADY_COMPLETED";
|
|
20
|
+
AgentOfferStatusEnum["NOT_RELEVANT"] = "NOT_RELEVANT";
|
|
21
|
+
AgentOfferStatusEnum["PAUSED"] = "PAUSED";
|
|
22
|
+
})(AgentOfferStatusEnum || (AgentOfferStatusEnum = {}));
|
|
23
|
+
export var PlatformEnum;
|
|
24
|
+
(function (PlatformEnum) {
|
|
25
|
+
PlatformEnum["UNKNOWN"] = "UNKNOWN";
|
|
26
|
+
PlatformEnum["BUSINESS_MANAGER"] = "BUSINESS_MANAGER";
|
|
27
|
+
PlatformEnum["EDITORX"] = "EDITORX";
|
|
28
|
+
PlatformEnum["EDITOR"] = "EDITOR";
|
|
29
|
+
PlatformEnum["ADI"] = "ADI";
|
|
30
|
+
PlatformEnum["OWNER_APP"] = "OWNER_APP";
|
|
31
|
+
PlatformEnum["BRANDED_APP"] = "BRANDED_APP";
|
|
32
|
+
PlatformEnum["DEV_CENTER"] = "DEV_CENTER";
|
|
33
|
+
})(PlatformEnum || (PlatformEnum = {}));
|
|
34
|
+
export var SortOrder;
|
|
35
|
+
(function (SortOrder) {
|
|
36
|
+
SortOrder["ASC"] = "ASC";
|
|
37
|
+
SortOrder["DESC"] = "DESC";
|
|
38
|
+
})(SortOrder || (SortOrder = {}));
|
|
39
|
+
//# sourceMappingURL=types.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.impl.js","sourceRoot":"","sources":["../../types.impl.ts"],"names":[],"mappings":"AA+FA,MAAM,CAAN,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,KAAT,SAAS,QAUpB;AAYD,MAAM,CAAN,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,KAApB,oBAAoB,QAQ/B;AAUD,MAAM,CAAN,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,KAAZ,YAAY,QASvB;AAsLD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wix/ambassador-dealer-v1-offer-event",
|
|
3
|
+
"version": "1.0.85",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"registry": "https://npm-cache.dev.wixpress.com/",
|
|
6
|
+
"access": "restricted"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"build",
|
|
10
|
+
"http",
|
|
11
|
+
"rpc",
|
|
12
|
+
"builders",
|
|
13
|
+
"types",
|
|
14
|
+
"validators",
|
|
15
|
+
"meta",
|
|
16
|
+
"crud/!(*.ts)",
|
|
17
|
+
"src/main/proto"
|
|
18
|
+
],
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "yarn proto && yarn tsc && cp -r proto build/cjs",
|
|
22
|
+
"proto": "wix-proto-codegen --module . --dir proto --stringEnums --tsClasses --stringLongs",
|
|
23
|
+
"tsc": "tsc -b tsconfig.json tsconfig.esm.json",
|
|
24
|
+
"test": ":"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@wix/http-client": "^1.0.0",
|
|
28
|
+
"@wix/metro-common-builders": "^1.0.0",
|
|
29
|
+
"@wix/metro-runtime": "^1.2055.0",
|
|
30
|
+
"joi": "^17.0.0",
|
|
31
|
+
"callsite": "^1.0.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/callsite": "^1.0.0"
|
|
35
|
+
},
|
|
36
|
+
"wix": {
|
|
37
|
+
"artifact": {
|
|
38
|
+
"artifactId": "dealer-v1-offer-event",
|
|
39
|
+
"groupId": "com.wixpress.metro-packages"
|
|
40
|
+
},
|
|
41
|
+
"ambassador": {
|
|
42
|
+
"fqdn": "wix.dealer.v1.offer_event",
|
|
43
|
+
"protoArtifactId": "com.wixpress.proto:dealer-offer-events-api"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"falconPackageHash": "8c7e904cf687495436f308f8161436f784eaa6466320d18b33566df5",
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "https://github.com/wix-private/metro-packages.git",
|
|
50
|
+
"directory": "packages/ambassador/dealer-v1-offer-event"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
syntax = "proto2";
|
|
2
|
+
|
|
3
|
+
package wix.api;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/descriptor.proto";
|
|
6
|
+
|
|
7
|
+
option java_multiple_files = true;
|
|
8
|
+
option java_outer_classname = "ActionPayloadProto";
|
|
9
|
+
option java_package = "com.wix.api";
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
action_payload option is used to configure custom slugs for the payload type of a DomainEvent Action:
|
|
13
|
+
service BlooperService {
|
|
14
|
+
option (wix.api.service_entity).message = "com.wixpress.examples.Blooper"; //the "main" entity
|
|
15
|
+
rpc MissedBlooper (MissedBlooperRequest) returns (MissedBlooperResponse) {
|
|
16
|
+
option (wix.api.callback) = {
|
|
17
|
+
event_type: Action
|
|
18
|
+
payload: "com.wixpress.examples.BlooperWasMissed"
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
message BlooperWasMissed {
|
|
23
|
+
option (wix.api.action_payload).custom_slug = "super_custom_slug"; // only define if the default slug value (snake case of the message name) is out of the question
|
|
24
|
+
int32 how_funny_it_could_have_been = 1;
|
|
25
|
+
}
|
|
26
|
+
*/
|
|
27
|
+
extend google.protobuf.MessageOptions {
|
|
28
|
+
optional ActionPayload action_payload = 50600;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message ActionPayload {
|
|
32
|
+
optional string custom_slug = 1;
|
|
33
|
+
}
|