proto.io 0.0.215 → 0.0.217

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.
Files changed (48) hide show
  1. package/dist/adapters/file/aliyun-oss.d.ts +3 -3
  2. package/dist/adapters/file/database.d.ts +2 -2
  3. package/dist/adapters/file/database.js +1 -1
  4. package/dist/adapters/file/database.mjs +2 -2
  5. package/dist/adapters/file/filesystem.d.ts +3 -3
  6. package/dist/adapters/file/google-cloud-storage.d.ts +3 -3
  7. package/dist/adapters/storage/progres.d.ts +8 -10
  8. package/dist/adapters/storage/progres.js +833 -451
  9. package/dist/adapters/storage/progres.js.map +1 -1
  10. package/dist/adapters/storage/progres.mjs +834 -452
  11. package/dist/adapters/storage/progres.mjs.map +1 -1
  12. package/dist/client.d.ts +3 -3
  13. package/dist/client.js +1 -7
  14. package/dist/client.js.map +1 -1
  15. package/dist/client.mjs +3 -3
  16. package/dist/client.mjs.map +1 -1
  17. package/dist/index.d.ts +3 -3
  18. package/dist/index.js +9 -16
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +11 -12
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/internals/{base-Cp5le5dC.d.ts → base-CWnOBKD5.d.ts} +2 -2
  23. package/dist/internals/base-CWnOBKD5.d.ts.map +1 -0
  24. package/dist/internals/{chunk--Vo2-p-z.d.ts → chunk-CNNSQpRF.d.ts} +3 -3
  25. package/dist/internals/chunk-CNNSQpRF.d.ts.map +1 -0
  26. package/dist/internals/{index-CZUGnb-y.d.ts → index-BRIlS3mY.d.ts} +3 -9
  27. package/dist/internals/index-BRIlS3mY.d.ts.map +1 -0
  28. package/dist/internals/{index-YLrO0f2D.d.ts → index-Bs8n7Q8f.d.ts} +60 -20
  29. package/dist/internals/index-Bs8n7Q8f.d.ts.map +1 -0
  30. package/dist/internals/{index-al1N-qi7.mjs → index-BzDsTt4R.mjs} +2 -2
  31. package/dist/internals/{index-al1N-qi7.mjs.map → index-BzDsTt4R.mjs.map} +1 -1
  32. package/dist/internals/{index-ZPbBr9Db.mjs → index-DfqABzjr.mjs} +135 -142
  33. package/dist/internals/index-DfqABzjr.mjs.map +1 -0
  34. package/dist/internals/{index-DfnPpl1I.js → index-DylUjD_1.js} +133 -146
  35. package/dist/internals/index-DylUjD_1.js.map +1 -0
  36. package/dist/internals/{validator-ChrCrz_C.mjs → validator-CEcBF4Cn.mjs} +730 -27
  37. package/dist/internals/validator-CEcBF4Cn.mjs.map +1 -0
  38. package/dist/internals/{validator-m6wY35c6.js → validator-mcBCJP4P.js} +737 -27
  39. package/dist/internals/validator-mcBCJP4P.js.map +1 -0
  40. package/package.json +1 -1
  41. package/dist/internals/base-Cp5le5dC.d.ts.map +0 -1
  42. package/dist/internals/chunk--Vo2-p-z.d.ts.map +0 -1
  43. package/dist/internals/index-CZUGnb-y.d.ts.map +0 -1
  44. package/dist/internals/index-DfnPpl1I.js.map +0 -1
  45. package/dist/internals/index-YLrO0f2D.d.ts.map +0 -1
  46. package/dist/internals/index-ZPbBr9Db.mjs.map +0 -1
  47. package/dist/internals/validator-ChrCrz_C.mjs.map +0 -1
  48. package/dist/internals/validator-m6wY35c6.js.map +0 -1
@@ -200,6 +200,24 @@ class TQueryFilterBase {
200
200
  notContainedIn(key, value) {
201
201
  return this.filter({ [key]: { $nin: value } });
202
202
  }
203
+ /**
204
+ * Filters the query to include only documents where the specified key contains all of the specified values.
205
+ * @param key - The key to check for containing values.
206
+ * @param value - The array of values to check against.
207
+ * @returns The current instance for chaining.
208
+ */
209
+ containedBy(key, value) {
210
+ return this.filter({ [key]: { $superset: value } });
211
+ }
212
+ /**
213
+ * Filters the query to exclude documents where the specified key contains all of the specified values.
214
+ * @param key - The key to check for superset.
215
+ * @param value - The array of values to check against.
216
+ * @returns The current instance for chaining.
217
+ */
218
+ notContainedBy(key, value) {
219
+ return this.filter({ [key]: { $not: { $superset: value } } });
220
+ }
203
221
  /**
204
222
  * Filters the query to include only documents where the specified key is a subset of the specified values.
205
223
  * @param key - The key to check for subset.
@@ -602,7 +620,7 @@ class LiveQuerySubscription {
602
620
  }
603
621
 
604
622
  //
605
- // file.ts
623
+ // user.ts
606
624
  //
607
625
  // The MIT License
608
626
  // Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
@@ -625,45 +643,14 @@ class LiveQuerySubscription {
625
643
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
626
644
  // THE SOFTWARE.
627
645
  //
628
- /**
629
- * Class representing a file.
630
- */
631
- class TFile extends index.TObject {
646
+ class TUser extends index.TObject {
632
647
  constructor(attributes) {
633
- super('File', attributes);
634
- }
635
- /**
636
- * Gets the filename of the file.
637
- * @returns The filename.
638
- */
639
- get filename() {
640
- return this.get('filename');
641
- }
642
- /**
643
- * Gets the size of the file.
644
- * @returns The size of the file.
645
- */
646
- get size() {
647
- return this.get('size');
648
- }
649
- /**
650
- * Gets the type of the file.
651
- * @returns The type of the file.
652
- */
653
- get type() {
654
- return this.get('type');
655
- }
656
- /**
657
- * Gets the token of the file.
658
- * @returns The token of the file.
659
- */
660
- get token() {
661
- return this.get('token');
648
+ super('User', attributes);
662
649
  }
663
650
  }
664
651
 
665
652
  //
666
- // job.ts
653
+ // role.ts
667
654
  //
668
655
  // The MIT License
669
656
  // Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
@@ -687,59 +674,52 @@ class TFile extends index.TObject {
687
674
  // THE SOFTWARE.
688
675
  //
689
676
  /**
690
- * Class representing a Job.
677
+ * Class representing a Role.
691
678
  * @extends TObject
692
679
  */
693
- class TJob extends index.TObject {
680
+ class TRole extends index.TObject {
694
681
  constructor(attributes) {
695
- super('_Job', attributes);
682
+ super('Role', attributes);
696
683
  }
697
684
  /**
698
- * Get the name of the job.
699
- * @return {string} The name of the job.
685
+ * Get the name of the role.
686
+ * @return {string | undefined} The name of the role.
700
687
  */
701
688
  get name() {
702
689
  return this.get('name');
703
690
  }
704
691
  /**
705
- * Get the data of the job.
706
- * @return {TValue | undefined} The data of the job.
707
- */
708
- get data() {
709
- return this.get('data');
710
- }
711
- /**
712
- * Get the user associated with the job.
713
- * @return {TUser | undefined} The user associated with the job.
692
+ * Get the users associated with the role.
693
+ * @return {TUser[]} The users associated with the role.
714
694
  */
715
- get user() {
716
- return this.get('user');
695
+ get users() {
696
+ return this.get('users') ?? [];
717
697
  }
718
698
  /**
719
- * Get the error of the job.
720
- * @return {TValue | undefined} The error of the job.
699
+ * Set the users associated with the role.
700
+ * @param {TUser[]} value - The users to associate with the role.
721
701
  */
722
- get error() {
723
- return this.get('error');
702
+ set users(value) {
703
+ this.set('users', value);
724
704
  }
725
705
  /**
726
- * Get the start time of the job.
727
- * @return {Date | undefined} The start time of the job.
706
+ * Get the roles associated with the role.
707
+ * @return {TRole[]} The roles associated with the role.
728
708
  */
729
- get startedAt() {
730
- return this.get('startedAt');
709
+ get roles() {
710
+ return this.get('roles') ?? [];
731
711
  }
732
712
  /**
733
- * Get the completion time of the job.
734
- * @return {Date | undefined} The completion time of the job.
713
+ * Set the roles associated with the role.
714
+ * @param {TRole[]} value - The roles to associate with the role.
735
715
  */
736
- get completedAt() {
737
- return this.get('completedAt');
716
+ set roles(value) {
717
+ this.set('roles', value);
738
718
  }
739
719
  }
740
720
 
741
721
  //
742
- // role.ts
722
+ // file.ts
743
723
  //
744
724
  // The MIT License
745
725
  // Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
@@ -763,52 +743,44 @@ class TJob extends index.TObject {
763
743
  // THE SOFTWARE.
764
744
  //
765
745
  /**
766
- * Class representing a Role.
767
- * @extends TObject
746
+ * Class representing a file.
768
747
  */
769
- class TRole extends index.TObject {
748
+ class TFile extends index.TObject {
770
749
  constructor(attributes) {
771
- super('Role', attributes);
772
- }
773
- /**
774
- * Get the name of the role.
775
- * @return {string | undefined} The name of the role.
776
- */
777
- get name() {
778
- return this.get('name');
750
+ super('File', attributes);
779
751
  }
780
752
  /**
781
- * Get the users associated with the role.
782
- * @return {TUser[]} The users associated with the role.
753
+ * Gets the filename of the file.
754
+ * @returns The filename.
783
755
  */
784
- get users() {
785
- return this.get('users') ?? [];
756
+ get filename() {
757
+ return this.get('filename');
786
758
  }
787
759
  /**
788
- * Set the users associated with the role.
789
- * @param {TUser[]} value - The users to associate with the role.
760
+ * Gets the size of the file.
761
+ * @returns The size of the file.
790
762
  */
791
- set users(value) {
792
- this.set('users', value);
763
+ get size() {
764
+ return this.get('size');
793
765
  }
794
766
  /**
795
- * Get the roles associated with the role.
796
- * @return {TRole[]} The roles associated with the role.
767
+ * Gets the type of the file.
768
+ * @returns The type of the file.
797
769
  */
798
- get roles() {
799
- return this.get('roles') ?? [];
770
+ get type() {
771
+ return this.get('type');
800
772
  }
801
773
  /**
802
- * Set the roles associated with the role.
803
- * @param {TRole[]} value - The roles to associate with the role.
774
+ * Gets the token of the file.
775
+ * @returns The token of the file.
804
776
  */
805
- set roles(value) {
806
- this.set('roles', value);
777
+ get token() {
778
+ return this.get('token');
807
779
  }
808
780
  }
809
781
 
810
782
  //
811
- // user.ts
783
+ // job.ts
812
784
  //
813
785
  // The MIT License
814
786
  // Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
@@ -831,9 +803,55 @@ class TRole extends index.TObject {
831
803
  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
832
804
  // THE SOFTWARE.
833
805
  //
834
- class TUser extends index.TObject {
806
+ /**
807
+ * Class representing a Job.
808
+ * @extends TObject
809
+ */
810
+ class TJob extends index.TObject {
835
811
  constructor(attributes) {
836
- super('User', attributes);
812
+ super('_Job', attributes);
813
+ }
814
+ /**
815
+ * Get the name of the job.
816
+ * @return {string} The name of the job.
817
+ */
818
+ get name() {
819
+ return this.get('name');
820
+ }
821
+ /**
822
+ * Get the data of the job.
823
+ * @return {TValue | undefined} The data of the job.
824
+ */
825
+ get data() {
826
+ return this.get('data');
827
+ }
828
+ /**
829
+ * Get the user associated with the job.
830
+ * @return {TUser | undefined} The user associated with the job.
831
+ */
832
+ get user() {
833
+ return this.get('user');
834
+ }
835
+ /**
836
+ * Get the error of the job.
837
+ * @return {TValue | undefined} The error of the job.
838
+ */
839
+ get error() {
840
+ return this.get('error');
841
+ }
842
+ /**
843
+ * Get the start time of the job.
844
+ * @return {Date | undefined} The start time of the job.
845
+ */
846
+ get startedAt() {
847
+ return this.get('startedAt');
848
+ }
849
+ /**
850
+ * Get the completion time of the job.
851
+ * @return {Date | undefined} The completion time of the job.
852
+ */
853
+ get completedAt() {
854
+ return this.get('completedAt');
837
855
  }
838
856
  }
839
857
 
@@ -869,7 +887,7 @@ const TObjectTypes = {
869
887
  };
870
888
 
871
889
  //
872
- // utils.ts
890
+ // index.ts
873
891
  //
874
892
  // The MIT License
875
893
  // Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
@@ -893,6 +911,25 @@ const TObjectTypes = {
893
911
  // THE SOFTWARE.
894
912
  //
895
913
  const isObjKey = (key, obj) => key in obj;
914
+ const classExtends = (x) => x;
915
+ const isQuery = (x) => {
916
+ return x instanceof TQuery;
917
+ };
918
+ const isObject = (x) => {
919
+ return x instanceof index.TObject;
920
+ };
921
+ const isUser = (x) => {
922
+ return x instanceof TUser;
923
+ };
924
+ const isRole = (x) => {
925
+ return x instanceof TRole;
926
+ };
927
+ const isFile = (x) => {
928
+ return x instanceof TFile;
929
+ };
930
+ const isJob = (x) => {
931
+ return x instanceof TJob;
932
+ };
896
933
 
897
934
  //
898
935
  // codec.ts
@@ -981,50 +1018,6 @@ const decodeEJSON = (x, stack, options) => {
981
1018
  const serialize = (x, options) => JSON.stringify(encodeEJSON(x, [], options ?? {}), undefined, options?.space);
982
1019
  const deserialize = (buffer, options) => decodeEJSON(JSON.parse(buffer), [], options ?? {});
983
1020
 
984
- //
985
- // index.ts
986
- //
987
- // The MIT License
988
- // Copyright (c) 2021 - 2025 O2ter Limited. All rights reserved.
989
- //
990
- // Permission is hereby granted, free of charge, to any person obtaining a copy
991
- // of this software and associated documentation files (the "Software"), to deal
992
- // in the Software without restriction, including without limitation the rights
993
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
994
- // copies of the Software, and to permit persons to whom the Software is
995
- // furnished to do so, subject to the following conditions:
996
- //
997
- // The above copyright notice and this permission notice shall be included in
998
- // all copies or substantial portions of the Software.
999
- //
1000
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1001
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1002
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1003
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1004
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1005
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1006
- // THE SOFTWARE.
1007
- //
1008
- const classExtends = (x) => x;
1009
- const isQuery = (x) => {
1010
- return x instanceof TQuery;
1011
- };
1012
- const isObject = (x) => {
1013
- return x instanceof index.TObject;
1014
- };
1015
- const isUser = (x) => {
1016
- return x instanceof TUser;
1017
- };
1018
- const isRole = (x) => {
1019
- return x instanceof TRole;
1020
- };
1021
- const isFile = (x) => {
1022
- return x instanceof TFile;
1023
- };
1024
- const isJob = (x) => {
1025
- return x instanceof TJob;
1026
- };
1027
-
1028
1021
  //
1029
1022
  // methods.ts
1030
1023
  //
@@ -2035,11 +2028,5 @@ exports.TUser = TUser;
2035
2028
  exports._logLevels = _logLevels;
2036
2029
  exports.classExtends = classExtends;
2037
2030
  exports.deserialize = deserialize;
2038
- exports.isFile = isFile;
2039
- exports.isJob = isJob;
2040
- exports.isObject = isObject;
2041
- exports.isQuery = isQuery;
2042
- exports.isRole = isRole;
2043
- exports.isUser = isUser;
2044
2031
  exports.serialize = serialize;
2045
- //# sourceMappingURL=index-DfnPpl1I.js.map
2032
+ //# sourceMappingURL=index-DylUjD_1.js.map