@secrecy/lib 1.63.0-feat-orgs.4 → 1.63.0-feat-orgs.6
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/base-client.js +1 -1
- package/dist/lib/index.js +1 -0
- package/dist/types/base-client.d.ts +1 -0
- package/dist/types/client.d.ts +172 -20
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
package/dist/lib/base-client.js
CHANGED
|
@@ -2,7 +2,7 @@ import { usersCache } from './cache.js';
|
|
|
2
2
|
import { getStorage } from './client/storage.js';
|
|
3
3
|
import { createTRPCClient, } from './client.js';
|
|
4
4
|
import { getPreferedEmail } from './utils.js';
|
|
5
|
-
async function getPublicUser(client, id) {
|
|
5
|
+
export async function getPublicUser(client, id) {
|
|
6
6
|
let user = usersCache.get(id);
|
|
7
7
|
if (user !== undefined) {
|
|
8
8
|
return user;
|
package/dist/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ApiClient, type RouterOutputs, type RouterInputs, CreateTrpcClientOptions } from './client.js';
|
|
2
2
|
import { type InfuraNetwork, type PublicUser } from './index.js';
|
|
3
3
|
import { type SelfUser } from './client/types/user.js';
|
|
4
|
+
export declare function getPublicUser(client: ApiClient, id: string): Promise<PublicUser>;
|
|
4
5
|
export type SecrecyUrls = {
|
|
5
6
|
auth: string;
|
|
6
7
|
account: string;
|
package/dist/types/client.d.ts
CHANGED
|
@@ -129,7 +129,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
129
129
|
id: string;
|
|
130
130
|
}[];
|
|
131
131
|
})[];
|
|
132
|
-
currentUserId: string;
|
|
133
132
|
};
|
|
134
133
|
_output_out: {
|
|
135
134
|
users: ({
|
|
@@ -144,7 +143,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
144
143
|
id: string;
|
|
145
144
|
}[];
|
|
146
145
|
})[];
|
|
147
|
-
currentUserId: string;
|
|
148
146
|
};
|
|
149
147
|
}, unknown>>;
|
|
150
148
|
};
|
|
@@ -1747,14 +1745,20 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
1747
1745
|
godFather?: string | undefined;
|
|
1748
1746
|
};
|
|
1749
1747
|
_output_in: {
|
|
1750
|
-
userId: string;
|
|
1751
1748
|
sessionId: string;
|
|
1749
|
+
context: {
|
|
1750
|
+
userId: string;
|
|
1751
|
+
orgId: string;
|
|
1752
|
+
};
|
|
1752
1753
|
} & {
|
|
1753
1754
|
masterKeySalt: string;
|
|
1754
1755
|
};
|
|
1755
1756
|
_output_out: {
|
|
1756
|
-
userId: string;
|
|
1757
1757
|
sessionId: string;
|
|
1758
|
+
context: {
|
|
1759
|
+
userId: string;
|
|
1760
|
+
orgId: string;
|
|
1761
|
+
};
|
|
1758
1762
|
} & {
|
|
1759
1763
|
masterKeySalt: string;
|
|
1760
1764
|
};
|
|
@@ -12611,10 +12615,10 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
12611
12615
|
_meta: object;
|
|
12612
12616
|
_ctx_out: {};
|
|
12613
12617
|
_input_in: {
|
|
12614
|
-
|
|
12618
|
+
planKind: "free" | "basic" | "advanced" | "pro";
|
|
12615
12619
|
};
|
|
12616
12620
|
_input_out: {
|
|
12617
|
-
|
|
12621
|
+
planKind: "free" | "basic" | "advanced" | "pro";
|
|
12618
12622
|
};
|
|
12619
12623
|
_output_in: {
|
|
12620
12624
|
url: string | null;
|
|
@@ -12711,11 +12715,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
12711
12715
|
description: string | null;
|
|
12712
12716
|
status: "canceled" | "past_due" | "active" | "incomplete" | "incomplete_expired" | "paused" | "trialing" | "unpaid";
|
|
12713
12717
|
metadata: Record<string, string>;
|
|
12718
|
+
created: number;
|
|
12714
12719
|
billingCycleAnchor: number;
|
|
12715
12720
|
cancelAt: number | null;
|
|
12716
12721
|
cancelAtPeriodEnd: boolean;
|
|
12717
12722
|
canceledAt: number | null;
|
|
12718
|
-
created: number;
|
|
12719
12723
|
daysUntilDue: number | null;
|
|
12720
12724
|
startDate: number;
|
|
12721
12725
|
endedAt: number | null;
|
|
@@ -12730,11 +12734,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
12730
12734
|
description: string | null;
|
|
12731
12735
|
status: "canceled" | "past_due" | "active" | "incomplete" | "incomplete_expired" | "paused" | "trialing" | "unpaid";
|
|
12732
12736
|
metadata: Record<string, string>;
|
|
12737
|
+
created: number;
|
|
12733
12738
|
billingCycleAnchor: number;
|
|
12734
12739
|
cancelAt: number | null;
|
|
12735
12740
|
cancelAtPeriodEnd: boolean;
|
|
12736
12741
|
canceledAt: number | null;
|
|
12737
|
-
created: number;
|
|
12738
12742
|
daysUntilDue: number | null;
|
|
12739
12743
|
startDate: number;
|
|
12740
12744
|
endedAt: number | null;
|
|
@@ -13085,10 +13089,12 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
13085
13089
|
_input_in: {
|
|
13086
13090
|
name: string;
|
|
13087
13091
|
id: string;
|
|
13092
|
+
billingProfileStripeCustomerId: string | null;
|
|
13088
13093
|
};
|
|
13089
13094
|
_input_out: {
|
|
13090
13095
|
name: string;
|
|
13091
13096
|
id: string;
|
|
13097
|
+
billingProfileStripeCustomerId: string | null;
|
|
13092
13098
|
};
|
|
13093
13099
|
_output_in: {
|
|
13094
13100
|
name: string;
|
|
@@ -13143,7 +13149,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
13143
13149
|
_input_in: {};
|
|
13144
13150
|
_input_out: {};
|
|
13145
13151
|
_output_in: ({
|
|
13146
|
-
codes: string[];
|
|
13147
13152
|
id: string;
|
|
13148
13153
|
quotasId: string;
|
|
13149
13154
|
stripePricesId: string | null;
|
|
@@ -13169,13 +13174,9 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
13169
13174
|
};
|
|
13170
13175
|
};
|
|
13171
13176
|
} & {
|
|
13172
|
-
price:
|
|
13173
|
-
monthly: number;
|
|
13174
|
-
yearly: number;
|
|
13175
|
-
};
|
|
13177
|
+
price: number;
|
|
13176
13178
|
})[];
|
|
13177
13179
|
_output_out: ({
|
|
13178
|
-
codes: ("org_basic_month" | "org_basic_year" | "org_advanced_month" | "org_advanced_year" | "org_pro_month" | "org_pro_year")[];
|
|
13179
13180
|
id: string;
|
|
13180
13181
|
quotasId: string;
|
|
13181
13182
|
stripePricesId: string | null;
|
|
@@ -13201,10 +13202,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
13201
13202
|
};
|
|
13202
13203
|
};
|
|
13203
13204
|
} & {
|
|
13204
|
-
price:
|
|
13205
|
-
monthly: number;
|
|
13206
|
-
yearly: number;
|
|
13207
|
-
};
|
|
13205
|
+
price: number;
|
|
13208
13206
|
})[];
|
|
13209
13207
|
}, unknown>>;
|
|
13210
13208
|
};
|
|
@@ -14082,8 +14080,12 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
14082
14080
|
}>;
|
|
14083
14081
|
_meta: object;
|
|
14084
14082
|
_ctx_out: {};
|
|
14085
|
-
_input_in: {
|
|
14086
|
-
|
|
14083
|
+
_input_in: {
|
|
14084
|
+
id: string;
|
|
14085
|
+
};
|
|
14086
|
+
_input_out: {
|
|
14087
|
+
id: string;
|
|
14088
|
+
};
|
|
14087
14089
|
_output_in: {
|
|
14088
14090
|
url: string | null;
|
|
14089
14091
|
};
|
|
@@ -15386,6 +15388,156 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
|
|
|
15386
15388
|
};
|
|
15387
15389
|
}, unknown>>;
|
|
15388
15390
|
};
|
|
15391
|
+
createSubscription: {
|
|
15392
|
+
mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
|
|
15393
|
+
_config: import("@trpc/server").RootConfig<{
|
|
15394
|
+
ctx: {};
|
|
15395
|
+
meta: object;
|
|
15396
|
+
errorShape: {
|
|
15397
|
+
message: string;
|
|
15398
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
15399
|
+
data: _trpc_server_dist_error_formatter.DefaultErrorData;
|
|
15400
|
+
} | {
|
|
15401
|
+
data: {
|
|
15402
|
+
zodError: import("zod").typeToFlattenedError<any, string> | null;
|
|
15403
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
15404
|
+
httpStatus: number;
|
|
15405
|
+
path?: string;
|
|
15406
|
+
stack?: string;
|
|
15407
|
+
};
|
|
15408
|
+
message: string;
|
|
15409
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
15410
|
+
};
|
|
15411
|
+
transformer: typeof superjson;
|
|
15412
|
+
}>;
|
|
15413
|
+
_meta: object;
|
|
15414
|
+
_ctx_out: {
|
|
15415
|
+
session: {
|
|
15416
|
+
app: {
|
|
15417
|
+
id: string;
|
|
15418
|
+
planId: string;
|
|
15419
|
+
fakeUserId: string | undefined;
|
|
15420
|
+
settings: {
|
|
15421
|
+
id: string;
|
|
15422
|
+
devsLimit: bigint | null;
|
|
15423
|
+
usersLimit: bigint | null;
|
|
15424
|
+
perDataSizeLimit: bigint | null;
|
|
15425
|
+
bandwidthLimit: bigint | null;
|
|
15426
|
+
totalStorageSizeLimit: bigint | null;
|
|
15427
|
+
payForUsers: boolean;
|
|
15428
|
+
};
|
|
15429
|
+
};
|
|
15430
|
+
sessionId: string;
|
|
15431
|
+
accountId: string;
|
|
15432
|
+
accountInfosId: string;
|
|
15433
|
+
accountRole: _prisma_client.AccountRole;
|
|
15434
|
+
userId: string;
|
|
15435
|
+
userRole: _prisma_client.UserRole;
|
|
15436
|
+
org: {
|
|
15437
|
+
id: string;
|
|
15438
|
+
name: string;
|
|
15439
|
+
plan: _prisma_client.OrganizationPlanKind;
|
|
15440
|
+
role: _prisma_client.OrganizationRole;
|
|
15441
|
+
};
|
|
15442
|
+
};
|
|
15443
|
+
req: {
|
|
15444
|
+
headers: Headers;
|
|
15445
|
+
};
|
|
15446
|
+
res: {
|
|
15447
|
+
headers: Headers;
|
|
15448
|
+
};
|
|
15449
|
+
locale: Locales;
|
|
15450
|
+
ls: TranslationFunctions;
|
|
15451
|
+
};
|
|
15452
|
+
_input_in: {
|
|
15453
|
+
planName: string;
|
|
15454
|
+
};
|
|
15455
|
+
_input_out: {
|
|
15456
|
+
planName: string;
|
|
15457
|
+
};
|
|
15458
|
+
_output_in: {
|
|
15459
|
+
url: string | null;
|
|
15460
|
+
};
|
|
15461
|
+
_output_out: {
|
|
15462
|
+
url: string | null;
|
|
15463
|
+
};
|
|
15464
|
+
}, unknown>>;
|
|
15465
|
+
};
|
|
15466
|
+
cancelSubscription: {
|
|
15467
|
+
mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
|
|
15468
|
+
_config: import("@trpc/server").RootConfig<{
|
|
15469
|
+
ctx: {};
|
|
15470
|
+
meta: object;
|
|
15471
|
+
errorShape: {
|
|
15472
|
+
message: string;
|
|
15473
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
15474
|
+
data: _trpc_server_dist_error_formatter.DefaultErrorData;
|
|
15475
|
+
} | {
|
|
15476
|
+
data: {
|
|
15477
|
+
zodError: import("zod").typeToFlattenedError<any, string> | null;
|
|
15478
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
|
|
15479
|
+
httpStatus: number;
|
|
15480
|
+
path?: string;
|
|
15481
|
+
stack?: string;
|
|
15482
|
+
};
|
|
15483
|
+
message: string;
|
|
15484
|
+
code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
|
|
15485
|
+
};
|
|
15486
|
+
transformer: typeof superjson;
|
|
15487
|
+
}>;
|
|
15488
|
+
_meta: object;
|
|
15489
|
+
_ctx_out: {
|
|
15490
|
+
session: {
|
|
15491
|
+
app: {
|
|
15492
|
+
id: string;
|
|
15493
|
+
planId: string;
|
|
15494
|
+
fakeUserId: string | undefined;
|
|
15495
|
+
settings: {
|
|
15496
|
+
id: string;
|
|
15497
|
+
devsLimit: bigint | null;
|
|
15498
|
+
usersLimit: bigint | null;
|
|
15499
|
+
perDataSizeLimit: bigint | null;
|
|
15500
|
+
bandwidthLimit: bigint | null;
|
|
15501
|
+
totalStorageSizeLimit: bigint | null;
|
|
15502
|
+
payForUsers: boolean;
|
|
15503
|
+
};
|
|
15504
|
+
};
|
|
15505
|
+
sessionId: string;
|
|
15506
|
+
accountId: string;
|
|
15507
|
+
accountInfosId: string;
|
|
15508
|
+
accountRole: _prisma_client.AccountRole;
|
|
15509
|
+
userId: string;
|
|
15510
|
+
userRole: _prisma_client.UserRole;
|
|
15511
|
+
org: {
|
|
15512
|
+
id: string;
|
|
15513
|
+
name: string;
|
|
15514
|
+
plan: _prisma_client.OrganizationPlanKind;
|
|
15515
|
+
role: _prisma_client.OrganizationRole;
|
|
15516
|
+
};
|
|
15517
|
+
};
|
|
15518
|
+
req: {
|
|
15519
|
+
headers: Headers;
|
|
15520
|
+
};
|
|
15521
|
+
res: {
|
|
15522
|
+
headers: Headers;
|
|
15523
|
+
};
|
|
15524
|
+
locale: Locales;
|
|
15525
|
+
ls: TranslationFunctions;
|
|
15526
|
+
};
|
|
15527
|
+
_input_in: {
|
|
15528
|
+
waitUntilPeriodEnd: boolean;
|
|
15529
|
+
};
|
|
15530
|
+
_input_out: {
|
|
15531
|
+
waitUntilPeriodEnd: boolean;
|
|
15532
|
+
};
|
|
15533
|
+
_output_in: {
|
|
15534
|
+
isCancelled: boolean;
|
|
15535
|
+
};
|
|
15536
|
+
_output_out: {
|
|
15537
|
+
isCancelled: boolean;
|
|
15538
|
+
};
|
|
15539
|
+
}, unknown>>;
|
|
15540
|
+
};
|
|
15389
15541
|
deleteApplication: {
|
|
15390
15542
|
mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
|
|
15391
15543
|
_config: import("@trpc/server").RootConfig<{
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,3 +9,4 @@ export * from './utils/store-buddy.js';
|
|
|
9
9
|
export type { UserAppNotifications, UserAppSettings, InfuraNetwork, UserData, DownloadProgress, } from './types.js';
|
|
10
10
|
export * from './error/index.js';
|
|
11
11
|
export type { Rights } from './client/types/node.js';
|
|
12
|
+
export { getPublicUser } from './base-client.js';
|
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.63.0-feat-orgs.
|
|
5
|
+
"version": "1.63.0-feat-orgs.6",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/anonymize-org/lib.git"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typescript": "^5.7.2"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@secrecy/trpc-api-types": "1.33.0-feat-orgs.
|
|
77
|
+
"@secrecy/trpc-api-types": "1.33.0-feat-orgs.17",
|
|
78
78
|
"@trpc/client": "10.45.2",
|
|
79
79
|
"@trpc/server": "10.45.2",
|
|
80
80
|
"@types/libsodium-wrappers-sumo": "^0.7.8",
|