shred-api-client 2.9.13 → 2.10.0

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
@@ -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,138 @@ 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
+ tenantIds: external_exports.array(external_exports.string())
6117
+ });
6118
+ var ShredUSessionCustomerSchema = ShredUSessionSchema.omit({
6119
+ zoomUrl: true,
6120
+ tenantIds: true
6121
+ });
6122
+ var CreateShredUSessionSchema = external_exports.object({
6123
+ topic: external_exports.string().min(1),
6124
+ description: external_exports.string().min(1),
6125
+ startsAt: external_exports.number().int().positive(),
6126
+ durationMin: external_exports.number().int().positive(),
6127
+ zoomUrl: external_exports.string().url(),
6128
+ assets: external_exports.array(SessionAssetSchema).optional(),
6129
+ tenantIds: external_exports.array(external_exports.string().min(1))
6130
+ });
6131
+ var UpdateShredUSessionSchema = external_exports.object({
6132
+ topic: external_exports.string().min(1).optional(),
6133
+ description: external_exports.string().min(1).optional(),
6134
+ startsAt: external_exports.number().int().positive().optional(),
6135
+ durationMin: external_exports.number().int().positive().optional(),
6136
+ zoomUrl: external_exports.string().url().optional(),
6137
+ assets: external_exports.array(SessionAssetSchema).optional(),
6138
+ tenantIds: external_exports.array(external_exports.string().min(1)).optional()
6139
+ });
6140
+ var SetShredUSessionRecordingSchema = external_exports.object({
6141
+ recordingId: external_exports.string().min(1),
6142
+ recordingDurationSeconds: external_exports.number().int().positive()
6143
+ });
6144
+
6145
+ // src/api/ShredU.api.ts
6146
+ var ShredUAPI = class {
6147
+ constructor(env) {
6148
+ this.env = env;
6149
+ this.clientHTTP = new HTTPClient();
6150
+ }
6151
+ async list(ctx) {
6152
+ const { uri, method } = Endpoints9.List;
6153
+ return this.clientHTTP.makeRequest(this.env, uri, method, null, ctx, external_exports.array(ShredUSessionSchema));
6154
+ }
6155
+ async getUpcoming(ctx) {
6156
+ const { uri, method } = Endpoints9.GetUpcoming;
6157
+ return this.clientHTTP.makeRequest(this.env, uri, method, null, ctx, external_exports.array(ShredUSessionCustomerSchema));
6158
+ }
6159
+ async getLibrary(ctx) {
6160
+ const { uri, method } = Endpoints9.GetLibrary;
6161
+ return this.clientHTTP.makeRequest(this.env, uri, method, null, ctx, external_exports.array(ShredUSessionCustomerSchema));
6162
+ }
6163
+ async get(ctx, id) {
6164
+ const { uri, method } = Endpoints9.Get;
6165
+ return this.clientHTTP.makeRequest(this.env, uri.replace(":id", id), method, null, ctx, ShredUSessionCustomerSchema);
6166
+ }
6167
+ async create(ctx, data) {
6168
+ const { uri, method } = Endpoints9.Create;
6169
+ return this.clientHTTP.makeRequest(this.env, uri, method, data, ctx, ShredUSessionSchema);
6170
+ }
6171
+ async update(ctx, id, data) {
6172
+ const { uri, method } = Endpoints9.Update;
6173
+ await this.clientHTTP.makeRequest(this.env, uri.replace(":id", id), method, data, ctx);
6174
+ }
6175
+ async cancel(ctx, id) {
6176
+ const { uri, method } = Endpoints9.Cancel;
6177
+ await this.clientHTTP.makeRequest(this.env, uri.replace(":id", id), method, null, ctx);
6178
+ }
6179
+ async setRecording(ctx, id, data) {
6180
+ const { uri, method } = Endpoints9.SetRecording;
6181
+ await this.clientHTTP.makeRequest(this.env, uri.replace(":id", id), method, data, ctx);
6182
+ }
6183
+ };
6184
+ var ShredU_api_default = ShredUAPI;
6185
+
6059
6186
  // src/model/rbac/index.ts
6060
6187
  var rbac_exports = {};
6061
6188
  __export(rbac_exports, {
6062
6189
  ActionCatalog: () => ActionCatalog,
6063
6190
  Actions: () => Actions,
6064
- Endpoints: () => Endpoints9,
6191
+ Endpoints: () => Endpoints10,
6065
6192
  PrincipalSchema: () => PrincipalSchema,
6066
6193
  RoleAssignmentSchema: () => RoleAssignmentSchema,
6067
6194
  RoleGrantSchema: () => RoleGrantSchema,
@@ -6303,7 +6430,7 @@ var PrincipalSchema = external_exports.object({
6303
6430
  });
6304
6431
 
6305
6432
  // src/model/rbac/RBAC.api.ts
6306
- var Endpoints9 = {
6433
+ var Endpoints10 = {
6307
6434
  GetActions: { uri: "/rbac/actions", method: "GET" },
6308
6435
  ListRoles: { uri: "/rbac/roles", method: "GET" },
6309
6436
  CreateRole: { uri: "/rbac/roles", method: "POST" },
@@ -6322,29 +6449,29 @@ var RBACAPI = class {
6322
6449
  this.clientHTTP = new HTTPClient();
6323
6450
  }
6324
6451
  async getActions(c) {
6325
- const e = Endpoints9.GetActions;
6452
+ const e = Endpoints10.GetActions;
6326
6453
  return this.clientHTTP.makeRequest(this.env, e.uri, e.method, null, c);
6327
6454
  }
6328
6455
  async listRoles(c) {
6329
- const e = Endpoints9.ListRoles;
6456
+ const e = Endpoints10.ListRoles;
6330
6457
  return this.clientHTTP.makeRequest(this.env, e.uri, e.method, null, c, external_exports.array(RoleSchema));
6331
6458
  }
6332
6459
  async createRole(c, input) {
6333
- const e = Endpoints9.CreateRole;
6460
+ const e = Endpoints10.CreateRole;
6334
6461
  return this.clientHTTP.makeRequest(this.env, e.uri, e.method, input, c, RoleSchema);
6335
6462
  }
6336
6463
  async updateRole(c, roleId, input) {
6337
- const e = Endpoints9.UpdateRole;
6464
+ const e = Endpoints10.UpdateRole;
6338
6465
  const uri = e.uri.replace(":roleId", roleId);
6339
6466
  return this.clientHTTP.makeRequest(this.env, uri, e.method, input, c, RoleSchema);
6340
6467
  }
6341
6468
  async deleteRole(c, roleId) {
6342
- const e = Endpoints9.DeleteRole;
6469
+ const e = Endpoints10.DeleteRole;
6343
6470
  const uri = e.uri.replace(":roleId", roleId);
6344
6471
  return this.clientHTTP.makeRequest(this.env, uri, e.method, null, c, external_exports.boolean());
6345
6472
  }
6346
6473
  async getAssignments(c, uid) {
6347
- const e = Endpoints9.GetAssignments;
6474
+ const e = Endpoints10.GetAssignments;
6348
6475
  const uri = e.uri.replace(":uid", uid);
6349
6476
  return this.clientHTTP.makeRequest(
6350
6477
  this.env,
@@ -6356,17 +6483,17 @@ var RBACAPI = class {
6356
6483
  );
6357
6484
  }
6358
6485
  async assign(c, uid, input) {
6359
- const e = Endpoints9.Assign;
6486
+ const e = Endpoints10.Assign;
6360
6487
  const uri = e.uri.replace(":uid", uid);
6361
6488
  return this.clientHTTP.makeRequest(this.env, uri, e.method, input, c, RoleAssignmentSchema);
6362
6489
  }
6363
6490
  async unassign(c, uid, input) {
6364
- const e = Endpoints9.Unassign;
6491
+ const e = Endpoints10.Unassign;
6365
6492
  const uri = e.uri.replace(":uid", uid);
6366
6493
  return this.clientHTTP.makeRequest(this.env, uri, e.method, input, c, RoleAssignmentSchema);
6367
6494
  }
6368
6495
  async searchPrincipals(c, term) {
6369
- const e = Endpoints9.SearchPrincipals;
6496
+ const e = Endpoints10.SearchPrincipals;
6370
6497
  const uri = `${e.uri}?q=${encodeURIComponent(term)}`;
6371
6498
  return this.clientHTTP.makeRequest(this.env, uri, e.method, null, c, external_exports.array(PrincipalSchema));
6372
6499
  }
@@ -6389,6 +6516,7 @@ var ShredAPI = class {
6389
6516
  this.track = new Track_api_default(env);
6390
6517
  this.note = new Note_api_default(env);
6391
6518
  this.specialOffer = new SpecialOffer_api_default(env);
6519
+ this.shredu = new ShredU_api_default(env);
6392
6520
  this.rbac = new RBAC_api_default(env);
6393
6521
  }
6394
6522
  };
@@ -6408,7 +6536,7 @@ __export(exceptions_exports, {
6408
6536
  var prompt_exports = {};
6409
6537
  __export(prompt_exports, {
6410
6538
  CategorySchema: () => CategorySchema,
6411
- Endpoints: () => Endpoints10,
6539
+ Endpoints: () => Endpoints11,
6412
6540
  PromptSchema: () => PromptSchema,
6413
6541
  ScriptIARequestSchema: () => ScriptIARequestSchema,
6414
6542
  ScriptSchema: () => ScriptSchema
@@ -6444,7 +6572,7 @@ var PromptSchema = external_exports.object({
6444
6572
  });
6445
6573
 
6446
6574
  // src/model/prompt/Prompt.api.ts
6447
- var Endpoints10 = {
6575
+ var Endpoints11 = {
6448
6576
  GetPrompt: {
6449
6577
  uri: "/prompts/getPrompt",
6450
6578
  method: "GET"
@@ -6475,7 +6603,7 @@ var Endpoints10 = {
6475
6603
  var tenant_exports = {};
6476
6604
  __export(tenant_exports, {
6477
6605
  Action: () => Action,
6478
- Endpoints: () => Endpoints11,
6606
+ Endpoints: () => Endpoints12,
6479
6607
  MemberSchema: () => MemberSchema,
6480
6608
  MemberUpdateSchema: () => MemberUpdateSchema,
6481
6609
  PreferencesSchema: () => PreferencesSchema,
@@ -6606,7 +6734,7 @@ var TenantUpdateSchema = TenantSchema.pick({
6606
6734
  }).partial();
6607
6735
 
6608
6736
  // src/model/tenant/Tenant.api.ts
6609
- var Endpoints11 = {
6737
+ var Endpoints12 = {
6610
6738
  GetByInviteCode: {
6611
6739
  uri: "/tenants/public/invitation/",
6612
6740
  method: "GET"
@@ -6644,7 +6772,7 @@ var Endpoints11 = {
6644
6772
  // src/model/user/index.ts
6645
6773
  var user_exports = {};
6646
6774
  __export(user_exports, {
6647
- Endpoints: () => Endpoints12,
6775
+ Endpoints: () => Endpoints13,
6648
6776
  PreferencesSchema: () => PreferencesSchema2,
6649
6777
  Role: () => Role,
6650
6778
  System: () => System,
@@ -6699,7 +6827,7 @@ var UserSchema = external_exports.object({
6699
6827
  });
6700
6828
 
6701
6829
  // src/model/user/User.api.ts
6702
- var Endpoints12 = {
6830
+ var Endpoints13 = {
6703
6831
  ChangeEmail: { uri: "/accounts/user/changeEmail", method: "PUT" },
6704
6832
  GetUserInfo: { uri: "/accounts/user/info", method: "GET" },
6705
6833
  GetBindedUsers: { uri: "/accounts/binded/list", method: "GET" },
@@ -6722,7 +6850,7 @@ var Endpoints12 = {
6722
6850
  var subscription_exports = {};
6723
6851
  __export(subscription_exports, {
6724
6852
  ChargeSchema: () => ChargeSchema,
6725
- Endpoints: () => Endpoints13,
6853
+ Endpoints: () => Endpoints14,
6726
6854
  PlanSchema: () => PlanSchema,
6727
6855
  ProductSchema: () => ProductSchema,
6728
6856
  SubscriptionSchema: () => SubscriptionSchema,
@@ -6731,7 +6859,7 @@ __export(subscription_exports, {
6731
6859
  });
6732
6860
 
6733
6861
  // src/model/subscription/Subscription.api.ts
6734
- var Endpoints13 = {
6862
+ var Endpoints14 = {
6735
6863
  GetPortal: {
6736
6864
  uri: "/subscriptions/portal/",
6737
6865
  method: "GET"
@@ -6793,7 +6921,7 @@ var Endpoints13 = {
6793
6921
  // src/model/track/index.ts
6794
6922
  var track_exports = {};
6795
6923
  __export(track_exports, {
6796
- Endpoints: () => Endpoints14,
6924
+ Endpoints: () => Endpoints15,
6797
6925
  TrackParamSchema: () => TrackParamSchema,
6798
6926
  TrackSchema: () => TrackSchema
6799
6927
  });
@@ -6811,7 +6939,7 @@ var TrackSchema = external_exports.object({
6811
6939
  });
6812
6940
 
6813
6941
  // src/model/track/Track.api.ts
6814
- var Endpoints14 = {
6942
+ var Endpoints15 = {
6815
6943
  Track: {
6816
6944
  uri: "/track/public/send/",
6817
6945
  method: "POST"
@@ -6831,6 +6959,19 @@ __export(special_offer_exports, {
6831
6959
  UserOfferDetailsSchema: () => UserOfferDetailsSchema
6832
6960
  });
6833
6961
 
6962
+ // src/model/shredu/index.ts
6963
+ var shredu_exports = {};
6964
+ __export(shredu_exports, {
6965
+ CreateShredUSessionSchema: () => CreateShredUSessionSchema,
6966
+ Endpoints: () => Endpoints9,
6967
+ SessionAssetSchema: () => SessionAssetSchema,
6968
+ SetShredUSessionRecordingSchema: () => SetShredUSessionRecordingSchema,
6969
+ ShredUSessionCustomerSchema: () => ShredUSessionCustomerSchema,
6970
+ ShredUSessionSchema: () => ShredUSessionSchema,
6971
+ ShredUSessionStatusSchema: () => ShredUSessionStatusSchema,
6972
+ UpdateShredUSessionSchema: () => UpdateShredUSessionSchema
6973
+ });
6974
+
6834
6975
  // src/index.ts
6835
6976
  var index_default = ShredAPI;
6836
6977
  //# sourceMappingURL=index.js.map