@constructive-io/sdk 0.0.4 → 0.1.1

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.
@@ -58,6 +58,25 @@ export interface ProvisionDatabaseWithUserVariables {
58
58
  export interface SignInOneTimeTokenVariables {
59
59
  input: SignInOneTimeTokenInput;
60
60
  }
61
+ /**
62
+ * Variables for createUserDatabase
63
+ * Creates a new user database with all required modules, permissions, and RLS policies.
64
+
65
+ Parameters:
66
+ - database_name: Name for the new database (required)
67
+ - owner_id: UUID of the owner user (required)
68
+ - include_invites: Include invite system (default: true)
69
+ - include_groups: Include group-level memberships (default: false)
70
+ - include_levels: Include levels/achievements (default: false)
71
+ - bitlen: Bit length for permission masks (default: 64)
72
+ - tokens_expiration: Token expiration interval (default: 30 days)
73
+
74
+ Returns the database_id UUID of the newly created database.
75
+
76
+ Example usage:
77
+ SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);
78
+ SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups
79
+ */
61
80
  export interface CreateUserDatabaseVariables {
62
81
  input: CreateUserDatabaseInput;
63
82
  }
@@ -36,29 +36,53 @@ export interface OrgPermissionsGetMaskByNamesVariables {
36
36
  }
37
37
  export interface AppPermissionsGetByMaskVariables {
38
38
  mask?: string;
39
+ /** Only read the first `n` values of the set. */
39
40
  first?: number;
41
+ /**
42
+ * Skip the first `n` values from our `after` cursor, an alternative to cursor
43
+ * based pagination. May not be used with `last`.
44
+ */
40
45
  offset?: number;
46
+ /** Read all values in the set after (below) this cursor. */
41
47
  after?: string;
42
48
  }
43
49
  export interface OrgPermissionsGetByMaskVariables {
44
50
  mask?: string;
51
+ /** Only read the first `n` values of the set. */
45
52
  first?: number;
53
+ /**
54
+ * Skip the first `n` values from our `after` cursor, an alternative to cursor
55
+ * based pagination. May not be used with `last`.
56
+ */
46
57
  offset?: number;
58
+ /** Read all values in the set after (below) this cursor. */
47
59
  after?: string;
48
60
  }
49
61
  export interface GetAllObjectsFromRootVariables {
50
62
  databaseId?: string;
51
63
  id?: string;
64
+ /** Only read the first `n` values of the set. */
52
65
  first?: number;
66
+ /**
67
+ * Skip the first `n` values from our `after` cursor, an alternative to cursor
68
+ * based pagination. May not be used with `last`.
69
+ */
53
70
  offset?: number;
71
+ /** Read all values in the set after (below) this cursor. */
54
72
  after?: string;
55
73
  }
56
74
  export interface GetPathObjectsFromRootVariables {
57
75
  databaseId?: string;
58
76
  id?: string;
59
77
  path?: string[];
78
+ /** Only read the first `n` values of the set. */
60
79
  first?: number;
80
+ /**
81
+ * Skip the first `n` values from our `after` cursor, an alternative to cursor
82
+ * based pagination. May not be used with `last`.
83
+ */
61
84
  offset?: number;
85
+ /** Read all values in the set after (below) this cursor. */
62
86
  after?: string;
63
87
  }
64
88
  export interface GetObjectAtPathVariables {
@@ -70,8 +94,14 @@ export interface GetObjectAtPathVariables {
70
94
  export interface StepsRequiredVariables {
71
95
  vlevel?: string;
72
96
  vroleId?: string;
97
+ /** Only read the first `n` values of the set. */
73
98
  first?: number;
99
+ /**
100
+ * Skip the first `n` values from our `after` cursor, an alternative to cursor
101
+ * based pagination. May not be used with `last`.
102
+ */
74
103
  offset?: number;
104
+ /** Read all values in the set after (below) this cursor. */
75
105
  after?: string;
76
106
  }
77
107
  export declare function createQueryOperations(client: OrmClient): {
@@ -236,28 +236,44 @@ export interface Object {
236
236
  frzn?: boolean | null;
237
237
  createdAt?: string | null;
238
238
  }
239
+ /** A ref is a data structure for pointing to a commit. */
239
240
  export interface Ref {
241
+ /** The primary unique identifier for the ref. */
240
242
  id: string;
243
+ /** The name of the ref or branch */
241
244
  name?: string | null;
242
245
  databaseId?: string | null;
243
246
  storeId?: string | null;
244
247
  commitId?: string | null;
245
248
  }
249
+ /** A store represents an isolated object repository within a database. */
246
250
  export interface Store {
251
+ /** The primary unique identifier for the store. */
247
252
  id: string;
253
+ /** The name of the store (e.g., metaschema, migrations). */
248
254
  name?: string | null;
255
+ /** The database this store belongs to. */
249
256
  databaseId?: string | null;
257
+ /** The current head tree_id for this store. */
250
258
  hash?: string | null;
251
259
  createdAt?: string | null;
252
260
  }
261
+ /** A commit records changes to the repository. */
253
262
  export interface Commit {
263
+ /** The primary unique identifier for the commit. */
254
264
  id: string;
265
+ /** The commit message */
255
266
  message?: string | null;
267
+ /** The repository identifier */
256
268
  databaseId?: string | null;
257
269
  storeId?: string | null;
270
+ /** Parent commits */
258
271
  parentIds?: string | null;
272
+ /** The author of the commit */
259
273
  authorId?: string | null;
274
+ /** The committer of the commit */
260
275
  committerId?: string | null;
276
+ /** The root of the tree */
261
277
  treeId?: string | null;
262
278
  date?: string | null;
263
279
  }
@@ -609,6 +625,7 @@ export interface SetAndCommitInput {
609
625
  kids?: string[];
610
626
  ktree?: string[];
611
627
  }
628
+ /** A connection to a list of `Object` values. */
612
629
  export interface ObjectConnection {
613
630
  nodes: Object[];
614
631
  edges: ObjectEdge[];
@@ -689,6 +706,7 @@ export type SetAndCommitPayloadSelect = {
689
706
  };
690
707
  export interface CreateObjectPayload {
691
708
  clientMutationId?: string | null;
709
+ /** The `Object` that was created by this mutation. */
692
710
  object?: Object | null;
693
711
  objectEdge?: ObjectEdge | null;
694
712
  }
@@ -703,6 +721,7 @@ export type CreateObjectPayloadSelect = {
703
721
  };
704
722
  export interface UpdateObjectPayload {
705
723
  clientMutationId?: string | null;
724
+ /** The `Object` that was updated by this mutation. */
706
725
  object?: Object | null;
707
726
  objectEdge?: ObjectEdge | null;
708
727
  }
@@ -717,6 +736,7 @@ export type UpdateObjectPayloadSelect = {
717
736
  };
718
737
  export interface DeleteObjectPayload {
719
738
  clientMutationId?: string | null;
739
+ /** The `Object` that was deleted by this mutation. */
720
740
  object?: Object | null;
721
741
  objectEdge?: ObjectEdge | null;
722
742
  }
@@ -731,6 +751,7 @@ export type DeleteObjectPayloadSelect = {
731
751
  };
732
752
  export interface CreateRefPayload {
733
753
  clientMutationId?: string | null;
754
+ /** The `Ref` that was created by this mutation. */
734
755
  ref?: Ref | null;
735
756
  refEdge?: RefEdge | null;
736
757
  }
@@ -745,6 +766,7 @@ export type CreateRefPayloadSelect = {
745
766
  };
746
767
  export interface UpdateRefPayload {
747
768
  clientMutationId?: string | null;
769
+ /** The `Ref` that was updated by this mutation. */
748
770
  ref?: Ref | null;
749
771
  refEdge?: RefEdge | null;
750
772
  }
@@ -759,6 +781,7 @@ export type UpdateRefPayloadSelect = {
759
781
  };
760
782
  export interface DeleteRefPayload {
761
783
  clientMutationId?: string | null;
784
+ /** The `Ref` that was deleted by this mutation. */
762
785
  ref?: Ref | null;
763
786
  refEdge?: RefEdge | null;
764
787
  }
@@ -773,6 +796,7 @@ export type DeleteRefPayloadSelect = {
773
796
  };
774
797
  export interface CreateStorePayload {
775
798
  clientMutationId?: string | null;
799
+ /** The `Store` that was created by this mutation. */
776
800
  store?: Store | null;
777
801
  storeEdge?: StoreEdge | null;
778
802
  }
@@ -787,6 +811,7 @@ export type CreateStorePayloadSelect = {
787
811
  };
788
812
  export interface UpdateStorePayload {
789
813
  clientMutationId?: string | null;
814
+ /** The `Store` that was updated by this mutation. */
790
815
  store?: Store | null;
791
816
  storeEdge?: StoreEdge | null;
792
817
  }
@@ -801,6 +826,7 @@ export type UpdateStorePayloadSelect = {
801
826
  };
802
827
  export interface DeleteStorePayload {
803
828
  clientMutationId?: string | null;
829
+ /** The `Store` that was deleted by this mutation. */
804
830
  store?: Store | null;
805
831
  storeEdge?: StoreEdge | null;
806
832
  }
@@ -815,6 +841,7 @@ export type DeleteStorePayloadSelect = {
815
841
  };
816
842
  export interface CreateCommitPayload {
817
843
  clientMutationId?: string | null;
844
+ /** The `Commit` that was created by this mutation. */
818
845
  commit?: Commit | null;
819
846
  commitEdge?: CommitEdge | null;
820
847
  }
@@ -829,6 +856,7 @@ export type CreateCommitPayloadSelect = {
829
856
  };
830
857
  export interface UpdateCommitPayload {
831
858
  clientMutationId?: string | null;
859
+ /** The `Commit` that was updated by this mutation. */
832
860
  commit?: Commit | null;
833
861
  commitEdge?: CommitEdge | null;
834
862
  }
@@ -843,6 +871,7 @@ export type UpdateCommitPayloadSelect = {
843
871
  };
844
872
  export interface DeleteCommitPayload {
845
873
  clientMutationId?: string | null;
874
+ /** The `Commit` that was deleted by this mutation. */
846
875
  commit?: Commit | null;
847
876
  commitEdge?: CommitEdge | null;
848
877
  }
@@ -855,8 +884,10 @@ export type DeleteCommitPayloadSelect = {
855
884
  select: CommitEdgeSelect;
856
885
  };
857
886
  };
887
+ /** A `Object` edge in the connection. */
858
888
  export interface ObjectEdge {
859
889
  cursor?: string | null;
890
+ /** The `Object` at the end of the edge. */
860
891
  node?: Object | null;
861
892
  }
862
893
  export type ObjectEdgeSelect = {
@@ -865,10 +896,15 @@ export type ObjectEdgeSelect = {
865
896
  select: ObjectSelect;
866
897
  };
867
898
  };
899
+ /** Information about pagination in a connection. */
868
900
  export interface PageInfo {
901
+ /** When paginating forwards, are there more items? */
869
902
  hasNextPage: boolean;
903
+ /** When paginating backwards, are there more items? */
870
904
  hasPreviousPage: boolean;
905
+ /** When paginating backwards, the cursor to continue. */
871
906
  startCursor?: string | null;
907
+ /** When paginating forwards, the cursor to continue. */
872
908
  endCursor?: string | null;
873
909
  }
874
910
  export type PageInfoSelect = {
@@ -877,8 +913,10 @@ export type PageInfoSelect = {
877
913
  startCursor?: boolean;
878
914
  endCursor?: boolean;
879
915
  };
916
+ /** A `Ref` edge in the connection. */
880
917
  export interface RefEdge {
881
918
  cursor?: string | null;
919
+ /** The `Ref` at the end of the edge. */
882
920
  node?: Ref | null;
883
921
  }
884
922
  export type RefEdgeSelect = {
@@ -887,8 +925,10 @@ export type RefEdgeSelect = {
887
925
  select: RefSelect;
888
926
  };
889
927
  };
928
+ /** A `Store` edge in the connection. */
890
929
  export interface StoreEdge {
891
930
  cursor?: string | null;
931
+ /** The `Store` at the end of the edge. */
892
932
  node?: Store | null;
893
933
  }
894
934
  export type StoreEdgeSelect = {
@@ -897,8 +937,10 @@ export type StoreEdgeSelect = {
897
937
  select: StoreSelect;
898
938
  };
899
939
  };
940
+ /** A `Commit` edge in the connection. */
900
941
  export interface CommitEdge {
901
942
  cursor?: string | null;
943
+ /** The `Commit` at the end of the edge. */
902
944
  node?: Commit | null;
903
945
  }
904
946
  export type CommitEdgeSelect = {
@@ -15,16 +15,28 @@ export interface RevParseVariables {
15
15
  export interface GetAllObjectsFromRootVariables {
16
16
  databaseId?: string;
17
17
  id?: string;
18
+ /** Only read the first `n` values of the set. */
18
19
  first?: number;
20
+ /**
21
+ * Skip the first `n` values from our `after` cursor, an alternative to cursor
22
+ * based pagination. May not be used with `last`.
23
+ */
19
24
  offset?: number;
25
+ /** Read all values in the set after (below) this cursor. */
20
26
  after?: string;
21
27
  }
22
28
  export interface GetPathObjectsFromRootVariables {
23
29
  databaseId?: string;
24
30
  id?: string;
25
31
  path?: string[];
32
+ /** Only read the first `n` values of the set. */
26
33
  first?: number;
34
+ /**
35
+ * Skip the first `n` values from our `after` cursor, an alternative to cursor
36
+ * based pagination. May not be used with `last`.
37
+ */
27
38
  offset?: number;
39
+ /** Read all values in the set after (below) this cursor. */
28
40
  after?: string;
29
41
  }
30
42
  export interface GetObjectAtPathVariables {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/sdk",
3
- "version": "0.0.4",
3
+ "version": "0.1.1",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "Constructive SDK - Auto-generated GraphQL types and ORM client",
6
6
  "main": "index.js",
@@ -44,11 +44,11 @@
44
44
  "graphql": "^16.12.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@constructive-io/graphql-codegen": "^4.5.3",
47
+ "@constructive-io/graphql-codegen": "^4.6.1",
48
48
  "@types/node": "^20.12.7",
49
49
  "makage": "^0.1.12",
50
50
  "tsx": "^4.19.0",
51
51
  "typescript": "^5.9.3"
52
52
  },
53
- "gitHead": "0deec313ff9af77b02cb749be9ef34e236e8cab8"
53
+ "gitHead": "c9364ffbc4d4a6b1b3750f0a5e347a7290d8d4ce"
54
54
  }