@zilfu/sdk 0.1.6 → 0.2.1
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.cjs +104 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +530 -73
- package/dist/index.d.ts +530 -73
- package/dist/index.js +104 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
package/dist/index.cjs
CHANGED
|
@@ -808,7 +808,7 @@ var createClient = (config = {}) => {
|
|
|
808
808
|
};
|
|
809
809
|
|
|
810
810
|
// src/generated/client.gen.ts
|
|
811
|
-
var client = createClient(createConfig({ baseUrl: "
|
|
811
|
+
var client = createClient(createConfig({ baseUrl: "http://localhost/api" }));
|
|
812
812
|
|
|
813
813
|
// src/generated/sdk.gen.ts
|
|
814
814
|
var HeyApiClient = class {
|
|
@@ -842,18 +842,6 @@ var Accounts = class extends HeyApiClient {
|
|
|
842
842
|
...options
|
|
843
843
|
});
|
|
844
844
|
}
|
|
845
|
-
/**
|
|
846
|
-
* Activate an account
|
|
847
|
-
*
|
|
848
|
-
* Deactivates other accounts on the same platform within the space.
|
|
849
|
-
*/
|
|
850
|
-
activate(options) {
|
|
851
|
-
return (options.client ?? this.client).patch({
|
|
852
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
853
|
-
url: "/spaces/{space}/accounts/{account}/activate",
|
|
854
|
-
...options
|
|
855
|
-
});
|
|
856
|
-
}
|
|
857
845
|
/**
|
|
858
846
|
* List Pinterest boards
|
|
859
847
|
*/
|
|
@@ -866,8 +854,6 @@ var Accounts = class extends HeyApiClient {
|
|
|
866
854
|
}
|
|
867
855
|
/**
|
|
868
856
|
* Disconnect an account
|
|
869
|
-
*
|
|
870
|
-
* Removes every account on the same platform within the space and fires an AccountDisconnected webhook for each.
|
|
871
857
|
*/
|
|
872
858
|
delete(options) {
|
|
873
859
|
return (options.client ?? this.client).delete({
|
|
@@ -983,7 +969,7 @@ var Bio = class extends HeyApiClient {
|
|
|
983
969
|
/**
|
|
984
970
|
* Create the bio page
|
|
985
971
|
*
|
|
986
|
-
* Seeds a social icons block from the space's
|
|
972
|
+
* Seeds a social icons block from the space's connected accounts.
|
|
987
973
|
*/
|
|
988
974
|
create(options) {
|
|
989
975
|
return (options.client ?? this.client).post({
|
|
@@ -1206,7 +1192,7 @@ var Slots = class extends HeyApiClient {
|
|
|
1206
1192
|
};
|
|
1207
1193
|
var Spaces = class extends HeyApiClient {
|
|
1208
1194
|
/**
|
|
1209
|
-
* List spaces
|
|
1195
|
+
* List spaces accessible to the authenticated user (owned and member-of)
|
|
1210
1196
|
*/
|
|
1211
1197
|
list(options) {
|
|
1212
1198
|
return (options?.client ?? this.client).get({
|
|
@@ -1266,11 +1252,103 @@ var Spaces = class extends HeyApiClient {
|
|
|
1266
1252
|
});
|
|
1267
1253
|
}
|
|
1268
1254
|
};
|
|
1255
|
+
var Invitations = class extends HeyApiClient {
|
|
1256
|
+
/**
|
|
1257
|
+
* List pending invitations for a space
|
|
1258
|
+
*/
|
|
1259
|
+
list(options) {
|
|
1260
|
+
return (options.client ?? this.client).get({
|
|
1261
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1262
|
+
url: "/spaces/{space}/invitations",
|
|
1263
|
+
...options
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* Send an invitation
|
|
1268
|
+
*/
|
|
1269
|
+
create(options) {
|
|
1270
|
+
return (options.client ?? this.client).post({
|
|
1271
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1272
|
+
url: "/spaces/{space}/invitations",
|
|
1273
|
+
...options,
|
|
1274
|
+
headers: {
|
|
1275
|
+
"Content-Type": "application/json",
|
|
1276
|
+
...options.headers
|
|
1277
|
+
}
|
|
1278
|
+
});
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
* Revoke a pending invitation
|
|
1282
|
+
*/
|
|
1283
|
+
delete(options) {
|
|
1284
|
+
return (options.client ?? this.client).delete({
|
|
1285
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1286
|
+
url: "/spaces/{space}/invitations/{invitation}",
|
|
1287
|
+
...options
|
|
1288
|
+
});
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* Regenerate token + expiry and resend the invitation email
|
|
1292
|
+
*/
|
|
1293
|
+
resend(options) {
|
|
1294
|
+
return (options.client ?? this.client).post({
|
|
1295
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1296
|
+
url: "/spaces/{space}/invitations/{invitation}/resend",
|
|
1297
|
+
...options
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1301
|
+
var Members = class extends HeyApiClient {
|
|
1302
|
+
/**
|
|
1303
|
+
* List members of a space
|
|
1304
|
+
*/
|
|
1305
|
+
list(options) {
|
|
1306
|
+
return (options.client ?? this.client).get({
|
|
1307
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1308
|
+
url: "/spaces/{space}/members",
|
|
1309
|
+
...options
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* Remove a member from a space
|
|
1314
|
+
*/
|
|
1315
|
+
delete(options) {
|
|
1316
|
+
return (options.client ?? this.client).delete({
|
|
1317
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1318
|
+
url: "/spaces/{space}/members/{user}",
|
|
1319
|
+
...options
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* Update a member's permissions
|
|
1324
|
+
*/
|
|
1325
|
+
update(options) {
|
|
1326
|
+
return (options.client ?? this.client).patch({
|
|
1327
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1328
|
+
url: "/spaces/{space}/members/{user}",
|
|
1329
|
+
...options,
|
|
1330
|
+
headers: {
|
|
1331
|
+
"Content-Type": "application/json",
|
|
1332
|
+
...options.headers
|
|
1333
|
+
}
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* The authenticated user leaves the space
|
|
1338
|
+
*/
|
|
1339
|
+
leave(options) {
|
|
1340
|
+
return (options.client ?? this.client).post({
|
|
1341
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1342
|
+
url: "/spaces/{space}/members/leave",
|
|
1343
|
+
...options
|
|
1344
|
+
});
|
|
1345
|
+
}
|
|
1346
|
+
};
|
|
1269
1347
|
var Subscription = class extends HeyApiClient {
|
|
1270
1348
|
/**
|
|
1271
1349
|
* Get subscription details
|
|
1272
1350
|
*
|
|
1273
|
-
* Returns
|
|
1351
|
+
* Returns the user's current plan, account usage, plan catalog, and billing state.
|
|
1274
1352
|
*/
|
|
1275
1353
|
get(options) {
|
|
1276
1354
|
return (options?.client ?? this.client).get({
|
|
@@ -1378,6 +1456,14 @@ var ZilfuApi = class _ZilfuApi extends HeyApiClient {
|
|
|
1378
1456
|
get spaces() {
|
|
1379
1457
|
return this._spaces ??= new Spaces({ client: this.client });
|
|
1380
1458
|
}
|
|
1459
|
+
_invitations;
|
|
1460
|
+
get invitations() {
|
|
1461
|
+
return this._invitations ??= new Invitations({ client: this.client });
|
|
1462
|
+
}
|
|
1463
|
+
_members;
|
|
1464
|
+
get members() {
|
|
1465
|
+
return this._members ??= new Members({ client: this.client });
|
|
1466
|
+
}
|
|
1381
1467
|
_subscription;
|
|
1382
1468
|
get subscription() {
|
|
1383
1469
|
return this._subscription ??= new Subscription({ client: this.client });
|