@jive-sh/server-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/_generated/api.d.ts +150 -0
- package/_generated/api.js +23 -0
- package/_generated/dataModel.d.ts +202 -0
- package/index.d.ts +5 -0
- package/index.js +7 -0
- package/package.json +18 -4
- package/README.md +0 -3
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated `api` utility.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { FunctionReference } from "convex/server";
|
|
12
|
+
import type { GenericId as Id } from "convex/values";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A utility for referencing Convex functions in your app's public API.
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* ```js
|
|
19
|
+
* const myFunctionReference = api.myModule.myFunction;
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const api: {
|
|
23
|
+
connections: {
|
|
24
|
+
completeNpmConnection: FunctionReference<
|
|
25
|
+
"action",
|
|
26
|
+
"public",
|
|
27
|
+
{ requestId: string; token: string; totpSecret: string },
|
|
28
|
+
null
|
|
29
|
+
>;
|
|
30
|
+
};
|
|
31
|
+
packages: {
|
|
32
|
+
provision: FunctionReference<
|
|
33
|
+
"action",
|
|
34
|
+
"public",
|
|
35
|
+
{ packageName: string; registry: "npm" },
|
|
36
|
+
| { status: "ready" }
|
|
37
|
+
| { status: "inProgress" }
|
|
38
|
+
| { reason: string; status: "refused" }
|
|
39
|
+
>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A utility for referencing Convex functions in your app's internal API.
|
|
45
|
+
*
|
|
46
|
+
* Usage:
|
|
47
|
+
* ```js
|
|
48
|
+
* const myFunctionReference = internal.myModule.myFunction;
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare const internal: {
|
|
52
|
+
connections: {
|
|
53
|
+
openNpmConnectionRequest: FunctionReference<
|
|
54
|
+
"action",
|
|
55
|
+
"internal",
|
|
56
|
+
{ organizationName: string },
|
|
57
|
+
{ deploymentUrl: string; requestId: string }
|
|
58
|
+
>;
|
|
59
|
+
redeemNpmConnectionRequest: FunctionReference<
|
|
60
|
+
"mutation",
|
|
61
|
+
"internal",
|
|
62
|
+
{ requestHash: string },
|
|
63
|
+
null | Id<"organizations">
|
|
64
|
+
>;
|
|
65
|
+
replaceNpmConnection: FunctionReference<
|
|
66
|
+
"mutation",
|
|
67
|
+
"internal",
|
|
68
|
+
{
|
|
69
|
+
keyVersion: number;
|
|
70
|
+
organizationId: Id<"organizations">;
|
|
71
|
+
sealedCredential: string;
|
|
72
|
+
},
|
|
73
|
+
null
|
|
74
|
+
>;
|
|
75
|
+
sealedNpmConnection: FunctionReference<
|
|
76
|
+
"query",
|
|
77
|
+
"internal",
|
|
78
|
+
{ organizationId: Id<"organizations"> },
|
|
79
|
+
null | { keyVersion: number; sealedCredential: string }
|
|
80
|
+
>;
|
|
81
|
+
storeNpmConnectionRequest: FunctionReference<
|
|
82
|
+
"mutation",
|
|
83
|
+
"internal",
|
|
84
|
+
{ organizationName: string; requestHash: string },
|
|
85
|
+
null
|
|
86
|
+
>;
|
|
87
|
+
};
|
|
88
|
+
packages: {
|
|
89
|
+
claim: FunctionReference<
|
|
90
|
+
"mutation",
|
|
91
|
+
"internal",
|
|
92
|
+
{ holder: string; packageName: string },
|
|
93
|
+
null | string
|
|
94
|
+
>;
|
|
95
|
+
codeRepositoryByGithubIds: FunctionReference<
|
|
96
|
+
"query",
|
|
97
|
+
"internal",
|
|
98
|
+
{ repositoryId: string; repositoryOwnerId: string },
|
|
99
|
+
null | { id: string; organizationId: string }
|
|
100
|
+
>;
|
|
101
|
+
packageByName: FunctionReference<
|
|
102
|
+
"query",
|
|
103
|
+
"internal",
|
|
104
|
+
{ packageName: string },
|
|
105
|
+
null | {
|
|
106
|
+
codeRepositoryId: string;
|
|
107
|
+
trustedPublishers: Array<{ environment: string; registeredAt: number }>;
|
|
108
|
+
}
|
|
109
|
+
>;
|
|
110
|
+
recordProvisioned: FunctionReference<
|
|
111
|
+
"mutation",
|
|
112
|
+
"internal",
|
|
113
|
+
{
|
|
114
|
+
codeRepositoryId: Id<"codeRepositories">;
|
|
115
|
+
packageName: string;
|
|
116
|
+
registeredPublisherFor?: string;
|
|
117
|
+
},
|
|
118
|
+
null
|
|
119
|
+
>;
|
|
120
|
+
release: FunctionReference<
|
|
121
|
+
"mutation",
|
|
122
|
+
"internal",
|
|
123
|
+
{ holder: string; packageName: string },
|
|
124
|
+
null
|
|
125
|
+
>;
|
|
126
|
+
};
|
|
127
|
+
seed: {
|
|
128
|
+
organizationWithRepository: FunctionReference<
|
|
129
|
+
"mutation",
|
|
130
|
+
"internal",
|
|
131
|
+
{
|
|
132
|
+
organizationName: string;
|
|
133
|
+
repository: {
|
|
134
|
+
name: string;
|
|
135
|
+
owner: string;
|
|
136
|
+
repositoryId: string;
|
|
137
|
+
repositoryOwnerId: string;
|
|
138
|
+
};
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
codeRepositoryId: Id<"codeRepositories">;
|
|
142
|
+
organizationId: Id<"organizations">;
|
|
143
|
+
}
|
|
144
|
+
>;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export declare const components: {
|
|
149
|
+
packageRegistryNpm: import("jive-connector-package-registry-npm/_generated/component.js").ComponentApi<"packageRegistryNpm">;
|
|
150
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated `api` utility.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { anyApi, componentsGeneric } from "convex/server";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A utility for referencing Convex functions in your app's API.
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* ```js
|
|
18
|
+
* const myFunctionReference = api.myModule.myFunction;
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export const api = anyApi;
|
|
22
|
+
export const internal = anyApi;
|
|
23
|
+
export const components = componentsGeneric();
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Generated data model types.
|
|
4
|
+
*
|
|
5
|
+
* THIS CODE IS AUTOMATICALLY GENERATED.
|
|
6
|
+
*
|
|
7
|
+
* To regenerate, run `npx convex dev`.
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {
|
|
12
|
+
DocumentByName,
|
|
13
|
+
TableNamesInDataModel,
|
|
14
|
+
SystemTableNames,
|
|
15
|
+
AnyDataModel,
|
|
16
|
+
} from "convex/server";
|
|
17
|
+
import type { GenericId } from "convex/values";
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A type describing your Convex data model.
|
|
21
|
+
*
|
|
22
|
+
* This type includes information about what tables you have, the type of
|
|
23
|
+
* documents stored in those tables, and the indexes defined on them.
|
|
24
|
+
*
|
|
25
|
+
* This type is used to parameterize methods like `queryGeneric` and
|
|
26
|
+
* `mutationGeneric` to make them type-safe.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export type DataModel = {
|
|
30
|
+
codeRepositories: {
|
|
31
|
+
document: {
|
|
32
|
+
name: string;
|
|
33
|
+
organizationId: Id<"organizations">;
|
|
34
|
+
owner: string;
|
|
35
|
+
repositoryId: string;
|
|
36
|
+
repositoryOwnerId: string;
|
|
37
|
+
_id: Id<"codeRepositories">;
|
|
38
|
+
_creationTime: number;
|
|
39
|
+
};
|
|
40
|
+
fieldPaths:
|
|
41
|
+
| "_creationTime"
|
|
42
|
+
| "_id"
|
|
43
|
+
| "name"
|
|
44
|
+
| "organizationId"
|
|
45
|
+
| "owner"
|
|
46
|
+
| "repositoryId"
|
|
47
|
+
| "repositoryOwnerId";
|
|
48
|
+
indexes: {
|
|
49
|
+
by_id: ["_id"];
|
|
50
|
+
by_creation_time: ["_creationTime"];
|
|
51
|
+
by_github_ids: ["repositoryId", "repositoryOwnerId", "_creationTime"];
|
|
52
|
+
};
|
|
53
|
+
searchIndexes: {};
|
|
54
|
+
vectorIndexes: {};
|
|
55
|
+
};
|
|
56
|
+
connectionRequests: {
|
|
57
|
+
document: {
|
|
58
|
+
connector: "npm";
|
|
59
|
+
expiresAt: number;
|
|
60
|
+
organizationId: Id<"organizations">;
|
|
61
|
+
requestHash: string;
|
|
62
|
+
_id: Id<"connectionRequests">;
|
|
63
|
+
_creationTime: number;
|
|
64
|
+
};
|
|
65
|
+
fieldPaths:
|
|
66
|
+
| "_creationTime"
|
|
67
|
+
| "_id"
|
|
68
|
+
| "connector"
|
|
69
|
+
| "expiresAt"
|
|
70
|
+
| "organizationId"
|
|
71
|
+
| "requestHash";
|
|
72
|
+
indexes: {
|
|
73
|
+
by_id: ["_id"];
|
|
74
|
+
by_creation_time: ["_creationTime"];
|
|
75
|
+
by_request_hash: ["requestHash", "_creationTime"];
|
|
76
|
+
};
|
|
77
|
+
searchIndexes: {};
|
|
78
|
+
vectorIndexes: {};
|
|
79
|
+
};
|
|
80
|
+
connections: {
|
|
81
|
+
document: {
|
|
82
|
+
connector: "npm";
|
|
83
|
+
createdAt: number;
|
|
84
|
+
keyVersion: number;
|
|
85
|
+
organizationId: Id<"organizations">;
|
|
86
|
+
sealedCredential: string;
|
|
87
|
+
_id: Id<"connections">;
|
|
88
|
+
_creationTime: number;
|
|
89
|
+
};
|
|
90
|
+
fieldPaths:
|
|
91
|
+
| "_creationTime"
|
|
92
|
+
| "_id"
|
|
93
|
+
| "connector"
|
|
94
|
+
| "createdAt"
|
|
95
|
+
| "keyVersion"
|
|
96
|
+
| "organizationId"
|
|
97
|
+
| "sealedCredential";
|
|
98
|
+
indexes: {
|
|
99
|
+
by_id: ["_id"];
|
|
100
|
+
by_creation_time: ["_creationTime"];
|
|
101
|
+
by_organization_and_connector: [
|
|
102
|
+
"organizationId",
|
|
103
|
+
"connector",
|
|
104
|
+
"_creationTime",
|
|
105
|
+
];
|
|
106
|
+
};
|
|
107
|
+
searchIndexes: {};
|
|
108
|
+
vectorIndexes: {};
|
|
109
|
+
};
|
|
110
|
+
organizations: {
|
|
111
|
+
document: { name: string; _id: Id<"organizations">; _creationTime: number };
|
|
112
|
+
fieldPaths: "_creationTime" | "_id" | "name";
|
|
113
|
+
indexes: {
|
|
114
|
+
by_id: ["_id"];
|
|
115
|
+
by_creation_time: ["_creationTime"];
|
|
116
|
+
by_name: ["name", "_creationTime"];
|
|
117
|
+
};
|
|
118
|
+
searchIndexes: {};
|
|
119
|
+
vectorIndexes: {};
|
|
120
|
+
};
|
|
121
|
+
packages: {
|
|
122
|
+
document: {
|
|
123
|
+
codeRepositoryId: Id<"codeRepositories">;
|
|
124
|
+
lastProvisionedAt: number;
|
|
125
|
+
name: string;
|
|
126
|
+
registry: "npm";
|
|
127
|
+
trustedPublishers: Array<{ environment: string; registeredAt: number }>;
|
|
128
|
+
_id: Id<"packages">;
|
|
129
|
+
_creationTime: number;
|
|
130
|
+
};
|
|
131
|
+
fieldPaths:
|
|
132
|
+
| "_creationTime"
|
|
133
|
+
| "_id"
|
|
134
|
+
| "codeRepositoryId"
|
|
135
|
+
| "lastProvisionedAt"
|
|
136
|
+
| "name"
|
|
137
|
+
| "registry"
|
|
138
|
+
| "trustedPublishers";
|
|
139
|
+
indexes: {
|
|
140
|
+
by_id: ["_id"];
|
|
141
|
+
by_creation_time: ["_creationTime"];
|
|
142
|
+
by_registry_and_name: ["registry", "name", "_creationTime"];
|
|
143
|
+
};
|
|
144
|
+
searchIndexes: {};
|
|
145
|
+
vectorIndexes: {};
|
|
146
|
+
};
|
|
147
|
+
provisioningClaims: {
|
|
148
|
+
document: {
|
|
149
|
+
expiresAt: number;
|
|
150
|
+
holder: string;
|
|
151
|
+
packageName: string;
|
|
152
|
+
registry: "npm";
|
|
153
|
+
_id: Id<"provisioningClaims">;
|
|
154
|
+
_creationTime: number;
|
|
155
|
+
};
|
|
156
|
+
fieldPaths:
|
|
157
|
+
| "_creationTime"
|
|
158
|
+
| "_id"
|
|
159
|
+
| "expiresAt"
|
|
160
|
+
| "holder"
|
|
161
|
+
| "packageName"
|
|
162
|
+
| "registry";
|
|
163
|
+
indexes: {
|
|
164
|
+
by_id: ["_id"];
|
|
165
|
+
by_creation_time: ["_creationTime"];
|
|
166
|
+
by_registry_and_package: ["registry", "packageName", "_creationTime"];
|
|
167
|
+
};
|
|
168
|
+
searchIndexes: {};
|
|
169
|
+
vectorIndexes: {};
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The names of all of your Convex tables.
|
|
175
|
+
*/
|
|
176
|
+
export type TableNames = TableNamesInDataModel<DataModel>;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The type of a document stored in Convex.
|
|
180
|
+
*
|
|
181
|
+
* @typeParam TableName - A string literal type of the table name (like "users").
|
|
182
|
+
*/
|
|
183
|
+
export type Doc<TableName extends TableNames> = DocumentByName<
|
|
184
|
+
DataModel,
|
|
185
|
+
TableName
|
|
186
|
+
>;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* An identifier for a document in Convex.
|
|
190
|
+
*
|
|
191
|
+
* Convex documents are uniquely identified by their `Id`, which is accessible
|
|
192
|
+
* on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids).
|
|
193
|
+
*
|
|
194
|
+
* Documents can be loaded using `db.get(tableName, id)` in query and mutation functions.
|
|
195
|
+
*
|
|
196
|
+
* IDs are just strings at runtime, but this type can be used to distinguish them from other
|
|
197
|
+
* strings when type checking.
|
|
198
|
+
*
|
|
199
|
+
* @typeParam TableName - A string literal type of the table name (like "users").
|
|
200
|
+
*/
|
|
201
|
+
export type Id<TableName extends TableNames | SystemTableNames> =
|
|
202
|
+
GenericId<TableName>;
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { api } from "./_generated/api.js";
|
|
2
|
+
export type { DataModel, Doc, Id, TableNames } from "./_generated/dataModel.js";
|
|
3
|
+
export declare const convexUrl: string;
|
|
4
|
+
export declare const convexSiteUrl: string;
|
|
5
|
+
export declare const deployment: { readonly environment: string; readonly sourceCommitSha: string; readonly version: string };
|
package/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { api } from "./_generated/api.js";
|
|
2
|
+
/** The URL to pass to ConvexClient or ConvexReactClient: this environment's canonical Convex API URL. */
|
|
3
|
+
export const convexUrl = "https://adventurous-viper-740.convex.cloud";
|
|
4
|
+
/** Where this environment's HTTP actions are served. */
|
|
5
|
+
export const convexSiteUrl = "https://adventurous-viper-740.convex.site";
|
|
6
|
+
/** Which deploy these functions came from. */
|
|
7
|
+
export const deployment = {"environment":"latest","sourceCommitSha":"ccc7fe5aafb186f54e938f0f2e38b8c5a4a6ad56","version":"0.1.0"};
|
package/package.json
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jive-sh/server-client",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Jive's central server: the Convex backend that holds organizations, code repositories, connections and packages, and provisions packages for pipelines that sign in with their GitHub Actions ID token.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/jive-sh/server.git"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./index.d.ts",
|
|
14
|
+
"default": "./index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"convex": "^1.48.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/README.md
DELETED