@segment/public-api-sdk-typescript 32.0.2-b5006 → 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 +1 -1
- package/tests/__snapshots__/smoke.test.ts.snap +9 -9
- package/tests/smoke.test.ts +6 -6
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -112,7 +112,7 @@ var WarehousesApi = (function () {
|
|
|
112
112
|
WarehousesApi.prototype.addInterceptor = function (interceptor) {
|
|
113
113
|
this.interceptors.push(interceptor);
|
|
114
114
|
};
|
|
115
|
-
WarehousesApi.prototype.
|
|
115
|
+
WarehousesApi.prototype.addConnectionFromSourceToWarehouse = function (warehouseId, sourceId, options) {
|
|
116
116
|
if (options === void 0) { options = { headers: {} }; }
|
|
117
117
|
return __awaiter(this, void 0, void 0, function () {
|
|
118
118
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_1, _i, _a, interceptor;
|
|
@@ -125,21 +125,23 @@ var WarehousesApi = (function () {
|
|
|
125
125
|
localVarQueryParameters = {};
|
|
126
126
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
127
127
|
produces = [
|
|
128
|
-
'application/vnd.segment.
|
|
128
|
+
'application/vnd.segment.v1+json',
|
|
129
129
|
'application/json',
|
|
130
|
+
'application/vnd.segment.v1beta+json',
|
|
131
|
+
'application/vnd.segment.v1alpha+json',
|
|
130
132
|
];
|
|
131
133
|
if (produces.indexOf('application/json') >= 0) {
|
|
132
|
-
localVarHeaderParams.Accept =
|
|
134
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
133
135
|
}
|
|
134
136
|
else {
|
|
135
|
-
localVarHeaderParams.Accept = '
|
|
137
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
136
138
|
}
|
|
137
139
|
localVarFormParams = {};
|
|
138
140
|
if (warehouseId === null || warehouseId === undefined) {
|
|
139
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling
|
|
141
|
+
throw new Error('Required parameter warehouseId was null or undefined when calling addConnectionFromSourceToWarehouse.');
|
|
140
142
|
}
|
|
141
143
|
if (sourceId === null || sourceId === undefined) {
|
|
142
|
-
throw new Error('Required parameter sourceId was null or undefined when calling
|
|
144
|
+
throw new Error('Required parameter sourceId was null or undefined when calling addConnectionFromSourceToWarehouse.');
|
|
143
145
|
}
|
|
144
146
|
Object.assign(localVarHeaderParams, options.headers);
|
|
145
147
|
localVarUseFormData = false;
|
|
@@ -201,34 +203,31 @@ var WarehousesApi = (function () {
|
|
|
201
203
|
});
|
|
202
204
|
});
|
|
203
205
|
};
|
|
204
|
-
WarehousesApi.prototype.
|
|
206
|
+
WarehousesApi.prototype.createValidationInWarehouse = function (CreateValidationInWarehouseV1Input, options) {
|
|
205
207
|
if (options === void 0) { options = { headers: {} }; }
|
|
206
208
|
return __awaiter(this, void 0, void 0, function () {
|
|
207
209
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_2, _i, _a, interceptor;
|
|
208
210
|
var _this = this;
|
|
209
211
|
return __generator(this, function (_b) {
|
|
210
|
-
localVarPath = this.basePath +
|
|
211
|
-
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
212
|
-
.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)))
|
|
213
|
-
.replace('{' + 'sourceId' + '}', encodeURIComponent(String(sourceId)));
|
|
212
|
+
localVarPath = this.basePath + '/warehouses/validation';
|
|
214
213
|
localVarQueryParameters = {};
|
|
215
214
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
216
215
|
produces = [
|
|
217
|
-
'application/vnd.segment.
|
|
216
|
+
'application/vnd.segment.v1+json',
|
|
218
217
|
'application/json',
|
|
218
|
+
'application/vnd.segment.v1beta+json',
|
|
219
|
+
'application/vnd.segment.v1alpha+json',
|
|
219
220
|
];
|
|
220
221
|
if (produces.indexOf('application/json') >= 0) {
|
|
221
|
-
localVarHeaderParams.Accept =
|
|
222
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
222
223
|
}
|
|
223
224
|
else {
|
|
224
|
-
localVarHeaderParams.Accept = '
|
|
225
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
225
226
|
}
|
|
226
227
|
localVarFormParams = {};
|
|
227
|
-
if (
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
if (sourceId === null || sourceId === undefined) {
|
|
231
|
-
throw new Error('Required parameter sourceId was null or undefined when calling addConnectionFromSourceToWarehouseBeta.');
|
|
228
|
+
if (CreateValidationInWarehouseV1Input === null ||
|
|
229
|
+
CreateValidationInWarehouseV1Input === undefined) {
|
|
230
|
+
throw new Error('Required parameter CreateValidationInWarehouseV1Input was null or undefined when calling createValidationInWarehouse.');
|
|
232
231
|
}
|
|
233
232
|
Object.assign(localVarHeaderParams, options.headers);
|
|
234
233
|
localVarUseFormData = false;
|
|
@@ -239,6 +238,7 @@ var WarehousesApi = (function () {
|
|
|
239
238
|
uri: localVarPath,
|
|
240
239
|
useQuerystring: this._useQuerystring,
|
|
241
240
|
json: true,
|
|
241
|
+
body: models_1.ObjectSerializer.serialize(CreateValidationInWarehouseV1Input, 'CreateValidationInWarehouseV1Input'),
|
|
242
242
|
};
|
|
243
243
|
authenticationPromise = Promise.resolve();
|
|
244
244
|
if (this.authentications.token.accessToken) {
|
|
@@ -277,7 +277,7 @@ var WarehousesApi = (function () {
|
|
|
277
277
|
if (response.statusCode &&
|
|
278
278
|
response.statusCode >= 200 &&
|
|
279
279
|
response.statusCode <= 299) {
|
|
280
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
280
|
+
body = models_1.ObjectSerializer.deserialize(body, 'CreateValidationInWarehouse200Response');
|
|
281
281
|
resolve({ response: response, body: body });
|
|
282
282
|
}
|
|
283
283
|
else {
|
|
@@ -290,31 +290,31 @@ var WarehousesApi = (function () {
|
|
|
290
290
|
});
|
|
291
291
|
});
|
|
292
292
|
};
|
|
293
|
-
WarehousesApi.prototype.
|
|
293
|
+
WarehousesApi.prototype.createWarehouse = function (CreateWarehouseV1Input, options) {
|
|
294
294
|
if (options === void 0) { options = { headers: {} }; }
|
|
295
295
|
return __awaiter(this, void 0, void 0, function () {
|
|
296
296
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_3, _i, _a, interceptor;
|
|
297
297
|
var _this = this;
|
|
298
298
|
return __generator(this, function (_b) {
|
|
299
|
-
localVarPath = this.basePath +
|
|
300
|
-
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
301
|
-
.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)))
|
|
302
|
-
.replace('{' + 'sourceId' + '}', encodeURIComponent(String(sourceId)));
|
|
299
|
+
localVarPath = this.basePath + '/warehouses';
|
|
303
300
|
localVarQueryParameters = {};
|
|
304
301
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
305
|
-
produces = [
|
|
302
|
+
produces = [
|
|
303
|
+
'application/vnd.segment.v1+json',
|
|
304
|
+
'application/json',
|
|
305
|
+
'application/vnd.segment.v1beta+json',
|
|
306
|
+
'application/vnd.segment.v1alpha+json',
|
|
307
|
+
];
|
|
306
308
|
if (produces.indexOf('application/json') >= 0) {
|
|
307
|
-
localVarHeaderParams.Accept =
|
|
309
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
308
310
|
}
|
|
309
311
|
else {
|
|
310
|
-
localVarHeaderParams.Accept = '
|
|
312
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
311
313
|
}
|
|
312
314
|
localVarFormParams = {};
|
|
313
|
-
if (
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
if (sourceId === null || sourceId === undefined) {
|
|
317
|
-
throw new Error('Required parameter sourceId was null or undefined when calling addConnectionFromSourceToWarehouseCurrent.');
|
|
315
|
+
if (CreateWarehouseV1Input === null ||
|
|
316
|
+
CreateWarehouseV1Input === undefined) {
|
|
317
|
+
throw new Error('Required parameter CreateWarehouseV1Input was null or undefined when calling createWarehouse.');
|
|
318
318
|
}
|
|
319
319
|
Object.assign(localVarHeaderParams, options.headers);
|
|
320
320
|
localVarUseFormData = false;
|
|
@@ -325,6 +325,7 @@ var WarehousesApi = (function () {
|
|
|
325
325
|
uri: localVarPath,
|
|
326
326
|
useQuerystring: this._useQuerystring,
|
|
327
327
|
json: true,
|
|
328
|
+
body: models_1.ObjectSerializer.serialize(CreateWarehouseV1Input, 'CreateWarehouseV1Input'),
|
|
328
329
|
};
|
|
329
330
|
authenticationPromise = Promise.resolve();
|
|
330
331
|
if (this.authentications.token.accessToken) {
|
|
@@ -363,7 +364,7 @@ var WarehousesApi = (function () {
|
|
|
363
364
|
if (response.statusCode &&
|
|
364
365
|
response.statusCode >= 200 &&
|
|
365
366
|
response.statusCode <= 299) {
|
|
366
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
367
|
+
body = models_1.ObjectSerializer.deserialize(body, 'CreateWarehouse200Response');
|
|
367
368
|
resolve({ response: response, body: body });
|
|
368
369
|
}
|
|
369
370
|
else {
|
|
@@ -376,39 +377,36 @@ var WarehousesApi = (function () {
|
|
|
376
377
|
});
|
|
377
378
|
});
|
|
378
379
|
};
|
|
379
|
-
WarehousesApi.prototype.
|
|
380
|
+
WarehousesApi.prototype.deleteWarehouse = function (warehouseId, options) {
|
|
380
381
|
if (options === void 0) { options = { headers: {} }; }
|
|
381
382
|
return __awaiter(this, void 0, void 0, function () {
|
|
382
383
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_4, _i, _a, interceptor;
|
|
383
384
|
var _this = this;
|
|
384
385
|
return __generator(this, function (_b) {
|
|
385
386
|
localVarPath = this.basePath +
|
|
386
|
-
'/warehouses/{warehouseId}
|
|
387
|
-
.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)))
|
|
388
|
-
.replace('{' + 'sourceId' + '}', encodeURIComponent(String(sourceId)));
|
|
387
|
+
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
389
388
|
localVarQueryParameters = {};
|
|
390
389
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
391
390
|
produces = [
|
|
392
391
|
'application/vnd.segment.v1+json',
|
|
393
392
|
'application/json',
|
|
393
|
+
'application/vnd.segment.v1beta+json',
|
|
394
|
+
'application/vnd.segment.v1alpha+json',
|
|
394
395
|
];
|
|
395
396
|
if (produces.indexOf('application/json') >= 0) {
|
|
396
|
-
localVarHeaderParams.Accept =
|
|
397
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
397
398
|
}
|
|
398
399
|
else {
|
|
399
|
-
localVarHeaderParams.Accept = '
|
|
400
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
400
401
|
}
|
|
401
402
|
localVarFormParams = {};
|
|
402
403
|
if (warehouseId === null || warehouseId === undefined) {
|
|
403
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling
|
|
404
|
-
}
|
|
405
|
-
if (sourceId === null || sourceId === undefined) {
|
|
406
|
-
throw new Error('Required parameter sourceId was null or undefined when calling addConnectionFromSourceToWarehouseV1.');
|
|
404
|
+
throw new Error('Required parameter warehouseId was null or undefined when calling deleteWarehouse.');
|
|
407
405
|
}
|
|
408
406
|
Object.assign(localVarHeaderParams, options.headers);
|
|
409
407
|
localVarUseFormData = false;
|
|
410
408
|
localVarRequestOptions = {
|
|
411
|
-
method: '
|
|
409
|
+
method: 'DELETE',
|
|
412
410
|
qs: localVarQueryParameters,
|
|
413
411
|
headers: localVarHeaderParams,
|
|
414
412
|
uri: localVarPath,
|
|
@@ -452,7 +450,7 @@ var WarehousesApi = (function () {
|
|
|
452
450
|
if (response.statusCode &&
|
|
453
451
|
response.statusCode >= 200 &&
|
|
454
452
|
response.statusCode <= 299) {
|
|
455
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
453
|
+
body = models_1.ObjectSerializer.deserialize(body, 'DeleteWarehouse200Response');
|
|
456
454
|
resolve({ response: response, body: body });
|
|
457
455
|
}
|
|
458
456
|
else {
|
|
@@ -465,40 +463,41 @@ var WarehousesApi = (function () {
|
|
|
465
463
|
});
|
|
466
464
|
});
|
|
467
465
|
};
|
|
468
|
-
WarehousesApi.prototype.
|
|
466
|
+
WarehousesApi.prototype.getConnectionStateFromWarehouse = function (warehouseId, options) {
|
|
469
467
|
if (options === void 0) { options = { headers: {} }; }
|
|
470
468
|
return __awaiter(this, void 0, void 0, function () {
|
|
471
469
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_5, _i, _a, interceptor;
|
|
472
470
|
var _this = this;
|
|
473
471
|
return __generator(this, function (_b) {
|
|
474
|
-
localVarPath = this.basePath +
|
|
472
|
+
localVarPath = this.basePath +
|
|
473
|
+
'/warehouses/{warehouseId}/connection-state'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
475
474
|
localVarQueryParameters = {};
|
|
476
475
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
477
476
|
produces = [
|
|
478
|
-
'application/vnd.segment.
|
|
477
|
+
'application/vnd.segment.v1+json',
|
|
479
478
|
'application/json',
|
|
479
|
+
'application/vnd.segment.v1beta+json',
|
|
480
|
+
'application/vnd.segment.v1alpha+json',
|
|
480
481
|
];
|
|
481
482
|
if (produces.indexOf('application/json') >= 0) {
|
|
482
|
-
localVarHeaderParams.Accept =
|
|
483
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
483
484
|
}
|
|
484
485
|
else {
|
|
485
|
-
localVarHeaderParams.Accept = '
|
|
486
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
486
487
|
}
|
|
487
488
|
localVarFormParams = {};
|
|
488
|
-
if (
|
|
489
|
-
|
|
490
|
-
throw new Error('Required parameter CreateValidationInWarehouseV1Input was null or undefined when calling createValidationInWarehouseAlpha.');
|
|
489
|
+
if (warehouseId === null || warehouseId === undefined) {
|
|
490
|
+
throw new Error('Required parameter warehouseId was null or undefined when calling getConnectionStateFromWarehouse.');
|
|
491
491
|
}
|
|
492
492
|
Object.assign(localVarHeaderParams, options.headers);
|
|
493
493
|
localVarUseFormData = false;
|
|
494
494
|
localVarRequestOptions = {
|
|
495
|
-
method: '
|
|
495
|
+
method: 'GET',
|
|
496
496
|
qs: localVarQueryParameters,
|
|
497
497
|
headers: localVarHeaderParams,
|
|
498
498
|
uri: localVarPath,
|
|
499
499
|
useQuerystring: this._useQuerystring,
|
|
500
500
|
json: true,
|
|
501
|
-
body: models_1.ObjectSerializer.serialize(CreateValidationInWarehouseV1Input, 'CreateValidationInWarehouseV1Input'),
|
|
502
501
|
};
|
|
503
502
|
authenticationPromise = Promise.resolve();
|
|
504
503
|
if (this.authentications.token.accessToken) {
|
|
@@ -537,7 +536,7 @@ var WarehousesApi = (function () {
|
|
|
537
536
|
if (response.statusCode &&
|
|
538
537
|
response.statusCode >= 200 &&
|
|
539
538
|
response.statusCode <= 299) {
|
|
540
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
539
|
+
body = models_1.ObjectSerializer.deserialize(body, 'GetConnectionStateFromWarehouse200Response');
|
|
541
540
|
resolve({ response: response, body: body });
|
|
542
541
|
}
|
|
543
542
|
else {
|
|
@@ -550,40 +549,41 @@ var WarehousesApi = (function () {
|
|
|
550
549
|
});
|
|
551
550
|
});
|
|
552
551
|
};
|
|
553
|
-
WarehousesApi.prototype.
|
|
552
|
+
WarehousesApi.prototype.getWarehouse = function (warehouseId, options) {
|
|
554
553
|
if (options === void 0) { options = { headers: {} }; }
|
|
555
554
|
return __awaiter(this, void 0, void 0, function () {
|
|
556
555
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_6, _i, _a, interceptor;
|
|
557
556
|
var _this = this;
|
|
558
557
|
return __generator(this, function (_b) {
|
|
559
|
-
localVarPath = this.basePath +
|
|
558
|
+
localVarPath = this.basePath +
|
|
559
|
+
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
560
560
|
localVarQueryParameters = {};
|
|
561
561
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
562
562
|
produces = [
|
|
563
|
-
'application/vnd.segment.
|
|
563
|
+
'application/vnd.segment.v1+json',
|
|
564
564
|
'application/json',
|
|
565
|
+
'application/vnd.segment.v1beta+json',
|
|
566
|
+
'application/vnd.segment.v1alpha+json',
|
|
565
567
|
];
|
|
566
568
|
if (produces.indexOf('application/json') >= 0) {
|
|
567
|
-
localVarHeaderParams.Accept =
|
|
569
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
568
570
|
}
|
|
569
571
|
else {
|
|
570
|
-
localVarHeaderParams.Accept = '
|
|
572
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
571
573
|
}
|
|
572
574
|
localVarFormParams = {};
|
|
573
|
-
if (
|
|
574
|
-
|
|
575
|
-
throw new Error('Required parameter CreateValidationInWarehouseV1Input was null or undefined when calling createValidationInWarehouseBeta.');
|
|
575
|
+
if (warehouseId === null || warehouseId === undefined) {
|
|
576
|
+
throw new Error('Required parameter warehouseId was null or undefined when calling getWarehouse.');
|
|
576
577
|
}
|
|
577
578
|
Object.assign(localVarHeaderParams, options.headers);
|
|
578
579
|
localVarUseFormData = false;
|
|
579
580
|
localVarRequestOptions = {
|
|
580
|
-
method: '
|
|
581
|
+
method: 'GET',
|
|
581
582
|
qs: localVarQueryParameters,
|
|
582
583
|
headers: localVarHeaderParams,
|
|
583
584
|
uri: localVarPath,
|
|
584
585
|
useQuerystring: this._useQuerystring,
|
|
585
586
|
json: true,
|
|
586
|
-
body: models_1.ObjectSerializer.serialize(CreateValidationInWarehouseV1Input, 'CreateValidationInWarehouseV1Input'),
|
|
587
587
|
};
|
|
588
588
|
authenticationPromise = Promise.resolve();
|
|
589
589
|
if (this.authentications.token.accessToken) {
|
|
@@ -622,7 +622,7 @@ var WarehousesApi = (function () {
|
|
|
622
622
|
if (response.statusCode &&
|
|
623
623
|
response.statusCode >= 200 &&
|
|
624
624
|
response.statusCode <= 299) {
|
|
625
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
625
|
+
body = models_1.ObjectSerializer.deserialize(body, 'GetWarehouse200Response');
|
|
626
626
|
resolve({ response: response, body: body });
|
|
627
627
|
}
|
|
628
628
|
else {
|
|
@@ -635,40 +635,47 @@ var WarehousesApi = (function () {
|
|
|
635
635
|
});
|
|
636
636
|
});
|
|
637
637
|
};
|
|
638
|
-
WarehousesApi.prototype.
|
|
638
|
+
WarehousesApi.prototype.listConnectedSourcesFromWarehouse = function (warehouseId, pagination, options) {
|
|
639
639
|
if (options === void 0) { options = { headers: {} }; }
|
|
640
640
|
return __awaiter(this, void 0, void 0, function () {
|
|
641
641
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_7, _i, _a, interceptor;
|
|
642
642
|
var _this = this;
|
|
643
643
|
return __generator(this, function (_b) {
|
|
644
|
-
localVarPath = this.basePath +
|
|
644
|
+
localVarPath = this.basePath +
|
|
645
|
+
'/warehouses/{warehouseId}/connected-sources'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
645
646
|
localVarQueryParameters = {};
|
|
646
647
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
647
648
|
produces = [
|
|
648
649
|
'application/vnd.segment.v1+json',
|
|
649
650
|
'application/json',
|
|
651
|
+
'application/vnd.segment.v1beta+json',
|
|
652
|
+
'application/vnd.segment.v1alpha+json',
|
|
650
653
|
];
|
|
651
654
|
if (produces.indexOf('application/json') >= 0) {
|
|
652
|
-
localVarHeaderParams.Accept =
|
|
655
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
653
656
|
}
|
|
654
657
|
else {
|
|
655
|
-
localVarHeaderParams.Accept = '
|
|
658
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
656
659
|
}
|
|
657
660
|
localVarFormParams = {};
|
|
658
|
-
if (
|
|
659
|
-
|
|
660
|
-
|
|
661
|
+
if (warehouseId === null || warehouseId === undefined) {
|
|
662
|
+
throw new Error('Required parameter warehouseId was null or undefined when calling listConnectedSourcesFromWarehouse.');
|
|
663
|
+
}
|
|
664
|
+
if (pagination === null || pagination === undefined) {
|
|
665
|
+
throw new Error('Required parameter pagination was null or undefined when calling listConnectedSourcesFromWarehouse.');
|
|
666
|
+
}
|
|
667
|
+
if (pagination !== undefined) {
|
|
668
|
+
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
661
669
|
}
|
|
662
670
|
Object.assign(localVarHeaderParams, options.headers);
|
|
663
671
|
localVarUseFormData = false;
|
|
664
672
|
localVarRequestOptions = {
|
|
665
|
-
method: '
|
|
673
|
+
method: 'GET',
|
|
666
674
|
qs: localVarQueryParameters,
|
|
667
675
|
headers: localVarHeaderParams,
|
|
668
676
|
uri: localVarPath,
|
|
669
677
|
useQuerystring: this._useQuerystring,
|
|
670
678
|
json: true,
|
|
671
|
-
body: models_1.ObjectSerializer.serialize(CreateValidationInWarehouseV1Input, 'CreateValidationInWarehouseV1Input'),
|
|
672
679
|
};
|
|
673
680
|
authenticationPromise = Promise.resolve();
|
|
674
681
|
if (this.authentications.token.accessToken) {
|
|
@@ -707,7 +714,7 @@ var WarehousesApi = (function () {
|
|
|
707
714
|
if (response.statusCode &&
|
|
708
715
|
response.statusCode >= 200 &&
|
|
709
716
|
response.statusCode <= 299) {
|
|
710
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
717
|
+
body = models_1.ObjectSerializer.deserialize(body, 'ListConnectedSourcesFromWarehouse200Response');
|
|
711
718
|
resolve({ response: response, body: body });
|
|
712
719
|
}
|
|
713
720
|
else {
|
|
@@ -720,40 +727,43 @@ var WarehousesApi = (function () {
|
|
|
720
727
|
});
|
|
721
728
|
});
|
|
722
729
|
};
|
|
723
|
-
WarehousesApi.prototype.
|
|
730
|
+
WarehousesApi.prototype.listWarehouses = function (pagination, options) {
|
|
724
731
|
if (options === void 0) { options = { headers: {} }; }
|
|
725
732
|
return __awaiter(this, void 0, void 0, function () {
|
|
726
733
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_8, _i, _a, interceptor;
|
|
727
734
|
var _this = this;
|
|
728
735
|
return __generator(this, function (_b) {
|
|
729
|
-
localVarPath = this.basePath + '/warehouses
|
|
736
|
+
localVarPath = this.basePath + '/warehouses';
|
|
730
737
|
localVarQueryParameters = {};
|
|
731
738
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
732
739
|
produces = [
|
|
733
740
|
'application/vnd.segment.v1+json',
|
|
734
741
|
'application/json',
|
|
742
|
+
'application/vnd.segment.v1beta+json',
|
|
743
|
+
'application/vnd.segment.v1alpha+json',
|
|
735
744
|
];
|
|
736
745
|
if (produces.indexOf('application/json') >= 0) {
|
|
737
|
-
localVarHeaderParams.Accept =
|
|
746
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
738
747
|
}
|
|
739
748
|
else {
|
|
740
|
-
localVarHeaderParams.Accept = '
|
|
749
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
741
750
|
}
|
|
742
751
|
localVarFormParams = {};
|
|
743
|
-
if (
|
|
744
|
-
|
|
745
|
-
|
|
752
|
+
if (pagination === null || pagination === undefined) {
|
|
753
|
+
throw new Error('Required parameter pagination was null or undefined when calling listWarehouses.');
|
|
754
|
+
}
|
|
755
|
+
if (pagination !== undefined) {
|
|
756
|
+
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
746
757
|
}
|
|
747
758
|
Object.assign(localVarHeaderParams, options.headers);
|
|
748
759
|
localVarUseFormData = false;
|
|
749
760
|
localVarRequestOptions = {
|
|
750
|
-
method: '
|
|
761
|
+
method: 'GET',
|
|
751
762
|
qs: localVarQueryParameters,
|
|
752
763
|
headers: localVarHeaderParams,
|
|
753
764
|
uri: localVarPath,
|
|
754
765
|
useQuerystring: this._useQuerystring,
|
|
755
766
|
json: true,
|
|
756
|
-
body: models_1.ObjectSerializer.serialize(CreateValidationInWarehouseV1Input, 'CreateValidationInWarehouseV1Input'),
|
|
757
767
|
};
|
|
758
768
|
authenticationPromise = Promise.resolve();
|
|
759
769
|
if (this.authentications.token.accessToken) {
|
|
@@ -792,7 +802,7 @@ var WarehousesApi = (function () {
|
|
|
792
802
|
if (response.statusCode &&
|
|
793
803
|
response.statusCode >= 200 &&
|
|
794
804
|
response.statusCode <= 299) {
|
|
795
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
805
|
+
body = models_1.ObjectSerializer.deserialize(body, 'ListWarehouses200Response');
|
|
796
806
|
resolve({ response: response, body: body });
|
|
797
807
|
}
|
|
798
808
|
else {
|
|
@@ -805,40 +815,46 @@ var WarehousesApi = (function () {
|
|
|
805
815
|
});
|
|
806
816
|
});
|
|
807
817
|
};
|
|
808
|
-
WarehousesApi.prototype.
|
|
818
|
+
WarehousesApi.prototype.removeSourceConnectionFromWarehouse = function (warehouseId, sourceId, options) {
|
|
809
819
|
if (options === void 0) { options = { headers: {} }; }
|
|
810
820
|
return __awaiter(this, void 0, void 0, function () {
|
|
811
821
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_9, _i, _a, interceptor;
|
|
812
822
|
var _this = this;
|
|
813
823
|
return __generator(this, function (_b) {
|
|
814
|
-
localVarPath = this.basePath +
|
|
824
|
+
localVarPath = this.basePath +
|
|
825
|
+
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
826
|
+
.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)))
|
|
827
|
+
.replace('{' + 'sourceId' + '}', encodeURIComponent(String(sourceId)));
|
|
815
828
|
localVarQueryParameters = {};
|
|
816
829
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
817
830
|
produces = [
|
|
818
|
-
'application/vnd.segment.
|
|
831
|
+
'application/vnd.segment.v1+json',
|
|
819
832
|
'application/json',
|
|
833
|
+
'application/vnd.segment.v1beta+json',
|
|
834
|
+
'application/vnd.segment.v1alpha+json',
|
|
820
835
|
];
|
|
821
836
|
if (produces.indexOf('application/json') >= 0) {
|
|
822
|
-
localVarHeaderParams.Accept =
|
|
837
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
823
838
|
}
|
|
824
839
|
else {
|
|
825
|
-
localVarHeaderParams.Accept = '
|
|
840
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
826
841
|
}
|
|
827
842
|
localVarFormParams = {};
|
|
828
|
-
if (
|
|
829
|
-
|
|
830
|
-
|
|
843
|
+
if (warehouseId === null || warehouseId === undefined) {
|
|
844
|
+
throw new Error('Required parameter warehouseId was null or undefined when calling removeSourceConnectionFromWarehouse.');
|
|
845
|
+
}
|
|
846
|
+
if (sourceId === null || sourceId === undefined) {
|
|
847
|
+
throw new Error('Required parameter sourceId was null or undefined when calling removeSourceConnectionFromWarehouse.');
|
|
831
848
|
}
|
|
832
849
|
Object.assign(localVarHeaderParams, options.headers);
|
|
833
850
|
localVarUseFormData = false;
|
|
834
851
|
localVarRequestOptions = {
|
|
835
|
-
method: '
|
|
852
|
+
method: 'DELETE',
|
|
836
853
|
qs: localVarQueryParameters,
|
|
837
854
|
headers: localVarHeaderParams,
|
|
838
855
|
uri: localVarPath,
|
|
839
856
|
useQuerystring: this._useQuerystring,
|
|
840
857
|
json: true,
|
|
841
|
-
body: models_1.ObjectSerializer.serialize(CreateWarehouseV1Input, 'CreateWarehouseV1Input'),
|
|
842
858
|
};
|
|
843
859
|
authenticationPromise = Promise.resolve();
|
|
844
860
|
if (this.authentications.token.accessToken) {
|
|
@@ -877,7 +893,7 @@ var WarehousesApi = (function () {
|
|
|
877
893
|
if (response.statusCode &&
|
|
878
894
|
response.statusCode >= 200 &&
|
|
879
895
|
response.statusCode <= 299) {
|
|
880
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
896
|
+
body = models_1.ObjectSerializer.deserialize(body, 'RemoveSourceConnectionFromWarehouse200Response');
|
|
881
897
|
resolve({ response: response, body: body });
|
|
882
898
|
}
|
|
883
899
|
else {
|
|
@@ -890,40 +906,46 @@ var WarehousesApi = (function () {
|
|
|
890
906
|
});
|
|
891
907
|
});
|
|
892
908
|
};
|
|
893
|
-
WarehousesApi.prototype.
|
|
909
|
+
WarehousesApi.prototype.updateWarehouse = function (warehouseId, UpdateWarehouseV1Input, options) {
|
|
894
910
|
if (options === void 0) { options = { headers: {} }; }
|
|
895
911
|
return __awaiter(this, void 0, void 0, function () {
|
|
896
912
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_10, _i, _a, interceptor;
|
|
897
913
|
var _this = this;
|
|
898
914
|
return __generator(this, function (_b) {
|
|
899
|
-
localVarPath = this.basePath +
|
|
915
|
+
localVarPath = this.basePath +
|
|
916
|
+
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
900
917
|
localVarQueryParameters = {};
|
|
901
918
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
902
919
|
produces = [
|
|
903
|
-
'application/vnd.segment.
|
|
920
|
+
'application/vnd.segment.v1+json',
|
|
904
921
|
'application/json',
|
|
922
|
+
'application/vnd.segment.v1beta+json',
|
|
923
|
+
'application/vnd.segment.v1alpha+json',
|
|
905
924
|
];
|
|
906
925
|
if (produces.indexOf('application/json') >= 0) {
|
|
907
|
-
localVarHeaderParams.Accept =
|
|
926
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
908
927
|
}
|
|
909
928
|
else {
|
|
910
|
-
localVarHeaderParams.Accept = '
|
|
929
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
911
930
|
}
|
|
912
931
|
localVarFormParams = {};
|
|
913
|
-
if (
|
|
914
|
-
|
|
915
|
-
|
|
932
|
+
if (warehouseId === null || warehouseId === undefined) {
|
|
933
|
+
throw new Error('Required parameter warehouseId was null or undefined when calling updateWarehouse.');
|
|
934
|
+
}
|
|
935
|
+
if (UpdateWarehouseV1Input === null ||
|
|
936
|
+
UpdateWarehouseV1Input === undefined) {
|
|
937
|
+
throw new Error('Required parameter UpdateWarehouseV1Input was null or undefined when calling updateWarehouse.');
|
|
916
938
|
}
|
|
917
939
|
Object.assign(localVarHeaderParams, options.headers);
|
|
918
940
|
localVarUseFormData = false;
|
|
919
941
|
localVarRequestOptions = {
|
|
920
|
-
method: '
|
|
942
|
+
method: 'PATCH',
|
|
921
943
|
qs: localVarQueryParameters,
|
|
922
944
|
headers: localVarHeaderParams,
|
|
923
945
|
uri: localVarPath,
|
|
924
946
|
useQuerystring: this._useQuerystring,
|
|
925
947
|
json: true,
|
|
926
|
-
body: models_1.ObjectSerializer.serialize(
|
|
948
|
+
body: models_1.ObjectSerializer.serialize(UpdateWarehouseV1Input, 'UpdateWarehouseV1Input'),
|
|
927
949
|
};
|
|
928
950
|
authenticationPromise = Promise.resolve();
|
|
929
951
|
if (this.authentications.token.accessToken) {
|
|
@@ -944,2582 +966,6 @@ var WarehousesApi = (function () {
|
|
|
944
966
|
interceptor = _a[_i];
|
|
945
967
|
_loop_10(interceptor);
|
|
946
968
|
}
|
|
947
|
-
return [2, interceptorPromise.then(function () {
|
|
948
|
-
if (Object.keys(localVarFormParams).length) {
|
|
949
|
-
if (localVarUseFormData) {
|
|
950
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
951
|
-
}
|
|
952
|
-
else {
|
|
953
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
return new Promise(function (resolve, reject) {
|
|
957
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
958
|
-
if (error) {
|
|
959
|
-
reject(error);
|
|
960
|
-
}
|
|
961
|
-
else {
|
|
962
|
-
if (response.statusCode &&
|
|
963
|
-
response.statusCode >= 200 &&
|
|
964
|
-
response.statusCode <= 299) {
|
|
965
|
-
body = models_1.ObjectSerializer.deserialize(body, 'CreateWarehouse200Response');
|
|
966
|
-
resolve({ response: response, body: body });
|
|
967
|
-
}
|
|
968
|
-
else {
|
|
969
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
});
|
|
973
|
-
});
|
|
974
|
-
})];
|
|
975
|
-
});
|
|
976
|
-
});
|
|
977
|
-
};
|
|
978
|
-
WarehousesApi.prototype.createWarehouseCurrent = function (CreateWarehouseV1Input, options) {
|
|
979
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
980
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
981
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_11, _i, _a, interceptor;
|
|
982
|
-
var _this = this;
|
|
983
|
-
return __generator(this, function (_b) {
|
|
984
|
-
localVarPath = this.basePath + '/warehouses';
|
|
985
|
-
localVarQueryParameters = {};
|
|
986
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
987
|
-
produces = [
|
|
988
|
-
'application/vnd.segment.v1+json',
|
|
989
|
-
'application/json',
|
|
990
|
-
];
|
|
991
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
992
|
-
localVarHeaderParams.Accept = produces[0];
|
|
993
|
-
}
|
|
994
|
-
else {
|
|
995
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
996
|
-
}
|
|
997
|
-
localVarFormParams = {};
|
|
998
|
-
if (CreateWarehouseV1Input === null ||
|
|
999
|
-
CreateWarehouseV1Input === undefined) {
|
|
1000
|
-
throw new Error('Required parameter CreateWarehouseV1Input was null or undefined when calling createWarehouseCurrent.');
|
|
1001
|
-
}
|
|
1002
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1003
|
-
localVarUseFormData = false;
|
|
1004
|
-
localVarRequestOptions = {
|
|
1005
|
-
method: 'POST',
|
|
1006
|
-
qs: localVarQueryParameters,
|
|
1007
|
-
headers: localVarHeaderParams,
|
|
1008
|
-
uri: localVarPath,
|
|
1009
|
-
useQuerystring: this._useQuerystring,
|
|
1010
|
-
json: true,
|
|
1011
|
-
body: models_1.ObjectSerializer.serialize(CreateWarehouseV1Input, 'CreateWarehouseV1Input'),
|
|
1012
|
-
};
|
|
1013
|
-
authenticationPromise = Promise.resolve();
|
|
1014
|
-
if (this.authentications.token.accessToken) {
|
|
1015
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1016
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1017
|
-
});
|
|
1018
|
-
}
|
|
1019
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1020
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1021
|
-
});
|
|
1022
|
-
interceptorPromise = authenticationPromise;
|
|
1023
|
-
_loop_11 = function (interceptor) {
|
|
1024
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1025
|
-
return interceptor(localVarRequestOptions);
|
|
1026
|
-
});
|
|
1027
|
-
};
|
|
1028
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1029
|
-
interceptor = _a[_i];
|
|
1030
|
-
_loop_11(interceptor);
|
|
1031
|
-
}
|
|
1032
|
-
return [2, interceptorPromise.then(function () {
|
|
1033
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1034
|
-
if (localVarUseFormData) {
|
|
1035
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1036
|
-
}
|
|
1037
|
-
else {
|
|
1038
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
return new Promise(function (resolve, reject) {
|
|
1042
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1043
|
-
if (error) {
|
|
1044
|
-
reject(error);
|
|
1045
|
-
}
|
|
1046
|
-
else {
|
|
1047
|
-
if (response.statusCode &&
|
|
1048
|
-
response.statusCode >= 200 &&
|
|
1049
|
-
response.statusCode <= 299) {
|
|
1050
|
-
body = models_1.ObjectSerializer.deserialize(body, 'CreateWarehouse200Response');
|
|
1051
|
-
resolve({ response: response, body: body });
|
|
1052
|
-
}
|
|
1053
|
-
else {
|
|
1054
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
});
|
|
1058
|
-
});
|
|
1059
|
-
})];
|
|
1060
|
-
});
|
|
1061
|
-
});
|
|
1062
|
-
};
|
|
1063
|
-
WarehousesApi.prototype.createWarehouseV1 = function (CreateWarehouseV1Input, options) {
|
|
1064
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1065
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1066
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_12, _i, _a, interceptor;
|
|
1067
|
-
var _this = this;
|
|
1068
|
-
return __generator(this, function (_b) {
|
|
1069
|
-
localVarPath = this.basePath + '/warehouses';
|
|
1070
|
-
localVarQueryParameters = {};
|
|
1071
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1072
|
-
produces = [
|
|
1073
|
-
'application/vnd.segment.v1+json',
|
|
1074
|
-
'application/json',
|
|
1075
|
-
];
|
|
1076
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1077
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1078
|
-
}
|
|
1079
|
-
else {
|
|
1080
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1081
|
-
}
|
|
1082
|
-
localVarFormParams = {};
|
|
1083
|
-
if (CreateWarehouseV1Input === null ||
|
|
1084
|
-
CreateWarehouseV1Input === undefined) {
|
|
1085
|
-
throw new Error('Required parameter CreateWarehouseV1Input was null or undefined when calling createWarehouseV1.');
|
|
1086
|
-
}
|
|
1087
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1088
|
-
localVarUseFormData = false;
|
|
1089
|
-
localVarRequestOptions = {
|
|
1090
|
-
method: 'POST',
|
|
1091
|
-
qs: localVarQueryParameters,
|
|
1092
|
-
headers: localVarHeaderParams,
|
|
1093
|
-
uri: localVarPath,
|
|
1094
|
-
useQuerystring: this._useQuerystring,
|
|
1095
|
-
json: true,
|
|
1096
|
-
body: models_1.ObjectSerializer.serialize(CreateWarehouseV1Input, 'CreateWarehouseV1Input'),
|
|
1097
|
-
};
|
|
1098
|
-
authenticationPromise = Promise.resolve();
|
|
1099
|
-
if (this.authentications.token.accessToken) {
|
|
1100
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1101
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1102
|
-
});
|
|
1103
|
-
}
|
|
1104
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1105
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1106
|
-
});
|
|
1107
|
-
interceptorPromise = authenticationPromise;
|
|
1108
|
-
_loop_12 = function (interceptor) {
|
|
1109
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1110
|
-
return interceptor(localVarRequestOptions);
|
|
1111
|
-
});
|
|
1112
|
-
};
|
|
1113
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1114
|
-
interceptor = _a[_i];
|
|
1115
|
-
_loop_12(interceptor);
|
|
1116
|
-
}
|
|
1117
|
-
return [2, interceptorPromise.then(function () {
|
|
1118
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1119
|
-
if (localVarUseFormData) {
|
|
1120
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1121
|
-
}
|
|
1122
|
-
else {
|
|
1123
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
return new Promise(function (resolve, reject) {
|
|
1127
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1128
|
-
if (error) {
|
|
1129
|
-
reject(error);
|
|
1130
|
-
}
|
|
1131
|
-
else {
|
|
1132
|
-
if (response.statusCode &&
|
|
1133
|
-
response.statusCode >= 200 &&
|
|
1134
|
-
response.statusCode <= 299) {
|
|
1135
|
-
body = models_1.ObjectSerializer.deserialize(body, 'CreateWarehouse200Response');
|
|
1136
|
-
resolve({ response: response, body: body });
|
|
1137
|
-
}
|
|
1138
|
-
else {
|
|
1139
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
});
|
|
1143
|
-
});
|
|
1144
|
-
})];
|
|
1145
|
-
});
|
|
1146
|
-
});
|
|
1147
|
-
};
|
|
1148
|
-
WarehousesApi.prototype.deleteWarehouseAlpha = function (warehouseId, options) {
|
|
1149
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1150
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1151
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_13, _i, _a, interceptor;
|
|
1152
|
-
var _this = this;
|
|
1153
|
-
return __generator(this, function (_b) {
|
|
1154
|
-
localVarPath = this.basePath +
|
|
1155
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1156
|
-
localVarQueryParameters = {};
|
|
1157
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1158
|
-
produces = [
|
|
1159
|
-
'application/vnd.segment.v1alpha+json',
|
|
1160
|
-
'application/json',
|
|
1161
|
-
];
|
|
1162
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1163
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1164
|
-
}
|
|
1165
|
-
else {
|
|
1166
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1167
|
-
}
|
|
1168
|
-
localVarFormParams = {};
|
|
1169
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1170
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling deleteWarehouseAlpha.');
|
|
1171
|
-
}
|
|
1172
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1173
|
-
localVarUseFormData = false;
|
|
1174
|
-
localVarRequestOptions = {
|
|
1175
|
-
method: 'DELETE',
|
|
1176
|
-
qs: localVarQueryParameters,
|
|
1177
|
-
headers: localVarHeaderParams,
|
|
1178
|
-
uri: localVarPath,
|
|
1179
|
-
useQuerystring: this._useQuerystring,
|
|
1180
|
-
json: true,
|
|
1181
|
-
};
|
|
1182
|
-
authenticationPromise = Promise.resolve();
|
|
1183
|
-
if (this.authentications.token.accessToken) {
|
|
1184
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1185
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1186
|
-
});
|
|
1187
|
-
}
|
|
1188
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1189
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1190
|
-
});
|
|
1191
|
-
interceptorPromise = authenticationPromise;
|
|
1192
|
-
_loop_13 = function (interceptor) {
|
|
1193
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1194
|
-
return interceptor(localVarRequestOptions);
|
|
1195
|
-
});
|
|
1196
|
-
};
|
|
1197
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1198
|
-
interceptor = _a[_i];
|
|
1199
|
-
_loop_13(interceptor);
|
|
1200
|
-
}
|
|
1201
|
-
return [2, interceptorPromise.then(function () {
|
|
1202
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1203
|
-
if (localVarUseFormData) {
|
|
1204
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1205
|
-
}
|
|
1206
|
-
else {
|
|
1207
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
return new Promise(function (resolve, reject) {
|
|
1211
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1212
|
-
if (error) {
|
|
1213
|
-
reject(error);
|
|
1214
|
-
}
|
|
1215
|
-
else {
|
|
1216
|
-
if (response.statusCode &&
|
|
1217
|
-
response.statusCode >= 200 &&
|
|
1218
|
-
response.statusCode <= 299) {
|
|
1219
|
-
body = models_1.ObjectSerializer.deserialize(body, 'DeleteWarehouse200Response');
|
|
1220
|
-
resolve({ response: response, body: body });
|
|
1221
|
-
}
|
|
1222
|
-
else {
|
|
1223
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
});
|
|
1227
|
-
});
|
|
1228
|
-
})];
|
|
1229
|
-
});
|
|
1230
|
-
});
|
|
1231
|
-
};
|
|
1232
|
-
WarehousesApi.prototype.deleteWarehouseBeta = function (warehouseId, options) {
|
|
1233
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1234
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1235
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_14, _i, _a, interceptor;
|
|
1236
|
-
var _this = this;
|
|
1237
|
-
return __generator(this, function (_b) {
|
|
1238
|
-
localVarPath = this.basePath +
|
|
1239
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1240
|
-
localVarQueryParameters = {};
|
|
1241
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1242
|
-
produces = [
|
|
1243
|
-
'application/vnd.segment.v1beta+json',
|
|
1244
|
-
'application/json',
|
|
1245
|
-
];
|
|
1246
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1247
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1248
|
-
}
|
|
1249
|
-
else {
|
|
1250
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1251
|
-
}
|
|
1252
|
-
localVarFormParams = {};
|
|
1253
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1254
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling deleteWarehouseBeta.');
|
|
1255
|
-
}
|
|
1256
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1257
|
-
localVarUseFormData = false;
|
|
1258
|
-
localVarRequestOptions = {
|
|
1259
|
-
method: 'DELETE',
|
|
1260
|
-
qs: localVarQueryParameters,
|
|
1261
|
-
headers: localVarHeaderParams,
|
|
1262
|
-
uri: localVarPath,
|
|
1263
|
-
useQuerystring: this._useQuerystring,
|
|
1264
|
-
json: true,
|
|
1265
|
-
};
|
|
1266
|
-
authenticationPromise = Promise.resolve();
|
|
1267
|
-
if (this.authentications.token.accessToken) {
|
|
1268
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1269
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1270
|
-
});
|
|
1271
|
-
}
|
|
1272
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1273
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1274
|
-
});
|
|
1275
|
-
interceptorPromise = authenticationPromise;
|
|
1276
|
-
_loop_14 = function (interceptor) {
|
|
1277
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1278
|
-
return interceptor(localVarRequestOptions);
|
|
1279
|
-
});
|
|
1280
|
-
};
|
|
1281
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1282
|
-
interceptor = _a[_i];
|
|
1283
|
-
_loop_14(interceptor);
|
|
1284
|
-
}
|
|
1285
|
-
return [2, interceptorPromise.then(function () {
|
|
1286
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1287
|
-
if (localVarUseFormData) {
|
|
1288
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1289
|
-
}
|
|
1290
|
-
else {
|
|
1291
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
return new Promise(function (resolve, reject) {
|
|
1295
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1296
|
-
if (error) {
|
|
1297
|
-
reject(error);
|
|
1298
|
-
}
|
|
1299
|
-
else {
|
|
1300
|
-
if (response.statusCode &&
|
|
1301
|
-
response.statusCode >= 200 &&
|
|
1302
|
-
response.statusCode <= 299) {
|
|
1303
|
-
body = models_1.ObjectSerializer.deserialize(body, 'DeleteWarehouse200Response');
|
|
1304
|
-
resolve({ response: response, body: body });
|
|
1305
|
-
}
|
|
1306
|
-
else {
|
|
1307
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
});
|
|
1311
|
-
});
|
|
1312
|
-
})];
|
|
1313
|
-
});
|
|
1314
|
-
});
|
|
1315
|
-
};
|
|
1316
|
-
WarehousesApi.prototype.deleteWarehouseCurrent = function (warehouseId, options) {
|
|
1317
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1318
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1319
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_15, _i, _a, interceptor;
|
|
1320
|
-
var _this = this;
|
|
1321
|
-
return __generator(this, function (_b) {
|
|
1322
|
-
localVarPath = this.basePath +
|
|
1323
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1324
|
-
localVarQueryParameters = {};
|
|
1325
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1326
|
-
produces = ['application/json'];
|
|
1327
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1328
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1329
|
-
}
|
|
1330
|
-
else {
|
|
1331
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1332
|
-
}
|
|
1333
|
-
localVarFormParams = {};
|
|
1334
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1335
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling deleteWarehouseCurrent.');
|
|
1336
|
-
}
|
|
1337
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1338
|
-
localVarUseFormData = false;
|
|
1339
|
-
localVarRequestOptions = {
|
|
1340
|
-
method: 'DELETE',
|
|
1341
|
-
qs: localVarQueryParameters,
|
|
1342
|
-
headers: localVarHeaderParams,
|
|
1343
|
-
uri: localVarPath,
|
|
1344
|
-
useQuerystring: this._useQuerystring,
|
|
1345
|
-
json: true,
|
|
1346
|
-
};
|
|
1347
|
-
authenticationPromise = Promise.resolve();
|
|
1348
|
-
if (this.authentications.token.accessToken) {
|
|
1349
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1350
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1351
|
-
});
|
|
1352
|
-
}
|
|
1353
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1354
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1355
|
-
});
|
|
1356
|
-
interceptorPromise = authenticationPromise;
|
|
1357
|
-
_loop_15 = function (interceptor) {
|
|
1358
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1359
|
-
return interceptor(localVarRequestOptions);
|
|
1360
|
-
});
|
|
1361
|
-
};
|
|
1362
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1363
|
-
interceptor = _a[_i];
|
|
1364
|
-
_loop_15(interceptor);
|
|
1365
|
-
}
|
|
1366
|
-
return [2, interceptorPromise.then(function () {
|
|
1367
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1368
|
-
if (localVarUseFormData) {
|
|
1369
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1370
|
-
}
|
|
1371
|
-
else {
|
|
1372
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
return new Promise(function (resolve, reject) {
|
|
1376
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1377
|
-
if (error) {
|
|
1378
|
-
reject(error);
|
|
1379
|
-
}
|
|
1380
|
-
else {
|
|
1381
|
-
if (response.statusCode &&
|
|
1382
|
-
response.statusCode >= 200 &&
|
|
1383
|
-
response.statusCode <= 299) {
|
|
1384
|
-
body = models_1.ObjectSerializer.deserialize(body, 'DeleteWarehouse200Response');
|
|
1385
|
-
resolve({ response: response, body: body });
|
|
1386
|
-
}
|
|
1387
|
-
else {
|
|
1388
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
});
|
|
1392
|
-
});
|
|
1393
|
-
})];
|
|
1394
|
-
});
|
|
1395
|
-
});
|
|
1396
|
-
};
|
|
1397
|
-
WarehousesApi.prototype.deleteWarehouseV1 = function (warehouseId, options) {
|
|
1398
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1399
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1400
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_16, _i, _a, interceptor;
|
|
1401
|
-
var _this = this;
|
|
1402
|
-
return __generator(this, function (_b) {
|
|
1403
|
-
localVarPath = this.basePath +
|
|
1404
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1405
|
-
localVarQueryParameters = {};
|
|
1406
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1407
|
-
produces = [
|
|
1408
|
-
'application/vnd.segment.v1+json',
|
|
1409
|
-
'application/json',
|
|
1410
|
-
];
|
|
1411
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1412
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1413
|
-
}
|
|
1414
|
-
else {
|
|
1415
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1416
|
-
}
|
|
1417
|
-
localVarFormParams = {};
|
|
1418
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1419
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling deleteWarehouseV1.');
|
|
1420
|
-
}
|
|
1421
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1422
|
-
localVarUseFormData = false;
|
|
1423
|
-
localVarRequestOptions = {
|
|
1424
|
-
method: 'DELETE',
|
|
1425
|
-
qs: localVarQueryParameters,
|
|
1426
|
-
headers: localVarHeaderParams,
|
|
1427
|
-
uri: localVarPath,
|
|
1428
|
-
useQuerystring: this._useQuerystring,
|
|
1429
|
-
json: true,
|
|
1430
|
-
};
|
|
1431
|
-
authenticationPromise = Promise.resolve();
|
|
1432
|
-
if (this.authentications.token.accessToken) {
|
|
1433
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1434
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1435
|
-
});
|
|
1436
|
-
}
|
|
1437
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1438
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1439
|
-
});
|
|
1440
|
-
interceptorPromise = authenticationPromise;
|
|
1441
|
-
_loop_16 = function (interceptor) {
|
|
1442
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1443
|
-
return interceptor(localVarRequestOptions);
|
|
1444
|
-
});
|
|
1445
|
-
};
|
|
1446
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1447
|
-
interceptor = _a[_i];
|
|
1448
|
-
_loop_16(interceptor);
|
|
1449
|
-
}
|
|
1450
|
-
return [2, interceptorPromise.then(function () {
|
|
1451
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1452
|
-
if (localVarUseFormData) {
|
|
1453
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1454
|
-
}
|
|
1455
|
-
else {
|
|
1456
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
return new Promise(function (resolve, reject) {
|
|
1460
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1461
|
-
if (error) {
|
|
1462
|
-
reject(error);
|
|
1463
|
-
}
|
|
1464
|
-
else {
|
|
1465
|
-
if (response.statusCode &&
|
|
1466
|
-
response.statusCode >= 200 &&
|
|
1467
|
-
response.statusCode <= 299) {
|
|
1468
|
-
body = models_1.ObjectSerializer.deserialize(body, 'DeleteWarehouse200Response');
|
|
1469
|
-
resolve({ response: response, body: body });
|
|
1470
|
-
}
|
|
1471
|
-
else {
|
|
1472
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1473
|
-
}
|
|
1474
|
-
}
|
|
1475
|
-
});
|
|
1476
|
-
});
|
|
1477
|
-
})];
|
|
1478
|
-
});
|
|
1479
|
-
});
|
|
1480
|
-
};
|
|
1481
|
-
WarehousesApi.prototype.getConnectionStateFromWarehouseAlpha = function (warehouseId, options) {
|
|
1482
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1483
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1484
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_17, _i, _a, interceptor;
|
|
1485
|
-
var _this = this;
|
|
1486
|
-
return __generator(this, function (_b) {
|
|
1487
|
-
localVarPath = this.basePath +
|
|
1488
|
-
'/warehouses/{warehouseId}/connection-state'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1489
|
-
localVarQueryParameters = {};
|
|
1490
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1491
|
-
produces = [
|
|
1492
|
-
'application/vnd.segment.v1alpha+json',
|
|
1493
|
-
'application/json',
|
|
1494
|
-
];
|
|
1495
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1496
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1497
|
-
}
|
|
1498
|
-
else {
|
|
1499
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1500
|
-
}
|
|
1501
|
-
localVarFormParams = {};
|
|
1502
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1503
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling getConnectionStateFromWarehouseAlpha.');
|
|
1504
|
-
}
|
|
1505
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1506
|
-
localVarUseFormData = false;
|
|
1507
|
-
localVarRequestOptions = {
|
|
1508
|
-
method: 'GET',
|
|
1509
|
-
qs: localVarQueryParameters,
|
|
1510
|
-
headers: localVarHeaderParams,
|
|
1511
|
-
uri: localVarPath,
|
|
1512
|
-
useQuerystring: this._useQuerystring,
|
|
1513
|
-
json: true,
|
|
1514
|
-
};
|
|
1515
|
-
authenticationPromise = Promise.resolve();
|
|
1516
|
-
if (this.authentications.token.accessToken) {
|
|
1517
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1518
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1519
|
-
});
|
|
1520
|
-
}
|
|
1521
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1522
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1523
|
-
});
|
|
1524
|
-
interceptorPromise = authenticationPromise;
|
|
1525
|
-
_loop_17 = function (interceptor) {
|
|
1526
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1527
|
-
return interceptor(localVarRequestOptions);
|
|
1528
|
-
});
|
|
1529
|
-
};
|
|
1530
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1531
|
-
interceptor = _a[_i];
|
|
1532
|
-
_loop_17(interceptor);
|
|
1533
|
-
}
|
|
1534
|
-
return [2, interceptorPromise.then(function () {
|
|
1535
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1536
|
-
if (localVarUseFormData) {
|
|
1537
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1538
|
-
}
|
|
1539
|
-
else {
|
|
1540
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1541
|
-
}
|
|
1542
|
-
}
|
|
1543
|
-
return new Promise(function (resolve, reject) {
|
|
1544
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1545
|
-
if (error) {
|
|
1546
|
-
reject(error);
|
|
1547
|
-
}
|
|
1548
|
-
else {
|
|
1549
|
-
if (response.statusCode &&
|
|
1550
|
-
response.statusCode >= 200 &&
|
|
1551
|
-
response.statusCode <= 299) {
|
|
1552
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetConnectionStateFromWarehouse200Response');
|
|
1553
|
-
resolve({ response: response, body: body });
|
|
1554
|
-
}
|
|
1555
|
-
else {
|
|
1556
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
});
|
|
1560
|
-
});
|
|
1561
|
-
})];
|
|
1562
|
-
});
|
|
1563
|
-
});
|
|
1564
|
-
};
|
|
1565
|
-
WarehousesApi.prototype.getConnectionStateFromWarehouseBeta = function (warehouseId, options) {
|
|
1566
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1567
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1568
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_18, _i, _a, interceptor;
|
|
1569
|
-
var _this = this;
|
|
1570
|
-
return __generator(this, function (_b) {
|
|
1571
|
-
localVarPath = this.basePath +
|
|
1572
|
-
'/warehouses/{warehouseId}/connection-state'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1573
|
-
localVarQueryParameters = {};
|
|
1574
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1575
|
-
produces = [
|
|
1576
|
-
'application/vnd.segment.v1beta+json',
|
|
1577
|
-
'application/json',
|
|
1578
|
-
];
|
|
1579
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1580
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1581
|
-
}
|
|
1582
|
-
else {
|
|
1583
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1584
|
-
}
|
|
1585
|
-
localVarFormParams = {};
|
|
1586
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1587
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling getConnectionStateFromWarehouseBeta.');
|
|
1588
|
-
}
|
|
1589
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1590
|
-
localVarUseFormData = false;
|
|
1591
|
-
localVarRequestOptions = {
|
|
1592
|
-
method: 'GET',
|
|
1593
|
-
qs: localVarQueryParameters,
|
|
1594
|
-
headers: localVarHeaderParams,
|
|
1595
|
-
uri: localVarPath,
|
|
1596
|
-
useQuerystring: this._useQuerystring,
|
|
1597
|
-
json: true,
|
|
1598
|
-
};
|
|
1599
|
-
authenticationPromise = Promise.resolve();
|
|
1600
|
-
if (this.authentications.token.accessToken) {
|
|
1601
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1602
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1603
|
-
});
|
|
1604
|
-
}
|
|
1605
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1606
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1607
|
-
});
|
|
1608
|
-
interceptorPromise = authenticationPromise;
|
|
1609
|
-
_loop_18 = function (interceptor) {
|
|
1610
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1611
|
-
return interceptor(localVarRequestOptions);
|
|
1612
|
-
});
|
|
1613
|
-
};
|
|
1614
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1615
|
-
interceptor = _a[_i];
|
|
1616
|
-
_loop_18(interceptor);
|
|
1617
|
-
}
|
|
1618
|
-
return [2, interceptorPromise.then(function () {
|
|
1619
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1620
|
-
if (localVarUseFormData) {
|
|
1621
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1622
|
-
}
|
|
1623
|
-
else {
|
|
1624
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
return new Promise(function (resolve, reject) {
|
|
1628
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1629
|
-
if (error) {
|
|
1630
|
-
reject(error);
|
|
1631
|
-
}
|
|
1632
|
-
else {
|
|
1633
|
-
if (response.statusCode &&
|
|
1634
|
-
response.statusCode >= 200 &&
|
|
1635
|
-
response.statusCode <= 299) {
|
|
1636
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetConnectionStateFromWarehouse200Response');
|
|
1637
|
-
resolve({ response: response, body: body });
|
|
1638
|
-
}
|
|
1639
|
-
else {
|
|
1640
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
});
|
|
1644
|
-
});
|
|
1645
|
-
})];
|
|
1646
|
-
});
|
|
1647
|
-
});
|
|
1648
|
-
};
|
|
1649
|
-
WarehousesApi.prototype.getConnectionStateFromWarehouseCurrent = function (warehouseId, options) {
|
|
1650
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1651
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1652
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_19, _i, _a, interceptor;
|
|
1653
|
-
var _this = this;
|
|
1654
|
-
return __generator(this, function (_b) {
|
|
1655
|
-
localVarPath = this.basePath +
|
|
1656
|
-
'/warehouses/{warehouseId}/connection-state'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1657
|
-
localVarQueryParameters = {};
|
|
1658
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1659
|
-
produces = ['application/json'];
|
|
1660
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1661
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1662
|
-
}
|
|
1663
|
-
else {
|
|
1664
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1665
|
-
}
|
|
1666
|
-
localVarFormParams = {};
|
|
1667
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1668
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling getConnectionStateFromWarehouseCurrent.');
|
|
1669
|
-
}
|
|
1670
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1671
|
-
localVarUseFormData = false;
|
|
1672
|
-
localVarRequestOptions = {
|
|
1673
|
-
method: 'GET',
|
|
1674
|
-
qs: localVarQueryParameters,
|
|
1675
|
-
headers: localVarHeaderParams,
|
|
1676
|
-
uri: localVarPath,
|
|
1677
|
-
useQuerystring: this._useQuerystring,
|
|
1678
|
-
json: true,
|
|
1679
|
-
};
|
|
1680
|
-
authenticationPromise = Promise.resolve();
|
|
1681
|
-
if (this.authentications.token.accessToken) {
|
|
1682
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1683
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1684
|
-
});
|
|
1685
|
-
}
|
|
1686
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1687
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1688
|
-
});
|
|
1689
|
-
interceptorPromise = authenticationPromise;
|
|
1690
|
-
_loop_19 = function (interceptor) {
|
|
1691
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1692
|
-
return interceptor(localVarRequestOptions);
|
|
1693
|
-
});
|
|
1694
|
-
};
|
|
1695
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1696
|
-
interceptor = _a[_i];
|
|
1697
|
-
_loop_19(interceptor);
|
|
1698
|
-
}
|
|
1699
|
-
return [2, interceptorPromise.then(function () {
|
|
1700
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1701
|
-
if (localVarUseFormData) {
|
|
1702
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1703
|
-
}
|
|
1704
|
-
else {
|
|
1705
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1706
|
-
}
|
|
1707
|
-
}
|
|
1708
|
-
return new Promise(function (resolve, reject) {
|
|
1709
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1710
|
-
if (error) {
|
|
1711
|
-
reject(error);
|
|
1712
|
-
}
|
|
1713
|
-
else {
|
|
1714
|
-
if (response.statusCode &&
|
|
1715
|
-
response.statusCode >= 200 &&
|
|
1716
|
-
response.statusCode <= 299) {
|
|
1717
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetConnectionStateFromWarehouse200Response');
|
|
1718
|
-
resolve({ response: response, body: body });
|
|
1719
|
-
}
|
|
1720
|
-
else {
|
|
1721
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
});
|
|
1725
|
-
});
|
|
1726
|
-
})];
|
|
1727
|
-
});
|
|
1728
|
-
});
|
|
1729
|
-
};
|
|
1730
|
-
WarehousesApi.prototype.getConnectionStateFromWarehouseV1 = function (warehouseId, options) {
|
|
1731
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1732
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1733
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_20, _i, _a, interceptor;
|
|
1734
|
-
var _this = this;
|
|
1735
|
-
return __generator(this, function (_b) {
|
|
1736
|
-
localVarPath = this.basePath +
|
|
1737
|
-
'/warehouses/{warehouseId}/connection-state'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1738
|
-
localVarQueryParameters = {};
|
|
1739
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1740
|
-
produces = [
|
|
1741
|
-
'application/vnd.segment.v1+json',
|
|
1742
|
-
'application/json',
|
|
1743
|
-
];
|
|
1744
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1745
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1746
|
-
}
|
|
1747
|
-
else {
|
|
1748
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1749
|
-
}
|
|
1750
|
-
localVarFormParams = {};
|
|
1751
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1752
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling getConnectionStateFromWarehouseV1.');
|
|
1753
|
-
}
|
|
1754
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1755
|
-
localVarUseFormData = false;
|
|
1756
|
-
localVarRequestOptions = {
|
|
1757
|
-
method: 'GET',
|
|
1758
|
-
qs: localVarQueryParameters,
|
|
1759
|
-
headers: localVarHeaderParams,
|
|
1760
|
-
uri: localVarPath,
|
|
1761
|
-
useQuerystring: this._useQuerystring,
|
|
1762
|
-
json: true,
|
|
1763
|
-
};
|
|
1764
|
-
authenticationPromise = Promise.resolve();
|
|
1765
|
-
if (this.authentications.token.accessToken) {
|
|
1766
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1767
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1768
|
-
});
|
|
1769
|
-
}
|
|
1770
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1771
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1772
|
-
});
|
|
1773
|
-
interceptorPromise = authenticationPromise;
|
|
1774
|
-
_loop_20 = function (interceptor) {
|
|
1775
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1776
|
-
return interceptor(localVarRequestOptions);
|
|
1777
|
-
});
|
|
1778
|
-
};
|
|
1779
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1780
|
-
interceptor = _a[_i];
|
|
1781
|
-
_loop_20(interceptor);
|
|
1782
|
-
}
|
|
1783
|
-
return [2, interceptorPromise.then(function () {
|
|
1784
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1785
|
-
if (localVarUseFormData) {
|
|
1786
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1787
|
-
}
|
|
1788
|
-
else {
|
|
1789
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1790
|
-
}
|
|
1791
|
-
}
|
|
1792
|
-
return new Promise(function (resolve, reject) {
|
|
1793
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1794
|
-
if (error) {
|
|
1795
|
-
reject(error);
|
|
1796
|
-
}
|
|
1797
|
-
else {
|
|
1798
|
-
if (response.statusCode &&
|
|
1799
|
-
response.statusCode >= 200 &&
|
|
1800
|
-
response.statusCode <= 299) {
|
|
1801
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetConnectionStateFromWarehouse200Response');
|
|
1802
|
-
resolve({ response: response, body: body });
|
|
1803
|
-
}
|
|
1804
|
-
else {
|
|
1805
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
});
|
|
1809
|
-
});
|
|
1810
|
-
})];
|
|
1811
|
-
});
|
|
1812
|
-
});
|
|
1813
|
-
};
|
|
1814
|
-
WarehousesApi.prototype.getWarehouseAlpha = function (warehouseId, options) {
|
|
1815
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1816
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1817
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_21, _i, _a, interceptor;
|
|
1818
|
-
var _this = this;
|
|
1819
|
-
return __generator(this, function (_b) {
|
|
1820
|
-
localVarPath = this.basePath +
|
|
1821
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1822
|
-
localVarQueryParameters = {};
|
|
1823
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1824
|
-
produces = [
|
|
1825
|
-
'application/vnd.segment.v1alpha+json',
|
|
1826
|
-
'application/json',
|
|
1827
|
-
];
|
|
1828
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1829
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1830
|
-
}
|
|
1831
|
-
else {
|
|
1832
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1833
|
-
}
|
|
1834
|
-
localVarFormParams = {};
|
|
1835
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1836
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling getWarehouseAlpha.');
|
|
1837
|
-
}
|
|
1838
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1839
|
-
localVarUseFormData = false;
|
|
1840
|
-
localVarRequestOptions = {
|
|
1841
|
-
method: 'GET',
|
|
1842
|
-
qs: localVarQueryParameters,
|
|
1843
|
-
headers: localVarHeaderParams,
|
|
1844
|
-
uri: localVarPath,
|
|
1845
|
-
useQuerystring: this._useQuerystring,
|
|
1846
|
-
json: true,
|
|
1847
|
-
};
|
|
1848
|
-
authenticationPromise = Promise.resolve();
|
|
1849
|
-
if (this.authentications.token.accessToken) {
|
|
1850
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1851
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1852
|
-
});
|
|
1853
|
-
}
|
|
1854
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1855
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1856
|
-
});
|
|
1857
|
-
interceptorPromise = authenticationPromise;
|
|
1858
|
-
_loop_21 = function (interceptor) {
|
|
1859
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1860
|
-
return interceptor(localVarRequestOptions);
|
|
1861
|
-
});
|
|
1862
|
-
};
|
|
1863
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1864
|
-
interceptor = _a[_i];
|
|
1865
|
-
_loop_21(interceptor);
|
|
1866
|
-
}
|
|
1867
|
-
return [2, interceptorPromise.then(function () {
|
|
1868
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1869
|
-
if (localVarUseFormData) {
|
|
1870
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1871
|
-
}
|
|
1872
|
-
else {
|
|
1873
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1874
|
-
}
|
|
1875
|
-
}
|
|
1876
|
-
return new Promise(function (resolve, reject) {
|
|
1877
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1878
|
-
if (error) {
|
|
1879
|
-
reject(error);
|
|
1880
|
-
}
|
|
1881
|
-
else {
|
|
1882
|
-
if (response.statusCode &&
|
|
1883
|
-
response.statusCode >= 200 &&
|
|
1884
|
-
response.statusCode <= 299) {
|
|
1885
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetWarehouse200Response');
|
|
1886
|
-
resolve({ response: response, body: body });
|
|
1887
|
-
}
|
|
1888
|
-
else {
|
|
1889
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1890
|
-
}
|
|
1891
|
-
}
|
|
1892
|
-
});
|
|
1893
|
-
});
|
|
1894
|
-
})];
|
|
1895
|
-
});
|
|
1896
|
-
});
|
|
1897
|
-
};
|
|
1898
|
-
WarehousesApi.prototype.getWarehouseBeta = function (warehouseId, options) {
|
|
1899
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1900
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1901
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_22, _i, _a, interceptor;
|
|
1902
|
-
var _this = this;
|
|
1903
|
-
return __generator(this, function (_b) {
|
|
1904
|
-
localVarPath = this.basePath +
|
|
1905
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1906
|
-
localVarQueryParameters = {};
|
|
1907
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1908
|
-
produces = [
|
|
1909
|
-
'application/vnd.segment.v1beta+json',
|
|
1910
|
-
'application/json',
|
|
1911
|
-
];
|
|
1912
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1913
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1914
|
-
}
|
|
1915
|
-
else {
|
|
1916
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1917
|
-
}
|
|
1918
|
-
localVarFormParams = {};
|
|
1919
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
1920
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling getWarehouseBeta.');
|
|
1921
|
-
}
|
|
1922
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1923
|
-
localVarUseFormData = false;
|
|
1924
|
-
localVarRequestOptions = {
|
|
1925
|
-
method: 'GET',
|
|
1926
|
-
qs: localVarQueryParameters,
|
|
1927
|
-
headers: localVarHeaderParams,
|
|
1928
|
-
uri: localVarPath,
|
|
1929
|
-
useQuerystring: this._useQuerystring,
|
|
1930
|
-
json: true,
|
|
1931
|
-
};
|
|
1932
|
-
authenticationPromise = Promise.resolve();
|
|
1933
|
-
if (this.authentications.token.accessToken) {
|
|
1934
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1935
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1936
|
-
});
|
|
1937
|
-
}
|
|
1938
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1939
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1940
|
-
});
|
|
1941
|
-
interceptorPromise = authenticationPromise;
|
|
1942
|
-
_loop_22 = function (interceptor) {
|
|
1943
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1944
|
-
return interceptor(localVarRequestOptions);
|
|
1945
|
-
});
|
|
1946
|
-
};
|
|
1947
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1948
|
-
interceptor = _a[_i];
|
|
1949
|
-
_loop_22(interceptor);
|
|
1950
|
-
}
|
|
1951
|
-
return [2, interceptorPromise.then(function () {
|
|
1952
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1953
|
-
if (localVarUseFormData) {
|
|
1954
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1955
|
-
}
|
|
1956
|
-
else {
|
|
1957
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
|
-
return new Promise(function (resolve, reject) {
|
|
1961
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1962
|
-
if (error) {
|
|
1963
|
-
reject(error);
|
|
1964
|
-
}
|
|
1965
|
-
else {
|
|
1966
|
-
if (response.statusCode &&
|
|
1967
|
-
response.statusCode >= 200 &&
|
|
1968
|
-
response.statusCode <= 299) {
|
|
1969
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetWarehouse200Response');
|
|
1970
|
-
resolve({ response: response, body: body });
|
|
1971
|
-
}
|
|
1972
|
-
else {
|
|
1973
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1974
|
-
}
|
|
1975
|
-
}
|
|
1976
|
-
});
|
|
1977
|
-
});
|
|
1978
|
-
})];
|
|
1979
|
-
});
|
|
1980
|
-
});
|
|
1981
|
-
};
|
|
1982
|
-
WarehousesApi.prototype.getWarehouseCurrent = function (warehouseId, options) {
|
|
1983
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1984
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1985
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_23, _i, _a, interceptor;
|
|
1986
|
-
var _this = this;
|
|
1987
|
-
return __generator(this, function (_b) {
|
|
1988
|
-
localVarPath = this.basePath +
|
|
1989
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
1990
|
-
localVarQueryParameters = {};
|
|
1991
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1992
|
-
produces = ['application/json'];
|
|
1993
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1994
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1995
|
-
}
|
|
1996
|
-
else {
|
|
1997
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1998
|
-
}
|
|
1999
|
-
localVarFormParams = {};
|
|
2000
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2001
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling getWarehouseCurrent.');
|
|
2002
|
-
}
|
|
2003
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2004
|
-
localVarUseFormData = false;
|
|
2005
|
-
localVarRequestOptions = {
|
|
2006
|
-
method: 'GET',
|
|
2007
|
-
qs: localVarQueryParameters,
|
|
2008
|
-
headers: localVarHeaderParams,
|
|
2009
|
-
uri: localVarPath,
|
|
2010
|
-
useQuerystring: this._useQuerystring,
|
|
2011
|
-
json: true,
|
|
2012
|
-
};
|
|
2013
|
-
authenticationPromise = Promise.resolve();
|
|
2014
|
-
if (this.authentications.token.accessToken) {
|
|
2015
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2016
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2017
|
-
});
|
|
2018
|
-
}
|
|
2019
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2020
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2021
|
-
});
|
|
2022
|
-
interceptorPromise = authenticationPromise;
|
|
2023
|
-
_loop_23 = function (interceptor) {
|
|
2024
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2025
|
-
return interceptor(localVarRequestOptions);
|
|
2026
|
-
});
|
|
2027
|
-
};
|
|
2028
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2029
|
-
interceptor = _a[_i];
|
|
2030
|
-
_loop_23(interceptor);
|
|
2031
|
-
}
|
|
2032
|
-
return [2, interceptorPromise.then(function () {
|
|
2033
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2034
|
-
if (localVarUseFormData) {
|
|
2035
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2036
|
-
}
|
|
2037
|
-
else {
|
|
2038
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
return new Promise(function (resolve, reject) {
|
|
2042
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2043
|
-
if (error) {
|
|
2044
|
-
reject(error);
|
|
2045
|
-
}
|
|
2046
|
-
else {
|
|
2047
|
-
if (response.statusCode &&
|
|
2048
|
-
response.statusCode >= 200 &&
|
|
2049
|
-
response.statusCode <= 299) {
|
|
2050
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetWarehouse200Response');
|
|
2051
|
-
resolve({ response: response, body: body });
|
|
2052
|
-
}
|
|
2053
|
-
else {
|
|
2054
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2055
|
-
}
|
|
2056
|
-
}
|
|
2057
|
-
});
|
|
2058
|
-
});
|
|
2059
|
-
})];
|
|
2060
|
-
});
|
|
2061
|
-
});
|
|
2062
|
-
};
|
|
2063
|
-
WarehousesApi.prototype.getWarehouseV1 = function (warehouseId, options) {
|
|
2064
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2065
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2066
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_24, _i, _a, interceptor;
|
|
2067
|
-
var _this = this;
|
|
2068
|
-
return __generator(this, function (_b) {
|
|
2069
|
-
localVarPath = this.basePath +
|
|
2070
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
2071
|
-
localVarQueryParameters = {};
|
|
2072
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2073
|
-
produces = [
|
|
2074
|
-
'application/vnd.segment.v1+json',
|
|
2075
|
-
'application/json',
|
|
2076
|
-
];
|
|
2077
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2078
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2079
|
-
}
|
|
2080
|
-
else {
|
|
2081
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2082
|
-
}
|
|
2083
|
-
localVarFormParams = {};
|
|
2084
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2085
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling getWarehouseV1.');
|
|
2086
|
-
}
|
|
2087
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2088
|
-
localVarUseFormData = false;
|
|
2089
|
-
localVarRequestOptions = {
|
|
2090
|
-
method: 'GET',
|
|
2091
|
-
qs: localVarQueryParameters,
|
|
2092
|
-
headers: localVarHeaderParams,
|
|
2093
|
-
uri: localVarPath,
|
|
2094
|
-
useQuerystring: this._useQuerystring,
|
|
2095
|
-
json: true,
|
|
2096
|
-
};
|
|
2097
|
-
authenticationPromise = Promise.resolve();
|
|
2098
|
-
if (this.authentications.token.accessToken) {
|
|
2099
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2100
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2101
|
-
});
|
|
2102
|
-
}
|
|
2103
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2104
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2105
|
-
});
|
|
2106
|
-
interceptorPromise = authenticationPromise;
|
|
2107
|
-
_loop_24 = function (interceptor) {
|
|
2108
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2109
|
-
return interceptor(localVarRequestOptions);
|
|
2110
|
-
});
|
|
2111
|
-
};
|
|
2112
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2113
|
-
interceptor = _a[_i];
|
|
2114
|
-
_loop_24(interceptor);
|
|
2115
|
-
}
|
|
2116
|
-
return [2, interceptorPromise.then(function () {
|
|
2117
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2118
|
-
if (localVarUseFormData) {
|
|
2119
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2120
|
-
}
|
|
2121
|
-
else {
|
|
2122
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2123
|
-
}
|
|
2124
|
-
}
|
|
2125
|
-
return new Promise(function (resolve, reject) {
|
|
2126
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2127
|
-
if (error) {
|
|
2128
|
-
reject(error);
|
|
2129
|
-
}
|
|
2130
|
-
else {
|
|
2131
|
-
if (response.statusCode &&
|
|
2132
|
-
response.statusCode >= 200 &&
|
|
2133
|
-
response.statusCode <= 299) {
|
|
2134
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetWarehouse200Response');
|
|
2135
|
-
resolve({ response: response, body: body });
|
|
2136
|
-
}
|
|
2137
|
-
else {
|
|
2138
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
});
|
|
2142
|
-
});
|
|
2143
|
-
})];
|
|
2144
|
-
});
|
|
2145
|
-
});
|
|
2146
|
-
};
|
|
2147
|
-
WarehousesApi.prototype.listConnectedSourcesFromWarehouseAlpha = function (warehouseId, pagination, options) {
|
|
2148
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2149
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2150
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_25, _i, _a, interceptor;
|
|
2151
|
-
var _this = this;
|
|
2152
|
-
return __generator(this, function (_b) {
|
|
2153
|
-
localVarPath = this.basePath +
|
|
2154
|
-
'/warehouses/{warehouseId}/connected-sources'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
2155
|
-
localVarQueryParameters = {};
|
|
2156
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2157
|
-
produces = [
|
|
2158
|
-
'application/vnd.segment.v1alpha+json',
|
|
2159
|
-
'application/json',
|
|
2160
|
-
];
|
|
2161
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2162
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2163
|
-
}
|
|
2164
|
-
else {
|
|
2165
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2166
|
-
}
|
|
2167
|
-
localVarFormParams = {};
|
|
2168
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2169
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling listConnectedSourcesFromWarehouseAlpha.');
|
|
2170
|
-
}
|
|
2171
|
-
if (pagination === null || pagination === undefined) {
|
|
2172
|
-
throw new Error('Required parameter pagination was null or undefined when calling listConnectedSourcesFromWarehouseAlpha.');
|
|
2173
|
-
}
|
|
2174
|
-
if (pagination !== undefined) {
|
|
2175
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
2176
|
-
}
|
|
2177
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2178
|
-
localVarUseFormData = false;
|
|
2179
|
-
localVarRequestOptions = {
|
|
2180
|
-
method: 'GET',
|
|
2181
|
-
qs: localVarQueryParameters,
|
|
2182
|
-
headers: localVarHeaderParams,
|
|
2183
|
-
uri: localVarPath,
|
|
2184
|
-
useQuerystring: this._useQuerystring,
|
|
2185
|
-
json: true,
|
|
2186
|
-
};
|
|
2187
|
-
authenticationPromise = Promise.resolve();
|
|
2188
|
-
if (this.authentications.token.accessToken) {
|
|
2189
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2190
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2191
|
-
});
|
|
2192
|
-
}
|
|
2193
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2194
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2195
|
-
});
|
|
2196
|
-
interceptorPromise = authenticationPromise;
|
|
2197
|
-
_loop_25 = function (interceptor) {
|
|
2198
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2199
|
-
return interceptor(localVarRequestOptions);
|
|
2200
|
-
});
|
|
2201
|
-
};
|
|
2202
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2203
|
-
interceptor = _a[_i];
|
|
2204
|
-
_loop_25(interceptor);
|
|
2205
|
-
}
|
|
2206
|
-
return [2, interceptorPromise.then(function () {
|
|
2207
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2208
|
-
if (localVarUseFormData) {
|
|
2209
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2210
|
-
}
|
|
2211
|
-
else {
|
|
2212
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2213
|
-
}
|
|
2214
|
-
}
|
|
2215
|
-
return new Promise(function (resolve, reject) {
|
|
2216
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2217
|
-
if (error) {
|
|
2218
|
-
reject(error);
|
|
2219
|
-
}
|
|
2220
|
-
else {
|
|
2221
|
-
if (response.statusCode &&
|
|
2222
|
-
response.statusCode >= 200 &&
|
|
2223
|
-
response.statusCode <= 299) {
|
|
2224
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListConnectedSourcesFromWarehouse200Response');
|
|
2225
|
-
resolve({ response: response, body: body });
|
|
2226
|
-
}
|
|
2227
|
-
else {
|
|
2228
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2229
|
-
}
|
|
2230
|
-
}
|
|
2231
|
-
});
|
|
2232
|
-
});
|
|
2233
|
-
})];
|
|
2234
|
-
});
|
|
2235
|
-
});
|
|
2236
|
-
};
|
|
2237
|
-
WarehousesApi.prototype.listConnectedSourcesFromWarehouseBeta = function (warehouseId, pagination, options) {
|
|
2238
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2239
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2240
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_26, _i, _a, interceptor;
|
|
2241
|
-
var _this = this;
|
|
2242
|
-
return __generator(this, function (_b) {
|
|
2243
|
-
localVarPath = this.basePath +
|
|
2244
|
-
'/warehouses/{warehouseId}/connected-sources'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
2245
|
-
localVarQueryParameters = {};
|
|
2246
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2247
|
-
produces = [
|
|
2248
|
-
'application/vnd.segment.v1beta+json',
|
|
2249
|
-
'application/json',
|
|
2250
|
-
];
|
|
2251
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2252
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2253
|
-
}
|
|
2254
|
-
else {
|
|
2255
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2256
|
-
}
|
|
2257
|
-
localVarFormParams = {};
|
|
2258
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2259
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling listConnectedSourcesFromWarehouseBeta.');
|
|
2260
|
-
}
|
|
2261
|
-
if (pagination === null || pagination === undefined) {
|
|
2262
|
-
throw new Error('Required parameter pagination was null or undefined when calling listConnectedSourcesFromWarehouseBeta.');
|
|
2263
|
-
}
|
|
2264
|
-
if (pagination !== undefined) {
|
|
2265
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
2266
|
-
}
|
|
2267
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2268
|
-
localVarUseFormData = false;
|
|
2269
|
-
localVarRequestOptions = {
|
|
2270
|
-
method: 'GET',
|
|
2271
|
-
qs: localVarQueryParameters,
|
|
2272
|
-
headers: localVarHeaderParams,
|
|
2273
|
-
uri: localVarPath,
|
|
2274
|
-
useQuerystring: this._useQuerystring,
|
|
2275
|
-
json: true,
|
|
2276
|
-
};
|
|
2277
|
-
authenticationPromise = Promise.resolve();
|
|
2278
|
-
if (this.authentications.token.accessToken) {
|
|
2279
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2280
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2281
|
-
});
|
|
2282
|
-
}
|
|
2283
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2284
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2285
|
-
});
|
|
2286
|
-
interceptorPromise = authenticationPromise;
|
|
2287
|
-
_loop_26 = function (interceptor) {
|
|
2288
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2289
|
-
return interceptor(localVarRequestOptions);
|
|
2290
|
-
});
|
|
2291
|
-
};
|
|
2292
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2293
|
-
interceptor = _a[_i];
|
|
2294
|
-
_loop_26(interceptor);
|
|
2295
|
-
}
|
|
2296
|
-
return [2, interceptorPromise.then(function () {
|
|
2297
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2298
|
-
if (localVarUseFormData) {
|
|
2299
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2300
|
-
}
|
|
2301
|
-
else {
|
|
2302
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2303
|
-
}
|
|
2304
|
-
}
|
|
2305
|
-
return new Promise(function (resolve, reject) {
|
|
2306
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2307
|
-
if (error) {
|
|
2308
|
-
reject(error);
|
|
2309
|
-
}
|
|
2310
|
-
else {
|
|
2311
|
-
if (response.statusCode &&
|
|
2312
|
-
response.statusCode >= 200 &&
|
|
2313
|
-
response.statusCode <= 299) {
|
|
2314
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListConnectedSourcesFromWarehouse200Response');
|
|
2315
|
-
resolve({ response: response, body: body });
|
|
2316
|
-
}
|
|
2317
|
-
else {
|
|
2318
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2319
|
-
}
|
|
2320
|
-
}
|
|
2321
|
-
});
|
|
2322
|
-
});
|
|
2323
|
-
})];
|
|
2324
|
-
});
|
|
2325
|
-
});
|
|
2326
|
-
};
|
|
2327
|
-
WarehousesApi.prototype.listConnectedSourcesFromWarehouseCurrent = function (warehouseId, pagination, options) {
|
|
2328
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2329
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2330
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_27, _i, _a, interceptor;
|
|
2331
|
-
var _this = this;
|
|
2332
|
-
return __generator(this, function (_b) {
|
|
2333
|
-
localVarPath = this.basePath +
|
|
2334
|
-
'/warehouses/{warehouseId}/connected-sources'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
2335
|
-
localVarQueryParameters = {};
|
|
2336
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2337
|
-
produces = ['application/json'];
|
|
2338
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2339
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2340
|
-
}
|
|
2341
|
-
else {
|
|
2342
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2343
|
-
}
|
|
2344
|
-
localVarFormParams = {};
|
|
2345
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2346
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling listConnectedSourcesFromWarehouseCurrent.');
|
|
2347
|
-
}
|
|
2348
|
-
if (pagination === null || pagination === undefined) {
|
|
2349
|
-
throw new Error('Required parameter pagination was null or undefined when calling listConnectedSourcesFromWarehouseCurrent.');
|
|
2350
|
-
}
|
|
2351
|
-
if (pagination !== undefined) {
|
|
2352
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
2353
|
-
}
|
|
2354
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2355
|
-
localVarUseFormData = false;
|
|
2356
|
-
localVarRequestOptions = {
|
|
2357
|
-
method: 'GET',
|
|
2358
|
-
qs: localVarQueryParameters,
|
|
2359
|
-
headers: localVarHeaderParams,
|
|
2360
|
-
uri: localVarPath,
|
|
2361
|
-
useQuerystring: this._useQuerystring,
|
|
2362
|
-
json: true,
|
|
2363
|
-
};
|
|
2364
|
-
authenticationPromise = Promise.resolve();
|
|
2365
|
-
if (this.authentications.token.accessToken) {
|
|
2366
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2367
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2368
|
-
});
|
|
2369
|
-
}
|
|
2370
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2371
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2372
|
-
});
|
|
2373
|
-
interceptorPromise = authenticationPromise;
|
|
2374
|
-
_loop_27 = function (interceptor) {
|
|
2375
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2376
|
-
return interceptor(localVarRequestOptions);
|
|
2377
|
-
});
|
|
2378
|
-
};
|
|
2379
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2380
|
-
interceptor = _a[_i];
|
|
2381
|
-
_loop_27(interceptor);
|
|
2382
|
-
}
|
|
2383
|
-
return [2, interceptorPromise.then(function () {
|
|
2384
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2385
|
-
if (localVarUseFormData) {
|
|
2386
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2387
|
-
}
|
|
2388
|
-
else {
|
|
2389
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2390
|
-
}
|
|
2391
|
-
}
|
|
2392
|
-
return new Promise(function (resolve, reject) {
|
|
2393
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2394
|
-
if (error) {
|
|
2395
|
-
reject(error);
|
|
2396
|
-
}
|
|
2397
|
-
else {
|
|
2398
|
-
if (response.statusCode &&
|
|
2399
|
-
response.statusCode >= 200 &&
|
|
2400
|
-
response.statusCode <= 299) {
|
|
2401
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListConnectedSourcesFromWarehouse200Response');
|
|
2402
|
-
resolve({ response: response, body: body });
|
|
2403
|
-
}
|
|
2404
|
-
else {
|
|
2405
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2406
|
-
}
|
|
2407
|
-
}
|
|
2408
|
-
});
|
|
2409
|
-
});
|
|
2410
|
-
})];
|
|
2411
|
-
});
|
|
2412
|
-
});
|
|
2413
|
-
};
|
|
2414
|
-
WarehousesApi.prototype.listConnectedSourcesFromWarehouseV1 = function (warehouseId, pagination, options) {
|
|
2415
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2416
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2417
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_28, _i, _a, interceptor;
|
|
2418
|
-
var _this = this;
|
|
2419
|
-
return __generator(this, function (_b) {
|
|
2420
|
-
localVarPath = this.basePath +
|
|
2421
|
-
'/warehouses/{warehouseId}/connected-sources'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
2422
|
-
localVarQueryParameters = {};
|
|
2423
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2424
|
-
produces = [
|
|
2425
|
-
'application/vnd.segment.v1+json',
|
|
2426
|
-
'application/json',
|
|
2427
|
-
];
|
|
2428
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2429
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2430
|
-
}
|
|
2431
|
-
else {
|
|
2432
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2433
|
-
}
|
|
2434
|
-
localVarFormParams = {};
|
|
2435
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2436
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling listConnectedSourcesFromWarehouseV1.');
|
|
2437
|
-
}
|
|
2438
|
-
if (pagination === null || pagination === undefined) {
|
|
2439
|
-
throw new Error('Required parameter pagination was null or undefined when calling listConnectedSourcesFromWarehouseV1.');
|
|
2440
|
-
}
|
|
2441
|
-
if (pagination !== undefined) {
|
|
2442
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
2443
|
-
}
|
|
2444
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2445
|
-
localVarUseFormData = false;
|
|
2446
|
-
localVarRequestOptions = {
|
|
2447
|
-
method: 'GET',
|
|
2448
|
-
qs: localVarQueryParameters,
|
|
2449
|
-
headers: localVarHeaderParams,
|
|
2450
|
-
uri: localVarPath,
|
|
2451
|
-
useQuerystring: this._useQuerystring,
|
|
2452
|
-
json: true,
|
|
2453
|
-
};
|
|
2454
|
-
authenticationPromise = Promise.resolve();
|
|
2455
|
-
if (this.authentications.token.accessToken) {
|
|
2456
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2457
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2458
|
-
});
|
|
2459
|
-
}
|
|
2460
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2461
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2462
|
-
});
|
|
2463
|
-
interceptorPromise = authenticationPromise;
|
|
2464
|
-
_loop_28 = function (interceptor) {
|
|
2465
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2466
|
-
return interceptor(localVarRequestOptions);
|
|
2467
|
-
});
|
|
2468
|
-
};
|
|
2469
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2470
|
-
interceptor = _a[_i];
|
|
2471
|
-
_loop_28(interceptor);
|
|
2472
|
-
}
|
|
2473
|
-
return [2, interceptorPromise.then(function () {
|
|
2474
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2475
|
-
if (localVarUseFormData) {
|
|
2476
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2477
|
-
}
|
|
2478
|
-
else {
|
|
2479
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
return new Promise(function (resolve, reject) {
|
|
2483
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2484
|
-
if (error) {
|
|
2485
|
-
reject(error);
|
|
2486
|
-
}
|
|
2487
|
-
else {
|
|
2488
|
-
if (response.statusCode &&
|
|
2489
|
-
response.statusCode >= 200 &&
|
|
2490
|
-
response.statusCode <= 299) {
|
|
2491
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListConnectedSourcesFromWarehouse200Response');
|
|
2492
|
-
resolve({ response: response, body: body });
|
|
2493
|
-
}
|
|
2494
|
-
else {
|
|
2495
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2496
|
-
}
|
|
2497
|
-
}
|
|
2498
|
-
});
|
|
2499
|
-
});
|
|
2500
|
-
})];
|
|
2501
|
-
});
|
|
2502
|
-
});
|
|
2503
|
-
};
|
|
2504
|
-
WarehousesApi.prototype.listWarehousesAlpha = function (pagination, options) {
|
|
2505
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2506
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2507
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_29, _i, _a, interceptor;
|
|
2508
|
-
var _this = this;
|
|
2509
|
-
return __generator(this, function (_b) {
|
|
2510
|
-
localVarPath = this.basePath + '/warehouses';
|
|
2511
|
-
localVarQueryParameters = {};
|
|
2512
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2513
|
-
produces = [
|
|
2514
|
-
'application/vnd.segment.v1alpha+json',
|
|
2515
|
-
'application/json',
|
|
2516
|
-
];
|
|
2517
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2518
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2519
|
-
}
|
|
2520
|
-
else {
|
|
2521
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2522
|
-
}
|
|
2523
|
-
localVarFormParams = {};
|
|
2524
|
-
if (pagination === null || pagination === undefined) {
|
|
2525
|
-
throw new Error('Required parameter pagination was null or undefined when calling listWarehousesAlpha.');
|
|
2526
|
-
}
|
|
2527
|
-
if (pagination !== undefined) {
|
|
2528
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
2529
|
-
}
|
|
2530
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2531
|
-
localVarUseFormData = false;
|
|
2532
|
-
localVarRequestOptions = {
|
|
2533
|
-
method: 'GET',
|
|
2534
|
-
qs: localVarQueryParameters,
|
|
2535
|
-
headers: localVarHeaderParams,
|
|
2536
|
-
uri: localVarPath,
|
|
2537
|
-
useQuerystring: this._useQuerystring,
|
|
2538
|
-
json: true,
|
|
2539
|
-
};
|
|
2540
|
-
authenticationPromise = Promise.resolve();
|
|
2541
|
-
if (this.authentications.token.accessToken) {
|
|
2542
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2543
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2544
|
-
});
|
|
2545
|
-
}
|
|
2546
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2547
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2548
|
-
});
|
|
2549
|
-
interceptorPromise = authenticationPromise;
|
|
2550
|
-
_loop_29 = function (interceptor) {
|
|
2551
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2552
|
-
return interceptor(localVarRequestOptions);
|
|
2553
|
-
});
|
|
2554
|
-
};
|
|
2555
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2556
|
-
interceptor = _a[_i];
|
|
2557
|
-
_loop_29(interceptor);
|
|
2558
|
-
}
|
|
2559
|
-
return [2, interceptorPromise.then(function () {
|
|
2560
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2561
|
-
if (localVarUseFormData) {
|
|
2562
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2563
|
-
}
|
|
2564
|
-
else {
|
|
2565
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2566
|
-
}
|
|
2567
|
-
}
|
|
2568
|
-
return new Promise(function (resolve, reject) {
|
|
2569
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2570
|
-
if (error) {
|
|
2571
|
-
reject(error);
|
|
2572
|
-
}
|
|
2573
|
-
else {
|
|
2574
|
-
if (response.statusCode &&
|
|
2575
|
-
response.statusCode >= 200 &&
|
|
2576
|
-
response.statusCode <= 299) {
|
|
2577
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListWarehouses200Response');
|
|
2578
|
-
resolve({ response: response, body: body });
|
|
2579
|
-
}
|
|
2580
|
-
else {
|
|
2581
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2582
|
-
}
|
|
2583
|
-
}
|
|
2584
|
-
});
|
|
2585
|
-
});
|
|
2586
|
-
})];
|
|
2587
|
-
});
|
|
2588
|
-
});
|
|
2589
|
-
};
|
|
2590
|
-
WarehousesApi.prototype.listWarehousesBeta = function (pagination, options) {
|
|
2591
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2592
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2593
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_30, _i, _a, interceptor;
|
|
2594
|
-
var _this = this;
|
|
2595
|
-
return __generator(this, function (_b) {
|
|
2596
|
-
localVarPath = this.basePath + '/warehouses';
|
|
2597
|
-
localVarQueryParameters = {};
|
|
2598
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2599
|
-
produces = [
|
|
2600
|
-
'application/vnd.segment.v1beta+json',
|
|
2601
|
-
'application/json',
|
|
2602
|
-
];
|
|
2603
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2604
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2605
|
-
}
|
|
2606
|
-
else {
|
|
2607
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2608
|
-
}
|
|
2609
|
-
localVarFormParams = {};
|
|
2610
|
-
if (pagination === null || pagination === undefined) {
|
|
2611
|
-
throw new Error('Required parameter pagination was null or undefined when calling listWarehousesBeta.');
|
|
2612
|
-
}
|
|
2613
|
-
if (pagination !== undefined) {
|
|
2614
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
2615
|
-
}
|
|
2616
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2617
|
-
localVarUseFormData = false;
|
|
2618
|
-
localVarRequestOptions = {
|
|
2619
|
-
method: 'GET',
|
|
2620
|
-
qs: localVarQueryParameters,
|
|
2621
|
-
headers: localVarHeaderParams,
|
|
2622
|
-
uri: localVarPath,
|
|
2623
|
-
useQuerystring: this._useQuerystring,
|
|
2624
|
-
json: true,
|
|
2625
|
-
};
|
|
2626
|
-
authenticationPromise = Promise.resolve();
|
|
2627
|
-
if (this.authentications.token.accessToken) {
|
|
2628
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2629
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2630
|
-
});
|
|
2631
|
-
}
|
|
2632
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2633
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2634
|
-
});
|
|
2635
|
-
interceptorPromise = authenticationPromise;
|
|
2636
|
-
_loop_30 = function (interceptor) {
|
|
2637
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2638
|
-
return interceptor(localVarRequestOptions);
|
|
2639
|
-
});
|
|
2640
|
-
};
|
|
2641
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2642
|
-
interceptor = _a[_i];
|
|
2643
|
-
_loop_30(interceptor);
|
|
2644
|
-
}
|
|
2645
|
-
return [2, interceptorPromise.then(function () {
|
|
2646
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2647
|
-
if (localVarUseFormData) {
|
|
2648
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2649
|
-
}
|
|
2650
|
-
else {
|
|
2651
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2652
|
-
}
|
|
2653
|
-
}
|
|
2654
|
-
return new Promise(function (resolve, reject) {
|
|
2655
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2656
|
-
if (error) {
|
|
2657
|
-
reject(error);
|
|
2658
|
-
}
|
|
2659
|
-
else {
|
|
2660
|
-
if (response.statusCode &&
|
|
2661
|
-
response.statusCode >= 200 &&
|
|
2662
|
-
response.statusCode <= 299) {
|
|
2663
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListWarehouses200Response');
|
|
2664
|
-
resolve({ response: response, body: body });
|
|
2665
|
-
}
|
|
2666
|
-
else {
|
|
2667
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2668
|
-
}
|
|
2669
|
-
}
|
|
2670
|
-
});
|
|
2671
|
-
});
|
|
2672
|
-
})];
|
|
2673
|
-
});
|
|
2674
|
-
});
|
|
2675
|
-
};
|
|
2676
|
-
WarehousesApi.prototype.listWarehousesCurrent = function (pagination, options) {
|
|
2677
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2678
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2679
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_31, _i, _a, interceptor;
|
|
2680
|
-
var _this = this;
|
|
2681
|
-
return __generator(this, function (_b) {
|
|
2682
|
-
localVarPath = this.basePath + '/warehouses';
|
|
2683
|
-
localVarQueryParameters = {};
|
|
2684
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2685
|
-
produces = ['application/json'];
|
|
2686
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2687
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2688
|
-
}
|
|
2689
|
-
else {
|
|
2690
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2691
|
-
}
|
|
2692
|
-
localVarFormParams = {};
|
|
2693
|
-
if (pagination === null || pagination === undefined) {
|
|
2694
|
-
throw new Error('Required parameter pagination was null or undefined when calling listWarehousesCurrent.');
|
|
2695
|
-
}
|
|
2696
|
-
if (pagination !== undefined) {
|
|
2697
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
2698
|
-
}
|
|
2699
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2700
|
-
localVarUseFormData = false;
|
|
2701
|
-
localVarRequestOptions = {
|
|
2702
|
-
method: 'GET',
|
|
2703
|
-
qs: localVarQueryParameters,
|
|
2704
|
-
headers: localVarHeaderParams,
|
|
2705
|
-
uri: localVarPath,
|
|
2706
|
-
useQuerystring: this._useQuerystring,
|
|
2707
|
-
json: true,
|
|
2708
|
-
};
|
|
2709
|
-
authenticationPromise = Promise.resolve();
|
|
2710
|
-
if (this.authentications.token.accessToken) {
|
|
2711
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2712
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2713
|
-
});
|
|
2714
|
-
}
|
|
2715
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2716
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2717
|
-
});
|
|
2718
|
-
interceptorPromise = authenticationPromise;
|
|
2719
|
-
_loop_31 = function (interceptor) {
|
|
2720
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2721
|
-
return interceptor(localVarRequestOptions);
|
|
2722
|
-
});
|
|
2723
|
-
};
|
|
2724
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2725
|
-
interceptor = _a[_i];
|
|
2726
|
-
_loop_31(interceptor);
|
|
2727
|
-
}
|
|
2728
|
-
return [2, interceptorPromise.then(function () {
|
|
2729
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2730
|
-
if (localVarUseFormData) {
|
|
2731
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2732
|
-
}
|
|
2733
|
-
else {
|
|
2734
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2735
|
-
}
|
|
2736
|
-
}
|
|
2737
|
-
return new Promise(function (resolve, reject) {
|
|
2738
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2739
|
-
if (error) {
|
|
2740
|
-
reject(error);
|
|
2741
|
-
}
|
|
2742
|
-
else {
|
|
2743
|
-
if (response.statusCode &&
|
|
2744
|
-
response.statusCode >= 200 &&
|
|
2745
|
-
response.statusCode <= 299) {
|
|
2746
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListWarehouses200Response');
|
|
2747
|
-
resolve({ response: response, body: body });
|
|
2748
|
-
}
|
|
2749
|
-
else {
|
|
2750
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2751
|
-
}
|
|
2752
|
-
}
|
|
2753
|
-
});
|
|
2754
|
-
});
|
|
2755
|
-
})];
|
|
2756
|
-
});
|
|
2757
|
-
});
|
|
2758
|
-
};
|
|
2759
|
-
WarehousesApi.prototype.listWarehousesV1 = function (pagination, options) {
|
|
2760
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2761
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2762
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_32, _i, _a, interceptor;
|
|
2763
|
-
var _this = this;
|
|
2764
|
-
return __generator(this, function (_b) {
|
|
2765
|
-
localVarPath = this.basePath + '/warehouses';
|
|
2766
|
-
localVarQueryParameters = {};
|
|
2767
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2768
|
-
produces = [
|
|
2769
|
-
'application/vnd.segment.v1+json',
|
|
2770
|
-
'application/json',
|
|
2771
|
-
];
|
|
2772
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2773
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2774
|
-
}
|
|
2775
|
-
else {
|
|
2776
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2777
|
-
}
|
|
2778
|
-
localVarFormParams = {};
|
|
2779
|
-
if (pagination === null || pagination === undefined) {
|
|
2780
|
-
throw new Error('Required parameter pagination was null or undefined when calling listWarehousesV1.');
|
|
2781
|
-
}
|
|
2782
|
-
if (pagination !== undefined) {
|
|
2783
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
2784
|
-
}
|
|
2785
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2786
|
-
localVarUseFormData = false;
|
|
2787
|
-
localVarRequestOptions = {
|
|
2788
|
-
method: 'GET',
|
|
2789
|
-
qs: localVarQueryParameters,
|
|
2790
|
-
headers: localVarHeaderParams,
|
|
2791
|
-
uri: localVarPath,
|
|
2792
|
-
useQuerystring: this._useQuerystring,
|
|
2793
|
-
json: true,
|
|
2794
|
-
};
|
|
2795
|
-
authenticationPromise = Promise.resolve();
|
|
2796
|
-
if (this.authentications.token.accessToken) {
|
|
2797
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2798
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2799
|
-
});
|
|
2800
|
-
}
|
|
2801
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2802
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2803
|
-
});
|
|
2804
|
-
interceptorPromise = authenticationPromise;
|
|
2805
|
-
_loop_32 = function (interceptor) {
|
|
2806
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2807
|
-
return interceptor(localVarRequestOptions);
|
|
2808
|
-
});
|
|
2809
|
-
};
|
|
2810
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2811
|
-
interceptor = _a[_i];
|
|
2812
|
-
_loop_32(interceptor);
|
|
2813
|
-
}
|
|
2814
|
-
return [2, interceptorPromise.then(function () {
|
|
2815
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2816
|
-
if (localVarUseFormData) {
|
|
2817
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2818
|
-
}
|
|
2819
|
-
else {
|
|
2820
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2821
|
-
}
|
|
2822
|
-
}
|
|
2823
|
-
return new Promise(function (resolve, reject) {
|
|
2824
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2825
|
-
if (error) {
|
|
2826
|
-
reject(error);
|
|
2827
|
-
}
|
|
2828
|
-
else {
|
|
2829
|
-
if (response.statusCode &&
|
|
2830
|
-
response.statusCode >= 200 &&
|
|
2831
|
-
response.statusCode <= 299) {
|
|
2832
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListWarehouses200Response');
|
|
2833
|
-
resolve({ response: response, body: body });
|
|
2834
|
-
}
|
|
2835
|
-
else {
|
|
2836
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2837
|
-
}
|
|
2838
|
-
}
|
|
2839
|
-
});
|
|
2840
|
-
});
|
|
2841
|
-
})];
|
|
2842
|
-
});
|
|
2843
|
-
});
|
|
2844
|
-
};
|
|
2845
|
-
WarehousesApi.prototype.removeSourceConnectionFromWarehouseAlpha = function (warehouseId, sourceId, options) {
|
|
2846
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2847
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2848
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_33, _i, _a, interceptor;
|
|
2849
|
-
var _this = this;
|
|
2850
|
-
return __generator(this, function (_b) {
|
|
2851
|
-
localVarPath = this.basePath +
|
|
2852
|
-
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
2853
|
-
.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)))
|
|
2854
|
-
.replace('{' + 'sourceId' + '}', encodeURIComponent(String(sourceId)));
|
|
2855
|
-
localVarQueryParameters = {};
|
|
2856
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2857
|
-
produces = [
|
|
2858
|
-
'application/vnd.segment.v1alpha+json',
|
|
2859
|
-
'application/json',
|
|
2860
|
-
];
|
|
2861
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2862
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2863
|
-
}
|
|
2864
|
-
else {
|
|
2865
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2866
|
-
}
|
|
2867
|
-
localVarFormParams = {};
|
|
2868
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2869
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling removeSourceConnectionFromWarehouseAlpha.');
|
|
2870
|
-
}
|
|
2871
|
-
if (sourceId === null || sourceId === undefined) {
|
|
2872
|
-
throw new Error('Required parameter sourceId was null or undefined when calling removeSourceConnectionFromWarehouseAlpha.');
|
|
2873
|
-
}
|
|
2874
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2875
|
-
localVarUseFormData = false;
|
|
2876
|
-
localVarRequestOptions = {
|
|
2877
|
-
method: 'DELETE',
|
|
2878
|
-
qs: localVarQueryParameters,
|
|
2879
|
-
headers: localVarHeaderParams,
|
|
2880
|
-
uri: localVarPath,
|
|
2881
|
-
useQuerystring: this._useQuerystring,
|
|
2882
|
-
json: true,
|
|
2883
|
-
};
|
|
2884
|
-
authenticationPromise = Promise.resolve();
|
|
2885
|
-
if (this.authentications.token.accessToken) {
|
|
2886
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2887
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2888
|
-
});
|
|
2889
|
-
}
|
|
2890
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2891
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2892
|
-
});
|
|
2893
|
-
interceptorPromise = authenticationPromise;
|
|
2894
|
-
_loop_33 = function (interceptor) {
|
|
2895
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2896
|
-
return interceptor(localVarRequestOptions);
|
|
2897
|
-
});
|
|
2898
|
-
};
|
|
2899
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2900
|
-
interceptor = _a[_i];
|
|
2901
|
-
_loop_33(interceptor);
|
|
2902
|
-
}
|
|
2903
|
-
return [2, interceptorPromise.then(function () {
|
|
2904
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2905
|
-
if (localVarUseFormData) {
|
|
2906
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2907
|
-
}
|
|
2908
|
-
else {
|
|
2909
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2910
|
-
}
|
|
2911
|
-
}
|
|
2912
|
-
return new Promise(function (resolve, reject) {
|
|
2913
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2914
|
-
if (error) {
|
|
2915
|
-
reject(error);
|
|
2916
|
-
}
|
|
2917
|
-
else {
|
|
2918
|
-
if (response.statusCode &&
|
|
2919
|
-
response.statusCode >= 200 &&
|
|
2920
|
-
response.statusCode <= 299) {
|
|
2921
|
-
body = models_1.ObjectSerializer.deserialize(body, 'RemoveSourceConnectionFromWarehouse200Response');
|
|
2922
|
-
resolve({ response: response, body: body });
|
|
2923
|
-
}
|
|
2924
|
-
else {
|
|
2925
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2926
|
-
}
|
|
2927
|
-
}
|
|
2928
|
-
});
|
|
2929
|
-
});
|
|
2930
|
-
})];
|
|
2931
|
-
});
|
|
2932
|
-
});
|
|
2933
|
-
};
|
|
2934
|
-
WarehousesApi.prototype.removeSourceConnectionFromWarehouseBeta = function (warehouseId, sourceId, options) {
|
|
2935
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2936
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2937
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_34, _i, _a, interceptor;
|
|
2938
|
-
var _this = this;
|
|
2939
|
-
return __generator(this, function (_b) {
|
|
2940
|
-
localVarPath = this.basePath +
|
|
2941
|
-
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
2942
|
-
.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)))
|
|
2943
|
-
.replace('{' + 'sourceId' + '}', encodeURIComponent(String(sourceId)));
|
|
2944
|
-
localVarQueryParameters = {};
|
|
2945
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2946
|
-
produces = [
|
|
2947
|
-
'application/vnd.segment.v1beta+json',
|
|
2948
|
-
'application/json',
|
|
2949
|
-
];
|
|
2950
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2951
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2952
|
-
}
|
|
2953
|
-
else {
|
|
2954
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2955
|
-
}
|
|
2956
|
-
localVarFormParams = {};
|
|
2957
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
2958
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling removeSourceConnectionFromWarehouseBeta.');
|
|
2959
|
-
}
|
|
2960
|
-
if (sourceId === null || sourceId === undefined) {
|
|
2961
|
-
throw new Error('Required parameter sourceId was null or undefined when calling removeSourceConnectionFromWarehouseBeta.');
|
|
2962
|
-
}
|
|
2963
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2964
|
-
localVarUseFormData = false;
|
|
2965
|
-
localVarRequestOptions = {
|
|
2966
|
-
method: 'DELETE',
|
|
2967
|
-
qs: localVarQueryParameters,
|
|
2968
|
-
headers: localVarHeaderParams,
|
|
2969
|
-
uri: localVarPath,
|
|
2970
|
-
useQuerystring: this._useQuerystring,
|
|
2971
|
-
json: true,
|
|
2972
|
-
};
|
|
2973
|
-
authenticationPromise = Promise.resolve();
|
|
2974
|
-
if (this.authentications.token.accessToken) {
|
|
2975
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2976
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2977
|
-
});
|
|
2978
|
-
}
|
|
2979
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2980
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2981
|
-
});
|
|
2982
|
-
interceptorPromise = authenticationPromise;
|
|
2983
|
-
_loop_34 = function (interceptor) {
|
|
2984
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2985
|
-
return interceptor(localVarRequestOptions);
|
|
2986
|
-
});
|
|
2987
|
-
};
|
|
2988
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2989
|
-
interceptor = _a[_i];
|
|
2990
|
-
_loop_34(interceptor);
|
|
2991
|
-
}
|
|
2992
|
-
return [2, interceptorPromise.then(function () {
|
|
2993
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2994
|
-
if (localVarUseFormData) {
|
|
2995
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2996
|
-
}
|
|
2997
|
-
else {
|
|
2998
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2999
|
-
}
|
|
3000
|
-
}
|
|
3001
|
-
return new Promise(function (resolve, reject) {
|
|
3002
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
3003
|
-
if (error) {
|
|
3004
|
-
reject(error);
|
|
3005
|
-
}
|
|
3006
|
-
else {
|
|
3007
|
-
if (response.statusCode &&
|
|
3008
|
-
response.statusCode >= 200 &&
|
|
3009
|
-
response.statusCode <= 299) {
|
|
3010
|
-
body = models_1.ObjectSerializer.deserialize(body, 'RemoveSourceConnectionFromWarehouse200Response');
|
|
3011
|
-
resolve({ response: response, body: body });
|
|
3012
|
-
}
|
|
3013
|
-
else {
|
|
3014
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
3015
|
-
}
|
|
3016
|
-
}
|
|
3017
|
-
});
|
|
3018
|
-
});
|
|
3019
|
-
})];
|
|
3020
|
-
});
|
|
3021
|
-
});
|
|
3022
|
-
};
|
|
3023
|
-
WarehousesApi.prototype.removeSourceConnectionFromWarehouseCurrent = function (warehouseId, sourceId, options) {
|
|
3024
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
3025
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3026
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_35, _i, _a, interceptor;
|
|
3027
|
-
var _this = this;
|
|
3028
|
-
return __generator(this, function (_b) {
|
|
3029
|
-
localVarPath = this.basePath +
|
|
3030
|
-
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
3031
|
-
.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)))
|
|
3032
|
-
.replace('{' + 'sourceId' + '}', encodeURIComponent(String(sourceId)));
|
|
3033
|
-
localVarQueryParameters = {};
|
|
3034
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
3035
|
-
produces = ['application/json'];
|
|
3036
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3037
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3038
|
-
}
|
|
3039
|
-
else {
|
|
3040
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3041
|
-
}
|
|
3042
|
-
localVarFormParams = {};
|
|
3043
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
3044
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling removeSourceConnectionFromWarehouseCurrent.');
|
|
3045
|
-
}
|
|
3046
|
-
if (sourceId === null || sourceId === undefined) {
|
|
3047
|
-
throw new Error('Required parameter sourceId was null or undefined when calling removeSourceConnectionFromWarehouseCurrent.');
|
|
3048
|
-
}
|
|
3049
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
3050
|
-
localVarUseFormData = false;
|
|
3051
|
-
localVarRequestOptions = {
|
|
3052
|
-
method: 'DELETE',
|
|
3053
|
-
qs: localVarQueryParameters,
|
|
3054
|
-
headers: localVarHeaderParams,
|
|
3055
|
-
uri: localVarPath,
|
|
3056
|
-
useQuerystring: this._useQuerystring,
|
|
3057
|
-
json: true,
|
|
3058
|
-
};
|
|
3059
|
-
authenticationPromise = Promise.resolve();
|
|
3060
|
-
if (this.authentications.token.accessToken) {
|
|
3061
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3062
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
3063
|
-
});
|
|
3064
|
-
}
|
|
3065
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3066
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
3067
|
-
});
|
|
3068
|
-
interceptorPromise = authenticationPromise;
|
|
3069
|
-
_loop_35 = function (interceptor) {
|
|
3070
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
3071
|
-
return interceptor(localVarRequestOptions);
|
|
3072
|
-
});
|
|
3073
|
-
};
|
|
3074
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
3075
|
-
interceptor = _a[_i];
|
|
3076
|
-
_loop_35(interceptor);
|
|
3077
|
-
}
|
|
3078
|
-
return [2, interceptorPromise.then(function () {
|
|
3079
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3080
|
-
if (localVarUseFormData) {
|
|
3081
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
3082
|
-
}
|
|
3083
|
-
else {
|
|
3084
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3085
|
-
}
|
|
3086
|
-
}
|
|
3087
|
-
return new Promise(function (resolve, reject) {
|
|
3088
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
3089
|
-
if (error) {
|
|
3090
|
-
reject(error);
|
|
3091
|
-
}
|
|
3092
|
-
else {
|
|
3093
|
-
if (response.statusCode &&
|
|
3094
|
-
response.statusCode >= 200 &&
|
|
3095
|
-
response.statusCode <= 299) {
|
|
3096
|
-
body = models_1.ObjectSerializer.deserialize(body, 'RemoveSourceConnectionFromWarehouse200Response');
|
|
3097
|
-
resolve({ response: response, body: body });
|
|
3098
|
-
}
|
|
3099
|
-
else {
|
|
3100
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
3101
|
-
}
|
|
3102
|
-
}
|
|
3103
|
-
});
|
|
3104
|
-
});
|
|
3105
|
-
})];
|
|
3106
|
-
});
|
|
3107
|
-
});
|
|
3108
|
-
};
|
|
3109
|
-
WarehousesApi.prototype.removeSourceConnectionFromWarehouseV1 = function (warehouseId, sourceId, options) {
|
|
3110
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
3111
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3112
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_36, _i, _a, interceptor;
|
|
3113
|
-
var _this = this;
|
|
3114
|
-
return __generator(this, function (_b) {
|
|
3115
|
-
localVarPath = this.basePath +
|
|
3116
|
-
'/warehouses/{warehouseId}/connected-sources/{sourceId}'
|
|
3117
|
-
.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)))
|
|
3118
|
-
.replace('{' + 'sourceId' + '}', encodeURIComponent(String(sourceId)));
|
|
3119
|
-
localVarQueryParameters = {};
|
|
3120
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
3121
|
-
produces = [
|
|
3122
|
-
'application/vnd.segment.v1+json',
|
|
3123
|
-
'application/json',
|
|
3124
|
-
];
|
|
3125
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3126
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3127
|
-
}
|
|
3128
|
-
else {
|
|
3129
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3130
|
-
}
|
|
3131
|
-
localVarFormParams = {};
|
|
3132
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
3133
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling removeSourceConnectionFromWarehouseV1.');
|
|
3134
|
-
}
|
|
3135
|
-
if (sourceId === null || sourceId === undefined) {
|
|
3136
|
-
throw new Error('Required parameter sourceId was null or undefined when calling removeSourceConnectionFromWarehouseV1.');
|
|
3137
|
-
}
|
|
3138
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
3139
|
-
localVarUseFormData = false;
|
|
3140
|
-
localVarRequestOptions = {
|
|
3141
|
-
method: 'DELETE',
|
|
3142
|
-
qs: localVarQueryParameters,
|
|
3143
|
-
headers: localVarHeaderParams,
|
|
3144
|
-
uri: localVarPath,
|
|
3145
|
-
useQuerystring: this._useQuerystring,
|
|
3146
|
-
json: true,
|
|
3147
|
-
};
|
|
3148
|
-
authenticationPromise = Promise.resolve();
|
|
3149
|
-
if (this.authentications.token.accessToken) {
|
|
3150
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3151
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
3152
|
-
});
|
|
3153
|
-
}
|
|
3154
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3155
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
3156
|
-
});
|
|
3157
|
-
interceptorPromise = authenticationPromise;
|
|
3158
|
-
_loop_36 = function (interceptor) {
|
|
3159
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
3160
|
-
return interceptor(localVarRequestOptions);
|
|
3161
|
-
});
|
|
3162
|
-
};
|
|
3163
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
3164
|
-
interceptor = _a[_i];
|
|
3165
|
-
_loop_36(interceptor);
|
|
3166
|
-
}
|
|
3167
|
-
return [2, interceptorPromise.then(function () {
|
|
3168
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3169
|
-
if (localVarUseFormData) {
|
|
3170
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
3171
|
-
}
|
|
3172
|
-
else {
|
|
3173
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3174
|
-
}
|
|
3175
|
-
}
|
|
3176
|
-
return new Promise(function (resolve, reject) {
|
|
3177
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
3178
|
-
if (error) {
|
|
3179
|
-
reject(error);
|
|
3180
|
-
}
|
|
3181
|
-
else {
|
|
3182
|
-
if (response.statusCode &&
|
|
3183
|
-
response.statusCode >= 200 &&
|
|
3184
|
-
response.statusCode <= 299) {
|
|
3185
|
-
body = models_1.ObjectSerializer.deserialize(body, 'RemoveSourceConnectionFromWarehouse200Response');
|
|
3186
|
-
resolve({ response: response, body: body });
|
|
3187
|
-
}
|
|
3188
|
-
else {
|
|
3189
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
3190
|
-
}
|
|
3191
|
-
}
|
|
3192
|
-
});
|
|
3193
|
-
});
|
|
3194
|
-
})];
|
|
3195
|
-
});
|
|
3196
|
-
});
|
|
3197
|
-
};
|
|
3198
|
-
WarehousesApi.prototype.updateWarehouseAlpha = function (warehouseId, UpdateWarehouseV1Input, options) {
|
|
3199
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
3200
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3201
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_37, _i, _a, interceptor;
|
|
3202
|
-
var _this = this;
|
|
3203
|
-
return __generator(this, function (_b) {
|
|
3204
|
-
localVarPath = this.basePath +
|
|
3205
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
3206
|
-
localVarQueryParameters = {};
|
|
3207
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
3208
|
-
produces = [
|
|
3209
|
-
'application/vnd.segment.v1alpha+json',
|
|
3210
|
-
'application/json',
|
|
3211
|
-
];
|
|
3212
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3213
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3214
|
-
}
|
|
3215
|
-
else {
|
|
3216
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3217
|
-
}
|
|
3218
|
-
localVarFormParams = {};
|
|
3219
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
3220
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling updateWarehouseAlpha.');
|
|
3221
|
-
}
|
|
3222
|
-
if (UpdateWarehouseV1Input === null ||
|
|
3223
|
-
UpdateWarehouseV1Input === undefined) {
|
|
3224
|
-
throw new Error('Required parameter UpdateWarehouseV1Input was null or undefined when calling updateWarehouseAlpha.');
|
|
3225
|
-
}
|
|
3226
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
3227
|
-
localVarUseFormData = false;
|
|
3228
|
-
localVarRequestOptions = {
|
|
3229
|
-
method: 'PATCH',
|
|
3230
|
-
qs: localVarQueryParameters,
|
|
3231
|
-
headers: localVarHeaderParams,
|
|
3232
|
-
uri: localVarPath,
|
|
3233
|
-
useQuerystring: this._useQuerystring,
|
|
3234
|
-
json: true,
|
|
3235
|
-
body: models_1.ObjectSerializer.serialize(UpdateWarehouseV1Input, 'UpdateWarehouseV1Input'),
|
|
3236
|
-
};
|
|
3237
|
-
authenticationPromise = Promise.resolve();
|
|
3238
|
-
if (this.authentications.token.accessToken) {
|
|
3239
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3240
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
3241
|
-
});
|
|
3242
|
-
}
|
|
3243
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3244
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
3245
|
-
});
|
|
3246
|
-
interceptorPromise = authenticationPromise;
|
|
3247
|
-
_loop_37 = function (interceptor) {
|
|
3248
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
3249
|
-
return interceptor(localVarRequestOptions);
|
|
3250
|
-
});
|
|
3251
|
-
};
|
|
3252
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
3253
|
-
interceptor = _a[_i];
|
|
3254
|
-
_loop_37(interceptor);
|
|
3255
|
-
}
|
|
3256
|
-
return [2, interceptorPromise.then(function () {
|
|
3257
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3258
|
-
if (localVarUseFormData) {
|
|
3259
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
3260
|
-
}
|
|
3261
|
-
else {
|
|
3262
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3263
|
-
}
|
|
3264
|
-
}
|
|
3265
|
-
return new Promise(function (resolve, reject) {
|
|
3266
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
3267
|
-
if (error) {
|
|
3268
|
-
reject(error);
|
|
3269
|
-
}
|
|
3270
|
-
else {
|
|
3271
|
-
if (response.statusCode &&
|
|
3272
|
-
response.statusCode >= 200 &&
|
|
3273
|
-
response.statusCode <= 299) {
|
|
3274
|
-
body = models_1.ObjectSerializer.deserialize(body, 'UpdateWarehouse200Response');
|
|
3275
|
-
resolve({ response: response, body: body });
|
|
3276
|
-
}
|
|
3277
|
-
else {
|
|
3278
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
3279
|
-
}
|
|
3280
|
-
}
|
|
3281
|
-
});
|
|
3282
|
-
});
|
|
3283
|
-
})];
|
|
3284
|
-
});
|
|
3285
|
-
});
|
|
3286
|
-
};
|
|
3287
|
-
WarehousesApi.prototype.updateWarehouseBeta = function (warehouseId, UpdateWarehouseV1Input, options) {
|
|
3288
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
3289
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3290
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_38, _i, _a, interceptor;
|
|
3291
|
-
var _this = this;
|
|
3292
|
-
return __generator(this, function (_b) {
|
|
3293
|
-
localVarPath = this.basePath +
|
|
3294
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
3295
|
-
localVarQueryParameters = {};
|
|
3296
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
3297
|
-
produces = [
|
|
3298
|
-
'application/vnd.segment.v1beta+json',
|
|
3299
|
-
'application/json',
|
|
3300
|
-
];
|
|
3301
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3302
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3303
|
-
}
|
|
3304
|
-
else {
|
|
3305
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3306
|
-
}
|
|
3307
|
-
localVarFormParams = {};
|
|
3308
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
3309
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling updateWarehouseBeta.');
|
|
3310
|
-
}
|
|
3311
|
-
if (UpdateWarehouseV1Input === null ||
|
|
3312
|
-
UpdateWarehouseV1Input === undefined) {
|
|
3313
|
-
throw new Error('Required parameter UpdateWarehouseV1Input was null or undefined when calling updateWarehouseBeta.');
|
|
3314
|
-
}
|
|
3315
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
3316
|
-
localVarUseFormData = false;
|
|
3317
|
-
localVarRequestOptions = {
|
|
3318
|
-
method: 'PATCH',
|
|
3319
|
-
qs: localVarQueryParameters,
|
|
3320
|
-
headers: localVarHeaderParams,
|
|
3321
|
-
uri: localVarPath,
|
|
3322
|
-
useQuerystring: this._useQuerystring,
|
|
3323
|
-
json: true,
|
|
3324
|
-
body: models_1.ObjectSerializer.serialize(UpdateWarehouseV1Input, 'UpdateWarehouseV1Input'),
|
|
3325
|
-
};
|
|
3326
|
-
authenticationPromise = Promise.resolve();
|
|
3327
|
-
if (this.authentications.token.accessToken) {
|
|
3328
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3329
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
3330
|
-
});
|
|
3331
|
-
}
|
|
3332
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3333
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
3334
|
-
});
|
|
3335
|
-
interceptorPromise = authenticationPromise;
|
|
3336
|
-
_loop_38 = function (interceptor) {
|
|
3337
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
3338
|
-
return interceptor(localVarRequestOptions);
|
|
3339
|
-
});
|
|
3340
|
-
};
|
|
3341
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
3342
|
-
interceptor = _a[_i];
|
|
3343
|
-
_loop_38(interceptor);
|
|
3344
|
-
}
|
|
3345
|
-
return [2, interceptorPromise.then(function () {
|
|
3346
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3347
|
-
if (localVarUseFormData) {
|
|
3348
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
3349
|
-
}
|
|
3350
|
-
else {
|
|
3351
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3352
|
-
}
|
|
3353
|
-
}
|
|
3354
|
-
return new Promise(function (resolve, reject) {
|
|
3355
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
3356
|
-
if (error) {
|
|
3357
|
-
reject(error);
|
|
3358
|
-
}
|
|
3359
|
-
else {
|
|
3360
|
-
if (response.statusCode &&
|
|
3361
|
-
response.statusCode >= 200 &&
|
|
3362
|
-
response.statusCode <= 299) {
|
|
3363
|
-
body = models_1.ObjectSerializer.deserialize(body, 'UpdateWarehouse200Response');
|
|
3364
|
-
resolve({ response: response, body: body });
|
|
3365
|
-
}
|
|
3366
|
-
else {
|
|
3367
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
3368
|
-
}
|
|
3369
|
-
}
|
|
3370
|
-
});
|
|
3371
|
-
});
|
|
3372
|
-
})];
|
|
3373
|
-
});
|
|
3374
|
-
});
|
|
3375
|
-
};
|
|
3376
|
-
WarehousesApi.prototype.updateWarehouseCurrent = function (warehouseId, UpdateWarehouseV1Input, options) {
|
|
3377
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
3378
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3379
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_39, _i, _a, interceptor;
|
|
3380
|
-
var _this = this;
|
|
3381
|
-
return __generator(this, function (_b) {
|
|
3382
|
-
localVarPath = this.basePath +
|
|
3383
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
3384
|
-
localVarQueryParameters = {};
|
|
3385
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
3386
|
-
produces = [
|
|
3387
|
-
'application/vnd.segment.v1+json',
|
|
3388
|
-
'application/json',
|
|
3389
|
-
];
|
|
3390
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3391
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3392
|
-
}
|
|
3393
|
-
else {
|
|
3394
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3395
|
-
}
|
|
3396
|
-
localVarFormParams = {};
|
|
3397
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
3398
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling updateWarehouseCurrent.');
|
|
3399
|
-
}
|
|
3400
|
-
if (UpdateWarehouseV1Input === null ||
|
|
3401
|
-
UpdateWarehouseV1Input === undefined) {
|
|
3402
|
-
throw new Error('Required parameter UpdateWarehouseV1Input was null or undefined when calling updateWarehouseCurrent.');
|
|
3403
|
-
}
|
|
3404
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
3405
|
-
localVarUseFormData = false;
|
|
3406
|
-
localVarRequestOptions = {
|
|
3407
|
-
method: 'PATCH',
|
|
3408
|
-
qs: localVarQueryParameters,
|
|
3409
|
-
headers: localVarHeaderParams,
|
|
3410
|
-
uri: localVarPath,
|
|
3411
|
-
useQuerystring: this._useQuerystring,
|
|
3412
|
-
json: true,
|
|
3413
|
-
body: models_1.ObjectSerializer.serialize(UpdateWarehouseV1Input, 'UpdateWarehouseV1Input'),
|
|
3414
|
-
};
|
|
3415
|
-
authenticationPromise = Promise.resolve();
|
|
3416
|
-
if (this.authentications.token.accessToken) {
|
|
3417
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3418
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
3419
|
-
});
|
|
3420
|
-
}
|
|
3421
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3422
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
3423
|
-
});
|
|
3424
|
-
interceptorPromise = authenticationPromise;
|
|
3425
|
-
_loop_39 = function (interceptor) {
|
|
3426
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
3427
|
-
return interceptor(localVarRequestOptions);
|
|
3428
|
-
});
|
|
3429
|
-
};
|
|
3430
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
3431
|
-
interceptor = _a[_i];
|
|
3432
|
-
_loop_39(interceptor);
|
|
3433
|
-
}
|
|
3434
|
-
return [2, interceptorPromise.then(function () {
|
|
3435
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3436
|
-
if (localVarUseFormData) {
|
|
3437
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
3438
|
-
}
|
|
3439
|
-
else {
|
|
3440
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3441
|
-
}
|
|
3442
|
-
}
|
|
3443
|
-
return new Promise(function (resolve, reject) {
|
|
3444
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
3445
|
-
if (error) {
|
|
3446
|
-
reject(error);
|
|
3447
|
-
}
|
|
3448
|
-
else {
|
|
3449
|
-
if (response.statusCode &&
|
|
3450
|
-
response.statusCode >= 200 &&
|
|
3451
|
-
response.statusCode <= 299) {
|
|
3452
|
-
body = models_1.ObjectSerializer.deserialize(body, 'UpdateWarehouse200Response');
|
|
3453
|
-
resolve({ response: response, body: body });
|
|
3454
|
-
}
|
|
3455
|
-
else {
|
|
3456
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
3457
|
-
}
|
|
3458
|
-
}
|
|
3459
|
-
});
|
|
3460
|
-
});
|
|
3461
|
-
})];
|
|
3462
|
-
});
|
|
3463
|
-
});
|
|
3464
|
-
};
|
|
3465
|
-
WarehousesApi.prototype.updateWarehouseV1 = function (warehouseId, UpdateWarehouseV1Input, options) {
|
|
3466
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
3467
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3468
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_40, _i, _a, interceptor;
|
|
3469
|
-
var _this = this;
|
|
3470
|
-
return __generator(this, function (_b) {
|
|
3471
|
-
localVarPath = this.basePath +
|
|
3472
|
-
'/warehouses/{warehouseId}'.replace('{' + 'warehouseId' + '}', encodeURIComponent(String(warehouseId)));
|
|
3473
|
-
localVarQueryParameters = {};
|
|
3474
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
3475
|
-
produces = [
|
|
3476
|
-
'application/vnd.segment.v1+json',
|
|
3477
|
-
'application/json',
|
|
3478
|
-
];
|
|
3479
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3480
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3481
|
-
}
|
|
3482
|
-
else {
|
|
3483
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3484
|
-
}
|
|
3485
|
-
localVarFormParams = {};
|
|
3486
|
-
if (warehouseId === null || warehouseId === undefined) {
|
|
3487
|
-
throw new Error('Required parameter warehouseId was null or undefined when calling updateWarehouseV1.');
|
|
3488
|
-
}
|
|
3489
|
-
if (UpdateWarehouseV1Input === null ||
|
|
3490
|
-
UpdateWarehouseV1Input === undefined) {
|
|
3491
|
-
throw new Error('Required parameter UpdateWarehouseV1Input was null or undefined when calling updateWarehouseV1.');
|
|
3492
|
-
}
|
|
3493
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
3494
|
-
localVarUseFormData = false;
|
|
3495
|
-
localVarRequestOptions = {
|
|
3496
|
-
method: 'PATCH',
|
|
3497
|
-
qs: localVarQueryParameters,
|
|
3498
|
-
headers: localVarHeaderParams,
|
|
3499
|
-
uri: localVarPath,
|
|
3500
|
-
useQuerystring: this._useQuerystring,
|
|
3501
|
-
json: true,
|
|
3502
|
-
body: models_1.ObjectSerializer.serialize(UpdateWarehouseV1Input, 'UpdateWarehouseV1Input'),
|
|
3503
|
-
};
|
|
3504
|
-
authenticationPromise = Promise.resolve();
|
|
3505
|
-
if (this.authentications.token.accessToken) {
|
|
3506
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3507
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
3508
|
-
});
|
|
3509
|
-
}
|
|
3510
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
3511
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
3512
|
-
});
|
|
3513
|
-
interceptorPromise = authenticationPromise;
|
|
3514
|
-
_loop_40 = function (interceptor) {
|
|
3515
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
3516
|
-
return interceptor(localVarRequestOptions);
|
|
3517
|
-
});
|
|
3518
|
-
};
|
|
3519
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
3520
|
-
interceptor = _a[_i];
|
|
3521
|
-
_loop_40(interceptor);
|
|
3522
|
-
}
|
|
3523
969
|
return [2, interceptorPromise.then(function () {
|
|
3524
970
|
if (Object.keys(localVarFormParams).length) {
|
|
3525
971
|
if (localVarUseFormData) {
|