@constructive-io/sdk 0.12.22 → 0.13.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/admin/orm/index.d.ts +15 -0
- package/admin/orm/input-types.d.ts +74 -0
- package/admin/orm/mutation/index.d.ts +45 -1
- package/admin/orm/mutation/index.js +36 -0
- package/auth/orm/index.d.ts +15 -0
- package/auth/orm/input-types.d.ts +74 -0
- package/auth/orm/mutation/index.d.ts +45 -1
- package/auth/orm/mutation/index.js +36 -0
- package/esm/admin/orm/index.d.ts +15 -0
- package/esm/admin/orm/input-types.d.ts +74 -0
- package/esm/admin/orm/mutation/index.d.ts +45 -1
- package/esm/admin/orm/mutation/index.js +36 -0
- package/esm/auth/orm/index.d.ts +15 -0
- package/esm/auth/orm/input-types.d.ts +74 -0
- package/esm/auth/orm/mutation/index.d.ts +45 -1
- package/esm/auth/orm/mutation/index.js +36 -0
- package/esm/objects/orm/index.d.ts +15 -0
- package/esm/objects/orm/input-types.d.ts +74 -0
- package/esm/objects/orm/mutation/index.d.ts +45 -1
- package/esm/objects/orm/mutation/index.js +36 -0
- package/esm/public/orm/index.d.ts +15 -0
- package/esm/public/orm/input-types.d.ts +107 -1
- package/esm/public/orm/mutation/index.d.ts +45 -1
- package/esm/public/orm/mutation/index.js +36 -0
- package/objects/orm/index.d.ts +15 -0
- package/objects/orm/input-types.d.ts +74 -0
- package/objects/orm/mutation/index.d.ts +45 -1
- package/objects/orm/mutation/index.js +36 -0
- package/package.json +4 -4
- package/public/orm/index.d.ts +15 -0
- package/public/orm/input-types.d.ts +107 -1
- package/public/orm/mutation/index.d.ts +45 -1
- package/public/orm/mutation/index.js +36 -0
package/admin/orm/index.d.ts
CHANGED
|
@@ -162,5 +162,20 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
162
162
|
} & import("./select-types").StrictSelect<S, import("./input-types").SubmitOrgInviteCodePayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
163
163
|
submitOrgInviteCode: import("./select-types").InferSelectResult<import("./input-types").SubmitOrgInviteCodePayload, S> | null;
|
|
164
164
|
}>;
|
|
165
|
+
requestUploadUrl: <S extends import("./input-types").RequestUploadUrlPayloadSelect>(args: import("./mutation").RequestUploadUrlVariables, options: {
|
|
166
|
+
select: S;
|
|
167
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").RequestUploadUrlPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
168
|
+
requestUploadUrl: import("./select-types").InferSelectResult<import("./input-types").RequestUploadUrlPayload, S> | null;
|
|
169
|
+
}>;
|
|
170
|
+
confirmUpload: <S extends import("./input-types").ConfirmUploadPayloadSelect>(args: import("./mutation").ConfirmUploadVariables, options: {
|
|
171
|
+
select: S;
|
|
172
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").ConfirmUploadPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
173
|
+
confirmUpload: import("./select-types").InferSelectResult<import("./input-types").ConfirmUploadPayload, S> | null;
|
|
174
|
+
}>;
|
|
175
|
+
provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
|
|
176
|
+
select: S;
|
|
177
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
178
|
+
provisionBucket: import("./select-types").InferSelectResult<import("./input-types").ProvisionBucketPayload, S> | null;
|
|
179
|
+
}>;
|
|
165
180
|
};
|
|
166
181
|
};
|
|
@@ -2570,6 +2570,26 @@ export interface SubmitOrgInviteCodeInput {
|
|
|
2570
2570
|
clientMutationId?: string;
|
|
2571
2571
|
token?: string;
|
|
2572
2572
|
}
|
|
2573
|
+
export interface RequestUploadUrlInput {
|
|
2574
|
+
/** Bucket key (e.g., "public", "private") */
|
|
2575
|
+
bucketKey: string;
|
|
2576
|
+
/** SHA-256 content hash computed by the client (hex-encoded, 64 chars) */
|
|
2577
|
+
contentHash: string;
|
|
2578
|
+
/** MIME type of the file (e.g., "image/png") */
|
|
2579
|
+
contentType: string;
|
|
2580
|
+
/** File size in bytes */
|
|
2581
|
+
size: number;
|
|
2582
|
+
/** Original filename (optional, for display and Content-Disposition) */
|
|
2583
|
+
filename?: string;
|
|
2584
|
+
}
|
|
2585
|
+
export interface ConfirmUploadInput {
|
|
2586
|
+
/** The file ID returned by requestUploadUrl */
|
|
2587
|
+
fileId: string;
|
|
2588
|
+
}
|
|
2589
|
+
export interface ProvisionBucketInput {
|
|
2590
|
+
/** The logical bucket key (e.g., "public", "private") */
|
|
2591
|
+
bucketKey: string;
|
|
2592
|
+
}
|
|
2573
2593
|
/** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */
|
|
2574
2594
|
export interface ConstructiveInternalTypeImageFilter {
|
|
2575
2595
|
/** Is null (if `true` is specified) or is not null (if `false` is specified). */
|
|
@@ -2755,6 +2775,60 @@ export type SubmitOrgInviteCodePayloadSelect = {
|
|
|
2755
2775
|
clientMutationId?: boolean;
|
|
2756
2776
|
result?: boolean;
|
|
2757
2777
|
};
|
|
2778
|
+
export interface RequestUploadUrlPayload {
|
|
2779
|
+
/** Presigned PUT URL (null if file was deduplicated) */
|
|
2780
|
+
uploadUrl?: string | null;
|
|
2781
|
+
/** The file ID (existing if deduplicated, new if fresh upload) */
|
|
2782
|
+
fileId: string;
|
|
2783
|
+
/** The S3 object key */
|
|
2784
|
+
key: string;
|
|
2785
|
+
/** Whether this file was deduplicated (already exists with same hash) */
|
|
2786
|
+
deduplicated: boolean;
|
|
2787
|
+
/** Presigned URL expiry time (null if deduplicated) */
|
|
2788
|
+
expiresAt?: string | null;
|
|
2789
|
+
}
|
|
2790
|
+
export type RequestUploadUrlPayloadSelect = {
|
|
2791
|
+
uploadUrl?: boolean;
|
|
2792
|
+
fileId?: boolean;
|
|
2793
|
+
key?: boolean;
|
|
2794
|
+
deduplicated?: boolean;
|
|
2795
|
+
expiresAt?: boolean;
|
|
2796
|
+
};
|
|
2797
|
+
export interface ConfirmUploadPayload {
|
|
2798
|
+
/** The confirmed file ID */
|
|
2799
|
+
fileId: string;
|
|
2800
|
+
/** New file status */
|
|
2801
|
+
status: string;
|
|
2802
|
+
/** Whether confirmation succeeded */
|
|
2803
|
+
success: boolean;
|
|
2804
|
+
}
|
|
2805
|
+
export type ConfirmUploadPayloadSelect = {
|
|
2806
|
+
fileId?: boolean;
|
|
2807
|
+
status?: boolean;
|
|
2808
|
+
success?: boolean;
|
|
2809
|
+
};
|
|
2810
|
+
export interface ProvisionBucketPayload {
|
|
2811
|
+
/** Whether provisioning succeeded */
|
|
2812
|
+
success: boolean;
|
|
2813
|
+
/** The S3 bucket name that was provisioned */
|
|
2814
|
+
bucketName: string;
|
|
2815
|
+
/** The access type applied */
|
|
2816
|
+
accessType: string;
|
|
2817
|
+
/** The storage provider used */
|
|
2818
|
+
provider: string;
|
|
2819
|
+
/** The S3 endpoint (null for AWS S3 default) */
|
|
2820
|
+
endpoint?: string | null;
|
|
2821
|
+
/** Error message if provisioning failed */
|
|
2822
|
+
error?: string | null;
|
|
2823
|
+
}
|
|
2824
|
+
export type ProvisionBucketPayloadSelect = {
|
|
2825
|
+
success?: boolean;
|
|
2826
|
+
bucketName?: boolean;
|
|
2827
|
+
accessType?: boolean;
|
|
2828
|
+
provider?: boolean;
|
|
2829
|
+
endpoint?: boolean;
|
|
2830
|
+
error?: boolean;
|
|
2831
|
+
};
|
|
2758
2832
|
export interface CreateAppPermissionPayload {
|
|
2759
2833
|
clientMutationId?: string | null;
|
|
2760
2834
|
/** The `AppPermission` that was created by this mutation. */
|
|
@@ -6,13 +6,42 @@
|
|
|
6
6
|
import { OrmClient } from '../client';
|
|
7
7
|
import { QueryBuilder } from '../query-builder';
|
|
8
8
|
import type { InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { SubmitInviteCodeInput, SubmitOrgInviteCodeInput, SubmitInviteCodePayload, SubmitOrgInviteCodePayload, SubmitInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect } from '../input-types';
|
|
9
|
+
import type { SubmitInviteCodeInput, SubmitOrgInviteCodeInput, RequestUploadUrlInput, ConfirmUploadInput, ProvisionBucketInput, SubmitInviteCodePayload, SubmitOrgInviteCodePayload, RequestUploadUrlPayload, ConfirmUploadPayload, ProvisionBucketPayload, SubmitInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, RequestUploadUrlPayloadSelect, ConfirmUploadPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
|
|
10
10
|
export interface SubmitInviteCodeVariables {
|
|
11
11
|
input: SubmitInviteCodeInput;
|
|
12
12
|
}
|
|
13
13
|
export interface SubmitOrgInviteCodeVariables {
|
|
14
14
|
input: SubmitOrgInviteCodeInput;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Variables for requestUploadUrl
|
|
18
|
+
* Request a presigned URL for uploading a file directly to S3.
|
|
19
|
+
Client computes SHA-256 of the file content and provides it here.
|
|
20
|
+
If a file with the same hash already exists (dedup), returns the
|
|
21
|
+
existing file ID and deduplicated=true with no uploadUrl.
|
|
22
|
+
*/
|
|
23
|
+
export interface RequestUploadUrlVariables {
|
|
24
|
+
input: RequestUploadUrlInput;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Variables for confirmUpload
|
|
28
|
+
* Confirm that a file has been uploaded to S3.
|
|
29
|
+
Verifies the object exists in S3, checks content-type,
|
|
30
|
+
and transitions the file status from 'pending' to 'ready'.
|
|
31
|
+
*/
|
|
32
|
+
export interface ConfirmUploadVariables {
|
|
33
|
+
input: ConfirmUploadInput;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Variables for provisionBucket
|
|
37
|
+
* Provision an S3 bucket for a logical bucket in the database.
|
|
38
|
+
Reads the bucket config via RLS, then creates and configures
|
|
39
|
+
the S3 bucket with the appropriate privacy policies, CORS rules,
|
|
40
|
+
and lifecycle settings.
|
|
41
|
+
*/
|
|
42
|
+
export interface ProvisionBucketVariables {
|
|
43
|
+
input: ProvisionBucketInput;
|
|
44
|
+
}
|
|
16
45
|
export declare function createMutationOperations(client: OrmClient): {
|
|
17
46
|
submitInviteCode: <S extends SubmitInviteCodePayloadSelect>(args: SubmitInviteCodeVariables, options: {
|
|
18
47
|
select: S;
|
|
@@ -24,4 +53,19 @@ export declare function createMutationOperations(client: OrmClient): {
|
|
|
24
53
|
} & StrictSelect<S, SubmitOrgInviteCodePayloadSelect>) => QueryBuilder<{
|
|
25
54
|
submitOrgInviteCode: InferSelectResult<SubmitOrgInviteCodePayload, S> | null;
|
|
26
55
|
}>;
|
|
56
|
+
requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
|
|
57
|
+
select: S;
|
|
58
|
+
} & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
|
|
59
|
+
requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
|
|
60
|
+
}>;
|
|
61
|
+
confirmUpload: <S extends ConfirmUploadPayloadSelect>(args: ConfirmUploadVariables, options: {
|
|
62
|
+
select: S;
|
|
63
|
+
} & StrictSelect<S, ConfirmUploadPayloadSelect>) => QueryBuilder<{
|
|
64
|
+
confirmUpload: InferSelectResult<ConfirmUploadPayload, S> | null;
|
|
65
|
+
}>;
|
|
66
|
+
provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
|
|
67
|
+
select: S;
|
|
68
|
+
} & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
|
|
69
|
+
provisionBucket: InferSelectResult<ProvisionBucketPayload, S> | null;
|
|
70
|
+
}>;
|
|
27
71
|
};
|
|
@@ -29,5 +29,41 @@ function createMutationOperations(client) {
|
|
|
29
29
|
},
|
|
30
30
|
], input_types_1.connectionFieldsMap, 'SubmitOrgInviteCodePayload'),
|
|
31
31
|
}),
|
|
32
|
+
requestUploadUrl: (args, options) => new query_builder_1.QueryBuilder({
|
|
33
|
+
client,
|
|
34
|
+
operation: 'mutation',
|
|
35
|
+
operationName: 'RequestUploadUrl',
|
|
36
|
+
fieldName: 'requestUploadUrl',
|
|
37
|
+
...(0, query_builder_1.buildCustomDocument)('mutation', 'RequestUploadUrl', 'requestUploadUrl', options.select, args, [
|
|
38
|
+
{
|
|
39
|
+
name: 'input',
|
|
40
|
+
type: 'RequestUploadUrlInput!',
|
|
41
|
+
},
|
|
42
|
+
], input_types_1.connectionFieldsMap, 'RequestUploadUrlPayload'),
|
|
43
|
+
}),
|
|
44
|
+
confirmUpload: (args, options) => new query_builder_1.QueryBuilder({
|
|
45
|
+
client,
|
|
46
|
+
operation: 'mutation',
|
|
47
|
+
operationName: 'ConfirmUpload',
|
|
48
|
+
fieldName: 'confirmUpload',
|
|
49
|
+
...(0, query_builder_1.buildCustomDocument)('mutation', 'ConfirmUpload', 'confirmUpload', options.select, args, [
|
|
50
|
+
{
|
|
51
|
+
name: 'input',
|
|
52
|
+
type: 'ConfirmUploadInput!',
|
|
53
|
+
},
|
|
54
|
+
], input_types_1.connectionFieldsMap, 'ConfirmUploadPayload'),
|
|
55
|
+
}),
|
|
56
|
+
provisionBucket: (args, options) => new query_builder_1.QueryBuilder({
|
|
57
|
+
client,
|
|
58
|
+
operation: 'mutation',
|
|
59
|
+
operationName: 'ProvisionBucket',
|
|
60
|
+
fieldName: 'provisionBucket',
|
|
61
|
+
...(0, query_builder_1.buildCustomDocument)('mutation', 'ProvisionBucket', 'provisionBucket', options.select, args, [
|
|
62
|
+
{
|
|
63
|
+
name: 'input',
|
|
64
|
+
type: 'ProvisionBucketInput!',
|
|
65
|
+
},
|
|
66
|
+
], input_types_1.connectionFieldsMap, 'ProvisionBucketPayload'),
|
|
67
|
+
}),
|
|
32
68
|
};
|
|
33
69
|
}
|
package/auth/orm/index.d.ts
CHANGED
|
@@ -147,5 +147,20 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
147
147
|
} & import("./select-types").StrictSelect<S, import("./input-types").VerifyTotpPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
148
148
|
verifyTotp: import("./select-types").InferSelectResult<import("./input-types").VerifyTotpPayload, S> | null;
|
|
149
149
|
}>;
|
|
150
|
+
requestUploadUrl: <S extends import("./input-types").RequestUploadUrlPayloadSelect>(args: import("./mutation").RequestUploadUrlVariables, options: {
|
|
151
|
+
select: S;
|
|
152
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").RequestUploadUrlPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
153
|
+
requestUploadUrl: import("./select-types").InferSelectResult<import("./input-types").RequestUploadUrlPayload, S> | null;
|
|
154
|
+
}>;
|
|
155
|
+
confirmUpload: <S extends import("./input-types").ConfirmUploadPayloadSelect>(args: import("./mutation").ConfirmUploadVariables, options: {
|
|
156
|
+
select: S;
|
|
157
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").ConfirmUploadPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
158
|
+
confirmUpload: import("./select-types").InferSelectResult<import("./input-types").ConfirmUploadPayload, S> | null;
|
|
159
|
+
}>;
|
|
160
|
+
provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
|
|
161
|
+
select: S;
|
|
162
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
163
|
+
provisionBucket: import("./select-types").InferSelectResult<import("./input-types").ProvisionBucketPayload, S> | null;
|
|
164
|
+
}>;
|
|
150
165
|
};
|
|
151
166
|
};
|
|
@@ -937,6 +937,26 @@ export interface VerifyTotpInput {
|
|
|
937
937
|
clientMutationId?: string;
|
|
938
938
|
totpValue: string;
|
|
939
939
|
}
|
|
940
|
+
export interface RequestUploadUrlInput {
|
|
941
|
+
/** Bucket key (e.g., "public", "private") */
|
|
942
|
+
bucketKey: string;
|
|
943
|
+
/** SHA-256 content hash computed by the client (hex-encoded, 64 chars) */
|
|
944
|
+
contentHash: string;
|
|
945
|
+
/** MIME type of the file (e.g., "image/png") */
|
|
946
|
+
contentType: string;
|
|
947
|
+
/** File size in bytes */
|
|
948
|
+
size: number;
|
|
949
|
+
/** Original filename (optional, for display and Content-Disposition) */
|
|
950
|
+
filename?: string;
|
|
951
|
+
}
|
|
952
|
+
export interface ConfirmUploadInput {
|
|
953
|
+
/** The file ID returned by requestUploadUrl */
|
|
954
|
+
fileId: string;
|
|
955
|
+
}
|
|
956
|
+
export interface ProvisionBucketInput {
|
|
957
|
+
/** The logical bucket key (e.g., "public", "private") */
|
|
958
|
+
bucketKey: string;
|
|
959
|
+
}
|
|
940
960
|
/** A filter to be used against ConstructiveInternalTypeEmail fields. All fields are combined with a logical ‘and.’ */
|
|
941
961
|
export interface ConstructiveInternalTypeEmailFilter {
|
|
942
962
|
/** Is null (if `true` is specified) or is not null (if `false` is specified). */
|
|
@@ -1882,6 +1902,60 @@ export type VerifyTotpPayloadSelect = {
|
|
|
1882
1902
|
select: SessionSelect;
|
|
1883
1903
|
};
|
|
1884
1904
|
};
|
|
1905
|
+
export interface RequestUploadUrlPayload {
|
|
1906
|
+
/** Presigned PUT URL (null if file was deduplicated) */
|
|
1907
|
+
uploadUrl?: string | null;
|
|
1908
|
+
/** The file ID (existing if deduplicated, new if fresh upload) */
|
|
1909
|
+
fileId: string;
|
|
1910
|
+
/** The S3 object key */
|
|
1911
|
+
key: string;
|
|
1912
|
+
/** Whether this file was deduplicated (already exists with same hash) */
|
|
1913
|
+
deduplicated: boolean;
|
|
1914
|
+
/** Presigned URL expiry time (null if deduplicated) */
|
|
1915
|
+
expiresAt?: string | null;
|
|
1916
|
+
}
|
|
1917
|
+
export type RequestUploadUrlPayloadSelect = {
|
|
1918
|
+
uploadUrl?: boolean;
|
|
1919
|
+
fileId?: boolean;
|
|
1920
|
+
key?: boolean;
|
|
1921
|
+
deduplicated?: boolean;
|
|
1922
|
+
expiresAt?: boolean;
|
|
1923
|
+
};
|
|
1924
|
+
export interface ConfirmUploadPayload {
|
|
1925
|
+
/** The confirmed file ID */
|
|
1926
|
+
fileId: string;
|
|
1927
|
+
/** New file status */
|
|
1928
|
+
status: string;
|
|
1929
|
+
/** Whether confirmation succeeded */
|
|
1930
|
+
success: boolean;
|
|
1931
|
+
}
|
|
1932
|
+
export type ConfirmUploadPayloadSelect = {
|
|
1933
|
+
fileId?: boolean;
|
|
1934
|
+
status?: boolean;
|
|
1935
|
+
success?: boolean;
|
|
1936
|
+
};
|
|
1937
|
+
export interface ProvisionBucketPayload {
|
|
1938
|
+
/** Whether provisioning succeeded */
|
|
1939
|
+
success: boolean;
|
|
1940
|
+
/** The S3 bucket name that was provisioned */
|
|
1941
|
+
bucketName: string;
|
|
1942
|
+
/** The access type applied */
|
|
1943
|
+
accessType: string;
|
|
1944
|
+
/** The storage provider used */
|
|
1945
|
+
provider: string;
|
|
1946
|
+
/** The S3 endpoint (null for AWS S3 default) */
|
|
1947
|
+
endpoint?: string | null;
|
|
1948
|
+
/** Error message if provisioning failed */
|
|
1949
|
+
error?: string | null;
|
|
1950
|
+
}
|
|
1951
|
+
export type ProvisionBucketPayloadSelect = {
|
|
1952
|
+
success?: boolean;
|
|
1953
|
+
bucketName?: boolean;
|
|
1954
|
+
accessType?: boolean;
|
|
1955
|
+
provider?: boolean;
|
|
1956
|
+
endpoint?: boolean;
|
|
1957
|
+
error?: boolean;
|
|
1958
|
+
};
|
|
1885
1959
|
export interface CreateEmailPayload {
|
|
1886
1960
|
clientMutationId?: string | null;
|
|
1887
1961
|
/** The `Email` that was created by this mutation. */
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { OrmClient } from '../client';
|
|
7
7
|
import { QueryBuilder } from '../query-builder';
|
|
8
8
|
import type { InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, ResetPasswordInput, SignInOneTimeTokenInput, SignInInput, SignUpInput, OneTimeTokenInput, ExtendTokenExpiresInput, ForgotPasswordInput, SendVerificationEmailInput, VerifyPasswordInput, VerifyTotpInput, SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, ResetPasswordPayload, SignInOneTimeTokenPayload, SignInPayload, SignUpPayload, OneTimeTokenPayload, ExtendTokenExpiresPayload, ForgotPasswordPayload, SendVerificationEmailPayload, VerifyPasswordPayload, VerifyTotpPayload, SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, ResetPasswordPayloadSelect, SignInOneTimeTokenPayloadSelect, SignInPayloadSelect, SignUpPayloadSelect, OneTimeTokenPayloadSelect, ExtendTokenExpiresPayloadSelect, ForgotPasswordPayloadSelect, SendVerificationEmailPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect } from '../input-types';
|
|
9
|
+
import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, ResetPasswordInput, SignInOneTimeTokenInput, SignInInput, SignUpInput, OneTimeTokenInput, ExtendTokenExpiresInput, ForgotPasswordInput, SendVerificationEmailInput, VerifyPasswordInput, VerifyTotpInput, RequestUploadUrlInput, ConfirmUploadInput, ProvisionBucketInput, SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, ResetPasswordPayload, SignInOneTimeTokenPayload, SignInPayload, SignUpPayload, OneTimeTokenPayload, ExtendTokenExpiresPayload, ForgotPasswordPayload, SendVerificationEmailPayload, VerifyPasswordPayload, VerifyTotpPayload, RequestUploadUrlPayload, ConfirmUploadPayload, ProvisionBucketPayload, SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, ResetPasswordPayloadSelect, SignInOneTimeTokenPayloadSelect, SignInPayloadSelect, SignUpPayloadSelect, OneTimeTokenPayloadSelect, ExtendTokenExpiresPayloadSelect, ForgotPasswordPayloadSelect, SendVerificationEmailPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, RequestUploadUrlPayloadSelect, ConfirmUploadPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
|
|
10
10
|
export interface SignOutVariables {
|
|
11
11
|
input: SignOutInput;
|
|
12
12
|
}
|
|
@@ -55,6 +55,35 @@ export interface VerifyPasswordVariables {
|
|
|
55
55
|
export interface VerifyTotpVariables {
|
|
56
56
|
input: VerifyTotpInput;
|
|
57
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Variables for requestUploadUrl
|
|
60
|
+
* Request a presigned URL for uploading a file directly to S3.
|
|
61
|
+
Client computes SHA-256 of the file content and provides it here.
|
|
62
|
+
If a file with the same hash already exists (dedup), returns the
|
|
63
|
+
existing file ID and deduplicated=true with no uploadUrl.
|
|
64
|
+
*/
|
|
65
|
+
export interface RequestUploadUrlVariables {
|
|
66
|
+
input: RequestUploadUrlInput;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Variables for confirmUpload
|
|
70
|
+
* Confirm that a file has been uploaded to S3.
|
|
71
|
+
Verifies the object exists in S3, checks content-type,
|
|
72
|
+
and transitions the file status from 'pending' to 'ready'.
|
|
73
|
+
*/
|
|
74
|
+
export interface ConfirmUploadVariables {
|
|
75
|
+
input: ConfirmUploadInput;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Variables for provisionBucket
|
|
79
|
+
* Provision an S3 bucket for a logical bucket in the database.
|
|
80
|
+
Reads the bucket config via RLS, then creates and configures
|
|
81
|
+
the S3 bucket with the appropriate privacy policies, CORS rules,
|
|
82
|
+
and lifecycle settings.
|
|
83
|
+
*/
|
|
84
|
+
export interface ProvisionBucketVariables {
|
|
85
|
+
input: ProvisionBucketInput;
|
|
86
|
+
}
|
|
58
87
|
export declare function createMutationOperations(client: OrmClient): {
|
|
59
88
|
signOut: <S extends SignOutPayloadSelect>(args: SignOutVariables, options: {
|
|
60
89
|
select: S;
|
|
@@ -136,4 +165,19 @@ export declare function createMutationOperations(client: OrmClient): {
|
|
|
136
165
|
} & StrictSelect<S, VerifyTotpPayloadSelect>) => QueryBuilder<{
|
|
137
166
|
verifyTotp: InferSelectResult<VerifyTotpPayload, S> | null;
|
|
138
167
|
}>;
|
|
168
|
+
requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
|
|
169
|
+
select: S;
|
|
170
|
+
} & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
|
|
171
|
+
requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
|
|
172
|
+
}>;
|
|
173
|
+
confirmUpload: <S extends ConfirmUploadPayloadSelect>(args: ConfirmUploadVariables, options: {
|
|
174
|
+
select: S;
|
|
175
|
+
} & StrictSelect<S, ConfirmUploadPayloadSelect>) => QueryBuilder<{
|
|
176
|
+
confirmUpload: InferSelectResult<ConfirmUploadPayload, S> | null;
|
|
177
|
+
}>;
|
|
178
|
+
provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
|
|
179
|
+
select: S;
|
|
180
|
+
} & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
|
|
181
|
+
provisionBucket: InferSelectResult<ProvisionBucketPayload, S> | null;
|
|
182
|
+
}>;
|
|
139
183
|
};
|
|
@@ -197,5 +197,41 @@ function createMutationOperations(client) {
|
|
|
197
197
|
},
|
|
198
198
|
], input_types_1.connectionFieldsMap, 'VerifyTotpPayload'),
|
|
199
199
|
}),
|
|
200
|
+
requestUploadUrl: (args, options) => new query_builder_1.QueryBuilder({
|
|
201
|
+
client,
|
|
202
|
+
operation: 'mutation',
|
|
203
|
+
operationName: 'RequestUploadUrl',
|
|
204
|
+
fieldName: 'requestUploadUrl',
|
|
205
|
+
...(0, query_builder_1.buildCustomDocument)('mutation', 'RequestUploadUrl', 'requestUploadUrl', options.select, args, [
|
|
206
|
+
{
|
|
207
|
+
name: 'input',
|
|
208
|
+
type: 'RequestUploadUrlInput!',
|
|
209
|
+
},
|
|
210
|
+
], input_types_1.connectionFieldsMap, 'RequestUploadUrlPayload'),
|
|
211
|
+
}),
|
|
212
|
+
confirmUpload: (args, options) => new query_builder_1.QueryBuilder({
|
|
213
|
+
client,
|
|
214
|
+
operation: 'mutation',
|
|
215
|
+
operationName: 'ConfirmUpload',
|
|
216
|
+
fieldName: 'confirmUpload',
|
|
217
|
+
...(0, query_builder_1.buildCustomDocument)('mutation', 'ConfirmUpload', 'confirmUpload', options.select, args, [
|
|
218
|
+
{
|
|
219
|
+
name: 'input',
|
|
220
|
+
type: 'ConfirmUploadInput!',
|
|
221
|
+
},
|
|
222
|
+
], input_types_1.connectionFieldsMap, 'ConfirmUploadPayload'),
|
|
223
|
+
}),
|
|
224
|
+
provisionBucket: (args, options) => new query_builder_1.QueryBuilder({
|
|
225
|
+
client,
|
|
226
|
+
operation: 'mutation',
|
|
227
|
+
operationName: 'ProvisionBucket',
|
|
228
|
+
fieldName: 'provisionBucket',
|
|
229
|
+
...(0, query_builder_1.buildCustomDocument)('mutation', 'ProvisionBucket', 'provisionBucket', options.select, args, [
|
|
230
|
+
{
|
|
231
|
+
name: 'input',
|
|
232
|
+
type: 'ProvisionBucketInput!',
|
|
233
|
+
},
|
|
234
|
+
], input_types_1.connectionFieldsMap, 'ProvisionBucketPayload'),
|
|
235
|
+
}),
|
|
200
236
|
};
|
|
201
237
|
}
|
package/esm/admin/orm/index.d.ts
CHANGED
|
@@ -162,5 +162,20 @@ export declare function createClient(config: OrmClientConfig): {
|
|
|
162
162
|
} & import("./select-types").StrictSelect<S, import("./input-types").SubmitOrgInviteCodePayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
163
163
|
submitOrgInviteCode: import("./select-types").InferSelectResult<import("./input-types").SubmitOrgInviteCodePayload, S> | null;
|
|
164
164
|
}>;
|
|
165
|
+
requestUploadUrl: <S extends import("./input-types").RequestUploadUrlPayloadSelect>(args: import("./mutation").RequestUploadUrlVariables, options: {
|
|
166
|
+
select: S;
|
|
167
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").RequestUploadUrlPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
168
|
+
requestUploadUrl: import("./select-types").InferSelectResult<import("./input-types").RequestUploadUrlPayload, S> | null;
|
|
169
|
+
}>;
|
|
170
|
+
confirmUpload: <S extends import("./input-types").ConfirmUploadPayloadSelect>(args: import("./mutation").ConfirmUploadVariables, options: {
|
|
171
|
+
select: S;
|
|
172
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").ConfirmUploadPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
173
|
+
confirmUpload: import("./select-types").InferSelectResult<import("./input-types").ConfirmUploadPayload, S> | null;
|
|
174
|
+
}>;
|
|
175
|
+
provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
|
|
176
|
+
select: S;
|
|
177
|
+
} & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
|
|
178
|
+
provisionBucket: import("./select-types").InferSelectResult<import("./input-types").ProvisionBucketPayload, S> | null;
|
|
179
|
+
}>;
|
|
165
180
|
};
|
|
166
181
|
};
|
|
@@ -2570,6 +2570,26 @@ export interface SubmitOrgInviteCodeInput {
|
|
|
2570
2570
|
clientMutationId?: string;
|
|
2571
2571
|
token?: string;
|
|
2572
2572
|
}
|
|
2573
|
+
export interface RequestUploadUrlInput {
|
|
2574
|
+
/** Bucket key (e.g., "public", "private") */
|
|
2575
|
+
bucketKey: string;
|
|
2576
|
+
/** SHA-256 content hash computed by the client (hex-encoded, 64 chars) */
|
|
2577
|
+
contentHash: string;
|
|
2578
|
+
/** MIME type of the file (e.g., "image/png") */
|
|
2579
|
+
contentType: string;
|
|
2580
|
+
/** File size in bytes */
|
|
2581
|
+
size: number;
|
|
2582
|
+
/** Original filename (optional, for display and Content-Disposition) */
|
|
2583
|
+
filename?: string;
|
|
2584
|
+
}
|
|
2585
|
+
export interface ConfirmUploadInput {
|
|
2586
|
+
/** The file ID returned by requestUploadUrl */
|
|
2587
|
+
fileId: string;
|
|
2588
|
+
}
|
|
2589
|
+
export interface ProvisionBucketInput {
|
|
2590
|
+
/** The logical bucket key (e.g., "public", "private") */
|
|
2591
|
+
bucketKey: string;
|
|
2592
|
+
}
|
|
2573
2593
|
/** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */
|
|
2574
2594
|
export interface ConstructiveInternalTypeImageFilter {
|
|
2575
2595
|
/** Is null (if `true` is specified) or is not null (if `false` is specified). */
|
|
@@ -2755,6 +2775,60 @@ export type SubmitOrgInviteCodePayloadSelect = {
|
|
|
2755
2775
|
clientMutationId?: boolean;
|
|
2756
2776
|
result?: boolean;
|
|
2757
2777
|
};
|
|
2778
|
+
export interface RequestUploadUrlPayload {
|
|
2779
|
+
/** Presigned PUT URL (null if file was deduplicated) */
|
|
2780
|
+
uploadUrl?: string | null;
|
|
2781
|
+
/** The file ID (existing if deduplicated, new if fresh upload) */
|
|
2782
|
+
fileId: string;
|
|
2783
|
+
/** The S3 object key */
|
|
2784
|
+
key: string;
|
|
2785
|
+
/** Whether this file was deduplicated (already exists with same hash) */
|
|
2786
|
+
deduplicated: boolean;
|
|
2787
|
+
/** Presigned URL expiry time (null if deduplicated) */
|
|
2788
|
+
expiresAt?: string | null;
|
|
2789
|
+
}
|
|
2790
|
+
export type RequestUploadUrlPayloadSelect = {
|
|
2791
|
+
uploadUrl?: boolean;
|
|
2792
|
+
fileId?: boolean;
|
|
2793
|
+
key?: boolean;
|
|
2794
|
+
deduplicated?: boolean;
|
|
2795
|
+
expiresAt?: boolean;
|
|
2796
|
+
};
|
|
2797
|
+
export interface ConfirmUploadPayload {
|
|
2798
|
+
/** The confirmed file ID */
|
|
2799
|
+
fileId: string;
|
|
2800
|
+
/** New file status */
|
|
2801
|
+
status: string;
|
|
2802
|
+
/** Whether confirmation succeeded */
|
|
2803
|
+
success: boolean;
|
|
2804
|
+
}
|
|
2805
|
+
export type ConfirmUploadPayloadSelect = {
|
|
2806
|
+
fileId?: boolean;
|
|
2807
|
+
status?: boolean;
|
|
2808
|
+
success?: boolean;
|
|
2809
|
+
};
|
|
2810
|
+
export interface ProvisionBucketPayload {
|
|
2811
|
+
/** Whether provisioning succeeded */
|
|
2812
|
+
success: boolean;
|
|
2813
|
+
/** The S3 bucket name that was provisioned */
|
|
2814
|
+
bucketName: string;
|
|
2815
|
+
/** The access type applied */
|
|
2816
|
+
accessType: string;
|
|
2817
|
+
/** The storage provider used */
|
|
2818
|
+
provider: string;
|
|
2819
|
+
/** The S3 endpoint (null for AWS S3 default) */
|
|
2820
|
+
endpoint?: string | null;
|
|
2821
|
+
/** Error message if provisioning failed */
|
|
2822
|
+
error?: string | null;
|
|
2823
|
+
}
|
|
2824
|
+
export type ProvisionBucketPayloadSelect = {
|
|
2825
|
+
success?: boolean;
|
|
2826
|
+
bucketName?: boolean;
|
|
2827
|
+
accessType?: boolean;
|
|
2828
|
+
provider?: boolean;
|
|
2829
|
+
endpoint?: boolean;
|
|
2830
|
+
error?: boolean;
|
|
2831
|
+
};
|
|
2758
2832
|
export interface CreateAppPermissionPayload {
|
|
2759
2833
|
clientMutationId?: string | null;
|
|
2760
2834
|
/** The `AppPermission` that was created by this mutation. */
|
|
@@ -6,13 +6,42 @@
|
|
|
6
6
|
import { OrmClient } from '../client';
|
|
7
7
|
import { QueryBuilder } from '../query-builder';
|
|
8
8
|
import type { InferSelectResult, StrictSelect } from '../select-types';
|
|
9
|
-
import type { SubmitInviteCodeInput, SubmitOrgInviteCodeInput, SubmitInviteCodePayload, SubmitOrgInviteCodePayload, SubmitInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect } from '../input-types';
|
|
9
|
+
import type { SubmitInviteCodeInput, SubmitOrgInviteCodeInput, RequestUploadUrlInput, ConfirmUploadInput, ProvisionBucketInput, SubmitInviteCodePayload, SubmitOrgInviteCodePayload, RequestUploadUrlPayload, ConfirmUploadPayload, ProvisionBucketPayload, SubmitInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, RequestUploadUrlPayloadSelect, ConfirmUploadPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
|
|
10
10
|
export interface SubmitInviteCodeVariables {
|
|
11
11
|
input: SubmitInviteCodeInput;
|
|
12
12
|
}
|
|
13
13
|
export interface SubmitOrgInviteCodeVariables {
|
|
14
14
|
input: SubmitOrgInviteCodeInput;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Variables for requestUploadUrl
|
|
18
|
+
* Request a presigned URL for uploading a file directly to S3.
|
|
19
|
+
Client computes SHA-256 of the file content and provides it here.
|
|
20
|
+
If a file with the same hash already exists (dedup), returns the
|
|
21
|
+
existing file ID and deduplicated=true with no uploadUrl.
|
|
22
|
+
*/
|
|
23
|
+
export interface RequestUploadUrlVariables {
|
|
24
|
+
input: RequestUploadUrlInput;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Variables for confirmUpload
|
|
28
|
+
* Confirm that a file has been uploaded to S3.
|
|
29
|
+
Verifies the object exists in S3, checks content-type,
|
|
30
|
+
and transitions the file status from 'pending' to 'ready'.
|
|
31
|
+
*/
|
|
32
|
+
export interface ConfirmUploadVariables {
|
|
33
|
+
input: ConfirmUploadInput;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Variables for provisionBucket
|
|
37
|
+
* Provision an S3 bucket for a logical bucket in the database.
|
|
38
|
+
Reads the bucket config via RLS, then creates and configures
|
|
39
|
+
the S3 bucket with the appropriate privacy policies, CORS rules,
|
|
40
|
+
and lifecycle settings.
|
|
41
|
+
*/
|
|
42
|
+
export interface ProvisionBucketVariables {
|
|
43
|
+
input: ProvisionBucketInput;
|
|
44
|
+
}
|
|
16
45
|
export declare function createMutationOperations(client: OrmClient): {
|
|
17
46
|
submitInviteCode: <S extends SubmitInviteCodePayloadSelect>(args: SubmitInviteCodeVariables, options: {
|
|
18
47
|
select: S;
|
|
@@ -24,4 +53,19 @@ export declare function createMutationOperations(client: OrmClient): {
|
|
|
24
53
|
} & StrictSelect<S, SubmitOrgInviteCodePayloadSelect>) => QueryBuilder<{
|
|
25
54
|
submitOrgInviteCode: InferSelectResult<SubmitOrgInviteCodePayload, S> | null;
|
|
26
55
|
}>;
|
|
56
|
+
requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
|
|
57
|
+
select: S;
|
|
58
|
+
} & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
|
|
59
|
+
requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
|
|
60
|
+
}>;
|
|
61
|
+
confirmUpload: <S extends ConfirmUploadPayloadSelect>(args: ConfirmUploadVariables, options: {
|
|
62
|
+
select: S;
|
|
63
|
+
} & StrictSelect<S, ConfirmUploadPayloadSelect>) => QueryBuilder<{
|
|
64
|
+
confirmUpload: InferSelectResult<ConfirmUploadPayload, S> | null;
|
|
65
|
+
}>;
|
|
66
|
+
provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
|
|
67
|
+
select: S;
|
|
68
|
+
} & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
|
|
69
|
+
provisionBucket: InferSelectResult<ProvisionBucketPayload, S> | null;
|
|
70
|
+
}>;
|
|
27
71
|
};
|
|
@@ -26,5 +26,41 @@ export function createMutationOperations(client) {
|
|
|
26
26
|
},
|
|
27
27
|
], connectionFieldsMap, 'SubmitOrgInviteCodePayload'),
|
|
28
28
|
}),
|
|
29
|
+
requestUploadUrl: (args, options) => new QueryBuilder({
|
|
30
|
+
client,
|
|
31
|
+
operation: 'mutation',
|
|
32
|
+
operationName: 'RequestUploadUrl',
|
|
33
|
+
fieldName: 'requestUploadUrl',
|
|
34
|
+
...buildCustomDocument('mutation', 'RequestUploadUrl', 'requestUploadUrl', options.select, args, [
|
|
35
|
+
{
|
|
36
|
+
name: 'input',
|
|
37
|
+
type: 'RequestUploadUrlInput!',
|
|
38
|
+
},
|
|
39
|
+
], connectionFieldsMap, 'RequestUploadUrlPayload'),
|
|
40
|
+
}),
|
|
41
|
+
confirmUpload: (args, options) => new QueryBuilder({
|
|
42
|
+
client,
|
|
43
|
+
operation: 'mutation',
|
|
44
|
+
operationName: 'ConfirmUpload',
|
|
45
|
+
fieldName: 'confirmUpload',
|
|
46
|
+
...buildCustomDocument('mutation', 'ConfirmUpload', 'confirmUpload', options.select, args, [
|
|
47
|
+
{
|
|
48
|
+
name: 'input',
|
|
49
|
+
type: 'ConfirmUploadInput!',
|
|
50
|
+
},
|
|
51
|
+
], connectionFieldsMap, 'ConfirmUploadPayload'),
|
|
52
|
+
}),
|
|
53
|
+
provisionBucket: (args, options) => new QueryBuilder({
|
|
54
|
+
client,
|
|
55
|
+
operation: 'mutation',
|
|
56
|
+
operationName: 'ProvisionBucket',
|
|
57
|
+
fieldName: 'provisionBucket',
|
|
58
|
+
...buildCustomDocument('mutation', 'ProvisionBucket', 'provisionBucket', options.select, args, [
|
|
59
|
+
{
|
|
60
|
+
name: 'input',
|
|
61
|
+
type: 'ProvisionBucketInput!',
|
|
62
|
+
},
|
|
63
|
+
], connectionFieldsMap, 'ProvisionBucketPayload'),
|
|
64
|
+
}),
|
|
29
65
|
};
|
|
30
66
|
}
|