@loams/client 0.0.0-stage → 0.1.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/LICENSE +202 -0
- package/README.md +137 -2
- package/dist/gen/facade.d.ts +446 -0
- package/dist/gen/facade.js +441 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +32 -0
- package/dist/loams.d.ts +110 -0
- package/dist/loams.js +203 -0
- package/dist/node.d.ts +12 -0
- package/dist/node.js +43 -0
- package/dist/runtime/call.d.ts +132 -0
- package/dist/runtime/call.js +273 -0
- package/dist/runtime/consistency.d.ts +22 -0
- package/dist/runtime/consistency.js +68 -0
- package/dist/runtime/errors.d.ts +100 -0
- package/dist/runtime/errors.js +165 -0
- package/dist/runtime/pagination.d.ts +25 -0
- package/dist/runtime/pagination.js +47 -0
- package/dist/runtime/retry.d.ts +30 -0
- package/dist/runtime/retry.js +75 -0
- package/dist/runtime/streams.d.ts +30 -0
- package/dist/runtime/streams.js +61 -0
- package/dist/runtime/token-source.d.ts +57 -0
- package/dist/runtime/token-source.js +117 -0
- package/dist/runtime/transports.d.ts +58 -0
- package/dist/runtime/transports.js +66 -0
- package/dist/runtime/uuidv7.d.ts +10 -0
- package/dist/runtime/uuidv7.js +57 -0
- package/dist/system.d.ts +87 -0
- package/dist/system.js +152 -0
- package/dist/vendor/proto/admin.d.ts +6 -0
- package/dist/vendor/proto/admin.js +12 -0
- package/dist/vendor/proto/gen/loams/admin/v1/agent_pb.d.ts +902 -0
- package/dist/vendor/proto/gen/loams/admin/v1/agent_pb.js +215 -0
- package/dist/vendor/proto/gen/loams/admin/v1/audit_pb.d.ts +289 -0
- package/dist/vendor/proto/gen/loams/admin/v1/audit_pb.js +76 -0
- package/dist/vendor/proto/gen/loams/admin/v1/common_pb.d.ts +203 -0
- package/dist/vendor/proto/gen/loams/admin/v1/common_pb.js +118 -0
- package/dist/vendor/proto/gen/loams/admin/v1/key_pb.d.ts +284 -0
- package/dist/vendor/proto/gen/loams/admin/v1/key_pb.js +62 -0
- package/dist/vendor/proto/gen/loams/admin/v1/org_pb.d.ts +634 -0
- package/dist/vendor/proto/gen/loams/admin/v1/org_pb.js +142 -0
- package/dist/vendor/proto/gen/loams/admin/v1/project_pb.d.ts +662 -0
- package/dist/vendor/proto/gen/loams/admin/v1/project_pb.js +132 -0
- package/dist/vendor/proto/gen/loams/auth/v1/auth_pb.d.ts +435 -0
- package/dist/vendor/proto/gen/loams/auth/v1/auth_pb.js +156 -0
- package/dist/vendor/proto/gen/loams/errors/v1/errors_pb.d.ts +45 -0
- package/dist/vendor/proto/gen/loams/errors/v1/errors_pb.js +17 -0
- package/dist/vendor/proto/gen/loams/instance/v1/instance_pb.d.ts +501 -0
- package/dist/vendor/proto/gen/loams/instance/v1/instance_pb.js +170 -0
- package/dist/vendor/proto/gen/loams/options/v1/options_pb.d.ts +97 -0
- package/dist/vendor/proto/gen/loams/options/v1/options_pb.js +47 -0
- package/package.json +49 -4
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { MethodOptions, ServiceOptions } from "@bufbuild/protobuf/wkt";
|
|
3
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the file loams/options/v1/options.proto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const file_loams_options_v1_options: GenFile;
|
|
8
|
+
/**
|
|
9
|
+
* The SDK module a service belongs to, set on the service.
|
|
10
|
+
*
|
|
11
|
+
* @generated from message loams.options.v1.ModuleOptions
|
|
12
|
+
*/
|
|
13
|
+
export type ModuleOptions = Message<"loams.options.v1.ModuleOptions"> & {
|
|
14
|
+
/**
|
|
15
|
+
* The module's name in `snake_case`, for example "vector" or "admin.org".
|
|
16
|
+
*
|
|
17
|
+
* @generated from field: string name = 1;
|
|
18
|
+
*/
|
|
19
|
+
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* One line for the module's reference docs.
|
|
22
|
+
*
|
|
23
|
+
* @generated from field: string summary = 2;
|
|
24
|
+
*/
|
|
25
|
+
summary: string;
|
|
26
|
+
/**
|
|
27
|
+
* True for a package whose wire contract may still change: `buf breaking`
|
|
28
|
+
* skips it and SDKs mark the module experimental (§44 §10.3). The first
|
|
29
|
+
* such package is `loams.live.v1` (R1), which carries this option when its
|
|
30
|
+
* server-side service lands in R1 Task 12 — annotating it earlier would
|
|
31
|
+
* change the descriptor the committed `sdks/live-typescript` output was
|
|
32
|
+
* generated from.
|
|
33
|
+
*
|
|
34
|
+
* @generated from field: bool unstable = 3;
|
|
35
|
+
*/
|
|
36
|
+
unstable: boolean;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Describes the message loams.options.v1.ModuleOptions.
|
|
40
|
+
* Use `create(ModuleOptionsSchema)` to create a new message.
|
|
41
|
+
*/
|
|
42
|
+
export declare const ModuleOptionsSchema: GenMessage<ModuleOptions>;
|
|
43
|
+
/**
|
|
44
|
+
* One facade call backed by a method, set on the method.
|
|
45
|
+
*
|
|
46
|
+
* `QueryService/Search` backs two calls (`loams.vector.search` and
|
|
47
|
+
* `loams.search.query`) of one RPC, so this option is repeated: the facade
|
|
48
|
+
* reads each entry as a separate method on a module (§44 §7.3).
|
|
49
|
+
*
|
|
50
|
+
* @generated from message loams.options.v1.FacadeOptions
|
|
51
|
+
*/
|
|
52
|
+
export type FacadeOptions = Message<"loams.options.v1.FacadeOptions"> & {
|
|
53
|
+
/**
|
|
54
|
+
* The module the call is exposed in; empty means the service's module.
|
|
55
|
+
*
|
|
56
|
+
* @generated from field: string module = 1;
|
|
57
|
+
*/
|
|
58
|
+
module: string;
|
|
59
|
+
/**
|
|
60
|
+
* The call's name in `snake_case`; empty means the method name.
|
|
61
|
+
*
|
|
62
|
+
* @generated from field: string name = 2;
|
|
63
|
+
*/
|
|
64
|
+
name: string;
|
|
65
|
+
/**
|
|
66
|
+
* Overrides the retry class the facade derives from `idempotency_level`
|
|
67
|
+
* and the presence of an `idempotency_key` (D610): true lets the SDK
|
|
68
|
+
* retry the call on its own.
|
|
69
|
+
*
|
|
70
|
+
* @generated from field: bool retry_safe = 3;
|
|
71
|
+
*/
|
|
72
|
+
retrySafe: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* AIP-158 pagination as "<items field>:<next page token field>", for
|
|
75
|
+
* example "collections:next_page_token"; the facade adds a `list_all`
|
|
76
|
+
* iterator for it.
|
|
77
|
+
*
|
|
78
|
+
* @generated from field: string pagination = 4;
|
|
79
|
+
*/
|
|
80
|
+
pagination: string;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Describes the message loams.options.v1.FacadeOptions.
|
|
84
|
+
* Use `create(FacadeOptionsSchema)` to create a new message.
|
|
85
|
+
*/
|
|
86
|
+
export declare const FacadeOptionsSchema: GenMessage<FacadeOptions>;
|
|
87
|
+
/**
|
|
88
|
+
* Extension numbers 50001-50099 are this package's; the 50000-99999 range
|
|
89
|
+
* is the one protobuf reserves for an organisation's own options.
|
|
90
|
+
*
|
|
91
|
+
* @generated from extension: loams.options.v1.ModuleOptions module = 50001;
|
|
92
|
+
*/
|
|
93
|
+
export declare const module: GenExtension<ServiceOptions, ModuleOptions>;
|
|
94
|
+
/**
|
|
95
|
+
* @generated from extension: repeated loams.options.v1.FacadeOptions facade = 50002;
|
|
96
|
+
*/
|
|
97
|
+
export declare const facade: GenExtension<MethodOptions, FacadeOptions[]>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// The annotations that drive the SDK facade (design §44 §7.3, D606; API1
|
|
2
|
+
// Task 1).
|
|
3
|
+
//
|
|
4
|
+
// Every public `loams.<service>.v1` service names the SDK module it belongs
|
|
5
|
+
// to (`loams.collections`, `loams.vector`, `loams.admin.org`, ...), and a
|
|
6
|
+
// method may name the facade call or calls it backs.
|
|
7
|
+
// `protoc-gen-loams-facade` (SDK1 Task 3) reads these options out of the
|
|
8
|
+
// descriptor set and renders one facade per language from the templates in
|
|
9
|
+
// `sdks/templates/<lang>/`, so the thirteen SDKs cannot drift. The server
|
|
10
|
+
// ignores them at runtime: an option is metadata for the generator, never
|
|
11
|
+
// behaviour.
|
|
12
|
+
//
|
|
13
|
+
// This package is deliberately not in any SDK's wire surface: it declares no
|
|
14
|
+
// message of its own that a client sends, and no SDK method takes or returns
|
|
15
|
+
// one. `buf generate` does list it, because a service that carries these
|
|
16
|
+
// annotations has them in its descriptor and `protoc-gen-es` writes that
|
|
17
|
+
// import into the generated file. SDK2 Task 0 found this: annotating
|
|
18
|
+
// `loams.instance.v1.InstanceService` for the SDK facade made
|
|
19
|
+
// `buf.gen.apps.yaml` generate `loams/options/v1/options_pb.ts`, which
|
|
20
|
+
// `@loams/proto/options` then re-exports.
|
|
21
|
+
import { extDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
22
|
+
import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt";
|
|
23
|
+
/**
|
|
24
|
+
* Describes the file loams/options/v1/options.proto.
|
|
25
|
+
*/
|
|
26
|
+
export const file_loams_options_v1_options = /*@__PURE__*/ fileDesc("Ch5sb2Ftcy9vcHRpb25zL3YxL29wdGlvbnMucHJvdG8SEGxvYW1zLm9wdGlvbnMudjEiQAoNTW9kdWxlT3B0aW9ucxIMCgRuYW1lGAEgASgJEg8KB3N1bW1hcnkYAiABKAkSEAoIdW5zdGFibGUYAyABKAgiVQoNRmFjYWRlT3B0aW9ucxIOCgZtb2R1bGUYASABKAkSDAoEbmFtZRgCIAEoCRISCgpyZXRyeV9zYWZlGAMgASgIEhIKCnBhZ2luYXRpb24YBCABKAk6WgoGbW9kdWxlEh8uZ29vZ2xlLnByb3RvYnVmLlNlcnZpY2VPcHRpb25zGNGGAyABKAsyHy5sb2Ftcy5vcHRpb25zLnYxLk1vZHVsZU9wdGlvbnNSBm1vZHVsZTpZCgZmYWNhZGUSHi5nb29nbGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxjShgMgAygLMh8ubG9hbXMub3B0aW9ucy52MS5GYWNhZGVPcHRpb25zUgZmYWNhZGViBnByb3RvMw", [file_google_protobuf_descriptor]);
|
|
27
|
+
/**
|
|
28
|
+
* Describes the message loams.options.v1.ModuleOptions.
|
|
29
|
+
* Use `create(ModuleOptionsSchema)` to create a new message.
|
|
30
|
+
*/
|
|
31
|
+
export const ModuleOptionsSchema = /*@__PURE__*/ messageDesc(file_loams_options_v1_options, 0);
|
|
32
|
+
/**
|
|
33
|
+
* Describes the message loams.options.v1.FacadeOptions.
|
|
34
|
+
* Use `create(FacadeOptionsSchema)` to create a new message.
|
|
35
|
+
*/
|
|
36
|
+
export const FacadeOptionsSchema = /*@__PURE__*/ messageDesc(file_loams_options_v1_options, 1);
|
|
37
|
+
/**
|
|
38
|
+
* Extension numbers 50001-50099 are this package's; the 50000-99999 range
|
|
39
|
+
* is the one protobuf reserves for an organisation's own options.
|
|
40
|
+
*
|
|
41
|
+
* @generated from extension: loams.options.v1.ModuleOptions module = 50001;
|
|
42
|
+
*/
|
|
43
|
+
export const module = /*@__PURE__*/ extDesc(file_loams_options_v1_options, 0);
|
|
44
|
+
/**
|
|
45
|
+
* @generated from extension: repeated loams.options.v1.FacadeOptions facade = 50002;
|
|
46
|
+
*/
|
|
47
|
+
export const facade = /*@__PURE__*/ extDesc(file_loams_options_v1_options, 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loams/client",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The Loams SDK for TypeScript and JavaScript: one Loams object with namespaced modules over the unified Connect API, generated from proto/.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"homepage": "https://github.com/ostrium-labs/loams/tree/dev/sdks/typescript",
|
|
7
|
+
"bugs": "https://github.com/ostrium-labs/loams/issues",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/ostrium-labs/loams.git",
|
|
11
|
+
"directory": "sdks/typescript/packages/client"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"loams",
|
|
15
|
+
"connect",
|
|
16
|
+
"grpc",
|
|
17
|
+
"sdk",
|
|
18
|
+
"database"
|
|
19
|
+
],
|
|
20
|
+
"type": "module",
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"default": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./node": {
|
|
28
|
+
"types": "./dist/node.d.ts",
|
|
29
|
+
"default": "./dist/node.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"README.md",
|
|
36
|
+
"LICENSE"
|
|
37
|
+
],
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=22"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@bufbuild/protobuf": "2.16.0",
|
|
43
|
+
"@connectrpc/connect": "2.2.0",
|
|
44
|
+
"@connectrpc/connect-node": "2.2.0",
|
|
45
|
+
"@connectrpc/connect-web": "2.2.0",
|
|
46
|
+
"@loams/live": "0.1.0"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
}
|
|
51
|
+
}
|