shred-api-client 2.9.12 → 2.9.14
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.d.ts +679 -171
- package/dist/index.js +170 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __export(index_exports, {
|
|
|
42
42
|
Prompt: () => prompt_exports,
|
|
43
43
|
RBAC: () => rbac_exports,
|
|
44
44
|
ShredAPI: () => ShredAPI,
|
|
45
|
+
ShredU: () => shredu_exports,
|
|
45
46
|
SpecialOffer: () => special_offer_exports,
|
|
46
47
|
Subscription: () => subscription_exports,
|
|
47
48
|
Tenant: () => tenant_exports,
|
|
@@ -6056,12 +6057,132 @@ var SpecialOfferAPI = class {
|
|
|
6056
6057
|
};
|
|
6057
6058
|
var SpecialOffer_api_default = SpecialOfferAPI;
|
|
6058
6059
|
|
|
6060
|
+
// src/model/shredu/ShredU.api.ts
|
|
6061
|
+
var Endpoints9 = {
|
|
6062
|
+
List: {
|
|
6063
|
+
uri: "/shredu/sessions",
|
|
6064
|
+
method: "GET"
|
|
6065
|
+
},
|
|
6066
|
+
GetUpcoming: {
|
|
6067
|
+
uri: "/shredu/sessions/upcoming",
|
|
6068
|
+
method: "GET"
|
|
6069
|
+
},
|
|
6070
|
+
GetLibrary: {
|
|
6071
|
+
uri: "/shredu/sessions/library",
|
|
6072
|
+
method: "GET"
|
|
6073
|
+
},
|
|
6074
|
+
Get: {
|
|
6075
|
+
uri: "/shredu/sessions/:id",
|
|
6076
|
+
method: "GET"
|
|
6077
|
+
},
|
|
6078
|
+
Create: {
|
|
6079
|
+
uri: "/shredu/sessions",
|
|
6080
|
+
method: "POST"
|
|
6081
|
+
},
|
|
6082
|
+
Update: {
|
|
6083
|
+
uri: "/shredu/sessions/:id",
|
|
6084
|
+
method: "PUT"
|
|
6085
|
+
},
|
|
6086
|
+
Cancel: {
|
|
6087
|
+
uri: "/shredu/sessions/:id/cancel",
|
|
6088
|
+
method: "PUT"
|
|
6089
|
+
},
|
|
6090
|
+
SetRecording: {
|
|
6091
|
+
uri: "/shredu/sessions/:id/recording",
|
|
6092
|
+
method: "PUT"
|
|
6093
|
+
}
|
|
6094
|
+
};
|
|
6095
|
+
|
|
6096
|
+
// src/model/shredu/ShredU.schema.ts
|
|
6097
|
+
var SessionAssetSchema = AssetSchema.extend({
|
|
6098
|
+
assetUrl: external_exports.string(),
|
|
6099
|
+
thumbnailUrl: external_exports.string(),
|
|
6100
|
+
type: external_exports.string().optional(),
|
|
6101
|
+
authorId: external_exports.string().optional(),
|
|
6102
|
+
uploadedAt: external_exports.number().optional()
|
|
6103
|
+
});
|
|
6104
|
+
var ShredUSessionStatusSchema = external_exports.enum(["scheduled", "cancelled"]);
|
|
6105
|
+
var ShredUSessionSchema = external_exports.object({
|
|
6106
|
+
id: external_exports.string(),
|
|
6107
|
+
topic: external_exports.string(),
|
|
6108
|
+
description: external_exports.string(),
|
|
6109
|
+
startsAt: external_exports.number(),
|
|
6110
|
+
durationMin: external_exports.number(),
|
|
6111
|
+
zoomUrl: external_exports.string(),
|
|
6112
|
+
status: ShredUSessionStatusSchema,
|
|
6113
|
+
recordingId: external_exports.string().optional(),
|
|
6114
|
+
recordingDurationSeconds: external_exports.number().optional(),
|
|
6115
|
+
assets: external_exports.array(SessionAssetSchema).optional()
|
|
6116
|
+
});
|
|
6117
|
+
var ShredUSessionCustomerSchema = ShredUSessionSchema.omit({ zoomUrl: true });
|
|
6118
|
+
var CreateShredUSessionSchema = external_exports.object({
|
|
6119
|
+
topic: external_exports.string().min(1),
|
|
6120
|
+
description: external_exports.string().min(1),
|
|
6121
|
+
startsAt: external_exports.number().int().positive(),
|
|
6122
|
+
durationMin: external_exports.number().int().positive(),
|
|
6123
|
+
zoomUrl: external_exports.string().url(),
|
|
6124
|
+
assets: external_exports.array(SessionAssetSchema).optional()
|
|
6125
|
+
});
|
|
6126
|
+
var UpdateShredUSessionSchema = external_exports.object({
|
|
6127
|
+
topic: external_exports.string().min(1).optional(),
|
|
6128
|
+
description: external_exports.string().min(1).optional(),
|
|
6129
|
+
startsAt: external_exports.number().int().positive().optional(),
|
|
6130
|
+
durationMin: external_exports.number().int().positive().optional(),
|
|
6131
|
+
zoomUrl: external_exports.string().url().optional(),
|
|
6132
|
+
assets: external_exports.array(SessionAssetSchema).optional()
|
|
6133
|
+
});
|
|
6134
|
+
var SetShredUSessionRecordingSchema = external_exports.object({
|
|
6135
|
+
recordingId: external_exports.string().min(1),
|
|
6136
|
+
recordingDurationSeconds: external_exports.number().int().positive()
|
|
6137
|
+
});
|
|
6138
|
+
|
|
6139
|
+
// src/api/ShredU.api.ts
|
|
6140
|
+
var ShredUAPI = class {
|
|
6141
|
+
constructor(env) {
|
|
6142
|
+
this.env = env;
|
|
6143
|
+
this.clientHTTP = new HTTPClient();
|
|
6144
|
+
}
|
|
6145
|
+
async list(ctx) {
|
|
6146
|
+
const { uri, method } = Endpoints9.List;
|
|
6147
|
+
return this.clientHTTP.makeRequest(this.env, uri, method, null, ctx, external_exports.array(ShredUSessionSchema));
|
|
6148
|
+
}
|
|
6149
|
+
async getUpcoming(ctx) {
|
|
6150
|
+
const { uri, method } = Endpoints9.GetUpcoming;
|
|
6151
|
+
return this.clientHTTP.makeRequest(this.env, uri, method, null, ctx, external_exports.array(ShredUSessionCustomerSchema));
|
|
6152
|
+
}
|
|
6153
|
+
async getLibrary(ctx) {
|
|
6154
|
+
const { uri, method } = Endpoints9.GetLibrary;
|
|
6155
|
+
return this.clientHTTP.makeRequest(this.env, uri, method, null, ctx, external_exports.array(ShredUSessionCustomerSchema));
|
|
6156
|
+
}
|
|
6157
|
+
async get(ctx, id) {
|
|
6158
|
+
const { uri, method } = Endpoints9.Get;
|
|
6159
|
+
return this.clientHTTP.makeRequest(this.env, uri.replace(":id", id), method, null, ctx, ShredUSessionCustomerSchema);
|
|
6160
|
+
}
|
|
6161
|
+
async create(ctx, data) {
|
|
6162
|
+
const { uri, method } = Endpoints9.Create;
|
|
6163
|
+
return this.clientHTTP.makeRequest(this.env, uri, method, data, ctx, ShredUSessionSchema);
|
|
6164
|
+
}
|
|
6165
|
+
async update(ctx, id, data) {
|
|
6166
|
+
const { uri, method } = Endpoints9.Update;
|
|
6167
|
+
await this.clientHTTP.makeRequest(this.env, uri.replace(":id", id), method, data, ctx);
|
|
6168
|
+
}
|
|
6169
|
+
async cancel(ctx, id) {
|
|
6170
|
+
const { uri, method } = Endpoints9.Cancel;
|
|
6171
|
+
await this.clientHTTP.makeRequest(this.env, uri.replace(":id", id), method, null, ctx);
|
|
6172
|
+
}
|
|
6173
|
+
async setRecording(ctx, id, data) {
|
|
6174
|
+
const { uri, method } = Endpoints9.SetRecording;
|
|
6175
|
+
await this.clientHTTP.makeRequest(this.env, uri.replace(":id", id), method, data, ctx);
|
|
6176
|
+
}
|
|
6177
|
+
};
|
|
6178
|
+
var ShredU_api_default = ShredUAPI;
|
|
6179
|
+
|
|
6059
6180
|
// src/model/rbac/index.ts
|
|
6060
6181
|
var rbac_exports = {};
|
|
6061
6182
|
__export(rbac_exports, {
|
|
6062
6183
|
ActionCatalog: () => ActionCatalog,
|
|
6063
6184
|
Actions: () => Actions,
|
|
6064
|
-
Endpoints: () =>
|
|
6185
|
+
Endpoints: () => Endpoints10,
|
|
6065
6186
|
PrincipalSchema: () => PrincipalSchema,
|
|
6066
6187
|
RoleAssignmentSchema: () => RoleAssignmentSchema,
|
|
6067
6188
|
RoleGrantSchema: () => RoleGrantSchema,
|
|
@@ -6131,6 +6252,13 @@ var Actions = {
|
|
|
6131
6252
|
OFFER_DISABLE: "offer.disable",
|
|
6132
6253
|
OFFER_GET_MINE: "offer.get_mine",
|
|
6133
6254
|
OFFER_CLAIM: "offer.claim",
|
|
6255
|
+
// — ShredU —
|
|
6256
|
+
SHREDU_SESSION_VIEW: "shredu.session.view",
|
|
6257
|
+
SHREDU_SESSION_LIST: "shredu.session.list",
|
|
6258
|
+
SHREDU_SESSION_CREATE: "shredu.session.create",
|
|
6259
|
+
SHREDU_SESSION_UPDATE: "shredu.session.update",
|
|
6260
|
+
SHREDU_SESSION_CANCEL: "shredu.session.cancel",
|
|
6261
|
+
SHREDU_SESSION_SET_RECORDING: "shredu.session.set_recording",
|
|
6134
6262
|
// — Subscriptions —
|
|
6135
6263
|
SUBSCRIPTION_VIEW_USER: "subscription.view_user",
|
|
6136
6264
|
SUBSCRIPTION_VIEW_SUMMARY: "subscription.view_summary",
|
|
@@ -6219,6 +6347,13 @@ var ActionCatalog = {
|
|
|
6219
6347
|
[Actions.OFFER_DISABLE]: { label: "Disable an offer", group: "Offers" },
|
|
6220
6348
|
[Actions.OFFER_GET_MINE]: { label: "View your own offer", group: "Offers" },
|
|
6221
6349
|
[Actions.OFFER_CLAIM]: { label: "Claim your own offer", group: "Offers" },
|
|
6350
|
+
// ShredU (coaching calls)
|
|
6351
|
+
[Actions.SHREDU_SESSION_VIEW]: { label: "View ShredU sessions and recordings", group: "ShredU" },
|
|
6352
|
+
[Actions.SHREDU_SESSION_LIST]: { label: "List every ShredU session, cancelled included", group: "ShredU" },
|
|
6353
|
+
[Actions.SHREDU_SESSION_CREATE]: { label: "Schedule a ShredU session", group: "ShredU" },
|
|
6354
|
+
[Actions.SHREDU_SESSION_UPDATE]: { label: "Update a ShredU session", group: "ShredU" },
|
|
6355
|
+
[Actions.SHREDU_SESSION_CANCEL]: { label: "Cancel a ShredU session", group: "ShredU" },
|
|
6356
|
+
[Actions.SHREDU_SESSION_SET_RECORDING]: { label: "Attach a recording to a ShredU session", group: "ShredU" },
|
|
6222
6357
|
// Subscriptions
|
|
6223
6358
|
[Actions.SUBSCRIPTION_VIEW_USER]: { label: "View a user's subscription", group: "Subscriptions" },
|
|
6224
6359
|
[Actions.SUBSCRIPTION_VIEW_SUMMARY]: { label: "View a user's subscription summary", group: "Subscriptions" },
|
|
@@ -6289,7 +6424,7 @@ var PrincipalSchema = external_exports.object({
|
|
|
6289
6424
|
});
|
|
6290
6425
|
|
|
6291
6426
|
// src/model/rbac/RBAC.api.ts
|
|
6292
|
-
var
|
|
6427
|
+
var Endpoints10 = {
|
|
6293
6428
|
GetActions: { uri: "/rbac/actions", method: "GET" },
|
|
6294
6429
|
ListRoles: { uri: "/rbac/roles", method: "GET" },
|
|
6295
6430
|
CreateRole: { uri: "/rbac/roles", method: "POST" },
|
|
@@ -6308,29 +6443,29 @@ var RBACAPI = class {
|
|
|
6308
6443
|
this.clientHTTP = new HTTPClient();
|
|
6309
6444
|
}
|
|
6310
6445
|
async getActions(c) {
|
|
6311
|
-
const e =
|
|
6446
|
+
const e = Endpoints10.GetActions;
|
|
6312
6447
|
return this.clientHTTP.makeRequest(this.env, e.uri, e.method, null, c);
|
|
6313
6448
|
}
|
|
6314
6449
|
async listRoles(c) {
|
|
6315
|
-
const e =
|
|
6450
|
+
const e = Endpoints10.ListRoles;
|
|
6316
6451
|
return this.clientHTTP.makeRequest(this.env, e.uri, e.method, null, c, external_exports.array(RoleSchema));
|
|
6317
6452
|
}
|
|
6318
6453
|
async createRole(c, input) {
|
|
6319
|
-
const e =
|
|
6454
|
+
const e = Endpoints10.CreateRole;
|
|
6320
6455
|
return this.clientHTTP.makeRequest(this.env, e.uri, e.method, input, c, RoleSchema);
|
|
6321
6456
|
}
|
|
6322
6457
|
async updateRole(c, roleId, input) {
|
|
6323
|
-
const e =
|
|
6458
|
+
const e = Endpoints10.UpdateRole;
|
|
6324
6459
|
const uri = e.uri.replace(":roleId", roleId);
|
|
6325
6460
|
return this.clientHTTP.makeRequest(this.env, uri, e.method, input, c, RoleSchema);
|
|
6326
6461
|
}
|
|
6327
6462
|
async deleteRole(c, roleId) {
|
|
6328
|
-
const e =
|
|
6463
|
+
const e = Endpoints10.DeleteRole;
|
|
6329
6464
|
const uri = e.uri.replace(":roleId", roleId);
|
|
6330
6465
|
return this.clientHTTP.makeRequest(this.env, uri, e.method, null, c, external_exports.boolean());
|
|
6331
6466
|
}
|
|
6332
6467
|
async getAssignments(c, uid) {
|
|
6333
|
-
const e =
|
|
6468
|
+
const e = Endpoints10.GetAssignments;
|
|
6334
6469
|
const uri = e.uri.replace(":uid", uid);
|
|
6335
6470
|
return this.clientHTTP.makeRequest(
|
|
6336
6471
|
this.env,
|
|
@@ -6342,17 +6477,17 @@ var RBACAPI = class {
|
|
|
6342
6477
|
);
|
|
6343
6478
|
}
|
|
6344
6479
|
async assign(c, uid, input) {
|
|
6345
|
-
const e =
|
|
6480
|
+
const e = Endpoints10.Assign;
|
|
6346
6481
|
const uri = e.uri.replace(":uid", uid);
|
|
6347
6482
|
return this.clientHTTP.makeRequest(this.env, uri, e.method, input, c, RoleAssignmentSchema);
|
|
6348
6483
|
}
|
|
6349
6484
|
async unassign(c, uid, input) {
|
|
6350
|
-
const e =
|
|
6485
|
+
const e = Endpoints10.Unassign;
|
|
6351
6486
|
const uri = e.uri.replace(":uid", uid);
|
|
6352
6487
|
return this.clientHTTP.makeRequest(this.env, uri, e.method, input, c, RoleAssignmentSchema);
|
|
6353
6488
|
}
|
|
6354
6489
|
async searchPrincipals(c, term) {
|
|
6355
|
-
const e =
|
|
6490
|
+
const e = Endpoints10.SearchPrincipals;
|
|
6356
6491
|
const uri = `${e.uri}?q=${encodeURIComponent(term)}`;
|
|
6357
6492
|
return this.clientHTTP.makeRequest(this.env, uri, e.method, null, c, external_exports.array(PrincipalSchema));
|
|
6358
6493
|
}
|
|
@@ -6375,6 +6510,7 @@ var ShredAPI = class {
|
|
|
6375
6510
|
this.track = new Track_api_default(env);
|
|
6376
6511
|
this.note = new Note_api_default(env);
|
|
6377
6512
|
this.specialOffer = new SpecialOffer_api_default(env);
|
|
6513
|
+
this.shredu = new ShredU_api_default(env);
|
|
6378
6514
|
this.rbac = new RBAC_api_default(env);
|
|
6379
6515
|
}
|
|
6380
6516
|
};
|
|
@@ -6394,7 +6530,7 @@ __export(exceptions_exports, {
|
|
|
6394
6530
|
var prompt_exports = {};
|
|
6395
6531
|
__export(prompt_exports, {
|
|
6396
6532
|
CategorySchema: () => CategorySchema,
|
|
6397
|
-
Endpoints: () =>
|
|
6533
|
+
Endpoints: () => Endpoints11,
|
|
6398
6534
|
PromptSchema: () => PromptSchema,
|
|
6399
6535
|
ScriptIARequestSchema: () => ScriptIARequestSchema,
|
|
6400
6536
|
ScriptSchema: () => ScriptSchema
|
|
@@ -6430,7 +6566,7 @@ var PromptSchema = external_exports.object({
|
|
|
6430
6566
|
});
|
|
6431
6567
|
|
|
6432
6568
|
// src/model/prompt/Prompt.api.ts
|
|
6433
|
-
var
|
|
6569
|
+
var Endpoints11 = {
|
|
6434
6570
|
GetPrompt: {
|
|
6435
6571
|
uri: "/prompts/getPrompt",
|
|
6436
6572
|
method: "GET"
|
|
@@ -6461,7 +6597,7 @@ var Endpoints10 = {
|
|
|
6461
6597
|
var tenant_exports = {};
|
|
6462
6598
|
__export(tenant_exports, {
|
|
6463
6599
|
Action: () => Action,
|
|
6464
|
-
Endpoints: () =>
|
|
6600
|
+
Endpoints: () => Endpoints12,
|
|
6465
6601
|
MemberSchema: () => MemberSchema,
|
|
6466
6602
|
MemberUpdateSchema: () => MemberUpdateSchema,
|
|
6467
6603
|
PreferencesSchema: () => PreferencesSchema,
|
|
@@ -6592,7 +6728,7 @@ var TenantUpdateSchema = TenantSchema.pick({
|
|
|
6592
6728
|
}).partial();
|
|
6593
6729
|
|
|
6594
6730
|
// src/model/tenant/Tenant.api.ts
|
|
6595
|
-
var
|
|
6731
|
+
var Endpoints12 = {
|
|
6596
6732
|
GetByInviteCode: {
|
|
6597
6733
|
uri: "/tenants/public/invitation/",
|
|
6598
6734
|
method: "GET"
|
|
@@ -6630,7 +6766,7 @@ var Endpoints11 = {
|
|
|
6630
6766
|
// src/model/user/index.ts
|
|
6631
6767
|
var user_exports = {};
|
|
6632
6768
|
__export(user_exports, {
|
|
6633
|
-
Endpoints: () =>
|
|
6769
|
+
Endpoints: () => Endpoints13,
|
|
6634
6770
|
PreferencesSchema: () => PreferencesSchema2,
|
|
6635
6771
|
Role: () => Role,
|
|
6636
6772
|
System: () => System,
|
|
@@ -6685,7 +6821,7 @@ var UserSchema = external_exports.object({
|
|
|
6685
6821
|
});
|
|
6686
6822
|
|
|
6687
6823
|
// src/model/user/User.api.ts
|
|
6688
|
-
var
|
|
6824
|
+
var Endpoints13 = {
|
|
6689
6825
|
ChangeEmail: { uri: "/accounts/user/changeEmail", method: "PUT" },
|
|
6690
6826
|
GetUserInfo: { uri: "/accounts/user/info", method: "GET" },
|
|
6691
6827
|
GetBindedUsers: { uri: "/accounts/binded/list", method: "GET" },
|
|
@@ -6708,7 +6844,7 @@ var Endpoints12 = {
|
|
|
6708
6844
|
var subscription_exports = {};
|
|
6709
6845
|
__export(subscription_exports, {
|
|
6710
6846
|
ChargeSchema: () => ChargeSchema,
|
|
6711
|
-
Endpoints: () =>
|
|
6847
|
+
Endpoints: () => Endpoints14,
|
|
6712
6848
|
PlanSchema: () => PlanSchema,
|
|
6713
6849
|
ProductSchema: () => ProductSchema,
|
|
6714
6850
|
SubscriptionSchema: () => SubscriptionSchema,
|
|
@@ -6717,7 +6853,7 @@ __export(subscription_exports, {
|
|
|
6717
6853
|
});
|
|
6718
6854
|
|
|
6719
6855
|
// src/model/subscription/Subscription.api.ts
|
|
6720
|
-
var
|
|
6856
|
+
var Endpoints14 = {
|
|
6721
6857
|
GetPortal: {
|
|
6722
6858
|
uri: "/subscriptions/portal/",
|
|
6723
6859
|
method: "GET"
|
|
@@ -6779,7 +6915,7 @@ var Endpoints13 = {
|
|
|
6779
6915
|
// src/model/track/index.ts
|
|
6780
6916
|
var track_exports = {};
|
|
6781
6917
|
__export(track_exports, {
|
|
6782
|
-
Endpoints: () =>
|
|
6918
|
+
Endpoints: () => Endpoints15,
|
|
6783
6919
|
TrackParamSchema: () => TrackParamSchema,
|
|
6784
6920
|
TrackSchema: () => TrackSchema
|
|
6785
6921
|
});
|
|
@@ -6797,7 +6933,7 @@ var TrackSchema = external_exports.object({
|
|
|
6797
6933
|
});
|
|
6798
6934
|
|
|
6799
6935
|
// src/model/track/Track.api.ts
|
|
6800
|
-
var
|
|
6936
|
+
var Endpoints15 = {
|
|
6801
6937
|
Track: {
|
|
6802
6938
|
uri: "/track/public/send/",
|
|
6803
6939
|
method: "POST"
|
|
@@ -6817,6 +6953,19 @@ __export(special_offer_exports, {
|
|
|
6817
6953
|
UserOfferDetailsSchema: () => UserOfferDetailsSchema
|
|
6818
6954
|
});
|
|
6819
6955
|
|
|
6956
|
+
// src/model/shredu/index.ts
|
|
6957
|
+
var shredu_exports = {};
|
|
6958
|
+
__export(shredu_exports, {
|
|
6959
|
+
CreateShredUSessionSchema: () => CreateShredUSessionSchema,
|
|
6960
|
+
Endpoints: () => Endpoints9,
|
|
6961
|
+
SessionAssetSchema: () => SessionAssetSchema,
|
|
6962
|
+
SetShredUSessionRecordingSchema: () => SetShredUSessionRecordingSchema,
|
|
6963
|
+
ShredUSessionCustomerSchema: () => ShredUSessionCustomerSchema,
|
|
6964
|
+
ShredUSessionSchema: () => ShredUSessionSchema,
|
|
6965
|
+
ShredUSessionStatusSchema: () => ShredUSessionStatusSchema,
|
|
6966
|
+
UpdateShredUSessionSchema: () => UpdateShredUSessionSchema
|
|
6967
|
+
});
|
|
6968
|
+
|
|
6820
6969
|
// src/index.ts
|
|
6821
6970
|
var index_default = ShredAPI;
|
|
6822
6971
|
//# sourceMappingURL=index.js.map
|