shred-api-client 2.9.13 → 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.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: () => Endpoints9,
6185
+ Endpoints: () => Endpoints10,
6065
6186
  PrincipalSchema: () => PrincipalSchema,
6066
6187
  RoleAssignmentSchema: () => RoleAssignmentSchema,
6067
6188
  RoleGrantSchema: () => RoleGrantSchema,
@@ -6303,7 +6424,7 @@ var PrincipalSchema = external_exports.object({
6303
6424
  });
6304
6425
 
6305
6426
  // src/model/rbac/RBAC.api.ts
6306
- var Endpoints9 = {
6427
+ var Endpoints10 = {
6307
6428
  GetActions: { uri: "/rbac/actions", method: "GET" },
6308
6429
  ListRoles: { uri: "/rbac/roles", method: "GET" },
6309
6430
  CreateRole: { uri: "/rbac/roles", method: "POST" },
@@ -6322,29 +6443,29 @@ var RBACAPI = class {
6322
6443
  this.clientHTTP = new HTTPClient();
6323
6444
  }
6324
6445
  async getActions(c) {
6325
- const e = Endpoints9.GetActions;
6446
+ const e = Endpoints10.GetActions;
6326
6447
  return this.clientHTTP.makeRequest(this.env, e.uri, e.method, null, c);
6327
6448
  }
6328
6449
  async listRoles(c) {
6329
- const e = Endpoints9.ListRoles;
6450
+ const e = Endpoints10.ListRoles;
6330
6451
  return this.clientHTTP.makeRequest(this.env, e.uri, e.method, null, c, external_exports.array(RoleSchema));
6331
6452
  }
6332
6453
  async createRole(c, input) {
6333
- const e = Endpoints9.CreateRole;
6454
+ const e = Endpoints10.CreateRole;
6334
6455
  return this.clientHTTP.makeRequest(this.env, e.uri, e.method, input, c, RoleSchema);
6335
6456
  }
6336
6457
  async updateRole(c, roleId, input) {
6337
- const e = Endpoints9.UpdateRole;
6458
+ const e = Endpoints10.UpdateRole;
6338
6459
  const uri = e.uri.replace(":roleId", roleId);
6339
6460
  return this.clientHTTP.makeRequest(this.env, uri, e.method, input, c, RoleSchema);
6340
6461
  }
6341
6462
  async deleteRole(c, roleId) {
6342
- const e = Endpoints9.DeleteRole;
6463
+ const e = Endpoints10.DeleteRole;
6343
6464
  const uri = e.uri.replace(":roleId", roleId);
6344
6465
  return this.clientHTTP.makeRequest(this.env, uri, e.method, null, c, external_exports.boolean());
6345
6466
  }
6346
6467
  async getAssignments(c, uid) {
6347
- const e = Endpoints9.GetAssignments;
6468
+ const e = Endpoints10.GetAssignments;
6348
6469
  const uri = e.uri.replace(":uid", uid);
6349
6470
  return this.clientHTTP.makeRequest(
6350
6471
  this.env,
@@ -6356,17 +6477,17 @@ var RBACAPI = class {
6356
6477
  );
6357
6478
  }
6358
6479
  async assign(c, uid, input) {
6359
- const e = Endpoints9.Assign;
6480
+ const e = Endpoints10.Assign;
6360
6481
  const uri = e.uri.replace(":uid", uid);
6361
6482
  return this.clientHTTP.makeRequest(this.env, uri, e.method, input, c, RoleAssignmentSchema);
6362
6483
  }
6363
6484
  async unassign(c, uid, input) {
6364
- const e = Endpoints9.Unassign;
6485
+ const e = Endpoints10.Unassign;
6365
6486
  const uri = e.uri.replace(":uid", uid);
6366
6487
  return this.clientHTTP.makeRequest(this.env, uri, e.method, input, c, RoleAssignmentSchema);
6367
6488
  }
6368
6489
  async searchPrincipals(c, term) {
6369
- const e = Endpoints9.SearchPrincipals;
6490
+ const e = Endpoints10.SearchPrincipals;
6370
6491
  const uri = `${e.uri}?q=${encodeURIComponent(term)}`;
6371
6492
  return this.clientHTTP.makeRequest(this.env, uri, e.method, null, c, external_exports.array(PrincipalSchema));
6372
6493
  }
@@ -6389,6 +6510,7 @@ var ShredAPI = class {
6389
6510
  this.track = new Track_api_default(env);
6390
6511
  this.note = new Note_api_default(env);
6391
6512
  this.specialOffer = new SpecialOffer_api_default(env);
6513
+ this.shredu = new ShredU_api_default(env);
6392
6514
  this.rbac = new RBAC_api_default(env);
6393
6515
  }
6394
6516
  };
@@ -6408,7 +6530,7 @@ __export(exceptions_exports, {
6408
6530
  var prompt_exports = {};
6409
6531
  __export(prompt_exports, {
6410
6532
  CategorySchema: () => CategorySchema,
6411
- Endpoints: () => Endpoints10,
6533
+ Endpoints: () => Endpoints11,
6412
6534
  PromptSchema: () => PromptSchema,
6413
6535
  ScriptIARequestSchema: () => ScriptIARequestSchema,
6414
6536
  ScriptSchema: () => ScriptSchema
@@ -6444,7 +6566,7 @@ var PromptSchema = external_exports.object({
6444
6566
  });
6445
6567
 
6446
6568
  // src/model/prompt/Prompt.api.ts
6447
- var Endpoints10 = {
6569
+ var Endpoints11 = {
6448
6570
  GetPrompt: {
6449
6571
  uri: "/prompts/getPrompt",
6450
6572
  method: "GET"
@@ -6475,7 +6597,7 @@ var Endpoints10 = {
6475
6597
  var tenant_exports = {};
6476
6598
  __export(tenant_exports, {
6477
6599
  Action: () => Action,
6478
- Endpoints: () => Endpoints11,
6600
+ Endpoints: () => Endpoints12,
6479
6601
  MemberSchema: () => MemberSchema,
6480
6602
  MemberUpdateSchema: () => MemberUpdateSchema,
6481
6603
  PreferencesSchema: () => PreferencesSchema,
@@ -6606,7 +6728,7 @@ var TenantUpdateSchema = TenantSchema.pick({
6606
6728
  }).partial();
6607
6729
 
6608
6730
  // src/model/tenant/Tenant.api.ts
6609
- var Endpoints11 = {
6731
+ var Endpoints12 = {
6610
6732
  GetByInviteCode: {
6611
6733
  uri: "/tenants/public/invitation/",
6612
6734
  method: "GET"
@@ -6644,7 +6766,7 @@ var Endpoints11 = {
6644
6766
  // src/model/user/index.ts
6645
6767
  var user_exports = {};
6646
6768
  __export(user_exports, {
6647
- Endpoints: () => Endpoints12,
6769
+ Endpoints: () => Endpoints13,
6648
6770
  PreferencesSchema: () => PreferencesSchema2,
6649
6771
  Role: () => Role,
6650
6772
  System: () => System,
@@ -6699,7 +6821,7 @@ var UserSchema = external_exports.object({
6699
6821
  });
6700
6822
 
6701
6823
  // src/model/user/User.api.ts
6702
- var Endpoints12 = {
6824
+ var Endpoints13 = {
6703
6825
  ChangeEmail: { uri: "/accounts/user/changeEmail", method: "PUT" },
6704
6826
  GetUserInfo: { uri: "/accounts/user/info", method: "GET" },
6705
6827
  GetBindedUsers: { uri: "/accounts/binded/list", method: "GET" },
@@ -6722,7 +6844,7 @@ var Endpoints12 = {
6722
6844
  var subscription_exports = {};
6723
6845
  __export(subscription_exports, {
6724
6846
  ChargeSchema: () => ChargeSchema,
6725
- Endpoints: () => Endpoints13,
6847
+ Endpoints: () => Endpoints14,
6726
6848
  PlanSchema: () => PlanSchema,
6727
6849
  ProductSchema: () => ProductSchema,
6728
6850
  SubscriptionSchema: () => SubscriptionSchema,
@@ -6731,7 +6853,7 @@ __export(subscription_exports, {
6731
6853
  });
6732
6854
 
6733
6855
  // src/model/subscription/Subscription.api.ts
6734
- var Endpoints13 = {
6856
+ var Endpoints14 = {
6735
6857
  GetPortal: {
6736
6858
  uri: "/subscriptions/portal/",
6737
6859
  method: "GET"
@@ -6793,7 +6915,7 @@ var Endpoints13 = {
6793
6915
  // src/model/track/index.ts
6794
6916
  var track_exports = {};
6795
6917
  __export(track_exports, {
6796
- Endpoints: () => Endpoints14,
6918
+ Endpoints: () => Endpoints15,
6797
6919
  TrackParamSchema: () => TrackParamSchema,
6798
6920
  TrackSchema: () => TrackSchema
6799
6921
  });
@@ -6811,7 +6933,7 @@ var TrackSchema = external_exports.object({
6811
6933
  });
6812
6934
 
6813
6935
  // src/model/track/Track.api.ts
6814
- var Endpoints14 = {
6936
+ var Endpoints15 = {
6815
6937
  Track: {
6816
6938
  uri: "/track/public/send/",
6817
6939
  method: "POST"
@@ -6831,6 +6953,19 @@ __export(special_offer_exports, {
6831
6953
  UserOfferDetailsSchema: () => UserOfferDetailsSchema
6832
6954
  });
6833
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
+
6834
6969
  // src/index.ts
6835
6970
  var index_default = ShredAPI;
6836
6971
  //# sourceMappingURL=index.js.map