@raystack/proton 0.1.0-ce225175aa066e6f296bc489293bb83ed0edcef6 → 0.1.0-fe747c0278b08e54b16540b091d980d1b166f948

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.
Files changed (113) hide show
  1. package/README.md +113 -0
  2. package/google/api/annotations_pb.ts +15 -9
  3. package/google/api/field_behavior_pb.ts +19 -19
  4. package/google/api/http_pb.ts +43 -108
  5. package/google/api/httpbody_pb.ts +23 -37
  6. package/package.json +6 -4
  7. package/protoc-gen-openapiv2/options/annotations_pb.ts +23 -29
  8. package/protoc-gen-openapiv2/options/openapiv2_pb.ts +338 -808
  9. package/raystack/assets/v1beta1/bucket_pb.ts +46 -89
  10. package/raystack/assets/v1beta1/dashboard_pb.ts +49 -97
  11. package/raystack/assets/v1beta1/event_pb.ts +22 -36
  12. package/raystack/assets/v1beta1/group_pb.ts +38 -74
  13. package/raystack/assets/v1beta1/job_pb.ts +30 -43
  14. package/raystack/assets/v1beta1/lineage_pb.ts +22 -36
  15. package/raystack/assets/v1beta1/ownership_pb.ts +31 -68
  16. package/raystack/assets/v1beta1/preview_pb.ts +21 -34
  17. package/raystack/assets/v1beta1/properties_pb.ts +22 -37
  18. package/raystack/assets/v1beta1/resource_pb.ts +24 -43
  19. package/raystack/assets/v1beta1/schema_pb.ts +59 -145
  20. package/raystack/assets/v1beta1/table_pb.ts +59 -120
  21. package/raystack/assets/v1beta1/timestamp_pb.ts +28 -62
  22. package/raystack/assets/v1beta1/topic_pb.ts +43 -78
  23. package/raystack/assets/v1beta1/user_pb.ts +58 -125
  24. package/raystack/assets/v1beta2/application_pb.ts +23 -39
  25. package/raystack/assets/v1beta2/asset_pb.ts +30 -53
  26. package/raystack/assets/v1beta2/bucket_pb.ts +41 -87
  27. package/raystack/assets/v1beta2/common_pb.ts +56 -137
  28. package/raystack/assets/v1beta2/dashboard_pb.ts +44 -93
  29. package/raystack/assets/v1beta2/experiment_pb.ts +38 -79
  30. package/raystack/assets/v1beta2/feature_table_pb.ts +51 -115
  31. package/raystack/assets/v1beta2/group_pb.ts +32 -68
  32. package/raystack/assets/v1beta2/job_pb.ts +21 -35
  33. package/raystack/assets/v1beta2/metric_pb.ts +25 -43
  34. package/raystack/assets/v1beta2/model_pb.ts +59 -147
  35. package/raystack/assets/v1beta2/table_pb.ts +82 -200
  36. package/raystack/assets/v1beta2/topic_pb.ts +41 -99
  37. package/raystack/assets/v1beta2/user_pb.ts +53 -121
  38. package/raystack/common/index.ts +0 -1
  39. package/raystack/common/v1/service-CommonService_connectquery.ts +3 -14
  40. package/raystack/common/v1/service_pb.ts +57 -97
  41. package/raystack/compass/index.ts +0 -1
  42. package/raystack/compass/v1beta1/service-CompassService_connectquery.ts +44 -424
  43. package/raystack/compass/v1beta1/service_pb.ts +1448 -3319
  44. package/raystack/entropy/index.ts +0 -2
  45. package/raystack/entropy/v1beta1/module-ModuleService_connectquery.ts +7 -54
  46. package/raystack/entropy/v1beta1/module_pb.ts +156 -324
  47. package/raystack/entropy/v1beta1/resource-ResourceService_connectquery.ts +9 -74
  48. package/raystack/entropy/v1beta1/resource_pb.ts +330 -756
  49. package/raystack/frontier/index.ts +0 -2
  50. package/raystack/frontier/v1beta1/admin-AdminService_connectquery.ts +60 -514
  51. package/raystack/frontier/v1beta1/admin.client.ts +17 -0
  52. package/raystack/frontier/v1beta1/admin.ts +111 -1
  53. package/raystack/frontier/v1beta1/admin_pb.ts +1774 -3791
  54. package/raystack/frontier/v1beta1/frontier-FrontierService_connectquery.ts +169 -1674
  55. package/raystack/frontier/v1beta1/frontier_pb.ts +4850 -10959
  56. package/raystack/frontier/v1beta1/models_pb.ts +810 -2296
  57. package/raystack/guardian/index.ts +0 -1
  58. package/raystack/guardian/v1beta1/guardian-GuardianService_connectquery.ts +42 -404
  59. package/raystack/guardian/v1beta1/guardian_pb.ts +1584 -3783
  60. package/raystack/optimus/core/v1beta1/backup-BackupService_connectquery.ts +5 -34
  61. package/raystack/optimus/core/v1beta1/backup_pb.ts +137 -273
  62. package/raystack/optimus/core/v1beta1/job_run-JobRunService_connectquery.ts +6 -44
  63. package/raystack/optimus/core/v1beta1/job_run_pb.ts +194 -376
  64. package/raystack/optimus/core/v1beta1/job_spec-JobSpecificationService_connectquery.ts +17 -154
  65. package/raystack/optimus/core/v1beta1/job_spec_pb.ts +910 -2081
  66. package/raystack/optimus/core/v1beta1/namespace-NamespaceService_connectquery.ts +5 -34
  67. package/raystack/optimus/core/v1beta1/namespace_pb.ts +113 -212
  68. package/raystack/optimus/core/v1beta1/project-ProjectService_connectquery.ts +5 -34
  69. package/raystack/optimus/core/v1beta1/project_pb.ts +121 -238
  70. package/raystack/optimus/core/v1beta1/replay-ReplayService_connectquery.ts +6 -44
  71. package/raystack/optimus/core/v1beta1/replay_pb.ts +160 -335
  72. package/raystack/optimus/core/v1beta1/resource-ResourceService_connectquery.ts +8 -64
  73. package/raystack/optimus/core/v1beta1/resource_pb.ts +266 -527
  74. package/raystack/optimus/core/v1beta1/runtime-RuntimeService_connectquery.ts +3 -14
  75. package/raystack/optimus/core/v1beta1/runtime_pb.ts +48 -61
  76. package/raystack/optimus/core/v1beta1/secret-SecretService_connectquery.ts +6 -44
  77. package/raystack/optimus/core/v1beta1/secret_pb.ts +155 -283
  78. package/raystack/optimus/core/v1beta1/status_pb.ts +35 -54
  79. package/raystack/optimus/integration/v1beta1/event_pb.ts +75 -187
  80. package/raystack/optimus/plugins/v1beta1/dependency_resolver-DependencyResolverModService_connectquery.ts +6 -44
  81. package/raystack/optimus/plugins/v1beta1/dependency_resolver_pb.ts +193 -426
  82. package/raystack/predator/v1beta1/metrics_log_pb.ts +67 -173
  83. package/raystack/predator/v1beta1/result_log_pb.ts +60 -144
  84. package/raystack/raccoon/index.ts +0 -1
  85. package/raystack/raccoon/v1beta1/raccoon-EventService_connectquery.ts +3 -14
  86. package/raystack/raccoon/v1beta1/raccoon_pb.ts +142 -189
  87. package/raystack/siren/index.ts +0 -1
  88. package/raystack/siren/v1beta1/siren-SirenService_connectquery.ts +37 -354
  89. package/raystack/siren/v1beta1/siren_pb.ts +1155 -2637
  90. package/raystack/stencil/index.ts +0 -1
  91. package/raystack/stencil/v1beta1/stencil-StencilService_connectquery.ts +18 -164
  92. package/raystack/stencil/v1beta1/stencil_pb.ts +530 -1157
  93. package/validate/validate_pb.ts +401 -1038
  94. package/raystack/common/v1/service_connect.ts +0 -26
  95. package/raystack/compass/v1beta1/service_connect.ts +0 -407
  96. package/raystack/entropy/v1beta1/module_connect.ts +0 -62
  97. package/raystack/entropy/v1beta1/resource_connect.ts +0 -89
  98. package/raystack/frontier/v1beta1/admin_connect.ts +0 -573
  99. package/raystack/frontier/v1beta1/frontier_connect.ts +0 -1574
  100. package/raystack/guardian/v1beta1/guardian_connect.ts +0 -381
  101. package/raystack/optimus/core/v1beta1/backup_connect.ts +0 -44
  102. package/raystack/optimus/core/v1beta1/job_run_connect.ts +0 -63
  103. package/raystack/optimus/core/v1beta1/job_spec_connect.ts +0 -233
  104. package/raystack/optimus/core/v1beta1/namespace_connect.ts +0 -50
  105. package/raystack/optimus/core/v1beta1/project_connect.ts +0 -50
  106. package/raystack/optimus/core/v1beta1/replay_connect.ts +0 -53
  107. package/raystack/optimus/core/v1beta1/resource_connect.ts +0 -96
  108. package/raystack/optimus/core/v1beta1/runtime_connect.ts +0 -30
  109. package/raystack/optimus/core/v1beta1/secret_connect.ts +0 -61
  110. package/raystack/optimus/plugins/v1beta1/dependency_resolver_connect.ts +0 -65
  111. package/raystack/raccoon/v1beta1/raccoon_connect.ts +0 -26
  112. package/raystack/siren/v1beta1/siren_connect.ts +0 -332
  113. package/raystack/stencil/v1beta1/stencil_connect.ts +0 -161
package/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # @raystack/proton
2
+
3
+ TypeScript/JavaScript client library for Raystack APIs generated from Protocol Buffer definitions.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @raystack/proton
9
+ ```
10
+
11
+ For browser applications using TanStack Query:
12
+ ```bash
13
+ npm install @raystack/proton @tanstack/react-query
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ### Browser (React)
19
+
20
+ ```typescript
21
+ import { FrontierService } from '@raystack/proton/frontier';
22
+ import { createConnectTransport } from '@connectrpc/connect-web';
23
+ import { createPromiseClient } from '@connectrpc/connect';
24
+
25
+ const transport = createConnectTransport({
26
+ baseUrl: 'https://api.example.com'
27
+ });
28
+
29
+ const client = createPromiseClient(FrontierService, transport);
30
+
31
+ const users = await client.listUsers({ pageSize: 10 });
32
+ ```
33
+
34
+ ### Node.js
35
+
36
+ ```typescript
37
+ import { FrontierService } from '@raystack/proton/frontier';
38
+ import { createConnectTransport } from '@connectrpc/connect-node';
39
+ import { createPromiseClient } from '@connectrpc/connect';
40
+
41
+ const transport = createConnectTransport({
42
+ baseUrl: 'https://api.example.com',
43
+ httpVersion: '2'
44
+ });
45
+
46
+ const client = createPromiseClient(FrontierService, transport);
47
+
48
+ const users = await client.listUsers({ pageSize: 10 });
49
+ ```
50
+
51
+ ### With TanStack Query
52
+
53
+ ```typescript
54
+ import { FrontierServiceQueries } from '@raystack/proton/frontier';
55
+ import { useQuery } from '@tanstack/react-query';
56
+
57
+ function UsersList() {
58
+ const { data, isLoading } = useQuery(
59
+ FrontierServiceQueries.listUsers(transport, { pageSize: 10 })
60
+ );
61
+
62
+ if (isLoading) return <div>Loading...</div>;
63
+
64
+ return (
65
+ <ul>
66
+ {data?.users?.map(user => (
67
+ <li key={user.id}>{user.name}</li>
68
+ ))}
69
+ </ul>
70
+ );
71
+ }
72
+ ```
73
+
74
+ ## Available Services
75
+
76
+ - `@raystack/proton/frontier` - Frontier API
77
+ - `@raystack/proton/compass` - Compass API
78
+ - `@raystack/proton/assets` - Assets API
79
+ - `@raystack/proton/guardian` - Guardian API
80
+ - `@raystack/proton/entropy` - Entropy API
81
+ - `@raystack/proton/optimus` - Optimus API
82
+ - `@raystack/proton/predator` - Predator API
83
+ - `@raystack/proton/raccoon` - Raccoon API
84
+ - `@raystack/proton/siren` - Siren API
85
+ - `@raystack/proton/stencil` - Stencil API
86
+ - `@raystack/proton/common` - Common utilities
87
+
88
+ Each service export includes:
89
+ - Service client (e.g., `FrontierService`)
90
+ - TanStack Query helpers (e.g., `FrontierServiceQueries`) - optional
91
+ - TypeScript types and interfaces
92
+
93
+ ## Dependencies
94
+
95
+ This package requires:
96
+ - `@bufbuild/protobuf` - Protocol Buffer runtime
97
+ - `@connectrpc/connect` - Connect RPC library
98
+ - `@connectrpc/connect-query` - Connect Query integration
99
+
100
+ Optional peer dependencies:
101
+ - `@tanstack/react-query` - For query hooks (browser only)
102
+
103
+ ## Documentation
104
+
105
+ For complete API documentation, visit the [Raystack Documentation](https://raystack.org/).
106
+
107
+ ## Repository
108
+
109
+ Source code and protobuf definitions: [raystack/proton](https://github.com/raystack/proton)
110
+
111
+ ## License
112
+
113
+ Apache 2.0
@@ -12,22 +12,28 @@
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
 
15
- // @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=none"
15
+ // @generated by protoc-gen-es v2.6.2 with parameter "target=ts,import_extension=none"
16
16
  // @generated from file google/api/annotations.proto (package google.api, syntax proto3)
17
17
  /* eslint-disable */
18
- // @ts-nocheck
19
18
 
20
- import { MethodOptions, proto3 } from "@bufbuild/protobuf";
21
- import { HttpRule } from "./http_pb";
19
+ import type { GenExtension, GenFile } from "@bufbuild/protobuf/codegenv2";
20
+ import { extDesc, fileDesc } from "@bufbuild/protobuf/codegenv2";
21
+ import type { HttpRule } from "./http_pb";
22
+ import { file_google_api_http } from "./http_pb";
23
+ import type { MethodOptions } from "@bufbuild/protobuf/wkt";
24
+ import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt";
25
+
26
+ /**
27
+ * Describes the file google/api/annotations.proto.
28
+ */
29
+ export const file_google_api_annotations: GenFile = /*@__PURE__*/
30
+ fileDesc("Chxnb29nbGUvYXBpL2Fubm90YXRpb25zLnByb3RvEgpnb29nbGUuYXBpOksKBGh0dHASHi5nb29nbGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxiwyrwiIAEoCzIULmdvb2dsZS5hcGkuSHR0cFJ1bGVSBGh0dHBCbgoOY29tLmdvb2dsZS5hcGlCEEFubm90YXRpb25zUHJvdG9QAVpBZ29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vZ29vZ2xlYXBpcy9hcGkvYW5ub3RhdGlvbnM7YW5ub3RhdGlvbnOiAgRHQVBJYgZwcm90bzM", [file_google_api_http, file_google_protobuf_descriptor]);
22
31
 
23
32
  /**
24
33
  * See `HttpRule`.
25
34
  *
26
35
  * @generated from extension: google.api.HttpRule http = 72295728;
27
36
  */
28
- export const http = proto3.makeExtension<MethodOptions, HttpRule>(
29
- "google.api.http",
30
- MethodOptions,
31
- () => ({ no: 72295728, kind: "message", T: HttpRule }),
32
- );
37
+ export const http: GenExtension<MethodOptions, HttpRule> = /*@__PURE__*/
38
+ extDesc(file_google_api_annotations, 0);
33
39
 
@@ -12,12 +12,20 @@
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
 
15
- // @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=none"
15
+ // @generated by protoc-gen-es v2.6.2 with parameter "target=ts,import_extension=none"
16
16
  // @generated from file google/api/field_behavior.proto (package google.api, syntax proto3)
17
17
  /* eslint-disable */
18
- // @ts-nocheck
19
18
 
20
- import { FieldOptions, proto3 } from "@bufbuild/protobuf";
19
+ import type { GenEnum, GenExtension, GenFile } from "@bufbuild/protobuf/codegenv2";
20
+ import { enumDesc, extDesc, fileDesc } from "@bufbuild/protobuf/codegenv2";
21
+ import type { FieldOptions } from "@bufbuild/protobuf/wkt";
22
+ import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt";
23
+
24
+ /**
25
+ * Describes the file google/api/field_behavior.proto.
26
+ */
27
+ export const file_google_api_field_behavior: GenFile = /*@__PURE__*/
28
+ fileDesc("Ch9nb29nbGUvYXBpL2ZpZWxkX2JlaGF2aW9yLnByb3RvEgpnb29nbGUuYXBpKqYBCg1GaWVsZEJlaGF2aW9yEh4KGkZJRUxEX0JFSEFWSU9SX1VOU1BFQ0lGSUVEEAASDAoIT1BUSU9OQUwQARIMCghSRVFVSVJFRBACEg8KC09VVFBVVF9PTkxZEAMSDgoKSU5QVVRfT05MWRAEEg0KCUlNTVVUQUJMRRAFEhIKDlVOT1JERVJFRF9MSVNUEAYSFQoRTk9OX0VNUFRZX0RFRkFVTFQQBzpgCg5maWVsZF9iZWhhdmlvchIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMYnAggAygOMhkuZ29vZ2xlLmFwaS5GaWVsZEJlaGF2aW9yUg1maWVsZEJlaGF2aW9yQnAKDmNvbS5nb29nbGUuYXBpQhJGaWVsZEJlaGF2aW9yUHJvdG9QAVpBZ29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8vZ29vZ2xlYXBpcy9hcGkvYW5ub3RhdGlvbnM7YW5ub3RhdGlvbnOiAgRHQVBJYgZwcm90bzM", [file_google_protobuf_descriptor]);
21
29
 
22
30
  /**
23
31
  * An indicator of the behavior of a given field (for example, that a field
@@ -103,17 +111,12 @@ export enum FieldBehavior {
103
111
  */
104
112
  NON_EMPTY_DEFAULT = 7,
105
113
  }
106
- // Retrieve enum metadata with: proto3.getEnumType(FieldBehavior)
107
- proto3.util.setEnumType(FieldBehavior, "google.api.FieldBehavior", [
108
- { no: 0, name: "FIELD_BEHAVIOR_UNSPECIFIED" },
109
- { no: 1, name: "OPTIONAL" },
110
- { no: 2, name: "REQUIRED" },
111
- { no: 3, name: "OUTPUT_ONLY" },
112
- { no: 4, name: "INPUT_ONLY" },
113
- { no: 5, name: "IMMUTABLE" },
114
- { no: 6, name: "UNORDERED_LIST" },
115
- { no: 7, name: "NON_EMPTY_DEFAULT" },
116
- ]);
114
+
115
+ /**
116
+ * Describes the enum google.api.FieldBehavior.
117
+ */
118
+ export const FieldBehaviorSchema: GenEnum<FieldBehavior> = /*@__PURE__*/
119
+ enumDesc(file_google_api_field_behavior, 0);
117
120
 
118
121
  /**
119
122
  * A designation of a specific field behavior (required, output only, etc.)
@@ -131,9 +134,6 @@ proto3.util.setEnumType(FieldBehavior, "google.api.FieldBehavior", [
131
134
  *
132
135
  * @generated from extension: repeated google.api.FieldBehavior field_behavior = 1052;
133
136
  */
134
- export const field_behavior = proto3.makeExtension<FieldOptions, FieldBehavior[]>(
135
- "google.api.field_behavior",
136
- FieldOptions,
137
- () => ({ no: 1052, kind: "enum", T: proto3.getEnumType(FieldBehavior), repeated: true }),
138
- );
137
+ export const field_behavior: GenExtension<FieldOptions, FieldBehavior[]> = /*@__PURE__*/
138
+ extDesc(file_google_api_field_behavior, 0);
139
139
 
@@ -12,13 +12,19 @@
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
 
15
- // @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=none"
15
+ // @generated by protoc-gen-es v2.6.2 with parameter "target=ts,import_extension=none"
16
16
  // @generated from file google/api/http.proto (package google.api, syntax proto3)
17
17
  /* eslint-disable */
18
- // @ts-nocheck
19
18
 
20
- import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
- import { Message, proto3 } from "@bufbuild/protobuf";
19
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
20
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
21
+ import type { Message } from "@bufbuild/protobuf";
22
+
23
+ /**
24
+ * Describes the file google/api/http.proto.
25
+ */
26
+ export const file_google_api_http: GenFile = /*@__PURE__*/
27
+ fileDesc("ChVnb29nbGUvYXBpL2h0dHAucHJvdG8SCmdvb2dsZS5hcGkiVAoESHR0cBIjCgVydWxlcxgBIAMoCzIULmdvb2dsZS5hcGkuSHR0cFJ1bGUSJwofZnVsbHlfZGVjb2RlX3Jlc2VydmVkX2V4cGFuc2lvbhgCIAEoCCKBAgoISHR0cFJ1bGUSEAoIc2VsZWN0b3IYASABKAkSDQoDZ2V0GAIgASgJSAASDQoDcHV0GAMgASgJSAASDgoEcG9zdBgEIAEoCUgAEhAKBmRlbGV0ZRgFIAEoCUgAEg8KBXBhdGNoGAYgASgJSAASLwoGY3VzdG9tGAggASgLMh0uZ29vZ2xlLmFwaS5DdXN0b21IdHRwUGF0dGVybkgAEgwKBGJvZHkYByABKAkSFQoNcmVzcG9uc2VfYm9keRgMIAEoCRIxChNhZGRpdGlvbmFsX2JpbmRpbmdzGAsgAygLMhQuZ29vZ2xlLmFwaS5IdHRwUnVsZUIJCgdwYXR0ZXJuIi8KEUN1c3RvbUh0dHBQYXR0ZXJuEgwKBGtpbmQYASABKAkSDAoEcGF0aBgCIAEoCUJqCg5jb20uZ29vZ2xlLmFwaUIJSHR0cFByb3RvUAFaQWdvb2dsZS5nb2xhbmcub3JnL2dlbnByb3RvL2dvb2dsZWFwaXMvYXBpL2Fubm90YXRpb25zO2Fubm90YXRpb25z+AEBogIER0FQSWIGcHJvdG8z");
22
28
 
23
29
  /**
24
30
  * Defines the HTTP configuration for an API service. It contains a list of
@@ -27,7 +33,7 @@ import { Message, proto3 } from "@bufbuild/protobuf";
27
33
  *
28
34
  * @generated from message google.api.Http
29
35
  */
30
- export class Http extends Message<Http> {
36
+ export type Http = Message<"google.api.Http"> & {
31
37
  /**
32
38
  * A list of HTTP configuration rules that apply to individual API methods.
33
39
  *
@@ -35,7 +41,7 @@ export class Http extends Message<Http> {
35
41
  *
36
42
  * @generated from field: repeated google.api.HttpRule rules = 1;
37
43
  */
38
- rules: HttpRule[] = [];
44
+ rules: HttpRule[];
39
45
 
40
46
  /**
41
47
  * When set to true, URL path parameters will be fully URI-decoded except in
@@ -47,36 +53,15 @@ export class Http extends Message<Http> {
47
53
  *
48
54
  * @generated from field: bool fully_decode_reserved_expansion = 2;
49
55
  */
50
- fullyDecodeReservedExpansion = false;
51
-
52
- constructor(data?: PartialMessage<Http>) {
53
- super();
54
- proto3.util.initPartial(data, this);
55
- }
56
-
57
- static readonly runtime: typeof proto3 = proto3;
58
- static readonly typeName = "google.api.Http";
59
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
60
- { no: 1, name: "rules", kind: "message", T: HttpRule, repeated: true },
61
- { no: 2, name: "fully_decode_reserved_expansion", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
62
- ]);
63
-
64
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Http {
65
- return new Http().fromBinary(bytes, options);
66
- }
56
+ fullyDecodeReservedExpansion: boolean;
57
+ };
67
58
 
68
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Http {
69
- return new Http().fromJson(jsonValue, options);
70
- }
71
-
72
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Http {
73
- return new Http().fromJsonString(jsonString, options);
74
- }
75
-
76
- static equals(a: Http | PlainMessage<Http> | undefined, b: Http | PlainMessage<Http> | undefined): boolean {
77
- return proto3.util.equals(Http, a, b);
78
- }
79
- }
59
+ /**
60
+ * Describes the message google.api.Http.
61
+ * Use `create(HttpSchema)` to create a new message.
62
+ */
63
+ export const HttpSchema: GenMessage<Http> = /*@__PURE__*/
64
+ messageDesc(file_google_api_http, 0);
80
65
 
81
66
  /**
82
67
  * # gRPC Transcoding
@@ -354,7 +339,7 @@ export class Http extends Message<Http> {
354
339
  *
355
340
  * @generated from message google.api.HttpRule
356
341
  */
357
- export class HttpRule extends Message<HttpRule> {
342
+ export type HttpRule = Message<"google.api.HttpRule"> & {
358
343
  /**
359
344
  * Selects a method to which this rule applies.
360
345
  *
@@ -363,7 +348,7 @@ export class HttpRule extends Message<HttpRule> {
363
348
  *
364
349
  * @generated from field: string selector = 1;
365
350
  */
366
- selector = "";
351
+ selector: string;
367
352
 
368
353
  /**
369
354
  * Determines the URL pattern is matched by this rules. This pattern can be
@@ -424,7 +409,7 @@ export class HttpRule extends Message<HttpRule> {
424
409
  */
425
410
  value: CustomHttpPattern;
426
411
  case: "custom";
427
- } | { case: undefined; value?: undefined } = { case: undefined };
412
+ } | { case: undefined; value?: undefined };
428
413
 
429
414
  /**
430
415
  * The name of the request field whose value is mapped to the HTTP request
@@ -436,7 +421,7 @@ export class HttpRule extends Message<HttpRule> {
436
421
  *
437
422
  * @generated from field: string body = 7;
438
423
  */
439
- body = "";
424
+ body: string;
440
425
 
441
426
  /**
442
427
  * Optional. The name of the response field whose value is mapped to the HTTP
@@ -448,7 +433,7 @@ export class HttpRule extends Message<HttpRule> {
448
433
  *
449
434
  * @generated from field: string response_body = 12;
450
435
  */
451
- responseBody = "";
436
+ responseBody: string;
452
437
 
453
438
  /**
454
439
  * Additional HTTP bindings for the selector. Nested bindings must
@@ -457,91 +442,41 @@ export class HttpRule extends Message<HttpRule> {
457
442
  *
458
443
  * @generated from field: repeated google.api.HttpRule additional_bindings = 11;
459
444
  */
460
- additionalBindings: HttpRule[] = [];
461
-
462
- constructor(data?: PartialMessage<HttpRule>) {
463
- super();
464
- proto3.util.initPartial(data, this);
465
- }
466
-
467
- static readonly runtime: typeof proto3 = proto3;
468
- static readonly typeName = "google.api.HttpRule";
469
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
470
- { no: 1, name: "selector", kind: "scalar", T: 9 /* ScalarType.STRING */ },
471
- { no: 2, name: "get", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
472
- { no: 3, name: "put", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
473
- { no: 4, name: "post", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
474
- { no: 5, name: "delete", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
475
- { no: 6, name: "patch", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "pattern" },
476
- { no: 8, name: "custom", kind: "message", T: CustomHttpPattern, oneof: "pattern" },
477
- { no: 7, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
478
- { no: 12, name: "response_body", kind: "scalar", T: 9 /* ScalarType.STRING */ },
479
- { no: 11, name: "additional_bindings", kind: "message", T: HttpRule, repeated: true },
480
- ]);
445
+ additionalBindings: HttpRule[];
446
+ };
481
447
 
482
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HttpRule {
483
- return new HttpRule().fromBinary(bytes, options);
484
- }
485
-
486
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HttpRule {
487
- return new HttpRule().fromJson(jsonValue, options);
488
- }
489
-
490
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HttpRule {
491
- return new HttpRule().fromJsonString(jsonString, options);
492
- }
493
-
494
- static equals(a: HttpRule | PlainMessage<HttpRule> | undefined, b: HttpRule | PlainMessage<HttpRule> | undefined): boolean {
495
- return proto3.util.equals(HttpRule, a, b);
496
- }
497
- }
448
+ /**
449
+ * Describes the message google.api.HttpRule.
450
+ * Use `create(HttpRuleSchema)` to create a new message.
451
+ */
452
+ export const HttpRuleSchema: GenMessage<HttpRule> = /*@__PURE__*/
453
+ messageDesc(file_google_api_http, 1);
498
454
 
499
455
  /**
500
456
  * A custom pattern is used for defining custom HTTP verb.
501
457
  *
502
458
  * @generated from message google.api.CustomHttpPattern
503
459
  */
504
- export class CustomHttpPattern extends Message<CustomHttpPattern> {
460
+ export type CustomHttpPattern = Message<"google.api.CustomHttpPattern"> & {
505
461
  /**
506
462
  * The name of this custom HTTP verb.
507
463
  *
508
464
  * @generated from field: string kind = 1;
509
465
  */
510
- kind = "";
466
+ kind: string;
511
467
 
512
468
  /**
513
469
  * The path matched by this custom verb.
514
470
  *
515
471
  * @generated from field: string path = 2;
516
472
  */
517
- path = "";
518
-
519
- constructor(data?: PartialMessage<CustomHttpPattern>) {
520
- super();
521
- proto3.util.initPartial(data, this);
522
- }
473
+ path: string;
474
+ };
523
475
 
524
- static readonly runtime: typeof proto3 = proto3;
525
- static readonly typeName = "google.api.CustomHttpPattern";
526
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
527
- { no: 1, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ },
528
- { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
529
- ]);
530
-
531
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CustomHttpPattern {
532
- return new CustomHttpPattern().fromBinary(bytes, options);
533
- }
534
-
535
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CustomHttpPattern {
536
- return new CustomHttpPattern().fromJson(jsonValue, options);
537
- }
538
-
539
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CustomHttpPattern {
540
- return new CustomHttpPattern().fromJsonString(jsonString, options);
541
- }
542
-
543
- static equals(a: CustomHttpPattern | PlainMessage<CustomHttpPattern> | undefined, b: CustomHttpPattern | PlainMessage<CustomHttpPattern> | undefined): boolean {
544
- return proto3.util.equals(CustomHttpPattern, a, b);
545
- }
546
- }
476
+ /**
477
+ * Describes the message google.api.CustomHttpPattern.
478
+ * Use `create(CustomHttpPatternSchema)` to create a new message.
479
+ */
480
+ export const CustomHttpPatternSchema: GenMessage<CustomHttpPattern> = /*@__PURE__*/
481
+ messageDesc(file_google_api_http, 2);
547
482
 
@@ -12,13 +12,21 @@
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
 
15
- // @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=none"
15
+ // @generated by protoc-gen-es v2.6.2 with parameter "target=ts,import_extension=none"
16
16
  // @generated from file google/api/httpbody.proto (package google.api, syntax proto3)
17
17
  /* eslint-disable */
18
- // @ts-nocheck
19
18
 
20
- import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
- import { Any, Message, proto3 } from "@bufbuild/protobuf";
19
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
20
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
21
+ import type { Any } from "@bufbuild/protobuf/wkt";
22
+ import { file_google_protobuf_any } from "@bufbuild/protobuf/wkt";
23
+ import type { Message } from "@bufbuild/protobuf";
24
+
25
+ /**
26
+ * Describes the file google/api/httpbody.proto.
27
+ */
28
+ export const file_google_api_httpbody: GenFile = /*@__PURE__*/
29
+ fileDesc("Chlnb29nbGUvYXBpL2h0dHBib2R5LnByb3RvEgpnb29nbGUuYXBpIlgKCEh0dHBCb2R5EhQKDGNvbnRlbnRfdHlwZRgBIAEoCRIMCgRkYXRhGAIgASgMEigKCmV4dGVuc2lvbnMYAyADKAsyFC5nb29nbGUucHJvdG9idWYuQW55QmgKDmNvbS5nb29nbGUuYXBpQg1IdHRwQm9keVByb3RvUAFaO2dvb2dsZS5nb2xhbmcub3JnL2dlbnByb3RvL2dvb2dsZWFwaXMvYXBpL2h0dHBib2R5O2h0dHBib2R5+AEBogIER0FQSWIGcHJvdG8z", [file_google_protobuf_any]);
22
30
 
23
31
  /**
24
32
  * Message that represents an arbitrary HTTP body. It should only be used for
@@ -67,20 +75,20 @@ import { Any, Message, proto3 } from "@bufbuild/protobuf";
67
75
  *
68
76
  * @generated from message google.api.HttpBody
69
77
  */
70
- export class HttpBody extends Message<HttpBody> {
78
+ export type HttpBody = Message<"google.api.HttpBody"> & {
71
79
  /**
72
80
  * The HTTP Content-Type header value specifying the content type of the body.
73
81
  *
74
82
  * @generated from field: string content_type = 1;
75
83
  */
76
- contentType = "";
84
+ contentType: string;
77
85
 
78
86
  /**
79
87
  * The HTTP request/response body as raw binary.
80
88
  *
81
89
  * @generated from field: bytes data = 2;
82
90
  */
83
- data = new Uint8Array(0);
91
+ data: Uint8Array;
84
92
 
85
93
  /**
86
94
  * Application specific response metadata. Must be set in the first response
@@ -88,35 +96,13 @@ export class HttpBody extends Message<HttpBody> {
88
96
  *
89
97
  * @generated from field: repeated google.protobuf.Any extensions = 3;
90
98
  */
91
- extensions: Any[] = [];
92
-
93
- constructor(data?: PartialMessage<HttpBody>) {
94
- super();
95
- proto3.util.initPartial(data, this);
96
- }
97
-
98
- static readonly runtime: typeof proto3 = proto3;
99
- static readonly typeName = "google.api.HttpBody";
100
- static readonly fields: FieldList = proto3.util.newFieldList(() => [
101
- { no: 1, name: "content_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
102
- { no: 2, name: "data", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
103
- { no: 3, name: "extensions", kind: "message", T: Any, repeated: true },
104
- ]);
99
+ extensions: Any[];
100
+ };
105
101
 
106
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): HttpBody {
107
- return new HttpBody().fromBinary(bytes, options);
108
- }
109
-
110
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): HttpBody {
111
- return new HttpBody().fromJson(jsonValue, options);
112
- }
113
-
114
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): HttpBody {
115
- return new HttpBody().fromJsonString(jsonString, options);
116
- }
117
-
118
- static equals(a: HttpBody | PlainMessage<HttpBody> | undefined, b: HttpBody | PlainMessage<HttpBody> | undefined): boolean {
119
- return proto3.util.equals(HttpBody, a, b);
120
- }
121
- }
102
+ /**
103
+ * Describes the message google.api.HttpBody.
104
+ * Use `create(HttpBodySchema)` to create a new message.
105
+ */
106
+ export const HttpBodySchema: GenMessage<HttpBody> = /*@__PURE__*/
107
+ messageDesc(file_google_api_httpbody, 0);
122
108
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raystack/proton",
3
- "version": "0.1.0-ce225175aa066e6f296bc489293bb83ed0edcef6",
3
+ "version": "0.1.0-fe747c0278b08e54b16540b091d980d1b166f948",
4
4
  "description": "TypeScript/JavaScript client library for Raystack APIs generated from Protocol Buffer definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,9 +32,11 @@
32
32
  "author": "Raystack",
33
33
  "license": "Apache-2.0",
34
34
  "dependencies": {
35
- "@bufbuild/protobuf": "^1.6.0",
36
- "@connectrpc/connect": "^1.2.0",
37
- "@connectrpc/connect-query": "^1.2.0"
35
+ "@bufbuild/protobuf": "^2.6.2",
36
+ "@connectrpc/connect": "^2.0.3",
37
+ "@connectrpc/connect-query": "^2.1.1",
38
+ "@protobuf-ts/runtime": "^2.11.1",
39
+ "@protobuf-ts/runtime-rpc": "^2.11.1"
38
40
  },
39
41
  "peerDependencies": {
40
42
  "@tanstack/react-query": "^5.0.0"
@@ -1,10 +1,19 @@
1
- // @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=none"
1
+ // @generated by protoc-gen-es v2.6.2 with parameter "target=ts,import_extension=none"
2
2
  // @generated from file protoc-gen-openapiv2/options/annotations.proto (package grpc.gateway.protoc_gen_openapiv2.options, syntax proto3)
3
3
  /* eslint-disable */
4
- // @ts-nocheck
5
4
 
6
- import { FieldOptions, FileOptions, MessageOptions, MethodOptions, proto3, ServiceOptions } from "@bufbuild/protobuf";
7
- import { JSONSchema, Operation, Schema, Swagger, Tag } from "./openapiv2_pb";
5
+ import type { GenExtension, GenFile } from "@bufbuild/protobuf/codegenv2";
6
+ import { extDesc, fileDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import type { FieldOptions, FileOptions, MessageOptions, MethodOptions, ServiceOptions } from "@bufbuild/protobuf/wkt";
8
+ import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt";
9
+ import type { JSONSchema, Operation, Schema, Swagger, Tag } from "./openapiv2_pb";
10
+ import { file_protoc_gen_openapiv2_options_openapiv2 } from "./openapiv2_pb";
11
+
12
+ /**
13
+ * Describes the file protoc-gen-openapiv2/options/annotations.proto.
14
+ */
15
+ export const file_protoc_gen_openapiv2_options_annotations: GenFile = /*@__PURE__*/
16
+ fileDesc("Ci5wcm90b2MtZ2VuLW9wZW5hcGl2Mi9vcHRpb25zL2Fubm90YXRpb25zLnByb3RvEilncnBjLmdhdGV3YXkucHJvdG9jX2dlbl9vcGVuYXBpdjIub3B0aW9uczp+ChFvcGVuYXBpdjJfc3dhZ2dlchIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxiSCCABKAsyMi5ncnBjLmdhdGV3YXkucHJvdG9jX2dlbl9vcGVuYXBpdjIub3B0aW9ucy5Td2FnZ2VyUhBvcGVuYXBpdjJTd2FnZ2VyOoYBChNvcGVuYXBpdjJfb3BlcmF0aW9uEh4uZ29vZ2xlLnByb3RvYnVmLk1ldGhvZE9wdGlvbnMYkgggASgLMjQuZ3JwYy5nYXRld2F5LnByb3RvY19nZW5fb3BlbmFwaXYyLm9wdGlvbnMuT3BlcmF0aW9uUhJvcGVuYXBpdjJPcGVyYXRpb246fgoQb3BlbmFwaXYyX3NjaGVtYRIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9ucxiSCCABKAsyMS5ncnBjLmdhdGV3YXkucHJvdG9jX2dlbl9vcGVuYXBpdjIub3B0aW9ucy5TY2hlbWFSD29wZW5hcGl2MlNjaGVtYTp1Cg1vcGVuYXBpdjJfdGFnEh8uZ29vZ2xlLnByb3RvYnVmLlNlcnZpY2VPcHRpb25zGJIIIAEoCzIuLmdycGMuZ2F0ZXdheS5wcm90b2NfZ2VuX29wZW5hcGl2Mi5vcHRpb25zLlRhZ1IMb3BlbmFwaXYyVGFnOn4KD29wZW5hcGl2Ml9maWVsZBIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMYkgggASgLMjUuZ3JwYy5nYXRld2F5LnByb3RvY19nZW5fb3BlbmFwaXYyLm9wdGlvbnMuSlNPTlNjaGVtYVIOb3BlbmFwaXYyRmllbGRCSFpGZ2l0aHViLmNvbS9ncnBjLWVjb3N5c3RlbS9ncnBjLWdhdGV3YXkvdjIvcHJvdG9jLWdlbi1vcGVuYXBpdjIvb3B0aW9uc2IGcHJvdG8z", [file_google_protobuf_descriptor, file_protoc_gen_openapiv2_options_openapiv2]);
8
17
 
9
18
  /**
10
19
  * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
@@ -14,11 +23,8 @@ import { JSONSchema, Operation, Schema, Swagger, Tag } from "./openapiv2_pb";
14
23
  *
15
24
  * @generated from extension: grpc.gateway.protoc_gen_openapiv2.options.Swagger openapiv2_swagger = 1042;
16
25
  */
17
- export const openapiv2_swagger = proto3.makeExtension<FileOptions, Swagger>(
18
- "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger",
19
- FileOptions,
20
- () => ({ no: 1042, kind: "message", T: Swagger }),
21
- );
26
+ export const openapiv2_swagger: GenExtension<FileOptions, Swagger> = /*@__PURE__*/
27
+ extDesc(file_protoc_gen_openapiv2_options_annotations, 0);
22
28
 
23
29
  /**
24
30
  * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
@@ -28,11 +34,8 @@ export const openapiv2_swagger = proto3.makeExtension<FileOptions, Swagger>(
28
34
  *
29
35
  * @generated from extension: grpc.gateway.protoc_gen_openapiv2.options.Operation openapiv2_operation = 1042;
30
36
  */
31
- export const openapiv2_operation = proto3.makeExtension<MethodOptions, Operation>(
32
- "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation",
33
- MethodOptions,
34
- () => ({ no: 1042, kind: "message", T: Operation }),
35
- );
37
+ export const openapiv2_operation: GenExtension<MethodOptions, Operation> = /*@__PURE__*/
38
+ extDesc(file_protoc_gen_openapiv2_options_annotations, 1);
36
39
 
37
40
  /**
38
41
  * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
@@ -42,11 +45,8 @@ export const openapiv2_operation = proto3.makeExtension<MethodOptions, Operation
42
45
  *
43
46
  * @generated from extension: grpc.gateway.protoc_gen_openapiv2.options.Schema openapiv2_schema = 1042;
44
47
  */
45
- export const openapiv2_schema = proto3.makeExtension<MessageOptions, Schema>(
46
- "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema",
47
- MessageOptions,
48
- () => ({ no: 1042, kind: "message", T: Schema }),
49
- );
48
+ export const openapiv2_schema: GenExtension<MessageOptions, Schema> = /*@__PURE__*/
49
+ extDesc(file_protoc_gen_openapiv2_options_annotations, 2);
50
50
 
51
51
  /**
52
52
  * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
@@ -56,11 +56,8 @@ export const openapiv2_schema = proto3.makeExtension<MessageOptions, Schema>(
56
56
  *
57
57
  * @generated from extension: grpc.gateway.protoc_gen_openapiv2.options.Tag openapiv2_tag = 1042;
58
58
  */
59
- export const openapiv2_tag = proto3.makeExtension<ServiceOptions, Tag>(
60
- "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag",
61
- ServiceOptions,
62
- () => ({ no: 1042, kind: "message", T: Tag }),
63
- );
59
+ export const openapiv2_tag: GenExtension<ServiceOptions, Tag> = /*@__PURE__*/
60
+ extDesc(file_protoc_gen_openapiv2_options_annotations, 3);
64
61
 
65
62
  /**
66
63
  * ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
@@ -70,9 +67,6 @@ export const openapiv2_tag = proto3.makeExtension<ServiceOptions, Tag>(
70
67
  *
71
68
  * @generated from extension: grpc.gateway.protoc_gen_openapiv2.options.JSONSchema openapiv2_field = 1042;
72
69
  */
73
- export const openapiv2_field = proto3.makeExtension<FieldOptions, JSONSchema>(
74
- "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field",
75
- FieldOptions,
76
- () => ({ no: 1042, kind: "message", T: JSONSchema }),
77
- );
70
+ export const openapiv2_field: GenExtension<FieldOptions, JSONSchema> = /*@__PURE__*/
71
+ extDesc(file_protoc_gen_openapiv2_options_annotations, 4);
78
72