@babacarthiamdev/contracts 1.0.21 → 1.0.22

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/gen/media.ts CHANGED
@@ -28,7 +28,7 @@ export interface FetchRequest {
28
28
  }
29
29
 
30
30
  export interface FetchResponse {
31
- data: string;
31
+ data: Uint8Array;
32
32
  contentType: string;
33
33
  }
34
34
 
@@ -198,13 +198,13 @@ export const FetchRequest: MessageFns<FetchRequest> = {
198
198
  };
199
199
 
200
200
  function createBaseFetchResponse(): FetchResponse {
201
- return { data: "", contentType: "" };
201
+ return { data: new Uint8Array(0), contentType: "" };
202
202
  }
203
203
 
204
204
  export const FetchResponse: MessageFns<FetchResponse> = {
205
205
  encode(message: FetchResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
206
- if (message.data !== "") {
207
- writer.uint32(10).string(message.data);
206
+ if (message.data.length !== 0) {
207
+ writer.uint32(10).bytes(message.data);
208
208
  }
209
209
  if (message.contentType !== "") {
210
210
  writer.uint32(18).string(message.contentType);
@@ -224,7 +224,7 @@ export const FetchResponse: MessageFns<FetchResponse> = {
224
224
  break;
225
225
  }
226
226
 
227
- message.data = reader.string();
227
+ message.data = reader.bytes();
228
228
  continue;
229
229
  }
230
230
  case 2: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babacarthiamdev/contracts",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "type": "./dist/index.d.ts",
package/proto/media.proto CHANGED
@@ -25,7 +25,7 @@ message FetchRequest {
25
25
  }
26
26
 
27
27
  message FetchResponse {
28
- string data = 1;
28
+ bytes data = 1;
29
29
  string content_type = 2;
30
30
  }
31
31