@sidekickdb/platform 0.0.0 → 2.0.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/.tshy/build.json +8 -0
- package/.tshy/commonjs.json +16 -0
- package/.tshy/esm.json +15 -0
- package/.turbo/turbo-build.log +50 -0
- package/LICENSE.md +202 -0
- package/NOTICE +27 -0
- package/README.md +444 -2
- package/__tests__/src/apiURI.test.ts +58 -0
- package/__tests__/src/backupDownload.test.ts +427 -0
- package/__tests__/src/backups.test.ts +168 -0
- package/__tests__/src/clerk.test.ts +13 -0
- package/__tests__/src/consts.test.ts +11 -0
- package/__tests__/src/migrations.test.ts +885 -0
- package/__tests__/src/perms.test.ts +102 -0
- package/__tests__/src/rename.test.ts +126 -0
- package/__tests__/src/schema.push.e2e.test.ts +186 -0
- package/__tests__/src/schema.test.ts +644 -0
- package/__tests__/src/typescript-schema.test.ts +117 -0
- package/dist/commonjs/ProgressPromise.d.ts +18 -0
- package/dist/commonjs/ProgressPromise.d.ts.map +1 -0
- package/dist/commonjs/ProgressPromise.js +77 -0
- package/dist/commonjs/ProgressPromise.js.map +1 -0
- package/dist/commonjs/api.d.ts +480 -0
- package/dist/commonjs/api.d.ts.map +1 -0
- package/dist/commonjs/api.js +1132 -0
- package/dist/commonjs/api.js.map +1 -0
- package/dist/commonjs/backupDownload.d.ts +89 -0
- package/dist/commonjs/backupDownload.d.ts.map +1 -0
- package/dist/commonjs/backupDownload.js +357 -0
- package/dist/commonjs/backupDownload.js.map +1 -0
- package/dist/commonjs/backups.d.ts +146 -0
- package/dist/commonjs/backups.d.ts.map +1 -0
- package/dist/commonjs/backups.js +248 -0
- package/dist/commonjs/backups.js.map +1 -0
- package/dist/commonjs/clerk.d.ts +2 -0
- package/dist/commonjs/clerk.d.ts.map +1 -0
- package/dist/commonjs/clerk.js +29 -0
- package/dist/commonjs/clerk.js.map +1 -0
- package/dist/commonjs/consts.d.ts +11 -0
- package/dist/commonjs/consts.d.ts.map +1 -0
- package/dist/commonjs/consts.js +17 -0
- package/dist/commonjs/consts.js.map +1 -0
- package/dist/commonjs/crypto.d.ts +4 -0
- package/dist/commonjs/crypto.d.ts.map +1 -0
- package/dist/commonjs/crypto.js +26 -0
- package/dist/commonjs/crypto.js.map +1 -0
- package/dist/commonjs/index.d.ts +18 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +61 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/migrationUtils.d.ts +4 -0
- package/dist/commonjs/migrationUtils.d.ts.map +1 -0
- package/dist/commonjs/migrationUtils.js +52 -0
- package/dist/commonjs/migrationUtils.js.map +1 -0
- package/dist/commonjs/migrations.d.ts +99 -0
- package/dist/commonjs/migrations.d.ts.map +1 -0
- package/dist/commonjs/migrations.js +597 -0
- package/dist/commonjs/migrations.js.map +1 -0
- package/dist/commonjs/oauth.d.ts +98 -0
- package/dist/commonjs/oauth.d.ts.map +1 -0
- package/dist/commonjs/oauth.js +277 -0
- package/dist/commonjs/oauth.js.map +1 -0
- package/dist/commonjs/oauthCommon.d.ts +12 -0
- package/dist/commonjs/oauthCommon.d.ts.map +1 -0
- package/dist/commonjs/oauthCommon.js +26 -0
- package/dist/commonjs/oauthCommon.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/perms.d.ts +3 -0
- package/dist/commonjs/perms.d.ts.map +1 -0
- package/dist/commonjs/perms.js +66 -0
- package/dist/commonjs/perms.js.map +1 -0
- package/dist/commonjs/relationships.d.ts +7 -0
- package/dist/commonjs/relationships.d.ts.map +1 -0
- package/dist/commonjs/relationships.js +46 -0
- package/dist/commonjs/relationships.js.map +1 -0
- package/dist/commonjs/schema.d.ts +161 -0
- package/dist/commonjs/schema.d.ts.map +1 -0
- package/dist/commonjs/schema.js +174 -0
- package/dist/commonjs/schema.js.map +1 -0
- package/dist/commonjs/serverOAuth.d.ts +25 -0
- package/dist/commonjs/serverOAuth.d.ts.map +1 -0
- package/dist/commonjs/serverOAuth.js +72 -0
- package/dist/commonjs/serverOAuth.js.map +1 -0
- package/dist/commonjs/typescript-schema.d.ts +17 -0
- package/dist/commonjs/typescript-schema.d.ts.map +1 -0
- package/dist/commonjs/typescript-schema.js +314 -0
- package/dist/commonjs/typescript-schema.js.map +1 -0
- package/dist/commonjs/util.d.ts +13 -0
- package/dist/commonjs/util.d.ts.map +1 -0
- package/dist/commonjs/util.js +55 -0
- package/dist/commonjs/util.js.map +1 -0
- package/dist/commonjs/version.d.ts +3 -0
- package/dist/commonjs/version.d.ts.map +1 -0
- package/dist/commonjs/version.js +5 -0
- package/dist/commonjs/version.js.map +1 -0
- package/dist/esm/ProgressPromise.d.ts +18 -0
- package/dist/esm/ProgressPromise.d.ts.map +1 -0
- package/dist/esm/ProgressPromise.js +73 -0
- package/dist/esm/ProgressPromise.js.map +1 -0
- package/dist/esm/api.d.ts +480 -0
- package/dist/esm/api.d.ts.map +1 -0
- package/dist/esm/api.js +1121 -0
- package/dist/esm/api.js.map +1 -0
- package/dist/esm/backupDownload.d.ts +89 -0
- package/dist/esm/backupDownload.d.ts.map +1 -0
- package/dist/esm/backupDownload.js +354 -0
- package/dist/esm/backupDownload.js.map +1 -0
- package/dist/esm/backups.d.ts +146 -0
- package/dist/esm/backups.d.ts.map +1 -0
- package/dist/esm/backups.js +237 -0
- package/dist/esm/backups.js.map +1 -0
- package/dist/esm/clerk.d.ts +2 -0
- package/dist/esm/clerk.d.ts.map +1 -0
- package/dist/esm/clerk.js +26 -0
- package/dist/esm/clerk.js.map +1 -0
- package/dist/esm/consts.d.ts +11 -0
- package/dist/esm/consts.d.ts.map +1 -0
- package/dist/esm/consts.js +13 -0
- package/dist/esm/consts.js.map +1 -0
- package/dist/esm/crypto.d.ts +4 -0
- package/dist/esm/crypto.d.ts.map +1 -0
- package/dist/esm/crypto.js +21 -0
- package/dist/esm/crypto.js.map +1 -0
- package/dist/esm/index.d.ts +18 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +17 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/migrationUtils.d.ts +4 -0
- package/dist/esm/migrationUtils.d.ts.map +1 -0
- package/dist/esm/migrationUtils.js +47 -0
- package/dist/esm/migrationUtils.js.map +1 -0
- package/dist/esm/migrations.d.ts +99 -0
- package/dist/esm/migrations.d.ts.map +1 -0
- package/dist/esm/migrations.js +588 -0
- package/dist/esm/migrations.js.map +1 -0
- package/dist/esm/oauth.d.ts +98 -0
- package/dist/esm/oauth.d.ts.map +1 -0
- package/dist/esm/oauth.js +268 -0
- package/dist/esm/oauth.js.map +1 -0
- package/dist/esm/oauthCommon.d.ts +12 -0
- package/dist/esm/oauthCommon.d.ts.map +1 -0
- package/dist/esm/oauthCommon.js +22 -0
- package/dist/esm/oauthCommon.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/perms.d.ts +3 -0
- package/dist/esm/perms.d.ts.map +1 -0
- package/dist/esm/perms.js +62 -0
- package/dist/esm/perms.js.map +1 -0
- package/dist/esm/relationships.d.ts +7 -0
- package/dist/esm/relationships.d.ts.map +1 -0
- package/dist/esm/relationships.js +43 -0
- package/dist/esm/relationships.js.map +1 -0
- package/dist/esm/schema.d.ts +161 -0
- package/dist/esm/schema.d.ts.map +1 -0
- package/dist/esm/schema.js +158 -0
- package/dist/esm/schema.js.map +1 -0
- package/dist/esm/serverOAuth.d.ts +25 -0
- package/dist/esm/serverOAuth.d.ts.map +1 -0
- package/dist/esm/serverOAuth.js +68 -0
- package/dist/esm/serverOAuth.js.map +1 -0
- package/dist/esm/typescript-schema.d.ts +17 -0
- package/dist/esm/typescript-schema.d.ts.map +1 -0
- package/dist/esm/typescript-schema.js +310 -0
- package/dist/esm/typescript-schema.js.map +1 -0
- package/dist/esm/util.d.ts +13 -0
- package/dist/esm/util.d.ts.map +1 -0
- package/dist/esm/util.js +46 -0
- package/dist/esm/util.js.map +1 -0
- package/dist/esm/version.d.ts +3 -0
- package/dist/esm/version.d.ts.map +1 -0
- package/dist/esm/version.js +3 -0
- package/dist/esm/version.js.map +1 -0
- package/dist/standalone/index.js +13747 -0
- package/dist/standalone/index.umd.cjs +72 -0
- package/package.json +69 -3
- package/src/ProgressPromise.ts +97 -0
- package/src/api.ts +1903 -0
- package/src/backupDownload.ts +519 -0
- package/src/backups.ts +342 -0
- package/src/clerk.ts +24 -0
- package/src/consts.ts +22 -0
- package/src/crypto.ts +28 -0
- package/src/index.ts +147 -0
- package/src/migrationUtils.ts +56 -0
- package/src/migrations.ts +920 -0
- package/src/oauth.ts +390 -0
- package/src/oauthCommon.ts +38 -0
- package/src/perms.ts +81 -0
- package/src/relationships.ts +57 -0
- package/src/schema.ts +497 -0
- package/src/serverOAuth.ts +119 -0
- package/src/typescript-schema.ts +439 -0
- package/src/util.ts +77 -0
- package/src/version.ts +3 -0
- package/tsconfig.dev.json +14 -0
- package/tsconfig.json +14 -0
- package/vite.config.ts +19 -0
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
import { InstantRules, InstantSchemaDef, InstantUnknownSchema, EntitiesDef, LinksDef, RoomsDef, InstantDBAttr, InstantDBIdent, InstantDBCheckedDataType } from '@sidekickdb/core';
|
|
2
|
+
import { Webhooks } from '@sidekickdb/webhooks';
|
|
3
|
+
import { BackupsManager } from './backups.ts';
|
|
4
|
+
import { InstantAPIPlatformSchema, InstantAPISchemaPlanStep, InstantAPISchemaPushStep } from './schema.ts';
|
|
5
|
+
import { ProgressPromise } from './ProgressPromise.ts';
|
|
6
|
+
import { RenameCommand } from './migrations.ts';
|
|
7
|
+
type Simplify<T> = {
|
|
8
|
+
[K in keyof T]: T[K];
|
|
9
|
+
} & {};
|
|
10
|
+
type AppDataOpts = {
|
|
11
|
+
includePerms?: boolean | null | undefined;
|
|
12
|
+
includeSchema?: boolean | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
export type InstantAPIAppDetails<Opts extends AppDataOpts | undefined> = Simplify<{
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
orgId: string | null;
|
|
19
|
+
} & (NonNullable<Opts>['includePerms'] extends true ? {
|
|
20
|
+
perms: InstantRules;
|
|
21
|
+
} : {}) & (NonNullable<Opts>['includeSchema'] extends true ? {
|
|
22
|
+
schema: InstantSchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
|
|
23
|
+
} : {})>;
|
|
24
|
+
export type InstantAPIOrgDetails = {
|
|
25
|
+
id: string;
|
|
26
|
+
title: string;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
};
|
|
29
|
+
export type InstantAPIGetAppResponse<Opts extends AppDataOpts> = Simplify<{
|
|
30
|
+
app: InstantAPIAppDetails<Opts>;
|
|
31
|
+
}>;
|
|
32
|
+
export type InstantAPIListAppsResponse<Opts extends AppDataOpts | undefined> = Simplify<{
|
|
33
|
+
apps: InstantAPIAppDetails<Opts>[];
|
|
34
|
+
}>;
|
|
35
|
+
export type InstantAPIListOrgsResponse = {
|
|
36
|
+
orgs: InstantAPIOrgDetails[];
|
|
37
|
+
};
|
|
38
|
+
export type InstantAPIGetAppSchemaResponse = {
|
|
39
|
+
schema: InstantSchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
|
|
40
|
+
};
|
|
41
|
+
export type InstantAPIGetAppPermsResponse = {
|
|
42
|
+
perms: InstantRules;
|
|
43
|
+
};
|
|
44
|
+
export type InstantAPICreateAppBody = {
|
|
45
|
+
title: string;
|
|
46
|
+
schema?: InstantSchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef> | null | undefined;
|
|
47
|
+
perms?: InstantRules | null | undefined;
|
|
48
|
+
orgId?: string | null | undefined;
|
|
49
|
+
};
|
|
50
|
+
export type InstantAPICreateTemporaryAppBody = {
|
|
51
|
+
title: string;
|
|
52
|
+
schema?: InstantSchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef> | null | undefined;
|
|
53
|
+
rules?: {
|
|
54
|
+
code: InstantRules;
|
|
55
|
+
} | null;
|
|
56
|
+
};
|
|
57
|
+
export type InstantAPICreateTemporaryAppResponse = {
|
|
58
|
+
app: Simplify<InstantAPIAppDetails<{
|
|
59
|
+
includePerms: false;
|
|
60
|
+
includeSchema: false;
|
|
61
|
+
}> & {
|
|
62
|
+
adminToken: string;
|
|
63
|
+
}>;
|
|
64
|
+
expiresMs: number;
|
|
65
|
+
};
|
|
66
|
+
export type InstantAPICreateAppResponse = Simplify<{
|
|
67
|
+
app: InstantAPIAppDetails<{
|
|
68
|
+
includePerms: true;
|
|
69
|
+
includeSchema: true;
|
|
70
|
+
}> & {
|
|
71
|
+
adminToken: string;
|
|
72
|
+
};
|
|
73
|
+
}>;
|
|
74
|
+
export type InstantAPIUpdateAppBody = {
|
|
75
|
+
title: string;
|
|
76
|
+
};
|
|
77
|
+
export type InstantAPIUpdateAppResponse = Simplify<{
|
|
78
|
+
app: InstantAPIAppDetails<{}>;
|
|
79
|
+
}>;
|
|
80
|
+
export type InstantAPIDeleteAppResponse = Simplify<{
|
|
81
|
+
app: InstantAPIAppDetails<{}>;
|
|
82
|
+
}>;
|
|
83
|
+
export type InstantAPISchemaPushBody = {
|
|
84
|
+
schema: InstantSchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
|
|
85
|
+
overwrite?: false;
|
|
86
|
+
} | {
|
|
87
|
+
schema: InstantSchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
|
|
88
|
+
overwrite: true;
|
|
89
|
+
renames?: RenameCommand[];
|
|
90
|
+
};
|
|
91
|
+
export type InstantAPIPushPermsBody = {
|
|
92
|
+
perms: InstantRules;
|
|
93
|
+
};
|
|
94
|
+
export type InstantAPIPushPermsResponse = {
|
|
95
|
+
perms: InstantRules;
|
|
96
|
+
};
|
|
97
|
+
export type InstantAPITokenInfoResponse = {
|
|
98
|
+
expiresAt: Date;
|
|
99
|
+
scopes: string;
|
|
100
|
+
tokenType: 'Bearer';
|
|
101
|
+
};
|
|
102
|
+
export type PlanStep = ['add-attr', InstantDBAttr] | ['update-attr', Partial<InstantDBAttr>] | ['index', {
|
|
103
|
+
'attr-id': string;
|
|
104
|
+
'forward-identity': InstantDBIdent;
|
|
105
|
+
}] | ['remove-index', {
|
|
106
|
+
'attr-id': string;
|
|
107
|
+
'forward-identity': InstantDBIdent;
|
|
108
|
+
}] | ['unique', {
|
|
109
|
+
'attr-id': string;
|
|
110
|
+
'forward-identity': InstantDBIdent;
|
|
111
|
+
}] | ['remove-unique', {
|
|
112
|
+
'attr-id': string;
|
|
113
|
+
'forward-identity': InstantDBIdent;
|
|
114
|
+
}] | ['required', {
|
|
115
|
+
'attr-id': string;
|
|
116
|
+
'forward-identity': InstantDBIdent;
|
|
117
|
+
}] | [
|
|
118
|
+
'remove-required',
|
|
119
|
+
{
|
|
120
|
+
'attr-id': string;
|
|
121
|
+
'forward-identity': InstantDBIdent;
|
|
122
|
+
}
|
|
123
|
+
] | [
|
|
124
|
+
'check-data-type',
|
|
125
|
+
{
|
|
126
|
+
'attr-id': string;
|
|
127
|
+
'forward-identity': InstantDBIdent;
|
|
128
|
+
'checked-data-type': InstantDBCheckedDataType;
|
|
129
|
+
}
|
|
130
|
+
] | [
|
|
131
|
+
'remove-data-type',
|
|
132
|
+
{
|
|
133
|
+
'attr-id': string;
|
|
134
|
+
'forward-identity': InstantDBIdent;
|
|
135
|
+
}
|
|
136
|
+
] | ['delete-attr', string];
|
|
137
|
+
export type InstantAPIPlanSchemaPushResponse = {
|
|
138
|
+
newSchema: InstantSchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
|
|
139
|
+
currentSchema: InstantSchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
|
|
140
|
+
steps: InstantAPISchemaPlanStep[];
|
|
141
|
+
};
|
|
142
|
+
type InProgressStepsSummary = {
|
|
143
|
+
friendlyDescription: string;
|
|
144
|
+
totalCount: number;
|
|
145
|
+
inProgressCount: number;
|
|
146
|
+
completedCount: number;
|
|
147
|
+
errorCount: number;
|
|
148
|
+
steps: InstantAPISchemaPushStep[];
|
|
149
|
+
inProgressSteps: InstantAPISchemaPushStep[];
|
|
150
|
+
completedSteps: InstantAPISchemaPushStep[];
|
|
151
|
+
erroredSteps: InstantAPISchemaPushStep[];
|
|
152
|
+
};
|
|
153
|
+
export type InstantAPISchemaPushResponse = {
|
|
154
|
+
newSchema: InstantSchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
|
|
155
|
+
steps: InstantAPISchemaPushStep[];
|
|
156
|
+
summary: InProgressStepsSummary;
|
|
157
|
+
};
|
|
158
|
+
export declare function apiSchemaToAttrs(apiSchema: InstantAPIPlatformSchema): InstantDBAttr[];
|
|
159
|
+
export declare function apiSchemaToInstantSchemaDef(apiSchema: InstantAPIPlatformSchema): InstantSchemaDef<EntitiesDef, LinksDef<EntitiesDef>, RoomsDef>;
|
|
160
|
+
export declare function translatePlanSteps(apiSteps: PlanStep[], currentAttrs: InstantDBAttr[]): InstantAPISchemaPlanStep[];
|
|
161
|
+
type InstantBackgroundSchemaBaseJob = {
|
|
162
|
+
id: string;
|
|
163
|
+
createdAt: Date;
|
|
164
|
+
updatedAt: Date;
|
|
165
|
+
status: 'completed' | 'waiting' | 'processing' | 'errored';
|
|
166
|
+
workEstimate: number | null;
|
|
167
|
+
workCompleted: number | null;
|
|
168
|
+
error?: 'invalid-triple-error' | 'invalid-attr-state-error' | 'triple-not-unique-error' | 'triple-too-large-error' | 'missing-required-error' | 'unexpected-error';
|
|
169
|
+
invalidTriplesSample?: {
|
|
170
|
+
entityId: string;
|
|
171
|
+
value: any;
|
|
172
|
+
jsonType: 'string' | 'number' | 'boolean' | 'null' | 'object' | 'array' | 'date';
|
|
173
|
+
}[];
|
|
174
|
+
};
|
|
175
|
+
export interface InstantBackgroundSchemaRemoveDataTypeJob extends InstantBackgroundSchemaBaseJob {
|
|
176
|
+
type: 'remove-data-type';
|
|
177
|
+
}
|
|
178
|
+
export interface InstantBackgroundSchemaCheckDataTypeJob extends InstantBackgroundSchemaBaseJob {
|
|
179
|
+
type: 'check-data-type';
|
|
180
|
+
checkedDataType: InstantDBCheckedDataType;
|
|
181
|
+
}
|
|
182
|
+
export interface InstantBackgroundSchemaAddIndexJob extends InstantBackgroundSchemaBaseJob {
|
|
183
|
+
type: 'index';
|
|
184
|
+
}
|
|
185
|
+
export interface InstantBackgroundSchemaRemoveIndexJob extends InstantBackgroundSchemaBaseJob {
|
|
186
|
+
type: 'remove-index';
|
|
187
|
+
}
|
|
188
|
+
export interface InstantBackgroundSchemaAddUniqueJob extends InstantBackgroundSchemaBaseJob {
|
|
189
|
+
type: 'unique';
|
|
190
|
+
invalidUniqueValue?: any;
|
|
191
|
+
}
|
|
192
|
+
export interface InstantBackgroundSchemaRemoveUniqueJob extends InstantBackgroundSchemaBaseJob {
|
|
193
|
+
type: 'remove-unique';
|
|
194
|
+
}
|
|
195
|
+
export interface InstantBackgroundSchemaAddRequiredJob extends InstantBackgroundSchemaBaseJob {
|
|
196
|
+
type: 'required';
|
|
197
|
+
}
|
|
198
|
+
export interface InstantBackgroundSchemaRemoveRequiredJob extends InstantBackgroundSchemaBaseJob {
|
|
199
|
+
type: 'remove-required';
|
|
200
|
+
}
|
|
201
|
+
export type InstantBackgroundSchemaJob = InstantBackgroundSchemaRemoveDataTypeJob | InstantBackgroundSchemaCheckDataTypeJob | InstantBackgroundSchemaAddIndexJob | InstantBackgroundSchemaRemoveIndexJob | InstantBackgroundSchemaAddUniqueJob | InstantBackgroundSchemaRemoveUniqueJob | InstantBackgroundSchemaAddRequiredJob | InstantBackgroundSchemaRemoveRequiredJob;
|
|
202
|
+
export type PlatformApiAuth = {
|
|
203
|
+
token: string;
|
|
204
|
+
} | {
|
|
205
|
+
accessToken: string;
|
|
206
|
+
refreshToken: string;
|
|
207
|
+
clientId: string;
|
|
208
|
+
clientSecret: string;
|
|
209
|
+
onRefresh?: (tokenInfo: {
|
|
210
|
+
accessToken: string;
|
|
211
|
+
expiresAt: Date;
|
|
212
|
+
}) => Promise<void>;
|
|
213
|
+
};
|
|
214
|
+
export type PlatformApiConfig = {
|
|
215
|
+
auth?: PlatformApiAuth;
|
|
216
|
+
apiURI?: string;
|
|
217
|
+
};
|
|
218
|
+
export declare class PlatformApiMissingAuthError extends Error {
|
|
219
|
+
constructor();
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* API methods for the Platform API
|
|
223
|
+
*
|
|
224
|
+
* Usage:
|
|
225
|
+
*
|
|
226
|
+
* ```ts
|
|
227
|
+
* import { PlatformApi } from '@sidekickdb/platform';
|
|
228
|
+
*
|
|
229
|
+
* const api = new PlatformApi({
|
|
230
|
+
* apiURI: 'https://sidekick.example.com',
|
|
231
|
+
* auth: { token: 'oauth-access-token' },
|
|
232
|
+
* });
|
|
233
|
+
* const { apps } = await api.getApps({
|
|
234
|
+
* includeSchema: true,
|
|
235
|
+
* includePerms: true,
|
|
236
|
+
* });
|
|
237
|
+
* ```
|
|
238
|
+
*/
|
|
239
|
+
export declare class PlatformApi {
|
|
240
|
+
#private;
|
|
241
|
+
/**
|
|
242
|
+
* @param config – Runtime configuration.
|
|
243
|
+
* @param config.auth.token – OAuth access-token obtained via the oauth flow
|
|
244
|
+
* or a personal access token.
|
|
245
|
+
* @param config.apiURI – URL of your SidekickDB server. Required.
|
|
246
|
+
* @throws {MissingApiURIError} When `apiURI` is missing.
|
|
247
|
+
*/
|
|
248
|
+
constructor(config?: PlatformApiConfig);
|
|
249
|
+
token(): string;
|
|
250
|
+
canRefreshToken(): boolean;
|
|
251
|
+
refreshToken(): Promise<null | {
|
|
252
|
+
accessToken: string;
|
|
253
|
+
expiresAt: Date;
|
|
254
|
+
}>;
|
|
255
|
+
withRetry<F extends (...args: any[]) => any>(f: F, args: Parameters<F>): Promise<any>;
|
|
256
|
+
/**
|
|
257
|
+
* Fetch a single app by its id.
|
|
258
|
+
*
|
|
259
|
+
* ```ts
|
|
260
|
+
* const { app } = await api.getApp('MY_APP_ID', {
|
|
261
|
+
* includeSchema: true,
|
|
262
|
+
* includePerms: true,
|
|
263
|
+
* });
|
|
264
|
+
* ```
|
|
265
|
+
*
|
|
266
|
+
* @template Opts – Narrow the shape of the response via the
|
|
267
|
+
* {@link AppDataOpts} flags.
|
|
268
|
+
* @param appId – UUID of the app.
|
|
269
|
+
* @param opts – `{ includeSchema?: boolean; includePerms?: boolean }`
|
|
270
|
+
* @returns A typed wrapper containing the app, whose shape is expanded
|
|
271
|
+
* according to `Opts`.
|
|
272
|
+
*/
|
|
273
|
+
getApp<Opts extends AppDataOpts>(appId: string, opts?: Opts): Promise<InstantAPIGetAppResponse<Opts>>;
|
|
274
|
+
/**
|
|
275
|
+
* List **all apps** owned by the auth owner.
|
|
276
|
+
*
|
|
277
|
+
* ```ts
|
|
278
|
+
* const { apps } = await api.getApps({
|
|
279
|
+
* includeSchema: true,
|
|
280
|
+
* includePerms: true,
|
|
281
|
+
* });
|
|
282
|
+
* ```
|
|
283
|
+
*
|
|
284
|
+
* @template Opts – Same as {@link getApp}.
|
|
285
|
+
* @param opts – `{ includeSchema?: boolean; includePerms?: boolean }`
|
|
286
|
+
* @returns An array wrapper; each element’s shape follows `Opts`.
|
|
287
|
+
*/
|
|
288
|
+
getApps<Opts extends AppDataOpts>(opts?: Opts): Promise<InstantAPIListAppsResponse<Opts>>;
|
|
289
|
+
/**
|
|
290
|
+
* List **all orgs** that the auth owner is a member of.
|
|
291
|
+
*
|
|
292
|
+
* ```ts
|
|
293
|
+
* const { orgs } = await api.getOrgs();
|
|
294
|
+
* ```
|
|
295
|
+
*
|
|
296
|
+
* @returns An array of orgs
|
|
297
|
+
*/
|
|
298
|
+
getOrgs(): Promise<InstantAPIListOrgsResponse>;
|
|
299
|
+
/**
|
|
300
|
+
* List **all apps** owned by the auth owner.
|
|
301
|
+
*
|
|
302
|
+
* ```ts
|
|
303
|
+
* const { apps } = await api.getApps({
|
|
304
|
+
* includeSchema: true,
|
|
305
|
+
* includePerms: true,
|
|
306
|
+
* });
|
|
307
|
+
* ```
|
|
308
|
+
*
|
|
309
|
+
* @template Opts – Same as {@link getApp}.
|
|
310
|
+
* @param opts – `{ includeSchema?: boolean; includePerms?: boolean }`
|
|
311
|
+
* @returns An array wrapper; each element’s shape follows `Opts`.
|
|
312
|
+
*/
|
|
313
|
+
getAppsForOrg<Opts extends AppDataOpts>(orgId: string, opts?: Opts): Promise<InstantAPIListAppsResponse<Opts>>;
|
|
314
|
+
/**
|
|
315
|
+
* Gets the schema for an app by its id.
|
|
316
|
+
*
|
|
317
|
+
* ```ts
|
|
318
|
+
* const { schema } = await api.getSchema('MY_APP_ID');
|
|
319
|
+
* ```
|
|
320
|
+
*
|
|
321
|
+
* @param appId -- UUID of the app
|
|
322
|
+
*/
|
|
323
|
+
getSchema(appId: string): Promise<InstantAPIGetAppSchemaResponse>;
|
|
324
|
+
/**
|
|
325
|
+
* Gets the permissions for an app by its id.
|
|
326
|
+
*
|
|
327
|
+
* ```ts
|
|
328
|
+
* const { perms } = await api.getPerms('MY_APP_ID');
|
|
329
|
+
* ```
|
|
330
|
+
*
|
|
331
|
+
* @param appId -- UUID of the app
|
|
332
|
+
*/
|
|
333
|
+
getPerms(appId: string): Promise<InstantAPIGetAppPermsResponse>;
|
|
334
|
+
/**
|
|
335
|
+
* Create a new app.
|
|
336
|
+
*
|
|
337
|
+
* The app will be placed in the authenticated user's account
|
|
338
|
+
* if no orgId is provided.
|
|
339
|
+
*
|
|
340
|
+
* Optionally set permissions and schema.
|
|
341
|
+
*
|
|
342
|
+
* ```ts
|
|
343
|
+
* const { app } = await api.createApp({
|
|
344
|
+
* title: 'My new app',
|
|
345
|
+
* // Optional permissions
|
|
346
|
+
* perms: { $default: { allow: { $default: 'false' } } },
|
|
347
|
+
* // Optional schema
|
|
348
|
+
* schema: i.schema({
|
|
349
|
+
* entities: { books: i.entity({ title: i.string() }) },
|
|
350
|
+
* }),
|
|
351
|
+
* });
|
|
352
|
+
* ```
|
|
353
|
+
*
|
|
354
|
+
* @param fields
|
|
355
|
+
* @param fields.title -- Title for app
|
|
356
|
+
* @param fields.schema -- Optional schema for the app
|
|
357
|
+
* @param fields.perms -- Optional permissions for the app
|
|
358
|
+
* @param fields.orgId -- Optional id of the org that the app will be placed in
|
|
359
|
+
*/
|
|
360
|
+
createApp(fields: InstantAPICreateAppBody): Promise<InstantAPICreateAppResponse>;
|
|
361
|
+
/**
|
|
362
|
+
* Create a new temporary app.
|
|
363
|
+
*
|
|
364
|
+
* Optionally set permissions and schema.
|
|
365
|
+
*
|
|
366
|
+
* ```ts
|
|
367
|
+
* const { app } = await api.createTemporaryApp({
|
|
368
|
+
* title: 'My new app',
|
|
369
|
+
* // Optional permissions
|
|
370
|
+
* perms: { $default: { allow: { $default: 'false' } } },
|
|
371
|
+
* // Optional schema
|
|
372
|
+
* schema: i.schema({
|
|
373
|
+
* entities: { books: i.entity({ title: i.string() }) },
|
|
374
|
+
* }),
|
|
375
|
+
* });
|
|
376
|
+
* ```
|
|
377
|
+
*
|
|
378
|
+
* @param fields
|
|
379
|
+
* @param fields.title -- Title for app
|
|
380
|
+
* @param fields.schema -- Optional schema for the app
|
|
381
|
+
* @param fields.perms -- Optional permissions for the app
|
|
382
|
+
*/
|
|
383
|
+
createTemporaryApp(fields: InstantAPICreateTemporaryAppBody): Promise<InstantAPICreateTemporaryAppResponse>;
|
|
384
|
+
/**
|
|
385
|
+
* Update the title of an app by its id.
|
|
386
|
+
*
|
|
387
|
+
* ```ts
|
|
388
|
+
* const { app } = await api.updateApp('MY_APP_ID', {
|
|
389
|
+
* title: 'New title',
|
|
390
|
+
* });
|
|
391
|
+
* ```
|
|
392
|
+
*
|
|
393
|
+
* @param appId -- UUID of the app
|
|
394
|
+
* @param fields.title -- New title for the app
|
|
395
|
+
*/
|
|
396
|
+
updateApp(appId: string, fields: InstantAPIUpdateAppBody): Promise<InstantAPIUpdateAppResponse>;
|
|
397
|
+
/**
|
|
398
|
+
* Delete an app by its id.
|
|
399
|
+
*
|
|
400
|
+
* ```ts
|
|
401
|
+
* const { app } = await api.deleteApp('MY_APP_ID');
|
|
402
|
+
* ```
|
|
403
|
+
*
|
|
404
|
+
* @param appId -- UUID of the app
|
|
405
|
+
*/
|
|
406
|
+
deleteApp(appId: string): Promise<InstantAPIDeleteAppResponse>;
|
|
407
|
+
/**
|
|
408
|
+
* Dry-run a **schema push** and receive a _plan_ of steps the server would
|
|
409
|
+
* execute.
|
|
410
|
+
*
|
|
411
|
+
* ```ts
|
|
412
|
+
* const { steps } = await api.planSchemaPush(appId, body);
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
planSchemaPush(appId: string, body: InstantAPISchemaPushBody): Promise<InstantAPIPlanSchemaPushResponse>;
|
|
416
|
+
/**
|
|
417
|
+
* Execute a **schema push**. The server returns a long-running job
|
|
418
|
+
* represented as a {@link ProgressPromise}: you can both `await` the final
|
|
419
|
+
* result **or** subscribe to intermediate status updates.
|
|
420
|
+
*
|
|
421
|
+
* ```ts
|
|
422
|
+
* // 1) Subscribe to progress
|
|
423
|
+
* const schema = i.schema({
|
|
424
|
+
* entities: {
|
|
425
|
+
* books: i.entity({
|
|
426
|
+
* title: i.string().indexed(),
|
|
427
|
+
* }),
|
|
428
|
+
* },
|
|
429
|
+
* });
|
|
430
|
+
* const job = api.schemaPush(appId, { overwrite: true, schema: schema });
|
|
431
|
+
* job
|
|
432
|
+
* .then(({ summary }) => console.log('done!', summary))
|
|
433
|
+
* .catch((e) => console.error(e));
|
|
434
|
+
* job.subscribe({
|
|
435
|
+
* next: (status) => renderProgress(status),
|
|
436
|
+
* });
|
|
437
|
+
*
|
|
438
|
+
* // 2) Or just await it
|
|
439
|
+
* const result = await api.schemaPush(appId, { schema: schema });
|
|
440
|
+
* ```
|
|
441
|
+
*/
|
|
442
|
+
schemaPush(appId: string, body: InstantAPISchemaPushBody): ProgressPromise<InProgressStepsSummary, InstantAPISchemaPushResponse>;
|
|
443
|
+
/**
|
|
444
|
+
* Update permission rules for an app by its id.
|
|
445
|
+
*
|
|
446
|
+
* Completely replaces the current rule set.
|
|
447
|
+
*
|
|
448
|
+
* ```ts
|
|
449
|
+
* const { steps } = await api.pushPerms(appId, {
|
|
450
|
+
* perms: {
|
|
451
|
+
* $default: { allow: { $default: 'false' } },
|
|
452
|
+
* books: { allow: { view: 'true', $default: 'false' } },
|
|
453
|
+
* },
|
|
454
|
+
* });
|
|
455
|
+
* ```
|
|
456
|
+
*/
|
|
457
|
+
pushPerms(appId: string, body: InstantAPIPushPermsBody): Promise<InstantAPIPushPermsResponse>;
|
|
458
|
+
tokenInfo(): Promise<InstantAPITokenInfoResponse>;
|
|
459
|
+
/**
|
|
460
|
+
* Returns a {@link Webhooks} instance scoped to `appId`. You don't need
|
|
461
|
+
* auth on this PlatformApi to verify signatures or process incoming
|
|
462
|
+
* deliveries — only `webhooks(appId).manager.*` requires it, and those
|
|
463
|
+
* calls are routed through {@link withRetry}, so an expired access token
|
|
464
|
+
* is transparently refreshed.
|
|
465
|
+
*
|
|
466
|
+
* Pass `schema` (e.g. from {@link apiSchemaToInstantSchemaDef}) for typed
|
|
467
|
+
* handler records and typed `namespaces` on `manager.create`/`update`.
|
|
468
|
+
*/
|
|
469
|
+
webhooks<Schema extends InstantSchemaDef<any, any, any> = InstantUnknownSchema>(appId: string, opts?: {
|
|
470
|
+
schema?: Schema;
|
|
471
|
+
}): Webhooks<Schema>;
|
|
472
|
+
/**
|
|
473
|
+
* Returns a {@link BackupsManager} scoped to `appId` for listing an app's
|
|
474
|
+
* backups and downloading their contents. Calls are routed through
|
|
475
|
+
* {@link withRetry}, so an expired access token is transparently refreshed.
|
|
476
|
+
*/
|
|
477
|
+
backups(appId: string): BackupsManager;
|
|
478
|
+
}
|
|
479
|
+
export {};
|
|
480
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAI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