@secrecy/lib 1.73.5 → 1.73.7
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
CHANGED
|
@@ -57,7 +57,7 @@ export class BaseClient {
|
|
|
57
57
|
this.sessionId !== this.#me.sessionId ||
|
|
58
58
|
Date.now() - this.#me.fetchedAt > 5 * 60 * 1000) {
|
|
59
59
|
const data = await this.client.user.self.query({
|
|
60
|
-
|
|
60
|
+
t: Date.now(),
|
|
61
61
|
});
|
|
62
62
|
this.#me = {
|
|
63
63
|
data,
|
|
@@ -35,9 +35,6 @@ export function getSecrecyClient(opts = {}) {
|
|
|
35
35
|
const uaKeys = storage.userAppKeys.load();
|
|
36
36
|
const uaJwt = storage.jwt.load();
|
|
37
37
|
if (uaSession && uaKeys && uaJwt) {
|
|
38
|
-
storage.userAppKeys.save(uaKeys);
|
|
39
|
-
storage.userAppSession.save(uaSession);
|
|
40
|
-
storage.jwt.save(uaJwt);
|
|
41
38
|
return new SecrecyClient({
|
|
42
39
|
uaSession,
|
|
43
40
|
uaKeys,
|
|
@@ -50,7 +47,7 @@ export function getSecrecyClient(opts = {}) {
|
|
|
50
47
|
export async function login({ appId, context, path, redirect, scopes, backPath, session, secrecyUrls, }) {
|
|
51
48
|
return await new Promise(async (resolve, reject) => {
|
|
52
49
|
const appUrl = window.location.origin;
|
|
53
|
-
const client = getSecrecyClient({ secrecyUrls });
|
|
50
|
+
const client = getSecrecyClient({ session, secrecyUrls });
|
|
54
51
|
const innerLogin = () => {
|
|
55
52
|
const infos = {
|
|
56
53
|
appUrl,
|
|
@@ -10,5 +10,5 @@ export declare class SecrecyOrganizationClient {
|
|
|
10
10
|
removeMember(input: RouterInputs['org']['removeMember']): Promise<RouterOutputs['org']['removeMember']>;
|
|
11
11
|
updateRole(input: RouterInputs['org']['updateRole']): Promise<RouterOutputs['org']['updateRole']>;
|
|
12
12
|
list(input: RouterInputs['org']['list']): Promise<RouterOutputs['org']['list']>;
|
|
13
|
-
plans(input: RouterInputs['
|
|
13
|
+
plans(input: RouterInputs['org']['plans']): Promise<RouterOutputs['org']['plans']>;
|
|
14
14
|
}
|
package/dist/types/client.d.ts
CHANGED
|
@@ -457,6 +457,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
457
457
|
stripeSubPaidUntil: Date | null;
|
|
458
458
|
billingProfileStripeCustomerId: string | null;
|
|
459
459
|
status: "active" | "inactive" | "pending_for_payment";
|
|
460
|
+
minMembersToReport: number;
|
|
460
461
|
};
|
|
461
462
|
meta: any;
|
|
462
463
|
}>;
|
|
@@ -4445,6 +4446,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4445
4446
|
stripeSubPaidUntil: Date | null;
|
|
4446
4447
|
billingProfileStripeCustomerId: string | null;
|
|
4447
4448
|
status: "active" | "inactive" | "pending_for_payment";
|
|
4449
|
+
minMembersToReport: number;
|
|
4448
4450
|
} & {
|
|
4449
4451
|
plan: {
|
|
4450
4452
|
id: string;
|
|
@@ -4481,6 +4483,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4481
4483
|
input: {
|
|
4482
4484
|
planKind: "free" | "basic" | "advanced" | "pro";
|
|
4483
4485
|
orgId?: string | undefined;
|
|
4486
|
+
minMembers?: number | undefined;
|
|
4484
4487
|
returnUrl?: string | undefined;
|
|
4485
4488
|
billingProfileId?: string | undefined;
|
|
4486
4489
|
};
|
|
@@ -4493,8 +4496,11 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4493
4496
|
input: {
|
|
4494
4497
|
name: string;
|
|
4495
4498
|
billingProfileId?: string | undefined;
|
|
4496
|
-
planKind?: "free" | "basic" | "advanced" | "pro" | undefined;
|
|
4497
4499
|
returnUrl?: string | undefined;
|
|
4500
|
+
plan?: {
|
|
4501
|
+
kind: "free" | "basic" | "advanced" | "pro";
|
|
4502
|
+
minMembers?: number | undefined;
|
|
4503
|
+
} | undefined;
|
|
4498
4504
|
};
|
|
4499
4505
|
output: {
|
|
4500
4506
|
type: "immediate";
|
|
@@ -4509,6 +4515,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4509
4515
|
stripeSubPaidUntil: Date | null;
|
|
4510
4516
|
billingProfileStripeCustomerId: string | null;
|
|
4511
4517
|
status: "active" | "inactive" | "pending_for_payment";
|
|
4518
|
+
minMembersToReport: number;
|
|
4512
4519
|
};
|
|
4513
4520
|
} | {
|
|
4514
4521
|
type: "checkout";
|
|
@@ -4524,6 +4531,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4524
4531
|
stripeSubPaidUntil: Date | null;
|
|
4525
4532
|
billingProfileStripeCustomerId: string | null;
|
|
4526
4533
|
status: "active" | "inactive" | "pending_for_payment";
|
|
4534
|
+
minMembersToReport: number;
|
|
4527
4535
|
};
|
|
4528
4536
|
};
|
|
4529
4537
|
meta: any;
|
|
@@ -4543,6 +4551,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4543
4551
|
stripeSubPaidUntil: Date | null;
|
|
4544
4552
|
billingProfileStripeCustomerId: string | null;
|
|
4545
4553
|
status: "active" | "inactive" | "pending_for_payment";
|
|
4554
|
+
minMembersToReport: number;
|
|
4546
4555
|
};
|
|
4547
4556
|
meta: any;
|
|
4548
4557
|
}>;
|
|
@@ -4582,6 +4591,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4582
4591
|
stripeSubPaidUntil: Date | null;
|
|
4583
4592
|
billingProfileStripeCustomerId: string | null;
|
|
4584
4593
|
status: "active" | "inactive" | "pending_for_payment";
|
|
4594
|
+
minMembersToReport: number;
|
|
4585
4595
|
}[];
|
|
4586
4596
|
meta: any;
|
|
4587
4597
|
}>;
|
|
@@ -4622,6 +4632,41 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4622
4632
|
};
|
|
4623
4633
|
meta: any;
|
|
4624
4634
|
}>;
|
|
4635
|
+
plans: import("@trpc/server").TRPCQueryProcedure<{
|
|
4636
|
+
input: Record<string, never>;
|
|
4637
|
+
output: {
|
|
4638
|
+
plans: {
|
|
4639
|
+
id: string;
|
|
4640
|
+
kind: "free" | "basic" | "advanced" | "pro";
|
|
4641
|
+
quotasId: string;
|
|
4642
|
+
stripePricesId: string | null;
|
|
4643
|
+
quotas: {
|
|
4644
|
+
downloadBandwidth: bigint | null;
|
|
4645
|
+
uploadBandwidth: bigint | null;
|
|
4646
|
+
downloadCount: bigint | null;
|
|
4647
|
+
uploadCount: bigint | null;
|
|
4648
|
+
totalDataCount: bigint | null;
|
|
4649
|
+
totalStorageSize: bigint | null;
|
|
4650
|
+
perDataSize: bigint | null;
|
|
4651
|
+
sentMails: {
|
|
4652
|
+
count: bigint | null;
|
|
4653
|
+
dataCount: bigint | null;
|
|
4654
|
+
dataSize: bigint | null;
|
|
4655
|
+
totalDataCount: bigint | null;
|
|
4656
|
+
totalStorageSize: bigint | null;
|
|
4657
|
+
perDataSize: bigint | null;
|
|
4658
|
+
totalCount: bigint | null;
|
|
4659
|
+
};
|
|
4660
|
+
};
|
|
4661
|
+
price: number;
|
|
4662
|
+
}[];
|
|
4663
|
+
membersTiers: {
|
|
4664
|
+
up_to: number | "inf";
|
|
4665
|
+
unit_amount: number;
|
|
4666
|
+
}[];
|
|
4667
|
+
};
|
|
4668
|
+
meta: any;
|
|
4669
|
+
}>;
|
|
4625
4670
|
removeMember: import("@trpc/server").TRPCMutationProcedure<{
|
|
4626
4671
|
input: {
|
|
4627
4672
|
orgId: string;
|
|
@@ -4648,6 +4693,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4648
4693
|
stripeSubPaidUntil: Date | null;
|
|
4649
4694
|
billingProfileStripeCustomerId: string | null;
|
|
4650
4695
|
status: "active" | "inactive" | "pending_for_payment";
|
|
4696
|
+
minMembersToReport: number;
|
|
4651
4697
|
};
|
|
4652
4698
|
meta: any;
|
|
4653
4699
|
}>;
|
|
@@ -4682,6 +4728,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4682
4728
|
stripeSubPaidUntil: Date | null;
|
|
4683
4729
|
billingProfileStripeCustomerId: string | null;
|
|
4684
4730
|
status: "active" | "inactive" | "pending_for_payment";
|
|
4731
|
+
minMembersToReport: number;
|
|
4685
4732
|
};
|
|
4686
4733
|
meta: any;
|
|
4687
4734
|
}>;
|
|
@@ -4763,40 +4810,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4763
4810
|
meta: any;
|
|
4764
4811
|
}>;
|
|
4765
4812
|
}>;
|
|
4766
|
-
plan: import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
4767
|
-
all: import("@trpc/server").TRPCQueryProcedure<{
|
|
4768
|
-
input: Record<string, never>;
|
|
4769
|
-
output: ({
|
|
4770
|
-
id: string;
|
|
4771
|
-
kind: "free" | "basic" | "advanced" | "pro";
|
|
4772
|
-
quotasId: string;
|
|
4773
|
-
stripePricesId: string | null;
|
|
4774
|
-
} & {
|
|
4775
|
-
quotas: {
|
|
4776
|
-
downloadBandwidth: bigint | null;
|
|
4777
|
-
uploadBandwidth: bigint | null;
|
|
4778
|
-
downloadCount: bigint | null;
|
|
4779
|
-
uploadCount: bigint | null;
|
|
4780
|
-
totalDataCount: bigint | null;
|
|
4781
|
-
totalStorageSize: bigint | null;
|
|
4782
|
-
perDataSize: bigint | null;
|
|
4783
|
-
} & {
|
|
4784
|
-
sentMails: {
|
|
4785
|
-
count: bigint | null;
|
|
4786
|
-
dataCount: bigint | null;
|
|
4787
|
-
dataSize: bigint | null;
|
|
4788
|
-
totalDataCount: bigint | null;
|
|
4789
|
-
totalStorageSize: bigint | null;
|
|
4790
|
-
perDataSize: bigint | null;
|
|
4791
|
-
totalCount: bigint | null;
|
|
4792
|
-
};
|
|
4793
|
-
};
|
|
4794
|
-
} & {
|
|
4795
|
-
price: number;
|
|
4796
|
-
})[];
|
|
4797
|
-
meta: any;
|
|
4798
|
-
}>;
|
|
4799
|
-
}>;
|
|
4800
4813
|
pseudonym: import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
4801
4814
|
askForUser: import("@trpc/server").TRPCQueryProcedure<{
|
|
4802
4815
|
input: {
|
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.73.
|
|
5
|
+
"version": "1.73.7",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/anonymize-org/lib.git"
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@js-temporal/polyfill": "^0.5.1",
|
|
78
|
-
"@secrecy/trpc-api-types": "1.33.0-
|
|
78
|
+
"@secrecy/trpc-api-types": "1.33.0-feat-members-report.1",
|
|
79
79
|
"@trpc/client": "11.5.1",
|
|
80
80
|
"@trpc/server": "^11.5.1",
|
|
81
81
|
"@types/libsodium-wrappers-sumo": "^0.7.8",
|