@blocklet/server-js 1.16.52-beta-20251003-083412-fdfc4e36 → 1.16.52-beta-20251008-091027-c46c73e3

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/lib/node.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,43 @@ 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
+ options: ABTNodeClient.RequestGetOrgsOptionsInput;
1698
+ }
1699
+
1700
+ interface RequestGetOrgsOptionsInput {
1701
+ includeMembers: boolean;
1702
+ includePassports: boolean;
1703
+ }
1704
+
1597
1705
  interface RequestGetPassportIssuancesInput {
1598
1706
  teamDid: string;
1599
1707
  ownerDid: string;
@@ -1687,6 +1795,21 @@ declare namespace ABTNodeClient {
1687
1795
  dist: ABTNodeClient.BlockletDistInput;
1688
1796
  }
1689
1797
 
1798
+ interface RequestInvitableUsersInput {
1799
+ teamDid: string;
1800
+ id: string;
1801
+ query: ABTNodeClient.UserQueryInput;
1802
+ }
1803
+
1804
+ interface RequestInviteMembersToOrgInput {
1805
+ teamDid: string;
1806
+ orgId: string;
1807
+ userDids: string[];
1808
+ role: string;
1809
+ inviteType: string;
1810
+ email: string;
1811
+ }
1812
+
1690
1813
  interface RequestIsDidDomainInput {
1691
1814
  domain: string;
1692
1815
  }
@@ -1760,6 +1883,13 @@ declare namespace ABTNodeClient {
1760
1883
  appSk: string;
1761
1884
  }
1762
1885
 
1886
+ interface RequestMigrateOrgResourceInput {
1887
+ teamDid: string;
1888
+ from: string;
1889
+ to: string;
1890
+ resourceIds: string[];
1891
+ }
1892
+
1763
1893
  interface RequestNodeRoutingInput {
1764
1894
  provider: string;
1765
1895
  snapshotHash: string;
@@ -1965,6 +2095,7 @@ declare namespace ABTNodeClient {
1965
2095
  interface RequestTeamRoleInput {
1966
2096
  teamDid: string;
1967
2097
  role: ABTNodeClient.RoleUpdateInput;
2098
+ orgId: string;
1968
2099
  }
1969
2100
 
1970
2101
  interface RequestTeamUserInput {
@@ -2046,6 +2177,11 @@ declare namespace ABTNodeClient {
2046
2177
  name: string;
2047
2178
  }
2048
2179
 
2180
+ interface RequestUpdateOrgInput {
2181
+ teamDid: string;
2182
+ org: ABTNodeClient.OrgInput;
2183
+ }
2184
+
2049
2185
  interface RequestUpdatePermissionsForRoleInput {
2050
2186
  teamDid: string;
2051
2187
  roleName: string;
@@ -2365,6 +2501,17 @@ declare namespace ABTNodeClient {
2365
2501
  dateRange: number[];
2366
2502
  }
2367
2503
 
2504
+ interface UserOrgInput {
2505
+ id: string;
2506
+ orgId: string;
2507
+ userDid: string;
2508
+ status: ABTNodeClient.OrgUserStatus;
2509
+ createdAt: number;
2510
+ updatedAt: number;
2511
+ user: ABTNodeClient.UserInfoInput;
2512
+ metadata: Record<string, any>;
2513
+ }
2514
+
2368
2515
  interface UserPhoneInfoInput {
2369
2516
  country: string;
2370
2517
  phoneNumber: string;
@@ -2839,6 +2986,7 @@ declare namespace ABTNodeClient {
2839
2986
  gateway: ABTNodeClient.Gateway;
2840
2987
  enableSessionHardening: boolean;
2841
2988
  aigne: ABTNodeClient.AigneConfig;
2989
+ org: ABTNodeClient.OrgSettings;
2842
2990
  }
2843
2991
 
2844
2992
  interface BlockletState {
@@ -2981,6 +3129,7 @@ declare namespace ABTNodeClient {
2981
3129
  dependents: ABTNodeClient.Dependent[];
2982
3130
  required: boolean;
2983
3131
  appRuntimeInfo: ABTNodeClient.RuntimeInfo;
3132
+ greenStatus: ABTNodeClient.BlockletStatus;
2984
3133
  }
2985
3134
 
2986
3135
  interface ConfigEntry {
@@ -3200,6 +3349,14 @@ declare namespace ABTNodeClient {
3200
3349
  teamDid: string;
3201
3350
  interfaceName: string;
3202
3351
  display: ABTNodeClient.PassportDisplay;
3352
+ orgId: string;
3353
+ inviteUserDids: string[];
3354
+ }
3355
+
3356
+ interface InviteResult {
3357
+ successDids: string[];
3358
+ failedDids: string[];
3359
+ inviteLink: string;
3203
3360
  }
3204
3361
 
3205
3362
  interface InviteSettings {
@@ -3393,6 +3550,14 @@ declare namespace ABTNodeClient {
3393
3550
  connectToAigne: ABTNodeClient.ResponseConnectToEndpoint;
3394
3551
  disconnectToAigne: ABTNodeClient.GeneralResponse;
3395
3552
  verifyAigneConnection: ABTNodeClient.GeneralResponse;
3553
+ createOrg: ABTNodeClient.ResponseGetOrg;
3554
+ updateOrg: ABTNodeClient.ResponseGetOrg;
3555
+ deleteOrg: ABTNodeClient.GeneralResponse;
3556
+ addOrgMember: ABTNodeClient.ResponseGetOrg;
3557
+ removeOrgMember: ABTNodeClient.GeneralResponse;
3558
+ inviteMembersToOrg: ABTNodeClient.ResponseInviteMembersToOrg;
3559
+ addOrgResource: ABTNodeClient.ResponseOrgResourceOperation;
3560
+ migrateOrgResource: ABTNodeClient.ResponseOrgResourceOperation;
3396
3561
  }
3397
3562
 
3398
3563
  interface NodeEnvInfo {
@@ -3605,6 +3770,41 @@ declare namespace ABTNodeClient {
3605
3770
  required: boolean;
3606
3771
  }
3607
3772
 
3773
+ interface Org {
3774
+ id: string;
3775
+ name: string;
3776
+ description: string;
3777
+ ownerDid: string;
3778
+ createdAt: number;
3779
+ updatedAt: number;
3780
+ members: ABTNodeClient.UserOrg[];
3781
+ owner: ABTNodeClient.UserInfo;
3782
+ membersCount: number;
3783
+ passports: ABTNodeClient.Passport[];
3784
+ metadata: Record<string, any>;
3785
+ }
3786
+
3787
+ interface OrgResourceResult {
3788
+ success: string[];
3789
+ failed: string[];
3790
+ }
3791
+
3792
+ interface OrgResources {
3793
+ id: string;
3794
+ orgId: string;
3795
+ resourceId: string;
3796
+ type: string;
3797
+ metadata: Record<string, any>;
3798
+ createdAt: number;
3799
+ updatedAt: number;
3800
+ }
3801
+
3802
+ interface OrgSettings {
3803
+ enabled: boolean;
3804
+ maxMemberPerOrg: number;
3805
+ maxOrgPerUser: number;
3806
+ }
3807
+
3608
3808
  interface OwnerNft {
3609
3809
  did: string;
3610
3810
  holder: string;
@@ -3788,6 +3988,11 @@ declare namespace ABTNodeClient {
3788
3988
  createOAuthClient: ABTNodeClient.ResponseOAuthClient;
3789
3989
  updateOAuthClient: ABTNodeClient.ResponseOAuthClient;
3790
3990
  deleteOAuthClient: ABTNodeClient.GeneralResponse;
3991
+ getOrgs: ABTNodeClient.ResponseGetOrgs;
3992
+ getOrg: ABTNodeClient.ResponseGetOrg;
3993
+ getOrgMembers: ABTNodeClient.ResponseOrgUsers;
3994
+ getOrgInvitableUsers: ABTNodeClient.ResponseUsers;
3995
+ getOrgResource: ABTNodeClient.ResponseGetOrgResource;
3791
3996
  }
3792
3997
 
3793
3998
  interface ReadUpdateAffected {
@@ -4116,6 +4321,22 @@ declare namespace ABTNodeClient {
4116
4321
  unreadCount: number;
4117
4322
  }
4118
4323
 
4324
+ interface ResponseGetOrg {
4325
+ code: ABTNodeClient.StatusCode;
4326
+ org: ABTNodeClient.Org;
4327
+ }
4328
+
4329
+ interface ResponseGetOrgResource {
4330
+ code: ABTNodeClient.StatusCode;
4331
+ data: ABTNodeClient.OrgResources[];
4332
+ }
4333
+
4334
+ interface ResponseGetOrgs {
4335
+ code: ABTNodeClient.StatusCode;
4336
+ orgs: ABTNodeClient.Org[];
4337
+ paging: ABTNodeClient.Paging;
4338
+ }
4339
+
4119
4340
  interface ResponseGetPassportCountPerRole {
4120
4341
  code: ABTNodeClient.StatusCode;
4121
4342
  counts: ABTNodeClient.KeyValue[];
@@ -4212,6 +4433,11 @@ declare namespace ABTNodeClient {
4212
4433
  paging: ABTNodeClient.Paging;
4213
4434
  }
4214
4435
 
4436
+ interface ResponseInviteMembersToOrg {
4437
+ code: ABTNodeClient.StatusCode;
4438
+ data: ABTNodeClient.InviteResult;
4439
+ }
4440
+
4215
4441
  interface ResponseIsDidDomain {
4216
4442
  code: ABTNodeClient.StatusCode;
4217
4443
  value: boolean;
@@ -4256,6 +4482,17 @@ declare namespace ABTNodeClient {
4256
4482
  list: ABTNodeClient.OauthClient[];
4257
4483
  }
4258
4484
 
4485
+ interface ResponseOrgResourceOperation {
4486
+ code: ABTNodeClient.StatusCode;
4487
+ data: ABTNodeClient.OrgResourceResult;
4488
+ }
4489
+
4490
+ interface ResponseOrgUsers {
4491
+ code: ABTNodeClient.StatusCode;
4492
+ users: ABTNodeClient.UserOrg[];
4493
+ paging: ABTNodeClient.Paging;
4494
+ }
4495
+
4259
4496
  interface ResponsePassport {
4260
4497
  code: ABTNodeClient.StatusCode;
4261
4498
  passports: ABTNodeClient.Passport[];
@@ -4435,6 +4672,7 @@ declare namespace ABTNodeClient {
4435
4672
  title: string;
4436
4673
  isProtected: boolean;
4437
4674
  extra: Record<string, any>;
4675
+ orgId: string;
4438
4676
  }
4439
4677
 
4440
4678
  interface RoutingProvider {
@@ -4703,6 +4941,17 @@ declare namespace ABTNodeClient {
4703
4941
  dateRange: number[];
4704
4942
  }
4705
4943
 
4944
+ interface UserOrg {
4945
+ id: string;
4946
+ orgId: string;
4947
+ userDid: string;
4948
+ status: ABTNodeClient.OrgUserStatus;
4949
+ createdAt: number;
4950
+ updatedAt: number;
4951
+ user: ABTNodeClient.UserInfo;
4952
+ metadata: Record<string, any>;
4953
+ }
4954
+
4706
4955
  interface UserPhoneInfo {
4707
4956
  country: string;
4708
4957
  phoneNumber: string;
@@ -4934,7 +5183,7 @@ declare namespace ABTNodeClient {
4934
5183
  }
4935
5184
 
4936
5185
  interface GetRolesParams {
4937
- input: ABTNodeClient.TeamInput;
5186
+ input: ABTNodeClient.RequestGetOrgDataInput;
4938
5187
  }
4939
5188
 
4940
5189
  interface GetRoleParams {
@@ -4946,7 +5195,7 @@ declare namespace ABTNodeClient {
4946
5195
  }
4947
5196
 
4948
5197
  interface GetInvitationsParams {
4949
- input: ABTNodeClient.TeamInput;
5198
+ input: ABTNodeClient.RequestGetOrgDataInput;
4950
5199
  }
4951
5200
 
4952
5201
  interface GetUsersParams {
@@ -5145,6 +5394,26 @@ declare namespace ABTNodeClient {
5145
5394
  input: ABTNodeClient.RequestDeleteOAuthClientInput;
5146
5395
  }
5147
5396
 
5397
+ interface GetOrgsParams {
5398
+ input: ABTNodeClient.RequestGetOrgsInput;
5399
+ }
5400
+
5401
+ interface GetOrgParams {
5402
+ input: ABTNodeClient.RequestGetOrgInput;
5403
+ }
5404
+
5405
+ interface GetOrgMembersParams {
5406
+ input: ABTNodeClient.RequestGetOrgDataInput;
5407
+ }
5408
+
5409
+ interface GetOrgInvitableUsersParams {
5410
+ input: ABTNodeClient.RequestInvitableUsersInput;
5411
+ }
5412
+
5413
+ interface GetOrgResourceParams {
5414
+ input: ABTNodeClient.RequestGetOrgResourceInput;
5415
+ }
5416
+
5148
5417
  interface InstallBlockletParams {
5149
5418
  input: ABTNodeClient.RequestVersionedBlockletInput;
5150
5419
  }
@@ -5688,4 +5957,36 @@ declare namespace ABTNodeClient {
5688
5957
  interface VerifyAigneConnectionParams {
5689
5958
  input: ABTNodeClient.RequestVerifyAigneConnectionInput;
5690
5959
  }
5960
+
5961
+ interface CreateOrgParams {
5962
+ input: ABTNodeClient.RequestCreateOrgInput;
5963
+ }
5964
+
5965
+ interface UpdateOrgParams {
5966
+ input: ABTNodeClient.RequestUpdateOrgInput;
5967
+ }
5968
+
5969
+ interface DeleteOrgParams {
5970
+ input: ABTNodeClient.RequestGetOrgInput;
5971
+ }
5972
+
5973
+ interface AddOrgMemberParams {
5974
+ input: ABTNodeClient.RequestGetOrgMemberInput;
5975
+ }
5976
+
5977
+ interface RemoveOrgMemberParams {
5978
+ input: ABTNodeClient.RequestGetOrgMemberInput;
5979
+ }
5980
+
5981
+ interface InviteMembersToOrgParams {
5982
+ input: ABTNodeClient.RequestInviteMembersToOrgInput;
5983
+ }
5984
+
5985
+ interface AddOrgResourceParams {
5986
+ input: ABTNodeClient.RequestAddOrgResourceInput;
5987
+ }
5988
+
5989
+ interface MigrateOrgResourceParams {
5990
+ input: ABTNodeClient.RequestMigrateOrgResourceInput;
5991
+ }
5691
5992
  }