@devrev/airsync-sdk 2.0.0-beta.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.
Files changed (180) hide show
  1. package/README.md +31 -0
  2. package/dist/attachments-streaming/attachments-streaming-pool.d.ts +16 -0
  3. package/dist/attachments-streaming/attachments-streaming-pool.d.ts.map +1 -0
  4. package/dist/attachments-streaming/attachments-streaming-pool.interfaces.d.ts +9 -0
  5. package/dist/attachments-streaming/attachments-streaming-pool.interfaces.d.ts.map +1 -0
  6. package/dist/attachments-streaming/attachments-streaming-pool.interfaces.js +2 -0
  7. package/dist/attachments-streaming/attachments-streaming-pool.js +97 -0
  8. package/dist/attachments-streaming/attachments-streaming-pool.test.d.ts +2 -0
  9. package/dist/attachments-streaming/attachments-streaming-pool.test.d.ts.map +1 -0
  10. package/dist/attachments-streaming/attachments-streaming-pool.test.js +267 -0
  11. package/dist/common/constants.d.ts +25 -0
  12. package/dist/common/constants.d.ts.map +1 -0
  13. package/dist/common/constants.js +58 -0
  14. package/dist/common/control-protocol.d.ts +10 -0
  15. package/dist/common/control-protocol.d.ts.map +1 -0
  16. package/dist/common/control-protocol.js +31 -0
  17. package/dist/common/errors.d.ts +6 -0
  18. package/dist/common/errors.d.ts.map +1 -0
  19. package/dist/common/errors.js +4 -0
  20. package/dist/common/event-type-translation.d.ts +24 -0
  21. package/dist/common/event-type-translation.d.ts.map +1 -0
  22. package/dist/common/event-type-translation.js +117 -0
  23. package/dist/common/helpers.d.ts +41 -0
  24. package/dist/common/helpers.d.ts.map +1 -0
  25. package/dist/common/helpers.js +124 -0
  26. package/dist/common/install-initial-domain-mapping.d.ts +4 -0
  27. package/dist/common/install-initial-domain-mapping.d.ts.map +1 -0
  28. package/dist/common/install-initial-domain-mapping.js +58 -0
  29. package/dist/common/install-initial-domain-mapping.test.d.ts +2 -0
  30. package/dist/common/install-initial-domain-mapping.test.d.ts.map +1 -0
  31. package/dist/common/install-initial-domain-mapping.test.js +207 -0
  32. package/dist/deprecated/adapter/index.d.ts +62 -0
  33. package/dist/deprecated/adapter/index.d.ts.map +1 -0
  34. package/dist/deprecated/adapter/index.js +151 -0
  35. package/dist/deprecated/common/helpers.d.ts +7 -0
  36. package/dist/deprecated/common/helpers.d.ts.map +1 -0
  37. package/dist/deprecated/common/helpers.js +47 -0
  38. package/dist/deprecated/demo-extractor/external_domain_metadata.json +38 -0
  39. package/dist/deprecated/demo-extractor/index.d.ts +18 -0
  40. package/dist/deprecated/demo-extractor/index.d.ts.map +1 -0
  41. package/dist/deprecated/demo-extractor/index.js +161 -0
  42. package/dist/deprecated/http/client.d.ts +22 -0
  43. package/dist/deprecated/http/client.d.ts.map +1 -0
  44. package/dist/deprecated/http/client.js +161 -0
  45. package/dist/deprecated/uploader/index.d.ts +35 -0
  46. package/dist/deprecated/uploader/index.d.ts.map +1 -0
  47. package/dist/deprecated/uploader/index.js +161 -0
  48. package/dist/http/axios-client-internal.d.ts +3 -0
  49. package/dist/http/axios-client-internal.d.ts.map +1 -0
  50. package/dist/http/axios-client-internal.js +66 -0
  51. package/dist/http/axios-client-internal.test.d.ts +2 -0
  52. package/dist/http/axios-client-internal.test.d.ts.map +1 -0
  53. package/dist/http/axios-client-internal.test.js +154 -0
  54. package/dist/http/axios-client.d.ts +27 -0
  55. package/dist/http/axios-client.d.ts.map +1 -0
  56. package/dist/http/axios-client.js +57 -0
  57. package/dist/http/constants.d.ts +4 -0
  58. package/dist/http/constants.d.ts.map +1 -0
  59. package/dist/http/constants.js +6 -0
  60. package/dist/http/index.d.ts +3 -0
  61. package/dist/http/index.d.ts.map +1 -0
  62. package/dist/http/index.js +18 -0
  63. package/dist/http/types.d.ts +17 -0
  64. package/dist/http/types.d.ts.map +1 -0
  65. package/dist/http/types.js +2 -0
  66. package/dist/index.d.ts +14 -0
  67. package/dist/index.d.ts.map +1 -0
  68. package/dist/index.js +34 -0
  69. package/dist/logger/logger.constants.d.ts +6 -0
  70. package/dist/logger/logger.constants.d.ts.map +1 -0
  71. package/dist/logger/logger.constants.js +13 -0
  72. package/dist/logger/logger.context.d.ts +58 -0
  73. package/dist/logger/logger.context.d.ts.map +1 -0
  74. package/dist/logger/logger.context.js +86 -0
  75. package/dist/logger/logger.d.ts +89 -0
  76. package/dist/logger/logger.d.ts.map +1 -0
  77. package/dist/logger/logger.interfaces.d.ts +43 -0
  78. package/dist/logger/logger.interfaces.d.ts.map +1 -0
  79. package/dist/logger/logger.interfaces.js +9 -0
  80. package/dist/logger/logger.js +196 -0
  81. package/dist/logger/logger.test.d.ts +2 -0
  82. package/dist/logger/logger.test.d.ts.map +1 -0
  83. package/dist/logger/logger.test.js +490 -0
  84. package/dist/mappers/mappers.d.ts +52 -0
  85. package/dist/mappers/mappers.d.ts.map +1 -0
  86. package/dist/mappers/mappers.interface.d.ts +294 -0
  87. package/dist/mappers/mappers.interface.d.ts.map +1 -0
  88. package/dist/mappers/mappers.interface.js +48 -0
  89. package/dist/mappers/mappers.js +83 -0
  90. package/dist/mappers/mappers.test.d.ts +2 -0
  91. package/dist/mappers/mappers.test.d.ts.map +1 -0
  92. package/dist/mappers/mappers.test.js +107 -0
  93. package/dist/multithreading/create-worker.d.ts +5 -0
  94. package/dist/multithreading/create-worker.d.ts.map +1 -0
  95. package/dist/multithreading/create-worker.js +28 -0
  96. package/dist/multithreading/create-worker.test.d.ts +2 -0
  97. package/dist/multithreading/create-worker.test.d.ts.map +1 -0
  98. package/dist/multithreading/create-worker.test.js +89 -0
  99. package/dist/multithreading/process-task.d.ts +3 -0
  100. package/dist/multithreading/process-task.d.ts.map +1 -0
  101. package/dist/multithreading/process-task.js +58 -0
  102. package/dist/multithreading/spawn/spawn.d.ts +30 -0
  103. package/dist/multithreading/spawn/spawn.d.ts.map +1 -0
  104. package/dist/multithreading/spawn/spawn.helpers.d.ts +21 -0
  105. package/dist/multithreading/spawn/spawn.helpers.d.ts.map +1 -0
  106. package/dist/multithreading/spawn/spawn.helpers.js +114 -0
  107. package/dist/multithreading/spawn/spawn.helpers.test.d.ts +2 -0
  108. package/dist/multithreading/spawn/spawn.helpers.test.d.ts.map +1 -0
  109. package/dist/multithreading/spawn/spawn.helpers.test.js +293 -0
  110. package/dist/multithreading/spawn/spawn.js +249 -0
  111. package/dist/multithreading/worker-adapter/worker-adapter.artifacts.test.d.ts +2 -0
  112. package/dist/multithreading/worker-adapter/worker-adapter.artifacts.test.d.ts.map +1 -0
  113. package/dist/multithreading/worker-adapter/worker-adapter.artifacts.test.js +127 -0
  114. package/dist/multithreading/worker-adapter/worker-adapter.d.ts +91 -0
  115. package/dist/multithreading/worker-adapter/worker-adapter.d.ts.map +1 -0
  116. package/dist/multithreading/worker-adapter/worker-adapter.helpers.d.ts +22 -0
  117. package/dist/multithreading/worker-adapter/worker-adapter.helpers.d.ts.map +1 -0
  118. package/dist/multithreading/worker-adapter/worker-adapter.helpers.js +64 -0
  119. package/dist/multithreading/worker-adapter/worker-adapter.helpers.test.d.ts +2 -0
  120. package/dist/multithreading/worker-adapter/worker-adapter.helpers.test.d.ts.map +1 -0
  121. package/dist/multithreading/worker-adapter/worker-adapter.helpers.test.js +514 -0
  122. package/dist/multithreading/worker-adapter/worker-adapter.js +747 -0
  123. package/dist/multithreading/worker-adapter/worker-adapter.test.d.ts +2 -0
  124. package/dist/multithreading/worker-adapter/worker-adapter.test.d.ts.map +1 -0
  125. package/dist/multithreading/worker-adapter/worker-adapter.test.js +483 -0
  126. package/dist/multithreading/worker.d.ts +2 -0
  127. package/dist/multithreading/worker.d.ts.map +1 -0
  128. package/dist/multithreading/worker.js +9 -0
  129. package/dist/repo/repo.d.ts +18 -0
  130. package/dist/repo/repo.d.ts.map +1 -0
  131. package/dist/repo/repo.interfaces.d.ts +46 -0
  132. package/dist/repo/repo.interfaces.d.ts.map +1 -0
  133. package/dist/repo/repo.interfaces.js +2 -0
  134. package/dist/repo/repo.js +75 -0
  135. package/dist/repo/repo.test.d.ts +2 -0
  136. package/dist/repo/repo.test.d.ts.map +1 -0
  137. package/dist/repo/repo.test.js +131 -0
  138. package/dist/state/state.d.ts +30 -0
  139. package/dist/state/state.d.ts.map +1 -0
  140. package/dist/state/state.interfaces.d.ts +51 -0
  141. package/dist/state/state.interfaces.d.ts.map +1 -0
  142. package/dist/state/state.interfaces.js +21 -0
  143. package/dist/state/state.js +166 -0
  144. package/dist/state/state.test.d.ts +2 -0
  145. package/dist/state/state.test.d.ts.map +1 -0
  146. package/dist/state/state.test.js +224 -0
  147. package/dist/types/common.d.ts +50 -0
  148. package/dist/types/common.d.ts.map +1 -0
  149. package/dist/types/common.js +25 -0
  150. package/dist/types/extraction.d.ts +417 -0
  151. package/dist/types/extraction.d.ts.map +1 -0
  152. package/dist/types/extraction.js +170 -0
  153. package/dist/types/extraction.test.d.ts +2 -0
  154. package/dist/types/extraction.test.d.ts.map +1 -0
  155. package/dist/types/extraction.test.js +70 -0
  156. package/dist/types/index.d.ts +9 -0
  157. package/dist/types/index.d.ts.map +1 -0
  158. package/dist/types/index.js +18 -0
  159. package/dist/types/loading.d.ts +147 -0
  160. package/dist/types/loading.d.ts.map +1 -0
  161. package/dist/types/loading.js +48 -0
  162. package/dist/types/workers.d.ts +161 -0
  163. package/dist/types/workers.d.ts.map +1 -0
  164. package/dist/types/workers.js +22 -0
  165. package/dist/uploader/uploader.d.ts +92 -0
  166. package/dist/uploader/uploader.d.ts.map +1 -0
  167. package/dist/uploader/uploader.helpers.d.ts +33 -0
  168. package/dist/uploader/uploader.helpers.d.ts.map +1 -0
  169. package/dist/uploader/uploader.helpers.js +139 -0
  170. package/dist/uploader/uploader.helpers.test.d.ts +2 -0
  171. package/dist/uploader/uploader.helpers.test.d.ts.map +1 -0
  172. package/dist/uploader/uploader.helpers.test.js +267 -0
  173. package/dist/uploader/uploader.interfaces.d.ts +95 -0
  174. package/dist/uploader/uploader.interfaces.d.ts.map +1 -0
  175. package/dist/uploader/uploader.interfaces.js +2 -0
  176. package/dist/uploader/uploader.js +305 -0
  177. package/dist/uploader/uploader.test.d.ts +2 -0
  178. package/dist/uploader/uploader.test.d.ts.map +1 -0
  179. package/dist/uploader/uploader.test.js +589 -0
  180. package/package.json +60 -0
@@ -0,0 +1,50 @@
1
+ import { Artifact } from '../uploader/uploader.interfaces';
2
+ /**
3
+ * ErrorLevel is an enum that represents the level of an error.
4
+ * @deprecated
5
+ */
6
+ export declare enum ErrorLevel {
7
+ Warning = "WARNING",
8
+ Error = "ERROR",
9
+ Info = "INFO"
10
+ }
11
+ /**
12
+ * ErrorRecord is an interface that defines the structure of an error record.
13
+ */
14
+ export interface ErrorRecord {
15
+ message: string;
16
+ }
17
+ /**
18
+ * LogRecord is an interface that defines the structure of a log record.
19
+ * @deprecated
20
+ */
21
+ export interface LogRecord {
22
+ level: ErrorLevel;
23
+ message: string;
24
+ }
25
+ /**
26
+ * AdapterUpdateParams is an interface that defines the structure of the parameters that can be passed to the update adapter.
27
+ * @deprecated
28
+ */
29
+ export interface AdapterUpdateParams {
30
+ artifact?: Artifact;
31
+ }
32
+ /**
33
+ * InitialDomainMapping is an interface that defines the structure of the initial domain mapping.
34
+ */
35
+ export interface InitialDomainMapping {
36
+ starting_recipe_blueprint?: object;
37
+ additional_mappings?: object;
38
+ }
39
+ /**
40
+ * SyncMode is an enum that defines the different modes of sync that can be used by the external extractor.
41
+ * It can be either INITIAL, INCREMENTAL or LOADING. INITIAL mode is used for
42
+ * the first/initial import, while INCREMENTAL mode is used for doing syncs. LOADING mode is used for
43
+ * loading data from DevRev to the external system.
44
+ */
45
+ export declare enum SyncMode {
46
+ INITIAL = "INITIAL",
47
+ INCREMENTAL = "INCREMENTAL",
48
+ LOADING = "LOADING"
49
+ }
50
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D;;;GAGG;AACH,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;GAKG;AACH,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;CACpB"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SyncMode = exports.ErrorLevel = void 0;
4
+ /**
5
+ * ErrorLevel is an enum that represents the level of an error.
6
+ * @deprecated
7
+ */
8
+ var ErrorLevel;
9
+ (function (ErrorLevel) {
10
+ ErrorLevel["Warning"] = "WARNING";
11
+ ErrorLevel["Error"] = "ERROR";
12
+ ErrorLevel["Info"] = "INFO";
13
+ })(ErrorLevel || (exports.ErrorLevel = ErrorLevel = {}));
14
+ /**
15
+ * SyncMode is an enum that defines the different modes of sync that can be used by the external extractor.
16
+ * It can be either INITIAL, INCREMENTAL or LOADING. INITIAL mode is used for
17
+ * the first/initial import, while INCREMENTAL mode is used for doing syncs. LOADING mode is used for
18
+ * loading data from DevRev to the external system.
19
+ */
20
+ var SyncMode;
21
+ (function (SyncMode) {
22
+ SyncMode["INITIAL"] = "INITIAL";
23
+ SyncMode["INCREMENTAL"] = "INCREMENTAL";
24
+ SyncMode["LOADING"] = "LOADING";
25
+ })(SyncMode || (exports.SyncMode = SyncMode = {}));
@@ -0,0 +1,417 @@
1
+ import { InputData } from '@devrev/typescript-sdk/dist/snap-ins';
2
+ import { Artifact } from '../uploader/uploader.interfaces';
3
+ import { ErrorRecord } from './common';
4
+ import { AxiosResponse } from 'axios';
5
+ import { NormalizedAttachment } from '../repo/repo.interfaces';
6
+ import { WorkerAdapter } from '../multithreading/worker-adapter/worker-adapter';
7
+ import { DonV2, LoaderReport, RateLimited } from './loading';
8
+ /**
9
+ * EventType is an enum that defines the different types of events that can be sent to the external extractor from ADaaS.
10
+ * The external extractor can use these events to know what to do next in the extraction process.
11
+ */
12
+ export declare enum EventType {
13
+ /**
14
+ * @deprecated Use StartExtractingExternalSyncUnits instead
15
+ */
16
+ ExtractionExternalSyncUnitsStart = "EXTRACTION_EXTERNAL_SYNC_UNITS_START",
17
+ /**
18
+ * @deprecated Use StartExtractingMetadata instead
19
+ */
20
+ ExtractionMetadataStart = "EXTRACTION_METADATA_START",
21
+ /**
22
+ * @deprecated Use StartExtractingData instead
23
+ */
24
+ ExtractionDataStart = "EXTRACTION_DATA_START",
25
+ /**
26
+ * @deprecated Use ContinueExtractingData instead
27
+ */
28
+ ExtractionDataContinue = "EXTRACTION_DATA_CONTINUE",
29
+ /**
30
+ * @deprecated Use StartDeletingExtractorState instead
31
+ */
32
+ ExtractionDataDelete = "EXTRACTION_DATA_DELETE",
33
+ /**
34
+ * @deprecated Use StartExtractingAttachments instead
35
+ */
36
+ ExtractionAttachmentsStart = "EXTRACTION_ATTACHMENTS_START",
37
+ /**
38
+ * @deprecated Use ContinueExtractingAttachments instead
39
+ */
40
+ ExtractionAttachmentsContinue = "EXTRACTION_ATTACHMENTS_CONTINUE",
41
+ /**
42
+ * @deprecated Use StartDeletingExtractorAttachmentsState instead
43
+ */
44
+ ExtractionAttachmentsDelete = "EXTRACTION_ATTACHMENTS_DELETE",
45
+ StartLoadingData = "START_LOADING_DATA",
46
+ ContinueLoadingData = "CONTINUE_LOADING_DATA",
47
+ StartLoadingAttachments = "START_LOADING_ATTACHMENTS",
48
+ ContinueLoadingAttachments = "CONTINUE_LOADING_ATTACHMENTS",
49
+ StartDeletingLoaderState = "START_DELETING_LOADER_STATE",
50
+ StartDeletingLoaderAttachmentState = "START_DELETING_LOADER_ATTACHMENT_STATE",
51
+ UnknownEventType = "UNKNOWN_EVENT_TYPE",
52
+ StartExtractingExternalSyncUnits = "START_EXTRACTING_EXTERNAL_SYNC_UNITS",
53
+ StartExtractingMetadata = "START_EXTRACTING_METADATA",
54
+ StartExtractingData = "START_EXTRACTING_DATA",
55
+ ContinueExtractingData = "CONTINUE_EXTRACTING_DATA",
56
+ StartDeletingExtractorState = "START_DELETING_EXTRACTOR_STATE",
57
+ StartExtractingAttachments = "START_EXTRACTING_ATTACHMENTS",
58
+ ContinueExtractingAttachments = "CONTINUE_EXTRACTING_ATTACHMENTS",
59
+ StartDeletingExtractorAttachmentsState = "START_DELETING_EXTRACTOR_ATTACHMENTS_STATE"
60
+ }
61
+ /**
62
+ * ExtractorEventType is an enum that defines the different types of events that can be sent from the external extractor to ADaaS.
63
+ * The external extractor can use these events to inform ADaaS about the progress of the extraction process.
64
+ */
65
+ export declare enum ExtractorEventType {
66
+ /**
67
+ * @deprecated Use ExternalSyncUnitExtractionDone instead
68
+ */
69
+ ExtractionExternalSyncUnitsDone = "EXTRACTION_EXTERNAL_SYNC_UNITS_DONE",
70
+ /**
71
+ * @deprecated Use ExternalSyncUnitExtractionError instead
72
+ */
73
+ ExtractionExternalSyncUnitsError = "EXTRACTION_EXTERNAL_SYNC_UNITS_ERROR",
74
+ /**
75
+ * @deprecated Use MetadataExtractionDone instead
76
+ */
77
+ ExtractionMetadataDone = "EXTRACTION_METADATA_DONE",
78
+ /**
79
+ * @deprecated Use MetadataExtractionError instead
80
+ */
81
+ ExtractionMetadataError = "EXTRACTION_METADATA_ERROR",
82
+ /**
83
+ * @deprecated Use DataExtractionProgress instead
84
+ */
85
+ ExtractionDataProgress = "EXTRACTION_DATA_PROGRESS",
86
+ /**
87
+ * @deprecated Use DataExtractionDelayed instead
88
+ */
89
+ ExtractionDataDelay = "EXTRACTION_DATA_DELAY",
90
+ /**
91
+ * @deprecated Use DataExtractionDone instead
92
+ */
93
+ ExtractionDataDone = "EXTRACTION_DATA_DONE",
94
+ /**
95
+ * @deprecated Use DataExtractionError instead
96
+ */
97
+ ExtractionDataError = "EXTRACTION_DATA_ERROR",
98
+ /**
99
+ * @deprecated Use ExtractorStateDeletionDone instead
100
+ */
101
+ ExtractionDataDeleteDone = "EXTRACTION_DATA_DELETE_DONE",
102
+ /**
103
+ * @deprecated Use ExtractorStateDeletionError instead
104
+ */
105
+ ExtractionDataDeleteError = "EXTRACTION_DATA_DELETE_ERROR",
106
+ /**
107
+ * @deprecated Use AttachmentExtractionProgress instead
108
+ */
109
+ ExtractionAttachmentsProgress = "EXTRACTION_ATTACHMENTS_PROGRESS",
110
+ /**
111
+ * @deprecated Use AttachmentExtractionDelayed instead
112
+ */
113
+ ExtractionAttachmentsDelay = "EXTRACTION_ATTACHMENTS_DELAY",
114
+ /**
115
+ * @deprecated Use AttachmentExtractionDone instead
116
+ */
117
+ ExtractionAttachmentsDone = "EXTRACTION_ATTACHMENTS_DONE",
118
+ /**
119
+ * @deprecated Use AttachmentExtractionError instead
120
+ */
121
+ ExtractionAttachmentsError = "EXTRACTION_ATTACHMENTS_ERROR",
122
+ /**
123
+ * @deprecated Use ExtractorAttachmentsStateDeletionDone instead
124
+ */
125
+ ExtractionAttachmentsDeleteDone = "EXTRACTION_ATTACHMENTS_DELETE_DONE",
126
+ /**
127
+ * @deprecated Use ExtractorAttachmentsStateDeletionError instead
128
+ */
129
+ ExtractionAttachmentsDeleteError = "EXTRACTION_ATTACHMENTS_DELETE_ERROR",
130
+ UnknownEventType = "UNKNOWN_EVENT_TYPE",
131
+ ExternalSyncUnitExtractionDone = "EXTERNAL_SYNC_UNIT_EXTRACTION_DONE",
132
+ ExternalSyncUnitExtractionError = "EXTERNAL_SYNC_UNIT_EXTRACTION_ERROR",
133
+ MetadataExtractionDone = "METADATA_EXTRACTION_DONE",
134
+ MetadataExtractionError = "METADATA_EXTRACTION_ERROR",
135
+ DataExtractionProgress = "DATA_EXTRACTION_PROGRESS",
136
+ DataExtractionDelayed = "DATA_EXTRACTION_DELAYED",
137
+ DataExtractionDone = "DATA_EXTRACTION_DONE",
138
+ DataExtractionError = "DATA_EXTRACTION_ERROR",
139
+ ExtractorStateDeletionDone = "EXTRACTOR_STATE_DELETION_DONE",
140
+ ExtractorStateDeletionError = "EXTRACTOR_STATE_DELETION_ERROR",
141
+ AttachmentExtractionProgress = "ATTACHMENT_EXTRACTION_PROGRESS",
142
+ AttachmentExtractionDelayed = "ATTACHMENT_EXTRACTION_DELAYED",
143
+ AttachmentExtractionDone = "ATTACHMENT_EXTRACTION_DONE",
144
+ AttachmentExtractionError = "ATTACHMENT_EXTRACTION_ERROR",
145
+ ExtractorAttachmentsStateDeletionDone = "EXTRACTOR_ATTACHMENTS_STATE_DELETION_DONE",
146
+ ExtractorAttachmentsStateDeletionError = "EXTRACTOR_ATTACHMENTS_STATE_DELETION_ERROR"
147
+ }
148
+ /**
149
+ * @deprecated
150
+ * ExtractionMode is an enum that defines the different modes of extraction that can be used by the external extractor.
151
+ * It can be either INITIAL or INCREMENTAL. INITIAL mode is used for the first/initial import, while INCREMENTAL mode is used for doing syncs.
152
+ */
153
+ export declare enum ExtractionMode {
154
+ INITIAL = "INITIAL",
155
+ INCREMENTAL = "INCREMENTAL"
156
+ }
157
+ /**
158
+ * ExternalSyncUnit is an interface that defines the structure of an external sync unit (repos, projects, ...) that can be extracted.
159
+ * It must contain an ID, a name, and a description. It can also contain the number of items in the external sync unit.
160
+ */
161
+ export interface ExternalSyncUnit {
162
+ id: string;
163
+ name: string;
164
+ description: string;
165
+ item_count?: number;
166
+ item_type?: string;
167
+ }
168
+ /**
169
+ * InitialSyncScope is an enum that defines the different scopes of initial sync that can be used by the external extractor.
170
+ */
171
+ export declare enum InitialSyncScope {
172
+ FULL_HISTORY = "full-history",
173
+ TIME_SCOPED = "time-scoped"
174
+ }
175
+ /**
176
+ * EventContextIn is an interface that defines the structure of the input event context that is sent to the external extractor from ADaaS.
177
+ * @deprecated
178
+ */
179
+ export interface EventContextIn {
180
+ callback_url: string;
181
+ dev_org: string;
182
+ dev_org_id: string;
183
+ dev_user: string;
184
+ dev_user_id: string;
185
+ external_sync_unit: string;
186
+ external_sync_unit_id: string;
187
+ external_sync_unit_name: string;
188
+ external_system: string;
189
+ external_system_type: string;
190
+ import_slug: string;
191
+ mode: string;
192
+ request_id: string;
193
+ snap_in_slug: string;
194
+ sync_run: string;
195
+ sync_run_id: string;
196
+ sync_tier: string;
197
+ sync_unit: DonV2;
198
+ sync_unit_id: string;
199
+ uuid: string;
200
+ worker_data_url: string;
201
+ }
202
+ /**
203
+ * EventContextOut is an interface that defines the structure of the output event context that is sent from the external extractor to ADaaS.
204
+ * @deprecated
205
+ */
206
+ export interface EventContextOut {
207
+ uuid: string;
208
+ sync_run: string;
209
+ sync_unit?: string;
210
+ }
211
+ /**
212
+ * EventContext is an interface that defines the structure of the event context that is sent to the external connector from Airdrop.
213
+ */
214
+ export interface EventContext {
215
+ callback_url: string;
216
+ /**
217
+ * @deprecated dev_org is deprecated and should not be used. Use dev_oid instead.
218
+ */
219
+ dev_org: string;
220
+ dev_oid: string;
221
+ dev_org_id: string;
222
+ /**
223
+ * @deprecated dev_user is deprecated and should not be used. Use dev_uid instead.
224
+ */
225
+ dev_user: string;
226
+ /**
227
+ * @deprecated dev_user_id is deprecated and should not be used. Use dev_uid instead.
228
+ */
229
+ dev_user_id: string;
230
+ dev_uid: string;
231
+ event_type_adaas: string;
232
+ /**
233
+ * @deprecated external_sync_unit is deprecated and should not be used. Use external_sync_unit_id instead.
234
+ */
235
+ external_sync_unit: string;
236
+ external_sync_unit_id: string;
237
+ external_sync_unit_name: string;
238
+ /**
239
+ * @deprecated external_system is deprecated and should not be used. Use external_system_id instead.
240
+ */
241
+ external_system: string;
242
+ external_system_id: string;
243
+ external_system_name: string;
244
+ external_system_type: string;
245
+ extract_from?: string;
246
+ import_slug: string;
247
+ initial_sync_scope?: InitialSyncScope;
248
+ mode: string;
249
+ request_id: string;
250
+ request_id_adaas: string;
251
+ /**
252
+ * @deprecated reset_extraction is deprecated and should not be used. Use reset_extract_from instead.
253
+ */
254
+ reset_extraction?: boolean;
255
+ reset_extract_from?: boolean;
256
+ run_id: string;
257
+ sequence_version: string;
258
+ snap_in_slug: string;
259
+ snap_in_version_id: string;
260
+ /**
261
+ * @deprecated sync_run is deprecated and should not be used. Use run_id instead.
262
+ */
263
+ sync_run: string;
264
+ /**
265
+ * @deprecated sync_run_id is deprecated and should not be used. Use run_id instead.
266
+ */
267
+ sync_run_id: string;
268
+ sync_tier: string;
269
+ sync_unit: DonV2;
270
+ sync_unit_id: string;
271
+ /**
272
+ * @deprecated uuid is deprecated and should not be used. Use request_id_adaas instead.
273
+ */
274
+ uuid: string;
275
+ worker_data_url: string;
276
+ }
277
+ /**
278
+ * ConnectionData is an interface that defines the structure of the connection data that is sent to the external extractor from ADaaS.
279
+ * It contains the organization ID, organization name, key, and key type.
280
+ */
281
+ export interface ConnectionData {
282
+ org_id: string;
283
+ org_name: string;
284
+ key: string;
285
+ key_type: string;
286
+ }
287
+ /**
288
+ * EventData is an interface that defines the structure of the event data that is sent from the external extractor to ADaaS.
289
+ */
290
+ export interface EventData {
291
+ external_sync_units?: ExternalSyncUnit[];
292
+ /**
293
+ * @deprecated This field is deprecated and should not be used. Progress is
294
+ * now calculated on the backend.
295
+ */
296
+ progress?: number;
297
+ error?: ErrorRecord;
298
+ delay?: number;
299
+ /**
300
+ * @deprecated This field is deprecated and should not be used.
301
+ */
302
+ artifacts?: Artifact[];
303
+ reports?: LoaderReport[];
304
+ processed_files?: string[];
305
+ stats_file?: string;
306
+ }
307
+ /**
308
+ * WorkerMetadata is an interface that defines the structure of the worker metadata that is sent from the external extractor to ADaaS.
309
+ */
310
+ export interface WorkerMetadata {
311
+ adaas_library_version: string;
312
+ }
313
+ /**
314
+ * DomainObject is an interface that defines the structure of a domain object that can be extracted.
315
+ * It must contain a name, a next chunk ID, the pages, the last modified date, whether it is done, and the count.
316
+ * @deprecated
317
+ */
318
+ export interface DomainObjectState {
319
+ name: string;
320
+ nextChunkId: number;
321
+ pages?: {
322
+ pages: number[];
323
+ };
324
+ lastModified: string;
325
+ isDone: boolean;
326
+ count: number;
327
+ }
328
+ /**
329
+ * AirdropEvent is an interface that defines the structure of the event that is sent to the external extractor from ADaaS.
330
+ * It contains the context, payload, execution metadata, and input data as common snap-ins.
331
+ */
332
+ export interface AirdropEvent {
333
+ context: {
334
+ secrets: {
335
+ service_account_token: string;
336
+ };
337
+ snap_in_version_id: string;
338
+ snap_in_id: string;
339
+ };
340
+ payload: AirdropMessage;
341
+ execution_metadata: {
342
+ devrev_endpoint: string;
343
+ };
344
+ input_data: InputData;
345
+ }
346
+ /**
347
+ * AirdropMessage is an interface that defines the structure of the payload/message that is sent to the external extractor from ADaaS.
348
+ */
349
+ export interface AirdropMessage {
350
+ connection_data: ConnectionData;
351
+ event_context: EventContext;
352
+ event_type: EventType;
353
+ event_data?: EventData;
354
+ }
355
+ /**
356
+ * ExtractorEvent is an interface that defines the structure of the event that is sent from the external extractor to ADaaS.
357
+ * It contains the event type, event context, extractor state, and event data.
358
+ */
359
+ export interface ExtractorEvent {
360
+ event_type: string;
361
+ event_context: EventContext;
362
+ event_data?: EventData;
363
+ worker_metadata?: WorkerMetadata;
364
+ }
365
+ /**
366
+ * LoaderEvent
367
+ */
368
+ export interface LoaderEvent {
369
+ event_type: string;
370
+ event_context: EventContext;
371
+ event_data?: EventData;
372
+ worker_metadata?: WorkerMetadata;
373
+ }
374
+ export type ExternalSystemAttachmentStreamingFunction = ({ item, event, }: ExternalSystemAttachmentStreamingParams) => Promise<ExternalSystemAttachmentStreamingResponse>;
375
+ export interface ExternalSystemAttachmentStreamingParams {
376
+ item: NormalizedAttachment;
377
+ event: AirdropEvent;
378
+ }
379
+ export interface ExternalSystemAttachmentStreamingResponse {
380
+ httpStream?: AxiosResponse;
381
+ error?: ErrorRecord;
382
+ delay?: number;
383
+ }
384
+ export interface StreamAttachmentsResponse {
385
+ error?: ErrorRecord;
386
+ report?: LoaderReport;
387
+ rateLimit?: RateLimited;
388
+ }
389
+ export type ProcessAttachmentReturnType = {
390
+ delay?: number;
391
+ error?: {
392
+ message: string;
393
+ };
394
+ } | undefined;
395
+ export type StreamAttachmentsReturnType = {
396
+ delay?: number;
397
+ error?: ErrorRecord;
398
+ } | undefined;
399
+ export type ExternalSystemAttachmentReducerFunction<Batch, NewBatch, ConnectorState> = ({ attachments, adapter, batchSize, }: {
400
+ attachments: Batch;
401
+ adapter: WorkerAdapter<ConnectorState>;
402
+ batchSize?: number;
403
+ }) => NewBatch;
404
+ export type ExternalProcessAttachmentFunction = ({ attachment, stream, }: {
405
+ attachment: NormalizedAttachment;
406
+ stream: ExternalSystemAttachmentStreamingFunction;
407
+ }) => Promise<ProcessAttachmentReturnType>;
408
+ export type ExternalSystemAttachmentIteratorFunction<NewBatch, ConnectorState> = ({ reducedAttachments, adapter, stream, }: {
409
+ reducedAttachments: NewBatch;
410
+ adapter: WorkerAdapter<ConnectorState>;
411
+ stream: ExternalSystemAttachmentStreamingFunction;
412
+ }) => Promise<ProcessAttachmentReturnType>;
413
+ export interface ExternalSystemAttachmentProcessors<ConnectorState, Batch, NewBatch> {
414
+ reducer: ExternalSystemAttachmentReducerFunction<Batch, NewBatch, ConnectorState>;
415
+ iterator: ExternalSystemAttachmentIteratorFunction<NewBatch, ConnectorState>;
416
+ }
417
+ //# sourceMappingURL=extraction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../src/types/extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;A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AAE;IACD,kBAAkB,EAAE,QAAQ,CAAC;IAC7B,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACvC,MAAM,EAAE,yCAAyC,CAAC;CACnD,KAAK,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAE7C,MAAM,WAAW,kCAAkC,CACjD,cAAc,EACd,KAAK,EACL,QAAQ;IAER,OAAO,EAAE,uCAAuC,CAC9C,KAAK,EACL,QAAQ,EACR,cAAc,CACf,CAAC;IACF,QAAQ,EAAE,wCAAwC,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;CAC9E"}
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InitialSyncScope = exports.ExtractionMode = exports.ExtractorEventType = exports.EventType = void 0;
4
+ /**
5
+ * EventType is an enum that defines the different types of events that can be sent to the external extractor from ADaaS.
6
+ * The external extractor can use these events to know what to do next in the extraction process.
7
+ */
8
+ var EventType;
9
+ (function (EventType) {
10
+ // Extraction - Old member names with OLD values (deprecated, kept for backwards compatibility)
11
+ /**
12
+ * @deprecated Use StartExtractingExternalSyncUnits instead
13
+ */
14
+ EventType["ExtractionExternalSyncUnitsStart"] = "EXTRACTION_EXTERNAL_SYNC_UNITS_START";
15
+ /**
16
+ * @deprecated Use StartExtractingMetadata instead
17
+ */
18
+ EventType["ExtractionMetadataStart"] = "EXTRACTION_METADATA_START";
19
+ /**
20
+ * @deprecated Use StartExtractingData instead
21
+ */
22
+ EventType["ExtractionDataStart"] = "EXTRACTION_DATA_START";
23
+ /**
24
+ * @deprecated Use ContinueExtractingData instead
25
+ */
26
+ EventType["ExtractionDataContinue"] = "EXTRACTION_DATA_CONTINUE";
27
+ /**
28
+ * @deprecated Use StartDeletingExtractorState instead
29
+ */
30
+ EventType["ExtractionDataDelete"] = "EXTRACTION_DATA_DELETE";
31
+ /**
32
+ * @deprecated Use StartExtractingAttachments instead
33
+ */
34
+ EventType["ExtractionAttachmentsStart"] = "EXTRACTION_ATTACHMENTS_START";
35
+ /**
36
+ * @deprecated Use ContinueExtractingAttachments instead
37
+ */
38
+ EventType["ExtractionAttachmentsContinue"] = "EXTRACTION_ATTACHMENTS_CONTINUE";
39
+ /**
40
+ * @deprecated Use StartDeletingExtractorAttachmentsState instead
41
+ */
42
+ EventType["ExtractionAttachmentsDelete"] = "EXTRACTION_ATTACHMENTS_DELETE";
43
+ // Loading
44
+ EventType["StartLoadingData"] = "START_LOADING_DATA";
45
+ EventType["ContinueLoadingData"] = "CONTINUE_LOADING_DATA";
46
+ EventType["StartLoadingAttachments"] = "START_LOADING_ATTACHMENTS";
47
+ EventType["ContinueLoadingAttachments"] = "CONTINUE_LOADING_ATTACHMENTS";
48
+ EventType["StartDeletingLoaderState"] = "START_DELETING_LOADER_STATE";
49
+ EventType["StartDeletingLoaderAttachmentState"] = "START_DELETING_LOADER_ATTACHMENT_STATE";
50
+ // Unknown
51
+ EventType["UnknownEventType"] = "UNKNOWN_EVENT_TYPE";
52
+ // Extraction - New member names with NEW values (preferred)
53
+ EventType["StartExtractingExternalSyncUnits"] = "START_EXTRACTING_EXTERNAL_SYNC_UNITS";
54
+ EventType["StartExtractingMetadata"] = "START_EXTRACTING_METADATA";
55
+ EventType["StartExtractingData"] = "START_EXTRACTING_DATA";
56
+ EventType["ContinueExtractingData"] = "CONTINUE_EXTRACTING_DATA";
57
+ EventType["StartDeletingExtractorState"] = "START_DELETING_EXTRACTOR_STATE";
58
+ EventType["StartExtractingAttachments"] = "START_EXTRACTING_ATTACHMENTS";
59
+ EventType["ContinueExtractingAttachments"] = "CONTINUE_EXTRACTING_ATTACHMENTS";
60
+ EventType["StartDeletingExtractorAttachmentsState"] = "START_DELETING_EXTRACTOR_ATTACHMENTS_STATE";
61
+ })(EventType || (exports.EventType = EventType = {}));
62
+ /**
63
+ * ExtractorEventType is an enum that defines the different types of events that can be sent from the external extractor to ADaaS.
64
+ * The external extractor can use these events to inform ADaaS about the progress of the extraction process.
65
+ */
66
+ var ExtractorEventType;
67
+ (function (ExtractorEventType) {
68
+ // Extraction - Old member names with OLD values (deprecated, kept for backwards compatibility)
69
+ /**
70
+ * @deprecated Use ExternalSyncUnitExtractionDone instead
71
+ */
72
+ ExtractorEventType["ExtractionExternalSyncUnitsDone"] = "EXTRACTION_EXTERNAL_SYNC_UNITS_DONE";
73
+ /**
74
+ * @deprecated Use ExternalSyncUnitExtractionError instead
75
+ */
76
+ ExtractorEventType["ExtractionExternalSyncUnitsError"] = "EXTRACTION_EXTERNAL_SYNC_UNITS_ERROR";
77
+ /**
78
+ * @deprecated Use MetadataExtractionDone instead
79
+ */
80
+ ExtractorEventType["ExtractionMetadataDone"] = "EXTRACTION_METADATA_DONE";
81
+ /**
82
+ * @deprecated Use MetadataExtractionError instead
83
+ */
84
+ ExtractorEventType["ExtractionMetadataError"] = "EXTRACTION_METADATA_ERROR";
85
+ /**
86
+ * @deprecated Use DataExtractionProgress instead
87
+ */
88
+ ExtractorEventType["ExtractionDataProgress"] = "EXTRACTION_DATA_PROGRESS";
89
+ /**
90
+ * @deprecated Use DataExtractionDelayed instead
91
+ */
92
+ ExtractorEventType["ExtractionDataDelay"] = "EXTRACTION_DATA_DELAY";
93
+ /**
94
+ * @deprecated Use DataExtractionDone instead
95
+ */
96
+ ExtractorEventType["ExtractionDataDone"] = "EXTRACTION_DATA_DONE";
97
+ /**
98
+ * @deprecated Use DataExtractionError instead
99
+ */
100
+ ExtractorEventType["ExtractionDataError"] = "EXTRACTION_DATA_ERROR";
101
+ /**
102
+ * @deprecated Use ExtractorStateDeletionDone instead
103
+ */
104
+ ExtractorEventType["ExtractionDataDeleteDone"] = "EXTRACTION_DATA_DELETE_DONE";
105
+ /**
106
+ * @deprecated Use ExtractorStateDeletionError instead
107
+ */
108
+ ExtractorEventType["ExtractionDataDeleteError"] = "EXTRACTION_DATA_DELETE_ERROR";
109
+ /**
110
+ * @deprecated Use AttachmentExtractionProgress instead
111
+ */
112
+ ExtractorEventType["ExtractionAttachmentsProgress"] = "EXTRACTION_ATTACHMENTS_PROGRESS";
113
+ /**
114
+ * @deprecated Use AttachmentExtractionDelayed instead
115
+ */
116
+ ExtractorEventType["ExtractionAttachmentsDelay"] = "EXTRACTION_ATTACHMENTS_DELAY";
117
+ /**
118
+ * @deprecated Use AttachmentExtractionDone instead
119
+ */
120
+ ExtractorEventType["ExtractionAttachmentsDone"] = "EXTRACTION_ATTACHMENTS_DONE";
121
+ /**
122
+ * @deprecated Use AttachmentExtractionError instead
123
+ */
124
+ ExtractorEventType["ExtractionAttachmentsError"] = "EXTRACTION_ATTACHMENTS_ERROR";
125
+ /**
126
+ * @deprecated Use ExtractorAttachmentsStateDeletionDone instead
127
+ */
128
+ ExtractorEventType["ExtractionAttachmentsDeleteDone"] = "EXTRACTION_ATTACHMENTS_DELETE_DONE";
129
+ /**
130
+ * @deprecated Use ExtractorAttachmentsStateDeletionError instead
131
+ */
132
+ ExtractorEventType["ExtractionAttachmentsDeleteError"] = "EXTRACTION_ATTACHMENTS_DELETE_ERROR";
133
+ // Unknown
134
+ ExtractorEventType["UnknownEventType"] = "UNKNOWN_EVENT_TYPE";
135
+ // Extraction - New member names with NEW values (preferred)
136
+ ExtractorEventType["ExternalSyncUnitExtractionDone"] = "EXTERNAL_SYNC_UNIT_EXTRACTION_DONE";
137
+ ExtractorEventType["ExternalSyncUnitExtractionError"] = "EXTERNAL_SYNC_UNIT_EXTRACTION_ERROR";
138
+ ExtractorEventType["MetadataExtractionDone"] = "METADATA_EXTRACTION_DONE";
139
+ ExtractorEventType["MetadataExtractionError"] = "METADATA_EXTRACTION_ERROR";
140
+ ExtractorEventType["DataExtractionProgress"] = "DATA_EXTRACTION_PROGRESS";
141
+ ExtractorEventType["DataExtractionDelayed"] = "DATA_EXTRACTION_DELAYED";
142
+ ExtractorEventType["DataExtractionDone"] = "DATA_EXTRACTION_DONE";
143
+ ExtractorEventType["DataExtractionError"] = "DATA_EXTRACTION_ERROR";
144
+ ExtractorEventType["ExtractorStateDeletionDone"] = "EXTRACTOR_STATE_DELETION_DONE";
145
+ ExtractorEventType["ExtractorStateDeletionError"] = "EXTRACTOR_STATE_DELETION_ERROR";
146
+ ExtractorEventType["AttachmentExtractionProgress"] = "ATTACHMENT_EXTRACTION_PROGRESS";
147
+ ExtractorEventType["AttachmentExtractionDelayed"] = "ATTACHMENT_EXTRACTION_DELAYED";
148
+ ExtractorEventType["AttachmentExtractionDone"] = "ATTACHMENT_EXTRACTION_DONE";
149
+ ExtractorEventType["AttachmentExtractionError"] = "ATTACHMENT_EXTRACTION_ERROR";
150
+ ExtractorEventType["ExtractorAttachmentsStateDeletionDone"] = "EXTRACTOR_ATTACHMENTS_STATE_DELETION_DONE";
151
+ ExtractorEventType["ExtractorAttachmentsStateDeletionError"] = "EXTRACTOR_ATTACHMENTS_STATE_DELETION_ERROR";
152
+ })(ExtractorEventType || (exports.ExtractorEventType = ExtractorEventType = {}));
153
+ /**
154
+ * @deprecated
155
+ * ExtractionMode is an enum that defines the different modes of extraction that can be used by the external extractor.
156
+ * It can be either INITIAL or INCREMENTAL. INITIAL mode is used for the first/initial import, while INCREMENTAL mode is used for doing syncs.
157
+ */
158
+ var ExtractionMode;
159
+ (function (ExtractionMode) {
160
+ ExtractionMode["INITIAL"] = "INITIAL";
161
+ ExtractionMode["INCREMENTAL"] = "INCREMENTAL";
162
+ })(ExtractionMode || (exports.ExtractionMode = ExtractionMode = {}));
163
+ /**
164
+ * InitialSyncScope is an enum that defines the different scopes of initial sync that can be used by the external extractor.
165
+ */
166
+ var InitialSyncScope;
167
+ (function (InitialSyncScope) {
168
+ InitialSyncScope["FULL_HISTORY"] = "full-history";
169
+ InitialSyncScope["TIME_SCOPED"] = "time-scoped";
170
+ })(InitialSyncScope || (exports.InitialSyncScope = InitialSyncScope = {}));