@thru/thru-sdk 0.0.4

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 (63) hide show
  1. package/README.md +7 -0
  2. package/buf.gen.yaml +12 -0
  3. package/buf.lock +9 -0
  4. package/buf.yaml +15 -0
  5. package/dist/sdk.d.ts +1354 -0
  6. package/dist/sdk.js +1130 -0
  7. package/dist/sdk.js.map +1 -0
  8. package/package.json +39 -0
  9. package/proto/thru/common/v1/consensus.proto +75 -0
  10. package/proto/thru/common/v1/errors.proto +67 -0
  11. package/proto/thru/common/v1/filters.proto +50 -0
  12. package/proto/thru/common/v1/pagination.proto +47 -0
  13. package/proto/thru/core/v1/account.proto +138 -0
  14. package/proto/thru/core/v1/block.proto +82 -0
  15. package/proto/thru/core/v1/state.proto +37 -0
  16. package/proto/thru/core/v1/transaction.proto +95 -0
  17. package/proto/thru/core/v1/types.proto +52 -0
  18. package/proto/thru/services/v1/command_service.proto +45 -0
  19. package/proto/thru/services/v1/query_service.proto +344 -0
  20. package/proto/thru/services/v1/streaming_service.proto +128 -0
  21. package/thru-ts-client-sdk/core/bound-client.ts +129 -0
  22. package/thru-ts-client-sdk/core/client.ts +38 -0
  23. package/thru-ts-client-sdk/counter.ts +216 -0
  24. package/thru-ts-client-sdk/create-account.ts +78 -0
  25. package/thru-ts-client-sdk/defaults.ts +17 -0
  26. package/thru-ts-client-sdk/get-height.ts +52 -0
  27. package/thru-ts-client-sdk/modules/accounts.ts +137 -0
  28. package/thru-ts-client-sdk/modules/blocks.ts +75 -0
  29. package/thru-ts-client-sdk/modules/events.ts +20 -0
  30. package/thru-ts-client-sdk/modules/height.ts +9 -0
  31. package/thru-ts-client-sdk/modules/helpers.ts +340 -0
  32. package/thru-ts-client-sdk/modules/proofs.ts +20 -0
  33. package/thru-ts-client-sdk/modules/streaming.ts +34 -0
  34. package/thru-ts-client-sdk/modules/transactions.ts +274 -0
  35. package/thru-ts-client-sdk/proto/buf/validate/validate_pb.ts +4761 -0
  36. package/thru-ts-client-sdk/proto/google/api/annotations_pb.ts +39 -0
  37. package/thru-ts-client-sdk/proto/google/api/client_pb.ts +953 -0
  38. package/thru-ts-client-sdk/proto/google/api/field_behavior_pb.ts +157 -0
  39. package/thru-ts-client-sdk/proto/google/api/http_pb.ts +474 -0
  40. package/thru-ts-client-sdk/proto/google/api/launch_stage_pb.ts +118 -0
  41. package/thru-ts-client-sdk/proto/thru/common/v1/consensus_pb.ts +163 -0
  42. package/thru-ts-client-sdk/proto/thru/common/v1/errors_pb.ts +130 -0
  43. package/thru-ts-client-sdk/proto/thru/common/v1/filters_pb.ts +81 -0
  44. package/thru-ts-client-sdk/proto/thru/common/v1/pagination_pb.ts +80 -0
  45. package/thru-ts-client-sdk/proto/thru/core/v1/account_pb.ts +358 -0
  46. package/thru-ts-client-sdk/proto/thru/core/v1/block_pb.ts +260 -0
  47. package/thru-ts-client-sdk/proto/thru/core/v1/state_pb.ts +104 -0
  48. package/thru-ts-client-sdk/proto/thru/core/v1/transaction_pb.ts +327 -0
  49. package/thru-ts-client-sdk/proto/thru/core/v1/types_pb.ts +101 -0
  50. package/thru-ts-client-sdk/proto/thru/services/v1/command_service_pb.ts +81 -0
  51. package/thru-ts-client-sdk/proto/thru/services/v1/query_service_pb.ts +813 -0
  52. package/thru-ts-client-sdk/proto/thru/services/v1/streaming_service_pb.ts +391 -0
  53. package/thru-ts-client-sdk/sdk.ts +58 -0
  54. package/thru-ts-client-sdk/transactions/Transaction.ts +240 -0
  55. package/thru-ts-client-sdk/transactions/TransactionBuilder.ts +48 -0
  56. package/thru-ts-client-sdk/transactions/__tests__/transaction.test.ts +95 -0
  57. package/thru-ts-client-sdk/transactions/index.ts +3 -0
  58. package/thru-ts-client-sdk/transactions/types.ts +64 -0
  59. package/thru-ts-client-sdk/transactions/utils.ts +134 -0
  60. package/thru-ts-client-sdk/types/types.ts +8 -0
  61. package/thru-ts-client-sdk/utils/utils.ts +70 -0
  62. package/tsconfig.json +9 -0
  63. package/tsup.config.ts +10 -0
@@ -0,0 +1,118 @@
1
+ // Copyright 2025 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
16
+ // @generated from file google/api/launch_stage.proto (package google.api, syntax proto3)
17
+ /* eslint-disable */
18
+
19
+ import type { GenEnum, GenFile } from "@bufbuild/protobuf/codegenv2";
20
+ import { enumDesc, fileDesc } from "@bufbuild/protobuf/codegenv2";
21
+
22
+ /**
23
+ * Describes the file google/api/launch_stage.proto.
24
+ */
25
+ export const file_google_api_launch_stage: GenFile = /*@__PURE__*/
26
+ fileDesc("Ch1nb29nbGUvYXBpL2xhdW5jaF9zdGFnZS5wcm90bxIKZ29vZ2xlLmFwaSqMAQoLTGF1bmNoU3RhZ2USHAoYTEFVTkNIX1NUQUdFX1VOU1BFQ0lGSUVEEAASEQoNVU5JTVBMRU1FTlRFRBAGEg0KCVBSRUxBVU5DSBAHEhAKDEVBUkxZX0FDQ0VTUxABEgkKBUFMUEhBEAISCAoEQkVUQRADEgYKAkdBEAQSDgoKREVQUkVDQVRFRBAFQpoBCg5jb20uZ29vZ2xlLmFwaUIQTGF1bmNoU3RhZ2VQcm90b1ABWi1nb29nbGUuZ29sYW5nLm9yZy9nZW5wcm90by9nb29nbGVhcGlzL2FwaTthcGmiAgNHQViqAgpHb29nbGUuQXBpygIKR29vZ2xlXEFwaeICFkdvb2dsZVxBcGlcR1BCTWV0YWRhdGHqAgtHb29nbGU6OkFwaWIGcHJvdG8z");
27
+
28
+ /**
29
+ * The launch stage as defined by [Google Cloud Platform
30
+ * Launch Stages](https://cloud.google.com/terms/launch-stages).
31
+ *
32
+ * @generated from enum google.api.LaunchStage
33
+ */
34
+ export enum LaunchStage {
35
+ /**
36
+ * Do not use this default value.
37
+ *
38
+ * @generated from enum value: LAUNCH_STAGE_UNSPECIFIED = 0;
39
+ */
40
+ LAUNCH_STAGE_UNSPECIFIED = 0,
41
+
42
+ /**
43
+ * The feature is not yet implemented. Users can not use it.
44
+ *
45
+ * @generated from enum value: UNIMPLEMENTED = 6;
46
+ */
47
+ UNIMPLEMENTED = 6,
48
+
49
+ /**
50
+ * Prelaunch features are hidden from users and are only visible internally.
51
+ *
52
+ * @generated from enum value: PRELAUNCH = 7;
53
+ */
54
+ PRELAUNCH = 7,
55
+
56
+ /**
57
+ * Early Access features are limited to a closed group of testers. To use
58
+ * these features, you must sign up in advance and sign a Trusted Tester
59
+ * agreement (which includes confidentiality provisions). These features may
60
+ * be unstable, changed in backward-incompatible ways, and are not
61
+ * guaranteed to be released.
62
+ *
63
+ * @generated from enum value: EARLY_ACCESS = 1;
64
+ */
65
+ EARLY_ACCESS = 1,
66
+
67
+ /**
68
+ * Alpha is a limited availability test for releases before they are cleared
69
+ * for widespread use. By Alpha, all significant design issues are resolved
70
+ * and we are in the process of verifying functionality. Alpha customers
71
+ * need to apply for access, agree to applicable terms, and have their
72
+ * projects allowlisted. Alpha releases don't have to be feature complete,
73
+ * no SLAs are provided, and there are no technical support obligations, but
74
+ * they will be far enough along that customers can actually use them in
75
+ * test environments or for limited-use tests -- just like they would in
76
+ * normal production cases.
77
+ *
78
+ * @generated from enum value: ALPHA = 2;
79
+ */
80
+ ALPHA = 2,
81
+
82
+ /**
83
+ * Beta is the point at which we are ready to open a release for any
84
+ * customer to use. There are no SLA or technical support obligations in a
85
+ * Beta release. Products will be complete from a feature perspective, but
86
+ * may have some open outstanding issues. Beta releases are suitable for
87
+ * limited production use cases.
88
+ *
89
+ * @generated from enum value: BETA = 3;
90
+ */
91
+ BETA = 3,
92
+
93
+ /**
94
+ * GA features are open to all developers and are considered stable and
95
+ * fully qualified for production use.
96
+ *
97
+ * @generated from enum value: GA = 4;
98
+ */
99
+ GA = 4,
100
+
101
+ /**
102
+ * Deprecated features are scheduled to be shut down and removed. For more
103
+ * information, see the "Deprecation Policy" section of our [Terms of
104
+ * Service](https://cloud.google.com/terms/)
105
+ * and the [Google Cloud Platform Subject to the Deprecation
106
+ * Policy](https://cloud.google.com/terms/deprecation) documentation.
107
+ *
108
+ * @generated from enum value: DEPRECATED = 5;
109
+ */
110
+ DEPRECATED = 5,
111
+ }
112
+
113
+ /**
114
+ * Describes the enum google.api.LaunchStage.
115
+ */
116
+ export const LaunchStageSchema: GenEnum<LaunchStage> = /*@__PURE__*/
117
+ enumDesc(file_google_api_launch_stage, 0);
118
+
@@ -0,0 +1,163 @@
1
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
2
+ // @generated from file thru/common/v1/consensus.proto (package thru.common.v1, edition 2023)
3
+ // option features.field_presence = EXPLICIT;
4
+ /* eslint-disable */
5
+
6
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
7
+ import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
8
+ import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
9
+ import { file_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
10
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
11
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
12
+ import type { Message } from "@bufbuild/protobuf";
13
+
14
+ /**
15
+ * Describes the file thru/common/v1/consensus.proto.
16
+ */
17
+ export const file_thru_common_v1_consensus: GenFile = /*@__PURE__*/
18
+ fileDesc("Ch50aHJ1L2NvbW1vbi92MS9jb25zZW5zdXMucHJvdG8SDnRocnUuY29tbW9uLnYxIoIDCg5WZXJzaW9uQ29udGV4dBI2CgdjdXJyZW50GAEgASgLMh4udGhydS5jb21tb24udjEuQ3VycmVudFZlcnNpb25CA+BBAUgAEk4KE2N1cnJlbnRPckhpc3RvcmljYWwYAiABKAsyKi50aHJ1LmNvbW1vbi52MS5DdXJyZW50T3JIaXN0b3JpY2FsVmVyc2lvbkID4EEBSAASEwoEc2xvdBgDIAEoBEID4EEBSAASNAoJdGltZXN0YW1wGAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEBSAA6kQG6SI0BGooBChx2ZXJzaW9uX2NvbnRleHRfaGFzX3NlbGVjdG9yEi5vbmUgb2YgY3VycmVudCwgc2xvdCwgb3IgdGltZXN0YW1wIG11c3QgYmUgc2V0GjpoYXModGhpcy5jdXJyZW50KSB8fCBoYXModGhpcy5zbG90KSB8fCBoYXModGhpcy50aW1lc3RhbXApQgkKB3ZlcnNpb24iEAoOQ3VycmVudFZlcnNpb24iHAoaQ3VycmVudE9ySGlzdG9yaWNhbFZlcnNpb24q3wEKD0NvbnNlbnN1c1N0YXR1cxIgChxDT05TRU5TVVNfU1RBVFVTX1VOU1BFQ0lGSUVEEAASHQoZQ09OU0VOU1VTX1NUQVRVU19PQlNFUlZFRBABEh0KGUNPTlNFTlNVU19TVEFUVVNfSU5DTFVERUQQAhIeChpDT05TRU5TVVNfU1RBVFVTX0ZJTkFMSVpFRBADEiUKIUNPTlNFTlNVU19TVEFUVVNfTE9DQUxMWV9FWEVDVVRFRBAEEiUKIUNPTlNFTlNVU19TVEFUVVNfQ0xVU1RFUl9FWEVDVVRFRBAFQs8BChJjb20udGhydS5jb21tb24udjFCDkNvbnNlbnN1c1Byb3RvUAFaRGdpdGh1Yi5jb20vVW50by1MYWJzL3RocnUtbmV0L2dycGMvcGtnL3Byb3RvL3RocnUvY29tbW9uL3YxO2NvbW1vbnYxogIDVENYqgIOVGhydS5Db21tb24uVjG6AgNUSFXKAg5UaHJ1XENvbW1vblxWMeICGlRocnVcQ29tbW9uXFYxXEdQQk1ldGFkYXRh6gIQVGhydTo6Q29tbW9uOjpWMZIDAggBYghlZGl0aW9uc3DoBw", [file_buf_validate_validate, file_google_api_field_behavior, file_google_protobuf_timestamp]);
19
+
20
+ /**
21
+ * VersionContext selects which logical version of a resource should be
22
+ * returned. At least one field must be set.
23
+ *
24
+ * @generated from message thru.common.v1.VersionContext
25
+ */
26
+ export type VersionContext = Message<"thru.common.v1.VersionContext"> & {
27
+ /**
28
+ * Specifies the desired version semantics.
29
+ *
30
+ * @generated from oneof thru.common.v1.VersionContext.version
31
+ */
32
+ version: {
33
+ /**
34
+ * Request the latest version available at request time.
35
+ *
36
+ * @generated from field: thru.common.v1.CurrentVersion current = 1;
37
+ */
38
+ value: CurrentVersion;
39
+ case: "current";
40
+ } | {
41
+ /**
42
+ * Request the latest version, or historical on.
43
+ *
44
+ * @generated from field: thru.common.v1.CurrentOrHistoricalVersion currentOrHistorical = 2;
45
+ */
46
+ value: CurrentOrHistoricalVersion;
47
+ case: "currentOrHistorical";
48
+ } | {
49
+ /**
50
+ * Request the version for a specific slot number.
51
+ *
52
+ * @generated from field: uint64 slot = 3;
53
+ */
54
+ value: bigint;
55
+ case: "slot";
56
+ } | {
57
+ /**
58
+ * Request the version nearest to the provided block timestamp.
59
+ *
60
+ * @generated from field: google.protobuf.Timestamp timestamp = 4;
61
+ */
62
+ value: Timestamp;
63
+ case: "timestamp";
64
+ } | { case: undefined; value?: undefined };
65
+ };
66
+
67
+ /**
68
+ * Describes the message thru.common.v1.VersionContext.
69
+ * Use `create(VersionContextSchema)` to create a new message.
70
+ */
71
+ export const VersionContextSchema: GenMessage<VersionContext> = /*@__PURE__*/
72
+ messageDesc(file_thru_common_v1_consensus, 0);
73
+
74
+ /**
75
+ * CurrentVersion is an empty marker message for VersionContext.current.
76
+ *
77
+ * @generated from message thru.common.v1.CurrentVersion
78
+ */
79
+ export type CurrentVersion = Message<"thru.common.v1.CurrentVersion"> & {
80
+ };
81
+
82
+ /**
83
+ * Describes the message thru.common.v1.CurrentVersion.
84
+ * Use `create(CurrentVersionSchema)` to create a new message.
85
+ */
86
+ export const CurrentVersionSchema: GenMessage<CurrentVersion> = /*@__PURE__*/
87
+ messageDesc(file_thru_common_v1_consensus, 1);
88
+
89
+ /**
90
+ * CurrentOrHistoricalVersion is an empty marker message for VersionContext.current.
91
+ *
92
+ * @generated from message thru.common.v1.CurrentOrHistoricalVersion
93
+ */
94
+ export type CurrentOrHistoricalVersion = Message<"thru.common.v1.CurrentOrHistoricalVersion"> & {
95
+ };
96
+
97
+ /**
98
+ * Describes the message thru.common.v1.CurrentOrHistoricalVersion.
99
+ * Use `create(CurrentOrHistoricalVersionSchema)` to create a new message.
100
+ */
101
+ export const CurrentOrHistoricalVersionSchema: GenMessage<CurrentOrHistoricalVersion> = /*@__PURE__*/
102
+ messageDesc(file_thru_common_v1_consensus, 2);
103
+
104
+ /**
105
+ * ConsensusStatus represents the minimum consensus level a resource has
106
+ * achieved when returned by the service.
107
+ *
108
+ * @generated from enum thru.common.v1.ConsensusStatus
109
+ */
110
+ export enum ConsensusStatus {
111
+ /**
112
+ * CONSENSUS_STATUS_UNSPECIFIED indicates the consensus status is unknown.
113
+ *
114
+ * @generated from enum value: CONSENSUS_STATUS_UNSPECIFIED = 0;
115
+ */
116
+ UNSPECIFIED = 0,
117
+
118
+ /**
119
+ * CONSENSUS_STATUS_OBSERVED indicates the resource has been observed but
120
+ * not yet confirmed in a finalized block.
121
+ *
122
+ * @generated from enum value: CONSENSUS_STATUS_OBSERVED = 1;
123
+ */
124
+ OBSERVED = 1,
125
+
126
+ /**
127
+ * CONSENSUS_STATUS_INCLUDED indicates the resource has been included in the
128
+ * ledger but may not be finalized.
129
+ *
130
+ * @generated from enum value: CONSENSUS_STATUS_INCLUDED = 2;
131
+ */
132
+ INCLUDED = 2,
133
+
134
+ /**
135
+ * CONSENSUS_STATUS_FINALIZED indicates the resource is finalized for a slot.
136
+ *
137
+ * @generated from enum value: CONSENSUS_STATUS_FINALIZED = 3;
138
+ */
139
+ FINALIZED = 3,
140
+
141
+ /**
142
+ * CONSENSUS_STATUS_LOCALLY_EXECUTED indicates the local node executed the
143
+ * resource but broader cluster finality may not have been achieved.
144
+ *
145
+ * @generated from enum value: CONSENSUS_STATUS_LOCALLY_EXECUTED = 4;
146
+ */
147
+ LOCALLY_EXECUTED = 4,
148
+
149
+ /**
150
+ * CONSENSUS_STATUS_CLUSTER_EXECUTED indicates the entire cluster has
151
+ * executed and agreed on the resource.
152
+ *
153
+ * @generated from enum value: CONSENSUS_STATUS_CLUSTER_EXECUTED = 5;
154
+ */
155
+ CLUSTER_EXECUTED = 5,
156
+ }
157
+
158
+ /**
159
+ * Describes the enum thru.common.v1.ConsensusStatus.
160
+ */
161
+ export const ConsensusStatusSchema: GenEnum<ConsensusStatus> = /*@__PURE__*/
162
+ enumDesc(file_thru_common_v1_consensus, 0);
163
+
@@ -0,0 +1,130 @@
1
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
2
+ // @generated from file thru/common/v1/errors.proto (package thru.common.v1, edition 2023)
3
+ // option features.field_presence = EXPLICIT;
4
+ /* eslint-disable */
5
+
6
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
7
+ import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
8
+ import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
9
+ import { file_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
10
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
11
+ import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
12
+ import type { Message } from "@bufbuild/protobuf";
13
+
14
+ /**
15
+ * Describes the file thru/common/v1/errors.proto.
16
+ */
17
+ export const file_thru_common_v1_errors: GenFile = /*@__PURE__*/
18
+ fileDesc("Cht0aHJ1L2NvbW1vbi92MS9lcnJvcnMucHJvdG8SDnRocnUuY29tbW9uLnYxIuABCgtFcnJvckRldGFpbBIyCgplcnJvcl90eXBlGAEgASgOMhkudGhydS5jb21tb24udjEuRXJyb3JUeXBlQgPgQQISHAoHbWVzc2FnZRgCIAEoCUIL4EECukgFcgMYgAgSIwoWcmV0ZW50aW9uX3dpbmRvd19zbG90cxgDIAEoBEID4EEBEjkKEHJldGVudGlvbl9jdXRvZmYYBCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQESHwoKZmllbGRfbmFtZRgFIAEoCUIL4EEBukgFcgMYgAEq7QEKCUVycm9yVHlwZRIaChZFUlJPUl9UWVBFX1VOU1BFQ0lGSUVEEAASGAoURVJST1JfVFlQRV9OT1RfRk9VTkQQARIbChdFUlJPUl9UWVBFX05PVF9SRVRBSU5FRBACEigKJEVSUk9SX1RZUEVfTk9UX0ZPVU5EX09SX05PVF9SRVRBSU5FRBADEh4KGkVSUk9SX1RZUEVfSU5WQUxJRF9SRVFVRVNUEAQSJAogRVJST1JfVFlQRV9DRUxfVkFMSURBVElPTl9GQUlMRUQQBRIdChlFUlJPUl9UWVBFX0lOVEVSTkFMX0VSUk9SEAZCzAEKEmNvbS50aHJ1LmNvbW1vbi52MUILRXJyb3JzUHJvdG9QAVpEZ2l0aHViLmNvbS9VbnRvLUxhYnMvdGhydS1uZXQvZ3JwYy9wa2cvcHJvdG8vdGhydS9jb21tb24vdjE7Y29tbW9udjGiAgNUQ1iqAg5UaHJ1LkNvbW1vbi5WMboCA1RIVcoCDlRocnVcQ29tbW9uXFYx4gIaVGhydVxDb21tb25cVjFcR1BCTWV0YWRhdGHqAhBUaHJ1OjpDb21tb246OlYxkgMCCAFiCGVkaXRpb25zcOgH", [file_buf_validate_validate, file_google_api_field_behavior, file_google_protobuf_timestamp]);
19
+
20
+ /**
21
+ * ErrorDetail provides structured error metadata attached to gRPC errors.
22
+ *
23
+ * @generated from message thru.common.v1.ErrorDetail
24
+ */
25
+ export type ErrorDetail = Message<"thru.common.v1.ErrorDetail"> & {
26
+ /**
27
+ * High-level error category.
28
+ *
29
+ * @generated from field: thru.common.v1.ErrorType error_type = 1;
30
+ */
31
+ errorType: ErrorType;
32
+
33
+ /**
34
+ * Human-readable error summary.
35
+ *
36
+ * @generated from field: string message = 2;
37
+ */
38
+ message: string;
39
+
40
+ /**
41
+ * Optional retention window expressed in slots when applicable.
42
+ *
43
+ * @generated from field: uint64 retention_window_slots = 3;
44
+ */
45
+ retentionWindowSlots: bigint;
46
+
47
+ /**
48
+ * Optional retention cutoff timestamp when applicable.
49
+ *
50
+ * @generated from field: google.protobuf.Timestamp retention_cutoff = 4;
51
+ */
52
+ retentionCutoff?: Timestamp;
53
+
54
+ /**
55
+ * Optional name of the field associated with the error.
56
+ *
57
+ * @generated from field: string field_name = 5;
58
+ */
59
+ fieldName: string;
60
+ };
61
+
62
+ /**
63
+ * Describes the message thru.common.v1.ErrorDetail.
64
+ * Use `create(ErrorDetailSchema)` to create a new message.
65
+ */
66
+ export const ErrorDetailSchema: GenMessage<ErrorDetail> = /*@__PURE__*/
67
+ messageDesc(file_thru_common_v1_errors, 0);
68
+
69
+ /**
70
+ * ErrorType captures structured error categories returned by the services.
71
+ *
72
+ * @generated from enum thru.common.v1.ErrorType
73
+ */
74
+ export enum ErrorType {
75
+ /**
76
+ * ERROR_TYPE_UNSPECIFIED is an unknown error condition.
77
+ *
78
+ * @generated from enum value: ERROR_TYPE_UNSPECIFIED = 0;
79
+ */
80
+ UNSPECIFIED = 0,
81
+
82
+ /**
83
+ * ERROR_TYPE_NOT_FOUND indicates requested data does not exist.
84
+ *
85
+ * @generated from enum value: ERROR_TYPE_NOT_FOUND = 1;
86
+ */
87
+ NOT_FOUND = 1,
88
+
89
+ /**
90
+ * ERROR_TYPE_NOT_RETAINED indicates requested data was not retained under TTL.
91
+ *
92
+ * @generated from enum value: ERROR_TYPE_NOT_RETAINED = 2;
93
+ */
94
+ NOT_RETAINED = 2,
95
+
96
+ /**
97
+ * ERROR_TYPE_NOT_FOUND_OR_NOT_RETAINED indicates an ambiguous not found vs TTL case.
98
+ *
99
+ * @generated from enum value: ERROR_TYPE_NOT_FOUND_OR_NOT_RETAINED = 3;
100
+ */
101
+ NOT_FOUND_OR_NOT_RETAINED = 3,
102
+
103
+ /**
104
+ * ERROR_TYPE_INVALID_REQUEST indicates the request failed validation.
105
+ *
106
+ * @generated from enum value: ERROR_TYPE_INVALID_REQUEST = 4;
107
+ */
108
+ INVALID_REQUEST = 4,
109
+
110
+ /**
111
+ * ERROR_TYPE_CEL_VALIDATION_FAILED indicates a CEL filter failed validation.
112
+ *
113
+ * @generated from enum value: ERROR_TYPE_CEL_VALIDATION_FAILED = 5;
114
+ */
115
+ CEL_VALIDATION_FAILED = 5,
116
+
117
+ /**
118
+ * ERROR_TYPE_INTERNAL_ERROR indicates an internal server error occurred.
119
+ *
120
+ * @generated from enum value: ERROR_TYPE_INTERNAL_ERROR = 6;
121
+ */
122
+ INTERNAL_ERROR = 6,
123
+ }
124
+
125
+ /**
126
+ * Describes the enum thru.common.v1.ErrorType.
127
+ */
128
+ export const ErrorTypeSchema: GenEnum<ErrorType> = /*@__PURE__*/
129
+ enumDesc(file_thru_common_v1_errors, 0);
130
+
@@ -0,0 +1,81 @@
1
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
2
+ // @generated from file thru/common/v1/filters.proto (package thru.common.v1, edition 2023)
3
+ // option features.field_presence = EXPLICIT;
4
+ /* eslint-disable */
5
+
6
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
7
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
8
+ import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
9
+ import { file_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
10
+ import type { Message } from "@bufbuild/protobuf";
11
+
12
+ /**
13
+ * Describes the file thru/common/v1/filters.proto.
14
+ */
15
+ export const file_thru_common_v1_filters: GenFile = /*@__PURE__*/
16
+ fileDesc("Chx0aHJ1L2NvbW1vbi92MS9maWx0ZXJzLnByb3RvEg50aHJ1LmNvbW1vbi52MSKRAQoGRmlsdGVyEh8KCmV4cHJlc3Npb24YASABKAlCC+BBAbpIBXIDGIAgEjcKBnBhcmFtcxgCIAMoCzIiLnRocnUuY29tbW9uLnYxLkZpbHRlci5QYXJhbXNFbnRyeUID4EEBGi0KC1BhcmFtc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEiiQEKE0NlbEZpbHRlclZhbGlkYXRpb24SJwoRYWxsb3dlZF9mdW5jdGlvbnMYASADKAlCDOBBAbpIBpIBAxCAARIkCg5hbGxvd2VkX2ZpZWxkcxgCIAMoCUIM4EEBukgGkgEDEIACEiMKDm1heF9jb21wbGV4aXR5GAMgASgNQgvgQQG6SAUqAxjoB0LNAQoSY29tLnRocnUuY29tbW9uLnYxQgxGaWx0ZXJzUHJvdG9QAVpEZ2l0aHViLmNvbS9VbnRvLUxhYnMvdGhydS1uZXQvZ3JwYy9wa2cvcHJvdG8vdGhydS9jb21tb24vdjE7Y29tbW9udjGiAgNUQ1iqAg5UaHJ1LkNvbW1vbi5WMboCA1RIVcoCDlRocnVcQ29tbW9uXFYx4gIaVGhydVxDb21tb25cVjFcR1BCTWV0YWRhdGHqAhBUaHJ1OjpDb21tb246OlYxkgMCCAFiCGVkaXRpb25zcOgH", [file_buf_validate_validate, file_google_api_field_behavior]);
17
+
18
+ /**
19
+ * Filter represents a CEL-based expression applied to query or stream results.
20
+ *
21
+ * @generated from message thru.common.v1.Filter
22
+ */
23
+ export type Filter = Message<"thru.common.v1.Filter"> & {
24
+ /**
25
+ * CEL expression applied server-side. Empty expressions are treated as no-op.
26
+ *
27
+ * @generated from field: string expression = 1;
28
+ */
29
+ expression: string;
30
+
31
+ /**
32
+ * Named parameter bindings for expression parameterization.
33
+ *
34
+ * @generated from field: map<string, string> params = 2;
35
+ */
36
+ params: { [key: string]: string };
37
+ };
38
+
39
+ /**
40
+ * Describes the message thru.common.v1.Filter.
41
+ * Use `create(FilterSchema)` to create a new message.
42
+ */
43
+ export const FilterSchema: GenMessage<Filter> = /*@__PURE__*/
44
+ messageDesc(file_thru_common_v1_filters, 0);
45
+
46
+ /**
47
+ * CelFilterValidation describes the validation configuration returned to
48
+ * clients to help them build safe filter expressions.
49
+ *
50
+ * @generated from message thru.common.v1.CelFilterValidation
51
+ */
52
+ export type CelFilterValidation = Message<"thru.common.v1.CelFilterValidation"> & {
53
+ /**
54
+ * List of allowed CEL function names for a specific request type.
55
+ *
56
+ * @generated from field: repeated string allowed_functions = 1;
57
+ */
58
+ allowedFunctions: string[];
59
+
60
+ /**
61
+ * List of allowed field names accessible to the CEL expression.
62
+ *
63
+ * @generated from field: repeated string allowed_fields = 2;
64
+ */
65
+ allowedFields: string[];
66
+
67
+ /**
68
+ * Maximum AST node count permitted for a CEL expression.
69
+ *
70
+ * @generated from field: uint32 max_complexity = 3;
71
+ */
72
+ maxComplexity: number;
73
+ };
74
+
75
+ /**
76
+ * Describes the message thru.common.v1.CelFilterValidation.
77
+ * Use `create(CelFilterValidationSchema)` to create a new message.
78
+ */
79
+ export const CelFilterValidationSchema: GenMessage<CelFilterValidation> = /*@__PURE__*/
80
+ messageDesc(file_thru_common_v1_filters, 1);
81
+
@@ -0,0 +1,80 @@
1
+ // @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
2
+ // @generated from file thru/common/v1/pagination.proto (package thru.common.v1, edition 2023)
3
+ // option features.field_presence = EXPLICIT;
4
+ /* eslint-disable */
5
+
6
+ import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
7
+ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
8
+ import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
9
+ import { file_google_api_field_behavior } from "../../../google/api/field_behavior_pb";
10
+ import type { Message } from "@bufbuild/protobuf";
11
+
12
+ /**
13
+ * Describes the file thru/common/v1/pagination.proto.
14
+ */
15
+ export const file_thru_common_v1_pagination: GenFile = /*@__PURE__*/
16
+ fileDesc("Ch90aHJ1L2NvbW1vbi92MS9wYWdpbmF0aW9uLnByb3RvEg50aHJ1LmNvbW1vbi52MSJvCgtQYWdlUmVxdWVzdBIgCglwYWdlX3NpemUYASABKA1CDeBBAbpIByoFGOgHKAESHwoKcGFnZV90b2tlbhgCIAEoCUIL4EEBukgFcgMYgAQSHQoIb3JkZXJfYnkYAyABKAlCC+BBAbpIBXIDGIACIkUKDFBhZ2VSZXNwb25zZRIcCg9uZXh0X3BhZ2VfdG9rZW4YASABKAlCA+BBARIXCgp0b3RhbF9zaXplGAIgASgEQgPgQQFC0AEKEmNvbS50aHJ1LmNvbW1vbi52MUIPUGFnaW5hdGlvblByb3RvUAFaRGdpdGh1Yi5jb20vVW50by1MYWJzL3RocnUtbmV0L2dycGMvcGtnL3Byb3RvL3RocnUvY29tbW9uL3YxO2NvbW1vbnYxogIDVENYqgIOVGhydS5Db21tb24uVjG6AgNUSFXKAg5UaHJ1XENvbW1vblxWMeICGlRocnVcQ29tbW9uXFYxXEdQQk1ldGFkYXRh6gIQVGhydTo6Q29tbW9uOjpWMZIDAggBYghlZGl0aW9uc3DoBw", [file_buf_validate_validate, file_google_api_field_behavior]);
17
+
18
+ /**
19
+ * PageRequest contains pagination parameters for listing RPCs.
20
+ *
21
+ * @generated from message thru.common.v1.PageRequest
22
+ */
23
+ export type PageRequest = Message<"thru.common.v1.PageRequest"> & {
24
+ /**
25
+ * Maximum number of items to return in a single response.
26
+ *
27
+ * @generated from field: uint32 page_size = 1;
28
+ */
29
+ pageSize: number;
30
+
31
+ /**
32
+ * Token identifying the position to resume from.
33
+ *
34
+ * @generated from field: string page_token = 2;
35
+ */
36
+ pageToken: string;
37
+
38
+ /**
39
+ * Optional ordering specification in "field [asc|desc]" form.
40
+ *
41
+ * @generated from field: string order_by = 3;
42
+ */
43
+ orderBy: string;
44
+ };
45
+
46
+ /**
47
+ * Describes the message thru.common.v1.PageRequest.
48
+ * Use `create(PageRequestSchema)` to create a new message.
49
+ */
50
+ export const PageRequestSchema: GenMessage<PageRequest> = /*@__PURE__*/
51
+ messageDesc(file_thru_common_v1_pagination, 0);
52
+
53
+ /**
54
+ * PageResponse captures pagination metadata returned with list results.
55
+ *
56
+ * @generated from message thru.common.v1.PageResponse
57
+ */
58
+ export type PageResponse = Message<"thru.common.v1.PageResponse"> & {
59
+ /**
60
+ * Token to retrieve the next page of results, if any.
61
+ *
62
+ * @generated from field: string next_page_token = 1;
63
+ */
64
+ nextPageToken: string;
65
+
66
+ /**
67
+ * Total number of items available when known.
68
+ *
69
+ * @generated from field: uint64 total_size = 2;
70
+ */
71
+ totalSize: bigint;
72
+ };
73
+
74
+ /**
75
+ * Describes the message thru.common.v1.PageResponse.
76
+ * Use `create(PageResponseSchema)` to create a new message.
77
+ */
78
+ export const PageResponseSchema: GenMessage<PageResponse> = /*@__PURE__*/
79
+ messageDesc(file_thru_common_v1_pagination, 1);
80
+