weave-typescript 0.51.3 → 0.52.0

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 (185) hide show
  1. package/dist/google/protobuf/duration.pb.d.ts +99 -0
  2. package/dist/google/protobuf/duration.pb.js +93 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.js +2 -1
  5. package/dist/weave/authz/v1/index.d.ts +1 -0
  6. package/dist/weave/authz/v1/index.js +38 -0
  7. package/dist/weave/authz/v1/options.pb.d.ts +52 -0
  8. package/dist/weave/authz/v1/options.pb.js +403 -0
  9. package/dist/weave/filter/v1/index.d.ts +1 -0
  10. package/dist/weave/filter/v1/index.js +38 -0
  11. package/dist/{weaveapi/atc/v1/message.pb.d.ts → weave/filter/v1/options.pb.d.ts} +33 -21
  12. package/dist/weave/filter/v1/options.pb.js +417 -0
  13. package/dist/weave/index.d.ts +2 -0
  14. package/dist/weave/index.js +39 -0
  15. package/dist/weaveapi/agent/v1/agent.pb.d.ts +137 -188
  16. package/dist/weaveapi/agent/v1/agent.pb.js +891 -2151
  17. package/dist/weaveapi/agent/v1/index.d.ts +1 -1
  18. package/dist/weaveapi/agent/v1/index.js +2 -2
  19. package/dist/weaveapi/agent/v1/run.pb.d.ts +289 -0
  20. package/dist/weaveapi/agent/v1/run.pb.js +2763 -0
  21. package/dist/weaveapi/auth/v1/auth.pb.d.ts +67 -14
  22. package/dist/weaveapi/auth/v1/auth.pb.js +829 -89
  23. package/dist/weaveapi/auth/v1/index.d.ts +4 -1
  24. package/dist/weaveapi/auth/v1/index.js +5 -2
  25. package/dist/weaveapi/auth/v1/{service.pb.d.ts → organization_admin.pb.d.ts} +39 -530
  26. package/dist/weaveapi/auth/v1/{service.pb.js → organization_admin.pb.js} +2978 -5812
  27. package/dist/weaveapi/auth/v1/personal_access_token.pb.d.ts +114 -0
  28. package/dist/weaveapi/auth/v1/personal_access_token.pb.js +750 -0
  29. package/dist/weaveapi/auth/v1/profile.pb.d.ts +161 -0
  30. package/dist/weaveapi/auth/v1/profile.pb.js +1007 -0
  31. package/dist/weaveapi/auth/v1/session.pb.d.ts +460 -0
  32. package/dist/weaveapi/auth/v1/session.pb.js +3544 -0
  33. package/dist/weaveapi/chat/v1/chat.pb.d.ts +377 -149
  34. package/dist/weaveapi/chat/v1/chat.pb.js +3492 -1614
  35. package/dist/weaveapi/chat/v1/index.d.ts +0 -1
  36. package/dist/weaveapi/chat/v1/index.js +1 -2
  37. package/dist/weaveapi/consolidation/v1/consolidation.pb.d.ts +95 -0
  38. package/dist/weaveapi/consolidation/v1/consolidation.pb.js +770 -1
  39. package/dist/weaveapi/consolidation/v1/index.d.ts +0 -1
  40. package/dist/weaveapi/consolidation/v1/index.js +1 -2
  41. package/dist/weaveapi/content/v1/content.pb.d.ts +63 -0
  42. package/dist/weaveapi/content/v1/content.pb.js +470 -0
  43. package/dist/weaveapi/content/v1/index.d.ts +1 -0
  44. package/dist/weaveapi/content/v1/index.js +38 -0
  45. package/dist/weaveapi/gateway/v1/gateway.pb.d.ts +247 -523
  46. package/dist/weaveapi/gateway/v1/gateway.pb.js +1648 -5783
  47. package/dist/weaveapi/gateway/v1/index.d.ts +0 -1
  48. package/dist/weaveapi/gateway/v1/index.js +1 -2
  49. package/dist/weaveapi/index.d.ts +5 -5
  50. package/dist/weaveapi/index.js +6 -6
  51. package/dist/weaveapi/inference/v1/generate.pb.d.ts +120 -0
  52. package/dist/weaveapi/inference/v1/generate.pb.js +1159 -0
  53. package/dist/weaveapi/inference/v1/index.d.ts +4 -0
  54. package/dist/weaveapi/{provider → inference}/v1/index.js +4 -2
  55. package/dist/weaveapi/{model → inference}/v1/model.pb.d.ts +52 -15
  56. package/dist/weaveapi/{model → inference}/v1/model.pb.js +529 -116
  57. package/dist/weaveapi/{model/v1/service.pb.d.ts → inference/v1/model_route.pb.d.ts} +182 -110
  58. package/dist/weaveapi/{model/v1/service.pb.js → inference/v1/model_route.pb.js} +2197 -1061
  59. package/dist/weaveapi/inference/v1/provider.pb.d.ts +264 -0
  60. package/dist/weaveapi/inference/v1/provider.pb.js +2590 -0
  61. package/dist/weaveapi/ingestion/v1/index.d.ts +0 -2
  62. package/dist/weaveapi/ingestion/v1/index.js +1 -3
  63. package/dist/weaveapi/ingestion/v1/ingestion.pb.d.ts +543 -0
  64. package/dist/weaveapi/ingestion/v1/ingestion.pb.js +5550 -16
  65. package/dist/weaveapi/initialization/v1/index.d.ts +1 -0
  66. package/dist/weaveapi/initialization/v1/index.js +38 -0
  67. package/dist/weaveapi/initialization/v1/initialization.pb.d.ts +99 -0
  68. package/dist/weaveapi/initialization/v1/initialization.pb.js +510 -0
  69. package/dist/weaveapi/organization/v1/index.d.ts +0 -1
  70. package/dist/weaveapi/organization/v1/index.js +1 -2
  71. package/dist/weaveapi/organization/v1/organization.pb.d.ts +241 -0
  72. package/dist/weaveapi/organization/v1/organization.pb.js +1838 -1
  73. package/dist/weaveapi/reporting/index.d.ts +1 -0
  74. package/dist/weaveapi/reporting/index.js +38 -0
  75. package/dist/weaveapi/{task → reporting}/v1/index.d.ts +1 -1
  76. package/dist/weaveapi/{model → reporting}/v1/index.js +2 -2
  77. package/dist/weaveapi/reporting/v1/service.pb.d.ts +38 -0
  78. package/dist/weaveapi/reporting/v1/service.pb.js +167 -0
  79. package/dist/weaveapi/reporting/v1/usage.pb.d.ts +150 -0
  80. package/dist/weaveapi/reporting/v1/usage.pb.js +1837 -0
  81. package/dist/weaveapi/retrieval/v1/index.d.ts +0 -1
  82. package/dist/weaveapi/retrieval/v1/index.js +1 -2
  83. package/dist/weaveapi/retrieval/v1/retrieval.pb.d.ts +96 -2
  84. package/dist/weaveapi/retrieval/v1/retrieval.pb.js +690 -10
  85. package/dist/weaveapi/tool/index.d.ts +1 -0
  86. package/dist/weaveapi/tool/index.js +38 -0
  87. package/dist/weaveapi/tool/v1/index.d.ts +1 -0
  88. package/dist/weaveapi/tool/v1/index.js +38 -0
  89. package/dist/weaveapi/tool/v1/tool.pb.d.ts +370 -0
  90. package/dist/weaveapi/tool/v1/tool.pb.js +2717 -0
  91. package/dist/weaveapi/workflow/v1/index.d.ts +1 -1
  92. package/dist/weaveapi/workflow/v1/index.js +2 -2
  93. package/dist/weaveapi/workflow/v1/run.pb.d.ts +244 -0
  94. package/dist/weaveapi/workflow/v1/run.pb.js +2084 -0
  95. package/dist/weaveapi/workflow/v1/workflow.pb.d.ts +122 -275
  96. package/dist/weaveapi/workflow/v1/workflow.pb.js +790 -3261
  97. package/dist/weavesql/weavedb/agent_sql.d.ts +173 -477
  98. package/dist/weavesql/weavedb/agent_sql.js +281 -758
  99. package/dist/weavesql/weavedb/authorization_outbox_sql.d.ts +261 -0
  100. package/dist/weavesql/weavedb/authorization_outbox_sql.js +445 -0
  101. package/dist/weavesql/weavedb/chat_sql.d.ts +103 -345
  102. package/dist/weavesql/weavedb/chat_sql.js +312 -597
  103. package/dist/weavesql/weavedb/document_consolidation_sql.d.ts +217 -0
  104. package/dist/weavesql/weavedb/document_consolidation_sql.js +486 -0
  105. package/dist/weavesql/weavedb/document_ingestion_sql.d.ts +1433 -0
  106. package/dist/weavesql/weavedb/document_ingestion_sql.js +3488 -0
  107. package/dist/weavesql/weavedb/document_retrieval_sql.d.ts +314 -0
  108. package/dist/weavesql/weavedb/document_retrieval_sql.js +965 -0
  109. package/dist/weavesql/weavedb/document_table_sql.d.ts +6 -6
  110. package/dist/weavesql/weavedb/document_table_sql.js +12 -12
  111. package/dist/weavesql/weavedb/identity_sql.d.ts +1014 -0
  112. package/dist/weavesql/weavedb/identity_sql.js +1811 -0
  113. package/dist/weavesql/weavedb/inference_model_route_sql.d.ts +161 -0
  114. package/dist/weavesql/weavedb/inference_model_route_sql.js +408 -0
  115. package/dist/weavesql/weavedb/inference_provider_sql.d.ts +125 -0
  116. package/dist/weavesql/weavedb/inference_provider_sql.js +228 -0
  117. package/dist/weavesql/weavedb/initialization_sql.d.ts +15 -0
  118. package/dist/weavesql/weavedb/initialization_sql.js +33 -0
  119. package/dist/weavesql/weavedb/model_catalog_sql.d.ts +6 -6
  120. package/dist/weavesql/weavedb/model_catalog_sql.js +6 -6
  121. package/dist/weavesql/weavedb/organization_sql.d.ts +22 -102
  122. package/dist/weavesql/weavedb/organization_sql.js +54 -262
  123. package/dist/weavesql/weavedb/tool_sql.d.ts +209 -0
  124. package/dist/weavesql/weavedb/tool_sql.js +407 -0
  125. package/dist/weavesql/weavedb/usage_sql.d.ts +356 -0
  126. package/dist/weavesql/weavedb/usage_sql.js +568 -0
  127. package/dist/weavesql/weavedb/workflow_sql.d.ts +159 -546
  128. package/dist/weavesql/weavedb/workflow_sql.js +281 -909
  129. package/package.json +1 -1
  130. package/dist/weaveapi/agent/v1/service.pb.d.ts +0 -397
  131. package/dist/weaveapi/agent/v1/service.pb.js +0 -3152
  132. package/dist/weaveapi/atc/v1/event.pb.d.ts +0 -134
  133. package/dist/weaveapi/atc/v1/event.pb.js +0 -1124
  134. package/dist/weaveapi/atc/v1/index.d.ts +0 -5
  135. package/dist/weaveapi/atc/v1/index.js +0 -42
  136. package/dist/weaveapi/atc/v1/message.pb.js +0 -287
  137. package/dist/weaveapi/atc/v1/process.pb.d.ts +0 -91
  138. package/dist/weaveapi/atc/v1/process.pb.js +0 -658
  139. package/dist/weaveapi/atc/v1/run.pb.d.ts +0 -71
  140. package/dist/weaveapi/atc/v1/run.pb.js +0 -525
  141. package/dist/weaveapi/atc/v1/service.pb.d.ts +0 -472
  142. package/dist/weaveapi/atc/v1/service.pb.js +0 -3093
  143. package/dist/weaveapi/chat/v1/service.pb.d.ts +0 -345
  144. package/dist/weaveapi/chat/v1/service.pb.js +0 -2545
  145. package/dist/weaveapi/consolidation/v1/service.pb.d.ts +0 -93
  146. package/dist/weaveapi/consolidation/v1/service.pb.js +0 -427
  147. package/dist/weaveapi/gateway/v1/service.pb.d.ts +0 -235
  148. package/dist/weaveapi/gateway/v1/service.pb.js +0 -651
  149. package/dist/weaveapi/ingestion/v1/service.pb.d.ts +0 -420
  150. package/dist/weaveapi/ingestion/v1/service.pb.js +0 -2311
  151. package/dist/weaveapi/ingestion/v1/table.pb.d.ts +0 -121
  152. package/dist/weaveapi/ingestion/v1/table.pb.js +0 -1478
  153. package/dist/weaveapi/model/v1/index.d.ts +0 -2
  154. package/dist/weaveapi/organization/v1/service.pb.d.ts +0 -261
  155. package/dist/weaveapi/organization/v1/service.pb.js +0 -1561
  156. package/dist/weaveapi/project/v1/index.d.ts +0 -2
  157. package/dist/weaveapi/project/v1/index.js +0 -39
  158. package/dist/weaveapi/project/v1/project.pb.d.ts +0 -105
  159. package/dist/weaveapi/project/v1/project.pb.js +0 -1004
  160. package/dist/weaveapi/project/v1/service.pb.d.ts +0 -247
  161. package/dist/weaveapi/project/v1/service.pb.js +0 -1994
  162. package/dist/weaveapi/provider/v1/index.d.ts +0 -2
  163. package/dist/weaveapi/provider/v1/provider.pb.d.ts +0 -137
  164. package/dist/weaveapi/provider/v1/provider.pb.js +0 -1000
  165. package/dist/weaveapi/provider/v1/service.pb.d.ts +0 -223
  166. package/dist/weaveapi/provider/v1/service.pb.js +0 -1888
  167. package/dist/weaveapi/retrieval/v1/service.pb.d.ts +0 -93
  168. package/dist/weaveapi/retrieval/v1/service.pb.js +0 -385
  169. package/dist/weaveapi/task/v1/index.js +0 -39
  170. package/dist/weaveapi/task/v1/service.pb.d.ts +0 -172
  171. package/dist/weaveapi/task/v1/service.pb.js +0 -1436
  172. package/dist/weaveapi/task/v1/task.pb.d.ts +0 -85
  173. package/dist/weaveapi/task/v1/task.pb.js +0 -802
  174. package/dist/weaveapi/workflow/v1/service.pb.d.ts +0 -392
  175. package/dist/weaveapi/workflow/v1/service.pb.js +0 -3146
  176. /package/dist/{weaveapi/atc → weave/authz}/index.d.ts +0 -0
  177. /package/dist/{weaveapi/atc → weave/authz}/index.js +0 -0
  178. /package/dist/{weaveapi/model → weave/filter}/index.d.ts +0 -0
  179. /package/dist/{weaveapi/model → weave/filter}/index.js +0 -0
  180. /package/dist/weaveapi/{project → content}/index.d.ts +0 -0
  181. /package/dist/weaveapi/{project → content}/index.js +0 -0
  182. /package/dist/weaveapi/{provider → inference}/index.d.ts +0 -0
  183. /package/dist/weaveapi/{provider → inference}/index.js +0 -0
  184. /package/dist/weaveapi/{task → initialization}/index.d.ts +0 -0
  185. /package/dist/weaveapi/{task → initialization}/index.js +0 -0
@@ -0,0 +1,99 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "google.protobuf";
3
+ /**
4
+ * A Duration represents a signed, fixed-length span of time represented
5
+ * as a count of seconds and fractions of seconds at nanosecond
6
+ * resolution. It is independent of any calendar and concepts like "day"
7
+ * or "month". It is related to Timestamp in that the difference between
8
+ * two Timestamp values is a Duration and it can be added or subtracted
9
+ * from a Timestamp. Range is approximately +-10,000 years.
10
+ *
11
+ * # Examples
12
+ *
13
+ * Example 1: Compute Duration from two Timestamps in pseudo code.
14
+ *
15
+ * Timestamp start = ...;
16
+ * Timestamp end = ...;
17
+ * Duration duration = ...;
18
+ *
19
+ * duration.seconds = end.seconds - start.seconds;
20
+ * duration.nanos = end.nanos - start.nanos;
21
+ *
22
+ * if (duration.seconds < 0 && duration.nanos > 0) {
23
+ * duration.seconds += 1;
24
+ * duration.nanos -= 1000000000;
25
+ * } else if (duration.seconds > 0 && duration.nanos < 0) {
26
+ * duration.seconds -= 1;
27
+ * duration.nanos += 1000000000;
28
+ * }
29
+ *
30
+ * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
31
+ *
32
+ * Timestamp start = ...;
33
+ * Duration duration = ...;
34
+ * Timestamp end = ...;
35
+ *
36
+ * end.seconds = start.seconds + duration.seconds;
37
+ * end.nanos = start.nanos + duration.nanos;
38
+ *
39
+ * if (end.nanos < 0) {
40
+ * end.seconds -= 1;
41
+ * end.nanos += 1000000000;
42
+ * } else if (end.nanos >= 1000000000) {
43
+ * end.seconds += 1;
44
+ * end.nanos -= 1000000000;
45
+ * }
46
+ *
47
+ * Example 3: Compute Duration from datetime.timedelta in Python.
48
+ *
49
+ * td = datetime.timedelta(days=3, minutes=10)
50
+ * duration = Duration()
51
+ * duration.FromTimedelta(td)
52
+ *
53
+ * # JSON Mapping
54
+ *
55
+ * In JSON format, the Duration type is encoded as a string rather than an
56
+ * object, where the string ends in the suffix "s" (indicating seconds) and
57
+ * is preceded by the number of seconds, with nanoseconds expressed as
58
+ * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
59
+ * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
60
+ * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
61
+ * microsecond should be expressed in JSON format as "3.000001s".
62
+ */
63
+ export interface Duration {
64
+ /**
65
+ * Signed seconds of the span of time. Must be from -315,576,000,000
66
+ * to +315,576,000,000 inclusive. Note: these bounds are computed from:
67
+ * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
68
+ */
69
+ seconds: number;
70
+ /**
71
+ * Signed fractions of a second at nanosecond resolution of the span
72
+ * of time. Durations less than one second are represented with a 0
73
+ * `seconds` field and a positive or negative `nanos` field. For durations
74
+ * of one second or more, a non-zero value for the `nanos` field must be
75
+ * of the same sign as the `seconds` field. Must be from -999,999,999
76
+ * to +999,999,999 inclusive.
77
+ */
78
+ nanos: number;
79
+ }
80
+ export declare const Duration: MessageFns<Duration>;
81
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
82
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
83
+ [K in keyof T]?: DeepPartial<T[K]>;
84
+ } : Partial<T>;
85
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
86
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
87
+ [K in keyof P]: Exact<P[K], I[K]>;
88
+ } & {
89
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
90
+ };
91
+ export interface MessageFns<T> {
92
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
93
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
94
+ fromJSON(object: any): T;
95
+ toJSON(message: T): unknown;
96
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
97
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
98
+ }
99
+ export {};
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.11.8
5
+ // protoc unknown
6
+ // source: google/protobuf/duration.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.Duration = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ exports.protobufPackage = "google.protobuf";
12
+ function createBaseDuration() {
13
+ return { seconds: 0, nanos: 0 };
14
+ }
15
+ exports.Duration = {
16
+ encode(message, writer = new wire_1.BinaryWriter()) {
17
+ if (message.seconds !== 0) {
18
+ writer.uint32(8).int64(message.seconds);
19
+ }
20
+ if (message.nanos !== 0) {
21
+ writer.uint32(16).int32(message.nanos);
22
+ }
23
+ return writer;
24
+ },
25
+ decode(input, length) {
26
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
27
+ const end = length === undefined ? reader.len : reader.pos + length;
28
+ const message = createBaseDuration();
29
+ while (reader.pos < end) {
30
+ const tag = reader.uint32();
31
+ switch (tag >>> 3) {
32
+ case 1: {
33
+ if (tag !== 8) {
34
+ break;
35
+ }
36
+ message.seconds = longToNumber(reader.int64());
37
+ continue;
38
+ }
39
+ case 2: {
40
+ if (tag !== 16) {
41
+ break;
42
+ }
43
+ message.nanos = reader.int32();
44
+ continue;
45
+ }
46
+ }
47
+ if ((tag & 7) === 4 || tag === 0) {
48
+ break;
49
+ }
50
+ reader.skip(tag & 7);
51
+ }
52
+ return message;
53
+ },
54
+ fromJSON(object) {
55
+ return {
56
+ seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
57
+ nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
58
+ };
59
+ },
60
+ toJSON(message) {
61
+ const obj = {};
62
+ if (message.seconds !== 0) {
63
+ obj.seconds = Math.round(message.seconds);
64
+ }
65
+ if (message.nanos !== 0) {
66
+ obj.nanos = Math.round(message.nanos);
67
+ }
68
+ return obj;
69
+ },
70
+ create(base) {
71
+ return exports.Duration.fromPartial(base !== null && base !== void 0 ? base : {});
72
+ },
73
+ fromPartial(object) {
74
+ var _a, _b;
75
+ const message = createBaseDuration();
76
+ message.seconds = (_a = object.seconds) !== null && _a !== void 0 ? _a : 0;
77
+ message.nanos = (_b = object.nanos) !== null && _b !== void 0 ? _b : 0;
78
+ return message;
79
+ },
80
+ };
81
+ function longToNumber(int64) {
82
+ const num = globalThis.Number(int64.toString());
83
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
84
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
85
+ }
86
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
87
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
88
+ }
89
+ return num;
90
+ }
91
+ function isSet(value) {
92
+ return value !== null && value !== undefined;
93
+ }
package/dist/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export * as weave from './weave';
1
2
  export * as weaveapi from './weaveapi';
package/dist/index.js CHANGED
@@ -34,5 +34,6 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  };
35
35
  })();
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.weaveapi = void 0;
37
+ exports.weaveapi = exports.weave = void 0;
38
+ exports.weave = __importStar(require("./weave"));
38
39
  exports.weaveapi = __importStar(require("./weaveapi"));
@@ -0,0 +1 @@
1
+ export * as options from './options.pb';
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ // Code generated by barrel.js. DO NOT EDIT.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.options = void 0;
38
+ exports.options = __importStar(require("./options.pb"));
@@ -0,0 +1,52 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "weave.authz.v1";
3
+ export declare enum PrincipalField {
4
+ PRINCIPAL_FIELD_UNSPECIFIED = 0,
5
+ PRINCIPAL_FIELD_ORGANIZATION_ID = 1,
6
+ PRINCIPAL_FIELD_USER_ID = 2,
7
+ UNRECOGNIZED = -1
8
+ }
9
+ export declare function principalFieldFromJSON(object: any): PrincipalField;
10
+ export declare function principalFieldToJSON(object: PrincipalField): string;
11
+ export interface MethodAuthz {
12
+ objectType: string;
13
+ relation: string;
14
+ objectId: ObjectID | undefined;
15
+ }
16
+ export interface ObjectID {
17
+ principalField?: PrincipalField | undefined;
18
+ requestField?: string | undefined;
19
+ literal?: string | undefined;
20
+ parts?: ObjectIDParts | undefined;
21
+ }
22
+ export interface ObjectIDParts {
23
+ parts: ObjectIDPart[];
24
+ }
25
+ export interface ObjectIDPart {
26
+ principalField?: PrincipalField | undefined;
27
+ requestField?: string | undefined;
28
+ literal?: string | undefined;
29
+ }
30
+ export declare const MethodAuthz: MessageFns<MethodAuthz>;
31
+ export declare const ObjectID: MessageFns<ObjectID>;
32
+ export declare const ObjectIDParts: MessageFns<ObjectIDParts>;
33
+ export declare const ObjectIDPart: MessageFns<ObjectIDPart>;
34
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
35
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
36
+ [K in keyof T]?: DeepPartial<T[K]>;
37
+ } : Partial<T>;
38
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
39
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
40
+ [K in keyof P]: Exact<P[K], I[K]>;
41
+ } & {
42
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
43
+ };
44
+ export interface MessageFns<T> {
45
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
46
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
47
+ fromJSON(object: any): T;
48
+ toJSON(message: T): unknown;
49
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
50
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
51
+ }
52
+ export {};