@milaboratories/pl-client 3.4.2 → 3.5.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.
- package/dist/core/final.cjs.map +1 -1
- package/dist/core/final.js.map +1 -1
- package/dist/core/ll_client.cjs +7 -1
- package/dist/core/ll_client.cjs.map +1 -1
- package/dist/core/ll_client.d.ts.map +1 -1
- package/dist/core/ll_client.js +7 -1
- package/dist/core/ll_client.js.map +1 -1
- package/dist/core/ll_transaction.cjs +151 -26
- package/dist/core/ll_transaction.cjs.map +1 -1
- package/dist/core/ll_transaction.d.ts +1 -0
- package/dist/core/ll_transaction.d.ts.map +1 -1
- package/dist/core/ll_transaction.js +151 -26
- package/dist/core/ll_transaction.js.map +1 -1
- package/dist/core/transaction.cjs +89 -0
- package/dist/core/transaction.cjs.map +1 -1
- package/dist/core/transaction.d.ts +47 -1
- package/dist/core/transaction.d.ts.map +1 -1
- package/dist/core/transaction.js +90 -1
- package/dist/core/transaction.js.map +1 -1
- package/dist/core/tree_filter.cjs +106 -0
- package/dist/core/tree_filter.cjs.map +1 -0
- package/dist/core/tree_filter.d.ts +85 -0
- package/dist/core/tree_filter.d.ts.map +1 -0
- package/dist/core/tree_filter.js +106 -0
- package/dist/core/tree_filter.js.map +1 -0
- package/dist/core/type_conversion.cjs +1 -0
- package/dist/core/type_conversion.cjs.map +1 -1
- package/dist/core/type_conversion.js +1 -1
- package/dist/core/type_conversion.js.map +1 -1
- package/dist/index.cjs +5 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -1
- package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.cjs.map +1 -1
- package/dist/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.js.map +1 -1
- package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs +450 -4
- package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs.map +1 -1
- package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts +328 -2
- package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.d.ts.map +1 -1
- package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js +449 -5
- package/dist/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js.map +1 -1
- package/dist/proto-grpc/google/protobuf/timestamp.cjs.map +1 -1
- package/dist/proto-grpc/google/protobuf/timestamp.d.ts +9 -8
- package/dist/proto-grpc/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/proto-grpc/google/protobuf/timestamp.js.map +1 -1
- package/dist/proto-grpc/google/rpc/code.cjs.map +1 -1
- package/dist/proto-grpc/google/rpc/code.js.map +1 -1
- package/package.json +4 -4
- package/src/core/final.ts +1 -1
- package/src/core/ll_client.ts +11 -1
- package/src/core/ll_transaction.test.ts +13 -18
- package/src/core/ll_transaction.ts +237 -60
- package/src/core/transaction.test.ts +38 -0
- package/src/core/transaction.ts +136 -1
- package/src/core/tree_filter.test.ts +217 -0
- package/src/core/tree_filter.ts +182 -0
- package/src/core/type_conversion.ts +1 -1
- package/src/index.ts +1 -0
- package/src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts +1 -1
- package/src/proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.ts +604 -6
- package/src/proto-grpc/google/api/http.ts +1 -1
- package/src/proto-grpc/google/protobuf/descriptor.ts +242 -12
- package/src/proto-grpc/google/protobuf/timestamp.ts +9 -8
- package/src/proto-grpc/google/protobuf/wrappers.ts +38 -4
- package/src/proto-grpc/google/rpc/code.ts +1 -1
- package/src/proto-grpc/google/rpc/error_details.ts +5 -5
- package/src/proto-grpc/google/rpc/http.ts +1 -1
- package/src/proto-grpc/google/rpc/status.ts +1 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ResourceAPI_Tree_Filter_OperatorType, ResourceAPI_Tree_Filter_Property } from "../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js";
|
|
2
|
+
//#region src/core/tree_filter.ts
|
|
3
|
+
/**
|
|
4
|
+
* Builder helpers for {@link ResourceAPI_Tree_Filter} predicates used in
|
|
5
|
+
* `ResourceAPI_Tree_Request.fieldFilter` and `traverseStopRules`.
|
|
6
|
+
*
|
|
7
|
+
* Property restrictions (not enforced here; the backend rejects invalid combinations):
|
|
8
|
+
* - `FIELD_NAME` is only valid inside `fieldFilter`.
|
|
9
|
+
* - `IS_FINAL`, `ALL_OUTPUTS_FINAL`, and resource-level boolean predicates are only valid inside `traverseStopRules`.
|
|
10
|
+
*/
|
|
11
|
+
const treeFilter = {
|
|
12
|
+
and(...children) {
|
|
13
|
+
return {
|
|
14
|
+
operator: ResourceAPI_Tree_Filter_OperatorType.AND,
|
|
15
|
+
value: {
|
|
16
|
+
oneofKind: "filtersValue",
|
|
17
|
+
filtersValue: { filters: children }
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
or(...children) {
|
|
22
|
+
return {
|
|
23
|
+
operator: ResourceAPI_Tree_Filter_OperatorType.OR,
|
|
24
|
+
value: {
|
|
25
|
+
oneofKind: "filtersValue",
|
|
26
|
+
filtersValue: { filters: children }
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
not(child) {
|
|
31
|
+
return {
|
|
32
|
+
operator: ResourceAPI_Tree_Filter_OperatorType.NOT,
|
|
33
|
+
value: {
|
|
34
|
+
oneofKind: "filtersValue",
|
|
35
|
+
filtersValue: { filters: [child] }
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
eq(prop, value) {
|
|
40
|
+
return {
|
|
41
|
+
key: prop,
|
|
42
|
+
operator: ResourceAPI_Tree_Filter_OperatorType.EQUAL,
|
|
43
|
+
value: {
|
|
44
|
+
oneofKind: "stringValue",
|
|
45
|
+
stringValue: value
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
match(prop, pattern) {
|
|
50
|
+
return {
|
|
51
|
+
key: prop,
|
|
52
|
+
operator: ResourceAPI_Tree_Filter_OperatorType.MATCH,
|
|
53
|
+
value: {
|
|
54
|
+
oneofKind: "stringValue",
|
|
55
|
+
stringValue: pattern
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
boolEq(prop, value) {
|
|
60
|
+
return {
|
|
61
|
+
key: prop,
|
|
62
|
+
operator: ResourceAPI_Tree_Filter_OperatorType.EQUAL,
|
|
63
|
+
value: {
|
|
64
|
+
oneofKind: "boolValue",
|
|
65
|
+
boolValue: value
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
resourceTypeEq(name) {
|
|
70
|
+
return treeFilter.eq(ResourceAPI_Tree_Filter_Property.RESOURCE_TYPE, name);
|
|
71
|
+
},
|
|
72
|
+
resourceTypeMatch(pattern) {
|
|
73
|
+
return treeFilter.match(ResourceAPI_Tree_Filter_Property.RESOURCE_TYPE, pattern);
|
|
74
|
+
},
|
|
75
|
+
fieldNameEq(name) {
|
|
76
|
+
return treeFilter.eq(ResourceAPI_Tree_Filter_Property.FIELD_NAME, name);
|
|
77
|
+
},
|
|
78
|
+
fieldNameMatch(pattern) {
|
|
79
|
+
return treeFilter.match(ResourceAPI_Tree_Filter_Property.FIELD_NAME, pattern);
|
|
80
|
+
},
|
|
81
|
+
isFinal(value) {
|
|
82
|
+
return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.IS_FINAL, value);
|
|
83
|
+
},
|
|
84
|
+
allOutputsFinal(value) {
|
|
85
|
+
return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.ALL_OUTPUTS_FINAL, value);
|
|
86
|
+
},
|
|
87
|
+
resourceReadyForCalculation(value) {
|
|
88
|
+
return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.RESOURCE_READY_FOR_CALCULATION, value);
|
|
89
|
+
},
|
|
90
|
+
isDuplicate(value) {
|
|
91
|
+
return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.IS_DUPLICATE, value);
|
|
92
|
+
},
|
|
93
|
+
hasErrors(value) {
|
|
94
|
+
return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.HAS_ERRORS, value);
|
|
95
|
+
},
|
|
96
|
+
outputsLocked(value) {
|
|
97
|
+
return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.OUTPUTS_LOCKED, value);
|
|
98
|
+
},
|
|
99
|
+
readyOrDuplicateOrError() {
|
|
100
|
+
return treeFilter.or(treeFilter.resourceReadyForCalculation(true), treeFilter.isDuplicate(true), treeFilter.hasErrors(true));
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
//#endregion
|
|
104
|
+
export { treeFilter };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=tree_filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree_filter.js","names":[],"sources":["../../src/core/tree_filter.ts"],"sourcesContent":["import type { ResourceAPI_Tree_Filter } from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api\";\nimport {\n ResourceAPI_Tree_Filter_OperatorType,\n ResourceAPI_Tree_Filter_Property,\n} from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api\";\n\nexport type { ResourceAPI_Tree_Filter };\n\n/** Shorthand alias for the filter predicate type. */\nexport type Filter = ResourceAPI_Tree_Filter;\n\n/** Shorthand alias for the Property enum. */\nexport type Property = ResourceAPI_Tree_Filter_Property;\n\n// Re-export enum namespaces under shorter aliases so callers need not import api.ts directly.\nexport { ResourceAPI_Tree_Filter_OperatorType as FilterOperatorType };\nexport { ResourceAPI_Tree_Filter_Property as FilterProperty };\n\n/**\n * Builder helpers for {@link ResourceAPI_Tree_Filter} predicates used in\n * `ResourceAPI_Tree_Request.fieldFilter` and `traverseStopRules`.\n *\n * Property restrictions (not enforced here; the backend rejects invalid combinations):\n * - `FIELD_NAME` is only valid inside `fieldFilter`.\n * - `IS_FINAL`, `ALL_OUTPUTS_FINAL`, and resource-level boolean predicates are only valid inside `traverseStopRules`.\n */\nexport const treeFilter = {\n // ── Group operators ──────────────────────────────────────────────────────\n\n and(...children: Filter[]): Filter {\n return {\n operator: ResourceAPI_Tree_Filter_OperatorType.AND,\n value: { oneofKind: \"filtersValue\", filtersValue: { filters: children } },\n };\n },\n\n or(...children: Filter[]): Filter {\n return {\n operator: ResourceAPI_Tree_Filter_OperatorType.OR,\n value: { oneofKind: \"filtersValue\", filtersValue: { filters: children } },\n };\n },\n\n not(child: Filter): Filter {\n return {\n operator: ResourceAPI_Tree_Filter_OperatorType.NOT,\n value: { oneofKind: \"filtersValue\", filtersValue: { filters: [child] } },\n };\n },\n\n // ── Generic leaf operators ───────────────────────────────────────────────\n\n /** Exact-match predicate on a string property. */\n eq(prop: Property, value: string): Filter {\n return {\n key: prop,\n operator: ResourceAPI_Tree_Filter_OperatorType.EQUAL,\n value: { oneofKind: \"stringValue\", stringValue: value },\n };\n },\n\n /** Regex-match predicate on a string property. */\n match(prop: Property, pattern: string): Filter {\n return {\n key: prop,\n operator: ResourceAPI_Tree_Filter_OperatorType.MATCH,\n value: { oneofKind: \"stringValue\", stringValue: pattern },\n };\n },\n\n /** Boolean-equality predicate. */\n boolEq(prop: Property, value: boolean): Filter {\n return {\n key: prop,\n operator: ResourceAPI_Tree_Filter_OperatorType.EQUAL,\n value: { oneofKind: \"boolValue\", boolValue: value },\n };\n },\n\n // ── Typed convenience wrappers ───────────────────────────────────────────\n\n /** Match resources whose type string equals `name` exactly. */\n resourceTypeEq(name: string): Filter {\n return treeFilter.eq(ResourceAPI_Tree_Filter_Property.RESOURCE_TYPE, name);\n },\n\n /** Match resources whose type string satisfies the regex `pattern`. */\n resourceTypeMatch(pattern: string): Filter {\n return treeFilter.match(ResourceAPI_Tree_Filter_Property.RESOURCE_TYPE, pattern);\n },\n\n /**\n * Match field edges whose name equals `name` exactly.\n * Valid only inside `fieldFilter`.\n */\n fieldNameEq(name: string): Filter {\n return treeFilter.eq(ResourceAPI_Tree_Filter_Property.FIELD_NAME, name);\n },\n\n /**\n * Match field edges whose name satisfies the regex `pattern`.\n * Valid only inside `fieldFilter`.\n */\n fieldNameMatch(pattern: string): Filter {\n return treeFilter.match(ResourceAPI_Tree_Filter_Property.FIELD_NAME, pattern);\n },\n\n /**\n * Match resources where `is_final == value`.\n * Valid only inside `traverseStopRules`.\n */\n isFinal(value: boolean): Filter {\n return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.IS_FINAL, value);\n },\n\n /**\n * Match resources where `all_outputs_final == value`.\n * Valid only inside `traverseStopRules`.\n */\n allOutputsFinal(value: boolean): Filter {\n return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.ALL_OUTPUTS_FINAL, value);\n },\n\n /**\n * Match resources where `resource_ready_for_calculation == value`.\n * True when the resource is Original, inputs are locked, and all inputs are final.\n * Valid only inside `traverseStopRules`.\n */\n resourceReadyForCalculation(value: boolean): Filter {\n return treeFilter.boolEq(\n ResourceAPI_Tree_Filter_Property.RESOURCE_READY_FOR_CALCULATION,\n value,\n );\n },\n\n /**\n * Match resources where `is_duplicate == value`.\n * True when the resource has a non-zero original_resource_id.\n * Valid only inside `traverseStopRules`.\n */\n isDuplicate(value: boolean): Filter {\n return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.IS_DUPLICATE, value);\n },\n\n /**\n * Match resources where `has_errors == value`.\n * True when the resource has at least one field carrying an error (aggregated\n * has-error flag). Can be true even when the resource's own status is not\n * Error (e.g., an Original resource with a failed input field).\n * Valid only inside `traverseStopRules`.\n */\n hasErrors(value: boolean): Filter {\n return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.HAS_ERRORS, value);\n },\n\n /**\n * Match resources where `outputs_locked == value`.\n * Valid only inside `traverseStopRules`.\n */\n outputsLocked(value: boolean): Filter {\n return treeFilter.boolEq(ResourceAPI_Tree_Filter_Property.OUTPUTS_LOCKED, value);\n },\n\n /**\n * Match resources that are ready-or-duplicate-or-error: mirrors the BFS\n * `readyOrDuplicateOrError` predicate used by pl-tree to decide whether a\n * resource subtree needs further polling.\n *\n * Use this as `traverseStopRules` to stop the server-side tree walk at\n * exactly the same nodes where the client BFS would stop, eliminating\n * unnecessary follow-up calls.\n *\n * Valid only inside `traverseStopRules`.\n */\n readyOrDuplicateOrError(): Filter {\n return treeFilter.or(\n treeFilter.resourceReadyForCalculation(true),\n treeFilter.isDuplicate(true),\n treeFilter.hasErrors(true),\n );\n },\n} as const;\n"],"mappings":";;;;;;;;;;AA0BA,MAAa,aAAa;CAGxB,IAAI,GAAG,UAA4B;AACjC,SAAO;GACL,UAAU,qCAAqC;GAC/C,OAAO;IAAE,WAAW;IAAgB,cAAc,EAAE,SAAS,UAAU;IAAE;GAC1E;;CAGH,GAAG,GAAG,UAA4B;AAChC,SAAO;GACL,UAAU,qCAAqC;GAC/C,OAAO;IAAE,WAAW;IAAgB,cAAc,EAAE,SAAS,UAAU;IAAE;GAC1E;;CAGH,IAAI,OAAuB;AACzB,SAAO;GACL,UAAU,qCAAqC;GAC/C,OAAO;IAAE,WAAW;IAAgB,cAAc,EAAE,SAAS,CAAC,MAAM,EAAE;IAAE;GACzE;;CAMH,GAAG,MAAgB,OAAuB;AACxC,SAAO;GACL,KAAK;GACL,UAAU,qCAAqC;GAC/C,OAAO;IAAE,WAAW;IAAe,aAAa;IAAO;GACxD;;CAIH,MAAM,MAAgB,SAAyB;AAC7C,SAAO;GACL,KAAK;GACL,UAAU,qCAAqC;GAC/C,OAAO;IAAE,WAAW;IAAe,aAAa;IAAS;GAC1D;;CAIH,OAAO,MAAgB,OAAwB;AAC7C,SAAO;GACL,KAAK;GACL,UAAU,qCAAqC;GAC/C,OAAO;IAAE,WAAW;IAAa,WAAW;IAAO;GACpD;;CAMH,eAAe,MAAsB;AACnC,SAAO,WAAW,GAAG,iCAAiC,eAAe,KAAK;;CAI5E,kBAAkB,SAAyB;AACzC,SAAO,WAAW,MAAM,iCAAiC,eAAe,QAAQ;;CAOlF,YAAY,MAAsB;AAChC,SAAO,WAAW,GAAG,iCAAiC,YAAY,KAAK;;CAOzE,eAAe,SAAyB;AACtC,SAAO,WAAW,MAAM,iCAAiC,YAAY,QAAQ;;CAO/E,QAAQ,OAAwB;AAC9B,SAAO,WAAW,OAAO,iCAAiC,UAAU,MAAM;;CAO5E,gBAAgB,OAAwB;AACtC,SAAO,WAAW,OAAO,iCAAiC,mBAAmB,MAAM;;CAQrF,4BAA4B,OAAwB;AAClD,SAAO,WAAW,OAChB,iCAAiC,gCACjC,MACD;;CAQH,YAAY,OAAwB;AAClC,SAAO,WAAW,OAAO,iCAAiC,cAAc,MAAM;;CAUhF,UAAU,OAAwB;AAChC,SAAO,WAAW,OAAO,iCAAiC,YAAY,MAAM;;CAO9E,cAAc,OAAwB;AACpC,SAAO,WAAW,OAAO,iCAAiC,gBAAgB,MAAM;;CAclF,0BAAkC;AAChC,SAAO,WAAW,GAChB,WAAW,4BAA4B,KAAK,EAC5C,WAAW,YAAY,KAAK,EAC5B,WAAW,UAAU,KAAK,CAC3B;;CAEJ"}
|
|
@@ -88,5 +88,6 @@ function fieldTypeToProto(type) {
|
|
|
88
88
|
exports.fieldTypeToProto = fieldTypeToProto;
|
|
89
89
|
exports.protoToField = protoToField;
|
|
90
90
|
exports.protoToResource = protoToResource;
|
|
91
|
+
exports.resourceIsDeleted = resourceIsDeleted;
|
|
91
92
|
|
|
92
93
|
//# sourceMappingURL=type_conversion.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type_conversion.cjs","names":["createSignedResourceId","toResourceSignature","Resource_Kind","GrpcFieldType","Field_ValueStatus"],"sources":["../../src/core/type_conversion.ts"],"sourcesContent":["import type {\n Field,\n Resource,\n} from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types\";\nimport {\n Field_ValueStatus,\n Resource_Kind,\n} from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types\";\nimport { FieldType as GrpcFieldType } from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types\";\nimport type {\n FieldData,\n FieldStatus,\n OptionalSignedResourceId,\n FieldType,\n ResourceData,\n ResourceKind,\n} from \"./types\";\nimport {\n createSignedResourceId,\n NullSignedResourceId,\n toResourceSignature,\n NullResourceId,\n} from \"./types\";\nimport { assertNever, notEmpty } from \"@milaboratories/ts-helpers\";\nimport { throwPlNotFoundError } from \"./errors\";\n\nconst ResourceErrorField = \"resourceError\";\n\
|
|
1
|
+
{"version":3,"file":"type_conversion.cjs","names":["createSignedResourceId","toResourceSignature","Resource_Kind","GrpcFieldType","Field_ValueStatus"],"sources":["../../src/core/type_conversion.ts"],"sourcesContent":["import type {\n Field,\n Resource,\n} from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types\";\nimport {\n Field_ValueStatus,\n Resource_Kind,\n} from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types\";\nimport { FieldType as GrpcFieldType } from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types\";\nimport type {\n FieldData,\n FieldStatus,\n OptionalSignedResourceId,\n FieldType,\n ResourceData,\n ResourceKind,\n} from \"./types\";\nimport {\n createSignedResourceId,\n NullSignedResourceId,\n toResourceSignature,\n NullResourceId,\n} from \"./types\";\nimport { assertNever, notEmpty } from \"@milaboratories/ts-helpers\";\nimport { throwPlNotFoundError } from \"./errors\";\n\nconst ResourceErrorField = \"resourceError\";\n\nexport function resourceIsDeleted(proto: Resource): boolean {\n return proto.deletedTime !== undefined && proto.deletedTime.seconds !== 0n;\n}\n\nfunction protoIdToOptionalResourceId(id: bigint, signature?: Uint8Array): OptionalSignedResourceId {\n if (id === NullResourceId) return NullSignedResourceId;\n return createSignedResourceId(id, toResourceSignature(signature));\n}\n\n/** Throws \"native\" pl not found error, if resource is marked as deleted. */\nexport function protoToResource(proto: Resource): ResourceData {\n if (resourceIsDeleted(proto)) throwPlNotFoundError(\"resource deleted\");\n return {\n id: createSignedResourceId(proto.resourceId, toResourceSignature(proto.resourceSignature)),\n originalResourceId: protoIdToOptionalResourceId(\n proto.originalResourceId,\n proto.originalResourceSignature,\n ),\n type: notEmpty(proto.type),\n data: proto.data,\n inputsLocked: proto.inputsLocked,\n outputsLocked: proto.outputsLocked,\n resourceReady: proto.resourceReady,\n kind: protoToResourceKind(proto.kind),\n error: protoToError(proto),\n final: proto.isFinal,\n fields: proto.fields?.filter((f) => f.id!.fieldName !== ResourceErrorField).map(protoToField),\n };\n}\n\nfunction protoToResourceKind(proto: Resource_Kind): ResourceKind {\n switch (proto) {\n case Resource_Kind.STRUCTURAL:\n return \"Structural\";\n case Resource_Kind.VALUE:\n return \"Value\";\n }\n\n throw new Error(\"invalid ResourceKind: \" + proto);\n}\n\nfunction protoToError(proto: Resource): OptionalSignedResourceId {\n const f = proto.fields.find((f) => f?.id?.fieldName === ResourceErrorField);\n if (!f) return NullSignedResourceId;\n const errId = f.error ?? 0n;\n if (errId === 0n) return NullSignedResourceId;\n return createSignedResourceId(errId, toResourceSignature(f.errorSignature));\n}\n\nexport function protoToField(proto: Field): FieldData {\n return {\n name: notEmpty(proto.id?.fieldName),\n type: protoToFieldType(proto.type),\n status: protoToFieldStatus(proto.valueStatus),\n value: protoIdToOptionalResourceId(proto.value, proto.valueSignature),\n error: protoIdToOptionalResourceId(proto.error, proto.errorSignature),\n valueIsFinal: proto.valueIsFinal,\n };\n}\n\nfunction protoToFieldType(proto: GrpcFieldType): FieldType {\n switch (proto) {\n case GrpcFieldType.INPUT:\n return \"Input\";\n case GrpcFieldType.OUTPUT:\n return \"Output\";\n case GrpcFieldType.SERVICE:\n return \"Service\";\n case GrpcFieldType.ONE_TIME_WRITABLE:\n return \"OTW\";\n case GrpcFieldType.DYNAMIC:\n return \"Dynamic\";\n case GrpcFieldType.MULTIPLE_TIMES_WRITABLE:\n return \"MTW\";\n default:\n throw new Error(\"invalid FieldType: \" + proto);\n }\n}\n\nfunction protoToFieldStatus(proto: Field_ValueStatus): FieldStatus {\n switch (proto) {\n case Field_ValueStatus.EMPTY:\n return \"Empty\";\n case Field_ValueStatus.ASSIGNED:\n return \"Assigned\";\n case Field_ValueStatus.RESOLVED:\n return \"Resolved\";\n default:\n throw new Error(\"invalid FieldStatus: \" + proto);\n }\n}\n\nexport function fieldTypeToProto(type: FieldType): GrpcFieldType {\n switch (type) {\n case \"Input\":\n return GrpcFieldType.INPUT;\n case \"Output\":\n return GrpcFieldType.OUTPUT;\n case \"Dynamic\":\n return GrpcFieldType.DYNAMIC;\n case \"Service\":\n return GrpcFieldType.SERVICE;\n case \"MTW\":\n return GrpcFieldType.MULTIPLE_TIMES_WRITABLE;\n case \"OTW\":\n return GrpcFieldType.ONE_TIME_WRITABLE;\n default:\n return assertNever(type);\n }\n}\n"],"mappings":";;;;;;;AA0BA,MAAM,qBAAqB;AAE3B,SAAgB,kBAAkB,OAA0B;AAC1D,QAAO,MAAM,gBAAgB,KAAA,KAAa,MAAM,YAAY,YAAY;;AAG1E,SAAS,4BAA4B,IAAY,WAAkD;AACjG,KAAI,OAAA,GAAuB,QAAA;AAC3B,QAAOA,cAAAA,uBAAuB,IAAIC,cAAAA,oBAAoB,UAAU,CAAC;;;AAInE,SAAgB,gBAAgB,OAA+B;AAC7D,KAAI,kBAAkB,MAAM,CAAE,gBAAA,qBAAqB,mBAAmB;AACtE,QAAO;EACL,IAAID,cAAAA,uBAAuB,MAAM,YAAYC,cAAAA,oBAAoB,MAAM,kBAAkB,CAAC;EAC1F,oBAAoB,4BAClB,MAAM,oBACN,MAAM,0BACP;EACD,OAAA,GAAA,2BAAA,UAAe,MAAM,KAAK;EAC1B,MAAM,MAAM;EACZ,cAAc,MAAM;EACpB,eAAe,MAAM;EACrB,eAAe,MAAM;EACrB,MAAM,oBAAoB,MAAM,KAAK;EACrC,OAAO,aAAa,MAAM;EAC1B,OAAO,MAAM;EACb,QAAQ,MAAM,QAAQ,QAAQ,MAAM,EAAE,GAAI,cAAc,mBAAmB,CAAC,IAAI,aAAa;EAC9F;;AAGH,SAAS,oBAAoB,OAAoC;AAC/D,SAAQ,OAAR;EACE,KAAKC,kBAAAA,cAAc,WACjB,QAAO;EACT,KAAKA,kBAAAA,cAAc,MACjB,QAAO;;AAGX,OAAM,IAAI,MAAM,2BAA2B,MAAM;;AAGnD,SAAS,aAAa,OAA2C;CAC/D,MAAM,IAAI,MAAM,OAAO,MAAM,MAAM,GAAG,IAAI,cAAc,mBAAmB;AAC3E,KAAI,CAAC,EAAG,QAAA;CACR,MAAM,QAAQ,EAAE,SAAS;AACzB,KAAI,UAAU,GAAI,QAAA;AAClB,QAAOF,cAAAA,uBAAuB,OAAOC,cAAAA,oBAAoB,EAAE,eAAe,CAAC;;AAG7E,SAAgB,aAAa,OAAyB;AACpD,QAAO;EACL,OAAA,GAAA,2BAAA,UAAe,MAAM,IAAI,UAAU;EACnC,MAAM,iBAAiB,MAAM,KAAK;EAClC,QAAQ,mBAAmB,MAAM,YAAY;EAC7C,OAAO,4BAA4B,MAAM,OAAO,MAAM,eAAe;EACrE,OAAO,4BAA4B,MAAM,OAAO,MAAM,eAAe;EACrE,cAAc,MAAM;EACrB;;AAGH,SAAS,iBAAiB,OAAiC;AACzD,SAAQ,OAAR;EACE,KAAKE,mBAAAA,UAAc,MACjB,QAAO;EACT,KAAKA,mBAAAA,UAAc,OACjB,QAAO;EACT,KAAKA,mBAAAA,UAAc,QACjB,QAAO;EACT,KAAKA,mBAAAA,UAAc,kBACjB,QAAO;EACT,KAAKA,mBAAAA,UAAc,QACjB,QAAO;EACT,KAAKA,mBAAAA,UAAc,wBACjB,QAAO;EACT,QACE,OAAM,IAAI,MAAM,wBAAwB,MAAM;;;AAIpD,SAAS,mBAAmB,OAAuC;AACjE,SAAQ,OAAR;EACE,KAAKC,kBAAAA,kBAAkB,MACrB,QAAO;EACT,KAAKA,kBAAAA,kBAAkB,SACrB,QAAO;EACT,KAAKA,kBAAAA,kBAAkB,SACrB,QAAO;EACT,QACE,OAAM,IAAI,MAAM,0BAA0B,MAAM;;;AAItD,SAAgB,iBAAiB,MAAgC;AAC/D,SAAQ,MAAR;EACE,KAAK,QACH,QAAOD,mBAAAA,UAAc;EACvB,KAAK,SACH,QAAOA,mBAAAA,UAAc;EACvB,KAAK,UACH,QAAOA,mBAAAA,UAAc;EACvB,KAAK,UACH,QAAOA,mBAAAA,UAAc;EACvB,KAAK,MACH,QAAOA,mBAAAA,UAAc;EACvB,KAAK,MACH,QAAOA,mBAAAA,UAAc;EACvB,QACE,SAAA,GAAA,2BAAA,aAAmB,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type_conversion.js","names":["GrpcFieldType"],"sources":["../../src/core/type_conversion.ts"],"sourcesContent":["import type {\n Field,\n Resource,\n} from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types\";\nimport {\n Field_ValueStatus,\n Resource_Kind,\n} from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types\";\nimport { FieldType as GrpcFieldType } from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types\";\nimport type {\n FieldData,\n FieldStatus,\n OptionalSignedResourceId,\n FieldType,\n ResourceData,\n ResourceKind,\n} from \"./types\";\nimport {\n createSignedResourceId,\n NullSignedResourceId,\n toResourceSignature,\n NullResourceId,\n} from \"./types\";\nimport { assertNever, notEmpty } from \"@milaboratories/ts-helpers\";\nimport { throwPlNotFoundError } from \"./errors\";\n\nconst ResourceErrorField = \"resourceError\";\n\
|
|
1
|
+
{"version":3,"file":"type_conversion.js","names":["GrpcFieldType"],"sources":["../../src/core/type_conversion.ts"],"sourcesContent":["import type {\n Field,\n Resource,\n} from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types\";\nimport {\n Field_ValueStatus,\n Resource_Kind,\n} from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api_types\";\nimport { FieldType as GrpcFieldType } from \"../proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/base_types\";\nimport type {\n FieldData,\n FieldStatus,\n OptionalSignedResourceId,\n FieldType,\n ResourceData,\n ResourceKind,\n} from \"./types\";\nimport {\n createSignedResourceId,\n NullSignedResourceId,\n toResourceSignature,\n NullResourceId,\n} from \"./types\";\nimport { assertNever, notEmpty } from \"@milaboratories/ts-helpers\";\nimport { throwPlNotFoundError } from \"./errors\";\n\nconst ResourceErrorField = \"resourceError\";\n\nexport function resourceIsDeleted(proto: Resource): boolean {\n return proto.deletedTime !== undefined && proto.deletedTime.seconds !== 0n;\n}\n\nfunction protoIdToOptionalResourceId(id: bigint, signature?: Uint8Array): OptionalSignedResourceId {\n if (id === NullResourceId) return NullSignedResourceId;\n return createSignedResourceId(id, toResourceSignature(signature));\n}\n\n/** Throws \"native\" pl not found error, if resource is marked as deleted. */\nexport function protoToResource(proto: Resource): ResourceData {\n if (resourceIsDeleted(proto)) throwPlNotFoundError(\"resource deleted\");\n return {\n id: createSignedResourceId(proto.resourceId, toResourceSignature(proto.resourceSignature)),\n originalResourceId: protoIdToOptionalResourceId(\n proto.originalResourceId,\n proto.originalResourceSignature,\n ),\n type: notEmpty(proto.type),\n data: proto.data,\n inputsLocked: proto.inputsLocked,\n outputsLocked: proto.outputsLocked,\n resourceReady: proto.resourceReady,\n kind: protoToResourceKind(proto.kind),\n error: protoToError(proto),\n final: proto.isFinal,\n fields: proto.fields?.filter((f) => f.id!.fieldName !== ResourceErrorField).map(protoToField),\n };\n}\n\nfunction protoToResourceKind(proto: Resource_Kind): ResourceKind {\n switch (proto) {\n case Resource_Kind.STRUCTURAL:\n return \"Structural\";\n case Resource_Kind.VALUE:\n return \"Value\";\n }\n\n throw new Error(\"invalid ResourceKind: \" + proto);\n}\n\nfunction protoToError(proto: Resource): OptionalSignedResourceId {\n const f = proto.fields.find((f) => f?.id?.fieldName === ResourceErrorField);\n if (!f) return NullSignedResourceId;\n const errId = f.error ?? 0n;\n if (errId === 0n) return NullSignedResourceId;\n return createSignedResourceId(errId, toResourceSignature(f.errorSignature));\n}\n\nexport function protoToField(proto: Field): FieldData {\n return {\n name: notEmpty(proto.id?.fieldName),\n type: protoToFieldType(proto.type),\n status: protoToFieldStatus(proto.valueStatus),\n value: protoIdToOptionalResourceId(proto.value, proto.valueSignature),\n error: protoIdToOptionalResourceId(proto.error, proto.errorSignature),\n valueIsFinal: proto.valueIsFinal,\n };\n}\n\nfunction protoToFieldType(proto: GrpcFieldType): FieldType {\n switch (proto) {\n case GrpcFieldType.INPUT:\n return \"Input\";\n case GrpcFieldType.OUTPUT:\n return \"Output\";\n case GrpcFieldType.SERVICE:\n return \"Service\";\n case GrpcFieldType.ONE_TIME_WRITABLE:\n return \"OTW\";\n case GrpcFieldType.DYNAMIC:\n return \"Dynamic\";\n case GrpcFieldType.MULTIPLE_TIMES_WRITABLE:\n return \"MTW\";\n default:\n throw new Error(\"invalid FieldType: \" + proto);\n }\n}\n\nfunction protoToFieldStatus(proto: Field_ValueStatus): FieldStatus {\n switch (proto) {\n case Field_ValueStatus.EMPTY:\n return \"Empty\";\n case Field_ValueStatus.ASSIGNED:\n return \"Assigned\";\n case Field_ValueStatus.RESOLVED:\n return \"Resolved\";\n default:\n throw new Error(\"invalid FieldStatus: \" + proto);\n }\n}\n\nexport function fieldTypeToProto(type: FieldType): GrpcFieldType {\n switch (type) {\n case \"Input\":\n return GrpcFieldType.INPUT;\n case \"Output\":\n return GrpcFieldType.OUTPUT;\n case \"Dynamic\":\n return GrpcFieldType.DYNAMIC;\n case \"Service\":\n return GrpcFieldType.SERVICE;\n case \"MTW\":\n return GrpcFieldType.MULTIPLE_TIMES_WRITABLE;\n case \"OTW\":\n return GrpcFieldType.ONE_TIME_WRITABLE;\n default:\n return assertNever(type);\n }\n}\n"],"mappings":";;;;;;AA0BA,MAAM,qBAAqB;AAE3B,SAAgB,kBAAkB,OAA0B;AAC1D,QAAO,MAAM,gBAAgB,KAAA,KAAa,MAAM,YAAY,YAAY;;AAG1E,SAAS,4BAA4B,IAAY,WAAkD;AACjG,KAAI,OAAA,GAAuB,QAAA;AAC3B,QAAO,uBAAuB,IAAI,oBAAoB,UAAU,CAAC;;;AAInE,SAAgB,gBAAgB,OAA+B;AAC7D,KAAI,kBAAkB,MAAM,CAAE,sBAAqB,mBAAmB;AACtE,QAAO;EACL,IAAI,uBAAuB,MAAM,YAAY,oBAAoB,MAAM,kBAAkB,CAAC;EAC1F,oBAAoB,4BAClB,MAAM,oBACN,MAAM,0BACP;EACD,MAAM,SAAS,MAAM,KAAK;EAC1B,MAAM,MAAM;EACZ,cAAc,MAAM;EACpB,eAAe,MAAM;EACrB,eAAe,MAAM;EACrB,MAAM,oBAAoB,MAAM,KAAK;EACrC,OAAO,aAAa,MAAM;EAC1B,OAAO,MAAM;EACb,QAAQ,MAAM,QAAQ,QAAQ,MAAM,EAAE,GAAI,cAAc,mBAAmB,CAAC,IAAI,aAAa;EAC9F;;AAGH,SAAS,oBAAoB,OAAoC;AAC/D,SAAQ,OAAR;EACE,KAAK,cAAc,WACjB,QAAO;EACT,KAAK,cAAc,MACjB,QAAO;;AAGX,OAAM,IAAI,MAAM,2BAA2B,MAAM;;AAGnD,SAAS,aAAa,OAA2C;CAC/D,MAAM,IAAI,MAAM,OAAO,MAAM,MAAM,GAAG,IAAI,cAAc,mBAAmB;AAC3E,KAAI,CAAC,EAAG,QAAA;CACR,MAAM,QAAQ,EAAE,SAAS;AACzB,KAAI,UAAU,GAAI,QAAA;AAClB,QAAO,uBAAuB,OAAO,oBAAoB,EAAE,eAAe,CAAC;;AAG7E,SAAgB,aAAa,OAAyB;AACpD,QAAO;EACL,MAAM,SAAS,MAAM,IAAI,UAAU;EACnC,MAAM,iBAAiB,MAAM,KAAK;EAClC,QAAQ,mBAAmB,MAAM,YAAY;EAC7C,OAAO,4BAA4B,MAAM,OAAO,MAAM,eAAe;EACrE,OAAO,4BAA4B,MAAM,OAAO,MAAM,eAAe;EACrE,cAAc,MAAM;EACrB;;AAGH,SAAS,iBAAiB,OAAiC;AACzD,SAAQ,OAAR;EACE,KAAKA,UAAc,MACjB,QAAO;EACT,KAAKA,UAAc,OACjB,QAAO;EACT,KAAKA,UAAc,QACjB,QAAO;EACT,KAAKA,UAAc,kBACjB,QAAO;EACT,KAAKA,UAAc,QACjB,QAAO;EACT,KAAKA,UAAc,wBACjB,QAAO;EACT,QACE,OAAM,IAAI,MAAM,wBAAwB,MAAM;;;AAIpD,SAAS,mBAAmB,OAAuC;AACjE,SAAQ,OAAR;EACE,KAAK,kBAAkB,MACrB,QAAO;EACT,KAAK,kBAAkB,SACrB,QAAO;EACT,KAAK,kBAAkB,SACrB,QAAO;EACT,QACE,OAAM,IAAI,MAAM,0BAA0B,MAAM;;;AAItD,SAAgB,iBAAiB,MAAgC;AAC/D,SAAQ,MAAR;EACE,KAAK,QACH,QAAOA,UAAc;EACvB,KAAK,SACH,QAAOA,UAAc;EACvB,KAAK,UACH,QAAOA,UAAc;EACvB,KAAK,UACH,QAAOA,UAAc;EACvB,KAAK,MACH,QAAOA,UAAc;EACvB,KAAK,MACH,QAAOA,UAAc;EACvB,QACE,QAAO,YAAY,KAAK"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("./_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_types = require("./core/types.cjs");
|
|
4
|
+
const require_api = require("./proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.cjs");
|
|
4
5
|
const require_errors = require("./core/errors.cjs");
|
|
5
6
|
const require_transaction = require("./core/transaction.cjs");
|
|
6
7
|
const require_pl = require("./helpers/pl.cjs");
|
|
@@ -13,6 +14,7 @@ const require_client = require("./core/client.cjs");
|
|
|
13
14
|
const require_driver = require("./core/driver.cjs");
|
|
14
15
|
const require_unauth_client = require("./core/unauth_client.cjs");
|
|
15
16
|
const require_default_client = require("./core/default_client.cjs");
|
|
17
|
+
const require_tree_filter = require("./core/tree_filter.cjs");
|
|
16
18
|
const require_tx_helpers = require("./helpers/tx_helpers.cjs");
|
|
17
19
|
const require_poll = require("./helpers/poll.cjs");
|
|
18
20
|
const require_test_config = require("./test/test_config.cjs");
|
|
@@ -35,6 +37,8 @@ exports.DefaultFinalResourceDataPredicate = require_final.DefaultFinalResourceDa
|
|
|
35
37
|
exports.DefaultPollingRetryOptions = require_poll.DefaultPollingRetryOptions;
|
|
36
38
|
exports.DefaultRetryOptions = require_config.DefaultRetryOptions;
|
|
37
39
|
exports.DisconnectedError = require_errors.DisconnectedError;
|
|
40
|
+
exports.FilterOperatorType = require_api.ResourceAPI_Tree_Filter_OperatorType;
|
|
41
|
+
exports.FilterProperty = require_api.ResourceAPI_Tree_Filter_Property;
|
|
38
42
|
exports.MaxLocalId = require_types.MaxLocalId;
|
|
39
43
|
exports.MaxTxId = require_types.MaxTxId;
|
|
40
44
|
exports.NullResourceId = require_types.NullResourceId;
|
|
@@ -129,5 +133,6 @@ exports.toFieldId = require_transaction.toFieldId;
|
|
|
129
133
|
exports.toGlobalFieldId = require_transaction.toGlobalFieldId;
|
|
130
134
|
exports.toGlobalResourceId = require_transaction.toGlobalResourceId;
|
|
131
135
|
exports.toResourceSignature = require_types.toResourceSignature;
|
|
136
|
+
exports.treeFilter = require_tree_filter.treeFilter;
|
|
132
137
|
exports.tryGetFileConfig = require_default_client.tryGetFileConfig;
|
|
133
138
|
exports.valErr = require_tx_helpers.valErr;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnyResourceId, BasicResourceData, ColorProof, FieldData, FieldStatus, FieldType, FutureFieldType, GlobalResourceId, LocalResourceId, MaxLocalId, MaxTxId, NullResourceId, NullSignedResourceId, OptionalAnyResourceId, OptionalSignedResourceId, ResourceData, ResourceKind, ResourceSignature, ResourceType, SignedResourceId, anyResourceIdToBigint, base64UrlToSignature, checkLocalityOfResourceId, createGlobalResourceId, createLocalResourceId, createSignedResourceId, ensureSignedResourceIdNotNull, extractBasicResourceData, extractTxId, getField, isAnyResourceId, isLocalResourceId, isNotNullSignedResourceId, isNullSignedResourceId, isRootResourceId, isSignedResourceId, jsonToData, parseResourceType, parseSignedResourceId, resDataToJson, resourceIdFromString, resourceIdToString, resourceType, resourceTypeToString, resourceTypesEqual, signatureToBase64Url, stringifyWithResourceId, toResourceSignature } from "./core/types.js";
|
|
2
|
+
import { ResourceAPI_Tree_Filter, ResourceAPI_Tree_Filter_OperatorType, ResourceAPI_Tree_Filter_Property } from "./proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js";
|
|
2
3
|
import { DefaultFinalResourceDataPredicate, FinalResourceDataPredicate, ResourceTypeName, ResourceTypePrefix } from "./core/final.js";
|
|
3
|
-
import { AnyFieldId, AnyFieldRef, AnyRef, AnyResourceRef, FieldId, FieldRef, KeyValue, KeyValueString, LocalFieldId, PlTransaction, ResourceIdWithSignature, ResourceRef, TxCommitConflict, field, isField, isFieldRef, isResource, isResourceId, isResourceRef, toFieldId, toGlobalFieldId, toGlobalResourceId } from "./core/transaction.js";
|
|
4
|
+
import { AnyFieldId, AnyFieldRef, AnyRef, AnyResourceRef, FieldId, FieldRef, KeyValue, KeyValueString, LocalFieldId, PlTransaction, ResourceIdWithSignature, ResourceRef, ResourceTreeFrame, ResourceTreeItem, TxCommitConflict, field, isField, isFieldRef, isResource, isResourceId, isResourceRef, toFieldId, toGlobalFieldId, toGlobalResourceId } from "./core/transaction.js";
|
|
4
5
|
import { pl_d_exports } from "./helpers/pl.js";
|
|
5
6
|
import { AnonymousAuthInformation, AuthInformation, AuthOps, DEFAULT_AUTH_MAX_REFRESH, DEFAULT_MAX_CACHE_BYTES, DEFAULT_REQUEST_TIMEOUT, DEFAULT_RETRY_BACKOFF_ALGORITHM, DEFAULT_RETRY_EXPONENTIAL_BACKOFF_MULTIPLIER, DEFAULT_RETRY_INITIAL_DELAY, DEFAULT_RETRY_JITTER, DEFAULT_RETRY_LINEAR_BACKOFF_STEP, DEFAULT_RETRY_MAX_ATTEMPTS, DEFAULT_RO_TX_TIMEOUT, DEFAULT_RW_TX_TIMEOUT, DEFAULT_TOKEN_TTL_SECONDS, DefaultRetryOptions, PlClientConfig, PlConnectionStatus, PlConnectionStatusListener, SUPPORTED_WIRE_PROTOCOLS, plAddressToConfig, wireProtocol } from "./core/config.js";
|
|
6
7
|
import { GrpcConnection, RestConnection, WireClientProvider, WireClientProviderFactory, WireConnection } from "./core/wire.js";
|
|
@@ -12,7 +13,8 @@ import { DisconnectedError, PermissionDeniedError, PlError, PlErrorCodeNotFound,
|
|
|
12
13
|
import { defaultPlClient, tryGetFileConfig } from "./core/default_client.js";
|
|
13
14
|
import { UnauthenticatedPlClient } from "./core/unauth_client.js";
|
|
14
15
|
import { expirationFromAuthInformation, inferAuthRefreshTime } from "./core/auth.js";
|
|
16
|
+
import { Filter, Property, treeFilter } from "./core/tree_filter.js";
|
|
15
17
|
import { ValErr, valErr } from "./helpers/tx_helpers.js";
|
|
16
18
|
import { ContinuePolling, DefaultPollingRetryOptions, PollFieldTraverseOps, PollResourceAccessor, PollTxAccessor, poll } from "./helpers/poll.js";
|
|
17
19
|
import { test_config_d_exports } from "./test/test_config.js";
|
|
18
|
-
export { AnonymousAuthInformation, AnyFieldId, AnyFieldRef, AnyRef, AnyResourceId, AnyResourceRef, AuthInformation, AuthOps, BasicResourceData, ColorProof, ContinuePolling, DEFAULT_AUTH_MAX_REFRESH, DEFAULT_MAX_CACHE_BYTES, DEFAULT_REQUEST_TIMEOUT, DEFAULT_RETRY_BACKOFF_ALGORITHM, DEFAULT_RETRY_EXPONENTIAL_BACKOFF_MULTIPLIER, DEFAULT_RETRY_INITIAL_DELAY, DEFAULT_RETRY_JITTER, DEFAULT_RETRY_LINEAR_BACKOFF_STEP, DEFAULT_RETRY_MAX_ATTEMPTS, DEFAULT_RO_TX_TIMEOUT, DEFAULT_RW_TX_TIMEOUT, DEFAULT_TOKEN_TTL_SECONDS, DefaultFinalResourceDataPredicate, DefaultPollingRetryOptions, DefaultRetryOptions, DisconnectedError, FieldData, FieldId, FieldRef, FieldStatus, FieldType, FinalResourceDataPredicate, FutureFieldType, GlobalResourceId, GrpcConnection, KeyValue, KeyValueString, LocalFieldId, LocalResourceId, MaxLocalId, MaxTxId, NullResourceId, NullSignedResourceId, OptionalAnyResourceId, OptionalSignedResourceId, PermissionDeniedError, pl_d_exports as Pl, PlClient, PlClientConfig, PlConnectionStatus, PlConnectionStatusListener, PlDriver, PlDriverDefinition, PlError, PlErrorCodeNotFound, PlTransaction, PollFieldTraverseOps, PollResourceAccessor, PollTxAccessor, RESTError, RecoverablePlError, ResourceData, ResourceIdWithSignature, ResourceKind, ResourceRef, ResourceSignature, ResourceType, ResourceTypeName, ResourceTypePrefix, index_d_exports as RestAPI, RestConnection, SUPPORTED_WIRE_PROTOCOLS, SignedResourceId, StorageInfo, test_config_d_exports as TestHelpers, TxCommitConflict, TxOps, TxRunner, UnauthenticatedError, UnauthenticatedPlClient, UnrecoverablePlError, UserResources, ValErr, WireClientProvider, WireClientProviderFactory, WireConnection, addRTypeToMetadata, anyResourceIdToBigint, base64UrlToSignature, checkLocalityOfResourceId, createGlobalResourceId, createLocalResourceId, createRTypeRoutingHeader, createSignedResourceId, defaultPlClient, ensureSignedResourceIdNotNull, expirationFromAuthInformation, extractBasicResourceData, extractTxId, field, getField, inferAuthRefreshTime, isAbortedError, isAnyResourceId, isCancelError, isConnectionProblem, isField, isFieldRef, isLocalResourceId, isNotFoundError, isNotNullSignedResourceId, isNullSignedResourceId, isPermissionDenied, isResource, isResourceId, isResourceRef, isRootResourceId, isSignedResourceId, isTimeoutError, isTimeoutOrCancelError, isUnauthenticated, isUnimplementedError, jsonToData, parseResourceType, parseSignedResourceId, plAddressToConfig, poll, resDataToJson, resourceIdFromString, resourceIdToString, resourceType, resourceTypeToString, resourceTypesEqual, rethrowMeaningfulError, signatureToBase64Url, stringifyWithResourceId, throwPlNotFoundError, toFieldId, toGlobalFieldId, toGlobalResourceId, toResourceSignature, tryGetFileConfig, valErr, wireProtocol };
|
|
20
|
+
export { AnonymousAuthInformation, AnyFieldId, AnyFieldRef, AnyRef, AnyResourceId, AnyResourceRef, AuthInformation, AuthOps, BasicResourceData, ColorProof, ContinuePolling, DEFAULT_AUTH_MAX_REFRESH, DEFAULT_MAX_CACHE_BYTES, DEFAULT_REQUEST_TIMEOUT, DEFAULT_RETRY_BACKOFF_ALGORITHM, DEFAULT_RETRY_EXPONENTIAL_BACKOFF_MULTIPLIER, DEFAULT_RETRY_INITIAL_DELAY, DEFAULT_RETRY_JITTER, DEFAULT_RETRY_LINEAR_BACKOFF_STEP, DEFAULT_RETRY_MAX_ATTEMPTS, DEFAULT_RO_TX_TIMEOUT, DEFAULT_RW_TX_TIMEOUT, DEFAULT_TOKEN_TTL_SECONDS, DefaultFinalResourceDataPredicate, DefaultPollingRetryOptions, DefaultRetryOptions, DisconnectedError, FieldData, FieldId, FieldRef, FieldStatus, FieldType, Filter, ResourceAPI_Tree_Filter_OperatorType as FilterOperatorType, ResourceAPI_Tree_Filter_Property as FilterProperty, FinalResourceDataPredicate, FutureFieldType, GlobalResourceId, GrpcConnection, KeyValue, KeyValueString, LocalFieldId, LocalResourceId, MaxLocalId, MaxTxId, NullResourceId, NullSignedResourceId, OptionalAnyResourceId, OptionalSignedResourceId, PermissionDeniedError, pl_d_exports as Pl, PlClient, PlClientConfig, PlConnectionStatus, PlConnectionStatusListener, PlDriver, PlDriverDefinition, PlError, PlErrorCodeNotFound, PlTransaction, PollFieldTraverseOps, PollResourceAccessor, PollTxAccessor, Property, RESTError, RecoverablePlError, ResourceAPI_Tree_Filter, ResourceData, ResourceIdWithSignature, ResourceKind, ResourceRef, ResourceSignature, ResourceTreeFrame, ResourceTreeItem, ResourceType, ResourceTypeName, ResourceTypePrefix, index_d_exports as RestAPI, RestConnection, SUPPORTED_WIRE_PROTOCOLS, SignedResourceId, StorageInfo, test_config_d_exports as TestHelpers, TxCommitConflict, TxOps, TxRunner, UnauthenticatedError, UnauthenticatedPlClient, UnrecoverablePlError, UserResources, ValErr, WireClientProvider, WireClientProviderFactory, WireConnection, addRTypeToMetadata, anyResourceIdToBigint, base64UrlToSignature, checkLocalityOfResourceId, createGlobalResourceId, createLocalResourceId, createRTypeRoutingHeader, createSignedResourceId, defaultPlClient, ensureSignedResourceIdNotNull, expirationFromAuthInformation, extractBasicResourceData, extractTxId, field, getField, inferAuthRefreshTime, isAbortedError, isAnyResourceId, isCancelError, isConnectionProblem, isField, isFieldRef, isLocalResourceId, isNotFoundError, isNotNullSignedResourceId, isNullSignedResourceId, isPermissionDenied, isResource, isResourceId, isResourceRef, isRootResourceId, isSignedResourceId, isTimeoutError, isTimeoutOrCancelError, isUnauthenticated, isUnimplementedError, jsonToData, parseResourceType, parseSignedResourceId, plAddressToConfig, poll, resDataToJson, resourceIdFromString, resourceIdToString, resourceType, resourceTypeToString, resourceTypesEqual, rethrowMeaningfulError, signatureToBase64Url, stringifyWithResourceId, throwPlNotFoundError, toFieldId, toGlobalFieldId, toGlobalResourceId, toResourceSignature, treeFilter, tryGetFileConfig, valErr, wireProtocol };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MaxLocalId, MaxTxId, NullResourceId, NullSignedResourceId, anyResourceIdToBigint, base64UrlToSignature, checkLocalityOfResourceId, createGlobalResourceId, createLocalResourceId, createSignedResourceId, ensureSignedResourceIdNotNull, extractBasicResourceData, extractTxId, getField, isAnyResourceId, isLocalResourceId, isNotNullSignedResourceId, isNullSignedResourceId, isRootResourceId, isSignedResourceId, jsonToData, parseResourceType, parseSignedResourceId, resDataToJson, resourceIdFromString, resourceIdToString, resourceType, resourceTypeToString, resourceTypesEqual, signatureToBase64Url, stringifyWithResourceId, toResourceSignature } from "./core/types.js";
|
|
2
|
+
import { ResourceAPI_Tree_Filter_OperatorType, ResourceAPI_Tree_Filter_Property } from "./proto-grpc/github.com/milaboratory/pl/plapi/plapiproto/api.js";
|
|
2
3
|
import { DisconnectedError, PermissionDeniedError, PlError, PlErrorCodeNotFound, RESTError, RecoverablePlError, UnauthenticatedError, UnrecoverablePlError, isAbortedError, isCancelError, isConnectionProblem, isNotFoundError, isPermissionDenied, isTimeoutError, isTimeoutOrCancelError, isUnauthenticated, isUnimplementedError, rethrowMeaningfulError, throwPlNotFoundError } from "./core/errors.js";
|
|
3
4
|
import { PlTransaction, TxCommitConflict, field, isField, isFieldRef, isResource, isResourceId, isResourceRef, toFieldId, toGlobalFieldId, toGlobalResourceId } from "./core/transaction.js";
|
|
4
5
|
import { pl_exports } from "./helpers/pl.js";
|
|
@@ -11,7 +12,8 @@ import { PlClient } from "./core/client.js";
|
|
|
11
12
|
import { addRTypeToMetadata, createRTypeRoutingHeader } from "./core/driver.js";
|
|
12
13
|
import { UnauthenticatedPlClient } from "./core/unauth_client.js";
|
|
13
14
|
import { defaultPlClient, tryGetFileConfig } from "./core/default_client.js";
|
|
15
|
+
import { treeFilter } from "./core/tree_filter.js";
|
|
14
16
|
import { valErr } from "./helpers/tx_helpers.js";
|
|
15
17
|
import { ContinuePolling, DefaultPollingRetryOptions, PollResourceAccessor, PollTxAccessor, poll } from "./helpers/poll.js";
|
|
16
18
|
import { test_config_exports } from "./test/test_config.js";
|
|
17
|
-
export { AnonymousAuthInformation, ContinuePolling, DEFAULT_AUTH_MAX_REFRESH, DEFAULT_MAX_CACHE_BYTES, DEFAULT_REQUEST_TIMEOUT, DEFAULT_RETRY_BACKOFF_ALGORITHM, DEFAULT_RETRY_EXPONENTIAL_BACKOFF_MULTIPLIER, DEFAULT_RETRY_INITIAL_DELAY, DEFAULT_RETRY_JITTER, DEFAULT_RETRY_LINEAR_BACKOFF_STEP, DEFAULT_RETRY_MAX_ATTEMPTS, DEFAULT_RO_TX_TIMEOUT, DEFAULT_RW_TX_TIMEOUT, DEFAULT_TOKEN_TTL_SECONDS, DefaultFinalResourceDataPredicate, DefaultPollingRetryOptions, DefaultRetryOptions, DisconnectedError, MaxLocalId, MaxTxId, NullResourceId, NullSignedResourceId, PermissionDeniedError, pl_exports as Pl, PlClient, PlError, PlErrorCodeNotFound, PlTransaction, PollResourceAccessor, PollTxAccessor, RESTError, RecoverablePlError, ResourceTypeName, ResourceTypePrefix, proto_rest_exports as RestAPI, SUPPORTED_WIRE_PROTOCOLS, test_config_exports as TestHelpers, TxCommitConflict, UnauthenticatedError, UnauthenticatedPlClient, UnrecoverablePlError, UserResources, addRTypeToMetadata, anyResourceIdToBigint, base64UrlToSignature, checkLocalityOfResourceId, createGlobalResourceId, createLocalResourceId, createRTypeRoutingHeader, createSignedResourceId, defaultPlClient, ensureSignedResourceIdNotNull, expirationFromAuthInformation, extractBasicResourceData, extractTxId, field, getField, inferAuthRefreshTime, isAbortedError, isAnyResourceId, isCancelError, isConnectionProblem, isField, isFieldRef, isLocalResourceId, isNotFoundError, isNotNullSignedResourceId, isNullSignedResourceId, isPermissionDenied, isResource, isResourceId, isResourceRef, isRootResourceId, isSignedResourceId, isTimeoutError, isTimeoutOrCancelError, isUnauthenticated, isUnimplementedError, jsonToData, parseResourceType, parseSignedResourceId, plAddressToConfig, poll, resDataToJson, resourceIdFromString, resourceIdToString, resourceType, resourceTypeToString, resourceTypesEqual, rethrowMeaningfulError, signatureToBase64Url, stringifyWithResourceId, throwPlNotFoundError, toFieldId, toGlobalFieldId, toGlobalResourceId, toResourceSignature, tryGetFileConfig, valErr };
|
|
19
|
+
export { AnonymousAuthInformation, ContinuePolling, DEFAULT_AUTH_MAX_REFRESH, DEFAULT_MAX_CACHE_BYTES, DEFAULT_REQUEST_TIMEOUT, DEFAULT_RETRY_BACKOFF_ALGORITHM, DEFAULT_RETRY_EXPONENTIAL_BACKOFF_MULTIPLIER, DEFAULT_RETRY_INITIAL_DELAY, DEFAULT_RETRY_JITTER, DEFAULT_RETRY_LINEAR_BACKOFF_STEP, DEFAULT_RETRY_MAX_ATTEMPTS, DEFAULT_RO_TX_TIMEOUT, DEFAULT_RW_TX_TIMEOUT, DEFAULT_TOKEN_TTL_SECONDS, DefaultFinalResourceDataPredicate, DefaultPollingRetryOptions, DefaultRetryOptions, DisconnectedError, ResourceAPI_Tree_Filter_OperatorType as FilterOperatorType, ResourceAPI_Tree_Filter_Property as FilterProperty, MaxLocalId, MaxTxId, NullResourceId, NullSignedResourceId, PermissionDeniedError, pl_exports as Pl, PlClient, PlError, PlErrorCodeNotFound, PlTransaction, PollResourceAccessor, PollTxAccessor, RESTError, RecoverablePlError, ResourceTypeName, ResourceTypePrefix, proto_rest_exports as RestAPI, SUPPORTED_WIRE_PROTOCOLS, test_config_exports as TestHelpers, TxCommitConflict, UnauthenticatedError, UnauthenticatedPlClient, UnrecoverablePlError, UserResources, addRTypeToMetadata, anyResourceIdToBigint, base64UrlToSignature, checkLocalityOfResourceId, createGlobalResourceId, createLocalResourceId, createRTypeRoutingHeader, createSignedResourceId, defaultPlClient, ensureSignedResourceIdNotNull, expirationFromAuthInformation, extractBasicResourceData, extractTxId, field, getField, inferAuthRefreshTime, isAbortedError, isAnyResourceId, isCancelError, isConnectionProblem, isField, isFieldRef, isLocalResourceId, isNotFoundError, isNotNullSignedResourceId, isNullSignedResourceId, isPermissionDenied, isResource, isResourceId, isResourceRef, isRootResourceId, isSignedResourceId, isTimeoutError, isTimeoutOrCancelError, isUnauthenticated, isUnimplementedError, jsonToData, parseResourceType, parseSignedResourceId, plAddressToConfig, poll, resDataToJson, resourceIdFromString, resourceIdToString, resourceType, resourceTypeToString, resourceTypesEqual, rethrowMeaningfulError, signatureToBase64Url, stringifyWithResourceId, throwPlNotFoundError, toFieldId, toGlobalFieldId, toGlobalResourceId, toResourceSignature, treeFilter, tryGetFileConfig, valErr };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.cjs","names":["MessageType","Any","UnknownFieldHandler","WireType"],"sources":["../../../../../../../src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"github.com/googleapis/googleapis/google/rpc/status.proto\" (package \"google.rpc\", syntax proto3)\n// tslint:disable\n//\n// Copyright
|
|
1
|
+
{"version":3,"file":"status.cjs","names":["MessageType","Any","UnknownFieldHandler","WireType"],"sources":["../../../../../../../src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"github.com/googleapis/googleapis/google/rpc/status.proto\" (package \"google.rpc\", syntax proto3)\n// tslint:disable\n//\n// Copyright 2026 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\nimport type { BinaryWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryWriter } from \"@protobuf-ts/runtime\";\nimport { WireType } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryReader } from \"@protobuf-ts/runtime\";\nimport { UnknownFieldHandler } from \"@protobuf-ts/runtime\";\nimport type { PartialMessage } from \"@protobuf-ts/runtime\";\nimport { reflectionMergePartial } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\nimport { Any } from \"../../../../../google/protobuf/any\";\n/**\n * The `Status` type defines a logical error model that is suitable for\n * different programming environments, including REST APIs and RPC APIs. It is\n * used by [gRPC](https://github.com/grpc). Each `Status` message contains\n * three pieces of data: error code, error message, and error details.\n *\n * You can find out more about this error model and how to work with it in the\n * [API Design Guide](https://cloud.google.com/apis/design/errors).\n *\n * @generated from protobuf message google.rpc.Status\n */\nexport interface Status {\n /**\n * The status code, which should be an enum value of\n * [google.rpc.Code][google.rpc.Code].\n *\n * @generated from protobuf field: int32 code = 1\n */\n code: number;\n /**\n * A developer-facing error message, which should be in English. Any\n * user-facing error message should be localized and sent in the\n * [google.rpc.Status.details][google.rpc.Status.details] field, or localized\n * by the client.\n *\n * @generated from protobuf field: string message = 2\n */\n message: string;\n /**\n * A list of messages that carry the error details. There is a common set of\n * message types for APIs to use.\n *\n * @generated from protobuf field: repeated google.protobuf.Any details = 3\n */\n details: Any[];\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Status$Type extends MessageType<Status> {\n constructor() {\n super(\"google.rpc.Status\", [\n { no: 1, name: \"code\", kind: \"scalar\", T: 5 /*ScalarType.INT32*/ },\n { no: 2, name: \"message\", kind: \"scalar\", T: 9 /*ScalarType.STRING*/ },\n { no: 3, name: \"details\", kind: \"message\", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Any }\n ]);\n }\n create(value?: PartialMessage<Status>): Status {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.code = 0;\n message.message = \"\";\n message.details = [];\n if (value !== undefined)\n reflectionMergePartial<Status>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Status): Status {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* int32 code */ 1:\n message.code = reader.int32();\n break;\n case /* string message */ 2:\n message.message = reader.string();\n break;\n case /* repeated google.protobuf.Any details */ 3:\n message.details.push(Any.internalBinaryRead(reader, reader.uint32(), options));\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: Status, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* int32 code = 1; */\n if (message.code !== 0)\n writer.tag(1, WireType.Varint).int32(message.code);\n /* string message = 2; */\n if (message.message !== \"\")\n writer.tag(2, WireType.LengthDelimited).string(message.message);\n /* repeated google.protobuf.Any details = 3; */\n for (let i = 0; i < message.details.length; i++)\n Any.internalBinaryWrite(message.details[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message google.rpc.Status\n */\nexport const Status = new Status$Type();\n"],"mappings":";;;;AAiEA,IAAM,cAAN,cAA0BA,qBAAAA,YAAoB;CAC1C,cAAc;AACV,QAAM,qBAAqB;GACvB;IAAE,IAAI;IAAG,MAAM;IAAQ,MAAM;IAAU,GAAG;IAAwB;GAClE;IAAE,IAAI;IAAG,MAAM;IAAW,MAAM;IAAU,GAAG;IAAyB;GACtE;IAAE,IAAI;IAAG,MAAM;IAAW,MAAM;IAAW,QAAQ;IAA2B,SAASC,YAAAA;IAAK;GAC/F,CAAC;;CAEN,OAAO,OAAwC;EAC3C,MAAM,UAAU,WAAW,OAAO,OAAQ,KAAK,iBAAmB;AAClE,UAAQ,OAAO;AACf,UAAQ,UAAU;AAClB,UAAQ,UAAU,EAAE;AACpB,MAAI,UAAU,KAAA,EACV,EAAA,GAAA,qBAAA,wBAA+B,MAAM,SAAS,MAAM;AACxD,SAAO;;CAEX,mBAAmB,QAAuB,QAAgB,SAA4B,QAAyB;EAC3G,IAAI,UAAU,UAAU,KAAK,QAAQ,EAAE,MAAM,OAAO,MAAM;AAC1D,SAAO,OAAO,MAAM,KAAK;GACrB,IAAI,CAAC,SAAS,YAAY,OAAO,KAAK;AACtC,WAAQ,SAAR;IACI,KAAsB;AAClB,aAAQ,OAAO,OAAO,OAAO;AAC7B;IACJ,KAA0B;AACtB,aAAQ,UAAU,OAAO,QAAQ;AACjC;IACJ,KAAgD;AAC5C,aAAQ,QAAQ,KAAKA,YAAAA,IAAI,mBAAmB,QAAQ,OAAO,QAAQ,EAAE,QAAQ,CAAC;AAC9E;IACJ;KACI,IAAI,IAAI,QAAQ;AAChB,SAAI,MAAM,QACN,OAAM,IAAI,WAAW,MAAM,iBAAiB,QAAQ,cAAc,SAAS,QAAQ,KAAK,WAAW;KACvG,IAAI,IAAI,OAAO,KAAK,SAAS;AAC7B,SAAI,MAAM,MACN,EAAC,MAAM,OAAOC,qBAAAA,oBAAoB,SAAS,GAAG,KAAK,UAAU,SAAS,SAAS,UAAU,EAAE;;;AAG3G,SAAO;;CAEX,oBAAoB,SAAiB,QAAuB,SAA4C;AAEpG,MAAI,QAAQ,SAAS,EACjB,QAAO,IAAI,GAAGC,qBAAAA,SAAS,OAAO,CAAC,MAAM,QAAQ,KAAK;AAEtD,MAAI,QAAQ,YAAY,GACpB,QAAO,IAAI,GAAGA,qBAAAA,SAAS,gBAAgB,CAAC,OAAO,QAAQ,QAAQ;AAEnE,OAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,QAAQ,IACxC,aAAA,IAAI,oBAAoB,QAAQ,QAAQ,IAAI,OAAO,IAAI,GAAGA,qBAAAA,SAAS,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM;EAC/G,IAAI,IAAI,QAAQ;AAChB,MAAI,MAAM,MACN,EAAC,KAAK,OAAOD,qBAAAA,oBAAoB,UAAU,GAAG,KAAK,UAAU,SAAS,OAAO;AACjF,SAAO;;;;;;AAMf,MAAa,SAAS,IAAI,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","names":[],"sources":["../../../../../../../src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"github.com/googleapis/googleapis/google/rpc/status.proto\" (package \"google.rpc\", syntax proto3)\n// tslint:disable\n//\n// Copyright
|
|
1
|
+
{"version":3,"file":"status.js","names":[],"sources":["../../../../../../../src/proto-grpc/github.com/googleapis/googleapis/google/rpc/status.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter client_generic,optimize_speed,generate_dependencies,force_server_none\n// @generated from protobuf file \"github.com/googleapis/googleapis/google/rpc/status.proto\" (package \"google.rpc\", syntax proto3)\n// tslint:disable\n//\n// Copyright 2026 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\nimport type { BinaryWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryWriter } from \"@protobuf-ts/runtime\";\nimport { WireType } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryReader } from \"@protobuf-ts/runtime\";\nimport { UnknownFieldHandler } from \"@protobuf-ts/runtime\";\nimport type { PartialMessage } from \"@protobuf-ts/runtime\";\nimport { reflectionMergePartial } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\nimport { Any } from \"../../../../../google/protobuf/any\";\n/**\n * The `Status` type defines a logical error model that is suitable for\n * different programming environments, including REST APIs and RPC APIs. It is\n * used by [gRPC](https://github.com/grpc). Each `Status` message contains\n * three pieces of data: error code, error message, and error details.\n *\n * You can find out more about this error model and how to work with it in the\n * [API Design Guide](https://cloud.google.com/apis/design/errors).\n *\n * @generated from protobuf message google.rpc.Status\n */\nexport interface Status {\n /**\n * The status code, which should be an enum value of\n * [google.rpc.Code][google.rpc.Code].\n *\n * @generated from protobuf field: int32 code = 1\n */\n code: number;\n /**\n * A developer-facing error message, which should be in English. Any\n * user-facing error message should be localized and sent in the\n * [google.rpc.Status.details][google.rpc.Status.details] field, or localized\n * by the client.\n *\n * @generated from protobuf field: string message = 2\n */\n message: string;\n /**\n * A list of messages that carry the error details. There is a common set of\n * message types for APIs to use.\n *\n * @generated from protobuf field: repeated google.protobuf.Any details = 3\n */\n details: Any[];\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass Status$Type extends MessageType<Status> {\n constructor() {\n super(\"google.rpc.Status\", [\n { no: 1, name: \"code\", kind: \"scalar\", T: 5 /*ScalarType.INT32*/ },\n { no: 2, name: \"message\", kind: \"scalar\", T: 9 /*ScalarType.STRING*/ },\n { no: 3, name: \"details\", kind: \"message\", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Any }\n ]);\n }\n create(value?: PartialMessage<Status>): Status {\n const message = globalThis.Object.create((this.messagePrototype!));\n message.code = 0;\n message.message = \"\";\n message.details = [];\n if (value !== undefined)\n reflectionMergePartial<Status>(this, message, value);\n return message;\n }\n internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Status): Status {\n let message = target ?? this.create(), end = reader.pos + length;\n while (reader.pos < end) {\n let [fieldNo, wireType] = reader.tag();\n switch (fieldNo) {\n case /* int32 code */ 1:\n message.code = reader.int32();\n break;\n case /* string message */ 2:\n message.message = reader.string();\n break;\n case /* repeated google.protobuf.Any details */ 3:\n message.details.push(Any.internalBinaryRead(reader, reader.uint32(), options));\n break;\n default:\n let u = options.readUnknownField;\n if (u === \"throw\")\n throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n let d = reader.skip(wireType);\n if (u !== false)\n (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n }\n }\n return message;\n }\n internalBinaryWrite(message: Status, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n /* int32 code = 1; */\n if (message.code !== 0)\n writer.tag(1, WireType.Varint).int32(message.code);\n /* string message = 2; */\n if (message.message !== \"\")\n writer.tag(2, WireType.LengthDelimited).string(message.message);\n /* repeated google.protobuf.Any details = 3; */\n for (let i = 0; i < message.details.length; i++)\n Any.internalBinaryWrite(message.details[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();\n let u = options.writeUnknownFields;\n if (u !== false)\n (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n return writer;\n }\n}\n/**\n * @generated MessageType for protobuf message google.rpc.Status\n */\nexport const Status = new Status$Type();\n"],"mappings":";;;AAiEA,IAAM,cAAN,cAA0B,YAAoB;CAC1C,cAAc;AACV,QAAM,qBAAqB;GACvB;IAAE,IAAI;IAAG,MAAM;IAAQ,MAAM;IAAU,GAAG;IAAwB;GAClE;IAAE,IAAI;IAAG,MAAM;IAAW,MAAM;IAAU,GAAG;IAAyB;GACtE;IAAE,IAAI;IAAG,MAAM;IAAW,MAAM;IAAW,QAAQ;IAA2B,SAAS;IAAK;GAC/F,CAAC;;CAEN,OAAO,OAAwC;EAC3C,MAAM,UAAU,WAAW,OAAO,OAAQ,KAAK,iBAAmB;AAClE,UAAQ,OAAO;AACf,UAAQ,UAAU;AAClB,UAAQ,UAAU,EAAE;AACpB,MAAI,UAAU,KAAA,EACV,wBAA+B,MAAM,SAAS,MAAM;AACxD,SAAO;;CAEX,mBAAmB,QAAuB,QAAgB,SAA4B,QAAyB;EAC3G,IAAI,UAAU,UAAU,KAAK,QAAQ,EAAE,MAAM,OAAO,MAAM;AAC1D,SAAO,OAAO,MAAM,KAAK;GACrB,IAAI,CAAC,SAAS,YAAY,OAAO,KAAK;AACtC,WAAQ,SAAR;IACI,KAAsB;AAClB,aAAQ,OAAO,OAAO,OAAO;AAC7B;IACJ,KAA0B;AACtB,aAAQ,UAAU,OAAO,QAAQ;AACjC;IACJ,KAAgD;AAC5C,aAAQ,QAAQ,KAAK,IAAI,mBAAmB,QAAQ,OAAO,QAAQ,EAAE,QAAQ,CAAC;AAC9E;IACJ;KACI,IAAI,IAAI,QAAQ;AAChB,SAAI,MAAM,QACN,OAAM,IAAI,WAAW,MAAM,iBAAiB,QAAQ,cAAc,SAAS,QAAQ,KAAK,WAAW;KACvG,IAAI,IAAI,OAAO,KAAK,SAAS;AAC7B,SAAI,MAAM,MACN,EAAC,MAAM,OAAO,oBAAoB,SAAS,GAAG,KAAK,UAAU,SAAS,SAAS,UAAU,EAAE;;;AAG3G,SAAO;;CAEX,oBAAoB,SAAiB,QAAuB,SAA4C;AAEpG,MAAI,QAAQ,SAAS,EACjB,QAAO,IAAI,GAAG,SAAS,OAAO,CAAC,MAAM,QAAQ,KAAK;AAEtD,MAAI,QAAQ,YAAY,GACpB,QAAO,IAAI,GAAG,SAAS,gBAAgB,CAAC,OAAO,QAAQ,QAAQ;AAEnE,OAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,QAAQ,IACxC,KAAI,oBAAoB,QAAQ,QAAQ,IAAI,OAAO,IAAI,GAAG,SAAS,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM;EAC/G,IAAI,IAAI,QAAQ;AAChB,MAAI,MAAM,MACN,EAAC,KAAK,OAAO,oBAAoB,UAAU,GAAG,KAAK,UAAU,SAAS,OAAO;AACjF,SAAO;;;;;;AAMf,MAAa,SAAS,IAAI,aAAa"}
|