@zilfu/sdk 0.2.22 → 0.2.23

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/index.js CHANGED
@@ -1143,6 +1143,108 @@ var Media = class extends HeyApiClient {
1143
1143
  });
1144
1144
  }
1145
1145
  };
1146
+ var Invitations = class extends HeyApiClient {
1147
+ /**
1148
+ * List pending invitations for an organization
1149
+ */
1150
+ list(options) {
1151
+ return (options.client ?? this.client).get({
1152
+ security: [{ scheme: "bearer", type: "http" }],
1153
+ url: "/organizations/{organization}/invitations",
1154
+ ...options
1155
+ });
1156
+ }
1157
+ /**
1158
+ * Send an invitation
1159
+ */
1160
+ create(options) {
1161
+ return (options.client ?? this.client).post({
1162
+ security: [{ scheme: "bearer", type: "http" }],
1163
+ url: "/organizations/{organization}/invitations",
1164
+ ...options,
1165
+ headers: {
1166
+ "Content-Type": "application/json",
1167
+ ...options.headers
1168
+ }
1169
+ });
1170
+ }
1171
+ /**
1172
+ * Revoke a pending invitation
1173
+ */
1174
+ delete(options) {
1175
+ return (options.client ?? this.client).delete({
1176
+ security: [{ scheme: "bearer", type: "http" }],
1177
+ url: "/organizations/{organization}/invitations/{invitation}",
1178
+ ...options
1179
+ });
1180
+ }
1181
+ /**
1182
+ * Regenerate token + expiry and resend the invitation email
1183
+ */
1184
+ resend(options) {
1185
+ return (options.client ?? this.client).post({
1186
+ security: [{ scheme: "bearer", type: "http" }],
1187
+ url: "/organizations/{organization}/invitations/{invitation}/resend",
1188
+ ...options
1189
+ });
1190
+ }
1191
+ };
1192
+ var Members = class extends HeyApiClient {
1193
+ /**
1194
+ * List members of an organization
1195
+ */
1196
+ list(options) {
1197
+ return (options.client ?? this.client).get({
1198
+ security: [{ scheme: "bearer", type: "http" }],
1199
+ url: "/organizations/{organization}/members",
1200
+ ...options
1201
+ });
1202
+ }
1203
+ /**
1204
+ * The authenticated user leaves the organization
1205
+ */
1206
+ leave(options) {
1207
+ return (options.client ?? this.client).post({
1208
+ security: [{ scheme: "bearer", type: "http" }],
1209
+ url: "/organizations/{organization}/members/leave",
1210
+ ...options
1211
+ });
1212
+ }
1213
+ /**
1214
+ * Remove a member, and with them their access to every space
1215
+ */
1216
+ delete(options) {
1217
+ return (options.client ?? this.client).delete({
1218
+ security: [{ scheme: "bearer", type: "http" }],
1219
+ url: "/organizations/{organization}/members/{user}",
1220
+ ...options
1221
+ });
1222
+ }
1223
+ /**
1224
+ * Update a member's permissions across the organization
1225
+ */
1226
+ update(options) {
1227
+ return (options.client ?? this.client).patch({
1228
+ security: [{ scheme: "bearer", type: "http" }],
1229
+ url: "/organizations/{organization}/members/{user}",
1230
+ ...options,
1231
+ headers: {
1232
+ "Content-Type": "application/json",
1233
+ ...options.headers
1234
+ }
1235
+ });
1236
+ }
1237
+ };
1238
+ var Organizations = class extends HeyApiClient {
1239
+ _invitations;
1240
+ get invitations() {
1241
+ return this._invitations ??= new Invitations({ client: this.client });
1242
+ }
1243
+ _members;
1244
+ get members() {
1245
+ return this._members ??= new Members({ client: this.client });
1246
+ }
1247
+ };
1146
1248
  var Comment = class extends HeyApiClient {
1147
1249
  /**
1148
1250
  * Attach a follow-up comment to an existing post. If the post has already
@@ -1397,98 +1499,6 @@ var Spaces = class extends HeyApiClient {
1397
1499
  });
1398
1500
  }
1399
1501
  };
1400
- var Invitations = class extends HeyApiClient {
1401
- /**
1402
- * List pending invitations for a space
1403
- */
1404
- list(options) {
1405
- return (options.client ?? this.client).get({
1406
- security: [{ scheme: "bearer", type: "http" }],
1407
- url: "/spaces/{space}/invitations",
1408
- ...options
1409
- });
1410
- }
1411
- /**
1412
- * Send an invitation
1413
- */
1414
- create(options) {
1415
- return (options.client ?? this.client).post({
1416
- security: [{ scheme: "bearer", type: "http" }],
1417
- url: "/spaces/{space}/invitations",
1418
- ...options,
1419
- headers: {
1420
- "Content-Type": "application/json",
1421
- ...options.headers
1422
- }
1423
- });
1424
- }
1425
- /**
1426
- * Revoke a pending invitation
1427
- */
1428
- delete(options) {
1429
- return (options.client ?? this.client).delete({
1430
- security: [{ scheme: "bearer", type: "http" }],
1431
- url: "/spaces/{space}/invitations/{invitation}",
1432
- ...options
1433
- });
1434
- }
1435
- /**
1436
- * Regenerate token + expiry and resend the invitation email
1437
- */
1438
- resend(options) {
1439
- return (options.client ?? this.client).post({
1440
- security: [{ scheme: "bearer", type: "http" }],
1441
- url: "/spaces/{space}/invitations/{invitation}/resend",
1442
- ...options
1443
- });
1444
- }
1445
- };
1446
- var Members = class extends HeyApiClient {
1447
- /**
1448
- * List members of a space
1449
- */
1450
- list(options) {
1451
- return (options.client ?? this.client).get({
1452
- security: [{ scheme: "bearer", type: "http" }],
1453
- url: "/spaces/{space}/members",
1454
- ...options
1455
- });
1456
- }
1457
- /**
1458
- * Remove a member from a space
1459
- */
1460
- delete(options) {
1461
- return (options.client ?? this.client).delete({
1462
- security: [{ scheme: "bearer", type: "http" }],
1463
- url: "/spaces/{space}/members/{user}",
1464
- ...options
1465
- });
1466
- }
1467
- /**
1468
- * Update a member's permissions
1469
- */
1470
- update(options) {
1471
- return (options.client ?? this.client).patch({
1472
- security: [{ scheme: "bearer", type: "http" }],
1473
- url: "/spaces/{space}/members/{user}",
1474
- ...options,
1475
- headers: {
1476
- "Content-Type": "application/json",
1477
- ...options.headers
1478
- }
1479
- });
1480
- }
1481
- /**
1482
- * The authenticated user leaves the space
1483
- */
1484
- leave(options) {
1485
- return (options.client ?? this.client).post({
1486
- security: [{ scheme: "bearer", type: "http" }],
1487
- url: "/spaces/{space}/members/leave",
1488
- ...options
1489
- });
1490
- }
1491
- };
1492
1502
  var Subscription = class extends HeyApiClient {
1493
1503
  /**
1494
1504
  * Get subscription details
@@ -1602,6 +1612,10 @@ var ZilfuApi = class _ZilfuApi extends HeyApiClient {
1602
1612
  get media() {
1603
1613
  return this._media ??= new Media({ client: this.client });
1604
1614
  }
1615
+ _organizations;
1616
+ get organizations() {
1617
+ return this._organizations ??= new Organizations({ client: this.client });
1618
+ }
1605
1619
  _posts;
1606
1620
  get posts() {
1607
1621
  return this._posts ??= new Posts({ client: this.client });
@@ -1626,14 +1640,6 @@ var ZilfuApi = class _ZilfuApi extends HeyApiClient {
1626
1640
  get spaces() {
1627
1641
  return this._spaces ??= new Spaces({ client: this.client });
1628
1642
  }
1629
- _invitations;
1630
- get invitations() {
1631
- return this._invitations ??= new Invitations({ client: this.client });
1632
- }
1633
- _members;
1634
- get members() {
1635
- return this._members ??= new Members({ client: this.client });
1636
- }
1637
1643
  _subscription;
1638
1644
  get subscription() {
1639
1645
  return this._subscription ??= new Subscription({ client: this.client });