kaafil-js 0.5.0 → 0.6.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.
@@ -51,6 +51,7 @@ var OperationId = {
51
51
  DeleteBooking: "deleteBooking",
52
52
  DeleteChecklistItem: "deleteChecklistItem",
53
53
  DeleteChecklistTemplate: "deleteChecklistTemplate",
54
+ DeleteFile: "deleteFile",
54
55
  DeleteForm: "deleteForm",
55
56
  DeleteFormField: "deleteFormField",
56
57
  DeleteFormSection: "deleteFormSection",
@@ -268,6 +269,7 @@ var OPERATION_SECURITY = {
268
269
  deleteBooking: ["apiKeyAuth"],
269
270
  deleteChecklistItem: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
270
271
  deleteChecklistTemplate: ["apiKeyAuth", "agencyAdminAuth"],
272
+ deleteFile: ["managerAuth", "apiKeyAuth", "agencyAdminAuth"],
271
273
  deleteForm: ["apiKeyAuth", "agencyAdminAuth"],
272
274
  deleteFormField: ["apiKeyAuth", "agencyAdminAuth"],
273
275
  deleteFormSection: ["apiKeyAuth", "agencyAdminAuth"],
@@ -596,6 +598,7 @@ var OPERATION_ACCEPTS_IDEMPOTENCY_KEY = {
596
598
  deleteBooking: true,
597
599
  deleteChecklistItem: false,
598
600
  deleteChecklistTemplate: false,
601
+ deleteFile: true,
599
602
  deleteForm: false,
600
603
  deleteFormField: false,
601
604
  deleteFormSection: false,
@@ -4681,6 +4684,18 @@ function createFilesResource(client) {
4681
4684
  ...signal !== void 0 ? { signal } : {}
4682
4685
  });
4683
4686
  },
4687
+ async remove(options) {
4688
+ const { fileId, version, idempotencyKey, signal } = options;
4689
+ return client.execute({
4690
+ method: "DELETE",
4691
+ operationId: OperationId.DeleteFile,
4692
+ path: "/api/v1/files/{id}",
4693
+ pathParams: { id: fileId },
4694
+ headers: { "If-Match": String(version) },
4695
+ ...idempotencyKey !== void 0 ? { idempotencyKey } : {},
4696
+ ...signal !== void 0 ? { signal } : {}
4697
+ });
4698
+ },
4684
4699
  async managerView(options) {
4685
4700
  const { fileId, signal } = options;
4686
4701
  return client.execute({