@segment/public-api-sdk-typescript 32.0.2-b5006 → 33.0.2-b5330

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 (753) hide show
  1. package/README.md +31 -27
  2. package/api/aPICallsApi.ts +23 -815
  3. package/api/auditTrailApi.ts +12 -462
  4. package/api/catalogApi.ts +103 -2182
  5. package/api/deletionAndSuppressionApi.ts +174 -3281
  6. package/api/destinationFiltersApi.ts +112 -2449
  7. package/api/destinationsApi.ts +238 -2166
  8. package/api/edgeFunctionsApi.ts +13 -9
  9. package/api/eventsApi.ts +19 -625
  10. package/api/functionsApi.ts +120 -2289
  11. package/api/iAMGroupsApi.ts +232 -4750
  12. package/api/iAMRolesApi.ts +8 -347
  13. package/api/iAMUsersApi.ts +190 -3433
  14. package/api/labelsApi.ts +59 -1079
  15. package/api/monthlyTrackedUsersApi.ts +23 -815
  16. package/api/selectiveSyncApi.ts +156 -2538
  17. package/api/sourcesApi.ts +211 -4276
  18. package/api/spacesApi.ts +10 -7
  19. package/api/testingApi.ts +14 -317
  20. package/api/trackingPlansApi.ts +257 -4799
  21. package/api/transformationsApi.ts +60 -650
  22. package/api/warehousesApi.ts +200 -3827
  23. package/api/workspacesApi.ts +6 -306
  24. package/dist/api/aPICallsApi.d.ts +2 -50
  25. package/dist/api/aPICallsApi.js +18 -560
  26. package/dist/api/aPICallsApi.js.map +1 -1
  27. package/dist/api/apis.js +1 -1
  28. package/dist/api/auditTrailApi.d.ts +1 -25
  29. package/dist/api/auditTrailApi.js +8 -300
  30. package/dist/api/auditTrailApi.js.map +1 -1
  31. package/dist/api/catalogApi.d.ts +6 -150
  32. package/dist/api/catalogApi.js +65 -1568
  33. package/dist/api/catalogApi.js.map +1 -1
  34. package/dist/api/deletionAndSuppressionApi.d.ts +8 -200
  35. package/dist/api/deletionAndSuppressionApi.js +105 -2195
  36. package/dist/api/deletionAndSuppressionApi.js.map +1 -1
  37. package/dist/api/destinationFiltersApi.d.ts +6 -150
  38. package/dist/api/destinationFiltersApi.js +71 -1658
  39. package/dist/api/destinationFiltersApi.js.map +1 -1
  40. package/dist/api/destinationsApi.d.ts +6 -134
  41. package/dist/api/destinationsApi.js +155 -1518
  42. package/dist/api/destinationsApi.js.map +1 -1
  43. package/dist/api/edgeFunctionsApi.js +9 -9
  44. package/dist/api/edgeFunctionsApi.js.map +1 -1
  45. package/dist/api/eventsApi.d.ts +1 -25
  46. package/dist/api/eventsApi.js +10 -353
  47. package/dist/api/eventsApi.js.map +1 -1
  48. package/dist/api/functionsApi.d.ts +6 -150
  49. package/dist/api/functionsApi.js +75 -1608
  50. package/dist/api/functionsApi.js.map +1 -1
  51. package/dist/api/iAMGroupsApi.d.ts +12 -300
  52. package/dist/api/iAMGroupsApi.js +158 -3278
  53. package/dist/api/iAMGroupsApi.js.map +1 -1
  54. package/dist/api/iAMRolesApi.d.ts +1 -25
  55. package/dist/api/iAMRolesApi.js +8 -261
  56. package/dist/api/iAMRolesApi.js.map +1 -1
  57. package/dist/api/iAMUsersApi.d.ts +9 -225
  58. package/dist/api/iAMUsersApi.js +115 -2422
  59. package/dist/api/iAMUsersApi.js.map +1 -1
  60. package/dist/api/labelsApi.d.ts +3 -79
  61. package/dist/api/labelsApi.js +33 -781
  62. package/dist/api/labelsApi.js.map +1 -1
  63. package/dist/api/monthlyTrackedUsersApi.d.ts +2 -50
  64. package/dist/api/monthlyTrackedUsersApi.js +18 -560
  65. package/dist/api/monthlyTrackedUsersApi.js.map +1 -1
  66. package/dist/api/selectiveSyncApi.d.ts +6 -150
  67. package/dist/api/selectiveSyncApi.js +92 -1694
  68. package/dist/api/selectiveSyncApi.js.map +1 -1
  69. package/dist/api/sourcesApi.d.ts +11 -288
  70. package/dist/api/sourcesApi.js +143 -2976
  71. package/dist/api/sourcesApi.js.map +1 -1
  72. package/dist/api/spacesApi.js +7 -7
  73. package/dist/api/spacesApi.js.map +1 -1
  74. package/dist/api/testingApi.d.ts +1 -18
  75. package/dist/api/testingApi.js +7 -211
  76. package/dist/api/testingApi.js.map +1 -1
  77. package/dist/api/trackingPlansApi.d.ts +12 -300
  78. package/dist/api/trackingPlansApi.js +167 -3296
  79. package/dist/api/trackingPlansApi.js.map +1 -1
  80. package/dist/api/transformationsApi.d.ts +5 -45
  81. package/dist/api/transformationsApi.js +34 -457
  82. package/dist/api/transformationsApi.js.map +1 -1
  83. package/dist/api/warehousesApi.d.ts +10 -250
  84. package/dist/api/warehousesApi.js +132 -2686
  85. package/dist/api/warehousesApi.js.map +1 -1
  86. package/dist/api/workspacesApi.d.ts +1 -25
  87. package/dist/api/workspacesApi.js +7 -242
  88. package/dist/api/workspacesApi.js.map +1 -1
  89. package/dist/model/addLabelsToSource200Response.d.ts +2 -2
  90. package/dist/model/addLabelsToSource200Response.js +1 -1
  91. package/dist/model/addLabelsToSource200Response.js.map +1 -1
  92. package/dist/model/addLabelsToSource200Response1.d.ts +2 -2
  93. package/dist/model/addLabelsToSource200Response1.js +1 -1
  94. package/dist/model/addLabelsToSource200Response1.js.map +1 -1
  95. package/dist/model/createCloudSourceRegulationV1Input.d.ts +0 -1
  96. package/dist/model/createCloudSourceRegulationV1Input.js +0 -1
  97. package/dist/model/createCloudSourceRegulationV1Input.js.map +1 -1
  98. package/dist/model/createDestinationSubscriptionAlphaInput.d.ts +1 -1
  99. package/dist/model/createLabel200Response.d.ts +2 -2
  100. package/dist/model/createLabel200Response.js +1 -1
  101. package/dist/model/createLabel200Response.js.map +1 -1
  102. package/dist/model/createLabel200Response1.d.ts +2 -2
  103. package/dist/model/createLabel200Response1.js +1 -1
  104. package/dist/model/createLabel200Response1.js.map +1 -1
  105. package/dist/model/createSource200Response.d.ts +2 -2
  106. package/dist/model/createSource200Response.js +1 -1
  107. package/dist/model/createSource200Response.js.map +1 -1
  108. package/dist/model/createSource200Response1.d.ts +2 -2
  109. package/dist/model/createSource200Response1.js +1 -1
  110. package/dist/model/createSource200Response1.js.map +1 -1
  111. package/dist/model/createSourceAlphaInput.d.ts +1 -1
  112. package/dist/model/createSourceRegulationV1Input.d.ts +0 -1
  113. package/dist/model/createSourceRegulationV1Input.js +0 -1
  114. package/dist/model/createSourceRegulationV1Input.js.map +1 -1
  115. package/dist/model/createSourceV1Input.d.ts +1 -1
  116. package/dist/model/createTransformationBetaInput.d.ts +2 -0
  117. package/dist/model/createTransformationBetaInput.js +5 -0
  118. package/dist/model/createTransformationBetaInput.js.map +1 -1
  119. package/dist/model/createValidationInWarehouseV1Input.d.ts +1 -1
  120. package/dist/model/createWarehouseV1Input.d.ts +1 -1
  121. package/dist/model/createWorkspaceRegulationV1Input.d.ts +0 -1
  122. package/dist/model/createWorkspaceRegulationV1Input.js +0 -1
  123. package/dist/model/createWorkspaceRegulationV1Input.js.map +1 -1
  124. package/dist/model/deleteLabel200Response.d.ts +2 -2
  125. package/dist/model/deleteLabel200Response.js +1 -1
  126. package/dist/model/deleteLabel200Response.js.map +1 -1
  127. package/dist/model/deleteLabel200Response1.d.ts +2 -2
  128. package/dist/model/deleteLabel200Response1.js +1 -1
  129. package/dist/model/deleteLabel200Response1.js.map +1 -1
  130. package/dist/model/deleteSource200Response.d.ts +2 -2
  131. package/dist/model/deleteSource200Response.js +1 -1
  132. package/dist/model/deleteSource200Response.js.map +1 -1
  133. package/dist/model/deleteSource200Response1.d.ts +2 -2
  134. package/dist/model/deleteSource200Response1.js +1 -1
  135. package/dist/model/deleteSource200Response1.js.map +1 -1
  136. package/dist/model/deliveryMetricsSummary.js.map +1 -1
  137. package/dist/model/destination.js.map +1 -1
  138. package/dist/model/destination1.js.map +1 -1
  139. package/dist/model/destination2.js.map +1 -1
  140. package/dist/model/destinationMetadata.js.map +1 -1
  141. package/dist/model/destinationSubscription.d.ts +1 -1
  142. package/dist/model/destinationSubscriptionUpdateInput.d.ts +1 -1
  143. package/dist/model/echo200Response.d.ts +2 -2
  144. package/dist/model/echo200Response.js +1 -1
  145. package/dist/model/echo200Response.js.map +1 -1
  146. package/dist/model/echo200Response1.d.ts +2 -2
  147. package/dist/model/echo200Response1.js +1 -1
  148. package/dist/model/echo200Response1.js.map +1 -1
  149. package/dist/model/edgeFunctions.js.map +1 -1
  150. package/dist/model/edgeFunctions1.js.map +1 -1
  151. package/dist/model/filter.js.map +1 -1
  152. package/dist/model/filter1.js.map +1 -1
  153. package/dist/model/filter2.js.map +1 -1
  154. package/dist/model/filter3.js.map +1 -1
  155. package/dist/model/function.js.map +1 -1
  156. package/dist/model/function1.js.map +1 -1
  157. package/dist/model/function2.js.map +1 -1
  158. package/dist/model/getSource200Response.d.ts +2 -2
  159. package/dist/model/getSource200Response.js +1 -1
  160. package/dist/model/getSource200Response.js.map +1 -1
  161. package/dist/model/getSource200Response1.d.ts +2 -2
  162. package/dist/model/getSource200Response1.js +1 -1
  163. package/dist/model/getSource200Response1.js.map +1 -1
  164. package/dist/model/group.js.map +1 -1
  165. package/dist/model/identify.js.map +1 -1
  166. package/dist/model/input.d.ts +1 -1
  167. package/dist/model/input.js.map +1 -1
  168. package/dist/model/label.js.map +1 -1
  169. package/dist/model/label1.js.map +1 -1
  170. package/dist/model/label2.js.map +1 -1
  171. package/dist/model/listConnectedDestinationsFromSource200Response.d.ts +2 -2
  172. package/dist/model/listConnectedDestinationsFromSource200Response.js +1 -1
  173. package/dist/model/listConnectedDestinationsFromSource200Response.js.map +1 -1
  174. package/dist/model/listConnectedDestinationsFromSource200Response1.d.ts +2 -2
  175. package/dist/model/listConnectedDestinationsFromSource200Response1.js +1 -1
  176. package/dist/model/listConnectedDestinationsFromSource200Response1.js.map +1 -1
  177. package/dist/model/listConnectedWarehousesFromSource200Response.d.ts +2 -2
  178. package/dist/model/listConnectedWarehousesFromSource200Response.js +1 -1
  179. package/dist/model/listConnectedWarehousesFromSource200Response.js.map +1 -1
  180. package/dist/model/listConnectedWarehousesFromSource200Response1.d.ts +2 -2
  181. package/dist/model/listConnectedWarehousesFromSource200Response1.js +1 -1
  182. package/dist/model/listConnectedWarehousesFromSource200Response1.js.map +1 -1
  183. package/dist/model/listLabels200Response.d.ts +2 -2
  184. package/dist/model/listLabels200Response.js +1 -1
  185. package/dist/model/listLabels200Response.js.map +1 -1
  186. package/dist/model/listLabels200Response1.d.ts +2 -2
  187. package/dist/model/listLabels200Response1.js +1 -1
  188. package/dist/model/listLabels200Response1.js.map +1 -1
  189. package/dist/model/listSources200Response.d.ts +2 -2
  190. package/dist/model/listSources200Response.js +1 -1
  191. package/dist/model/listSources200Response.js.map +1 -1
  192. package/dist/model/listSources200Response1.d.ts +2 -2
  193. package/dist/model/listSources200Response1.js +1 -1
  194. package/dist/model/listSources200Response1.js.map +1 -1
  195. package/dist/model/logos.js.map +1 -1
  196. package/dist/model/logos1.js.map +1 -1
  197. package/dist/model/logos2.js.map +1 -1
  198. package/dist/model/metadata.js.map +1 -1
  199. package/dist/model/metadata1.js.map +1 -1
  200. package/dist/model/metadata2.js.map +1 -1
  201. package/dist/model/models.d.ts +3 -2
  202. package/dist/model/models.js +3 -0
  203. package/dist/model/models.js.map +1 -1
  204. package/dist/model/pagination.js.map +1 -1
  205. package/dist/model/previewDestinationFilterV1Output.d.ts +1 -1
  206. package/dist/model/previewDestinationFilterV1Output.js +1 -1
  207. package/dist/model/previewDestinationFilterV1Output.js.map +1 -1
  208. package/dist/model/propertyValueTransformationBeta.d.ts +15 -0
  209. package/dist/model/propertyValueTransformationBeta.js +26 -0
  210. package/dist/model/propertyValueTransformationBeta.js.map +1 -0
  211. package/dist/model/replaceLabelsInSource200Response.d.ts +2 -2
  212. package/dist/model/replaceLabelsInSource200Response.js +1 -1
  213. package/dist/model/replaceLabelsInSource200Response.js.map +1 -1
  214. package/dist/model/replaceLabelsInSource200Response1.d.ts +2 -2
  215. package/dist/model/replaceLabelsInSource200Response1.js +1 -1
  216. package/dist/model/replaceLabelsInSource200Response1.js.map +1 -1
  217. package/dist/model/schedule.js.map +1 -1
  218. package/dist/model/schedule1.js.map +1 -1
  219. package/dist/model/schedule2.js.map +1 -1
  220. package/dist/model/settings.js.map +1 -1
  221. package/dist/model/settings1.js.map +1 -1
  222. package/dist/model/source.js.map +1 -1
  223. package/dist/model/source1.d.ts +1 -1
  224. package/dist/model/source1.js.map +1 -1
  225. package/dist/model/source2.d.ts +1 -1
  226. package/dist/model/source2.js.map +1 -1
  227. package/dist/model/source3.d.ts +1 -1
  228. package/dist/model/source3.js.map +1 -1
  229. package/dist/model/source4.d.ts +1 -1
  230. package/dist/model/source4.js.map +1 -1
  231. package/dist/model/source5.d.ts +1 -1
  232. package/dist/model/source5.js.map +1 -1
  233. package/dist/model/source6.d.ts +1 -1
  234. package/dist/model/source6.js.map +1 -1
  235. package/dist/model/sourceAlpha.d.ts +1 -1
  236. package/dist/model/sourceMetadata.js.map +1 -1
  237. package/dist/model/sourceV1.d.ts +1 -1
  238. package/dist/model/subscription.d.ts +1 -1
  239. package/dist/model/subscription.js.map +1 -1
  240. package/dist/model/supportedFeatures.js.map +1 -1
  241. package/dist/model/supportedMethods.js.map +1 -1
  242. package/dist/model/supportedPlatforms.js.map +1 -1
  243. package/dist/model/track.js.map +1 -1
  244. package/dist/model/trackingPlan.js.map +1 -1
  245. package/dist/model/trackingPlan1.js.map +1 -1
  246. package/dist/model/transformation.d.ts +2 -0
  247. package/dist/model/transformation.js +5 -0
  248. package/dist/model/transformation.js.map +1 -1
  249. package/dist/model/transformation1.d.ts +2 -0
  250. package/dist/model/transformation1.js +5 -0
  251. package/dist/model/transformation1.js.map +1 -1
  252. package/dist/model/transformation2.d.ts +2 -0
  253. package/dist/model/transformation2.js +5 -0
  254. package/dist/model/transformation2.js.map +1 -1
  255. package/dist/model/transformationBeta.d.ts +2 -0
  256. package/dist/model/transformationBeta.js +5 -0
  257. package/dist/model/transformationBeta.js.map +1 -1
  258. package/dist/model/updateSource200Response.d.ts +2 -2
  259. package/dist/model/updateSource200Response.js +1 -1
  260. package/dist/model/updateSource200Response.js.map +1 -1
  261. package/dist/model/updateSource200Response1.d.ts +2 -2
  262. package/dist/model/updateSource200Response1.js +1 -1
  263. package/dist/model/updateSource200Response1.js.map +1 -1
  264. package/dist/model/updateSourceAlphaInput.d.ts +1 -1
  265. package/dist/model/updateSourceV1Input.d.ts +1 -1
  266. package/dist/model/updateTransformationBetaInput.d.ts +2 -0
  267. package/dist/model/updateTransformationBetaInput.js +5 -0
  268. package/dist/model/updateTransformationBetaInput.js.map +1 -1
  269. package/dist/model/updateWarehouseV1Input.d.ts +1 -1
  270. package/dist/model/user.js.map +1 -1
  271. package/dist/model/userGroup.js.map +1 -1
  272. package/dist/model/userGroup1.js.map +1 -1
  273. package/dist/model/userGroup2.js.map +1 -1
  274. package/dist/model/userGroup3.js.map +1 -1
  275. package/dist/model/warehouse.d.ts +1 -1
  276. package/dist/model/warehouse.js.map +1 -1
  277. package/dist/model/warehouse1.d.ts +1 -1
  278. package/dist/model/warehouse1.js.map +1 -1
  279. package/dist/model/warehouse2.d.ts +1 -1
  280. package/dist/model/warehouse2.js.map +1 -1
  281. package/dist/model/warehouseMetadata.js.map +1 -1
  282. package/dist/model/warehouseV1.d.ts +1 -1
  283. package/dist/model/workspace.js.map +1 -1
  284. package/dist/tests/smoke.test.js +7 -7
  285. package/dist/tests/smoke.test.js.map +1 -1
  286. package/model/aPICallSnapshotV1.ts +1 -1
  287. package/model/accessPermissionV1.ts +1 -1
  288. package/model/addConnectionFromSourceToWarehouse200Response.ts +1 -1
  289. package/model/addConnectionFromSourceToWarehouseV1Output.ts +1 -1
  290. package/model/addLabelsToSource200Response.ts +4 -4
  291. package/model/addLabelsToSource200Response1.ts +4 -4
  292. package/model/addLabelsToSourceAlphaInput.ts +1 -1
  293. package/model/addLabelsToSourceAlphaOutput.ts +1 -1
  294. package/model/addLabelsToSourceV1Input.ts +1 -1
  295. package/model/addLabelsToSourceV1Output.ts +1 -1
  296. package/model/addPermissionsToUser200Response.ts +1 -1
  297. package/model/addPermissionsToUserGroup200Response.ts +1 -1
  298. package/model/addPermissionsToUserGroupV1Input.ts +1 -1
  299. package/model/addPermissionsToUserGroupV1Output.ts +1 -1
  300. package/model/addPermissionsToUserV1Input.ts +1 -1
  301. package/model/addPermissionsToUserV1Output.ts +1 -1
  302. package/model/addSourceToTrackingPlan200Response.ts +1 -1
  303. package/model/addSourceToTrackingPlanV1Input.ts +1 -1
  304. package/model/addSourceToTrackingPlanV1Output.ts +1 -1
  305. package/model/addUsersToUserGroup200Response.ts +1 -1
  306. package/model/addUsersToUserGroupV1Input.ts +1 -1
  307. package/model/addUsersToUserGroupV1Output.ts +1 -1
  308. package/model/advancedWarehouseSyncScheduleV1Input.ts +1 -1
  309. package/model/advancedWarehouseSyncScheduleV1Output.ts +1 -1
  310. package/model/allowedLabelBeta.ts +1 -1
  311. package/model/auditEventV1.ts +1 -1
  312. package/model/batchQueryMessagingSubscriptionsForSpace200Response.ts +1 -1
  313. package/model/batchQueryMessagingSubscriptionsForSpaceAlphaInput.ts +1 -1
  314. package/model/batchQueryMessagingSubscriptionsForSpaceAlphaOutput.ts +1 -1
  315. package/model/breakdownBeta.ts +1 -1
  316. package/model/commonSourceSettingsV1.ts +1 -1
  317. package/model/contact.ts +1 -1
  318. package/model/createCloudSourceRegulation200Response.ts +1 -1
  319. package/model/createCloudSourceRegulationV1Input.ts +1 -2
  320. package/model/createCloudSourceRegulationV1Output.ts +1 -1
  321. package/model/createDestination200Response.ts +1 -1
  322. package/model/createDestinationSubscription200Response.ts +1 -1
  323. package/model/createDestinationSubscriptionAlphaInput.ts +2 -2
  324. package/model/createDestinationSubscriptionAlphaOutput.ts +1 -1
  325. package/model/createDestinationV1Input.ts +1 -1
  326. package/model/createDestinationV1Output.ts +1 -1
  327. package/model/createEdgeFunctions200Response.ts +1 -1
  328. package/model/createEdgeFunctionsAlphaInput.ts +1 -1
  329. package/model/createEdgeFunctionsAlphaOutput.ts +1 -1
  330. package/model/createFilterForDestination200Response.ts +1 -1
  331. package/model/createFilterForDestinationV1Input.ts +1 -1
  332. package/model/createFilterForDestinationV1Output.ts +1 -1
  333. package/model/createFunction200Response.ts +1 -1
  334. package/model/createFunctionDeployment200Response.ts +1 -1
  335. package/model/createFunctionDeploymentV1Output.ts +1 -1
  336. package/model/createFunctionV1Input.ts +1 -1
  337. package/model/createFunctionV1Output.ts +1 -1
  338. package/model/createInvites200Response.ts +1 -1
  339. package/model/createInvitesV1Input.ts +1 -1
  340. package/model/createInvitesV1Output.ts +1 -1
  341. package/model/createLabel200Response.ts +4 -4
  342. package/model/createLabel200Response1.ts +4 -4
  343. package/model/createLabelAlphaInput.ts +1 -1
  344. package/model/createLabelAlphaOutput.ts +1 -1
  345. package/model/createLabelV1Input.ts +1 -1
  346. package/model/createLabelV1Output.ts +1 -1
  347. package/model/createSource200Response.ts +4 -4
  348. package/model/createSource200Response1.ts +4 -4
  349. package/model/createSourceAlphaInput.ts +2 -2
  350. package/model/createSourceAlphaOutput.ts +1 -1
  351. package/model/createSourceRegulation200Response.ts +1 -1
  352. package/model/createSourceRegulationV1Input.ts +1 -2
  353. package/model/createSourceRegulationV1Output.ts +1 -1
  354. package/model/createSourceV1Input.ts +2 -2
  355. package/model/createSourceV1Output.ts +1 -1
  356. package/model/createTrackingPlan200Response.ts +1 -1
  357. package/model/createTrackingPlanV1Input.ts +1 -1
  358. package/model/createTrackingPlanV1Output.ts +1 -1
  359. package/model/createTransformation200Response.ts +1 -1
  360. package/model/createTransformationBetaInput.ts +11 -1
  361. package/model/createTransformationBetaOutput.ts +1 -1
  362. package/model/createUserGroup200Response.ts +1 -1
  363. package/model/createUserGroupV1Input.ts +1 -1
  364. package/model/createUserGroupV1Output.ts +1 -1
  365. package/model/createValidationInWarehouse200Response.ts +1 -1
  366. package/model/createValidationInWarehouseV1Input.ts +2 -2
  367. package/model/createValidationInWarehouseV1Output.ts +1 -1
  368. package/model/createWarehouse200Response.ts +1 -1
  369. package/model/createWarehouseV1Input.ts +2 -2
  370. package/model/createWarehouseV1Output.ts +1 -1
  371. package/model/createWorkspaceRegulation200Response.ts +1 -1
  372. package/model/createWorkspaceRegulationV1Input.ts +1 -2
  373. package/model/createWorkspaceRegulationV1Output.ts +1 -1
  374. package/model/deleteDestination200Response.ts +1 -1
  375. package/model/deleteDestinationV1Output.ts +1 -1
  376. package/model/deleteFunction200Response.ts +1 -1
  377. package/model/deleteFunctionV1Output.ts +1 -1
  378. package/model/deleteInvites200Response.ts +1 -1
  379. package/model/deleteInvitesV1Output.ts +1 -1
  380. package/model/deleteLabel200Response.ts +4 -4
  381. package/model/deleteLabel200Response1.ts +4 -4
  382. package/model/deleteLabelAlphaOutput.ts +1 -1
  383. package/model/deleteLabelV1Output.ts +1 -1
  384. package/model/deleteRegulation200Response.ts +1 -1
  385. package/model/deleteRegulationV1Output.ts +1 -1
  386. package/model/deleteSource200Response.ts +4 -4
  387. package/model/deleteSource200Response1.ts +4 -4
  388. package/model/deleteSourceAlphaOutput.ts +1 -1
  389. package/model/deleteSourceV1Output.ts +1 -1
  390. package/model/deleteTrackingPlan200Response.ts +1 -1
  391. package/model/deleteTrackingPlanV1Output.ts +1 -1
  392. package/model/deleteTransformation200Response.ts +1 -1
  393. package/model/deleteTransformationBetaOutput.ts +1 -1
  394. package/model/deleteUserGroup200Response.ts +1 -1
  395. package/model/deleteUserGroupV1Output.ts +1 -1
  396. package/model/deleteUsers200Response.ts +1 -1
  397. package/model/deleteUsersV1Output.ts +1 -1
  398. package/model/deleteWarehouse200Response.ts +1 -1
  399. package/model/deleteWarehouseV1Output.ts +1 -1
  400. package/model/deliveryMetricsSummary.ts +2 -1
  401. package/model/deliveryMetricsSummaryBeta.ts +1 -1
  402. package/model/destination.ts +2 -1
  403. package/model/destination1.ts +2 -1
  404. package/model/destination2.ts +2 -1
  405. package/model/destinationFilterActionV1.ts +1 -1
  406. package/model/destinationFilterV1.ts +1 -1
  407. package/model/destinationMetadata.ts +2 -1
  408. package/model/destinationMetadataActionFieldV1.ts +1 -1
  409. package/model/destinationMetadataActionV1.ts +1 -1
  410. package/model/destinationMetadataComponentV1.ts +1 -1
  411. package/model/destinationMetadataFeaturesV1.ts +1 -1
  412. package/model/destinationMetadataMethodsV1.ts +1 -1
  413. package/model/destinationMetadataPlatformsV1.ts +1 -1
  414. package/model/destinationMetadataSubscriptionPresetV1.ts +1 -1
  415. package/model/destinationMetadataV1.ts +1 -1
  416. package/model/destinationStatusV1.ts +1 -1
  417. package/model/destinationSubscription.ts +2 -2
  418. package/model/destinationSubscriptionUpdateInput.ts +2 -2
  419. package/model/destinationV1.ts +1 -1
  420. package/model/disableEdgeFunctions200Response.ts +1 -1
  421. package/model/disableEdgeFunctionsAlphaOutput.ts +1 -1
  422. package/model/echo200Response.ts +4 -4
  423. package/model/echo200Response1.ts +4 -4
  424. package/model/echoAlphaOutput.ts +1 -1
  425. package/model/echoV1Output.ts +1 -1
  426. package/model/edgeFunctions.ts +2 -1
  427. package/model/edgeFunctions1.ts +2 -1
  428. package/model/edgeFunctionsAlpha.ts +1 -1
  429. package/model/eventSourceV1.ts +1 -1
  430. package/model/filter.ts +2 -1
  431. package/model/filter1.ts +2 -1
  432. package/model/filter2.ts +2 -1
  433. package/model/filter3.ts +2 -1
  434. package/model/function.ts +2 -1
  435. package/model/function1.ts +2 -1
  436. package/model/function2.ts +2 -1
  437. package/model/functionDeployment.ts +1 -1
  438. package/model/functionSettingV1.ts +1 -1
  439. package/model/functionV1.ts +1 -1
  440. package/model/generateUploadURLForEdgeFunctions200Response.ts +1 -1
  441. package/model/generateUploadURLForEdgeFunctionsAlphaOutput.ts +1 -1
  442. package/model/getAdvancedSyncScheduleFromWarehouse200Response.ts +1 -1
  443. package/model/getAdvancedSyncScheduleFromWarehouseV1Output.ts +1 -1
  444. package/model/getConnectionStateFromWarehouse200Response.ts +1 -1
  445. package/model/getConnectionStateFromWarehouseV1Output.ts +1 -1
  446. package/model/getDailyPerSourceAPICallsUsage200Response.ts +1 -1
  447. package/model/getDailyPerSourceAPICallsUsageV1Output.ts +1 -1
  448. package/model/getDailyPerSourceMTUUsage200Response.ts +1 -1
  449. package/model/getDailyPerSourceMTUUsageV1Output.ts +1 -1
  450. package/model/getDailyWorkspaceAPICallsUsage200Response.ts +1 -1
  451. package/model/getDailyWorkspaceAPICallsUsageV1Output.ts +1 -1
  452. package/model/getDailyWorkspaceMTUUsage200Response.ts +1 -1
  453. package/model/getDailyWorkspaceMTUUsageV1Output.ts +1 -1
  454. package/model/getDestination200Response.ts +1 -1
  455. package/model/getDestinationMetadata200Response.ts +1 -1
  456. package/model/getDestinationMetadataV1Output.ts +1 -1
  457. package/model/getDestinationV1Output.ts +1 -1
  458. package/model/getDestinationsCatalog200Response.ts +1 -1
  459. package/model/getDestinationsCatalogV1Output.ts +1 -1
  460. package/model/getEventsVolumeFromWorkspace200Response.ts +1 -1
  461. package/model/getEventsVolumeFromWorkspaceV1Output.ts +1 -1
  462. package/model/getFilterInDestination200Response.ts +1 -1
  463. package/model/getFilterInDestinationV1Output.ts +1 -1
  464. package/model/getFunction200Response.ts +1 -1
  465. package/model/getFunctionV1Output.ts +1 -1
  466. package/model/getLatestFromEdgeFunctions200Response.ts +1 -1
  467. package/model/getLatestFromEdgeFunctionsAlphaOutput.ts +1 -1
  468. package/model/getMessagingSubscriptionFailureResponse.ts +1 -1
  469. package/model/getMessagingSubscriptionSuccessResponse.ts +1 -1
  470. package/model/getRegulation200Response.ts +1 -1
  471. package/model/getRegulationV1Output.ts +1 -1
  472. package/model/getSource200Response.ts +4 -4
  473. package/model/getSource200Response1.ts +4 -4
  474. package/model/getSourceAlphaOutput.ts +1 -1
  475. package/model/getSourceMetadata200Response.ts +1 -1
  476. package/model/getSourceMetadataV1Output.ts +1 -1
  477. package/model/getSourceV1Output.ts +1 -1
  478. package/model/getSourcesCatalog200Response.ts +1 -1
  479. package/model/getSourcesCatalogV1Output.ts +1 -1
  480. package/model/getSpace200Response.ts +1 -1
  481. package/model/getSpaceAlphaOutput.ts +1 -1
  482. package/model/getSubscriptionFromDestination200Response.ts +1 -1
  483. package/model/getSubscriptionFromDestinationAlphaOutput.ts +1 -1
  484. package/model/getSubscriptionRequest.ts +1 -1
  485. package/model/getTrackingPlan200Response.ts +1 -1
  486. package/model/getTrackingPlanV1Output.ts +1 -1
  487. package/model/getTransformation200Response.ts +1 -1
  488. package/model/getTransformationBetaOutput.ts +1 -1
  489. package/model/getUser200Response.ts +1 -1
  490. package/model/getUserGroup200Response.ts +1 -1
  491. package/model/getUserGroupV1Output.ts +1 -1
  492. package/model/getUserV1Output.ts +1 -1
  493. package/model/getWarehouse200Response.ts +1 -1
  494. package/model/getWarehouseMetadata200Response.ts +1 -1
  495. package/model/getWarehouseMetadataV1Output.ts +1 -1
  496. package/model/getWarehouseV1Output.ts +1 -1
  497. package/model/getWarehousesCatalog200Response.ts +1 -1
  498. package/model/getWarehousesCatalogV1Output.ts +1 -1
  499. package/model/getWorkspace200Response.ts +1 -1
  500. package/model/getWorkspaceV1Output.ts +1 -1
  501. package/model/group.ts +2 -1
  502. package/model/groupSourceSettingsV1.ts +1 -1
  503. package/model/identify.ts +2 -1
  504. package/model/identifySourceSettingsV1.ts +1 -1
  505. package/model/input.ts +3 -2
  506. package/model/integrationOptionBeta.ts +1 -1
  507. package/model/invitePermissionV1.ts +1 -1
  508. package/model/inviteV1.ts +1 -1
  509. package/model/label.ts +2 -1
  510. package/model/label1.ts +2 -1
  511. package/model/label2.ts +2 -1
  512. package/model/labelAlpha.ts +1 -1
  513. package/model/labelV1.ts +1 -1
  514. package/model/listAuditEvents200Response.ts +1 -1
  515. package/model/listAuditEventsV1Output.ts +1 -1
  516. package/model/listConnectedDestinationsFromSource200Response.ts +4 -4
  517. package/model/listConnectedDestinationsFromSource200Response1.ts +4 -4
  518. package/model/listConnectedDestinationsFromSourceAlphaOutput.ts +1 -1
  519. package/model/listConnectedDestinationsFromSourceV1Output.ts +1 -1
  520. package/model/listConnectedSourcesFromWarehouse200Response.ts +1 -1
  521. package/model/listConnectedSourcesFromWarehouseV1Output.ts +1 -1
  522. package/model/listConnectedWarehousesFromSource200Response.ts +4 -4
  523. package/model/listConnectedWarehousesFromSource200Response1.ts +4 -4
  524. package/model/listConnectedWarehousesFromSourceAlphaOutput.ts +1 -1
  525. package/model/listConnectedWarehousesFromSourceV1Output.ts +1 -1
  526. package/model/listDeliveryMetricsSummaryFromDestination200Response.ts +1 -1
  527. package/model/listDeliveryMetricsSummaryFromDestinationBetaOutput.ts +1 -1
  528. package/model/listDestinations200Response.ts +1 -1
  529. package/model/listDestinationsV1Output.ts +1 -1
  530. package/model/listFiltersFromDestination200Response.ts +1 -1
  531. package/model/listFiltersFromDestinationV1Output.ts +1 -1
  532. package/model/listFunctionItemV1.ts +1 -1
  533. package/model/listFunctions200Response.ts +1 -1
  534. package/model/listFunctionsV1Output.ts +1 -1
  535. package/model/listInvites200Response.ts +1 -1
  536. package/model/listInvitesFromUserGroup200Response.ts +1 -1
  537. package/model/listInvitesFromUserGroupV1Output.ts +1 -1
  538. package/model/listInvitesV1Output.ts +1 -1
  539. package/model/listLabels200Response.ts +4 -4
  540. package/model/listLabels200Response1.ts +4 -4
  541. package/model/listLabelsAlphaOutput.ts +1 -1
  542. package/model/listLabelsV1Output.ts +1 -1
  543. package/model/listRegulationsFromSource200Response.ts +1 -1
  544. package/model/listRegulationsFromSourceV1Output.ts +1 -1
  545. package/model/listRoles200Response.ts +1 -1
  546. package/model/listRolesV1Output.ts +1 -1
  547. package/model/listRulesFromTrackingPlan200Response.ts +1 -1
  548. package/model/listRulesFromTrackingPlanV1Output.ts +1 -1
  549. package/model/listSchemaSettingsInSource200Response.ts +1 -1
  550. package/model/listSchemaSettingsInSourceV1Output.ts +1 -1
  551. package/model/listSelectiveSyncsFromWarehouseAndSource200Response.ts +1 -1
  552. package/model/listSelectiveSyncsFromWarehouseAndSourceV1Output.ts +1 -1
  553. package/model/listSources200Response.ts +4 -4
  554. package/model/listSources200Response1.ts +4 -4
  555. package/model/listSourcesAlphaOutput.ts +1 -1
  556. package/model/listSourcesFromTrackingPlan200Response.ts +1 -1
  557. package/model/listSourcesFromTrackingPlanV1Output.ts +1 -1
  558. package/model/listSourcesV1Output.ts +1 -1
  559. package/model/listSubscriptionsFromDestination200Response.ts +1 -1
  560. package/model/listSubscriptionsFromDestinationAlphaOutput.ts +1 -1
  561. package/model/listSuppressions200Response.ts +1 -1
  562. package/model/listSuppressionsV1Output.ts +1 -1
  563. package/model/listSyncsFromWarehouse200Response.ts +1 -1
  564. package/model/listSyncsFromWarehouseAndSource200Response.ts +1 -1
  565. package/model/listSyncsFromWarehouseAndSourceV1Output.ts +1 -1
  566. package/model/listSyncsFromWarehouseV1Output.ts +1 -1
  567. package/model/listTrackingPlans200Response.ts +1 -1
  568. package/model/listTrackingPlansV1Output.ts +1 -1
  569. package/model/listTransformations200Response.ts +1 -1
  570. package/model/listTransformationsBetaOutput.ts +1 -1
  571. package/model/listUserGroups200Response.ts +1 -1
  572. package/model/listUserGroupsFromUser200Response.ts +1 -1
  573. package/model/listUserGroupsFromUserV1Output.ts +1 -1
  574. package/model/listUserGroupsV1Output.ts +1 -1
  575. package/model/listUsers200Response.ts +1 -1
  576. package/model/listUsersFromUserGroup200Response.ts +1 -1
  577. package/model/listUsersFromUserGroupV1Output.ts +1 -1
  578. package/model/listUsersV1Output.ts +1 -1
  579. package/model/listWarehouses200Response.ts +1 -1
  580. package/model/listWarehousesV1Output.ts +1 -1
  581. package/model/listWorkspaceRegulations200Response.ts +1 -1
  582. package/model/listWorkspaceRegulationsV1Output.ts +1 -1
  583. package/model/logos.ts +2 -1
  584. package/model/logos1.ts +2 -1
  585. package/model/logos2.ts +2 -1
  586. package/model/logosBeta.ts +1 -1
  587. package/model/messageSubscriptionResponse.ts +1 -1
  588. package/model/messageSubscriptionResponseError.ts +1 -1
  589. package/model/messagesSubscriptionRequest.ts +1 -1
  590. package/model/metadata.ts +2 -1
  591. package/model/metadata1.ts +2 -1
  592. package/model/metadata2.ts +2 -1
  593. package/model/metricBeta.ts +1 -1
  594. package/model/minimalUserGroupV1.ts +1 -1
  595. package/model/minimalUserV1.ts +1 -1
  596. package/model/models.ts +3 -0
  597. package/model/mtuSnapshotV1.ts +1 -1
  598. package/model/pagination.ts +2 -1
  599. package/model/paginationInput.ts +1 -1
  600. package/model/paginationOutput.ts +1 -1
  601. package/model/permissionInputV1.ts +1 -1
  602. package/model/permissionResourceV1.ts +1 -1
  603. package/model/permissionV1.ts +1 -1
  604. package/model/previewDestinationFilter200Response.ts +1 -1
  605. package/model/previewDestinationFilterV1.ts +1 -1
  606. package/model/previewDestinationFilterV1Input.ts +1 -1
  607. package/model/previewDestinationFilterV1Output.ts +3 -3
  608. package/model/propertyRenameBeta.ts +1 -1
  609. package/model/propertyValueTransformationBeta.ts +47 -0
  610. package/model/regulation.ts +1 -1
  611. package/model/regulationListEntryV1.ts +1 -1
  612. package/model/removeFilterFromDestination200Response.ts +1 -1
  613. package/model/removeFilterFromDestinationV1Output.ts +1 -1
  614. package/model/removeRuleV1.ts +1 -1
  615. package/model/removeRulesFromTrackingPlan200Response.ts +1 -1
  616. package/model/removeRulesFromTrackingPlanV1Output.ts +1 -1
  617. package/model/removeSourceConnectionFromWarehouse200Response.ts +1 -1
  618. package/model/removeSourceConnectionFromWarehouseV1Output.ts +1 -1
  619. package/model/removeSourceFromTrackingPlan200Response.ts +1 -1
  620. package/model/removeSourceFromTrackingPlanV1Output.ts +1 -1
  621. package/model/removeSubscriptionFromDestination200Response.ts +1 -1
  622. package/model/removeSubscriptionFromDestinationAlphaOutput.ts +1 -1
  623. package/model/removeUsersFromUserGroup200Response.ts +1 -1
  624. package/model/removeUsersFromUserGroupV1Output.ts +1 -1
  625. package/model/replaceAdvancedSyncScheduleForWarehouse200Response.ts +1 -1
  626. package/model/replaceAdvancedSyncScheduleForWarehouseV1Input.ts +1 -1
  627. package/model/replaceAdvancedSyncScheduleForWarehouseV1Output.ts +1 -1
  628. package/model/replaceLabelsInSource200Response.ts +4 -4
  629. package/model/replaceLabelsInSource200Response1.ts +4 -4
  630. package/model/replaceLabelsInSourceAlphaInput.ts +1 -1
  631. package/model/replaceLabelsInSourceAlphaOutput.ts +1 -1
  632. package/model/replaceLabelsInSourceV1Input.ts +1 -1
  633. package/model/replaceLabelsInSourceV1Output.ts +1 -1
  634. package/model/replaceMessagingSubscriptionsInSpaces200Response.ts +1 -1
  635. package/model/replaceMessagingSubscriptionsInSpacesAlphaInput.ts +1 -1
  636. package/model/replaceMessagingSubscriptionsInSpacesAlphaOutput.ts +1 -1
  637. package/model/replacePermissionsForUser200Response.ts +1 -1
  638. package/model/replacePermissionsForUserGroup200Response.ts +1 -1
  639. package/model/replacePermissionsForUserGroupV1Input.ts +1 -1
  640. package/model/replacePermissionsForUserGroupV1Output.ts +1 -1
  641. package/model/replacePermissionsForUserV1Input.ts +1 -1
  642. package/model/replacePermissionsForUserV1Output.ts +1 -1
  643. package/model/replaceRulesInTrackingPlan200Response.ts +1 -1
  644. package/model/replaceRulesInTrackingPlanV1Input.ts +1 -1
  645. package/model/replaceRulesInTrackingPlanV1Output.ts +1 -1
  646. package/model/replaceUsersInUserGroup200Response.ts +1 -1
  647. package/model/replaceUsersInUserGroupV1Input.ts +1 -1
  648. package/model/replaceUsersInUserGroupV1Output.ts +1 -1
  649. package/model/requestError.ts +1 -1
  650. package/model/requestErrorEnvelope.ts +1 -1
  651. package/model/resourceV1.ts +1 -1
  652. package/model/roleV1.ts +1 -1
  653. package/model/ruleV1.ts +1 -1
  654. package/model/schedule.ts +2 -1
  655. package/model/schedule1.ts +2 -1
  656. package/model/schedule2.ts +2 -1
  657. package/model/settings.ts +2 -1
  658. package/model/settings1.ts +2 -1
  659. package/model/source.ts +2 -1
  660. package/model/source1.ts +3 -2
  661. package/model/source2.ts +3 -2
  662. package/model/source3.ts +3 -2
  663. package/model/source4.ts +3 -2
  664. package/model/source5.ts +3 -2
  665. package/model/source6.ts +3 -2
  666. package/model/sourceAPICallSnapshotV1.ts +1 -1
  667. package/model/sourceAlpha.ts +2 -2
  668. package/model/sourceEventVolumeDatapointV1.ts +1 -1
  669. package/model/sourceEventVolumeV1.ts +1 -1
  670. package/model/sourceMetadata.ts +2 -1
  671. package/model/sourceMetadataV1.ts +1 -1
  672. package/model/sourceSettingsOutputV1.ts +1 -1
  673. package/model/sourceV1.ts +2 -2
  674. package/model/space.ts +1 -1
  675. package/model/streamStatusV1.ts +1 -1
  676. package/model/subscription.ts +3 -2
  677. package/model/supportedFeatures.ts +2 -1
  678. package/model/supportedMethods.ts +2 -1
  679. package/model/supportedPlatforms.ts +2 -1
  680. package/model/suppressedInner.ts +1 -1
  681. package/model/syncNoticeV1.ts +1 -1
  682. package/model/syncV1.ts +1 -1
  683. package/model/track.ts +2 -1
  684. package/model/trackSourceSettingsV1.ts +1 -1
  685. package/model/trackingPlan.ts +2 -1
  686. package/model/trackingPlan1.ts +2 -1
  687. package/model/trackingPlanV1.ts +1 -1
  688. package/model/transformation.ts +12 -1
  689. package/model/transformation1.ts +12 -1
  690. package/model/transformation2.ts +12 -1
  691. package/model/transformationBeta.ts +11 -1
  692. package/model/updateDestination200Response.ts +1 -1
  693. package/model/updateDestinationV1Input.ts +1 -1
  694. package/model/updateDestinationV1Output.ts +1 -1
  695. package/model/updateFilterForDestination200Response.ts +1 -1
  696. package/model/updateFilterForDestinationV1Input.ts +1 -1
  697. package/model/updateFilterForDestinationV1Output.ts +1 -1
  698. package/model/updateFunction200Response.ts +1 -1
  699. package/model/updateFunctionV1Input.ts +1 -1
  700. package/model/updateFunctionV1Output.ts +1 -1
  701. package/model/updateRulesInTrackingPlan200Response.ts +1 -1
  702. package/model/updateRulesInTrackingPlanV1Input.ts +1 -1
  703. package/model/updateRulesInTrackingPlanV1Output.ts +1 -1
  704. package/model/updateSchemaSettingsInSource200Response.ts +1 -1
  705. package/model/updateSchemaSettingsInSourceV1Input.ts +1 -1
  706. package/model/updateSchemaSettingsInSourceV1Output.ts +1 -1
  707. package/model/updateSelectiveSyncForWarehouse200Response.ts +1 -1
  708. package/model/updateSelectiveSyncForWarehouseV1Input.ts +1 -1
  709. package/model/updateSelectiveSyncForWarehouseV1Output.ts +1 -1
  710. package/model/updateSource200Response.ts +4 -4
  711. package/model/updateSource200Response1.ts +4 -4
  712. package/model/updateSourceAlphaInput.ts +2 -2
  713. package/model/updateSourceAlphaOutput.ts +1 -1
  714. package/model/updateSourceV1Input.ts +2 -2
  715. package/model/updateSourceV1Output.ts +1 -1
  716. package/model/updateSubscriptionForDestination200Response.ts +1 -1
  717. package/model/updateSubscriptionForDestinationAlphaInput.ts +1 -1
  718. package/model/updateSubscriptionForDestinationAlphaOutput.ts +1 -1
  719. package/model/updateTrackingPlan200Response.ts +1 -1
  720. package/model/updateTrackingPlanV1Input.ts +1 -1
  721. package/model/updateTrackingPlanV1Output.ts +1 -1
  722. package/model/updateTransformation200Response.ts +1 -1
  723. package/model/updateTransformationBetaInput.ts +11 -1
  724. package/model/updateTransformationBetaOutput.ts +1 -1
  725. package/model/updateUserGroup200Response.ts +1 -1
  726. package/model/updateUserGroupV1Input.ts +1 -1
  727. package/model/updateUserGroupV1Output.ts +1 -1
  728. package/model/updateWarehouse200Response.ts +1 -1
  729. package/model/updateWarehouseV1Input.ts +2 -2
  730. package/model/updateWarehouseV1Output.ts +1 -1
  731. package/model/upsertRuleV1.ts +1 -1
  732. package/model/user.ts +2 -1
  733. package/model/userGroup.ts +2 -1
  734. package/model/userGroup1.ts +2 -1
  735. package/model/userGroup2.ts +2 -1
  736. package/model/userGroup3.ts +2 -1
  737. package/model/userGroupV1.ts +1 -1
  738. package/model/userV1.ts +1 -1
  739. package/model/usersPerSourceSnapshotV1.ts +1 -1
  740. package/model/warehouse.ts +3 -2
  741. package/model/warehouse1.ts +3 -2
  742. package/model/warehouse2.ts +3 -2
  743. package/model/warehouseAdvancedSyncV1.ts +1 -1
  744. package/model/warehouseMetadata.ts +2 -1
  745. package/model/warehouseMetadataV1.ts +1 -1
  746. package/model/warehouseSelectiveSyncItemV1.ts +1 -1
  747. package/model/warehouseSyncOverrideV1.ts +1 -1
  748. package/model/warehouseV1.ts +2 -2
  749. package/model/workspace.ts +2 -1
  750. package/model/workspaceV1.ts +1 -1
  751. package/package.json +1 -1
  752. package/tests/__snapshots__/smoke.test.ts.snap +9 -9
  753. package/tests/smoke.test.ts +6 -6
@@ -2,7 +2,7 @@
2
2
  * Segment Public API
3
3
  * The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
4
4
  *
5
- * The version of the OpenAPI document: 32.0.2
5
+ * The version of the OpenAPI document: 33.0.2
6
6
  * Contact: friends@segment.com
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -124,7 +124,7 @@ export class DeletionAndSuppressionApi {
124
124
  * @param sourceId
125
125
  * @param CreateCloudSourceRegulationV1Input
126
126
  */
127
- public async createCloudSourceRegulationAlpha(
127
+ public async createCloudSourceRegulation(
128
128
  sourceId: string,
129
129
  CreateCloudSourceRegulationV1Input: CreateCloudSourceRegulationV1Input,
130
130
  options: { headers: { [name: string]: string } } = { headers: {} }
@@ -144,152 +144,23 @@ export class DeletionAndSuppressionApi {
144
144
  this._defaultHeaders
145
145
  );
146
146
  const produces = [
147
- 'application/vnd.segment.v1alpha+json',
147
+ 'application/vnd.segment.v1+json',
148
148
  'application/json',
149
- ];
150
- if (produces.indexOf('application/json') >= 0) {
151
- localVarHeaderParams.Accept = produces[0];
152
- } else {
153
- localVarHeaderParams.Accept = 'application/json';
154
- }
155
- let localVarFormParams: any = {};
156
-
157
- // verify required parameter 'sourceId' is not null or undefined
158
- if (sourceId === null || sourceId === undefined) {
159
- throw new Error(
160
- 'Required parameter sourceId was null or undefined when calling createCloudSourceRegulationAlpha.'
161
- );
162
- }
163
-
164
- // verify required parameter 'CreateCloudSourceRegulationV1Input' is not null or undefined
165
- if (
166
- CreateCloudSourceRegulationV1Input === null ||
167
- CreateCloudSourceRegulationV1Input === undefined
168
- ) {
169
- throw new Error(
170
- 'Required parameter CreateCloudSourceRegulationV1Input was null or undefined when calling createCloudSourceRegulationAlpha.'
171
- );
172
- }
173
-
174
- (<any>Object).assign(localVarHeaderParams, options.headers);
175
-
176
- let localVarUseFormData = false;
177
-
178
- let localVarRequestOptions: localVarRequest.Options = {
179
- method: 'POST',
180
- qs: localVarQueryParameters,
181
- headers: localVarHeaderParams,
182
- uri: localVarPath,
183
- useQuerystring: this._useQuerystring,
184
- json: true,
185
- body: ObjectSerializer.serialize(
186
- CreateCloudSourceRegulationV1Input,
187
- 'CreateCloudSourceRegulationV1Input'
188
- ),
189
- };
190
-
191
- let authenticationPromise = Promise.resolve();
192
- if (this.authentications.token.accessToken) {
193
- authenticationPromise = authenticationPromise.then(() =>
194
- this.authentications.token.applyToRequest(
195
- localVarRequestOptions
196
- )
197
- );
198
- }
199
- authenticationPromise = authenticationPromise.then(() =>
200
- this.authentications.default.applyToRequest(localVarRequestOptions)
201
- );
202
-
203
- let interceptorPromise = authenticationPromise;
204
- for (const interceptor of this.interceptors) {
205
- interceptorPromise = interceptorPromise.then(() =>
206
- interceptor(localVarRequestOptions)
207
- );
208
- }
209
-
210
- return interceptorPromise.then(() => {
211
- if (Object.keys(localVarFormParams).length) {
212
- if (localVarUseFormData) {
213
- (<any>localVarRequestOptions).formData = localVarFormParams;
214
- } else {
215
- localVarRequestOptions.form = localVarFormParams;
216
- }
217
- }
218
- return new Promise<{
219
- response: http.IncomingMessage;
220
- body: CreateCloudSourceRegulation200Response;
221
- }>((resolve, reject) => {
222
- localVarRequest(
223
- localVarRequestOptions,
224
- (error, response, body) => {
225
- if (error) {
226
- reject(error);
227
- } else {
228
- if (
229
- response.statusCode &&
230
- response.statusCode >= 200 &&
231
- response.statusCode <= 299
232
- ) {
233
- body = ObjectSerializer.deserialize(
234
- body,
235
- 'CreateCloudSourceRegulation200Response'
236
- );
237
- resolve({ response: response, body: body });
238
- } else {
239
- reject(
240
- new HttpError(
241
- response,
242
- body,
243
- response.statusCode
244
- )
245
- );
246
- }
247
- }
248
- }
249
- );
250
- });
251
- });
252
- }
253
- /**
254
- * Creates a Source-scoped regulation. Config API omitted fields: - `attributes`, - `userAgent`
255
- * @summary Create Cloud Source Regulation
256
- * @param sourceId
257
- * @param CreateCloudSourceRegulationV1Input
258
- */
259
- public async createCloudSourceRegulationBeta(
260
- sourceId: string,
261
- CreateCloudSourceRegulationV1Input: CreateCloudSourceRegulationV1Input,
262
- options: { headers: { [name: string]: string } } = { headers: {} }
263
- ): Promise<{
264
- response: http.IncomingMessage;
265
- body: CreateCloudSourceRegulation200Response;
266
- }> {
267
- const localVarPath =
268
- this.basePath +
269
- '/regulations/cloudsources/{sourceId}'.replace(
270
- '{' + 'sourceId' + '}',
271
- encodeURIComponent(String(sourceId))
272
- );
273
- let localVarQueryParameters: any = {};
274
- let localVarHeaderParams: any = (<any>Object).assign(
275
- {},
276
- this._defaultHeaders
277
- );
278
- const produces = [
279
149
  'application/vnd.segment.v1beta+json',
280
- 'application/json',
150
+ 'application/vnd.segment.v1alpha+json',
281
151
  ];
152
+ // give precedence to 'application/json'
282
153
  if (produces.indexOf('application/json') >= 0) {
283
- localVarHeaderParams.Accept = produces[0];
284
- } else {
285
154
  localVarHeaderParams.Accept = 'application/json';
155
+ } else {
156
+ localVarHeaderParams.Accept = produces.join(',');
286
157
  }
287
158
  let localVarFormParams: any = {};
288
159
 
289
160
  // verify required parameter 'sourceId' is not null or undefined
290
161
  if (sourceId === null || sourceId === undefined) {
291
162
  throw new Error(
292
- 'Required parameter sourceId was null or undefined when calling createCloudSourceRegulationBeta.'
163
+ 'Required parameter sourceId was null or undefined when calling createCloudSourceRegulation.'
293
164
  );
294
165
  }
295
166
 
@@ -299,7 +170,7 @@ export class DeletionAndSuppressionApi {
299
170
  CreateCloudSourceRegulationV1Input === undefined
300
171
  ) {
301
172
  throw new Error(
302
- 'Required parameter CreateCloudSourceRegulationV1Input was null or undefined when calling createCloudSourceRegulationBeta.'
173
+ 'Required parameter CreateCloudSourceRegulationV1Input was null or undefined when calling createCloudSourceRegulation.'
303
174
  );
304
175
  }
305
176
 
@@ -383,22 +254,22 @@ export class DeletionAndSuppressionApi {
383
254
  });
384
255
  }
385
256
  /**
386
- * Creates a Source-scoped regulation. Config API omitted fields: - `attributes`, - `userAgent`
387
- * @summary Create Cloud Source Regulation
257
+ * Creates a Source-scoped regulation. When called, this endpoint may generate the `Source Regulation Created` event in the [audit trail](/tag/Audit-Trail). Config API omitted fields: - `attributes`, - `userAgent`
258
+ * @summary Create Source Regulation
388
259
  * @param sourceId
389
- * @param CreateCloudSourceRegulationV1Input
260
+ * @param CreateSourceRegulationV1Input
390
261
  */
391
- public async createCloudSourceRegulationCurrent(
262
+ public async createSourceRegulation(
392
263
  sourceId: string,
393
- CreateCloudSourceRegulationV1Input: CreateCloudSourceRegulationV1Input,
264
+ CreateSourceRegulationV1Input: CreateSourceRegulationV1Input,
394
265
  options: { headers: { [name: string]: string } } = { headers: {} }
395
266
  ): Promise<{
396
267
  response: http.IncomingMessage;
397
- body: CreateCloudSourceRegulation200Response;
268
+ body: CreateSourceRegulation200Response;
398
269
  }> {
399
270
  const localVarPath =
400
271
  this.basePath +
401
- '/regulations/cloudsources/{sourceId}'.replace(
272
+ '/regulations/sources/{sourceId}'.replace(
402
273
  '{' + 'sourceId' + '}',
403
274
  encodeURIComponent(String(sourceId))
404
275
  );
@@ -410,2979 +281,31 @@ export class DeletionAndSuppressionApi {
410
281
  const produces = [
411
282
  'application/vnd.segment.v1+json',
412
283
  'application/json',
284
+ 'application/vnd.segment.v1beta+json',
285
+ 'application/vnd.segment.v1alpha+json',
413
286
  ];
287
+ // give precedence to 'application/json'
414
288
  if (produces.indexOf('application/json') >= 0) {
415
- localVarHeaderParams.Accept = produces[0];
416
- } else {
417
- localVarHeaderParams.Accept = 'application/json';
418
- }
419
- let localVarFormParams: any = {};
420
-
421
- // verify required parameter 'sourceId' is not null or undefined
422
- if (sourceId === null || sourceId === undefined) {
423
- throw new Error(
424
- 'Required parameter sourceId was null or undefined when calling createCloudSourceRegulationCurrent.'
425
- );
426
- }
427
-
428
- // verify required parameter 'CreateCloudSourceRegulationV1Input' is not null or undefined
429
- if (
430
- CreateCloudSourceRegulationV1Input === null ||
431
- CreateCloudSourceRegulationV1Input === undefined
432
- ) {
433
- throw new Error(
434
- 'Required parameter CreateCloudSourceRegulationV1Input was null or undefined when calling createCloudSourceRegulationCurrent.'
435
- );
436
- }
437
-
438
- (<any>Object).assign(localVarHeaderParams, options.headers);
439
-
440
- let localVarUseFormData = false;
441
-
442
- let localVarRequestOptions: localVarRequest.Options = {
443
- method: 'POST',
444
- qs: localVarQueryParameters,
445
- headers: localVarHeaderParams,
446
- uri: localVarPath,
447
- useQuerystring: this._useQuerystring,
448
- json: true,
449
- body: ObjectSerializer.serialize(
450
- CreateCloudSourceRegulationV1Input,
451
- 'CreateCloudSourceRegulationV1Input'
452
- ),
453
- };
454
-
455
- let authenticationPromise = Promise.resolve();
456
- if (this.authentications.token.accessToken) {
457
- authenticationPromise = authenticationPromise.then(() =>
458
- this.authentications.token.applyToRequest(
459
- localVarRequestOptions
460
- )
461
- );
462
- }
463
- authenticationPromise = authenticationPromise.then(() =>
464
- this.authentications.default.applyToRequest(localVarRequestOptions)
465
- );
466
-
467
- let interceptorPromise = authenticationPromise;
468
- for (const interceptor of this.interceptors) {
469
- interceptorPromise = interceptorPromise.then(() =>
470
- interceptor(localVarRequestOptions)
471
- );
472
- }
473
-
474
- return interceptorPromise.then(() => {
475
- if (Object.keys(localVarFormParams).length) {
476
- if (localVarUseFormData) {
477
- (<any>localVarRequestOptions).formData = localVarFormParams;
478
- } else {
479
- localVarRequestOptions.form = localVarFormParams;
480
- }
481
- }
482
- return new Promise<{
483
- response: http.IncomingMessage;
484
- body: CreateCloudSourceRegulation200Response;
485
- }>((resolve, reject) => {
486
- localVarRequest(
487
- localVarRequestOptions,
488
- (error, response, body) => {
489
- if (error) {
490
- reject(error);
491
- } else {
492
- if (
493
- response.statusCode &&
494
- response.statusCode >= 200 &&
495
- response.statusCode <= 299
496
- ) {
497
- body = ObjectSerializer.deserialize(
498
- body,
499
- 'CreateCloudSourceRegulation200Response'
500
- );
501
- resolve({ response: response, body: body });
502
- } else {
503
- reject(
504
- new HttpError(
505
- response,
506
- body,
507
- response.statusCode
508
- )
509
- );
510
- }
511
- }
512
- }
513
- );
514
- });
515
- });
516
- }
517
- /**
518
- * Creates a Source-scoped regulation. Config API omitted fields: - `attributes`, - `userAgent`
519
- * @summary Create Cloud Source Regulation
520
- * @param sourceId
521
- * @param CreateCloudSourceRegulationV1Input
522
- */
523
- public async createCloudSourceRegulationV1(
524
- sourceId: string,
525
- CreateCloudSourceRegulationV1Input: CreateCloudSourceRegulationV1Input,
526
- options: { headers: { [name: string]: string } } = { headers: {} }
527
- ): Promise<{
528
- response: http.IncomingMessage;
529
- body: CreateCloudSourceRegulation200Response;
530
- }> {
531
- const localVarPath =
532
- this.basePath +
533
- '/regulations/cloudsources/{sourceId}'.replace(
534
- '{' + 'sourceId' + '}',
535
- encodeURIComponent(String(sourceId))
536
- );
537
- let localVarQueryParameters: any = {};
538
- let localVarHeaderParams: any = (<any>Object).assign(
539
- {},
540
- this._defaultHeaders
541
- );
542
- const produces = [
543
- 'application/vnd.segment.v1+json',
544
- 'application/json',
545
- ];
546
- if (produces.indexOf('application/json') >= 0) {
547
- localVarHeaderParams.Accept = produces[0];
548
- } else {
549
- localVarHeaderParams.Accept = 'application/json';
550
- }
551
- let localVarFormParams: any = {};
552
-
553
- // verify required parameter 'sourceId' is not null or undefined
554
- if (sourceId === null || sourceId === undefined) {
555
- throw new Error(
556
- 'Required parameter sourceId was null or undefined when calling createCloudSourceRegulationV1.'
557
- );
558
- }
559
-
560
- // verify required parameter 'CreateCloudSourceRegulationV1Input' is not null or undefined
561
- if (
562
- CreateCloudSourceRegulationV1Input === null ||
563
- CreateCloudSourceRegulationV1Input === undefined
564
- ) {
565
- throw new Error(
566
- 'Required parameter CreateCloudSourceRegulationV1Input was null or undefined when calling createCloudSourceRegulationV1.'
567
- );
568
- }
569
-
570
- (<any>Object).assign(localVarHeaderParams, options.headers);
571
-
572
- let localVarUseFormData = false;
573
-
574
- let localVarRequestOptions: localVarRequest.Options = {
575
- method: 'POST',
576
- qs: localVarQueryParameters,
577
- headers: localVarHeaderParams,
578
- uri: localVarPath,
579
- useQuerystring: this._useQuerystring,
580
- json: true,
581
- body: ObjectSerializer.serialize(
582
- CreateCloudSourceRegulationV1Input,
583
- 'CreateCloudSourceRegulationV1Input'
584
- ),
585
- };
586
-
587
- let authenticationPromise = Promise.resolve();
588
- if (this.authentications.token.accessToken) {
589
- authenticationPromise = authenticationPromise.then(() =>
590
- this.authentications.token.applyToRequest(
591
- localVarRequestOptions
592
- )
593
- );
594
- }
595
- authenticationPromise = authenticationPromise.then(() =>
596
- this.authentications.default.applyToRequest(localVarRequestOptions)
597
- );
598
-
599
- let interceptorPromise = authenticationPromise;
600
- for (const interceptor of this.interceptors) {
601
- interceptorPromise = interceptorPromise.then(() =>
602
- interceptor(localVarRequestOptions)
603
- );
604
- }
605
-
606
- return interceptorPromise.then(() => {
607
- if (Object.keys(localVarFormParams).length) {
608
- if (localVarUseFormData) {
609
- (<any>localVarRequestOptions).formData = localVarFormParams;
610
- } else {
611
- localVarRequestOptions.form = localVarFormParams;
612
- }
613
- }
614
- return new Promise<{
615
- response: http.IncomingMessage;
616
- body: CreateCloudSourceRegulation200Response;
617
- }>((resolve, reject) => {
618
- localVarRequest(
619
- localVarRequestOptions,
620
- (error, response, body) => {
621
- if (error) {
622
- reject(error);
623
- } else {
624
- if (
625
- response.statusCode &&
626
- response.statusCode >= 200 &&
627
- response.statusCode <= 299
628
- ) {
629
- body = ObjectSerializer.deserialize(
630
- body,
631
- 'CreateCloudSourceRegulation200Response'
632
- );
633
- resolve({ response: response, body: body });
634
- } else {
635
- reject(
636
- new HttpError(
637
- response,
638
- body,
639
- response.statusCode
640
- )
641
- );
642
- }
643
- }
644
- }
645
- );
646
- });
647
- });
648
- }
649
- /**
650
- * Creates a Source-scoped regulation. When called, this endpoint may generate the `Source Regulation Created` [Audit Trail](/tag/Audit-Trail) event. Config API omitted fields: - `attributes`, - `userAgent`
651
- * @summary Create Source Regulation
652
- * @param sourceId
653
- * @param CreateSourceRegulationV1Input
654
- */
655
- public async createSourceRegulationAlpha(
656
- sourceId: string,
657
- CreateSourceRegulationV1Input: CreateSourceRegulationV1Input,
658
- options: { headers: { [name: string]: string } } = { headers: {} }
659
- ): Promise<{
660
- response: http.IncomingMessage;
661
- body: CreateSourceRegulation200Response;
662
- }> {
663
- const localVarPath =
664
- this.basePath +
665
- '/regulations/sources/{sourceId}'.replace(
666
- '{' + 'sourceId' + '}',
667
- encodeURIComponent(String(sourceId))
668
- );
669
- let localVarQueryParameters: any = {};
670
- let localVarHeaderParams: any = (<any>Object).assign(
671
- {},
672
- this._defaultHeaders
673
- );
674
- const produces = [
675
- 'application/vnd.segment.v1alpha+json',
676
- 'application/json',
677
- ];
678
- if (produces.indexOf('application/json') >= 0) {
679
- localVarHeaderParams.Accept = produces[0];
680
- } else {
681
- localVarHeaderParams.Accept = 'application/json';
682
- }
683
- let localVarFormParams: any = {};
684
-
685
- // verify required parameter 'sourceId' is not null or undefined
686
- if (sourceId === null || sourceId === undefined) {
687
- throw new Error(
688
- 'Required parameter sourceId was null or undefined when calling createSourceRegulationAlpha.'
689
- );
690
- }
691
-
692
- // verify required parameter 'CreateSourceRegulationV1Input' is not null or undefined
693
- if (
694
- CreateSourceRegulationV1Input === null ||
695
- CreateSourceRegulationV1Input === undefined
696
- ) {
697
- throw new Error(
698
- 'Required parameter CreateSourceRegulationV1Input was null or undefined when calling createSourceRegulationAlpha.'
699
- );
700
- }
701
-
702
- (<any>Object).assign(localVarHeaderParams, options.headers);
703
-
704
- let localVarUseFormData = false;
705
-
706
- let localVarRequestOptions: localVarRequest.Options = {
707
- method: 'POST',
708
- qs: localVarQueryParameters,
709
- headers: localVarHeaderParams,
710
- uri: localVarPath,
711
- useQuerystring: this._useQuerystring,
712
- json: true,
713
- body: ObjectSerializer.serialize(
714
- CreateSourceRegulationV1Input,
715
- 'CreateSourceRegulationV1Input'
716
- ),
717
- };
718
-
719
- let authenticationPromise = Promise.resolve();
720
- if (this.authentications.token.accessToken) {
721
- authenticationPromise = authenticationPromise.then(() =>
722
- this.authentications.token.applyToRequest(
723
- localVarRequestOptions
724
- )
725
- );
726
- }
727
- authenticationPromise = authenticationPromise.then(() =>
728
- this.authentications.default.applyToRequest(localVarRequestOptions)
729
- );
730
-
731
- let interceptorPromise = authenticationPromise;
732
- for (const interceptor of this.interceptors) {
733
- interceptorPromise = interceptorPromise.then(() =>
734
- interceptor(localVarRequestOptions)
735
- );
736
- }
737
-
738
- return interceptorPromise.then(() => {
739
- if (Object.keys(localVarFormParams).length) {
740
- if (localVarUseFormData) {
741
- (<any>localVarRequestOptions).formData = localVarFormParams;
742
- } else {
743
- localVarRequestOptions.form = localVarFormParams;
744
- }
745
- }
746
- return new Promise<{
747
- response: http.IncomingMessage;
748
- body: CreateSourceRegulation200Response;
749
- }>((resolve, reject) => {
750
- localVarRequest(
751
- localVarRequestOptions,
752
- (error, response, body) => {
753
- if (error) {
754
- reject(error);
755
- } else {
756
- if (
757
- response.statusCode &&
758
- response.statusCode >= 200 &&
759
- response.statusCode <= 299
760
- ) {
761
- body = ObjectSerializer.deserialize(
762
- body,
763
- 'CreateSourceRegulation200Response'
764
- );
765
- resolve({ response: response, body: body });
766
- } else {
767
- reject(
768
- new HttpError(
769
- response,
770
- body,
771
- response.statusCode
772
- )
773
- );
774
- }
775
- }
776
- }
777
- );
778
- });
779
- });
780
- }
781
- /**
782
- * Creates a Source-scoped regulation. When called, this endpoint may generate the `Source Regulation Created` [Audit Trail](/tag/Audit-Trail) event. Config API omitted fields: - `attributes`, - `userAgent`
783
- * @summary Create Source Regulation
784
- * @param sourceId
785
- * @param CreateSourceRegulationV1Input
786
- */
787
- public async createSourceRegulationBeta(
788
- sourceId: string,
789
- CreateSourceRegulationV1Input: CreateSourceRegulationV1Input,
790
- options: { headers: { [name: string]: string } } = { headers: {} }
791
- ): Promise<{
792
- response: http.IncomingMessage;
793
- body: CreateSourceRegulation200Response;
794
- }> {
795
- const localVarPath =
796
- this.basePath +
797
- '/regulations/sources/{sourceId}'.replace(
798
- '{' + 'sourceId' + '}',
799
- encodeURIComponent(String(sourceId))
800
- );
801
- let localVarQueryParameters: any = {};
802
- let localVarHeaderParams: any = (<any>Object).assign(
803
- {},
804
- this._defaultHeaders
805
- );
806
- const produces = [
807
- 'application/vnd.segment.v1beta+json',
808
- 'application/json',
809
- ];
810
- if (produces.indexOf('application/json') >= 0) {
811
- localVarHeaderParams.Accept = produces[0];
812
- } else {
813
- localVarHeaderParams.Accept = 'application/json';
814
- }
815
- let localVarFormParams: any = {};
816
-
817
- // verify required parameter 'sourceId' is not null or undefined
818
- if (sourceId === null || sourceId === undefined) {
819
- throw new Error(
820
- 'Required parameter sourceId was null or undefined when calling createSourceRegulationBeta.'
821
- );
822
- }
823
-
824
- // verify required parameter 'CreateSourceRegulationV1Input' is not null or undefined
825
- if (
826
- CreateSourceRegulationV1Input === null ||
827
- CreateSourceRegulationV1Input === undefined
828
- ) {
829
- throw new Error(
830
- 'Required parameter CreateSourceRegulationV1Input was null or undefined when calling createSourceRegulationBeta.'
831
- );
832
- }
833
-
834
- (<any>Object).assign(localVarHeaderParams, options.headers);
835
-
836
- let localVarUseFormData = false;
837
-
838
- let localVarRequestOptions: localVarRequest.Options = {
839
- method: 'POST',
840
- qs: localVarQueryParameters,
841
- headers: localVarHeaderParams,
842
- uri: localVarPath,
843
- useQuerystring: this._useQuerystring,
844
- json: true,
845
- body: ObjectSerializer.serialize(
846
- CreateSourceRegulationV1Input,
847
- 'CreateSourceRegulationV1Input'
848
- ),
849
- };
850
-
851
- let authenticationPromise = Promise.resolve();
852
- if (this.authentications.token.accessToken) {
853
- authenticationPromise = authenticationPromise.then(() =>
854
- this.authentications.token.applyToRequest(
855
- localVarRequestOptions
856
- )
857
- );
858
- }
859
- authenticationPromise = authenticationPromise.then(() =>
860
- this.authentications.default.applyToRequest(localVarRequestOptions)
861
- );
862
-
863
- let interceptorPromise = authenticationPromise;
864
- for (const interceptor of this.interceptors) {
865
- interceptorPromise = interceptorPromise.then(() =>
866
- interceptor(localVarRequestOptions)
867
- );
868
- }
869
-
870
- return interceptorPromise.then(() => {
871
- if (Object.keys(localVarFormParams).length) {
872
- if (localVarUseFormData) {
873
- (<any>localVarRequestOptions).formData = localVarFormParams;
874
- } else {
875
- localVarRequestOptions.form = localVarFormParams;
876
- }
877
- }
878
- return new Promise<{
879
- response: http.IncomingMessage;
880
- body: CreateSourceRegulation200Response;
881
- }>((resolve, reject) => {
882
- localVarRequest(
883
- localVarRequestOptions,
884
- (error, response, body) => {
885
- if (error) {
886
- reject(error);
887
- } else {
888
- if (
889
- response.statusCode &&
890
- response.statusCode >= 200 &&
891
- response.statusCode <= 299
892
- ) {
893
- body = ObjectSerializer.deserialize(
894
- body,
895
- 'CreateSourceRegulation200Response'
896
- );
897
- resolve({ response: response, body: body });
898
- } else {
899
- reject(
900
- new HttpError(
901
- response,
902
- body,
903
- response.statusCode
904
- )
905
- );
906
- }
907
- }
908
- }
909
- );
910
- });
911
- });
912
- }
913
- /**
914
- * Creates a Source-scoped regulation. When called, this endpoint may generate the `Source Regulation Created` [Audit Trail](/tag/Audit-Trail) event. Config API omitted fields: - `attributes`, - `userAgent`
915
- * @summary Create Source Regulation
916
- * @param sourceId
917
- * @param CreateSourceRegulationV1Input
918
- */
919
- public async createSourceRegulationCurrent(
920
- sourceId: string,
921
- CreateSourceRegulationV1Input: CreateSourceRegulationV1Input,
922
- options: { headers: { [name: string]: string } } = { headers: {} }
923
- ): Promise<{
924
- response: http.IncomingMessage;
925
- body: CreateSourceRegulation200Response;
926
- }> {
927
- const localVarPath =
928
- this.basePath +
929
- '/regulations/sources/{sourceId}'.replace(
930
- '{' + 'sourceId' + '}',
931
- encodeURIComponent(String(sourceId))
932
- );
933
- let localVarQueryParameters: any = {};
934
- let localVarHeaderParams: any = (<any>Object).assign(
935
- {},
936
- this._defaultHeaders
937
- );
938
- const produces = [
939
- 'application/vnd.segment.v1+json',
940
- 'application/json',
941
- ];
942
- if (produces.indexOf('application/json') >= 0) {
943
- localVarHeaderParams.Accept = produces[0];
944
- } else {
945
- localVarHeaderParams.Accept = 'application/json';
946
- }
947
- let localVarFormParams: any = {};
948
-
949
- // verify required parameter 'sourceId' is not null or undefined
950
- if (sourceId === null || sourceId === undefined) {
951
- throw new Error(
952
- 'Required parameter sourceId was null or undefined when calling createSourceRegulationCurrent.'
953
- );
954
- }
955
-
956
- // verify required parameter 'CreateSourceRegulationV1Input' is not null or undefined
957
- if (
958
- CreateSourceRegulationV1Input === null ||
959
- CreateSourceRegulationV1Input === undefined
960
- ) {
961
- throw new Error(
962
- 'Required parameter CreateSourceRegulationV1Input was null or undefined when calling createSourceRegulationCurrent.'
963
- );
964
- }
965
-
966
- (<any>Object).assign(localVarHeaderParams, options.headers);
967
-
968
- let localVarUseFormData = false;
969
-
970
- let localVarRequestOptions: localVarRequest.Options = {
971
- method: 'POST',
972
- qs: localVarQueryParameters,
973
- headers: localVarHeaderParams,
974
- uri: localVarPath,
975
- useQuerystring: this._useQuerystring,
976
- json: true,
977
- body: ObjectSerializer.serialize(
978
- CreateSourceRegulationV1Input,
979
- 'CreateSourceRegulationV1Input'
980
- ),
981
- };
982
-
983
- let authenticationPromise = Promise.resolve();
984
- if (this.authentications.token.accessToken) {
985
- authenticationPromise = authenticationPromise.then(() =>
986
- this.authentications.token.applyToRequest(
987
- localVarRequestOptions
988
- )
989
- );
990
- }
991
- authenticationPromise = authenticationPromise.then(() =>
992
- this.authentications.default.applyToRequest(localVarRequestOptions)
993
- );
994
-
995
- let interceptorPromise = authenticationPromise;
996
- for (const interceptor of this.interceptors) {
997
- interceptorPromise = interceptorPromise.then(() =>
998
- interceptor(localVarRequestOptions)
999
- );
1000
- }
1001
-
1002
- return interceptorPromise.then(() => {
1003
- if (Object.keys(localVarFormParams).length) {
1004
- if (localVarUseFormData) {
1005
- (<any>localVarRequestOptions).formData = localVarFormParams;
1006
- } else {
1007
- localVarRequestOptions.form = localVarFormParams;
1008
- }
1009
- }
1010
- return new Promise<{
1011
- response: http.IncomingMessage;
1012
- body: CreateSourceRegulation200Response;
1013
- }>((resolve, reject) => {
1014
- localVarRequest(
1015
- localVarRequestOptions,
1016
- (error, response, body) => {
1017
- if (error) {
1018
- reject(error);
1019
- } else {
1020
- if (
1021
- response.statusCode &&
1022
- response.statusCode >= 200 &&
1023
- response.statusCode <= 299
1024
- ) {
1025
- body = ObjectSerializer.deserialize(
1026
- body,
1027
- 'CreateSourceRegulation200Response'
1028
- );
1029
- resolve({ response: response, body: body });
1030
- } else {
1031
- reject(
1032
- new HttpError(
1033
- response,
1034
- body,
1035
- response.statusCode
1036
- )
1037
- );
1038
- }
1039
- }
1040
- }
1041
- );
1042
- });
1043
- });
1044
- }
1045
- /**
1046
- * Creates a Source-scoped regulation. When called, this endpoint may generate the `Source Regulation Created` [Audit Trail](/tag/Audit-Trail) event. Config API omitted fields: - `attributes`, - `userAgent`
1047
- * @summary Create Source Regulation
1048
- * @param sourceId
1049
- * @param CreateSourceRegulationV1Input
1050
- */
1051
- public async createSourceRegulationV1(
1052
- sourceId: string,
1053
- CreateSourceRegulationV1Input: CreateSourceRegulationV1Input,
1054
- options: { headers: { [name: string]: string } } = { headers: {} }
1055
- ): Promise<{
1056
- response: http.IncomingMessage;
1057
- body: CreateSourceRegulation200Response;
1058
- }> {
1059
- const localVarPath =
1060
- this.basePath +
1061
- '/regulations/sources/{sourceId}'.replace(
1062
- '{' + 'sourceId' + '}',
1063
- encodeURIComponent(String(sourceId))
1064
- );
1065
- let localVarQueryParameters: any = {};
1066
- let localVarHeaderParams: any = (<any>Object).assign(
1067
- {},
1068
- this._defaultHeaders
1069
- );
1070
- const produces = [
1071
- 'application/vnd.segment.v1+json',
1072
- 'application/json',
1073
- ];
1074
- if (produces.indexOf('application/json') >= 0) {
1075
- localVarHeaderParams.Accept = produces[0];
1076
- } else {
1077
- localVarHeaderParams.Accept = 'application/json';
1078
- }
1079
- let localVarFormParams: any = {};
1080
-
1081
- // verify required parameter 'sourceId' is not null or undefined
1082
- if (sourceId === null || sourceId === undefined) {
1083
- throw new Error(
1084
- 'Required parameter sourceId was null or undefined when calling createSourceRegulationV1.'
1085
- );
1086
- }
1087
-
1088
- // verify required parameter 'CreateSourceRegulationV1Input' is not null or undefined
1089
- if (
1090
- CreateSourceRegulationV1Input === null ||
1091
- CreateSourceRegulationV1Input === undefined
1092
- ) {
1093
- throw new Error(
1094
- 'Required parameter CreateSourceRegulationV1Input was null or undefined when calling createSourceRegulationV1.'
1095
- );
1096
- }
1097
-
1098
- (<any>Object).assign(localVarHeaderParams, options.headers);
1099
-
1100
- let localVarUseFormData = false;
1101
-
1102
- let localVarRequestOptions: localVarRequest.Options = {
1103
- method: 'POST',
1104
- qs: localVarQueryParameters,
1105
- headers: localVarHeaderParams,
1106
- uri: localVarPath,
1107
- useQuerystring: this._useQuerystring,
1108
- json: true,
1109
- body: ObjectSerializer.serialize(
1110
- CreateSourceRegulationV1Input,
1111
- 'CreateSourceRegulationV1Input'
1112
- ),
1113
- };
1114
-
1115
- let authenticationPromise = Promise.resolve();
1116
- if (this.authentications.token.accessToken) {
1117
- authenticationPromise = authenticationPromise.then(() =>
1118
- this.authentications.token.applyToRequest(
1119
- localVarRequestOptions
1120
- )
1121
- );
1122
- }
1123
- authenticationPromise = authenticationPromise.then(() =>
1124
- this.authentications.default.applyToRequest(localVarRequestOptions)
1125
- );
1126
-
1127
- let interceptorPromise = authenticationPromise;
1128
- for (const interceptor of this.interceptors) {
1129
- interceptorPromise = interceptorPromise.then(() =>
1130
- interceptor(localVarRequestOptions)
1131
- );
1132
- }
1133
-
1134
- return interceptorPromise.then(() => {
1135
- if (Object.keys(localVarFormParams).length) {
1136
- if (localVarUseFormData) {
1137
- (<any>localVarRequestOptions).formData = localVarFormParams;
1138
- } else {
1139
- localVarRequestOptions.form = localVarFormParams;
1140
- }
1141
- }
1142
- return new Promise<{
1143
- response: http.IncomingMessage;
1144
- body: CreateSourceRegulation200Response;
1145
- }>((resolve, reject) => {
1146
- localVarRequest(
1147
- localVarRequestOptions,
1148
- (error, response, body) => {
1149
- if (error) {
1150
- reject(error);
1151
- } else {
1152
- if (
1153
- response.statusCode &&
1154
- response.statusCode >= 200 &&
1155
- response.statusCode <= 299
1156
- ) {
1157
- body = ObjectSerializer.deserialize(
1158
- body,
1159
- 'CreateSourceRegulation200Response'
1160
- );
1161
- resolve({ response: response, body: body });
1162
- } else {
1163
- reject(
1164
- new HttpError(
1165
- response,
1166
- body,
1167
- response.statusCode
1168
- )
1169
- );
1170
- }
1171
- }
1172
- }
1173
- );
1174
- });
1175
- });
1176
- }
1177
- /**
1178
- * Creates a Workspace-scoped regulation. When called, this endpoint may generate the `Workspace Regulation Created` [Audit Trail](/tag/Audit-Trail) event. Config API omitted fields: - `attributes`, - `userAgent`
1179
- * @summary Create Workspace Regulation
1180
- * @param CreateWorkspaceRegulationV1Input
1181
- */
1182
- public async createWorkspaceRegulationAlpha(
1183
- CreateWorkspaceRegulationV1Input: CreateWorkspaceRegulationV1Input,
1184
- options: { headers: { [name: string]: string } } = { headers: {} }
1185
- ): Promise<{
1186
- response: http.IncomingMessage;
1187
- body: CreateWorkspaceRegulation200Response;
1188
- }> {
1189
- const localVarPath = this.basePath + '/regulations';
1190
- let localVarQueryParameters: any = {};
1191
- let localVarHeaderParams: any = (<any>Object).assign(
1192
- {},
1193
- this._defaultHeaders
1194
- );
1195
- const produces = [
1196
- 'application/vnd.segment.v1alpha+json',
1197
- 'application/json',
1198
- ];
1199
- if (produces.indexOf('application/json') >= 0) {
1200
- localVarHeaderParams.Accept = produces[0];
1201
- } else {
1202
- localVarHeaderParams.Accept = 'application/json';
1203
- }
1204
- let localVarFormParams: any = {};
1205
-
1206
- // verify required parameter 'CreateWorkspaceRegulationV1Input' is not null or undefined
1207
- if (
1208
- CreateWorkspaceRegulationV1Input === null ||
1209
- CreateWorkspaceRegulationV1Input === undefined
1210
- ) {
1211
- throw new Error(
1212
- 'Required parameter CreateWorkspaceRegulationV1Input was null or undefined when calling createWorkspaceRegulationAlpha.'
1213
- );
1214
- }
1215
-
1216
- (<any>Object).assign(localVarHeaderParams, options.headers);
1217
-
1218
- let localVarUseFormData = false;
1219
-
1220
- let localVarRequestOptions: localVarRequest.Options = {
1221
- method: 'POST',
1222
- qs: localVarQueryParameters,
1223
- headers: localVarHeaderParams,
1224
- uri: localVarPath,
1225
- useQuerystring: this._useQuerystring,
1226
- json: true,
1227
- body: ObjectSerializer.serialize(
1228
- CreateWorkspaceRegulationV1Input,
1229
- 'CreateWorkspaceRegulationV1Input'
1230
- ),
1231
- };
1232
-
1233
- let authenticationPromise = Promise.resolve();
1234
- if (this.authentications.token.accessToken) {
1235
- authenticationPromise = authenticationPromise.then(() =>
1236
- this.authentications.token.applyToRequest(
1237
- localVarRequestOptions
1238
- )
1239
- );
1240
- }
1241
- authenticationPromise = authenticationPromise.then(() =>
1242
- this.authentications.default.applyToRequest(localVarRequestOptions)
1243
- );
1244
-
1245
- let interceptorPromise = authenticationPromise;
1246
- for (const interceptor of this.interceptors) {
1247
- interceptorPromise = interceptorPromise.then(() =>
1248
- interceptor(localVarRequestOptions)
1249
- );
1250
- }
1251
-
1252
- return interceptorPromise.then(() => {
1253
- if (Object.keys(localVarFormParams).length) {
1254
- if (localVarUseFormData) {
1255
- (<any>localVarRequestOptions).formData = localVarFormParams;
1256
- } else {
1257
- localVarRequestOptions.form = localVarFormParams;
1258
- }
1259
- }
1260
- return new Promise<{
1261
- response: http.IncomingMessage;
1262
- body: CreateWorkspaceRegulation200Response;
1263
- }>((resolve, reject) => {
1264
- localVarRequest(
1265
- localVarRequestOptions,
1266
- (error, response, body) => {
1267
- if (error) {
1268
- reject(error);
1269
- } else {
1270
- if (
1271
- response.statusCode &&
1272
- response.statusCode >= 200 &&
1273
- response.statusCode <= 299
1274
- ) {
1275
- body = ObjectSerializer.deserialize(
1276
- body,
1277
- 'CreateWorkspaceRegulation200Response'
1278
- );
1279
- resolve({ response: response, body: body });
1280
- } else {
1281
- reject(
1282
- new HttpError(
1283
- response,
1284
- body,
1285
- response.statusCode
1286
- )
1287
- );
1288
- }
1289
- }
1290
- }
1291
- );
1292
- });
1293
- });
1294
- }
1295
- /**
1296
- * Creates a Workspace-scoped regulation. When called, this endpoint may generate the `Workspace Regulation Created` [Audit Trail](/tag/Audit-Trail) event. Config API omitted fields: - `attributes`, - `userAgent`
1297
- * @summary Create Workspace Regulation
1298
- * @param CreateWorkspaceRegulationV1Input
1299
- */
1300
- public async createWorkspaceRegulationBeta(
1301
- CreateWorkspaceRegulationV1Input: CreateWorkspaceRegulationV1Input,
1302
- options: { headers: { [name: string]: string } } = { headers: {} }
1303
- ): Promise<{
1304
- response: http.IncomingMessage;
1305
- body: CreateWorkspaceRegulation200Response;
1306
- }> {
1307
- const localVarPath = this.basePath + '/regulations';
1308
- let localVarQueryParameters: any = {};
1309
- let localVarHeaderParams: any = (<any>Object).assign(
1310
- {},
1311
- this._defaultHeaders
1312
- );
1313
- const produces = [
1314
- 'application/vnd.segment.v1beta+json',
1315
- 'application/json',
1316
- ];
1317
- if (produces.indexOf('application/json') >= 0) {
1318
- localVarHeaderParams.Accept = produces[0];
1319
- } else {
1320
- localVarHeaderParams.Accept = 'application/json';
1321
- }
1322
- let localVarFormParams: any = {};
1323
-
1324
- // verify required parameter 'CreateWorkspaceRegulationV1Input' is not null or undefined
1325
- if (
1326
- CreateWorkspaceRegulationV1Input === null ||
1327
- CreateWorkspaceRegulationV1Input === undefined
1328
- ) {
1329
- throw new Error(
1330
- 'Required parameter CreateWorkspaceRegulationV1Input was null or undefined when calling createWorkspaceRegulationBeta.'
1331
- );
1332
- }
1333
-
1334
- (<any>Object).assign(localVarHeaderParams, options.headers);
1335
-
1336
- let localVarUseFormData = false;
1337
-
1338
- let localVarRequestOptions: localVarRequest.Options = {
1339
- method: 'POST',
1340
- qs: localVarQueryParameters,
1341
- headers: localVarHeaderParams,
1342
- uri: localVarPath,
1343
- useQuerystring: this._useQuerystring,
1344
- json: true,
1345
- body: ObjectSerializer.serialize(
1346
- CreateWorkspaceRegulationV1Input,
1347
- 'CreateWorkspaceRegulationV1Input'
1348
- ),
1349
- };
1350
-
1351
- let authenticationPromise = Promise.resolve();
1352
- if (this.authentications.token.accessToken) {
1353
- authenticationPromise = authenticationPromise.then(() =>
1354
- this.authentications.token.applyToRequest(
1355
- localVarRequestOptions
1356
- )
1357
- );
1358
- }
1359
- authenticationPromise = authenticationPromise.then(() =>
1360
- this.authentications.default.applyToRequest(localVarRequestOptions)
1361
- );
1362
-
1363
- let interceptorPromise = authenticationPromise;
1364
- for (const interceptor of this.interceptors) {
1365
- interceptorPromise = interceptorPromise.then(() =>
1366
- interceptor(localVarRequestOptions)
1367
- );
1368
- }
1369
-
1370
- return interceptorPromise.then(() => {
1371
- if (Object.keys(localVarFormParams).length) {
1372
- if (localVarUseFormData) {
1373
- (<any>localVarRequestOptions).formData = localVarFormParams;
1374
- } else {
1375
- localVarRequestOptions.form = localVarFormParams;
1376
- }
1377
- }
1378
- return new Promise<{
1379
- response: http.IncomingMessage;
1380
- body: CreateWorkspaceRegulation200Response;
1381
- }>((resolve, reject) => {
1382
- localVarRequest(
1383
- localVarRequestOptions,
1384
- (error, response, body) => {
1385
- if (error) {
1386
- reject(error);
1387
- } else {
1388
- if (
1389
- response.statusCode &&
1390
- response.statusCode >= 200 &&
1391
- response.statusCode <= 299
1392
- ) {
1393
- body = ObjectSerializer.deserialize(
1394
- body,
1395
- 'CreateWorkspaceRegulation200Response'
1396
- );
1397
- resolve({ response: response, body: body });
1398
- } else {
1399
- reject(
1400
- new HttpError(
1401
- response,
1402
- body,
1403
- response.statusCode
1404
- )
1405
- );
1406
- }
1407
- }
1408
- }
1409
- );
1410
- });
1411
- });
1412
- }
1413
- /**
1414
- * Creates a Workspace-scoped regulation. When called, this endpoint may generate the `Workspace Regulation Created` [Audit Trail](/tag/Audit-Trail) event. Config API omitted fields: - `attributes`, - `userAgent`
1415
- * @summary Create Workspace Regulation
1416
- * @param CreateWorkspaceRegulationV1Input
1417
- */
1418
- public async createWorkspaceRegulationCurrent(
1419
- CreateWorkspaceRegulationV1Input: CreateWorkspaceRegulationV1Input,
1420
- options: { headers: { [name: string]: string } } = { headers: {} }
1421
- ): Promise<{
1422
- response: http.IncomingMessage;
1423
- body: CreateWorkspaceRegulation200Response;
1424
- }> {
1425
- const localVarPath = this.basePath + '/regulations';
1426
- let localVarQueryParameters: any = {};
1427
- let localVarHeaderParams: any = (<any>Object).assign(
1428
- {},
1429
- this._defaultHeaders
1430
- );
1431
- const produces = [
1432
- 'application/vnd.segment.v1+json',
1433
- 'application/json',
1434
- ];
1435
- if (produces.indexOf('application/json') >= 0) {
1436
- localVarHeaderParams.Accept = produces[0];
1437
- } else {
1438
- localVarHeaderParams.Accept = 'application/json';
1439
- }
1440
- let localVarFormParams: any = {};
1441
-
1442
- // verify required parameter 'CreateWorkspaceRegulationV1Input' is not null or undefined
1443
- if (
1444
- CreateWorkspaceRegulationV1Input === null ||
1445
- CreateWorkspaceRegulationV1Input === undefined
1446
- ) {
1447
- throw new Error(
1448
- 'Required parameter CreateWorkspaceRegulationV1Input was null or undefined when calling createWorkspaceRegulationCurrent.'
1449
- );
1450
- }
1451
-
1452
- (<any>Object).assign(localVarHeaderParams, options.headers);
1453
-
1454
- let localVarUseFormData = false;
1455
-
1456
- let localVarRequestOptions: localVarRequest.Options = {
1457
- method: 'POST',
1458
- qs: localVarQueryParameters,
1459
- headers: localVarHeaderParams,
1460
- uri: localVarPath,
1461
- useQuerystring: this._useQuerystring,
1462
- json: true,
1463
- body: ObjectSerializer.serialize(
1464
- CreateWorkspaceRegulationV1Input,
1465
- 'CreateWorkspaceRegulationV1Input'
1466
- ),
1467
- };
1468
-
1469
- let authenticationPromise = Promise.resolve();
1470
- if (this.authentications.token.accessToken) {
1471
- authenticationPromise = authenticationPromise.then(() =>
1472
- this.authentications.token.applyToRequest(
1473
- localVarRequestOptions
1474
- )
1475
- );
1476
- }
1477
- authenticationPromise = authenticationPromise.then(() =>
1478
- this.authentications.default.applyToRequest(localVarRequestOptions)
1479
- );
1480
-
1481
- let interceptorPromise = authenticationPromise;
1482
- for (const interceptor of this.interceptors) {
1483
- interceptorPromise = interceptorPromise.then(() =>
1484
- interceptor(localVarRequestOptions)
1485
- );
1486
- }
1487
-
1488
- return interceptorPromise.then(() => {
1489
- if (Object.keys(localVarFormParams).length) {
1490
- if (localVarUseFormData) {
1491
- (<any>localVarRequestOptions).formData = localVarFormParams;
1492
- } else {
1493
- localVarRequestOptions.form = localVarFormParams;
1494
- }
1495
- }
1496
- return new Promise<{
1497
- response: http.IncomingMessage;
1498
- body: CreateWorkspaceRegulation200Response;
1499
- }>((resolve, reject) => {
1500
- localVarRequest(
1501
- localVarRequestOptions,
1502
- (error, response, body) => {
1503
- if (error) {
1504
- reject(error);
1505
- } else {
1506
- if (
1507
- response.statusCode &&
1508
- response.statusCode >= 200 &&
1509
- response.statusCode <= 299
1510
- ) {
1511
- body = ObjectSerializer.deserialize(
1512
- body,
1513
- 'CreateWorkspaceRegulation200Response'
1514
- );
1515
- resolve({ response: response, body: body });
1516
- } else {
1517
- reject(
1518
- new HttpError(
1519
- response,
1520
- body,
1521
- response.statusCode
1522
- )
1523
- );
1524
- }
1525
- }
1526
- }
1527
- );
1528
- });
1529
- });
1530
- }
1531
- /**
1532
- * Creates a Workspace-scoped regulation. When called, this endpoint may generate the `Workspace Regulation Created` [Audit Trail](/tag/Audit-Trail) event. Config API omitted fields: - `attributes`, - `userAgent`
1533
- * @summary Create Workspace Regulation
1534
- * @param CreateWorkspaceRegulationV1Input
1535
- */
1536
- public async createWorkspaceRegulationV1(
1537
- CreateWorkspaceRegulationV1Input: CreateWorkspaceRegulationV1Input,
1538
- options: { headers: { [name: string]: string } } = { headers: {} }
1539
- ): Promise<{
1540
- response: http.IncomingMessage;
1541
- body: CreateWorkspaceRegulation200Response;
1542
- }> {
1543
- const localVarPath = this.basePath + '/regulations';
1544
- let localVarQueryParameters: any = {};
1545
- let localVarHeaderParams: any = (<any>Object).assign(
1546
- {},
1547
- this._defaultHeaders
1548
- );
1549
- const produces = [
1550
- 'application/vnd.segment.v1+json',
1551
- 'application/json',
1552
- ];
1553
- if (produces.indexOf('application/json') >= 0) {
1554
- localVarHeaderParams.Accept = produces[0];
1555
- } else {
1556
- localVarHeaderParams.Accept = 'application/json';
1557
- }
1558
- let localVarFormParams: any = {};
1559
-
1560
- // verify required parameter 'CreateWorkspaceRegulationV1Input' is not null or undefined
1561
- if (
1562
- CreateWorkspaceRegulationV1Input === null ||
1563
- CreateWorkspaceRegulationV1Input === undefined
1564
- ) {
1565
- throw new Error(
1566
- 'Required parameter CreateWorkspaceRegulationV1Input was null or undefined when calling createWorkspaceRegulationV1.'
1567
- );
1568
- }
1569
-
1570
- (<any>Object).assign(localVarHeaderParams, options.headers);
1571
-
1572
- let localVarUseFormData = false;
1573
-
1574
- let localVarRequestOptions: localVarRequest.Options = {
1575
- method: 'POST',
1576
- qs: localVarQueryParameters,
1577
- headers: localVarHeaderParams,
1578
- uri: localVarPath,
1579
- useQuerystring: this._useQuerystring,
1580
- json: true,
1581
- body: ObjectSerializer.serialize(
1582
- CreateWorkspaceRegulationV1Input,
1583
- 'CreateWorkspaceRegulationV1Input'
1584
- ),
1585
- };
1586
-
1587
- let authenticationPromise = Promise.resolve();
1588
- if (this.authentications.token.accessToken) {
1589
- authenticationPromise = authenticationPromise.then(() =>
1590
- this.authentications.token.applyToRequest(
1591
- localVarRequestOptions
1592
- )
1593
- );
1594
- }
1595
- authenticationPromise = authenticationPromise.then(() =>
1596
- this.authentications.default.applyToRequest(localVarRequestOptions)
1597
- );
1598
-
1599
- let interceptorPromise = authenticationPromise;
1600
- for (const interceptor of this.interceptors) {
1601
- interceptorPromise = interceptorPromise.then(() =>
1602
- interceptor(localVarRequestOptions)
1603
- );
1604
- }
1605
-
1606
- return interceptorPromise.then(() => {
1607
- if (Object.keys(localVarFormParams).length) {
1608
- if (localVarUseFormData) {
1609
- (<any>localVarRequestOptions).formData = localVarFormParams;
1610
- } else {
1611
- localVarRequestOptions.form = localVarFormParams;
1612
- }
1613
- }
1614
- return new Promise<{
1615
- response: http.IncomingMessage;
1616
- body: CreateWorkspaceRegulation200Response;
1617
- }>((resolve, reject) => {
1618
- localVarRequest(
1619
- localVarRequestOptions,
1620
- (error, response, body) => {
1621
- if (error) {
1622
- reject(error);
1623
- } else {
1624
- if (
1625
- response.statusCode &&
1626
- response.statusCode >= 200 &&
1627
- response.statusCode <= 299
1628
- ) {
1629
- body = ObjectSerializer.deserialize(
1630
- body,
1631
- 'CreateWorkspaceRegulation200Response'
1632
- );
1633
- resolve({ response: response, body: body });
1634
- } else {
1635
- reject(
1636
- new HttpError(
1637
- response,
1638
- body,
1639
- response.statusCode
1640
- )
1641
- );
1642
- }
1643
- }
1644
- }
1645
- );
1646
- });
1647
- });
1648
- }
1649
- /**
1650
- * Deletes a regulation from the Workspace. The regulation must be in the initialized state to be deleted. When called, this endpoint may generate the `Regulation Deleted` [Audit Trail](/tag/Audit-Trail) event.
1651
- * @summary Delete Regulation
1652
- * @param regulateId
1653
- */
1654
- public async deleteRegulationAlpha(
1655
- regulateId: string,
1656
- options: { headers: { [name: string]: string } } = { headers: {} }
1657
- ): Promise<{
1658
- response: http.IncomingMessage;
1659
- body: DeleteRegulation200Response;
1660
- }> {
1661
- const localVarPath =
1662
- this.basePath +
1663
- '/regulations/{regulateId}'.replace(
1664
- '{' + 'regulateId' + '}',
1665
- encodeURIComponent(String(regulateId))
1666
- );
1667
- let localVarQueryParameters: any = {};
1668
- let localVarHeaderParams: any = (<any>Object).assign(
1669
- {},
1670
- this._defaultHeaders
1671
- );
1672
- const produces = [
1673
- 'application/vnd.segment.v1alpha+json',
1674
- 'application/json',
1675
- ];
1676
- if (produces.indexOf('application/json') >= 0) {
1677
- localVarHeaderParams.Accept = produces[0];
1678
- } else {
1679
- localVarHeaderParams.Accept = 'application/json';
1680
- }
1681
- let localVarFormParams: any = {};
1682
-
1683
- // verify required parameter 'regulateId' is not null or undefined
1684
- if (regulateId === null || regulateId === undefined) {
1685
- throw new Error(
1686
- 'Required parameter regulateId was null or undefined when calling deleteRegulationAlpha.'
1687
- );
1688
- }
1689
-
1690
- (<any>Object).assign(localVarHeaderParams, options.headers);
1691
-
1692
- let localVarUseFormData = false;
1693
-
1694
- let localVarRequestOptions: localVarRequest.Options = {
1695
- method: 'DELETE',
1696
- qs: localVarQueryParameters,
1697
- headers: localVarHeaderParams,
1698
- uri: localVarPath,
1699
- useQuerystring: this._useQuerystring,
1700
- json: true,
1701
- };
1702
-
1703
- let authenticationPromise = Promise.resolve();
1704
- if (this.authentications.token.accessToken) {
1705
- authenticationPromise = authenticationPromise.then(() =>
1706
- this.authentications.token.applyToRequest(
1707
- localVarRequestOptions
1708
- )
1709
- );
1710
- }
1711
- authenticationPromise = authenticationPromise.then(() =>
1712
- this.authentications.default.applyToRequest(localVarRequestOptions)
1713
- );
1714
-
1715
- let interceptorPromise = authenticationPromise;
1716
- for (const interceptor of this.interceptors) {
1717
- interceptorPromise = interceptorPromise.then(() =>
1718
- interceptor(localVarRequestOptions)
1719
- );
1720
- }
1721
-
1722
- return interceptorPromise.then(() => {
1723
- if (Object.keys(localVarFormParams).length) {
1724
- if (localVarUseFormData) {
1725
- (<any>localVarRequestOptions).formData = localVarFormParams;
1726
- } else {
1727
- localVarRequestOptions.form = localVarFormParams;
1728
- }
1729
- }
1730
- return new Promise<{
1731
- response: http.IncomingMessage;
1732
- body: DeleteRegulation200Response;
1733
- }>((resolve, reject) => {
1734
- localVarRequest(
1735
- localVarRequestOptions,
1736
- (error, response, body) => {
1737
- if (error) {
1738
- reject(error);
1739
- } else {
1740
- if (
1741
- response.statusCode &&
1742
- response.statusCode >= 200 &&
1743
- response.statusCode <= 299
1744
- ) {
1745
- body = ObjectSerializer.deserialize(
1746
- body,
1747
- 'DeleteRegulation200Response'
1748
- );
1749
- resolve({ response: response, body: body });
1750
- } else {
1751
- reject(
1752
- new HttpError(
1753
- response,
1754
- body,
1755
- response.statusCode
1756
- )
1757
- );
1758
- }
1759
- }
1760
- }
1761
- );
1762
- });
1763
- });
1764
- }
1765
- /**
1766
- * Deletes a regulation from the Workspace. The regulation must be in the initialized state to be deleted. When called, this endpoint may generate the `Regulation Deleted` [Audit Trail](/tag/Audit-Trail) event.
1767
- * @summary Delete Regulation
1768
- * @param regulateId
1769
- */
1770
- public async deleteRegulationBeta(
1771
- regulateId: string,
1772
- options: { headers: { [name: string]: string } } = { headers: {} }
1773
- ): Promise<{
1774
- response: http.IncomingMessage;
1775
- body: DeleteRegulation200Response;
1776
- }> {
1777
- const localVarPath =
1778
- this.basePath +
1779
- '/regulations/{regulateId}'.replace(
1780
- '{' + 'regulateId' + '}',
1781
- encodeURIComponent(String(regulateId))
1782
- );
1783
- let localVarQueryParameters: any = {};
1784
- let localVarHeaderParams: any = (<any>Object).assign(
1785
- {},
1786
- this._defaultHeaders
1787
- );
1788
- const produces = [
1789
- 'application/vnd.segment.v1beta+json',
1790
- 'application/json',
1791
- ];
1792
- if (produces.indexOf('application/json') >= 0) {
1793
- localVarHeaderParams.Accept = produces[0];
1794
- } else {
1795
- localVarHeaderParams.Accept = 'application/json';
1796
- }
1797
- let localVarFormParams: any = {};
1798
-
1799
- // verify required parameter 'regulateId' is not null or undefined
1800
- if (regulateId === null || regulateId === undefined) {
1801
- throw new Error(
1802
- 'Required parameter regulateId was null or undefined when calling deleteRegulationBeta.'
1803
- );
1804
- }
1805
-
1806
- (<any>Object).assign(localVarHeaderParams, options.headers);
1807
-
1808
- let localVarUseFormData = false;
1809
-
1810
- let localVarRequestOptions: localVarRequest.Options = {
1811
- method: 'DELETE',
1812
- qs: localVarQueryParameters,
1813
- headers: localVarHeaderParams,
1814
- uri: localVarPath,
1815
- useQuerystring: this._useQuerystring,
1816
- json: true,
1817
- };
1818
-
1819
- let authenticationPromise = Promise.resolve();
1820
- if (this.authentications.token.accessToken) {
1821
- authenticationPromise = authenticationPromise.then(() =>
1822
- this.authentications.token.applyToRequest(
1823
- localVarRequestOptions
1824
- )
1825
- );
1826
- }
1827
- authenticationPromise = authenticationPromise.then(() =>
1828
- this.authentications.default.applyToRequest(localVarRequestOptions)
1829
- );
1830
-
1831
- let interceptorPromise = authenticationPromise;
1832
- for (const interceptor of this.interceptors) {
1833
- interceptorPromise = interceptorPromise.then(() =>
1834
- interceptor(localVarRequestOptions)
1835
- );
1836
- }
1837
-
1838
- return interceptorPromise.then(() => {
1839
- if (Object.keys(localVarFormParams).length) {
1840
- if (localVarUseFormData) {
1841
- (<any>localVarRequestOptions).formData = localVarFormParams;
1842
- } else {
1843
- localVarRequestOptions.form = localVarFormParams;
1844
- }
1845
- }
1846
- return new Promise<{
1847
- response: http.IncomingMessage;
1848
- body: DeleteRegulation200Response;
1849
- }>((resolve, reject) => {
1850
- localVarRequest(
1851
- localVarRequestOptions,
1852
- (error, response, body) => {
1853
- if (error) {
1854
- reject(error);
1855
- } else {
1856
- if (
1857
- response.statusCode &&
1858
- response.statusCode >= 200 &&
1859
- response.statusCode <= 299
1860
- ) {
1861
- body = ObjectSerializer.deserialize(
1862
- body,
1863
- 'DeleteRegulation200Response'
1864
- );
1865
- resolve({ response: response, body: body });
1866
- } else {
1867
- reject(
1868
- new HttpError(
1869
- response,
1870
- body,
1871
- response.statusCode
1872
- )
1873
- );
1874
- }
1875
- }
1876
- }
1877
- );
1878
- });
1879
- });
1880
- }
1881
- /**
1882
- * Deletes a regulation from the Workspace. The regulation must be in the initialized state to be deleted. When called, this endpoint may generate the `Regulation Deleted` [Audit Trail](/tag/Audit-Trail) event.
1883
- * @summary Delete Regulation
1884
- * @param regulateId
1885
- */
1886
- public async deleteRegulationCurrent(
1887
- regulateId: string,
1888
- options: { headers: { [name: string]: string } } = { headers: {} }
1889
- ): Promise<{
1890
- response: http.IncomingMessage;
1891
- body: DeleteRegulation200Response;
1892
- }> {
1893
- const localVarPath =
1894
- this.basePath +
1895
- '/regulations/{regulateId}'.replace(
1896
- '{' + 'regulateId' + '}',
1897
- encodeURIComponent(String(regulateId))
1898
- );
1899
- let localVarQueryParameters: any = {};
1900
- let localVarHeaderParams: any = (<any>Object).assign(
1901
- {},
1902
- this._defaultHeaders
1903
- );
1904
- const produces = ['application/json'];
1905
- if (produces.indexOf('application/json') >= 0) {
1906
- localVarHeaderParams.Accept = produces[0];
1907
- } else {
1908
- localVarHeaderParams.Accept = 'application/json';
1909
- }
1910
- let localVarFormParams: any = {};
1911
-
1912
- // verify required parameter 'regulateId' is not null or undefined
1913
- if (regulateId === null || regulateId === undefined) {
1914
- throw new Error(
1915
- 'Required parameter regulateId was null or undefined when calling deleteRegulationCurrent.'
1916
- );
1917
- }
1918
-
1919
- (<any>Object).assign(localVarHeaderParams, options.headers);
1920
-
1921
- let localVarUseFormData = false;
1922
-
1923
- let localVarRequestOptions: localVarRequest.Options = {
1924
- method: 'DELETE',
1925
- qs: localVarQueryParameters,
1926
- headers: localVarHeaderParams,
1927
- uri: localVarPath,
1928
- useQuerystring: this._useQuerystring,
1929
- json: true,
1930
- };
1931
-
1932
- let authenticationPromise = Promise.resolve();
1933
- if (this.authentications.token.accessToken) {
1934
- authenticationPromise = authenticationPromise.then(() =>
1935
- this.authentications.token.applyToRequest(
1936
- localVarRequestOptions
1937
- )
1938
- );
1939
- }
1940
- authenticationPromise = authenticationPromise.then(() =>
1941
- this.authentications.default.applyToRequest(localVarRequestOptions)
1942
- );
1943
-
1944
- let interceptorPromise = authenticationPromise;
1945
- for (const interceptor of this.interceptors) {
1946
- interceptorPromise = interceptorPromise.then(() =>
1947
- interceptor(localVarRequestOptions)
1948
- );
1949
- }
1950
-
1951
- return interceptorPromise.then(() => {
1952
- if (Object.keys(localVarFormParams).length) {
1953
- if (localVarUseFormData) {
1954
- (<any>localVarRequestOptions).formData = localVarFormParams;
1955
- } else {
1956
- localVarRequestOptions.form = localVarFormParams;
1957
- }
1958
- }
1959
- return new Promise<{
1960
- response: http.IncomingMessage;
1961
- body: DeleteRegulation200Response;
1962
- }>((resolve, reject) => {
1963
- localVarRequest(
1964
- localVarRequestOptions,
1965
- (error, response, body) => {
1966
- if (error) {
1967
- reject(error);
1968
- } else {
1969
- if (
1970
- response.statusCode &&
1971
- response.statusCode >= 200 &&
1972
- response.statusCode <= 299
1973
- ) {
1974
- body = ObjectSerializer.deserialize(
1975
- body,
1976
- 'DeleteRegulation200Response'
1977
- );
1978
- resolve({ response: response, body: body });
1979
- } else {
1980
- reject(
1981
- new HttpError(
1982
- response,
1983
- body,
1984
- response.statusCode
1985
- )
1986
- );
1987
- }
1988
- }
1989
- }
1990
- );
1991
- });
1992
- });
1993
- }
1994
- /**
1995
- * Deletes a regulation from the Workspace. The regulation must be in the initialized state to be deleted. When called, this endpoint may generate the `Regulation Deleted` [Audit Trail](/tag/Audit-Trail) event.
1996
- * @summary Delete Regulation
1997
- * @param regulateId
1998
- */
1999
- public async deleteRegulationV1(
2000
- regulateId: string,
2001
- options: { headers: { [name: string]: string } } = { headers: {} }
2002
- ): Promise<{
2003
- response: http.IncomingMessage;
2004
- body: DeleteRegulation200Response;
2005
- }> {
2006
- const localVarPath =
2007
- this.basePath +
2008
- '/regulations/{regulateId}'.replace(
2009
- '{' + 'regulateId' + '}',
2010
- encodeURIComponent(String(regulateId))
2011
- );
2012
- let localVarQueryParameters: any = {};
2013
- let localVarHeaderParams: any = (<any>Object).assign(
2014
- {},
2015
- this._defaultHeaders
2016
- );
2017
- const produces = [
2018
- 'application/vnd.segment.v1+json',
2019
- 'application/json',
2020
- ];
2021
- if (produces.indexOf('application/json') >= 0) {
2022
- localVarHeaderParams.Accept = produces[0];
2023
- } else {
2024
- localVarHeaderParams.Accept = 'application/json';
2025
- }
2026
- let localVarFormParams: any = {};
2027
-
2028
- // verify required parameter 'regulateId' is not null or undefined
2029
- if (regulateId === null || regulateId === undefined) {
2030
- throw new Error(
2031
- 'Required parameter regulateId was null or undefined when calling deleteRegulationV1.'
2032
- );
2033
- }
2034
-
2035
- (<any>Object).assign(localVarHeaderParams, options.headers);
2036
-
2037
- let localVarUseFormData = false;
2038
-
2039
- let localVarRequestOptions: localVarRequest.Options = {
2040
- method: 'DELETE',
2041
- qs: localVarQueryParameters,
2042
- headers: localVarHeaderParams,
2043
- uri: localVarPath,
2044
- useQuerystring: this._useQuerystring,
2045
- json: true,
2046
- };
2047
-
2048
- let authenticationPromise = Promise.resolve();
2049
- if (this.authentications.token.accessToken) {
2050
- authenticationPromise = authenticationPromise.then(() =>
2051
- this.authentications.token.applyToRequest(
2052
- localVarRequestOptions
2053
- )
2054
- );
2055
- }
2056
- authenticationPromise = authenticationPromise.then(() =>
2057
- this.authentications.default.applyToRequest(localVarRequestOptions)
2058
- );
2059
-
2060
- let interceptorPromise = authenticationPromise;
2061
- for (const interceptor of this.interceptors) {
2062
- interceptorPromise = interceptorPromise.then(() =>
2063
- interceptor(localVarRequestOptions)
2064
- );
2065
- }
2066
-
2067
- return interceptorPromise.then(() => {
2068
- if (Object.keys(localVarFormParams).length) {
2069
- if (localVarUseFormData) {
2070
- (<any>localVarRequestOptions).formData = localVarFormParams;
2071
- } else {
2072
- localVarRequestOptions.form = localVarFormParams;
2073
- }
2074
- }
2075
- return new Promise<{
2076
- response: http.IncomingMessage;
2077
- body: DeleteRegulation200Response;
2078
- }>((resolve, reject) => {
2079
- localVarRequest(
2080
- localVarRequestOptions,
2081
- (error, response, body) => {
2082
- if (error) {
2083
- reject(error);
2084
- } else {
2085
- if (
2086
- response.statusCode &&
2087
- response.statusCode >= 200 &&
2088
- response.statusCode <= 299
2089
- ) {
2090
- body = ObjectSerializer.deserialize(
2091
- body,
2092
- 'DeleteRegulation200Response'
2093
- );
2094
- resolve({ response: response, body: body });
2095
- } else {
2096
- reject(
2097
- new HttpError(
2098
- response,
2099
- body,
2100
- response.statusCode
2101
- )
2102
- );
2103
- }
2104
- }
2105
- }
2106
- );
2107
- });
2108
- });
2109
- }
2110
- /**
2111
- * Gets a regulation from the Workspace. Config API omitted fields: - `parent`
2112
- * @summary Get Regulation
2113
- * @param regulateId
2114
- */
2115
- public async getRegulationAlpha(
2116
- regulateId: string,
2117
- options: { headers: { [name: string]: string } } = { headers: {} }
2118
- ): Promise<{
2119
- response: http.IncomingMessage;
2120
- body: GetRegulation200Response;
2121
- }> {
2122
- const localVarPath =
2123
- this.basePath +
2124
- '/regulations/{regulateId}'.replace(
2125
- '{' + 'regulateId' + '}',
2126
- encodeURIComponent(String(regulateId))
2127
- );
2128
- let localVarQueryParameters: any = {};
2129
- let localVarHeaderParams: any = (<any>Object).assign(
2130
- {},
2131
- this._defaultHeaders
2132
- );
2133
- const produces = [
2134
- 'application/vnd.segment.v1alpha+json',
2135
- 'application/json',
2136
- ];
2137
- if (produces.indexOf('application/json') >= 0) {
2138
- localVarHeaderParams.Accept = produces[0];
2139
- } else {
2140
- localVarHeaderParams.Accept = 'application/json';
2141
- }
2142
- let localVarFormParams: any = {};
2143
-
2144
- // verify required parameter 'regulateId' is not null or undefined
2145
- if (regulateId === null || regulateId === undefined) {
2146
- throw new Error(
2147
- 'Required parameter regulateId was null or undefined when calling getRegulationAlpha.'
2148
- );
2149
- }
2150
-
2151
- (<any>Object).assign(localVarHeaderParams, options.headers);
2152
-
2153
- let localVarUseFormData = false;
2154
-
2155
- let localVarRequestOptions: localVarRequest.Options = {
2156
- method: 'GET',
2157
- qs: localVarQueryParameters,
2158
- headers: localVarHeaderParams,
2159
- uri: localVarPath,
2160
- useQuerystring: this._useQuerystring,
2161
- json: true,
2162
- };
2163
-
2164
- let authenticationPromise = Promise.resolve();
2165
- if (this.authentications.token.accessToken) {
2166
- authenticationPromise = authenticationPromise.then(() =>
2167
- this.authentications.token.applyToRequest(
2168
- localVarRequestOptions
2169
- )
2170
- );
2171
- }
2172
- authenticationPromise = authenticationPromise.then(() =>
2173
- this.authentications.default.applyToRequest(localVarRequestOptions)
2174
- );
2175
-
2176
- let interceptorPromise = authenticationPromise;
2177
- for (const interceptor of this.interceptors) {
2178
- interceptorPromise = interceptorPromise.then(() =>
2179
- interceptor(localVarRequestOptions)
2180
- );
2181
- }
2182
-
2183
- return interceptorPromise.then(() => {
2184
- if (Object.keys(localVarFormParams).length) {
2185
- if (localVarUseFormData) {
2186
- (<any>localVarRequestOptions).formData = localVarFormParams;
2187
- } else {
2188
- localVarRequestOptions.form = localVarFormParams;
2189
- }
2190
- }
2191
- return new Promise<{
2192
- response: http.IncomingMessage;
2193
- body: GetRegulation200Response;
2194
- }>((resolve, reject) => {
2195
- localVarRequest(
2196
- localVarRequestOptions,
2197
- (error, response, body) => {
2198
- if (error) {
2199
- reject(error);
2200
- } else {
2201
- if (
2202
- response.statusCode &&
2203
- response.statusCode >= 200 &&
2204
- response.statusCode <= 299
2205
- ) {
2206
- body = ObjectSerializer.deserialize(
2207
- body,
2208
- 'GetRegulation200Response'
2209
- );
2210
- resolve({ response: response, body: body });
2211
- } else {
2212
- reject(
2213
- new HttpError(
2214
- response,
2215
- body,
2216
- response.statusCode
2217
- )
2218
- );
2219
- }
2220
- }
2221
- }
2222
- );
2223
- });
2224
- });
2225
- }
2226
- /**
2227
- * Gets a regulation from the Workspace. Config API omitted fields: - `parent`
2228
- * @summary Get Regulation
2229
- * @param regulateId
2230
- */
2231
- public async getRegulationBeta(
2232
- regulateId: string,
2233
- options: { headers: { [name: string]: string } } = { headers: {} }
2234
- ): Promise<{
2235
- response: http.IncomingMessage;
2236
- body: GetRegulation200Response;
2237
- }> {
2238
- const localVarPath =
2239
- this.basePath +
2240
- '/regulations/{regulateId}'.replace(
2241
- '{' + 'regulateId' + '}',
2242
- encodeURIComponent(String(regulateId))
2243
- );
2244
- let localVarQueryParameters: any = {};
2245
- let localVarHeaderParams: any = (<any>Object).assign(
2246
- {},
2247
- this._defaultHeaders
2248
- );
2249
- const produces = [
2250
- 'application/vnd.segment.v1beta+json',
2251
- 'application/json',
2252
- ];
2253
- if (produces.indexOf('application/json') >= 0) {
2254
- localVarHeaderParams.Accept = produces[0];
2255
- } else {
2256
- localVarHeaderParams.Accept = 'application/json';
2257
- }
2258
- let localVarFormParams: any = {};
2259
-
2260
- // verify required parameter 'regulateId' is not null or undefined
2261
- if (regulateId === null || regulateId === undefined) {
2262
- throw new Error(
2263
- 'Required parameter regulateId was null or undefined when calling getRegulationBeta.'
2264
- );
2265
- }
2266
-
2267
- (<any>Object).assign(localVarHeaderParams, options.headers);
2268
-
2269
- let localVarUseFormData = false;
2270
-
2271
- let localVarRequestOptions: localVarRequest.Options = {
2272
- method: 'GET',
2273
- qs: localVarQueryParameters,
2274
- headers: localVarHeaderParams,
2275
- uri: localVarPath,
2276
- useQuerystring: this._useQuerystring,
2277
- json: true,
2278
- };
2279
-
2280
- let authenticationPromise = Promise.resolve();
2281
- if (this.authentications.token.accessToken) {
2282
- authenticationPromise = authenticationPromise.then(() =>
2283
- this.authentications.token.applyToRequest(
2284
- localVarRequestOptions
2285
- )
2286
- );
2287
- }
2288
- authenticationPromise = authenticationPromise.then(() =>
2289
- this.authentications.default.applyToRequest(localVarRequestOptions)
2290
- );
2291
-
2292
- let interceptorPromise = authenticationPromise;
2293
- for (const interceptor of this.interceptors) {
2294
- interceptorPromise = interceptorPromise.then(() =>
2295
- interceptor(localVarRequestOptions)
2296
- );
2297
- }
2298
-
2299
- return interceptorPromise.then(() => {
2300
- if (Object.keys(localVarFormParams).length) {
2301
- if (localVarUseFormData) {
2302
- (<any>localVarRequestOptions).formData = localVarFormParams;
2303
- } else {
2304
- localVarRequestOptions.form = localVarFormParams;
2305
- }
2306
- }
2307
- return new Promise<{
2308
- response: http.IncomingMessage;
2309
- body: GetRegulation200Response;
2310
- }>((resolve, reject) => {
2311
- localVarRequest(
2312
- localVarRequestOptions,
2313
- (error, response, body) => {
2314
- if (error) {
2315
- reject(error);
2316
- } else {
2317
- if (
2318
- response.statusCode &&
2319
- response.statusCode >= 200 &&
2320
- response.statusCode <= 299
2321
- ) {
2322
- body = ObjectSerializer.deserialize(
2323
- body,
2324
- 'GetRegulation200Response'
2325
- );
2326
- resolve({ response: response, body: body });
2327
- } else {
2328
- reject(
2329
- new HttpError(
2330
- response,
2331
- body,
2332
- response.statusCode
2333
- )
2334
- );
2335
- }
2336
- }
2337
- }
2338
- );
2339
- });
2340
- });
2341
- }
2342
- /**
2343
- * Gets a regulation from the Workspace. Config API omitted fields: - `parent`
2344
- * @summary Get Regulation
2345
- * @param regulateId
2346
- */
2347
- public async getRegulationCurrent(
2348
- regulateId: string,
2349
- options: { headers: { [name: string]: string } } = { headers: {} }
2350
- ): Promise<{
2351
- response: http.IncomingMessage;
2352
- body: GetRegulation200Response;
2353
- }> {
2354
- const localVarPath =
2355
- this.basePath +
2356
- '/regulations/{regulateId}'.replace(
2357
- '{' + 'regulateId' + '}',
2358
- encodeURIComponent(String(regulateId))
2359
- );
2360
- let localVarQueryParameters: any = {};
2361
- let localVarHeaderParams: any = (<any>Object).assign(
2362
- {},
2363
- this._defaultHeaders
2364
- );
2365
- const produces = ['application/json'];
2366
- if (produces.indexOf('application/json') >= 0) {
2367
- localVarHeaderParams.Accept = produces[0];
2368
- } else {
2369
- localVarHeaderParams.Accept = 'application/json';
2370
- }
2371
- let localVarFormParams: any = {};
2372
-
2373
- // verify required parameter 'regulateId' is not null or undefined
2374
- if (regulateId === null || regulateId === undefined) {
2375
- throw new Error(
2376
- 'Required parameter regulateId was null or undefined when calling getRegulationCurrent.'
2377
- );
2378
- }
2379
-
2380
- (<any>Object).assign(localVarHeaderParams, options.headers);
2381
-
2382
- let localVarUseFormData = false;
2383
-
2384
- let localVarRequestOptions: localVarRequest.Options = {
2385
- method: 'GET',
2386
- qs: localVarQueryParameters,
2387
- headers: localVarHeaderParams,
2388
- uri: localVarPath,
2389
- useQuerystring: this._useQuerystring,
2390
- json: true,
2391
- };
2392
-
2393
- let authenticationPromise = Promise.resolve();
2394
- if (this.authentications.token.accessToken) {
2395
- authenticationPromise = authenticationPromise.then(() =>
2396
- this.authentications.token.applyToRequest(
2397
- localVarRequestOptions
2398
- )
2399
- );
2400
- }
2401
- authenticationPromise = authenticationPromise.then(() =>
2402
- this.authentications.default.applyToRequest(localVarRequestOptions)
2403
- );
2404
-
2405
- let interceptorPromise = authenticationPromise;
2406
- for (const interceptor of this.interceptors) {
2407
- interceptorPromise = interceptorPromise.then(() =>
2408
- interceptor(localVarRequestOptions)
2409
- );
2410
- }
2411
-
2412
- return interceptorPromise.then(() => {
2413
- if (Object.keys(localVarFormParams).length) {
2414
- if (localVarUseFormData) {
2415
- (<any>localVarRequestOptions).formData = localVarFormParams;
2416
- } else {
2417
- localVarRequestOptions.form = localVarFormParams;
2418
- }
2419
- }
2420
- return new Promise<{
2421
- response: http.IncomingMessage;
2422
- body: GetRegulation200Response;
2423
- }>((resolve, reject) => {
2424
- localVarRequest(
2425
- localVarRequestOptions,
2426
- (error, response, body) => {
2427
- if (error) {
2428
- reject(error);
2429
- } else {
2430
- if (
2431
- response.statusCode &&
2432
- response.statusCode >= 200 &&
2433
- response.statusCode <= 299
2434
- ) {
2435
- body = ObjectSerializer.deserialize(
2436
- body,
2437
- 'GetRegulation200Response'
2438
- );
2439
- resolve({ response: response, body: body });
2440
- } else {
2441
- reject(
2442
- new HttpError(
2443
- response,
2444
- body,
2445
- response.statusCode
2446
- )
2447
- );
2448
- }
2449
- }
2450
- }
2451
- );
2452
- });
2453
- });
2454
- }
2455
- /**
2456
- * Gets a regulation from the Workspace. Config API omitted fields: - `parent`
2457
- * @summary Get Regulation
2458
- * @param regulateId
2459
- */
2460
- public async getRegulationV1(
2461
- regulateId: string,
2462
- options: { headers: { [name: string]: string } } = { headers: {} }
2463
- ): Promise<{
2464
- response: http.IncomingMessage;
2465
- body: GetRegulation200Response;
2466
- }> {
2467
- const localVarPath =
2468
- this.basePath +
2469
- '/regulations/{regulateId}'.replace(
2470
- '{' + 'regulateId' + '}',
2471
- encodeURIComponent(String(regulateId))
2472
- );
2473
- let localVarQueryParameters: any = {};
2474
- let localVarHeaderParams: any = (<any>Object).assign(
2475
- {},
2476
- this._defaultHeaders
2477
- );
2478
- const produces = [
2479
- 'application/vnd.segment.v1+json',
2480
- 'application/json',
2481
- ];
2482
- if (produces.indexOf('application/json') >= 0) {
2483
- localVarHeaderParams.Accept = produces[0];
2484
- } else {
2485
- localVarHeaderParams.Accept = 'application/json';
2486
- }
2487
- let localVarFormParams: any = {};
2488
-
2489
- // verify required parameter 'regulateId' is not null or undefined
2490
- if (regulateId === null || regulateId === undefined) {
2491
- throw new Error(
2492
- 'Required parameter regulateId was null or undefined when calling getRegulationV1.'
2493
- );
2494
- }
2495
-
2496
- (<any>Object).assign(localVarHeaderParams, options.headers);
2497
-
2498
- let localVarUseFormData = false;
2499
-
2500
- let localVarRequestOptions: localVarRequest.Options = {
2501
- method: 'GET',
2502
- qs: localVarQueryParameters,
2503
- headers: localVarHeaderParams,
2504
- uri: localVarPath,
2505
- useQuerystring: this._useQuerystring,
2506
- json: true,
2507
- };
2508
-
2509
- let authenticationPromise = Promise.resolve();
2510
- if (this.authentications.token.accessToken) {
2511
- authenticationPromise = authenticationPromise.then(() =>
2512
- this.authentications.token.applyToRequest(
2513
- localVarRequestOptions
2514
- )
2515
- );
2516
- }
2517
- authenticationPromise = authenticationPromise.then(() =>
2518
- this.authentications.default.applyToRequest(localVarRequestOptions)
2519
- );
2520
-
2521
- let interceptorPromise = authenticationPromise;
2522
- for (const interceptor of this.interceptors) {
2523
- interceptorPromise = interceptorPromise.then(() =>
2524
- interceptor(localVarRequestOptions)
2525
- );
2526
- }
2527
-
2528
- return interceptorPromise.then(() => {
2529
- if (Object.keys(localVarFormParams).length) {
2530
- if (localVarUseFormData) {
2531
- (<any>localVarRequestOptions).formData = localVarFormParams;
2532
- } else {
2533
- localVarRequestOptions.form = localVarFormParams;
2534
- }
2535
- }
2536
- return new Promise<{
2537
- response: http.IncomingMessage;
2538
- body: GetRegulation200Response;
2539
- }>((resolve, reject) => {
2540
- localVarRequest(
2541
- localVarRequestOptions,
2542
- (error, response, body) => {
2543
- if (error) {
2544
- reject(error);
2545
- } else {
2546
- if (
2547
- response.statusCode &&
2548
- response.statusCode >= 200 &&
2549
- response.statusCode <= 299
2550
- ) {
2551
- body = ObjectSerializer.deserialize(
2552
- body,
2553
- 'GetRegulation200Response'
2554
- );
2555
- resolve({ response: response, body: body });
2556
- } else {
2557
- reject(
2558
- new HttpError(
2559
- response,
2560
- body,
2561
- response.statusCode
2562
- )
2563
- );
2564
- }
2565
- }
2566
- }
2567
- );
2568
- });
2569
- });
2570
- }
2571
- /**
2572
- * Lists all Source-scoped regulations.
2573
- * @summary List Regulations from Source
2574
- * @param sourceId
2575
- * @param pagination Pagination parameters. This parameter exists in alpha.
2576
- * @param status The status on which to filter returned regulations. This parameter exists in alpha.
2577
- * @param regulationTypes The regulation types on which to filter returned regulations. This parameter exists in alpha.
2578
- */
2579
- public async listRegulationsFromSourceAlpha(
2580
- sourceId: string,
2581
- pagination: PaginationInput,
2582
- status?:
2583
- | 'FAILED'
2584
- | 'FINISHED'
2585
- | 'INITIALIZED'
2586
- | 'INVALID'
2587
- | 'NOT_SUPPORTED'
2588
- | 'PARTIAL_SUCCESS'
2589
- | 'RUNNING',
2590
- regulationTypes?: Array<
2591
- | 'BULK_DELETE_ONLY'
2592
- | 'DELETE_INTERNAL'
2593
- | 'DELETE_ONLY'
2594
- | 'SUPPRESS_ONLY'
2595
- | 'SUPPRESS_WITH_DELETE'
2596
- | 'UNSUPPRESS'
2597
- >,
2598
- options: { headers: { [name: string]: string } } = { headers: {} }
2599
- ): Promise<{
2600
- response: http.IncomingMessage;
2601
- body: ListRegulationsFromSource200Response;
2602
- }> {
2603
- const localVarPath =
2604
- this.basePath +
2605
- '/regulations/sources/{sourceId}'.replace(
2606
- '{' + 'sourceId' + '}',
2607
- encodeURIComponent(String(sourceId))
2608
- );
2609
- let localVarQueryParameters: any = {};
2610
- let localVarHeaderParams: any = (<any>Object).assign(
2611
- {},
2612
- this._defaultHeaders
2613
- );
2614
- const produces = [
2615
- 'application/vnd.segment.v1alpha+json',
2616
- 'application/json',
2617
- ];
2618
- if (produces.indexOf('application/json') >= 0) {
2619
- localVarHeaderParams.Accept = produces[0];
2620
- } else {
2621
- localVarHeaderParams.Accept = 'application/json';
2622
- }
2623
- let localVarFormParams: any = {};
2624
-
2625
- // verify required parameter 'sourceId' is not null or undefined
2626
- if (sourceId === null || sourceId === undefined) {
2627
- throw new Error(
2628
- 'Required parameter sourceId was null or undefined when calling listRegulationsFromSourceAlpha.'
2629
- );
2630
- }
2631
-
2632
- // verify required parameter 'pagination' is not null or undefined
2633
- if (pagination === null || pagination === undefined) {
2634
- throw new Error(
2635
- 'Required parameter pagination was null or undefined when calling listRegulationsFromSourceAlpha.'
2636
- );
2637
- }
2638
-
2639
- if (status !== undefined) {
2640
- localVarQueryParameters['status'] = ObjectSerializer.serialize(
2641
- status,
2642
- "'FAILED' | 'FINISHED' | 'INITIALIZED' | 'INVALID' | 'NOT_SUPPORTED' | 'PARTIAL_SUCCESS' | 'RUNNING'"
2643
- );
2644
- }
2645
-
2646
- if (regulationTypes !== undefined) {
2647
- localVarQueryParameters['regulationTypes'] =
2648
- ObjectSerializer.serialize(
2649
- regulationTypes,
2650
- "Array<'BULK_DELETE_ONLY' | 'DELETE_INTERNAL' | 'DELETE_ONLY' | 'SUPPRESS_ONLY' | 'SUPPRESS_WITH_DELETE' | 'UNSUPPRESS'>"
2651
- );
2652
- }
2653
-
2654
- if (pagination !== undefined) {
2655
- localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
2656
- pagination,
2657
- 'PaginationInput'
2658
- );
2659
- }
2660
-
2661
- (<any>Object).assign(localVarHeaderParams, options.headers);
2662
-
2663
- let localVarUseFormData = false;
2664
-
2665
- let localVarRequestOptions: localVarRequest.Options = {
2666
- method: 'GET',
2667
- qs: localVarQueryParameters,
2668
- headers: localVarHeaderParams,
2669
- uri: localVarPath,
2670
- useQuerystring: this._useQuerystring,
2671
- json: true,
2672
- };
2673
-
2674
- let authenticationPromise = Promise.resolve();
2675
- if (this.authentications.token.accessToken) {
2676
- authenticationPromise = authenticationPromise.then(() =>
2677
- this.authentications.token.applyToRequest(
2678
- localVarRequestOptions
2679
- )
2680
- );
2681
- }
2682
- authenticationPromise = authenticationPromise.then(() =>
2683
- this.authentications.default.applyToRequest(localVarRequestOptions)
2684
- );
2685
-
2686
- let interceptorPromise = authenticationPromise;
2687
- for (const interceptor of this.interceptors) {
2688
- interceptorPromise = interceptorPromise.then(() =>
2689
- interceptor(localVarRequestOptions)
2690
- );
2691
- }
2692
-
2693
- return interceptorPromise.then(() => {
2694
- if (Object.keys(localVarFormParams).length) {
2695
- if (localVarUseFormData) {
2696
- (<any>localVarRequestOptions).formData = localVarFormParams;
2697
- } else {
2698
- localVarRequestOptions.form = localVarFormParams;
2699
- }
2700
- }
2701
- return new Promise<{
2702
- response: http.IncomingMessage;
2703
- body: ListRegulationsFromSource200Response;
2704
- }>((resolve, reject) => {
2705
- localVarRequest(
2706
- localVarRequestOptions,
2707
- (error, response, body) => {
2708
- if (error) {
2709
- reject(error);
2710
- } else {
2711
- if (
2712
- response.statusCode &&
2713
- response.statusCode >= 200 &&
2714
- response.statusCode <= 299
2715
- ) {
2716
- body = ObjectSerializer.deserialize(
2717
- body,
2718
- 'ListRegulationsFromSource200Response'
2719
- );
2720
- resolve({ response: response, body: body });
2721
- } else {
2722
- reject(
2723
- new HttpError(
2724
- response,
2725
- body,
2726
- response.statusCode
2727
- )
2728
- );
2729
- }
2730
- }
2731
- }
2732
- );
2733
- });
2734
- });
2735
- }
2736
- /**
2737
- * Lists all Source-scoped regulations.
2738
- * @summary List Regulations from Source
2739
- * @param sourceId
2740
- * @param pagination Pagination parameters. This parameter exists in alpha.
2741
- * @param status The status on which to filter returned regulations. This parameter exists in alpha.
2742
- * @param regulationTypes The regulation types on which to filter returned regulations. This parameter exists in alpha.
2743
- */
2744
- public async listRegulationsFromSourceBeta(
2745
- sourceId: string,
2746
- pagination: PaginationInput,
2747
- status?:
2748
- | 'FAILED'
2749
- | 'FINISHED'
2750
- | 'INITIALIZED'
2751
- | 'INVALID'
2752
- | 'NOT_SUPPORTED'
2753
- | 'PARTIAL_SUCCESS'
2754
- | 'RUNNING',
2755
- regulationTypes?: Array<
2756
- | 'BULK_DELETE_ONLY'
2757
- | 'DELETE_INTERNAL'
2758
- | 'DELETE_ONLY'
2759
- | 'SUPPRESS_ONLY'
2760
- | 'SUPPRESS_WITH_DELETE'
2761
- | 'UNSUPPRESS'
2762
- >,
2763
- options: { headers: { [name: string]: string } } = { headers: {} }
2764
- ): Promise<{
2765
- response: http.IncomingMessage;
2766
- body: ListRegulationsFromSource200Response;
2767
- }> {
2768
- const localVarPath =
2769
- this.basePath +
2770
- '/regulations/sources/{sourceId}'.replace(
2771
- '{' + 'sourceId' + '}',
2772
- encodeURIComponent(String(sourceId))
2773
- );
2774
- let localVarQueryParameters: any = {};
2775
- let localVarHeaderParams: any = (<any>Object).assign(
2776
- {},
2777
- this._defaultHeaders
2778
- );
2779
- const produces = [
2780
- 'application/vnd.segment.v1beta+json',
2781
- 'application/json',
2782
- ];
2783
- if (produces.indexOf('application/json') >= 0) {
2784
- localVarHeaderParams.Accept = produces[0];
2785
- } else {
2786
- localVarHeaderParams.Accept = 'application/json';
2787
- }
2788
- let localVarFormParams: any = {};
2789
-
2790
- // verify required parameter 'sourceId' is not null or undefined
2791
- if (sourceId === null || sourceId === undefined) {
2792
- throw new Error(
2793
- 'Required parameter sourceId was null or undefined when calling listRegulationsFromSourceBeta.'
2794
- );
2795
- }
2796
-
2797
- // verify required parameter 'pagination' is not null or undefined
2798
- if (pagination === null || pagination === undefined) {
2799
- throw new Error(
2800
- 'Required parameter pagination was null or undefined when calling listRegulationsFromSourceBeta.'
2801
- );
2802
- }
2803
-
2804
- if (status !== undefined) {
2805
- localVarQueryParameters['status'] = ObjectSerializer.serialize(
2806
- status,
2807
- "'FAILED' | 'FINISHED' | 'INITIALIZED' | 'INVALID' | 'NOT_SUPPORTED' | 'PARTIAL_SUCCESS' | 'RUNNING'"
2808
- );
2809
- }
2810
-
2811
- if (regulationTypes !== undefined) {
2812
- localVarQueryParameters['regulationTypes'] =
2813
- ObjectSerializer.serialize(
2814
- regulationTypes,
2815
- "Array<'BULK_DELETE_ONLY' | 'DELETE_INTERNAL' | 'DELETE_ONLY' | 'SUPPRESS_ONLY' | 'SUPPRESS_WITH_DELETE' | 'UNSUPPRESS'>"
2816
- );
2817
- }
2818
-
2819
- if (pagination !== undefined) {
2820
- localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
2821
- pagination,
2822
- 'PaginationInput'
2823
- );
2824
- }
2825
-
2826
- (<any>Object).assign(localVarHeaderParams, options.headers);
2827
-
2828
- let localVarUseFormData = false;
2829
-
2830
- let localVarRequestOptions: localVarRequest.Options = {
2831
- method: 'GET',
2832
- qs: localVarQueryParameters,
2833
- headers: localVarHeaderParams,
2834
- uri: localVarPath,
2835
- useQuerystring: this._useQuerystring,
2836
- json: true,
2837
- };
2838
-
2839
- let authenticationPromise = Promise.resolve();
2840
- if (this.authentications.token.accessToken) {
2841
- authenticationPromise = authenticationPromise.then(() =>
2842
- this.authentications.token.applyToRequest(
2843
- localVarRequestOptions
2844
- )
2845
- );
2846
- }
2847
- authenticationPromise = authenticationPromise.then(() =>
2848
- this.authentications.default.applyToRequest(localVarRequestOptions)
2849
- );
2850
-
2851
- let interceptorPromise = authenticationPromise;
2852
- for (const interceptor of this.interceptors) {
2853
- interceptorPromise = interceptorPromise.then(() =>
2854
- interceptor(localVarRequestOptions)
2855
- );
2856
- }
2857
-
2858
- return interceptorPromise.then(() => {
2859
- if (Object.keys(localVarFormParams).length) {
2860
- if (localVarUseFormData) {
2861
- (<any>localVarRequestOptions).formData = localVarFormParams;
2862
- } else {
2863
- localVarRequestOptions.form = localVarFormParams;
2864
- }
2865
- }
2866
- return new Promise<{
2867
- response: http.IncomingMessage;
2868
- body: ListRegulationsFromSource200Response;
2869
- }>((resolve, reject) => {
2870
- localVarRequest(
2871
- localVarRequestOptions,
2872
- (error, response, body) => {
2873
- if (error) {
2874
- reject(error);
2875
- } else {
2876
- if (
2877
- response.statusCode &&
2878
- response.statusCode >= 200 &&
2879
- response.statusCode <= 299
2880
- ) {
2881
- body = ObjectSerializer.deserialize(
2882
- body,
2883
- 'ListRegulationsFromSource200Response'
2884
- );
2885
- resolve({ response: response, body: body });
2886
- } else {
2887
- reject(
2888
- new HttpError(
2889
- response,
2890
- body,
2891
- response.statusCode
2892
- )
2893
- );
2894
- }
2895
- }
2896
- }
2897
- );
2898
- });
2899
- });
2900
- }
2901
- /**
2902
- * Lists all Source-scoped regulations.
2903
- * @summary List Regulations from Source
2904
- * @param sourceId
2905
- * @param pagination Pagination parameters. This parameter exists in alpha.
2906
- * @param status The status on which to filter returned regulations. This parameter exists in alpha.
2907
- * @param regulationTypes The regulation types on which to filter returned regulations. This parameter exists in alpha.
2908
- */
2909
- public async listRegulationsFromSourceCurrent(
2910
- sourceId: string,
2911
- pagination: PaginationInput,
2912
- status?:
2913
- | 'FAILED'
2914
- | 'FINISHED'
2915
- | 'INITIALIZED'
2916
- | 'INVALID'
2917
- | 'NOT_SUPPORTED'
2918
- | 'PARTIAL_SUCCESS'
2919
- | 'RUNNING',
2920
- regulationTypes?: Array<
2921
- | 'BULK_DELETE_ONLY'
2922
- | 'DELETE_INTERNAL'
2923
- | 'DELETE_ONLY'
2924
- | 'SUPPRESS_ONLY'
2925
- | 'SUPPRESS_WITH_DELETE'
2926
- | 'UNSUPPRESS'
2927
- >,
2928
- options: { headers: { [name: string]: string } } = { headers: {} }
2929
- ): Promise<{
2930
- response: http.IncomingMessage;
2931
- body: ListRegulationsFromSource200Response;
2932
- }> {
2933
- const localVarPath =
2934
- this.basePath +
2935
- '/regulations/sources/{sourceId}'.replace(
2936
- '{' + 'sourceId' + '}',
2937
- encodeURIComponent(String(sourceId))
2938
- );
2939
- let localVarQueryParameters: any = {};
2940
- let localVarHeaderParams: any = (<any>Object).assign(
2941
- {},
2942
- this._defaultHeaders
2943
- );
2944
- const produces = ['application/json'];
2945
- if (produces.indexOf('application/json') >= 0) {
2946
- localVarHeaderParams.Accept = produces[0];
2947
- } else {
2948
- localVarHeaderParams.Accept = 'application/json';
2949
- }
2950
- let localVarFormParams: any = {};
2951
-
2952
- // verify required parameter 'sourceId' is not null or undefined
2953
- if (sourceId === null || sourceId === undefined) {
2954
- throw new Error(
2955
- 'Required parameter sourceId was null or undefined when calling listRegulationsFromSourceCurrent.'
2956
- );
2957
- }
2958
-
2959
- // verify required parameter 'pagination' is not null or undefined
2960
- if (pagination === null || pagination === undefined) {
2961
- throw new Error(
2962
- 'Required parameter pagination was null or undefined when calling listRegulationsFromSourceCurrent.'
2963
- );
2964
- }
2965
-
2966
- if (status !== undefined) {
2967
- localVarQueryParameters['status'] = ObjectSerializer.serialize(
2968
- status,
2969
- "'FAILED' | 'FINISHED' | 'INITIALIZED' | 'INVALID' | 'NOT_SUPPORTED' | 'PARTIAL_SUCCESS' | 'RUNNING'"
2970
- );
2971
- }
2972
-
2973
- if (regulationTypes !== undefined) {
2974
- localVarQueryParameters['regulationTypes'] =
2975
- ObjectSerializer.serialize(
2976
- regulationTypes,
2977
- "Array<'BULK_DELETE_ONLY' | 'DELETE_INTERNAL' | 'DELETE_ONLY' | 'SUPPRESS_ONLY' | 'SUPPRESS_WITH_DELETE' | 'UNSUPPRESS'>"
2978
- );
2979
- }
2980
-
2981
- if (pagination !== undefined) {
2982
- localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
2983
- pagination,
2984
- 'PaginationInput'
2985
- );
2986
- }
2987
-
2988
- (<any>Object).assign(localVarHeaderParams, options.headers);
2989
-
2990
- let localVarUseFormData = false;
2991
-
2992
- let localVarRequestOptions: localVarRequest.Options = {
2993
- method: 'GET',
2994
- qs: localVarQueryParameters,
2995
- headers: localVarHeaderParams,
2996
- uri: localVarPath,
2997
- useQuerystring: this._useQuerystring,
2998
- json: true,
2999
- };
3000
-
3001
- let authenticationPromise = Promise.resolve();
3002
- if (this.authentications.token.accessToken) {
3003
- authenticationPromise = authenticationPromise.then(() =>
3004
- this.authentications.token.applyToRequest(
3005
- localVarRequestOptions
3006
- )
3007
- );
3008
- }
3009
- authenticationPromise = authenticationPromise.then(() =>
3010
- this.authentications.default.applyToRequest(localVarRequestOptions)
3011
- );
3012
-
3013
- let interceptorPromise = authenticationPromise;
3014
- for (const interceptor of this.interceptors) {
3015
- interceptorPromise = interceptorPromise.then(() =>
3016
- interceptor(localVarRequestOptions)
3017
- );
3018
- }
3019
-
3020
- return interceptorPromise.then(() => {
3021
- if (Object.keys(localVarFormParams).length) {
3022
- if (localVarUseFormData) {
3023
- (<any>localVarRequestOptions).formData = localVarFormParams;
3024
- } else {
3025
- localVarRequestOptions.form = localVarFormParams;
3026
- }
3027
- }
3028
- return new Promise<{
3029
- response: http.IncomingMessage;
3030
- body: ListRegulationsFromSource200Response;
3031
- }>((resolve, reject) => {
3032
- localVarRequest(
3033
- localVarRequestOptions,
3034
- (error, response, body) => {
3035
- if (error) {
3036
- reject(error);
3037
- } else {
3038
- if (
3039
- response.statusCode &&
3040
- response.statusCode >= 200 &&
3041
- response.statusCode <= 299
3042
- ) {
3043
- body = ObjectSerializer.deserialize(
3044
- body,
3045
- 'ListRegulationsFromSource200Response'
3046
- );
3047
- resolve({ response: response, body: body });
3048
- } else {
3049
- reject(
3050
- new HttpError(
3051
- response,
3052
- body,
3053
- response.statusCode
3054
- )
3055
- );
3056
- }
3057
- }
3058
- }
3059
- );
3060
- });
3061
- });
3062
- }
3063
- /**
3064
- * Lists all Source-scoped regulations.
3065
- * @summary List Regulations from Source
3066
- * @param sourceId
3067
- * @param pagination Pagination parameters. This parameter exists in alpha.
3068
- * @param status The status on which to filter returned regulations. This parameter exists in alpha.
3069
- * @param regulationTypes The regulation types on which to filter returned regulations. This parameter exists in alpha.
3070
- */
3071
- public async listRegulationsFromSourceV1(
3072
- sourceId: string,
3073
- pagination: PaginationInput,
3074
- status?:
3075
- | 'FAILED'
3076
- | 'FINISHED'
3077
- | 'INITIALIZED'
3078
- | 'INVALID'
3079
- | 'NOT_SUPPORTED'
3080
- | 'PARTIAL_SUCCESS'
3081
- | 'RUNNING',
3082
- regulationTypes?: Array<
3083
- | 'BULK_DELETE_ONLY'
3084
- | 'DELETE_INTERNAL'
3085
- | 'DELETE_ONLY'
3086
- | 'SUPPRESS_ONLY'
3087
- | 'SUPPRESS_WITH_DELETE'
3088
- | 'UNSUPPRESS'
3089
- >,
3090
- options: { headers: { [name: string]: string } } = { headers: {} }
3091
- ): Promise<{
3092
- response: http.IncomingMessage;
3093
- body: ListRegulationsFromSource200Response;
3094
- }> {
3095
- const localVarPath =
3096
- this.basePath +
3097
- '/regulations/sources/{sourceId}'.replace(
3098
- '{' + 'sourceId' + '}',
3099
- encodeURIComponent(String(sourceId))
3100
- );
3101
- let localVarQueryParameters: any = {};
3102
- let localVarHeaderParams: any = (<any>Object).assign(
3103
- {},
3104
- this._defaultHeaders
3105
- );
3106
- const produces = [
3107
- 'application/vnd.segment.v1+json',
3108
- 'application/json',
3109
- ];
3110
- if (produces.indexOf('application/json') >= 0) {
3111
- localVarHeaderParams.Accept = produces[0];
3112
- } else {
3113
- localVarHeaderParams.Accept = 'application/json';
3114
- }
3115
- let localVarFormParams: any = {};
3116
-
3117
- // verify required parameter 'sourceId' is not null or undefined
3118
- if (sourceId === null || sourceId === undefined) {
3119
- throw new Error(
3120
- 'Required parameter sourceId was null or undefined when calling listRegulationsFromSourceV1.'
3121
- );
3122
- }
3123
-
3124
- // verify required parameter 'pagination' is not null or undefined
3125
- if (pagination === null || pagination === undefined) {
3126
- throw new Error(
3127
- 'Required parameter pagination was null or undefined when calling listRegulationsFromSourceV1.'
3128
- );
3129
- }
3130
-
3131
- if (status !== undefined) {
3132
- localVarQueryParameters['status'] = ObjectSerializer.serialize(
3133
- status,
3134
- "'FAILED' | 'FINISHED' | 'INITIALIZED' | 'INVALID' | 'NOT_SUPPORTED' | 'PARTIAL_SUCCESS' | 'RUNNING'"
3135
- );
3136
- }
3137
-
3138
- if (regulationTypes !== undefined) {
3139
- localVarQueryParameters['regulationTypes'] =
3140
- ObjectSerializer.serialize(
3141
- regulationTypes,
3142
- "Array<'BULK_DELETE_ONLY' | 'DELETE_INTERNAL' | 'DELETE_ONLY' | 'SUPPRESS_ONLY' | 'SUPPRESS_WITH_DELETE' | 'UNSUPPRESS'>"
3143
- );
3144
- }
3145
-
3146
- if (pagination !== undefined) {
3147
- localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
3148
- pagination,
3149
- 'PaginationInput'
3150
- );
3151
- }
3152
-
3153
- (<any>Object).assign(localVarHeaderParams, options.headers);
3154
-
3155
- let localVarUseFormData = false;
3156
-
3157
- let localVarRequestOptions: localVarRequest.Options = {
3158
- method: 'GET',
3159
- qs: localVarQueryParameters,
3160
- headers: localVarHeaderParams,
3161
- uri: localVarPath,
3162
- useQuerystring: this._useQuerystring,
3163
- json: true,
3164
- };
3165
-
3166
- let authenticationPromise = Promise.resolve();
3167
- if (this.authentications.token.accessToken) {
3168
- authenticationPromise = authenticationPromise.then(() =>
3169
- this.authentications.token.applyToRequest(
3170
- localVarRequestOptions
3171
- )
3172
- );
3173
- }
3174
- authenticationPromise = authenticationPromise.then(() =>
3175
- this.authentications.default.applyToRequest(localVarRequestOptions)
3176
- );
3177
-
3178
- let interceptorPromise = authenticationPromise;
3179
- for (const interceptor of this.interceptors) {
3180
- interceptorPromise = interceptorPromise.then(() =>
3181
- interceptor(localVarRequestOptions)
3182
- );
3183
- }
3184
-
3185
- return interceptorPromise.then(() => {
3186
- if (Object.keys(localVarFormParams).length) {
3187
- if (localVarUseFormData) {
3188
- (<any>localVarRequestOptions).formData = localVarFormParams;
3189
- } else {
3190
- localVarRequestOptions.form = localVarFormParams;
3191
- }
3192
- }
3193
- return new Promise<{
3194
- response: http.IncomingMessage;
3195
- body: ListRegulationsFromSource200Response;
3196
- }>((resolve, reject) => {
3197
- localVarRequest(
3198
- localVarRequestOptions,
3199
- (error, response, body) => {
3200
- if (error) {
3201
- reject(error);
3202
- } else {
3203
- if (
3204
- response.statusCode &&
3205
- response.statusCode >= 200 &&
3206
- response.statusCode <= 299
3207
- ) {
3208
- body = ObjectSerializer.deserialize(
3209
- body,
3210
- 'ListRegulationsFromSource200Response'
3211
- );
3212
- resolve({ response: response, body: body });
3213
- } else {
3214
- reject(
3215
- new HttpError(
3216
- response,
3217
- body,
3218
- response.statusCode
3219
- )
3220
- );
3221
- }
3222
- }
3223
- }
3224
- );
3225
- });
3226
- });
3227
- }
3228
- /**
3229
- * Lists all suppressions in a given Workspace.
3230
- * @summary List Suppressions
3231
- * @param pagination Pagination parameters. This parameter exists in alpha.
3232
- */
3233
- public async listSuppressionsAlpha(
3234
- pagination: PaginationInput,
3235
- options: { headers: { [name: string]: string } } = { headers: {} }
3236
- ): Promise<{
3237
- response: http.IncomingMessage;
3238
- body: ListSuppressions200Response;
3239
- }> {
3240
- const localVarPath = this.basePath + '/suppressions';
3241
- let localVarQueryParameters: any = {};
3242
- let localVarHeaderParams: any = (<any>Object).assign(
3243
- {},
3244
- this._defaultHeaders
3245
- );
3246
- const produces = [
3247
- 'application/vnd.segment.v1alpha+json',
3248
- 'application/json',
3249
- ];
3250
- if (produces.indexOf('application/json') >= 0) {
3251
- localVarHeaderParams.Accept = produces[0];
3252
- } else {
3253
- localVarHeaderParams.Accept = 'application/json';
3254
- }
3255
- let localVarFormParams: any = {};
3256
-
3257
- // verify required parameter 'pagination' is not null or undefined
3258
- if (pagination === null || pagination === undefined) {
3259
- throw new Error(
3260
- 'Required parameter pagination was null or undefined when calling listSuppressionsAlpha.'
3261
- );
3262
- }
3263
-
3264
- if (pagination !== undefined) {
3265
- localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
3266
- pagination,
3267
- 'PaginationInput'
3268
- );
3269
- }
3270
-
3271
- (<any>Object).assign(localVarHeaderParams, options.headers);
3272
-
3273
- let localVarUseFormData = false;
3274
-
3275
- let localVarRequestOptions: localVarRequest.Options = {
3276
- method: 'GET',
3277
- qs: localVarQueryParameters,
3278
- headers: localVarHeaderParams,
3279
- uri: localVarPath,
3280
- useQuerystring: this._useQuerystring,
3281
- json: true,
3282
- };
3283
-
3284
- let authenticationPromise = Promise.resolve();
3285
- if (this.authentications.token.accessToken) {
3286
- authenticationPromise = authenticationPromise.then(() =>
3287
- this.authentications.token.applyToRequest(
3288
- localVarRequestOptions
3289
- )
3290
- );
3291
- }
3292
- authenticationPromise = authenticationPromise.then(() =>
3293
- this.authentications.default.applyToRequest(localVarRequestOptions)
3294
- );
3295
-
3296
- let interceptorPromise = authenticationPromise;
3297
- for (const interceptor of this.interceptors) {
3298
- interceptorPromise = interceptorPromise.then(() =>
3299
- interceptor(localVarRequestOptions)
3300
- );
3301
- }
3302
-
3303
- return interceptorPromise.then(() => {
3304
- if (Object.keys(localVarFormParams).length) {
3305
- if (localVarUseFormData) {
3306
- (<any>localVarRequestOptions).formData = localVarFormParams;
3307
- } else {
3308
- localVarRequestOptions.form = localVarFormParams;
3309
- }
3310
- }
3311
- return new Promise<{
3312
- response: http.IncomingMessage;
3313
- body: ListSuppressions200Response;
3314
- }>((resolve, reject) => {
3315
- localVarRequest(
3316
- localVarRequestOptions,
3317
- (error, response, body) => {
3318
- if (error) {
3319
- reject(error);
3320
- } else {
3321
- if (
3322
- response.statusCode &&
3323
- response.statusCode >= 200 &&
3324
- response.statusCode <= 299
3325
- ) {
3326
- body = ObjectSerializer.deserialize(
3327
- body,
3328
- 'ListSuppressions200Response'
3329
- );
3330
- resolve({ response: response, body: body });
3331
- } else {
3332
- reject(
3333
- new HttpError(
3334
- response,
3335
- body,
3336
- response.statusCode
3337
- )
3338
- );
3339
- }
3340
- }
3341
- }
3342
- );
3343
- });
3344
- });
3345
- }
3346
- /**
3347
- * Lists all suppressions in a given Workspace.
3348
- * @summary List Suppressions
3349
- * @param pagination Pagination parameters. This parameter exists in alpha.
3350
- */
3351
- public async listSuppressionsBeta(
3352
- pagination: PaginationInput,
3353
- options: { headers: { [name: string]: string } } = { headers: {} }
3354
- ): Promise<{
3355
- response: http.IncomingMessage;
3356
- body: ListSuppressions200Response;
3357
- }> {
3358
- const localVarPath = this.basePath + '/suppressions';
3359
- let localVarQueryParameters: any = {};
3360
- let localVarHeaderParams: any = (<any>Object).assign(
3361
- {},
3362
- this._defaultHeaders
3363
- );
3364
- const produces = [
3365
- 'application/vnd.segment.v1beta+json',
3366
- 'application/json',
3367
- ];
3368
- if (produces.indexOf('application/json') >= 0) {
3369
- localVarHeaderParams.Accept = produces[0];
3370
- } else {
3371
289
  localVarHeaderParams.Accept = 'application/json';
290
+ } else {
291
+ localVarHeaderParams.Accept = produces.join(',');
3372
292
  }
3373
293
  let localVarFormParams: any = {};
3374
294
 
3375
- // verify required parameter 'pagination' is not null or undefined
3376
- if (pagination === null || pagination === undefined) {
295
+ // verify required parameter 'sourceId' is not null or undefined
296
+ if (sourceId === null || sourceId === undefined) {
3377
297
  throw new Error(
3378
- 'Required parameter pagination was null or undefined when calling listSuppressionsBeta.'
298
+ 'Required parameter sourceId was null or undefined when calling createSourceRegulation.'
3379
299
  );
3380
300
  }
3381
301
 
3382
- if (pagination !== undefined) {
3383
- localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
3384
- pagination,
3385
- 'PaginationInput'
302
+ // verify required parameter 'CreateSourceRegulationV1Input' is not null or undefined
303
+ if (
304
+ CreateSourceRegulationV1Input === null ||
305
+ CreateSourceRegulationV1Input === undefined
306
+ ) {
307
+ throw new Error(
308
+ 'Required parameter CreateSourceRegulationV1Input was null or undefined when calling createSourceRegulation.'
3386
309
  );
3387
310
  }
3388
311
 
@@ -3391,12 +314,16 @@ export class DeletionAndSuppressionApi {
3391
314
  let localVarUseFormData = false;
3392
315
 
3393
316
  let localVarRequestOptions: localVarRequest.Options = {
3394
- method: 'GET',
317
+ method: 'POST',
3395
318
  qs: localVarQueryParameters,
3396
319
  headers: localVarHeaderParams,
3397
320
  uri: localVarPath,
3398
321
  useQuerystring: this._useQuerystring,
3399
322
  json: true,
323
+ body: ObjectSerializer.serialize(
324
+ CreateSourceRegulationV1Input,
325
+ 'CreateSourceRegulationV1Input'
326
+ ),
3400
327
  };
3401
328
 
3402
329
  let authenticationPromise = Promise.resolve();
@@ -3428,7 +355,7 @@ export class DeletionAndSuppressionApi {
3428
355
  }
3429
356
  return new Promise<{
3430
357
  response: http.IncomingMessage;
3431
- body: ListSuppressions200Response;
358
+ body: CreateSourceRegulation200Response;
3432
359
  }>((resolve, reject) => {
3433
360
  localVarRequest(
3434
361
  localVarRequestOptions,
@@ -3443,7 +370,7 @@ export class DeletionAndSuppressionApi {
3443
370
  ) {
3444
371
  body = ObjectSerializer.deserialize(
3445
372
  body,
3446
- 'ListSuppressions200Response'
373
+ 'CreateSourceRegulation200Response'
3447
374
  );
3448
375
  resolve({ response: response, body: body });
3449
376
  } else {
@@ -3462,42 +389,44 @@ export class DeletionAndSuppressionApi {
3462
389
  });
3463
390
  }
3464
391
  /**
3465
- * Lists all suppressions in a given Workspace.
3466
- * @summary List Suppressions
3467
- * @param pagination Pagination parameters. This parameter exists in alpha.
392
+ * Creates a Workspace-scoped regulation. When called, this endpoint may generate the `Workspace Regulation Created` event in the [audit trail](/tag/Audit-Trail). Config API omitted fields: - `attributes`, - `userAgent`
393
+ * @summary Create Workspace Regulation
394
+ * @param CreateWorkspaceRegulationV1Input
3468
395
  */
3469
- public async listSuppressionsCurrent(
3470
- pagination: PaginationInput,
396
+ public async createWorkspaceRegulation(
397
+ CreateWorkspaceRegulationV1Input: CreateWorkspaceRegulationV1Input,
3471
398
  options: { headers: { [name: string]: string } } = { headers: {} }
3472
399
  ): Promise<{
3473
400
  response: http.IncomingMessage;
3474
- body: ListSuppressions200Response;
401
+ body: CreateWorkspaceRegulation200Response;
3475
402
  }> {
3476
- const localVarPath = this.basePath + '/suppressions';
403
+ const localVarPath = this.basePath + '/regulations';
3477
404
  let localVarQueryParameters: any = {};
3478
405
  let localVarHeaderParams: any = (<any>Object).assign(
3479
406
  {},
3480
407
  this._defaultHeaders
3481
408
  );
3482
- const produces = ['application/json'];
409
+ const produces = [
410
+ 'application/vnd.segment.v1+json',
411
+ 'application/json',
412
+ 'application/vnd.segment.v1beta+json',
413
+ 'application/vnd.segment.v1alpha+json',
414
+ ];
415
+ // give precedence to 'application/json'
3483
416
  if (produces.indexOf('application/json') >= 0) {
3484
- localVarHeaderParams.Accept = produces[0];
3485
- } else {
3486
417
  localVarHeaderParams.Accept = 'application/json';
418
+ } else {
419
+ localVarHeaderParams.Accept = produces.join(',');
3487
420
  }
3488
421
  let localVarFormParams: any = {};
3489
422
 
3490
- // verify required parameter 'pagination' is not null or undefined
3491
- if (pagination === null || pagination === undefined) {
423
+ // verify required parameter 'CreateWorkspaceRegulationV1Input' is not null or undefined
424
+ if (
425
+ CreateWorkspaceRegulationV1Input === null ||
426
+ CreateWorkspaceRegulationV1Input === undefined
427
+ ) {
3492
428
  throw new Error(
3493
- 'Required parameter pagination was null or undefined when calling listSuppressionsCurrent.'
3494
- );
3495
- }
3496
-
3497
- if (pagination !== undefined) {
3498
- localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
3499
- pagination,
3500
- 'PaginationInput'
429
+ 'Required parameter CreateWorkspaceRegulationV1Input was null or undefined when calling createWorkspaceRegulation.'
3501
430
  );
3502
431
  }
3503
432
 
@@ -3506,12 +435,16 @@ export class DeletionAndSuppressionApi {
3506
435
  let localVarUseFormData = false;
3507
436
 
3508
437
  let localVarRequestOptions: localVarRequest.Options = {
3509
- method: 'GET',
438
+ method: 'POST',
3510
439
  qs: localVarQueryParameters,
3511
440
  headers: localVarHeaderParams,
3512
441
  uri: localVarPath,
3513
442
  useQuerystring: this._useQuerystring,
3514
443
  json: true,
444
+ body: ObjectSerializer.serialize(
445
+ CreateWorkspaceRegulationV1Input,
446
+ 'CreateWorkspaceRegulationV1Input'
447
+ ),
3515
448
  };
3516
449
 
3517
450
  let authenticationPromise = Promise.resolve();
@@ -3543,7 +476,7 @@ export class DeletionAndSuppressionApi {
3543
476
  }
3544
477
  return new Promise<{
3545
478
  response: http.IncomingMessage;
3546
- body: ListSuppressions200Response;
479
+ body: CreateWorkspaceRegulation200Response;
3547
480
  }>((resolve, reject) => {
3548
481
  localVarRequest(
3549
482
  localVarRequestOptions,
@@ -3558,7 +491,7 @@ export class DeletionAndSuppressionApi {
3558
491
  ) {
3559
492
  body = ObjectSerializer.deserialize(
3560
493
  body,
3561
- 'ListSuppressions200Response'
494
+ 'CreateWorkspaceRegulation200Response'
3562
495
  );
3563
496
  resolve({ response: response, body: body });
3564
497
  } else {
@@ -3577,18 +510,23 @@ export class DeletionAndSuppressionApi {
3577
510
  });
3578
511
  }
3579
512
  /**
3580
- * Lists all suppressions in a given Workspace.
3581
- * @summary List Suppressions
3582
- * @param pagination Pagination parameters. This parameter exists in alpha.
513
+ * Deletes a regulation from the Workspace. The regulation must be in the initialized state to be deleted. When called, this endpoint may generate the `Regulation Deleted` event in the [audit trail](/tag/Audit-Trail).
514
+ * @summary Delete Regulation
515
+ * @param regulateId
3583
516
  */
3584
- public async listSuppressionsV1(
3585
- pagination: PaginationInput,
517
+ public async deleteRegulation(
518
+ regulateId: string,
3586
519
  options: { headers: { [name: string]: string } } = { headers: {} }
3587
520
  ): Promise<{
3588
521
  response: http.IncomingMessage;
3589
- body: ListSuppressions200Response;
522
+ body: DeleteRegulation200Response;
3590
523
  }> {
3591
- const localVarPath = this.basePath + '/suppressions';
524
+ const localVarPath =
525
+ this.basePath +
526
+ '/regulations/{regulateId}'.replace(
527
+ '{' + 'regulateId' + '}',
528
+ encodeURIComponent(String(regulateId))
529
+ );
3592
530
  let localVarQueryParameters: any = {};
3593
531
  let localVarHeaderParams: any = (<any>Object).assign(
3594
532
  {},
@@ -3597,25 +535,21 @@ export class DeletionAndSuppressionApi {
3597
535
  const produces = [
3598
536
  'application/vnd.segment.v1+json',
3599
537
  'application/json',
538
+ 'application/vnd.segment.v1beta+json',
539
+ 'application/vnd.segment.v1alpha+json',
3600
540
  ];
541
+ // give precedence to 'application/json'
3601
542
  if (produces.indexOf('application/json') >= 0) {
3602
- localVarHeaderParams.Accept = produces[0];
3603
- } else {
3604
543
  localVarHeaderParams.Accept = 'application/json';
544
+ } else {
545
+ localVarHeaderParams.Accept = produces.join(',');
3605
546
  }
3606
547
  let localVarFormParams: any = {};
3607
548
 
3608
- // verify required parameter 'pagination' is not null or undefined
3609
- if (pagination === null || pagination === undefined) {
549
+ // verify required parameter 'regulateId' is not null or undefined
550
+ if (regulateId === null || regulateId === undefined) {
3610
551
  throw new Error(
3611
- 'Required parameter pagination was null or undefined when calling listSuppressionsV1.'
3612
- );
3613
- }
3614
-
3615
- if (pagination !== undefined) {
3616
- localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
3617
- pagination,
3618
- 'PaginationInput'
552
+ 'Required parameter regulateId was null or undefined when calling deleteRegulation.'
3619
553
  );
3620
554
  }
3621
555
 
@@ -3624,7 +558,7 @@ export class DeletionAndSuppressionApi {
3624
558
  let localVarUseFormData = false;
3625
559
 
3626
560
  let localVarRequestOptions: localVarRequest.Options = {
3627
- method: 'GET',
561
+ method: 'DELETE',
3628
562
  qs: localVarQueryParameters,
3629
563
  headers: localVarHeaderParams,
3630
564
  uri: localVarPath,
@@ -3661,7 +595,7 @@ export class DeletionAndSuppressionApi {
3661
595
  }
3662
596
  return new Promise<{
3663
597
  response: http.IncomingMessage;
3664
- body: ListSuppressions200Response;
598
+ body: DeleteRegulation200Response;
3665
599
  }>((resolve, reject) => {
3666
600
  localVarRequest(
3667
601
  localVarRequestOptions,
@@ -3676,7 +610,7 @@ export class DeletionAndSuppressionApi {
3676
610
  ) {
3677
611
  body = ObjectSerializer.deserialize(
3678
612
  body,
3679
- 'ListSuppressions200Response'
613
+ 'DeleteRegulation200Response'
3680
614
  );
3681
615
  resolve({ response: response, body: body });
3682
616
  } else {
@@ -3695,78 +629,46 @@ export class DeletionAndSuppressionApi {
3695
629
  });
3696
630
  }
3697
631
  /**
3698
- * Lists all Workspace-scoped regulations.
3699
- * @summary List Workspace Regulations
3700
- * @param pagination Pagination parameters. This parameter exists in alpha.
3701
- * @param status The status on which to filter the returned regulations. This parameter exists in alpha.
3702
- * @param regulationTypes The regulation types on which to filter returned regulations. This parameter exists in alpha.
632
+ * Gets a regulation from the Workspace. Config API omitted fields: - `parent`
633
+ * @summary Get Regulation
634
+ * @param regulateId
3703
635
  */
3704
- public async listWorkspaceRegulationsAlpha(
3705
- pagination: PaginationInput,
3706
- status?:
3707
- | 'FAILED'
3708
- | 'FINISHED'
3709
- | 'INITIALIZED'
3710
- | 'INVALID'
3711
- | 'NOT_SUPPORTED'
3712
- | 'PARTIAL_SUCCESS'
3713
- | 'RUNNING',
3714
- regulationTypes?: Array<
3715
- | 'BULK_DELETE_ONLY'
3716
- | 'DELETE_INTERNAL'
3717
- | 'DELETE_ONLY'
3718
- | 'SUPPRESS_ONLY'
3719
- | 'SUPPRESS_WITH_DELETE'
3720
- | 'UNSUPPRESS'
3721
- >,
636
+ public async getRegulation(
637
+ regulateId: string,
3722
638
  options: { headers: { [name: string]: string } } = { headers: {} }
3723
639
  ): Promise<{
3724
640
  response: http.IncomingMessage;
3725
- body: ListWorkspaceRegulations200Response;
641
+ body: GetRegulation200Response;
3726
642
  }> {
3727
- const localVarPath = this.basePath + '/regulations';
643
+ const localVarPath =
644
+ this.basePath +
645
+ '/regulations/{regulateId}'.replace(
646
+ '{' + 'regulateId' + '}',
647
+ encodeURIComponent(String(regulateId))
648
+ );
3728
649
  let localVarQueryParameters: any = {};
3729
650
  let localVarHeaderParams: any = (<any>Object).assign(
3730
651
  {},
3731
652
  this._defaultHeaders
3732
653
  );
3733
654
  const produces = [
3734
- 'application/vnd.segment.v1alpha+json',
655
+ 'application/vnd.segment.v1+json',
3735
656
  'application/json',
657
+ 'application/vnd.segment.v1beta+json',
658
+ 'application/vnd.segment.v1alpha+json',
3736
659
  ];
660
+ // give precedence to 'application/json'
3737
661
  if (produces.indexOf('application/json') >= 0) {
3738
- localVarHeaderParams.Accept = produces[0];
3739
- } else {
3740
662
  localVarHeaderParams.Accept = 'application/json';
663
+ } else {
664
+ localVarHeaderParams.Accept = produces.join(',');
3741
665
  }
3742
666
  let localVarFormParams: any = {};
3743
667
 
3744
- // verify required parameter 'pagination' is not null or undefined
3745
- if (pagination === null || pagination === undefined) {
668
+ // verify required parameter 'regulateId' is not null or undefined
669
+ if (regulateId === null || regulateId === undefined) {
3746
670
  throw new Error(
3747
- 'Required parameter pagination was null or undefined when calling listWorkspaceRegulationsAlpha.'
3748
- );
3749
- }
3750
-
3751
- if (status !== undefined) {
3752
- localVarQueryParameters['status'] = ObjectSerializer.serialize(
3753
- status,
3754
- "'FAILED' | 'FINISHED' | 'INITIALIZED' | 'INVALID' | 'NOT_SUPPORTED' | 'PARTIAL_SUCCESS' | 'RUNNING'"
3755
- );
3756
- }
3757
-
3758
- if (regulationTypes !== undefined) {
3759
- localVarQueryParameters['regulationTypes'] =
3760
- ObjectSerializer.serialize(
3761
- regulationTypes,
3762
- "Array<'BULK_DELETE_ONLY' | 'DELETE_INTERNAL' | 'DELETE_ONLY' | 'SUPPRESS_ONLY' | 'SUPPRESS_WITH_DELETE' | 'UNSUPPRESS'>"
3763
- );
3764
- }
3765
-
3766
- if (pagination !== undefined) {
3767
- localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
3768
- pagination,
3769
- 'PaginationInput'
671
+ 'Required parameter regulateId was null or undefined when calling getRegulation.'
3770
672
  );
3771
673
  }
3772
674
 
@@ -3812,7 +714,7 @@ export class DeletionAndSuppressionApi {
3812
714
  }
3813
715
  return new Promise<{
3814
716
  response: http.IncomingMessage;
3815
- body: ListWorkspaceRegulations200Response;
717
+ body: GetRegulation200Response;
3816
718
  }>((resolve, reject) => {
3817
719
  localVarRequest(
3818
720
  localVarRequestOptions,
@@ -3827,7 +729,7 @@ export class DeletionAndSuppressionApi {
3827
729
  ) {
3828
730
  body = ObjectSerializer.deserialize(
3829
731
  body,
3830
- 'ListWorkspaceRegulations200Response'
732
+ 'GetRegulation200Response'
3831
733
  );
3832
734
  resolve({ response: response, body: body });
3833
735
  } else {
@@ -3846,13 +748,15 @@ export class DeletionAndSuppressionApi {
3846
748
  });
3847
749
  }
3848
750
  /**
3849
- * Lists all Workspace-scoped regulations.
3850
- * @summary List Workspace Regulations
3851
- * @param pagination Pagination parameters. This parameter exists in alpha.
3852
- * @param status The status on which to filter the returned regulations. This parameter exists in alpha.
3853
- * @param regulationTypes The regulation types on which to filter returned regulations. This parameter exists in alpha.
751
+ * Lists all Source-scoped regulations.
752
+ * @summary List Regulations from Source
753
+ * @param sourceId
754
+ * @param pagination Pagination parameters. This parameter exists in v1.
755
+ * @param status The status on which to filter returned regulations. This parameter exists in v1.
756
+ * @param regulationTypes The regulation types on which to filter returned regulations. This parameter exists in v1.
3854
757
  */
3855
- public async listWorkspaceRegulationsBeta(
758
+ public async listRegulationsFromSource(
759
+ sourceId: string,
3856
760
  pagination: PaginationInput,
3857
761
  status?:
3858
762
  | 'FAILED'
@@ -3863,7 +767,6 @@ export class DeletionAndSuppressionApi {
3863
767
  | 'PARTIAL_SUCCESS'
3864
768
  | 'RUNNING',
3865
769
  regulationTypes?: Array<
3866
- | 'BULK_DELETE_ONLY'
3867
770
  | 'DELETE_INTERNAL'
3868
771
  | 'DELETE_ONLY'
3869
772
  | 'SUPPRESS_ONLY'
@@ -3873,29 +776,44 @@ export class DeletionAndSuppressionApi {
3873
776
  options: { headers: { [name: string]: string } } = { headers: {} }
3874
777
  ): Promise<{
3875
778
  response: http.IncomingMessage;
3876
- body: ListWorkspaceRegulations200Response;
779
+ body: ListRegulationsFromSource200Response;
3877
780
  }> {
3878
- const localVarPath = this.basePath + '/regulations';
781
+ const localVarPath =
782
+ this.basePath +
783
+ '/regulations/sources/{sourceId}'.replace(
784
+ '{' + 'sourceId' + '}',
785
+ encodeURIComponent(String(sourceId))
786
+ );
3879
787
  let localVarQueryParameters: any = {};
3880
788
  let localVarHeaderParams: any = (<any>Object).assign(
3881
789
  {},
3882
790
  this._defaultHeaders
3883
791
  );
3884
792
  const produces = [
3885
- 'application/vnd.segment.v1beta+json',
793
+ 'application/vnd.segment.v1+json',
3886
794
  'application/json',
795
+ 'application/vnd.segment.v1beta+json',
796
+ 'application/vnd.segment.v1alpha+json',
3887
797
  ];
798
+ // give precedence to 'application/json'
3888
799
  if (produces.indexOf('application/json') >= 0) {
3889
- localVarHeaderParams.Accept = produces[0];
3890
- } else {
3891
800
  localVarHeaderParams.Accept = 'application/json';
801
+ } else {
802
+ localVarHeaderParams.Accept = produces.join(',');
3892
803
  }
3893
804
  let localVarFormParams: any = {};
3894
805
 
806
+ // verify required parameter 'sourceId' is not null or undefined
807
+ if (sourceId === null || sourceId === undefined) {
808
+ throw new Error(
809
+ 'Required parameter sourceId was null or undefined when calling listRegulationsFromSource.'
810
+ );
811
+ }
812
+
3895
813
  // verify required parameter 'pagination' is not null or undefined
3896
814
  if (pagination === null || pagination === undefined) {
3897
815
  throw new Error(
3898
- 'Required parameter pagination was null or undefined when calling listWorkspaceRegulationsBeta.'
816
+ 'Required parameter pagination was null or undefined when calling listRegulationsFromSource.'
3899
817
  );
3900
818
  }
3901
819
 
@@ -3910,7 +828,7 @@ export class DeletionAndSuppressionApi {
3910
828
  localVarQueryParameters['regulationTypes'] =
3911
829
  ObjectSerializer.serialize(
3912
830
  regulationTypes,
3913
- "Array<'BULK_DELETE_ONLY' | 'DELETE_INTERNAL' | 'DELETE_ONLY' | 'SUPPRESS_ONLY' | 'SUPPRESS_WITH_DELETE' | 'UNSUPPRESS'>"
831
+ "Array<'DELETE_INTERNAL' | 'DELETE_ONLY' | 'SUPPRESS_ONLY' | 'SUPPRESS_WITH_DELETE' | 'UNSUPPRESS'>"
3914
832
  );
3915
833
  }
3916
834
 
@@ -3963,7 +881,7 @@ export class DeletionAndSuppressionApi {
3963
881
  }
3964
882
  return new Promise<{
3965
883
  response: http.IncomingMessage;
3966
- body: ListWorkspaceRegulations200Response;
884
+ body: ListRegulationsFromSource200Response;
3967
885
  }>((resolve, reject) => {
3968
886
  localVarRequest(
3969
887
  localVarRequestOptions,
@@ -3978,7 +896,7 @@ export class DeletionAndSuppressionApi {
3978
896
  ) {
3979
897
  body = ObjectSerializer.deserialize(
3980
898
  body,
3981
- 'ListWorkspaceRegulations200Response'
899
+ 'ListRegulationsFromSource200Response'
3982
900
  );
3983
901
  resolve({ response: response, body: body });
3984
902
  } else {
@@ -3997,71 +915,44 @@ export class DeletionAndSuppressionApi {
3997
915
  });
3998
916
  }
3999
917
  /**
4000
- * Lists all Workspace-scoped regulations.
4001
- * @summary List Workspace Regulations
4002
- * @param pagination Pagination parameters. This parameter exists in alpha.
4003
- * @param status The status on which to filter the returned regulations. This parameter exists in alpha.
4004
- * @param regulationTypes The regulation types on which to filter returned regulations. This parameter exists in alpha.
918
+ * Lists all suppressions in a given Workspace.
919
+ * @summary List Suppressions
920
+ * @param pagination Pagination parameters. This parameter exists in v1.
4005
921
  */
4006
- public async listWorkspaceRegulationsCurrent(
922
+ public async listSuppressions(
4007
923
  pagination: PaginationInput,
4008
- status?:
4009
- | 'FAILED'
4010
- | 'FINISHED'
4011
- | 'INITIALIZED'
4012
- | 'INVALID'
4013
- | 'NOT_SUPPORTED'
4014
- | 'PARTIAL_SUCCESS'
4015
- | 'RUNNING',
4016
- regulationTypes?: Array<
4017
- | 'BULK_DELETE_ONLY'
4018
- | 'DELETE_INTERNAL'
4019
- | 'DELETE_ONLY'
4020
- | 'SUPPRESS_ONLY'
4021
- | 'SUPPRESS_WITH_DELETE'
4022
- | 'UNSUPPRESS'
4023
- >,
4024
924
  options: { headers: { [name: string]: string } } = { headers: {} }
4025
925
  ): Promise<{
4026
926
  response: http.IncomingMessage;
4027
- body: ListWorkspaceRegulations200Response;
927
+ body: ListSuppressions200Response;
4028
928
  }> {
4029
- const localVarPath = this.basePath + '/regulations';
929
+ const localVarPath = this.basePath + '/suppressions';
4030
930
  let localVarQueryParameters: any = {};
4031
931
  let localVarHeaderParams: any = (<any>Object).assign(
4032
932
  {},
4033
933
  this._defaultHeaders
4034
934
  );
4035
- const produces = ['application/json'];
935
+ const produces = [
936
+ 'application/vnd.segment.v1+json',
937
+ 'application/json',
938
+ 'application/vnd.segment.v1beta+json',
939
+ 'application/vnd.segment.v1alpha+json',
940
+ ];
941
+ // give precedence to 'application/json'
4036
942
  if (produces.indexOf('application/json') >= 0) {
4037
- localVarHeaderParams.Accept = produces[0];
4038
- } else {
4039
943
  localVarHeaderParams.Accept = 'application/json';
944
+ } else {
945
+ localVarHeaderParams.Accept = produces.join(',');
4040
946
  }
4041
947
  let localVarFormParams: any = {};
4042
948
 
4043
949
  // verify required parameter 'pagination' is not null or undefined
4044
950
  if (pagination === null || pagination === undefined) {
4045
951
  throw new Error(
4046
- 'Required parameter pagination was null or undefined when calling listWorkspaceRegulationsCurrent.'
4047
- );
4048
- }
4049
-
4050
- if (status !== undefined) {
4051
- localVarQueryParameters['status'] = ObjectSerializer.serialize(
4052
- status,
4053
- "'FAILED' | 'FINISHED' | 'INITIALIZED' | 'INVALID' | 'NOT_SUPPORTED' | 'PARTIAL_SUCCESS' | 'RUNNING'"
952
+ 'Required parameter pagination was null or undefined when calling listSuppressions.'
4054
953
  );
4055
954
  }
4056
955
 
4057
- if (regulationTypes !== undefined) {
4058
- localVarQueryParameters['regulationTypes'] =
4059
- ObjectSerializer.serialize(
4060
- regulationTypes,
4061
- "Array<'BULK_DELETE_ONLY' | 'DELETE_INTERNAL' | 'DELETE_ONLY' | 'SUPPRESS_ONLY' | 'SUPPRESS_WITH_DELETE' | 'UNSUPPRESS'>"
4062
- );
4063
- }
4064
-
4065
956
  if (pagination !== undefined) {
4066
957
  localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
4067
958
  pagination,
@@ -4111,7 +1002,7 @@ export class DeletionAndSuppressionApi {
4111
1002
  }
4112
1003
  return new Promise<{
4113
1004
  response: http.IncomingMessage;
4114
- body: ListWorkspaceRegulations200Response;
1005
+ body: ListSuppressions200Response;
4115
1006
  }>((resolve, reject) => {
4116
1007
  localVarRequest(
4117
1008
  localVarRequestOptions,
@@ -4126,7 +1017,7 @@ export class DeletionAndSuppressionApi {
4126
1017
  ) {
4127
1018
  body = ObjectSerializer.deserialize(
4128
1019
  body,
4129
- 'ListWorkspaceRegulations200Response'
1020
+ 'ListSuppressions200Response'
4130
1021
  );
4131
1022
  resolve({ response: response, body: body });
4132
1023
  } else {
@@ -4147,11 +1038,11 @@ export class DeletionAndSuppressionApi {
4147
1038
  /**
4148
1039
  * Lists all Workspace-scoped regulations.
4149
1040
  * @summary List Workspace Regulations
4150
- * @param pagination Pagination parameters. This parameter exists in alpha.
4151
- * @param status The status on which to filter the returned regulations. This parameter exists in alpha.
4152
- * @param regulationTypes The regulation types on which to filter returned regulations. This parameter exists in alpha.
1041
+ * @param pagination Pagination parameters. This parameter exists in v1.
1042
+ * @param status The status on which to filter the returned regulations. This parameter exists in v1.
1043
+ * @param regulationTypes The regulation types on which to filter returned regulations. This parameter exists in v1.
4153
1044
  */
4154
- public async listWorkspaceRegulationsV1(
1045
+ public async listWorkspaceRegulations(
4155
1046
  pagination: PaginationInput,
4156
1047
  status?:
4157
1048
  | 'FAILED'
@@ -4162,7 +1053,6 @@ export class DeletionAndSuppressionApi {
4162
1053
  | 'PARTIAL_SUCCESS'
4163
1054
  | 'RUNNING',
4164
1055
  regulationTypes?: Array<
4165
- | 'BULK_DELETE_ONLY'
4166
1056
  | 'DELETE_INTERNAL'
4167
1057
  | 'DELETE_ONLY'
4168
1058
  | 'SUPPRESS_ONLY'
@@ -4183,18 +1073,21 @@ export class DeletionAndSuppressionApi {
4183
1073
  const produces = [
4184
1074
  'application/vnd.segment.v1+json',
4185
1075
  'application/json',
1076
+ 'application/vnd.segment.v1beta+json',
1077
+ 'application/vnd.segment.v1alpha+json',
4186
1078
  ];
1079
+ // give precedence to 'application/json'
4187
1080
  if (produces.indexOf('application/json') >= 0) {
4188
- localVarHeaderParams.Accept = produces[0];
4189
- } else {
4190
1081
  localVarHeaderParams.Accept = 'application/json';
1082
+ } else {
1083
+ localVarHeaderParams.Accept = produces.join(',');
4191
1084
  }
4192
1085
  let localVarFormParams: any = {};
4193
1086
 
4194
1087
  // verify required parameter 'pagination' is not null or undefined
4195
1088
  if (pagination === null || pagination === undefined) {
4196
1089
  throw new Error(
4197
- 'Required parameter pagination was null or undefined when calling listWorkspaceRegulationsV1.'
1090
+ 'Required parameter pagination was null or undefined when calling listWorkspaceRegulations.'
4198
1091
  );
4199
1092
  }
4200
1093
 
@@ -4209,7 +1102,7 @@ export class DeletionAndSuppressionApi {
4209
1102
  localVarQueryParameters['regulationTypes'] =
4210
1103
  ObjectSerializer.serialize(
4211
1104
  regulationTypes,
4212
- "Array<'BULK_DELETE_ONLY' | 'DELETE_INTERNAL' | 'DELETE_ONLY' | 'SUPPRESS_ONLY' | 'SUPPRESS_WITH_DELETE' | 'UNSUPPRESS'>"
1105
+ "Array<'DELETE_INTERNAL' | 'DELETE_ONLY' | 'SUPPRESS_ONLY' | 'SUPPRESS_WITH_DELETE' | 'UNSUPPRESS'>"
4213
1106
  );
4214
1107
  }
4215
1108