@devrev/ts-adaas 0.0.1 → 0.0.2
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/README.md +16 -4
- package/dist/src/adapter/index.d.ts +35 -30
- package/dist/src/adapter/index.js +93 -56
- package/dist/src/common/constants.d.ts +2 -0
- package/dist/src/common/constants.js +10 -0
- package/dist/src/{adapter → common}/helpers.d.ts +4 -1
- package/dist/src/{adapter → common}/helpers.js +16 -4
- package/dist/src/demo-extractor/index.d.ts +8 -1
- package/dist/src/demo-extractor/index.js +64 -56
- package/dist/src/demo-extractor/initial_domain_mapping.json +107 -0
- package/dist/src/http/client.d.ts +1 -1
- package/dist/src/http/client.js +2 -2
- package/dist/src/http/index.d.ts +0 -1
- package/dist/src/http/index.js +0 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/logging/index.d.ts +5 -18
- package/dist/src/logging/index.js +20 -41
- package/dist/src/state/index.d.ts +23 -0
- package/dist/src/state/index.js +111 -0
- package/dist/src/types/extraction.d.ts +16 -5
- package/dist/src/uploader/index.d.ts +4 -2
- package/dist/src/uploader/index.js +61 -4
- package/dist/tests/adapter.helpers.test.js +60 -0
- package/dist/tests/adapter.test.js +106 -57
- package/dist/tests/demo-extractor.test.js +44 -81
- package/dist/tests/state.test.js +100 -0
- package/dist/tests/uploader.test.js +29 -0
- package/package.json +1 -1
- package/dist/src/adapter/index.test.js +0 -105
- package/dist/src/demo-extractor/recipe.json +0 -37
- package/dist/tests/helpers.test.js +0 -38
- package/dist/tests/test-helpers.d.ts +0 -2
- package/dist/tests/test-helpers.js +0 -33
- package/dist/tests/types.test.js +0 -71
- /package/dist/{src/adapter/index.test.d.ts → tests/adapter.helpers.test.d.ts} +0 -0
- /package/dist/tests/{helpers.test.d.ts → state.test.d.ts} +0 -0
- /package/dist/tests/{types.test.d.ts → uploader.test.d.ts} +0 -0
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAirdropEvent = void 0;
|
|
4
|
-
function createAirdropEvent(event_type, overrides) {
|
|
5
|
-
return Object.assign({ execution_metadata: {
|
|
6
|
-
devrev_endpoint: 'devrev_endpoint',
|
|
7
|
-
}, context: {
|
|
8
|
-
secrets: {
|
|
9
|
-
service_account_token: 'service_account_token',
|
|
10
|
-
},
|
|
11
|
-
}, payload: {
|
|
12
|
-
connection_data: {
|
|
13
|
-
org_id: 'org_id',
|
|
14
|
-
org_name: 'org_name',
|
|
15
|
-
key: 'key',
|
|
16
|
-
key_type: 'key_type',
|
|
17
|
-
},
|
|
18
|
-
event_context: {
|
|
19
|
-
mode: 'mode',
|
|
20
|
-
callback_url: 'callback_url',
|
|
21
|
-
dev_org_id: 'dev_org_id',
|
|
22
|
-
dev_user_id: 'dev_user_id',
|
|
23
|
-
external_system_id: 'external_system_id',
|
|
24
|
-
uuid: 'uuid',
|
|
25
|
-
sync_run_id: 'sync_run_id',
|
|
26
|
-
},
|
|
27
|
-
event_type,
|
|
28
|
-
}, input_data: {
|
|
29
|
-
global_values: {},
|
|
30
|
-
event_sources: {},
|
|
31
|
-
} }, overrides);
|
|
32
|
-
}
|
|
33
|
-
exports.createAirdropEvent = createAirdropEvent;
|
package/dist/tests/types.test.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
describe('Airdrop event types', () => {
|
|
4
|
-
describe('ExternalSyncUnit', () => {
|
|
5
|
-
test('should have the required properties', () => {
|
|
6
|
-
const externalSyncUnit = {
|
|
7
|
-
id: '123',
|
|
8
|
-
name: 'test-unit-name',
|
|
9
|
-
description: 'test-unit-description',
|
|
10
|
-
item_count: 0,
|
|
11
|
-
};
|
|
12
|
-
expect(externalSyncUnit).toHaveProperty('id');
|
|
13
|
-
expect(externalSyncUnit).toHaveProperty('name');
|
|
14
|
-
expect(externalSyncUnit).toHaveProperty('description');
|
|
15
|
-
expect(externalSyncUnit).toHaveProperty('item_count');
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
describe('EventContextIn', () => {
|
|
19
|
-
test('should have the required properties', () => {
|
|
20
|
-
const eventContext = {
|
|
21
|
-
mode: 'INITIAL',
|
|
22
|
-
callback_url: 'https://test.com',
|
|
23
|
-
dev_org_id: 'DEV-123',
|
|
24
|
-
dev_user_id: 'DEVU-123',
|
|
25
|
-
external_system_id: '123',
|
|
26
|
-
sync_run_id: '123',
|
|
27
|
-
uuid: '123',
|
|
28
|
-
};
|
|
29
|
-
expect(eventContext).toHaveProperty('mode');
|
|
30
|
-
expect(eventContext).toHaveProperty('callback_url');
|
|
31
|
-
expect(eventContext).toHaveProperty('dev_org_id');
|
|
32
|
-
expect(eventContext).toHaveProperty('dev_user_id');
|
|
33
|
-
expect(eventContext).toHaveProperty('external_system_id');
|
|
34
|
-
expect(eventContext).toHaveProperty('uuid');
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
describe('ConnectionData', () => {
|
|
38
|
-
test('should have the required properties', () => {
|
|
39
|
-
const connectionData = {
|
|
40
|
-
org_id: '123',
|
|
41
|
-
org_name: 'test-org-name',
|
|
42
|
-
key: 'test-key',
|
|
43
|
-
key_type: 'test-key-type',
|
|
44
|
-
};
|
|
45
|
-
expect(connectionData).toHaveProperty('org_id');
|
|
46
|
-
expect(connectionData).toHaveProperty('org_name');
|
|
47
|
-
expect(connectionData).toHaveProperty('key');
|
|
48
|
-
expect(connectionData).toHaveProperty('key_type');
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
describe('ErrorRecord', () => {
|
|
52
|
-
test('should have the required properties', () => {
|
|
53
|
-
const errorRecord = {
|
|
54
|
-
message: 'test-message',
|
|
55
|
-
};
|
|
56
|
-
expect(errorRecord).toHaveProperty('message');
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
describe('Artifact', () => {
|
|
60
|
-
test('should have the required properties', () => {
|
|
61
|
-
const artifact = {
|
|
62
|
-
item_count: 0,
|
|
63
|
-
id: '123',
|
|
64
|
-
item_type: 'test-item-type',
|
|
65
|
-
};
|
|
66
|
-
expect(artifact).toHaveProperty('item_type');
|
|
67
|
-
expect(artifact).toHaveProperty('id');
|
|
68
|
-
expect(artifact).toHaveProperty('item_count');
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|