@secrecy/lib 1.32.0-feat-user-data-management.2 → 1.33.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.
- package/dist/lib/client.js +2 -0
- package/dist/lib/versioning.js +1 -0
- package/dist/types/client.d.ts +56 -154
- package/dist/types/versioning.d.ts +1 -0
- package/package.json +2 -2
package/dist/lib/client.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { httpBatchLink, loggerLink, createTRPCProxyClient, TRPCClientError, } from '@trpc/client';
|
|
2
2
|
import superjson from 'superjson';
|
|
3
|
+
import { SECRECY_LIB_VERSION } from './versioning';
|
|
3
4
|
export function isTRPCClientError(cause) {
|
|
4
5
|
return cause instanceof TRPCClientError;
|
|
5
6
|
}
|
|
@@ -27,6 +28,7 @@ export const createTRPCClient = (session, onAccessDenied) => createTRPCProxyClie
|
|
|
27
28
|
controller.abort();
|
|
28
29
|
}, 20000);
|
|
29
30
|
const headers = new Headers(init?.headers);
|
|
31
|
+
headers.set('secrecy-lib-version', SECRECY_LIB_VERSION);
|
|
30
32
|
if (typeof session === 'string') {
|
|
31
33
|
headers.set('secrecy-session', session);
|
|
32
34
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SECRECY_LIB_VERSION = '1.0.0';
|
package/dist/types/client.d.ts
CHANGED
|
@@ -185,7 +185,6 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
185
185
|
avatar: string | null;
|
|
186
186
|
isSearchable: boolean;
|
|
187
187
|
}[];
|
|
188
|
-
currentUserId: string;
|
|
189
188
|
};
|
|
190
189
|
_output_out: {
|
|
191
190
|
users: {
|
|
@@ -195,7 +194,6 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
195
194
|
avatar: string | null;
|
|
196
195
|
isSearchable: boolean;
|
|
197
196
|
}[];
|
|
198
|
-
currentUserId: string;
|
|
199
197
|
};
|
|
200
198
|
}, unknown>>;
|
|
201
199
|
};
|
|
@@ -1947,13 +1945,11 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
1947
1945
|
};
|
|
1948
1946
|
_output_in: {
|
|
1949
1947
|
sessionId: string;
|
|
1950
|
-
userId: string;
|
|
1951
1948
|
} & {
|
|
1952
1949
|
masterKeySalt: string;
|
|
1953
1950
|
};
|
|
1954
1951
|
_output_out: {
|
|
1955
1952
|
sessionId: string;
|
|
1956
|
-
userId: string;
|
|
1957
1953
|
} & {
|
|
1958
1954
|
masterKeySalt: string;
|
|
1959
1955
|
};
|
|
@@ -3154,7 +3150,7 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
3154
3150
|
}>;
|
|
3155
3151
|
_meta: object;
|
|
3156
3152
|
_ctx_out: {
|
|
3157
|
-
session:
|
|
3153
|
+
session: SecrecySessionWithApp;
|
|
3158
3154
|
req: {
|
|
3159
3155
|
headers: Headers;
|
|
3160
3156
|
body: ReadableStream<Uint8Array> | null;
|
|
@@ -3168,14 +3164,10 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
3168
3164
|
_input_in: {
|
|
3169
3165
|
dataId: string;
|
|
3170
3166
|
nodeId: string;
|
|
3171
|
-
} & {
|
|
3172
|
-
appId?: string | null | undefined;
|
|
3173
3167
|
};
|
|
3174
3168
|
_input_out: {
|
|
3175
3169
|
dataId: string;
|
|
3176
3170
|
nodeId: string;
|
|
3177
|
-
} & {
|
|
3178
|
-
appId?: string | null | undefined;
|
|
3179
3171
|
};
|
|
3180
3172
|
_output_in: {
|
|
3181
3173
|
isDeleted: boolean;
|
|
@@ -4050,8 +4042,8 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
4050
4042
|
min?: Date | undefined;
|
|
4051
4043
|
} | undefined;
|
|
4052
4044
|
size?: {
|
|
4053
|
-
max?:
|
|
4054
|
-
min?:
|
|
4045
|
+
max?: bigint | undefined;
|
|
4046
|
+
min?: bigint | undefined;
|
|
4055
4047
|
} | undefined;
|
|
4056
4048
|
appIds?: string[] | undefined;
|
|
4057
4049
|
sharedCount?: {
|
|
@@ -4088,86 +4080,68 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
4088
4080
|
} | undefined;
|
|
4089
4081
|
};
|
|
4090
4082
|
_output_in: {
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4083
|
+
keyPairs: {
|
|
4084
|
+
appId: string;
|
|
4085
|
+
pub: string;
|
|
4086
|
+
encPriv: string;
|
|
4087
|
+
}[];
|
|
4088
|
+
nodes: {
|
|
4089
|
+
id: string;
|
|
4090
|
+
createdAt: Date;
|
|
4091
|
+
deletedAt: Date | null;
|
|
4092
|
+
name: string;
|
|
4093
|
+
updatedAt: Date;
|
|
4094
|
+
history: {
|
|
4095
|
+
createdAt: Date;
|
|
4096
|
+
dataId: string;
|
|
4097
|
+
size: bigint;
|
|
4098
|
+
storageType: "s3" | "lite";
|
|
4096
4099
|
}[];
|
|
4097
|
-
|
|
4100
|
+
access: {
|
|
4101
|
+
appId: string;
|
|
4102
|
+
nameKey: string;
|
|
4103
|
+
};
|
|
4104
|
+
totalSize: bigint;
|
|
4105
|
+
breadcrumb: {
|
|
4098
4106
|
id: string;
|
|
4099
|
-
createdAt: Date;
|
|
4100
|
-
deletedAt: Date | null;
|
|
4101
4107
|
name: string;
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
createdAt: Date;
|
|
4105
|
-
dataId: string;
|
|
4106
|
-
size: bigint;
|
|
4107
|
-
storageType: "s3" | "lite";
|
|
4108
|
-
}[];
|
|
4109
|
-
access: {
|
|
4110
|
-
appId: string;
|
|
4111
|
-
nameKey: string;
|
|
4112
|
-
};
|
|
4113
|
-
totalSize: bigint;
|
|
4114
|
-
breadcrumb: {
|
|
4115
|
-
id: string;
|
|
4116
|
-
name: string;
|
|
4117
|
-
nameKey: string | null;
|
|
4118
|
-
pubKey: string;
|
|
4119
|
-
}[];
|
|
4120
|
-
sharedCount: number;
|
|
4108
|
+
nameKey: string | null;
|
|
4109
|
+
pubKey: string;
|
|
4121
4110
|
}[];
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
next: number | null;
|
|
4125
|
-
prev: number | null;
|
|
4126
|
-
last: number;
|
|
4127
|
-
perPage: number;
|
|
4128
|
-
totalItems: number;
|
|
4129
|
-
};
|
|
4111
|
+
sharedCount: number;
|
|
4112
|
+
}[];
|
|
4130
4113
|
};
|
|
4131
4114
|
_output_out: {
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4115
|
+
keyPairs: {
|
|
4116
|
+
appId: string;
|
|
4117
|
+
pub: string;
|
|
4118
|
+
encPriv: string;
|
|
4119
|
+
}[];
|
|
4120
|
+
nodes: {
|
|
4121
|
+
id: string;
|
|
4122
|
+
createdAt: Date;
|
|
4123
|
+
deletedAt: Date | null;
|
|
4124
|
+
name: string;
|
|
4125
|
+
updatedAt: Date;
|
|
4126
|
+
history: {
|
|
4127
|
+
createdAt: Date;
|
|
4128
|
+
dataId: string;
|
|
4129
|
+
size: bigint;
|
|
4130
|
+
storageType: "s3" | "lite";
|
|
4137
4131
|
}[];
|
|
4138
|
-
|
|
4132
|
+
access: {
|
|
4133
|
+
appId: string;
|
|
4134
|
+
nameKey: string;
|
|
4135
|
+
};
|
|
4136
|
+
totalSize: bigint;
|
|
4137
|
+
breadcrumb: {
|
|
4139
4138
|
id: string;
|
|
4140
|
-
createdAt: Date;
|
|
4141
|
-
deletedAt: Date | null;
|
|
4142
4139
|
name: string;
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
createdAt: Date;
|
|
4146
|
-
dataId: string;
|
|
4147
|
-
size: bigint;
|
|
4148
|
-
storageType: "s3" | "lite";
|
|
4149
|
-
}[];
|
|
4150
|
-
access: {
|
|
4151
|
-
appId: string;
|
|
4152
|
-
nameKey: string;
|
|
4153
|
-
};
|
|
4154
|
-
totalSize: bigint;
|
|
4155
|
-
breadcrumb: {
|
|
4156
|
-
id: string;
|
|
4157
|
-
name: string;
|
|
4158
|
-
nameKey: string | null;
|
|
4159
|
-
pubKey: string;
|
|
4160
|
-
}[];
|
|
4161
|
-
sharedCount: number;
|
|
4140
|
+
nameKey: string | null;
|
|
4141
|
+
pubKey: string;
|
|
4162
4142
|
}[];
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
next: number | null;
|
|
4166
|
-
prev: number | null;
|
|
4167
|
-
last: number;
|
|
4168
|
-
perPage: number;
|
|
4169
|
-
totalItems: number;
|
|
4170
|
-
};
|
|
4143
|
+
sharedCount: number;
|
|
4144
|
+
}[];
|
|
4171
4145
|
};
|
|
4172
4146
|
}, unknown>>;
|
|
4173
4147
|
};
|
|
@@ -5040,7 +5014,7 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
5040
5014
|
}>;
|
|
5041
5015
|
_meta: object;
|
|
5042
5016
|
_ctx_out: {
|
|
5043
|
-
session:
|
|
5017
|
+
session: SecrecySessionWithApp;
|
|
5044
5018
|
req: {
|
|
5045
5019
|
headers: Headers;
|
|
5046
5020
|
body: ReadableStream<Uint8Array> | null;
|
|
@@ -5053,17 +5027,9 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
5053
5027
|
};
|
|
5054
5028
|
_input_in: {
|
|
5055
5029
|
id: string;
|
|
5056
|
-
} & {
|
|
5057
|
-
force?: boolean | undefined;
|
|
5058
|
-
} & {
|
|
5059
|
-
appId?: string | null | undefined;
|
|
5060
5030
|
};
|
|
5061
5031
|
_input_out: {
|
|
5062
5032
|
id: string;
|
|
5063
|
-
} & {
|
|
5064
|
-
force?: boolean | undefined;
|
|
5065
|
-
} & {
|
|
5066
|
-
appId?: string | null | undefined;
|
|
5067
5033
|
};
|
|
5068
5034
|
_output_in: {
|
|
5069
5035
|
isDeleted: boolean;
|
|
@@ -18260,14 +18226,12 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
18260
18226
|
_input_in: {
|
|
18261
18227
|
lastname?: string | null | undefined;
|
|
18262
18228
|
firstname?: string | null | undefined;
|
|
18263
|
-
avatar?: string | null | undefined;
|
|
18264
18229
|
isSearchable?: boolean | undefined;
|
|
18265
18230
|
lang?: "fr" | "en" | null | undefined;
|
|
18266
18231
|
};
|
|
18267
18232
|
_input_out: {
|
|
18268
18233
|
lastname?: string | null | undefined;
|
|
18269
18234
|
firstname?: string | null | undefined;
|
|
18270
|
-
avatar?: string | null | undefined;
|
|
18271
18235
|
isSearchable?: boolean | undefined;
|
|
18272
18236
|
lang?: "fr" | "en" | null | undefined;
|
|
18273
18237
|
};
|
|
@@ -18303,68 +18267,6 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
18303
18267
|
};
|
|
18304
18268
|
}, unknown>>;
|
|
18305
18269
|
};
|
|
18306
|
-
myApps: {
|
|
18307
|
-
query: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"query", {
|
|
18308
|
-
_config: import("@trpc/server").RootConfig<{
|
|
18309
|
-
ctx: {
|
|
18310
|
-
req: {
|
|
18311
|
-
headers: Headers;
|
|
18312
|
-
body: ReadableStream<Uint8Array> | null;
|
|
18313
|
-
};
|
|
18314
|
-
res: {
|
|
18315
|
-
headers: Headers;
|
|
18316
|
-
};
|
|
18317
|
-
session: SecrecySession | null;
|
|
18318
|
-
locale: Locales;
|
|
18319
|
-
ls: TranslationFunctions;
|
|
18320
|
-
};
|
|
18321
|
-
meta: object;
|
|
18322
|
-
errorShape: {
|
|
18323
|
-
message: string;
|
|
18324
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
18325
|
-
data: _trpc_server_dist_error_formatter.DefaultErrorData;
|
|
18326
|
-
} | {
|
|
18327
|
-
data: {
|
|
18328
|
-
zodError: import("zod").typeToFlattenedError<any, string> | null;
|
|
18329
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
18330
|
-
httpStatus: number;
|
|
18331
|
-
path?: string;
|
|
18332
|
-
stack?: string;
|
|
18333
|
-
};
|
|
18334
|
-
message: string;
|
|
18335
|
-
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
18336
|
-
};
|
|
18337
|
-
transformer: typeof superjson;
|
|
18338
|
-
}>;
|
|
18339
|
-
_meta: object;
|
|
18340
|
-
_ctx_out: {
|
|
18341
|
-
session: SecrecySession;
|
|
18342
|
-
req: {
|
|
18343
|
-
headers: Headers;
|
|
18344
|
-
body: ReadableStream<Uint8Array> | null;
|
|
18345
|
-
};
|
|
18346
|
-
res: {
|
|
18347
|
-
headers: Headers;
|
|
18348
|
-
};
|
|
18349
|
-
locale: Locales;
|
|
18350
|
-
ls: TranslationFunctions;
|
|
18351
|
-
};
|
|
18352
|
-
_input_in: {};
|
|
18353
|
-
_input_out: {};
|
|
18354
|
-
_output_in: {
|
|
18355
|
-
apps: Record<string, {
|
|
18356
|
-
name: string;
|
|
18357
|
-
logo: string | null;
|
|
18358
|
-
}>;
|
|
18359
|
-
};
|
|
18360
|
-
_output_out: {
|
|
18361
|
-
apps: Record<string, {
|
|
18362
|
-
name: string;
|
|
18363
|
-
logo: string | null;
|
|
18364
|
-
}>;
|
|
18365
|
-
};
|
|
18366
|
-
}, unknown>>;
|
|
18367
|
-
};
|
|
18368
18270
|
};
|
|
18369
18271
|
};
|
|
18370
18272
|
export type ApiClient = ReturnType<typeof createTRPCClient>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SECRECY_LIB_VERSION = "1.0.0";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@secrecy/lib",
|
|
3
3
|
"author": "Anonymize <anonymize@gmail.com>",
|
|
4
4
|
"description": "Anonymize Secrecy Library",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.33.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/anonymize-org/lib.git"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@secrecy/lib-utils": "^1.0.18",
|
|
77
|
-
"@secrecy/trpc-api-types": "1.27.0-feat-
|
|
77
|
+
"@secrecy/trpc-api-types": "1.27.0-feat-error-msg-translations.3",
|
|
78
78
|
"@trpc/client": "10.45.2",
|
|
79
79
|
"@trpc/server": "10.45.2",
|
|
80
80
|
"@types/libsodium-wrappers-sumo": "^0.7.8",
|