@blocklet/server-js 1.16.52-beta-20251002-030549-0f91dab2 → 1.16.52-beta-20251005-235515-42ad5caf

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/browser.d.ts CHANGED
@@ -229,6 +229,15 @@ declare class ABTNodeClient {
229
229
  params: PartialDeep<ABTNodeClient.UpdateOAuthClientParams>
230
230
  ): Promise<ABTNodeClient.ResponseOAuthClient>;
231
231
  deleteOAuthClient(params: PartialDeep<ABTNodeClient.DeleteOAuthClientParams>): Promise<ABTNodeClient.GeneralResponse>;
232
+ getOrgs(params: PartialDeep<ABTNodeClient.GetOrgsParams>): Promise<ABTNodeClient.ResponseGetOrgs>;
233
+ getOrg(params: PartialDeep<ABTNodeClient.GetOrgParams>): Promise<ABTNodeClient.ResponseGetOrg>;
234
+ getOrgMembers(params: PartialDeep<ABTNodeClient.GetOrgMembersParams>): Promise<ABTNodeClient.ResponseOrgUsers>;
235
+ getOrgInvitableUsers(
236
+ params: PartialDeep<ABTNodeClient.GetOrgInvitableUsersParams>
237
+ ): Promise<ABTNodeClient.ResponseUsers>;
238
+ getOrgResource(
239
+ params: PartialDeep<ABTNodeClient.GetOrgResourceParams>
240
+ ): Promise<ABTNodeClient.ResponseGetOrgResource>;
232
241
  installBlocklet(params: PartialDeep<ABTNodeClient.InstallBlockletParams>): Promise<ABTNodeClient.ResponseBlocklet>;
233
242
  installComponent(params: PartialDeep<ABTNodeClient.InstallComponentParams>): Promise<ABTNodeClient.ResponseBlocklet>;
234
243
  startBlocklet(params: PartialDeep<ABTNodeClient.StartBlockletParams>): Promise<ABTNodeClient.ResponseBlocklet>;
@@ -525,6 +534,20 @@ declare class ABTNodeClient {
525
534
  verifyAigneConnection(
526
535
  params: PartialDeep<ABTNodeClient.VerifyAigneConnectionParams>
527
536
  ): Promise<ABTNodeClient.GeneralResponse>;
537
+ createOrg(params: PartialDeep<ABTNodeClient.CreateOrgParams>): Promise<ABTNodeClient.ResponseGetOrg>;
538
+ updateOrg(params: PartialDeep<ABTNodeClient.UpdateOrgParams>): Promise<ABTNodeClient.ResponseGetOrg>;
539
+ deleteOrg(params: PartialDeep<ABTNodeClient.DeleteOrgParams>): Promise<ABTNodeClient.GeneralResponse>;
540
+ addOrgMember(params: PartialDeep<ABTNodeClient.AddOrgMemberParams>): Promise<ABTNodeClient.ResponseGetOrg>;
541
+ removeOrgMember(params: PartialDeep<ABTNodeClient.RemoveOrgMemberParams>): Promise<ABTNodeClient.GeneralResponse>;
542
+ inviteMembersToOrg(
543
+ params: PartialDeep<ABTNodeClient.InviteMembersToOrgParams>
544
+ ): Promise<ABTNodeClient.ResponseInviteMembersToOrg>;
545
+ addOrgResource(
546
+ params: PartialDeep<ABTNodeClient.AddOrgResourceParams>
547
+ ): Promise<ABTNodeClient.ResponseOrgResourceOperation>;
548
+ migrateOrgResource(
549
+ params: PartialDeep<ABTNodeClient.MigrateOrgResourceParams>
550
+ ): Promise<ABTNodeClient.ResponseOrgResourceOperation>;
528
551
  }
529
552
 
530
553
  declare namespace ABTNodeClient {
@@ -642,6 +665,17 @@ declare namespace ABTNodeClient {
642
665
  passthrough,
643
666
  }
644
667
 
668
+ enum OrgQueryType {
669
+ owned,
670
+ joined,
671
+ }
672
+
673
+ enum OrgUserStatus {
674
+ active,
675
+ inviting,
676
+ inactive,
677
+ }
678
+
645
679
  enum PublishType {
646
680
  resource,
647
681
  pack,
@@ -957,6 +991,26 @@ declare namespace ABTNodeClient {
957
991
  createUser: ABTNodeClient.UserInfoInput;
958
992
  }
959
993
 
994
+ interface OrgInput {
995
+ id: string;
996
+ name: string;
997
+ description: string;
998
+ ownerDid: string;
999
+ createdAt: number;
1000
+ updatedAt: number;
1001
+ members: ABTNodeClient.UserOrgInput[];
1002
+ owner: ABTNodeClient.UserInfoInput;
1003
+ membersCount: number;
1004
+ passports: ABTNodeClient.PassportInput[];
1005
+ metadata: Record<string, any>;
1006
+ }
1007
+
1008
+ interface OrgSettingsInput {
1009
+ enabled: boolean;
1010
+ maxMemberPerOrg: number;
1011
+ maxOrgPerUser: number;
1012
+ }
1013
+
960
1014
  interface PagingInput {
961
1015
  total: number;
962
1016
  pageSize: number;
@@ -1090,6 +1144,14 @@ declare namespace ABTNodeClient {
1090
1144
  certificate: string;
1091
1145
  }
1092
1146
 
1147
+ interface RequestAddOrgResourceInput {
1148
+ teamDid: string;
1149
+ orgId: string;
1150
+ resourceIds: string[];
1151
+ type: string;
1152
+ metadata: Record<string, any>;
1153
+ }
1154
+
1093
1155
  interface RequestAddRoutingRuleInput {
1094
1156
  id: string;
1095
1157
  rule: ABTNodeClient.RoutingRuleInput;
@@ -1171,6 +1233,7 @@ declare namespace ABTNodeClient {
1171
1233
  invite: ABTNodeClient.InviteSettingsInput;
1172
1234
  gateway: ABTNodeClient.BlockletGatewayInput;
1173
1235
  aigne: ABTNodeClient.AigneConfigInput;
1236
+ org: ABTNodeClient.OrgSettingsInput;
1174
1237
  }
1175
1238
 
1176
1239
  interface RequestCheckDomainsInput {
@@ -1294,6 +1357,13 @@ declare namespace ABTNodeClient {
1294
1357
  passportExpireTime: string;
1295
1358
  }
1296
1359
 
1360
+ interface RequestCreateOrgInput {
1361
+ teamDid: string;
1362
+ name: string;
1363
+ description: string;
1364
+ ownerDid: string;
1365
+ }
1366
+
1297
1367
  interface RequestCreatePassportIssuanceInput {
1298
1368
  teamDid: string;
1299
1369
  ownerDid: string;
@@ -1350,6 +1420,7 @@ declare namespace ABTNodeClient {
1350
1420
  childName: string;
1351
1421
  permissions: string[];
1352
1422
  extra: string;
1423
+ orgId: string;
1353
1424
  }
1354
1425
 
1355
1426
  interface RequestCreateTransferNodeInvitationInput {
@@ -1594,6 +1665,37 @@ declare namespace ABTNodeClient {
1594
1665
  source: string[];
1595
1666
  }
1596
1667
 
1668
+ interface RequestGetOrgDataInput {
1669
+ teamDid: string;
1670
+ orgId: string;
1671
+ paging: ABTNodeClient.PagingInput;
1672
+ }
1673
+
1674
+ interface RequestGetOrgInput {
1675
+ teamDid: string;
1676
+ id: string;
1677
+ }
1678
+
1679
+ interface RequestGetOrgMemberInput {
1680
+ teamDid: string;
1681
+ orgId: string;
1682
+ userDid: string;
1683
+ }
1684
+
1685
+ interface RequestGetOrgResourceInput {
1686
+ teamDid: string;
1687
+ orgId: string;
1688
+ resourceId: string;
1689
+ }
1690
+
1691
+ interface RequestGetOrgsInput {
1692
+ teamDid: string;
1693
+ org: ABTNodeClient.OrgInput;
1694
+ paging: ABTNodeClient.PagingInput;
1695
+ type: ABTNodeClient.OrgQueryType;
1696
+ userDid: string;
1697
+ }
1698
+
1597
1699
  interface RequestGetPassportIssuancesInput {
1598
1700
  teamDid: string;
1599
1701
  ownerDid: string;
@@ -1687,6 +1789,21 @@ declare namespace ABTNodeClient {
1687
1789
  dist: ABTNodeClient.BlockletDistInput;
1688
1790
  }
1689
1791
 
1792
+ interface RequestInvitableUsersInput {
1793
+ teamDid: string;
1794
+ id: string;
1795
+ query: ABTNodeClient.UserQueryInput;
1796
+ }
1797
+
1798
+ interface RequestInviteMembersToOrgInput {
1799
+ teamDid: string;
1800
+ orgId: string;
1801
+ userDids: string[];
1802
+ role: string;
1803
+ inviteType: string;
1804
+ email: string;
1805
+ }
1806
+
1690
1807
  interface RequestIsDidDomainInput {
1691
1808
  domain: string;
1692
1809
  }
@@ -1760,6 +1877,13 @@ declare namespace ABTNodeClient {
1760
1877
  appSk: string;
1761
1878
  }
1762
1879
 
1880
+ interface RequestMigrateOrgResourceInput {
1881
+ teamDid: string;
1882
+ from: string;
1883
+ to: string;
1884
+ resourceIds: string[];
1885
+ }
1886
+
1763
1887
  interface RequestNodeRoutingInput {
1764
1888
  provider: string;
1765
1889
  snapshotHash: string;
@@ -1965,6 +2089,7 @@ declare namespace ABTNodeClient {
1965
2089
  interface RequestTeamRoleInput {
1966
2090
  teamDid: string;
1967
2091
  role: ABTNodeClient.RoleUpdateInput;
2092
+ orgId: string;
1968
2093
  }
1969
2094
 
1970
2095
  interface RequestTeamUserInput {
@@ -2046,6 +2171,11 @@ declare namespace ABTNodeClient {
2046
2171
  name: string;
2047
2172
  }
2048
2173
 
2174
+ interface RequestUpdateOrgInput {
2175
+ teamDid: string;
2176
+ org: ABTNodeClient.OrgInput;
2177
+ }
2178
+
2049
2179
  interface RequestUpdatePermissionsForRoleInput {
2050
2180
  teamDid: string;
2051
2181
  roleName: string;
@@ -2365,6 +2495,17 @@ declare namespace ABTNodeClient {
2365
2495
  dateRange: number[];
2366
2496
  }
2367
2497
 
2498
+ interface UserOrgInput {
2499
+ id: string;
2500
+ orgId: string;
2501
+ userDid: string;
2502
+ status: ABTNodeClient.OrgUserStatus;
2503
+ createdAt: number;
2504
+ updatedAt: number;
2505
+ user: ABTNodeClient.UserInfoInput;
2506
+ metadata: Record<string, any>;
2507
+ }
2508
+
2368
2509
  interface UserPhoneInfoInput {
2369
2510
  country: string;
2370
2511
  phoneNumber: string;
@@ -2839,6 +2980,7 @@ declare namespace ABTNodeClient {
2839
2980
  gateway: ABTNodeClient.Gateway;
2840
2981
  enableSessionHardening: boolean;
2841
2982
  aigne: ABTNodeClient.AigneConfig;
2983
+ org: ABTNodeClient.OrgSettings;
2842
2984
  }
2843
2985
 
2844
2986
  interface BlockletState {
@@ -2981,6 +3123,7 @@ declare namespace ABTNodeClient {
2981
3123
  dependents: ABTNodeClient.Dependent[];
2982
3124
  required: boolean;
2983
3125
  appRuntimeInfo: ABTNodeClient.RuntimeInfo;
3126
+ greenStatus: ABTNodeClient.BlockletStatus;
2984
3127
  }
2985
3128
 
2986
3129
  interface ConfigEntry {
@@ -3200,6 +3343,14 @@ declare namespace ABTNodeClient {
3200
3343
  teamDid: string;
3201
3344
  interfaceName: string;
3202
3345
  display: ABTNodeClient.PassportDisplay;
3346
+ orgId: string;
3347
+ inviteUserDids: string[];
3348
+ }
3349
+
3350
+ interface InviteResult {
3351
+ successDids: string[];
3352
+ failedDids: string[];
3353
+ inviteLink: string;
3203
3354
  }
3204
3355
 
3205
3356
  interface InviteSettings {
@@ -3393,6 +3544,14 @@ declare namespace ABTNodeClient {
3393
3544
  connectToAigne: ABTNodeClient.ResponseConnectToEndpoint;
3394
3545
  disconnectToAigne: ABTNodeClient.GeneralResponse;
3395
3546
  verifyAigneConnection: ABTNodeClient.GeneralResponse;
3547
+ createOrg: ABTNodeClient.ResponseGetOrg;
3548
+ updateOrg: ABTNodeClient.ResponseGetOrg;
3549
+ deleteOrg: ABTNodeClient.GeneralResponse;
3550
+ addOrgMember: ABTNodeClient.ResponseGetOrg;
3551
+ removeOrgMember: ABTNodeClient.GeneralResponse;
3552
+ inviteMembersToOrg: ABTNodeClient.ResponseInviteMembersToOrg;
3553
+ addOrgResource: ABTNodeClient.ResponseOrgResourceOperation;
3554
+ migrateOrgResource: ABTNodeClient.ResponseOrgResourceOperation;
3396
3555
  }
3397
3556
 
3398
3557
  interface NodeEnvInfo {
@@ -3605,6 +3764,41 @@ declare namespace ABTNodeClient {
3605
3764
  required: boolean;
3606
3765
  }
3607
3766
 
3767
+ interface Org {
3768
+ id: string;
3769
+ name: string;
3770
+ description: string;
3771
+ ownerDid: string;
3772
+ createdAt: number;
3773
+ updatedAt: number;
3774
+ members: ABTNodeClient.UserOrg[];
3775
+ owner: ABTNodeClient.UserInfo;
3776
+ membersCount: number;
3777
+ passports: ABTNodeClient.Passport[];
3778
+ metadata: Record<string, any>;
3779
+ }
3780
+
3781
+ interface OrgResourceResult {
3782
+ success: string[];
3783
+ failed: string[];
3784
+ }
3785
+
3786
+ interface OrgResources {
3787
+ id: string;
3788
+ orgId: string;
3789
+ resourceId: string;
3790
+ type: string;
3791
+ metadata: Record<string, any>;
3792
+ createdAt: number;
3793
+ updatedAt: number;
3794
+ }
3795
+
3796
+ interface OrgSettings {
3797
+ enabled: boolean;
3798
+ maxMemberPerOrg: number;
3799
+ maxOrgPerUser: number;
3800
+ }
3801
+
3608
3802
  interface OwnerNft {
3609
3803
  did: string;
3610
3804
  holder: string;
@@ -3788,6 +3982,11 @@ declare namespace ABTNodeClient {
3788
3982
  createOAuthClient: ABTNodeClient.ResponseOAuthClient;
3789
3983
  updateOAuthClient: ABTNodeClient.ResponseOAuthClient;
3790
3984
  deleteOAuthClient: ABTNodeClient.GeneralResponse;
3985
+ getOrgs: ABTNodeClient.ResponseGetOrgs;
3986
+ getOrg: ABTNodeClient.ResponseGetOrg;
3987
+ getOrgMembers: ABTNodeClient.ResponseOrgUsers;
3988
+ getOrgInvitableUsers: ABTNodeClient.ResponseUsers;
3989
+ getOrgResource: ABTNodeClient.ResponseGetOrgResource;
3791
3990
  }
3792
3991
 
3793
3992
  interface ReadUpdateAffected {
@@ -4116,6 +4315,22 @@ declare namespace ABTNodeClient {
4116
4315
  unreadCount: number;
4117
4316
  }
4118
4317
 
4318
+ interface ResponseGetOrg {
4319
+ code: ABTNodeClient.StatusCode;
4320
+ org: ABTNodeClient.Org;
4321
+ }
4322
+
4323
+ interface ResponseGetOrgResource {
4324
+ code: ABTNodeClient.StatusCode;
4325
+ data: ABTNodeClient.OrgResources[];
4326
+ }
4327
+
4328
+ interface ResponseGetOrgs {
4329
+ code: ABTNodeClient.StatusCode;
4330
+ orgs: ABTNodeClient.Org[];
4331
+ paging: ABTNodeClient.Paging;
4332
+ }
4333
+
4119
4334
  interface ResponseGetPassportCountPerRole {
4120
4335
  code: ABTNodeClient.StatusCode;
4121
4336
  counts: ABTNodeClient.KeyValue[];
@@ -4212,6 +4427,11 @@ declare namespace ABTNodeClient {
4212
4427
  paging: ABTNodeClient.Paging;
4213
4428
  }
4214
4429
 
4430
+ interface ResponseInviteMembersToOrg {
4431
+ code: ABTNodeClient.StatusCode;
4432
+ data: ABTNodeClient.InviteResult;
4433
+ }
4434
+
4215
4435
  interface ResponseIsDidDomain {
4216
4436
  code: ABTNodeClient.StatusCode;
4217
4437
  value: boolean;
@@ -4256,6 +4476,17 @@ declare namespace ABTNodeClient {
4256
4476
  list: ABTNodeClient.OauthClient[];
4257
4477
  }
4258
4478
 
4479
+ interface ResponseOrgResourceOperation {
4480
+ code: ABTNodeClient.StatusCode;
4481
+ data: ABTNodeClient.OrgResourceResult;
4482
+ }
4483
+
4484
+ interface ResponseOrgUsers {
4485
+ code: ABTNodeClient.StatusCode;
4486
+ users: ABTNodeClient.UserOrg[];
4487
+ paging: ABTNodeClient.Paging;
4488
+ }
4489
+
4259
4490
  interface ResponsePassport {
4260
4491
  code: ABTNodeClient.StatusCode;
4261
4492
  passports: ABTNodeClient.Passport[];
@@ -4435,6 +4666,7 @@ declare namespace ABTNodeClient {
4435
4666
  title: string;
4436
4667
  isProtected: boolean;
4437
4668
  extra: Record<string, any>;
4669
+ orgId: string;
4438
4670
  }
4439
4671
 
4440
4672
  interface RoutingProvider {
@@ -4703,6 +4935,17 @@ declare namespace ABTNodeClient {
4703
4935
  dateRange: number[];
4704
4936
  }
4705
4937
 
4938
+ interface UserOrg {
4939
+ id: string;
4940
+ orgId: string;
4941
+ userDid: string;
4942
+ status: ABTNodeClient.OrgUserStatus;
4943
+ createdAt: number;
4944
+ updatedAt: number;
4945
+ user: ABTNodeClient.UserInfo;
4946
+ metadata: Record<string, any>;
4947
+ }
4948
+
4706
4949
  interface UserPhoneInfo {
4707
4950
  country: string;
4708
4951
  phoneNumber: string;
@@ -4934,7 +5177,7 @@ declare namespace ABTNodeClient {
4934
5177
  }
4935
5178
 
4936
5179
  interface GetRolesParams {
4937
- input: ABTNodeClient.TeamInput;
5180
+ input: ABTNodeClient.RequestGetOrgDataInput;
4938
5181
  }
4939
5182
 
4940
5183
  interface GetRoleParams {
@@ -4946,7 +5189,7 @@ declare namespace ABTNodeClient {
4946
5189
  }
4947
5190
 
4948
5191
  interface GetInvitationsParams {
4949
- input: ABTNodeClient.TeamInput;
5192
+ input: ABTNodeClient.RequestGetOrgDataInput;
4950
5193
  }
4951
5194
 
4952
5195
  interface GetUsersParams {
@@ -5145,6 +5388,26 @@ declare namespace ABTNodeClient {
5145
5388
  input: ABTNodeClient.RequestDeleteOAuthClientInput;
5146
5389
  }
5147
5390
 
5391
+ interface GetOrgsParams {
5392
+ input: ABTNodeClient.RequestGetOrgsInput;
5393
+ }
5394
+
5395
+ interface GetOrgParams {
5396
+ input: ABTNodeClient.RequestGetOrgInput;
5397
+ }
5398
+
5399
+ interface GetOrgMembersParams {
5400
+ input: ABTNodeClient.RequestGetOrgDataInput;
5401
+ }
5402
+
5403
+ interface GetOrgInvitableUsersParams {
5404
+ input: ABTNodeClient.RequestInvitableUsersInput;
5405
+ }
5406
+
5407
+ interface GetOrgResourceParams {
5408
+ input: ABTNodeClient.RequestGetOrgResourceInput;
5409
+ }
5410
+
5148
5411
  interface InstallBlockletParams {
5149
5412
  input: ABTNodeClient.RequestVersionedBlockletInput;
5150
5413
  }
@@ -5688,4 +5951,36 @@ declare namespace ABTNodeClient {
5688
5951
  interface VerifyAigneConnectionParams {
5689
5952
  input: ABTNodeClient.RequestVerifyAigneConnectionInput;
5690
5953
  }
5954
+
5955
+ interface CreateOrgParams {
5956
+ input: ABTNodeClient.RequestCreateOrgInput;
5957
+ }
5958
+
5959
+ interface UpdateOrgParams {
5960
+ input: ABTNodeClient.RequestUpdateOrgInput;
5961
+ }
5962
+
5963
+ interface DeleteOrgParams {
5964
+ input: ABTNodeClient.RequestGetOrgInput;
5965
+ }
5966
+
5967
+ interface AddOrgMemberParams {
5968
+ input: ABTNodeClient.RequestGetOrgMemberInput;
5969
+ }
5970
+
5971
+ interface RemoveOrgMemberParams {
5972
+ input: ABTNodeClient.RequestGetOrgMemberInput;
5973
+ }
5974
+
5975
+ interface InviteMembersToOrgParams {
5976
+ input: ABTNodeClient.RequestInviteMembersToOrgInput;
5977
+ }
5978
+
5979
+ interface AddOrgResourceParams {
5980
+ input: ABTNodeClient.RequestAddOrgResourceInput;
5981
+ }
5982
+
5983
+ interface MigrateOrgResourceParams {
5984
+ input: ABTNodeClient.RequestMigrateOrgResourceInput;
5985
+ }
5691
5986
  }