@devvit/protos 0.12.1-next-2025-09-03-22-19-04-c1ab36306.0 → 0.12.1-next-2025-09-03-22-38-04-7c6b76f6a.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.
@@ -26,4 +26,42 @@ export type QueuePushNotificationResponse = {
26
26
  /** Unix timestamp when the notification was queued */
27
27
  timestamp: number;
28
28
  };
29
+ /** Request to queue multiple push notifications */
30
+ export type BulkQueuePushNotificationRequest = {
31
+ /** The title of the push notification (mustache template supported) */
32
+ title: string;
33
+ /** The body text of the push notification (mustache template supported) */
34
+ body: string;
35
+ /** List of recipients to send the notification to */
36
+ recipients: Recipient[];
37
+ };
38
+ /** Response from queuing multiple push notifications */
39
+ export type BulkQueuePushNotificationResponse = {
40
+ /** Number of notifications successfully queued */
41
+ successCount: number;
42
+ /** Number of notifications that failed to queue */
43
+ failureCount: number;
44
+ /** Array of errors for notifications that failed to queue */
45
+ errors: PushNotificationError[];
46
+ /** Unix timestamp when the bulk operation was performed */
47
+ timestamp: number;
48
+ };
49
+ export type Recipient = {
50
+ /** The Reddit user ID to send the notification to (e.g. "t2_abc123") */
51
+ userId: string;
52
+ /** The fullname of a comment (e.g., "t1_abc123") */
53
+ comment?: string | undefined;
54
+ /** The fullname of a post (e.g., "t3_abc123") */
55
+ post?: string | undefined;
56
+ /** Additional data to include with the notification's mustache template */
57
+ data?: {
58
+ [key: string]: any;
59
+ } | undefined;
60
+ };
61
+ export type PushNotificationError = {
62
+ /** The Reddit user ID for which the notification failed to queue (e.g. "t2_abc123") */
63
+ userId: string;
64
+ /** Error message describing why the notification failed to queue */
65
+ message: string;
66
+ };
29
67
  //# sourceMappingURL=pushnotif.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pushnotif.d.ts","sourceRoot":"","sources":["../../../../../../src/json/devvit/plugin/v1alpha/pushnotif/pushnotif.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,sDAAsD;AACtD,MAAM,MAAM,4BAA4B,GAAG;IACzC,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,OAAO,CAAC,EACJ,MAAM,GACN,SAAS,CAAC;IACd,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,6BAA6B,GAAG;IAC1C,uDAAuD;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAA"}
1
+ {"version":3,"file":"pushnotif.d.ts","sourceRoot":"","sources":["../../../../../../src/json/devvit/plugin/v1alpha/pushnotif/pushnotif.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,sDAAsD;AACtD,MAAM,MAAM,4BAA4B,GAAG;IACzC,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,OAAO,CAAC,EACJ,MAAM,GACN,SAAS,CAAC;IACd,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAA;AAED,gDAAgD;AAChD,MAAM,MAAM,6BAA6B,GAAG;IAC1C,uDAAuD;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAA;AAED,mDAAmD;AACnD,MAAM,MAAM,gCAAgC,GAAG;IAC7C,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAA;AAED,wDAAwD;AACxD,MAAM,MAAM,iCAAiC,GAAG;IAC9C,kDAAkD;IAClD,YAAY,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC,2DAA2D;IAC3D,SAAS,EAAE,MAAM,CAAC;CACnB,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,OAAO,CAAC,EACJ,MAAM,GACN,SAAS,CAAC;IACd,iDAAiD;IACjD,IAAI,CAAC,EACD,MAAM,GACN,SAAS,CAAC;IACd,2EAA2E;IAC3E,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CAC3C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,uFAAuF;IACvF,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;CACjB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/protos",
3
- "version": "0.12.1-next-2025-09-03-22-19-04-c1ab36306.0",
3
+ "version": "0.12.1-next-2025-09-03-22-38-04-7c6b76f6a.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -65,8 +65,8 @@
65
65
  },
66
66
  "devDependencies": {
67
67
  "@ampproject/filesize": "4.3.0",
68
- "@devvit/repo-tools": "0.12.1-next-2025-09-03-22-19-04-c1ab36306.0",
69
- "@devvit/tsconfig": "0.12.1-next-2025-09-03-22-19-04-c1ab36306.0",
68
+ "@devvit/repo-tools": "0.12.1-next-2025-09-03-22-38-04-7c6b76f6a.0",
69
+ "@devvit/tsconfig": "0.12.1-next-2025-09-03-22-38-04-7c6b76f6a.0",
70
70
  "@protobuf-ts/plugin": "2.9.3",
71
71
  "@types/long": "4.0.2",
72
72
  "chokidar-cli": "3.0.0",
@@ -97,5 +97,5 @@
97
97
  ]
98
98
  }
99
99
  },
100
- "gitHead": "c0db8056be0d27a2e87e573a933e57dc7877c54a"
100
+ "gitHead": "2963f1e5c7d889d9538636b5fc6643d7dbc00833"
101
101
  }
@@ -2,6 +2,8 @@ syntax = "proto3";
2
2
 
3
3
  package devvit.plugin.v1alpha.pushnotif;
4
4
 
5
+ import "google/protobuf/struct.proto";
6
+
5
7
  option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/plugin/v1alpha/pushnotif";
6
8
  option java_package = "com.reddit.devvit.plugin.v1alpha.pushnotif";
7
9
 
@@ -38,6 +40,58 @@ message QueuePushNotificationResponse {
38
40
  int64 timestamp = 3;
39
41
  }
40
42
 
43
+ // Request to queue multiple push notifications
44
+ message BulkQueuePushNotificationRequest {
45
+ // The title of the push notification (mustache template supported)
46
+ string title = 1;
47
+
48
+ // The body text of the push notification (mustache template supported)
49
+ string body = 2;
50
+
51
+ // List of recipients to send the notification to
52
+ repeated Recipient recipients = 5;
53
+ }
54
+
55
+ // Response from queuing multiple push notifications
56
+ message BulkQueuePushNotificationResponse {
57
+ // Number of notifications successfully queued
58
+ int32 success_count = 1;
59
+
60
+ // Number of notifications that failed to queue
61
+ int32 failure_count = 2;
62
+
63
+ // Array of errors for notifications that failed to queue
64
+ repeated PushNotificationError errors = 3;
65
+
66
+ // Unix timestamp when the bulk operation was performed
67
+ int64 timestamp = 4;
68
+ }
69
+
70
+ message Recipient {
71
+ // The Reddit user ID to send the notification to (e.g. "t2_abc123")
72
+ string user_id = 1;
73
+
74
+ // The thing (comment or post) associated with this notification
75
+ oneof thing {
76
+ // The fullname of a comment (e.g., "t1_abc123")
77
+ string comment = 2;
78
+
79
+ // The fullname of a post (e.g., "t3_abc123")
80
+ string post = 3;
81
+ }
82
+
83
+ // Additional data to include with the notification's mustache template
84
+ google.protobuf.Struct data = 4;
85
+ }
86
+
87
+ message PushNotificationError {
88
+ // The Reddit user ID for which the notification failed to queue (e.g. "t2_abc123")
89
+ string user_id = 1;
90
+
91
+ // Error message describing why the notification failed to queue
92
+ string message = 2;
93
+ }
94
+
41
95
  // Push notification service for queuing notifications to users
42
96
  //
43
97
  // EXPERIMENTAL: This service is experimental and intended for limited use.
@@ -49,4 +103,5 @@ service PushNotif {
49
103
  // This method queues a notification for asynchronous delivery. The actual
50
104
  // delivery timing and success is not guaranteed by this service.
51
105
  rpc QueuePushNotification(QueuePushNotificationRequest) returns (QueuePushNotificationResponse);
106
+ rpc BulkQueuePushNotification(BulkQueuePushNotificationRequest) returns (BulkQueuePushNotificationResponse);
52
107
  }
@@ -2,6 +2,8 @@ syntax = "proto3";
2
2
 
3
3
  package devvit.plugin.v1alpha.pushnotif;
4
4
 
5
+ import "google/protobuf/struct.proto";
6
+
5
7
  option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/plugin/v1alpha/pushnotif";
6
8
  option java_package = "com.reddit.devvit.plugin.v1alpha.pushnotif";
7
9
 
@@ -38,6 +40,58 @@ message QueuePushNotificationResponse {
38
40
  int64 timestamp = 3;
39
41
  }
40
42
 
43
+ // Request to queue multiple push notifications
44
+ message BulkQueuePushNotificationRequest {
45
+ // The title of the push notification (mustache template supported)
46
+ string title = 1;
47
+
48
+ // The body text of the push notification (mustache template supported)
49
+ string body = 2;
50
+
51
+ // List of recipients to send the notification to
52
+ repeated Recipient recipients = 5;
53
+ }
54
+
55
+ // Response from queuing multiple push notifications
56
+ message BulkQueuePushNotificationResponse {
57
+ // Number of notifications successfully queued
58
+ int32 success_count = 1;
59
+
60
+ // Number of notifications that failed to queue
61
+ int32 failure_count = 2;
62
+
63
+ // Array of errors for notifications that failed to queue
64
+ repeated PushNotificationError errors = 3;
65
+
66
+ // Unix timestamp when the bulk operation was performed
67
+ int64 timestamp = 4;
68
+ }
69
+
70
+ message Recipient {
71
+ // The Reddit user ID to send the notification to (e.g. "t2_abc123")
72
+ string user_id = 1;
73
+
74
+ // The thing (comment or post) associated with this notification
75
+ oneof thing {
76
+ // The fullname of a comment (e.g., "t1_abc123")
77
+ string comment = 2;
78
+
79
+ // The fullname of a post (e.g., "t3_abc123")
80
+ string post = 3;
81
+ }
82
+
83
+ // Additional data to include with the notification's mustache template
84
+ google.protobuf.Struct data = 4;
85
+ }
86
+
87
+ message PushNotificationError {
88
+ // The Reddit user ID for which the notification failed to queue (e.g. "t2_abc123")
89
+ string user_id = 1;
90
+
91
+ // Error message describing why the notification failed to queue
92
+ string message = 2;
93
+ }
94
+
41
95
  // Push notification service for queuing notifications to users
42
96
  //
43
97
  // EXPERIMENTAL: This service is experimental and intended for limited use.
@@ -49,4 +103,5 @@ service PushNotif {
49
103
  // This method queues a notification for asynchronous delivery. The actual
50
104
  // delivery timing and success is not guaranteed by this service.
51
105
  rpc QueuePushNotification(QueuePushNotificationRequest) returns (QueuePushNotificationResponse);
106
+ rpc BulkQueuePushNotification(BulkQueuePushNotificationRequest) returns (BulkQueuePushNotificationResponse);
52
107
  }
Binary file
Binary file
@@ -28,6 +28,44 @@ export interface QueuePushNotificationResponse {
28
28
  /** Unix timestamp when the notification was queued */
29
29
  timestamp: number;
30
30
  }
31
+ /** Request to queue multiple push notifications */
32
+ export interface BulkQueuePushNotificationRequest {
33
+ /** The title of the push notification (mustache template supported) */
34
+ title: string;
35
+ /** The body text of the push notification (mustache template supported) */
36
+ body: string;
37
+ /** List of recipients to send the notification to */
38
+ recipients: Recipient[];
39
+ }
40
+ /** Response from queuing multiple push notifications */
41
+ export interface BulkQueuePushNotificationResponse {
42
+ /** Number of notifications successfully queued */
43
+ successCount: number;
44
+ /** Number of notifications that failed to queue */
45
+ failureCount: number;
46
+ /** Array of errors for notifications that failed to queue */
47
+ errors: PushNotificationError[];
48
+ /** Unix timestamp when the bulk operation was performed */
49
+ timestamp: number;
50
+ }
51
+ export interface Recipient {
52
+ /** The Reddit user ID to send the notification to (e.g. "t2_abc123") */
53
+ userId: string;
54
+ /** The fullname of a comment (e.g., "t1_abc123") */
55
+ comment?: string | undefined;
56
+ /** The fullname of a post (e.g., "t3_abc123") */
57
+ post?: string | undefined;
58
+ /** Additional data to include with the notification's mustache template */
59
+ data?: {
60
+ [key: string]: any;
61
+ } | undefined;
62
+ }
63
+ export interface PushNotificationError {
64
+ /** The Reddit user ID for which the notification failed to queue (e.g. "t2_abc123") */
65
+ userId: string;
66
+ /** Error message describing why the notification failed to queue */
67
+ message: string;
68
+ }
31
69
  export declare const QueuePushNotificationRequest: {
32
70
  $type: "devvit.plugin.v1alpha.pushnotif.QueuePushNotificationRequest";
33
71
  encode(message: QueuePushNotificationRequest, writer?: _m0.Writer): _m0.Writer;
@@ -46,6 +84,42 @@ export declare const QueuePushNotificationResponse: {
46
84
  create(base?: DeepPartial<QueuePushNotificationResponse>): QueuePushNotificationResponse;
47
85
  fromPartial(object: DeepPartial<QueuePushNotificationResponse>): QueuePushNotificationResponse;
48
86
  };
87
+ export declare const BulkQueuePushNotificationRequest: {
88
+ $type: "devvit.plugin.v1alpha.pushnotif.BulkQueuePushNotificationRequest";
89
+ encode(message: BulkQueuePushNotificationRequest, writer?: _m0.Writer): _m0.Writer;
90
+ decode(input: _m0.Reader | Uint8Array, length?: number): BulkQueuePushNotificationRequest;
91
+ fromJSON(object: any): BulkQueuePushNotificationRequest;
92
+ toJSON(message: BulkQueuePushNotificationRequest): unknown;
93
+ create(base?: DeepPartial<BulkQueuePushNotificationRequest>): BulkQueuePushNotificationRequest;
94
+ fromPartial(object: DeepPartial<BulkQueuePushNotificationRequest>): BulkQueuePushNotificationRequest;
95
+ };
96
+ export declare const BulkQueuePushNotificationResponse: {
97
+ $type: "devvit.plugin.v1alpha.pushnotif.BulkQueuePushNotificationResponse";
98
+ encode(message: BulkQueuePushNotificationResponse, writer?: _m0.Writer): _m0.Writer;
99
+ decode(input: _m0.Reader | Uint8Array, length?: number): BulkQueuePushNotificationResponse;
100
+ fromJSON(object: any): BulkQueuePushNotificationResponse;
101
+ toJSON(message: BulkQueuePushNotificationResponse): unknown;
102
+ create(base?: DeepPartial<BulkQueuePushNotificationResponse>): BulkQueuePushNotificationResponse;
103
+ fromPartial(object: DeepPartial<BulkQueuePushNotificationResponse>): BulkQueuePushNotificationResponse;
104
+ };
105
+ export declare const Recipient: {
106
+ $type: "devvit.plugin.v1alpha.pushnotif.Recipient";
107
+ encode(message: Recipient, writer?: _m0.Writer): _m0.Writer;
108
+ decode(input: _m0.Reader | Uint8Array, length?: number): Recipient;
109
+ fromJSON(object: any): Recipient;
110
+ toJSON(message: Recipient): unknown;
111
+ create(base?: DeepPartial<Recipient>): Recipient;
112
+ fromPartial(object: DeepPartial<Recipient>): Recipient;
113
+ };
114
+ export declare const PushNotificationError: {
115
+ $type: "devvit.plugin.v1alpha.pushnotif.PushNotificationError";
116
+ encode(message: PushNotificationError, writer?: _m0.Writer): _m0.Writer;
117
+ decode(input: _m0.Reader | Uint8Array, length?: number): PushNotificationError;
118
+ fromJSON(object: any): PushNotificationError;
119
+ toJSON(message: PushNotificationError): unknown;
120
+ create(base?: DeepPartial<PushNotificationError>): PushNotificationError;
121
+ fromPartial(object: DeepPartial<PushNotificationError>): PushNotificationError;
122
+ };
49
123
  /**
50
124
  * Push notification service for queuing notifications to users
51
125
  *
@@ -61,6 +135,7 @@ export interface PushNotif {
61
135
  * delivery timing and success is not guaranteed by this service.
62
136
  */
63
137
  QueuePushNotification(request: QueuePushNotificationRequest, metadata?: Metadata): Promise<QueuePushNotificationResponse>;
138
+ BulkQueuePushNotification(request: BulkQueuePushNotificationRequest, metadata?: Metadata): Promise<BulkQueuePushNotificationResponse>;
64
139
  }
65
140
  export declare const PushNotifServiceName = "devvit.plugin.v1alpha.pushnotif.PushNotif";
66
141
  export declare class PushNotifClientImpl implements PushNotif {
@@ -70,6 +145,7 @@ export declare class PushNotifClientImpl implements PushNotif {
70
145
  service?: string;
71
146
  });
72
147
  QueuePushNotification(request: QueuePushNotificationRequest, metadata?: Metadata): Promise<QueuePushNotificationResponse>;
148
+ BulkQueuePushNotification(request: BulkQueuePushNotificationRequest, metadata?: Metadata): Promise<BulkQueuePushNotificationResponse>;
73
149
  }
74
150
  /**
75
151
  * Push notification service for queuing notifications to users
@@ -113,6 +189,30 @@ export declare const PushNotifDefinition: {
113
189
  readonly responseStream: false;
114
190
  readonly options: {};
115
191
  };
192
+ readonly bulkQueuePushNotification: {
193
+ readonly name: "BulkQueuePushNotification";
194
+ readonly requestType: {
195
+ $type: "devvit.plugin.v1alpha.pushnotif.BulkQueuePushNotificationRequest";
196
+ encode(message: BulkQueuePushNotificationRequest, writer?: _m0.Writer): _m0.Writer;
197
+ decode(input: _m0.Reader | Uint8Array, length?: number): BulkQueuePushNotificationRequest;
198
+ fromJSON(object: any): BulkQueuePushNotificationRequest;
199
+ toJSON(message: BulkQueuePushNotificationRequest): unknown;
200
+ create(base?: DeepPartial<BulkQueuePushNotificationRequest>): BulkQueuePushNotificationRequest;
201
+ fromPartial(object: DeepPartial<BulkQueuePushNotificationRequest>): BulkQueuePushNotificationRequest;
202
+ };
203
+ readonly requestStream: false;
204
+ readonly responseType: {
205
+ $type: "devvit.plugin.v1alpha.pushnotif.BulkQueuePushNotificationResponse";
206
+ encode(message: BulkQueuePushNotificationResponse, writer?: _m0.Writer): _m0.Writer;
207
+ decode(input: _m0.Reader | Uint8Array, length?: number): BulkQueuePushNotificationResponse;
208
+ fromJSON(object: any): BulkQueuePushNotificationResponse;
209
+ toJSON(message: BulkQueuePushNotificationResponse): unknown;
210
+ create(base?: DeepPartial<BulkQueuePushNotificationResponse>): BulkQueuePushNotificationResponse;
211
+ fromPartial(object: DeepPartial<BulkQueuePushNotificationResponse>): BulkQueuePushNotificationResponse;
212
+ };
213
+ readonly responseStream: false;
214
+ readonly options: {};
215
+ };
116
216
  };
117
217
  };
118
218
  interface Rpc {
@@ -1 +1 @@
1
- {"version":3,"file":"pushnotif.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/plugin/v1alpha/pushnotif/pushnotif.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGvD,sDAAsD;AACtD,MAAM,WAAW,4BAA4B;IAC3C,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,OAAO,CAAC,EACJ,MAAM,GACN,SAAS,CAAC;IACd,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,gDAAgD;AAChD,MAAM,WAAW,6BAA6B;IAC5C,uDAAuD;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,eAAO,MAAM,4BAA4B;;oBAGvB,4BAA4B,WAAU,GAAG,CAAC,MAAM,GAAyB,GAAG,CAAC,MAAM;kBAmBrF,GAAG,CAAC,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,4BAA4B;qBAmDpE,GAAG,GAAG,4BAA4B;oBAUnC,4BAA4B,GAAG,OAAO;kBAoBxC,WAAW,CAAC,4BAA4B,CAAC,GAAG,4BAA4B;wBAGlE,WAAW,CAAC,4BAA4B,CAAC,GAAG,4BAA4B;CAS7F,CAAC;AAQF,eAAO,MAAM,6BAA6B;;oBAGxB,6BAA6B,WAAU,GAAG,CAAC,MAAM,GAAyB,GAAG,CAAC,MAAM;kBAatF,GAAG,CAAC,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,6BAA6B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C;oCAG1E,WAAW,CAAC,gCAAgC,CAAC,GAAG,gCAAgC;;;;;gCAkBpF,iCAAiC,WAAU,GAAG,CAAC,MAAM,GAAyB,GAAG,CAAC,MAAM;8BAgB1F,GAAG,CAAC,MAAM,GAAG,UAAU,WAAW,MAAM,GAAG,iCAAiC;iCA4CzE,GAAG,GAAG,iCAAiC;gCAWxC,iCAAiC,GAAG,OAAO;8BAiB7C,WAAW,CAAC,iCAAiC,CAAC,GAAG,iCAAiC;oCAG5E,WAAW,CAAC,iCAAiC,CAAC,GAAG,iCAAiC;;;;;;CA8R9F,CAAC;AAEX,UAAU,GAAG;IACX,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACtG;AAED,KAAK,OAAO,GAAG,IAAI,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEpF,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,GAAG,CAAC,GACvC,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACtE,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAChE,CAAC,SAAS,EAAE,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACrD,OAAO,CAAC,CAAC,CAAC,CAAC"}
@@ -7,6 +7,7 @@
7
7
  /* eslint-disable */
8
8
  import Long from "long";
9
9
  import _m0 from "protobufjs/minimal.js";
10
+ import { Struct } from "../../../../google/protobuf/struct.js";
10
11
  import { messageTypeRegistry } from "../../../../typeRegistry.js";
11
12
  function createBaseQueuePushNotificationRequest() {
12
13
  return { recipientId: "", title: "", body: "", comment: undefined, post: undefined };
@@ -200,18 +201,370 @@ export const QueuePushNotificationResponse = {
200
201
  },
201
202
  };
202
203
  messageTypeRegistry.set(QueuePushNotificationResponse.$type, QueuePushNotificationResponse);
204
+ function createBaseBulkQueuePushNotificationRequest() {
205
+ return { title: "", body: "", recipients: [] };
206
+ }
207
+ export const BulkQueuePushNotificationRequest = {
208
+ $type: "devvit.plugin.v1alpha.pushnotif.BulkQueuePushNotificationRequest",
209
+ encode(message, writer = _m0.Writer.create()) {
210
+ if (message.title !== "") {
211
+ writer.uint32(10).string(message.title);
212
+ }
213
+ if (message.body !== "") {
214
+ writer.uint32(18).string(message.body);
215
+ }
216
+ for (const v of message.recipients) {
217
+ Recipient.encode(v, writer.uint32(42).fork()).ldelim();
218
+ }
219
+ return writer;
220
+ },
221
+ decode(input, length) {
222
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
223
+ let end = length === undefined ? reader.len : reader.pos + length;
224
+ const message = createBaseBulkQueuePushNotificationRequest();
225
+ while (reader.pos < end) {
226
+ const tag = reader.uint32();
227
+ switch (tag >>> 3) {
228
+ case 1:
229
+ if (tag !== 10) {
230
+ break;
231
+ }
232
+ message.title = reader.string();
233
+ continue;
234
+ case 2:
235
+ if (tag !== 18) {
236
+ break;
237
+ }
238
+ message.body = reader.string();
239
+ continue;
240
+ case 5:
241
+ if (tag !== 42) {
242
+ break;
243
+ }
244
+ message.recipients.push(Recipient.decode(reader, reader.uint32()));
245
+ continue;
246
+ }
247
+ if ((tag & 7) === 4 || tag === 0) {
248
+ break;
249
+ }
250
+ reader.skipType(tag & 7);
251
+ }
252
+ return message;
253
+ },
254
+ fromJSON(object) {
255
+ return {
256
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
257
+ body: isSet(object.body) ? globalThis.String(object.body) : "",
258
+ recipients: globalThis.Array.isArray(object?.recipients)
259
+ ? object.recipients.map((e) => Recipient.fromJSON(e))
260
+ : [],
261
+ };
262
+ },
263
+ toJSON(message) {
264
+ const obj = {};
265
+ if (message.title !== "") {
266
+ obj.title = message.title;
267
+ }
268
+ if (message.body !== "") {
269
+ obj.body = message.body;
270
+ }
271
+ if (message.recipients?.length) {
272
+ obj.recipients = message.recipients.map((e) => Recipient.toJSON(e));
273
+ }
274
+ return obj;
275
+ },
276
+ create(base) {
277
+ return BulkQueuePushNotificationRequest.fromPartial(base ?? {});
278
+ },
279
+ fromPartial(object) {
280
+ const message = createBaseBulkQueuePushNotificationRequest();
281
+ message.title = object.title ?? "";
282
+ message.body = object.body ?? "";
283
+ message.recipients = object.recipients?.map((e) => Recipient.fromPartial(e)) || [];
284
+ return message;
285
+ },
286
+ };
287
+ messageTypeRegistry.set(BulkQueuePushNotificationRequest.$type, BulkQueuePushNotificationRequest);
288
+ function createBaseBulkQueuePushNotificationResponse() {
289
+ return { successCount: 0, failureCount: 0, errors: [], timestamp: 0 };
290
+ }
291
+ export const BulkQueuePushNotificationResponse = {
292
+ $type: "devvit.plugin.v1alpha.pushnotif.BulkQueuePushNotificationResponse",
293
+ encode(message, writer = _m0.Writer.create()) {
294
+ if (message.successCount !== 0) {
295
+ writer.uint32(8).int32(message.successCount);
296
+ }
297
+ if (message.failureCount !== 0) {
298
+ writer.uint32(16).int32(message.failureCount);
299
+ }
300
+ for (const v of message.errors) {
301
+ PushNotificationError.encode(v, writer.uint32(26).fork()).ldelim();
302
+ }
303
+ if (message.timestamp !== 0) {
304
+ writer.uint32(32).int64(message.timestamp);
305
+ }
306
+ return writer;
307
+ },
308
+ decode(input, length) {
309
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
310
+ let end = length === undefined ? reader.len : reader.pos + length;
311
+ const message = createBaseBulkQueuePushNotificationResponse();
312
+ while (reader.pos < end) {
313
+ const tag = reader.uint32();
314
+ switch (tag >>> 3) {
315
+ case 1:
316
+ if (tag !== 8) {
317
+ break;
318
+ }
319
+ message.successCount = reader.int32();
320
+ continue;
321
+ case 2:
322
+ if (tag !== 16) {
323
+ break;
324
+ }
325
+ message.failureCount = reader.int32();
326
+ continue;
327
+ case 3:
328
+ if (tag !== 26) {
329
+ break;
330
+ }
331
+ message.errors.push(PushNotificationError.decode(reader, reader.uint32()));
332
+ continue;
333
+ case 4:
334
+ if (tag !== 32) {
335
+ break;
336
+ }
337
+ message.timestamp = longToNumber(reader.int64());
338
+ continue;
339
+ }
340
+ if ((tag & 7) === 4 || tag === 0) {
341
+ break;
342
+ }
343
+ reader.skipType(tag & 7);
344
+ }
345
+ return message;
346
+ },
347
+ fromJSON(object) {
348
+ return {
349
+ successCount: isSet(object.successCount) ? globalThis.Number(object.successCount) : 0,
350
+ failureCount: isSet(object.failureCount) ? globalThis.Number(object.failureCount) : 0,
351
+ errors: globalThis.Array.isArray(object?.errors)
352
+ ? object.errors.map((e) => PushNotificationError.fromJSON(e))
353
+ : [],
354
+ timestamp: isSet(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
355
+ };
356
+ },
357
+ toJSON(message) {
358
+ const obj = {};
359
+ if (message.successCount !== 0) {
360
+ obj.successCount = Math.round(message.successCount);
361
+ }
362
+ if (message.failureCount !== 0) {
363
+ obj.failureCount = Math.round(message.failureCount);
364
+ }
365
+ if (message.errors?.length) {
366
+ obj.errors = message.errors.map((e) => PushNotificationError.toJSON(e));
367
+ }
368
+ if (message.timestamp !== 0) {
369
+ obj.timestamp = Math.round(message.timestamp);
370
+ }
371
+ return obj;
372
+ },
373
+ create(base) {
374
+ return BulkQueuePushNotificationResponse.fromPartial(base ?? {});
375
+ },
376
+ fromPartial(object) {
377
+ const message = createBaseBulkQueuePushNotificationResponse();
378
+ message.successCount = object.successCount ?? 0;
379
+ message.failureCount = object.failureCount ?? 0;
380
+ message.errors = object.errors?.map((e) => PushNotificationError.fromPartial(e)) || [];
381
+ message.timestamp = object.timestamp ?? 0;
382
+ return message;
383
+ },
384
+ };
385
+ messageTypeRegistry.set(BulkQueuePushNotificationResponse.$type, BulkQueuePushNotificationResponse);
386
+ function createBaseRecipient() {
387
+ return { userId: "", comment: undefined, post: undefined, data: undefined };
388
+ }
389
+ export const Recipient = {
390
+ $type: "devvit.plugin.v1alpha.pushnotif.Recipient",
391
+ encode(message, writer = _m0.Writer.create()) {
392
+ if (message.userId !== "") {
393
+ writer.uint32(10).string(message.userId);
394
+ }
395
+ if (message.comment !== undefined) {
396
+ writer.uint32(18).string(message.comment);
397
+ }
398
+ if (message.post !== undefined) {
399
+ writer.uint32(26).string(message.post);
400
+ }
401
+ if (message.data !== undefined) {
402
+ Struct.encode(Struct.wrap(message.data), writer.uint32(34).fork()).ldelim();
403
+ }
404
+ return writer;
405
+ },
406
+ decode(input, length) {
407
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
408
+ let end = length === undefined ? reader.len : reader.pos + length;
409
+ const message = createBaseRecipient();
410
+ while (reader.pos < end) {
411
+ const tag = reader.uint32();
412
+ switch (tag >>> 3) {
413
+ case 1:
414
+ if (tag !== 10) {
415
+ break;
416
+ }
417
+ message.userId = reader.string();
418
+ continue;
419
+ case 2:
420
+ if (tag !== 18) {
421
+ break;
422
+ }
423
+ message.comment = reader.string();
424
+ continue;
425
+ case 3:
426
+ if (tag !== 26) {
427
+ break;
428
+ }
429
+ message.post = reader.string();
430
+ continue;
431
+ case 4:
432
+ if (tag !== 34) {
433
+ break;
434
+ }
435
+ message.data = Struct.unwrap(Struct.decode(reader, reader.uint32()));
436
+ continue;
437
+ }
438
+ if ((tag & 7) === 4 || tag === 0) {
439
+ break;
440
+ }
441
+ reader.skipType(tag & 7);
442
+ }
443
+ return message;
444
+ },
445
+ fromJSON(object) {
446
+ return {
447
+ userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
448
+ comment: isSet(object.comment) ? globalThis.String(object.comment) : undefined,
449
+ post: isSet(object.post) ? globalThis.String(object.post) : undefined,
450
+ data: isObject(object.data) ? object.data : undefined,
451
+ };
452
+ },
453
+ toJSON(message) {
454
+ const obj = {};
455
+ if (message.userId !== "") {
456
+ obj.userId = message.userId;
457
+ }
458
+ if (message.comment !== undefined) {
459
+ obj.comment = message.comment;
460
+ }
461
+ if (message.post !== undefined) {
462
+ obj.post = message.post;
463
+ }
464
+ if (message.data !== undefined) {
465
+ obj.data = message.data;
466
+ }
467
+ return obj;
468
+ },
469
+ create(base) {
470
+ return Recipient.fromPartial(base ?? {});
471
+ },
472
+ fromPartial(object) {
473
+ const message = createBaseRecipient();
474
+ message.userId = object.userId ?? "";
475
+ message.comment = object.comment ?? undefined;
476
+ message.post = object.post ?? undefined;
477
+ message.data = object.data ?? undefined;
478
+ return message;
479
+ },
480
+ };
481
+ messageTypeRegistry.set(Recipient.$type, Recipient);
482
+ function createBasePushNotificationError() {
483
+ return { userId: "", message: "" };
484
+ }
485
+ export const PushNotificationError = {
486
+ $type: "devvit.plugin.v1alpha.pushnotif.PushNotificationError",
487
+ encode(message, writer = _m0.Writer.create()) {
488
+ if (message.userId !== "") {
489
+ writer.uint32(10).string(message.userId);
490
+ }
491
+ if (message.message !== "") {
492
+ writer.uint32(18).string(message.message);
493
+ }
494
+ return writer;
495
+ },
496
+ decode(input, length) {
497
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
498
+ let end = length === undefined ? reader.len : reader.pos + length;
499
+ const message = createBasePushNotificationError();
500
+ while (reader.pos < end) {
501
+ const tag = reader.uint32();
502
+ switch (tag >>> 3) {
503
+ case 1:
504
+ if (tag !== 10) {
505
+ break;
506
+ }
507
+ message.userId = reader.string();
508
+ continue;
509
+ case 2:
510
+ if (tag !== 18) {
511
+ break;
512
+ }
513
+ message.message = reader.string();
514
+ continue;
515
+ }
516
+ if ((tag & 7) === 4 || tag === 0) {
517
+ break;
518
+ }
519
+ reader.skipType(tag & 7);
520
+ }
521
+ return message;
522
+ },
523
+ fromJSON(object) {
524
+ return {
525
+ userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
526
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
527
+ };
528
+ },
529
+ toJSON(message) {
530
+ const obj = {};
531
+ if (message.userId !== "") {
532
+ obj.userId = message.userId;
533
+ }
534
+ if (message.message !== "") {
535
+ obj.message = message.message;
536
+ }
537
+ return obj;
538
+ },
539
+ create(base) {
540
+ return PushNotificationError.fromPartial(base ?? {});
541
+ },
542
+ fromPartial(object) {
543
+ const message = createBasePushNotificationError();
544
+ message.userId = object.userId ?? "";
545
+ message.message = object.message ?? "";
546
+ return message;
547
+ },
548
+ };
549
+ messageTypeRegistry.set(PushNotificationError.$type, PushNotificationError);
203
550
  export const PushNotifServiceName = "devvit.plugin.v1alpha.pushnotif.PushNotif";
204
551
  export class PushNotifClientImpl {
205
552
  constructor(rpc, opts) {
206
553
  this.service = opts?.service || PushNotifServiceName;
207
554
  this.rpc = rpc;
208
555
  this.QueuePushNotification = this.QueuePushNotification.bind(this);
556
+ this.BulkQueuePushNotification = this.BulkQueuePushNotification.bind(this);
209
557
  }
210
558
  QueuePushNotification(request, metadata) {
211
559
  const data = QueuePushNotificationRequest.encode(request).finish();
212
560
  const promise = this.rpc.request(this.service, "QueuePushNotification", data, metadata);
213
561
  return promise.then((data) => QueuePushNotificationResponse.decode(_m0.Reader.create(data)));
214
562
  }
563
+ BulkQueuePushNotification(request, metadata) {
564
+ const data = BulkQueuePushNotificationRequest.encode(request).finish();
565
+ const promise = this.rpc.request(this.service, "BulkQueuePushNotification", data, metadata);
566
+ return promise.then((data) => BulkQueuePushNotificationResponse.decode(_m0.Reader.create(data)));
567
+ }
215
568
  }
216
569
  export const PushNotifDefinition = {
217
570
  name: "PushNotif",
@@ -231,6 +584,14 @@ export const PushNotifDefinition = {
231
584
  responseStream: false,
232
585
  options: {},
233
586
  },
587
+ bulkQueuePushNotification: {
588
+ name: "BulkQueuePushNotification",
589
+ requestType: BulkQueuePushNotificationRequest,
590
+ requestStream: false,
591
+ responseType: BulkQueuePushNotificationResponse,
592
+ responseStream: false,
593
+ options: {},
594
+ },
234
595
  },
235
596
  };
236
597
  function longToNumber(long) {
@@ -243,6 +604,9 @@ if (_m0.util.Long !== Long) {
243
604
  _m0.util.Long = Long;
244
605
  _m0.configure();
245
606
  }
607
+ function isObject(value) {
608
+ return typeof value === "object" && value !== null;
609
+ }
246
610
  function isSet(value) {
247
611
  return value !== null && value !== undefined;
248
612
  }
@@ -1,19 +1,22 @@
1
- import { QueuePushNotificationRequest, QueuePushNotificationResponse } from './pushnotif.js';
1
+ import { QueuePushNotificationRequest, QueuePushNotificationResponse, BulkQueuePushNotificationRequest, BulkQueuePushNotificationResponse } from './pushnotif.js';
2
2
  interface Rpc {
3
3
  request(service: string, method: string, contentType: 'application/json' | 'application/protobuf', data: object | Uint8Array): Promise<object | Uint8Array>;
4
4
  }
5
5
  export interface PushNotifClient {
6
6
  QueuePushNotification(request: QueuePushNotificationRequest): Promise<QueuePushNotificationResponse>;
7
+ BulkQueuePushNotification(request: BulkQueuePushNotificationRequest): Promise<BulkQueuePushNotificationResponse>;
7
8
  }
8
9
  export declare class PushNotifClientJSON implements PushNotifClient {
9
10
  private readonly rpc;
10
11
  constructor(rpc: Rpc);
11
12
  QueuePushNotification(request: QueuePushNotificationRequest): Promise<QueuePushNotificationResponse>;
13
+ BulkQueuePushNotification(request: BulkQueuePushNotificationRequest): Promise<BulkQueuePushNotificationResponse>;
12
14
  }
13
15
  export declare class PushNotifClientProtobuf implements PushNotifClient {
14
16
  private readonly rpc;
15
17
  constructor(rpc: Rpc);
16
18
  QueuePushNotification(request: QueuePushNotificationRequest): Promise<QueuePushNotificationResponse>;
19
+ BulkQueuePushNotification(request: BulkQueuePushNotificationRequest): Promise<BulkQueuePushNotificationResponse>;
17
20
  }
18
21
  export {};
19
22
  //# sourceMappingURL=pushnotif.twirp-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pushnotif.twirp-client.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/plugin/v1alpha/pushnotif/pushnotif.twirp-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,gBAAgB,CAAC;AAMxB,UAAU,GAAG;IACX,OAAO,CACL,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,kBAAkB,GAAG,sBAAsB,EACxD,IAAI,EAAE,MAAM,GAAG,UAAU,GACxB,OAAO,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,eAAe;IAC9B,qBAAqB,CACnB,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CAAC;CAC3C;AAED,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;gBACd,GAAG,EAAE,GAAG;IAIpB,qBAAqB,CACnB,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC;CAY1C;AAED,qBAAa,uBAAwB,YAAW,eAAe;IAC7D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;gBACd,GAAG,EAAE,GAAG;IAIpB,qBAAqB,CACnB,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC;CAY1C"}
1
+ {"version":3,"file":"pushnotif.twirp-client.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/plugin/v1alpha/pushnotif/pushnotif.twirp-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EAClC,MAAM,gBAAgB,CAAC;AAMxB,UAAU,GAAG;IACX,OAAO,CACL,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,kBAAkB,GAAG,sBAAsB,EACxD,IAAI,EAAE,MAAM,GAAG,UAAU,GACxB,OAAO,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,eAAe;IAC9B,qBAAqB,CACnB,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC1C,yBAAyB,CACvB,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,iCAAiC,CAAC,CAAC;CAC/C;AAED,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;gBACd,GAAG,EAAE,GAAG;IAKpB,qBAAqB,CACnB,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC;IAazC,yBAAyB,CACvB,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,iCAAiC,CAAC;CAY9C;AAED,qBAAa,uBAAwB,YAAW,eAAe;IAC7D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;gBACd,GAAG,EAAE,GAAG;IAKpB,qBAAqB,CACnB,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC;IAazC,yBAAyB,CACvB,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,iCAAiC,CAAC;CAY9C"}
@@ -1,23 +1,35 @@
1
- import { QueuePushNotificationRequest, QueuePushNotificationResponse, } from './pushnotif.js';
1
+ import { QueuePushNotificationRequest, QueuePushNotificationResponse, BulkQueuePushNotificationRequest, BulkQueuePushNotificationResponse, } from './pushnotif.js';
2
2
  export class PushNotifClientJSON {
3
3
  constructor(rpc) {
4
4
  this.rpc = rpc;
5
5
  this.QueuePushNotification.bind(this);
6
+ this.BulkQueuePushNotification.bind(this);
6
7
  }
7
8
  QueuePushNotification(request) {
8
9
  const data = QueuePushNotificationRequest.toJSON(request);
9
10
  const promise = this.rpc.request('devvit.plugin.v1alpha.pushnotif.PushNotif', 'QueuePushNotification', 'application/json', data);
10
11
  return promise.then((data) => QueuePushNotificationResponse.fromJSON(data));
11
12
  }
13
+ BulkQueuePushNotification(request) {
14
+ const data = BulkQueuePushNotificationRequest.toJSON(request);
15
+ const promise = this.rpc.request('devvit.plugin.v1alpha.pushnotif.PushNotif', 'BulkQueuePushNotification', 'application/json', data);
16
+ return promise.then((data) => BulkQueuePushNotificationResponse.fromJSON(data));
17
+ }
12
18
  }
13
19
  export class PushNotifClientProtobuf {
14
20
  constructor(rpc) {
15
21
  this.rpc = rpc;
16
22
  this.QueuePushNotification.bind(this);
23
+ this.BulkQueuePushNotification.bind(this);
17
24
  }
18
25
  QueuePushNotification(request) {
19
26
  const data = QueuePushNotificationRequest.encode(request).finish();
20
27
  const promise = this.rpc.request('devvit.plugin.v1alpha.pushnotif.PushNotif', 'QueuePushNotification', 'application/protobuf', data);
21
28
  return promise.then((data) => QueuePushNotificationResponse.decode(data));
22
29
  }
30
+ BulkQueuePushNotification(request) {
31
+ const data = BulkQueuePushNotificationRequest.encode(request).finish();
32
+ const promise = this.rpc.request('devvit.plugin.v1alpha.pushnotif.PushNotif', 'BulkQueuePushNotification', 'application/protobuf', data);
33
+ return promise.then((data) => BulkQueuePushNotificationResponse.decode(data));
34
+ }
23
35
  }
@@ -1,10 +1,12 @@
1
1
  import { TwirpContext, TwirpServer } from 'twirp-ts';
2
- import { QueuePushNotificationRequest, QueuePushNotificationResponse } from './pushnotif.js';
2
+ import { QueuePushNotificationRequest, QueuePushNotificationResponse, BulkQueuePushNotificationRequest, BulkQueuePushNotificationResponse } from './pushnotif.js';
3
3
  export interface PushNotifTwirp<T extends TwirpContext = TwirpContext> {
4
4
  QueuePushNotification(ctx: T, request: QueuePushNotificationRequest): Promise<QueuePushNotificationResponse>;
5
+ BulkQueuePushNotification(ctx: T, request: BulkQueuePushNotificationRequest): Promise<BulkQueuePushNotificationResponse>;
5
6
  }
6
7
  export declare enum PushNotifMethod {
7
- QueuePushNotification = "QueuePushNotification"
8
+ QueuePushNotification = "QueuePushNotification",
9
+ BulkQueuePushNotification = "BulkQueuePushNotification"
8
10
  }
9
11
  export declare const PushNotifMethodList: PushNotifMethod[];
10
12
  export declare function createPushNotifServer<T extends TwirpContext = TwirpContext>(service: PushNotifTwirp<T>): TwirpServer<PushNotifTwirp<TwirpContext<import("http").IncomingMessage, import("http").ServerResponse<import("http").IncomingMessage>>>, T>;
@@ -1 +1 @@
1
- {"version":3,"file":"pushnotif.twirp.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/plugin/v1alpha/pushnotif/pushnotif.twirp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EAOZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,gBAAgB,CAAC;AAMxB,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY;IACnE,qBAAqB,CACnB,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CAAC;CAC3C;AAED,oBAAY,eAAe;IACzB,qBAAqB,0BAA0B;CAChD;AAED,eAAO,MAAM,mBAAmB,mBAA0C,CAAC;AAE3E,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EACzE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,+IAS3B"}
1
+ {"version":3,"file":"pushnotif.twirp.d.ts","sourceRoot":"","sources":["../../../../../../src/types/devvit/plugin/v1alpha/pushnotif/pushnotif.twirp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EAOZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EAClC,MAAM,gBAAgB,CAAC;AAMxB,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY;IACnE,qBAAqB,CACnB,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC1C,yBAAyB,CACvB,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,iCAAiC,CAAC,CAAC;CAC/C;AAED,oBAAY,eAAe;IACzB,qBAAqB,0BAA0B;IAC/C,yBAAyB,8BAA8B;CACxD;AAED,eAAO,MAAM,mBAAmB,mBAG/B,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,EACzE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,+IAS3B"}
@@ -1,10 +1,14 @@
1
1
  import { TwirpServer, TwirpError, TwirpErrorCode, TwirpContentType, chainInterceptors, } from 'twirp-ts';
2
- import { QueuePushNotificationRequest, QueuePushNotificationResponse, } from './pushnotif.js';
2
+ import { QueuePushNotificationRequest, QueuePushNotificationResponse, BulkQueuePushNotificationRequest, BulkQueuePushNotificationResponse, } from './pushnotif.js';
3
3
  export var PushNotifMethod;
4
4
  (function (PushNotifMethod) {
5
5
  PushNotifMethod["QueuePushNotification"] = "QueuePushNotification";
6
+ PushNotifMethod["BulkQueuePushNotification"] = "BulkQueuePushNotification";
6
7
  })(PushNotifMethod || (PushNotifMethod = {}));
7
- export const PushNotifMethodList = [PushNotifMethod.QueuePushNotification];
8
+ export const PushNotifMethodList = [
9
+ PushNotifMethod.QueuePushNotification,
10
+ PushNotifMethod.BulkQueuePushNotification,
11
+ ];
8
12
  export function createPushNotifServer(service) {
9
13
  return new TwirpServer({
10
14
  service,
@@ -22,6 +26,12 @@ function matchPushNotifRoute(method, events) {
22
26
  await events.onMatch(ctx);
23
27
  return handlePushNotifQueuePushNotificationRequest(ctx, service, data, interceptors);
24
28
  };
29
+ case 'BulkQueuePushNotification':
30
+ return async (ctx, service, data, interceptors) => {
31
+ ctx = { ...ctx, methodName: 'BulkQueuePushNotification' };
32
+ await events.onMatch(ctx);
33
+ return handlePushNotifBulkQueuePushNotificationRequest(ctx, service, data, interceptors);
34
+ };
25
35
  default:
26
36
  events.onNotFound();
27
37
  const msg = `no handler found`;
@@ -39,6 +49,17 @@ function handlePushNotifQueuePushNotificationRequest(ctx, service, data, interce
39
49
  throw new TwirpError(TwirpErrorCode.BadRoute, msg);
40
50
  }
41
51
  }
52
+ function handlePushNotifBulkQueuePushNotificationRequest(ctx, service, data, interceptors) {
53
+ switch (ctx.contentType) {
54
+ case TwirpContentType.JSON:
55
+ return handlePushNotifBulkQueuePushNotificationJSON(ctx, service, data, interceptors);
56
+ case TwirpContentType.Protobuf:
57
+ return handlePushNotifBulkQueuePushNotificationProtobuf(ctx, service, data, interceptors);
58
+ default:
59
+ const msg = 'unexpected Content-Type';
60
+ throw new TwirpError(TwirpErrorCode.BadRoute, msg);
61
+ }
62
+ }
42
63
  async function handlePushNotifQueuePushNotificationJSON(ctx, service, data, interceptors) {
43
64
  let request;
44
65
  let response;
@@ -63,6 +84,30 @@ async function handlePushNotifQueuePushNotificationJSON(ctx, service, data, inte
63
84
  }
64
85
  return JSON.stringify(QueuePushNotificationResponse.toJSON(response));
65
86
  }
87
+ async function handlePushNotifBulkQueuePushNotificationJSON(ctx, service, data, interceptors) {
88
+ let request;
89
+ let response;
90
+ try {
91
+ const body = JSON.parse(data.toString() || '{}');
92
+ request = BulkQueuePushNotificationRequest.fromJSON(body);
93
+ }
94
+ catch (e) {
95
+ if (e instanceof Error) {
96
+ const msg = 'the json request could not be decoded';
97
+ throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
98
+ }
99
+ }
100
+ if (interceptors && interceptors.length > 0) {
101
+ const interceptor = chainInterceptors(...interceptors);
102
+ response = await interceptor(ctx, request, (ctx, inputReq) => {
103
+ return service.BulkQueuePushNotification(ctx, inputReq);
104
+ });
105
+ }
106
+ else {
107
+ response = await service.BulkQueuePushNotification(ctx, request);
108
+ }
109
+ return JSON.stringify(BulkQueuePushNotificationResponse.toJSON(response));
110
+ }
66
111
  async function handlePushNotifQueuePushNotificationProtobuf(ctx, service, data, interceptors) {
67
112
  let request;
68
113
  let response;
@@ -86,3 +131,26 @@ async function handlePushNotifQueuePushNotificationProtobuf(ctx, service, data,
86
131
  }
87
132
  return Buffer.from(QueuePushNotificationResponse.encode(response).finish());
88
133
  }
134
+ async function handlePushNotifBulkQueuePushNotificationProtobuf(ctx, service, data, interceptors) {
135
+ let request;
136
+ let response;
137
+ try {
138
+ request = BulkQueuePushNotificationRequest.decode(data);
139
+ }
140
+ catch (e) {
141
+ if (e instanceof Error) {
142
+ const msg = 'the protobuf request could not be decoded';
143
+ throw new TwirpError(TwirpErrorCode.Malformed, msg).withCause(e, true);
144
+ }
145
+ }
146
+ if (interceptors && interceptors.length > 0) {
147
+ const interceptor = chainInterceptors(...interceptors);
148
+ response = await interceptor(ctx, request, (ctx, inputReq) => {
149
+ return service.BulkQueuePushNotification(ctx, inputReq);
150
+ });
151
+ }
152
+ else {
153
+ response = await service.BulkQueuePushNotification(ctx, request);
154
+ }
155
+ return Buffer.from(BulkQueuePushNotificationResponse.encode(response).finish());
156
+ }