@streamlayer/sl-eslib 5.136.0 → 5.138.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/sl-eslib",
3
- "version": "5.136.0",
3
+ "version": "5.138.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { CreateWebhookRequest, CreateWebhookResponse, GetWebhookRequest, GetWebhookResponse } from "./organizations.studio.webhooks_pb.js";
6
+ import { CreateWebhookRequest, CreateWebhookResponse, GetWebhookRequest, GetWebhookResponse, SendWebhookEventRequest, SendWebhookEventResponse } from "./organizations.studio.webhooks_pb.js";
7
7
  import { MethodKind } from "@bufbuild/protobuf";
8
8
 
9
9
  /**
@@ -30,3 +30,15 @@ export const createWebhook: {
30
30
  readonly typeName: "streamlayer.organizations.studio.webhooks.Webhooks"
31
31
  }
32
32
  };
33
+ /**
34
+ * @generated from rpc streamlayer.organizations.studio.webhooks.Webhooks.SendWebhookEvent
35
+ */
36
+ export const sendWebhookEvent: {
37
+ readonly name: "SendWebhookEvent",
38
+ readonly I: typeof SendWebhookEventRequest,
39
+ readonly O: typeof SendWebhookEventResponse,
40
+ readonly kind: MethodKind.Unary,
41
+ readonly service: {
42
+ readonly typeName: "streamlayer.organizations.studio.webhooks.Webhooks"
43
+ }
44
+ };
@@ -4,7 +4,7 @@
4
4
  // @ts-nocheck
5
5
 
6
6
  import { MethodKind } from "@bufbuild/protobuf";
7
- import { CreateWebhookRequest, CreateWebhookResponse, GetWebhookRequest, GetWebhookResponse } from "./organizations.studio.webhooks_pb.js";
7
+ import { CreateWebhookRequest, CreateWebhookResponse, GetWebhookRequest, GetWebhookResponse, SendWebhookEventRequest, SendWebhookEventResponse } from "./organizations.studio.webhooks_pb.js";
8
8
 
9
9
  /**
10
10
  * @generated from rpc streamlayer.organizations.studio.webhooks.Webhooks.GetWebhook
@@ -33,3 +33,17 @@ export const createWebhook = {
33
33
  typeName: "streamlayer.organizations.studio.webhooks.Webhooks"
34
34
  }
35
35
  };
36
+
37
+ /**
38
+ * @generated from rpc streamlayer.organizations.studio.webhooks.Webhooks.SendWebhookEvent
39
+ */
40
+ export const sendWebhookEvent = {
41
+ localName: "sendWebhookEvent",
42
+ name: "SendWebhookEvent",
43
+ kind: MethodKind.Unary,
44
+ I: SendWebhookEventRequest,
45
+ O: SendWebhookEventResponse,
46
+ service: {
47
+ typeName: "streamlayer.organizations.studio.webhooks.Webhooks"
48
+ }
49
+ };
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { CreateWebhookRequest, CreateWebhookResponse, GetWebhookRequest, GetWebhookResponse } from "./organizations.studio.webhooks_pb.js";
6
+ import { CreateWebhookRequest, CreateWebhookResponse, GetWebhookRequest, GetWebhookResponse, SendWebhookEventRequest, SendWebhookEventResponse } from "./organizations.studio.webhooks_pb.js";
7
7
  import { MethodKind } from "@bufbuild/protobuf";
8
8
 
9
9
  /**
@@ -30,6 +30,15 @@ export declare const Webhooks: {
30
30
  readonly O: typeof CreateWebhookResponse,
31
31
  readonly kind: MethodKind.Unary,
32
32
  },
33
+ /**
34
+ * @generated from rpc streamlayer.organizations.studio.webhooks.Webhooks.SendWebhookEvent
35
+ */
36
+ readonly sendWebhookEvent: {
37
+ readonly name: "SendWebhookEvent",
38
+ readonly I: typeof SendWebhookEventRequest,
39
+ readonly O: typeof SendWebhookEventResponse,
40
+ readonly kind: MethodKind.Unary,
41
+ },
33
42
  }
34
43
  };
35
44
 
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
 
6
- import { CreateWebhookRequest, CreateWebhookResponse, GetWebhookRequest, GetWebhookResponse } from "./organizations.studio.webhooks_pb.js";
6
+ import { CreateWebhookRequest, CreateWebhookResponse, GetWebhookRequest, GetWebhookResponse, SendWebhookEventRequest, SendWebhookEventResponse } from "./organizations.studio.webhooks_pb.js";
7
7
  import { MethodKind } from "@bufbuild/protobuf";
8
8
 
9
9
  /**
@@ -30,6 +30,15 @@ export const Webhooks = {
30
30
  O: CreateWebhookResponse,
31
31
  kind: MethodKind.Unary,
32
32
  },
33
+ /**
34
+ * @generated from rpc streamlayer.organizations.studio.webhooks.Webhooks.SendWebhookEvent
35
+ */
36
+ sendWebhookEvent: {
37
+ name: "SendWebhookEvent",
38
+ I: SendWebhookEventRequest,
39
+ O: SendWebhookEventResponse,
40
+ kind: MethodKind.Unary,
41
+ },
33
42
  }
34
43
  };
35
44
 
@@ -74,6 +74,26 @@ export declare enum WebhookEvent {
74
74
  CLICK_SECONDARY_BUTTON = 4,
75
75
  }
76
76
 
77
+ /**
78
+ * @generated from enum streamlayer.organizations.studio.webhooks.WebhookNotificationType
79
+ */
80
+ export declare enum WebhookNotificationType {
81
+ /**
82
+ * @generated from enum value: WEBHOOK_NOTIFICATION_TYPE_UNSET = 0;
83
+ */
84
+ UNSET = 0,
85
+
86
+ /**
87
+ * @generated from enum value: WEBHOOK_NOTIFICATION_TYPE_PHONE = 1;
88
+ */
89
+ PHONE = 1,
90
+
91
+ /**
92
+ * @generated from enum value: WEBHOOK_NOTIFICATION_TYPE_MAIL = 2;
93
+ */
94
+ MAIL = 2,
95
+ }
96
+
77
97
  /**
78
98
  * @generated from message streamlayer.organizations.studio.webhooks.ApiKey
79
99
  */
@@ -369,3 +389,145 @@ export declare class CreateWebhookResponse extends Message<CreateWebhookResponse
369
389
  static equals(a: CreateWebhookResponse | PlainMessage<CreateWebhookResponse> | undefined, b: CreateWebhookResponse | PlainMessage<CreateWebhookResponse> | undefined): boolean;
370
390
  }
371
391
 
392
+ /**
393
+ * @generated from message streamlayer.organizations.studio.webhooks.SendWebhookEventRequest
394
+ */
395
+ export declare class SendWebhookEventRequest extends Message<SendWebhookEventRequest> {
396
+ /**
397
+ * Target endpoint ID
398
+ *
399
+ * @generated from field: string id = 1;
400
+ */
401
+ id: string;
402
+
403
+ /**
404
+ * Event type 'AD'
405
+ *
406
+ * @generated from field: string event_type = 2;
407
+ */
408
+ eventType: string;
409
+
410
+ /**
411
+ * @generated from field: streamlayer.organizations.studio.webhooks.SendWebhookEventRequest.EventData data = 3;
412
+ */
413
+ data?: SendWebhookEventRequest_EventData;
414
+
415
+ constructor(data?: PartialMessage<SendWebhookEventRequest>);
416
+
417
+ static readonly runtime: typeof proto3;
418
+ static readonly typeName = "streamlayer.organizations.studio.webhooks.SendWebhookEventRequest";
419
+ static readonly fields: FieldList;
420
+
421
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SendWebhookEventRequest;
422
+
423
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SendWebhookEventRequest;
424
+
425
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SendWebhookEventRequest;
426
+
427
+ static equals(a: SendWebhookEventRequest | PlainMessage<SendWebhookEventRequest> | undefined, b: SendWebhookEventRequest | PlainMessage<SendWebhookEventRequest> | undefined): boolean;
428
+ }
429
+
430
+ /**
431
+ * @generated from message streamlayer.organizations.studio.webhooks.SendWebhookEventRequest.EventData
432
+ */
433
+ export declare class SendWebhookEventRequest_EventData extends Message<SendWebhookEventRequest_EventData> {
434
+ /**
435
+ * @generated from field: uint64 event_id = 1;
436
+ */
437
+ eventId: bigint;
438
+
439
+ /**
440
+ * external Client user_id
441
+ *
442
+ * @generated from field: string user_id = 2;
443
+ */
444
+ userId: string;
445
+
446
+ /**
447
+ * e.g., CLICK_SECONDARY_BUTTON
448
+ *
449
+ * @generated from field: optional string action = 3;
450
+ */
451
+ action?: string;
452
+
453
+ /**
454
+ * @generated from field: streamlayer.organizations.studio.webhooks.WebhookNotificationType notification_type = 4;
455
+ */
456
+ notificationType: WebhookNotificationType;
457
+
458
+ /**
459
+ * Event description, e.g. "User clicked on a secondary button"
460
+ *
461
+ * @generated from field: string description = 5;
462
+ */
463
+ description: string;
464
+
465
+ /**
466
+ * Metadata for the event, e.g. device_type = 'ios', user_agent, ip, location = 'Los Angeles', topic_subtype, banner_url
467
+ *
468
+ * @generated from field: map<string, string> metadata = 6;
469
+ */
470
+ metadata: { [key: string]: string };
471
+
472
+ /**
473
+ * AD context. Client custom fields for the event, e.g. promo_code = 'SUMMER2024', campaign = 'BeachSale', brand = 'Nike', model, etc
474
+ *
475
+ * @generated from field: map<string, string> custom_fields = 7;
476
+ */
477
+ customFields: { [key: string]: string };
478
+
479
+ constructor(data?: PartialMessage<SendWebhookEventRequest_EventData>);
480
+
481
+ static readonly runtime: typeof proto3;
482
+ static readonly typeName = "streamlayer.organizations.studio.webhooks.SendWebhookEventRequest.EventData";
483
+ static readonly fields: FieldList;
484
+
485
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SendWebhookEventRequest_EventData;
486
+
487
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SendWebhookEventRequest_EventData;
488
+
489
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SendWebhookEventRequest_EventData;
490
+
491
+ static equals(a: SendWebhookEventRequest_EventData | PlainMessage<SendWebhookEventRequest_EventData> | undefined, b: SendWebhookEventRequest_EventData | PlainMessage<SendWebhookEventRequest_EventData> | undefined): boolean;
492
+ }
493
+
494
+ /**
495
+ * @generated from message streamlayer.organizations.studio.webhooks.SendWebhookEventResponse
496
+ */
497
+ export declare class SendWebhookEventResponse extends Message<SendWebhookEventResponse> {
498
+ /**
499
+ * Delivery status
500
+ *
501
+ * @generated from field: bool status = 1;
502
+ */
503
+ status: boolean;
504
+
505
+ /**
506
+ * Response message, "Event queued successfully"
507
+ *
508
+ * @generated from field: string message = 2;
509
+ */
510
+ message: string;
511
+
512
+ /**
513
+ * HTTP response code
514
+ *
515
+ * @generated from field: uint32 http_code = 3;
516
+ */
517
+ httpCode: number;
518
+
519
+ constructor(data?: PartialMessage<SendWebhookEventResponse>);
520
+
521
+ static readonly runtime: typeof proto3;
522
+ static readonly typeName = "streamlayer.organizations.studio.webhooks.SendWebhookEventResponse";
523
+ static readonly fields: FieldList;
524
+
525
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SendWebhookEventResponse;
526
+
527
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SendWebhookEventResponse;
528
+
529
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SendWebhookEventResponse;
530
+
531
+ static equals(a: SendWebhookEventResponse | PlainMessage<SendWebhookEventResponse> | undefined, b: SendWebhookEventResponse | PlainMessage<SendWebhookEventResponse> | undefined): boolean;
532
+ }
533
+
@@ -33,6 +33,18 @@ export const WebhookEvent = /*@__PURE__*/ proto3.makeEnum(
33
33
  ],
34
34
  );
35
35
 
36
+ /**
37
+ * @generated from enum streamlayer.organizations.studio.webhooks.WebhookNotificationType
38
+ */
39
+ export const WebhookNotificationType = /*@__PURE__*/ proto3.makeEnum(
40
+ "streamlayer.organizations.studio.webhooks.WebhookNotificationType",
41
+ [
42
+ {no: 0, name: "WEBHOOK_NOTIFICATION_TYPE_UNSET", localName: "UNSET"},
43
+ {no: 1, name: "WEBHOOK_NOTIFICATION_TYPE_PHONE", localName: "PHONE"},
44
+ {no: 2, name: "WEBHOOK_NOTIFICATION_TYPE_MAIL", localName: "MAIL"},
45
+ ],
46
+ );
47
+
36
48
  /**
37
49
  * @generated from message streamlayer.organizations.studio.webhooks.ApiKey
38
50
  */
@@ -122,3 +134,44 @@ export const CreateWebhookResponse = /*@__PURE__*/ proto3.makeMessageType(
122
134
  ],
123
135
  );
124
136
 
137
+ /**
138
+ * @generated from message streamlayer.organizations.studio.webhooks.SendWebhookEventRequest
139
+ */
140
+ export const SendWebhookEventRequest = /*@__PURE__*/ proto3.makeMessageType(
141
+ "streamlayer.organizations.studio.webhooks.SendWebhookEventRequest",
142
+ () => [
143
+ { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
144
+ { no: 2, name: "event_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
145
+ { no: 3, name: "data", kind: "message", T: SendWebhookEventRequest_EventData },
146
+ ],
147
+ );
148
+
149
+ /**
150
+ * @generated from message streamlayer.organizations.studio.webhooks.SendWebhookEventRequest.EventData
151
+ */
152
+ export const SendWebhookEventRequest_EventData = /*@__PURE__*/ proto3.makeMessageType(
153
+ "streamlayer.organizations.studio.webhooks.SendWebhookEventRequest.EventData",
154
+ () => [
155
+ { no: 1, name: "event_id", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
156
+ { no: 2, name: "user_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
157
+ { no: 3, name: "action", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
158
+ { no: 4, name: "notification_type", kind: "enum", T: proto3.getEnumType(WebhookNotificationType) },
159
+ { no: 5, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
160
+ { no: 6, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
161
+ { no: 7, name: "custom_fields", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
162
+ ],
163
+ {localName: "SendWebhookEventRequest_EventData"},
164
+ );
165
+
166
+ /**
167
+ * @generated from message streamlayer.organizations.studio.webhooks.SendWebhookEventResponse
168
+ */
169
+ export const SendWebhookEventResponse = /*@__PURE__*/ proto3.makeMessageType(
170
+ "streamlayer.organizations.studio.webhooks.SendWebhookEventResponse",
171
+ () => [
172
+ { no: 1, name: "status", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
173
+ { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
174
+ { no: 3, name: "http_code", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
175
+ ],
176
+ );
177
+