@segment/public-api-sdk-typescript 32.0.2-b5006 → 33.0.2-b5330
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
package/api/functionsApi.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Segment Public API
|
|
3
3
|
* The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document:
|
|
5
|
+
* The version of the OpenAPI document: 33.0.2
|
|
6
6
|
* Contact: friends@segment.com
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -118,7 +118,7 @@ export class FunctionsApi {
|
|
|
118
118
|
* @summary Create Function
|
|
119
119
|
* @param CreateFunctionV1Input
|
|
120
120
|
*/
|
|
121
|
-
public async
|
|
121
|
+
public async createFunction(
|
|
122
122
|
CreateFunctionV1Input: CreateFunctionV1Input,
|
|
123
123
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
124
124
|
): Promise<{
|
|
@@ -132,2180 +132,44 @@ export class FunctionsApi {
|
|
|
132
132
|
this._defaultHeaders
|
|
133
133
|
);
|
|
134
134
|
const produces = [
|
|
135
|
-
'application/vnd.segment.
|
|
136
|
-
'application/json',
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
142
|
-
}
|
|
143
|
-
let localVarFormParams: any = {};
|
|
144
|
-
|
|
145
|
-
// verify required parameter 'CreateFunctionV1Input' is not null or undefined
|
|
146
|
-
if (
|
|
147
|
-
CreateFunctionV1Input === null ||
|
|
148
|
-
CreateFunctionV1Input === undefined
|
|
149
|
-
) {
|
|
150
|
-
throw new Error(
|
|
151
|
-
'Required parameter CreateFunctionV1Input was null or undefined when calling createFunctionAlpha.'
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
156
|
-
|
|
157
|
-
let localVarUseFormData = false;
|
|
158
|
-
|
|
159
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
160
|
-
method: 'POST',
|
|
161
|
-
qs: localVarQueryParameters,
|
|
162
|
-
headers: localVarHeaderParams,
|
|
163
|
-
uri: localVarPath,
|
|
164
|
-
useQuerystring: this._useQuerystring,
|
|
165
|
-
json: true,
|
|
166
|
-
body: ObjectSerializer.serialize(
|
|
167
|
-
CreateFunctionV1Input,
|
|
168
|
-
'CreateFunctionV1Input'
|
|
169
|
-
),
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
let authenticationPromise = Promise.resolve();
|
|
173
|
-
if (this.authentications.token.accessToken) {
|
|
174
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
175
|
-
this.authentications.token.applyToRequest(
|
|
176
|
-
localVarRequestOptions
|
|
177
|
-
)
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
181
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
182
|
-
);
|
|
183
|
-
|
|
184
|
-
let interceptorPromise = authenticationPromise;
|
|
185
|
-
for (const interceptor of this.interceptors) {
|
|
186
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
187
|
-
interceptor(localVarRequestOptions)
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
return interceptorPromise.then(() => {
|
|
192
|
-
if (Object.keys(localVarFormParams).length) {
|
|
193
|
-
if (localVarUseFormData) {
|
|
194
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
195
|
-
} else {
|
|
196
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
return new Promise<{
|
|
200
|
-
response: http.IncomingMessage;
|
|
201
|
-
body: CreateFunction200Response;
|
|
202
|
-
}>((resolve, reject) => {
|
|
203
|
-
localVarRequest(
|
|
204
|
-
localVarRequestOptions,
|
|
205
|
-
(error, response, body) => {
|
|
206
|
-
if (error) {
|
|
207
|
-
reject(error);
|
|
208
|
-
} else {
|
|
209
|
-
if (
|
|
210
|
-
response.statusCode &&
|
|
211
|
-
response.statusCode >= 200 &&
|
|
212
|
-
response.statusCode <= 299
|
|
213
|
-
) {
|
|
214
|
-
body = ObjectSerializer.deserialize(
|
|
215
|
-
body,
|
|
216
|
-
'CreateFunction200Response'
|
|
217
|
-
);
|
|
218
|
-
resolve({ response: response, body: body });
|
|
219
|
-
} else {
|
|
220
|
-
reject(
|
|
221
|
-
new HttpError(
|
|
222
|
-
response,
|
|
223
|
-
body,
|
|
224
|
-
response.statusCode
|
|
225
|
-
)
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
);
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Creates a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
236
|
-
* @summary Create Function
|
|
237
|
-
* @param CreateFunctionV1Input
|
|
238
|
-
*/
|
|
239
|
-
public async createFunctionBeta(
|
|
240
|
-
CreateFunctionV1Input: CreateFunctionV1Input,
|
|
241
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
242
|
-
): Promise<{
|
|
243
|
-
response: http.IncomingMessage;
|
|
244
|
-
body: CreateFunction200Response;
|
|
245
|
-
}> {
|
|
246
|
-
const localVarPath = this.basePath + '/functions';
|
|
247
|
-
let localVarQueryParameters: any = {};
|
|
248
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
249
|
-
{},
|
|
250
|
-
this._defaultHeaders
|
|
251
|
-
);
|
|
252
|
-
const produces = [
|
|
253
|
-
'application/vnd.segment.v1beta+json',
|
|
254
|
-
'application/json',
|
|
255
|
-
];
|
|
256
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
257
|
-
localVarHeaderParams.Accept = produces[0];
|
|
258
|
-
} else {
|
|
259
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
260
|
-
}
|
|
261
|
-
let localVarFormParams: any = {};
|
|
262
|
-
|
|
263
|
-
// verify required parameter 'CreateFunctionV1Input' is not null or undefined
|
|
264
|
-
if (
|
|
265
|
-
CreateFunctionV1Input === null ||
|
|
266
|
-
CreateFunctionV1Input === undefined
|
|
267
|
-
) {
|
|
268
|
-
throw new Error(
|
|
269
|
-
'Required parameter CreateFunctionV1Input was null or undefined when calling createFunctionBeta.'
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
274
|
-
|
|
275
|
-
let localVarUseFormData = false;
|
|
276
|
-
|
|
277
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
278
|
-
method: 'POST',
|
|
279
|
-
qs: localVarQueryParameters,
|
|
280
|
-
headers: localVarHeaderParams,
|
|
281
|
-
uri: localVarPath,
|
|
282
|
-
useQuerystring: this._useQuerystring,
|
|
283
|
-
json: true,
|
|
284
|
-
body: ObjectSerializer.serialize(
|
|
285
|
-
CreateFunctionV1Input,
|
|
286
|
-
'CreateFunctionV1Input'
|
|
287
|
-
),
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
let authenticationPromise = Promise.resolve();
|
|
291
|
-
if (this.authentications.token.accessToken) {
|
|
292
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
293
|
-
this.authentications.token.applyToRequest(
|
|
294
|
-
localVarRequestOptions
|
|
295
|
-
)
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
299
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
300
|
-
);
|
|
301
|
-
|
|
302
|
-
let interceptorPromise = authenticationPromise;
|
|
303
|
-
for (const interceptor of this.interceptors) {
|
|
304
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
305
|
-
interceptor(localVarRequestOptions)
|
|
306
|
-
);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
return interceptorPromise.then(() => {
|
|
310
|
-
if (Object.keys(localVarFormParams).length) {
|
|
311
|
-
if (localVarUseFormData) {
|
|
312
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
313
|
-
} else {
|
|
314
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
return new Promise<{
|
|
318
|
-
response: http.IncomingMessage;
|
|
319
|
-
body: CreateFunction200Response;
|
|
320
|
-
}>((resolve, reject) => {
|
|
321
|
-
localVarRequest(
|
|
322
|
-
localVarRequestOptions,
|
|
323
|
-
(error, response, body) => {
|
|
324
|
-
if (error) {
|
|
325
|
-
reject(error);
|
|
326
|
-
} else {
|
|
327
|
-
if (
|
|
328
|
-
response.statusCode &&
|
|
329
|
-
response.statusCode >= 200 &&
|
|
330
|
-
response.statusCode <= 299
|
|
331
|
-
) {
|
|
332
|
-
body = ObjectSerializer.deserialize(
|
|
333
|
-
body,
|
|
334
|
-
'CreateFunction200Response'
|
|
335
|
-
);
|
|
336
|
-
resolve({ response: response, body: body });
|
|
337
|
-
} else {
|
|
338
|
-
reject(
|
|
339
|
-
new HttpError(
|
|
340
|
-
response,
|
|
341
|
-
body,
|
|
342
|
-
response.statusCode
|
|
343
|
-
)
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
);
|
|
349
|
-
});
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Creates a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
354
|
-
* @summary Create Function
|
|
355
|
-
* @param CreateFunctionV1Input
|
|
356
|
-
*/
|
|
357
|
-
public async createFunctionCurrent(
|
|
358
|
-
CreateFunctionV1Input: CreateFunctionV1Input,
|
|
359
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
360
|
-
): Promise<{
|
|
361
|
-
response: http.IncomingMessage;
|
|
362
|
-
body: CreateFunction200Response;
|
|
363
|
-
}> {
|
|
364
|
-
const localVarPath = this.basePath + '/functions';
|
|
365
|
-
let localVarQueryParameters: any = {};
|
|
366
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
367
|
-
{},
|
|
368
|
-
this._defaultHeaders
|
|
369
|
-
);
|
|
370
|
-
const produces = [
|
|
371
|
-
'application/vnd.segment.v1+json',
|
|
372
|
-
'application/json',
|
|
373
|
-
];
|
|
374
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
375
|
-
localVarHeaderParams.Accept = produces[0];
|
|
376
|
-
} else {
|
|
377
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
378
|
-
}
|
|
379
|
-
let localVarFormParams: any = {};
|
|
380
|
-
|
|
381
|
-
// verify required parameter 'CreateFunctionV1Input' is not null or undefined
|
|
382
|
-
if (
|
|
383
|
-
CreateFunctionV1Input === null ||
|
|
384
|
-
CreateFunctionV1Input === undefined
|
|
385
|
-
) {
|
|
386
|
-
throw new Error(
|
|
387
|
-
'Required parameter CreateFunctionV1Input was null or undefined when calling createFunctionCurrent.'
|
|
388
|
-
);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
392
|
-
|
|
393
|
-
let localVarUseFormData = false;
|
|
394
|
-
|
|
395
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
396
|
-
method: 'POST',
|
|
397
|
-
qs: localVarQueryParameters,
|
|
398
|
-
headers: localVarHeaderParams,
|
|
399
|
-
uri: localVarPath,
|
|
400
|
-
useQuerystring: this._useQuerystring,
|
|
401
|
-
json: true,
|
|
402
|
-
body: ObjectSerializer.serialize(
|
|
403
|
-
CreateFunctionV1Input,
|
|
404
|
-
'CreateFunctionV1Input'
|
|
405
|
-
),
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
let authenticationPromise = Promise.resolve();
|
|
409
|
-
if (this.authentications.token.accessToken) {
|
|
410
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
411
|
-
this.authentications.token.applyToRequest(
|
|
412
|
-
localVarRequestOptions
|
|
413
|
-
)
|
|
414
|
-
);
|
|
415
|
-
}
|
|
416
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
417
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
418
|
-
);
|
|
419
|
-
|
|
420
|
-
let interceptorPromise = authenticationPromise;
|
|
421
|
-
for (const interceptor of this.interceptors) {
|
|
422
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
423
|
-
interceptor(localVarRequestOptions)
|
|
424
|
-
);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
return interceptorPromise.then(() => {
|
|
428
|
-
if (Object.keys(localVarFormParams).length) {
|
|
429
|
-
if (localVarUseFormData) {
|
|
430
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
431
|
-
} else {
|
|
432
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
return new Promise<{
|
|
436
|
-
response: http.IncomingMessage;
|
|
437
|
-
body: CreateFunction200Response;
|
|
438
|
-
}>((resolve, reject) => {
|
|
439
|
-
localVarRequest(
|
|
440
|
-
localVarRequestOptions,
|
|
441
|
-
(error, response, body) => {
|
|
442
|
-
if (error) {
|
|
443
|
-
reject(error);
|
|
444
|
-
} else {
|
|
445
|
-
if (
|
|
446
|
-
response.statusCode &&
|
|
447
|
-
response.statusCode >= 200 &&
|
|
448
|
-
response.statusCode <= 299
|
|
449
|
-
) {
|
|
450
|
-
body = ObjectSerializer.deserialize(
|
|
451
|
-
body,
|
|
452
|
-
'CreateFunction200Response'
|
|
453
|
-
);
|
|
454
|
-
resolve({ response: response, body: body });
|
|
455
|
-
} else {
|
|
456
|
-
reject(
|
|
457
|
-
new HttpError(
|
|
458
|
-
response,
|
|
459
|
-
body,
|
|
460
|
-
response.statusCode
|
|
461
|
-
)
|
|
462
|
-
);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
);
|
|
467
|
-
});
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
* Deploys a Function. Only applicable to Source Function instances. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
472
|
-
* @summary Create Function Deployment
|
|
473
|
-
* @param functionId
|
|
474
|
-
*/
|
|
475
|
-
public async createFunctionDeploymentAlpha(
|
|
476
|
-
functionId: string,
|
|
477
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
478
|
-
): Promise<{
|
|
479
|
-
response: http.IncomingMessage;
|
|
480
|
-
body: CreateFunctionDeployment200Response;
|
|
481
|
-
}> {
|
|
482
|
-
const localVarPath =
|
|
483
|
-
this.basePath +
|
|
484
|
-
'/functions/{functionId}/deploy'.replace(
|
|
485
|
-
'{' + 'functionId' + '}',
|
|
486
|
-
encodeURIComponent(String(functionId))
|
|
487
|
-
);
|
|
488
|
-
let localVarQueryParameters: any = {};
|
|
489
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
490
|
-
{},
|
|
491
|
-
this._defaultHeaders
|
|
492
|
-
);
|
|
493
|
-
const produces = [
|
|
494
|
-
'application/vnd.segment.v1alpha+json',
|
|
495
|
-
'application/json',
|
|
496
|
-
];
|
|
497
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
498
|
-
localVarHeaderParams.Accept = produces[0];
|
|
499
|
-
} else {
|
|
500
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
501
|
-
}
|
|
502
|
-
let localVarFormParams: any = {};
|
|
503
|
-
|
|
504
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
505
|
-
if (functionId === null || functionId === undefined) {
|
|
506
|
-
throw new Error(
|
|
507
|
-
'Required parameter functionId was null or undefined when calling createFunctionDeploymentAlpha.'
|
|
508
|
-
);
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
512
|
-
|
|
513
|
-
let localVarUseFormData = false;
|
|
514
|
-
|
|
515
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
516
|
-
method: 'POST',
|
|
517
|
-
qs: localVarQueryParameters,
|
|
518
|
-
headers: localVarHeaderParams,
|
|
519
|
-
uri: localVarPath,
|
|
520
|
-
useQuerystring: this._useQuerystring,
|
|
521
|
-
json: true,
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
let authenticationPromise = Promise.resolve();
|
|
525
|
-
if (this.authentications.token.accessToken) {
|
|
526
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
527
|
-
this.authentications.token.applyToRequest(
|
|
528
|
-
localVarRequestOptions
|
|
529
|
-
)
|
|
530
|
-
);
|
|
531
|
-
}
|
|
532
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
533
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
534
|
-
);
|
|
535
|
-
|
|
536
|
-
let interceptorPromise = authenticationPromise;
|
|
537
|
-
for (const interceptor of this.interceptors) {
|
|
538
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
539
|
-
interceptor(localVarRequestOptions)
|
|
540
|
-
);
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
return interceptorPromise.then(() => {
|
|
544
|
-
if (Object.keys(localVarFormParams).length) {
|
|
545
|
-
if (localVarUseFormData) {
|
|
546
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
547
|
-
} else {
|
|
548
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
return new Promise<{
|
|
552
|
-
response: http.IncomingMessage;
|
|
553
|
-
body: CreateFunctionDeployment200Response;
|
|
554
|
-
}>((resolve, reject) => {
|
|
555
|
-
localVarRequest(
|
|
556
|
-
localVarRequestOptions,
|
|
557
|
-
(error, response, body) => {
|
|
558
|
-
if (error) {
|
|
559
|
-
reject(error);
|
|
560
|
-
} else {
|
|
561
|
-
if (
|
|
562
|
-
response.statusCode &&
|
|
563
|
-
response.statusCode >= 200 &&
|
|
564
|
-
response.statusCode <= 299
|
|
565
|
-
) {
|
|
566
|
-
body = ObjectSerializer.deserialize(
|
|
567
|
-
body,
|
|
568
|
-
'CreateFunctionDeployment200Response'
|
|
569
|
-
);
|
|
570
|
-
resolve({ response: response, body: body });
|
|
571
|
-
} else {
|
|
572
|
-
reject(
|
|
573
|
-
new HttpError(
|
|
574
|
-
response,
|
|
575
|
-
body,
|
|
576
|
-
response.statusCode
|
|
577
|
-
)
|
|
578
|
-
);
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
);
|
|
583
|
-
});
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* Deploys a Function. Only applicable to Source Function instances. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
588
|
-
* @summary Create Function Deployment
|
|
589
|
-
* @param functionId
|
|
590
|
-
*/
|
|
591
|
-
public async createFunctionDeploymentBeta(
|
|
592
|
-
functionId: string,
|
|
593
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
594
|
-
): Promise<{
|
|
595
|
-
response: http.IncomingMessage;
|
|
596
|
-
body: CreateFunctionDeployment200Response;
|
|
597
|
-
}> {
|
|
598
|
-
const localVarPath =
|
|
599
|
-
this.basePath +
|
|
600
|
-
'/functions/{functionId}/deploy'.replace(
|
|
601
|
-
'{' + 'functionId' + '}',
|
|
602
|
-
encodeURIComponent(String(functionId))
|
|
603
|
-
);
|
|
604
|
-
let localVarQueryParameters: any = {};
|
|
605
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
606
|
-
{},
|
|
607
|
-
this._defaultHeaders
|
|
608
|
-
);
|
|
609
|
-
const produces = [
|
|
610
|
-
'application/vnd.segment.v1beta+json',
|
|
611
|
-
'application/json',
|
|
612
|
-
];
|
|
613
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
614
|
-
localVarHeaderParams.Accept = produces[0];
|
|
615
|
-
} else {
|
|
616
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
617
|
-
}
|
|
618
|
-
let localVarFormParams: any = {};
|
|
619
|
-
|
|
620
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
621
|
-
if (functionId === null || functionId === undefined) {
|
|
622
|
-
throw new Error(
|
|
623
|
-
'Required parameter functionId was null or undefined when calling createFunctionDeploymentBeta.'
|
|
624
|
-
);
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
628
|
-
|
|
629
|
-
let localVarUseFormData = false;
|
|
630
|
-
|
|
631
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
632
|
-
method: 'POST',
|
|
633
|
-
qs: localVarQueryParameters,
|
|
634
|
-
headers: localVarHeaderParams,
|
|
635
|
-
uri: localVarPath,
|
|
636
|
-
useQuerystring: this._useQuerystring,
|
|
637
|
-
json: true,
|
|
638
|
-
};
|
|
639
|
-
|
|
640
|
-
let authenticationPromise = Promise.resolve();
|
|
641
|
-
if (this.authentications.token.accessToken) {
|
|
642
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
643
|
-
this.authentications.token.applyToRequest(
|
|
644
|
-
localVarRequestOptions
|
|
645
|
-
)
|
|
646
|
-
);
|
|
647
|
-
}
|
|
648
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
649
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
650
|
-
);
|
|
651
|
-
|
|
652
|
-
let interceptorPromise = authenticationPromise;
|
|
653
|
-
for (const interceptor of this.interceptors) {
|
|
654
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
655
|
-
interceptor(localVarRequestOptions)
|
|
656
|
-
);
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
return interceptorPromise.then(() => {
|
|
660
|
-
if (Object.keys(localVarFormParams).length) {
|
|
661
|
-
if (localVarUseFormData) {
|
|
662
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
663
|
-
} else {
|
|
664
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
return new Promise<{
|
|
668
|
-
response: http.IncomingMessage;
|
|
669
|
-
body: CreateFunctionDeployment200Response;
|
|
670
|
-
}>((resolve, reject) => {
|
|
671
|
-
localVarRequest(
|
|
672
|
-
localVarRequestOptions,
|
|
673
|
-
(error, response, body) => {
|
|
674
|
-
if (error) {
|
|
675
|
-
reject(error);
|
|
676
|
-
} else {
|
|
677
|
-
if (
|
|
678
|
-
response.statusCode &&
|
|
679
|
-
response.statusCode >= 200 &&
|
|
680
|
-
response.statusCode <= 299
|
|
681
|
-
) {
|
|
682
|
-
body = ObjectSerializer.deserialize(
|
|
683
|
-
body,
|
|
684
|
-
'CreateFunctionDeployment200Response'
|
|
685
|
-
);
|
|
686
|
-
resolve({ response: response, body: body });
|
|
687
|
-
} else {
|
|
688
|
-
reject(
|
|
689
|
-
new HttpError(
|
|
690
|
-
response,
|
|
691
|
-
body,
|
|
692
|
-
response.statusCode
|
|
693
|
-
)
|
|
694
|
-
);
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
);
|
|
699
|
-
});
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
/**
|
|
703
|
-
* Deploys a Function. Only applicable to Source Function instances. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
704
|
-
* @summary Create Function Deployment
|
|
705
|
-
* @param functionId
|
|
706
|
-
*/
|
|
707
|
-
public async createFunctionDeploymentCurrent(
|
|
708
|
-
functionId: string,
|
|
709
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
710
|
-
): Promise<{
|
|
711
|
-
response: http.IncomingMessage;
|
|
712
|
-
body: CreateFunctionDeployment200Response;
|
|
713
|
-
}> {
|
|
714
|
-
const localVarPath =
|
|
715
|
-
this.basePath +
|
|
716
|
-
'/functions/{functionId}/deploy'.replace(
|
|
717
|
-
'{' + 'functionId' + '}',
|
|
718
|
-
encodeURIComponent(String(functionId))
|
|
719
|
-
);
|
|
720
|
-
let localVarQueryParameters: any = {};
|
|
721
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
722
|
-
{},
|
|
723
|
-
this._defaultHeaders
|
|
724
|
-
);
|
|
725
|
-
const produces = ['application/json'];
|
|
726
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
727
|
-
localVarHeaderParams.Accept = produces[0];
|
|
728
|
-
} else {
|
|
729
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
730
|
-
}
|
|
731
|
-
let localVarFormParams: any = {};
|
|
732
|
-
|
|
733
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
734
|
-
if (functionId === null || functionId === undefined) {
|
|
735
|
-
throw new Error(
|
|
736
|
-
'Required parameter functionId was null or undefined when calling createFunctionDeploymentCurrent.'
|
|
737
|
-
);
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
741
|
-
|
|
742
|
-
let localVarUseFormData = false;
|
|
743
|
-
|
|
744
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
745
|
-
method: 'POST',
|
|
746
|
-
qs: localVarQueryParameters,
|
|
747
|
-
headers: localVarHeaderParams,
|
|
748
|
-
uri: localVarPath,
|
|
749
|
-
useQuerystring: this._useQuerystring,
|
|
750
|
-
json: true,
|
|
751
|
-
};
|
|
752
|
-
|
|
753
|
-
let authenticationPromise = Promise.resolve();
|
|
754
|
-
if (this.authentications.token.accessToken) {
|
|
755
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
756
|
-
this.authentications.token.applyToRequest(
|
|
757
|
-
localVarRequestOptions
|
|
758
|
-
)
|
|
759
|
-
);
|
|
760
|
-
}
|
|
761
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
762
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
763
|
-
);
|
|
764
|
-
|
|
765
|
-
let interceptorPromise = authenticationPromise;
|
|
766
|
-
for (const interceptor of this.interceptors) {
|
|
767
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
768
|
-
interceptor(localVarRequestOptions)
|
|
769
|
-
);
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
return interceptorPromise.then(() => {
|
|
773
|
-
if (Object.keys(localVarFormParams).length) {
|
|
774
|
-
if (localVarUseFormData) {
|
|
775
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
776
|
-
} else {
|
|
777
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
return new Promise<{
|
|
781
|
-
response: http.IncomingMessage;
|
|
782
|
-
body: CreateFunctionDeployment200Response;
|
|
783
|
-
}>((resolve, reject) => {
|
|
784
|
-
localVarRequest(
|
|
785
|
-
localVarRequestOptions,
|
|
786
|
-
(error, response, body) => {
|
|
787
|
-
if (error) {
|
|
788
|
-
reject(error);
|
|
789
|
-
} else {
|
|
790
|
-
if (
|
|
791
|
-
response.statusCode &&
|
|
792
|
-
response.statusCode >= 200 &&
|
|
793
|
-
response.statusCode <= 299
|
|
794
|
-
) {
|
|
795
|
-
body = ObjectSerializer.deserialize(
|
|
796
|
-
body,
|
|
797
|
-
'CreateFunctionDeployment200Response'
|
|
798
|
-
);
|
|
799
|
-
resolve({ response: response, body: body });
|
|
800
|
-
} else {
|
|
801
|
-
reject(
|
|
802
|
-
new HttpError(
|
|
803
|
-
response,
|
|
804
|
-
body,
|
|
805
|
-
response.statusCode
|
|
806
|
-
)
|
|
807
|
-
);
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
);
|
|
812
|
-
});
|
|
813
|
-
});
|
|
814
|
-
}
|
|
815
|
-
/**
|
|
816
|
-
* Deploys a Function. Only applicable to Source Function instances. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
817
|
-
* @summary Create Function Deployment
|
|
818
|
-
* @param functionId
|
|
819
|
-
*/
|
|
820
|
-
public async createFunctionDeploymentV1(
|
|
821
|
-
functionId: string,
|
|
822
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
823
|
-
): Promise<{
|
|
824
|
-
response: http.IncomingMessage;
|
|
825
|
-
body: CreateFunctionDeployment200Response;
|
|
826
|
-
}> {
|
|
827
|
-
const localVarPath =
|
|
828
|
-
this.basePath +
|
|
829
|
-
'/functions/{functionId}/deploy'.replace(
|
|
830
|
-
'{' + 'functionId' + '}',
|
|
831
|
-
encodeURIComponent(String(functionId))
|
|
832
|
-
);
|
|
833
|
-
let localVarQueryParameters: any = {};
|
|
834
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
835
|
-
{},
|
|
836
|
-
this._defaultHeaders
|
|
837
|
-
);
|
|
838
|
-
const produces = [
|
|
839
|
-
'application/vnd.segment.v1+json',
|
|
840
|
-
'application/json',
|
|
841
|
-
];
|
|
842
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
843
|
-
localVarHeaderParams.Accept = produces[0];
|
|
844
|
-
} else {
|
|
845
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
846
|
-
}
|
|
847
|
-
let localVarFormParams: any = {};
|
|
848
|
-
|
|
849
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
850
|
-
if (functionId === null || functionId === undefined) {
|
|
851
|
-
throw new Error(
|
|
852
|
-
'Required parameter functionId was null or undefined when calling createFunctionDeploymentV1.'
|
|
853
|
-
);
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
857
|
-
|
|
858
|
-
let localVarUseFormData = false;
|
|
859
|
-
|
|
860
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
861
|
-
method: 'POST',
|
|
862
|
-
qs: localVarQueryParameters,
|
|
863
|
-
headers: localVarHeaderParams,
|
|
864
|
-
uri: localVarPath,
|
|
865
|
-
useQuerystring: this._useQuerystring,
|
|
866
|
-
json: true,
|
|
867
|
-
};
|
|
868
|
-
|
|
869
|
-
let authenticationPromise = Promise.resolve();
|
|
870
|
-
if (this.authentications.token.accessToken) {
|
|
871
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
872
|
-
this.authentications.token.applyToRequest(
|
|
873
|
-
localVarRequestOptions
|
|
874
|
-
)
|
|
875
|
-
);
|
|
876
|
-
}
|
|
877
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
878
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
879
|
-
);
|
|
880
|
-
|
|
881
|
-
let interceptorPromise = authenticationPromise;
|
|
882
|
-
for (const interceptor of this.interceptors) {
|
|
883
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
884
|
-
interceptor(localVarRequestOptions)
|
|
885
|
-
);
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
return interceptorPromise.then(() => {
|
|
889
|
-
if (Object.keys(localVarFormParams).length) {
|
|
890
|
-
if (localVarUseFormData) {
|
|
891
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
892
|
-
} else {
|
|
893
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
return new Promise<{
|
|
897
|
-
response: http.IncomingMessage;
|
|
898
|
-
body: CreateFunctionDeployment200Response;
|
|
899
|
-
}>((resolve, reject) => {
|
|
900
|
-
localVarRequest(
|
|
901
|
-
localVarRequestOptions,
|
|
902
|
-
(error, response, body) => {
|
|
903
|
-
if (error) {
|
|
904
|
-
reject(error);
|
|
905
|
-
} else {
|
|
906
|
-
if (
|
|
907
|
-
response.statusCode &&
|
|
908
|
-
response.statusCode >= 200 &&
|
|
909
|
-
response.statusCode <= 299
|
|
910
|
-
) {
|
|
911
|
-
body = ObjectSerializer.deserialize(
|
|
912
|
-
body,
|
|
913
|
-
'CreateFunctionDeployment200Response'
|
|
914
|
-
);
|
|
915
|
-
resolve({ response: response, body: body });
|
|
916
|
-
} else {
|
|
917
|
-
reject(
|
|
918
|
-
new HttpError(
|
|
919
|
-
response,
|
|
920
|
-
body,
|
|
921
|
-
response.statusCode
|
|
922
|
-
)
|
|
923
|
-
);
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
);
|
|
928
|
-
});
|
|
929
|
-
});
|
|
930
|
-
}
|
|
931
|
-
/**
|
|
932
|
-
* Creates a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
933
|
-
* @summary Create Function
|
|
934
|
-
* @param CreateFunctionV1Input
|
|
935
|
-
*/
|
|
936
|
-
public async createFunctionV1(
|
|
937
|
-
CreateFunctionV1Input: CreateFunctionV1Input,
|
|
938
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
939
|
-
): Promise<{
|
|
940
|
-
response: http.IncomingMessage;
|
|
941
|
-
body: CreateFunction200Response;
|
|
942
|
-
}> {
|
|
943
|
-
const localVarPath = this.basePath + '/functions';
|
|
944
|
-
let localVarQueryParameters: any = {};
|
|
945
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
946
|
-
{},
|
|
947
|
-
this._defaultHeaders
|
|
948
|
-
);
|
|
949
|
-
const produces = [
|
|
950
|
-
'application/vnd.segment.v1+json',
|
|
951
|
-
'application/json',
|
|
952
|
-
];
|
|
953
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
954
|
-
localVarHeaderParams.Accept = produces[0];
|
|
955
|
-
} else {
|
|
956
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
957
|
-
}
|
|
958
|
-
let localVarFormParams: any = {};
|
|
959
|
-
|
|
960
|
-
// verify required parameter 'CreateFunctionV1Input' is not null or undefined
|
|
961
|
-
if (
|
|
962
|
-
CreateFunctionV1Input === null ||
|
|
963
|
-
CreateFunctionV1Input === undefined
|
|
964
|
-
) {
|
|
965
|
-
throw new Error(
|
|
966
|
-
'Required parameter CreateFunctionV1Input was null or undefined when calling createFunctionV1.'
|
|
967
|
-
);
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
971
|
-
|
|
972
|
-
let localVarUseFormData = false;
|
|
973
|
-
|
|
974
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
975
|
-
method: 'POST',
|
|
976
|
-
qs: localVarQueryParameters,
|
|
977
|
-
headers: localVarHeaderParams,
|
|
978
|
-
uri: localVarPath,
|
|
979
|
-
useQuerystring: this._useQuerystring,
|
|
980
|
-
json: true,
|
|
981
|
-
body: ObjectSerializer.serialize(
|
|
982
|
-
CreateFunctionV1Input,
|
|
983
|
-
'CreateFunctionV1Input'
|
|
984
|
-
),
|
|
985
|
-
};
|
|
986
|
-
|
|
987
|
-
let authenticationPromise = Promise.resolve();
|
|
988
|
-
if (this.authentications.token.accessToken) {
|
|
989
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
990
|
-
this.authentications.token.applyToRequest(
|
|
991
|
-
localVarRequestOptions
|
|
992
|
-
)
|
|
993
|
-
);
|
|
994
|
-
}
|
|
995
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
996
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
997
|
-
);
|
|
998
|
-
|
|
999
|
-
let interceptorPromise = authenticationPromise;
|
|
1000
|
-
for (const interceptor of this.interceptors) {
|
|
1001
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1002
|
-
interceptor(localVarRequestOptions)
|
|
1003
|
-
);
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
return interceptorPromise.then(() => {
|
|
1007
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1008
|
-
if (localVarUseFormData) {
|
|
1009
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1010
|
-
} else {
|
|
1011
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
return new Promise<{
|
|
1015
|
-
response: http.IncomingMessage;
|
|
1016
|
-
body: CreateFunction200Response;
|
|
1017
|
-
}>((resolve, reject) => {
|
|
1018
|
-
localVarRequest(
|
|
1019
|
-
localVarRequestOptions,
|
|
1020
|
-
(error, response, body) => {
|
|
1021
|
-
if (error) {
|
|
1022
|
-
reject(error);
|
|
1023
|
-
} else {
|
|
1024
|
-
if (
|
|
1025
|
-
response.statusCode &&
|
|
1026
|
-
response.statusCode >= 200 &&
|
|
1027
|
-
response.statusCode <= 299
|
|
1028
|
-
) {
|
|
1029
|
-
body = ObjectSerializer.deserialize(
|
|
1030
|
-
body,
|
|
1031
|
-
'CreateFunction200Response'
|
|
1032
|
-
);
|
|
1033
|
-
resolve({ response: response, body: body });
|
|
1034
|
-
} else {
|
|
1035
|
-
reject(
|
|
1036
|
-
new HttpError(
|
|
1037
|
-
response,
|
|
1038
|
-
body,
|
|
1039
|
-
response.statusCode
|
|
1040
|
-
)
|
|
1041
|
-
);
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
);
|
|
1046
|
-
});
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
/**
|
|
1050
|
-
* Deletes a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
1051
|
-
* @summary Delete Function
|
|
1052
|
-
* @param functionId
|
|
1053
|
-
*/
|
|
1054
|
-
public async deleteFunctionAlpha(
|
|
1055
|
-
functionId: string,
|
|
1056
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1057
|
-
): Promise<{
|
|
1058
|
-
response: http.IncomingMessage;
|
|
1059
|
-
body: DeleteFunction200Response;
|
|
1060
|
-
}> {
|
|
1061
|
-
const localVarPath =
|
|
1062
|
-
this.basePath +
|
|
1063
|
-
'/functions/{functionId}'.replace(
|
|
1064
|
-
'{' + 'functionId' + '}',
|
|
1065
|
-
encodeURIComponent(String(functionId))
|
|
1066
|
-
);
|
|
1067
|
-
let localVarQueryParameters: any = {};
|
|
1068
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1069
|
-
{},
|
|
1070
|
-
this._defaultHeaders
|
|
1071
|
-
);
|
|
1072
|
-
const produces = [
|
|
1073
|
-
'application/vnd.segment.v1alpha+json',
|
|
1074
|
-
'application/json',
|
|
1075
|
-
];
|
|
1076
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1077
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1078
|
-
} else {
|
|
1079
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1080
|
-
}
|
|
1081
|
-
let localVarFormParams: any = {};
|
|
1082
|
-
|
|
1083
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
1084
|
-
if (functionId === null || functionId === undefined) {
|
|
1085
|
-
throw new Error(
|
|
1086
|
-
'Required parameter functionId was null or undefined when calling deleteFunctionAlpha.'
|
|
1087
|
-
);
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1091
|
-
|
|
1092
|
-
let localVarUseFormData = false;
|
|
1093
|
-
|
|
1094
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1095
|
-
method: 'DELETE',
|
|
1096
|
-
qs: localVarQueryParameters,
|
|
1097
|
-
headers: localVarHeaderParams,
|
|
1098
|
-
uri: localVarPath,
|
|
1099
|
-
useQuerystring: this._useQuerystring,
|
|
1100
|
-
json: true,
|
|
1101
|
-
};
|
|
1102
|
-
|
|
1103
|
-
let authenticationPromise = Promise.resolve();
|
|
1104
|
-
if (this.authentications.token.accessToken) {
|
|
1105
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1106
|
-
this.authentications.token.applyToRequest(
|
|
1107
|
-
localVarRequestOptions
|
|
1108
|
-
)
|
|
1109
|
-
);
|
|
1110
|
-
}
|
|
1111
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1112
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1113
|
-
);
|
|
1114
|
-
|
|
1115
|
-
let interceptorPromise = authenticationPromise;
|
|
1116
|
-
for (const interceptor of this.interceptors) {
|
|
1117
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1118
|
-
interceptor(localVarRequestOptions)
|
|
1119
|
-
);
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
return interceptorPromise.then(() => {
|
|
1123
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1124
|
-
if (localVarUseFormData) {
|
|
1125
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1126
|
-
} else {
|
|
1127
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
1130
|
-
return new Promise<{
|
|
1131
|
-
response: http.IncomingMessage;
|
|
1132
|
-
body: DeleteFunction200Response;
|
|
1133
|
-
}>((resolve, reject) => {
|
|
1134
|
-
localVarRequest(
|
|
1135
|
-
localVarRequestOptions,
|
|
1136
|
-
(error, response, body) => {
|
|
1137
|
-
if (error) {
|
|
1138
|
-
reject(error);
|
|
1139
|
-
} else {
|
|
1140
|
-
if (
|
|
1141
|
-
response.statusCode &&
|
|
1142
|
-
response.statusCode >= 200 &&
|
|
1143
|
-
response.statusCode <= 299
|
|
1144
|
-
) {
|
|
1145
|
-
body = ObjectSerializer.deserialize(
|
|
1146
|
-
body,
|
|
1147
|
-
'DeleteFunction200Response'
|
|
1148
|
-
);
|
|
1149
|
-
resolve({ response: response, body: body });
|
|
1150
|
-
} else {
|
|
1151
|
-
reject(
|
|
1152
|
-
new HttpError(
|
|
1153
|
-
response,
|
|
1154
|
-
body,
|
|
1155
|
-
response.statusCode
|
|
1156
|
-
)
|
|
1157
|
-
);
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
);
|
|
1162
|
-
});
|
|
1163
|
-
});
|
|
1164
|
-
}
|
|
1165
|
-
/**
|
|
1166
|
-
* Deletes a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
1167
|
-
* @summary Delete Function
|
|
1168
|
-
* @param functionId
|
|
1169
|
-
*/
|
|
1170
|
-
public async deleteFunctionBeta(
|
|
1171
|
-
functionId: string,
|
|
1172
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1173
|
-
): Promise<{
|
|
1174
|
-
response: http.IncomingMessage;
|
|
1175
|
-
body: DeleteFunction200Response;
|
|
1176
|
-
}> {
|
|
1177
|
-
const localVarPath =
|
|
1178
|
-
this.basePath +
|
|
1179
|
-
'/functions/{functionId}'.replace(
|
|
1180
|
-
'{' + 'functionId' + '}',
|
|
1181
|
-
encodeURIComponent(String(functionId))
|
|
1182
|
-
);
|
|
1183
|
-
let localVarQueryParameters: any = {};
|
|
1184
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1185
|
-
{},
|
|
1186
|
-
this._defaultHeaders
|
|
1187
|
-
);
|
|
1188
|
-
const produces = [
|
|
1189
|
-
'application/vnd.segment.v1beta+json',
|
|
1190
|
-
'application/json',
|
|
1191
|
-
];
|
|
1192
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1193
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1194
|
-
} else {
|
|
1195
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1196
|
-
}
|
|
1197
|
-
let localVarFormParams: any = {};
|
|
1198
|
-
|
|
1199
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
1200
|
-
if (functionId === null || functionId === undefined) {
|
|
1201
|
-
throw new Error(
|
|
1202
|
-
'Required parameter functionId was null or undefined when calling deleteFunctionBeta.'
|
|
1203
|
-
);
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1207
|
-
|
|
1208
|
-
let localVarUseFormData = false;
|
|
1209
|
-
|
|
1210
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1211
|
-
method: 'DELETE',
|
|
1212
|
-
qs: localVarQueryParameters,
|
|
1213
|
-
headers: localVarHeaderParams,
|
|
1214
|
-
uri: localVarPath,
|
|
1215
|
-
useQuerystring: this._useQuerystring,
|
|
1216
|
-
json: true,
|
|
1217
|
-
};
|
|
1218
|
-
|
|
1219
|
-
let authenticationPromise = Promise.resolve();
|
|
1220
|
-
if (this.authentications.token.accessToken) {
|
|
1221
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1222
|
-
this.authentications.token.applyToRequest(
|
|
1223
|
-
localVarRequestOptions
|
|
1224
|
-
)
|
|
1225
|
-
);
|
|
1226
|
-
}
|
|
1227
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1228
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1229
|
-
);
|
|
1230
|
-
|
|
1231
|
-
let interceptorPromise = authenticationPromise;
|
|
1232
|
-
for (const interceptor of this.interceptors) {
|
|
1233
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1234
|
-
interceptor(localVarRequestOptions)
|
|
1235
|
-
);
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
return interceptorPromise.then(() => {
|
|
1239
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1240
|
-
if (localVarUseFormData) {
|
|
1241
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1242
|
-
} else {
|
|
1243
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
return new Promise<{
|
|
1247
|
-
response: http.IncomingMessage;
|
|
1248
|
-
body: DeleteFunction200Response;
|
|
1249
|
-
}>((resolve, reject) => {
|
|
1250
|
-
localVarRequest(
|
|
1251
|
-
localVarRequestOptions,
|
|
1252
|
-
(error, response, body) => {
|
|
1253
|
-
if (error) {
|
|
1254
|
-
reject(error);
|
|
1255
|
-
} else {
|
|
1256
|
-
if (
|
|
1257
|
-
response.statusCode &&
|
|
1258
|
-
response.statusCode >= 200 &&
|
|
1259
|
-
response.statusCode <= 299
|
|
1260
|
-
) {
|
|
1261
|
-
body = ObjectSerializer.deserialize(
|
|
1262
|
-
body,
|
|
1263
|
-
'DeleteFunction200Response'
|
|
1264
|
-
);
|
|
1265
|
-
resolve({ response: response, body: body });
|
|
1266
|
-
} else {
|
|
1267
|
-
reject(
|
|
1268
|
-
new HttpError(
|
|
1269
|
-
response,
|
|
1270
|
-
body,
|
|
1271
|
-
response.statusCode
|
|
1272
|
-
)
|
|
1273
|
-
);
|
|
1274
|
-
}
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
);
|
|
1278
|
-
});
|
|
1279
|
-
});
|
|
1280
|
-
}
|
|
1281
|
-
/**
|
|
1282
|
-
* Deletes a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
1283
|
-
* @summary Delete Function
|
|
1284
|
-
* @param functionId
|
|
1285
|
-
*/
|
|
1286
|
-
public async deleteFunctionCurrent(
|
|
1287
|
-
functionId: string,
|
|
1288
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1289
|
-
): Promise<{
|
|
1290
|
-
response: http.IncomingMessage;
|
|
1291
|
-
body: DeleteFunction200Response;
|
|
1292
|
-
}> {
|
|
1293
|
-
const localVarPath =
|
|
1294
|
-
this.basePath +
|
|
1295
|
-
'/functions/{functionId}'.replace(
|
|
1296
|
-
'{' + 'functionId' + '}',
|
|
1297
|
-
encodeURIComponent(String(functionId))
|
|
1298
|
-
);
|
|
1299
|
-
let localVarQueryParameters: any = {};
|
|
1300
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1301
|
-
{},
|
|
1302
|
-
this._defaultHeaders
|
|
1303
|
-
);
|
|
1304
|
-
const produces = ['application/json'];
|
|
1305
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1306
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1307
|
-
} else {
|
|
1308
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1309
|
-
}
|
|
1310
|
-
let localVarFormParams: any = {};
|
|
1311
|
-
|
|
1312
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
1313
|
-
if (functionId === null || functionId === undefined) {
|
|
1314
|
-
throw new Error(
|
|
1315
|
-
'Required parameter functionId was null or undefined when calling deleteFunctionCurrent.'
|
|
1316
|
-
);
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1320
|
-
|
|
1321
|
-
let localVarUseFormData = false;
|
|
1322
|
-
|
|
1323
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1324
|
-
method: 'DELETE',
|
|
1325
|
-
qs: localVarQueryParameters,
|
|
1326
|
-
headers: localVarHeaderParams,
|
|
1327
|
-
uri: localVarPath,
|
|
1328
|
-
useQuerystring: this._useQuerystring,
|
|
1329
|
-
json: true,
|
|
1330
|
-
};
|
|
1331
|
-
|
|
1332
|
-
let authenticationPromise = Promise.resolve();
|
|
1333
|
-
if (this.authentications.token.accessToken) {
|
|
1334
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1335
|
-
this.authentications.token.applyToRequest(
|
|
1336
|
-
localVarRequestOptions
|
|
1337
|
-
)
|
|
1338
|
-
);
|
|
1339
|
-
}
|
|
1340
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1341
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1342
|
-
);
|
|
1343
|
-
|
|
1344
|
-
let interceptorPromise = authenticationPromise;
|
|
1345
|
-
for (const interceptor of this.interceptors) {
|
|
1346
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1347
|
-
interceptor(localVarRequestOptions)
|
|
1348
|
-
);
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
return interceptorPromise.then(() => {
|
|
1352
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1353
|
-
if (localVarUseFormData) {
|
|
1354
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1355
|
-
} else {
|
|
1356
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
return new Promise<{
|
|
1360
|
-
response: http.IncomingMessage;
|
|
1361
|
-
body: DeleteFunction200Response;
|
|
1362
|
-
}>((resolve, reject) => {
|
|
1363
|
-
localVarRequest(
|
|
1364
|
-
localVarRequestOptions,
|
|
1365
|
-
(error, response, body) => {
|
|
1366
|
-
if (error) {
|
|
1367
|
-
reject(error);
|
|
1368
|
-
} else {
|
|
1369
|
-
if (
|
|
1370
|
-
response.statusCode &&
|
|
1371
|
-
response.statusCode >= 200 &&
|
|
1372
|
-
response.statusCode <= 299
|
|
1373
|
-
) {
|
|
1374
|
-
body = ObjectSerializer.deserialize(
|
|
1375
|
-
body,
|
|
1376
|
-
'DeleteFunction200Response'
|
|
1377
|
-
);
|
|
1378
|
-
resolve({ response: response, body: body });
|
|
1379
|
-
} else {
|
|
1380
|
-
reject(
|
|
1381
|
-
new HttpError(
|
|
1382
|
-
response,
|
|
1383
|
-
body,
|
|
1384
|
-
response.statusCode
|
|
1385
|
-
)
|
|
1386
|
-
);
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
);
|
|
1391
|
-
});
|
|
1392
|
-
});
|
|
1393
|
-
}
|
|
1394
|
-
/**
|
|
1395
|
-
* Deletes a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
1396
|
-
* @summary Delete Function
|
|
1397
|
-
* @param functionId
|
|
1398
|
-
*/
|
|
1399
|
-
public async deleteFunctionV1(
|
|
1400
|
-
functionId: string,
|
|
1401
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1402
|
-
): Promise<{
|
|
1403
|
-
response: http.IncomingMessage;
|
|
1404
|
-
body: DeleteFunction200Response;
|
|
1405
|
-
}> {
|
|
1406
|
-
const localVarPath =
|
|
1407
|
-
this.basePath +
|
|
1408
|
-
'/functions/{functionId}'.replace(
|
|
1409
|
-
'{' + 'functionId' + '}',
|
|
1410
|
-
encodeURIComponent(String(functionId))
|
|
1411
|
-
);
|
|
1412
|
-
let localVarQueryParameters: any = {};
|
|
1413
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1414
|
-
{},
|
|
1415
|
-
this._defaultHeaders
|
|
1416
|
-
);
|
|
1417
|
-
const produces = [
|
|
1418
|
-
'application/vnd.segment.v1+json',
|
|
1419
|
-
'application/json',
|
|
1420
|
-
];
|
|
1421
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1422
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1423
|
-
} else {
|
|
1424
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1425
|
-
}
|
|
1426
|
-
let localVarFormParams: any = {};
|
|
1427
|
-
|
|
1428
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
1429
|
-
if (functionId === null || functionId === undefined) {
|
|
1430
|
-
throw new Error(
|
|
1431
|
-
'Required parameter functionId was null or undefined when calling deleteFunctionV1.'
|
|
1432
|
-
);
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1436
|
-
|
|
1437
|
-
let localVarUseFormData = false;
|
|
1438
|
-
|
|
1439
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1440
|
-
method: 'DELETE',
|
|
1441
|
-
qs: localVarQueryParameters,
|
|
1442
|
-
headers: localVarHeaderParams,
|
|
1443
|
-
uri: localVarPath,
|
|
1444
|
-
useQuerystring: this._useQuerystring,
|
|
1445
|
-
json: true,
|
|
1446
|
-
};
|
|
1447
|
-
|
|
1448
|
-
let authenticationPromise = Promise.resolve();
|
|
1449
|
-
if (this.authentications.token.accessToken) {
|
|
1450
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1451
|
-
this.authentications.token.applyToRequest(
|
|
1452
|
-
localVarRequestOptions
|
|
1453
|
-
)
|
|
1454
|
-
);
|
|
1455
|
-
}
|
|
1456
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1457
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1458
|
-
);
|
|
1459
|
-
|
|
1460
|
-
let interceptorPromise = authenticationPromise;
|
|
1461
|
-
for (const interceptor of this.interceptors) {
|
|
1462
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1463
|
-
interceptor(localVarRequestOptions)
|
|
1464
|
-
);
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
return interceptorPromise.then(() => {
|
|
1468
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1469
|
-
if (localVarUseFormData) {
|
|
1470
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1471
|
-
} else {
|
|
1472
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1473
|
-
}
|
|
1474
|
-
}
|
|
1475
|
-
return new Promise<{
|
|
1476
|
-
response: http.IncomingMessage;
|
|
1477
|
-
body: DeleteFunction200Response;
|
|
1478
|
-
}>((resolve, reject) => {
|
|
1479
|
-
localVarRequest(
|
|
1480
|
-
localVarRequestOptions,
|
|
1481
|
-
(error, response, body) => {
|
|
1482
|
-
if (error) {
|
|
1483
|
-
reject(error);
|
|
1484
|
-
} else {
|
|
1485
|
-
if (
|
|
1486
|
-
response.statusCode &&
|
|
1487
|
-
response.statusCode >= 200 &&
|
|
1488
|
-
response.statusCode <= 299
|
|
1489
|
-
) {
|
|
1490
|
-
body = ObjectSerializer.deserialize(
|
|
1491
|
-
body,
|
|
1492
|
-
'DeleteFunction200Response'
|
|
1493
|
-
);
|
|
1494
|
-
resolve({ response: response, body: body });
|
|
1495
|
-
} else {
|
|
1496
|
-
reject(
|
|
1497
|
-
new HttpError(
|
|
1498
|
-
response,
|
|
1499
|
-
body,
|
|
1500
|
-
response.statusCode
|
|
1501
|
-
)
|
|
1502
|
-
);
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
);
|
|
1507
|
-
});
|
|
1508
|
-
});
|
|
1509
|
-
}
|
|
1510
|
-
/**
|
|
1511
|
-
* Gets a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
1512
|
-
* @summary Get Function
|
|
1513
|
-
* @param functionId
|
|
1514
|
-
*/
|
|
1515
|
-
public async getFunctionAlpha(
|
|
1516
|
-
functionId: string,
|
|
1517
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1518
|
-
): Promise<{
|
|
1519
|
-
response: http.IncomingMessage;
|
|
1520
|
-
body: GetFunction200Response;
|
|
1521
|
-
}> {
|
|
1522
|
-
const localVarPath =
|
|
1523
|
-
this.basePath +
|
|
1524
|
-
'/functions/{functionId}'.replace(
|
|
1525
|
-
'{' + 'functionId' + '}',
|
|
1526
|
-
encodeURIComponent(String(functionId))
|
|
1527
|
-
);
|
|
1528
|
-
let localVarQueryParameters: any = {};
|
|
1529
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1530
|
-
{},
|
|
1531
|
-
this._defaultHeaders
|
|
1532
|
-
);
|
|
1533
|
-
const produces = [
|
|
1534
|
-
'application/vnd.segment.v1alpha+json',
|
|
1535
|
-
'application/json',
|
|
1536
|
-
];
|
|
1537
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1538
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1539
|
-
} else {
|
|
1540
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1541
|
-
}
|
|
1542
|
-
let localVarFormParams: any = {};
|
|
1543
|
-
|
|
1544
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
1545
|
-
if (functionId === null || functionId === undefined) {
|
|
1546
|
-
throw new Error(
|
|
1547
|
-
'Required parameter functionId was null or undefined when calling getFunctionAlpha.'
|
|
1548
|
-
);
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1552
|
-
|
|
1553
|
-
let localVarUseFormData = false;
|
|
1554
|
-
|
|
1555
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1556
|
-
method: 'GET',
|
|
1557
|
-
qs: localVarQueryParameters,
|
|
1558
|
-
headers: localVarHeaderParams,
|
|
1559
|
-
uri: localVarPath,
|
|
1560
|
-
useQuerystring: this._useQuerystring,
|
|
1561
|
-
json: true,
|
|
1562
|
-
};
|
|
1563
|
-
|
|
1564
|
-
let authenticationPromise = Promise.resolve();
|
|
1565
|
-
if (this.authentications.token.accessToken) {
|
|
1566
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1567
|
-
this.authentications.token.applyToRequest(
|
|
1568
|
-
localVarRequestOptions
|
|
1569
|
-
)
|
|
1570
|
-
);
|
|
1571
|
-
}
|
|
1572
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1573
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1574
|
-
);
|
|
1575
|
-
|
|
1576
|
-
let interceptorPromise = authenticationPromise;
|
|
1577
|
-
for (const interceptor of this.interceptors) {
|
|
1578
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1579
|
-
interceptor(localVarRequestOptions)
|
|
1580
|
-
);
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
return interceptorPromise.then(() => {
|
|
1584
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1585
|
-
if (localVarUseFormData) {
|
|
1586
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1587
|
-
} else {
|
|
1588
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
return new Promise<{
|
|
1592
|
-
response: http.IncomingMessage;
|
|
1593
|
-
body: GetFunction200Response;
|
|
1594
|
-
}>((resolve, reject) => {
|
|
1595
|
-
localVarRequest(
|
|
1596
|
-
localVarRequestOptions,
|
|
1597
|
-
(error, response, body) => {
|
|
1598
|
-
if (error) {
|
|
1599
|
-
reject(error);
|
|
1600
|
-
} else {
|
|
1601
|
-
if (
|
|
1602
|
-
response.statusCode &&
|
|
1603
|
-
response.statusCode >= 200 &&
|
|
1604
|
-
response.statusCode <= 299
|
|
1605
|
-
) {
|
|
1606
|
-
body = ObjectSerializer.deserialize(
|
|
1607
|
-
body,
|
|
1608
|
-
'GetFunction200Response'
|
|
1609
|
-
);
|
|
1610
|
-
resolve({ response: response, body: body });
|
|
1611
|
-
} else {
|
|
1612
|
-
reject(
|
|
1613
|
-
new HttpError(
|
|
1614
|
-
response,
|
|
1615
|
-
body,
|
|
1616
|
-
response.statusCode
|
|
1617
|
-
)
|
|
1618
|
-
);
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
);
|
|
1623
|
-
});
|
|
1624
|
-
});
|
|
1625
|
-
}
|
|
1626
|
-
/**
|
|
1627
|
-
* Gets a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
1628
|
-
* @summary Get Function
|
|
1629
|
-
* @param functionId
|
|
1630
|
-
*/
|
|
1631
|
-
public async getFunctionBeta(
|
|
1632
|
-
functionId: string,
|
|
1633
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1634
|
-
): Promise<{
|
|
1635
|
-
response: http.IncomingMessage;
|
|
1636
|
-
body: GetFunction200Response;
|
|
1637
|
-
}> {
|
|
1638
|
-
const localVarPath =
|
|
1639
|
-
this.basePath +
|
|
1640
|
-
'/functions/{functionId}'.replace(
|
|
1641
|
-
'{' + 'functionId' + '}',
|
|
1642
|
-
encodeURIComponent(String(functionId))
|
|
1643
|
-
);
|
|
1644
|
-
let localVarQueryParameters: any = {};
|
|
1645
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1646
|
-
{},
|
|
1647
|
-
this._defaultHeaders
|
|
1648
|
-
);
|
|
1649
|
-
const produces = [
|
|
1650
|
-
'application/vnd.segment.v1beta+json',
|
|
1651
|
-
'application/json',
|
|
1652
|
-
];
|
|
1653
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1654
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1655
|
-
} else {
|
|
1656
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1657
|
-
}
|
|
1658
|
-
let localVarFormParams: any = {};
|
|
1659
|
-
|
|
1660
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
1661
|
-
if (functionId === null || functionId === undefined) {
|
|
1662
|
-
throw new Error(
|
|
1663
|
-
'Required parameter functionId was null or undefined when calling getFunctionBeta.'
|
|
1664
|
-
);
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1668
|
-
|
|
1669
|
-
let localVarUseFormData = false;
|
|
1670
|
-
|
|
1671
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1672
|
-
method: 'GET',
|
|
1673
|
-
qs: localVarQueryParameters,
|
|
1674
|
-
headers: localVarHeaderParams,
|
|
1675
|
-
uri: localVarPath,
|
|
1676
|
-
useQuerystring: this._useQuerystring,
|
|
1677
|
-
json: true,
|
|
1678
|
-
};
|
|
1679
|
-
|
|
1680
|
-
let authenticationPromise = Promise.resolve();
|
|
1681
|
-
if (this.authentications.token.accessToken) {
|
|
1682
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1683
|
-
this.authentications.token.applyToRequest(
|
|
1684
|
-
localVarRequestOptions
|
|
1685
|
-
)
|
|
1686
|
-
);
|
|
1687
|
-
}
|
|
1688
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1689
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1690
|
-
);
|
|
1691
|
-
|
|
1692
|
-
let interceptorPromise = authenticationPromise;
|
|
1693
|
-
for (const interceptor of this.interceptors) {
|
|
1694
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1695
|
-
interceptor(localVarRequestOptions)
|
|
1696
|
-
);
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
return interceptorPromise.then(() => {
|
|
1700
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1701
|
-
if (localVarUseFormData) {
|
|
1702
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1703
|
-
} else {
|
|
1704
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
return new Promise<{
|
|
1708
|
-
response: http.IncomingMessage;
|
|
1709
|
-
body: GetFunction200Response;
|
|
1710
|
-
}>((resolve, reject) => {
|
|
1711
|
-
localVarRequest(
|
|
1712
|
-
localVarRequestOptions,
|
|
1713
|
-
(error, response, body) => {
|
|
1714
|
-
if (error) {
|
|
1715
|
-
reject(error);
|
|
1716
|
-
} else {
|
|
1717
|
-
if (
|
|
1718
|
-
response.statusCode &&
|
|
1719
|
-
response.statusCode >= 200 &&
|
|
1720
|
-
response.statusCode <= 299
|
|
1721
|
-
) {
|
|
1722
|
-
body = ObjectSerializer.deserialize(
|
|
1723
|
-
body,
|
|
1724
|
-
'GetFunction200Response'
|
|
1725
|
-
);
|
|
1726
|
-
resolve({ response: response, body: body });
|
|
1727
|
-
} else {
|
|
1728
|
-
reject(
|
|
1729
|
-
new HttpError(
|
|
1730
|
-
response,
|
|
1731
|
-
body,
|
|
1732
|
-
response.statusCode
|
|
1733
|
-
)
|
|
1734
|
-
);
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
}
|
|
1738
|
-
);
|
|
1739
|
-
});
|
|
1740
|
-
});
|
|
1741
|
-
}
|
|
1742
|
-
/**
|
|
1743
|
-
* Gets a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
1744
|
-
* @summary Get Function
|
|
1745
|
-
* @param functionId
|
|
1746
|
-
*/
|
|
1747
|
-
public async getFunctionCurrent(
|
|
1748
|
-
functionId: string,
|
|
1749
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1750
|
-
): Promise<{
|
|
1751
|
-
response: http.IncomingMessage;
|
|
1752
|
-
body: GetFunction200Response;
|
|
1753
|
-
}> {
|
|
1754
|
-
const localVarPath =
|
|
1755
|
-
this.basePath +
|
|
1756
|
-
'/functions/{functionId}'.replace(
|
|
1757
|
-
'{' + 'functionId' + '}',
|
|
1758
|
-
encodeURIComponent(String(functionId))
|
|
1759
|
-
);
|
|
1760
|
-
let localVarQueryParameters: any = {};
|
|
1761
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1762
|
-
{},
|
|
1763
|
-
this._defaultHeaders
|
|
1764
|
-
);
|
|
1765
|
-
const produces = ['application/json'];
|
|
1766
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1767
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1768
|
-
} else {
|
|
1769
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1770
|
-
}
|
|
1771
|
-
let localVarFormParams: any = {};
|
|
1772
|
-
|
|
1773
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
1774
|
-
if (functionId === null || functionId === undefined) {
|
|
1775
|
-
throw new Error(
|
|
1776
|
-
'Required parameter functionId was null or undefined when calling getFunctionCurrent.'
|
|
1777
|
-
);
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1781
|
-
|
|
1782
|
-
let localVarUseFormData = false;
|
|
1783
|
-
|
|
1784
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1785
|
-
method: 'GET',
|
|
1786
|
-
qs: localVarQueryParameters,
|
|
1787
|
-
headers: localVarHeaderParams,
|
|
1788
|
-
uri: localVarPath,
|
|
1789
|
-
useQuerystring: this._useQuerystring,
|
|
1790
|
-
json: true,
|
|
1791
|
-
};
|
|
1792
|
-
|
|
1793
|
-
let authenticationPromise = Promise.resolve();
|
|
1794
|
-
if (this.authentications.token.accessToken) {
|
|
1795
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1796
|
-
this.authentications.token.applyToRequest(
|
|
1797
|
-
localVarRequestOptions
|
|
1798
|
-
)
|
|
1799
|
-
);
|
|
1800
|
-
}
|
|
1801
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1802
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1803
|
-
);
|
|
1804
|
-
|
|
1805
|
-
let interceptorPromise = authenticationPromise;
|
|
1806
|
-
for (const interceptor of this.interceptors) {
|
|
1807
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1808
|
-
interceptor(localVarRequestOptions)
|
|
1809
|
-
);
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
|
-
return interceptorPromise.then(() => {
|
|
1813
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1814
|
-
if (localVarUseFormData) {
|
|
1815
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1816
|
-
} else {
|
|
1817
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1818
|
-
}
|
|
1819
|
-
}
|
|
1820
|
-
return new Promise<{
|
|
1821
|
-
response: http.IncomingMessage;
|
|
1822
|
-
body: GetFunction200Response;
|
|
1823
|
-
}>((resolve, reject) => {
|
|
1824
|
-
localVarRequest(
|
|
1825
|
-
localVarRequestOptions,
|
|
1826
|
-
(error, response, body) => {
|
|
1827
|
-
if (error) {
|
|
1828
|
-
reject(error);
|
|
1829
|
-
} else {
|
|
1830
|
-
if (
|
|
1831
|
-
response.statusCode &&
|
|
1832
|
-
response.statusCode >= 200 &&
|
|
1833
|
-
response.statusCode <= 299
|
|
1834
|
-
) {
|
|
1835
|
-
body = ObjectSerializer.deserialize(
|
|
1836
|
-
body,
|
|
1837
|
-
'GetFunction200Response'
|
|
1838
|
-
);
|
|
1839
|
-
resolve({ response: response, body: body });
|
|
1840
|
-
} else {
|
|
1841
|
-
reject(
|
|
1842
|
-
new HttpError(
|
|
1843
|
-
response,
|
|
1844
|
-
body,
|
|
1845
|
-
response.statusCode
|
|
1846
|
-
)
|
|
1847
|
-
);
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1850
|
-
}
|
|
1851
|
-
);
|
|
1852
|
-
});
|
|
1853
|
-
});
|
|
1854
|
-
}
|
|
1855
|
-
/**
|
|
1856
|
-
* Gets a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
1857
|
-
* @summary Get Function
|
|
1858
|
-
* @param functionId
|
|
1859
|
-
*/
|
|
1860
|
-
public async getFunctionV1(
|
|
1861
|
-
functionId: string,
|
|
1862
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1863
|
-
): Promise<{
|
|
1864
|
-
response: http.IncomingMessage;
|
|
1865
|
-
body: GetFunction200Response;
|
|
1866
|
-
}> {
|
|
1867
|
-
const localVarPath =
|
|
1868
|
-
this.basePath +
|
|
1869
|
-
'/functions/{functionId}'.replace(
|
|
1870
|
-
'{' + 'functionId' + '}',
|
|
1871
|
-
encodeURIComponent(String(functionId))
|
|
1872
|
-
);
|
|
1873
|
-
let localVarQueryParameters: any = {};
|
|
1874
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1875
|
-
{},
|
|
1876
|
-
this._defaultHeaders
|
|
1877
|
-
);
|
|
1878
|
-
const produces = [
|
|
1879
|
-
'application/vnd.segment.v1+json',
|
|
1880
|
-
'application/json',
|
|
1881
|
-
];
|
|
1882
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1883
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1884
|
-
} else {
|
|
1885
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1886
|
-
}
|
|
1887
|
-
let localVarFormParams: any = {};
|
|
1888
|
-
|
|
1889
|
-
// verify required parameter 'functionId' is not null or undefined
|
|
1890
|
-
if (functionId === null || functionId === undefined) {
|
|
1891
|
-
throw new Error(
|
|
1892
|
-
'Required parameter functionId was null or undefined when calling getFunctionV1.'
|
|
1893
|
-
);
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1897
|
-
|
|
1898
|
-
let localVarUseFormData = false;
|
|
1899
|
-
|
|
1900
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1901
|
-
method: 'GET',
|
|
1902
|
-
qs: localVarQueryParameters,
|
|
1903
|
-
headers: localVarHeaderParams,
|
|
1904
|
-
uri: localVarPath,
|
|
1905
|
-
useQuerystring: this._useQuerystring,
|
|
1906
|
-
json: true,
|
|
1907
|
-
};
|
|
1908
|
-
|
|
1909
|
-
let authenticationPromise = Promise.resolve();
|
|
1910
|
-
if (this.authentications.token.accessToken) {
|
|
1911
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1912
|
-
this.authentications.token.applyToRequest(
|
|
1913
|
-
localVarRequestOptions
|
|
1914
|
-
)
|
|
1915
|
-
);
|
|
1916
|
-
}
|
|
1917
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1918
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1919
|
-
);
|
|
1920
|
-
|
|
1921
|
-
let interceptorPromise = authenticationPromise;
|
|
1922
|
-
for (const interceptor of this.interceptors) {
|
|
1923
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1924
|
-
interceptor(localVarRequestOptions)
|
|
1925
|
-
);
|
|
1926
|
-
}
|
|
1927
|
-
|
|
1928
|
-
return interceptorPromise.then(() => {
|
|
1929
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1930
|
-
if (localVarUseFormData) {
|
|
1931
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1932
|
-
} else {
|
|
1933
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1934
|
-
}
|
|
1935
|
-
}
|
|
1936
|
-
return new Promise<{
|
|
1937
|
-
response: http.IncomingMessage;
|
|
1938
|
-
body: GetFunction200Response;
|
|
1939
|
-
}>((resolve, reject) => {
|
|
1940
|
-
localVarRequest(
|
|
1941
|
-
localVarRequestOptions,
|
|
1942
|
-
(error, response, body) => {
|
|
1943
|
-
if (error) {
|
|
1944
|
-
reject(error);
|
|
1945
|
-
} else {
|
|
1946
|
-
if (
|
|
1947
|
-
response.statusCode &&
|
|
1948
|
-
response.statusCode >= 200 &&
|
|
1949
|
-
response.statusCode <= 299
|
|
1950
|
-
) {
|
|
1951
|
-
body = ObjectSerializer.deserialize(
|
|
1952
|
-
body,
|
|
1953
|
-
'GetFunction200Response'
|
|
1954
|
-
);
|
|
1955
|
-
resolve({ response: response, body: body });
|
|
1956
|
-
} else {
|
|
1957
|
-
reject(
|
|
1958
|
-
new HttpError(
|
|
1959
|
-
response,
|
|
1960
|
-
body,
|
|
1961
|
-
response.statusCode
|
|
1962
|
-
)
|
|
1963
|
-
);
|
|
1964
|
-
}
|
|
1965
|
-
}
|
|
1966
|
-
}
|
|
1967
|
-
);
|
|
1968
|
-
});
|
|
1969
|
-
});
|
|
1970
|
-
}
|
|
1971
|
-
/**
|
|
1972
|
-
* Lists all Functions in a Workspace. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
1973
|
-
* @summary List Functions
|
|
1974
|
-
* @param pagination Pagination parameters. This parameter exists in alpha.
|
|
1975
|
-
* @param resourceType The Function type. Config API note: equal to `type`. This parameter exists in alpha.
|
|
1976
|
-
*/
|
|
1977
|
-
public async listFunctionsAlpha(
|
|
1978
|
-
pagination: PaginationInput,
|
|
1979
|
-
resourceType: 'DESTINATION' | 'SOURCE',
|
|
1980
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1981
|
-
): Promise<{
|
|
1982
|
-
response: http.IncomingMessage;
|
|
1983
|
-
body: ListFunctions200Response;
|
|
1984
|
-
}> {
|
|
1985
|
-
const localVarPath = this.basePath + '/functions';
|
|
1986
|
-
let localVarQueryParameters: any = {};
|
|
1987
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1988
|
-
{},
|
|
1989
|
-
this._defaultHeaders
|
|
1990
|
-
);
|
|
1991
|
-
const produces = [
|
|
1992
|
-
'application/vnd.segment.v1alpha+json',
|
|
1993
|
-
'application/json',
|
|
1994
|
-
];
|
|
1995
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1996
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1997
|
-
} else {
|
|
1998
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1999
|
-
}
|
|
2000
|
-
let localVarFormParams: any = {};
|
|
2001
|
-
|
|
2002
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
2003
|
-
if (pagination === null || pagination === undefined) {
|
|
2004
|
-
throw new Error(
|
|
2005
|
-
'Required parameter pagination was null or undefined when calling listFunctionsAlpha.'
|
|
2006
|
-
);
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
// verify required parameter 'resourceType' is not null or undefined
|
|
2010
|
-
if (resourceType === null || resourceType === undefined) {
|
|
2011
|
-
throw new Error(
|
|
2012
|
-
'Required parameter resourceType was null or undefined when calling listFunctionsAlpha.'
|
|
2013
|
-
);
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
|
-
if (pagination !== undefined) {
|
|
2017
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
2018
|
-
pagination,
|
|
2019
|
-
'PaginationInput'
|
|
2020
|
-
);
|
|
2021
|
-
}
|
|
2022
|
-
|
|
2023
|
-
if (resourceType !== undefined) {
|
|
2024
|
-
localVarQueryParameters['resourceType'] =
|
|
2025
|
-
ObjectSerializer.serialize(
|
|
2026
|
-
resourceType,
|
|
2027
|
-
"'DESTINATION' | 'SOURCE'"
|
|
2028
|
-
);
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2032
|
-
|
|
2033
|
-
let localVarUseFormData = false;
|
|
2034
|
-
|
|
2035
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2036
|
-
method: 'GET',
|
|
2037
|
-
qs: localVarQueryParameters,
|
|
2038
|
-
headers: localVarHeaderParams,
|
|
2039
|
-
uri: localVarPath,
|
|
2040
|
-
useQuerystring: this._useQuerystring,
|
|
2041
|
-
json: true,
|
|
2042
|
-
};
|
|
2043
|
-
|
|
2044
|
-
let authenticationPromise = Promise.resolve();
|
|
2045
|
-
if (this.authentications.token.accessToken) {
|
|
2046
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2047
|
-
this.authentications.token.applyToRequest(
|
|
2048
|
-
localVarRequestOptions
|
|
2049
|
-
)
|
|
2050
|
-
);
|
|
2051
|
-
}
|
|
2052
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2053
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2054
|
-
);
|
|
2055
|
-
|
|
2056
|
-
let interceptorPromise = authenticationPromise;
|
|
2057
|
-
for (const interceptor of this.interceptors) {
|
|
2058
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2059
|
-
interceptor(localVarRequestOptions)
|
|
2060
|
-
);
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
|
-
return interceptorPromise.then(() => {
|
|
2064
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2065
|
-
if (localVarUseFormData) {
|
|
2066
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2067
|
-
} else {
|
|
2068
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
return new Promise<{
|
|
2072
|
-
response: http.IncomingMessage;
|
|
2073
|
-
body: ListFunctions200Response;
|
|
2074
|
-
}>((resolve, reject) => {
|
|
2075
|
-
localVarRequest(
|
|
2076
|
-
localVarRequestOptions,
|
|
2077
|
-
(error, response, body) => {
|
|
2078
|
-
if (error) {
|
|
2079
|
-
reject(error);
|
|
2080
|
-
} else {
|
|
2081
|
-
if (
|
|
2082
|
-
response.statusCode &&
|
|
2083
|
-
response.statusCode >= 200 &&
|
|
2084
|
-
response.statusCode <= 299
|
|
2085
|
-
) {
|
|
2086
|
-
body = ObjectSerializer.deserialize(
|
|
2087
|
-
body,
|
|
2088
|
-
'ListFunctions200Response'
|
|
2089
|
-
);
|
|
2090
|
-
resolve({ response: response, body: body });
|
|
2091
|
-
} else {
|
|
2092
|
-
reject(
|
|
2093
|
-
new HttpError(
|
|
2094
|
-
response,
|
|
2095
|
-
body,
|
|
2096
|
-
response.statusCode
|
|
2097
|
-
)
|
|
2098
|
-
);
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
);
|
|
2103
|
-
});
|
|
2104
|
-
});
|
|
2105
|
-
}
|
|
2106
|
-
/**
|
|
2107
|
-
* Lists all Functions in a Workspace. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
2108
|
-
* @summary List Functions
|
|
2109
|
-
* @param pagination Pagination parameters. This parameter exists in alpha.
|
|
2110
|
-
* @param resourceType The Function type. Config API note: equal to `type`. This parameter exists in alpha.
|
|
2111
|
-
*/
|
|
2112
|
-
public async listFunctionsBeta(
|
|
2113
|
-
pagination: PaginationInput,
|
|
2114
|
-
resourceType: 'DESTINATION' | 'SOURCE',
|
|
2115
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2116
|
-
): Promise<{
|
|
2117
|
-
response: http.IncomingMessage;
|
|
2118
|
-
body: ListFunctions200Response;
|
|
2119
|
-
}> {
|
|
2120
|
-
const localVarPath = this.basePath + '/functions';
|
|
2121
|
-
let localVarQueryParameters: any = {};
|
|
2122
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2123
|
-
{},
|
|
2124
|
-
this._defaultHeaders
|
|
2125
|
-
);
|
|
2126
|
-
const produces = [
|
|
2127
|
-
'application/vnd.segment.v1beta+json',
|
|
2128
|
-
'application/json',
|
|
2129
|
-
];
|
|
2130
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2131
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2132
|
-
} else {
|
|
2133
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2134
|
-
}
|
|
2135
|
-
let localVarFormParams: any = {};
|
|
2136
|
-
|
|
2137
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
2138
|
-
if (pagination === null || pagination === undefined) {
|
|
2139
|
-
throw new Error(
|
|
2140
|
-
'Required parameter pagination was null or undefined when calling listFunctionsBeta.'
|
|
2141
|
-
);
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
// verify required parameter 'resourceType' is not null or undefined
|
|
2145
|
-
if (resourceType === null || resourceType === undefined) {
|
|
2146
|
-
throw new Error(
|
|
2147
|
-
'Required parameter resourceType was null or undefined when calling listFunctionsBeta.'
|
|
2148
|
-
);
|
|
2149
|
-
}
|
|
2150
|
-
|
|
2151
|
-
if (pagination !== undefined) {
|
|
2152
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
2153
|
-
pagination,
|
|
2154
|
-
'PaginationInput'
|
|
2155
|
-
);
|
|
2156
|
-
}
|
|
2157
|
-
|
|
2158
|
-
if (resourceType !== undefined) {
|
|
2159
|
-
localVarQueryParameters['resourceType'] =
|
|
2160
|
-
ObjectSerializer.serialize(
|
|
2161
|
-
resourceType,
|
|
2162
|
-
"'DESTINATION' | 'SOURCE'"
|
|
2163
|
-
);
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2167
|
-
|
|
2168
|
-
let localVarUseFormData = false;
|
|
2169
|
-
|
|
2170
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2171
|
-
method: 'GET',
|
|
2172
|
-
qs: localVarQueryParameters,
|
|
2173
|
-
headers: localVarHeaderParams,
|
|
2174
|
-
uri: localVarPath,
|
|
2175
|
-
useQuerystring: this._useQuerystring,
|
|
2176
|
-
json: true,
|
|
2177
|
-
};
|
|
2178
|
-
|
|
2179
|
-
let authenticationPromise = Promise.resolve();
|
|
2180
|
-
if (this.authentications.token.accessToken) {
|
|
2181
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2182
|
-
this.authentications.token.applyToRequest(
|
|
2183
|
-
localVarRequestOptions
|
|
2184
|
-
)
|
|
2185
|
-
);
|
|
2186
|
-
}
|
|
2187
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2188
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2189
|
-
);
|
|
2190
|
-
|
|
2191
|
-
let interceptorPromise = authenticationPromise;
|
|
2192
|
-
for (const interceptor of this.interceptors) {
|
|
2193
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2194
|
-
interceptor(localVarRequestOptions)
|
|
2195
|
-
);
|
|
2196
|
-
}
|
|
2197
|
-
|
|
2198
|
-
return interceptorPromise.then(() => {
|
|
2199
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2200
|
-
if (localVarUseFormData) {
|
|
2201
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2202
|
-
} else {
|
|
2203
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2204
|
-
}
|
|
2205
|
-
}
|
|
2206
|
-
return new Promise<{
|
|
2207
|
-
response: http.IncomingMessage;
|
|
2208
|
-
body: ListFunctions200Response;
|
|
2209
|
-
}>((resolve, reject) => {
|
|
2210
|
-
localVarRequest(
|
|
2211
|
-
localVarRequestOptions,
|
|
2212
|
-
(error, response, body) => {
|
|
2213
|
-
if (error) {
|
|
2214
|
-
reject(error);
|
|
2215
|
-
} else {
|
|
2216
|
-
if (
|
|
2217
|
-
response.statusCode &&
|
|
2218
|
-
response.statusCode >= 200 &&
|
|
2219
|
-
response.statusCode <= 299
|
|
2220
|
-
) {
|
|
2221
|
-
body = ObjectSerializer.deserialize(
|
|
2222
|
-
body,
|
|
2223
|
-
'ListFunctions200Response'
|
|
2224
|
-
);
|
|
2225
|
-
resolve({ response: response, body: body });
|
|
2226
|
-
} else {
|
|
2227
|
-
reject(
|
|
2228
|
-
new HttpError(
|
|
2229
|
-
response,
|
|
2230
|
-
body,
|
|
2231
|
-
response.statusCode
|
|
2232
|
-
)
|
|
2233
|
-
);
|
|
2234
|
-
}
|
|
2235
|
-
}
|
|
2236
|
-
}
|
|
2237
|
-
);
|
|
2238
|
-
});
|
|
2239
|
-
});
|
|
2240
|
-
}
|
|
2241
|
-
/**
|
|
2242
|
-
* Lists all Functions in a Workspace. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
2243
|
-
* @summary List Functions
|
|
2244
|
-
* @param pagination Pagination parameters. This parameter exists in alpha.
|
|
2245
|
-
* @param resourceType The Function type. Config API note: equal to `type`. This parameter exists in alpha.
|
|
2246
|
-
*/
|
|
2247
|
-
public async listFunctionsCurrent(
|
|
2248
|
-
pagination: PaginationInput,
|
|
2249
|
-
resourceType: 'DESTINATION' | 'SOURCE',
|
|
2250
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2251
|
-
): Promise<{
|
|
2252
|
-
response: http.IncomingMessage;
|
|
2253
|
-
body: ListFunctions200Response;
|
|
2254
|
-
}> {
|
|
2255
|
-
const localVarPath = this.basePath + '/functions';
|
|
2256
|
-
let localVarQueryParameters: any = {};
|
|
2257
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2258
|
-
{},
|
|
2259
|
-
this._defaultHeaders
|
|
2260
|
-
);
|
|
2261
|
-
const produces = ['application/json'];
|
|
135
|
+
'application/vnd.segment.v1+json',
|
|
136
|
+
'application/json',
|
|
137
|
+
'application/vnd.segment.v1beta+json',
|
|
138
|
+
'application/vnd.segment.v1alpha+json',
|
|
139
|
+
];
|
|
140
|
+
// give precedence to 'application/json'
|
|
2262
141
|
if (produces.indexOf('application/json') >= 0) {
|
|
2263
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2264
|
-
} else {
|
|
2265
142
|
localVarHeaderParams.Accept = 'application/json';
|
|
143
|
+
} else {
|
|
144
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2266
145
|
}
|
|
2267
146
|
let localVarFormParams: any = {};
|
|
2268
147
|
|
|
2269
|
-
// verify required parameter '
|
|
2270
|
-
if (
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
// verify required parameter 'resourceType' is not null or undefined
|
|
2277
|
-
if (resourceType === null || resourceType === undefined) {
|
|
148
|
+
// verify required parameter 'CreateFunctionV1Input' is not null or undefined
|
|
149
|
+
if (
|
|
150
|
+
CreateFunctionV1Input === null ||
|
|
151
|
+
CreateFunctionV1Input === undefined
|
|
152
|
+
) {
|
|
2278
153
|
throw new Error(
|
|
2279
|
-
'Required parameter
|
|
2280
|
-
);
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
if (pagination !== undefined) {
|
|
2284
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
2285
|
-
pagination,
|
|
2286
|
-
'PaginationInput'
|
|
154
|
+
'Required parameter CreateFunctionV1Input was null or undefined when calling createFunction.'
|
|
2287
155
|
);
|
|
2288
156
|
}
|
|
2289
157
|
|
|
2290
|
-
if (resourceType !== undefined) {
|
|
2291
|
-
localVarQueryParameters['resourceType'] =
|
|
2292
|
-
ObjectSerializer.serialize(
|
|
2293
|
-
resourceType,
|
|
2294
|
-
"'DESTINATION' | 'SOURCE'"
|
|
2295
|
-
);
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
158
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2299
159
|
|
|
2300
160
|
let localVarUseFormData = false;
|
|
2301
161
|
|
|
2302
162
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
2303
|
-
method: '
|
|
163
|
+
method: 'POST',
|
|
2304
164
|
qs: localVarQueryParameters,
|
|
2305
165
|
headers: localVarHeaderParams,
|
|
2306
166
|
uri: localVarPath,
|
|
2307
167
|
useQuerystring: this._useQuerystring,
|
|
2308
168
|
json: true,
|
|
169
|
+
body: ObjectSerializer.serialize(
|
|
170
|
+
CreateFunctionV1Input,
|
|
171
|
+
'CreateFunctionV1Input'
|
|
172
|
+
),
|
|
2309
173
|
};
|
|
2310
174
|
|
|
2311
175
|
let authenticationPromise = Promise.resolve();
|
|
@@ -2337,7 +201,7 @@ export class FunctionsApi {
|
|
|
2337
201
|
}
|
|
2338
202
|
return new Promise<{
|
|
2339
203
|
response: http.IncomingMessage;
|
|
2340
|
-
body:
|
|
204
|
+
body: CreateFunction200Response;
|
|
2341
205
|
}>((resolve, reject) => {
|
|
2342
206
|
localVarRequest(
|
|
2343
207
|
localVarRequestOptions,
|
|
@@ -2352,7 +216,7 @@ export class FunctionsApi {
|
|
|
2352
216
|
) {
|
|
2353
217
|
body = ObjectSerializer.deserialize(
|
|
2354
218
|
body,
|
|
2355
|
-
'
|
|
219
|
+
'CreateFunction200Response'
|
|
2356
220
|
);
|
|
2357
221
|
resolve({ response: response, body: body });
|
|
2358
222
|
} else {
|
|
@@ -2371,20 +235,23 @@ export class FunctionsApi {
|
|
|
2371
235
|
});
|
|
2372
236
|
}
|
|
2373
237
|
/**
|
|
2374
|
-
*
|
|
2375
|
-
* @summary
|
|
2376
|
-
* @param
|
|
2377
|
-
* @param resourceType The Function type. Config API note: equal to `type`. This parameter exists in alpha.
|
|
238
|
+
* Deploys a Function. Only applicable to Source Function instances. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
239
|
+
* @summary Create Function Deployment
|
|
240
|
+
* @param functionId
|
|
2378
241
|
*/
|
|
2379
|
-
public async
|
|
2380
|
-
|
|
2381
|
-
resourceType: 'DESTINATION' | 'SOURCE',
|
|
242
|
+
public async createFunctionDeployment(
|
|
243
|
+
functionId: string,
|
|
2382
244
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2383
245
|
): Promise<{
|
|
2384
246
|
response: http.IncomingMessage;
|
|
2385
|
-
body:
|
|
247
|
+
body: CreateFunctionDeployment200Response;
|
|
2386
248
|
}> {
|
|
2387
|
-
const localVarPath =
|
|
249
|
+
const localVarPath =
|
|
250
|
+
this.basePath +
|
|
251
|
+
'/functions/{functionId}/deploy'.replace(
|
|
252
|
+
'{' + 'functionId' + '}',
|
|
253
|
+
encodeURIComponent(String(functionId))
|
|
254
|
+
);
|
|
2388
255
|
let localVarQueryParameters: any = {};
|
|
2389
256
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2390
257
|
{},
|
|
@@ -2393,49 +260,30 @@ export class FunctionsApi {
|
|
|
2393
260
|
const produces = [
|
|
2394
261
|
'application/vnd.segment.v1+json',
|
|
2395
262
|
'application/json',
|
|
263
|
+
'application/vnd.segment.v1beta+json',
|
|
264
|
+
'application/vnd.segment.v1alpha+json',
|
|
2396
265
|
];
|
|
266
|
+
// give precedence to 'application/json'
|
|
2397
267
|
if (produces.indexOf('application/json') >= 0) {
|
|
2398
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2399
|
-
} else {
|
|
2400
268
|
localVarHeaderParams.Accept = 'application/json';
|
|
269
|
+
} else {
|
|
270
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2401
271
|
}
|
|
2402
272
|
let localVarFormParams: any = {};
|
|
2403
273
|
|
|
2404
|
-
// verify required parameter '
|
|
2405
|
-
if (
|
|
2406
|
-
throw new Error(
|
|
2407
|
-
'Required parameter pagination was null or undefined when calling listFunctionsV1.'
|
|
2408
|
-
);
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
|
-
// verify required parameter 'resourceType' is not null or undefined
|
|
2412
|
-
if (resourceType === null || resourceType === undefined) {
|
|
274
|
+
// verify required parameter 'functionId' is not null or undefined
|
|
275
|
+
if (functionId === null || functionId === undefined) {
|
|
2413
276
|
throw new Error(
|
|
2414
|
-
'Required parameter
|
|
2415
|
-
);
|
|
2416
|
-
}
|
|
2417
|
-
|
|
2418
|
-
if (pagination !== undefined) {
|
|
2419
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
2420
|
-
pagination,
|
|
2421
|
-
'PaginationInput'
|
|
277
|
+
'Required parameter functionId was null or undefined when calling createFunctionDeployment.'
|
|
2422
278
|
);
|
|
2423
279
|
}
|
|
2424
280
|
|
|
2425
|
-
if (resourceType !== undefined) {
|
|
2426
|
-
localVarQueryParameters['resourceType'] =
|
|
2427
|
-
ObjectSerializer.serialize(
|
|
2428
|
-
resourceType,
|
|
2429
|
-
"'DESTINATION' | 'SOURCE'"
|
|
2430
|
-
);
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
281
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2434
282
|
|
|
2435
283
|
let localVarUseFormData = false;
|
|
2436
284
|
|
|
2437
285
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
2438
|
-
method: '
|
|
286
|
+
method: 'POST',
|
|
2439
287
|
qs: localVarQueryParameters,
|
|
2440
288
|
headers: localVarHeaderParams,
|
|
2441
289
|
uri: localVarPath,
|
|
@@ -2472,7 +320,7 @@ export class FunctionsApi {
|
|
|
2472
320
|
}
|
|
2473
321
|
return new Promise<{
|
|
2474
322
|
response: http.IncomingMessage;
|
|
2475
|
-
body:
|
|
323
|
+
body: CreateFunctionDeployment200Response;
|
|
2476
324
|
}>((resolve, reject) => {
|
|
2477
325
|
localVarRequest(
|
|
2478
326
|
localVarRequestOptions,
|
|
@@ -2487,7 +335,7 @@ export class FunctionsApi {
|
|
|
2487
335
|
) {
|
|
2488
336
|
body = ObjectSerializer.deserialize(
|
|
2489
337
|
body,
|
|
2490
|
-
'
|
|
338
|
+
'CreateFunctionDeployment200Response'
|
|
2491
339
|
);
|
|
2492
340
|
resolve({ response: response, body: body });
|
|
2493
341
|
} else {
|
|
@@ -2506,18 +354,16 @@ export class FunctionsApi {
|
|
|
2506
354
|
});
|
|
2507
355
|
}
|
|
2508
356
|
/**
|
|
2509
|
-
*
|
|
2510
|
-
* @summary
|
|
357
|
+
* Deletes a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
358
|
+
* @summary Delete Function
|
|
2511
359
|
* @param functionId
|
|
2512
|
-
* @param UpdateFunctionV1Input
|
|
2513
360
|
*/
|
|
2514
|
-
public async
|
|
361
|
+
public async deleteFunction(
|
|
2515
362
|
functionId: string,
|
|
2516
|
-
UpdateFunctionV1Input: UpdateFunctionV1Input,
|
|
2517
363
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2518
364
|
): Promise<{
|
|
2519
365
|
response: http.IncomingMessage;
|
|
2520
|
-
body:
|
|
366
|
+
body: DeleteFunction200Response;
|
|
2521
367
|
}> {
|
|
2522
368
|
const localVarPath =
|
|
2523
369
|
this.basePath +
|
|
@@ -2531,30 +377,23 @@ export class FunctionsApi {
|
|
|
2531
377
|
this._defaultHeaders
|
|
2532
378
|
);
|
|
2533
379
|
const produces = [
|
|
2534
|
-
'application/vnd.segment.
|
|
380
|
+
'application/vnd.segment.v1+json',
|
|
2535
381
|
'application/json',
|
|
382
|
+
'application/vnd.segment.v1beta+json',
|
|
383
|
+
'application/vnd.segment.v1alpha+json',
|
|
2536
384
|
];
|
|
385
|
+
// give precedence to 'application/json'
|
|
2537
386
|
if (produces.indexOf('application/json') >= 0) {
|
|
2538
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2539
|
-
} else {
|
|
2540
387
|
localVarHeaderParams.Accept = 'application/json';
|
|
388
|
+
} else {
|
|
389
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2541
390
|
}
|
|
2542
391
|
let localVarFormParams: any = {};
|
|
2543
392
|
|
|
2544
393
|
// verify required parameter 'functionId' is not null or undefined
|
|
2545
394
|
if (functionId === null || functionId === undefined) {
|
|
2546
395
|
throw new Error(
|
|
2547
|
-
'Required parameter functionId was null or undefined when calling
|
|
2548
|
-
);
|
|
2549
|
-
}
|
|
2550
|
-
|
|
2551
|
-
// verify required parameter 'UpdateFunctionV1Input' is not null or undefined
|
|
2552
|
-
if (
|
|
2553
|
-
UpdateFunctionV1Input === null ||
|
|
2554
|
-
UpdateFunctionV1Input === undefined
|
|
2555
|
-
) {
|
|
2556
|
-
throw new Error(
|
|
2557
|
-
'Required parameter UpdateFunctionV1Input was null or undefined when calling updateFunctionAlpha.'
|
|
396
|
+
'Required parameter functionId was null or undefined when calling deleteFunction.'
|
|
2558
397
|
);
|
|
2559
398
|
}
|
|
2560
399
|
|
|
@@ -2563,16 +402,12 @@ export class FunctionsApi {
|
|
|
2563
402
|
let localVarUseFormData = false;
|
|
2564
403
|
|
|
2565
404
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
2566
|
-
method: '
|
|
405
|
+
method: 'DELETE',
|
|
2567
406
|
qs: localVarQueryParameters,
|
|
2568
407
|
headers: localVarHeaderParams,
|
|
2569
408
|
uri: localVarPath,
|
|
2570
409
|
useQuerystring: this._useQuerystring,
|
|
2571
410
|
json: true,
|
|
2572
|
-
body: ObjectSerializer.serialize(
|
|
2573
|
-
UpdateFunctionV1Input,
|
|
2574
|
-
'UpdateFunctionV1Input'
|
|
2575
|
-
),
|
|
2576
411
|
};
|
|
2577
412
|
|
|
2578
413
|
let authenticationPromise = Promise.resolve();
|
|
@@ -2604,7 +439,7 @@ export class FunctionsApi {
|
|
|
2604
439
|
}
|
|
2605
440
|
return new Promise<{
|
|
2606
441
|
response: http.IncomingMessage;
|
|
2607
|
-
body:
|
|
442
|
+
body: DeleteFunction200Response;
|
|
2608
443
|
}>((resolve, reject) => {
|
|
2609
444
|
localVarRequest(
|
|
2610
445
|
localVarRequestOptions,
|
|
@@ -2619,7 +454,7 @@ export class FunctionsApi {
|
|
|
2619
454
|
) {
|
|
2620
455
|
body = ObjectSerializer.deserialize(
|
|
2621
456
|
body,
|
|
2622
|
-
'
|
|
457
|
+
'DeleteFunction200Response'
|
|
2623
458
|
);
|
|
2624
459
|
resolve({ response: response, body: body });
|
|
2625
460
|
} else {
|
|
@@ -2638,18 +473,16 @@ export class FunctionsApi {
|
|
|
2638
473
|
});
|
|
2639
474
|
}
|
|
2640
475
|
/**
|
|
2641
|
-
*
|
|
2642
|
-
* @summary
|
|
476
|
+
* Gets a Function. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
477
|
+
* @summary Get Function
|
|
2643
478
|
* @param functionId
|
|
2644
|
-
* @param UpdateFunctionV1Input
|
|
2645
479
|
*/
|
|
2646
|
-
public async
|
|
480
|
+
public async getFunction(
|
|
2647
481
|
functionId: string,
|
|
2648
|
-
UpdateFunctionV1Input: UpdateFunctionV1Input,
|
|
2649
482
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2650
483
|
): Promise<{
|
|
2651
484
|
response: http.IncomingMessage;
|
|
2652
|
-
body:
|
|
485
|
+
body: GetFunction200Response;
|
|
2653
486
|
}> {
|
|
2654
487
|
const localVarPath =
|
|
2655
488
|
this.basePath +
|
|
@@ -2663,30 +496,23 @@ export class FunctionsApi {
|
|
|
2663
496
|
this._defaultHeaders
|
|
2664
497
|
);
|
|
2665
498
|
const produces = [
|
|
2666
|
-
'application/vnd.segment.
|
|
499
|
+
'application/vnd.segment.v1+json',
|
|
2667
500
|
'application/json',
|
|
501
|
+
'application/vnd.segment.v1beta+json',
|
|
502
|
+
'application/vnd.segment.v1alpha+json',
|
|
2668
503
|
];
|
|
504
|
+
// give precedence to 'application/json'
|
|
2669
505
|
if (produces.indexOf('application/json') >= 0) {
|
|
2670
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2671
|
-
} else {
|
|
2672
506
|
localVarHeaderParams.Accept = 'application/json';
|
|
507
|
+
} else {
|
|
508
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2673
509
|
}
|
|
2674
510
|
let localVarFormParams: any = {};
|
|
2675
511
|
|
|
2676
512
|
// verify required parameter 'functionId' is not null or undefined
|
|
2677
513
|
if (functionId === null || functionId === undefined) {
|
|
2678
514
|
throw new Error(
|
|
2679
|
-
'Required parameter functionId was null or undefined when calling
|
|
2680
|
-
);
|
|
2681
|
-
}
|
|
2682
|
-
|
|
2683
|
-
// verify required parameter 'UpdateFunctionV1Input' is not null or undefined
|
|
2684
|
-
if (
|
|
2685
|
-
UpdateFunctionV1Input === null ||
|
|
2686
|
-
UpdateFunctionV1Input === undefined
|
|
2687
|
-
) {
|
|
2688
|
-
throw new Error(
|
|
2689
|
-
'Required parameter UpdateFunctionV1Input was null or undefined when calling updateFunctionBeta.'
|
|
515
|
+
'Required parameter functionId was null or undefined when calling getFunction.'
|
|
2690
516
|
);
|
|
2691
517
|
}
|
|
2692
518
|
|
|
@@ -2695,16 +521,12 @@ export class FunctionsApi {
|
|
|
2695
521
|
let localVarUseFormData = false;
|
|
2696
522
|
|
|
2697
523
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
2698
|
-
method: '
|
|
524
|
+
method: 'GET',
|
|
2699
525
|
qs: localVarQueryParameters,
|
|
2700
526
|
headers: localVarHeaderParams,
|
|
2701
527
|
uri: localVarPath,
|
|
2702
528
|
useQuerystring: this._useQuerystring,
|
|
2703
529
|
json: true,
|
|
2704
|
-
body: ObjectSerializer.serialize(
|
|
2705
|
-
UpdateFunctionV1Input,
|
|
2706
|
-
'UpdateFunctionV1Input'
|
|
2707
|
-
),
|
|
2708
530
|
};
|
|
2709
531
|
|
|
2710
532
|
let authenticationPromise = Promise.resolve();
|
|
@@ -2736,7 +558,7 @@ export class FunctionsApi {
|
|
|
2736
558
|
}
|
|
2737
559
|
return new Promise<{
|
|
2738
560
|
response: http.IncomingMessage;
|
|
2739
|
-
body:
|
|
561
|
+
body: GetFunction200Response;
|
|
2740
562
|
}>((resolve, reject) => {
|
|
2741
563
|
localVarRequest(
|
|
2742
564
|
localVarRequestOptions,
|
|
@@ -2751,7 +573,7 @@ export class FunctionsApi {
|
|
|
2751
573
|
) {
|
|
2752
574
|
body = ObjectSerializer.deserialize(
|
|
2753
575
|
body,
|
|
2754
|
-
'
|
|
576
|
+
'GetFunction200Response'
|
|
2755
577
|
);
|
|
2756
578
|
resolve({ response: response, body: body });
|
|
2757
579
|
} else {
|
|
@@ -2770,25 +592,20 @@ export class FunctionsApi {
|
|
|
2770
592
|
});
|
|
2771
593
|
}
|
|
2772
594
|
/**
|
|
2773
|
-
*
|
|
2774
|
-
* @summary
|
|
2775
|
-
* @param
|
|
2776
|
-
* @param
|
|
595
|
+
* Lists all Functions in a Workspace. **Note**: In order to successfully call this endpoint, the specified Workspace needs to have the Functions feature enabled. Please reach out to your customer success manager for more information.
|
|
596
|
+
* @summary List Functions
|
|
597
|
+
* @param pagination Pagination parameters. This parameter exists in v1.
|
|
598
|
+
* @param resourceType The Function type. Config API note: equal to `type`. This parameter exists in v1.
|
|
2777
599
|
*/
|
|
2778
|
-
public async
|
|
2779
|
-
|
|
2780
|
-
|
|
600
|
+
public async listFunctions(
|
|
601
|
+
pagination: PaginationInput,
|
|
602
|
+
resourceType: 'DESTINATION' | 'SOURCE',
|
|
2781
603
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2782
604
|
): Promise<{
|
|
2783
605
|
response: http.IncomingMessage;
|
|
2784
|
-
body:
|
|
606
|
+
body: ListFunctions200Response;
|
|
2785
607
|
}> {
|
|
2786
|
-
const localVarPath =
|
|
2787
|
-
this.basePath +
|
|
2788
|
-
'/functions/{functionId}'.replace(
|
|
2789
|
-
'{' + 'functionId' + '}',
|
|
2790
|
-
encodeURIComponent(String(functionId))
|
|
2791
|
-
);
|
|
608
|
+
const localVarPath = this.basePath + '/functions';
|
|
2792
609
|
let localVarQueryParameters: any = {};
|
|
2793
610
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2794
611
|
{},
|
|
@@ -2797,46 +614,57 @@ export class FunctionsApi {
|
|
|
2797
614
|
const produces = [
|
|
2798
615
|
'application/vnd.segment.v1+json',
|
|
2799
616
|
'application/json',
|
|
617
|
+
'application/vnd.segment.v1beta+json',
|
|
618
|
+
'application/vnd.segment.v1alpha+json',
|
|
2800
619
|
];
|
|
620
|
+
// give precedence to 'application/json'
|
|
2801
621
|
if (produces.indexOf('application/json') >= 0) {
|
|
2802
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2803
|
-
} else {
|
|
2804
622
|
localVarHeaderParams.Accept = 'application/json';
|
|
623
|
+
} else {
|
|
624
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2805
625
|
}
|
|
2806
626
|
let localVarFormParams: any = {};
|
|
2807
627
|
|
|
2808
|
-
// verify required parameter '
|
|
2809
|
-
if (
|
|
628
|
+
// verify required parameter 'pagination' is not null or undefined
|
|
629
|
+
if (pagination === null || pagination === undefined) {
|
|
2810
630
|
throw new Error(
|
|
2811
|
-
'Required parameter
|
|
631
|
+
'Required parameter pagination was null or undefined when calling listFunctions.'
|
|
2812
632
|
);
|
|
2813
633
|
}
|
|
2814
634
|
|
|
2815
|
-
// verify required parameter '
|
|
2816
|
-
if (
|
|
2817
|
-
UpdateFunctionV1Input === null ||
|
|
2818
|
-
UpdateFunctionV1Input === undefined
|
|
2819
|
-
) {
|
|
635
|
+
// verify required parameter 'resourceType' is not null or undefined
|
|
636
|
+
if (resourceType === null || resourceType === undefined) {
|
|
2820
637
|
throw new Error(
|
|
2821
|
-
'Required parameter
|
|
638
|
+
'Required parameter resourceType was null or undefined when calling listFunctions.'
|
|
639
|
+
);
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
if (pagination !== undefined) {
|
|
643
|
+
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
644
|
+
pagination,
|
|
645
|
+
'PaginationInput'
|
|
2822
646
|
);
|
|
2823
647
|
}
|
|
2824
648
|
|
|
649
|
+
if (resourceType !== undefined) {
|
|
650
|
+
localVarQueryParameters['resourceType'] =
|
|
651
|
+
ObjectSerializer.serialize(
|
|
652
|
+
resourceType,
|
|
653
|
+
"'DESTINATION' | 'SOURCE'"
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
|
|
2825
657
|
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2826
658
|
|
|
2827
659
|
let localVarUseFormData = false;
|
|
2828
660
|
|
|
2829
661
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
2830
|
-
method: '
|
|
662
|
+
method: 'GET',
|
|
2831
663
|
qs: localVarQueryParameters,
|
|
2832
664
|
headers: localVarHeaderParams,
|
|
2833
665
|
uri: localVarPath,
|
|
2834
666
|
useQuerystring: this._useQuerystring,
|
|
2835
667
|
json: true,
|
|
2836
|
-
body: ObjectSerializer.serialize(
|
|
2837
|
-
UpdateFunctionV1Input,
|
|
2838
|
-
'UpdateFunctionV1Input'
|
|
2839
|
-
),
|
|
2840
668
|
};
|
|
2841
669
|
|
|
2842
670
|
let authenticationPromise = Promise.resolve();
|
|
@@ -2868,7 +696,7 @@ export class FunctionsApi {
|
|
|
2868
696
|
}
|
|
2869
697
|
return new Promise<{
|
|
2870
698
|
response: http.IncomingMessage;
|
|
2871
|
-
body:
|
|
699
|
+
body: ListFunctions200Response;
|
|
2872
700
|
}>((resolve, reject) => {
|
|
2873
701
|
localVarRequest(
|
|
2874
702
|
localVarRequestOptions,
|
|
@@ -2883,7 +711,7 @@ export class FunctionsApi {
|
|
|
2883
711
|
) {
|
|
2884
712
|
body = ObjectSerializer.deserialize(
|
|
2885
713
|
body,
|
|
2886
|
-
'
|
|
714
|
+
'ListFunctions200Response'
|
|
2887
715
|
);
|
|
2888
716
|
resolve({ response: response, body: body });
|
|
2889
717
|
} else {
|
|
@@ -2907,7 +735,7 @@ export class FunctionsApi {
|
|
|
2907
735
|
* @param functionId
|
|
2908
736
|
* @param UpdateFunctionV1Input
|
|
2909
737
|
*/
|
|
2910
|
-
public async
|
|
738
|
+
public async updateFunction(
|
|
2911
739
|
functionId: string,
|
|
2912
740
|
UpdateFunctionV1Input: UpdateFunctionV1Input,
|
|
2913
741
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
@@ -2929,18 +757,21 @@ export class FunctionsApi {
|
|
|
2929
757
|
const produces = [
|
|
2930
758
|
'application/vnd.segment.v1+json',
|
|
2931
759
|
'application/json',
|
|
760
|
+
'application/vnd.segment.v1beta+json',
|
|
761
|
+
'application/vnd.segment.v1alpha+json',
|
|
2932
762
|
];
|
|
763
|
+
// give precedence to 'application/json'
|
|
2933
764
|
if (produces.indexOf('application/json') >= 0) {
|
|
2934
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2935
|
-
} else {
|
|
2936
765
|
localVarHeaderParams.Accept = 'application/json';
|
|
766
|
+
} else {
|
|
767
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2937
768
|
}
|
|
2938
769
|
let localVarFormParams: any = {};
|
|
2939
770
|
|
|
2940
771
|
// verify required parameter 'functionId' is not null or undefined
|
|
2941
772
|
if (functionId === null || functionId === undefined) {
|
|
2942
773
|
throw new Error(
|
|
2943
|
-
'Required parameter functionId was null or undefined when calling
|
|
774
|
+
'Required parameter functionId was null or undefined when calling updateFunction.'
|
|
2944
775
|
);
|
|
2945
776
|
}
|
|
2946
777
|
|
|
@@ -2950,7 +781,7 @@ export class FunctionsApi {
|
|
|
2950
781
|
UpdateFunctionV1Input === undefined
|
|
2951
782
|
) {
|
|
2952
783
|
throw new Error(
|
|
2953
|
-
'Required parameter UpdateFunctionV1Input was null or undefined when calling
|
|
784
|
+
'Required parameter UpdateFunctionV1Input was null or undefined when calling updateFunction.'
|
|
2954
785
|
);
|
|
2955
786
|
}
|
|
2956
787
|
|