@devrev/ts-adaas 1.19.11-beta.0 → 1.19.11-beta.1

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.
@@ -785,7 +785,7 @@ class WorkerAdapter {
785
785
  }
786
786
  return {
787
787
  report: {
788
- item_type: 'attachment',
788
+ item_type: 'attachments',
789
789
  [loading_1.ActionType.CREATED]: 1,
790
790
  },
791
791
  };
@@ -794,7 +794,7 @@ class WorkerAdapter {
794
794
  console.warn('Failed to create attachment in external system', error);
795
795
  return {
796
796
  report: {
797
- item_type: 'attachment',
797
+ item_type: 'attachments',
798
798
  [loading_1.ActionType.FAILED]: 1,
799
799
  },
800
800
  };
@@ -553,7 +553,7 @@ describe(`${worker_adapter_1.WorkerAdapter.name}.loadAttachment`, () => {
553
553
  create,
554
554
  });
555
555
  // Assert
556
- expect((_a = result.report) === null || _a === void 0 ? void 0 : _a.item_type).toBe('attachment');
556
+ expect((_a = result.report) === null || _a === void 0 ? void 0 : _a.item_type).toBe('attachments');
557
557
  expect((_b = result.report) === null || _b === void 0 ? void 0 : _b[loading_1.ActionType.CREATED]).toBe(1);
558
558
  });
559
559
  it('should still return CREATED even when mapper create fails — attachment loading is resilient', async () => {
@@ -584,7 +584,7 @@ describe(`${worker_adapter_1.WorkerAdapter.name}.loadAttachment`, () => {
584
584
  expect((_a = result.rateLimit) === null || _a === void 0 ? void 0 : _a.delay).toBe(30);
585
585
  });
586
586
  it('should return a FAILED report when create returns neither id nor delay', async () => {
587
- var _a;
587
+ var _a, _b;
588
588
  // Arrange
589
589
  const create = jest.fn().mockResolvedValue({ id: null, delay: null });
590
590
  // Act
@@ -593,6 +593,7 @@ describe(`${worker_adapter_1.WorkerAdapter.name}.loadAttachment`, () => {
593
593
  create,
594
594
  });
595
595
  // Assert
596
- expect((_a = result.report) === null || _a === void 0 ? void 0 : _a[loading_1.ActionType.FAILED]).toBe(1);
596
+ expect((_a = result.report) === null || _a === void 0 ? void 0 : _a.item_type).toBe('attachments');
597
+ expect((_b = result.report) === null || _b === void 0 ? void 0 : _b[loading_1.ActionType.FAILED]).toBe(1);
597
598
  });
598
599
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devrev/ts-adaas",
3
- "version": "1.19.11-beta.0",
3
+ "version": "1.19.11-beta.1",
4
4
  "description": "Typescript library containing the ADaaS(AirDrop as a Service) control protocol.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",