@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]) {
|
|
@@ -113,7 +113,7 @@ var DestinationsApi = (function () {
|
|
|
113
113
|
DestinationsApi.prototype.addInterceptor = function (interceptor) {
|
|
114
114
|
this.interceptors.push(interceptor);
|
|
115
115
|
};
|
|
116
|
-
DestinationsApi.prototype.
|
|
116
|
+
DestinationsApi.prototype.createDestination = function (CreateDestinationV1Input, options) {
|
|
117
117
|
if (options === void 0) { options = { headers: {} }; }
|
|
118
118
|
return __awaiter(this, void 0, void 0, function () {
|
|
119
119
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_1, _i, _a, interceptor;
|
|
@@ -123,19 +123,21 @@ var DestinationsApi = (function () {
|
|
|
123
123
|
localVarQueryParameters = {};
|
|
124
124
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
125
125
|
produces = [
|
|
126
|
-
'application/vnd.segment.
|
|
126
|
+
'application/vnd.segment.v1+json',
|
|
127
127
|
'application/json',
|
|
128
|
+
'application/vnd.segment.v1beta+json',
|
|
129
|
+
'application/vnd.segment.v1alpha+json',
|
|
128
130
|
];
|
|
129
131
|
if (produces.indexOf('application/json') >= 0) {
|
|
130
|
-
localVarHeaderParams.Accept =
|
|
132
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
131
133
|
}
|
|
132
134
|
else {
|
|
133
|
-
localVarHeaderParams.Accept = '
|
|
135
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
134
136
|
}
|
|
135
137
|
localVarFormParams = {};
|
|
136
138
|
if (CreateDestinationV1Input === null ||
|
|
137
139
|
CreateDestinationV1Input === undefined) {
|
|
138
|
-
throw new Error('Required parameter CreateDestinationV1Input was null or undefined when calling
|
|
140
|
+
throw new Error('Required parameter CreateDestinationV1Input was null or undefined when calling createDestination.');
|
|
139
141
|
}
|
|
140
142
|
Object.assign(localVarHeaderParams, options.headers);
|
|
141
143
|
localVarUseFormData = false;
|
|
@@ -198,29 +200,33 @@ var DestinationsApi = (function () {
|
|
|
198
200
|
});
|
|
199
201
|
});
|
|
200
202
|
};
|
|
201
|
-
DestinationsApi.prototype.
|
|
203
|
+
DestinationsApi.prototype.createDestinationSubscription = function (destinationId, CreateDestinationSubscriptionAlphaInput, options) {
|
|
202
204
|
if (options === void 0) { options = { headers: {} }; }
|
|
203
205
|
return __awaiter(this, void 0, void 0, function () {
|
|
204
206
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_2, _i, _a, interceptor;
|
|
205
207
|
var _this = this;
|
|
206
208
|
return __generator(this, function (_b) {
|
|
207
|
-
localVarPath = this.basePath +
|
|
209
|
+
localVarPath = this.basePath +
|
|
210
|
+
'/destinations/{destinationId}/subscriptions'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
208
211
|
localVarQueryParameters = {};
|
|
209
212
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
210
213
|
produces = [
|
|
211
|
-
'application/vnd.segment.
|
|
214
|
+
'application/vnd.segment.v1alpha+json',
|
|
212
215
|
'application/json',
|
|
213
216
|
];
|
|
214
217
|
if (produces.indexOf('application/json') >= 0) {
|
|
215
|
-
localVarHeaderParams.Accept =
|
|
218
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
216
219
|
}
|
|
217
220
|
else {
|
|
218
|
-
localVarHeaderParams.Accept = '
|
|
221
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
219
222
|
}
|
|
220
223
|
localVarFormParams = {};
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
-
|
|
224
|
+
if (destinationId === null || destinationId === undefined) {
|
|
225
|
+
throw new Error('Required parameter destinationId was null or undefined when calling createDestinationSubscription.');
|
|
226
|
+
}
|
|
227
|
+
if (CreateDestinationSubscriptionAlphaInput === null ||
|
|
228
|
+
CreateDestinationSubscriptionAlphaInput === undefined) {
|
|
229
|
+
throw new Error('Required parameter CreateDestinationSubscriptionAlphaInput was null or undefined when calling createDestinationSubscription.');
|
|
224
230
|
}
|
|
225
231
|
Object.assign(localVarHeaderParams, options.headers);
|
|
226
232
|
localVarUseFormData = false;
|
|
@@ -231,7 +237,7 @@ var DestinationsApi = (function () {
|
|
|
231
237
|
uri: localVarPath,
|
|
232
238
|
useQuerystring: this._useQuerystring,
|
|
233
239
|
json: true,
|
|
234
|
-
body: models_1.ObjectSerializer.serialize(
|
|
240
|
+
body: models_1.ObjectSerializer.serialize(CreateDestinationSubscriptionAlphaInput, 'CreateDestinationSubscriptionAlphaInput'),
|
|
235
241
|
};
|
|
236
242
|
authenticationPromise = Promise.resolve();
|
|
237
243
|
if (this.authentications.token.accessToken) {
|
|
@@ -270,7 +276,7 @@ var DestinationsApi = (function () {
|
|
|
270
276
|
if (response.statusCode &&
|
|
271
277
|
response.statusCode >= 200 &&
|
|
272
278
|
response.statusCode <= 299) {
|
|
273
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
279
|
+
body = models_1.ObjectSerializer.deserialize(body, 'CreateDestinationSubscription200Response');
|
|
274
280
|
resolve({ response: response, body: body });
|
|
275
281
|
}
|
|
276
282
|
else {
|
|
@@ -283,40 +289,41 @@ var DestinationsApi = (function () {
|
|
|
283
289
|
});
|
|
284
290
|
});
|
|
285
291
|
};
|
|
286
|
-
DestinationsApi.prototype.
|
|
292
|
+
DestinationsApi.prototype.deleteDestination = function (destinationId, options) {
|
|
287
293
|
if (options === void 0) { options = { headers: {} }; }
|
|
288
294
|
return __awaiter(this, void 0, void 0, function () {
|
|
289
295
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_3, _i, _a, interceptor;
|
|
290
296
|
var _this = this;
|
|
291
297
|
return __generator(this, function (_b) {
|
|
292
|
-
localVarPath = this.basePath +
|
|
298
|
+
localVarPath = this.basePath +
|
|
299
|
+
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
293
300
|
localVarQueryParameters = {};
|
|
294
301
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
295
302
|
produces = [
|
|
296
303
|
'application/vnd.segment.v1+json',
|
|
297
304
|
'application/json',
|
|
305
|
+
'application/vnd.segment.v1beta+json',
|
|
306
|
+
'application/vnd.segment.v1alpha+json',
|
|
298
307
|
];
|
|
299
308
|
if (produces.indexOf('application/json') >= 0) {
|
|
300
|
-
localVarHeaderParams.Accept =
|
|
309
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
301
310
|
}
|
|
302
311
|
else {
|
|
303
|
-
localVarHeaderParams.Accept = '
|
|
312
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
304
313
|
}
|
|
305
314
|
localVarFormParams = {};
|
|
306
|
-
if (
|
|
307
|
-
|
|
308
|
-
throw new Error('Required parameter CreateDestinationV1Input was null or undefined when calling createDestinationCurrent.');
|
|
315
|
+
if (destinationId === null || destinationId === undefined) {
|
|
316
|
+
throw new Error('Required parameter destinationId was null or undefined when calling deleteDestination.');
|
|
309
317
|
}
|
|
310
318
|
Object.assign(localVarHeaderParams, options.headers);
|
|
311
319
|
localVarUseFormData = false;
|
|
312
320
|
localVarRequestOptions = {
|
|
313
|
-
method: '
|
|
321
|
+
method: 'DELETE',
|
|
314
322
|
qs: localVarQueryParameters,
|
|
315
323
|
headers: localVarHeaderParams,
|
|
316
324
|
uri: localVarPath,
|
|
317
325
|
useQuerystring: this._useQuerystring,
|
|
318
326
|
json: true,
|
|
319
|
-
body: models_1.ObjectSerializer.serialize(CreateDestinationV1Input, 'CreateDestinationV1Input'),
|
|
320
327
|
};
|
|
321
328
|
authenticationPromise = Promise.resolve();
|
|
322
329
|
if (this.authentications.token.accessToken) {
|
|
@@ -355,7 +362,7 @@ var DestinationsApi = (function () {
|
|
|
355
362
|
if (response.statusCode &&
|
|
356
363
|
response.statusCode >= 200 &&
|
|
357
364
|
response.statusCode <= 299) {
|
|
358
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
365
|
+
body = models_1.ObjectSerializer.deserialize(body, 'DeleteDestination200Response');
|
|
359
366
|
resolve({ response: response, body: body });
|
|
360
367
|
}
|
|
361
368
|
else {
|
|
@@ -368,44 +375,41 @@ var DestinationsApi = (function () {
|
|
|
368
375
|
});
|
|
369
376
|
});
|
|
370
377
|
};
|
|
371
|
-
DestinationsApi.prototype.
|
|
378
|
+
DestinationsApi.prototype.getDestination = function (destinationId, options) {
|
|
372
379
|
if (options === void 0) { options = { headers: {} }; }
|
|
373
380
|
return __awaiter(this, void 0, void 0, function () {
|
|
374
381
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_4, _i, _a, interceptor;
|
|
375
382
|
var _this = this;
|
|
376
383
|
return __generator(this, function (_b) {
|
|
377
384
|
localVarPath = this.basePath +
|
|
378
|
-
'/destinations/{destinationId}
|
|
385
|
+
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
379
386
|
localVarQueryParameters = {};
|
|
380
387
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
381
388
|
produces = [
|
|
382
|
-
'application/vnd.segment.
|
|
389
|
+
'application/vnd.segment.v1+json',
|
|
383
390
|
'application/json',
|
|
391
|
+
'application/vnd.segment.v1beta+json',
|
|
392
|
+
'application/vnd.segment.v1alpha+json',
|
|
384
393
|
];
|
|
385
394
|
if (produces.indexOf('application/json') >= 0) {
|
|
386
|
-
localVarHeaderParams.Accept =
|
|
395
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
387
396
|
}
|
|
388
397
|
else {
|
|
389
|
-
localVarHeaderParams.Accept = '
|
|
398
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
390
399
|
}
|
|
391
400
|
localVarFormParams = {};
|
|
392
401
|
if (destinationId === null || destinationId === undefined) {
|
|
393
|
-
throw new Error('Required parameter destinationId was null or undefined when calling
|
|
394
|
-
}
|
|
395
|
-
if (CreateDestinationSubscriptionAlphaInput === null ||
|
|
396
|
-
CreateDestinationSubscriptionAlphaInput === undefined) {
|
|
397
|
-
throw new Error('Required parameter CreateDestinationSubscriptionAlphaInput was null or undefined when calling createDestinationSubscription.');
|
|
402
|
+
throw new Error('Required parameter destinationId was null or undefined when calling getDestination.');
|
|
398
403
|
}
|
|
399
404
|
Object.assign(localVarHeaderParams, options.headers);
|
|
400
405
|
localVarUseFormData = false;
|
|
401
406
|
localVarRequestOptions = {
|
|
402
|
-
method: '
|
|
407
|
+
method: 'GET',
|
|
403
408
|
qs: localVarQueryParameters,
|
|
404
409
|
headers: localVarHeaderParams,
|
|
405
410
|
uri: localVarPath,
|
|
406
411
|
useQuerystring: this._useQuerystring,
|
|
407
412
|
json: true,
|
|
408
|
-
body: models_1.ObjectSerializer.serialize(CreateDestinationSubscriptionAlphaInput, 'CreateDestinationSubscriptionAlphaInput'),
|
|
409
413
|
};
|
|
410
414
|
authenticationPromise = Promise.resolve();
|
|
411
415
|
if (this.authentications.token.accessToken) {
|
|
@@ -444,7 +448,7 @@ var DestinationsApi = (function () {
|
|
|
444
448
|
if (response.statusCode &&
|
|
445
449
|
response.statusCode >= 200 &&
|
|
446
450
|
response.statusCode <= 299) {
|
|
447
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
451
|
+
body = models_1.ObjectSerializer.deserialize(body, 'GetDestination200Response');
|
|
448
452
|
resolve({ response: response, body: body });
|
|
449
453
|
}
|
|
450
454
|
else {
|
|
@@ -457,40 +461,44 @@ var DestinationsApi = (function () {
|
|
|
457
461
|
});
|
|
458
462
|
});
|
|
459
463
|
};
|
|
460
|
-
DestinationsApi.prototype.
|
|
464
|
+
DestinationsApi.prototype.getSubscriptionFromDestination = function (destinationId, id, options) {
|
|
461
465
|
if (options === void 0) { options = { headers: {} }; }
|
|
462
466
|
return __awaiter(this, void 0, void 0, function () {
|
|
463
467
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_5, _i, _a, interceptor;
|
|
464
468
|
var _this = this;
|
|
465
469
|
return __generator(this, function (_b) {
|
|
466
|
-
localVarPath = this.basePath +
|
|
470
|
+
localVarPath = this.basePath +
|
|
471
|
+
'/destinations/{destinationId}/subscriptions/{id}'
|
|
472
|
+
.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)))
|
|
473
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
467
474
|
localVarQueryParameters = {};
|
|
468
475
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
469
476
|
produces = [
|
|
470
|
-
'application/vnd.segment.
|
|
477
|
+
'application/vnd.segment.v1alpha+json',
|
|
471
478
|
'application/json',
|
|
472
479
|
];
|
|
473
480
|
if (produces.indexOf('application/json') >= 0) {
|
|
474
|
-
localVarHeaderParams.Accept =
|
|
481
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
475
482
|
}
|
|
476
483
|
else {
|
|
477
|
-
localVarHeaderParams.Accept = '
|
|
484
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
478
485
|
}
|
|
479
486
|
localVarFormParams = {};
|
|
480
|
-
if (
|
|
481
|
-
|
|
482
|
-
|
|
487
|
+
if (destinationId === null || destinationId === undefined) {
|
|
488
|
+
throw new Error('Required parameter destinationId was null or undefined when calling getSubscriptionFromDestination.');
|
|
489
|
+
}
|
|
490
|
+
if (id === null || id === undefined) {
|
|
491
|
+
throw new Error('Required parameter id was null or undefined when calling getSubscriptionFromDestination.');
|
|
483
492
|
}
|
|
484
493
|
Object.assign(localVarHeaderParams, options.headers);
|
|
485
494
|
localVarUseFormData = false;
|
|
486
495
|
localVarRequestOptions = {
|
|
487
|
-
method: '
|
|
496
|
+
method: 'GET',
|
|
488
497
|
qs: localVarQueryParameters,
|
|
489
498
|
headers: localVarHeaderParams,
|
|
490
499
|
uri: localVarPath,
|
|
491
500
|
useQuerystring: this._useQuerystring,
|
|
492
501
|
json: true,
|
|
493
|
-
body: models_1.ObjectSerializer.serialize(CreateDestinationV1Input, 'CreateDestinationV1Input'),
|
|
494
502
|
};
|
|
495
503
|
authenticationPromise = Promise.resolve();
|
|
496
504
|
if (this.authentications.token.accessToken) {
|
|
@@ -529,7 +537,7 @@ var DestinationsApi = (function () {
|
|
|
529
537
|
if (response.statusCode &&
|
|
530
538
|
response.statusCode >= 200 &&
|
|
531
539
|
response.statusCode <= 299) {
|
|
532
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
540
|
+
body = models_1.ObjectSerializer.deserialize(body, 'GetSubscriptionFromDestination200Response');
|
|
533
541
|
resolve({ response: response, body: body });
|
|
534
542
|
}
|
|
535
543
|
else {
|
|
@@ -542,34 +550,50 @@ var DestinationsApi = (function () {
|
|
|
542
550
|
});
|
|
543
551
|
});
|
|
544
552
|
};
|
|
545
|
-
DestinationsApi.prototype.
|
|
553
|
+
DestinationsApi.prototype.listDeliveryMetricsSummaryFromDestination = function (destinationId, sourceId, startTime, endTime, granularity, options) {
|
|
546
554
|
if (options === void 0) { options = { headers: {} }; }
|
|
547
555
|
return __awaiter(this, void 0, void 0, function () {
|
|
548
556
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_6, _i, _a, interceptor;
|
|
549
557
|
var _this = this;
|
|
550
558
|
return __generator(this, function (_b) {
|
|
551
559
|
localVarPath = this.basePath +
|
|
552
|
-
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
560
|
+
'/destinations/{destinationId}/delivery-metrics'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
553
561
|
localVarQueryParameters = {};
|
|
554
562
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
555
563
|
produces = [
|
|
564
|
+
'application/vnd.segment.v1beta+json',
|
|
556
565
|
'application/vnd.segment.v1alpha+json',
|
|
557
566
|
'application/json',
|
|
558
567
|
];
|
|
559
568
|
if (produces.indexOf('application/json') >= 0) {
|
|
560
|
-
localVarHeaderParams.Accept =
|
|
569
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
561
570
|
}
|
|
562
571
|
else {
|
|
563
|
-
localVarHeaderParams.Accept = '
|
|
572
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
564
573
|
}
|
|
565
574
|
localVarFormParams = {};
|
|
566
575
|
if (destinationId === null || destinationId === undefined) {
|
|
567
|
-
throw new Error('Required parameter destinationId was null or undefined when calling
|
|
576
|
+
throw new Error('Required parameter destinationId was null or undefined when calling listDeliveryMetricsSummaryFromDestination.');
|
|
577
|
+
}
|
|
578
|
+
if (sourceId === null || sourceId === undefined) {
|
|
579
|
+
throw new Error('Required parameter sourceId was null or undefined when calling listDeliveryMetricsSummaryFromDestination.');
|
|
580
|
+
}
|
|
581
|
+
if (sourceId !== undefined) {
|
|
582
|
+
localVarQueryParameters['sourceId'] = models_1.ObjectSerializer.serialize(sourceId, 'string');
|
|
583
|
+
}
|
|
584
|
+
if (startTime !== undefined) {
|
|
585
|
+
localVarQueryParameters['startTime'] = models_1.ObjectSerializer.serialize(startTime, 'string');
|
|
586
|
+
}
|
|
587
|
+
if (endTime !== undefined) {
|
|
588
|
+
localVarQueryParameters['endTime'] = models_1.ObjectSerializer.serialize(endTime, 'string');
|
|
589
|
+
}
|
|
590
|
+
if (granularity !== undefined) {
|
|
591
|
+
localVarQueryParameters['granularity'] = models_1.ObjectSerializer.serialize(granularity, "'DAY' | 'HOUR' | 'MINUTE'");
|
|
568
592
|
}
|
|
569
593
|
Object.assign(localVarHeaderParams, options.headers);
|
|
570
594
|
localVarUseFormData = false;
|
|
571
595
|
localVarRequestOptions = {
|
|
572
|
-
method: '
|
|
596
|
+
method: 'GET',
|
|
573
597
|
qs: localVarQueryParameters,
|
|
574
598
|
headers: localVarHeaderParams,
|
|
575
599
|
uri: localVarPath,
|
|
@@ -613,7 +637,7 @@ var DestinationsApi = (function () {
|
|
|
613
637
|
if (response.statusCode &&
|
|
614
638
|
response.statusCode >= 200 &&
|
|
615
639
|
response.statusCode <= 299) {
|
|
616
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
640
|
+
body = models_1.ObjectSerializer.deserialize(body, 'ListDeliveryMetricsSummaryFromDestination200Response');
|
|
617
641
|
resolve({ response: response, body: body });
|
|
618
642
|
}
|
|
619
643
|
else {
|
|
@@ -626,34 +650,38 @@ var DestinationsApi = (function () {
|
|
|
626
650
|
});
|
|
627
651
|
});
|
|
628
652
|
};
|
|
629
|
-
DestinationsApi.prototype.
|
|
653
|
+
DestinationsApi.prototype.listDestinations = function (pagination, options) {
|
|
630
654
|
if (options === void 0) { options = { headers: {} }; }
|
|
631
655
|
return __awaiter(this, void 0, void 0, function () {
|
|
632
656
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_7, _i, _a, interceptor;
|
|
633
657
|
var _this = this;
|
|
634
658
|
return __generator(this, function (_b) {
|
|
635
|
-
localVarPath = this.basePath +
|
|
636
|
-
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
659
|
+
localVarPath = this.basePath + '/destinations';
|
|
637
660
|
localVarQueryParameters = {};
|
|
638
661
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
639
662
|
produces = [
|
|
640
|
-
'application/vnd.segment.
|
|
663
|
+
'application/vnd.segment.v1+json',
|
|
641
664
|
'application/json',
|
|
665
|
+
'application/vnd.segment.v1beta+json',
|
|
666
|
+
'application/vnd.segment.v1alpha+json',
|
|
642
667
|
];
|
|
643
668
|
if (produces.indexOf('application/json') >= 0) {
|
|
644
|
-
localVarHeaderParams.Accept =
|
|
669
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
645
670
|
}
|
|
646
671
|
else {
|
|
647
|
-
localVarHeaderParams.Accept = '
|
|
672
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
648
673
|
}
|
|
649
674
|
localVarFormParams = {};
|
|
650
|
-
if (
|
|
651
|
-
throw new Error('Required parameter
|
|
675
|
+
if (pagination === null || pagination === undefined) {
|
|
676
|
+
throw new Error('Required parameter pagination was null or undefined when calling listDestinations.');
|
|
677
|
+
}
|
|
678
|
+
if (pagination !== undefined) {
|
|
679
|
+
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
652
680
|
}
|
|
653
681
|
Object.assign(localVarHeaderParams, options.headers);
|
|
654
682
|
localVarUseFormData = false;
|
|
655
683
|
localVarRequestOptions = {
|
|
656
|
-
method: '
|
|
684
|
+
method: 'GET',
|
|
657
685
|
qs: localVarQueryParameters,
|
|
658
686
|
headers: localVarHeaderParams,
|
|
659
687
|
uri: localVarPath,
|
|
@@ -697,7 +725,7 @@ var DestinationsApi = (function () {
|
|
|
697
725
|
if (response.statusCode &&
|
|
698
726
|
response.statusCode >= 200 &&
|
|
699
727
|
response.statusCode <= 299) {
|
|
700
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
728
|
+
body = models_1.ObjectSerializer.deserialize(body, 'ListDestinations200Response');
|
|
701
729
|
resolve({ response: response, body: body });
|
|
702
730
|
}
|
|
703
731
|
else {
|
|
@@ -710,31 +738,40 @@ var DestinationsApi = (function () {
|
|
|
710
738
|
});
|
|
711
739
|
});
|
|
712
740
|
};
|
|
713
|
-
DestinationsApi.prototype.
|
|
741
|
+
DestinationsApi.prototype.listSubscriptionsFromDestination = function (destinationId, pagination, options) {
|
|
714
742
|
if (options === void 0) { options = { headers: {} }; }
|
|
715
743
|
return __awaiter(this, void 0, void 0, function () {
|
|
716
744
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_8, _i, _a, interceptor;
|
|
717
745
|
var _this = this;
|
|
718
746
|
return __generator(this, function (_b) {
|
|
719
747
|
localVarPath = this.basePath +
|
|
720
|
-
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
748
|
+
'/destinations/{destinationId}/subscriptions'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
721
749
|
localVarQueryParameters = {};
|
|
722
750
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
723
|
-
produces = [
|
|
751
|
+
produces = [
|
|
752
|
+
'application/vnd.segment.v1alpha+json',
|
|
753
|
+
'application/json',
|
|
754
|
+
];
|
|
724
755
|
if (produces.indexOf('application/json') >= 0) {
|
|
725
|
-
localVarHeaderParams.Accept =
|
|
756
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
726
757
|
}
|
|
727
758
|
else {
|
|
728
|
-
localVarHeaderParams.Accept = '
|
|
759
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
729
760
|
}
|
|
730
761
|
localVarFormParams = {};
|
|
731
762
|
if (destinationId === null || destinationId === undefined) {
|
|
732
|
-
throw new Error('Required parameter destinationId was null or undefined when calling
|
|
763
|
+
throw new Error('Required parameter destinationId was null or undefined when calling listSubscriptionsFromDestination.');
|
|
764
|
+
}
|
|
765
|
+
if (pagination === null || pagination === undefined) {
|
|
766
|
+
throw new Error('Required parameter pagination was null or undefined when calling listSubscriptionsFromDestination.');
|
|
767
|
+
}
|
|
768
|
+
if (pagination !== undefined) {
|
|
769
|
+
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
733
770
|
}
|
|
734
771
|
Object.assign(localVarHeaderParams, options.headers);
|
|
735
772
|
localVarUseFormData = false;
|
|
736
773
|
localVarRequestOptions = {
|
|
737
|
-
method: '
|
|
774
|
+
method: 'GET',
|
|
738
775
|
qs: localVarQueryParameters,
|
|
739
776
|
headers: localVarHeaderParams,
|
|
740
777
|
uri: localVarPath,
|
|
@@ -778,7 +815,7 @@ var DestinationsApi = (function () {
|
|
|
778
815
|
if (response.statusCode &&
|
|
779
816
|
response.statusCode >= 200 &&
|
|
780
817
|
response.statusCode <= 299) {
|
|
781
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
818
|
+
body = models_1.ObjectSerializer.deserialize(body, 'ListSubscriptionsFromDestination200Response');
|
|
782
819
|
resolve({ response: response, body: body });
|
|
783
820
|
}
|
|
784
821
|
else {
|
|
@@ -791,29 +828,34 @@ var DestinationsApi = (function () {
|
|
|
791
828
|
});
|
|
792
829
|
});
|
|
793
830
|
};
|
|
794
|
-
DestinationsApi.prototype.
|
|
831
|
+
DestinationsApi.prototype.removeSubscriptionFromDestination = function (destinationId, id, options) {
|
|
795
832
|
if (options === void 0) { options = { headers: {} }; }
|
|
796
833
|
return __awaiter(this, void 0, void 0, function () {
|
|
797
834
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_9, _i, _a, interceptor;
|
|
798
835
|
var _this = this;
|
|
799
836
|
return __generator(this, function (_b) {
|
|
800
837
|
localVarPath = this.basePath +
|
|
801
|
-
'/destinations/{destinationId}
|
|
838
|
+
'/destinations/{destinationId}/subscriptions/{id}'
|
|
839
|
+
.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)))
|
|
840
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
802
841
|
localVarQueryParameters = {};
|
|
803
842
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
804
843
|
produces = [
|
|
805
|
-
'application/vnd.segment.
|
|
844
|
+
'application/vnd.segment.v1alpha+json',
|
|
806
845
|
'application/json',
|
|
807
846
|
];
|
|
808
847
|
if (produces.indexOf('application/json') >= 0) {
|
|
809
|
-
localVarHeaderParams.Accept =
|
|
848
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
810
849
|
}
|
|
811
850
|
else {
|
|
812
|
-
localVarHeaderParams.Accept = '
|
|
851
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
813
852
|
}
|
|
814
853
|
localVarFormParams = {};
|
|
815
854
|
if (destinationId === null || destinationId === undefined) {
|
|
816
|
-
throw new Error('Required parameter destinationId was null or undefined when calling
|
|
855
|
+
throw new Error('Required parameter destinationId was null or undefined when calling removeSubscriptionFromDestination.');
|
|
856
|
+
}
|
|
857
|
+
if (id === null || id === undefined) {
|
|
858
|
+
throw new Error('Required parameter id was null or undefined when calling removeSubscriptionFromDestination.');
|
|
817
859
|
}
|
|
818
860
|
Object.assign(localVarHeaderParams, options.headers);
|
|
819
861
|
localVarUseFormData = false;
|
|
@@ -862,7 +904,7 @@ var DestinationsApi = (function () {
|
|
|
862
904
|
if (response.statusCode &&
|
|
863
905
|
response.statusCode >= 200 &&
|
|
864
906
|
response.statusCode <= 299) {
|
|
865
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
907
|
+
body = models_1.ObjectSerializer.deserialize(body, 'RemoveSubscriptionFromDestination200Response');
|
|
866
908
|
resolve({ response: response, body: body });
|
|
867
909
|
}
|
|
868
910
|
else {
|
|
@@ -875,7 +917,7 @@ var DestinationsApi = (function () {
|
|
|
875
917
|
});
|
|
876
918
|
});
|
|
877
919
|
};
|
|
878
|
-
DestinationsApi.prototype.
|
|
920
|
+
DestinationsApi.prototype.updateDestination = function (destinationId, UpdateDestinationV1Input, options) {
|
|
879
921
|
if (options === void 0) { options = { headers: {} }; }
|
|
880
922
|
return __awaiter(this, void 0, void 0, function () {
|
|
881
923
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_10, _i, _a, interceptor;
|
|
@@ -886,28 +928,35 @@ var DestinationsApi = (function () {
|
|
|
886
928
|
localVarQueryParameters = {};
|
|
887
929
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
888
930
|
produces = [
|
|
889
|
-
'application/vnd.segment.
|
|
931
|
+
'application/vnd.segment.v1+json',
|
|
890
932
|
'application/json',
|
|
933
|
+
'application/vnd.segment.v1beta+json',
|
|
934
|
+
'application/vnd.segment.v1alpha+json',
|
|
891
935
|
];
|
|
892
936
|
if (produces.indexOf('application/json') >= 0) {
|
|
893
|
-
localVarHeaderParams.Accept =
|
|
937
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
894
938
|
}
|
|
895
939
|
else {
|
|
896
|
-
localVarHeaderParams.Accept = '
|
|
940
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
897
941
|
}
|
|
898
942
|
localVarFormParams = {};
|
|
899
943
|
if (destinationId === null || destinationId === undefined) {
|
|
900
|
-
throw new Error('Required parameter destinationId was null or undefined when calling
|
|
944
|
+
throw new Error('Required parameter destinationId was null or undefined when calling updateDestination.');
|
|
945
|
+
}
|
|
946
|
+
if (UpdateDestinationV1Input === null ||
|
|
947
|
+
UpdateDestinationV1Input === undefined) {
|
|
948
|
+
throw new Error('Required parameter UpdateDestinationV1Input was null or undefined when calling updateDestination.');
|
|
901
949
|
}
|
|
902
950
|
Object.assign(localVarHeaderParams, options.headers);
|
|
903
951
|
localVarUseFormData = false;
|
|
904
952
|
localVarRequestOptions = {
|
|
905
|
-
method: '
|
|
953
|
+
method: 'PATCH',
|
|
906
954
|
qs: localVarQueryParameters,
|
|
907
955
|
headers: localVarHeaderParams,
|
|
908
956
|
uri: localVarPath,
|
|
909
957
|
useQuerystring: this._useQuerystring,
|
|
910
958
|
json: true,
|
|
959
|
+
body: models_1.ObjectSerializer.serialize(UpdateDestinationV1Input, 'UpdateDestinationV1Input'),
|
|
911
960
|
};
|
|
912
961
|
authenticationPromise = Promise.resolve();
|
|
913
962
|
if (this.authentications.token.accessToken) {
|
|
@@ -946,7 +995,7 @@ var DestinationsApi = (function () {
|
|
|
946
995
|
if (response.statusCode &&
|
|
947
996
|
response.statusCode >= 200 &&
|
|
948
997
|
response.statusCode <= 299) {
|
|
949
|
-
body = models_1.ObjectSerializer.deserialize(body, '
|
|
998
|
+
body = models_1.ObjectSerializer.deserialize(body, 'UpdateDestination200Response');
|
|
950
999
|
resolve({ response: response, body: body });
|
|
951
1000
|
}
|
|
952
1001
|
else {
|
|
@@ -959,39 +1008,49 @@ var DestinationsApi = (function () {
|
|
|
959
1008
|
});
|
|
960
1009
|
});
|
|
961
1010
|
};
|
|
962
|
-
DestinationsApi.prototype.
|
|
1011
|
+
DestinationsApi.prototype.updateSubscriptionForDestination = function (destinationId, id, UpdateSubscriptionForDestinationAlphaInput, options) {
|
|
963
1012
|
if (options === void 0) { options = { headers: {} }; }
|
|
964
1013
|
return __awaiter(this, void 0, void 0, function () {
|
|
965
1014
|
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_11, _i, _a, interceptor;
|
|
966
1015
|
var _this = this;
|
|
967
1016
|
return __generator(this, function (_b) {
|
|
968
1017
|
localVarPath = this.basePath +
|
|
969
|
-
'/destinations/{destinationId}
|
|
1018
|
+
'/destinations/{destinationId}/subscriptions/{id}'
|
|
1019
|
+
.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)))
|
|
1020
|
+
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
970
1021
|
localVarQueryParameters = {};
|
|
971
1022
|
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
972
1023
|
produces = [
|
|
973
|
-
'application/vnd.segment.
|
|
1024
|
+
'application/vnd.segment.v1alpha+json',
|
|
974
1025
|
'application/json',
|
|
975
1026
|
];
|
|
976
1027
|
if (produces.indexOf('application/json') >= 0) {
|
|
977
|
-
localVarHeaderParams.Accept =
|
|
1028
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
978
1029
|
}
|
|
979
1030
|
else {
|
|
980
|
-
localVarHeaderParams.Accept = '
|
|
1031
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
981
1032
|
}
|
|
982
1033
|
localVarFormParams = {};
|
|
983
1034
|
if (destinationId === null || destinationId === undefined) {
|
|
984
|
-
throw new Error('Required parameter destinationId was null or undefined when calling
|
|
1035
|
+
throw new Error('Required parameter destinationId was null or undefined when calling updateSubscriptionForDestination.');
|
|
1036
|
+
}
|
|
1037
|
+
if (id === null || id === undefined) {
|
|
1038
|
+
throw new Error('Required parameter id was null or undefined when calling updateSubscriptionForDestination.');
|
|
1039
|
+
}
|
|
1040
|
+
if (UpdateSubscriptionForDestinationAlphaInput === null ||
|
|
1041
|
+
UpdateSubscriptionForDestinationAlphaInput === undefined) {
|
|
1042
|
+
throw new Error('Required parameter UpdateSubscriptionForDestinationAlphaInput was null or undefined when calling updateSubscriptionForDestination.');
|
|
985
1043
|
}
|
|
986
1044
|
Object.assign(localVarHeaderParams, options.headers);
|
|
987
1045
|
localVarUseFormData = false;
|
|
988
1046
|
localVarRequestOptions = {
|
|
989
|
-
method: '
|
|
1047
|
+
method: 'PATCH',
|
|
990
1048
|
qs: localVarQueryParameters,
|
|
991
1049
|
headers: localVarHeaderParams,
|
|
992
1050
|
uri: localVarPath,
|
|
993
1051
|
useQuerystring: this._useQuerystring,
|
|
994
1052
|
json: true,
|
|
1053
|
+
body: models_1.ObjectSerializer.serialize(UpdateSubscriptionForDestinationAlphaInput, 'UpdateSubscriptionForDestinationAlphaInput'),
|
|
995
1054
|
};
|
|
996
1055
|
authenticationPromise = Promise.resolve();
|
|
997
1056
|
if (this.authentications.token.accessToken) {
|
|
@@ -1012,1428 +1071,6 @@ var DestinationsApi = (function () {
|
|
|
1012
1071
|
interceptor = _a[_i];
|
|
1013
1072
|
_loop_11(interceptor);
|
|
1014
1073
|
}
|
|
1015
|
-
return [2, interceptorPromise.then(function () {
|
|
1016
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1017
|
-
if (localVarUseFormData) {
|
|
1018
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1019
|
-
}
|
|
1020
|
-
else {
|
|
1021
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
return new Promise(function (resolve, reject) {
|
|
1025
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1026
|
-
if (error) {
|
|
1027
|
-
reject(error);
|
|
1028
|
-
}
|
|
1029
|
-
else {
|
|
1030
|
-
if (response.statusCode &&
|
|
1031
|
-
response.statusCode >= 200 &&
|
|
1032
|
-
response.statusCode <= 299) {
|
|
1033
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetDestination200Response');
|
|
1034
|
-
resolve({ response: response, body: body });
|
|
1035
|
-
}
|
|
1036
|
-
else {
|
|
1037
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
});
|
|
1041
|
-
});
|
|
1042
|
-
})];
|
|
1043
|
-
});
|
|
1044
|
-
});
|
|
1045
|
-
};
|
|
1046
|
-
DestinationsApi.prototype.getDestinationCurrent = function (destinationId, options) {
|
|
1047
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1048
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1049
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_12, _i, _a, interceptor;
|
|
1050
|
-
var _this = this;
|
|
1051
|
-
return __generator(this, function (_b) {
|
|
1052
|
-
localVarPath = this.basePath +
|
|
1053
|
-
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
1054
|
-
localVarQueryParameters = {};
|
|
1055
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1056
|
-
produces = ['application/json'];
|
|
1057
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1058
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1059
|
-
}
|
|
1060
|
-
else {
|
|
1061
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1062
|
-
}
|
|
1063
|
-
localVarFormParams = {};
|
|
1064
|
-
if (destinationId === null || destinationId === undefined) {
|
|
1065
|
-
throw new Error('Required parameter destinationId was null or undefined when calling getDestinationCurrent.');
|
|
1066
|
-
}
|
|
1067
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1068
|
-
localVarUseFormData = false;
|
|
1069
|
-
localVarRequestOptions = {
|
|
1070
|
-
method: 'GET',
|
|
1071
|
-
qs: localVarQueryParameters,
|
|
1072
|
-
headers: localVarHeaderParams,
|
|
1073
|
-
uri: localVarPath,
|
|
1074
|
-
useQuerystring: this._useQuerystring,
|
|
1075
|
-
json: true,
|
|
1076
|
-
};
|
|
1077
|
-
authenticationPromise = Promise.resolve();
|
|
1078
|
-
if (this.authentications.token.accessToken) {
|
|
1079
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1080
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1081
|
-
});
|
|
1082
|
-
}
|
|
1083
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1084
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1085
|
-
});
|
|
1086
|
-
interceptorPromise = authenticationPromise;
|
|
1087
|
-
_loop_12 = function (interceptor) {
|
|
1088
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1089
|
-
return interceptor(localVarRequestOptions);
|
|
1090
|
-
});
|
|
1091
|
-
};
|
|
1092
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1093
|
-
interceptor = _a[_i];
|
|
1094
|
-
_loop_12(interceptor);
|
|
1095
|
-
}
|
|
1096
|
-
return [2, interceptorPromise.then(function () {
|
|
1097
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1098
|
-
if (localVarUseFormData) {
|
|
1099
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1100
|
-
}
|
|
1101
|
-
else {
|
|
1102
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
return new Promise(function (resolve, reject) {
|
|
1106
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1107
|
-
if (error) {
|
|
1108
|
-
reject(error);
|
|
1109
|
-
}
|
|
1110
|
-
else {
|
|
1111
|
-
if (response.statusCode &&
|
|
1112
|
-
response.statusCode >= 200 &&
|
|
1113
|
-
response.statusCode <= 299) {
|
|
1114
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetDestination200Response');
|
|
1115
|
-
resolve({ response: response, body: body });
|
|
1116
|
-
}
|
|
1117
|
-
else {
|
|
1118
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
});
|
|
1122
|
-
});
|
|
1123
|
-
})];
|
|
1124
|
-
});
|
|
1125
|
-
});
|
|
1126
|
-
};
|
|
1127
|
-
DestinationsApi.prototype.getDestinationV1 = function (destinationId, options) {
|
|
1128
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1129
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1130
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_13, _i, _a, interceptor;
|
|
1131
|
-
var _this = this;
|
|
1132
|
-
return __generator(this, function (_b) {
|
|
1133
|
-
localVarPath = this.basePath +
|
|
1134
|
-
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
1135
|
-
localVarQueryParameters = {};
|
|
1136
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1137
|
-
produces = [
|
|
1138
|
-
'application/vnd.segment.v1+json',
|
|
1139
|
-
'application/json',
|
|
1140
|
-
];
|
|
1141
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1142
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1143
|
-
}
|
|
1144
|
-
else {
|
|
1145
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1146
|
-
}
|
|
1147
|
-
localVarFormParams = {};
|
|
1148
|
-
if (destinationId === null || destinationId === undefined) {
|
|
1149
|
-
throw new Error('Required parameter destinationId was null or undefined when calling getDestinationV1.');
|
|
1150
|
-
}
|
|
1151
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1152
|
-
localVarUseFormData = false;
|
|
1153
|
-
localVarRequestOptions = {
|
|
1154
|
-
method: 'GET',
|
|
1155
|
-
qs: localVarQueryParameters,
|
|
1156
|
-
headers: localVarHeaderParams,
|
|
1157
|
-
uri: localVarPath,
|
|
1158
|
-
useQuerystring: this._useQuerystring,
|
|
1159
|
-
json: true,
|
|
1160
|
-
};
|
|
1161
|
-
authenticationPromise = Promise.resolve();
|
|
1162
|
-
if (this.authentications.token.accessToken) {
|
|
1163
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1164
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1165
|
-
});
|
|
1166
|
-
}
|
|
1167
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1168
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1169
|
-
});
|
|
1170
|
-
interceptorPromise = authenticationPromise;
|
|
1171
|
-
_loop_13 = function (interceptor) {
|
|
1172
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1173
|
-
return interceptor(localVarRequestOptions);
|
|
1174
|
-
});
|
|
1175
|
-
};
|
|
1176
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1177
|
-
interceptor = _a[_i];
|
|
1178
|
-
_loop_13(interceptor);
|
|
1179
|
-
}
|
|
1180
|
-
return [2, interceptorPromise.then(function () {
|
|
1181
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1182
|
-
if (localVarUseFormData) {
|
|
1183
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1184
|
-
}
|
|
1185
|
-
else {
|
|
1186
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
return new Promise(function (resolve, reject) {
|
|
1190
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1191
|
-
if (error) {
|
|
1192
|
-
reject(error);
|
|
1193
|
-
}
|
|
1194
|
-
else {
|
|
1195
|
-
if (response.statusCode &&
|
|
1196
|
-
response.statusCode >= 200 &&
|
|
1197
|
-
response.statusCode <= 299) {
|
|
1198
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetDestination200Response');
|
|
1199
|
-
resolve({ response: response, body: body });
|
|
1200
|
-
}
|
|
1201
|
-
else {
|
|
1202
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
});
|
|
1206
|
-
});
|
|
1207
|
-
})];
|
|
1208
|
-
});
|
|
1209
|
-
});
|
|
1210
|
-
};
|
|
1211
|
-
DestinationsApi.prototype.getSubscriptionFromDestination = function (destinationId, id, options) {
|
|
1212
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1213
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1214
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_14, _i, _a, interceptor;
|
|
1215
|
-
var _this = this;
|
|
1216
|
-
return __generator(this, function (_b) {
|
|
1217
|
-
localVarPath = this.basePath +
|
|
1218
|
-
'/destinations/{destinationId}/subscriptions/{id}'
|
|
1219
|
-
.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)))
|
|
1220
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
1221
|
-
localVarQueryParameters = {};
|
|
1222
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1223
|
-
produces = [
|
|
1224
|
-
'application/vnd.segment.v1alpha+json',
|
|
1225
|
-
'application/json',
|
|
1226
|
-
];
|
|
1227
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1228
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1229
|
-
}
|
|
1230
|
-
else {
|
|
1231
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1232
|
-
}
|
|
1233
|
-
localVarFormParams = {};
|
|
1234
|
-
if (destinationId === null || destinationId === undefined) {
|
|
1235
|
-
throw new Error('Required parameter destinationId was null or undefined when calling getSubscriptionFromDestination.');
|
|
1236
|
-
}
|
|
1237
|
-
if (id === null || id === undefined) {
|
|
1238
|
-
throw new Error('Required parameter id was null or undefined when calling getSubscriptionFromDestination.');
|
|
1239
|
-
}
|
|
1240
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1241
|
-
localVarUseFormData = false;
|
|
1242
|
-
localVarRequestOptions = {
|
|
1243
|
-
method: 'GET',
|
|
1244
|
-
qs: localVarQueryParameters,
|
|
1245
|
-
headers: localVarHeaderParams,
|
|
1246
|
-
uri: localVarPath,
|
|
1247
|
-
useQuerystring: this._useQuerystring,
|
|
1248
|
-
json: true,
|
|
1249
|
-
};
|
|
1250
|
-
authenticationPromise = Promise.resolve();
|
|
1251
|
-
if (this.authentications.token.accessToken) {
|
|
1252
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1253
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1254
|
-
});
|
|
1255
|
-
}
|
|
1256
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1257
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1258
|
-
});
|
|
1259
|
-
interceptorPromise = authenticationPromise;
|
|
1260
|
-
_loop_14 = function (interceptor) {
|
|
1261
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1262
|
-
return interceptor(localVarRequestOptions);
|
|
1263
|
-
});
|
|
1264
|
-
};
|
|
1265
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1266
|
-
interceptor = _a[_i];
|
|
1267
|
-
_loop_14(interceptor);
|
|
1268
|
-
}
|
|
1269
|
-
return [2, interceptorPromise.then(function () {
|
|
1270
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1271
|
-
if (localVarUseFormData) {
|
|
1272
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1273
|
-
}
|
|
1274
|
-
else {
|
|
1275
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
return new Promise(function (resolve, reject) {
|
|
1279
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1280
|
-
if (error) {
|
|
1281
|
-
reject(error);
|
|
1282
|
-
}
|
|
1283
|
-
else {
|
|
1284
|
-
if (response.statusCode &&
|
|
1285
|
-
response.statusCode >= 200 &&
|
|
1286
|
-
response.statusCode <= 299) {
|
|
1287
|
-
body = models_1.ObjectSerializer.deserialize(body, 'GetSubscriptionFromDestination200Response');
|
|
1288
|
-
resolve({ response: response, body: body });
|
|
1289
|
-
}
|
|
1290
|
-
else {
|
|
1291
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
});
|
|
1295
|
-
});
|
|
1296
|
-
})];
|
|
1297
|
-
});
|
|
1298
|
-
});
|
|
1299
|
-
};
|
|
1300
|
-
DestinationsApi.prototype.listDeliveryMetricsSummaryFromDestinationAlpha = function (destinationId, sourceId, startTime, endTime, granularity, options) {
|
|
1301
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1302
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1303
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_15, _i, _a, interceptor;
|
|
1304
|
-
var _this = this;
|
|
1305
|
-
return __generator(this, function (_b) {
|
|
1306
|
-
localVarPath = this.basePath +
|
|
1307
|
-
'/destinations/{destinationId}/delivery-metrics'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
1308
|
-
localVarQueryParameters = {};
|
|
1309
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1310
|
-
produces = [
|
|
1311
|
-
'application/vnd.segment.v1alpha+json',
|
|
1312
|
-
'application/json',
|
|
1313
|
-
];
|
|
1314
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1315
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1316
|
-
}
|
|
1317
|
-
else {
|
|
1318
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1319
|
-
}
|
|
1320
|
-
localVarFormParams = {};
|
|
1321
|
-
if (destinationId === null || destinationId === undefined) {
|
|
1322
|
-
throw new Error('Required parameter destinationId was null or undefined when calling listDeliveryMetricsSummaryFromDestinationAlpha.');
|
|
1323
|
-
}
|
|
1324
|
-
if (sourceId === null || sourceId === undefined) {
|
|
1325
|
-
throw new Error('Required parameter sourceId was null or undefined when calling listDeliveryMetricsSummaryFromDestinationAlpha.');
|
|
1326
|
-
}
|
|
1327
|
-
if (sourceId !== undefined) {
|
|
1328
|
-
localVarQueryParameters['sourceId'] = models_1.ObjectSerializer.serialize(sourceId, 'string');
|
|
1329
|
-
}
|
|
1330
|
-
if (startTime !== undefined) {
|
|
1331
|
-
localVarQueryParameters['startTime'] = models_1.ObjectSerializer.serialize(startTime, 'string');
|
|
1332
|
-
}
|
|
1333
|
-
if (endTime !== undefined) {
|
|
1334
|
-
localVarQueryParameters['endTime'] = models_1.ObjectSerializer.serialize(endTime, 'string');
|
|
1335
|
-
}
|
|
1336
|
-
if (granularity !== undefined) {
|
|
1337
|
-
localVarQueryParameters['granularity'] = models_1.ObjectSerializer.serialize(granularity, "'DAY' | 'HOUR' | 'MINUTE'");
|
|
1338
|
-
}
|
|
1339
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1340
|
-
localVarUseFormData = false;
|
|
1341
|
-
localVarRequestOptions = {
|
|
1342
|
-
method: 'GET',
|
|
1343
|
-
qs: localVarQueryParameters,
|
|
1344
|
-
headers: localVarHeaderParams,
|
|
1345
|
-
uri: localVarPath,
|
|
1346
|
-
useQuerystring: this._useQuerystring,
|
|
1347
|
-
json: true,
|
|
1348
|
-
};
|
|
1349
|
-
authenticationPromise = Promise.resolve();
|
|
1350
|
-
if (this.authentications.token.accessToken) {
|
|
1351
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1352
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1353
|
-
});
|
|
1354
|
-
}
|
|
1355
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1356
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1357
|
-
});
|
|
1358
|
-
interceptorPromise = authenticationPromise;
|
|
1359
|
-
_loop_15 = function (interceptor) {
|
|
1360
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1361
|
-
return interceptor(localVarRequestOptions);
|
|
1362
|
-
});
|
|
1363
|
-
};
|
|
1364
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1365
|
-
interceptor = _a[_i];
|
|
1366
|
-
_loop_15(interceptor);
|
|
1367
|
-
}
|
|
1368
|
-
return [2, interceptorPromise.then(function () {
|
|
1369
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1370
|
-
if (localVarUseFormData) {
|
|
1371
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1372
|
-
}
|
|
1373
|
-
else {
|
|
1374
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
return new Promise(function (resolve, reject) {
|
|
1378
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1379
|
-
if (error) {
|
|
1380
|
-
reject(error);
|
|
1381
|
-
}
|
|
1382
|
-
else {
|
|
1383
|
-
if (response.statusCode &&
|
|
1384
|
-
response.statusCode >= 200 &&
|
|
1385
|
-
response.statusCode <= 299) {
|
|
1386
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListDeliveryMetricsSummaryFromDestination200Response');
|
|
1387
|
-
resolve({ response: response, body: body });
|
|
1388
|
-
}
|
|
1389
|
-
else {
|
|
1390
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
});
|
|
1394
|
-
});
|
|
1395
|
-
})];
|
|
1396
|
-
});
|
|
1397
|
-
});
|
|
1398
|
-
};
|
|
1399
|
-
DestinationsApi.prototype.listDeliveryMetricsSummaryFromDestinationBeta = function (destinationId, sourceId, startTime, endTime, granularity, options) {
|
|
1400
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1401
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1402
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_16, _i, _a, interceptor;
|
|
1403
|
-
var _this = this;
|
|
1404
|
-
return __generator(this, function (_b) {
|
|
1405
|
-
localVarPath = this.basePath +
|
|
1406
|
-
'/destinations/{destinationId}/delivery-metrics'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
1407
|
-
localVarQueryParameters = {};
|
|
1408
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1409
|
-
produces = [
|
|
1410
|
-
'application/vnd.segment.v1beta+json',
|
|
1411
|
-
'application/json',
|
|
1412
|
-
];
|
|
1413
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1414
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1415
|
-
}
|
|
1416
|
-
else {
|
|
1417
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1418
|
-
}
|
|
1419
|
-
localVarFormParams = {};
|
|
1420
|
-
if (destinationId === null || destinationId === undefined) {
|
|
1421
|
-
throw new Error('Required parameter destinationId was null or undefined when calling listDeliveryMetricsSummaryFromDestinationBeta.');
|
|
1422
|
-
}
|
|
1423
|
-
if (sourceId === null || sourceId === undefined) {
|
|
1424
|
-
throw new Error('Required parameter sourceId was null or undefined when calling listDeliveryMetricsSummaryFromDestinationBeta.');
|
|
1425
|
-
}
|
|
1426
|
-
if (sourceId !== undefined) {
|
|
1427
|
-
localVarQueryParameters['sourceId'] = models_1.ObjectSerializer.serialize(sourceId, 'string');
|
|
1428
|
-
}
|
|
1429
|
-
if (startTime !== undefined) {
|
|
1430
|
-
localVarQueryParameters['startTime'] = models_1.ObjectSerializer.serialize(startTime, 'string');
|
|
1431
|
-
}
|
|
1432
|
-
if (endTime !== undefined) {
|
|
1433
|
-
localVarQueryParameters['endTime'] = models_1.ObjectSerializer.serialize(endTime, 'string');
|
|
1434
|
-
}
|
|
1435
|
-
if (granularity !== undefined) {
|
|
1436
|
-
localVarQueryParameters['granularity'] = models_1.ObjectSerializer.serialize(granularity, "'DAY' | 'HOUR' | 'MINUTE'");
|
|
1437
|
-
}
|
|
1438
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1439
|
-
localVarUseFormData = false;
|
|
1440
|
-
localVarRequestOptions = {
|
|
1441
|
-
method: 'GET',
|
|
1442
|
-
qs: localVarQueryParameters,
|
|
1443
|
-
headers: localVarHeaderParams,
|
|
1444
|
-
uri: localVarPath,
|
|
1445
|
-
useQuerystring: this._useQuerystring,
|
|
1446
|
-
json: true,
|
|
1447
|
-
};
|
|
1448
|
-
authenticationPromise = Promise.resolve();
|
|
1449
|
-
if (this.authentications.token.accessToken) {
|
|
1450
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1451
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1452
|
-
});
|
|
1453
|
-
}
|
|
1454
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1455
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1456
|
-
});
|
|
1457
|
-
interceptorPromise = authenticationPromise;
|
|
1458
|
-
_loop_16 = function (interceptor) {
|
|
1459
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1460
|
-
return interceptor(localVarRequestOptions);
|
|
1461
|
-
});
|
|
1462
|
-
};
|
|
1463
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1464
|
-
interceptor = _a[_i];
|
|
1465
|
-
_loop_16(interceptor);
|
|
1466
|
-
}
|
|
1467
|
-
return [2, interceptorPromise.then(function () {
|
|
1468
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1469
|
-
if (localVarUseFormData) {
|
|
1470
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1471
|
-
}
|
|
1472
|
-
else {
|
|
1473
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
return new Promise(function (resolve, reject) {
|
|
1477
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1478
|
-
if (error) {
|
|
1479
|
-
reject(error);
|
|
1480
|
-
}
|
|
1481
|
-
else {
|
|
1482
|
-
if (response.statusCode &&
|
|
1483
|
-
response.statusCode >= 200 &&
|
|
1484
|
-
response.statusCode <= 299) {
|
|
1485
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListDeliveryMetricsSummaryFromDestination200Response');
|
|
1486
|
-
resolve({ response: response, body: body });
|
|
1487
|
-
}
|
|
1488
|
-
else {
|
|
1489
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
});
|
|
1493
|
-
});
|
|
1494
|
-
})];
|
|
1495
|
-
});
|
|
1496
|
-
});
|
|
1497
|
-
};
|
|
1498
|
-
DestinationsApi.prototype.listDestinationsAlpha = function (pagination, options) {
|
|
1499
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1500
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1501
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_17, _i, _a, interceptor;
|
|
1502
|
-
var _this = this;
|
|
1503
|
-
return __generator(this, function (_b) {
|
|
1504
|
-
localVarPath = this.basePath + '/destinations';
|
|
1505
|
-
localVarQueryParameters = {};
|
|
1506
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1507
|
-
produces = [
|
|
1508
|
-
'application/vnd.segment.v1alpha+json',
|
|
1509
|
-
'application/json',
|
|
1510
|
-
];
|
|
1511
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1512
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1513
|
-
}
|
|
1514
|
-
else {
|
|
1515
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1516
|
-
}
|
|
1517
|
-
localVarFormParams = {};
|
|
1518
|
-
if (pagination === null || pagination === undefined) {
|
|
1519
|
-
throw new Error('Required parameter pagination was null or undefined when calling listDestinationsAlpha.');
|
|
1520
|
-
}
|
|
1521
|
-
if (pagination !== undefined) {
|
|
1522
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
1523
|
-
}
|
|
1524
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1525
|
-
localVarUseFormData = false;
|
|
1526
|
-
localVarRequestOptions = {
|
|
1527
|
-
method: 'GET',
|
|
1528
|
-
qs: localVarQueryParameters,
|
|
1529
|
-
headers: localVarHeaderParams,
|
|
1530
|
-
uri: localVarPath,
|
|
1531
|
-
useQuerystring: this._useQuerystring,
|
|
1532
|
-
json: true,
|
|
1533
|
-
};
|
|
1534
|
-
authenticationPromise = Promise.resolve();
|
|
1535
|
-
if (this.authentications.token.accessToken) {
|
|
1536
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1537
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1538
|
-
});
|
|
1539
|
-
}
|
|
1540
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1541
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1542
|
-
});
|
|
1543
|
-
interceptorPromise = authenticationPromise;
|
|
1544
|
-
_loop_17 = function (interceptor) {
|
|
1545
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1546
|
-
return interceptor(localVarRequestOptions);
|
|
1547
|
-
});
|
|
1548
|
-
};
|
|
1549
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1550
|
-
interceptor = _a[_i];
|
|
1551
|
-
_loop_17(interceptor);
|
|
1552
|
-
}
|
|
1553
|
-
return [2, interceptorPromise.then(function () {
|
|
1554
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1555
|
-
if (localVarUseFormData) {
|
|
1556
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1557
|
-
}
|
|
1558
|
-
else {
|
|
1559
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1560
|
-
}
|
|
1561
|
-
}
|
|
1562
|
-
return new Promise(function (resolve, reject) {
|
|
1563
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1564
|
-
if (error) {
|
|
1565
|
-
reject(error);
|
|
1566
|
-
}
|
|
1567
|
-
else {
|
|
1568
|
-
if (response.statusCode &&
|
|
1569
|
-
response.statusCode >= 200 &&
|
|
1570
|
-
response.statusCode <= 299) {
|
|
1571
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListDestinations200Response');
|
|
1572
|
-
resolve({ response: response, body: body });
|
|
1573
|
-
}
|
|
1574
|
-
else {
|
|
1575
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
});
|
|
1579
|
-
});
|
|
1580
|
-
})];
|
|
1581
|
-
});
|
|
1582
|
-
});
|
|
1583
|
-
};
|
|
1584
|
-
DestinationsApi.prototype.listDestinationsBeta = function (pagination, options) {
|
|
1585
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1586
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1587
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_18, _i, _a, interceptor;
|
|
1588
|
-
var _this = this;
|
|
1589
|
-
return __generator(this, function (_b) {
|
|
1590
|
-
localVarPath = this.basePath + '/destinations';
|
|
1591
|
-
localVarQueryParameters = {};
|
|
1592
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1593
|
-
produces = [
|
|
1594
|
-
'application/vnd.segment.v1beta+json',
|
|
1595
|
-
'application/json',
|
|
1596
|
-
];
|
|
1597
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1598
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1599
|
-
}
|
|
1600
|
-
else {
|
|
1601
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1602
|
-
}
|
|
1603
|
-
localVarFormParams = {};
|
|
1604
|
-
if (pagination === null || pagination === undefined) {
|
|
1605
|
-
throw new Error('Required parameter pagination was null or undefined when calling listDestinationsBeta.');
|
|
1606
|
-
}
|
|
1607
|
-
if (pagination !== undefined) {
|
|
1608
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
1609
|
-
}
|
|
1610
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1611
|
-
localVarUseFormData = false;
|
|
1612
|
-
localVarRequestOptions = {
|
|
1613
|
-
method: 'GET',
|
|
1614
|
-
qs: localVarQueryParameters,
|
|
1615
|
-
headers: localVarHeaderParams,
|
|
1616
|
-
uri: localVarPath,
|
|
1617
|
-
useQuerystring: this._useQuerystring,
|
|
1618
|
-
json: true,
|
|
1619
|
-
};
|
|
1620
|
-
authenticationPromise = Promise.resolve();
|
|
1621
|
-
if (this.authentications.token.accessToken) {
|
|
1622
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1623
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1624
|
-
});
|
|
1625
|
-
}
|
|
1626
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1627
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1628
|
-
});
|
|
1629
|
-
interceptorPromise = authenticationPromise;
|
|
1630
|
-
_loop_18 = function (interceptor) {
|
|
1631
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1632
|
-
return interceptor(localVarRequestOptions);
|
|
1633
|
-
});
|
|
1634
|
-
};
|
|
1635
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1636
|
-
interceptor = _a[_i];
|
|
1637
|
-
_loop_18(interceptor);
|
|
1638
|
-
}
|
|
1639
|
-
return [2, interceptorPromise.then(function () {
|
|
1640
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1641
|
-
if (localVarUseFormData) {
|
|
1642
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1643
|
-
}
|
|
1644
|
-
else {
|
|
1645
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
return new Promise(function (resolve, reject) {
|
|
1649
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1650
|
-
if (error) {
|
|
1651
|
-
reject(error);
|
|
1652
|
-
}
|
|
1653
|
-
else {
|
|
1654
|
-
if (response.statusCode &&
|
|
1655
|
-
response.statusCode >= 200 &&
|
|
1656
|
-
response.statusCode <= 299) {
|
|
1657
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListDestinations200Response');
|
|
1658
|
-
resolve({ response: response, body: body });
|
|
1659
|
-
}
|
|
1660
|
-
else {
|
|
1661
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
});
|
|
1665
|
-
});
|
|
1666
|
-
})];
|
|
1667
|
-
});
|
|
1668
|
-
});
|
|
1669
|
-
};
|
|
1670
|
-
DestinationsApi.prototype.listDestinationsCurrent = function (pagination, options) {
|
|
1671
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1672
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1673
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_19, _i, _a, interceptor;
|
|
1674
|
-
var _this = this;
|
|
1675
|
-
return __generator(this, function (_b) {
|
|
1676
|
-
localVarPath = this.basePath + '/destinations';
|
|
1677
|
-
localVarQueryParameters = {};
|
|
1678
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1679
|
-
produces = ['application/json'];
|
|
1680
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1681
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1682
|
-
}
|
|
1683
|
-
else {
|
|
1684
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1685
|
-
}
|
|
1686
|
-
localVarFormParams = {};
|
|
1687
|
-
if (pagination === null || pagination === undefined) {
|
|
1688
|
-
throw new Error('Required parameter pagination was null or undefined when calling listDestinationsCurrent.');
|
|
1689
|
-
}
|
|
1690
|
-
if (pagination !== undefined) {
|
|
1691
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
1692
|
-
}
|
|
1693
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1694
|
-
localVarUseFormData = false;
|
|
1695
|
-
localVarRequestOptions = {
|
|
1696
|
-
method: 'GET',
|
|
1697
|
-
qs: localVarQueryParameters,
|
|
1698
|
-
headers: localVarHeaderParams,
|
|
1699
|
-
uri: localVarPath,
|
|
1700
|
-
useQuerystring: this._useQuerystring,
|
|
1701
|
-
json: true,
|
|
1702
|
-
};
|
|
1703
|
-
authenticationPromise = Promise.resolve();
|
|
1704
|
-
if (this.authentications.token.accessToken) {
|
|
1705
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1706
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1707
|
-
});
|
|
1708
|
-
}
|
|
1709
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1710
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1711
|
-
});
|
|
1712
|
-
interceptorPromise = authenticationPromise;
|
|
1713
|
-
_loop_19 = function (interceptor) {
|
|
1714
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1715
|
-
return interceptor(localVarRequestOptions);
|
|
1716
|
-
});
|
|
1717
|
-
};
|
|
1718
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1719
|
-
interceptor = _a[_i];
|
|
1720
|
-
_loop_19(interceptor);
|
|
1721
|
-
}
|
|
1722
|
-
return [2, interceptorPromise.then(function () {
|
|
1723
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1724
|
-
if (localVarUseFormData) {
|
|
1725
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1726
|
-
}
|
|
1727
|
-
else {
|
|
1728
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
return new Promise(function (resolve, reject) {
|
|
1732
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1733
|
-
if (error) {
|
|
1734
|
-
reject(error);
|
|
1735
|
-
}
|
|
1736
|
-
else {
|
|
1737
|
-
if (response.statusCode &&
|
|
1738
|
-
response.statusCode >= 200 &&
|
|
1739
|
-
response.statusCode <= 299) {
|
|
1740
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListDestinations200Response');
|
|
1741
|
-
resolve({ response: response, body: body });
|
|
1742
|
-
}
|
|
1743
|
-
else {
|
|
1744
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1745
|
-
}
|
|
1746
|
-
}
|
|
1747
|
-
});
|
|
1748
|
-
});
|
|
1749
|
-
})];
|
|
1750
|
-
});
|
|
1751
|
-
});
|
|
1752
|
-
};
|
|
1753
|
-
DestinationsApi.prototype.listDestinationsV1 = function (pagination, options) {
|
|
1754
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1755
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1756
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_20, _i, _a, interceptor;
|
|
1757
|
-
var _this = this;
|
|
1758
|
-
return __generator(this, function (_b) {
|
|
1759
|
-
localVarPath = this.basePath + '/destinations';
|
|
1760
|
-
localVarQueryParameters = {};
|
|
1761
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1762
|
-
produces = [
|
|
1763
|
-
'application/vnd.segment.v1+json',
|
|
1764
|
-
'application/json',
|
|
1765
|
-
];
|
|
1766
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1767
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1768
|
-
}
|
|
1769
|
-
else {
|
|
1770
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1771
|
-
}
|
|
1772
|
-
localVarFormParams = {};
|
|
1773
|
-
if (pagination === null || pagination === undefined) {
|
|
1774
|
-
throw new Error('Required parameter pagination was null or undefined when calling listDestinationsV1.');
|
|
1775
|
-
}
|
|
1776
|
-
if (pagination !== undefined) {
|
|
1777
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
1778
|
-
}
|
|
1779
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1780
|
-
localVarUseFormData = false;
|
|
1781
|
-
localVarRequestOptions = {
|
|
1782
|
-
method: 'GET',
|
|
1783
|
-
qs: localVarQueryParameters,
|
|
1784
|
-
headers: localVarHeaderParams,
|
|
1785
|
-
uri: localVarPath,
|
|
1786
|
-
useQuerystring: this._useQuerystring,
|
|
1787
|
-
json: true,
|
|
1788
|
-
};
|
|
1789
|
-
authenticationPromise = Promise.resolve();
|
|
1790
|
-
if (this.authentications.token.accessToken) {
|
|
1791
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1792
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1793
|
-
});
|
|
1794
|
-
}
|
|
1795
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1796
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1797
|
-
});
|
|
1798
|
-
interceptorPromise = authenticationPromise;
|
|
1799
|
-
_loop_20 = function (interceptor) {
|
|
1800
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1801
|
-
return interceptor(localVarRequestOptions);
|
|
1802
|
-
});
|
|
1803
|
-
};
|
|
1804
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1805
|
-
interceptor = _a[_i];
|
|
1806
|
-
_loop_20(interceptor);
|
|
1807
|
-
}
|
|
1808
|
-
return [2, interceptorPromise.then(function () {
|
|
1809
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1810
|
-
if (localVarUseFormData) {
|
|
1811
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1812
|
-
}
|
|
1813
|
-
else {
|
|
1814
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
return new Promise(function (resolve, reject) {
|
|
1818
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1819
|
-
if (error) {
|
|
1820
|
-
reject(error);
|
|
1821
|
-
}
|
|
1822
|
-
else {
|
|
1823
|
-
if (response.statusCode &&
|
|
1824
|
-
response.statusCode >= 200 &&
|
|
1825
|
-
response.statusCode <= 299) {
|
|
1826
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListDestinations200Response');
|
|
1827
|
-
resolve({ response: response, body: body });
|
|
1828
|
-
}
|
|
1829
|
-
else {
|
|
1830
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1831
|
-
}
|
|
1832
|
-
}
|
|
1833
|
-
});
|
|
1834
|
-
});
|
|
1835
|
-
})];
|
|
1836
|
-
});
|
|
1837
|
-
});
|
|
1838
|
-
};
|
|
1839
|
-
DestinationsApi.prototype.listSubscriptionsFromDestination = function (destinationId, pagination, options) {
|
|
1840
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1841
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1842
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_21, _i, _a, interceptor;
|
|
1843
|
-
var _this = this;
|
|
1844
|
-
return __generator(this, function (_b) {
|
|
1845
|
-
localVarPath = this.basePath +
|
|
1846
|
-
'/destinations/{destinationId}/subscriptions'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
1847
|
-
localVarQueryParameters = {};
|
|
1848
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1849
|
-
produces = [
|
|
1850
|
-
'application/vnd.segment.v1alpha+json',
|
|
1851
|
-
'application/json',
|
|
1852
|
-
];
|
|
1853
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1854
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1855
|
-
}
|
|
1856
|
-
else {
|
|
1857
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1858
|
-
}
|
|
1859
|
-
localVarFormParams = {};
|
|
1860
|
-
if (destinationId === null || destinationId === undefined) {
|
|
1861
|
-
throw new Error('Required parameter destinationId was null or undefined when calling listSubscriptionsFromDestination.');
|
|
1862
|
-
}
|
|
1863
|
-
if (pagination === null || pagination === undefined) {
|
|
1864
|
-
throw new Error('Required parameter pagination was null or undefined when calling listSubscriptionsFromDestination.');
|
|
1865
|
-
}
|
|
1866
|
-
if (pagination !== undefined) {
|
|
1867
|
-
localVarQueryParameters['pagination'] = models_1.ObjectSerializer.serialize(pagination, 'PaginationInput');
|
|
1868
|
-
}
|
|
1869
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1870
|
-
localVarUseFormData = false;
|
|
1871
|
-
localVarRequestOptions = {
|
|
1872
|
-
method: 'GET',
|
|
1873
|
-
qs: localVarQueryParameters,
|
|
1874
|
-
headers: localVarHeaderParams,
|
|
1875
|
-
uri: localVarPath,
|
|
1876
|
-
useQuerystring: this._useQuerystring,
|
|
1877
|
-
json: true,
|
|
1878
|
-
};
|
|
1879
|
-
authenticationPromise = Promise.resolve();
|
|
1880
|
-
if (this.authentications.token.accessToken) {
|
|
1881
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1882
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1883
|
-
});
|
|
1884
|
-
}
|
|
1885
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1886
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1887
|
-
});
|
|
1888
|
-
interceptorPromise = authenticationPromise;
|
|
1889
|
-
_loop_21 = function (interceptor) {
|
|
1890
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1891
|
-
return interceptor(localVarRequestOptions);
|
|
1892
|
-
});
|
|
1893
|
-
};
|
|
1894
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1895
|
-
interceptor = _a[_i];
|
|
1896
|
-
_loop_21(interceptor);
|
|
1897
|
-
}
|
|
1898
|
-
return [2, interceptorPromise.then(function () {
|
|
1899
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1900
|
-
if (localVarUseFormData) {
|
|
1901
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1902
|
-
}
|
|
1903
|
-
else {
|
|
1904
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1905
|
-
}
|
|
1906
|
-
}
|
|
1907
|
-
return new Promise(function (resolve, reject) {
|
|
1908
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1909
|
-
if (error) {
|
|
1910
|
-
reject(error);
|
|
1911
|
-
}
|
|
1912
|
-
else {
|
|
1913
|
-
if (response.statusCode &&
|
|
1914
|
-
response.statusCode >= 200 &&
|
|
1915
|
-
response.statusCode <= 299) {
|
|
1916
|
-
body = models_1.ObjectSerializer.deserialize(body, 'ListSubscriptionsFromDestination200Response');
|
|
1917
|
-
resolve({ response: response, body: body });
|
|
1918
|
-
}
|
|
1919
|
-
else {
|
|
1920
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
1921
|
-
}
|
|
1922
|
-
}
|
|
1923
|
-
});
|
|
1924
|
-
});
|
|
1925
|
-
})];
|
|
1926
|
-
});
|
|
1927
|
-
});
|
|
1928
|
-
};
|
|
1929
|
-
DestinationsApi.prototype.removeSubscriptionFromDestination = function (destinationId, id, options) {
|
|
1930
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
1931
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1932
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_22, _i, _a, interceptor;
|
|
1933
|
-
var _this = this;
|
|
1934
|
-
return __generator(this, function (_b) {
|
|
1935
|
-
localVarPath = this.basePath +
|
|
1936
|
-
'/destinations/{destinationId}/subscriptions/{id}'
|
|
1937
|
-
.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)))
|
|
1938
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
1939
|
-
localVarQueryParameters = {};
|
|
1940
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
1941
|
-
produces = [
|
|
1942
|
-
'application/vnd.segment.v1alpha+json',
|
|
1943
|
-
'application/json',
|
|
1944
|
-
];
|
|
1945
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1946
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1947
|
-
}
|
|
1948
|
-
else {
|
|
1949
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1950
|
-
}
|
|
1951
|
-
localVarFormParams = {};
|
|
1952
|
-
if (destinationId === null || destinationId === undefined) {
|
|
1953
|
-
throw new Error('Required parameter destinationId was null or undefined when calling removeSubscriptionFromDestination.');
|
|
1954
|
-
}
|
|
1955
|
-
if (id === null || id === undefined) {
|
|
1956
|
-
throw new Error('Required parameter id was null or undefined when calling removeSubscriptionFromDestination.');
|
|
1957
|
-
}
|
|
1958
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
1959
|
-
localVarUseFormData = false;
|
|
1960
|
-
localVarRequestOptions = {
|
|
1961
|
-
method: 'DELETE',
|
|
1962
|
-
qs: localVarQueryParameters,
|
|
1963
|
-
headers: localVarHeaderParams,
|
|
1964
|
-
uri: localVarPath,
|
|
1965
|
-
useQuerystring: this._useQuerystring,
|
|
1966
|
-
json: true,
|
|
1967
|
-
};
|
|
1968
|
-
authenticationPromise = Promise.resolve();
|
|
1969
|
-
if (this.authentications.token.accessToken) {
|
|
1970
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1971
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
1972
|
-
});
|
|
1973
|
-
}
|
|
1974
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
1975
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
1976
|
-
});
|
|
1977
|
-
interceptorPromise = authenticationPromise;
|
|
1978
|
-
_loop_22 = function (interceptor) {
|
|
1979
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
1980
|
-
return interceptor(localVarRequestOptions);
|
|
1981
|
-
});
|
|
1982
|
-
};
|
|
1983
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
1984
|
-
interceptor = _a[_i];
|
|
1985
|
-
_loop_22(interceptor);
|
|
1986
|
-
}
|
|
1987
|
-
return [2, interceptorPromise.then(function () {
|
|
1988
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1989
|
-
if (localVarUseFormData) {
|
|
1990
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
1991
|
-
}
|
|
1992
|
-
else {
|
|
1993
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1994
|
-
}
|
|
1995
|
-
}
|
|
1996
|
-
return new Promise(function (resolve, reject) {
|
|
1997
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
1998
|
-
if (error) {
|
|
1999
|
-
reject(error);
|
|
2000
|
-
}
|
|
2001
|
-
else {
|
|
2002
|
-
if (response.statusCode &&
|
|
2003
|
-
response.statusCode >= 200 &&
|
|
2004
|
-
response.statusCode <= 299) {
|
|
2005
|
-
body = models_1.ObjectSerializer.deserialize(body, 'RemoveSubscriptionFromDestination200Response');
|
|
2006
|
-
resolve({ response: response, body: body });
|
|
2007
|
-
}
|
|
2008
|
-
else {
|
|
2009
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2010
|
-
}
|
|
2011
|
-
}
|
|
2012
|
-
});
|
|
2013
|
-
});
|
|
2014
|
-
})];
|
|
2015
|
-
});
|
|
2016
|
-
});
|
|
2017
|
-
};
|
|
2018
|
-
DestinationsApi.prototype.updateDestinationAlpha = function (destinationId, UpdateDestinationV1Input, options) {
|
|
2019
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2020
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2021
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_23, _i, _a, interceptor;
|
|
2022
|
-
var _this = this;
|
|
2023
|
-
return __generator(this, function (_b) {
|
|
2024
|
-
localVarPath = this.basePath +
|
|
2025
|
-
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
2026
|
-
localVarQueryParameters = {};
|
|
2027
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2028
|
-
produces = [
|
|
2029
|
-
'application/vnd.segment.v1alpha+json',
|
|
2030
|
-
'application/json',
|
|
2031
|
-
];
|
|
2032
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2033
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2034
|
-
}
|
|
2035
|
-
else {
|
|
2036
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2037
|
-
}
|
|
2038
|
-
localVarFormParams = {};
|
|
2039
|
-
if (destinationId === null || destinationId === undefined) {
|
|
2040
|
-
throw new Error('Required parameter destinationId was null or undefined when calling updateDestinationAlpha.');
|
|
2041
|
-
}
|
|
2042
|
-
if (UpdateDestinationV1Input === null ||
|
|
2043
|
-
UpdateDestinationV1Input === undefined) {
|
|
2044
|
-
throw new Error('Required parameter UpdateDestinationV1Input was null or undefined when calling updateDestinationAlpha.');
|
|
2045
|
-
}
|
|
2046
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2047
|
-
localVarUseFormData = false;
|
|
2048
|
-
localVarRequestOptions = {
|
|
2049
|
-
method: 'PATCH',
|
|
2050
|
-
qs: localVarQueryParameters,
|
|
2051
|
-
headers: localVarHeaderParams,
|
|
2052
|
-
uri: localVarPath,
|
|
2053
|
-
useQuerystring: this._useQuerystring,
|
|
2054
|
-
json: true,
|
|
2055
|
-
body: models_1.ObjectSerializer.serialize(UpdateDestinationV1Input, 'UpdateDestinationV1Input'),
|
|
2056
|
-
};
|
|
2057
|
-
authenticationPromise = Promise.resolve();
|
|
2058
|
-
if (this.authentications.token.accessToken) {
|
|
2059
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2060
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2061
|
-
});
|
|
2062
|
-
}
|
|
2063
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2064
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2065
|
-
});
|
|
2066
|
-
interceptorPromise = authenticationPromise;
|
|
2067
|
-
_loop_23 = function (interceptor) {
|
|
2068
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2069
|
-
return interceptor(localVarRequestOptions);
|
|
2070
|
-
});
|
|
2071
|
-
};
|
|
2072
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2073
|
-
interceptor = _a[_i];
|
|
2074
|
-
_loop_23(interceptor);
|
|
2075
|
-
}
|
|
2076
|
-
return [2, interceptorPromise.then(function () {
|
|
2077
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2078
|
-
if (localVarUseFormData) {
|
|
2079
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2080
|
-
}
|
|
2081
|
-
else {
|
|
2082
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
return new Promise(function (resolve, reject) {
|
|
2086
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2087
|
-
if (error) {
|
|
2088
|
-
reject(error);
|
|
2089
|
-
}
|
|
2090
|
-
else {
|
|
2091
|
-
if (response.statusCode &&
|
|
2092
|
-
response.statusCode >= 200 &&
|
|
2093
|
-
response.statusCode <= 299) {
|
|
2094
|
-
body = models_1.ObjectSerializer.deserialize(body, 'UpdateDestination200Response');
|
|
2095
|
-
resolve({ response: response, body: body });
|
|
2096
|
-
}
|
|
2097
|
-
else {
|
|
2098
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
});
|
|
2102
|
-
});
|
|
2103
|
-
})];
|
|
2104
|
-
});
|
|
2105
|
-
});
|
|
2106
|
-
};
|
|
2107
|
-
DestinationsApi.prototype.updateDestinationBeta = function (destinationId, UpdateDestinationV1Input, options) {
|
|
2108
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2109
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2110
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_24, _i, _a, interceptor;
|
|
2111
|
-
var _this = this;
|
|
2112
|
-
return __generator(this, function (_b) {
|
|
2113
|
-
localVarPath = this.basePath +
|
|
2114
|
-
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
2115
|
-
localVarQueryParameters = {};
|
|
2116
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2117
|
-
produces = [
|
|
2118
|
-
'application/vnd.segment.v1beta+json',
|
|
2119
|
-
'application/json',
|
|
2120
|
-
];
|
|
2121
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2122
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2123
|
-
}
|
|
2124
|
-
else {
|
|
2125
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2126
|
-
}
|
|
2127
|
-
localVarFormParams = {};
|
|
2128
|
-
if (destinationId === null || destinationId === undefined) {
|
|
2129
|
-
throw new Error('Required parameter destinationId was null or undefined when calling updateDestinationBeta.');
|
|
2130
|
-
}
|
|
2131
|
-
if (UpdateDestinationV1Input === null ||
|
|
2132
|
-
UpdateDestinationV1Input === undefined) {
|
|
2133
|
-
throw new Error('Required parameter UpdateDestinationV1Input was null or undefined when calling updateDestinationBeta.');
|
|
2134
|
-
}
|
|
2135
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2136
|
-
localVarUseFormData = false;
|
|
2137
|
-
localVarRequestOptions = {
|
|
2138
|
-
method: 'PATCH',
|
|
2139
|
-
qs: localVarQueryParameters,
|
|
2140
|
-
headers: localVarHeaderParams,
|
|
2141
|
-
uri: localVarPath,
|
|
2142
|
-
useQuerystring: this._useQuerystring,
|
|
2143
|
-
json: true,
|
|
2144
|
-
body: models_1.ObjectSerializer.serialize(UpdateDestinationV1Input, 'UpdateDestinationV1Input'),
|
|
2145
|
-
};
|
|
2146
|
-
authenticationPromise = Promise.resolve();
|
|
2147
|
-
if (this.authentications.token.accessToken) {
|
|
2148
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2149
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2150
|
-
});
|
|
2151
|
-
}
|
|
2152
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2153
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2154
|
-
});
|
|
2155
|
-
interceptorPromise = authenticationPromise;
|
|
2156
|
-
_loop_24 = function (interceptor) {
|
|
2157
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2158
|
-
return interceptor(localVarRequestOptions);
|
|
2159
|
-
});
|
|
2160
|
-
};
|
|
2161
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2162
|
-
interceptor = _a[_i];
|
|
2163
|
-
_loop_24(interceptor);
|
|
2164
|
-
}
|
|
2165
|
-
return [2, interceptorPromise.then(function () {
|
|
2166
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2167
|
-
if (localVarUseFormData) {
|
|
2168
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2169
|
-
}
|
|
2170
|
-
else {
|
|
2171
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2172
|
-
}
|
|
2173
|
-
}
|
|
2174
|
-
return new Promise(function (resolve, reject) {
|
|
2175
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2176
|
-
if (error) {
|
|
2177
|
-
reject(error);
|
|
2178
|
-
}
|
|
2179
|
-
else {
|
|
2180
|
-
if (response.statusCode &&
|
|
2181
|
-
response.statusCode >= 200 &&
|
|
2182
|
-
response.statusCode <= 299) {
|
|
2183
|
-
body = models_1.ObjectSerializer.deserialize(body, 'UpdateDestination200Response');
|
|
2184
|
-
resolve({ response: response, body: body });
|
|
2185
|
-
}
|
|
2186
|
-
else {
|
|
2187
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2188
|
-
}
|
|
2189
|
-
}
|
|
2190
|
-
});
|
|
2191
|
-
});
|
|
2192
|
-
})];
|
|
2193
|
-
});
|
|
2194
|
-
});
|
|
2195
|
-
};
|
|
2196
|
-
DestinationsApi.prototype.updateDestinationCurrent = function (destinationId, UpdateDestinationV1Input, options) {
|
|
2197
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2198
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2199
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_25, _i, _a, interceptor;
|
|
2200
|
-
var _this = this;
|
|
2201
|
-
return __generator(this, function (_b) {
|
|
2202
|
-
localVarPath = this.basePath +
|
|
2203
|
-
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
2204
|
-
localVarQueryParameters = {};
|
|
2205
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2206
|
-
produces = [
|
|
2207
|
-
'application/vnd.segment.v1+json',
|
|
2208
|
-
'application/json',
|
|
2209
|
-
];
|
|
2210
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2211
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2212
|
-
}
|
|
2213
|
-
else {
|
|
2214
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2215
|
-
}
|
|
2216
|
-
localVarFormParams = {};
|
|
2217
|
-
if (destinationId === null || destinationId === undefined) {
|
|
2218
|
-
throw new Error('Required parameter destinationId was null or undefined when calling updateDestinationCurrent.');
|
|
2219
|
-
}
|
|
2220
|
-
if (UpdateDestinationV1Input === null ||
|
|
2221
|
-
UpdateDestinationV1Input === undefined) {
|
|
2222
|
-
throw new Error('Required parameter UpdateDestinationV1Input was null or undefined when calling updateDestinationCurrent.');
|
|
2223
|
-
}
|
|
2224
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2225
|
-
localVarUseFormData = false;
|
|
2226
|
-
localVarRequestOptions = {
|
|
2227
|
-
method: 'PATCH',
|
|
2228
|
-
qs: localVarQueryParameters,
|
|
2229
|
-
headers: localVarHeaderParams,
|
|
2230
|
-
uri: localVarPath,
|
|
2231
|
-
useQuerystring: this._useQuerystring,
|
|
2232
|
-
json: true,
|
|
2233
|
-
body: models_1.ObjectSerializer.serialize(UpdateDestinationV1Input, 'UpdateDestinationV1Input'),
|
|
2234
|
-
};
|
|
2235
|
-
authenticationPromise = Promise.resolve();
|
|
2236
|
-
if (this.authentications.token.accessToken) {
|
|
2237
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2238
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2239
|
-
});
|
|
2240
|
-
}
|
|
2241
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2242
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2243
|
-
});
|
|
2244
|
-
interceptorPromise = authenticationPromise;
|
|
2245
|
-
_loop_25 = function (interceptor) {
|
|
2246
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2247
|
-
return interceptor(localVarRequestOptions);
|
|
2248
|
-
});
|
|
2249
|
-
};
|
|
2250
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2251
|
-
interceptor = _a[_i];
|
|
2252
|
-
_loop_25(interceptor);
|
|
2253
|
-
}
|
|
2254
|
-
return [2, interceptorPromise.then(function () {
|
|
2255
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2256
|
-
if (localVarUseFormData) {
|
|
2257
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2258
|
-
}
|
|
2259
|
-
else {
|
|
2260
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2261
|
-
}
|
|
2262
|
-
}
|
|
2263
|
-
return new Promise(function (resolve, reject) {
|
|
2264
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2265
|
-
if (error) {
|
|
2266
|
-
reject(error);
|
|
2267
|
-
}
|
|
2268
|
-
else {
|
|
2269
|
-
if (response.statusCode &&
|
|
2270
|
-
response.statusCode >= 200 &&
|
|
2271
|
-
response.statusCode <= 299) {
|
|
2272
|
-
body = models_1.ObjectSerializer.deserialize(body, 'UpdateDestination200Response');
|
|
2273
|
-
resolve({ response: response, body: body });
|
|
2274
|
-
}
|
|
2275
|
-
else {
|
|
2276
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
});
|
|
2280
|
-
});
|
|
2281
|
-
})];
|
|
2282
|
-
});
|
|
2283
|
-
});
|
|
2284
|
-
};
|
|
2285
|
-
DestinationsApi.prototype.updateDestinationV1 = function (destinationId, UpdateDestinationV1Input, options) {
|
|
2286
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2287
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2288
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_26, _i, _a, interceptor;
|
|
2289
|
-
var _this = this;
|
|
2290
|
-
return __generator(this, function (_b) {
|
|
2291
|
-
localVarPath = this.basePath +
|
|
2292
|
-
'/destinations/{destinationId}'.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)));
|
|
2293
|
-
localVarQueryParameters = {};
|
|
2294
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2295
|
-
produces = [
|
|
2296
|
-
'application/vnd.segment.v1+json',
|
|
2297
|
-
'application/json',
|
|
2298
|
-
];
|
|
2299
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2300
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2301
|
-
}
|
|
2302
|
-
else {
|
|
2303
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2304
|
-
}
|
|
2305
|
-
localVarFormParams = {};
|
|
2306
|
-
if (destinationId === null || destinationId === undefined) {
|
|
2307
|
-
throw new Error('Required parameter destinationId was null or undefined when calling updateDestinationV1.');
|
|
2308
|
-
}
|
|
2309
|
-
if (UpdateDestinationV1Input === null ||
|
|
2310
|
-
UpdateDestinationV1Input === undefined) {
|
|
2311
|
-
throw new Error('Required parameter UpdateDestinationV1Input was null or undefined when calling updateDestinationV1.');
|
|
2312
|
-
}
|
|
2313
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2314
|
-
localVarUseFormData = false;
|
|
2315
|
-
localVarRequestOptions = {
|
|
2316
|
-
method: 'PATCH',
|
|
2317
|
-
qs: localVarQueryParameters,
|
|
2318
|
-
headers: localVarHeaderParams,
|
|
2319
|
-
uri: localVarPath,
|
|
2320
|
-
useQuerystring: this._useQuerystring,
|
|
2321
|
-
json: true,
|
|
2322
|
-
body: models_1.ObjectSerializer.serialize(UpdateDestinationV1Input, 'UpdateDestinationV1Input'),
|
|
2323
|
-
};
|
|
2324
|
-
authenticationPromise = Promise.resolve();
|
|
2325
|
-
if (this.authentications.token.accessToken) {
|
|
2326
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2327
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2328
|
-
});
|
|
2329
|
-
}
|
|
2330
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2331
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2332
|
-
});
|
|
2333
|
-
interceptorPromise = authenticationPromise;
|
|
2334
|
-
_loop_26 = function (interceptor) {
|
|
2335
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2336
|
-
return interceptor(localVarRequestOptions);
|
|
2337
|
-
});
|
|
2338
|
-
};
|
|
2339
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2340
|
-
interceptor = _a[_i];
|
|
2341
|
-
_loop_26(interceptor);
|
|
2342
|
-
}
|
|
2343
|
-
return [2, interceptorPromise.then(function () {
|
|
2344
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2345
|
-
if (localVarUseFormData) {
|
|
2346
|
-
localVarRequestOptions.formData = localVarFormParams;
|
|
2347
|
-
}
|
|
2348
|
-
else {
|
|
2349
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2350
|
-
}
|
|
2351
|
-
}
|
|
2352
|
-
return new Promise(function (resolve, reject) {
|
|
2353
|
-
(0, request_1.default)(localVarRequestOptions, function (error, response, body) {
|
|
2354
|
-
if (error) {
|
|
2355
|
-
reject(error);
|
|
2356
|
-
}
|
|
2357
|
-
else {
|
|
2358
|
-
if (response.statusCode &&
|
|
2359
|
-
response.statusCode >= 200 &&
|
|
2360
|
-
response.statusCode <= 299) {
|
|
2361
|
-
body = models_1.ObjectSerializer.deserialize(body, 'UpdateDestination200Response');
|
|
2362
|
-
resolve({ response: response, body: body });
|
|
2363
|
-
}
|
|
2364
|
-
else {
|
|
2365
|
-
reject(new apis_1.HttpError(response, body, response.statusCode));
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2368
|
-
});
|
|
2369
|
-
});
|
|
2370
|
-
})];
|
|
2371
|
-
});
|
|
2372
|
-
});
|
|
2373
|
-
};
|
|
2374
|
-
DestinationsApi.prototype.updateSubscriptionForDestination = function (destinationId, id, UpdateSubscriptionForDestinationAlphaInput, options) {
|
|
2375
|
-
if (options === void 0) { options = { headers: {} }; }
|
|
2376
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2377
|
-
var localVarPath, localVarQueryParameters, localVarHeaderParams, produces, localVarFormParams, localVarUseFormData, localVarRequestOptions, authenticationPromise, interceptorPromise, _loop_27, _i, _a, interceptor;
|
|
2378
|
-
var _this = this;
|
|
2379
|
-
return __generator(this, function (_b) {
|
|
2380
|
-
localVarPath = this.basePath +
|
|
2381
|
-
'/destinations/{destinationId}/subscriptions/{id}'
|
|
2382
|
-
.replace('{' + 'destinationId' + '}', encodeURIComponent(String(destinationId)))
|
|
2383
|
-
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
|
|
2384
|
-
localVarQueryParameters = {};
|
|
2385
|
-
localVarHeaderParams = Object.assign({}, this._defaultHeaders);
|
|
2386
|
-
produces = [
|
|
2387
|
-
'application/vnd.segment.v1alpha+json',
|
|
2388
|
-
'application/json',
|
|
2389
|
-
];
|
|
2390
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2391
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2392
|
-
}
|
|
2393
|
-
else {
|
|
2394
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2395
|
-
}
|
|
2396
|
-
localVarFormParams = {};
|
|
2397
|
-
if (destinationId === null || destinationId === undefined) {
|
|
2398
|
-
throw new Error('Required parameter destinationId was null or undefined when calling updateSubscriptionForDestination.');
|
|
2399
|
-
}
|
|
2400
|
-
if (id === null || id === undefined) {
|
|
2401
|
-
throw new Error('Required parameter id was null or undefined when calling updateSubscriptionForDestination.');
|
|
2402
|
-
}
|
|
2403
|
-
if (UpdateSubscriptionForDestinationAlphaInput === null ||
|
|
2404
|
-
UpdateSubscriptionForDestinationAlphaInput === undefined) {
|
|
2405
|
-
throw new Error('Required parameter UpdateSubscriptionForDestinationAlphaInput was null or undefined when calling updateSubscriptionForDestination.');
|
|
2406
|
-
}
|
|
2407
|
-
Object.assign(localVarHeaderParams, options.headers);
|
|
2408
|
-
localVarUseFormData = false;
|
|
2409
|
-
localVarRequestOptions = {
|
|
2410
|
-
method: 'PATCH',
|
|
2411
|
-
qs: localVarQueryParameters,
|
|
2412
|
-
headers: localVarHeaderParams,
|
|
2413
|
-
uri: localVarPath,
|
|
2414
|
-
useQuerystring: this._useQuerystring,
|
|
2415
|
-
json: true,
|
|
2416
|
-
body: models_1.ObjectSerializer.serialize(UpdateSubscriptionForDestinationAlphaInput, 'UpdateSubscriptionForDestinationAlphaInput'),
|
|
2417
|
-
};
|
|
2418
|
-
authenticationPromise = Promise.resolve();
|
|
2419
|
-
if (this.authentications.token.accessToken) {
|
|
2420
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2421
|
-
return _this.authentications.token.applyToRequest(localVarRequestOptions);
|
|
2422
|
-
});
|
|
2423
|
-
}
|
|
2424
|
-
authenticationPromise = authenticationPromise.then(function () {
|
|
2425
|
-
return _this.authentications.default.applyToRequest(localVarRequestOptions);
|
|
2426
|
-
});
|
|
2427
|
-
interceptorPromise = authenticationPromise;
|
|
2428
|
-
_loop_27 = function (interceptor) {
|
|
2429
|
-
interceptorPromise = interceptorPromise.then(function () {
|
|
2430
|
-
return interceptor(localVarRequestOptions);
|
|
2431
|
-
});
|
|
2432
|
-
};
|
|
2433
|
-
for (_i = 0, _a = this.interceptors; _i < _a.length; _i++) {
|
|
2434
|
-
interceptor = _a[_i];
|
|
2435
|
-
_loop_27(interceptor);
|
|
2436
|
-
}
|
|
2437
1074
|
return [2, interceptorPromise.then(function () {
|
|
2438
1075
|
if (Object.keys(localVarFormParams).length) {
|
|
2439
1076
|
if (localVarUseFormData) {
|