@segment/public-api-sdk-typescript 32.0.2-b5004 → 33.0.2-b5327
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -27
- package/api/aPICallsApi.ts +23 -815
- package/api/auditTrailApi.ts +12 -462
- package/api/catalogApi.ts +103 -2182
- package/api/deletionAndSuppressionApi.ts +174 -3281
- package/api/destinationFiltersApi.ts +112 -2449
- package/api/destinationsApi.ts +238 -2166
- package/api/edgeFunctionsApi.ts +13 -9
- package/api/eventsApi.ts +19 -625
- package/api/functionsApi.ts +120 -2289
- package/api/iAMGroupsApi.ts +232 -4750
- package/api/iAMRolesApi.ts +8 -347
- package/api/iAMUsersApi.ts +190 -3433
- package/api/labelsApi.ts +59 -1079
- package/api/monthlyTrackedUsersApi.ts +23 -815
- package/api/selectiveSyncApi.ts +156 -2538
- package/api/sourcesApi.ts +211 -4276
- package/api/spacesApi.ts +10 -7
- package/api/testingApi.ts +14 -317
- package/api/trackingPlansApi.ts +257 -4799
- package/api/transformationsApi.ts +60 -650
- package/api/warehousesApi.ts +200 -3827
- package/api/workspacesApi.ts +6 -306
- package/dist/api/aPICallsApi.d.ts +2 -50
- package/dist/api/aPICallsApi.js +18 -560
- package/dist/api/aPICallsApi.js.map +1 -1
- package/dist/api/apis.js +1 -1
- package/dist/api/auditTrailApi.d.ts +1 -25
- package/dist/api/auditTrailApi.js +8 -300
- package/dist/api/auditTrailApi.js.map +1 -1
- package/dist/api/catalogApi.d.ts +6 -150
- package/dist/api/catalogApi.js +65 -1568
- package/dist/api/catalogApi.js.map +1 -1
- package/dist/api/deletionAndSuppressionApi.d.ts +8 -200
- package/dist/api/deletionAndSuppressionApi.js +105 -2195
- package/dist/api/deletionAndSuppressionApi.js.map +1 -1
- package/dist/api/destinationFiltersApi.d.ts +6 -150
- package/dist/api/destinationFiltersApi.js +71 -1658
- package/dist/api/destinationFiltersApi.js.map +1 -1
- package/dist/api/destinationsApi.d.ts +6 -134
- package/dist/api/destinationsApi.js +155 -1518
- package/dist/api/destinationsApi.js.map +1 -1
- package/dist/api/edgeFunctionsApi.js +9 -9
- package/dist/api/edgeFunctionsApi.js.map +1 -1
- package/dist/api/eventsApi.d.ts +1 -25
- package/dist/api/eventsApi.js +10 -353
- package/dist/api/eventsApi.js.map +1 -1
- package/dist/api/functionsApi.d.ts +6 -150
- package/dist/api/functionsApi.js +75 -1608
- package/dist/api/functionsApi.js.map +1 -1
- package/dist/api/iAMGroupsApi.d.ts +12 -300
- package/dist/api/iAMGroupsApi.js +158 -3278
- package/dist/api/iAMGroupsApi.js.map +1 -1
- package/dist/api/iAMRolesApi.d.ts +1 -25
- package/dist/api/iAMRolesApi.js +8 -261
- package/dist/api/iAMRolesApi.js.map +1 -1
- package/dist/api/iAMUsersApi.d.ts +9 -225
- package/dist/api/iAMUsersApi.js +115 -2422
- package/dist/api/iAMUsersApi.js.map +1 -1
- package/dist/api/labelsApi.d.ts +3 -79
- package/dist/api/labelsApi.js +33 -781
- package/dist/api/labelsApi.js.map +1 -1
- package/dist/api/monthlyTrackedUsersApi.d.ts +2 -50
- package/dist/api/monthlyTrackedUsersApi.js +18 -560
- package/dist/api/monthlyTrackedUsersApi.js.map +1 -1
- package/dist/api/selectiveSyncApi.d.ts +6 -150
- package/dist/api/selectiveSyncApi.js +92 -1694
- package/dist/api/selectiveSyncApi.js.map +1 -1
- package/dist/api/sourcesApi.d.ts +11 -288
- package/dist/api/sourcesApi.js +143 -2976
- package/dist/api/sourcesApi.js.map +1 -1
- package/dist/api/spacesApi.js +7 -7
- package/dist/api/spacesApi.js.map +1 -1
- package/dist/api/testingApi.d.ts +1 -18
- package/dist/api/testingApi.js +7 -211
- package/dist/api/testingApi.js.map +1 -1
- package/dist/api/trackingPlansApi.d.ts +12 -300
- package/dist/api/trackingPlansApi.js +167 -3296
- package/dist/api/trackingPlansApi.js.map +1 -1
- package/dist/api/transformationsApi.d.ts +5 -45
- package/dist/api/transformationsApi.js +34 -457
- package/dist/api/transformationsApi.js.map +1 -1
- package/dist/api/warehousesApi.d.ts +10 -250
- package/dist/api/warehousesApi.js +132 -2686
- package/dist/api/warehousesApi.js.map +1 -1
- package/dist/api/workspacesApi.d.ts +1 -25
- package/dist/api/workspacesApi.js +7 -242
- package/dist/api/workspacesApi.js.map +1 -1
- package/dist/model/addLabelsToSource200Response.d.ts +2 -2
- package/dist/model/addLabelsToSource200Response.js +1 -1
- package/dist/model/addLabelsToSource200Response.js.map +1 -1
- package/dist/model/addLabelsToSource200Response1.d.ts +2 -2
- package/dist/model/addLabelsToSource200Response1.js +1 -1
- package/dist/model/addLabelsToSource200Response1.js.map +1 -1
- package/dist/model/createCloudSourceRegulationV1Input.d.ts +0 -1
- package/dist/model/createCloudSourceRegulationV1Input.js +0 -1
- package/dist/model/createCloudSourceRegulationV1Input.js.map +1 -1
- package/dist/model/createDestinationSubscriptionAlphaInput.d.ts +1 -1
- package/dist/model/createLabel200Response.d.ts +2 -2
- package/dist/model/createLabel200Response.js +1 -1
- package/dist/model/createLabel200Response.js.map +1 -1
- package/dist/model/createLabel200Response1.d.ts +2 -2
- package/dist/model/createLabel200Response1.js +1 -1
- package/dist/model/createLabel200Response1.js.map +1 -1
- package/dist/model/createSource200Response.d.ts +2 -2
- package/dist/model/createSource200Response.js +1 -1
- package/dist/model/createSource200Response.js.map +1 -1
- package/dist/model/createSource200Response1.d.ts +2 -2
- package/dist/model/createSource200Response1.js +1 -1
- package/dist/model/createSource200Response1.js.map +1 -1
- package/dist/model/createSourceAlphaInput.d.ts +1 -1
- package/dist/model/createSourceRegulationV1Input.d.ts +0 -1
- package/dist/model/createSourceRegulationV1Input.js +0 -1
- package/dist/model/createSourceRegulationV1Input.js.map +1 -1
- package/dist/model/createSourceV1Input.d.ts +1 -1
- package/dist/model/createTransformationBetaInput.d.ts +2 -0
- package/dist/model/createTransformationBetaInput.js +5 -0
- package/dist/model/createTransformationBetaInput.js.map +1 -1
- package/dist/model/createValidationInWarehouseV1Input.d.ts +1 -1
- package/dist/model/createWarehouseV1Input.d.ts +1 -1
- package/dist/model/createWorkspaceRegulationV1Input.d.ts +0 -1
- package/dist/model/createWorkspaceRegulationV1Input.js +0 -1
- package/dist/model/createWorkspaceRegulationV1Input.js.map +1 -1
- package/dist/model/deleteLabel200Response.d.ts +2 -2
- package/dist/model/deleteLabel200Response.js +1 -1
- package/dist/model/deleteLabel200Response.js.map +1 -1
- package/dist/model/deleteLabel200Response1.d.ts +2 -2
- package/dist/model/deleteLabel200Response1.js +1 -1
- package/dist/model/deleteLabel200Response1.js.map +1 -1
- package/dist/model/deleteSource200Response.d.ts +2 -2
- package/dist/model/deleteSource200Response.js +1 -1
- package/dist/model/deleteSource200Response.js.map +1 -1
- package/dist/model/deleteSource200Response1.d.ts +2 -2
- package/dist/model/deleteSource200Response1.js +1 -1
- package/dist/model/deleteSource200Response1.js.map +1 -1
- package/dist/model/deliveryMetricsSummary.js.map +1 -1
- package/dist/model/destination.js.map +1 -1
- package/dist/model/destination1.js.map +1 -1
- package/dist/model/destination2.js.map +1 -1
- package/dist/model/destinationMetadata.js.map +1 -1
- package/dist/model/destinationSubscription.d.ts +1 -1
- package/dist/model/destinationSubscriptionUpdateInput.d.ts +1 -1
- package/dist/model/echo200Response.d.ts +2 -2
- package/dist/model/echo200Response.js +1 -1
- package/dist/model/echo200Response.js.map +1 -1
- package/dist/model/echo200Response1.d.ts +2 -2
- package/dist/model/echo200Response1.js +1 -1
- package/dist/model/echo200Response1.js.map +1 -1
- package/dist/model/edgeFunctions.js.map +1 -1
- package/dist/model/edgeFunctions1.js.map +1 -1
- package/dist/model/filter.js.map +1 -1
- package/dist/model/filter1.js.map +1 -1
- package/dist/model/filter2.js.map +1 -1
- package/dist/model/filter3.js.map +1 -1
- package/dist/model/function.js.map +1 -1
- package/dist/model/function1.js.map +1 -1
- package/dist/model/function2.js.map +1 -1
- package/dist/model/getSource200Response.d.ts +2 -2
- package/dist/model/getSource200Response.js +1 -1
- package/dist/model/getSource200Response.js.map +1 -1
- package/dist/model/getSource200Response1.d.ts +2 -2
- package/dist/model/getSource200Response1.js +1 -1
- package/dist/model/getSource200Response1.js.map +1 -1
- package/dist/model/group.js.map +1 -1
- package/dist/model/identify.js.map +1 -1
- package/dist/model/input.d.ts +1 -1
- package/dist/model/input.js.map +1 -1
- package/dist/model/label.js.map +1 -1
- package/dist/model/label1.js.map +1 -1
- package/dist/model/label2.js.map +1 -1
- package/dist/model/listConnectedDestinationsFromSource200Response.d.ts +2 -2
- package/dist/model/listConnectedDestinationsFromSource200Response.js +1 -1
- package/dist/model/listConnectedDestinationsFromSource200Response.js.map +1 -1
- package/dist/model/listConnectedDestinationsFromSource200Response1.d.ts +2 -2
- package/dist/model/listConnectedDestinationsFromSource200Response1.js +1 -1
- package/dist/model/listConnectedDestinationsFromSource200Response1.js.map +1 -1
- package/dist/model/listConnectedWarehousesFromSource200Response.d.ts +2 -2
- package/dist/model/listConnectedWarehousesFromSource200Response.js +1 -1
- package/dist/model/listConnectedWarehousesFromSource200Response.js.map +1 -1
- package/dist/model/listConnectedWarehousesFromSource200Response1.d.ts +2 -2
- package/dist/model/listConnectedWarehousesFromSource200Response1.js +1 -1
- package/dist/model/listConnectedWarehousesFromSource200Response1.js.map +1 -1
- package/dist/model/listLabels200Response.d.ts +2 -2
- package/dist/model/listLabels200Response.js +1 -1
- package/dist/model/listLabels200Response.js.map +1 -1
- package/dist/model/listLabels200Response1.d.ts +2 -2
- package/dist/model/listLabels200Response1.js +1 -1
- package/dist/model/listLabels200Response1.js.map +1 -1
- package/dist/model/listSources200Response.d.ts +2 -2
- package/dist/model/listSources200Response.js +1 -1
- package/dist/model/listSources200Response.js.map +1 -1
- package/dist/model/listSources200Response1.d.ts +2 -2
- package/dist/model/listSources200Response1.js +1 -1
- package/dist/model/listSources200Response1.js.map +1 -1
- package/dist/model/logos.js.map +1 -1
- package/dist/model/logos1.js.map +1 -1
- package/dist/model/logos2.js.map +1 -1
- package/dist/model/metadata.js.map +1 -1
- package/dist/model/metadata1.js.map +1 -1
- package/dist/model/metadata2.js.map +1 -1
- package/dist/model/models.d.ts +3 -2
- package/dist/model/models.js +3 -0
- package/dist/model/models.js.map +1 -1
- package/dist/model/pagination.js.map +1 -1
- package/dist/model/previewDestinationFilterV1Output.d.ts +1 -1
- package/dist/model/previewDestinationFilterV1Output.js +1 -1
- package/dist/model/previewDestinationFilterV1Output.js.map +1 -1
- package/dist/model/propertyValueTransformationBeta.d.ts +15 -0
- package/dist/model/propertyValueTransformationBeta.js +26 -0
- package/dist/model/propertyValueTransformationBeta.js.map +1 -0
- package/dist/model/replaceLabelsInSource200Response.d.ts +2 -2
- package/dist/model/replaceLabelsInSource200Response.js +1 -1
- package/dist/model/replaceLabelsInSource200Response.js.map +1 -1
- package/dist/model/replaceLabelsInSource200Response1.d.ts +2 -2
- package/dist/model/replaceLabelsInSource200Response1.js +1 -1
- package/dist/model/replaceLabelsInSource200Response1.js.map +1 -1
- package/dist/model/schedule.js.map +1 -1
- package/dist/model/schedule1.js.map +1 -1
- package/dist/model/schedule2.js.map +1 -1
- package/dist/model/settings.js.map +1 -1
- package/dist/model/settings1.js.map +1 -1
- package/dist/model/source.js.map +1 -1
- package/dist/model/source1.d.ts +1 -1
- package/dist/model/source1.js.map +1 -1
- package/dist/model/source2.d.ts +1 -1
- package/dist/model/source2.js.map +1 -1
- package/dist/model/source3.d.ts +1 -1
- package/dist/model/source3.js.map +1 -1
- package/dist/model/source4.d.ts +1 -1
- package/dist/model/source4.js.map +1 -1
- package/dist/model/source5.d.ts +1 -1
- package/dist/model/source5.js.map +1 -1
- package/dist/model/source6.d.ts +1 -1
- package/dist/model/source6.js.map +1 -1
- package/dist/model/sourceAlpha.d.ts +1 -1
- package/dist/model/sourceMetadata.js.map +1 -1
- package/dist/model/sourceV1.d.ts +1 -1
- package/dist/model/subscription.d.ts +1 -1
- package/dist/model/subscription.js.map +1 -1
- package/dist/model/supportedFeatures.js.map +1 -1
- package/dist/model/supportedMethods.js.map +1 -1
- package/dist/model/supportedPlatforms.js.map +1 -1
- package/dist/model/track.js.map +1 -1
- package/dist/model/trackingPlan.js.map +1 -1
- package/dist/model/trackingPlan1.js.map +1 -1
- package/dist/model/transformation.d.ts +2 -0
- package/dist/model/transformation.js +5 -0
- package/dist/model/transformation.js.map +1 -1
- package/dist/model/transformation1.d.ts +2 -0
- package/dist/model/transformation1.js +5 -0
- package/dist/model/transformation1.js.map +1 -1
- package/dist/model/transformation2.d.ts +2 -0
- package/dist/model/transformation2.js +5 -0
- package/dist/model/transformation2.js.map +1 -1
- package/dist/model/transformationBeta.d.ts +2 -0
- package/dist/model/transformationBeta.js +5 -0
- package/dist/model/transformationBeta.js.map +1 -1
- package/dist/model/updateSource200Response.d.ts +2 -2
- package/dist/model/updateSource200Response.js +1 -1
- package/dist/model/updateSource200Response.js.map +1 -1
- package/dist/model/updateSource200Response1.d.ts +2 -2
- package/dist/model/updateSource200Response1.js +1 -1
- package/dist/model/updateSource200Response1.js.map +1 -1
- package/dist/model/updateSourceAlphaInput.d.ts +1 -1
- package/dist/model/updateSourceV1Input.d.ts +1 -1
- package/dist/model/updateTransformationBetaInput.d.ts +2 -0
- package/dist/model/updateTransformationBetaInput.js +5 -0
- package/dist/model/updateTransformationBetaInput.js.map +1 -1
- package/dist/model/updateWarehouseV1Input.d.ts +1 -1
- package/dist/model/user.js.map +1 -1
- package/dist/model/userGroup.js.map +1 -1
- package/dist/model/userGroup1.js.map +1 -1
- package/dist/model/userGroup2.js.map +1 -1
- package/dist/model/userGroup3.js.map +1 -1
- package/dist/model/warehouse.d.ts +1 -1
- package/dist/model/warehouse.js.map +1 -1
- package/dist/model/warehouse1.d.ts +1 -1
- package/dist/model/warehouse1.js.map +1 -1
- package/dist/model/warehouse2.d.ts +1 -1
- package/dist/model/warehouse2.js.map +1 -1
- package/dist/model/warehouseMetadata.js.map +1 -1
- package/dist/model/warehouseV1.d.ts +1 -1
- package/dist/model/workspace.js.map +1 -1
- package/dist/tests/smoke.test.js +7 -7
- package/dist/tests/smoke.test.js.map +1 -1
- package/model/aPICallSnapshotV1.ts +1 -1
- package/model/accessPermissionV1.ts +1 -1
- package/model/addConnectionFromSourceToWarehouse200Response.ts +1 -1
- package/model/addConnectionFromSourceToWarehouseV1Output.ts +1 -1
- package/model/addLabelsToSource200Response.ts +4 -4
- package/model/addLabelsToSource200Response1.ts +4 -4
- package/model/addLabelsToSourceAlphaInput.ts +1 -1
- package/model/addLabelsToSourceAlphaOutput.ts +1 -1
- package/model/addLabelsToSourceV1Input.ts +1 -1
- package/model/addLabelsToSourceV1Output.ts +1 -1
- package/model/addPermissionsToUser200Response.ts +1 -1
- package/model/addPermissionsToUserGroup200Response.ts +1 -1
- package/model/addPermissionsToUserGroupV1Input.ts +1 -1
- package/model/addPermissionsToUserGroupV1Output.ts +1 -1
- package/model/addPermissionsToUserV1Input.ts +1 -1
- package/model/addPermissionsToUserV1Output.ts +1 -1
- package/model/addSourceToTrackingPlan200Response.ts +1 -1
- package/model/addSourceToTrackingPlanV1Input.ts +1 -1
- package/model/addSourceToTrackingPlanV1Output.ts +1 -1
- package/model/addUsersToUserGroup200Response.ts +1 -1
- package/model/addUsersToUserGroupV1Input.ts +1 -1
- package/model/addUsersToUserGroupV1Output.ts +1 -1
- package/model/advancedWarehouseSyncScheduleV1Input.ts +1 -1
- package/model/advancedWarehouseSyncScheduleV1Output.ts +1 -1
- package/model/allowedLabelBeta.ts +1 -1
- package/model/auditEventV1.ts +1 -1
- package/model/batchQueryMessagingSubscriptionsForSpace200Response.ts +1 -1
- package/model/batchQueryMessagingSubscriptionsForSpaceAlphaInput.ts +1 -1
- package/model/batchQueryMessagingSubscriptionsForSpaceAlphaOutput.ts +1 -1
- package/model/breakdownBeta.ts +1 -1
- package/model/commonSourceSettingsV1.ts +1 -1
- package/model/contact.ts +1 -1
- package/model/createCloudSourceRegulation200Response.ts +1 -1
- package/model/createCloudSourceRegulationV1Input.ts +1 -2
- package/model/createCloudSourceRegulationV1Output.ts +1 -1
- package/model/createDestination200Response.ts +1 -1
- package/model/createDestinationSubscription200Response.ts +1 -1
- package/model/createDestinationSubscriptionAlphaInput.ts +2 -2
- package/model/createDestinationSubscriptionAlphaOutput.ts +1 -1
- package/model/createDestinationV1Input.ts +1 -1
- package/model/createDestinationV1Output.ts +1 -1
- package/model/createEdgeFunctions200Response.ts +1 -1
- package/model/createEdgeFunctionsAlphaInput.ts +1 -1
- package/model/createEdgeFunctionsAlphaOutput.ts +1 -1
- package/model/createFilterForDestination200Response.ts +1 -1
- package/model/createFilterForDestinationV1Input.ts +1 -1
- package/model/createFilterForDestinationV1Output.ts +1 -1
- package/model/createFunction200Response.ts +1 -1
- package/model/createFunctionDeployment200Response.ts +1 -1
- package/model/createFunctionDeploymentV1Output.ts +1 -1
- package/model/createFunctionV1Input.ts +1 -1
- package/model/createFunctionV1Output.ts +1 -1
- package/model/createInvites200Response.ts +1 -1
- package/model/createInvitesV1Input.ts +1 -1
- package/model/createInvitesV1Output.ts +1 -1
- package/model/createLabel200Response.ts +4 -4
- package/model/createLabel200Response1.ts +4 -4
- package/model/createLabelAlphaInput.ts +1 -1
- package/model/createLabelAlphaOutput.ts +1 -1
- package/model/createLabelV1Input.ts +1 -1
- package/model/createLabelV1Output.ts +1 -1
- package/model/createSource200Response.ts +4 -4
- package/model/createSource200Response1.ts +4 -4
- package/model/createSourceAlphaInput.ts +2 -2
- package/model/createSourceAlphaOutput.ts +1 -1
- package/model/createSourceRegulation200Response.ts +1 -1
- package/model/createSourceRegulationV1Input.ts +1 -2
- package/model/createSourceRegulationV1Output.ts +1 -1
- package/model/createSourceV1Input.ts +2 -2
- package/model/createSourceV1Output.ts +1 -1
- package/model/createTrackingPlan200Response.ts +1 -1
- package/model/createTrackingPlanV1Input.ts +1 -1
- package/model/createTrackingPlanV1Output.ts +1 -1
- package/model/createTransformation200Response.ts +1 -1
- package/model/createTransformationBetaInput.ts +11 -1
- package/model/createTransformationBetaOutput.ts +1 -1
- package/model/createUserGroup200Response.ts +1 -1
- package/model/createUserGroupV1Input.ts +1 -1
- package/model/createUserGroupV1Output.ts +1 -1
- package/model/createValidationInWarehouse200Response.ts +1 -1
- package/model/createValidationInWarehouseV1Input.ts +2 -2
- package/model/createValidationInWarehouseV1Output.ts +1 -1
- package/model/createWarehouse200Response.ts +1 -1
- package/model/createWarehouseV1Input.ts +2 -2
- package/model/createWarehouseV1Output.ts +1 -1
- package/model/createWorkspaceRegulation200Response.ts +1 -1
- package/model/createWorkspaceRegulationV1Input.ts +1 -2
- package/model/createWorkspaceRegulationV1Output.ts +1 -1
- package/model/deleteDestination200Response.ts +1 -1
- package/model/deleteDestinationV1Output.ts +1 -1
- package/model/deleteFunction200Response.ts +1 -1
- package/model/deleteFunctionV1Output.ts +1 -1
- package/model/deleteInvites200Response.ts +1 -1
- package/model/deleteInvitesV1Output.ts +1 -1
- package/model/deleteLabel200Response.ts +4 -4
- package/model/deleteLabel200Response1.ts +4 -4
- package/model/deleteLabelAlphaOutput.ts +1 -1
- package/model/deleteLabelV1Output.ts +1 -1
- package/model/deleteRegulation200Response.ts +1 -1
- package/model/deleteRegulationV1Output.ts +1 -1
- package/model/deleteSource200Response.ts +4 -4
- package/model/deleteSource200Response1.ts +4 -4
- package/model/deleteSourceAlphaOutput.ts +1 -1
- package/model/deleteSourceV1Output.ts +1 -1
- package/model/deleteTrackingPlan200Response.ts +1 -1
- package/model/deleteTrackingPlanV1Output.ts +1 -1
- package/model/deleteTransformation200Response.ts +1 -1
- package/model/deleteTransformationBetaOutput.ts +1 -1
- package/model/deleteUserGroup200Response.ts +1 -1
- package/model/deleteUserGroupV1Output.ts +1 -1
- package/model/deleteUsers200Response.ts +1 -1
- package/model/deleteUsersV1Output.ts +1 -1
- package/model/deleteWarehouse200Response.ts +1 -1
- package/model/deleteWarehouseV1Output.ts +1 -1
- package/model/deliveryMetricsSummary.ts +2 -1
- package/model/deliveryMetricsSummaryBeta.ts +1 -1
- package/model/destination.ts +2 -1
- package/model/destination1.ts +2 -1
- package/model/destination2.ts +2 -1
- package/model/destinationFilterActionV1.ts +1 -1
- package/model/destinationFilterV1.ts +1 -1
- package/model/destinationMetadata.ts +2 -1
- package/model/destinationMetadataActionFieldV1.ts +1 -1
- package/model/destinationMetadataActionV1.ts +1 -1
- package/model/destinationMetadataComponentV1.ts +1 -1
- package/model/destinationMetadataFeaturesV1.ts +1 -1
- package/model/destinationMetadataMethodsV1.ts +1 -1
- package/model/destinationMetadataPlatformsV1.ts +1 -1
- package/model/destinationMetadataSubscriptionPresetV1.ts +1 -1
- package/model/destinationMetadataV1.ts +1 -1
- package/model/destinationStatusV1.ts +1 -1
- package/model/destinationSubscription.ts +2 -2
- package/model/destinationSubscriptionUpdateInput.ts +2 -2
- package/model/destinationV1.ts +1 -1
- package/model/disableEdgeFunctions200Response.ts +1 -1
- package/model/disableEdgeFunctionsAlphaOutput.ts +1 -1
- package/model/echo200Response.ts +4 -4
- package/model/echo200Response1.ts +4 -4
- package/model/echoAlphaOutput.ts +1 -1
- package/model/echoV1Output.ts +1 -1
- package/model/edgeFunctions.ts +2 -1
- package/model/edgeFunctions1.ts +2 -1
- package/model/edgeFunctionsAlpha.ts +1 -1
- package/model/eventSourceV1.ts +1 -1
- package/model/filter.ts +2 -1
- package/model/filter1.ts +2 -1
- package/model/filter2.ts +2 -1
- package/model/filter3.ts +2 -1
- package/model/function.ts +2 -1
- package/model/function1.ts +2 -1
- package/model/function2.ts +2 -1
- package/model/functionDeployment.ts +1 -1
- package/model/functionSettingV1.ts +1 -1
- package/model/functionV1.ts +1 -1
- package/model/generateUploadURLForEdgeFunctions200Response.ts +1 -1
- package/model/generateUploadURLForEdgeFunctionsAlphaOutput.ts +1 -1
- package/model/getAdvancedSyncScheduleFromWarehouse200Response.ts +1 -1
- package/model/getAdvancedSyncScheduleFromWarehouseV1Output.ts +1 -1
- package/model/getConnectionStateFromWarehouse200Response.ts +1 -1
- package/model/getConnectionStateFromWarehouseV1Output.ts +1 -1
- package/model/getDailyPerSourceAPICallsUsage200Response.ts +1 -1
- package/model/getDailyPerSourceAPICallsUsageV1Output.ts +1 -1
- package/model/getDailyPerSourceMTUUsage200Response.ts +1 -1
- package/model/getDailyPerSourceMTUUsageV1Output.ts +1 -1
- package/model/getDailyWorkspaceAPICallsUsage200Response.ts +1 -1
- package/model/getDailyWorkspaceAPICallsUsageV1Output.ts +1 -1
- package/model/getDailyWorkspaceMTUUsage200Response.ts +1 -1
- package/model/getDailyWorkspaceMTUUsageV1Output.ts +1 -1
- package/model/getDestination200Response.ts +1 -1
- package/model/getDestinationMetadata200Response.ts +1 -1
- package/model/getDestinationMetadataV1Output.ts +1 -1
- package/model/getDestinationV1Output.ts +1 -1
- package/model/getDestinationsCatalog200Response.ts +1 -1
- package/model/getDestinationsCatalogV1Output.ts +1 -1
- package/model/getEventsVolumeFromWorkspace200Response.ts +1 -1
- package/model/getEventsVolumeFromWorkspaceV1Output.ts +1 -1
- package/model/getFilterInDestination200Response.ts +1 -1
- package/model/getFilterInDestinationV1Output.ts +1 -1
- package/model/getFunction200Response.ts +1 -1
- package/model/getFunctionV1Output.ts +1 -1
- package/model/getLatestFromEdgeFunctions200Response.ts +1 -1
- package/model/getLatestFromEdgeFunctionsAlphaOutput.ts +1 -1
- package/model/getMessagingSubscriptionFailureResponse.ts +1 -1
- package/model/getMessagingSubscriptionSuccessResponse.ts +1 -1
- package/model/getRegulation200Response.ts +1 -1
- package/model/getRegulationV1Output.ts +1 -1
- package/model/getSource200Response.ts +4 -4
- package/model/getSource200Response1.ts +4 -4
- package/model/getSourceAlphaOutput.ts +1 -1
- package/model/getSourceMetadata200Response.ts +1 -1
- package/model/getSourceMetadataV1Output.ts +1 -1
- package/model/getSourceV1Output.ts +1 -1
- package/model/getSourcesCatalog200Response.ts +1 -1
- package/model/getSourcesCatalogV1Output.ts +1 -1
- package/model/getSpace200Response.ts +1 -1
- package/model/getSpaceAlphaOutput.ts +1 -1
- package/model/getSubscriptionFromDestination200Response.ts +1 -1
- package/model/getSubscriptionFromDestinationAlphaOutput.ts +1 -1
- package/model/getSubscriptionRequest.ts +1 -1
- package/model/getTrackingPlan200Response.ts +1 -1
- package/model/getTrackingPlanV1Output.ts +1 -1
- package/model/getTransformation200Response.ts +1 -1
- package/model/getTransformationBetaOutput.ts +1 -1
- package/model/getUser200Response.ts +1 -1
- package/model/getUserGroup200Response.ts +1 -1
- package/model/getUserGroupV1Output.ts +1 -1
- package/model/getUserV1Output.ts +1 -1
- package/model/getWarehouse200Response.ts +1 -1
- package/model/getWarehouseMetadata200Response.ts +1 -1
- package/model/getWarehouseMetadataV1Output.ts +1 -1
- package/model/getWarehouseV1Output.ts +1 -1
- package/model/getWarehousesCatalog200Response.ts +1 -1
- package/model/getWarehousesCatalogV1Output.ts +1 -1
- package/model/getWorkspace200Response.ts +1 -1
- package/model/getWorkspaceV1Output.ts +1 -1
- package/model/group.ts +2 -1
- package/model/groupSourceSettingsV1.ts +1 -1
- package/model/identify.ts +2 -1
- package/model/identifySourceSettingsV1.ts +1 -1
- package/model/input.ts +3 -2
- package/model/integrationOptionBeta.ts +1 -1
- package/model/invitePermissionV1.ts +1 -1
- package/model/inviteV1.ts +1 -1
- package/model/label.ts +2 -1
- package/model/label1.ts +2 -1
- package/model/label2.ts +2 -1
- package/model/labelAlpha.ts +1 -1
- package/model/labelV1.ts +1 -1
- package/model/listAuditEvents200Response.ts +1 -1
- package/model/listAuditEventsV1Output.ts +1 -1
- package/model/listConnectedDestinationsFromSource200Response.ts +4 -4
- package/model/listConnectedDestinationsFromSource200Response1.ts +4 -4
- package/model/listConnectedDestinationsFromSourceAlphaOutput.ts +1 -1
- package/model/listConnectedDestinationsFromSourceV1Output.ts +1 -1
- package/model/listConnectedSourcesFromWarehouse200Response.ts +1 -1
- package/model/listConnectedSourcesFromWarehouseV1Output.ts +1 -1
- package/model/listConnectedWarehousesFromSource200Response.ts +4 -4
- package/model/listConnectedWarehousesFromSource200Response1.ts +4 -4
- package/model/listConnectedWarehousesFromSourceAlphaOutput.ts +1 -1
- package/model/listConnectedWarehousesFromSourceV1Output.ts +1 -1
- package/model/listDeliveryMetricsSummaryFromDestination200Response.ts +1 -1
- package/model/listDeliveryMetricsSummaryFromDestinationBetaOutput.ts +1 -1
- package/model/listDestinations200Response.ts +1 -1
- package/model/listDestinationsV1Output.ts +1 -1
- package/model/listFiltersFromDestination200Response.ts +1 -1
- package/model/listFiltersFromDestinationV1Output.ts +1 -1
- package/model/listFunctionItemV1.ts +1 -1
- package/model/listFunctions200Response.ts +1 -1
- package/model/listFunctionsV1Output.ts +1 -1
- package/model/listInvites200Response.ts +1 -1
- package/model/listInvitesFromUserGroup200Response.ts +1 -1
- package/model/listInvitesFromUserGroupV1Output.ts +1 -1
- package/model/listInvitesV1Output.ts +1 -1
- package/model/listLabels200Response.ts +4 -4
- package/model/listLabels200Response1.ts +4 -4
- package/model/listLabelsAlphaOutput.ts +1 -1
- package/model/listLabelsV1Output.ts +1 -1
- package/model/listRegulationsFromSource200Response.ts +1 -1
- package/model/listRegulationsFromSourceV1Output.ts +1 -1
- package/model/listRoles200Response.ts +1 -1
- package/model/listRolesV1Output.ts +1 -1
- package/model/listRulesFromTrackingPlan200Response.ts +1 -1
- package/model/listRulesFromTrackingPlanV1Output.ts +1 -1
- package/model/listSchemaSettingsInSource200Response.ts +1 -1
- package/model/listSchemaSettingsInSourceV1Output.ts +1 -1
- package/model/listSelectiveSyncsFromWarehouseAndSource200Response.ts +1 -1
- package/model/listSelectiveSyncsFromWarehouseAndSourceV1Output.ts +1 -1
- package/model/listSources200Response.ts +4 -4
- package/model/listSources200Response1.ts +4 -4
- package/model/listSourcesAlphaOutput.ts +1 -1
- package/model/listSourcesFromTrackingPlan200Response.ts +1 -1
- package/model/listSourcesFromTrackingPlanV1Output.ts +1 -1
- package/model/listSourcesV1Output.ts +1 -1
- package/model/listSubscriptionsFromDestination200Response.ts +1 -1
- package/model/listSubscriptionsFromDestinationAlphaOutput.ts +1 -1
- package/model/listSuppressions200Response.ts +1 -1
- package/model/listSuppressionsV1Output.ts +1 -1
- package/model/listSyncsFromWarehouse200Response.ts +1 -1
- package/model/listSyncsFromWarehouseAndSource200Response.ts +1 -1
- package/model/listSyncsFromWarehouseAndSourceV1Output.ts +1 -1
- package/model/listSyncsFromWarehouseV1Output.ts +1 -1
- package/model/listTrackingPlans200Response.ts +1 -1
- package/model/listTrackingPlansV1Output.ts +1 -1
- package/model/listTransformations200Response.ts +1 -1
- package/model/listTransformationsBetaOutput.ts +1 -1
- package/model/listUserGroups200Response.ts +1 -1
- package/model/listUserGroupsFromUser200Response.ts +1 -1
- package/model/listUserGroupsFromUserV1Output.ts +1 -1
- package/model/listUserGroupsV1Output.ts +1 -1
- package/model/listUsers200Response.ts +1 -1
- package/model/listUsersFromUserGroup200Response.ts +1 -1
- package/model/listUsersFromUserGroupV1Output.ts +1 -1
- package/model/listUsersV1Output.ts +1 -1
- package/model/listWarehouses200Response.ts +1 -1
- package/model/listWarehousesV1Output.ts +1 -1
- package/model/listWorkspaceRegulations200Response.ts +1 -1
- package/model/listWorkspaceRegulationsV1Output.ts +1 -1
- package/model/logos.ts +2 -1
- package/model/logos1.ts +2 -1
- package/model/logos2.ts +2 -1
- package/model/logosBeta.ts +1 -1
- package/model/messageSubscriptionResponse.ts +1 -1
- package/model/messageSubscriptionResponseError.ts +1 -1
- package/model/messagesSubscriptionRequest.ts +1 -1
- package/model/metadata.ts +2 -1
- package/model/metadata1.ts +2 -1
- package/model/metadata2.ts +2 -1
- package/model/metricBeta.ts +1 -1
- package/model/minimalUserGroupV1.ts +1 -1
- package/model/minimalUserV1.ts +1 -1
- package/model/models.ts +3 -0
- package/model/mtuSnapshotV1.ts +1 -1
- package/model/pagination.ts +2 -1
- package/model/paginationInput.ts +1 -1
- package/model/paginationOutput.ts +1 -1
- package/model/permissionInputV1.ts +1 -1
- package/model/permissionResourceV1.ts +1 -1
- package/model/permissionV1.ts +1 -1
- package/model/previewDestinationFilter200Response.ts +1 -1
- package/model/previewDestinationFilterV1.ts +1 -1
- package/model/previewDestinationFilterV1Input.ts +1 -1
- package/model/previewDestinationFilterV1Output.ts +3 -3
- package/model/propertyRenameBeta.ts +1 -1
- package/model/propertyValueTransformationBeta.ts +47 -0
- package/model/regulation.ts +1 -1
- package/model/regulationListEntryV1.ts +1 -1
- package/model/removeFilterFromDestination200Response.ts +1 -1
- package/model/removeFilterFromDestinationV1Output.ts +1 -1
- package/model/removeRuleV1.ts +1 -1
- package/model/removeRulesFromTrackingPlan200Response.ts +1 -1
- package/model/removeRulesFromTrackingPlanV1Output.ts +1 -1
- package/model/removeSourceConnectionFromWarehouse200Response.ts +1 -1
- package/model/removeSourceConnectionFromWarehouseV1Output.ts +1 -1
- package/model/removeSourceFromTrackingPlan200Response.ts +1 -1
- package/model/removeSourceFromTrackingPlanV1Output.ts +1 -1
- package/model/removeSubscriptionFromDestination200Response.ts +1 -1
- package/model/removeSubscriptionFromDestinationAlphaOutput.ts +1 -1
- package/model/removeUsersFromUserGroup200Response.ts +1 -1
- package/model/removeUsersFromUserGroupV1Output.ts +1 -1
- package/model/replaceAdvancedSyncScheduleForWarehouse200Response.ts +1 -1
- package/model/replaceAdvancedSyncScheduleForWarehouseV1Input.ts +1 -1
- package/model/replaceAdvancedSyncScheduleForWarehouseV1Output.ts +1 -1
- package/model/replaceLabelsInSource200Response.ts +4 -4
- package/model/replaceLabelsInSource200Response1.ts +4 -4
- package/model/replaceLabelsInSourceAlphaInput.ts +1 -1
- package/model/replaceLabelsInSourceAlphaOutput.ts +1 -1
- package/model/replaceLabelsInSourceV1Input.ts +1 -1
- package/model/replaceLabelsInSourceV1Output.ts +1 -1
- package/model/replaceMessagingSubscriptionsInSpaces200Response.ts +1 -1
- package/model/replaceMessagingSubscriptionsInSpacesAlphaInput.ts +1 -1
- package/model/replaceMessagingSubscriptionsInSpacesAlphaOutput.ts +1 -1
- package/model/replacePermissionsForUser200Response.ts +1 -1
- package/model/replacePermissionsForUserGroup200Response.ts +1 -1
- package/model/replacePermissionsForUserGroupV1Input.ts +1 -1
- package/model/replacePermissionsForUserGroupV1Output.ts +1 -1
- package/model/replacePermissionsForUserV1Input.ts +1 -1
- package/model/replacePermissionsForUserV1Output.ts +1 -1
- package/model/replaceRulesInTrackingPlan200Response.ts +1 -1
- package/model/replaceRulesInTrackingPlanV1Input.ts +1 -1
- package/model/replaceRulesInTrackingPlanV1Output.ts +1 -1
- package/model/replaceUsersInUserGroup200Response.ts +1 -1
- package/model/replaceUsersInUserGroupV1Input.ts +1 -1
- package/model/replaceUsersInUserGroupV1Output.ts +1 -1
- package/model/requestError.ts +1 -1
- package/model/requestErrorEnvelope.ts +1 -1
- package/model/resourceV1.ts +1 -1
- package/model/roleV1.ts +1 -1
- package/model/ruleV1.ts +1 -1
- package/model/schedule.ts +2 -1
- package/model/schedule1.ts +2 -1
- package/model/schedule2.ts +2 -1
- package/model/settings.ts +2 -1
- package/model/settings1.ts +2 -1
- package/model/source.ts +2 -1
- package/model/source1.ts +3 -2
- package/model/source2.ts +3 -2
- package/model/source3.ts +3 -2
- package/model/source4.ts +3 -2
- package/model/source5.ts +3 -2
- package/model/source6.ts +3 -2
- package/model/sourceAPICallSnapshotV1.ts +1 -1
- package/model/sourceAlpha.ts +2 -2
- package/model/sourceEventVolumeDatapointV1.ts +1 -1
- package/model/sourceEventVolumeV1.ts +1 -1
- package/model/sourceMetadata.ts +2 -1
- package/model/sourceMetadataV1.ts +1 -1
- package/model/sourceSettingsOutputV1.ts +1 -1
- package/model/sourceV1.ts +2 -2
- package/model/space.ts +1 -1
- package/model/streamStatusV1.ts +1 -1
- package/model/subscription.ts +3 -2
- package/model/supportedFeatures.ts +2 -1
- package/model/supportedMethods.ts +2 -1
- package/model/supportedPlatforms.ts +2 -1
- package/model/suppressedInner.ts +1 -1
- package/model/syncNoticeV1.ts +1 -1
- package/model/syncV1.ts +1 -1
- package/model/track.ts +2 -1
- package/model/trackSourceSettingsV1.ts +1 -1
- package/model/trackingPlan.ts +2 -1
- package/model/trackingPlan1.ts +2 -1
- package/model/trackingPlanV1.ts +1 -1
- package/model/transformation.ts +12 -1
- package/model/transformation1.ts +12 -1
- package/model/transformation2.ts +12 -1
- package/model/transformationBeta.ts +11 -1
- package/model/updateDestination200Response.ts +1 -1
- package/model/updateDestinationV1Input.ts +1 -1
- package/model/updateDestinationV1Output.ts +1 -1
- package/model/updateFilterForDestination200Response.ts +1 -1
- package/model/updateFilterForDestinationV1Input.ts +1 -1
- package/model/updateFilterForDestinationV1Output.ts +1 -1
- package/model/updateFunction200Response.ts +1 -1
- package/model/updateFunctionV1Input.ts +1 -1
- package/model/updateFunctionV1Output.ts +1 -1
- package/model/updateRulesInTrackingPlan200Response.ts +1 -1
- package/model/updateRulesInTrackingPlanV1Input.ts +1 -1
- package/model/updateRulesInTrackingPlanV1Output.ts +1 -1
- package/model/updateSchemaSettingsInSource200Response.ts +1 -1
- package/model/updateSchemaSettingsInSourceV1Input.ts +1 -1
- package/model/updateSchemaSettingsInSourceV1Output.ts +1 -1
- package/model/updateSelectiveSyncForWarehouse200Response.ts +1 -1
- package/model/updateSelectiveSyncForWarehouseV1Input.ts +1 -1
- package/model/updateSelectiveSyncForWarehouseV1Output.ts +1 -1
- package/model/updateSource200Response.ts +4 -4
- package/model/updateSource200Response1.ts +4 -4
- package/model/updateSourceAlphaInput.ts +2 -2
- package/model/updateSourceAlphaOutput.ts +1 -1
- package/model/updateSourceV1Input.ts +2 -2
- package/model/updateSourceV1Output.ts +1 -1
- package/model/updateSubscriptionForDestination200Response.ts +1 -1
- package/model/updateSubscriptionForDestinationAlphaInput.ts +1 -1
- package/model/updateSubscriptionForDestinationAlphaOutput.ts +1 -1
- package/model/updateTrackingPlan200Response.ts +1 -1
- package/model/updateTrackingPlanV1Input.ts +1 -1
- package/model/updateTrackingPlanV1Output.ts +1 -1
- package/model/updateTransformation200Response.ts +1 -1
- package/model/updateTransformationBetaInput.ts +11 -1
- package/model/updateTransformationBetaOutput.ts +1 -1
- package/model/updateUserGroup200Response.ts +1 -1
- package/model/updateUserGroupV1Input.ts +1 -1
- package/model/updateUserGroupV1Output.ts +1 -1
- package/model/updateWarehouse200Response.ts +1 -1
- package/model/updateWarehouseV1Input.ts +2 -2
- package/model/updateWarehouseV1Output.ts +1 -1
- package/model/upsertRuleV1.ts +1 -1
- package/model/user.ts +2 -1
- package/model/userGroup.ts +2 -1
- package/model/userGroup1.ts +2 -1
- package/model/userGroup2.ts +2 -1
- package/model/userGroup3.ts +2 -1
- package/model/userGroupV1.ts +1 -1
- package/model/userV1.ts +1 -1
- package/model/usersPerSourceSnapshotV1.ts +1 -1
- package/model/warehouse.ts +3 -2
- package/model/warehouse1.ts +3 -2
- package/model/warehouse2.ts +3 -2
- package/model/warehouseAdvancedSyncV1.ts +1 -1
- package/model/warehouseMetadata.ts +2 -1
- package/model/warehouseMetadataV1.ts +1 -1
- package/model/warehouseSelectiveSyncItemV1.ts +1 -1
- package/model/warehouseSyncOverrideV1.ts +1 -1
- package/model/warehouseV1.ts +2 -2
- package/model/workspace.ts +2 -1
- package/model/workspaceV1.ts +1 -1
- package/package.json +4 -4
- package/tests/__snapshots__/smoke.test.ts.snap +130 -130
- package/tests/smoke.test.ts +6 -6
package/api/warehousesApi.ts
CHANGED
|
@@ -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:
|
|
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).
|
|
@@ -119,12 +119,12 @@ export class WarehousesApi {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
* Connects a Source to a Warehouse. When called, this endpoint may generate the `Storage Destination Modified` [
|
|
122
|
+
* Connects a Source to a Warehouse. When called, this endpoint may generate the `Storage Destination Modified` event in the [audit trail](/tag/Audit-Trail).
|
|
123
123
|
* @summary Add Connection from Source to Warehouse
|
|
124
124
|
* @param warehouseId
|
|
125
125
|
* @param sourceId
|
|
126
126
|
*/
|
|
127
|
-
public async
|
|
127
|
+
public async addConnectionFromSourceToWarehouse(
|
|
128
128
|
warehouseId: string,
|
|
129
129
|
sourceId: string,
|
|
130
130
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
@@ -149,27 +149,30 @@ export class WarehousesApi {
|
|
|
149
149
|
this._defaultHeaders
|
|
150
150
|
);
|
|
151
151
|
const produces = [
|
|
152
|
-
'application/vnd.segment.
|
|
152
|
+
'application/vnd.segment.v1+json',
|
|
153
153
|
'application/json',
|
|
154
|
+
'application/vnd.segment.v1beta+json',
|
|
155
|
+
'application/vnd.segment.v1alpha+json',
|
|
154
156
|
];
|
|
157
|
+
// give precedence to 'application/json'
|
|
155
158
|
if (produces.indexOf('application/json') >= 0) {
|
|
156
|
-
localVarHeaderParams.Accept = produces[0];
|
|
157
|
-
} else {
|
|
158
159
|
localVarHeaderParams.Accept = 'application/json';
|
|
160
|
+
} else {
|
|
161
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
159
162
|
}
|
|
160
163
|
let localVarFormParams: any = {};
|
|
161
164
|
|
|
162
165
|
// verify required parameter 'warehouseId' is not null or undefined
|
|
163
166
|
if (warehouseId === null || warehouseId === undefined) {
|
|
164
167
|
throw new Error(
|
|
165
|
-
'Required parameter warehouseId was null or undefined when calling
|
|
168
|
+
'Required parameter warehouseId was null or undefined when calling addConnectionFromSourceToWarehouse.'
|
|
166
169
|
);
|
|
167
170
|
}
|
|
168
171
|
|
|
169
172
|
// verify required parameter 'sourceId' is not null or undefined
|
|
170
173
|
if (sourceId === null || sourceId === undefined) {
|
|
171
174
|
throw new Error(
|
|
172
|
-
'Required parameter sourceId was null or undefined when calling
|
|
175
|
+
'Required parameter sourceId was null or undefined when calling addConnectionFromSourceToWarehouse.'
|
|
173
176
|
);
|
|
174
177
|
}
|
|
175
178
|
|
|
@@ -249,184 +252,44 @@ export class WarehousesApi {
|
|
|
249
252
|
});
|
|
250
253
|
}
|
|
251
254
|
/**
|
|
252
|
-
*
|
|
253
|
-
* @summary
|
|
254
|
-
* @param
|
|
255
|
-
* @param sourceId
|
|
255
|
+
* Validates input settings against a Warehouse. When called, this endpoint may generate the `Storage Destination Settings Validation` event in the [audit trail](/tag/Audit-Trail).
|
|
256
|
+
* @summary Create Validation in Warehouse
|
|
257
|
+
* @param CreateValidationInWarehouseV1Input
|
|
256
258
|
*/
|
|
257
|
-
public async
|
|
258
|
-
|
|
259
|
-
sourceId: string,
|
|
259
|
+
public async createValidationInWarehouse(
|
|
260
|
+
CreateValidationInWarehouseV1Input: CreateValidationInWarehouseV1Input,
|
|
260
261
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
261
262
|
): Promise<{
|
|
262
263
|
response: http.IncomingMessage;
|
|
263
|
-
body:
|
|
264
|
+
body: CreateValidationInWarehouse200Response;
|
|
264
265
|
}> {
|
|
265
|
-
const localVarPath =
|
|
266
|
-
this.basePath +
|
|
267
|
-
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
268
|
-
.replace(
|
|
269
|
-
'{' + 'warehouseId' + '}',
|
|
270
|
-
encodeURIComponent(String(warehouseId))
|
|
271
|
-
)
|
|
272
|
-
.replace(
|
|
273
|
-
'{' + 'sourceId' + '}',
|
|
274
|
-
encodeURIComponent(String(sourceId))
|
|
275
|
-
);
|
|
266
|
+
const localVarPath = this.basePath + '/warehouses/validation';
|
|
276
267
|
let localVarQueryParameters: any = {};
|
|
277
268
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
278
269
|
{},
|
|
279
270
|
this._defaultHeaders
|
|
280
271
|
);
|
|
281
272
|
const produces = [
|
|
282
|
-
'application/vnd.segment.
|
|
273
|
+
'application/vnd.segment.v1+json',
|
|
283
274
|
'application/json',
|
|
275
|
+
'application/vnd.segment.v1beta+json',
|
|
276
|
+
'application/vnd.segment.v1alpha+json',
|
|
284
277
|
];
|
|
278
|
+
// give precedence to 'application/json'
|
|
285
279
|
if (produces.indexOf('application/json') >= 0) {
|
|
286
|
-
localVarHeaderParams.Accept = produces[0];
|
|
287
|
-
} else {
|
|
288
280
|
localVarHeaderParams.Accept = 'application/json';
|
|
289
|
-
}
|
|
290
|
-
let localVarFormParams: any = {};
|
|
291
|
-
|
|
292
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
293
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
294
|
-
throw new Error(
|
|
295
|
-
'Required parameter warehouseId was null or undefined when calling addConnectionFromSourceToWarehouseBeta.'
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// verify required parameter 'sourceId' is not null or undefined
|
|
300
|
-
if (sourceId === null || sourceId === undefined) {
|
|
301
|
-
throw new Error(
|
|
302
|
-
'Required parameter sourceId was null or undefined when calling addConnectionFromSourceToWarehouseBeta.'
|
|
303
|
-
);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
307
|
-
|
|
308
|
-
let localVarUseFormData = false;
|
|
309
|
-
|
|
310
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
311
|
-
method: 'POST',
|
|
312
|
-
qs: localVarQueryParameters,
|
|
313
|
-
headers: localVarHeaderParams,
|
|
314
|
-
uri: localVarPath,
|
|
315
|
-
useQuerystring: this._useQuerystring,
|
|
316
|
-
json: true,
|
|
317
|
-
};
|
|
318
|
-
|
|
319
|
-
let authenticationPromise = Promise.resolve();
|
|
320
|
-
if (this.authentications.token.accessToken) {
|
|
321
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
322
|
-
this.authentications.token.applyToRequest(
|
|
323
|
-
localVarRequestOptions
|
|
324
|
-
)
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
328
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
329
|
-
);
|
|
330
|
-
|
|
331
|
-
let interceptorPromise = authenticationPromise;
|
|
332
|
-
for (const interceptor of this.interceptors) {
|
|
333
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
334
|
-
interceptor(localVarRequestOptions)
|
|
335
|
-
);
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
return interceptorPromise.then(() => {
|
|
339
|
-
if (Object.keys(localVarFormParams).length) {
|
|
340
|
-
if (localVarUseFormData) {
|
|
341
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
342
|
-
} else {
|
|
343
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
return new Promise<{
|
|
347
|
-
response: http.IncomingMessage;
|
|
348
|
-
body: AddConnectionFromSourceToWarehouse200Response;
|
|
349
|
-
}>((resolve, reject) => {
|
|
350
|
-
localVarRequest(
|
|
351
|
-
localVarRequestOptions,
|
|
352
|
-
(error, response, body) => {
|
|
353
|
-
if (error) {
|
|
354
|
-
reject(error);
|
|
355
|
-
} else {
|
|
356
|
-
if (
|
|
357
|
-
response.statusCode &&
|
|
358
|
-
response.statusCode >= 200 &&
|
|
359
|
-
response.statusCode <= 299
|
|
360
|
-
) {
|
|
361
|
-
body = ObjectSerializer.deserialize(
|
|
362
|
-
body,
|
|
363
|
-
'AddConnectionFromSourceToWarehouse200Response'
|
|
364
|
-
);
|
|
365
|
-
resolve({ response: response, body: body });
|
|
366
|
-
} else {
|
|
367
|
-
reject(
|
|
368
|
-
new HttpError(
|
|
369
|
-
response,
|
|
370
|
-
body,
|
|
371
|
-
response.statusCode
|
|
372
|
-
)
|
|
373
|
-
);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
);
|
|
378
|
-
});
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
/**
|
|
382
|
-
* Connects a Source to a Warehouse. When called, this endpoint may generate the `Storage Destination Modified` [Audit Trail](/tag/Audit-Trail) event.
|
|
383
|
-
* @summary Add Connection from Source to Warehouse
|
|
384
|
-
* @param warehouseId
|
|
385
|
-
* @param sourceId
|
|
386
|
-
*/
|
|
387
|
-
public async addConnectionFromSourceToWarehouseCurrent(
|
|
388
|
-
warehouseId: string,
|
|
389
|
-
sourceId: string,
|
|
390
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
391
|
-
): Promise<{
|
|
392
|
-
response: http.IncomingMessage;
|
|
393
|
-
body: AddConnectionFromSourceToWarehouse200Response;
|
|
394
|
-
}> {
|
|
395
|
-
const localVarPath =
|
|
396
|
-
this.basePath +
|
|
397
|
-
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
398
|
-
.replace(
|
|
399
|
-
'{' + 'warehouseId' + '}',
|
|
400
|
-
encodeURIComponent(String(warehouseId))
|
|
401
|
-
)
|
|
402
|
-
.replace(
|
|
403
|
-
'{' + 'sourceId' + '}',
|
|
404
|
-
encodeURIComponent(String(sourceId))
|
|
405
|
-
);
|
|
406
|
-
let localVarQueryParameters: any = {};
|
|
407
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
408
|
-
{},
|
|
409
|
-
this._defaultHeaders
|
|
410
|
-
);
|
|
411
|
-
const produces = ['application/json'];
|
|
412
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
413
|
-
localVarHeaderParams.Accept = produces[0];
|
|
414
281
|
} else {
|
|
415
|
-
localVarHeaderParams.Accept = '
|
|
282
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
416
283
|
}
|
|
417
284
|
let localVarFormParams: any = {};
|
|
418
285
|
|
|
419
|
-
// verify required parameter '
|
|
420
|
-
if (
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
// verify required parameter 'sourceId' is not null or undefined
|
|
427
|
-
if (sourceId === null || sourceId === undefined) {
|
|
286
|
+
// verify required parameter 'CreateValidationInWarehouseV1Input' is not null or undefined
|
|
287
|
+
if (
|
|
288
|
+
CreateValidationInWarehouseV1Input === null ||
|
|
289
|
+
CreateValidationInWarehouseV1Input === undefined
|
|
290
|
+
) {
|
|
428
291
|
throw new Error(
|
|
429
|
-
'Required parameter
|
|
292
|
+
'Required parameter CreateValidationInWarehouseV1Input was null or undefined when calling createValidationInWarehouse.'
|
|
430
293
|
);
|
|
431
294
|
}
|
|
432
295
|
|
|
@@ -441,6 +304,10 @@ export class WarehousesApi {
|
|
|
441
304
|
uri: localVarPath,
|
|
442
305
|
useQuerystring: this._useQuerystring,
|
|
443
306
|
json: true,
|
|
307
|
+
body: ObjectSerializer.serialize(
|
|
308
|
+
CreateValidationInWarehouseV1Input,
|
|
309
|
+
'CreateValidationInWarehouseV1Input'
|
|
310
|
+
),
|
|
444
311
|
};
|
|
445
312
|
|
|
446
313
|
let authenticationPromise = Promise.resolve();
|
|
@@ -472,7 +339,7 @@ export class WarehousesApi {
|
|
|
472
339
|
}
|
|
473
340
|
return new Promise<{
|
|
474
341
|
response: http.IncomingMessage;
|
|
475
|
-
body:
|
|
342
|
+
body: CreateValidationInWarehouse200Response;
|
|
476
343
|
}>((resolve, reject) => {
|
|
477
344
|
localVarRequest(
|
|
478
345
|
localVarRequestOptions,
|
|
@@ -487,7 +354,7 @@ export class WarehousesApi {
|
|
|
487
354
|
) {
|
|
488
355
|
body = ObjectSerializer.deserialize(
|
|
489
356
|
body,
|
|
490
|
-
'
|
|
357
|
+
'CreateValidationInWarehouse200Response'
|
|
491
358
|
);
|
|
492
359
|
resolve({ response: response, body: body });
|
|
493
360
|
} else {
|
|
@@ -506,30 +373,18 @@ export class WarehousesApi {
|
|
|
506
373
|
});
|
|
507
374
|
}
|
|
508
375
|
/**
|
|
509
|
-
*
|
|
510
|
-
* @summary
|
|
511
|
-
* @param
|
|
512
|
-
* @param sourceId
|
|
376
|
+
* Creates a new Warehouse. When called, this endpoint may generate the `Storage Destination Created` event in the [audit trail](/tag/Audit-Trail).
|
|
377
|
+
* @summary Create Warehouse
|
|
378
|
+
* @param CreateWarehouseV1Input
|
|
513
379
|
*/
|
|
514
|
-
public async
|
|
515
|
-
|
|
516
|
-
sourceId: string,
|
|
380
|
+
public async createWarehouse(
|
|
381
|
+
CreateWarehouseV1Input: CreateWarehouseV1Input,
|
|
517
382
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
518
383
|
): Promise<{
|
|
519
384
|
response: http.IncomingMessage;
|
|
520
|
-
body:
|
|
385
|
+
body: CreateWarehouse200Response;
|
|
521
386
|
}> {
|
|
522
|
-
const localVarPath =
|
|
523
|
-
this.basePath +
|
|
524
|
-
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
525
|
-
.replace(
|
|
526
|
-
'{' + 'warehouseId' + '}',
|
|
527
|
-
encodeURIComponent(String(warehouseId))
|
|
528
|
-
)
|
|
529
|
-
.replace(
|
|
530
|
-
'{' + 'sourceId' + '}',
|
|
531
|
-
encodeURIComponent(String(sourceId))
|
|
532
|
-
);
|
|
387
|
+
const localVarPath = this.basePath + '/warehouses';
|
|
533
388
|
let localVarQueryParameters: any = {};
|
|
534
389
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
535
390
|
{},
|
|
@@ -538,25 +393,24 @@ export class WarehousesApi {
|
|
|
538
393
|
const produces = [
|
|
539
394
|
'application/vnd.segment.v1+json',
|
|
540
395
|
'application/json',
|
|
396
|
+
'application/vnd.segment.v1beta+json',
|
|
397
|
+
'application/vnd.segment.v1alpha+json',
|
|
541
398
|
];
|
|
399
|
+
// give precedence to 'application/json'
|
|
542
400
|
if (produces.indexOf('application/json') >= 0) {
|
|
543
|
-
localVarHeaderParams.Accept = produces[0];
|
|
544
|
-
} else {
|
|
545
401
|
localVarHeaderParams.Accept = 'application/json';
|
|
402
|
+
} else {
|
|
403
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
546
404
|
}
|
|
547
405
|
let localVarFormParams: any = {};
|
|
548
406
|
|
|
549
|
-
// verify required parameter '
|
|
550
|
-
if (
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
// verify required parameter 'sourceId' is not null or undefined
|
|
557
|
-
if (sourceId === null || sourceId === undefined) {
|
|
407
|
+
// verify required parameter 'CreateWarehouseV1Input' is not null or undefined
|
|
408
|
+
if (
|
|
409
|
+
CreateWarehouseV1Input === null ||
|
|
410
|
+
CreateWarehouseV1Input === undefined
|
|
411
|
+
) {
|
|
558
412
|
throw new Error(
|
|
559
|
-
'Required parameter
|
|
413
|
+
'Required parameter CreateWarehouseV1Input was null or undefined when calling createWarehouse.'
|
|
560
414
|
);
|
|
561
415
|
}
|
|
562
416
|
|
|
@@ -571,6 +425,10 @@ export class WarehousesApi {
|
|
|
571
425
|
uri: localVarPath,
|
|
572
426
|
useQuerystring: this._useQuerystring,
|
|
573
427
|
json: true,
|
|
428
|
+
body: ObjectSerializer.serialize(
|
|
429
|
+
CreateWarehouseV1Input,
|
|
430
|
+
'CreateWarehouseV1Input'
|
|
431
|
+
),
|
|
574
432
|
};
|
|
575
433
|
|
|
576
434
|
let authenticationPromise = Promise.resolve();
|
|
@@ -602,3458 +460,7 @@ export class WarehousesApi {
|
|
|
602
460
|
}
|
|
603
461
|
return new Promise<{
|
|
604
462
|
response: http.IncomingMessage;
|
|
605
|
-
body:
|
|
606
|
-
}>((resolve, reject) => {
|
|
607
|
-
localVarRequest(
|
|
608
|
-
localVarRequestOptions,
|
|
609
|
-
(error, response, body) => {
|
|
610
|
-
if (error) {
|
|
611
|
-
reject(error);
|
|
612
|
-
} else {
|
|
613
|
-
if (
|
|
614
|
-
response.statusCode &&
|
|
615
|
-
response.statusCode >= 200 &&
|
|
616
|
-
response.statusCode <= 299
|
|
617
|
-
) {
|
|
618
|
-
body = ObjectSerializer.deserialize(
|
|
619
|
-
body,
|
|
620
|
-
'AddConnectionFromSourceToWarehouse200Response'
|
|
621
|
-
);
|
|
622
|
-
resolve({ response: response, body: body });
|
|
623
|
-
} else {
|
|
624
|
-
reject(
|
|
625
|
-
new HttpError(
|
|
626
|
-
response,
|
|
627
|
-
body,
|
|
628
|
-
response.statusCode
|
|
629
|
-
)
|
|
630
|
-
);
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
);
|
|
635
|
-
});
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
/**
|
|
639
|
-
* Validates input settings against a Warehouse. When called, this endpoint may generate the `Storage Destination Settings Validation` [Audit Trail](/tag/Audit-Trail) event.
|
|
640
|
-
* @summary Create Validation in Warehouse
|
|
641
|
-
* @param CreateValidationInWarehouseV1Input
|
|
642
|
-
*/
|
|
643
|
-
public async createValidationInWarehouseAlpha(
|
|
644
|
-
CreateValidationInWarehouseV1Input: CreateValidationInWarehouseV1Input,
|
|
645
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
646
|
-
): Promise<{
|
|
647
|
-
response: http.IncomingMessage;
|
|
648
|
-
body: CreateValidationInWarehouse200Response;
|
|
649
|
-
}> {
|
|
650
|
-
const localVarPath = this.basePath + '/warehouses/validation';
|
|
651
|
-
let localVarQueryParameters: any = {};
|
|
652
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
653
|
-
{},
|
|
654
|
-
this._defaultHeaders
|
|
655
|
-
);
|
|
656
|
-
const produces = [
|
|
657
|
-
'application/vnd.segment.v1alpha+json',
|
|
658
|
-
'application/json',
|
|
659
|
-
];
|
|
660
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
661
|
-
localVarHeaderParams.Accept = produces[0];
|
|
662
|
-
} else {
|
|
663
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
664
|
-
}
|
|
665
|
-
let localVarFormParams: any = {};
|
|
666
|
-
|
|
667
|
-
// verify required parameter 'CreateValidationInWarehouseV1Input' is not null or undefined
|
|
668
|
-
if (
|
|
669
|
-
CreateValidationInWarehouseV1Input === null ||
|
|
670
|
-
CreateValidationInWarehouseV1Input === undefined
|
|
671
|
-
) {
|
|
672
|
-
throw new Error(
|
|
673
|
-
'Required parameter CreateValidationInWarehouseV1Input was null or undefined when calling createValidationInWarehouseAlpha.'
|
|
674
|
-
);
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
678
|
-
|
|
679
|
-
let localVarUseFormData = false;
|
|
680
|
-
|
|
681
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
682
|
-
method: 'POST',
|
|
683
|
-
qs: localVarQueryParameters,
|
|
684
|
-
headers: localVarHeaderParams,
|
|
685
|
-
uri: localVarPath,
|
|
686
|
-
useQuerystring: this._useQuerystring,
|
|
687
|
-
json: true,
|
|
688
|
-
body: ObjectSerializer.serialize(
|
|
689
|
-
CreateValidationInWarehouseV1Input,
|
|
690
|
-
'CreateValidationInWarehouseV1Input'
|
|
691
|
-
),
|
|
692
|
-
};
|
|
693
|
-
|
|
694
|
-
let authenticationPromise = Promise.resolve();
|
|
695
|
-
if (this.authentications.token.accessToken) {
|
|
696
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
697
|
-
this.authentications.token.applyToRequest(
|
|
698
|
-
localVarRequestOptions
|
|
699
|
-
)
|
|
700
|
-
);
|
|
701
|
-
}
|
|
702
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
703
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
704
|
-
);
|
|
705
|
-
|
|
706
|
-
let interceptorPromise = authenticationPromise;
|
|
707
|
-
for (const interceptor of this.interceptors) {
|
|
708
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
709
|
-
interceptor(localVarRequestOptions)
|
|
710
|
-
);
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
return interceptorPromise.then(() => {
|
|
714
|
-
if (Object.keys(localVarFormParams).length) {
|
|
715
|
-
if (localVarUseFormData) {
|
|
716
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
717
|
-
} else {
|
|
718
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
return new Promise<{
|
|
722
|
-
response: http.IncomingMessage;
|
|
723
|
-
body: CreateValidationInWarehouse200Response;
|
|
724
|
-
}>((resolve, reject) => {
|
|
725
|
-
localVarRequest(
|
|
726
|
-
localVarRequestOptions,
|
|
727
|
-
(error, response, body) => {
|
|
728
|
-
if (error) {
|
|
729
|
-
reject(error);
|
|
730
|
-
} else {
|
|
731
|
-
if (
|
|
732
|
-
response.statusCode &&
|
|
733
|
-
response.statusCode >= 200 &&
|
|
734
|
-
response.statusCode <= 299
|
|
735
|
-
) {
|
|
736
|
-
body = ObjectSerializer.deserialize(
|
|
737
|
-
body,
|
|
738
|
-
'CreateValidationInWarehouse200Response'
|
|
739
|
-
);
|
|
740
|
-
resolve({ response: response, body: body });
|
|
741
|
-
} else {
|
|
742
|
-
reject(
|
|
743
|
-
new HttpError(
|
|
744
|
-
response,
|
|
745
|
-
body,
|
|
746
|
-
response.statusCode
|
|
747
|
-
)
|
|
748
|
-
);
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
}
|
|
752
|
-
);
|
|
753
|
-
});
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
/**
|
|
757
|
-
* Validates input settings against a Warehouse. When called, this endpoint may generate the `Storage Destination Settings Validation` [Audit Trail](/tag/Audit-Trail) event.
|
|
758
|
-
* @summary Create Validation in Warehouse
|
|
759
|
-
* @param CreateValidationInWarehouseV1Input
|
|
760
|
-
*/
|
|
761
|
-
public async createValidationInWarehouseBeta(
|
|
762
|
-
CreateValidationInWarehouseV1Input: CreateValidationInWarehouseV1Input,
|
|
763
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
764
|
-
): Promise<{
|
|
765
|
-
response: http.IncomingMessage;
|
|
766
|
-
body: CreateValidationInWarehouse200Response;
|
|
767
|
-
}> {
|
|
768
|
-
const localVarPath = this.basePath + '/warehouses/validation';
|
|
769
|
-
let localVarQueryParameters: any = {};
|
|
770
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
771
|
-
{},
|
|
772
|
-
this._defaultHeaders
|
|
773
|
-
);
|
|
774
|
-
const produces = [
|
|
775
|
-
'application/vnd.segment.v1beta+json',
|
|
776
|
-
'application/json',
|
|
777
|
-
];
|
|
778
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
779
|
-
localVarHeaderParams.Accept = produces[0];
|
|
780
|
-
} else {
|
|
781
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
782
|
-
}
|
|
783
|
-
let localVarFormParams: any = {};
|
|
784
|
-
|
|
785
|
-
// verify required parameter 'CreateValidationInWarehouseV1Input' is not null or undefined
|
|
786
|
-
if (
|
|
787
|
-
CreateValidationInWarehouseV1Input === null ||
|
|
788
|
-
CreateValidationInWarehouseV1Input === undefined
|
|
789
|
-
) {
|
|
790
|
-
throw new Error(
|
|
791
|
-
'Required parameter CreateValidationInWarehouseV1Input was null or undefined when calling createValidationInWarehouseBeta.'
|
|
792
|
-
);
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
796
|
-
|
|
797
|
-
let localVarUseFormData = false;
|
|
798
|
-
|
|
799
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
800
|
-
method: 'POST',
|
|
801
|
-
qs: localVarQueryParameters,
|
|
802
|
-
headers: localVarHeaderParams,
|
|
803
|
-
uri: localVarPath,
|
|
804
|
-
useQuerystring: this._useQuerystring,
|
|
805
|
-
json: true,
|
|
806
|
-
body: ObjectSerializer.serialize(
|
|
807
|
-
CreateValidationInWarehouseV1Input,
|
|
808
|
-
'CreateValidationInWarehouseV1Input'
|
|
809
|
-
),
|
|
810
|
-
};
|
|
811
|
-
|
|
812
|
-
let authenticationPromise = Promise.resolve();
|
|
813
|
-
if (this.authentications.token.accessToken) {
|
|
814
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
815
|
-
this.authentications.token.applyToRequest(
|
|
816
|
-
localVarRequestOptions
|
|
817
|
-
)
|
|
818
|
-
);
|
|
819
|
-
}
|
|
820
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
821
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
822
|
-
);
|
|
823
|
-
|
|
824
|
-
let interceptorPromise = authenticationPromise;
|
|
825
|
-
for (const interceptor of this.interceptors) {
|
|
826
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
827
|
-
interceptor(localVarRequestOptions)
|
|
828
|
-
);
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
return interceptorPromise.then(() => {
|
|
832
|
-
if (Object.keys(localVarFormParams).length) {
|
|
833
|
-
if (localVarUseFormData) {
|
|
834
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
835
|
-
} else {
|
|
836
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
return new Promise<{
|
|
840
|
-
response: http.IncomingMessage;
|
|
841
|
-
body: CreateValidationInWarehouse200Response;
|
|
842
|
-
}>((resolve, reject) => {
|
|
843
|
-
localVarRequest(
|
|
844
|
-
localVarRequestOptions,
|
|
845
|
-
(error, response, body) => {
|
|
846
|
-
if (error) {
|
|
847
|
-
reject(error);
|
|
848
|
-
} else {
|
|
849
|
-
if (
|
|
850
|
-
response.statusCode &&
|
|
851
|
-
response.statusCode >= 200 &&
|
|
852
|
-
response.statusCode <= 299
|
|
853
|
-
) {
|
|
854
|
-
body = ObjectSerializer.deserialize(
|
|
855
|
-
body,
|
|
856
|
-
'CreateValidationInWarehouse200Response'
|
|
857
|
-
);
|
|
858
|
-
resolve({ response: response, body: body });
|
|
859
|
-
} else {
|
|
860
|
-
reject(
|
|
861
|
-
new HttpError(
|
|
862
|
-
response,
|
|
863
|
-
body,
|
|
864
|
-
response.statusCode
|
|
865
|
-
)
|
|
866
|
-
);
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
);
|
|
871
|
-
});
|
|
872
|
-
});
|
|
873
|
-
}
|
|
874
|
-
/**
|
|
875
|
-
* Validates input settings against a Warehouse. When called, this endpoint may generate the `Storage Destination Settings Validation` [Audit Trail](/tag/Audit-Trail) event.
|
|
876
|
-
* @summary Create Validation in Warehouse
|
|
877
|
-
* @param CreateValidationInWarehouseV1Input
|
|
878
|
-
*/
|
|
879
|
-
public async createValidationInWarehouseCurrent(
|
|
880
|
-
CreateValidationInWarehouseV1Input: CreateValidationInWarehouseV1Input,
|
|
881
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
882
|
-
): Promise<{
|
|
883
|
-
response: http.IncomingMessage;
|
|
884
|
-
body: CreateValidationInWarehouse200Response;
|
|
885
|
-
}> {
|
|
886
|
-
const localVarPath = this.basePath + '/warehouses/validation';
|
|
887
|
-
let localVarQueryParameters: any = {};
|
|
888
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
889
|
-
{},
|
|
890
|
-
this._defaultHeaders
|
|
891
|
-
);
|
|
892
|
-
const produces = [
|
|
893
|
-
'application/vnd.segment.v1+json',
|
|
894
|
-
'application/json',
|
|
895
|
-
];
|
|
896
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
897
|
-
localVarHeaderParams.Accept = produces[0];
|
|
898
|
-
} else {
|
|
899
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
900
|
-
}
|
|
901
|
-
let localVarFormParams: any = {};
|
|
902
|
-
|
|
903
|
-
// verify required parameter 'CreateValidationInWarehouseV1Input' is not null or undefined
|
|
904
|
-
if (
|
|
905
|
-
CreateValidationInWarehouseV1Input === null ||
|
|
906
|
-
CreateValidationInWarehouseV1Input === undefined
|
|
907
|
-
) {
|
|
908
|
-
throw new Error(
|
|
909
|
-
'Required parameter CreateValidationInWarehouseV1Input was null or undefined when calling createValidationInWarehouseCurrent.'
|
|
910
|
-
);
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
914
|
-
|
|
915
|
-
let localVarUseFormData = false;
|
|
916
|
-
|
|
917
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
918
|
-
method: 'POST',
|
|
919
|
-
qs: localVarQueryParameters,
|
|
920
|
-
headers: localVarHeaderParams,
|
|
921
|
-
uri: localVarPath,
|
|
922
|
-
useQuerystring: this._useQuerystring,
|
|
923
|
-
json: true,
|
|
924
|
-
body: ObjectSerializer.serialize(
|
|
925
|
-
CreateValidationInWarehouseV1Input,
|
|
926
|
-
'CreateValidationInWarehouseV1Input'
|
|
927
|
-
),
|
|
928
|
-
};
|
|
929
|
-
|
|
930
|
-
let authenticationPromise = Promise.resolve();
|
|
931
|
-
if (this.authentications.token.accessToken) {
|
|
932
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
933
|
-
this.authentications.token.applyToRequest(
|
|
934
|
-
localVarRequestOptions
|
|
935
|
-
)
|
|
936
|
-
);
|
|
937
|
-
}
|
|
938
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
939
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
940
|
-
);
|
|
941
|
-
|
|
942
|
-
let interceptorPromise = authenticationPromise;
|
|
943
|
-
for (const interceptor of this.interceptors) {
|
|
944
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
945
|
-
interceptor(localVarRequestOptions)
|
|
946
|
-
);
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
return interceptorPromise.then(() => {
|
|
950
|
-
if (Object.keys(localVarFormParams).length) {
|
|
951
|
-
if (localVarUseFormData) {
|
|
952
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
953
|
-
} else {
|
|
954
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
return new Promise<{
|
|
958
|
-
response: http.IncomingMessage;
|
|
959
|
-
body: CreateValidationInWarehouse200Response;
|
|
960
|
-
}>((resolve, reject) => {
|
|
961
|
-
localVarRequest(
|
|
962
|
-
localVarRequestOptions,
|
|
963
|
-
(error, response, body) => {
|
|
964
|
-
if (error) {
|
|
965
|
-
reject(error);
|
|
966
|
-
} else {
|
|
967
|
-
if (
|
|
968
|
-
response.statusCode &&
|
|
969
|
-
response.statusCode >= 200 &&
|
|
970
|
-
response.statusCode <= 299
|
|
971
|
-
) {
|
|
972
|
-
body = ObjectSerializer.deserialize(
|
|
973
|
-
body,
|
|
974
|
-
'CreateValidationInWarehouse200Response'
|
|
975
|
-
);
|
|
976
|
-
resolve({ response: response, body: body });
|
|
977
|
-
} else {
|
|
978
|
-
reject(
|
|
979
|
-
new HttpError(
|
|
980
|
-
response,
|
|
981
|
-
body,
|
|
982
|
-
response.statusCode
|
|
983
|
-
)
|
|
984
|
-
);
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
);
|
|
989
|
-
});
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
/**
|
|
993
|
-
* Validates input settings against a Warehouse. When called, this endpoint may generate the `Storage Destination Settings Validation` [Audit Trail](/tag/Audit-Trail) event.
|
|
994
|
-
* @summary Create Validation in Warehouse
|
|
995
|
-
* @param CreateValidationInWarehouseV1Input
|
|
996
|
-
*/
|
|
997
|
-
public async createValidationInWarehouseV1(
|
|
998
|
-
CreateValidationInWarehouseV1Input: CreateValidationInWarehouseV1Input,
|
|
999
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1000
|
-
): Promise<{
|
|
1001
|
-
response: http.IncomingMessage;
|
|
1002
|
-
body: CreateValidationInWarehouse200Response;
|
|
1003
|
-
}> {
|
|
1004
|
-
const localVarPath = this.basePath + '/warehouses/validation';
|
|
1005
|
-
let localVarQueryParameters: any = {};
|
|
1006
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1007
|
-
{},
|
|
1008
|
-
this._defaultHeaders
|
|
1009
|
-
);
|
|
1010
|
-
const produces = [
|
|
1011
|
-
'application/vnd.segment.v1+json',
|
|
1012
|
-
'application/json',
|
|
1013
|
-
];
|
|
1014
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1015
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1016
|
-
} else {
|
|
1017
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1018
|
-
}
|
|
1019
|
-
let localVarFormParams: any = {};
|
|
1020
|
-
|
|
1021
|
-
// verify required parameter 'CreateValidationInWarehouseV1Input' is not null or undefined
|
|
1022
|
-
if (
|
|
1023
|
-
CreateValidationInWarehouseV1Input === null ||
|
|
1024
|
-
CreateValidationInWarehouseV1Input === undefined
|
|
1025
|
-
) {
|
|
1026
|
-
throw new Error(
|
|
1027
|
-
'Required parameter CreateValidationInWarehouseV1Input was null or undefined when calling createValidationInWarehouseV1.'
|
|
1028
|
-
);
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1032
|
-
|
|
1033
|
-
let localVarUseFormData = false;
|
|
1034
|
-
|
|
1035
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1036
|
-
method: 'POST',
|
|
1037
|
-
qs: localVarQueryParameters,
|
|
1038
|
-
headers: localVarHeaderParams,
|
|
1039
|
-
uri: localVarPath,
|
|
1040
|
-
useQuerystring: this._useQuerystring,
|
|
1041
|
-
json: true,
|
|
1042
|
-
body: ObjectSerializer.serialize(
|
|
1043
|
-
CreateValidationInWarehouseV1Input,
|
|
1044
|
-
'CreateValidationInWarehouseV1Input'
|
|
1045
|
-
),
|
|
1046
|
-
};
|
|
1047
|
-
|
|
1048
|
-
let authenticationPromise = Promise.resolve();
|
|
1049
|
-
if (this.authentications.token.accessToken) {
|
|
1050
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1051
|
-
this.authentications.token.applyToRequest(
|
|
1052
|
-
localVarRequestOptions
|
|
1053
|
-
)
|
|
1054
|
-
);
|
|
1055
|
-
}
|
|
1056
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1057
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1058
|
-
);
|
|
1059
|
-
|
|
1060
|
-
let interceptorPromise = authenticationPromise;
|
|
1061
|
-
for (const interceptor of this.interceptors) {
|
|
1062
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1063
|
-
interceptor(localVarRequestOptions)
|
|
1064
|
-
);
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
return interceptorPromise.then(() => {
|
|
1068
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1069
|
-
if (localVarUseFormData) {
|
|
1070
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1071
|
-
} else {
|
|
1072
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
return new Promise<{
|
|
1076
|
-
response: http.IncomingMessage;
|
|
1077
|
-
body: CreateValidationInWarehouse200Response;
|
|
1078
|
-
}>((resolve, reject) => {
|
|
1079
|
-
localVarRequest(
|
|
1080
|
-
localVarRequestOptions,
|
|
1081
|
-
(error, response, body) => {
|
|
1082
|
-
if (error) {
|
|
1083
|
-
reject(error);
|
|
1084
|
-
} else {
|
|
1085
|
-
if (
|
|
1086
|
-
response.statusCode &&
|
|
1087
|
-
response.statusCode >= 200 &&
|
|
1088
|
-
response.statusCode <= 299
|
|
1089
|
-
) {
|
|
1090
|
-
body = ObjectSerializer.deserialize(
|
|
1091
|
-
body,
|
|
1092
|
-
'CreateValidationInWarehouse200Response'
|
|
1093
|
-
);
|
|
1094
|
-
resolve({ response: response, body: body });
|
|
1095
|
-
} else {
|
|
1096
|
-
reject(
|
|
1097
|
-
new HttpError(
|
|
1098
|
-
response,
|
|
1099
|
-
body,
|
|
1100
|
-
response.statusCode
|
|
1101
|
-
)
|
|
1102
|
-
);
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
);
|
|
1107
|
-
});
|
|
1108
|
-
});
|
|
1109
|
-
}
|
|
1110
|
-
/**
|
|
1111
|
-
* Creates a new Warehouse. When called, this endpoint may generate the `Storage Destination Created` [Audit Trail](/tag/Audit-Trail) event.
|
|
1112
|
-
* @summary Create Warehouse
|
|
1113
|
-
* @param CreateWarehouseV1Input
|
|
1114
|
-
*/
|
|
1115
|
-
public async createWarehouseAlpha(
|
|
1116
|
-
CreateWarehouseV1Input: CreateWarehouseV1Input,
|
|
1117
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1118
|
-
): Promise<{
|
|
1119
|
-
response: http.IncomingMessage;
|
|
1120
|
-
body: CreateWarehouse200Response;
|
|
1121
|
-
}> {
|
|
1122
|
-
const localVarPath = this.basePath + '/warehouses';
|
|
1123
|
-
let localVarQueryParameters: any = {};
|
|
1124
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1125
|
-
{},
|
|
1126
|
-
this._defaultHeaders
|
|
1127
|
-
);
|
|
1128
|
-
const produces = [
|
|
1129
|
-
'application/vnd.segment.v1alpha+json',
|
|
1130
|
-
'application/json',
|
|
1131
|
-
];
|
|
1132
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1133
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1134
|
-
} else {
|
|
1135
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1136
|
-
}
|
|
1137
|
-
let localVarFormParams: any = {};
|
|
1138
|
-
|
|
1139
|
-
// verify required parameter 'CreateWarehouseV1Input' is not null or undefined
|
|
1140
|
-
if (
|
|
1141
|
-
CreateWarehouseV1Input === null ||
|
|
1142
|
-
CreateWarehouseV1Input === undefined
|
|
1143
|
-
) {
|
|
1144
|
-
throw new Error(
|
|
1145
|
-
'Required parameter CreateWarehouseV1Input was null or undefined when calling createWarehouseAlpha.'
|
|
1146
|
-
);
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1150
|
-
|
|
1151
|
-
let localVarUseFormData = false;
|
|
1152
|
-
|
|
1153
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1154
|
-
method: 'POST',
|
|
1155
|
-
qs: localVarQueryParameters,
|
|
1156
|
-
headers: localVarHeaderParams,
|
|
1157
|
-
uri: localVarPath,
|
|
1158
|
-
useQuerystring: this._useQuerystring,
|
|
1159
|
-
json: true,
|
|
1160
|
-
body: ObjectSerializer.serialize(
|
|
1161
|
-
CreateWarehouseV1Input,
|
|
1162
|
-
'CreateWarehouseV1Input'
|
|
1163
|
-
),
|
|
1164
|
-
};
|
|
1165
|
-
|
|
1166
|
-
let authenticationPromise = Promise.resolve();
|
|
1167
|
-
if (this.authentications.token.accessToken) {
|
|
1168
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1169
|
-
this.authentications.token.applyToRequest(
|
|
1170
|
-
localVarRequestOptions
|
|
1171
|
-
)
|
|
1172
|
-
);
|
|
1173
|
-
}
|
|
1174
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1175
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1176
|
-
);
|
|
1177
|
-
|
|
1178
|
-
let interceptorPromise = authenticationPromise;
|
|
1179
|
-
for (const interceptor of this.interceptors) {
|
|
1180
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1181
|
-
interceptor(localVarRequestOptions)
|
|
1182
|
-
);
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
return interceptorPromise.then(() => {
|
|
1186
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1187
|
-
if (localVarUseFormData) {
|
|
1188
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1189
|
-
} else {
|
|
1190
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
return new Promise<{
|
|
1194
|
-
response: http.IncomingMessage;
|
|
1195
|
-
body: CreateWarehouse200Response;
|
|
1196
|
-
}>((resolve, reject) => {
|
|
1197
|
-
localVarRequest(
|
|
1198
|
-
localVarRequestOptions,
|
|
1199
|
-
(error, response, body) => {
|
|
1200
|
-
if (error) {
|
|
1201
|
-
reject(error);
|
|
1202
|
-
} else {
|
|
1203
|
-
if (
|
|
1204
|
-
response.statusCode &&
|
|
1205
|
-
response.statusCode >= 200 &&
|
|
1206
|
-
response.statusCode <= 299
|
|
1207
|
-
) {
|
|
1208
|
-
body = ObjectSerializer.deserialize(
|
|
1209
|
-
body,
|
|
1210
|
-
'CreateWarehouse200Response'
|
|
1211
|
-
);
|
|
1212
|
-
resolve({ response: response, body: body });
|
|
1213
|
-
} else {
|
|
1214
|
-
reject(
|
|
1215
|
-
new HttpError(
|
|
1216
|
-
response,
|
|
1217
|
-
body,
|
|
1218
|
-
response.statusCode
|
|
1219
|
-
)
|
|
1220
|
-
);
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
);
|
|
1225
|
-
});
|
|
1226
|
-
});
|
|
1227
|
-
}
|
|
1228
|
-
/**
|
|
1229
|
-
* Creates a new Warehouse. When called, this endpoint may generate the `Storage Destination Created` [Audit Trail](/tag/Audit-Trail) event.
|
|
1230
|
-
* @summary Create Warehouse
|
|
1231
|
-
* @param CreateWarehouseV1Input
|
|
1232
|
-
*/
|
|
1233
|
-
public async createWarehouseBeta(
|
|
1234
|
-
CreateWarehouseV1Input: CreateWarehouseV1Input,
|
|
1235
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1236
|
-
): Promise<{
|
|
1237
|
-
response: http.IncomingMessage;
|
|
1238
|
-
body: CreateWarehouse200Response;
|
|
1239
|
-
}> {
|
|
1240
|
-
const localVarPath = this.basePath + '/warehouses';
|
|
1241
|
-
let localVarQueryParameters: any = {};
|
|
1242
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1243
|
-
{},
|
|
1244
|
-
this._defaultHeaders
|
|
1245
|
-
);
|
|
1246
|
-
const produces = [
|
|
1247
|
-
'application/vnd.segment.v1beta+json',
|
|
1248
|
-
'application/json',
|
|
1249
|
-
];
|
|
1250
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1251
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1252
|
-
} else {
|
|
1253
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1254
|
-
}
|
|
1255
|
-
let localVarFormParams: any = {};
|
|
1256
|
-
|
|
1257
|
-
// verify required parameter 'CreateWarehouseV1Input' is not null or undefined
|
|
1258
|
-
if (
|
|
1259
|
-
CreateWarehouseV1Input === null ||
|
|
1260
|
-
CreateWarehouseV1Input === undefined
|
|
1261
|
-
) {
|
|
1262
|
-
throw new Error(
|
|
1263
|
-
'Required parameter CreateWarehouseV1Input was null or undefined when calling createWarehouseBeta.'
|
|
1264
|
-
);
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1268
|
-
|
|
1269
|
-
let localVarUseFormData = false;
|
|
1270
|
-
|
|
1271
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1272
|
-
method: 'POST',
|
|
1273
|
-
qs: localVarQueryParameters,
|
|
1274
|
-
headers: localVarHeaderParams,
|
|
1275
|
-
uri: localVarPath,
|
|
1276
|
-
useQuerystring: this._useQuerystring,
|
|
1277
|
-
json: true,
|
|
1278
|
-
body: ObjectSerializer.serialize(
|
|
1279
|
-
CreateWarehouseV1Input,
|
|
1280
|
-
'CreateWarehouseV1Input'
|
|
1281
|
-
),
|
|
1282
|
-
};
|
|
1283
|
-
|
|
1284
|
-
let authenticationPromise = Promise.resolve();
|
|
1285
|
-
if (this.authentications.token.accessToken) {
|
|
1286
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1287
|
-
this.authentications.token.applyToRequest(
|
|
1288
|
-
localVarRequestOptions
|
|
1289
|
-
)
|
|
1290
|
-
);
|
|
1291
|
-
}
|
|
1292
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1293
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1294
|
-
);
|
|
1295
|
-
|
|
1296
|
-
let interceptorPromise = authenticationPromise;
|
|
1297
|
-
for (const interceptor of this.interceptors) {
|
|
1298
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1299
|
-
interceptor(localVarRequestOptions)
|
|
1300
|
-
);
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
return interceptorPromise.then(() => {
|
|
1304
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1305
|
-
if (localVarUseFormData) {
|
|
1306
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1307
|
-
} else {
|
|
1308
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
return new Promise<{
|
|
1312
|
-
response: http.IncomingMessage;
|
|
1313
|
-
body: CreateWarehouse200Response;
|
|
1314
|
-
}>((resolve, reject) => {
|
|
1315
|
-
localVarRequest(
|
|
1316
|
-
localVarRequestOptions,
|
|
1317
|
-
(error, response, body) => {
|
|
1318
|
-
if (error) {
|
|
1319
|
-
reject(error);
|
|
1320
|
-
} else {
|
|
1321
|
-
if (
|
|
1322
|
-
response.statusCode &&
|
|
1323
|
-
response.statusCode >= 200 &&
|
|
1324
|
-
response.statusCode <= 299
|
|
1325
|
-
) {
|
|
1326
|
-
body = ObjectSerializer.deserialize(
|
|
1327
|
-
body,
|
|
1328
|
-
'CreateWarehouse200Response'
|
|
1329
|
-
);
|
|
1330
|
-
resolve({ response: response, body: body });
|
|
1331
|
-
} else {
|
|
1332
|
-
reject(
|
|
1333
|
-
new HttpError(
|
|
1334
|
-
response,
|
|
1335
|
-
body,
|
|
1336
|
-
response.statusCode
|
|
1337
|
-
)
|
|
1338
|
-
);
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
);
|
|
1343
|
-
});
|
|
1344
|
-
});
|
|
1345
|
-
}
|
|
1346
|
-
/**
|
|
1347
|
-
* Creates a new Warehouse. When called, this endpoint may generate the `Storage Destination Created` [Audit Trail](/tag/Audit-Trail) event.
|
|
1348
|
-
* @summary Create Warehouse
|
|
1349
|
-
* @param CreateWarehouseV1Input
|
|
1350
|
-
*/
|
|
1351
|
-
public async createWarehouseCurrent(
|
|
1352
|
-
CreateWarehouseV1Input: CreateWarehouseV1Input,
|
|
1353
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1354
|
-
): Promise<{
|
|
1355
|
-
response: http.IncomingMessage;
|
|
1356
|
-
body: CreateWarehouse200Response;
|
|
1357
|
-
}> {
|
|
1358
|
-
const localVarPath = this.basePath + '/warehouses';
|
|
1359
|
-
let localVarQueryParameters: any = {};
|
|
1360
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1361
|
-
{},
|
|
1362
|
-
this._defaultHeaders
|
|
1363
|
-
);
|
|
1364
|
-
const produces = [
|
|
1365
|
-
'application/vnd.segment.v1+json',
|
|
1366
|
-
'application/json',
|
|
1367
|
-
];
|
|
1368
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1369
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1370
|
-
} else {
|
|
1371
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1372
|
-
}
|
|
1373
|
-
let localVarFormParams: any = {};
|
|
1374
|
-
|
|
1375
|
-
// verify required parameter 'CreateWarehouseV1Input' is not null or undefined
|
|
1376
|
-
if (
|
|
1377
|
-
CreateWarehouseV1Input === null ||
|
|
1378
|
-
CreateWarehouseV1Input === undefined
|
|
1379
|
-
) {
|
|
1380
|
-
throw new Error(
|
|
1381
|
-
'Required parameter CreateWarehouseV1Input was null or undefined when calling createWarehouseCurrent.'
|
|
1382
|
-
);
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1386
|
-
|
|
1387
|
-
let localVarUseFormData = false;
|
|
1388
|
-
|
|
1389
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1390
|
-
method: 'POST',
|
|
1391
|
-
qs: localVarQueryParameters,
|
|
1392
|
-
headers: localVarHeaderParams,
|
|
1393
|
-
uri: localVarPath,
|
|
1394
|
-
useQuerystring: this._useQuerystring,
|
|
1395
|
-
json: true,
|
|
1396
|
-
body: ObjectSerializer.serialize(
|
|
1397
|
-
CreateWarehouseV1Input,
|
|
1398
|
-
'CreateWarehouseV1Input'
|
|
1399
|
-
),
|
|
1400
|
-
};
|
|
1401
|
-
|
|
1402
|
-
let authenticationPromise = Promise.resolve();
|
|
1403
|
-
if (this.authentications.token.accessToken) {
|
|
1404
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1405
|
-
this.authentications.token.applyToRequest(
|
|
1406
|
-
localVarRequestOptions
|
|
1407
|
-
)
|
|
1408
|
-
);
|
|
1409
|
-
}
|
|
1410
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1411
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1412
|
-
);
|
|
1413
|
-
|
|
1414
|
-
let interceptorPromise = authenticationPromise;
|
|
1415
|
-
for (const interceptor of this.interceptors) {
|
|
1416
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1417
|
-
interceptor(localVarRequestOptions)
|
|
1418
|
-
);
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
return interceptorPromise.then(() => {
|
|
1422
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1423
|
-
if (localVarUseFormData) {
|
|
1424
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1425
|
-
} else {
|
|
1426
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
return new Promise<{
|
|
1430
|
-
response: http.IncomingMessage;
|
|
1431
|
-
body: CreateWarehouse200Response;
|
|
1432
|
-
}>((resolve, reject) => {
|
|
1433
|
-
localVarRequest(
|
|
1434
|
-
localVarRequestOptions,
|
|
1435
|
-
(error, response, body) => {
|
|
1436
|
-
if (error) {
|
|
1437
|
-
reject(error);
|
|
1438
|
-
} else {
|
|
1439
|
-
if (
|
|
1440
|
-
response.statusCode &&
|
|
1441
|
-
response.statusCode >= 200 &&
|
|
1442
|
-
response.statusCode <= 299
|
|
1443
|
-
) {
|
|
1444
|
-
body = ObjectSerializer.deserialize(
|
|
1445
|
-
body,
|
|
1446
|
-
'CreateWarehouse200Response'
|
|
1447
|
-
);
|
|
1448
|
-
resolve({ response: response, body: body });
|
|
1449
|
-
} else {
|
|
1450
|
-
reject(
|
|
1451
|
-
new HttpError(
|
|
1452
|
-
response,
|
|
1453
|
-
body,
|
|
1454
|
-
response.statusCode
|
|
1455
|
-
)
|
|
1456
|
-
);
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
);
|
|
1461
|
-
});
|
|
1462
|
-
});
|
|
1463
|
-
}
|
|
1464
|
-
/**
|
|
1465
|
-
* Creates a new Warehouse. When called, this endpoint may generate the `Storage Destination Created` [Audit Trail](/tag/Audit-Trail) event.
|
|
1466
|
-
* @summary Create Warehouse
|
|
1467
|
-
* @param CreateWarehouseV1Input
|
|
1468
|
-
*/
|
|
1469
|
-
public async createWarehouseV1(
|
|
1470
|
-
CreateWarehouseV1Input: CreateWarehouseV1Input,
|
|
1471
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1472
|
-
): Promise<{
|
|
1473
|
-
response: http.IncomingMessage;
|
|
1474
|
-
body: CreateWarehouse200Response;
|
|
1475
|
-
}> {
|
|
1476
|
-
const localVarPath = this.basePath + '/warehouses';
|
|
1477
|
-
let localVarQueryParameters: any = {};
|
|
1478
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1479
|
-
{},
|
|
1480
|
-
this._defaultHeaders
|
|
1481
|
-
);
|
|
1482
|
-
const produces = [
|
|
1483
|
-
'application/vnd.segment.v1+json',
|
|
1484
|
-
'application/json',
|
|
1485
|
-
];
|
|
1486
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1487
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1488
|
-
} else {
|
|
1489
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1490
|
-
}
|
|
1491
|
-
let localVarFormParams: any = {};
|
|
1492
|
-
|
|
1493
|
-
// verify required parameter 'CreateWarehouseV1Input' is not null or undefined
|
|
1494
|
-
if (
|
|
1495
|
-
CreateWarehouseV1Input === null ||
|
|
1496
|
-
CreateWarehouseV1Input === undefined
|
|
1497
|
-
) {
|
|
1498
|
-
throw new Error(
|
|
1499
|
-
'Required parameter CreateWarehouseV1Input was null or undefined when calling createWarehouseV1.'
|
|
1500
|
-
);
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1504
|
-
|
|
1505
|
-
let localVarUseFormData = false;
|
|
1506
|
-
|
|
1507
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1508
|
-
method: 'POST',
|
|
1509
|
-
qs: localVarQueryParameters,
|
|
1510
|
-
headers: localVarHeaderParams,
|
|
1511
|
-
uri: localVarPath,
|
|
1512
|
-
useQuerystring: this._useQuerystring,
|
|
1513
|
-
json: true,
|
|
1514
|
-
body: ObjectSerializer.serialize(
|
|
1515
|
-
CreateWarehouseV1Input,
|
|
1516
|
-
'CreateWarehouseV1Input'
|
|
1517
|
-
),
|
|
1518
|
-
};
|
|
1519
|
-
|
|
1520
|
-
let authenticationPromise = Promise.resolve();
|
|
1521
|
-
if (this.authentications.token.accessToken) {
|
|
1522
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1523
|
-
this.authentications.token.applyToRequest(
|
|
1524
|
-
localVarRequestOptions
|
|
1525
|
-
)
|
|
1526
|
-
);
|
|
1527
|
-
}
|
|
1528
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1529
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1530
|
-
);
|
|
1531
|
-
|
|
1532
|
-
let interceptorPromise = authenticationPromise;
|
|
1533
|
-
for (const interceptor of this.interceptors) {
|
|
1534
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1535
|
-
interceptor(localVarRequestOptions)
|
|
1536
|
-
);
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
return interceptorPromise.then(() => {
|
|
1540
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1541
|
-
if (localVarUseFormData) {
|
|
1542
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1543
|
-
} else {
|
|
1544
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
return new Promise<{
|
|
1548
|
-
response: http.IncomingMessage;
|
|
1549
|
-
body: CreateWarehouse200Response;
|
|
1550
|
-
}>((resolve, reject) => {
|
|
1551
|
-
localVarRequest(
|
|
1552
|
-
localVarRequestOptions,
|
|
1553
|
-
(error, response, body) => {
|
|
1554
|
-
if (error) {
|
|
1555
|
-
reject(error);
|
|
1556
|
-
} else {
|
|
1557
|
-
if (
|
|
1558
|
-
response.statusCode &&
|
|
1559
|
-
response.statusCode >= 200 &&
|
|
1560
|
-
response.statusCode <= 299
|
|
1561
|
-
) {
|
|
1562
|
-
body = ObjectSerializer.deserialize(
|
|
1563
|
-
body,
|
|
1564
|
-
'CreateWarehouse200Response'
|
|
1565
|
-
);
|
|
1566
|
-
resolve({ response: response, body: body });
|
|
1567
|
-
} else {
|
|
1568
|
-
reject(
|
|
1569
|
-
new HttpError(
|
|
1570
|
-
response,
|
|
1571
|
-
body,
|
|
1572
|
-
response.statusCode
|
|
1573
|
-
)
|
|
1574
|
-
);
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
);
|
|
1579
|
-
});
|
|
1580
|
-
});
|
|
1581
|
-
}
|
|
1582
|
-
/**
|
|
1583
|
-
* Deletes an existing Warehouse. When called, this endpoint may generate the `Storage Destination Deleted` [Audit Trail](/tag/Audit-Trail) event.
|
|
1584
|
-
* @summary Delete Warehouse
|
|
1585
|
-
* @param warehouseId
|
|
1586
|
-
*/
|
|
1587
|
-
public async deleteWarehouseAlpha(
|
|
1588
|
-
warehouseId: string,
|
|
1589
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1590
|
-
): Promise<{
|
|
1591
|
-
response: http.IncomingMessage;
|
|
1592
|
-
body: DeleteWarehouse200Response;
|
|
1593
|
-
}> {
|
|
1594
|
-
const localVarPath =
|
|
1595
|
-
this.basePath +
|
|
1596
|
-
'/warehouses/{warehouseId}'.replace(
|
|
1597
|
-
'{' + 'warehouseId' + '}',
|
|
1598
|
-
encodeURIComponent(String(warehouseId))
|
|
1599
|
-
);
|
|
1600
|
-
let localVarQueryParameters: any = {};
|
|
1601
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1602
|
-
{},
|
|
1603
|
-
this._defaultHeaders
|
|
1604
|
-
);
|
|
1605
|
-
const produces = [
|
|
1606
|
-
'application/vnd.segment.v1alpha+json',
|
|
1607
|
-
'application/json',
|
|
1608
|
-
];
|
|
1609
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1610
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1611
|
-
} else {
|
|
1612
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1613
|
-
}
|
|
1614
|
-
let localVarFormParams: any = {};
|
|
1615
|
-
|
|
1616
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
1617
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1618
|
-
throw new Error(
|
|
1619
|
-
'Required parameter warehouseId was null or undefined when calling deleteWarehouseAlpha.'
|
|
1620
|
-
);
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1624
|
-
|
|
1625
|
-
let localVarUseFormData = false;
|
|
1626
|
-
|
|
1627
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1628
|
-
method: 'DELETE',
|
|
1629
|
-
qs: localVarQueryParameters,
|
|
1630
|
-
headers: localVarHeaderParams,
|
|
1631
|
-
uri: localVarPath,
|
|
1632
|
-
useQuerystring: this._useQuerystring,
|
|
1633
|
-
json: true,
|
|
1634
|
-
};
|
|
1635
|
-
|
|
1636
|
-
let authenticationPromise = Promise.resolve();
|
|
1637
|
-
if (this.authentications.token.accessToken) {
|
|
1638
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1639
|
-
this.authentications.token.applyToRequest(
|
|
1640
|
-
localVarRequestOptions
|
|
1641
|
-
)
|
|
1642
|
-
);
|
|
1643
|
-
}
|
|
1644
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1645
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1646
|
-
);
|
|
1647
|
-
|
|
1648
|
-
let interceptorPromise = authenticationPromise;
|
|
1649
|
-
for (const interceptor of this.interceptors) {
|
|
1650
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1651
|
-
interceptor(localVarRequestOptions)
|
|
1652
|
-
);
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
return interceptorPromise.then(() => {
|
|
1656
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1657
|
-
if (localVarUseFormData) {
|
|
1658
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1659
|
-
} else {
|
|
1660
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
return new Promise<{
|
|
1664
|
-
response: http.IncomingMessage;
|
|
1665
|
-
body: DeleteWarehouse200Response;
|
|
1666
|
-
}>((resolve, reject) => {
|
|
1667
|
-
localVarRequest(
|
|
1668
|
-
localVarRequestOptions,
|
|
1669
|
-
(error, response, body) => {
|
|
1670
|
-
if (error) {
|
|
1671
|
-
reject(error);
|
|
1672
|
-
} else {
|
|
1673
|
-
if (
|
|
1674
|
-
response.statusCode &&
|
|
1675
|
-
response.statusCode >= 200 &&
|
|
1676
|
-
response.statusCode <= 299
|
|
1677
|
-
) {
|
|
1678
|
-
body = ObjectSerializer.deserialize(
|
|
1679
|
-
body,
|
|
1680
|
-
'DeleteWarehouse200Response'
|
|
1681
|
-
);
|
|
1682
|
-
resolve({ response: response, body: body });
|
|
1683
|
-
} else {
|
|
1684
|
-
reject(
|
|
1685
|
-
new HttpError(
|
|
1686
|
-
response,
|
|
1687
|
-
body,
|
|
1688
|
-
response.statusCode
|
|
1689
|
-
)
|
|
1690
|
-
);
|
|
1691
|
-
}
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
);
|
|
1695
|
-
});
|
|
1696
|
-
});
|
|
1697
|
-
}
|
|
1698
|
-
/**
|
|
1699
|
-
* Deletes an existing Warehouse. When called, this endpoint may generate the `Storage Destination Deleted` [Audit Trail](/tag/Audit-Trail) event.
|
|
1700
|
-
* @summary Delete Warehouse
|
|
1701
|
-
* @param warehouseId
|
|
1702
|
-
*/
|
|
1703
|
-
public async deleteWarehouseBeta(
|
|
1704
|
-
warehouseId: string,
|
|
1705
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1706
|
-
): Promise<{
|
|
1707
|
-
response: http.IncomingMessage;
|
|
1708
|
-
body: DeleteWarehouse200Response;
|
|
1709
|
-
}> {
|
|
1710
|
-
const localVarPath =
|
|
1711
|
-
this.basePath +
|
|
1712
|
-
'/warehouses/{warehouseId}'.replace(
|
|
1713
|
-
'{' + 'warehouseId' + '}',
|
|
1714
|
-
encodeURIComponent(String(warehouseId))
|
|
1715
|
-
);
|
|
1716
|
-
let localVarQueryParameters: any = {};
|
|
1717
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1718
|
-
{},
|
|
1719
|
-
this._defaultHeaders
|
|
1720
|
-
);
|
|
1721
|
-
const produces = [
|
|
1722
|
-
'application/vnd.segment.v1beta+json',
|
|
1723
|
-
'application/json',
|
|
1724
|
-
];
|
|
1725
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1726
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1727
|
-
} else {
|
|
1728
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1729
|
-
}
|
|
1730
|
-
let localVarFormParams: any = {};
|
|
1731
|
-
|
|
1732
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
1733
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1734
|
-
throw new Error(
|
|
1735
|
-
'Required parameter warehouseId was null or undefined when calling deleteWarehouseBeta.'
|
|
1736
|
-
);
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1740
|
-
|
|
1741
|
-
let localVarUseFormData = false;
|
|
1742
|
-
|
|
1743
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1744
|
-
method: 'DELETE',
|
|
1745
|
-
qs: localVarQueryParameters,
|
|
1746
|
-
headers: localVarHeaderParams,
|
|
1747
|
-
uri: localVarPath,
|
|
1748
|
-
useQuerystring: this._useQuerystring,
|
|
1749
|
-
json: true,
|
|
1750
|
-
};
|
|
1751
|
-
|
|
1752
|
-
let authenticationPromise = Promise.resolve();
|
|
1753
|
-
if (this.authentications.token.accessToken) {
|
|
1754
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1755
|
-
this.authentications.token.applyToRequest(
|
|
1756
|
-
localVarRequestOptions
|
|
1757
|
-
)
|
|
1758
|
-
);
|
|
1759
|
-
}
|
|
1760
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1761
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1762
|
-
);
|
|
1763
|
-
|
|
1764
|
-
let interceptorPromise = authenticationPromise;
|
|
1765
|
-
for (const interceptor of this.interceptors) {
|
|
1766
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1767
|
-
interceptor(localVarRequestOptions)
|
|
1768
|
-
);
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
return interceptorPromise.then(() => {
|
|
1772
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1773
|
-
if (localVarUseFormData) {
|
|
1774
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1775
|
-
} else {
|
|
1776
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
|
-
return new Promise<{
|
|
1780
|
-
response: http.IncomingMessage;
|
|
1781
|
-
body: DeleteWarehouse200Response;
|
|
1782
|
-
}>((resolve, reject) => {
|
|
1783
|
-
localVarRequest(
|
|
1784
|
-
localVarRequestOptions,
|
|
1785
|
-
(error, response, body) => {
|
|
1786
|
-
if (error) {
|
|
1787
|
-
reject(error);
|
|
1788
|
-
} else {
|
|
1789
|
-
if (
|
|
1790
|
-
response.statusCode &&
|
|
1791
|
-
response.statusCode >= 200 &&
|
|
1792
|
-
response.statusCode <= 299
|
|
1793
|
-
) {
|
|
1794
|
-
body = ObjectSerializer.deserialize(
|
|
1795
|
-
body,
|
|
1796
|
-
'DeleteWarehouse200Response'
|
|
1797
|
-
);
|
|
1798
|
-
resolve({ response: response, body: body });
|
|
1799
|
-
} else {
|
|
1800
|
-
reject(
|
|
1801
|
-
new HttpError(
|
|
1802
|
-
response,
|
|
1803
|
-
body,
|
|
1804
|
-
response.statusCode
|
|
1805
|
-
)
|
|
1806
|
-
);
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
}
|
|
1810
|
-
);
|
|
1811
|
-
});
|
|
1812
|
-
});
|
|
1813
|
-
}
|
|
1814
|
-
/**
|
|
1815
|
-
* Deletes an existing Warehouse. When called, this endpoint may generate the `Storage Destination Deleted` [Audit Trail](/tag/Audit-Trail) event.
|
|
1816
|
-
* @summary Delete Warehouse
|
|
1817
|
-
* @param warehouseId
|
|
1818
|
-
*/
|
|
1819
|
-
public async deleteWarehouseCurrent(
|
|
1820
|
-
warehouseId: string,
|
|
1821
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1822
|
-
): Promise<{
|
|
1823
|
-
response: http.IncomingMessage;
|
|
1824
|
-
body: DeleteWarehouse200Response;
|
|
1825
|
-
}> {
|
|
1826
|
-
const localVarPath =
|
|
1827
|
-
this.basePath +
|
|
1828
|
-
'/warehouses/{warehouseId}'.replace(
|
|
1829
|
-
'{' + 'warehouseId' + '}',
|
|
1830
|
-
encodeURIComponent(String(warehouseId))
|
|
1831
|
-
);
|
|
1832
|
-
let localVarQueryParameters: any = {};
|
|
1833
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1834
|
-
{},
|
|
1835
|
-
this._defaultHeaders
|
|
1836
|
-
);
|
|
1837
|
-
const produces = ['application/json'];
|
|
1838
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1839
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1840
|
-
} else {
|
|
1841
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1842
|
-
}
|
|
1843
|
-
let localVarFormParams: any = {};
|
|
1844
|
-
|
|
1845
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
1846
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1847
|
-
throw new Error(
|
|
1848
|
-
'Required parameter warehouseId was null or undefined when calling deleteWarehouseCurrent.'
|
|
1849
|
-
);
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1853
|
-
|
|
1854
|
-
let localVarUseFormData = false;
|
|
1855
|
-
|
|
1856
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1857
|
-
method: 'DELETE',
|
|
1858
|
-
qs: localVarQueryParameters,
|
|
1859
|
-
headers: localVarHeaderParams,
|
|
1860
|
-
uri: localVarPath,
|
|
1861
|
-
useQuerystring: this._useQuerystring,
|
|
1862
|
-
json: true,
|
|
1863
|
-
};
|
|
1864
|
-
|
|
1865
|
-
let authenticationPromise = Promise.resolve();
|
|
1866
|
-
if (this.authentications.token.accessToken) {
|
|
1867
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1868
|
-
this.authentications.token.applyToRequest(
|
|
1869
|
-
localVarRequestOptions
|
|
1870
|
-
)
|
|
1871
|
-
);
|
|
1872
|
-
}
|
|
1873
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1874
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1875
|
-
);
|
|
1876
|
-
|
|
1877
|
-
let interceptorPromise = authenticationPromise;
|
|
1878
|
-
for (const interceptor of this.interceptors) {
|
|
1879
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1880
|
-
interceptor(localVarRequestOptions)
|
|
1881
|
-
);
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
return interceptorPromise.then(() => {
|
|
1885
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1886
|
-
if (localVarUseFormData) {
|
|
1887
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1888
|
-
} else {
|
|
1889
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1890
|
-
}
|
|
1891
|
-
}
|
|
1892
|
-
return new Promise<{
|
|
1893
|
-
response: http.IncomingMessage;
|
|
1894
|
-
body: DeleteWarehouse200Response;
|
|
1895
|
-
}>((resolve, reject) => {
|
|
1896
|
-
localVarRequest(
|
|
1897
|
-
localVarRequestOptions,
|
|
1898
|
-
(error, response, body) => {
|
|
1899
|
-
if (error) {
|
|
1900
|
-
reject(error);
|
|
1901
|
-
} else {
|
|
1902
|
-
if (
|
|
1903
|
-
response.statusCode &&
|
|
1904
|
-
response.statusCode >= 200 &&
|
|
1905
|
-
response.statusCode <= 299
|
|
1906
|
-
) {
|
|
1907
|
-
body = ObjectSerializer.deserialize(
|
|
1908
|
-
body,
|
|
1909
|
-
'DeleteWarehouse200Response'
|
|
1910
|
-
);
|
|
1911
|
-
resolve({ response: response, body: body });
|
|
1912
|
-
} else {
|
|
1913
|
-
reject(
|
|
1914
|
-
new HttpError(
|
|
1915
|
-
response,
|
|
1916
|
-
body,
|
|
1917
|
-
response.statusCode
|
|
1918
|
-
)
|
|
1919
|
-
);
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
}
|
|
1923
|
-
);
|
|
1924
|
-
});
|
|
1925
|
-
});
|
|
1926
|
-
}
|
|
1927
|
-
/**
|
|
1928
|
-
* Deletes an existing Warehouse. When called, this endpoint may generate the `Storage Destination Deleted` [Audit Trail](/tag/Audit-Trail) event.
|
|
1929
|
-
* @summary Delete Warehouse
|
|
1930
|
-
* @param warehouseId
|
|
1931
|
-
*/
|
|
1932
|
-
public async deleteWarehouseV1(
|
|
1933
|
-
warehouseId: string,
|
|
1934
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1935
|
-
): Promise<{
|
|
1936
|
-
response: http.IncomingMessage;
|
|
1937
|
-
body: DeleteWarehouse200Response;
|
|
1938
|
-
}> {
|
|
1939
|
-
const localVarPath =
|
|
1940
|
-
this.basePath +
|
|
1941
|
-
'/warehouses/{warehouseId}'.replace(
|
|
1942
|
-
'{' + 'warehouseId' + '}',
|
|
1943
|
-
encodeURIComponent(String(warehouseId))
|
|
1944
|
-
);
|
|
1945
|
-
let localVarQueryParameters: any = {};
|
|
1946
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1947
|
-
{},
|
|
1948
|
-
this._defaultHeaders
|
|
1949
|
-
);
|
|
1950
|
-
const produces = [
|
|
1951
|
-
'application/vnd.segment.v1+json',
|
|
1952
|
-
'application/json',
|
|
1953
|
-
];
|
|
1954
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1955
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1956
|
-
} else {
|
|
1957
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1958
|
-
}
|
|
1959
|
-
let localVarFormParams: any = {};
|
|
1960
|
-
|
|
1961
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
1962
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1963
|
-
throw new Error(
|
|
1964
|
-
'Required parameter warehouseId was null or undefined when calling deleteWarehouseV1.'
|
|
1965
|
-
);
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1969
|
-
|
|
1970
|
-
let localVarUseFormData = false;
|
|
1971
|
-
|
|
1972
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1973
|
-
method: 'DELETE',
|
|
1974
|
-
qs: localVarQueryParameters,
|
|
1975
|
-
headers: localVarHeaderParams,
|
|
1976
|
-
uri: localVarPath,
|
|
1977
|
-
useQuerystring: this._useQuerystring,
|
|
1978
|
-
json: true,
|
|
1979
|
-
};
|
|
1980
|
-
|
|
1981
|
-
let authenticationPromise = Promise.resolve();
|
|
1982
|
-
if (this.authentications.token.accessToken) {
|
|
1983
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1984
|
-
this.authentications.token.applyToRequest(
|
|
1985
|
-
localVarRequestOptions
|
|
1986
|
-
)
|
|
1987
|
-
);
|
|
1988
|
-
}
|
|
1989
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1990
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1991
|
-
);
|
|
1992
|
-
|
|
1993
|
-
let interceptorPromise = authenticationPromise;
|
|
1994
|
-
for (const interceptor of this.interceptors) {
|
|
1995
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1996
|
-
interceptor(localVarRequestOptions)
|
|
1997
|
-
);
|
|
1998
|
-
}
|
|
1999
|
-
|
|
2000
|
-
return interceptorPromise.then(() => {
|
|
2001
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2002
|
-
if (localVarUseFormData) {
|
|
2003
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2004
|
-
} else {
|
|
2005
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2006
|
-
}
|
|
2007
|
-
}
|
|
2008
|
-
return new Promise<{
|
|
2009
|
-
response: http.IncomingMessage;
|
|
2010
|
-
body: DeleteWarehouse200Response;
|
|
2011
|
-
}>((resolve, reject) => {
|
|
2012
|
-
localVarRequest(
|
|
2013
|
-
localVarRequestOptions,
|
|
2014
|
-
(error, response, body) => {
|
|
2015
|
-
if (error) {
|
|
2016
|
-
reject(error);
|
|
2017
|
-
} else {
|
|
2018
|
-
if (
|
|
2019
|
-
response.statusCode &&
|
|
2020
|
-
response.statusCode >= 200 &&
|
|
2021
|
-
response.statusCode <= 299
|
|
2022
|
-
) {
|
|
2023
|
-
body = ObjectSerializer.deserialize(
|
|
2024
|
-
body,
|
|
2025
|
-
'DeleteWarehouse200Response'
|
|
2026
|
-
);
|
|
2027
|
-
resolve({ response: response, body: body });
|
|
2028
|
-
} else {
|
|
2029
|
-
reject(
|
|
2030
|
-
new HttpError(
|
|
2031
|
-
response,
|
|
2032
|
-
body,
|
|
2033
|
-
response.statusCode
|
|
2034
|
-
)
|
|
2035
|
-
);
|
|
2036
|
-
}
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
);
|
|
2040
|
-
});
|
|
2041
|
-
});
|
|
2042
|
-
}
|
|
2043
|
-
/**
|
|
2044
|
-
* Verifies the state of Warehouse connection settings. The rate limit for this endpoint is 20 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
2045
|
-
* @summary Get Connection State from Warehouse
|
|
2046
|
-
* @param warehouseId
|
|
2047
|
-
*/
|
|
2048
|
-
public async getConnectionStateFromWarehouseAlpha(
|
|
2049
|
-
warehouseId: string,
|
|
2050
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2051
|
-
): Promise<{
|
|
2052
|
-
response: http.IncomingMessage;
|
|
2053
|
-
body: GetConnectionStateFromWarehouse200Response;
|
|
2054
|
-
}> {
|
|
2055
|
-
const localVarPath =
|
|
2056
|
-
this.basePath +
|
|
2057
|
-
'/warehouses/{warehouseId}/connection-state'.replace(
|
|
2058
|
-
'{' + 'warehouseId' + '}',
|
|
2059
|
-
encodeURIComponent(String(warehouseId))
|
|
2060
|
-
);
|
|
2061
|
-
let localVarQueryParameters: any = {};
|
|
2062
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2063
|
-
{},
|
|
2064
|
-
this._defaultHeaders
|
|
2065
|
-
);
|
|
2066
|
-
const produces = [
|
|
2067
|
-
'application/vnd.segment.v1alpha+json',
|
|
2068
|
-
'application/json',
|
|
2069
|
-
];
|
|
2070
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2071
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2072
|
-
} else {
|
|
2073
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2074
|
-
}
|
|
2075
|
-
let localVarFormParams: any = {};
|
|
2076
|
-
|
|
2077
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
2078
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2079
|
-
throw new Error(
|
|
2080
|
-
'Required parameter warehouseId was null or undefined when calling getConnectionStateFromWarehouseAlpha.'
|
|
2081
|
-
);
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2085
|
-
|
|
2086
|
-
let localVarUseFormData = false;
|
|
2087
|
-
|
|
2088
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2089
|
-
method: 'GET',
|
|
2090
|
-
qs: localVarQueryParameters,
|
|
2091
|
-
headers: localVarHeaderParams,
|
|
2092
|
-
uri: localVarPath,
|
|
2093
|
-
useQuerystring: this._useQuerystring,
|
|
2094
|
-
json: true,
|
|
2095
|
-
};
|
|
2096
|
-
|
|
2097
|
-
let authenticationPromise = Promise.resolve();
|
|
2098
|
-
if (this.authentications.token.accessToken) {
|
|
2099
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2100
|
-
this.authentications.token.applyToRequest(
|
|
2101
|
-
localVarRequestOptions
|
|
2102
|
-
)
|
|
2103
|
-
);
|
|
2104
|
-
}
|
|
2105
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2106
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2107
|
-
);
|
|
2108
|
-
|
|
2109
|
-
let interceptorPromise = authenticationPromise;
|
|
2110
|
-
for (const interceptor of this.interceptors) {
|
|
2111
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2112
|
-
interceptor(localVarRequestOptions)
|
|
2113
|
-
);
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
return interceptorPromise.then(() => {
|
|
2117
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2118
|
-
if (localVarUseFormData) {
|
|
2119
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2120
|
-
} else {
|
|
2121
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2122
|
-
}
|
|
2123
|
-
}
|
|
2124
|
-
return new Promise<{
|
|
2125
|
-
response: http.IncomingMessage;
|
|
2126
|
-
body: GetConnectionStateFromWarehouse200Response;
|
|
2127
|
-
}>((resolve, reject) => {
|
|
2128
|
-
localVarRequest(
|
|
2129
|
-
localVarRequestOptions,
|
|
2130
|
-
(error, response, body) => {
|
|
2131
|
-
if (error) {
|
|
2132
|
-
reject(error);
|
|
2133
|
-
} else {
|
|
2134
|
-
if (
|
|
2135
|
-
response.statusCode &&
|
|
2136
|
-
response.statusCode >= 200 &&
|
|
2137
|
-
response.statusCode <= 299
|
|
2138
|
-
) {
|
|
2139
|
-
body = ObjectSerializer.deserialize(
|
|
2140
|
-
body,
|
|
2141
|
-
'GetConnectionStateFromWarehouse200Response'
|
|
2142
|
-
);
|
|
2143
|
-
resolve({ response: response, body: body });
|
|
2144
|
-
} else {
|
|
2145
|
-
reject(
|
|
2146
|
-
new HttpError(
|
|
2147
|
-
response,
|
|
2148
|
-
body,
|
|
2149
|
-
response.statusCode
|
|
2150
|
-
)
|
|
2151
|
-
);
|
|
2152
|
-
}
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
);
|
|
2156
|
-
});
|
|
2157
|
-
});
|
|
2158
|
-
}
|
|
2159
|
-
/**
|
|
2160
|
-
* Verifies the state of Warehouse connection settings. The rate limit for this endpoint is 20 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
2161
|
-
* @summary Get Connection State from Warehouse
|
|
2162
|
-
* @param warehouseId
|
|
2163
|
-
*/
|
|
2164
|
-
public async getConnectionStateFromWarehouseBeta(
|
|
2165
|
-
warehouseId: string,
|
|
2166
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2167
|
-
): Promise<{
|
|
2168
|
-
response: http.IncomingMessage;
|
|
2169
|
-
body: GetConnectionStateFromWarehouse200Response;
|
|
2170
|
-
}> {
|
|
2171
|
-
const localVarPath =
|
|
2172
|
-
this.basePath +
|
|
2173
|
-
'/warehouses/{warehouseId}/connection-state'.replace(
|
|
2174
|
-
'{' + 'warehouseId' + '}',
|
|
2175
|
-
encodeURIComponent(String(warehouseId))
|
|
2176
|
-
);
|
|
2177
|
-
let localVarQueryParameters: any = {};
|
|
2178
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2179
|
-
{},
|
|
2180
|
-
this._defaultHeaders
|
|
2181
|
-
);
|
|
2182
|
-
const produces = [
|
|
2183
|
-
'application/vnd.segment.v1beta+json',
|
|
2184
|
-
'application/json',
|
|
2185
|
-
];
|
|
2186
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2187
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2188
|
-
} else {
|
|
2189
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2190
|
-
}
|
|
2191
|
-
let localVarFormParams: any = {};
|
|
2192
|
-
|
|
2193
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
2194
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2195
|
-
throw new Error(
|
|
2196
|
-
'Required parameter warehouseId was null or undefined when calling getConnectionStateFromWarehouseBeta.'
|
|
2197
|
-
);
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2201
|
-
|
|
2202
|
-
let localVarUseFormData = false;
|
|
2203
|
-
|
|
2204
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2205
|
-
method: 'GET',
|
|
2206
|
-
qs: localVarQueryParameters,
|
|
2207
|
-
headers: localVarHeaderParams,
|
|
2208
|
-
uri: localVarPath,
|
|
2209
|
-
useQuerystring: this._useQuerystring,
|
|
2210
|
-
json: true,
|
|
2211
|
-
};
|
|
2212
|
-
|
|
2213
|
-
let authenticationPromise = Promise.resolve();
|
|
2214
|
-
if (this.authentications.token.accessToken) {
|
|
2215
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2216
|
-
this.authentications.token.applyToRequest(
|
|
2217
|
-
localVarRequestOptions
|
|
2218
|
-
)
|
|
2219
|
-
);
|
|
2220
|
-
}
|
|
2221
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2222
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2223
|
-
);
|
|
2224
|
-
|
|
2225
|
-
let interceptorPromise = authenticationPromise;
|
|
2226
|
-
for (const interceptor of this.interceptors) {
|
|
2227
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2228
|
-
interceptor(localVarRequestOptions)
|
|
2229
|
-
);
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
return interceptorPromise.then(() => {
|
|
2233
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2234
|
-
if (localVarUseFormData) {
|
|
2235
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2236
|
-
} else {
|
|
2237
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2238
|
-
}
|
|
2239
|
-
}
|
|
2240
|
-
return new Promise<{
|
|
2241
|
-
response: http.IncomingMessage;
|
|
2242
|
-
body: GetConnectionStateFromWarehouse200Response;
|
|
2243
|
-
}>((resolve, reject) => {
|
|
2244
|
-
localVarRequest(
|
|
2245
|
-
localVarRequestOptions,
|
|
2246
|
-
(error, response, body) => {
|
|
2247
|
-
if (error) {
|
|
2248
|
-
reject(error);
|
|
2249
|
-
} else {
|
|
2250
|
-
if (
|
|
2251
|
-
response.statusCode &&
|
|
2252
|
-
response.statusCode >= 200 &&
|
|
2253
|
-
response.statusCode <= 299
|
|
2254
|
-
) {
|
|
2255
|
-
body = ObjectSerializer.deserialize(
|
|
2256
|
-
body,
|
|
2257
|
-
'GetConnectionStateFromWarehouse200Response'
|
|
2258
|
-
);
|
|
2259
|
-
resolve({ response: response, body: body });
|
|
2260
|
-
} else {
|
|
2261
|
-
reject(
|
|
2262
|
-
new HttpError(
|
|
2263
|
-
response,
|
|
2264
|
-
body,
|
|
2265
|
-
response.statusCode
|
|
2266
|
-
)
|
|
2267
|
-
);
|
|
2268
|
-
}
|
|
2269
|
-
}
|
|
2270
|
-
}
|
|
2271
|
-
);
|
|
2272
|
-
});
|
|
2273
|
-
});
|
|
2274
|
-
}
|
|
2275
|
-
/**
|
|
2276
|
-
* Verifies the state of Warehouse connection settings. The rate limit for this endpoint is 20 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
2277
|
-
* @summary Get Connection State from Warehouse
|
|
2278
|
-
* @param warehouseId
|
|
2279
|
-
*/
|
|
2280
|
-
public async getConnectionStateFromWarehouseCurrent(
|
|
2281
|
-
warehouseId: string,
|
|
2282
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2283
|
-
): Promise<{
|
|
2284
|
-
response: http.IncomingMessage;
|
|
2285
|
-
body: GetConnectionStateFromWarehouse200Response;
|
|
2286
|
-
}> {
|
|
2287
|
-
const localVarPath =
|
|
2288
|
-
this.basePath +
|
|
2289
|
-
'/warehouses/{warehouseId}/connection-state'.replace(
|
|
2290
|
-
'{' + 'warehouseId' + '}',
|
|
2291
|
-
encodeURIComponent(String(warehouseId))
|
|
2292
|
-
);
|
|
2293
|
-
let localVarQueryParameters: any = {};
|
|
2294
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2295
|
-
{},
|
|
2296
|
-
this._defaultHeaders
|
|
2297
|
-
);
|
|
2298
|
-
const produces = ['application/json'];
|
|
2299
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2300
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2301
|
-
} else {
|
|
2302
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2303
|
-
}
|
|
2304
|
-
let localVarFormParams: any = {};
|
|
2305
|
-
|
|
2306
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
2307
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2308
|
-
throw new Error(
|
|
2309
|
-
'Required parameter warehouseId was null or undefined when calling getConnectionStateFromWarehouseCurrent.'
|
|
2310
|
-
);
|
|
2311
|
-
}
|
|
2312
|
-
|
|
2313
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2314
|
-
|
|
2315
|
-
let localVarUseFormData = false;
|
|
2316
|
-
|
|
2317
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2318
|
-
method: 'GET',
|
|
2319
|
-
qs: localVarQueryParameters,
|
|
2320
|
-
headers: localVarHeaderParams,
|
|
2321
|
-
uri: localVarPath,
|
|
2322
|
-
useQuerystring: this._useQuerystring,
|
|
2323
|
-
json: true,
|
|
2324
|
-
};
|
|
2325
|
-
|
|
2326
|
-
let authenticationPromise = Promise.resolve();
|
|
2327
|
-
if (this.authentications.token.accessToken) {
|
|
2328
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2329
|
-
this.authentications.token.applyToRequest(
|
|
2330
|
-
localVarRequestOptions
|
|
2331
|
-
)
|
|
2332
|
-
);
|
|
2333
|
-
}
|
|
2334
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2335
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2336
|
-
);
|
|
2337
|
-
|
|
2338
|
-
let interceptorPromise = authenticationPromise;
|
|
2339
|
-
for (const interceptor of this.interceptors) {
|
|
2340
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2341
|
-
interceptor(localVarRequestOptions)
|
|
2342
|
-
);
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
return interceptorPromise.then(() => {
|
|
2346
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2347
|
-
if (localVarUseFormData) {
|
|
2348
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2349
|
-
} else {
|
|
2350
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2351
|
-
}
|
|
2352
|
-
}
|
|
2353
|
-
return new Promise<{
|
|
2354
|
-
response: http.IncomingMessage;
|
|
2355
|
-
body: GetConnectionStateFromWarehouse200Response;
|
|
2356
|
-
}>((resolve, reject) => {
|
|
2357
|
-
localVarRequest(
|
|
2358
|
-
localVarRequestOptions,
|
|
2359
|
-
(error, response, body) => {
|
|
2360
|
-
if (error) {
|
|
2361
|
-
reject(error);
|
|
2362
|
-
} else {
|
|
2363
|
-
if (
|
|
2364
|
-
response.statusCode &&
|
|
2365
|
-
response.statusCode >= 200 &&
|
|
2366
|
-
response.statusCode <= 299
|
|
2367
|
-
) {
|
|
2368
|
-
body = ObjectSerializer.deserialize(
|
|
2369
|
-
body,
|
|
2370
|
-
'GetConnectionStateFromWarehouse200Response'
|
|
2371
|
-
);
|
|
2372
|
-
resolve({ response: response, body: body });
|
|
2373
|
-
} else {
|
|
2374
|
-
reject(
|
|
2375
|
-
new HttpError(
|
|
2376
|
-
response,
|
|
2377
|
-
body,
|
|
2378
|
-
response.statusCode
|
|
2379
|
-
)
|
|
2380
|
-
);
|
|
2381
|
-
}
|
|
2382
|
-
}
|
|
2383
|
-
}
|
|
2384
|
-
);
|
|
2385
|
-
});
|
|
2386
|
-
});
|
|
2387
|
-
}
|
|
2388
|
-
/**
|
|
2389
|
-
* Verifies the state of Warehouse connection settings. The rate limit for this endpoint is 20 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
2390
|
-
* @summary Get Connection State from Warehouse
|
|
2391
|
-
* @param warehouseId
|
|
2392
|
-
*/
|
|
2393
|
-
public async getConnectionStateFromWarehouseV1(
|
|
2394
|
-
warehouseId: string,
|
|
2395
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2396
|
-
): Promise<{
|
|
2397
|
-
response: http.IncomingMessage;
|
|
2398
|
-
body: GetConnectionStateFromWarehouse200Response;
|
|
2399
|
-
}> {
|
|
2400
|
-
const localVarPath =
|
|
2401
|
-
this.basePath +
|
|
2402
|
-
'/warehouses/{warehouseId}/connection-state'.replace(
|
|
2403
|
-
'{' + 'warehouseId' + '}',
|
|
2404
|
-
encodeURIComponent(String(warehouseId))
|
|
2405
|
-
);
|
|
2406
|
-
let localVarQueryParameters: any = {};
|
|
2407
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2408
|
-
{},
|
|
2409
|
-
this._defaultHeaders
|
|
2410
|
-
);
|
|
2411
|
-
const produces = [
|
|
2412
|
-
'application/vnd.segment.v1+json',
|
|
2413
|
-
'application/json',
|
|
2414
|
-
];
|
|
2415
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2416
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2417
|
-
} else {
|
|
2418
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2419
|
-
}
|
|
2420
|
-
let localVarFormParams: any = {};
|
|
2421
|
-
|
|
2422
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
2423
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2424
|
-
throw new Error(
|
|
2425
|
-
'Required parameter warehouseId was null or undefined when calling getConnectionStateFromWarehouseV1.'
|
|
2426
|
-
);
|
|
2427
|
-
}
|
|
2428
|
-
|
|
2429
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2430
|
-
|
|
2431
|
-
let localVarUseFormData = false;
|
|
2432
|
-
|
|
2433
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2434
|
-
method: 'GET',
|
|
2435
|
-
qs: localVarQueryParameters,
|
|
2436
|
-
headers: localVarHeaderParams,
|
|
2437
|
-
uri: localVarPath,
|
|
2438
|
-
useQuerystring: this._useQuerystring,
|
|
2439
|
-
json: true,
|
|
2440
|
-
};
|
|
2441
|
-
|
|
2442
|
-
let authenticationPromise = Promise.resolve();
|
|
2443
|
-
if (this.authentications.token.accessToken) {
|
|
2444
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2445
|
-
this.authentications.token.applyToRequest(
|
|
2446
|
-
localVarRequestOptions
|
|
2447
|
-
)
|
|
2448
|
-
);
|
|
2449
|
-
}
|
|
2450
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2451
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2452
|
-
);
|
|
2453
|
-
|
|
2454
|
-
let interceptorPromise = authenticationPromise;
|
|
2455
|
-
for (const interceptor of this.interceptors) {
|
|
2456
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2457
|
-
interceptor(localVarRequestOptions)
|
|
2458
|
-
);
|
|
2459
|
-
}
|
|
2460
|
-
|
|
2461
|
-
return interceptorPromise.then(() => {
|
|
2462
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2463
|
-
if (localVarUseFormData) {
|
|
2464
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2465
|
-
} else {
|
|
2466
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2467
|
-
}
|
|
2468
|
-
}
|
|
2469
|
-
return new Promise<{
|
|
2470
|
-
response: http.IncomingMessage;
|
|
2471
|
-
body: GetConnectionStateFromWarehouse200Response;
|
|
2472
|
-
}>((resolve, reject) => {
|
|
2473
|
-
localVarRequest(
|
|
2474
|
-
localVarRequestOptions,
|
|
2475
|
-
(error, response, body) => {
|
|
2476
|
-
if (error) {
|
|
2477
|
-
reject(error);
|
|
2478
|
-
} else {
|
|
2479
|
-
if (
|
|
2480
|
-
response.statusCode &&
|
|
2481
|
-
response.statusCode >= 200 &&
|
|
2482
|
-
response.statusCode <= 299
|
|
2483
|
-
) {
|
|
2484
|
-
body = ObjectSerializer.deserialize(
|
|
2485
|
-
body,
|
|
2486
|
-
'GetConnectionStateFromWarehouse200Response'
|
|
2487
|
-
);
|
|
2488
|
-
resolve({ response: response, body: body });
|
|
2489
|
-
} else {
|
|
2490
|
-
reject(
|
|
2491
|
-
new HttpError(
|
|
2492
|
-
response,
|
|
2493
|
-
body,
|
|
2494
|
-
response.statusCode
|
|
2495
|
-
)
|
|
2496
|
-
);
|
|
2497
|
-
}
|
|
2498
|
-
}
|
|
2499
|
-
}
|
|
2500
|
-
);
|
|
2501
|
-
});
|
|
2502
|
-
});
|
|
2503
|
-
}
|
|
2504
|
-
/**
|
|
2505
|
-
* Returns a Warehouse by its id.
|
|
2506
|
-
* @summary Get Warehouse
|
|
2507
|
-
* @param warehouseId
|
|
2508
|
-
*/
|
|
2509
|
-
public async getWarehouseAlpha(
|
|
2510
|
-
warehouseId: string,
|
|
2511
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2512
|
-
): Promise<{
|
|
2513
|
-
response: http.IncomingMessage;
|
|
2514
|
-
body: GetWarehouse200Response;
|
|
2515
|
-
}> {
|
|
2516
|
-
const localVarPath =
|
|
2517
|
-
this.basePath +
|
|
2518
|
-
'/warehouses/{warehouseId}'.replace(
|
|
2519
|
-
'{' + 'warehouseId' + '}',
|
|
2520
|
-
encodeURIComponent(String(warehouseId))
|
|
2521
|
-
);
|
|
2522
|
-
let localVarQueryParameters: any = {};
|
|
2523
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2524
|
-
{},
|
|
2525
|
-
this._defaultHeaders
|
|
2526
|
-
);
|
|
2527
|
-
const produces = [
|
|
2528
|
-
'application/vnd.segment.v1alpha+json',
|
|
2529
|
-
'application/json',
|
|
2530
|
-
];
|
|
2531
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2532
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2533
|
-
} else {
|
|
2534
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2535
|
-
}
|
|
2536
|
-
let localVarFormParams: any = {};
|
|
2537
|
-
|
|
2538
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
2539
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2540
|
-
throw new Error(
|
|
2541
|
-
'Required parameter warehouseId was null or undefined when calling getWarehouseAlpha.'
|
|
2542
|
-
);
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2546
|
-
|
|
2547
|
-
let localVarUseFormData = false;
|
|
2548
|
-
|
|
2549
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2550
|
-
method: 'GET',
|
|
2551
|
-
qs: localVarQueryParameters,
|
|
2552
|
-
headers: localVarHeaderParams,
|
|
2553
|
-
uri: localVarPath,
|
|
2554
|
-
useQuerystring: this._useQuerystring,
|
|
2555
|
-
json: true,
|
|
2556
|
-
};
|
|
2557
|
-
|
|
2558
|
-
let authenticationPromise = Promise.resolve();
|
|
2559
|
-
if (this.authentications.token.accessToken) {
|
|
2560
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2561
|
-
this.authentications.token.applyToRequest(
|
|
2562
|
-
localVarRequestOptions
|
|
2563
|
-
)
|
|
2564
|
-
);
|
|
2565
|
-
}
|
|
2566
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2567
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2568
|
-
);
|
|
2569
|
-
|
|
2570
|
-
let interceptorPromise = authenticationPromise;
|
|
2571
|
-
for (const interceptor of this.interceptors) {
|
|
2572
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2573
|
-
interceptor(localVarRequestOptions)
|
|
2574
|
-
);
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
return interceptorPromise.then(() => {
|
|
2578
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2579
|
-
if (localVarUseFormData) {
|
|
2580
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2581
|
-
} else {
|
|
2582
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2583
|
-
}
|
|
2584
|
-
}
|
|
2585
|
-
return new Promise<{
|
|
2586
|
-
response: http.IncomingMessage;
|
|
2587
|
-
body: GetWarehouse200Response;
|
|
2588
|
-
}>((resolve, reject) => {
|
|
2589
|
-
localVarRequest(
|
|
2590
|
-
localVarRequestOptions,
|
|
2591
|
-
(error, response, body) => {
|
|
2592
|
-
if (error) {
|
|
2593
|
-
reject(error);
|
|
2594
|
-
} else {
|
|
2595
|
-
if (
|
|
2596
|
-
response.statusCode &&
|
|
2597
|
-
response.statusCode >= 200 &&
|
|
2598
|
-
response.statusCode <= 299
|
|
2599
|
-
) {
|
|
2600
|
-
body = ObjectSerializer.deserialize(
|
|
2601
|
-
body,
|
|
2602
|
-
'GetWarehouse200Response'
|
|
2603
|
-
);
|
|
2604
|
-
resolve({ response: response, body: body });
|
|
2605
|
-
} else {
|
|
2606
|
-
reject(
|
|
2607
|
-
new HttpError(
|
|
2608
|
-
response,
|
|
2609
|
-
body,
|
|
2610
|
-
response.statusCode
|
|
2611
|
-
)
|
|
2612
|
-
);
|
|
2613
|
-
}
|
|
2614
|
-
}
|
|
2615
|
-
}
|
|
2616
|
-
);
|
|
2617
|
-
});
|
|
2618
|
-
});
|
|
2619
|
-
}
|
|
2620
|
-
/**
|
|
2621
|
-
* Returns a Warehouse by its id.
|
|
2622
|
-
* @summary Get Warehouse
|
|
2623
|
-
* @param warehouseId
|
|
2624
|
-
*/
|
|
2625
|
-
public async getWarehouseBeta(
|
|
2626
|
-
warehouseId: string,
|
|
2627
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2628
|
-
): Promise<{
|
|
2629
|
-
response: http.IncomingMessage;
|
|
2630
|
-
body: GetWarehouse200Response;
|
|
2631
|
-
}> {
|
|
2632
|
-
const localVarPath =
|
|
2633
|
-
this.basePath +
|
|
2634
|
-
'/warehouses/{warehouseId}'.replace(
|
|
2635
|
-
'{' + 'warehouseId' + '}',
|
|
2636
|
-
encodeURIComponent(String(warehouseId))
|
|
2637
|
-
);
|
|
2638
|
-
let localVarQueryParameters: any = {};
|
|
2639
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2640
|
-
{},
|
|
2641
|
-
this._defaultHeaders
|
|
2642
|
-
);
|
|
2643
|
-
const produces = [
|
|
2644
|
-
'application/vnd.segment.v1beta+json',
|
|
2645
|
-
'application/json',
|
|
2646
|
-
];
|
|
2647
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2648
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2649
|
-
} else {
|
|
2650
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2651
|
-
}
|
|
2652
|
-
let localVarFormParams: any = {};
|
|
2653
|
-
|
|
2654
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
2655
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2656
|
-
throw new Error(
|
|
2657
|
-
'Required parameter warehouseId was null or undefined when calling getWarehouseBeta.'
|
|
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: GetWarehouse200Response;
|
|
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
|
-
'GetWarehouse200Response'
|
|
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
|
-
* Returns a Warehouse by its id.
|
|
2738
|
-
* @summary Get Warehouse
|
|
2739
|
-
* @param warehouseId
|
|
2740
|
-
*/
|
|
2741
|
-
public async getWarehouseCurrent(
|
|
2742
|
-
warehouseId: string,
|
|
2743
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2744
|
-
): Promise<{
|
|
2745
|
-
response: http.IncomingMessage;
|
|
2746
|
-
body: GetWarehouse200Response;
|
|
2747
|
-
}> {
|
|
2748
|
-
const localVarPath =
|
|
2749
|
-
this.basePath +
|
|
2750
|
-
'/warehouses/{warehouseId}'.replace(
|
|
2751
|
-
'{' + 'warehouseId' + '}',
|
|
2752
|
-
encodeURIComponent(String(warehouseId))
|
|
2753
|
-
);
|
|
2754
|
-
let localVarQueryParameters: any = {};
|
|
2755
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2756
|
-
{},
|
|
2757
|
-
this._defaultHeaders
|
|
2758
|
-
);
|
|
2759
|
-
const produces = ['application/json'];
|
|
2760
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2761
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2762
|
-
} else {
|
|
2763
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2764
|
-
}
|
|
2765
|
-
let localVarFormParams: any = {};
|
|
2766
|
-
|
|
2767
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
2768
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2769
|
-
throw new Error(
|
|
2770
|
-
'Required parameter warehouseId was null or undefined when calling getWarehouseCurrent.'
|
|
2771
|
-
);
|
|
2772
|
-
}
|
|
2773
|
-
|
|
2774
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2775
|
-
|
|
2776
|
-
let localVarUseFormData = false;
|
|
2777
|
-
|
|
2778
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2779
|
-
method: 'GET',
|
|
2780
|
-
qs: localVarQueryParameters,
|
|
2781
|
-
headers: localVarHeaderParams,
|
|
2782
|
-
uri: localVarPath,
|
|
2783
|
-
useQuerystring: this._useQuerystring,
|
|
2784
|
-
json: true,
|
|
2785
|
-
};
|
|
2786
|
-
|
|
2787
|
-
let authenticationPromise = Promise.resolve();
|
|
2788
|
-
if (this.authentications.token.accessToken) {
|
|
2789
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2790
|
-
this.authentications.token.applyToRequest(
|
|
2791
|
-
localVarRequestOptions
|
|
2792
|
-
)
|
|
2793
|
-
);
|
|
2794
|
-
}
|
|
2795
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2796
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2797
|
-
);
|
|
2798
|
-
|
|
2799
|
-
let interceptorPromise = authenticationPromise;
|
|
2800
|
-
for (const interceptor of this.interceptors) {
|
|
2801
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2802
|
-
interceptor(localVarRequestOptions)
|
|
2803
|
-
);
|
|
2804
|
-
}
|
|
2805
|
-
|
|
2806
|
-
return interceptorPromise.then(() => {
|
|
2807
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2808
|
-
if (localVarUseFormData) {
|
|
2809
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2810
|
-
} else {
|
|
2811
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2812
|
-
}
|
|
2813
|
-
}
|
|
2814
|
-
return new Promise<{
|
|
2815
|
-
response: http.IncomingMessage;
|
|
2816
|
-
body: GetWarehouse200Response;
|
|
2817
|
-
}>((resolve, reject) => {
|
|
2818
|
-
localVarRequest(
|
|
2819
|
-
localVarRequestOptions,
|
|
2820
|
-
(error, response, body) => {
|
|
2821
|
-
if (error) {
|
|
2822
|
-
reject(error);
|
|
2823
|
-
} else {
|
|
2824
|
-
if (
|
|
2825
|
-
response.statusCode &&
|
|
2826
|
-
response.statusCode >= 200 &&
|
|
2827
|
-
response.statusCode <= 299
|
|
2828
|
-
) {
|
|
2829
|
-
body = ObjectSerializer.deserialize(
|
|
2830
|
-
body,
|
|
2831
|
-
'GetWarehouse200Response'
|
|
2832
|
-
);
|
|
2833
|
-
resolve({ response: response, body: body });
|
|
2834
|
-
} else {
|
|
2835
|
-
reject(
|
|
2836
|
-
new HttpError(
|
|
2837
|
-
response,
|
|
2838
|
-
body,
|
|
2839
|
-
response.statusCode
|
|
2840
|
-
)
|
|
2841
|
-
);
|
|
2842
|
-
}
|
|
2843
|
-
}
|
|
2844
|
-
}
|
|
2845
|
-
);
|
|
2846
|
-
});
|
|
2847
|
-
});
|
|
2848
|
-
}
|
|
2849
|
-
/**
|
|
2850
|
-
* Returns a Warehouse by its id.
|
|
2851
|
-
* @summary Get Warehouse
|
|
2852
|
-
* @param warehouseId
|
|
2853
|
-
*/
|
|
2854
|
-
public async getWarehouseV1(
|
|
2855
|
-
warehouseId: string,
|
|
2856
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2857
|
-
): Promise<{
|
|
2858
|
-
response: http.IncomingMessage;
|
|
2859
|
-
body: GetWarehouse200Response;
|
|
2860
|
-
}> {
|
|
2861
|
-
const localVarPath =
|
|
2862
|
-
this.basePath +
|
|
2863
|
-
'/warehouses/{warehouseId}'.replace(
|
|
2864
|
-
'{' + 'warehouseId' + '}',
|
|
2865
|
-
encodeURIComponent(String(warehouseId))
|
|
2866
|
-
);
|
|
2867
|
-
let localVarQueryParameters: any = {};
|
|
2868
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2869
|
-
{},
|
|
2870
|
-
this._defaultHeaders
|
|
2871
|
-
);
|
|
2872
|
-
const produces = [
|
|
2873
|
-
'application/vnd.segment.v1+json',
|
|
2874
|
-
'application/json',
|
|
2875
|
-
];
|
|
2876
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2877
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2878
|
-
} else {
|
|
2879
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2880
|
-
}
|
|
2881
|
-
let localVarFormParams: any = {};
|
|
2882
|
-
|
|
2883
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
2884
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2885
|
-
throw new Error(
|
|
2886
|
-
'Required parameter warehouseId was null or undefined when calling getWarehouseV1.'
|
|
2887
|
-
);
|
|
2888
|
-
}
|
|
2889
|
-
|
|
2890
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2891
|
-
|
|
2892
|
-
let localVarUseFormData = false;
|
|
2893
|
-
|
|
2894
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2895
|
-
method: 'GET',
|
|
2896
|
-
qs: localVarQueryParameters,
|
|
2897
|
-
headers: localVarHeaderParams,
|
|
2898
|
-
uri: localVarPath,
|
|
2899
|
-
useQuerystring: this._useQuerystring,
|
|
2900
|
-
json: true,
|
|
2901
|
-
};
|
|
2902
|
-
|
|
2903
|
-
let authenticationPromise = Promise.resolve();
|
|
2904
|
-
if (this.authentications.token.accessToken) {
|
|
2905
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2906
|
-
this.authentications.token.applyToRequest(
|
|
2907
|
-
localVarRequestOptions
|
|
2908
|
-
)
|
|
2909
|
-
);
|
|
2910
|
-
}
|
|
2911
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2912
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2913
|
-
);
|
|
2914
|
-
|
|
2915
|
-
let interceptorPromise = authenticationPromise;
|
|
2916
|
-
for (const interceptor of this.interceptors) {
|
|
2917
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2918
|
-
interceptor(localVarRequestOptions)
|
|
2919
|
-
);
|
|
2920
|
-
}
|
|
2921
|
-
|
|
2922
|
-
return interceptorPromise.then(() => {
|
|
2923
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2924
|
-
if (localVarUseFormData) {
|
|
2925
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2926
|
-
} else {
|
|
2927
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2928
|
-
}
|
|
2929
|
-
}
|
|
2930
|
-
return new Promise<{
|
|
2931
|
-
response: http.IncomingMessage;
|
|
2932
|
-
body: GetWarehouse200Response;
|
|
2933
|
-
}>((resolve, reject) => {
|
|
2934
|
-
localVarRequest(
|
|
2935
|
-
localVarRequestOptions,
|
|
2936
|
-
(error, response, body) => {
|
|
2937
|
-
if (error) {
|
|
2938
|
-
reject(error);
|
|
2939
|
-
} else {
|
|
2940
|
-
if (
|
|
2941
|
-
response.statusCode &&
|
|
2942
|
-
response.statusCode >= 200 &&
|
|
2943
|
-
response.statusCode <= 299
|
|
2944
|
-
) {
|
|
2945
|
-
body = ObjectSerializer.deserialize(
|
|
2946
|
-
body,
|
|
2947
|
-
'GetWarehouse200Response'
|
|
2948
|
-
);
|
|
2949
|
-
resolve({ response: response, body: body });
|
|
2950
|
-
} else {
|
|
2951
|
-
reject(
|
|
2952
|
-
new HttpError(
|
|
2953
|
-
response,
|
|
2954
|
-
body,
|
|
2955
|
-
response.statusCode
|
|
2956
|
-
)
|
|
2957
|
-
);
|
|
2958
|
-
}
|
|
2959
|
-
}
|
|
2960
|
-
}
|
|
2961
|
-
);
|
|
2962
|
-
});
|
|
2963
|
-
});
|
|
2964
|
-
}
|
|
2965
|
-
/**
|
|
2966
|
-
* Returns the list of Sources that are connected to a Warehouse.
|
|
2967
|
-
* @summary List Connected Sources from Warehouse
|
|
2968
|
-
* @param warehouseId
|
|
2969
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
2970
|
-
*/
|
|
2971
|
-
public async listConnectedSourcesFromWarehouseAlpha(
|
|
2972
|
-
warehouseId: string,
|
|
2973
|
-
pagination: PaginationInput,
|
|
2974
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2975
|
-
): Promise<{
|
|
2976
|
-
response: http.IncomingMessage;
|
|
2977
|
-
body: ListConnectedSourcesFromWarehouse200Response;
|
|
2978
|
-
}> {
|
|
2979
|
-
const localVarPath =
|
|
2980
|
-
this.basePath +
|
|
2981
|
-
'/warehouses/{warehouseId}/connected-sources'.replace(
|
|
2982
|
-
'{' + 'warehouseId' + '}',
|
|
2983
|
-
encodeURIComponent(String(warehouseId))
|
|
2984
|
-
);
|
|
2985
|
-
let localVarQueryParameters: any = {};
|
|
2986
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2987
|
-
{},
|
|
2988
|
-
this._defaultHeaders
|
|
2989
|
-
);
|
|
2990
|
-
const produces = [
|
|
2991
|
-
'application/vnd.segment.v1alpha+json',
|
|
2992
|
-
'application/json',
|
|
2993
|
-
];
|
|
2994
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2995
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2996
|
-
} else {
|
|
2997
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2998
|
-
}
|
|
2999
|
-
let localVarFormParams: any = {};
|
|
3000
|
-
|
|
3001
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
3002
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
3003
|
-
throw new Error(
|
|
3004
|
-
'Required parameter warehouseId was null or undefined when calling listConnectedSourcesFromWarehouseAlpha.'
|
|
3005
|
-
);
|
|
3006
|
-
}
|
|
3007
|
-
|
|
3008
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3009
|
-
if (pagination === null || pagination === undefined) {
|
|
3010
|
-
throw new Error(
|
|
3011
|
-
'Required parameter pagination was null or undefined when calling listConnectedSourcesFromWarehouseAlpha.'
|
|
3012
|
-
);
|
|
3013
|
-
}
|
|
3014
|
-
|
|
3015
|
-
if (pagination !== undefined) {
|
|
3016
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3017
|
-
pagination,
|
|
3018
|
-
'PaginationInput'
|
|
3019
|
-
);
|
|
3020
|
-
}
|
|
3021
|
-
|
|
3022
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3023
|
-
|
|
3024
|
-
let localVarUseFormData = false;
|
|
3025
|
-
|
|
3026
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3027
|
-
method: 'GET',
|
|
3028
|
-
qs: localVarQueryParameters,
|
|
3029
|
-
headers: localVarHeaderParams,
|
|
3030
|
-
uri: localVarPath,
|
|
3031
|
-
useQuerystring: this._useQuerystring,
|
|
3032
|
-
json: true,
|
|
3033
|
-
};
|
|
3034
|
-
|
|
3035
|
-
let authenticationPromise = Promise.resolve();
|
|
3036
|
-
if (this.authentications.token.accessToken) {
|
|
3037
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3038
|
-
this.authentications.token.applyToRequest(
|
|
3039
|
-
localVarRequestOptions
|
|
3040
|
-
)
|
|
3041
|
-
);
|
|
3042
|
-
}
|
|
3043
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3044
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3045
|
-
);
|
|
3046
|
-
|
|
3047
|
-
let interceptorPromise = authenticationPromise;
|
|
3048
|
-
for (const interceptor of this.interceptors) {
|
|
3049
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3050
|
-
interceptor(localVarRequestOptions)
|
|
3051
|
-
);
|
|
3052
|
-
}
|
|
3053
|
-
|
|
3054
|
-
return interceptorPromise.then(() => {
|
|
3055
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3056
|
-
if (localVarUseFormData) {
|
|
3057
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3058
|
-
} else {
|
|
3059
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3060
|
-
}
|
|
3061
|
-
}
|
|
3062
|
-
return new Promise<{
|
|
3063
|
-
response: http.IncomingMessage;
|
|
3064
|
-
body: ListConnectedSourcesFromWarehouse200Response;
|
|
3065
|
-
}>((resolve, reject) => {
|
|
3066
|
-
localVarRequest(
|
|
3067
|
-
localVarRequestOptions,
|
|
3068
|
-
(error, response, body) => {
|
|
3069
|
-
if (error) {
|
|
3070
|
-
reject(error);
|
|
3071
|
-
} else {
|
|
3072
|
-
if (
|
|
3073
|
-
response.statusCode &&
|
|
3074
|
-
response.statusCode >= 200 &&
|
|
3075
|
-
response.statusCode <= 299
|
|
3076
|
-
) {
|
|
3077
|
-
body = ObjectSerializer.deserialize(
|
|
3078
|
-
body,
|
|
3079
|
-
'ListConnectedSourcesFromWarehouse200Response'
|
|
3080
|
-
);
|
|
3081
|
-
resolve({ response: response, body: body });
|
|
3082
|
-
} else {
|
|
3083
|
-
reject(
|
|
3084
|
-
new HttpError(
|
|
3085
|
-
response,
|
|
3086
|
-
body,
|
|
3087
|
-
response.statusCode
|
|
3088
|
-
)
|
|
3089
|
-
);
|
|
3090
|
-
}
|
|
3091
|
-
}
|
|
3092
|
-
}
|
|
3093
|
-
);
|
|
3094
|
-
});
|
|
3095
|
-
});
|
|
3096
|
-
}
|
|
3097
|
-
/**
|
|
3098
|
-
* Returns the list of Sources that are connected to a Warehouse.
|
|
3099
|
-
* @summary List Connected Sources from Warehouse
|
|
3100
|
-
* @param warehouseId
|
|
3101
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
3102
|
-
*/
|
|
3103
|
-
public async listConnectedSourcesFromWarehouseBeta(
|
|
3104
|
-
warehouseId: string,
|
|
3105
|
-
pagination: PaginationInput,
|
|
3106
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3107
|
-
): Promise<{
|
|
3108
|
-
response: http.IncomingMessage;
|
|
3109
|
-
body: ListConnectedSourcesFromWarehouse200Response;
|
|
3110
|
-
}> {
|
|
3111
|
-
const localVarPath =
|
|
3112
|
-
this.basePath +
|
|
3113
|
-
'/warehouses/{warehouseId}/connected-sources'.replace(
|
|
3114
|
-
'{' + 'warehouseId' + '}',
|
|
3115
|
-
encodeURIComponent(String(warehouseId))
|
|
3116
|
-
);
|
|
3117
|
-
let localVarQueryParameters: any = {};
|
|
3118
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3119
|
-
{},
|
|
3120
|
-
this._defaultHeaders
|
|
3121
|
-
);
|
|
3122
|
-
const produces = [
|
|
3123
|
-
'application/vnd.segment.v1beta+json',
|
|
3124
|
-
'application/json',
|
|
3125
|
-
];
|
|
3126
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3127
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3128
|
-
} else {
|
|
3129
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3130
|
-
}
|
|
3131
|
-
let localVarFormParams: any = {};
|
|
3132
|
-
|
|
3133
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
3134
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
3135
|
-
throw new Error(
|
|
3136
|
-
'Required parameter warehouseId was null or undefined when calling listConnectedSourcesFromWarehouseBeta.'
|
|
3137
|
-
);
|
|
3138
|
-
}
|
|
3139
|
-
|
|
3140
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3141
|
-
if (pagination === null || pagination === undefined) {
|
|
3142
|
-
throw new Error(
|
|
3143
|
-
'Required parameter pagination was null or undefined when calling listConnectedSourcesFromWarehouseBeta.'
|
|
3144
|
-
);
|
|
3145
|
-
}
|
|
3146
|
-
|
|
3147
|
-
if (pagination !== undefined) {
|
|
3148
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3149
|
-
pagination,
|
|
3150
|
-
'PaginationInput'
|
|
3151
|
-
);
|
|
3152
|
-
}
|
|
3153
|
-
|
|
3154
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3155
|
-
|
|
3156
|
-
let localVarUseFormData = false;
|
|
3157
|
-
|
|
3158
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3159
|
-
method: 'GET',
|
|
3160
|
-
qs: localVarQueryParameters,
|
|
3161
|
-
headers: localVarHeaderParams,
|
|
3162
|
-
uri: localVarPath,
|
|
3163
|
-
useQuerystring: this._useQuerystring,
|
|
3164
|
-
json: true,
|
|
3165
|
-
};
|
|
3166
|
-
|
|
3167
|
-
let authenticationPromise = Promise.resolve();
|
|
3168
|
-
if (this.authentications.token.accessToken) {
|
|
3169
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3170
|
-
this.authentications.token.applyToRequest(
|
|
3171
|
-
localVarRequestOptions
|
|
3172
|
-
)
|
|
3173
|
-
);
|
|
3174
|
-
}
|
|
3175
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3176
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3177
|
-
);
|
|
3178
|
-
|
|
3179
|
-
let interceptorPromise = authenticationPromise;
|
|
3180
|
-
for (const interceptor of this.interceptors) {
|
|
3181
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3182
|
-
interceptor(localVarRequestOptions)
|
|
3183
|
-
);
|
|
3184
|
-
}
|
|
3185
|
-
|
|
3186
|
-
return interceptorPromise.then(() => {
|
|
3187
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3188
|
-
if (localVarUseFormData) {
|
|
3189
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3190
|
-
} else {
|
|
3191
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3192
|
-
}
|
|
3193
|
-
}
|
|
3194
|
-
return new Promise<{
|
|
3195
|
-
response: http.IncomingMessage;
|
|
3196
|
-
body: ListConnectedSourcesFromWarehouse200Response;
|
|
3197
|
-
}>((resolve, reject) => {
|
|
3198
|
-
localVarRequest(
|
|
3199
|
-
localVarRequestOptions,
|
|
3200
|
-
(error, response, body) => {
|
|
3201
|
-
if (error) {
|
|
3202
|
-
reject(error);
|
|
3203
|
-
} else {
|
|
3204
|
-
if (
|
|
3205
|
-
response.statusCode &&
|
|
3206
|
-
response.statusCode >= 200 &&
|
|
3207
|
-
response.statusCode <= 299
|
|
3208
|
-
) {
|
|
3209
|
-
body = ObjectSerializer.deserialize(
|
|
3210
|
-
body,
|
|
3211
|
-
'ListConnectedSourcesFromWarehouse200Response'
|
|
3212
|
-
);
|
|
3213
|
-
resolve({ response: response, body: body });
|
|
3214
|
-
} else {
|
|
3215
|
-
reject(
|
|
3216
|
-
new HttpError(
|
|
3217
|
-
response,
|
|
3218
|
-
body,
|
|
3219
|
-
response.statusCode
|
|
3220
|
-
)
|
|
3221
|
-
);
|
|
3222
|
-
}
|
|
3223
|
-
}
|
|
3224
|
-
}
|
|
3225
|
-
);
|
|
3226
|
-
});
|
|
3227
|
-
});
|
|
3228
|
-
}
|
|
3229
|
-
/**
|
|
3230
|
-
* Returns the list of Sources that are connected to a Warehouse.
|
|
3231
|
-
* @summary List Connected Sources from Warehouse
|
|
3232
|
-
* @param warehouseId
|
|
3233
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
3234
|
-
*/
|
|
3235
|
-
public async listConnectedSourcesFromWarehouseCurrent(
|
|
3236
|
-
warehouseId: string,
|
|
3237
|
-
pagination: PaginationInput,
|
|
3238
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3239
|
-
): Promise<{
|
|
3240
|
-
response: http.IncomingMessage;
|
|
3241
|
-
body: ListConnectedSourcesFromWarehouse200Response;
|
|
3242
|
-
}> {
|
|
3243
|
-
const localVarPath =
|
|
3244
|
-
this.basePath +
|
|
3245
|
-
'/warehouses/{warehouseId}/connected-sources'.replace(
|
|
3246
|
-
'{' + 'warehouseId' + '}',
|
|
3247
|
-
encodeURIComponent(String(warehouseId))
|
|
3248
|
-
);
|
|
3249
|
-
let localVarQueryParameters: any = {};
|
|
3250
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3251
|
-
{},
|
|
3252
|
-
this._defaultHeaders
|
|
3253
|
-
);
|
|
3254
|
-
const produces = ['application/json'];
|
|
3255
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3256
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3257
|
-
} else {
|
|
3258
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3259
|
-
}
|
|
3260
|
-
let localVarFormParams: any = {};
|
|
3261
|
-
|
|
3262
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
3263
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
3264
|
-
throw new Error(
|
|
3265
|
-
'Required parameter warehouseId was null or undefined when calling listConnectedSourcesFromWarehouseCurrent.'
|
|
3266
|
-
);
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3269
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3270
|
-
if (pagination === null || pagination === undefined) {
|
|
3271
|
-
throw new Error(
|
|
3272
|
-
'Required parameter pagination was null or undefined when calling listConnectedSourcesFromWarehouseCurrent.'
|
|
3273
|
-
);
|
|
3274
|
-
}
|
|
3275
|
-
|
|
3276
|
-
if (pagination !== undefined) {
|
|
3277
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3278
|
-
pagination,
|
|
3279
|
-
'PaginationInput'
|
|
3280
|
-
);
|
|
3281
|
-
}
|
|
3282
|
-
|
|
3283
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3284
|
-
|
|
3285
|
-
let localVarUseFormData = false;
|
|
3286
|
-
|
|
3287
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3288
|
-
method: 'GET',
|
|
3289
|
-
qs: localVarQueryParameters,
|
|
3290
|
-
headers: localVarHeaderParams,
|
|
3291
|
-
uri: localVarPath,
|
|
3292
|
-
useQuerystring: this._useQuerystring,
|
|
3293
|
-
json: true,
|
|
3294
|
-
};
|
|
3295
|
-
|
|
3296
|
-
let authenticationPromise = Promise.resolve();
|
|
3297
|
-
if (this.authentications.token.accessToken) {
|
|
3298
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3299
|
-
this.authentications.token.applyToRequest(
|
|
3300
|
-
localVarRequestOptions
|
|
3301
|
-
)
|
|
3302
|
-
);
|
|
3303
|
-
}
|
|
3304
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3305
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3306
|
-
);
|
|
3307
|
-
|
|
3308
|
-
let interceptorPromise = authenticationPromise;
|
|
3309
|
-
for (const interceptor of this.interceptors) {
|
|
3310
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3311
|
-
interceptor(localVarRequestOptions)
|
|
3312
|
-
);
|
|
3313
|
-
}
|
|
3314
|
-
|
|
3315
|
-
return interceptorPromise.then(() => {
|
|
3316
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3317
|
-
if (localVarUseFormData) {
|
|
3318
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3319
|
-
} else {
|
|
3320
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3321
|
-
}
|
|
3322
|
-
}
|
|
3323
|
-
return new Promise<{
|
|
3324
|
-
response: http.IncomingMessage;
|
|
3325
|
-
body: ListConnectedSourcesFromWarehouse200Response;
|
|
3326
|
-
}>((resolve, reject) => {
|
|
3327
|
-
localVarRequest(
|
|
3328
|
-
localVarRequestOptions,
|
|
3329
|
-
(error, response, body) => {
|
|
3330
|
-
if (error) {
|
|
3331
|
-
reject(error);
|
|
3332
|
-
} else {
|
|
3333
|
-
if (
|
|
3334
|
-
response.statusCode &&
|
|
3335
|
-
response.statusCode >= 200 &&
|
|
3336
|
-
response.statusCode <= 299
|
|
3337
|
-
) {
|
|
3338
|
-
body = ObjectSerializer.deserialize(
|
|
3339
|
-
body,
|
|
3340
|
-
'ListConnectedSourcesFromWarehouse200Response'
|
|
3341
|
-
);
|
|
3342
|
-
resolve({ response: response, body: body });
|
|
3343
|
-
} else {
|
|
3344
|
-
reject(
|
|
3345
|
-
new HttpError(
|
|
3346
|
-
response,
|
|
3347
|
-
body,
|
|
3348
|
-
response.statusCode
|
|
3349
|
-
)
|
|
3350
|
-
);
|
|
3351
|
-
}
|
|
3352
|
-
}
|
|
3353
|
-
}
|
|
3354
|
-
);
|
|
3355
|
-
});
|
|
3356
|
-
});
|
|
3357
|
-
}
|
|
3358
|
-
/**
|
|
3359
|
-
* Returns the list of Sources that are connected to a Warehouse.
|
|
3360
|
-
* @summary List Connected Sources from Warehouse
|
|
3361
|
-
* @param warehouseId
|
|
3362
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
3363
|
-
*/
|
|
3364
|
-
public async listConnectedSourcesFromWarehouseV1(
|
|
3365
|
-
warehouseId: string,
|
|
3366
|
-
pagination: PaginationInput,
|
|
3367
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3368
|
-
): Promise<{
|
|
3369
|
-
response: http.IncomingMessage;
|
|
3370
|
-
body: ListConnectedSourcesFromWarehouse200Response;
|
|
3371
|
-
}> {
|
|
3372
|
-
const localVarPath =
|
|
3373
|
-
this.basePath +
|
|
3374
|
-
'/warehouses/{warehouseId}/connected-sources'.replace(
|
|
3375
|
-
'{' + 'warehouseId' + '}',
|
|
3376
|
-
encodeURIComponent(String(warehouseId))
|
|
3377
|
-
);
|
|
3378
|
-
let localVarQueryParameters: any = {};
|
|
3379
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3380
|
-
{},
|
|
3381
|
-
this._defaultHeaders
|
|
3382
|
-
);
|
|
3383
|
-
const produces = [
|
|
3384
|
-
'application/vnd.segment.v1+json',
|
|
3385
|
-
'application/json',
|
|
3386
|
-
];
|
|
3387
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3388
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3389
|
-
} else {
|
|
3390
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3391
|
-
}
|
|
3392
|
-
let localVarFormParams: any = {};
|
|
3393
|
-
|
|
3394
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
3395
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
3396
|
-
throw new Error(
|
|
3397
|
-
'Required parameter warehouseId was null or undefined when calling listConnectedSourcesFromWarehouseV1.'
|
|
3398
|
-
);
|
|
3399
|
-
}
|
|
3400
|
-
|
|
3401
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3402
|
-
if (pagination === null || pagination === undefined) {
|
|
3403
|
-
throw new Error(
|
|
3404
|
-
'Required parameter pagination was null or undefined when calling listConnectedSourcesFromWarehouseV1.'
|
|
3405
|
-
);
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
if (pagination !== undefined) {
|
|
3409
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3410
|
-
pagination,
|
|
3411
|
-
'PaginationInput'
|
|
3412
|
-
);
|
|
3413
|
-
}
|
|
3414
|
-
|
|
3415
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3416
|
-
|
|
3417
|
-
let localVarUseFormData = false;
|
|
3418
|
-
|
|
3419
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3420
|
-
method: 'GET',
|
|
3421
|
-
qs: localVarQueryParameters,
|
|
3422
|
-
headers: localVarHeaderParams,
|
|
3423
|
-
uri: localVarPath,
|
|
3424
|
-
useQuerystring: this._useQuerystring,
|
|
3425
|
-
json: true,
|
|
3426
|
-
};
|
|
3427
|
-
|
|
3428
|
-
let authenticationPromise = Promise.resolve();
|
|
3429
|
-
if (this.authentications.token.accessToken) {
|
|
3430
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3431
|
-
this.authentications.token.applyToRequest(
|
|
3432
|
-
localVarRequestOptions
|
|
3433
|
-
)
|
|
3434
|
-
);
|
|
3435
|
-
}
|
|
3436
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3437
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3438
|
-
);
|
|
3439
|
-
|
|
3440
|
-
let interceptorPromise = authenticationPromise;
|
|
3441
|
-
for (const interceptor of this.interceptors) {
|
|
3442
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3443
|
-
interceptor(localVarRequestOptions)
|
|
3444
|
-
);
|
|
3445
|
-
}
|
|
3446
|
-
|
|
3447
|
-
return interceptorPromise.then(() => {
|
|
3448
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3449
|
-
if (localVarUseFormData) {
|
|
3450
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3451
|
-
} else {
|
|
3452
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3453
|
-
}
|
|
3454
|
-
}
|
|
3455
|
-
return new Promise<{
|
|
3456
|
-
response: http.IncomingMessage;
|
|
3457
|
-
body: ListConnectedSourcesFromWarehouse200Response;
|
|
3458
|
-
}>((resolve, reject) => {
|
|
3459
|
-
localVarRequest(
|
|
3460
|
-
localVarRequestOptions,
|
|
3461
|
-
(error, response, body) => {
|
|
3462
|
-
if (error) {
|
|
3463
|
-
reject(error);
|
|
3464
|
-
} else {
|
|
3465
|
-
if (
|
|
3466
|
-
response.statusCode &&
|
|
3467
|
-
response.statusCode >= 200 &&
|
|
3468
|
-
response.statusCode <= 299
|
|
3469
|
-
) {
|
|
3470
|
-
body = ObjectSerializer.deserialize(
|
|
3471
|
-
body,
|
|
3472
|
-
'ListConnectedSourcesFromWarehouse200Response'
|
|
3473
|
-
);
|
|
3474
|
-
resolve({ response: response, body: body });
|
|
3475
|
-
} else {
|
|
3476
|
-
reject(
|
|
3477
|
-
new HttpError(
|
|
3478
|
-
response,
|
|
3479
|
-
body,
|
|
3480
|
-
response.statusCode
|
|
3481
|
-
)
|
|
3482
|
-
);
|
|
3483
|
-
}
|
|
3484
|
-
}
|
|
3485
|
-
}
|
|
3486
|
-
);
|
|
3487
|
-
});
|
|
3488
|
-
});
|
|
3489
|
-
}
|
|
3490
|
-
/**
|
|
3491
|
-
* Returns a list of Warehouses.
|
|
3492
|
-
* @summary List Warehouses
|
|
3493
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
3494
|
-
*/
|
|
3495
|
-
public async listWarehousesAlpha(
|
|
3496
|
-
pagination: PaginationInput,
|
|
3497
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3498
|
-
): Promise<{
|
|
3499
|
-
response: http.IncomingMessage;
|
|
3500
|
-
body: ListWarehouses200Response;
|
|
3501
|
-
}> {
|
|
3502
|
-
const localVarPath = this.basePath + '/warehouses';
|
|
3503
|
-
let localVarQueryParameters: any = {};
|
|
3504
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3505
|
-
{},
|
|
3506
|
-
this._defaultHeaders
|
|
3507
|
-
);
|
|
3508
|
-
const produces = [
|
|
3509
|
-
'application/vnd.segment.v1alpha+json',
|
|
3510
|
-
'application/json',
|
|
3511
|
-
];
|
|
3512
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3513
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3514
|
-
} else {
|
|
3515
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3516
|
-
}
|
|
3517
|
-
let localVarFormParams: any = {};
|
|
3518
|
-
|
|
3519
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3520
|
-
if (pagination === null || pagination === undefined) {
|
|
3521
|
-
throw new Error(
|
|
3522
|
-
'Required parameter pagination was null or undefined when calling listWarehousesAlpha.'
|
|
3523
|
-
);
|
|
3524
|
-
}
|
|
3525
|
-
|
|
3526
|
-
if (pagination !== undefined) {
|
|
3527
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3528
|
-
pagination,
|
|
3529
|
-
'PaginationInput'
|
|
3530
|
-
);
|
|
3531
|
-
}
|
|
3532
|
-
|
|
3533
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3534
|
-
|
|
3535
|
-
let localVarUseFormData = false;
|
|
3536
|
-
|
|
3537
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3538
|
-
method: 'GET',
|
|
3539
|
-
qs: localVarQueryParameters,
|
|
3540
|
-
headers: localVarHeaderParams,
|
|
3541
|
-
uri: localVarPath,
|
|
3542
|
-
useQuerystring: this._useQuerystring,
|
|
3543
|
-
json: true,
|
|
3544
|
-
};
|
|
3545
|
-
|
|
3546
|
-
let authenticationPromise = Promise.resolve();
|
|
3547
|
-
if (this.authentications.token.accessToken) {
|
|
3548
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3549
|
-
this.authentications.token.applyToRequest(
|
|
3550
|
-
localVarRequestOptions
|
|
3551
|
-
)
|
|
3552
|
-
);
|
|
3553
|
-
}
|
|
3554
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3555
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3556
|
-
);
|
|
3557
|
-
|
|
3558
|
-
let interceptorPromise = authenticationPromise;
|
|
3559
|
-
for (const interceptor of this.interceptors) {
|
|
3560
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3561
|
-
interceptor(localVarRequestOptions)
|
|
3562
|
-
);
|
|
3563
|
-
}
|
|
3564
|
-
|
|
3565
|
-
return interceptorPromise.then(() => {
|
|
3566
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3567
|
-
if (localVarUseFormData) {
|
|
3568
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3569
|
-
} else {
|
|
3570
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3571
|
-
}
|
|
3572
|
-
}
|
|
3573
|
-
return new Promise<{
|
|
3574
|
-
response: http.IncomingMessage;
|
|
3575
|
-
body: ListWarehouses200Response;
|
|
3576
|
-
}>((resolve, reject) => {
|
|
3577
|
-
localVarRequest(
|
|
3578
|
-
localVarRequestOptions,
|
|
3579
|
-
(error, response, body) => {
|
|
3580
|
-
if (error) {
|
|
3581
|
-
reject(error);
|
|
3582
|
-
} else {
|
|
3583
|
-
if (
|
|
3584
|
-
response.statusCode &&
|
|
3585
|
-
response.statusCode >= 200 &&
|
|
3586
|
-
response.statusCode <= 299
|
|
3587
|
-
) {
|
|
3588
|
-
body = ObjectSerializer.deserialize(
|
|
3589
|
-
body,
|
|
3590
|
-
'ListWarehouses200Response'
|
|
3591
|
-
);
|
|
3592
|
-
resolve({ response: response, body: body });
|
|
3593
|
-
} else {
|
|
3594
|
-
reject(
|
|
3595
|
-
new HttpError(
|
|
3596
|
-
response,
|
|
3597
|
-
body,
|
|
3598
|
-
response.statusCode
|
|
3599
|
-
)
|
|
3600
|
-
);
|
|
3601
|
-
}
|
|
3602
|
-
}
|
|
3603
|
-
}
|
|
3604
|
-
);
|
|
3605
|
-
});
|
|
3606
|
-
});
|
|
3607
|
-
}
|
|
3608
|
-
/**
|
|
3609
|
-
* Returns a list of Warehouses.
|
|
3610
|
-
* @summary List Warehouses
|
|
3611
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
3612
|
-
*/
|
|
3613
|
-
public async listWarehousesBeta(
|
|
3614
|
-
pagination: PaginationInput,
|
|
3615
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3616
|
-
): Promise<{
|
|
3617
|
-
response: http.IncomingMessage;
|
|
3618
|
-
body: ListWarehouses200Response;
|
|
3619
|
-
}> {
|
|
3620
|
-
const localVarPath = this.basePath + '/warehouses';
|
|
3621
|
-
let localVarQueryParameters: any = {};
|
|
3622
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3623
|
-
{},
|
|
3624
|
-
this._defaultHeaders
|
|
3625
|
-
);
|
|
3626
|
-
const produces = [
|
|
3627
|
-
'application/vnd.segment.v1beta+json',
|
|
3628
|
-
'application/json',
|
|
3629
|
-
];
|
|
3630
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3631
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3632
|
-
} else {
|
|
3633
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3634
|
-
}
|
|
3635
|
-
let localVarFormParams: any = {};
|
|
3636
|
-
|
|
3637
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3638
|
-
if (pagination === null || pagination === undefined) {
|
|
3639
|
-
throw new Error(
|
|
3640
|
-
'Required parameter pagination was null or undefined when calling listWarehousesBeta.'
|
|
3641
|
-
);
|
|
3642
|
-
}
|
|
3643
|
-
|
|
3644
|
-
if (pagination !== undefined) {
|
|
3645
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3646
|
-
pagination,
|
|
3647
|
-
'PaginationInput'
|
|
3648
|
-
);
|
|
3649
|
-
}
|
|
3650
|
-
|
|
3651
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3652
|
-
|
|
3653
|
-
let localVarUseFormData = false;
|
|
3654
|
-
|
|
3655
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3656
|
-
method: 'GET',
|
|
3657
|
-
qs: localVarQueryParameters,
|
|
3658
|
-
headers: localVarHeaderParams,
|
|
3659
|
-
uri: localVarPath,
|
|
3660
|
-
useQuerystring: this._useQuerystring,
|
|
3661
|
-
json: true,
|
|
3662
|
-
};
|
|
3663
|
-
|
|
3664
|
-
let authenticationPromise = Promise.resolve();
|
|
3665
|
-
if (this.authentications.token.accessToken) {
|
|
3666
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3667
|
-
this.authentications.token.applyToRequest(
|
|
3668
|
-
localVarRequestOptions
|
|
3669
|
-
)
|
|
3670
|
-
);
|
|
3671
|
-
}
|
|
3672
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3673
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3674
|
-
);
|
|
3675
|
-
|
|
3676
|
-
let interceptorPromise = authenticationPromise;
|
|
3677
|
-
for (const interceptor of this.interceptors) {
|
|
3678
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3679
|
-
interceptor(localVarRequestOptions)
|
|
3680
|
-
);
|
|
3681
|
-
}
|
|
3682
|
-
|
|
3683
|
-
return interceptorPromise.then(() => {
|
|
3684
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3685
|
-
if (localVarUseFormData) {
|
|
3686
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3687
|
-
} else {
|
|
3688
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3689
|
-
}
|
|
3690
|
-
}
|
|
3691
|
-
return new Promise<{
|
|
3692
|
-
response: http.IncomingMessage;
|
|
3693
|
-
body: ListWarehouses200Response;
|
|
3694
|
-
}>((resolve, reject) => {
|
|
3695
|
-
localVarRequest(
|
|
3696
|
-
localVarRequestOptions,
|
|
3697
|
-
(error, response, body) => {
|
|
3698
|
-
if (error) {
|
|
3699
|
-
reject(error);
|
|
3700
|
-
} else {
|
|
3701
|
-
if (
|
|
3702
|
-
response.statusCode &&
|
|
3703
|
-
response.statusCode >= 200 &&
|
|
3704
|
-
response.statusCode <= 299
|
|
3705
|
-
) {
|
|
3706
|
-
body = ObjectSerializer.deserialize(
|
|
3707
|
-
body,
|
|
3708
|
-
'ListWarehouses200Response'
|
|
3709
|
-
);
|
|
3710
|
-
resolve({ response: response, body: body });
|
|
3711
|
-
} else {
|
|
3712
|
-
reject(
|
|
3713
|
-
new HttpError(
|
|
3714
|
-
response,
|
|
3715
|
-
body,
|
|
3716
|
-
response.statusCode
|
|
3717
|
-
)
|
|
3718
|
-
);
|
|
3719
|
-
}
|
|
3720
|
-
}
|
|
3721
|
-
}
|
|
3722
|
-
);
|
|
3723
|
-
});
|
|
3724
|
-
});
|
|
3725
|
-
}
|
|
3726
|
-
/**
|
|
3727
|
-
* Returns a list of Warehouses.
|
|
3728
|
-
* @summary List Warehouses
|
|
3729
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
3730
|
-
*/
|
|
3731
|
-
public async listWarehousesCurrent(
|
|
3732
|
-
pagination: PaginationInput,
|
|
3733
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3734
|
-
): Promise<{
|
|
3735
|
-
response: http.IncomingMessage;
|
|
3736
|
-
body: ListWarehouses200Response;
|
|
3737
|
-
}> {
|
|
3738
|
-
const localVarPath = this.basePath + '/warehouses';
|
|
3739
|
-
let localVarQueryParameters: any = {};
|
|
3740
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3741
|
-
{},
|
|
3742
|
-
this._defaultHeaders
|
|
3743
|
-
);
|
|
3744
|
-
const produces = ['application/json'];
|
|
3745
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3746
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3747
|
-
} else {
|
|
3748
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3749
|
-
}
|
|
3750
|
-
let localVarFormParams: any = {};
|
|
3751
|
-
|
|
3752
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3753
|
-
if (pagination === null || pagination === undefined) {
|
|
3754
|
-
throw new Error(
|
|
3755
|
-
'Required parameter pagination was null or undefined when calling listWarehousesCurrent.'
|
|
3756
|
-
);
|
|
3757
|
-
}
|
|
3758
|
-
|
|
3759
|
-
if (pagination !== undefined) {
|
|
3760
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3761
|
-
pagination,
|
|
3762
|
-
'PaginationInput'
|
|
3763
|
-
);
|
|
3764
|
-
}
|
|
3765
|
-
|
|
3766
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3767
|
-
|
|
3768
|
-
let localVarUseFormData = false;
|
|
3769
|
-
|
|
3770
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3771
|
-
method: 'GET',
|
|
3772
|
-
qs: localVarQueryParameters,
|
|
3773
|
-
headers: localVarHeaderParams,
|
|
3774
|
-
uri: localVarPath,
|
|
3775
|
-
useQuerystring: this._useQuerystring,
|
|
3776
|
-
json: true,
|
|
3777
|
-
};
|
|
3778
|
-
|
|
3779
|
-
let authenticationPromise = Promise.resolve();
|
|
3780
|
-
if (this.authentications.token.accessToken) {
|
|
3781
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3782
|
-
this.authentications.token.applyToRequest(
|
|
3783
|
-
localVarRequestOptions
|
|
3784
|
-
)
|
|
3785
|
-
);
|
|
3786
|
-
}
|
|
3787
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3788
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3789
|
-
);
|
|
3790
|
-
|
|
3791
|
-
let interceptorPromise = authenticationPromise;
|
|
3792
|
-
for (const interceptor of this.interceptors) {
|
|
3793
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3794
|
-
interceptor(localVarRequestOptions)
|
|
3795
|
-
);
|
|
3796
|
-
}
|
|
3797
|
-
|
|
3798
|
-
return interceptorPromise.then(() => {
|
|
3799
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3800
|
-
if (localVarUseFormData) {
|
|
3801
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3802
|
-
} else {
|
|
3803
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3804
|
-
}
|
|
3805
|
-
}
|
|
3806
|
-
return new Promise<{
|
|
3807
|
-
response: http.IncomingMessage;
|
|
3808
|
-
body: ListWarehouses200Response;
|
|
3809
|
-
}>((resolve, reject) => {
|
|
3810
|
-
localVarRequest(
|
|
3811
|
-
localVarRequestOptions,
|
|
3812
|
-
(error, response, body) => {
|
|
3813
|
-
if (error) {
|
|
3814
|
-
reject(error);
|
|
3815
|
-
} else {
|
|
3816
|
-
if (
|
|
3817
|
-
response.statusCode &&
|
|
3818
|
-
response.statusCode >= 200 &&
|
|
3819
|
-
response.statusCode <= 299
|
|
3820
|
-
) {
|
|
3821
|
-
body = ObjectSerializer.deserialize(
|
|
3822
|
-
body,
|
|
3823
|
-
'ListWarehouses200Response'
|
|
3824
|
-
);
|
|
3825
|
-
resolve({ response: response, body: body });
|
|
3826
|
-
} else {
|
|
3827
|
-
reject(
|
|
3828
|
-
new HttpError(
|
|
3829
|
-
response,
|
|
3830
|
-
body,
|
|
3831
|
-
response.statusCode
|
|
3832
|
-
)
|
|
3833
|
-
);
|
|
3834
|
-
}
|
|
3835
|
-
}
|
|
3836
|
-
}
|
|
3837
|
-
);
|
|
3838
|
-
});
|
|
3839
|
-
});
|
|
3840
|
-
}
|
|
3841
|
-
/**
|
|
3842
|
-
* Returns a list of Warehouses.
|
|
3843
|
-
* @summary List Warehouses
|
|
3844
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
3845
|
-
*/
|
|
3846
|
-
public async listWarehousesV1(
|
|
3847
|
-
pagination: PaginationInput,
|
|
3848
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3849
|
-
): Promise<{
|
|
3850
|
-
response: http.IncomingMessage;
|
|
3851
|
-
body: ListWarehouses200Response;
|
|
3852
|
-
}> {
|
|
3853
|
-
const localVarPath = this.basePath + '/warehouses';
|
|
3854
|
-
let localVarQueryParameters: any = {};
|
|
3855
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3856
|
-
{},
|
|
3857
|
-
this._defaultHeaders
|
|
3858
|
-
);
|
|
3859
|
-
const produces = [
|
|
3860
|
-
'application/vnd.segment.v1+json',
|
|
3861
|
-
'application/json',
|
|
3862
|
-
];
|
|
3863
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3864
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3865
|
-
} else {
|
|
3866
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3867
|
-
}
|
|
3868
|
-
let localVarFormParams: any = {};
|
|
3869
|
-
|
|
3870
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3871
|
-
if (pagination === null || pagination === undefined) {
|
|
3872
|
-
throw new Error(
|
|
3873
|
-
'Required parameter pagination was null or undefined when calling listWarehousesV1.'
|
|
3874
|
-
);
|
|
3875
|
-
}
|
|
3876
|
-
|
|
3877
|
-
if (pagination !== undefined) {
|
|
3878
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3879
|
-
pagination,
|
|
3880
|
-
'PaginationInput'
|
|
3881
|
-
);
|
|
3882
|
-
}
|
|
3883
|
-
|
|
3884
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3885
|
-
|
|
3886
|
-
let localVarUseFormData = false;
|
|
3887
|
-
|
|
3888
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3889
|
-
method: 'GET',
|
|
3890
|
-
qs: localVarQueryParameters,
|
|
3891
|
-
headers: localVarHeaderParams,
|
|
3892
|
-
uri: localVarPath,
|
|
3893
|
-
useQuerystring: this._useQuerystring,
|
|
3894
|
-
json: true,
|
|
3895
|
-
};
|
|
3896
|
-
|
|
3897
|
-
let authenticationPromise = Promise.resolve();
|
|
3898
|
-
if (this.authentications.token.accessToken) {
|
|
3899
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3900
|
-
this.authentications.token.applyToRequest(
|
|
3901
|
-
localVarRequestOptions
|
|
3902
|
-
)
|
|
3903
|
-
);
|
|
3904
|
-
}
|
|
3905
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3906
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3907
|
-
);
|
|
3908
|
-
|
|
3909
|
-
let interceptorPromise = authenticationPromise;
|
|
3910
|
-
for (const interceptor of this.interceptors) {
|
|
3911
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3912
|
-
interceptor(localVarRequestOptions)
|
|
3913
|
-
);
|
|
3914
|
-
}
|
|
3915
|
-
|
|
3916
|
-
return interceptorPromise.then(() => {
|
|
3917
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3918
|
-
if (localVarUseFormData) {
|
|
3919
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3920
|
-
} else {
|
|
3921
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3922
|
-
}
|
|
3923
|
-
}
|
|
3924
|
-
return new Promise<{
|
|
3925
|
-
response: http.IncomingMessage;
|
|
3926
|
-
body: ListWarehouses200Response;
|
|
3927
|
-
}>((resolve, reject) => {
|
|
3928
|
-
localVarRequest(
|
|
3929
|
-
localVarRequestOptions,
|
|
3930
|
-
(error, response, body) => {
|
|
3931
|
-
if (error) {
|
|
3932
|
-
reject(error);
|
|
3933
|
-
} else {
|
|
3934
|
-
if (
|
|
3935
|
-
response.statusCode &&
|
|
3936
|
-
response.statusCode >= 200 &&
|
|
3937
|
-
response.statusCode <= 299
|
|
3938
|
-
) {
|
|
3939
|
-
body = ObjectSerializer.deserialize(
|
|
3940
|
-
body,
|
|
3941
|
-
'ListWarehouses200Response'
|
|
3942
|
-
);
|
|
3943
|
-
resolve({ response: response, body: body });
|
|
3944
|
-
} else {
|
|
3945
|
-
reject(
|
|
3946
|
-
new HttpError(
|
|
3947
|
-
response,
|
|
3948
|
-
body,
|
|
3949
|
-
response.statusCode
|
|
3950
|
-
)
|
|
3951
|
-
);
|
|
3952
|
-
}
|
|
3953
|
-
}
|
|
3954
|
-
}
|
|
3955
|
-
);
|
|
3956
|
-
});
|
|
3957
|
-
});
|
|
3958
|
-
}
|
|
3959
|
-
/**
|
|
3960
|
-
* Disconnects a Source from a Warehouse.
|
|
3961
|
-
* @summary Remove Source Connection from Warehouse
|
|
3962
|
-
* @param warehouseId
|
|
3963
|
-
* @param sourceId
|
|
3964
|
-
*/
|
|
3965
|
-
public async removeSourceConnectionFromWarehouseAlpha(
|
|
3966
|
-
warehouseId: string,
|
|
3967
|
-
sourceId: string,
|
|
3968
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3969
|
-
): Promise<{
|
|
3970
|
-
response: http.IncomingMessage;
|
|
3971
|
-
body: RemoveSourceConnectionFromWarehouse200Response;
|
|
3972
|
-
}> {
|
|
3973
|
-
const localVarPath =
|
|
3974
|
-
this.basePath +
|
|
3975
|
-
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
3976
|
-
.replace(
|
|
3977
|
-
'{' + 'warehouseId' + '}',
|
|
3978
|
-
encodeURIComponent(String(warehouseId))
|
|
3979
|
-
)
|
|
3980
|
-
.replace(
|
|
3981
|
-
'{' + 'sourceId' + '}',
|
|
3982
|
-
encodeURIComponent(String(sourceId))
|
|
3983
|
-
);
|
|
3984
|
-
let localVarQueryParameters: any = {};
|
|
3985
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3986
|
-
{},
|
|
3987
|
-
this._defaultHeaders
|
|
3988
|
-
);
|
|
3989
|
-
const produces = [
|
|
3990
|
-
'application/vnd.segment.v1alpha+json',
|
|
3991
|
-
'application/json',
|
|
3992
|
-
];
|
|
3993
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3994
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3995
|
-
} else {
|
|
3996
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3997
|
-
}
|
|
3998
|
-
let localVarFormParams: any = {};
|
|
3999
|
-
|
|
4000
|
-
// verify required parameter 'warehouseId' is not null or undefined
|
|
4001
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
4002
|
-
throw new Error(
|
|
4003
|
-
'Required parameter warehouseId was null or undefined when calling removeSourceConnectionFromWarehouseAlpha.'
|
|
4004
|
-
);
|
|
4005
|
-
}
|
|
4006
|
-
|
|
4007
|
-
// verify required parameter 'sourceId' is not null or undefined
|
|
4008
|
-
if (sourceId === null || sourceId === undefined) {
|
|
4009
|
-
throw new Error(
|
|
4010
|
-
'Required parameter sourceId was null or undefined when calling removeSourceConnectionFromWarehouseAlpha.'
|
|
4011
|
-
);
|
|
4012
|
-
}
|
|
4013
|
-
|
|
4014
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
4015
|
-
|
|
4016
|
-
let localVarUseFormData = false;
|
|
4017
|
-
|
|
4018
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
4019
|
-
method: 'DELETE',
|
|
4020
|
-
qs: localVarQueryParameters,
|
|
4021
|
-
headers: localVarHeaderParams,
|
|
4022
|
-
uri: localVarPath,
|
|
4023
|
-
useQuerystring: this._useQuerystring,
|
|
4024
|
-
json: true,
|
|
4025
|
-
};
|
|
4026
|
-
|
|
4027
|
-
let authenticationPromise = Promise.resolve();
|
|
4028
|
-
if (this.authentications.token.accessToken) {
|
|
4029
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
4030
|
-
this.authentications.token.applyToRequest(
|
|
4031
|
-
localVarRequestOptions
|
|
4032
|
-
)
|
|
4033
|
-
);
|
|
4034
|
-
}
|
|
4035
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
4036
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
4037
|
-
);
|
|
4038
|
-
|
|
4039
|
-
let interceptorPromise = authenticationPromise;
|
|
4040
|
-
for (const interceptor of this.interceptors) {
|
|
4041
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
4042
|
-
interceptor(localVarRequestOptions)
|
|
4043
|
-
);
|
|
4044
|
-
}
|
|
4045
|
-
|
|
4046
|
-
return interceptorPromise.then(() => {
|
|
4047
|
-
if (Object.keys(localVarFormParams).length) {
|
|
4048
|
-
if (localVarUseFormData) {
|
|
4049
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
4050
|
-
} else {
|
|
4051
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
4052
|
-
}
|
|
4053
|
-
}
|
|
4054
|
-
return new Promise<{
|
|
4055
|
-
response: http.IncomingMessage;
|
|
4056
|
-
body: RemoveSourceConnectionFromWarehouse200Response;
|
|
463
|
+
body: CreateWarehouse200Response;
|
|
4057
464
|
}>((resolve, reject) => {
|
|
4058
465
|
localVarRequest(
|
|
4059
466
|
localVarRequestOptions,
|
|
@@ -4068,7 +475,7 @@ export class WarehousesApi {
|
|
|
4068
475
|
) {
|
|
4069
476
|
body = ObjectSerializer.deserialize(
|
|
4070
477
|
body,
|
|
4071
|
-
'
|
|
478
|
+
'CreateWarehouse200Response'
|
|
4072
479
|
);
|
|
4073
480
|
resolve({ response: response, body: body });
|
|
4074
481
|
} else {
|
|
@@ -4087,57 +494,46 @@ export class WarehousesApi {
|
|
|
4087
494
|
});
|
|
4088
495
|
}
|
|
4089
496
|
/**
|
|
4090
|
-
*
|
|
4091
|
-
* @summary
|
|
497
|
+
* Deletes an existing Warehouse. When called, this endpoint may generate the `Storage Destination Deleted` event in the [audit trail](/tag/Audit-Trail).
|
|
498
|
+
* @summary Delete Warehouse
|
|
4092
499
|
* @param warehouseId
|
|
4093
|
-
* @param sourceId
|
|
4094
500
|
*/
|
|
4095
|
-
public async
|
|
501
|
+
public async deleteWarehouse(
|
|
4096
502
|
warehouseId: string,
|
|
4097
|
-
sourceId: string,
|
|
4098
503
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
4099
504
|
): Promise<{
|
|
4100
505
|
response: http.IncomingMessage;
|
|
4101
|
-
body:
|
|
506
|
+
body: DeleteWarehouse200Response;
|
|
4102
507
|
}> {
|
|
4103
508
|
const localVarPath =
|
|
4104
509
|
this.basePath +
|
|
4105
|
-
'/warehouses/{warehouseId}
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
)
|
|
4110
|
-
.replace(
|
|
4111
|
-
'{' + 'sourceId' + '}',
|
|
4112
|
-
encodeURIComponent(String(sourceId))
|
|
4113
|
-
);
|
|
510
|
+
'/warehouses/{warehouseId}'.replace(
|
|
511
|
+
'{' + 'warehouseId' + '}',
|
|
512
|
+
encodeURIComponent(String(warehouseId))
|
|
513
|
+
);
|
|
4114
514
|
let localVarQueryParameters: any = {};
|
|
4115
515
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
4116
516
|
{},
|
|
4117
517
|
this._defaultHeaders
|
|
4118
518
|
);
|
|
4119
519
|
const produces = [
|
|
4120
|
-
'application/vnd.segment.
|
|
520
|
+
'application/vnd.segment.v1+json',
|
|
4121
521
|
'application/json',
|
|
522
|
+
'application/vnd.segment.v1beta+json',
|
|
523
|
+
'application/vnd.segment.v1alpha+json',
|
|
4122
524
|
];
|
|
525
|
+
// give precedence to 'application/json'
|
|
4123
526
|
if (produces.indexOf('application/json') >= 0) {
|
|
4124
|
-
localVarHeaderParams.Accept = produces[0];
|
|
4125
|
-
} else {
|
|
4126
527
|
localVarHeaderParams.Accept = 'application/json';
|
|
528
|
+
} else {
|
|
529
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4127
530
|
}
|
|
4128
531
|
let localVarFormParams: any = {};
|
|
4129
532
|
|
|
4130
533
|
// verify required parameter 'warehouseId' is not null or undefined
|
|
4131
534
|
if (warehouseId === null || warehouseId === undefined) {
|
|
4132
535
|
throw new Error(
|
|
4133
|
-
'Required parameter warehouseId was null or undefined when calling
|
|
4134
|
-
);
|
|
4135
|
-
}
|
|
4136
|
-
|
|
4137
|
-
// verify required parameter 'sourceId' is not null or undefined
|
|
4138
|
-
if (sourceId === null || sourceId === undefined) {
|
|
4139
|
-
throw new Error(
|
|
4140
|
-
'Required parameter sourceId was null or undefined when calling removeSourceConnectionFromWarehouseBeta.'
|
|
536
|
+
'Required parameter warehouseId was null or undefined when calling deleteWarehouse.'
|
|
4141
537
|
);
|
|
4142
538
|
}
|
|
4143
539
|
|
|
@@ -4183,7 +579,7 @@ export class WarehousesApi {
|
|
|
4183
579
|
}
|
|
4184
580
|
return new Promise<{
|
|
4185
581
|
response: http.IncomingMessage;
|
|
4186
|
-
body:
|
|
582
|
+
body: DeleteWarehouse200Response;
|
|
4187
583
|
}>((resolve, reject) => {
|
|
4188
584
|
localVarRequest(
|
|
4189
585
|
localVarRequestOptions,
|
|
@@ -4198,7 +594,7 @@ export class WarehousesApi {
|
|
|
4198
594
|
) {
|
|
4199
595
|
body = ObjectSerializer.deserialize(
|
|
4200
596
|
body,
|
|
4201
|
-
'
|
|
597
|
+
'DeleteWarehouse200Response'
|
|
4202
598
|
);
|
|
4203
599
|
resolve({ response: response, body: body });
|
|
4204
600
|
} else {
|
|
@@ -4217,54 +613,46 @@ export class WarehousesApi {
|
|
|
4217
613
|
});
|
|
4218
614
|
}
|
|
4219
615
|
/**
|
|
4220
|
-
*
|
|
4221
|
-
* @summary
|
|
616
|
+
* Verifies the state of Warehouse connection settings. The rate limit for this endpoint is 20 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
617
|
+
* @summary Get Connection State from Warehouse
|
|
4222
618
|
* @param warehouseId
|
|
4223
|
-
* @param sourceId
|
|
4224
619
|
*/
|
|
4225
|
-
public async
|
|
620
|
+
public async getConnectionStateFromWarehouse(
|
|
4226
621
|
warehouseId: string,
|
|
4227
|
-
sourceId: string,
|
|
4228
622
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
4229
623
|
): Promise<{
|
|
4230
624
|
response: http.IncomingMessage;
|
|
4231
|
-
body:
|
|
625
|
+
body: GetConnectionStateFromWarehouse200Response;
|
|
4232
626
|
}> {
|
|
4233
627
|
const localVarPath =
|
|
4234
628
|
this.basePath +
|
|
4235
|
-
'/warehouses/{warehouseId}/
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
)
|
|
4240
|
-
.replace(
|
|
4241
|
-
'{' + 'sourceId' + '}',
|
|
4242
|
-
encodeURIComponent(String(sourceId))
|
|
4243
|
-
);
|
|
629
|
+
'/warehouses/{warehouseId}/connection-state'.replace(
|
|
630
|
+
'{' + 'warehouseId' + '}',
|
|
631
|
+
encodeURIComponent(String(warehouseId))
|
|
632
|
+
);
|
|
4244
633
|
let localVarQueryParameters: any = {};
|
|
4245
634
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
4246
635
|
{},
|
|
4247
636
|
this._defaultHeaders
|
|
4248
637
|
);
|
|
4249
|
-
const produces = [
|
|
638
|
+
const produces = [
|
|
639
|
+
'application/vnd.segment.v1+json',
|
|
640
|
+
'application/json',
|
|
641
|
+
'application/vnd.segment.v1beta+json',
|
|
642
|
+
'application/vnd.segment.v1alpha+json',
|
|
643
|
+
];
|
|
644
|
+
// give precedence to 'application/json'
|
|
4250
645
|
if (produces.indexOf('application/json') >= 0) {
|
|
4251
|
-
localVarHeaderParams.Accept = produces[0];
|
|
4252
|
-
} else {
|
|
4253
646
|
localVarHeaderParams.Accept = 'application/json';
|
|
647
|
+
} else {
|
|
648
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4254
649
|
}
|
|
4255
650
|
let localVarFormParams: any = {};
|
|
4256
651
|
|
|
4257
652
|
// verify required parameter 'warehouseId' is not null or undefined
|
|
4258
653
|
if (warehouseId === null || warehouseId === undefined) {
|
|
4259
654
|
throw new Error(
|
|
4260
|
-
'Required parameter warehouseId was null or undefined when calling
|
|
4261
|
-
);
|
|
4262
|
-
}
|
|
4263
|
-
|
|
4264
|
-
// verify required parameter 'sourceId' is not null or undefined
|
|
4265
|
-
if (sourceId === null || sourceId === undefined) {
|
|
4266
|
-
throw new Error(
|
|
4267
|
-
'Required parameter sourceId was null or undefined when calling removeSourceConnectionFromWarehouseCurrent.'
|
|
655
|
+
'Required parameter warehouseId was null or undefined when calling getConnectionStateFromWarehouse.'
|
|
4268
656
|
);
|
|
4269
657
|
}
|
|
4270
658
|
|
|
@@ -4273,7 +661,7 @@ export class WarehousesApi {
|
|
|
4273
661
|
let localVarUseFormData = false;
|
|
4274
662
|
|
|
4275
663
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
4276
|
-
method: '
|
|
664
|
+
method: 'GET',
|
|
4277
665
|
qs: localVarQueryParameters,
|
|
4278
666
|
headers: localVarHeaderParams,
|
|
4279
667
|
uri: localVarPath,
|
|
@@ -4310,7 +698,7 @@ export class WarehousesApi {
|
|
|
4310
698
|
}
|
|
4311
699
|
return new Promise<{
|
|
4312
700
|
response: http.IncomingMessage;
|
|
4313
|
-
body:
|
|
701
|
+
body: GetConnectionStateFromWarehouse200Response;
|
|
4314
702
|
}>((resolve, reject) => {
|
|
4315
703
|
localVarRequest(
|
|
4316
704
|
localVarRequestOptions,
|
|
@@ -4325,7 +713,7 @@ export class WarehousesApi {
|
|
|
4325
713
|
) {
|
|
4326
714
|
body = ObjectSerializer.deserialize(
|
|
4327
715
|
body,
|
|
4328
|
-
'
|
|
716
|
+
'GetConnectionStateFromWarehouse200Response'
|
|
4329
717
|
);
|
|
4330
718
|
resolve({ response: response, body: body });
|
|
4331
719
|
} else {
|
|
@@ -4344,30 +732,23 @@ export class WarehousesApi {
|
|
|
4344
732
|
});
|
|
4345
733
|
}
|
|
4346
734
|
/**
|
|
4347
|
-
*
|
|
4348
|
-
* @summary
|
|
735
|
+
* Returns a Warehouse by its id.
|
|
736
|
+
* @summary Get Warehouse
|
|
4349
737
|
* @param warehouseId
|
|
4350
|
-
* @param sourceId
|
|
4351
738
|
*/
|
|
4352
|
-
public async
|
|
739
|
+
public async getWarehouse(
|
|
4353
740
|
warehouseId: string,
|
|
4354
|
-
sourceId: string,
|
|
4355
741
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
4356
742
|
): Promise<{
|
|
4357
743
|
response: http.IncomingMessage;
|
|
4358
|
-
body:
|
|
744
|
+
body: GetWarehouse200Response;
|
|
4359
745
|
}> {
|
|
4360
746
|
const localVarPath =
|
|
4361
747
|
this.basePath +
|
|
4362
|
-
'/warehouses/{warehouseId}
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
)
|
|
4367
|
-
.replace(
|
|
4368
|
-
'{' + 'sourceId' + '}',
|
|
4369
|
-
encodeURIComponent(String(sourceId))
|
|
4370
|
-
);
|
|
748
|
+
'/warehouses/{warehouseId}'.replace(
|
|
749
|
+
'{' + 'warehouseId' + '}',
|
|
750
|
+
encodeURIComponent(String(warehouseId))
|
|
751
|
+
);
|
|
4371
752
|
let localVarQueryParameters: any = {};
|
|
4372
753
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
4373
754
|
{},
|
|
@@ -4376,25 +757,21 @@ export class WarehousesApi {
|
|
|
4376
757
|
const produces = [
|
|
4377
758
|
'application/vnd.segment.v1+json',
|
|
4378
759
|
'application/json',
|
|
760
|
+
'application/vnd.segment.v1beta+json',
|
|
761
|
+
'application/vnd.segment.v1alpha+json',
|
|
4379
762
|
];
|
|
763
|
+
// give precedence to 'application/json'
|
|
4380
764
|
if (produces.indexOf('application/json') >= 0) {
|
|
4381
|
-
localVarHeaderParams.Accept = produces[0];
|
|
4382
|
-
} else {
|
|
4383
765
|
localVarHeaderParams.Accept = 'application/json';
|
|
766
|
+
} else {
|
|
767
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4384
768
|
}
|
|
4385
769
|
let localVarFormParams: any = {};
|
|
4386
770
|
|
|
4387
771
|
// verify required parameter 'warehouseId' is not null or undefined
|
|
4388
772
|
if (warehouseId === null || warehouseId === undefined) {
|
|
4389
773
|
throw new Error(
|
|
4390
|
-
'Required parameter warehouseId was null or undefined when calling
|
|
4391
|
-
);
|
|
4392
|
-
}
|
|
4393
|
-
|
|
4394
|
-
// verify required parameter 'sourceId' is not null or undefined
|
|
4395
|
-
if (sourceId === null || sourceId === undefined) {
|
|
4396
|
-
throw new Error(
|
|
4397
|
-
'Required parameter sourceId was null or undefined when calling removeSourceConnectionFromWarehouseV1.'
|
|
774
|
+
'Required parameter warehouseId was null or undefined when calling getWarehouse.'
|
|
4398
775
|
);
|
|
4399
776
|
}
|
|
4400
777
|
|
|
@@ -4403,7 +780,7 @@ export class WarehousesApi {
|
|
|
4403
780
|
let localVarUseFormData = false;
|
|
4404
781
|
|
|
4405
782
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
4406
|
-
method: '
|
|
783
|
+
method: 'GET',
|
|
4407
784
|
qs: localVarQueryParameters,
|
|
4408
785
|
headers: localVarHeaderParams,
|
|
4409
786
|
uri: localVarPath,
|
|
@@ -4440,7 +817,7 @@ export class WarehousesApi {
|
|
|
4440
817
|
}
|
|
4441
818
|
return new Promise<{
|
|
4442
819
|
response: http.IncomingMessage;
|
|
4443
|
-
body:
|
|
820
|
+
body: GetWarehouse200Response;
|
|
4444
821
|
}>((resolve, reject) => {
|
|
4445
822
|
localVarRequest(
|
|
4446
823
|
localVarRequestOptions,
|
|
@@ -4455,7 +832,7 @@ export class WarehousesApi {
|
|
|
4455
832
|
) {
|
|
4456
833
|
body = ObjectSerializer.deserialize(
|
|
4457
834
|
body,
|
|
4458
|
-
'
|
|
835
|
+
'GetWarehouse200Response'
|
|
4459
836
|
);
|
|
4460
837
|
resolve({ response: response, body: body });
|
|
4461
838
|
} else {
|
|
@@ -4474,22 +851,22 @@ export class WarehousesApi {
|
|
|
4474
851
|
});
|
|
4475
852
|
}
|
|
4476
853
|
/**
|
|
4477
|
-
*
|
|
4478
|
-
* @summary
|
|
854
|
+
* Returns the list of Sources that are connected to a Warehouse.
|
|
855
|
+
* @summary List Connected Sources from Warehouse
|
|
4479
856
|
* @param warehouseId
|
|
4480
|
-
* @param
|
|
857
|
+
* @param pagination Defines the pagination parameters. This parameter exists in v1.
|
|
4481
858
|
*/
|
|
4482
|
-
public async
|
|
859
|
+
public async listConnectedSourcesFromWarehouse(
|
|
4483
860
|
warehouseId: string,
|
|
4484
|
-
|
|
861
|
+
pagination: PaginationInput,
|
|
4485
862
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
4486
863
|
): Promise<{
|
|
4487
864
|
response: http.IncomingMessage;
|
|
4488
|
-
body:
|
|
865
|
+
body: ListConnectedSourcesFromWarehouse200Response;
|
|
4489
866
|
}> {
|
|
4490
867
|
const localVarPath =
|
|
4491
868
|
this.basePath +
|
|
4492
|
-
'/warehouses/{warehouseId}'.replace(
|
|
869
|
+
'/warehouses/{warehouseId}/connected-sources'.replace(
|
|
4493
870
|
'{' + 'warehouseId' + '}',
|
|
4494
871
|
encodeURIComponent(String(warehouseId))
|
|
4495
872
|
);
|
|
@@ -4499,30 +876,37 @@ export class WarehousesApi {
|
|
|
4499
876
|
this._defaultHeaders
|
|
4500
877
|
);
|
|
4501
878
|
const produces = [
|
|
4502
|
-
'application/vnd.segment.
|
|
879
|
+
'application/vnd.segment.v1+json',
|
|
4503
880
|
'application/json',
|
|
881
|
+
'application/vnd.segment.v1beta+json',
|
|
882
|
+
'application/vnd.segment.v1alpha+json',
|
|
4504
883
|
];
|
|
884
|
+
// give precedence to 'application/json'
|
|
4505
885
|
if (produces.indexOf('application/json') >= 0) {
|
|
4506
|
-
localVarHeaderParams.Accept = produces[0];
|
|
4507
|
-
} else {
|
|
4508
886
|
localVarHeaderParams.Accept = 'application/json';
|
|
887
|
+
} else {
|
|
888
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4509
889
|
}
|
|
4510
890
|
let localVarFormParams: any = {};
|
|
4511
891
|
|
|
4512
892
|
// verify required parameter 'warehouseId' is not null or undefined
|
|
4513
893
|
if (warehouseId === null || warehouseId === undefined) {
|
|
4514
894
|
throw new Error(
|
|
4515
|
-
'Required parameter warehouseId was null or undefined when calling
|
|
895
|
+
'Required parameter warehouseId was null or undefined when calling listConnectedSourcesFromWarehouse.'
|
|
4516
896
|
);
|
|
4517
897
|
}
|
|
4518
898
|
|
|
4519
|
-
// verify required parameter '
|
|
4520
|
-
if (
|
|
4521
|
-
UpdateWarehouseV1Input === null ||
|
|
4522
|
-
UpdateWarehouseV1Input === undefined
|
|
4523
|
-
) {
|
|
899
|
+
// verify required parameter 'pagination' is not null or undefined
|
|
900
|
+
if (pagination === null || pagination === undefined) {
|
|
4524
901
|
throw new Error(
|
|
4525
|
-
'Required parameter
|
|
902
|
+
'Required parameter pagination was null or undefined when calling listConnectedSourcesFromWarehouse.'
|
|
903
|
+
);
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
if (pagination !== undefined) {
|
|
907
|
+
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
908
|
+
pagination,
|
|
909
|
+
'PaginationInput'
|
|
4526
910
|
);
|
|
4527
911
|
}
|
|
4528
912
|
|
|
@@ -4531,16 +915,12 @@ export class WarehousesApi {
|
|
|
4531
915
|
let localVarUseFormData = false;
|
|
4532
916
|
|
|
4533
917
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
4534
|
-
method: '
|
|
918
|
+
method: 'GET',
|
|
4535
919
|
qs: localVarQueryParameters,
|
|
4536
920
|
headers: localVarHeaderParams,
|
|
4537
921
|
uri: localVarPath,
|
|
4538
922
|
useQuerystring: this._useQuerystring,
|
|
4539
923
|
json: true,
|
|
4540
|
-
body: ObjectSerializer.serialize(
|
|
4541
|
-
UpdateWarehouseV1Input,
|
|
4542
|
-
'UpdateWarehouseV1Input'
|
|
4543
|
-
),
|
|
4544
924
|
};
|
|
4545
925
|
|
|
4546
926
|
let authenticationPromise = Promise.resolve();
|
|
@@ -4572,7 +952,7 @@ export class WarehousesApi {
|
|
|
4572
952
|
}
|
|
4573
953
|
return new Promise<{
|
|
4574
954
|
response: http.IncomingMessage;
|
|
4575
|
-
body:
|
|
955
|
+
body: ListConnectedSourcesFromWarehouse200Response;
|
|
4576
956
|
}>((resolve, reject) => {
|
|
4577
957
|
localVarRequest(
|
|
4578
958
|
localVarRequestOptions,
|
|
@@ -4587,7 +967,7 @@ export class WarehousesApi {
|
|
|
4587
967
|
) {
|
|
4588
968
|
body = ObjectSerializer.deserialize(
|
|
4589
969
|
body,
|
|
4590
|
-
'
|
|
970
|
+
'ListConnectedSourcesFromWarehouse200Response'
|
|
4591
971
|
);
|
|
4592
972
|
resolve({ response: response, body: body });
|
|
4593
973
|
} else {
|
|
@@ -4606,55 +986,48 @@ export class WarehousesApi {
|
|
|
4606
986
|
});
|
|
4607
987
|
}
|
|
4608
988
|
/**
|
|
4609
|
-
*
|
|
4610
|
-
* @summary
|
|
4611
|
-
* @param
|
|
4612
|
-
* @param UpdateWarehouseV1Input
|
|
989
|
+
* Returns a list of Warehouses.
|
|
990
|
+
* @summary List Warehouses
|
|
991
|
+
* @param pagination Defines the pagination parameters. This parameter exists in v1.
|
|
4613
992
|
*/
|
|
4614
|
-
public async
|
|
4615
|
-
|
|
4616
|
-
UpdateWarehouseV1Input: UpdateWarehouseV1Input,
|
|
993
|
+
public async listWarehouses(
|
|
994
|
+
pagination: PaginationInput,
|
|
4617
995
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
4618
996
|
): Promise<{
|
|
4619
997
|
response: http.IncomingMessage;
|
|
4620
|
-
body:
|
|
998
|
+
body: ListWarehouses200Response;
|
|
4621
999
|
}> {
|
|
4622
|
-
const localVarPath =
|
|
4623
|
-
this.basePath +
|
|
4624
|
-
'/warehouses/{warehouseId}'.replace(
|
|
4625
|
-
'{' + 'warehouseId' + '}',
|
|
4626
|
-
encodeURIComponent(String(warehouseId))
|
|
4627
|
-
);
|
|
1000
|
+
const localVarPath = this.basePath + '/warehouses';
|
|
4628
1001
|
let localVarQueryParameters: any = {};
|
|
4629
1002
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
4630
1003
|
{},
|
|
4631
1004
|
this._defaultHeaders
|
|
4632
1005
|
);
|
|
4633
1006
|
const produces = [
|
|
4634
|
-
'application/vnd.segment.
|
|
1007
|
+
'application/vnd.segment.v1+json',
|
|
4635
1008
|
'application/json',
|
|
1009
|
+
'application/vnd.segment.v1beta+json',
|
|
1010
|
+
'application/vnd.segment.v1alpha+json',
|
|
4636
1011
|
];
|
|
1012
|
+
// give precedence to 'application/json'
|
|
4637
1013
|
if (produces.indexOf('application/json') >= 0) {
|
|
4638
|
-
localVarHeaderParams.Accept = produces[0];
|
|
4639
|
-
} else {
|
|
4640
1014
|
localVarHeaderParams.Accept = 'application/json';
|
|
1015
|
+
} else {
|
|
1016
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4641
1017
|
}
|
|
4642
1018
|
let localVarFormParams: any = {};
|
|
4643
1019
|
|
|
4644
|
-
// verify required parameter '
|
|
4645
|
-
if (
|
|
1020
|
+
// verify required parameter 'pagination' is not null or undefined
|
|
1021
|
+
if (pagination === null || pagination === undefined) {
|
|
4646
1022
|
throw new Error(
|
|
4647
|
-
'Required parameter
|
|
1023
|
+
'Required parameter pagination was null or undefined when calling listWarehouses.'
|
|
4648
1024
|
);
|
|
4649
1025
|
}
|
|
4650
1026
|
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
) {
|
|
4656
|
-
throw new Error(
|
|
4657
|
-
'Required parameter UpdateWarehouseV1Input was null or undefined when calling updateWarehouseBeta.'
|
|
1027
|
+
if (pagination !== undefined) {
|
|
1028
|
+
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
1029
|
+
pagination,
|
|
1030
|
+
'PaginationInput'
|
|
4658
1031
|
);
|
|
4659
1032
|
}
|
|
4660
1033
|
|
|
@@ -4663,16 +1036,12 @@ export class WarehousesApi {
|
|
|
4663
1036
|
let localVarUseFormData = false;
|
|
4664
1037
|
|
|
4665
1038
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
4666
|
-
method: '
|
|
1039
|
+
method: 'GET',
|
|
4667
1040
|
qs: localVarQueryParameters,
|
|
4668
1041
|
headers: localVarHeaderParams,
|
|
4669
1042
|
uri: localVarPath,
|
|
4670
1043
|
useQuerystring: this._useQuerystring,
|
|
4671
1044
|
json: true,
|
|
4672
|
-
body: ObjectSerializer.serialize(
|
|
4673
|
-
UpdateWarehouseV1Input,
|
|
4674
|
-
'UpdateWarehouseV1Input'
|
|
4675
|
-
),
|
|
4676
1045
|
};
|
|
4677
1046
|
|
|
4678
1047
|
let authenticationPromise = Promise.resolve();
|
|
@@ -4704,7 +1073,7 @@ export class WarehousesApi {
|
|
|
4704
1073
|
}
|
|
4705
1074
|
return new Promise<{
|
|
4706
1075
|
response: http.IncomingMessage;
|
|
4707
|
-
body:
|
|
1076
|
+
body: ListWarehouses200Response;
|
|
4708
1077
|
}>((resolve, reject) => {
|
|
4709
1078
|
localVarRequest(
|
|
4710
1079
|
localVarRequestOptions,
|
|
@@ -4719,7 +1088,7 @@ export class WarehousesApi {
|
|
|
4719
1088
|
) {
|
|
4720
1089
|
body = ObjectSerializer.deserialize(
|
|
4721
1090
|
body,
|
|
4722
|
-
'
|
|
1091
|
+
'ListWarehouses200Response'
|
|
4723
1092
|
);
|
|
4724
1093
|
resolve({ response: response, body: body });
|
|
4725
1094
|
} else {
|
|
@@ -4738,25 +1107,30 @@ export class WarehousesApi {
|
|
|
4738
1107
|
});
|
|
4739
1108
|
}
|
|
4740
1109
|
/**
|
|
4741
|
-
*
|
|
4742
|
-
* @summary
|
|
1110
|
+
* Disconnects a Source from a Warehouse.
|
|
1111
|
+
* @summary Remove Source Connection from Warehouse
|
|
4743
1112
|
* @param warehouseId
|
|
4744
|
-
* @param
|
|
1113
|
+
* @param sourceId
|
|
4745
1114
|
*/
|
|
4746
|
-
public async
|
|
1115
|
+
public async removeSourceConnectionFromWarehouse(
|
|
4747
1116
|
warehouseId: string,
|
|
4748
|
-
|
|
1117
|
+
sourceId: string,
|
|
4749
1118
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
4750
1119
|
): Promise<{
|
|
4751
1120
|
response: http.IncomingMessage;
|
|
4752
|
-
body:
|
|
1121
|
+
body: RemoveSourceConnectionFromWarehouse200Response;
|
|
4753
1122
|
}> {
|
|
4754
1123
|
const localVarPath =
|
|
4755
1124
|
this.basePath +
|
|
4756
|
-
'/warehouses/{warehouseId}'
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
1125
|
+
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
1126
|
+
.replace(
|
|
1127
|
+
'{' + 'warehouseId' + '}',
|
|
1128
|
+
encodeURIComponent(String(warehouseId))
|
|
1129
|
+
)
|
|
1130
|
+
.replace(
|
|
1131
|
+
'{' + 'sourceId' + '}',
|
|
1132
|
+
encodeURIComponent(String(sourceId))
|
|
1133
|
+
);
|
|
4760
1134
|
let localVarQueryParameters: any = {};
|
|
4761
1135
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
4762
1136
|
{},
|
|
@@ -4765,28 +1139,28 @@ export class WarehousesApi {
|
|
|
4765
1139
|
const produces = [
|
|
4766
1140
|
'application/vnd.segment.v1+json',
|
|
4767
1141
|
'application/json',
|
|
1142
|
+
'application/vnd.segment.v1beta+json',
|
|
1143
|
+
'application/vnd.segment.v1alpha+json',
|
|
4768
1144
|
];
|
|
1145
|
+
// give precedence to 'application/json'
|
|
4769
1146
|
if (produces.indexOf('application/json') >= 0) {
|
|
4770
|
-
localVarHeaderParams.Accept = produces[0];
|
|
4771
|
-
} else {
|
|
4772
1147
|
localVarHeaderParams.Accept = 'application/json';
|
|
1148
|
+
} else {
|
|
1149
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4773
1150
|
}
|
|
4774
1151
|
let localVarFormParams: any = {};
|
|
4775
1152
|
|
|
4776
1153
|
// verify required parameter 'warehouseId' is not null or undefined
|
|
4777
1154
|
if (warehouseId === null || warehouseId === undefined) {
|
|
4778
1155
|
throw new Error(
|
|
4779
|
-
'Required parameter warehouseId was null or undefined when calling
|
|
1156
|
+
'Required parameter warehouseId was null or undefined when calling removeSourceConnectionFromWarehouse.'
|
|
4780
1157
|
);
|
|
4781
1158
|
}
|
|
4782
1159
|
|
|
4783
|
-
// verify required parameter '
|
|
4784
|
-
if (
|
|
4785
|
-
UpdateWarehouseV1Input === null ||
|
|
4786
|
-
UpdateWarehouseV1Input === undefined
|
|
4787
|
-
) {
|
|
1160
|
+
// verify required parameter 'sourceId' is not null or undefined
|
|
1161
|
+
if (sourceId === null || sourceId === undefined) {
|
|
4788
1162
|
throw new Error(
|
|
4789
|
-
'Required parameter
|
|
1163
|
+
'Required parameter sourceId was null or undefined when calling removeSourceConnectionFromWarehouse.'
|
|
4790
1164
|
);
|
|
4791
1165
|
}
|
|
4792
1166
|
|
|
@@ -4795,16 +1169,12 @@ export class WarehousesApi {
|
|
|
4795
1169
|
let localVarUseFormData = false;
|
|
4796
1170
|
|
|
4797
1171
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
4798
|
-
method: '
|
|
1172
|
+
method: 'DELETE',
|
|
4799
1173
|
qs: localVarQueryParameters,
|
|
4800
1174
|
headers: localVarHeaderParams,
|
|
4801
1175
|
uri: localVarPath,
|
|
4802
1176
|
useQuerystring: this._useQuerystring,
|
|
4803
1177
|
json: true,
|
|
4804
|
-
body: ObjectSerializer.serialize(
|
|
4805
|
-
UpdateWarehouseV1Input,
|
|
4806
|
-
'UpdateWarehouseV1Input'
|
|
4807
|
-
),
|
|
4808
1178
|
};
|
|
4809
1179
|
|
|
4810
1180
|
let authenticationPromise = Promise.resolve();
|
|
@@ -4836,7 +1206,7 @@ export class WarehousesApi {
|
|
|
4836
1206
|
}
|
|
4837
1207
|
return new Promise<{
|
|
4838
1208
|
response: http.IncomingMessage;
|
|
4839
|
-
body:
|
|
1209
|
+
body: RemoveSourceConnectionFromWarehouse200Response;
|
|
4840
1210
|
}>((resolve, reject) => {
|
|
4841
1211
|
localVarRequest(
|
|
4842
1212
|
localVarRequestOptions,
|
|
@@ -4851,7 +1221,7 @@ export class WarehousesApi {
|
|
|
4851
1221
|
) {
|
|
4852
1222
|
body = ObjectSerializer.deserialize(
|
|
4853
1223
|
body,
|
|
4854
|
-
'
|
|
1224
|
+
'RemoveSourceConnectionFromWarehouse200Response'
|
|
4855
1225
|
);
|
|
4856
1226
|
resolve({ response: response, body: body });
|
|
4857
1227
|
} else {
|
|
@@ -4870,12 +1240,12 @@ export class WarehousesApi {
|
|
|
4870
1240
|
});
|
|
4871
1241
|
}
|
|
4872
1242
|
/**
|
|
4873
|
-
* Updates an existing Warehouse. When called, this endpoint may generate one or more of the following [
|
|
1243
|
+
* Updates an existing Warehouse. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Storage Destination Modified * Storage Destination Enabled
|
|
4874
1244
|
* @summary Update Warehouse
|
|
4875
1245
|
* @param warehouseId
|
|
4876
1246
|
* @param UpdateWarehouseV1Input
|
|
4877
1247
|
*/
|
|
4878
|
-
public async
|
|
1248
|
+
public async updateWarehouse(
|
|
4879
1249
|
warehouseId: string,
|
|
4880
1250
|
UpdateWarehouseV1Input: UpdateWarehouseV1Input,
|
|
4881
1251
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
@@ -4897,18 +1267,21 @@ export class WarehousesApi {
|
|
|
4897
1267
|
const produces = [
|
|
4898
1268
|
'application/vnd.segment.v1+json',
|
|
4899
1269
|
'application/json',
|
|
1270
|
+
'application/vnd.segment.v1beta+json',
|
|
1271
|
+
'application/vnd.segment.v1alpha+json',
|
|
4900
1272
|
];
|
|
1273
|
+
// give precedence to 'application/json'
|
|
4901
1274
|
if (produces.indexOf('application/json') >= 0) {
|
|
4902
|
-
localVarHeaderParams.Accept = produces[0];
|
|
4903
|
-
} else {
|
|
4904
1275
|
localVarHeaderParams.Accept = 'application/json';
|
|
1276
|
+
} else {
|
|
1277
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4905
1278
|
}
|
|
4906
1279
|
let localVarFormParams: any = {};
|
|
4907
1280
|
|
|
4908
1281
|
// verify required parameter 'warehouseId' is not null or undefined
|
|
4909
1282
|
if (warehouseId === null || warehouseId === undefined) {
|
|
4910
1283
|
throw new Error(
|
|
4911
|
-
'Required parameter warehouseId was null or undefined when calling
|
|
1284
|
+
'Required parameter warehouseId was null or undefined when calling updateWarehouse.'
|
|
4912
1285
|
);
|
|
4913
1286
|
}
|
|
4914
1287
|
|
|
@@ -4918,7 +1291,7 @@ export class WarehousesApi {
|
|
|
4918
1291
|
UpdateWarehouseV1Input === undefined
|
|
4919
1292
|
) {
|
|
4920
1293
|
throw new Error(
|
|
4921
|
-
'Required parameter UpdateWarehouseV1Input was null or undefined when calling
|
|
1294
|
+
'Required parameter UpdateWarehouseV1Input was null or undefined when calling updateWarehouse.'
|
|
4922
1295
|
);
|
|
4923
1296
|
}
|
|
4924
1297
|
|