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