@secrecy/lib 1.63.0-feat-orgs.2 → 1.63.0-feat-orgs.4

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.
@@ -117,23 +117,33 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
117
117
  _input_in: {};
118
118
  _input_out: {};
119
119
  _output_in: {
120
- users: {
120
+ users: ({
121
121
  id: string;
122
122
  lastname: string;
123
123
  firstname: string;
124
124
  avatar: string | null;
125
125
  isSearchable: boolean;
126
- }[];
126
+ } & {
127
+ orgs: {
128
+ name: string;
129
+ id: string;
130
+ }[];
131
+ })[];
127
132
  currentUserId: string;
128
133
  };
129
134
  _output_out: {
130
- users: {
135
+ users: ({
131
136
  id: string;
132
137
  lastname: string;
133
138
  firstname: string;
134
139
  avatar: string | null;
135
140
  isSearchable: boolean;
136
- }[];
141
+ } & {
142
+ orgs: {
143
+ name: string;
144
+ id: string;
145
+ }[];
146
+ })[];
137
147
  currentUserId: string;
138
148
  };
139
149
  }, unknown>>;
@@ -1515,24 +1525,20 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
1515
1525
  to: string;
1516
1526
  };
1517
1527
  _output_in: {
1518
- users: {
1519
- id: string;
1520
- lastname: string;
1521
- firstname: string;
1522
- avatar: string | null;
1523
- isSearchable: boolean;
1524
- }[];
1525
- loginToken: string;
1528
+ session: string;
1529
+ masterKeySalt: string;
1530
+ context: {
1531
+ userId: string;
1532
+ orgId: string;
1533
+ };
1526
1534
  };
1527
1535
  _output_out: {
1528
- users: {
1529
- id: string;
1530
- lastname: string;
1531
- firstname: string;
1532
- avatar: string | null;
1533
- isSearchable: boolean;
1534
- }[];
1535
- loginToken: string;
1536
+ session: string;
1537
+ masterKeySalt: string;
1538
+ context: {
1539
+ userId: string;
1540
+ orgId: string;
1541
+ };
1536
1542
  };
1537
1543
  }, unknown>>;
1538
1544
  };
@@ -1798,48 +1804,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
1798
1804
  };
1799
1805
  }, unknown>>;
1800
1806
  };
1801
- loginUser: {
1802
- mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
1803
- _config: import("@trpc/server").RootConfig<{
1804
- ctx: {};
1805
- meta: object;
1806
- errorShape: {
1807
- message: string;
1808
- code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
1809
- data: _trpc_server_dist_error_formatter.DefaultErrorData;
1810
- } | {
1811
- data: {
1812
- zodError: import("zod").typeToFlattenedError<any, string> | null;
1813
- code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
1814
- httpStatus: number;
1815
- path?: string;
1816
- stack?: string;
1817
- };
1818
- message: string;
1819
- code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
1820
- };
1821
- transformer: typeof superjson;
1822
- }>;
1823
- _meta: object;
1824
- _ctx_out: {};
1825
- _input_in: {
1826
- userId: string;
1827
- loginToken: string;
1828
- };
1829
- _input_out: {
1830
- userId: string;
1831
- loginToken: string;
1832
- };
1833
- _output_in: {
1834
- session: string;
1835
- masterKeySalt: string;
1836
- };
1837
- _output_out: {
1838
- session: string;
1839
- masterKeySalt: string;
1840
- };
1841
- }, unknown>>;
1842
- };
1843
1807
  signup: {
1844
1808
  mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
1845
1809
  _config: import("@trpc/server").RootConfig<{
@@ -1924,7 +1888,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
1924
1888
  _output_out: {};
1925
1889
  }, {}>>;
1926
1890
  };
1927
- changeUser: {
1891
+ changeContext: {
1928
1892
  mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
1929
1893
  _config: import("@trpc/server").RootConfig<{
1930
1894
  ctx: {};
@@ -1959,16 +1923,26 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
1959
1923
  ls: TranslationFunctions;
1960
1924
  };
1961
1925
  _input_in: {
1962
- userId: string;
1926
+ userId?: string | undefined;
1927
+ orgId?: string | undefined;
1963
1928
  };
1964
1929
  _input_out: {
1965
- userId: string;
1930
+ userId?: string | undefined;
1931
+ orgId?: string | undefined;
1966
1932
  };
1967
1933
  _output_in: {
1968
1934
  sessionId: string;
1935
+ context: {
1936
+ userId: string;
1937
+ orgId: string;
1938
+ };
1969
1939
  };
1970
1940
  _output_out: {
1971
1941
  sessionId: string;
1942
+ context: {
1943
+ userId: string;
1944
+ orgId: string;
1945
+ };
1972
1946
  };
1973
1947
  }, unknown>>;
1974
1948
  };
@@ -12599,10 +12573,10 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
12599
12573
  _meta: object;
12600
12574
  _ctx_out: {};
12601
12575
  _input_in: {
12602
- prorate: boolean;
12576
+ waitUntilPeriodEnd: boolean;
12603
12577
  };
12604
12578
  _input_out: {
12605
- prorate: boolean;
12579
+ waitUntilPeriodEnd: boolean;
12606
12580
  };
12607
12581
  _output_in: {
12608
12582
  isCancelled: boolean;
@@ -12737,30 +12711,16 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
12737
12711
  description: string | null;
12738
12712
  status: "canceled" | "past_due" | "active" | "incomplete" | "incomplete_expired" | "paused" | "trialing" | "unpaid";
12739
12713
  metadata: Record<string, string>;
12740
- startDate: number;
12741
- canceledAt: number | null;
12742
- created: number;
12743
12714
  billingCycleAnchor: number;
12744
12715
  cancelAt: number | null;
12745
12716
  cancelAtPeriodEnd: boolean;
12717
+ canceledAt: number | null;
12718
+ created: number;
12746
12719
  daysUntilDue: number | null;
12720
+ startDate: number;
12747
12721
  endedAt: number | null;
12748
12722
  trialEnd: number | null;
12749
12723
  trialStart: number | null;
12750
- schedule: {
12751
- id: string;
12752
- status: "canceled" | "active" | "completed" | "not_started" | "released";
12753
- canceledAt: number | null;
12754
- completedAt: number | null;
12755
- created: number;
12756
- currentPhase: {
12757
- endDate: number;
12758
- startDate: number;
12759
- } | null;
12760
- endBehavior: "cancel" | "none" | "release" | "renew";
12761
- releasedAt: number | null;
12762
- releasedSubscription: string | null;
12763
- };
12764
12724
  } | null;
12765
12725
  };
12766
12726
  _output_out: {
@@ -12770,30 +12730,16 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
12770
12730
  description: string | null;
12771
12731
  status: "canceled" | "past_due" | "active" | "incomplete" | "incomplete_expired" | "paused" | "trialing" | "unpaid";
12772
12732
  metadata: Record<string, string>;
12773
- startDate: number;
12774
- canceledAt: number | null;
12775
- created: number;
12776
12733
  billingCycleAnchor: number;
12777
12734
  cancelAt: number | null;
12778
12735
  cancelAtPeriodEnd: boolean;
12736
+ canceledAt: number | null;
12737
+ created: number;
12779
12738
  daysUntilDue: number | null;
12739
+ startDate: number;
12780
12740
  endedAt: number | null;
12781
12741
  trialEnd: number | null;
12782
12742
  trialStart: number | null;
12783
- schedule: {
12784
- id: string;
12785
- status: "canceled" | "active" | "completed" | "not_started" | "released";
12786
- canceledAt: number | null;
12787
- completedAt: number | null;
12788
- created: number;
12789
- currentPhase: {
12790
- endDate: number;
12791
- startDate: number;
12792
- } | null;
12793
- endBehavior: "cancel" | "none" | "release" | "renew";
12794
- releasedAt: number | null;
12795
- releasedSubscription: string | null;
12796
- };
12797
12743
  } | null;
12798
12744
  };
12799
12745
  }, unknown>>;
@@ -16179,83 +16125,6 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => {
16179
16125
  };
16180
16126
  }, unknown>>;
16181
16127
  };
16182
- switchPlan: {
16183
- mutate: import("@trpc/client").Resolver<import("@trpc/server").BuildProcedure<"mutation", {
16184
- _config: import("@trpc/server").RootConfig<{
16185
- ctx: {};
16186
- meta: object;
16187
- errorShape: {
16188
- message: string;
16189
- code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
16190
- data: _trpc_server_dist_error_formatter.DefaultErrorData;
16191
- } | {
16192
- data: {
16193
- zodError: import("zod").typeToFlattenedError<any, string> | null;
16194
- code: import("@trpc/server/rpc").TRPC_ERROR_CODE_KEY;
16195
- httpStatus: number;
16196
- path?: string;
16197
- stack?: string;
16198
- };
16199
- message: string;
16200
- code: import("@trpc/server/rpc").TRPC_ERROR_CODE_NUMBER;
16201
- };
16202
- transformer: typeof superjson;
16203
- }>;
16204
- _meta: object;
16205
- _ctx_out: {
16206
- session: {
16207
- app: {
16208
- id: string;
16209
- planId: string;
16210
- fakeUserId: string | undefined;
16211
- settings: {
16212
- id: string;
16213
- devsLimit: bigint | null;
16214
- usersLimit: bigint | null;
16215
- perDataSizeLimit: bigint | null;
16216
- bandwidthLimit: bigint | null;
16217
- totalStorageSizeLimit: bigint | null;
16218
- payForUsers: boolean;
16219
- };
16220
- };
16221
- sessionId: string;
16222
- accountId: string;
16223
- accountInfosId: string;
16224
- accountRole: _prisma_client.AccountRole;
16225
- userId: string;
16226
- userRole: _prisma_client.UserRole;
16227
- org: {
16228
- id: string;
16229
- name: string;
16230
- plan: _prisma_client.OrganizationPlanKind;
16231
- role: _prisma_client.OrganizationRole;
16232
- };
16233
- };
16234
- req: {
16235
- headers: Headers;
16236
- };
16237
- res: {
16238
- headers: Headers;
16239
- };
16240
- locale: Locales;
16241
- ls: TranslationFunctions;
16242
- };
16243
- _input_in: {
16244
- appId: string;
16245
- planName: string;
16246
- };
16247
- _input_out: {
16248
- appId: string;
16249
- planName: string;
16250
- };
16251
- _output_in: {
16252
- url: string | null;
16253
- };
16254
- _output_out: {
16255
- url: string | null;
16256
- };
16257
- }, unknown>>;
16258
- };
16259
16128
  };
16260
16129
  user: {
16261
16130
  byId: {
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.2",
5
+ "version": "1.63.0-feat-orgs.4",
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.6",
77
+ "@secrecy/trpc-api-types": "1.33.0-feat-orgs.13",
78
78
  "@trpc/client": "10.45.2",
79
79
  "@trpc/server": "10.45.2",
80
80
  "@types/libsodium-wrappers-sumo": "^0.7.8",