@devvit/protos 0.10.18-next-2024-03-04-f01d9a934.0 → 0.10.18-next-2024-03-04-f7bbcca35.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/protos",
3
- "version": "0.10.18-next-2024-03-04-f01d9a934.0",
3
+ "version": "0.10.18-next-2024-03-04-f7bbcca35.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,7 +42,7 @@
42
42
  "devDependencies": {
43
43
  "@devvit/eslint-config": "0.10.17",
44
44
  "@devvit/repo-tools": "0.10.17",
45
- "@devvit/tsconfig": "0.10.18-next-2024-03-04-f01d9a934.0",
45
+ "@devvit/tsconfig": "0.10.18-next-2024-03-04-f7bbcca35.0",
46
46
  "eslint": "8.9.0",
47
47
  "glob": "10.3.10",
48
48
  "ts-proto-kmx-2": "1.129.4",
@@ -53,5 +53,5 @@
53
53
  "publishConfig": {
54
54
  "directory": "dist"
55
55
  },
56
- "gitHead": "c9fd609a59301b7926baa5d4b53f95813507a9bd"
56
+ "gitHead": "a9c6eb20150446089528bfe3435cbb02fff4cca0"
57
57
  }
@@ -7,15 +7,6 @@ import "google/protobuf/empty.proto";
7
7
 
8
8
  option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/service";
9
9
 
10
- // Fetch a bundle by its hostname
11
- message BundleRequest {
12
- string hostname = 1;
13
- }
14
-
15
10
  service BundleService {
16
- // Upload a bundle to the bundle repo
17
11
  rpc Upload(devvit.runtime.LinkedBundle) returns (google.protobuf.Empty);
18
-
19
- // Retrieve a bundle from the bundle repo
20
- rpc Fetch(BundleRequest) returns (devvit.runtime.LinkedBundle);
21
12
  }
@@ -4,30 +4,10 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
  import { Metadata, MethodDefinition } from "@lib/Types.js";
7
- import _m0 from 'protobufjs/minimal.js';
8
7
  import { Empty } from '../../google/protobuf/empty.js';
9
8
  import { LinkedBundle } from '../runtime/bundle.js';
10
- /** Fetch a bundle by its hostname */
11
- export interface BundleRequest {
12
- hostname: string;
13
- }
14
- export declare const BundleRequest: {
15
- $type: "devvit.service.BundleRequest";
16
- encode(message: BundleRequest, writer?: _m0.Writer): _m0.Writer;
17
- decode(input: _m0.Reader | Uint8Array, length?: number): BundleRequest;
18
- fromJSON(object: any): BundleRequest;
19
- toJSON(message: BundleRequest): unknown;
20
- fromPartial<I extends {
21
- hostname?: string | undefined;
22
- } & {
23
- hostname?: string | undefined;
24
- } & { [K in Exclude<keyof I, "$type" | "hostname">]: never; }>(object: I): BundleRequest;
25
- };
26
9
  export interface BundleService {
27
- /** Upload a bundle to the bundle repo */
28
10
  Upload(request: LinkedBundle, metadata?: Metadata): Promise<Empty>;
29
- /** Retrieve a bundle from the bundle repo */
30
- Fetch(request: BundleRequest, metadata?: Metadata): Promise<LinkedBundle>;
31
11
  }
32
12
  export declare class BundleServiceClientImpl implements BundleService {
33
13
  private readonly rpc;
@@ -36,7 +16,6 @@ export declare class BundleServiceClientImpl implements BundleService {
36
16
  service?: string;
37
17
  });
38
18
  Upload(request: LinkedBundle): Promise<Empty>;
39
- Fetch(request: BundleRequest): Promise<LinkedBundle>;
40
19
  }
41
20
  export type BundleServiceDefinition = typeof BundleServiceDefinition;
42
21
  export declare const BundleServiceDefinition: {
@@ -1 +1 @@
1
- {"version":3,"file":"bundle_service.d.ts","sourceRoot":"","sources":["../../../../src/types/devvit/service/bundle_service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAc,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,GAAG,MAAM,uBAAuB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,qCAAqC;AACrC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;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AU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACjF"}
1
+ {"version":3,"file":"bundle_service.d.ts","sourceRoot":"","sources":["../../../../src/types/devvit/service/bundle_service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAc,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;CACpE;AAED,qBAAa,uBAAwB,YAAW,aAAa;IAC3D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBACrB,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAKjD,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC;CAK9C;AAED,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAC;AACrE,eAAO,MAAM,uBAAuB,EAAE;IACpC,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QAAE,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,GAAG;YAAE,OAAO,EAAE,EAAE,CAAA;SAAE,CAAA;KAAE,CAAC;CAc9D,CAAC;AAEX,UAAU,GAAG;IACX,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACjF"}
@@ -6,74 +6,23 @@
6
6
  /* eslint-disable */
7
7
  import _m0 from 'protobufjs/minimal.js';
8
8
  import { Empty } from '../../google/protobuf/empty.js';
9
- import { messageTypeRegistry } from '../../typeRegistry.js';
10
9
  import { LinkedBundle } from '../runtime/bundle.js';
11
- function createBaseBundleRequest() {
12
- return { hostname: "" };
13
- }
14
- export const BundleRequest = {
15
- $type: "devvit.service.BundleRequest",
16
- encode(message, writer = _m0.Writer.create()) {
17
- if (message.hostname !== "") {
18
- writer.uint32(10).string(message.hostname);
19
- }
20
- return writer;
21
- },
22
- decode(input, length) {
23
- const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
24
- let end = length === undefined ? reader.len : reader.pos + length;
25
- const message = createBaseBundleRequest();
26
- while (reader.pos < end) {
27
- const tag = reader.uint32();
28
- switch (tag >>> 3) {
29
- case 1:
30
- message.hostname = reader.string();
31
- break;
32
- default:
33
- reader.skipType(tag & 7);
34
- break;
35
- }
36
- }
37
- return message;
38
- },
39
- fromJSON(object) {
40
- return { hostname: isSet(object.hostname) ? String(object.hostname) : "" };
41
- },
42
- toJSON(message) {
43
- const obj = {};
44
- message.hostname !== undefined && (obj.hostname = message.hostname);
45
- return obj;
46
- },
47
- fromPartial(object) {
48
- const message = createBaseBundleRequest();
49
- message.hostname = object.hostname ?? "";
50
- return message;
51
- },
52
- };
53
- messageTypeRegistry.set("devvit.service.BundleRequest", BundleRequest);
54
10
  export class BundleServiceClientImpl {
55
11
  constructor(rpc, opts) {
56
12
  this.service = opts?.service || "devvit.service.BundleService";
57
13
  this.rpc = rpc;
58
14
  this.Upload = this.Upload.bind(this);
59
- this.Fetch = this.Fetch.bind(this);
60
15
  }
61
16
  Upload(request) {
62
17
  const data = LinkedBundle.encode(request).finish();
63
18
  const promise = this.rpc.request(this.service, "Upload", data);
64
19
  return promise.then((data) => Empty.decode(new _m0.Reader(data)));
65
20
  }
66
- Fetch(request) {
67
- const data = BundleRequest.encode(request).finish();
68
- const promise = this.rpc.request(this.service, "Fetch", data);
69
- return promise.then((data) => LinkedBundle.decode(new _m0.Reader(data)));
70
- }
71
21
  }
72
22
  export const BundleServiceDefinition = {
73
23
  name: "BundleService",
74
24
  fullName: "devvit.service.BundleService",
75
25
  methods: {
76
- /** Upload a bundle to the bundle repo */
77
26
  upload: {
78
27
  name: "Upload",
79
28
  requestType: LinkedBundle,
@@ -82,17 +31,5 @@ export const BundleServiceDefinition = {
82
31
  responseStream: false,
83
32
  options: {},
84
33
  },
85
- /** Retrieve a bundle from the bundle repo */
86
- fetch: {
87
- name: "Fetch",
88
- requestType: BundleRequest,
89
- requestStream: false,
90
- responseType: LinkedBundle,
91
- responseStream: false,
92
- options: {},
93
- },
94
34
  },
95
35
  };
96
- function isSet(value) {
97
- return value !== null && value !== undefined;
98
- }