@toando/hosting-sdk 1.0.0 → 1.1.1

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/dist/index.d.mts CHANGED
@@ -1,16 +1,12 @@
1
- import * as buf from "@bufbuild/protobuf";
2
- import { Message } from "@bufbuild/protobuf";
3
- import { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
1
+ import { ConnectRouter, ServiceImpl, Transport } from "@connectrpc/connect";
2
+ import { GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
4
3
  import { Timestamp } from "@bufbuild/protobuf/wkt";
5
- //#region src/generated/models/session_pb.d.ts
6
- /**
7
- * Describes the file models/session.proto.
8
- */
9
- export declare const file_models_session: GenFile;
4
+ import { Message } from "@bufbuild/protobuf";
5
+ //#region src/generated/session_pb.d.ts
10
6
  /**
11
- * @generated from message toando.hosting.models.v1.Session
7
+ * @generated from message toando.hosting.session.Session
12
8
  */
13
- export type Session = Message<"toando.hosting.models.v1.Session"> & {
9
+ type Session = Message<"toando.hosting.session.Session"> & {
14
10
  /**
15
11
  * @generated from field: string id = 1;
16
12
  */
@@ -21,10 +17,62 @@ export type Session = Message<"toando.hosting.models.v1.Session"> & {
21
17
  createdAt?: Timestamp | undefined;
22
18
  };
23
19
  /**
24
- * Describes the message toando.hosting.models.v1.Session.
20
+ * Describes the message toando.hosting.session.Session.
25
21
  * Use `create(SessionSchema)` to create a new message.
26
22
  */
27
- export declare const SessionSchema: GenMessage<Session>;
23
+ declare const SessionSchema: GenMessage<Session>;
24
+ /**
25
+ * @generated from message toando.hosting.session.GetSessionRequest
26
+ */
27
+ type GetSessionRequest = Message<"toando.hosting.session.GetSessionRequest"> & {};
28
+ /**
29
+ * Describes the message toando.hosting.session.GetSessionRequest.
30
+ * Use `create(GetSessionRequestSchema)` to create a new message.
31
+ */
32
+ declare const GetSessionRequestSchema: GenMessage<GetSessionRequest>;
33
+ /**
34
+ * @generated from service toando.hosting.session.SessionService
35
+ */
36
+ declare const SessionService: GenService<{
37
+ /**
38
+ * @generated from rpc toando.hosting.session.SessionService.CreateSession
39
+ */
40
+ createSession: {
41
+ methodKind: "unary";
42
+ input: typeof GetSessionRequestSchema;
43
+ output: typeof SessionSchema;
44
+ };
45
+ /**
46
+ * @generated from rpc toando.hosting.session.SessionService.GetSession
47
+ */
48
+ getSession: {
49
+ methodKind: "unary";
50
+ input: typeof GetSessionRequestSchema;
51
+ output: typeof SessionSchema;
52
+ };
53
+ }>;
54
+ //#endregion
55
+ //#region src/index.d.ts
56
+ export declare class HostingClient {
57
+ readonly transport: Transport;
58
+ readonly sessions: import("@connectrpc/connect").Client<import("@bufbuild/protobuf/codegenv2").GenService<{
59
+ createSession: {
60
+ methodKind: "unary";
61
+ input: typeof GetSessionRequestSchema;
62
+ output: typeof SessionSchema;
63
+ };
64
+ getSession: {
65
+ methodKind: "unary";
66
+ input: typeof GetSessionRequestSchema;
67
+ output: typeof SessionSchema;
68
+ };
69
+ }>>;
70
+ constructor(transport: Transport);
71
+ }
72
+ export declare abstract class HostingBackend {
73
+ abstract sessions: ServiceImpl<typeof SessionService>;
74
+ addRoutes(router: ConnectRouter): void;
75
+ }
28
76
  //#endregion
29
- export { buf };
77
+ export type { Session };
30
78
  //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs CHANGED
@@ -1,17 +1,26 @@
1
- import * as buf from "@bufbuild/protobuf";
2
- import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
1
+ import { createClient } from "@connectrpc/connect";
2
+ import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
3
3
  import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
4
- //#region src/generated/models/session_pb.ts
5
4
  /**
6
- * Describes the file models/session.proto.
5
+ * @generated from service toando.hosting.session.SessionService
7
6
  */
8
- const file_models_session = /*@__PURE__*/ fileDesc("ChRtb2RlbHMvc2Vzc2lvbi5wcm90bxIYdG9hbmRvLmhvc3RpbmcubW9kZWxzLnYxIkUKB1Nlc3Npb24SCgoCaWQYASABKAkSLgoKY3JlYXRlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBiBnByb3RvMw", [file_google_protobuf_timestamp]);
9
- /**
10
- * Describes the message toando.hosting.models.v1.Session.
11
- * Use `create(SessionSchema)` to create a new message.
12
- */
13
- const SessionSchema = /*@__PURE__*/ messageDesc(file_models_session, 0);
7
+ const SessionService = /*@__PURE__*/ serviceDesc(/* @__PURE__ */ fileDesc("Cg1zZXNzaW9uLnByb3RvEhZ0b2FuZG8uaG9zdGluZy5zZXNzaW9uIkUKB1Nlc3Npb24SCgoCaWQYASABKAkSLgoKY3JlYXRlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiFgoUQ3JlYXRlU2Vzc2lvblJlcXVlc3QiEwoRR2V0U2Vzc2lvblJlcXVlc3QyxwEKDlNlc3Npb25TZXJ2aWNlElsKDUNyZWF0ZVNlc3Npb24SKS50b2FuZG8uaG9zdGluZy5zZXNzaW9uLkdldFNlc3Npb25SZXF1ZXN0Gh8udG9hbmRvLmhvc3Rpbmcuc2Vzc2lvbi5TZXNzaW9uElgKCkdldFNlc3Npb24SKS50b2FuZG8uaG9zdGluZy5zZXNzaW9uLkdldFNlc3Npb25SZXF1ZXN0Gh8udG9hbmRvLmhvc3Rpbmcuc2Vzc2lvbi5TZXNzaW9uYgZwcm90bzM", [file_google_protobuf_timestamp]), 0);
8
+ //#endregion
9
+ //#region src/index.ts
10
+ var HostingClient = class {
11
+ transport;
12
+ sessions;
13
+ constructor(transport) {
14
+ this.transport = transport;
15
+ this.sessions = createClient(SessionService, this.transport);
16
+ }
17
+ };
18
+ var HostingBackend = class {
19
+ addRoutes(router) {
20
+ router.service(SessionService, this.sessions);
21
+ }
22
+ };
14
23
  //#endregion
15
- export { SessionSchema, buf, file_models_session };
24
+ export { HostingBackend, HostingClient };
16
25
 
17
26
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/generated/models/session_pb.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.15.0 with parameter \"target=ts\"\n// @generated from file models/session.proto (package toando.hosting.models.v1, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file models/session.proto.\n */\nexport const file_models_session: GenFile = /*@__PURE__*/\n fileDesc(\"ChRtb2RlbHMvc2Vzc2lvbi5wcm90bxIYdG9hbmRvLmhvc3RpbmcubW9kZWxzLnYxIkUKB1Nlc3Npb24SCgoCaWQYASABKAkSLgoKY3JlYXRlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBiBnByb3RvMw\", [file_google_protobuf_timestamp]);\n\n/**\n * @generated from message toando.hosting.models.v1.Session\n */\nexport type Session = Message<\"toando.hosting.models.v1.Session\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 2;\n */\n createdAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message toando.hosting.models.v1.Session.\n * Use `create(SessionSchema)` to create a new message.\n */\nexport const SessionSchema: GenMessage<Session> = /*@__PURE__*/\n messageDesc(file_models_session, 0);\n\n"],"mappings":";;;;;;;AAaA,MAAa,sBACX,uBAAS,8KAA8K,CAAC,8BAA8B,CAAC;;;;;AAqBzN,MAAa,gBACX,0BAAY,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/generated/session_pb.ts","../src/index.ts"],"sourcesContent":["// @generated by protoc-gen-es v2.15.0 with parameter \"target=ts\"\n// @generated from file session.proto (package toando.hosting.session, syntax proto3)\n/* eslint-disable */\n\nimport type { GenFile, GenMessage, GenService } from \"@bufbuild/protobuf/codegenv2\";\nimport { fileDesc, messageDesc, serviceDesc } from \"@bufbuild/protobuf/codegenv2\";\nimport type { Timestamp } from \"@bufbuild/protobuf/wkt\";\nimport { file_google_protobuf_timestamp } from \"@bufbuild/protobuf/wkt\";\nimport type { Message } from \"@bufbuild/protobuf\";\n\n/**\n * Describes the file session.proto.\n */\nexport const file_session: GenFile = /*@__PURE__*/\n fileDesc(\"Cg1zZXNzaW9uLnByb3RvEhZ0b2FuZG8uaG9zdGluZy5zZXNzaW9uIkUKB1Nlc3Npb24SCgoCaWQYASABKAkSLgoKY3JlYXRlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiFgoUQ3JlYXRlU2Vzc2lvblJlcXVlc3QiEwoRR2V0U2Vzc2lvblJlcXVlc3QyxwEKDlNlc3Npb25TZXJ2aWNlElsKDUNyZWF0ZVNlc3Npb24SKS50b2FuZG8uaG9zdGluZy5zZXNzaW9uLkdldFNlc3Npb25SZXF1ZXN0Gh8udG9hbmRvLmhvc3Rpbmcuc2Vzc2lvbi5TZXNzaW9uElgKCkdldFNlc3Npb24SKS50b2FuZG8uaG9zdGluZy5zZXNzaW9uLkdldFNlc3Npb25SZXF1ZXN0Gh8udG9hbmRvLmhvc3Rpbmcuc2Vzc2lvbi5TZXNzaW9uYgZwcm90bzM\", [file_google_protobuf_timestamp]);\n\n/**\n * @generated from message toando.hosting.session.Session\n */\nexport type Session = Message<\"toando.hosting.session.Session\"> & {\n /**\n * @generated from field: string id = 1;\n */\n id: string;\n\n /**\n * @generated from field: google.protobuf.Timestamp created_at = 2;\n */\n createdAt?: Timestamp | undefined;\n};\n\n/**\n * Describes the message toando.hosting.session.Session.\n * Use `create(SessionSchema)` to create a new message.\n */\nexport const SessionSchema: GenMessage<Session> = /*@__PURE__*/\n messageDesc(file_session, 0);\n\n/**\n * @generated from message toando.hosting.session.CreateSessionRequest\n */\nexport type CreateSessionRequest = Message<\"toando.hosting.session.CreateSessionRequest\"> & {\n};\n\n/**\n * Describes the message toando.hosting.session.CreateSessionRequest.\n * Use `create(CreateSessionRequestSchema)` to create a new message.\n */\nexport const CreateSessionRequestSchema: GenMessage<CreateSessionRequest> = /*@__PURE__*/\n messageDesc(file_session, 1);\n\n/**\n * @generated from message toando.hosting.session.GetSessionRequest\n */\nexport type GetSessionRequest = Message<\"toando.hosting.session.GetSessionRequest\"> & {\n};\n\n/**\n * Describes the message toando.hosting.session.GetSessionRequest.\n * Use `create(GetSessionRequestSchema)` to create a new message.\n */\nexport const GetSessionRequestSchema: GenMessage<GetSessionRequest> = /*@__PURE__*/\n messageDesc(file_session, 2);\n\n/**\n * @generated from service toando.hosting.session.SessionService\n */\nexport const SessionService: GenService<{\n /**\n * @generated from rpc toando.hosting.session.SessionService.CreateSession\n */\n createSession: {\n methodKind: \"unary\";\n input: typeof GetSessionRequestSchema;\n output: typeof SessionSchema;\n },\n /**\n * @generated from rpc toando.hosting.session.SessionService.GetSession\n */\n getSession: {\n methodKind: \"unary\";\n input: typeof GetSessionRequestSchema;\n output: typeof SessionSchema;\n },\n}> = /*@__PURE__*/\n serviceDesc(file_session, 0);\n\n","import { createClient, type ConnectRouter, type ServiceImpl, type Transport } from \"@connectrpc/connect\";\n\nimport { SessionService } from \"./generated/session_pb\";\nexport { type Session } from \"./generated/session_pb\"\n\nexport class HostingClient {\n readonly sessions;\n\n constructor(readonly transport: Transport) {\n this.sessions = createClient(SessionService, this.transport)\n }\n}\n\nexport abstract class HostingBackend {\n abstract sessions: ServiceImpl<typeof SessionService>\n\n addRoutes(router: ConnectRouter) {\n router.service(SessionService, this.sessions)\n }\n}"],"mappings":";;;;;;AAmEA,MAAa,iBAkBX,0BAAY,gBAvEZ,SAAS,2eAA2e,CAAC,8BAA8B,CAuEvgB,GAAc,CAAC;;;AChF7B,IAAa,gBAAb,MAA2B;CAGF;CAFrB;CAEA,YAAY,WAA+B;EAAtB,KAAA,YAAA;EACjB,KAAK,WAAW,aAAa,gBAAgB,KAAK,SAAS;CAC/D;AACJ;AAEA,IAAsB,iBAAtB,MAAqC;CAGjC,UAAU,QAAuB;EAC7B,OAAO,QAAQ,gBAAgB,KAAK,QAAQ;CAChD;AACJ"}
package/package.json CHANGED
@@ -1,38 +1,39 @@
1
- {
2
- "name": "@toando/hosting-sdk",
3
- "version": "1.0.0",
4
- "description": "SDK for interacting with the hosting product",
5
- "type": "module",
6
- "exports": {
7
- ".": {
8
- "types": "./dist/index.d.mts",
9
- "import": "./dist/index.mjs"
10
- }
11
- },
12
- "files": [
13
- "dist"
14
- ],
15
- "scripts": {
16
- "genproto": "buf generate",
17
- "build": "tsdown",
18
- "typecheck": "tsc --noEmit"
19
- },
20
- "repository": {
21
- "type": "git",
22
- "url": "git+https://github.com/Toandos/hosting-sdk.git"
23
- },
24
- "keywords": [],
25
- "author": "xXjojaXx",
26
- "license": "Apache-2.0",
27
- "bugs": {
28
- "url": "https://github.com/Toandos/hosting-sdk/issues"
29
- },
30
- "homepage": "https://github.com/Toandos/hosting-sdk#readme",
31
- "devDependencies": {
32
- "tsdown": "^0.23.0",
33
- "typescript": "^7.0.2"
34
- },
35
- "dependencies": {
36
- "@bufbuild/protobuf": "^2.15.0"
37
- }
38
- }
1
+ {
2
+ "name": "@toando/hosting-sdk",
3
+ "version": "1.1.1",
4
+ "description": "SDK for interacting with the hosting product",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./dist/index.d.mts",
9
+ "import": "./dist/index.mjs"
10
+ }
11
+ },
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "scripts": {
16
+ "genproto": "buf generate",
17
+ "build": "tsdown",
18
+ "typecheck": "tsc --noEmit"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/Toandos/hosting-sdk.git"
23
+ },
24
+ "keywords": [],
25
+ "author": "xXjojaXx",
26
+ "license": "Apache-2.0",
27
+ "bugs": {
28
+ "url": "https://github.com/Toandos/hosting-sdk/issues"
29
+ },
30
+ "homepage": "https://github.com/Toandos/hosting-sdk#readme",
31
+ "devDependencies": {
32
+ "tsdown": "^0.23.0",
33
+ "typescript": "^7.0.2"
34
+ },
35
+ "dependencies": {
36
+ "@bufbuild/protobuf": "^2.15.0",
37
+ "@connectrpc/connect": "^2.2.0"
38
+ }
39
+ }