@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.
@@ -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 { SendAccountDeletionEmailInput, SignOutInput, AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, SubmitInviteCodeInput, SubmitOrgInviteCodeInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, BootstrapUserInput, SetFieldOrderInput, ProvisionUniqueConstraintInput, ProvisionFullTextSearchInput, ProvisionIndexInput, SetDataAtPathInput, SetPropsAndCommitInput, ProvisionDatabaseWithUserInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, SignInOneTimeTokenInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, SignInInput, SignUpInput, OneTimeTokenInput, ProvisionTableInput, SendVerificationEmailInput, ForgotPasswordInput, VerifyPasswordInput, VerifyTotpInput, SendAccountDeletionEmailPayload, SignOutPayload, AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, SubmitInviteCodePayload, SubmitOrgInviteCodePayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionUniqueConstraintPayload, ProvisionFullTextSearchPayload, ProvisionIndexPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, ProvisionDatabaseWithUserPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, SignInOneTimeTokenPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, SignInPayload, SignUpPayload, OneTimeTokenPayload, ProvisionTablePayload, SendVerificationEmailPayload, ForgotPasswordPayload, VerifyPasswordPayload, VerifyTotpPayload, SendAccountDeletionEmailPayloadSelect, SignOutPayloadSelect, AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, SubmitInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionUniqueConstraintPayloadSelect, ProvisionFullTextSearchPayloadSelect, ProvisionIndexPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, ProvisionDatabaseWithUserPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, SignInOneTimeTokenPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, SignInPayloadSelect, SignUpPayloadSelect, OneTimeTokenPayloadSelect, ProvisionTablePayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect } from '../input-types';
9
+ import type { SendAccountDeletionEmailInput, SignOutInput, AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, SubmitInviteCodeInput, SubmitOrgInviteCodeInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, BootstrapUserInput, SetFieldOrderInput, ProvisionUniqueConstraintInput, ProvisionFullTextSearchInput, ProvisionIndexInput, SetDataAtPathInput, SetPropsAndCommitInput, ProvisionDatabaseWithUserInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, SignInOneTimeTokenInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, SignInInput, SignUpInput, OneTimeTokenInput, ProvisionTableInput, SendVerificationEmailInput, ForgotPasswordInput, VerifyPasswordInput, VerifyTotpInput, RequestUploadUrlInput, ConfirmUploadInput, ProvisionBucketInput, SendAccountDeletionEmailPayload, SignOutPayload, AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, SubmitInviteCodePayload, SubmitOrgInviteCodePayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionUniqueConstraintPayload, ProvisionFullTextSearchPayload, ProvisionIndexPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, ProvisionDatabaseWithUserPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, SignInOneTimeTokenPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, SignInPayload, SignUpPayload, OneTimeTokenPayload, ProvisionTablePayload, SendVerificationEmailPayload, ForgotPasswordPayload, VerifyPasswordPayload, VerifyTotpPayload, RequestUploadUrlPayload, ConfirmUploadPayload, ProvisionBucketPayload, SendAccountDeletionEmailPayloadSelect, SignOutPayloadSelect, AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, SubmitInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionUniqueConstraintPayloadSelect, ProvisionFullTextSearchPayloadSelect, ProvisionIndexPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, ProvisionDatabaseWithUserPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, SignInOneTimeTokenPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, SignInPayloadSelect, SignUpPayloadSelect, OneTimeTokenPayloadSelect, ProvisionTablePayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, RequestUploadUrlPayloadSelect, ConfirmUploadPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
10
10
  export interface SendAccountDeletionEmailVariables {
11
11
  input: SendAccountDeletionEmailInput;
12
12
  }
@@ -177,6 +177,35 @@ export interface VerifyPasswordVariables {
177
177
  export interface VerifyTotpVariables {
178
178
  input: VerifyTotpInput;
179
179
  }
180
+ /**
181
+ * Variables for requestUploadUrl
182
+ * Request a presigned URL for uploading a file directly to S3.
183
+ Client computes SHA-256 of the file content and provides it here.
184
+ If a file with the same hash already exists (dedup), returns the
185
+ existing file ID and deduplicated=true with no uploadUrl.
186
+ */
187
+ export interface RequestUploadUrlVariables {
188
+ input: RequestUploadUrlInput;
189
+ }
190
+ /**
191
+ * Variables for confirmUpload
192
+ * Confirm that a file has been uploaded to S3.
193
+ Verifies the object exists in S3, checks content-type,
194
+ and transitions the file status from 'pending' to 'ready'.
195
+ */
196
+ export interface ConfirmUploadVariables {
197
+ input: ConfirmUploadInput;
198
+ }
199
+ /**
200
+ * Variables for provisionBucket
201
+ * Provision an S3 bucket for a logical bucket in the database.
202
+ Reads the bucket config via RLS, then creates and configures
203
+ the S3 bucket with the appropriate privacy policies, CORS rules,
204
+ and lifecycle settings.
205
+ */
206
+ export interface ProvisionBucketVariables {
207
+ input: ProvisionBucketInput;
208
+ }
180
209
  export declare function createMutationOperations(client: OrmClient): {
181
210
  sendAccountDeletionEmail: <S extends SendAccountDeletionEmailPayloadSelect>(args: SendAccountDeletionEmailVariables, options: {
182
211
  select: S;
@@ -383,4 +412,19 @@ export declare function createMutationOperations(client: OrmClient): {
383
412
  } & StrictSelect<S, VerifyTotpPayloadSelect>) => QueryBuilder<{
384
413
  verifyTotp: InferSelectResult<VerifyTotpPayload, S> | null;
385
414
  }>;
415
+ requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
416
+ select: S;
417
+ } & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
418
+ requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
419
+ }>;
420
+ confirmUpload: <S extends ConfirmUploadPayloadSelect>(args: ConfirmUploadVariables, options: {
421
+ select: S;
422
+ } & StrictSelect<S, ConfirmUploadPayloadSelect>) => QueryBuilder<{
423
+ confirmUpload: InferSelectResult<ConfirmUploadPayload, S> | null;
424
+ }>;
425
+ provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
426
+ select: S;
427
+ } & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
428
+ provisionBucket: InferSelectResult<ProvisionBucketPayload, S> | null;
429
+ }>;
386
430
  };
@@ -494,5 +494,41 @@ export function createMutationOperations(client) {
494
494
  },
495
495
  ], connectionFieldsMap, 'VerifyTotpPayload'),
496
496
  }),
497
+ requestUploadUrl: (args, options) => new QueryBuilder({
498
+ client,
499
+ operation: 'mutation',
500
+ operationName: 'RequestUploadUrl',
501
+ fieldName: 'requestUploadUrl',
502
+ ...buildCustomDocument('mutation', 'RequestUploadUrl', 'requestUploadUrl', options.select, args, [
503
+ {
504
+ name: 'input',
505
+ type: 'RequestUploadUrlInput!',
506
+ },
507
+ ], connectionFieldsMap, 'RequestUploadUrlPayload'),
508
+ }),
509
+ confirmUpload: (args, options) => new QueryBuilder({
510
+ client,
511
+ operation: 'mutation',
512
+ operationName: 'ConfirmUpload',
513
+ fieldName: 'confirmUpload',
514
+ ...buildCustomDocument('mutation', 'ConfirmUpload', 'confirmUpload', options.select, args, [
515
+ {
516
+ name: 'input',
517
+ type: 'ConfirmUploadInput!',
518
+ },
519
+ ], connectionFieldsMap, 'ConfirmUploadPayload'),
520
+ }),
521
+ provisionBucket: (args, options) => new QueryBuilder({
522
+ client,
523
+ operation: 'mutation',
524
+ operationName: 'ProvisionBucket',
525
+ fieldName: 'provisionBucket',
526
+ ...buildCustomDocument('mutation', 'ProvisionBucket', 'provisionBucket', options.select, args, [
527
+ {
528
+ name: 'input',
529
+ type: 'ProvisionBucketInput!',
530
+ },
531
+ ], connectionFieldsMap, 'ProvisionBucketPayload'),
532
+ }),
497
533
  };
498
534
  }
@@ -103,5 +103,20 @@ export declare function createClient(config: OrmClientConfig): {
103
103
  } & import("./select-types").StrictSelect<S, import("./input-types").SetAndCommitPayloadSelect>) => import("./query-builder").QueryBuilder<{
104
104
  setAndCommit: import("./select-types").InferSelectResult<import("./input-types").SetAndCommitPayload, S> | null;
105
105
  }>;
106
+ requestUploadUrl: <S extends import("./input-types").RequestUploadUrlPayloadSelect>(args: import("./mutation").RequestUploadUrlVariables, options: {
107
+ select: S;
108
+ } & import("./select-types").StrictSelect<S, import("./input-types").RequestUploadUrlPayloadSelect>) => import("./query-builder").QueryBuilder<{
109
+ requestUploadUrl: import("./select-types").InferSelectResult<import("./input-types").RequestUploadUrlPayload, S> | null;
110
+ }>;
111
+ confirmUpload: <S extends import("./input-types").ConfirmUploadPayloadSelect>(args: import("./mutation").ConfirmUploadVariables, options: {
112
+ select: S;
113
+ } & import("./select-types").StrictSelect<S, import("./input-types").ConfirmUploadPayloadSelect>) => import("./query-builder").QueryBuilder<{
114
+ confirmUpload: import("./select-types").InferSelectResult<import("./input-types").ConfirmUploadPayload, S> | null;
115
+ }>;
116
+ provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
117
+ select: S;
118
+ } & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
119
+ provisionBucket: import("./select-types").InferSelectResult<import("./input-types").ProvisionBucketPayload, S> | null;
120
+ }>;
106
121
  };
107
122
  };
@@ -629,6 +629,26 @@ export interface SetAndCommitInput {
629
629
  kids?: string[];
630
630
  ktree?: string[];
631
631
  }
632
+ export interface RequestUploadUrlInput {
633
+ /** Bucket key (e.g., "public", "private") */
634
+ bucketKey: string;
635
+ /** SHA-256 content hash computed by the client (hex-encoded, 64 chars) */
636
+ contentHash: string;
637
+ /** MIME type of the file (e.g., "image/png") */
638
+ contentType: string;
639
+ /** File size in bytes */
640
+ size: number;
641
+ /** Original filename (optional, for display and Content-Disposition) */
642
+ filename?: string;
643
+ }
644
+ export interface ConfirmUploadInput {
645
+ /** The file ID returned by requestUploadUrl */
646
+ fileId: string;
647
+ }
648
+ export interface ProvisionBucketInput {
649
+ /** The logical bucket key (e.g., "public", "private") */
650
+ bucketKey: string;
651
+ }
632
652
  /** A connection to a list of `Object` values. */
633
653
  export interface ObjectConnection {
634
654
  nodes: Object[];
@@ -708,6 +728,60 @@ export type SetAndCommitPayloadSelect = {
708
728
  clientMutationId?: boolean;
709
729
  result?: boolean;
710
730
  };
731
+ export interface RequestUploadUrlPayload {
732
+ /** Presigned PUT URL (null if file was deduplicated) */
733
+ uploadUrl?: string | null;
734
+ /** The file ID (existing if deduplicated, new if fresh upload) */
735
+ fileId: string;
736
+ /** The S3 object key */
737
+ key: string;
738
+ /** Whether this file was deduplicated (already exists with same hash) */
739
+ deduplicated: boolean;
740
+ /** Presigned URL expiry time (null if deduplicated) */
741
+ expiresAt?: string | null;
742
+ }
743
+ export type RequestUploadUrlPayloadSelect = {
744
+ uploadUrl?: boolean;
745
+ fileId?: boolean;
746
+ key?: boolean;
747
+ deduplicated?: boolean;
748
+ expiresAt?: boolean;
749
+ };
750
+ export interface ConfirmUploadPayload {
751
+ /** The confirmed file ID */
752
+ fileId: string;
753
+ /** New file status */
754
+ status: string;
755
+ /** Whether confirmation succeeded */
756
+ success: boolean;
757
+ }
758
+ export type ConfirmUploadPayloadSelect = {
759
+ fileId?: boolean;
760
+ status?: boolean;
761
+ success?: boolean;
762
+ };
763
+ export interface ProvisionBucketPayload {
764
+ /** Whether provisioning succeeded */
765
+ success: boolean;
766
+ /** The S3 bucket name that was provisioned */
767
+ bucketName: string;
768
+ /** The access type applied */
769
+ accessType: string;
770
+ /** The storage provider used */
771
+ provider: string;
772
+ /** The S3 endpoint (null for AWS S3 default) */
773
+ endpoint?: string | null;
774
+ /** Error message if provisioning failed */
775
+ error?: string | null;
776
+ }
777
+ export type ProvisionBucketPayloadSelect = {
778
+ success?: boolean;
779
+ bucketName?: boolean;
780
+ accessType?: boolean;
781
+ provider?: boolean;
782
+ endpoint?: boolean;
783
+ error?: boolean;
784
+ };
711
785
  export interface CreateObjectPayload {
712
786
  clientMutationId?: string | null;
713
787
  /** The `Object` 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 { FreezeObjectsInput, InitEmptyRepoInput, RemoveNodeAtPathInput, SetDataAtPathInput, SetPropsAndCommitInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, FreezeObjectsPayload, InitEmptyRepoPayload, RemoveNodeAtPathPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, RemoveNodeAtPathPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect } from '../input-types';
9
+ import type { FreezeObjectsInput, InitEmptyRepoInput, RemoveNodeAtPathInput, SetDataAtPathInput, SetPropsAndCommitInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, RequestUploadUrlInput, ConfirmUploadInput, ProvisionBucketInput, FreezeObjectsPayload, InitEmptyRepoPayload, RemoveNodeAtPathPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, RequestUploadUrlPayload, ConfirmUploadPayload, ProvisionBucketPayload, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, RemoveNodeAtPathPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, RequestUploadUrlPayloadSelect, ConfirmUploadPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
10
10
  export interface FreezeObjectsVariables {
11
11
  input: FreezeObjectsInput;
12
12
  }
@@ -31,6 +31,35 @@ export interface UpdateNodeAtPathVariables {
31
31
  export interface SetAndCommitVariables {
32
32
  input: SetAndCommitInput;
33
33
  }
34
+ /**
35
+ * Variables for requestUploadUrl
36
+ * Request a presigned URL for uploading a file directly to S3.
37
+ Client computes SHA-256 of the file content and provides it here.
38
+ If a file with the same hash already exists (dedup), returns the
39
+ existing file ID and deduplicated=true with no uploadUrl.
40
+ */
41
+ export interface RequestUploadUrlVariables {
42
+ input: RequestUploadUrlInput;
43
+ }
44
+ /**
45
+ * Variables for confirmUpload
46
+ * Confirm that a file has been uploaded to S3.
47
+ Verifies the object exists in S3, checks content-type,
48
+ and transitions the file status from 'pending' to 'ready'.
49
+ */
50
+ export interface ConfirmUploadVariables {
51
+ input: ConfirmUploadInput;
52
+ }
53
+ /**
54
+ * Variables for provisionBucket
55
+ * Provision an S3 bucket for a logical bucket in the database.
56
+ Reads the bucket config via RLS, then creates and configures
57
+ the S3 bucket with the appropriate privacy policies, CORS rules,
58
+ and lifecycle settings.
59
+ */
60
+ export interface ProvisionBucketVariables {
61
+ input: ProvisionBucketInput;
62
+ }
34
63
  export declare function createMutationOperations(client: OrmClient): {
35
64
  freezeObjects: <S extends FreezeObjectsPayloadSelect>(args: FreezeObjectsVariables, options: {
36
65
  select: S;
@@ -72,4 +101,19 @@ export declare function createMutationOperations(client: OrmClient): {
72
101
  } & StrictSelect<S, SetAndCommitPayloadSelect>) => QueryBuilder<{
73
102
  setAndCommit: InferSelectResult<SetAndCommitPayload, S> | null;
74
103
  }>;
104
+ requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
105
+ select: S;
106
+ } & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
107
+ requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
108
+ }>;
109
+ confirmUpload: <S extends ConfirmUploadPayloadSelect>(args: ConfirmUploadVariables, options: {
110
+ select: S;
111
+ } & StrictSelect<S, ConfirmUploadPayloadSelect>) => QueryBuilder<{
112
+ confirmUpload: InferSelectResult<ConfirmUploadPayload, S> | null;
113
+ }>;
114
+ provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
115
+ select: S;
116
+ } & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
117
+ provisionBucket: InferSelectResult<ProvisionBucketPayload, S> | null;
118
+ }>;
75
119
  };
@@ -101,5 +101,41 @@ function createMutationOperations(client) {
101
101
  },
102
102
  ], input_types_1.connectionFieldsMap, 'SetAndCommitPayload'),
103
103
  }),
104
+ requestUploadUrl: (args, options) => new query_builder_1.QueryBuilder({
105
+ client,
106
+ operation: 'mutation',
107
+ operationName: 'RequestUploadUrl',
108
+ fieldName: 'requestUploadUrl',
109
+ ...(0, query_builder_1.buildCustomDocument)('mutation', 'RequestUploadUrl', 'requestUploadUrl', options.select, args, [
110
+ {
111
+ name: 'input',
112
+ type: 'RequestUploadUrlInput!',
113
+ },
114
+ ], input_types_1.connectionFieldsMap, 'RequestUploadUrlPayload'),
115
+ }),
116
+ confirmUpload: (args, options) => new query_builder_1.QueryBuilder({
117
+ client,
118
+ operation: 'mutation',
119
+ operationName: 'ConfirmUpload',
120
+ fieldName: 'confirmUpload',
121
+ ...(0, query_builder_1.buildCustomDocument)('mutation', 'ConfirmUpload', 'confirmUpload', options.select, args, [
122
+ {
123
+ name: 'input',
124
+ type: 'ConfirmUploadInput!',
125
+ },
126
+ ], input_types_1.connectionFieldsMap, 'ConfirmUploadPayload'),
127
+ }),
128
+ provisionBucket: (args, options) => new query_builder_1.QueryBuilder({
129
+ client,
130
+ operation: 'mutation',
131
+ operationName: 'ProvisionBucket',
132
+ fieldName: 'provisionBucket',
133
+ ...(0, query_builder_1.buildCustomDocument)('mutation', 'ProvisionBucket', 'provisionBucket', options.select, args, [
134
+ {
135
+ name: 'input',
136
+ type: 'ProvisionBucketInput!',
137
+ },
138
+ ], input_types_1.connectionFieldsMap, 'ProvisionBucketPayload'),
139
+ }),
104
140
  };
105
141
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/sdk",
3
- "version": "0.12.22",
3
+ "version": "0.13.0",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "Constructive SDK - Auto-generated GraphQL types and ORM client",
6
6
  "main": "index.js",
@@ -42,16 +42,16 @@
42
42
  ],
43
43
  "dependencies": {
44
44
  "@0no-co/graphql.web": "^1.1.2",
45
- "@constructive-io/graphql-types": "^3.4.3",
45
+ "@constructive-io/graphql-types": "^3.4.4",
46
46
  "gql-ast": "^3.4.2",
47
47
  "graphql": "16.13.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@constructive-io/graphql-codegen": "^4.28.5",
50
+ "@constructive-io/graphql-codegen": "^4.29.0",
51
51
  "@types/node": "^22.19.11",
52
52
  "makage": "^0.3.0",
53
53
  "tsx": "^4.19.0",
54
54
  "typescript": "^5.9.3"
55
55
  },
56
- "gitHead": "9356877ea3ea61013b28b1496f015776e82ccb85"
56
+ "gitHead": "3bf7c522cf9f9d2595750ac7cea81d470b3e6c30"
57
57
  }
@@ -554,5 +554,20 @@ export declare function createClient(config: OrmClientConfig): {
554
554
  } & import("./select-types").StrictSelect<S, import("./input-types").VerifyTotpPayloadSelect>) => import("./query-builder").QueryBuilder<{
555
555
  verifyTotp: import("./select-types").InferSelectResult<import("./input-types").VerifyTotpPayload, S> | null;
556
556
  }>;
557
+ requestUploadUrl: <S extends import("./input-types").RequestUploadUrlPayloadSelect>(args: import("./mutation").RequestUploadUrlVariables, options: {
558
+ select: S;
559
+ } & import("./select-types").StrictSelect<S, import("./input-types").RequestUploadUrlPayloadSelect>) => import("./query-builder").QueryBuilder<{
560
+ requestUploadUrl: import("./select-types").InferSelectResult<import("./input-types").RequestUploadUrlPayload, S> | null;
561
+ }>;
562
+ confirmUpload: <S extends import("./input-types").ConfirmUploadPayloadSelect>(args: import("./mutation").ConfirmUploadVariables, options: {
563
+ select: S;
564
+ } & import("./select-types").StrictSelect<S, import("./input-types").ConfirmUploadPayloadSelect>) => import("./query-builder").QueryBuilder<{
565
+ confirmUpload: import("./select-types").InferSelectResult<import("./input-types").ConfirmUploadPayload, S> | null;
566
+ }>;
567
+ provisionBucket: <S extends import("./input-types").ProvisionBucketPayloadSelect>(args: import("./mutation").ProvisionBucketVariables, options: {
568
+ select: S;
569
+ } & import("./select-types").StrictSelect<S, import("./input-types").ProvisionBucketPayloadSelect>) => import("./query-builder").QueryBuilder<{
570
+ provisionBucket: import("./select-types").InferSelectResult<import("./input-types").ProvisionBucketPayload, S> | null;
571
+ }>;
557
572
  };
558
573
  };
@@ -1358,6 +1358,10 @@ export interface StorageModule {
1358
1358
  filesTableName?: string | null;
1359
1359
  uploadRequestsTableName?: string | null;
1360
1360
  entityTableId?: string | null;
1361
+ endpoint?: string | null;
1362
+ publicUrlPrefix?: string | null;
1363
+ provider?: string | null;
1364
+ allowedOrigins?: string[] | null;
1361
1365
  uploadUrlExpirySeconds?: number | null;
1362
1366
  downloadUrlExpirySeconds?: number | null;
1363
1367
  defaultMaxFileSize?: string | null;
@@ -4767,6 +4771,10 @@ export type StorageModuleSelect = {
4767
4771
  filesTableName?: boolean;
4768
4772
  uploadRequestsTableName?: boolean;
4769
4773
  entityTableId?: boolean;
4774
+ endpoint?: boolean;
4775
+ publicUrlPrefix?: boolean;
4776
+ provider?: boolean;
4777
+ allowedOrigins?: boolean;
4770
4778
  uploadUrlExpirySeconds?: boolean;
4771
4779
  downloadUrlExpirySeconds?: boolean;
4772
4780
  defaultMaxFileSize?: boolean;
@@ -8473,6 +8481,14 @@ export interface StorageModuleFilter {
8473
8481
  uploadRequestsTableName?: StringFilter;
8474
8482
  /** Filter by the object’s `entityTableId` field. */
8475
8483
  entityTableId?: UUIDFilter;
8484
+ /** Filter by the object’s `endpoint` field. */
8485
+ endpoint?: StringFilter;
8486
+ /** Filter by the object’s `publicUrlPrefix` field. */
8487
+ publicUrlPrefix?: StringFilter;
8488
+ /** Filter by the object’s `provider` field. */
8489
+ provider?: StringFilter;
8490
+ /** Filter by the object’s `allowedOrigins` field. */
8491
+ allowedOrigins?: StringListFilter;
8476
8492
  /** Filter by the object’s `uploadUrlExpirySeconds` field. */
8477
8493
  uploadUrlExpirySeconds?: IntFilter;
8478
8494
  /** Filter by the object’s `downloadUrlExpirySeconds` field. */
@@ -9949,7 +9965,7 @@ export type UsersModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DE
9949
9965
  export type BlueprintOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'OWNER_ID_ASC' | 'OWNER_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'DISPLAY_NAME_ASC' | 'DISPLAY_NAME_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'DEFINITION_ASC' | 'DEFINITION_DESC' | 'TEMPLATE_ID_ASC' | 'TEMPLATE_ID_DESC' | 'DEFINITION_HASH_ASC' | 'DEFINITION_HASH_DESC' | 'TABLE_HASHES_ASC' | 'TABLE_HASHES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
9950
9966
  export type BlueprintTemplateOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC' | 'VERSION_ASC' | 'VERSION_DESC' | 'DISPLAY_NAME_ASC' | 'DISPLAY_NAME_DESC' | 'DESCRIPTION_ASC' | 'DESCRIPTION_DESC' | 'OWNER_ID_ASC' | 'OWNER_ID_DESC' | 'VISIBILITY_ASC' | 'VISIBILITY_DESC' | 'CATEGORIES_ASC' | 'CATEGORIES_DESC' | 'TAGS_ASC' | 'TAGS_DESC' | 'DEFINITION_ASC' | 'DEFINITION_DESC' | 'DEFINITION_SCHEMA_VERSION_ASC' | 'DEFINITION_SCHEMA_VERSION_DESC' | 'SOURCE_ASC' | 'SOURCE_DESC' | 'COMPLEXITY_ASC' | 'COMPLEXITY_DESC' | 'COPY_COUNT_ASC' | 'COPY_COUNT_DESC' | 'FORK_COUNT_ASC' | 'FORK_COUNT_DESC' | 'FORKED_FROM_ID_ASC' | 'FORKED_FROM_ID_DESC' | 'DEFINITION_HASH_ASC' | 'DEFINITION_HASH_DESC' | 'TABLE_HASHES_ASC' | 'TABLE_HASHES_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
9951
9967
  export type BlueprintConstructionOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'BLUEPRINT_ID_ASC' | 'BLUEPRINT_ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'STATUS_ASC' | 'STATUS_DESC' | 'ERROR_DETAILS_ASC' | 'ERROR_DETAILS_DESC' | 'TABLE_MAP_ASC' | 'TABLE_MAP_DESC' | 'CONSTRUCTED_DEFINITION_ASC' | 'CONSTRUCTED_DEFINITION_DESC' | 'CONSTRUCTED_AT_ASC' | 'CONSTRUCTED_AT_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
9952
- export type StorageModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'FILES_TABLE_ID_ASC' | 'FILES_TABLE_ID_DESC' | 'UPLOAD_REQUESTS_TABLE_ID_ASC' | 'UPLOAD_REQUESTS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' | 'BUCKETS_TABLE_NAME_DESC' | 'FILES_TABLE_NAME_ASC' | 'FILES_TABLE_NAME_DESC' | 'UPLOAD_REQUESTS_TABLE_NAME_ASC' | 'UPLOAD_REQUESTS_TABLE_NAME_DESC' | 'ENTITY_TABLE_ID_ASC' | 'ENTITY_TABLE_ID_DESC' | 'UPLOAD_URL_EXPIRY_SECONDS_ASC' | 'UPLOAD_URL_EXPIRY_SECONDS_DESC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_ASC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_DESC' | 'DEFAULT_MAX_FILE_SIZE_ASC' | 'DEFAULT_MAX_FILE_SIZE_DESC' | 'MAX_FILENAME_LENGTH_ASC' | 'MAX_FILENAME_LENGTH_DESC' | 'CACHE_TTL_SECONDS_ASC' | 'CACHE_TTL_SECONDS_DESC';
9968
+ export type StorageModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'SCHEMA_ID_ASC' | 'SCHEMA_ID_DESC' | 'PRIVATE_SCHEMA_ID_ASC' | 'PRIVATE_SCHEMA_ID_DESC' | 'BUCKETS_TABLE_ID_ASC' | 'BUCKETS_TABLE_ID_DESC' | 'FILES_TABLE_ID_ASC' | 'FILES_TABLE_ID_DESC' | 'UPLOAD_REQUESTS_TABLE_ID_ASC' | 'UPLOAD_REQUESTS_TABLE_ID_DESC' | 'BUCKETS_TABLE_NAME_ASC' | 'BUCKETS_TABLE_NAME_DESC' | 'FILES_TABLE_NAME_ASC' | 'FILES_TABLE_NAME_DESC' | 'UPLOAD_REQUESTS_TABLE_NAME_ASC' | 'UPLOAD_REQUESTS_TABLE_NAME_DESC' | 'ENTITY_TABLE_ID_ASC' | 'ENTITY_TABLE_ID_DESC' | 'ENDPOINT_ASC' | 'ENDPOINT_DESC' | 'PUBLIC_URL_PREFIX_ASC' | 'PUBLIC_URL_PREFIX_DESC' | 'PROVIDER_ASC' | 'PROVIDER_DESC' | 'ALLOWED_ORIGINS_ASC' | 'ALLOWED_ORIGINS_DESC' | 'UPLOAD_URL_EXPIRY_SECONDS_ASC' | 'UPLOAD_URL_EXPIRY_SECONDS_DESC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_ASC' | 'DOWNLOAD_URL_EXPIRY_SECONDS_DESC' | 'DEFAULT_MAX_FILE_SIZE_ASC' | 'DEFAULT_MAX_FILE_SIZE_DESC' | 'MAX_FILENAME_LENGTH_ASC' | 'MAX_FILENAME_LENGTH_DESC' | 'CACHE_TTL_SECONDS_ASC' | 'CACHE_TTL_SECONDS_DESC';
9953
9969
  export type DatabaseProvisionModuleOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'DATABASE_NAME_ASC' | 'DATABASE_NAME_DESC' | 'OWNER_ID_ASC' | 'OWNER_ID_DESC' | 'SUBDOMAIN_ASC' | 'SUBDOMAIN_DESC' | 'DOMAIN_ASC' | 'DOMAIN_DESC' | 'MODULES_ASC' | 'MODULES_DESC' | 'OPTIONS_ASC' | 'OPTIONS_DESC' | 'BOOTSTRAP_USER_ASC' | 'BOOTSTRAP_USER_DESC' | 'STATUS_ASC' | 'STATUS_DESC' | 'ERROR_MESSAGE_ASC' | 'ERROR_MESSAGE_DESC' | 'DATABASE_ID_ASC' | 'DATABASE_ID_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC' | 'COMPLETED_AT_ASC' | 'COMPLETED_AT_DESC';
9954
9970
  export type AppAdminGrantOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'GRANTOR_ID_ASC' | 'GRANTOR_ID_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
9955
9971
  export type AppOwnerGrantOrderBy = 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' | 'IS_GRANT_ASC' | 'IS_GRANT_DESC' | 'ACTOR_ID_ASC' | 'ACTOR_ID_DESC' | 'GRANTOR_ID_ASC' | 'GRANTOR_ID_DESC' | 'CREATED_AT_ASC' | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC';
@@ -12252,6 +12268,10 @@ export interface CreateStorageModuleInput {
12252
12268
  filesTableName?: string;
12253
12269
  uploadRequestsTableName?: string;
12254
12270
  entityTableId?: string;
12271
+ endpoint?: string;
12272
+ publicUrlPrefix?: string;
12273
+ provider?: string;
12274
+ allowedOrigins?: string[];
12255
12275
  uploadUrlExpirySeconds?: number;
12256
12276
  downloadUrlExpirySeconds?: number;
12257
12277
  defaultMaxFileSize?: string;
@@ -12270,6 +12290,10 @@ export interface StorageModulePatch {
12270
12290
  filesTableName?: string | null;
12271
12291
  uploadRequestsTableName?: string | null;
12272
12292
  entityTableId?: string | null;
12293
+ endpoint?: string | null;
12294
+ publicUrlPrefix?: string | null;
12295
+ provider?: string | null;
12296
+ allowedOrigins?: string[] | null;
12273
12297
  uploadUrlExpirySeconds?: number | null;
12274
12298
  downloadUrlExpirySeconds?: number | null;
12275
12299
  defaultMaxFileSize?: string | null;
@@ -13720,6 +13744,26 @@ export interface VerifyTotpInput {
13720
13744
  clientMutationId?: string;
13721
13745
  totpValue: string;
13722
13746
  }
13747
+ export interface RequestUploadUrlInput {
13748
+ /** Bucket key (e.g., "public", "private") */
13749
+ bucketKey: string;
13750
+ /** SHA-256 content hash computed by the client (hex-encoded, 64 chars) */
13751
+ contentHash: string;
13752
+ /** MIME type of the file (e.g., "image/png") */
13753
+ contentType: string;
13754
+ /** File size in bytes */
13755
+ size: number;
13756
+ /** Original filename (optional, for display and Content-Disposition) */
13757
+ filename?: string;
13758
+ }
13759
+ export interface ConfirmUploadInput {
13760
+ /** The file ID returned by requestUploadUrl */
13761
+ fileId: string;
13762
+ }
13763
+ export interface ProvisionBucketInput {
13764
+ /** The logical bucket key (e.g., "public", "private") */
13765
+ bucketKey: string;
13766
+ }
13723
13767
  /** A filter to be used against many `Schema` object types. All fields are combined with a logical ‘and.’ */
13724
13768
  export interface DatabaseToManySchemaFilter {
13725
13769
  /** Filters to entities where at least one related entity matches. */
@@ -17811,6 +17855,14 @@ export interface StorageModuleFilter {
17811
17855
  uploadRequestsTableName?: StringFilter;
17812
17856
  /** Filter by the object’s `entityTableId` field. */
17813
17857
  entityTableId?: UUIDFilter;
17858
+ /** Filter by the object’s `endpoint` field. */
17859
+ endpoint?: StringFilter;
17860
+ /** Filter by the object’s `publicUrlPrefix` field. */
17861
+ publicUrlPrefix?: StringFilter;
17862
+ /** Filter by the object’s `provider` field. */
17863
+ provider?: StringFilter;
17864
+ /** Filter by the object’s `allowedOrigins` field. */
17865
+ allowedOrigins?: StringListFilter;
17814
17866
  /** Filter by the object’s `uploadUrlExpirySeconds` field. */
17815
17867
  uploadUrlExpirySeconds?: IntFilter;
17816
17868
  /** Filter by the object’s `downloadUrlExpirySeconds` field. */
@@ -20205,6 +20257,60 @@ export type VerifyTotpPayloadSelect = {
20205
20257
  select: SessionSelect;
20206
20258
  };
20207
20259
  };
20260
+ export interface RequestUploadUrlPayload {
20261
+ /** Presigned PUT URL (null if file was deduplicated) */
20262
+ uploadUrl?: string | null;
20263
+ /** The file ID (existing if deduplicated, new if fresh upload) */
20264
+ fileId: string;
20265
+ /** The S3 object key */
20266
+ key: string;
20267
+ /** Whether this file was deduplicated (already exists with same hash) */
20268
+ deduplicated: boolean;
20269
+ /** Presigned URL expiry time (null if deduplicated) */
20270
+ expiresAt?: string | null;
20271
+ }
20272
+ export type RequestUploadUrlPayloadSelect = {
20273
+ uploadUrl?: boolean;
20274
+ fileId?: boolean;
20275
+ key?: boolean;
20276
+ deduplicated?: boolean;
20277
+ expiresAt?: boolean;
20278
+ };
20279
+ export interface ConfirmUploadPayload {
20280
+ /** The confirmed file ID */
20281
+ fileId: string;
20282
+ /** New file status */
20283
+ status: string;
20284
+ /** Whether confirmation succeeded */
20285
+ success: boolean;
20286
+ }
20287
+ export type ConfirmUploadPayloadSelect = {
20288
+ fileId?: boolean;
20289
+ status?: boolean;
20290
+ success?: boolean;
20291
+ };
20292
+ export interface ProvisionBucketPayload {
20293
+ /** Whether provisioning succeeded */
20294
+ success: boolean;
20295
+ /** The S3 bucket name that was provisioned */
20296
+ bucketName: string;
20297
+ /** The access type applied */
20298
+ accessType: string;
20299
+ /** The storage provider used */
20300
+ provider: string;
20301
+ /** The S3 endpoint (null for AWS S3 default) */
20302
+ endpoint?: string | null;
20303
+ /** Error message if provisioning failed */
20304
+ error?: string | null;
20305
+ }
20306
+ export type ProvisionBucketPayloadSelect = {
20307
+ success?: boolean;
20308
+ bucketName?: boolean;
20309
+ accessType?: boolean;
20310
+ provider?: boolean;
20311
+ endpoint?: boolean;
20312
+ error?: boolean;
20313
+ };
20208
20314
  export interface CreateObjectPayload {
20209
20315
  clientMutationId?: string | null;
20210
20316
  /** The `Object` 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 { SendAccountDeletionEmailInput, SignOutInput, AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, SubmitInviteCodeInput, SubmitOrgInviteCodeInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, BootstrapUserInput, SetFieldOrderInput, ProvisionUniqueConstraintInput, ProvisionFullTextSearchInput, ProvisionIndexInput, SetDataAtPathInput, SetPropsAndCommitInput, ProvisionDatabaseWithUserInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, SignInOneTimeTokenInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, SignInInput, SignUpInput, OneTimeTokenInput, ProvisionTableInput, SendVerificationEmailInput, ForgotPasswordInput, VerifyPasswordInput, VerifyTotpInput, SendAccountDeletionEmailPayload, SignOutPayload, AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, SubmitInviteCodePayload, SubmitOrgInviteCodePayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionUniqueConstraintPayload, ProvisionFullTextSearchPayload, ProvisionIndexPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, ProvisionDatabaseWithUserPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, SignInOneTimeTokenPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, SignInPayload, SignUpPayload, OneTimeTokenPayload, ProvisionTablePayload, SendVerificationEmailPayload, ForgotPasswordPayload, VerifyPasswordPayload, VerifyTotpPayload, SendAccountDeletionEmailPayloadSelect, SignOutPayloadSelect, AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, SubmitInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionUniqueConstraintPayloadSelect, ProvisionFullTextSearchPayloadSelect, ProvisionIndexPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, ProvisionDatabaseWithUserPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, SignInOneTimeTokenPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, SignInPayloadSelect, SignUpPayloadSelect, OneTimeTokenPayloadSelect, ProvisionTablePayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect } from '../input-types';
9
+ import type { SendAccountDeletionEmailInput, SignOutInput, AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, SubmitInviteCodeInput, SubmitOrgInviteCodeInput, CheckPasswordInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, BootstrapUserInput, SetFieldOrderInput, ProvisionUniqueConstraintInput, ProvisionFullTextSearchInput, ProvisionIndexInput, SetDataAtPathInput, SetPropsAndCommitInput, ProvisionDatabaseWithUserInput, InsertNodeAtPathInput, UpdateNodeAtPathInput, SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, SignInOneTimeTokenInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, SignInInput, SignUpInput, OneTimeTokenInput, ProvisionTableInput, SendVerificationEmailInput, ForgotPasswordInput, VerifyPasswordInput, VerifyTotpInput, RequestUploadUrlInput, ConfirmUploadInput, ProvisionBucketInput, SendAccountDeletionEmailPayload, SignOutPayload, AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, SubmitInviteCodePayload, SubmitOrgInviteCodePayload, CheckPasswordPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionUniqueConstraintPayload, ProvisionFullTextSearchPayload, ProvisionIndexPayload, SetDataAtPathPayload, SetPropsAndCommitPayload, ProvisionDatabaseWithUserPayload, InsertNodeAtPathPayload, UpdateNodeAtPathPayload, SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, SignInOneTimeTokenPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, SignInPayload, SignUpPayload, OneTimeTokenPayload, ProvisionTablePayload, SendVerificationEmailPayload, ForgotPasswordPayload, VerifyPasswordPayload, VerifyTotpPayload, RequestUploadUrlPayload, ConfirmUploadPayload, ProvisionBucketPayload, SendAccountDeletionEmailPayloadSelect, SignOutPayloadSelect, AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, SubmitInviteCodePayloadSelect, SubmitOrgInviteCodePayloadSelect, CheckPasswordPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionUniqueConstraintPayloadSelect, ProvisionFullTextSearchPayloadSelect, ProvisionIndexPayloadSelect, SetDataAtPathPayloadSelect, SetPropsAndCommitPayloadSelect, ProvisionDatabaseWithUserPayloadSelect, InsertNodeAtPathPayloadSelect, UpdateNodeAtPathPayloadSelect, SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, SignInOneTimeTokenPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, SignInPayloadSelect, SignUpPayloadSelect, OneTimeTokenPayloadSelect, ProvisionTablePayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, RequestUploadUrlPayloadSelect, ConfirmUploadPayloadSelect, ProvisionBucketPayloadSelect } from '../input-types';
10
10
  export interface SendAccountDeletionEmailVariables {
11
11
  input: SendAccountDeletionEmailInput;
12
12
  }
@@ -177,6 +177,35 @@ export interface VerifyPasswordVariables {
177
177
  export interface VerifyTotpVariables {
178
178
  input: VerifyTotpInput;
179
179
  }
180
+ /**
181
+ * Variables for requestUploadUrl
182
+ * Request a presigned URL for uploading a file directly to S3.
183
+ Client computes SHA-256 of the file content and provides it here.
184
+ If a file with the same hash already exists (dedup), returns the
185
+ existing file ID and deduplicated=true with no uploadUrl.
186
+ */
187
+ export interface RequestUploadUrlVariables {
188
+ input: RequestUploadUrlInput;
189
+ }
190
+ /**
191
+ * Variables for confirmUpload
192
+ * Confirm that a file has been uploaded to S3.
193
+ Verifies the object exists in S3, checks content-type,
194
+ and transitions the file status from 'pending' to 'ready'.
195
+ */
196
+ export interface ConfirmUploadVariables {
197
+ input: ConfirmUploadInput;
198
+ }
199
+ /**
200
+ * Variables for provisionBucket
201
+ * Provision an S3 bucket for a logical bucket in the database.
202
+ Reads the bucket config via RLS, then creates and configures
203
+ the S3 bucket with the appropriate privacy policies, CORS rules,
204
+ and lifecycle settings.
205
+ */
206
+ export interface ProvisionBucketVariables {
207
+ input: ProvisionBucketInput;
208
+ }
180
209
  export declare function createMutationOperations(client: OrmClient): {
181
210
  sendAccountDeletionEmail: <S extends SendAccountDeletionEmailPayloadSelect>(args: SendAccountDeletionEmailVariables, options: {
182
211
  select: S;
@@ -383,4 +412,19 @@ export declare function createMutationOperations(client: OrmClient): {
383
412
  } & StrictSelect<S, VerifyTotpPayloadSelect>) => QueryBuilder<{
384
413
  verifyTotp: InferSelectResult<VerifyTotpPayload, S> | null;
385
414
  }>;
415
+ requestUploadUrl: <S extends RequestUploadUrlPayloadSelect>(args: RequestUploadUrlVariables, options: {
416
+ select: S;
417
+ } & StrictSelect<S, RequestUploadUrlPayloadSelect>) => QueryBuilder<{
418
+ requestUploadUrl: InferSelectResult<RequestUploadUrlPayload, S> | null;
419
+ }>;
420
+ confirmUpload: <S extends ConfirmUploadPayloadSelect>(args: ConfirmUploadVariables, options: {
421
+ select: S;
422
+ } & StrictSelect<S, ConfirmUploadPayloadSelect>) => QueryBuilder<{
423
+ confirmUpload: InferSelectResult<ConfirmUploadPayload, S> | null;
424
+ }>;
425
+ provisionBucket: <S extends ProvisionBucketPayloadSelect>(args: ProvisionBucketVariables, options: {
426
+ select: S;
427
+ } & StrictSelect<S, ProvisionBucketPayloadSelect>) => QueryBuilder<{
428
+ provisionBucket: InferSelectResult<ProvisionBucketPayload, S> | null;
429
+ }>;
386
430
  };