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