@aeriajs/builtins 0.0.144 → 0.0.146

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.
@@ -145,9 +145,106 @@ export declare const user: {
145
145
  } & {
146
146
  httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
147
147
  }>>;
148
- readonly insert: (payload: {
149
- what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof description>>, "roles">;
150
- }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
148
+ readonly insert: (payload: NoInfer<import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<{
149
+ readonly $id: "user";
150
+ readonly icon: "users";
151
+ readonly required: readonly ["name", "roles", "email"];
152
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
153
+ readonly indexes: readonly ["name"];
154
+ readonly properties: {
155
+ readonly name: {
156
+ readonly type: "string";
157
+ };
158
+ readonly given_name: {
159
+ readonly getter: (document: any) => any;
160
+ };
161
+ readonly family_name: {
162
+ readonly getter: (document: any) => any;
163
+ };
164
+ readonly active: {
165
+ readonly type: "boolean";
166
+ };
167
+ readonly roles: {
168
+ readonly type: "array";
169
+ readonly items: {
170
+ readonly type: "string";
171
+ };
172
+ readonly uniqueItems: true;
173
+ };
174
+ readonly email: {
175
+ readonly type: "string";
176
+ readonly inputType: "email";
177
+ readonly unique: true;
178
+ };
179
+ readonly password: {
180
+ readonly type: "string";
181
+ readonly inputType: "password";
182
+ readonly hidden: true;
183
+ };
184
+ readonly phone_number: {
185
+ readonly type: "string";
186
+ readonly mask: "(##) #####-####";
187
+ };
188
+ readonly picture_file: {
189
+ readonly $ref: "file";
190
+ readonly accept: readonly ["image/*"];
191
+ };
192
+ readonly picture: {
193
+ readonly getter: (value: any) => any;
194
+ };
195
+ readonly group: {
196
+ readonly type: "string";
197
+ };
198
+ readonly self_registered: {
199
+ readonly type: "boolean";
200
+ readonly readOnly: true;
201
+ };
202
+ readonly updated_at: {
203
+ readonly type: "string";
204
+ readonly format: "date-time";
205
+ };
206
+ };
207
+ readonly presets: readonly ["crud", "duplicate"];
208
+ readonly layout: {
209
+ readonly name: "grid";
210
+ readonly options: {
211
+ readonly title: "name";
212
+ readonly badge: "roles";
213
+ readonly picture: "picture_file";
214
+ readonly information: "email";
215
+ readonly active: "active";
216
+ };
217
+ };
218
+ readonly individualActions: {
219
+ readonly changePassword: {
220
+ readonly label: "change_password";
221
+ readonly icon: "key";
222
+ readonly translate: true;
223
+ readonly route: {
224
+ readonly name: "/dashboard/user/changepass";
225
+ readonly fetchItem: true;
226
+ };
227
+ };
228
+ readonly copyActivationLink: {
229
+ readonly label: "copy_activation_link";
230
+ readonly icon: "link";
231
+ readonly translate: true;
232
+ };
233
+ };
234
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
235
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
236
+ readonly tableMeta: readonly ["email"];
237
+ readonly formLayout: {
238
+ readonly fields: {
239
+ readonly given_name: {
240
+ readonly span: 3;
241
+ };
242
+ readonly family_name: {
243
+ readonly span: 3;
244
+ };
245
+ };
246
+ };
247
+ }>>>, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
151
248
  readonly $id: "user";
152
249
  readonly icon: "users";
153
250
  readonly required: readonly ["name", "roles", "email"];
@@ -730,9 +827,106 @@ export declare const user: {
730
827
  } & {
731
828
  httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
732
829
  }>>;
733
- readonly insert: (payload: {
734
- what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof description>>, "roles">;
735
- }, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
830
+ readonly insert: (payload: NoInfer<import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<{
831
+ readonly $id: "user";
832
+ readonly icon: "users";
833
+ readonly required: readonly ["name", "roles", "email"];
834
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
835
+ readonly indexes: readonly ["name"];
836
+ readonly properties: {
837
+ readonly name: {
838
+ readonly type: "string";
839
+ };
840
+ readonly given_name: {
841
+ readonly getter: (document: any) => any;
842
+ };
843
+ readonly family_name: {
844
+ readonly getter: (document: any) => any;
845
+ };
846
+ readonly active: {
847
+ readonly type: "boolean";
848
+ };
849
+ readonly roles: {
850
+ readonly type: "array";
851
+ readonly items: {
852
+ readonly type: "string";
853
+ };
854
+ readonly uniqueItems: true;
855
+ };
856
+ readonly email: {
857
+ readonly type: "string";
858
+ readonly inputType: "email";
859
+ readonly unique: true;
860
+ };
861
+ readonly password: {
862
+ readonly type: "string";
863
+ readonly inputType: "password";
864
+ readonly hidden: true;
865
+ };
866
+ readonly phone_number: {
867
+ readonly type: "string";
868
+ readonly mask: "(##) #####-####";
869
+ };
870
+ readonly picture_file: {
871
+ readonly $ref: "file";
872
+ readonly accept: readonly ["image/*"];
873
+ };
874
+ readonly picture: {
875
+ readonly getter: (value: any) => any;
876
+ };
877
+ readonly group: {
878
+ readonly type: "string";
879
+ };
880
+ readonly self_registered: {
881
+ readonly type: "boolean";
882
+ readonly readOnly: true;
883
+ };
884
+ readonly updated_at: {
885
+ readonly type: "string";
886
+ readonly format: "date-time";
887
+ };
888
+ };
889
+ readonly presets: readonly ["crud", "duplicate"];
890
+ readonly layout: {
891
+ readonly name: "grid";
892
+ readonly options: {
893
+ readonly title: "name";
894
+ readonly badge: "roles";
895
+ readonly picture: "picture_file";
896
+ readonly information: "email";
897
+ readonly active: "active";
898
+ };
899
+ };
900
+ readonly individualActions: {
901
+ readonly changePassword: {
902
+ readonly label: "change_password";
903
+ readonly icon: "key";
904
+ readonly translate: true;
905
+ readonly route: {
906
+ readonly name: "/dashboard/user/changepass";
907
+ readonly fetchItem: true;
908
+ };
909
+ };
910
+ readonly copyActivationLink: {
911
+ readonly label: "copy_activation_link";
912
+ readonly icon: "link";
913
+ readonly translate: true;
914
+ };
915
+ };
916
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
917
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
918
+ readonly tableMeta: readonly ["email"];
919
+ readonly formLayout: {
920
+ readonly fields: {
921
+ readonly given_name: {
922
+ readonly span: 3;
923
+ };
924
+ readonly family_name: {
925
+ readonly span: 3;
926
+ };
927
+ };
928
+ };
929
+ }>>>, context: import("@aeriajs/types").Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
736
930
  readonly $id: "user";
737
931
  readonly icon: "users";
738
932
  readonly required: readonly ["name", "roles", "email"];
@@ -1,8 +1,105 @@
1
- import type { Context, SchemaWithId, PackReferences } from '@aeriajs/types';
1
+ import type { Context, SchemaWithId, InsertPayload } from '@aeriajs/types';
2
2
  import type { description } from './description';
3
- export declare const insert: (payload: {
4
- what: Omit<PackReferences<SchemaWithId<typeof description>>, "roles">;
5
- }, context: Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<SchemaWithId<{
3
+ export declare const insert: <TInsertPayload extends InsertPayload<SchemaWithId<typeof description>> = InsertPayload<SchemaWithId<{
4
+ readonly $id: "user";
5
+ readonly icon: "users";
6
+ readonly required: readonly ["name", "roles", "email"];
7
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
8
+ readonly indexes: readonly ["name"];
9
+ readonly properties: {
10
+ readonly name: {
11
+ readonly type: "string";
12
+ };
13
+ readonly given_name: {
14
+ readonly getter: (document: any) => any;
15
+ };
16
+ readonly family_name: {
17
+ readonly getter: (document: any) => any;
18
+ };
19
+ readonly active: {
20
+ readonly type: "boolean";
21
+ };
22
+ readonly roles: {
23
+ readonly type: "array";
24
+ readonly items: {
25
+ readonly type: "string";
26
+ };
27
+ readonly uniqueItems: true;
28
+ };
29
+ readonly email: {
30
+ readonly type: "string";
31
+ readonly inputType: "email";
32
+ readonly unique: true;
33
+ };
34
+ readonly password: {
35
+ readonly type: "string";
36
+ readonly inputType: "password";
37
+ readonly hidden: true;
38
+ };
39
+ readonly phone_number: {
40
+ readonly type: "string";
41
+ readonly mask: "(##) #####-####";
42
+ };
43
+ readonly picture_file: {
44
+ readonly $ref: "file";
45
+ readonly accept: readonly ["image/*"];
46
+ };
47
+ readonly picture: {
48
+ readonly getter: (value: any) => any;
49
+ };
50
+ readonly group: {
51
+ readonly type: "string";
52
+ };
53
+ readonly self_registered: {
54
+ readonly type: "boolean";
55
+ readonly readOnly: true;
56
+ };
57
+ readonly updated_at: {
58
+ readonly type: "string";
59
+ readonly format: "date-time";
60
+ };
61
+ };
62
+ readonly presets: readonly ["crud", "duplicate"];
63
+ readonly layout: {
64
+ readonly name: "grid";
65
+ readonly options: {
66
+ readonly title: "name";
67
+ readonly badge: "roles";
68
+ readonly picture: "picture_file";
69
+ readonly information: "email";
70
+ readonly active: "active";
71
+ };
72
+ };
73
+ readonly individualActions: {
74
+ readonly changePassword: {
75
+ readonly label: "change_password";
76
+ readonly icon: "key";
77
+ readonly translate: true;
78
+ readonly route: {
79
+ readonly name: "/dashboard/user/changepass";
80
+ readonly fetchItem: true;
81
+ };
82
+ };
83
+ readonly copyActivationLink: {
84
+ readonly label: "copy_activation_link";
85
+ readonly icon: "link";
86
+ readonly translate: true;
87
+ };
88
+ };
89
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
90
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
91
+ readonly tableMeta: readonly ["email"];
92
+ readonly formLayout: {
93
+ readonly fields: {
94
+ readonly given_name: {
95
+ readonly span: 3;
96
+ };
97
+ readonly family_name: {
98
+ readonly span: 3;
99
+ };
100
+ };
101
+ };
102
+ }>>>(payload: NoInfer<TInsertPayload>, context: Context<typeof description>) => Promise<import("@aeriajs/types").InsertReturnType<SchemaWithId<{
6
103
  readonly $id: "user";
7
104
  readonly icon: "users";
8
105
  readonly required: readonly ["name", "roles", "email"];
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- export * from './collections/index.js';
2
1
  export * as builtinFunctions from './functions/index.js';
2
+ export * from './collections/index.js';
3
3
  export * from './authentication.js';
4
+ export { insert as insertUser, } from './collections/user/insert.js';
4
5
  import { file, tempFile, log, resourceUsage, user } from './collections/index.js';
5
6
  type File = typeof file.item;
6
7
  type TempFile = typeof tempFile.item;
@@ -839,9 +840,106 @@ export declare const collections: {
839
840
  } & {
840
841
  httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
841
842
  }>>;
842
- readonly insert: (payload: {
843
- what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof import("./collections/user/description.js").description>>, "roles">;
844
- }, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
843
+ readonly insert: (payload: NoInfer<import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<{
844
+ readonly $id: "user";
845
+ readonly icon: "users";
846
+ readonly required: readonly ["name", "roles", "email"];
847
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
848
+ readonly indexes: readonly ["name"];
849
+ readonly properties: {
850
+ readonly name: {
851
+ readonly type: "string";
852
+ };
853
+ readonly given_name: {
854
+ readonly getter: (document: any) => any;
855
+ };
856
+ readonly family_name: {
857
+ readonly getter: (document: any) => any;
858
+ };
859
+ readonly active: {
860
+ readonly type: "boolean";
861
+ };
862
+ readonly roles: {
863
+ readonly type: "array";
864
+ readonly items: {
865
+ readonly type: "string";
866
+ };
867
+ readonly uniqueItems: true;
868
+ };
869
+ readonly email: {
870
+ readonly type: "string";
871
+ readonly inputType: "email";
872
+ readonly unique: true;
873
+ };
874
+ readonly password: {
875
+ readonly type: "string";
876
+ readonly inputType: "password";
877
+ readonly hidden: true;
878
+ };
879
+ readonly phone_number: {
880
+ readonly type: "string";
881
+ readonly mask: "(##) #####-####";
882
+ };
883
+ readonly picture_file: {
884
+ readonly $ref: "file";
885
+ readonly accept: readonly ["image/*"];
886
+ };
887
+ readonly picture: {
888
+ readonly getter: (value: any) => any;
889
+ };
890
+ readonly group: {
891
+ readonly type: "string";
892
+ };
893
+ readonly self_registered: {
894
+ readonly type: "boolean";
895
+ readonly readOnly: true;
896
+ };
897
+ readonly updated_at: {
898
+ readonly type: "string";
899
+ readonly format: "date-time";
900
+ };
901
+ };
902
+ readonly presets: readonly ["crud", "duplicate"];
903
+ readonly layout: {
904
+ readonly name: "grid";
905
+ readonly options: {
906
+ readonly title: "name";
907
+ readonly badge: "roles";
908
+ readonly picture: "picture_file";
909
+ readonly information: "email";
910
+ readonly active: "active";
911
+ };
912
+ };
913
+ readonly individualActions: {
914
+ readonly changePassword: {
915
+ readonly label: "change_password";
916
+ readonly icon: "key";
917
+ readonly translate: true;
918
+ readonly route: {
919
+ readonly name: "/dashboard/user/changepass";
920
+ readonly fetchItem: true;
921
+ };
922
+ };
923
+ readonly copyActivationLink: {
924
+ readonly label: "copy_activation_link";
925
+ readonly icon: "link";
926
+ readonly translate: true;
927
+ };
928
+ };
929
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
930
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
931
+ readonly tableMeta: readonly ["email"];
932
+ readonly formLayout: {
933
+ readonly fields: {
934
+ readonly given_name: {
935
+ readonly span: 3;
936
+ };
937
+ readonly family_name: {
938
+ readonly span: 3;
939
+ };
940
+ };
941
+ };
942
+ }>>>, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
845
943
  readonly $id: "user";
846
944
  readonly icon: "users";
847
945
  readonly required: readonly ["name", "roles", "email"];
@@ -1424,9 +1522,106 @@ export declare const collections: {
1424
1522
  } & {
1425
1523
  httpStatus: import("@aeriajs/types").HTTPStatus.Forbidden;
1426
1524
  }>>;
1427
- readonly insert: (payload: {
1428
- what: Omit<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<typeof import("./collections/user/description.js").description>>, "roles">;
1429
- }, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
1525
+ readonly insert: (payload: NoInfer<import("@aeriajs/types").InsertPayload<import("@aeriajs/types").SchemaWithId<{
1526
+ readonly $id: "user";
1527
+ readonly icon: "users";
1528
+ readonly required: readonly ["name", "roles", "email"];
1529
+ readonly form: readonly ["name", "active", "roles", "email", "phone_number", "picture_file"];
1530
+ readonly indexes: readonly ["name"];
1531
+ readonly properties: {
1532
+ readonly name: {
1533
+ readonly type: "string";
1534
+ };
1535
+ readonly given_name: {
1536
+ readonly getter: (document: any) => any;
1537
+ };
1538
+ readonly family_name: {
1539
+ readonly getter: (document: any) => any;
1540
+ };
1541
+ readonly active: {
1542
+ readonly type: "boolean";
1543
+ };
1544
+ readonly roles: {
1545
+ readonly type: "array";
1546
+ readonly items: {
1547
+ readonly type: "string";
1548
+ };
1549
+ readonly uniqueItems: true;
1550
+ };
1551
+ readonly email: {
1552
+ readonly type: "string";
1553
+ readonly inputType: "email";
1554
+ readonly unique: true;
1555
+ };
1556
+ readonly password: {
1557
+ readonly type: "string";
1558
+ readonly inputType: "password";
1559
+ readonly hidden: true;
1560
+ };
1561
+ readonly phone_number: {
1562
+ readonly type: "string";
1563
+ readonly mask: "(##) #####-####";
1564
+ };
1565
+ readonly picture_file: {
1566
+ readonly $ref: "file";
1567
+ readonly accept: readonly ["image/*"];
1568
+ };
1569
+ readonly picture: {
1570
+ readonly getter: (value: any) => any;
1571
+ };
1572
+ readonly group: {
1573
+ readonly type: "string";
1574
+ };
1575
+ readonly self_registered: {
1576
+ readonly type: "boolean";
1577
+ readonly readOnly: true;
1578
+ };
1579
+ readonly updated_at: {
1580
+ readonly type: "string";
1581
+ readonly format: "date-time";
1582
+ };
1583
+ };
1584
+ readonly presets: readonly ["crud", "duplicate"];
1585
+ readonly layout: {
1586
+ readonly name: "grid";
1587
+ readonly options: {
1588
+ readonly title: "name";
1589
+ readonly badge: "roles";
1590
+ readonly picture: "picture_file";
1591
+ readonly information: "email";
1592
+ readonly active: "active";
1593
+ };
1594
+ };
1595
+ readonly individualActions: {
1596
+ readonly changePassword: {
1597
+ readonly label: "change_password";
1598
+ readonly icon: "key";
1599
+ readonly translate: true;
1600
+ readonly route: {
1601
+ readonly name: "/dashboard/user/changepass";
1602
+ readonly fetchItem: true;
1603
+ };
1604
+ };
1605
+ readonly copyActivationLink: {
1606
+ readonly label: "copy_activation_link";
1607
+ readonly icon: "link";
1608
+ readonly translate: true;
1609
+ };
1610
+ };
1611
+ readonly filters: readonly ["name", "roles", "email", "phone_number"];
1612
+ readonly table: readonly ["name", "roles", "picture_file", "active", "updated_at"];
1613
+ readonly tableMeta: readonly ["email"];
1614
+ readonly formLayout: {
1615
+ readonly fields: {
1616
+ readonly given_name: {
1617
+ readonly span: 3;
1618
+ };
1619
+ readonly family_name: {
1620
+ readonly span: 3;
1621
+ };
1622
+ };
1623
+ };
1624
+ }>>>, context: import("@aeriajs/types").Context<typeof import("./collections/user/description.js").description>) => Promise<import("@aeriajs/types").InsertReturnType<import("@aeriajs/types").SchemaWithId<{
1430
1625
  readonly $id: "user";
1431
1626
  readonly icon: "users";
1432
1627
  readonly required: readonly ["name", "roles", "email"];
package/dist/index.js CHANGED
@@ -14,10 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.collections = exports.builtinFunctions = void 0;
18
- __exportStar(require("./collections/index.js"), exports);
17
+ exports.collections = exports.insertUser = exports.builtinFunctions = void 0;
19
18
  exports.builtinFunctions = require("./functions/index.js");
19
+ __exportStar(require("./collections/index.js"), exports);
20
20
  __exportStar(require("./authentication.js"), exports);
21
+ var insert_js_1 = require("./collections/user/insert.js");
22
+ Object.defineProperty(exports, "insertUser", { enumerable: true, get: function () { return insert_js_1.insert; } });
21
23
  const index_js_1 = require("./collections/index.js");
22
24
  exports.collections = {
23
25
  file: index_js_1.file,
package/dist/index.mjs CHANGED
@@ -1,7 +1,10 @@
1
1
  "use strict";
2
- export * from "./collections/index.mjs";
3
2
  export * as builtinFunctions from "./functions/index.mjs";
3
+ export * from "./collections/index.mjs";
4
4
  export * from "./authentication.mjs";
5
+ export {
6
+ insert as insertUser
7
+ } from "./collections/user/insert.mjs";
5
8
  import {
6
9
  file,
7
10
  tempFile,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/builtins",
3
- "version": "0.0.144",
3
+ "version": "0.0.146",
4
4
  "description": "## Installation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -45,11 +45,11 @@
45
45
  "mongodb": "^6.5.0"
46
46
  },
47
47
  "peerDependencies": {
48
- "@aeriajs/core": "^0.0.144",
49
- "@aeriajs/common": "^0.0.89",
50
- "@aeriajs/entrypoint": "^0.0.91",
51
- "@aeriajs/types": "^0.0.77",
52
- "@aeriajs/validation": "^0.0.92"
48
+ "@aeriajs/core": "^0.0.146",
49
+ "@aeriajs/common": "^0.0.90",
50
+ "@aeriajs/entrypoint": "^0.0.92",
51
+ "@aeriajs/types": "^0.0.78",
52
+ "@aeriajs/validation": "^0.0.93"
53
53
  },
54
54
  "scripts": {
55
55
  "test": "echo skipping",